Jump to content

Recommended Posts

GOM_fnc_aircraftLoadout V1.35

 

by Grumpy Old Man

 

 

 

 

 

Features:

  • Change serial (tail) number on compatible aircraft (currently supported: Gryphon, Shikra and Black Wasp)
  • Change pylon priority (makes multiple pylons act as a single weapon if they have the same priority)
  • Works with all addon aircrafts with properly configured pylons
  • Preset function to save presets and load them, mission/server independent
    • deleting a preset works only when holding down CTRL to prevent mishaps
  • Option to set pylon ownership to either gunner or pilot, also works with presets
  • Change the livery of the aircraft if it's configured for one
  • Allows certain players to modify aircraft loadouts, as well as rearm the pylons and repair/refuel the aircraft
  • Can be restricted to work only if fuel/ammo/repair sources are within 50m of the object holding the menu
  • You can simultaneously only refuel as many aircraft as you have fuel sources
  • Can sort for compatible weapons or allow to mount all weapons on all pylons
  • Ability to set reporting, receiving of remote targets and own position
  • One click to clear all pylons if you changed your mind
  • Can be operated by a lone pilot or a designated logistics crew
  • Multiple players can install multiple pylons on the same plane, one pylon at a time
  • Pylon installation will take some time, depending on mag size (twin cannons or gatlings will install faster than a 12 missile dagr pod)
  • Rearming with engines on

 

How to use this script:

Unpack the downloaded .rar and check out the demo mission.

Copy the file structure besides init.sqf and mission.sqm into your own mission. Don't forget to back up before overwriting any files!

 

Functions for mission makers:
 

  Reveal hidden contents

 

List of commands used by remoteExec (changed in 1.33😞

  Reveal hidden contents

 

 

Read:

 

The addAction on objects will only show up if the players weapon is lowered.

Make sure you have aircraft placed that are dynamic loadout compatible (especially for missions made pre 1.70!).

 

The script now by default needs to have at least one ammo source, repair source or fuel source within 50m of the object that is holding the loadout menu.

The respective options will be greyed out otherwise.

This can be changed however. Simply adjust the variables in the of GOM_fnc_aircraftLoadoutParameters.sqf to your liking, the comments tell you what each variable does.

 

(!) Check out the included mission file on how to add this menu to objects, players or triggers, dedicated server and local hosted server compatible.

 

Aircraft Loadout V1.35 Download

 

Known issues:

If you encounter any errors please send me a PM containing details (screenshots,.rpt,error messages etc).

If you encounter vehicle resources not working with ACE3 check out the functions for mission makers section above.

 

  Reveal hidden contents

 

Changelog:

 


V1.35

  • Fixed: Players are no longer able to load presets created with a different pylon restriction setting, thanks @magicsrp
    • Due to this change all presets needed to be reset

 

V1.342

  • (Most likely) Fixed: Error with CUP Aircraft not returning getAllHitPointsDamage

 

V1.341

  • Fixed: "Unknown attribute t" .rpt spam, thanks @magicsrp

 

Previous changes:

  Reveal hidden contents

 

10.07.2021:

Added the file to google drive, so it should be permanent.

Also removed the armaholic link. RIP.

 

Enjoy

  • Like 39
  • Thanks 3

Share this post


Link to post
Share on other sites

That looks actually quite nice already. Could be something for our logistic buffs. ;)

Share this post


Link to post
Share on other sites

Glad Someone made this!!!

 

Could it be used in MP in its current state? 

Share this post


Link to post
Share on other sites
  On 5/18/2017 at 3:54 AM, Thunder.B said:

Glad Someone made this!!!

 

Could it be used in MP in its current state? 

Sure, just use the addAction in initPlayerLocal.sqf or/and onPlayerRespawn.sqf and either filter for UID or player names to add it to selected players only.

 

 

  On 5/17/2017 at 9:19 PM, belbo said:

That looks actually quite nice already. Could be something for our logistic buffs. ;)

Glad you like it. I'll probably adjust it so it can be added to an ammo truck and be run from there.

 

Cheers

  • Like 1

Share this post


Link to post
Share on other sites

