Jump to content

Recommended Posts

3 hours ago, Jnr4817 said:

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

Put this in your vehicle's init section:

this addAction["<t color='#f9ff03'>Edit Payload</t>", {[vehicle player,"PILOT"] call GOM_fnc_addAircraftLoadout}, nil, 1.5, true, true, "", "true", 1, false, ""];

 

  • Like 1

Share this post


Link to post
Share on other sites

I've copied the code above and pasted it into the init line of my black wasp but no luck, I've copied and pasted the scripts folder and description.ext into my mission file, but when I try to edit the load out i get an error.

 

this addAction["<t color='#f9ff03'>Edit Payload</t>", {[vehicle player,"PILOT"] call GOM_fnc_addAircraftLoadout}, nil, 1.5, true, true, "", "true", 1, false, ""];

/\Code that I pasted into init line of black wasp./\

 

the error I receive is this,

[vehicle player,"PILOT"] call |#|GOM_fnc_addAircraftLoadout

Error Undefined variable in expression: gom_fnc_addaircraftloadout

 

I know jack squat about scripting so I have no clue what to do. If you anyone has a solution, please keep it simple, I'm a bit of an idiot.

 

*EDIT*  It turned out that i forgot to paste the ammo truck script into to init of the CVN-83, that's what was causing the problem. i've fixed the issue and now have a more adaptable air wing.

Edited by Ryan807
corrected the error

Share this post


Link to post
Share on other sites

Is there a way to get it work on the Mod Helos like AH64D from cup or RHS? Actually i dont get it to work on these.

Thanks i am not a Pro :-) Please forgive me my questions

Edited by Justice Molton

Share this post


Link to post
Share on other sites

This looks awesome. I assume due to it reloading the weapons it takes the proper ammo amount out of the truck as well correct?

Share this post


Link to post
Share on other sites
15 hours ago, 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

Added a button so you can select who controls the pylon.

 

12 hours ago, SnakeDocc said:

 

 

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);
 

Implemented this, working nice.

 

@Justice Molton

This is up to the mod author to upgrade his vehicles so they'll use the new pylon system.

My dialog already pulls all the stuff out of config files.

So if it's not configured properly it won't work.

Out of my hands, heh.

 

@silentghoust

Ammo trucks will have their refill capacity set to 0 by my script, since BI thought it would be funny to replace something that worked well in A2 (ammo trucks had a limited capacity) with infinite ammo rearm capacities.

getAmmoCargo Mytruck returns 1 -> infinite rearming possible.

Having a working procedure to keep track of current ammo in storage, how that storage is getting refilled etc. is out of the scope of this dialog.

 

Cheers

  • Like 1

Share this post


Link to post
Share on other sites
2 hours ago, Grumpy Old Man said:

Added a button so you can select who controls the pylon.

 

Implemented this, working nice.

 

@Justice Molton

This is up to the mod author to upgrade his vehicles so they'll use the new pylon system.

My dialog already pulls all the stuff out of config files.

So if it's not configured properly it won't work.

Out of my hands, heh.

 

@silentghoust

Ammo trucks will have their refill capacity set to 0 by my script, since BI thought it would be funny to replace something that worked well in A2 (ammo trucks had a limited capacity) with infinite ammo rearm capacities.

getAmmoCargo Mytruck returns 1 -> infinite rearming possible.

Having a working procedure to keep track of current ammo in storage, how that storage is getting refilled etc. is out of the scope of this dialog.

 

Cheers

Alright! Thank you! This is awesome! 

Share this post


Link to post
Share on other sites

Suggestion: remove all of the base pylon weapons off the aircraft when clearing pylons, otherwise you get stuff like Flachions on the A-164 without any ammo, because you only put GBU's on it.

Share this post


Link to post
Share on other sites
6 hours ago, Grumpy Old Man said:

Added a button so you can select who controls the pylon.

 

Implemented this, working nice.

 

 

Cheers

Thanks Grumpy Old Man - will hopefully help people who want DARs in pilot control too.

Is it possible for me to alter the script so all munitions were available (like your first version)? I know it's not a preference for everybody but I do miss extra skalpel racks on the pawnee and blackfoot especially.... I usually add them manually but I really like your mod. Thanks for any pointers and no worries if not.

 

