Jump to content
Sign in to follow this  
eJay

Simple Support Module - config?

Recommended Posts

Hi

How to config SSM in editor? For example - I want only include Artillery and CAS Support to my mission. BIKI page says nothing :(

Share this post


Link to post
Share on other sites

Place the module and disable certain options in the init line of the module. By default all options are enabled:

missionNamespace setVariable ["BIS_SSM_Artillery_DELAY", 60];

missionNamespace setVariable ["BIS_SSM_Mortar_ENABLED_WEST", false];

missionNamespace setVariable ["BIS_SSM_UnitsDrop_ENABLED_WEST", false];

missionNamespace setVariable ["BIS_SSM_AmmoDrop_ENABLED_WEST", false];

The settings above should give you artilleriy support with a delay of 60 seconds and airstrike support having an A-10 showing up.

Optional you can alter the plane of the airstrike and the bomb beeing dropped:

missionNamespace setVariable ["BIS_SSM_Airstrike_VEHICLE_WEST","F35B"];

missionNamespace setVariable ["BIS_SSM_Airstrike_DISPERSION_WEST","CruiseMissile1"];

Share this post


Link to post
Share on other sites

Ok how do i chnage the plane to a helicopter?

Share this post


Link to post
Share on other sites
mind-boggling you cannot set the delay on the f**king airstrike

Not as easily as setting a timeout number, but I would think a delay could be created. The module allows custom code to run at certain points.

An example, in module init:

missionNamespace setVariable ["BIS_SSM_Airstrike_VEHICLEINIT",{_pilot sidechat "I'm on my way!"}];

When the Airstrike support is called, the pilot sidechats that he's on his way.

The custom code uses the variables set in the underlying scope of the function they're called from. In BIS_SSM_fnc_SpawnAircraft function, _pilot references the pilot and _vehicle references the aircraft. Those are used in the code. The caller is _this select 1. These variables could be passed into a script.

I would try using such code to have Group _pilot follow cycling waypoints on a switch, and create a trigger that would hit the switch.

Or set a timeout condition code for the request:

Places where custom code is run:

Code runs on:		Example variable that runs:		description:
------------		--------------------------		-------
Request			"BIS_SSM_Airstrike_CONDITION"		// Condition allowing the request
		"BIS_SSM_Airstrike_EXPRESSION"		// Code run on request

GetFlyInPosition	"BIS_SSM_Airstrike_FLYINPOSITION"	// Code run on aircraft spawn - sets spawn pos

SpawnAircraft		"BIS_SSM_Airstrike_VEHICLEINIT"		// Code run on aircraft spawn

GetFlyOutPosition	"BIS_SSM_Airstrike_FLYOUTPOSITION"	// Code run when aircraft reaches final waypoint before deleted

CallCeaseFire		"BIS_SSM_CeaseFire_CONDITION"		// Condition evaluated for canceling request
		"BIS_SSM_CeaseFire_EXPRESSION"		// Code run when canceled

Edited by OpusFmSPol

Share this post


Link to post
Share on other sites

How do i make the module to drop ammobox with custom content?

Share this post


Link to post
Share on other sites
How do i make the module to drop ammobox with custom content?

Simple:

------

If you want different types of standard ammoboxes available from editor, you can change the variable containing them in the module init field:

missionNamespace setVariable ["BIS_SSM_AmmoDrop_BOX_WEST",[[color="#A9A9A9"][i]"USVehicleBox[/i]","[i]USSpecialWeaponsBox[/i]","[i]USBasicWeaponsBox"[/i][/color]]];
missionNamespace setVariable ["BIS_SSM_AmmoDrop_BOX_EAST",[[color="#A9A9A9"][i]"RUVehicleBox[/i]","[i]RUSpecialWeaponsBox[/i]","[i]RUBasicWeaponsBox"[/i][/color]]];
missionNamespace setVariable ["BIS_SSM_AmmoDrop_BOX_GUER",[[color="#A9A9A9"][i]"SpecialWeaponsBox[/i]","[i]LocalBasicWeaponsBox"[/i][/color]"]];

Though I don't know if it would be limited to A2/OA content like the SOM is.

Complex:

-------

If you want ammoboxes containing specifically what you list, you can customize the SSM's server functions in the custom codes that run. But you'll likely spend some time tracking down errors that pop up and trying to resolve them to get it to work.

BIS_SSM_fnc_AmmoDropWaypointReached is the function dealing with the ammoboxes when they hit the ground, so that would be the one to customize for preferred box content. The customized function would go in the custom code for the aircraft vehicle init.

This is not a perfect example, it fails to cycle for Side and contents of each box, but it should give you the idea of how customizing the function works:

in init.sqf:

if (isServer) then 
{
missionNamespace setVariable ["BIS_SSM_AmmoDrop_VEHICLEINIT",
{
	[i][color="#A9A9A9"]// just a little pop-up to let you know that the code started.  Displays when the aircraft spawns.[/color][/i]
	[color="#FF0000"]hint "starting";[/color]

	[i][color="#A9A9A9"]// One of the errors that popped up. BIS_SSM_CargoParachute was defined for the module init, but not for the code.[/color][/i]
	#define BIS_SSM_CargoParachute "ParachuteMediumWest_EP1"

	BIS_SSM_fnc_AmmoDropWaypointReached = 
	{
		BIS_SSM_CreateAmmoDrop = 
		{

		[color="#A9A9A9"][i]/* *********************************************
		// Copy here the code for BIS_SSM_CreateAmmoDrop.
		// After the last line of code, add the following:
		********************************************* */[/i][/color]

			[color="#FF0000"]clearWeaponCargoGlobal _drop;
			clearMagazineCargoGlobal _drop;
			_drop addWeaponCargoGlobal ["M240",1];
			_drop addWeaponCargoGlobal ["M136",5];
			_drop addWeaponCargoGlobal ["Laserdesignator",2];
			_drop addWeaponCargoGlobal ["Binocular",2];
			_drop addWeaponCargoGlobal ["NVGoggles",2];
			_drop addMagazineCargoGlobal ["1Rnd_Smoke_M203",5];
			_drop addMagazineCargoGlobal ["1Rnd_HE_M203",50];
			_drop addMagazineCargoGlobal ["Pipebomb",10];
			_drop addMagazineCargoGlobal ["Laserbatteries",2];
			_drop addMagazineCargoGlobal ["Smokeshell",20];[/color]
		};
		[this,0] spawn BIS_SSM_CreateAmmoDrop;

		[i][color="#A9A9A9"]// just a little pop-up to let you know that the custom code completed.[/color][/i]
		[color="#FF0000"]hint "okay";[/color]
	};
}];
};

Mastered:

--------

You can combine the two methods and get exactly what you want. One crate each is dropped of whatever is in BIS_SSM_AmmoDrop_BOX array.

- If you only want one crate, list only one in the array.

- If you want two of the same crate, list the same crate twice in the array.

- The customized function will fill the crates with your preferred crate content.

Hope that helps.

Edited by OpusFmSPol
missionNamespace is global - forgot (isServer)

Share this post


Link to post
Share on other sites

Iam running this code in my init.sqf:

if (!isDedicated) then {
 // Loadingtext
if (time < 10) then {
	[] spawn {
		waitUntil {!isNil "BIS_fnc_init"};
		// Info text
		["Forlorn Hope"," Created by:", "Mirek"] spawn BIS_fnc_infoText;
	};
};

execVM "briefing.sqf";
};
[] execVM "revive\ReviveAceWounds.sqf";

[] execVM "civkill.sqf";

CIV setFriend [WEST, 1];



if (isserver) then //COMMANDS IN FOLLOWING BLOCK WILL BE EXECUTED ONLY ON SERVER 
{    
    missionnamespace setvariable ["BIS_SSM_AmmoDrop_BOX_WEST",["CZBasicWeapons_EP1"]]; 
 missionNamespace setVariable ["BIS_SSM_AmmoDrop_VEHICLE_WEST","Mi171Sh_CZ_EP1"];              
   //exclude anything but mortars and ammo drop
   BIS_SSM_AmmoDrop_AVAILABLE_WEST =  TRUE; publicVariable "BIS_SSM_AmmoDrop_AVAILABLE_WEST";
   BIS_SSM_UnitsDrop_AVAILABLE_WEST = FALSE; publicVariable "BIS_SSM_UnitsDrop_AVAILABLE_WEST";
   BIS_SSM_Airstrike_AVAILABLE_WEST = FALSE; publicVariable "BIS_SSM_Airstrike_AVAILABLE_WEST";
   BIS_SSM_Mortar_AVAILABLE_WEST =    TRUE; publicVariable "BIS_SSM_Mortar_AVAILABLE_WEST";
   BIS_SSM_Artillery_AVAILABLE_WEST = FALSE; publicVariable "BIS_SSM_Artillery_AVAILABLE_WEST";
   BIS_SSM_CeaseFire_AVAILABLE_WEST = FALSE; publicVariable "BIS_SSM_CeaseFire_AVAILABLE_WEST";

   //number of mortar rounds that fall
   BIS_SSM_Mortar_ROUNDS_WEST = 5;

   //by default, supports can be called infinitely. To limit them, we need to add separate checks.

   // možný amodropy
dropsavailable = 2;  publicVariable "dropsavailable";

BIS_SSM_AmmoDrop_CONDITION = "dropsavailable > 0";


   BIS_SSM_AmmoDrop_EXPRESSION = {
 dropsavailable = dropsavailable -1;
 if (dropsavailable <=0) then {
       BIS_SSM_AmmoDrop_ENABLED_WEST = FALSE;
       BIS_SSM_AmmoDrop_AVAILABLE_WEST = FALSE;
       call BIS_SSM_fnc_updateMenu; //update list
	}
   };

   //for mortar we want three available strikes. To count that we need
   //to use a separate variable.
   mortarsAvailable = 2; publicVariable "mortarsAvailable";

   //CONDITIONs are used to check if a support can be called.
   BIS_SSM_Mortar_CONDITION = "mortarsAvailable > 0";

   //we need to decrement the mortar counter each time it is fired
   BIS_SSM_Mortar_EXPRESSION = {
       mortarsAvailable = mortarsAvailable - 1;
       //we need to add yet another check to hide the icon
       if (mortarsAvailable <= 0) then {
           BIS_SSM_Mortar_ENABLED_WEST = FALSE;
           BIS_SSM_Mortar_AVAILABLE_WEST = FALSE;
           call BIS_SSM_fnc_updateMenu;
       }
   };

   //update should be called any time the variables are changed. Leaving it out
   //here seems to have no effect but BIS scripts always have it.
   call BIS_SSM_fnc_updateMenu;
}

How do i combine this with yours?

Also not sure what that means:

/* *********************************************
		// Copy here the code for BIS_SSM_CreateAmmoDrop.
		// After the last line of code, add the following:
		********************************************* */

Share this post


Link to post
Share on other sites
Iam running this code in my init.sqf:

How do i combine this with yours?

I sent you a PM.

I started to explain, but it got long and drawn out. I decided it was easier to show than to explain it.

And it's easier to understand if you see how it's done.

Also not sure what that means:

I just didn't feel that posting the entire function code out there would have been right since it belongs to BI, and people customizing it in their mission ought to know beforehand that it would fall under their Share-Alike license terms.

http://www.bistudio.com/community/licenses/arma-public-license-share-alike

Share this post


Link to post
Share on other sites

Ok thanks man.

Share this post


Link to post
Share on other sites

Hi I will revive this old thread a bit. 

 

How do i make it so only certain players can use this in MP mission? like only squad leaders, or only people equipped with TFAR big radio?

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
Sign in to follow this  

×