This is great stuff and i ll surly put it in my servers mission.

Thx a lot for another nice feature.

  • Like 1

Share this post


Link to post
Share on other sites

Nice one Grumpy Old Man - thanks for sharing

  • Like 1

Share this post


Link to post
Share on other sites

Thanks, Great job.
I found pylon# on chatting msg does not match with pylon# of GOM Loadout Station menu. so <Clear all pylons> not clear all pylons. 

  • Like 1

Share this post


Link to post
Share on other sites
  On 5/18/2017 at 6:56 AM, Grumpy Old Man said:

Sure, just use the addAction in initPlayerLocal.sqf or/and onPlayerRespawn.sqf and either filter for UID or player names to add it to selected players only.

 

 

Glad you like it. I'll probably adjust it so it can be added to an ammo truck and be run from there.

 

Cheers

I would love to see this added to an ammo truck.  I was about to try adding this to a little test mission I made for my unit to get used to all the new JETS sensors and planes.

I assume that the onPlayerRespawn.sqf is needed to re-init the scripts after players respawn?  And, unfiltered it would allow anyone to use the loadout editor?  We have a passworded server, so not a big problem fr everyone to have it.

 

Share this post


Link to post
Share on other sites
  On 5/18/2017 at 1:38 PM, magicsrp said:

Thanks, Great job.
I found pylon# on chatting msg does not match with pylon# of GOM Loadout Station menu. so <Clear all pylons> not clear all pylons. 

Fixed, thanks.

 

  On 5/18/2017 at 2:19 PM, ski2060 said:

I would love to see this added to an ammo truck.  I was about to try adding this to a little test mission I made for my unit to get used to all the new JETS sensors and planes.

I assume that the onPlayerRespawn.sqf is needed to re-init the scripts after players respawn?  And, unfiltered it would allow anyone to use the loadout editor?  We have a passworded server, so not a big problem fr everyone to have it.

 

Already on it, expect an update later today.

 

Cheers

  • Like 2

Share this post


Link to post
Share on other sites

Hi Grumpy Old Man

Been playing around with your script and love it!

Seems for the blackfoot that any altered loadouts are in the pilots control (I'm guessing it's the turret contol thing needing to be [0]) Could this be tweaked please?

 

thanks again

Share this post


Link to post
Share on other sites
  On 5/18/2017 at 6:56 AM, Grumpy Old Man said:

Sure, just use the addAction in initPlayerLocal.sqf or/and onPlayerRespawn.sqf and either filter for UID or player names to add it to selected players only.

 

 

Glad you like it. I'll probably adjust it so it can be added to an ammo truck and be run from there.

 

Cheers

Hello Grumpy Old Man,
i am not that long into Arma and scripting. Can you explain it a bit more to get it work for MP? What i also want to know is, if this work with Helicopters as well

 

Share this post


Link to post
Share on other sites

Awesome! good work making this less than a day after release, been adding it into our server, and we made a small edit to make it so players couldn't turn their engine off and glide over the rearm area, this also has the added effect of allowing the player to rearm their aircraft with the engine on while stationary in the rearm area (if your remove the !isEngineOn check) which is possible in games like DCS, and i assume IRL, this is what we added.

 

player addAction ["Aircraft Loadouts",{_start = [] call GOM_fnc_aircraftLoadout}, [], 0, false, false, "", "(speed player < 1)"];

 

Also a small bug: your array for setting weapons to pylon x starts at 1 instead of 0 meaning you can't change the weapons on pylon 1 (BI actually made this pylon 0) and pylon 12 on the black wasp. Because setting a gbu12 to pylon 1 in your GUI sets the gbu 12 onto pylon 2 (actually 1 because the array starts at 0). trying to work out a fix atm will post if i find one.

 

PS might be an idea to have a version that can just be added to an object in the editor like an ammo truck, seems unnecessary to have it running on a whitelist level for most groups or small groups of friends, just have an addaction the same way arsenals are done, that way it runs at a lower level and not on a loop, and if you do want "whitelisting" you can give certain players slots a variable name and include that in the add action so it only appears to players in that slot

 

eg how my group makes it so only zeus's can open the door to the armory room

 