Cheers

  • Like 2

Share this post


Link to post
Share on other sites

Hello GOM!

Thanks you very much for the script I loved it :D just testing an F-16 of firewill working great!

 

But i found a Bug pertinent with the Getposasl used in both scripts on island where you're not close to the shore. I did some testing and looks like getposatl might work better :)

 

 

-----

Edit Went further and made a new line along with the change to getposatl

 

_vehicles = (getposatl _obj nearentities ["Air",30]) select {speed _x isequalto 0 AND {alive _x}};

if (surfaceIsWater position player) then {_vehicles = (getposasl _obj nearentities ["Air",30]) select {speed _x isequalto 0 AND {alive _x}};};

 

 

This nails the problem now i can get vehicles in land or in water all with the same loadout script :)
   

Share this post


Link to post
Share on other sites

So Grumpy.  I'm trying to set this up in a simple mission to test the new stuff, and using CHVD (view distance script) also.
Can anyone tell me if this is the proper usage to enable both?   Or should the GOM_fnc_functions.hpp be in the class CfgFunctions section?



#include "CHVD\dialog.hpp"
#include "scripts\GOM\functions\GOM_fnc_functions.hpp"    
#include "scripts\GOM\dialogs\GOM_dialog_parents.hpp"
#include "scripts\GOM\dialogs\GOM_dialog_controls.hpp"
class CfgFunctions
{
    #include "CHVD\CfgFunctions.hpp"
};

 

Share this post


Link to post
Share on other sites
20 minutes ago, ski2060 said:

So Grumpy.  I'm trying to set this up in a simple mission to test the new stuff, and using CHVD (view distance script) also.
Can anyone tell me if this is the proper usage to enable both?   Or should the GOM_fnc_functions.hpp be in the class CfgFunctions section?



#include "CHVD\dialog.hpp"
#include "scripts\GOM\functions\GOM_fnc_functions.hpp"    
#include "scripts\GOM\dialogs\GOM_dialog_parents.hpp"
#include "scripts\GOM\dialogs\GOM_dialog_controls.hpp"
class CfgFunctions
{
    #include "CHVD\CfgFunctions.hpp"
};

 

The GOM_fnc_functions.hpp contains the full CfgFunctions class. Either edit it and include it inside the CfgFunctions or simply copy the contents (minus the class CfgFunctions and associated brackets).

This is what I've done:

//GOM_fnc_functions.hpp
class GOM
{
	class dialog
	{
		class aircraftLoadout{file = "scripts\GOM\functions\GOM_fnc_aircraftLoadout.sqf";};
	};
};

 

//Description.ext
#include "scripts\GOM\dialogs\GOM_dialog_parents.hpp"
#include "scripts\GOM\dialogs\GOM_dialog_controls.hpp"
class CfgFunctions {
	#include "fnc\cfgfunctions.hpp"
	#include "scripts\GOM\functions\GOM_fnc_functions.hpp"
};

 

Share this post


Link to post
Share on other sites
6 hours ago, taro8 said:

Suggestion: remove all of the base pylon weapons off the aircraft when clearing pylons, otherwise you get stuff like Flachions on the A-164 without any ammo, because you only put GBU's on it.

Fixed in V1.2

 

5 hours ago, petek said:

Thanks Grumpy Old Man - will hopefully help people who want DARs in pilot control too.

Is it possible for me to alter the script so all munitions were available (like your first version)? I know it's not a preference for everybody but I do miss extra skalpel racks on the pawnee and blackfoot especially.... I usually add them manually but I really like your mod. Thanks for any pointers and no worries if not.

 

Cheers

Added in V1.2, was actually way easier to implement than I first thought.

 

4 hours ago, Gonzalez89 said:

Hello GOM!

Thanks you very much for the script I loved it :D just testing an F-16 of firewill working great!

 

But i found a Bug pertinent with the Getposasl used in both scripts on island where you're not close to the shore. I did some testing and looks like getposatl might work better :)

 

 

-----

Edit Went further and made a new line along with the change to getposatl

 

_vehicles = (getposatl _obj nearentities ["Air",30]) select {speed _x isequalto 0 AND {alive _x}};

