The stand-alone mod S.T.A.L.K.E.R. Anomaly aims to be the most stable and customizable experience for fans of the S.T.A.L.K.E.R. games. It's powered by the Monolith 64-bit engine, a custom fork of the X-Ray engine.

Description

This plugin hides the default ammo counter on the bottom right and instead lets you check the ammo in the magazine by pressing B.

Preview
Ammo Check - Anomaly Magazines Plugin
Post comment Comments  (0 - 50 of 82)
iAlcatrazZ
iAlcatrazZ - - 92 comments

good idea mate, is there any animation coming along with this?

Reply Good karma Bad karma+5 votes
Zukuu Author
Zukuu - - 38 comments

Currently only putting the wepaon away and taking it back out, so nothign handcrafted. On most of the weapons it seemed to fit, a few aren't that good, but I dunno how create a new animation. This was just a quick project on saturday. :)

Reply Good karma+7 votes
reter
reter - - 615 comments

awesome, thx for your work!

Reply Good karma Bad karma+3 votes
Katarina_the_Mid
Katarina_the_Mid - - 154 comments

Is this compatible with the *other* magazines mod, 2.5 I think it's called

Reply Good karma Bad karma+1 vote
Zukuu Author
Zukuu - - 38 comments

Only the one linked in the requirements

Reply Good karma+1 vote
ProSamo
ProSamo - - 6 comments

amazing, i gotta try

Reply Good karma Bad karma+4 votes
Ohotnik
Ohotnik - - 149 comments

But... It works with 3.6.1 and EXTENDED too))) Wonderful fix, man! I will recomend it to everyone

Reply Good karma Bad karma+2 votes
Zukuu Author
Zukuu - - 38 comments

Could be, I only tested it with the latest version, but I guess Wuut won't change the functions I am using, so yeah, as long as you got any version it should work.

Reply Good karma+2 votes
Ohotnik
Ohotnik - - 149 comments

Nice. Really cool plagin

Reply Good karma Bad karma+1 vote
Hetman64
Hetman64 - - 121 comments

This is definitely a nice addon for the magazines mod, thank you!

Reply Good karma Bad karma+2 votes
Dalabak
Dalabak - - 196 comments

This is GREAT! One request: Is it somehow possible to make the check ammo button just be holding the reload key?

Reply Good karma Bad karma+1 vote
Zukuu Author
Zukuu - - 38 comments

I tried that but it seems like the engine does not support holding the button like it would be needed here.

Reply Good karma+1 vote
szur.k
szur.k - - 25 comments

@ Dalabak
you may use the 'autohotkey' for this; it works fine as portable so you don't even need to install it. there's a script:
Pastebin.com
that intercepts* a middle/wheel mouse button and, if it's pressed for more than 0.5 s, sends a 'b' keystroke.
save it as 'autohotkey.ahk' and place together with 'AutoHotkeyU64.exe' renamed to 'autohotkey.exe'. start the 'autohotkey.exe' with the same rigths as the game.

