Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
1. Detach the weapon holster when entering vehicles,
2. Re-attach the holster when exiting vehicles, and
3. Not handle weapon swaps using GGE when in vehicles.
You'll need a code editor (notepad++, VS Code, notepad (if you're a masochist)), a pbo manager, and a brain. Google is also optional.
----------------------------------------------------------------------------------------------------
First, go to the addon folder for GGE ("..\Steam\steamapps\workshop\content\107410\2285428929\addons").
Next, extract "gge_swap.pbo" to "gge_swap" (use the PBO manager to do this).
You should now be able to access the mod files.
Go to "gge_swap\functions" and open "gge_swap_fnc_init.sqf" using your code editor. This is basically the meat of the mod. It's where instructions for the computer are written out (IE where functions, event handlers, and variables are defined). Next, copy and paste the blocks of code below to the respective code blocks. Note that the modified lines are singled out and have comment blocks with them.
The first line of code you'll need to add will be between lines 242 and 243. This will detach the weapon holder when entering a vehicle. The weapon holder is already made invisible by this point, so nothing will be left floating above the ground.
____________________________________________________________
// Hide weapon holder when enter vehicle
player addEventHandler ["GetInMan", {
params ["_unit", "_role", "_vehicle", "_turret"];
gge_swap_var_chestWeaponHolder setDamage 0;
[gge_swap_var_chestWeaponHolder, true] remoteExec ["hideObject", 0];
detach gge_swap_var_chestWeaponHolder; // Detaches the invisible holster when entering vehicle
gge_swap_var_chestWeaponHolder setDamage 1;
}];
____________________________________________________________
The next line is between lines 249 and 250. This re-attaches the weapon holder when you hop out of a vehicle by calling a function from the original mod.
____________________________________________________________
// Unhide weapon holder when exit vehicle
player addEventHandler ["GetOutMan", {
params ["_unit", "_role", "_vehicle", "_turret"];
gge_swap_var_chestWeaponHolder setDamage 0;
call gge_swap_fnc_attachWeaponHolder; // Re-attaches the weapon holder
[gge_swap_var_chestWeaponHolder, false] remoteExec ["hideObject", 0];
gge_swap_var_chestWeaponHolder setDamage 1;
}];
____________________________________________________________
The final line is a modification of line 410, near the bottom in the gge_swap_fnc_handleSwap definition. This basically modifies the gge swap eventhandler to use vanilla behavior when swapping weapons in prone and (with the change) in vehicles. Modify the line "if (stance player == "PRONE") exitWith {}" to:
____________________________________________________________
if ((stance player == "PRONE") or !(isNull objectParent player)) exitWith {};
____________________________________________________________
That should do it. Save the file (ctrl+s), exit, return to the "addons" folder, and pack the "gge_swap" folder to "gge_swap.pbo".
Finally, run Arma and make sure everything works properly (swapping weapons, AI helicopter behavior, weapon swaps in helos, etc.).
----------------------------------------------------------------------------------------------------
I haven't done much testing with the fix beyond checking that it works. Not sure of any performance impacts, but I did note a lag spike when hopping into helicopters. I tested AI heli pilot behavior with Drongo's Air Ops mod and the AI followed altitude commands correctly.
Lastly (and I don't really know much about this since I play mostly singleplayer), I think editing mod files removes mod signatures which are important for multiplayer. You might have to figure out how to re-sign the mod to use in online servers, idk. Anyway, lmk if you have any questions and enjoy the fix!
So i tried your fix.. or let´s say i tried to do it.. but i got two problems if i open the .sqf file make the changes and save and exit that notepad or editor programm it doesn´t actually save it.. if i go check it again the changes on the .sqf aren´t there....
Also i dont understandt the part with packing "gge_swap" folder to "gge.swap.pbo", you mean packing with filebank of arma tools or another programm and exactly packing what now?
I know some about packing but only custom factions made with Orbat and thats it .. maybe you can help out again?
Or just send that fix to mod author and maybe the fix finally -.-
By the sound of it, I think you're editing the .sqf file inside the pbo (as in double clicking gge_swap.pbo, going to the .sqf, then editing). I don't think you can read/write to anything that is packed inside a pbo without first unpacking***. If that is the case, you have to make sure to right click on gge_swap.pbo, hover over your pbo manager settings (usually named "PBO Manager"), and click on "extract to gge_swap" or "unpack as gge_swap" or something similar. This will make a new folder show up inside the mod addons folder under the name gge_swap. Then, follow the rest of the instructions to make the changes. Finally, right click on the gge_swap folder and pack gge_swap to gge_swap.pbo.
The other thing that comes to mind is that your .sqf is read only. To fix that, just right click on the .sqf, click properties, and un-check the read only box. Then hit apply, and follow the rest of the instructions.
*** I'm assuming you have some pbo manager tool. Idk if arma tools comes with one, I'll check in a bit, but the tool I'm using is pbo manager v1.4 (idk where I got it, might've been downloaded from the armaholic site). If you don't have one, you can try pboman3 [github.com] out. It seems legit and does what this fix needs.
Edit: Looks like filebank in arma tools can pack foldersinto pbos, but can't go the other way (pbos into folders). You'll have to download a pbo manager from online.
i was also using pbo manager 1.4 doing that… hmm i’m sure i did something wrong.. will try again when i get hands on pc
can i dm you if i don’t get it managed again?
Gotcha. Just to double check that we're doing the same thing, take a look at this [imgur.com] and make sure you're doing the same thing. If you do have that yellow gge_swap folder and are making changes there, then your .sqf is probably read-only.
You're good to dm me if you can't get it working, but I think we're in different time zones (I'm on the west coast of the US), so I might take a while to reply.
For those who have a problem with Helicopter's and AI this is my fixed version using Raptor method, thank you btw