Staticdata.sqf questions

  1. 6 years ago
    Edited 6 years ago by Cobra

    First off can I use the staticdata.sqf to change the crates spawned at weapons depots used by assymetric commanders? Ive been using the staticdata.sqf as described by the wiki and various threads. in the init I have

    if(isServer) then {

    // -------------------------------------------------------------------------------------------------------------
    // override default data
    // see script/staticData.sqf
    ["MISSION INIT - Waiting"] call ALIVE_fnc_dump;

    waitUntil {!isNil "ALiVE_STATIC_DATA_LOADED"};

    ["MISSION INIT - Continue"] call ALIVE_fnc_dump;

    // override static data settings
    call compile (preprocessFileLineNumbers "staticData.sqf");

    ["MISSION INIT - Static data override loaded"] call ALIVE_fnc_dump;



    // -------------------------------------------------------------------------------------------------------------

    };

    In the static data.sqf I have

    if (!isServer) exitWith {};

    waitUntil {!isNil "ALiVE_STATIC_DATA_LOADED"};

    [ALIVE_factionDefaultSupplies, "Cobra_VC2", ["uns_EQPT_VC"]] call ALIVE_fnc_hashSet;

    I do not see any change to the supplies spawned in by alive.

  2. Edited 6 years ago by Whigital

    Unfortunately its hardcoded, so cant be controlled through static data mapping.

    https://github.com/ALiVEOS/ALiVE.OS/blob/master/addons/mil_opcom/fnc_INS_helpers.sqf#L666

  3. It would be nice to have a less period or faction specific ammo crate or the option to add in the desired class names of crates.

  4. I've used something like

    class Extended_Init_EventHandlers {
         class 	B_T_LSV_01_unarmed_F {
    		init = " (_this select 0) call (compile preprocessFileLineNumbers 'vehicleLoadout.sqf')";
         };
    };

    In the description.ext before to ensure the script "vehicleLoadout.sqf" was run on every unarmed Prowler that spawns. This was so whenever I got a supply drop of a prowler it had the right gear in it's inventory.
    You could use the same sort of thing to ensure every crate of a certain classname spawned had a loadout script run on it.

    At least I assume that should work.

 

or Sign Up to reply!