if (surfaceIsWater position player) then {_vehicles = (getposasl _obj nearentities ["Air",30]) select {speed _x isequalto 0 AND {alive _x}};};

 

 

This nails the problem now i can get vehicles in land or in water all with the same loadout script :)
   

 

4 hours ago, Gonzalez89 said:

Hello GOM!

Thanks you very much for the script I loved it :D just testing an F-16 of firewill working great!

 

But i found a Bug pertinent with the Getposasl used in both scripts on island where you're not close to the shore. I did some testing and looks like getposatl might work better :)

 

 

-----

Edit Went further and made a new line along with the change to getposatl

 

_vehicles = (getposatl _obj nearentities ["Air",30]) select {speed _x isequalto 0 AND {alive _x}};

if (surfaceIsWater position player) then {_vehicles = (getposasl _obj nearentities ["Air",30]) select {speed _x isequalto 0 AND {alive _x}};};

 

 

This nails the problem now i can get vehicles in land or in water all with the same loadout script :)
   

True that, old habits die hard.nearEntities works with positionAGL or position2d, that's what you might've encountered.

I replaced nearEntities with a vehicles check using distance2d, should give no more issues.

Thanks for pointing that out.

 

@mrcurry

Gonna adjust the file system in V1.2 to be more beginner friendly, good idea to leave out the cfgFunctions class in my functions.hpp.

 

Expect V1.2 to drop tomorrow at this time with some neat new features.

 

Cheers

  • Like 4

Share this post


Link to post
Share on other sites

If I may leave a wish.. Maybe you could increase the size of the Weapons selection text space  (I know UI is a pain to develop in arma =/ ) This would help longer name to be easier read cases like  the F-16 that have long name weapons  are a bit of click click click to find the one you're looking for.

Share this post


Link to post
Share on other sites

Appreciated as always GOM (I'm using the "informal" - hope that's okay;-)). Looking forward to whatever the new features are!

 

cheers

Share this post


Link to post
Share on other sites
19 hours ago, Grumpy Old Man said:

 

 

@silentghoust

Ammo trucks will have their refill capacity set to 0 by my script, since BI thought it would be funny to replace something that worked well in A2 (ammo trucks had a limited capacity) with infinite ammo rearm capacities.

getAmmoCargo Mytruck returns 1 -> infinite rearming possible.

Having a working procedure to keep track of current ammo in storage, how that storage is getting refilled etc. is out of the scope of this dialog.

 

Cheers


You sure this is the case? I thought they just greatly increased the ammo capacity of the trucks to the point it would be extremely hard to drain one. mmm, i'll have to look into it.

Share this post


Link to post
Share on other sites
12 hours ago, Gonzalez89 said:

If I may leave a wish.. Maybe you could increase the size of the Weapons selection text space  (I know UI is a pain to develop in arma =/ ) This would help longer name to be easier read cases like  the F-16 that have long name weapons  are a bit of click click click to find the one you're looking for.


Adjusted it, could you give an example of those long weapon names? Maybe I'll even put a sanitizer in there.

 

 

5 hours ago, silentghoust said:


You sure this is the case? I thought they just greatly increased the ammo capacity of the trucks to the point it would be extremely hard to drain one. mmm, i'll have to look into it.

Still the case.

Reported this at the end of 2016, some fuel trucks had 1e+012l of fuel capacity. That's right.

1e+012 = a 1 followed by 12 zeroes.

One. Fucking. Trillion.

Or in numbers:1.000.000.000.000l fuel.

One trillion seconds is a bit more than 31years to put that number into perspective.

In 1.66 they went ahead and even changed the ammo and repair capacity of most trucks to the same amount because a few people complained they ran out of ammo during the mission.

 

Now instead of handing this over to the mission makers to solve they simply made the fuel/repair and ammo capacity for most vehicles basically infinite, breaking whoever knows how many logistic scripts relying on vanilla functionality.

 

You can watch a few multiplayer servers where the bobcat is a thing.

It's carrying one trillion fuel cargo, one trillion ammo cargo and one trillion repair cargo.

Have two of those next to each other and be invincible and never run out of fuel/ammo, ever.

 

