Jump to content
Sign in to follow this  
ravenleg

How to find vehicle cargo/passenger/FFV seat capacity

Recommended Posts

I believe that since the introduction of FFV in 1.34 that getting accurate counts of vehicle cargo/passenger capacities hasn't been as simple as referencing a vehicle's transportSoldier config value.  That value now seems to only indicate cargo slots which aren't FFV.  Meaning that the Hummingbird, for instance, has a transportSoldier value of 2 rather than 6 (as it has two internal seats which can't be fired from, and four bench seat slots which can).  Since I couldn't find any help on how to find the true values of all the different combinations, I thought I'd post what I've found here for others to use.

 

If the vehicle is instantiated:

_veh = typeOf variable_name // To extract class name from vehicle variable

Otherwise, if the vehicle is not instantiated:

_veh = "class_name"; // Make sure the class name is between quotes (can be found in Eden Editor by right clicking on vehicle -> Log -> Log Class Name to Clipboard)

then:

_totalSeats = [_veh, true] call BIS_fnc_crewCount; // Number of total seats: crew + non-FFV cargo/passengers + FFV cargo/passengers
_crewSeats = [_veh, false] call BIS_fnc_crewCount; // Number of crew seats only
_cargoSeats = _totalSeats - _crewSeats; // Number of total cargo/passenger seats: non-FFV + FFV
_nonFFVcargoSeats = getNumber (configFile >> "CfgVehicles" >> _veh >> "transportSoldier"); // Number of non-FFV cargo seats only
_ffvCargoSeats = _cargoSeats - _nonFFVcargoSeats; // Number of FFV cargo seats only

It may also be possible to do some of this arithmetic with the allTurrets script command, but this methods isn't as universal as it requires the vehicle to be instantiated (whereas the top method needs no variable reference, only a class name).  For instance:

_veh = variable_name;
_cargoSeats = getNumber (configFile >> "CfgVehicles" >> (typeOf _veh) >> "transportSoldier") + count ((allTurrets [_veh, true]) - (allTurrets [_veh, false]));

Maybe this is nothing new to most, but had someone posted this at some point, it would have saved me an hour or two of my life.  And if you think I've made a mistake somewhere, please let me know.

  • Like 1

Share this post


Link to post
Share on other sites

good stuff

 

i think something like this might work too, though have not tested:

 

// get into the vehicle of your choice and exec this in console:
systemchat format ['Cargo seats: %1',(count (fullCrew [vehicle player,'cargo',true]))];
systemchat format ['Turret seats: %1',(count (fullCrew [vehicle player,'turret',true]))];

 

https://community.bistudio.com/wiki/fullCrew

  • Like 1

Share this post


Link to post
Share on other sites

Can also be automated to output a database of sorts.  In case anyone is interested, this code outputs various config info (include the seat capacities) for all helicopters in the game (though you could change the conditions to anything you like such as LandVehicle, Car, Truck, Tank, Air, Plane, etc.).

 

Note: this requires Killzone Kid's ArmA Console Extension.  Be sure to include the debug_console.hpp file in your mission file where you run this from (as well as following the rest of his install instructions).

 

Save this as configStats.sqf and put it in your mission folder with the hpp file above.

#include "debug_console.hpp"
conClear();

private _configArray = "(
    ((configName _x) isKindOf 'Helicopter') &&
    {getNumber (_x >> 'scope') >= 2}
    )" configClasses (configFile >> "CfgVehicles");

conYellow(str count _configArray + " items in _cfgArray");

{
    private ["_class", "_dispName", "_mod", "_maxLift", "_author", "_cat", "_fac", "_side", "_dlc", "_vc","_totalSeats","_crewSeats","_cargoSeats","_nonFFVcargoSeats","_ffvCargoSeats"];
    _class = configName _x;
    _dispName = getText (_x >> 'displayName');
    _mod = configSourceMod _x;
    _maxLift = getNumber (_x >> 'slingLoadMaxCargoMass');
    _author = getText (_x >> 'author');
    _cat = getText (_x >> 'category');
    _fac = getText (_x >> 'faction');
    _side = getNumber (_x >> 'side');
    _dlc = getText (_x >> 'dlc');
    _vc = getText (_x >> 'vehicleClass');
    _totalSeats = [configName _x, true] call BIS_fnc_crewCount; // Number of total seats: crew + non-FFV cargo/passengers + FFV cargo/passengers
    _crewSeats = [configName _x, false] call BIS_fnc_crewCount; // Number of crew seats only
    _cargoSeats = _totalSeats - _crewSeats; // Number of total cargo/passenger seats: non-FFV + FFV
    _nonFFVcargoSeats = getNumber (_x >> "transportSoldier"); // Number of non-FFV cargo seats only
    _ffvCargoSeats = _cargoSeats - _nonFFVcargoSeats; // Number of FFV cargo seats only
    private _output = format ["%1|%2|%3|%4|%5|%6|%7|%8|%9|%10|%11|%12|%13|%14|%15", _dispName, _class, _mod, _maxLift, _author, _cat, _fac, _side, _dlc, _vc, _totalSeats, _crewSeats, _cargoSeats, _nonFFVcargoSeats, _ffvCargoSeats];
    conFile(_output);
} forEach _configArray;

conBeep();

then from within the mission or Eden Editor, run this in the debug console or put it in the mission's init.sqf:

execVM "configStats.sqf";

If it worked correctly, you should see the console open, show you how many objects were found, hear a beep once it's finished (takes a few seconds to write the file), and find a text file in your Steam\SteamApps\common\Arma 3 folder.  Change the file extension from .txt to .csv so it opens in Excel and then highlight the first column, go to the Data ribbon -> Text to Columns -> Delimited -> Next -> check Other and type a pipe character " | " (without spaces or quotes) in the Other field -> Finish.  Hope this is useful for people who aren't familiar with the beauty of config dumps.  Then you'll be able to wow your friends with obscure knowledge, like the fact that the Mi-6T Hook from CUP Vehicles holds 54 passengers (6 full rifle squads) and 5 additional crew, more than a C-130.  Mind blown.

  • Like 1

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  

×