this addAction ["<t color='#ee4e00' size='1.5'>Open Door</t>", "opendoor.sqf", [], 888, true, false, "", "((_target distance _this) <10 && _this==bis_curatorUnit)"];

Share this post


Link to post
Share on other sites

I know hardly anything about scripting but how would you get something like this to see addon weapons pack like Firewill's Aircraft Weapons Systems pack?

Share this post


Link to post
Share on other sites
  On 5/18/2017 at 3:55 PM, Tac21 said:

I no hardly anything about scripting but how would you get something like this to see addon weapons pack like Firewill's Aircraft Weapons Systems pack?

Firewill and other modders need to update there aircraft to use BI's new "pylons" system first, then i imagine Grumpy Old Man or communities that use his mod will have to add in the magazine and vehicle classnames of mod vehicles or it might be able to grab an array of all available magazines.

  • Like 1

Share this post


Link to post
Share on other sites
  On 5/18/2017 at 3:30 PM, SnakeDocc said:

"Quote"

 

eg how my group make it so only zeus's can open the door to the armory room

 

this addAction ["<t color='#ee4e00' size='1.5'>Open Door</t>", "opendoor.sqf", [], 888, true, false, "", "((_target distance _this) <10 && _this==bis_curatorUnit)"];

 

Thanks for this bit of Code still wrapping my head around SQF and i can use this on my current project!

 

  On 5/18/2017 at 6:56 AM, Grumpy Old Man said:

Sure, just use the addAction in initPlayerLocal.sqf or/and onPlayerRespawn.sqf and either filter for UID or player names to add it to selected players only.

 

 

Glad you like it. I'll probably adjust it so it can be added to an ammo truck and be run from there.

 

Cheers

 

I plan on having this on our public servers Rearm Pads so our pilots can customize Aircraft from a spawner. i will keep an eye out for your next version! 

 

  • Like 1

Share this post


Link to post
Share on other sites

Using this I'm noticing that weapons previously loaded will remain selectable while the ammo has been cleared using the clear pylon action.

Share this post


Link to post
Share on other sites

 

  On 5/18/2017 at 4:09 PM, Thunder.B said:

 

Thanks for this bit of Code still wrapping my head around SQF and i can use this on my current project!

I plan on having this on our public servers Rearm Pads so our pilots can customize Aircraft from a spawner. i will keep an eye out for your next version! 

 

2

 

