Suggestion: Backpacks 2nd Primary

  • Offline GSN_Pager
  • Fresh Spawn
  • *
  • Posts: 19
  • If it is broken, tell me once not over and over.

Suggestion: Backpacks 2nd Primary

« posted: Sep 22, 2013, 06:47 AM »
Would it be possible to fix the old A2 backpack system (that you can put your 2nd primary weapon in) if you use the old A2 script it weapons lose optics that you add to it and you lose mags if you keep switching back and forth. Thanks ~Pager

Re: Suggestion: Backpacks 2nd Primary

« Reply #1 posted: Sep 22, 2013, 07:48 AM »
Which "old A2 script"? We don't use the old A2 backpack system (as the inventory system is provided by BIS in the engine) and therefore I'm not sure what scripts you are talking about (because we dont use any for that).

Whats the actual issue? what server and what steps do we have to do to reproduce the issue?

MF
  • Offline GSN_Pager
  • Fresh Spawn
  • *
  • Posts: 19
  • If it is broken, tell me once not over and over.

Re: Suggestion: Backpacks 2nd Primary

« Reply #2 posted: Sep 22, 2013, 08:42 AM »
Thank you Switcher05 for still having this up on Github. https://github.com/Switcher05/Zargabad-V3/tree/master/Wasteland_Zargabad_master.Zargabad
Script #1: x_init_backback.sqf
Script #2: x_backpack.sqf

Normally it's in the addons Folder in A2 but in this case he has it at the bottom of the main folder and is called in the Main init.sqf  execVM "x_init_backback.sqf";

It's used to carry a 2nd Primary weapon and that weapon if it's in the backpack you don't lose it if killed, but you will lose the Primary Weapon in your hand or if it on your shoulder. No other weapon can be placed in there (Launcher or Handgun).

My problem is it's a A2 script that won't work fully on a A3 server.
If you put a weapon in the backpack (2nd Primary Weapon) let's say your a sniper don't want to lose you LRR and your on the move to another location you put the LRR in the backpack and pull out your loadout weapon in our server it's a XMX and you get to where you want to set-up and switch to the LRR and now it's missing a mag or two and if you put the SOS scope on it you lose the scope and the mag (but if you got the LRR w/ SOS out of a mission box the scope stays If you got the LRR then put a scope and a mag or two on it it gets removed when you switch back from the backpack).

I have a A3 Team Wasteland server running converted by me to run Stratis just filter GSN that server is using the backpack system just scrool wheel till you get XMX 6.5mm to Backpack.

Re: Suggestion: Backpacks 2nd Primary

« Reply #3 posted: Sep 22, 2013, 09:46 AM »
I've had a quick look at the backpack code, and as far as i can tell it not an issue with the engine (or our wasteland code) but what Zargabad code is trying to do. The R3F Logistics code had the same issue because it was only saving the weapon, which was fine in arma 2 as the each attachment was actually a separate weapon, and the magazine was never attached a gun(it just had to be in the inventory). Because the backpack code isn't saving the attachments (including the magazine attached to the weapon) you loose it when you use that script.

You'll need to fix the code in x_backpack.sqf from line 48 and below.

Some working code in R3F Log (warning the variable names are in french):
Removing items: https://github.com/A3Wasteland/ArmA3_Wasteland.Altis/blob/Development_main/addons/R3F_ARTY_AND_LOG/R3F_LOG/objet_deplacable/deplacer.sqf#L66
Adding them back: https://github.com/A3Wasteland/ArmA3_Wasteland.Altis/blob/Development_main/addons/R3F_ARTY_AND_LOG/R3F_LOG/objet_deplacable/deplacer.sqf#L204

TL;DR
Its not A3Wasteland Issue, its your backpack code. It doesn't take into account Arma 3's new Attachment System(affecting both ammo and attachments).

as a side note.... fk that code was annoying to read, almost as bad as the r3f stuff (i don't know french  :P)

MF