Author: gienkov
Author Website:

Version: 1.0

Short description: This script automatically creates DAC_Config_Units.

Date: 2014-08-11 15:42

Comments: (0)


ACC DAC Toolbox


So I am a big fan of Dynamic-AI-Creator - DAC, I always use it in my MP missions, always. There are just one thing that annoys me, the requirement to make configs for DAC_Config_Units for any new unit pack I use. This had to be done once but can be boring. So I made script that does that for me . Well, one of three scripts you will find in here. You will also find demonstration mission inside zip file. Unpack it to Documents/ArmA 3/Missions and open it in the singleplayer editor.

Installation / Usage:
Creating array of units (DAC_Config_Units):
First script is best run from developers console like that:
[] execVM "getUnits.sqf";
How to use it? Well, first select your faction of choice (for this example this will be VDV Russians from South Zagorian Army with RDS Tanks addon), then place units maintaining this order: crewman, pilot, squad leader, rest of available units. Why is that you will ask? Well, DAC uses first three units for tank/apc crews, helicopters and squad leaders that is . Doing this like that you will get proper order in your array. Well, after you place all units you want, preview the mission, run the script like above (for demonstration mission you can use 0-0-1). Few things will happen now. First, you will get hint that will show full array of units. It will look like this:
["kae_RU_crewman_VDV", "kae_RU_pilot_VDV", "kae_RU_SL_VDV", "kae_RU_AA_VDV", "kae_RU_AT_VDV", "kae_RU_ASL_VDV", "kae_RU_crewman_VDV", "kae_RU_rifleman_svd_VDV", "kae_RU_field_doctor_VDV", "kae_RU_field_medic_VDV", "kae_RU_general_VDV", "kae_RU_grenadier_VDV", "kae_RU_lmg_VDV", "kae_RU_mg_VDV", "kae_RU_marksman_VDV", "kae_RU_medic_VDV", "kae_RU_officer_VDV", "kae_RU_rifleman_VDV", "kae_RU_rifle_AT_VDV", "kae_RU_grenadier_m_VDV", "kae_RU_rifle_m_VDV", "kae_RU_soldier_light_VDV"]
As you see, this is an ready to use array, you just have to paste it to DAC_Config_Units. But how to paste it? Well you already have it in your clipboard as script does copy all code to clipboard . I also suggest to edit any .sqf files with Notepad++. With it you can add enter after each comma, it looks better then:
You have units ready in less than 2 minutes. You just place them and run script and that is all. Now for vehicles.

Creating array of vehicles (DAC_Config_Units)
You will also want to have some vehicles to spawn, for DAC you want to have classnames of wheeled vehicles, tracked vehicles and helicopters. This is where next script come in handy. You also run it from developers console (or 0-0-2, 0-0-3, 0-0-4 in demonstration mission). Here is how to call it from console:
[0] execVM "getVehicles.sqf"; // 0 - wheeled, 1 - tracked, 2 - helicopters
So if you want to get array of tracked vehicles then you run:
[1] execVM "getVehicles.sqf";

Now for the vehicles, you want to place all avaible wheeled/tracked/helicopter vehicles on map again.
They dont have to be empty, they can have crew inside, only classname of vehicle will be used.

After execution of script you will get hint similiar to this:
And it will be copied to clipboard. All you have to do now is paste this array to DAC_Config_Units (please refer to DAC manual on how to add new configs).

Creating array of weapons and ammo (DAC_Config_Weapons):
This is the last script you will find inside this pack. I created it because we use many different weapons pack and sometimes I wanted for my units to use different avaible weaponry. As you propably know, to make DAC units use custom weapons you have to modify their entry in DAC_Config_Units like this:
["kae_RU_AT_VDV", 1],
["kae_RU_AT_VDV", 2],
["kae_RU_AT_VDV", 3],
Inserting unit into array will have them use selected entry from DAC_Config_Weapons, which can look like this:
  case 1:
    _Weapon_Pool  = ["AK_107_GL_pso","Binocular","ItemCompass","ItemMap"];
    _Magazine_Pool  = [["30Rnd_545x39_AK",6],["1Rnd_HE_GP25",6],["FlareWhite_GP25",2],["HandGrenade_East",2]];
So if you want to make another entry for DAC_Config_Weapons you have to insert here classnames of weapons, ammo, items etc. etc. And that can be very boring thing to do.
Last script I have created does all of this job for me. In demonstration mission you can run it with 0-0-5. To execute it from developers console use:
[unit] execVM "getWeapons.sqf";
Where [unit] is name of unit you want to get equipment from, to get it from player then use [player]. Now, equip yourself like you prefer (don't forget ammo, grenades), then run script. Output?
_Weapon_Pool = ["hgun_P07_F","arifle_MXC_F","ItemMap","ItemCompass","ItemWatch","tf_anprc152_1","NVGoggles"];
_Magazine_Pool = [["30Rnd_65x39_caseless_mag",1],["16Rnd_9x21_Mag",2],["SmokeShell",1],["SmokeShellGreen",1],["Chemlight_green",1],["HandGrenade",2],["30Rnd_65x39_caseless_mag",7],["Chemlight_green",1]];
This is after removing quotes that you will get (cannot be done any other way) and adding one enter. Again, ready to paste as you already have it in clipboard .

Credits & Thanks:
It is made by GieNkoV for Arma Coop Corps community.

This work is licensed under APL-SA.

- first release

Forum topic:
- BI forums

Enable javascript to be able to download from Armaholic please!

Tags: No tags