* unfortunately, the game does register the key being pressed but here's a workaround:
- in the game, bind the reload action to an unused key;
- in the script, edit the value of 'user_key' (line #12) replacing it with your usual reload key;
- change the value of 'game_key' (line #13) to the key assigned to reload in the first step; use lowercase if it's a letter.

Reply Good karma Bad karma+1 vote
Guest
Guest - - 691,391 comments

This comment is currently awaiting admin approval, join now to view.

GabeCPB0
GabeCPB0 - - 354 comments

Thanks a lot, Zukuu! As a believer of magazines addon as an immersion plus, your is a very nice welcome as well!

I'm using version 1.5, with hotfix 8 and the 1.4 update, with Generic Mod Enabler, version 2.6.0.157. Your addon worked fine.

Reply Good karma Bad karma+3 votes
_STYX_
_STYX_ - - 89 comments

can you make this for default anomaly?? that would be an awesome alternative to the counter, magazine mod or not

Reply Good karma Bad karma+1 vote
Zukuu Author
Zukuu - - 38 comments

Well, since it relies on the magazine data from Anomaly magazines, I cannot do it like it is now. I could however do an alternative that either gives an exact amount (like it currently is for shotguns) or something like "Around 20", "More than 5" etc., something that does not require the max ammo in a mag to calculate the percentage (no "full" / "About half")...

Reply Good karma+3 votes
szur.k
szur.k - - 25 comments

@ _STYX_
there you are:
Pastebin.com

copy, save as 'ammo_check.script' and replace the original.

@ author
i hope you don't mind publishing my work on your addon; if you do, delete this post please.

edit: updated to v1.1

Reply Good karma Bad karma+3 votes
Zukuu Author
Zukuu - - 38 comments

Awesome dude, was trying all day to get that working, had a lot of crashes haha, but I think you replied to the wrong person? :)

Reply Good karma+1 vote
szur.k
szur.k - - 25 comments

@ Zukuu
my post was an answer to the _STYX_'s question and i replied to him.

@ _STYX_
you're welcome.

Reply Good karma Bad karma+2 votes
_STYX_
_STYX_ - - 89 comments

awesome man, thanks a lot

Reply Good karma Bad karma+1 vote
SageDaHerb
SageDaHerb - - 52 comments

Thanks bruv!

Reply Good karma Bad karma+1 vote
EricSol
EricSol - - 282 comments

nice work man even without animations!

Reply Good karma Bad karma+1 vote
jpbernardo81
jpbernardo81 - - 118 comments

very nice thanks!

Reply Good karma Bad karma+1 vote
Hetman64
Hetman64 - - 121 comments

Any idea on how to get it working with cyrillic letters? I tried making a Russian version for my own use, but just replacing the messages with russian ones does not work, it's all gibberish in game, like the script does not recognize anything but latin letters.

Reply Good karma Bad karma+1 vote
Zukuu Author
Zukuu - - 38 comments

Hi, you need to change the file encoding to Windows-1251 first. You can do that in Notepad++ under Encoding - Character sets - Cyrillic. After you did that you can simply change the strings.

Reply Good karma+2 votes
Hetman64
Hetman64 - - 121 comments

It worked, thanks!

Reply Good karma Bad karma+1 vote
Ohotnik
Ohotnik - - 149 comments

Hi, why when weapon is jammed, I can see that mag "Empty" on my screen?

Reply Good karma Bad karma+1 vote
Zukuu Author
Zukuu - - 38 comments

The new version is live now.

Reply Good karma+2 votes
Guest
Guest - - 691,391 comments

Hi when I press B it's crashes to desktop instantly

Reply Good karma Bad karma0 votes
Zukuu Author
Zukuu - - 38 comments

You got Mod from the requirements installed?

Reply Good karma+1 vote
Guest
Guest - - 691,391 comments

This comment is currently awaiting admin approval, join now to view.

machinegod420
machinegod420 - - 22 comments

It would be good to have this work with different magazine sizes.
Instead of
```
local defaultMagSection = wuut_mags.WeaponGetDefaulMagSection(weapon)
```
You should grab the current mag inside the weapon. That way this mod would work with mods that add extended magazines or magazines of different sizes

I got this to work by adding this function to the original wuut_mags script. I am completely unfamiliar with scripting for STALKER so you might be able to find a solution that fits in your script.

```
function GetMagSizeInWeapon(weapon)
local magData = WeaponGetMagData(weapon)
local magSection = magData[iWEP_MSEC]

-- make sure we have a valid mag string here
if(magSection ~= nil and system_ini():section_exist(magSection)) then
print_f("GetMagInWeapon " .. magSection )
local maxAmmo = system_ini():r_u32(magSection, "max_mag_size")
return maxAmmo

end

return 0
end
```

Reply Good karma Bad karma+1 vote
manzmnl
manzmnl - - 485 comments

Where exactly did you add the function? You didn't modify an existing one, but looks like you took the function "function MagazineInWeaponIsValid(weapon)" as a template.

Reply Good karma Bad karma+1 vote
machinegod420
machinegod420 - - 22 comments

this has to be added to the original wuut_mags.script and called with wuut.GetMagSizeInWeapon(). there is some lua **** that causes state to be contained in one script so I don't know how to change it to work inside the script added by this mod

Reply Good karma Bad karma+1 vote
manzmnl
manzmnl - - 485 comments

So your function adds basically the same feature, like this mod, but added to the original instead? I'd like to add it to Mags Extended then.

And your function can be defined in the wuut_mags.script without having to place it at a certain location, I suppose? Just declare it there, and call it from the main script? Or the main function loop?
I'm totally unfamiliar with Stalker scripting too. Can you send me yours so I can learn from it? Thx

Edit: Oh, and how do you use the added function ingame? There's no keypress defined, so is it working automatically?

Reply Good karma Bad karma+1 vote
machinegod420
machinegod420 - - 22 comments

Don't think you need to forward declare anything in lua so you can put it anywhere you want. its just a function you can call from the base script. the function by itself doesn't do anything. you have to add the logic to the script added by this mod as well.

Reply Good karma Bad karma+1 vote
manzmnl
manzmnl - - 485 comments

I'm pretty sure that you just have to call the function in this mod from the main function loop at the beginning of the script - or just replace the ammo check part.

Reply Good karma Bad karma+1 vote
machinegod420
machinegod420 - - 22 comments

Not sure what you mean by this. My ammo_check.script looks like this:

```
local magSection = magData[wuut_mags.iWEP_MSEC]
local boxSize = wuut_mags.GetMagSizeInWeapon(weapon)
if(currentState == 0) then
if(defaultMagSectionExists) then
local currentAmmo = weapon:get_ammo_in_magazine()
--local maxAmmo = system_ini():r_u32(magSection, "max_mag_size")
local maxAmmo = boxSize
```

Reply Good karma Bad karma+2 votes
sganon
sganon - - 239 comments

Hello, I am trying this out and will add it to Muh Mags Pack for trials and distribute it to Ohotnik, wuut and Zukuu respectively. Your GetMagSizeInWeapon function I will send to Ohotnik at least to make it forward compatible, and Zukuu will receive the modified ammo_check.script. Credit will go to you, thanks for that.

Reply Good karma Bad karma+1 vote
Zerk.
Zerk. - - 487 comments

Wow, this is aewsome

Reply Good karma Bad karma+1 vote
EricSol
EricSol - - 282 comments

Just wondering... is it possible to make a keybind which allows me to pull out the magazine into my inventory? would be pretty nice when i gotta reload my mag in the middle of a fight

Reply Good karma Bad karma+1 vote
sganon
sganon - - 239 comments

I consider this a must have. Great if you think the ammo counter is unrealistic but don't want to run around blind.

Reply Good karma Bad karma+2 votes
sganon
sganon - - 239 comments

@Zukuu, I would like to add Ammo Check to Muh Magazines as an integrated addon in a curated pack, aiming to be compatible with Muh Immersion but also workable as standalone.
I would give proper credit of course. My messages are limited as a new member, and I can't send you one today, so I write you in the comments.

Reply Good karma Bad karma+1 vote
Zukuu Author
Zukuu - - 38 comments

Sure, go ahead! :)

Reply Good karma+1 vote
sganon
sganon - - 239 comments

Thank you!

Reply Good karma Bad karma+1 vote
manzmnl
manzmnl - - 485 comments

@Zukuu: Do you consider changing the mod, that it grabs the actual magazine inside the weapon, similar to the function that machinegod420 added to original mags? It would also support different sizes of mags then, and look better.

Reply Good karma Bad karma+1 vote
Zukuu Author
Zukuu - - 38 comments

Not planning on editing currently, no.

Reply Good karma+1 vote
jpbernardo81
jpbernardo81 - - 118 comments

is it possible to port it to dead air version?

Reply Good karma Bad karma+1 vote
Zukuu Author
Zukuu - - 38 comments

Never tried Dead air, dunno

Reply Good karma+1 vote
Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account:

Tags

Ammo Check - Anomaly Magazines Plugin has not been tagged yet.