PDA

View Full Version : list of vehicles cargo amounts etc



eggbeast
Jan 28 2010, 09:02
Hi

This sticky has some useful info on classnames
http://forums.bistudio.com/showthread.php?t=73241&page=2
This wiki has all the classnames too
http://community.bistudio.com/wiki/ArmA_2:_CfgVehicles
This tool has pics and classnames of vehicles
http://www.armatechsquad.com/ArmA2Class/vehicles/Wheeled/

but I can't find out how many cargo slots there are in each vehicle without opening the pbo's at present - does anyone have a link for such a resource? If so Wolle can you add it to the sticky please!!:bounce3:

e.g. I'm writing a side mission which establishes a randomised convoy and I need to pair up arrays of vehicles that have the same number of cargo slots in them to stop the script from failing/ or all theteam from embarking, e.g.


_allvecA = ["KamazOpen","UralOpen_INS"];
_allvecB = ["UAZ_AGS30_RU","UAZ_MG_INS"];
_maxA = (count _allvecA)-1;
_maxB = (count _allvecB)-1;
_heli = createVehicle [(_allvecB select (round random _maxB)), _pos, [], 0, "NONE"];[_heli] call BIS_EVO_Lock;Sleep BIS_EVO_GlobalSleep;
_spawne = [_heli] spawn {[_this select 0] call BIS_EVO_idelSVEC};

_heli1 = createVehicle [(_allvecA select (round random _maxA)), _pos2, [], 0, "NONE"];[_heli1] call BIS_EVO_Lock;Sleep BIS_EVO_GlobalSleep;
_spawne = [_heli1] spawn {[_this select 0] call BIS_EVO_idelSVEC};

