Comrades in Arms Discussion Board
Adding common ACE items - Printable Version

+- Comrades in Arms Discussion Board (http://forum.ciahome.net)
+-- Forum: Comrades in Arms Life (http://forum.ciahome.net/forumdisplay.php?fid=3)
+--- Forum: Mission Making (http://forum.ciahome.net/forumdisplay.php?fid=8)
+--- Thread: Adding common ACE items (/showthread.php?tid=3543)



Adding common ACE items - Stagwine - 01-13-2017

Mission making comrades, 

Below is a simple commented script snippet which creates empty crate and adds most common ACE items for CiA playstyle. Of course we can always spawn full ACE item crate on mission start, but it is hassle and it has way too many goodies in it. Especially newer players have rough time navigating through it. 

Example script adds basic map tools, flashlights to use map, range card, clacker, and most common medical items. 

Class names for other items: 

https://ace3mod.com/wiki/class-names.html

How to use: 

1. In editor, create (empty) marker and name it box 
2. Create .sqf file and name it crate.sqf 
3. Run it from init.sqf or initServer.sqf  

Code:
// init.sqf
[] execVM "crate.sqf";

4. Copy paste code below to crate.sqf. Check script comments for how to use it. 

Code:
/*
Simple script to create a box with most common CiA ACE items.
Safe to use in vanilla missions as well.
Run either in init.sqf or initServer.sqf

1. Put a marker on map and name it box
2. Check ACE webpage for more exotic items
https://ace3mod.com/wiki/class-names.html
*/

if (isServer) then {

// Checks if ACE as a mod is detected...
if (isClass (configfile >> "CfgVehicles" >> "ACE_Box_Misc")) then {

// Creates empty box. Replace _large_ with _medium_ if you prefer smaller box

custombox1 = "Land_PlasticCase_01_large_F" createVehicle getmarkerpos "box";

// Common items...
customBox1 addItemCargoGlobal ["ACE_EarPlugs", 5]; // Number indicates quantity
customBox1 addItemCargoGlobal ["ACE_Clacker", 5];
customBox1 addItemCargoGlobal ["ACE_M26_Clacker", 1]; // Longer range
customBox1 addItemCargoGlobal ["ACE_MapTools", 5];
customBox1 addItemCargoGlobal ["ACE_Flashlight_MX991", 5];
customBox1 addItemCargoGlobal ["ACE_RangeCard", 5];

// Common medical items for basic med system...

customBox1 addItemCargoGlobal ["ACE_morphine", 5];
customBox1 addItemCargoGlobal ["ACE_epinephrine", 5];
customBox1 addItemCargoGlobal ["ACE_bloodIV_250", 5];
customBox1 addItemCargoGlobal ["ACE_fieldDressing", 5];

// Your own extra items...

customBox1 addItemCargoGlobal ["ACE_banana", 1];

/* To use other items:
Just replace ACE classname with item inside ""
Check item names at
https://ace3mod.com/wiki/class-names.html
(or check with built in Config viewer in Eden editor (Tools > Config) )
*/

};
};



RE: Adding common ACE items - Alwarren - 01-14-2017

Nice one!