It's ridiculous.

 

Cheers

  • Like 1

Share this post


Link to post
Share on other sites

1. There is a script for changing the values of the load. 

2. The infinite values where made due to a balancing problem on how the value is calculated how much the ammo costs.

3. The balance is that if the truck explodes EVERYTHING in about 20m gets destroyed.

 

The ammo value is calculated through the value config that is also used for ai.

Share this post


Link to post
Share on other sites
7 hours ago, Grumpy Old Man said:


Adjusted it, could you give an example of those long weapon names? Maybe I'll even put a sanitizer in there.

 

 

I'm having trouble posting direct images so i'll leave a imgur link.

 

http://i.imgur.com/YE2XnVT.jpg

 

http://i.imgur.com/Yz3YouZ.jpg

 

Also I never get why bobcat can rearm anyone... it's not like he has that much space to refuel rearm and repair anyone haha!

Share this post


Link to post
Share on other sites

So, I have been testing this out in editor.  With this and Firewill F16 / AWS running I ws able to access the AWS weapons.

Unfortunately the AWS weapons only seem to be available on select pylons for the A-164 Wipeout.  None of the other Vanilla Airframes seem to be able to utilize the AWS weapons at all.

Is this by design? Bug?  Or just not enabled yet?

Great work so far GOM!

Share this post


Link to post
Share on other sites

Very cool script, I absolutely love it!

I noticed a bug with the Wipeout, here are the steps to reproduce:

  • Clear all pylons
  • Mount 1 or 3 Macers on Pylon 5
  • No Macer weapon has been added to the pilot, so you are unable to fire any missiles
  • Same thing happens when you mount Macers x3 on all pylons

Share this post


Link to post
Share on other sites

I am getting an error now.

 

It is telling me that I already have a class CfgFunctions, which I do have defined in the descrition.ext.

 

How can I get this to work if I already have this. It points me to your GOM_fnc_functions.hpp

 

Spoiler

Author = "SA Duda, Sgt Thomas and Reed";
onLoadName = "SA Template FOB Reed 6.0C1";
loadScreen = "SA\images\sa.jpg";

DisabledAI = true;
Respawn = "INSTANT";
RespawnDelay = 5;

class Header
{
	gameType=COOP;
	minPlayers=1;
	maxPlayers=15;
};

#include "Ghost\comm_menu.h"

#include "VAS\menu.hpp"

#include "INS_revive\description.hpp"

#include "SA\scripts\ghst_vehiclespawn\Spawnveh.hpp"

#include "CHVD\dialog.hpp"

#include "scripts\GOM\functions\GOM_fnc_functions.hpp"
#include "scripts\GOM\dialogs\GOM_dialog_parents.hpp"
#include "scripts\GOM\dialogs\GOM_dialog_controls.hpp"

class Params
{

	class paramDaytimeHour
	{
		title = "Time of Day:";
		values[] = {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,0};
		texts[] = {"0100","0200","0300","0400","0500","0600","0700","0800","0900","1000","1100","1200","1300","1400","1500","1600","1700","1800","1900","2000","2100","2200","2300","2400","Random"};
		default = 6;
	};
	
	class PARAM_Rain
	{
		title= "Weather Setting:";
		values[]= {0,1,3,6,90,99};
		texts[]= {"Random Weather and No Rain","Random Weather and Rain","%30 Rain","%60 Rain","Stormy Heavy Rain","Stormy no Rain"};
		default= 0;
	};
		
	class PARAM_Fatigue
	{
		title = "Player Fatigue:";
		values[] = {1,0};
		texts[] = {"ON","OFF"};
		default = 0;
	};
	
	class PARAM_AimSway
	{
	title = "Player Aiming Sway:";
	values[] = {100,0,1,2,3,4,5,6,7,8,9,10};
	texts[] = {"default","0","0.1","0.2","0.3","0.4","0.5","0.6","0.7","0.8","0.9","1.0"};
	default = 2;
	};
	
	class PARAM_COS
	{
		title = "Civilian Occupation System:";
		values[] = {1,0};
		texts[] = {"ON","OFF"};
		default = 0;
	};
	