_heli2 = createVehicle [(_allvecA select (round random _maxA)), _pos3, [], 0, "NONE"];[_heli2] call BIS_EVO_Lock;Sleep BIS_EVO_GlobalSleep;
_spawne = [_heli2] spawn {[_this select 0] call BIS_EVO_idelSVEC};
_allunitsA = ["Ins_Bardak","Ins_Lopotev"];
_maxA = (count _allunitsA)-1;
_allunitsB = ["MVD_Soldier_TL","MVD_Soldier_MG","MVD_Soldier","MVD_Soldier_GL","MVD_Soldier_AT","MVD_Soldier_Sniper"];
_maxB = (count _allunitsB)-1;
//car 1 - 3 men
_unit = _guardass createUnit [(_allunitsA select (round random _maxA), _pos, [], 10, "NONE"];_unit setSkill 2+(random 3);[_unit] join _guardass;_unit assignAsDriver _heli;_unit moveInDriver _heli;
Sleep 0.2;
_unit = _guardass createUnit [(_allunitsA select (round random _maxA)), _pos2, [], 10, "NONE"];_unit setSkill 2+(random 3);[_unit] join _guardass;_unit assignAsGunner _heli;_unit moveInGunner _heli;
Sleep 0.2;
_unit = _guardass createUnit [(_allunitsA select (round random _maxA)), _pos2, [], 10, "NONE"];_unit setSkill 2+(random 3);[_unit] join _guardass;_unit assignAsCargo _heli;_unit moveInCargo _heli;
Sleep 0.2;

//truck 2 - 6 men
_unit = _guardass createUnit [(_allunitsB select (round random _maxB)), _pos3, [], 10, "NONE"];_unit setSkill 2+(random 3);[_unit] join _guardass;_unit assignAsDriver _heli1;_unit moveInDriver _heli1;
Sleep 0.2;
_unit = _guardass createUnit [(_allunitsB select (round random _maxB)), _pos3, [], 10, "NONE"];_unit setSkill 2+(random 3);[_unit] join _guardass;_unit assignAsCargo _heli1;_unit moveInCargo _heli1;
Sleep 0.2;
_unit = _guardass createUnit [(_allunitsB select (round random _maxB)), _pos3, [], 10, "NONE"];_unit setSkill 2+(random 3);[_unit] join _guardass;_unit assignAsCargo _heli1;_unit moveInCargo _heli1;
Sleep 0.2;
_unit = _guardass createUnit [(_allunitsB select (round random _maxB)), _pos3, [], 10, "NONE"];_unit setSkill 2+(random 3);[_unit] join _guardass;_unit assignAsCargo _heli1;_unit moveInCargo _heli1;
Sleep 0.2;
_unit = _guardass createUnit [(_allunitsB select (round random _maxB)), _pos3, [], 10, "NONE"];_unit setSkill 2+(random 3);[_unit] join _guardass;_unit assignAsCargo _heli1;_unit moveInCargo _heli1;
Sleep 0.2;
_unit = _guardass createUnit [(_allunitsB select (round random _maxB)), _pos3, [], 10, "NONE"];_unit setSkill 2+(random 3);[_unit] join _guardass;_unit assignAsCargo _heli1;_unit moveInCargo _heli1;
Sleep 0.2;

//truck 3 - 6 men
_unit = _guardass createUnit [(_allunitsB select (round random _maxB)), _pos4, [], 10, "NONE"];_unit setSkill 2+(random 3);[_unit] join _guardass;_unit assignAsDriver _heli2;_unit moveInDriver _heli2;
Sleep 0.2;
_unit = _guardass createUnit [(_allunitsB select (round random _maxB)), _pos4, [], 10, "NONE"];_unit setSkill 2+(random 3);[_unit] join _guardass;_unit assignAsCargo _heli2;_unit moveInCargo _heli2;
Sleep 0.2;
_unit = _guardass createUnit [(_allunitsB select (round random _maxB)), _pos4, [], 10, "NONE"];_unit setSkill 2+(random 3);[_unit] join _guardass;_unit assignAsCargo _heli2;_unit moveInCargo _heli2;
Sleep 0.2;
_unit = _guardass createUnit [(_allunitsB select (round random _maxB)), _pos4, [], 10, "NONE"];_unit setSkill 2+(random 3);[_unit] join _guardass;_unit assignAsCargo _heli2;_unit moveInCargo _heli2;
Sleep 0.2;
_unit = _guardass createUnit [(_allunitsB select (round random _maxB)), _pos4, [], 10, "NONE"];_unit setSkill 2+(random 3);[_unit] join _guardass;_unit assignAsCargo _heli2;_unit moveInCargo _heli2;
Sleep 0.2;
_unit = _guardass createUnit [(_allunitsB select (round random _maxB)), _pos4, [], 10, "NONE"];_unit setSkill 2+(random 3);[_unit] join _guardass;_unit assignAsCargo _heli2;_unit moveInCargo _heli2;
Sleep 0.2;
_guardass setFormation "COLUMN";
_guardass setSpeedMode "LIMITED";
_guardass setBehaviour "SAFE";


Running this script the troops spawn and the uaz and open ural are populated but the second truck does not spawn and i get an error

Error: 0 elements provided expected 3

I have many more sidemissions like this so woul like to know how for each vehicle:
Driver
Gunner or
Commander
Cargo 0
Cargo 1 etc

Andfor some vehicles they have
-Turret 0
-Turret 1
etc instead of Gunner

so I guess T90 has
Driver, Gunner, Commander

and UralOpen_INS has
Driver, Cargo0,Cargo1, etc up to what? Cargo8 maybe?

and for Mi17s theyre all different, e.g.
_heli1 = createVehicle ["Mi17_rockets_RU", _kpos, [], 0, "FLY"];Sleep BIS_EVO_GlobalSleep;

(units _pilot select 4) moveInDriver _heli1;
(units _pilot select 5) moveInTurret[_heli1,[0]];
(units _pilot select 6) moveInTurret[_heli1,[1]];
(units _pilot select 7) moveInTurret[_heli1,[2]];

e.g. at the moment I'm thinking of putting in a GAZ_Vodnik_MedEvac but i don't know how many cargo slots it has without either trial and error or opening the pbo, which is laborious

so is there a resource? if not, should we make one?

[FRL]Myke
Jan 28 2010, 10:47
To get cargo seats before a vehicle is created:


_veh; //Vehicle object
_seats = getNumber (configFile >> "cfgVehicles" >> typeof _veh >> "transportSoldier");

This will only include cargo seats, no operational seats (driver, gunner, commander).

To determine on a existing vehicle (already spawned) what operational crew is needed, the scripting command emptyPositions (http://community.bistudio.com/wiki/emptyPositions) might come in handy.

Two sites for you to bookmark:
http://community.bistudio.com/wiki/CfgVehicles_Config_Reference
http://community.bistudio.com/wiki/Category:Scripting_Commands_ArmA2


Another question. In your script in the first createvehicle line you refer to variable _pos but i can't see _pos being defined before.

eggbeast
Jan 28 2010, 14:58
THANKS! you're right - although the other positions were defined the position _pos4 wasnt defined and i changed the truck to a kamaz as this worked in other scripts. this fixed the script in question

but still I think a table of cargo spaces etc might be useful

meanwhile i'll use your suggestions so BIG THANKS dude

[FRL]Myke
Jan 28 2010, 16:07
Every list, table or tutorial on the web do exist because one took the time and challenge to explore and investigate a specific problem and then write it down what they found out.....soooo, while you're on it...do you accept the challenge? ;)

cestcomi
Jan 29 2010, 10:51
Add this to your list:

Classnames: http://forums.bistudio.com/showthread.php?t=73241&highlight=RU_Soldier

Markers with pictures: http://community.bistudio.com/wiki/cfgMarkers

eggbeast
Jan 29 2010, 13:33
@<hidden> - the classnames are linked above already but the markers list is awesome cheers

@<hidden>: I'm flat out overhauling Evolution atm to make it work on a solid basis (almost no script faults etc) before going on to modding it ACE/ UK/ RED etc so i won't be doing a cargo table, but someone must have one lol

thanks guys!

---------- Post added at 02:33 PM ---------- Previous post was at 02:24 PM ----------

ooh here's a useful figure for the C130 cargo
http://forums.bistudio.com/showthread.php?t=94564

Cyborg11
Jan 29 2010, 17:28
And to get the turrets you can use my script:


/*
======================================================================================================
Get Turrets - by Cyborg11
Version: 1.02
Date: 30.01.2010
Description: Use this script to get the turrets of a vehicle

Parameter: nul = [vehiclename] execVM "getturret.sqf";

Example: nul = [m1a2_1] execVM "getturret.sqf";
======================================================================================================
*/


private ["_unit","_mainturret","_turrets","_turretcount","_turretarray","_turretname","_dispnameturret","_turrethint"];

_unit = _this select 0;
_type = typeOf _unit;

If (_unit isKindOf "LandVehicle" || _unit isKindOf "Air" || _unit isKindOf "Ship") then {
_mainturret = false;
If (isClass (configFile >> "cfgVehicles" >> _type >> "Turrets")) then {
If ((count (configFile >> "cfgVehicles" >> _type >> "Turrets")) > 1) then {
_turrets = configFile >> "cfgVehicles" >> _type >> "Turrets";
} else {
_turrets = configFile >> "cfgVehicles" >> _type >> "Turrets" >> "MainTurret" >> "Turrets";
_mainturret = true;
};
} else {
_turrets = [];
};
_turretcount =
If (_mainturret) then {
(count _turrets) - 1;
} else {
count _turrets;
};
_turretarray = [];
_turretname = configName (_turrets select 1);
_dispnameturret = getText (_turrets select 1 >> "gunnerName");
If (_turretcount >= 2) then {
for [{_i = 0}, {_i < _turretcount}, {_i = _i + 1}] do {
_turretarray = _turretarray + [getText (_turrets select _i >> "gunnerName")];
};
};
_turrethint = switch (_turretcount) do {
case -1 : {""};
case 1 : {format ["Turret: %1\nTurretname: %2",_turretcount,_dispnameturret]};
case 2 : {format ["Turrets: %1\nTurretname 1: %2\nTurretname 2: %3",_turretcount, _turretarray select 0, _turretarray select 1]};
case 3 : {format ["Turrets: %1\nTurretname 1: %2\nTurretname 2: %3\nTurretname 3: %4",_turretcount, _turretarray select 0, _turretarray select 1, _turretarray select 2]};
case 4 : {format ["Turrets: %1\nTurretname 1: %2\nTurretname 2: %3\nTurretname 3: %4\nTurretname 4: %5",_turretcount, _turretarray select 0, _turretarray select 1, _turretarray select 2, _turretarray select 3]};
};
} else {
_turretarray = [];
_turrethint = "";
};

hintSilent format ["Unit: %1\n%2",_unit,_turrethint];

:yay:

eggbeast
Jan 29 2010, 21:25
wow great stuff - so all weneed now is someone to run this and also explore the pbos for the cargo slots and make us a fine lookin table!