Jump to content

Zafir won't load ammo after 1.42 / 0.3.0.2 update


danmac

Recommended Posts

Hi guys, first post so please be gentle and let me know if it needs an edit or two :)

 

Since the 1.42 / 0.3.0.2 update we have noticed the Zafir has become incompatible with it's ammo.

 

We have done the following tests, here's what stopped working:

  • Existing ammo stored prior to update
  • Ammo spawned using admin menu (Skaronator) spawn menu
  • Ammo bought at the trader

The following does work:

  • Ammo spawned using admin menu "Give Ammo" option
  • Ammo taken from dead AI

In addition, the ammo that does load correctly, cannot be sold at the trader. It doesn't seem to matter where you got the gun, the problem from what we can tell is with the ammo. We haven't yet had time to test ammo from loot spawns.

 

I assume the ArmA 1.42 update has changed the internal name of the ammo or something, but the Epoch side of things (trader / admin spawn menu / existing database) still has the old ones?

 

Sorry I'm not totally knowledgable and not the owner of the server in question just trying to help out our GLORIOUS LEADER. Thanks for reading and a big thank you to the devs and community for this awesome work.

Link to comment
Share on other sites

Just to add, I realised I could get at the internal names of the ammo through the admin log.

 

Ammo that stopped working:

 

150Rnd_762x51_Box

150Rnd_762x51_Box_Tracer

 

Ammo that does work:

 

150Rnd_762x54_Box

 

Probably safe to assume the green tracer names need changing to this but untested:

 

150Rnd_762x54_Box_Tracer

 

Hope this helps :)

Link to comment
Share on other sites

It's already been reported on the feedback tracker.  Please upvote the issue to gain visibility.

 

http://feedback.arma3.com/view.php?id=23306

 

Server admins can execute this code via an addon that will fix it for now

 

if !(isServer) exitWith {};
 
[] spawn {
	sleep 0.1;
 
	{
		_unit = _x;
		if ({_x == '150Rnd_762x51_Box' || _x == '150Rnd_762x51_Box_Tracer'} count magazines _unit > 0) then {
			{
			 if (_x == "150Rnd_762x51_Box") then {
			 	_unit removeMagazineGlobal _x;
			 	_unit  addMagazineGlobal "150Rnd_762x54_Box";
			 };
 
			 if (_x == "150Rnd_762x51_Box_Tracer") then {
			 	_unit  removeMagazineGlobal _x;
			 	_unit  addMagazineGlobal  "150Rnd_762x54_Box_Tracer";
			 };
			} forEach magazines _unit ;
		};
	} forEach playableUnits;
};

 

Code Source:  https://gist.github.com/Wolfenswan/6f47be48591dc23aa103

Link to comment
Share on other sites

Yep, our pricing is still default. Thinking about it, even if Epoch devs update the references to the ammo in their code, that still doesn't fix the existing ammo in the database, only your patch can do that, or some tinkering with redis that goes right over my head, I only speak SQL :P

 

Appreciate your help and insight :)

Link to comment
Share on other sites

Well if you add that script I posted above it should take care of swapping out the x51 ammo for x54 ammo one by one, even for magazines in the database already.  Eventually you'll either get through them all or they'll expire and be wiped by the server.  Either way the end result is successful.  :)  

Link to comment
Share on other sites

Indeed, it's quite a clever solution, and the code is very neat and readable. (I've done programming for years but only ever flirted occasionally with ArmA scripting, some of which looks like I just sneezed on my screen ...)

Link to comment
Share on other sites

It's already been reported on the feedback tracker.  Please upvote the issue to gain visibility.

 

http://feedback.arma3.com/view.php?id=23306

 

Server admins can execute this code via an addon that will fix it for now

 

if !(isServer) exitWith {};
 
[] spawn {
	sleep 0.1;
 
	{
		_unit = _x;
		if ({_x == '150Rnd_762x51_Box' || _x == '150Rnd_762x51_Box_Tracer'} count magazines _unit > 0) then {
			{
			 if (_x == "150Rnd_762x51_Box") then {
			 	_unit removeMagazineGlobal _x;
			 	_unit  addMagazineGlobal "150Rnd_762x54_Box";
			 };
 
			 if (_x == "150Rnd_762x51_Box_Tracer") then {
			 	_unit  removeMagazineGlobal _x;
			 	_unit  addMagazineGlobal  "150Rnd_762x54_Box_Tracer";
			 };
			} forEach magazines _unit ;
		};
	} forEach playableUnits;
};

 

Code Source:  https://gist.github.com/Wolfenswan/6f47be48591dc23aa103

 

 

If you get kicked for addMagazine script restrictions, add this to the end of your addMagazine line (26 in mine) in your scripts.txt file

 

!="_unit  addMagazineGlobal \"150Rnd_762x54_Box\";" !="_unit  addMagazineGlobal  \"150Rnd_762x54_Box_Tracer\";"

Link to comment
Share on other sites

  • 3 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Discord

×
×
  • Create New...