No problem man, we also added this to our asor vehicle spawner but it could be added to this mod as well (3 checkbox's in your UI so people can choose their datalink options would be cool) to enable datalink on all the vehicles we spawn, because its off by default for some reason

 

_veh setVehicleReportRemoteTargets true;

_veh setVehicleReceiveRemoteTargets true;

_veh setVehicleReportOwnPosition true;

Share this post


Link to post
Share on other sites
  On 5/18/2017 at 3:30 PM, SnakeDocc said:

Also a small bug: your array for setting weapons to pylon x starts at 1 instead of 0 meaning you can't change the weapons on pylon 1 (BI actually made this pylon 0) and pylon 12 on the black wasp. Because setting a gbu12 to pylon 1 in your GUI sets the gbu 12 onto pylon 2 (actually 1 because the array starts at 0). trying to work out a fix atm will post if i find one.

2

Seemed to fix this on line# 119 by increasing the array selection by 1. Seems the pylon array starts at 1 and not 0.

Also need to change the "clear all pylons" index so its offset by 1 because of this.

 

This is the fixed version plus the removal of the isEngineOn check in favor of an isMoving check and changed it down to 30mm radius to avoid picking up other people's vehicles to much

https://pastebin.com/raw/fNXPticb

Share this post


Link to post
Share on other sites
  On 5/18/2017 at 3:17 PM, petek said:

Hi Grumpy Old Man

Been playing around with your script and love it!

Seems for the blackfoot that any altered loadouts are in the pilots control (I'm guessing it's the turret contol thing needing to be [0]) Could this be tweaked please?

 

thanks again

I'll look into it over the weekend.

 

  On 5/18/2017 at 3:28 PM, Justice Molton said:

Hello Grumpy Old Man,
i am not that long into Arma and scripting. Can you explain it a bit more to get it work for MP? What i also want to know is, if this work with Helicopters as well

 

Should work with choppers just fine.

Adding an explanation to the first post.

 

@SnakeDocc:

Removed the engine check and replaced it with a speed check.

Pylon bug has been fixed.

Also added an option to either use an ammo truck/object that receives the action, alternatively you can add the option to pilots inside the jets to use the loadout menu:

[vehicle player,"PILOT"] call GOM_fnc_addAircraftLoadout

Will instantly open the loadout menu, so up to you how to implement it (addAction, trigger, whatever)

 

  On 5/18/2017 at 3:55 PM, Tac21 said:

I no hardly anything about scripting but how would you get something like this to see addon weapons pack like Firewill's Aircraft Weapons Systems pack?

The function is reading all pylon compatible mags for the specific vehicle out of the config.

Up to the mod author to properly configure their aircrafts.

 

  On 5/18/2017 at 4:41 PM, Tac21 said:

Using this I'm noticing that weapons previously loaded will remain selectable while the ammo has been cleared using the clear pylon action.

No idea if there's a way to fix this, open to suggestions.

 

  On 5/18/2017 at 5:27 PM, SnakeDocc said:

 

 

No problem man, we also added this to our asor vehicle spawner but it could be added to this mod as well (3 checkbox's in your UI so people can choose their datalink options would be cool) to enable datalink on all the vehicles we spawn, because its off by default for some reason

 

_veh setVehicleReportRemoteTargets true;

_veh setVehicleReceiveRemoteTargets true;

_veh setVehicleReportOwnPosition true;

Added.

 

  On 5/18/2017 at 5:37 PM, SnakeDocc said:

Seemed to fix this on line# 119 by increasing the array selection by 1. Seems the pylon array starts at 1 and not 0.

Also need to change the "clear all pylons" index so its offset by 1 because of this.

 

This is the fixed version plus the removal of the isEngineOn check in favor of an isMoving check and changed it down to 30mm radius to avoid picking up other people's vehicles to much

https://pastebin.com/raw/fNXPticb

Already fixed.

 

Update should be coming within the next hour.

 

Cheers

  • Like 2

Share this post


Link to post
Share on other sites
  On 5/18/2017 at 4:41 PM, Tac21 said:

Using this I'm noticing that weapons previously loaded will remain selectable while the ammo has been cleared using the clear pylon action.

 

  On 5/18/2017 at 6:31 PM, Grumpy Old Man said:

No idea if there's a way to fix this, open to suggestions.

1

 

Ok so you cant just remove weapons from the vehicle because the main gun, laser des and flares are considered "weapons". So I created a new array of each of the 'turrets' then removed the weapons from each of them.
 

private _pylonWeapons = [];
{ _pylonWeapons append getArray (_x >> "weapons") } forEach ([_veh, configNull] call BIS_fnc_getTurrets);
{ _veh removeWeaponGlobal _x } forEach ((weapons _veh) - _pylonWeapons);
 

Share this post


Link to post
Share on other sites

The ammo truck or object option would work with any object?

 

For example, helipad, huron container, or the USS Freedom itself?

 

Thanks,

Reed

Share this post


Link to post
Share on other sites
  On 5/18/2017 at 7:09 PM, Jnr4817 said:

The ammo truck or object option would work with any object?

 

For example, helipad, huron container, or the USS Freedom itself?

 

Thanks,

Reed

For all I care you could attach it to a rabbit.

 

Cheers

Share this post


Link to post
Share on other sites
  On 5/18/2017 at 7:12 PM, Grumpy Old Man said:

For all I care you could attach it to a rabbit.

 

Cheers

Now that is a great idea. ;)

Nice work BTW

Share this post


Link to post
Share on other sites

Where and how would I put this for a dedicated server so that it happens for any pilot who gets in the aircraft at the start of the mission and JIP?

 

Thanks,

Reed

 

Open the dialog instantly for a pilot that's inside a jet/chopper:

[vehicle player,"PILOT"] call GOM_fnc_addAircraftLoadout

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×