	class PARAM_HeadlessClientEnabled
	{
		title = "AI Server (Headless Client):";
		values[] = {0};
		texts[] = {"OFF"};
		default = 0;
	};
	
	class PARAM_AIReviveLimit
	{
		title = "AI Revive Limit:";
		values[] = {1,5, 10, 20};
		texts[] = {"1 min","5 min", "10 min", "20 min"};
		default = 20;
	};
	
	class PARAM_Supports
	{
		title = ":: Support Settings";
		values[] = {0,0};
		texts[] = {"",""};
		default = 0;
	};

	class PARAM_Supports_Ammo
	{
		title = "    Ammo Drop:";
		values[] = {0,5,10,15,20,30};
		texts[] = {"Disabled","Every 5 Mins","Every 10 Mins","Every 15 Mins","Every 20 Mins","Every 30 Mins"};
		default = 10;
	};
	
	class PARAM_Supports_Transport
	{
		title = "    Helicopter Transport:";
		values[] = {0,5,10,15,20,30};
		texts[] = {"Disabled","Every 5 Mins","Every 10 Mins","Every 15 Mins","Every 20 Mins","Every 30 Mins"};
		default = 10;
	};
	
	class PARAM_Supports_CAS_Heli
	{
		title = "    CAS (Helicopter Attack):";
		values[] = {0,5,10,15,20,30};
		texts[] = {"Disabled","Every 5 Mins","Every 10 Mins","Every 15 Mins","Every 20 Mins","Every 30 Mins"};
		default = 15;
	};
	
	class PARAM_Supports_CAS_Bomb
	{
		title = "    CAS (Bombing Run):";
		values[] = {0,5,10,15,20,30};
		texts[] = {"Disabled","Every 5 Mins","Every 10 Mins","Every 15 Mins","Every 20 Mins","Every 30 Mins"};
		default = 15;
	};
		
	class PARAM_Supports_Artillery
	{
		title = "    Artillery:";
		values[] = {0,5,10,15,20,30};
		texts[] = {"Disabled","Every 5 Mins","Every 10 Mins","Every 15 Mins","Every 20 Mins","Every 30 Mins"};
		default = 15;
	};
	
	class PARAM_HC
	{
		title = ":: High Command Settings";
		values[] = {0,0};
		texts[] = {"",""};
		default = 0;
	};
	
	class PARAM_HC_Air
	{
		title = "    Air Support:";
		values[] = {0,1};
		texts[] = {"Disabled","Enabled"};
		default = 1;
	};
	
	#include "INS_revive\params.hpp"
	
	#include "Ghost\ghst_params.hpp"
	
};

class RscTitles
{
	#include "INS_revive\rsctitles.hpp"
};

class cfgFunctions {
	#include "SA\cfgfunctions.hpp"
	#include "VAS\cfgfunctions.hpp"
	#include "INS_revive\cfgfunctions.hpp"
	#include "Ghost\functions\cfgfunctions.hpp"
	#include "AICommand\cfgfunctions.hpp"
	#include "CHVD\CfgFunctions.hpp"
};

class CfgSounds {
	#include "SA\cfgsounds.hpp"
	#include "INS_revive\cfgsounds.hpp"
}

class CfgNotifications
{
	class Warning
	{
		title = "";
		iconPicture = "SA\images\warning.jpg";
		description = "%2";
		priority = 0;
		sound = "defaultNotification";
	};
	class Death
	{
		title = "";
		iconPicture = "SA\images\scull.jpg";
		description = "%2";
		priority = 0;
		sound = "defaultNotification";
	};
	
	#include "AICommand\cfgnotifications.hpp"
	
};

 

 

Share this post


Link to post
Share on other sites
2 hours ago, ski2060 said:

So, I have been testing this out in editor.  With this and Firewill F16 / AWS running I ws able to access the AWS weapons.

Unfortunately the AWS weapons only seem to be available on select pylons for the A-164 Wipeout.  None of the other Vanilla Airframes seem to be able to utilize the AWS weapons at all.

Is this by design? Bug?  Or just not enabled yet?

Great work so far GOM!

 

That's on Firewill's front, or use a version of this script with everything unlocked. anyway Firewill probably is finishing up the a-10 so it's worth the wait ;)

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

×