Jump to content

chernaruski

Member
  • Content Count

    317
  • Joined

  • Last visited

  • Medals

Posts posted by chernaruski


  1. Quote

    We are considering to provide an open source version of the VA 3.0v build to the public to get in some additional coders that could help bring VA 3.0 over the finish line.
    This effort is meant to only help with ironing out bugs and not to create new features or systems. Code can be updated via a separate Github branch and we would review the proposed changes and accept/decline/discuss.

    This is directed to people with some Arma 3 coding experience and not fore pure play testers at this point.
    If you are interested and more or less qualified, come join us at the Vandeanson Discord Server and DM Vandeanson or me.


    Discord: https://discord.gg/a5h94wtTKQ

    • Like 1

  2. On 3/2/2022 at 4:38 PM, BSBS Vladick said:

    Oh man, I just saw that you replied. Sorry for the late reply. Here is the  fn_GroupReinforcementsManager.

    Thanks for your help!

     

      Reveal hidden contents

    /*
        DMS_fnc_GroupReinforcementsManager
        Created by eraser1

        Usage:
        [
            _AIGroup,                        // GROUP: The AI group to monitor.
            [
                [
                    _maxReinforcementWaves,            // SCALAR: The maximum number of reinforcement waves that this group can receive. Set to -1 for unlimited reinforcement waves.
                    _reinforcementWavesGiven        // SCALAR: The number of reinforcement waves given to this group.
                ],
                [
                    _maxReinforcementUnits,            // SCALAR: The maximum number of reinforcement units that this group can receive. Set to -1 for unlimited reinforcement units.
                    _reinforcementUnitsGiven        // SCALAR: The number of reinforcement units given to this group.
                ]
            ],
            [
                _updateDelay,                    // SCALAR: Delay in seconds until the AI group is reinforced.
                _lastUpdated                    // SCALAR: The time (diag_tickTime) when the group was last reinforced.
            ],
            _spawnLocations,                // ARRAY: Array of positions (ATL) where reinforcement AI can spawn. Passing an empty array will cause the group leader's position to be used. For "armed_vehicle" _monitorType, a random position between 100 and 300 meters from the leader is used.
            _class,                            // STRING: The "class" of AI to spawn as reinforcements. Supported values: "random","assault","MG","sniper" or "unarmed"
            _difficulty,                    // STRING: The difficulty of the AI to be spawned. Supported values: "random","static","hardcore","difficult","moderate", or "easy"
            _side,                            // STRING: The "side" that the AI are on. Currently only "bandit" is supported.
            _monitorType,                    // STRING: How the AI group should be managed. Supported types: "playernear", "maintain", "reinforce", "increasing_resistance", "armed_vehicle"
            _monitorParams,                    // ARRAY: Parameters specific to the _monitorType. See below.
            _customGearSet                    // (OPTIONAL) ARRAY: The custom gear set of the AI. Refer to documentation of fn_SpawnAISoldier.sqf for more info: https://github.com/Defent/DMS_Exile/blob/master/%40ExileServer/addons/a3_dms/scripts/fn_SpawnAISoldier.sqf
        ] call DMS_fnc_GroupReinforcementsManager;

        About "_monitorType" types:

            "playernear":
                _monitorParams =
                [
                    _posOrObj,                // ARRAY (position): The position at which the players have to be near.
                    _radius,                // SCALAR: The distance (in meters) that a player has to be near in order for reinforcements to spawn
                    _reinforcementCount,    // SCALAR: The (maximum) number of units to spawn as reinforcements.
                    _maxAICount                // (OPTIONAL) SCALAR: Maximum number of AI Units after reinforcements. Set to 0 for no limit. Default value is 0.
                ]

            "maintain":
                _monitorParams =
                [
                    _AICount                 // SCALAR: If the AI Group has fewer than "_AICount" living units, then new members will be added to the group until it has "_AICount" living units again.
                ]

            "reinforce":
                _monitorParams =
                [
                    _AICount,                // SCALAR: If the AI Group has fewer than "_AICount" living units, then the group will receive reinforcements.
                    _reinforcementCount,    // SCALAR: The (maximum) number of units to spawn as reinforcements.
                    _maxAICount                // (OPTIONAL) SCALAR: Maximum number of AI Units after reinforcements. Set to 0 for no limit. Default value is equivalent to _AICount.
                ]

            "increasing_resistance":
                _monitorParams =
                [
                    _AICount,                // SCALAR: If the AI Group has fewer than "_AICount" living units, then the group will receive reinforcements.
                    _reinforcementCount,    // SCALAR: The (maximum) number of units to spawn as reinforcements.
                    _increment_AICount,        // SCALAR: After reinforcements, "_AICount" is increased by this amount, so subsequent reinforcements will be spawned for even greater amounts of AI (increasing the number of total AI, until "_maxAICount" is reached).
                    _maxAICount                // (OPTIONAL) SCALAR: Maximum number of AI Units after reinforcements. Default value is equivalent to _AICount. Set to 0 for no limit.
                ]

            "increasing_difficulty":
                _monitorParams =
                [
                    _AICount,                // SCALAR: If the AI Group has fewer than "_AICount" living units, then the group will receive reinforcements.
                    _reinforcementCount,    // SCALAR: The (maximum) number of units to spawn as reinforcements.
                    _maxAICount                // (OPTIONAL) SCALAR: Maximum number of AI Units after reinforcements. Default value is equivalent to _AICount. Set to 0 for no limit.
                ]

            "static_gunner":
                _monitorParams =
                [
                    _staticGun,                // OBJECT: If this object (static gun) loses its gunner and/or is deleted, then a new static gun and/or gunner will spawn to replace the previous one.
                    _gunPos,                // ARRAY (positionATL): The position of the static gun.
                    _staticGunClass            // (OPTIONAL) STRING: The classname of the static gun to spawn as reinforcement.
                ]

            "armed_vehicle":
                _monitorParams =
                [
                    _AICount,                // SCALAR: If the AI Group has fewer than "_AICount" living units, then the group will receive reinforcements.
                    _vehClass                // (OPTIONAL) STRING: The classname of the vehicle to spawn. Use "random" to select a random vehicle from "DMS_ArmedVehicles". Default: "random"
                ]

            "armed_vehicle_replace":
                _monitorParams =
                [
                    _vehicle,                // OBJECT: When this vehicle is null or dead, then this group will receive reinforcements. The spawned vehicle will then be the new _vehicle.
                    _vehClass                // (OPTIONAL) STRING: The classname of the vehicle to spawn. Use "random" to select a random vehicle from "DMS_ArmedVehicles". Default: "random"
                ]
            NOTE: Every reinforcement vehicle counts as one unit given for monitor type "armed_vehicle" and "armed_vehicle_replace"

            "heli_troopers":
                _monitorParams =
                [
                    _AICount,                // SCALAR: If the AI Group has fewer than "_AICount" living units, then the group will receive reinforcements.
                    _ejectFFVGunners,               // BOOLEAN: Whether or not to eject Fire-From-Vehicle (FFV) gunners.
                    _maxJumpers,                    // SCALAR: Maximum number of AI to eject from the aircraft. Set to a really high # to ignore (like 999).
                    _remainAsGunship,               // BOOLEAN: Whether or not to keep the heli flying around as a gunship.
                    _dropPoint,                     // OBJECT or ARRAY (OPTIONAL - Position2D or 3D): The location to drop the reinforcements at. The drop point will default to the group leader.
                    _heliClass,                     // STRING (OPTIONAL): The classname of the heli to spawn.
                    _spawnPos                       // ARRAY (OPTIONAL - Position2D or 3D): The position for the heli to spawn at.
                ]
                This reinforcement type will attempt to drop the AI off at the group leader's position. The heli will spawn in the air 500-5000 meters away from the leader's position and 1000 meters away from a player (default).

        Returns whether or not reinforcement waves or units given exceeds/matches maximum wave or unit reinforcements. If true, then no more reinforcements will be spawned (so the passed info should be deleted from the available reinforcements list).
    */

    // Check ALL the variables
    if !(params
    [
        "_AIGroup",
        "_reinforcementInfo",
        "_updateInfo",
        "_spawnLocations",
        "_class",
        "_difficulty",
        "_side",
        "_monitorType",
        "_monitorParams"
    ])
    exitWith
    {
        diag_log format ["DMS ERROR :: Calling DMS_fnc_GroupReinforcementsManager with invalid parameters: %1",_this];
        true
    };


    if !(_reinforcementInfo params
    [
        "_wavesInfo",
        "_unitsInfo"
    ])
    exitWith
    {
        diag_log format ["DMS ERROR :: Calling DMS_fnc_GroupReinforcementsManager with invalid _reinforcementInfo: %1",_reinforcementInfo];
        true
    };


    if !(_wavesInfo params
    [
        "_maxReinforcementWaves",
        "_reinforcementWavesGiven"
    ])
    exitWith
    {
        diag_log format ["DMS ERROR :: Calling DMS_fnc_GroupReinforcementsManager with invalid _wavesInfo: %1",_wavesInfo];
        true
    };


    if !(_unitsInfo params
    [
        "_maxReinforcementUnits",
        "_reinforcementUnitsGiven"
    ])
    exitWith
    {
        diag_log format ["DMS ERROR :: Calling DMS_fnc_GroupReinforcementsManager with invalid _unitsInfo: %1",_unitsInfo];
        true
    };


    if !(_updateInfo params
    [
        "_updateDelay",
        "_lastUpdated"
    ])
    exitWith
    {
        diag_log format ["DMS ERROR :: Calling DMS_fnc_GroupReinforcementsManager with invalid _updateInfo: %1",_updateInfo];
        true
    };

    private _customGearSet =
        if ((count _this) > 9) then
        {
            _this select 9
        }
        else
        {
            []
        };

    _fnc_isDepleted =
    {
        switch (true) do
        {
            // Both "_maxReinforcementWaves" and "_maxReinforcementUnits" are limited, so we check both.
            case ((_maxReinforcementWaves>0) && {_maxReinforcementUnits>0}): {((_reinforcementWavesGiven>=_maxReinforcementWaves) || {_reinforcementUnitsGiven>=_maxReinforcementUnits})};

            // Only "_maxReinforcementWaves" is limited.
            case (_maxReinforcementWaves>0): {(_reinforcementWavesGiven>=_maxReinforcementWaves)};

            // Only "_maxReinforcementUnits" is limited.
            case (_maxReinforcementUnits>0): {(_reinforcementUnitsGiven>=_maxReinforcementUnits)};

            // Neither are limited, so reinforcements will never be depleted.
            default {false};
        };
    };

    private _reinforcementsDepleted = call _fnc_isDepleted;

    if (!_reinforcementsDepleted && {(diag_tickTime-_lastUpdated)>_updateDelay}) then
    {
        private "_unitsToSpawn";

        private _remainingUnits =
            if (isNull _AIGroup) then
            {
                // The group (presumably) lost all units and got deleted, so we create a new group using the given side and continue with that.
                _AIGroup = createGroup (missionNamespace getVariable [format ["DMS_%1Side",_side],EAST]);

                _this set [0, _AIGroup];


                if (DMS_DEBUG) then
                {
                    (format ["GroupReinforcementsManager :: Group provided was null! Created new group for ""%1"" side: %2",_side, _AIGroup]) call DMS_fnc_DebugLog;
                };

                0
            }
            else
            {
                {alive _x} count (units _AIGroup);
            };


        if (DMS_DEBUG) then
        {
            (format ["GroupReinforcementsManager :: Checking reinforcements for group %1 with %2 surviving units. _this: %3",_AIGroup, _remainingUnits, _this]) call DMS_fnc_DebugLog;
        };

        switch (toLower _monitorType) do
        {
            case "playernear":
            {
                if !(_monitorParams params
                [
                    "_posOrObj",
                    "_radius",
                    "_reinforcementCount"
                ])
                exitWith
                {
                    _reinforcementsDepleted = true;
                    diag_log format ["DMS ERROR :: Calling DMS_fnc_GroupReinforcementsManager with invalid _monitorParams: %1 | _monitorType: %2 | Setting _reinforcementsDepleted to true.",_monitorParams,_monitorType];
                };


                if ([_posOrObj,_radius] call DMS_fnc_IsPlayerNearby) then
                {
                    private _maxAICount = _monitorParams param [3, 0, [0]];

                    _unitsToSpawn = _reinforcementCount min ((_maxAICount-_remainingUnits) max 0);
                };
            };

            case "maintain":
            {
                if !(_monitorParams params
                [
                    "_AICount"
                ])
                exitWith
                {
                    _reinforcementsDepleted = true;
                    diag_log format ["DMS ERROR :: Calling DMS_fnc_GroupReinforcementsManager with invalid _monitorParams: %1 | _monitorType: %2 | Setting _reinforcementsDepleted to true.",_monitorParams,_monitorType];
                };


                if (_remainingUnits<_AICount) then
                {
                    _unitsToSpawn = _AICount - _remainingUnits;
                };
            };

            case "reinforce":
            {
                if !(_monitorParams params
                [
                    "_AICount",
                    "_reinforcementCount"
                ])
                exitWith
                {
                    _reinforcementsDepleted = true;
                    diag_log format ["DMS ERROR :: Calling DMS_fnc_GroupReinforcementsManager with invalid _monitorParams: %1 | _monitorType: %2 | Setting _reinforcementsDepleted to true.",_monitorParams,_monitorType];
                };


                if (_remainingUnits<_AICount) then
                {
                    private _maxAICount = _monitorParams param [2, _AICount, [0]];

                    _unitsToSpawn = _reinforcementCount min ((_maxAICount-_remainingUnits) max 0);
                };
            };

            case "increasing_resistance":
            {
                if !(_monitorParams params
                [
                    "_AICount",
                    "_reinforcementCount",
                    "_increment_AICount"
                ])
                exitWith
                {
                    _reinforcementsDepleted = true;
                    diag_log format ["DMS ERROR :: Calling DMS_fnc_GroupReinforcementsManager with invalid _monitorParams: %1 | _monitorType: %2 | Setting _reinforcementsDepleted to true.",_monitorParams,_monitorType];
                };


                if (_remainingUnits<_AICount) then
                {
                    private _maxAICount = _monitorParams param [3, _AICount, [0]];

                    _unitsToSpawn = _reinforcementCount min ((_maxAICount-_remainingUnits) max 0);

                    _monitorParams set [0, _AICount + _increment_AICount];
                };
            };

            case "increasing_difficulty":
            {
                if !(_monitorParams params
                [
                    "_AICount",
                    "_reinforcementCount"
                ])
                exitWith
                {
                    _reinforcementsDepleted = true;
                    diag_log format ["DMS ERROR :: Calling DMS_fnc_GroupReinforcementsManager with invalid _monitorParams: %1 | _monitorType: %2 | Setting _reinforcementsDepleted to true.",_monitorParams,_monitorType];
                };


                if (_remainingUnits<_AICount) then
                {
                    _difficulty =
                        switch (toLower _difficulty) do
                        {
                            case "easy": {"moderate"};
                            case "moderate": {"difficult"};
                            case "difficult";
                            case "hardcore": {"hardcore"};
                        };

                    private _maxAICount = _monitorParams param [3, _AICount, [0]];

                    _unitsToSpawn = _reinforcementCount min ((_maxAICount-_remainingUnits) max 0);
                };
            };

            case "armed_vehicle":
            {
                if !(_monitorParams params
                [
                    "_AICount"
                ])
                exitWith
                {
                    _reinforcementsDepleted = true;
                    diag_log format ["DMS ERROR :: Calling DMS_fnc_GroupReinforcementsManager with invalid _monitorParams: %1 | _monitorType: %2 | Setting _reinforcementsDepleted to true.",_monitorParams,_monitorType];
                };

                if (_remainingUnits<_AICount) then
                {
                    private _vehClass = _monitorParams param [1, "random", [""]];

                    private _leaderPos = getPosATL (leader _AIGroup);

                    private _veh =
                    [
                        [
                            if (_spawnLocations isEqualTo []) then {_leaderPos getPos [100+(random 200),random 360]} else {selectRandom _spawnLocations},
                            _leaderPos
                        ],
                        _AIGroup,
                        _class,
                        _difficulty,
                        _side,
                        _vehClass
                    ] call DMS_fnc_SpawnAIVehicle;

                    // Every vehicle counts as one unit given, so the number of units given is equivalent to number of waves given.
                    _reinforcementWavesGiven = _reinforcementWavesGiven + 1;
                    _reinforcementUnitsGiven = _reinforcementWavesGiven;

                    if (DMS_DEBUG) then
                    {
                        (format["GroupReinforcementsManager :: Group %1 received a ""%2"" vehicle (%3) as reinforcements.",_AIGroup, _vehClass, _veh]) call DMS_fnc_DebugLog;
                    };
                };
            };

            case "armed_vehicle_replace":
            {
                if !(_monitorParams params
                [
                    "_vehicle"
                ])
                exitWith
                {
                    _reinforcementsDepleted = true;
                    diag_log format ["DMS ERROR :: Calling DMS_fnc_GroupReinforcementsManager with invalid _monitorParams: %1 | _monitorType: %2 | Setting _reinforcementsDepleted to true.",_monitorParams,_monitorType];
                };

                if ((isNull _vehicle) || {!alive _vehicle} || {(count (crew _vehicle)) isEqualTo 0}) then
                {
                    deleteVehicle _vehicle;

                    private _vehClass = _monitorParams param [1, "random", [""]];

                    private _leaderPos = getPosATL (leader _AIGroup);

                    _vehicle =
                    [
                        [
                            if (_spawnLocations isEqualTo []) then {[_leaderPos,100+(random 200),random 360] call DMS_fnc_SelectOffsetPos} else {selectRandom _spawnLocations},
                            _leaderPos
                        ],
                        _AIGroup,
                        _class,
                        _difficulty,
                        _side,
                        _vehClass
                    ] call DMS_fnc_SpawnAIVehicle;

                    // Every vehicle counts as one unit given, so the number of units given is equivalent to number of waves given.
                    _reinforcementWavesGiven = _reinforcementWavesGiven + 1;
                    _reinforcementUnitsGiven = _reinforcementWavesGiven;

                    _monitorParams set [0, _vehicle];

                    if (DMS_DEBUG) then
                    {
                        (format["GroupReinforcementsManager :: Group %1 received a ""%2"" vehicle (%3) as reinforcements.",_AIGroup, _vehClass, _vehicle]) call DMS_fnc_DebugLog;
                    };
                };
            };

            case "static_gunner":
            {
                if !(_monitorParams params
                [
                    "_staticGun",
                    "_gunPos"
                ])
                exitWith
                {
                    _reinforcementsDepleted = true;
                    diag_log format ["DMS ERROR :: Calling DMS_fnc_GroupReinforcementsManager with invalid _monitorParams: %1 | _monitorType: %2 | Setting _reinforcementsDepleted to true.",_monitorParams,_monitorType];
                };

                if ((isNull _staticGun) || {!alive _staticGun} || {(count (crew _staticGun)) isEqualTo 0}) then
                {
                    deleteVehicle _staticGun;

                    private _staticGunClass = _monitorParams param [1, "random", [""]];

                    private _leaderPos = getPosATL (leader _AIGroup);

                    _staticGun =
                    [
                        [
                            _gunPos
                        ],
                        _AIGroup,
                        _class,
                        _difficulty,
                        _side,
                        _staticGunClass
                    ] call DMS_fnc_SpawnAIStaticMG;

                    // Every vehicle counts as one unit given, so the number of units given is equivalent to number of waves given.
                    _reinforcementWavesGiven = _reinforcementWavesGiven + 1;
                    _reinforcementUnitsGiven = _reinforcementWavesGiven;

                    _monitorParams set [0, _staticGun];

                    if (DMS_DEBUG) then
                    {
                        (format["GroupReinforcementsManager :: Group %1 received a ""%2"" static gun (%3) as reinforcement at %4.",_AIGroup, _staticGunClass, _staticGun, _gunPos]) call DMS_fnc_DebugLog;
                    };
                };
            };

            case "heli_troopers":
            {
                if !(_monitorParams params
                [
                    "_AICount",
                    "_ejectFFVGunners",
                    "_maxJumpers",
                    "_remainAsGunship"
                ])
                exitWith
                {
                    _reinforcementsDepleted = true;
                    diag_log format ["DMS ERROR :: Calling DMS_fnc_GroupReinforcementsManager with invalid _monitorParams: %1 | _monitorType: %2 | Setting _reinforcementsDepleted to true.",_monitorParams,_monitorType];
                };

                if (_remainingUnits<_AICount) then
                {
                    private _dropPoint = _monitorParams param [4, getPosATL (leader _AIGroup), [objNull,[]], [2,3]];
                    private _heliClass = _monitorParams param [5, selectRandom DMS_ReinforcementHelis, [""]];

                    private _params =
                    [
                        _AIGroup,
                        _class,
                        _difficulty,
                        _side,
                        _dropPoint,
                        _ejectFFVGunners,
                        _maxJumpers,
                        _remainAsGunship,
                        _heliClass
                    ];

                    if ((count _monitorParams)>6) then
                    {
                        _params pushBack (_monitorParams select 6);
                    };

                    private _heli = _params call DMS_fnc_SpawnHeliReinforcement;

                    // Every vehicle counts as one unit given, so the number of units given is equivalent to number of waves given.
                    _reinforcementWavesGiven = _reinforcementWavesGiven + 1;
                    _reinforcementUnitsGiven = _reinforcementWavesGiven;


                    if (DMS_DEBUG) then
                    {
                        (format["GroupReinforcementsManager :: Group %1 received a ""%2"" vehicle (%3) as reinforcements.", _AIGroup, typeOf _heliClass, _heli]) call DMS_fnc_DebugLog;
                    };
                };
            };

            default
            {
                _reinforcementsDepleted = true;
                diag_log format ["DMS ERROR :: Calling DMS_fnc_GroupReinforcementsManager with unsupported _monitorType: %1 | Setting _reinforcementsDepleted to true.",_monitorType];
            };
        };

        if ((!isNil "_unitsToSpawn") && {_unitsToSpawn>0}) then
        {
            private _spawnPos = [];

            if (_maxReinforcementUnits>0) then
            {
                _maxAvailableReinforcements = (_maxReinforcementUnits-_reinforcementUnitsGiven) max 0;
                if (_maxAvailableReinforcements<_unitsToSpawn) then
                {
                    if (DMS_DEBUG) then
                    {
                        (format["GroupReinforcementsManager :: Group %1 requested %2 units for backup, but only %3 are available. Providing %3 units and setting _reinforcementsDepleted to true.",_AIGroup, _unitsToSpawn, _maxAvailableReinforcements]) call DMS_fnc_DebugLog;
                    };
                    _unitsToSpawn = _maxAvailableReinforcements;
                    _reinforcementsDepleted = true;
                };
            };

            private _units = [];

            if (_spawnLocations isEqualTo []) then
            {
                // No spawn locations were provided, so we just use the leader of the group as the spawn location.
                _spawnPos = getPosATL (leader _AIGroup);

                for "_i" from 0 to (_unitsToSpawn-1) do
                {
                    _units pushBack ([_AIGroup,_spawnPos,_class,_difficulty,_side,"Soldier",_customGearSet] call DMS_fnc_SpawnAISoldier);
                };
            }
            else
            {
                // Shuffle the list.
                private _spawningLocations = _spawnLocations call ExileClient_util_array_shuffle;
                _spawnPos = _spawningLocations select 0;                // Define it for spawning flares
                _spawningLocations_count = count _spawningLocations;

                // Add extra spawning locations if there are not enough.
                for "_i" from 0 to (_unitsToSpawn-_spawningLocations_count-1) do
                {
                    _spawningLocations pushBack (selectRandom _spawningLocations);
                };

                // Now to spawn the AI...
                for "_i" from 0 to (_unitsToSpawn-1) do
                {
                    _units pushBack ([_AIGroup,_spawningLocations select _i,_class,_difficulty,_side,"Soldier",_customGearSet] call DMS_fnc_SpawnAISoldier);
                };
            };

            _units joinSilent _AIGroup;        // Otherwise they don't like each other...

            // Update the given reinforcements count.
            _reinforcementWavesGiven = _reinforcementWavesGiven + 1;
            _reinforcementUnitsGiven = _reinforcementUnitsGiven + _unitsToSpawn;

            if (DMS_SpawnFlareOnReinforcements) then
            {
                playSound3D ["a3\missions_f_beta\data\sounds\Showcase_Night\flaregun_4.wss", objNull, false, (ATLToASL _spawnPos) vectorAdd [0,0,250],2];
                ("F_20mm_Red" createVehicle (_spawnPos vectorAdd [0,0,250])) setVelocity [0,0,-1];
            };

            if (DMS_DEBUG) then
            {
                (format["GroupReinforcementsManager :: Group %1 received %2 units as backup (wave #%3, %4 units given total). Reinforcements Depleted: %5",_AIGroup, _unitsToSpawn, _reinforcementWavesGiven, _reinforcementUnitsGiven, _reinforcementsDepleted]) call DMS_fnc_DebugLog;
            };
        };

        if (!_reinforcementsDepleted) then
        {
            _reinforcementsDepleted = call _fnc_isDepleted;
        };

        // Update values
        _this set [1, [[_maxReinforcementWaves,_reinforcementWavesGiven],[_maxReinforcementUnits,_reinforcementUnitsGiven]]];
        _this set [2, [_updateDelay,diag_tickTime]];
    };

    _reinforcementsDepleted
     

     

    core files seem fine, what static mission are you trying to use? (maybe zip the whole dms folder so I can dwell on it)


  3. 3 hours ago, BSBS Vladick said:
    Spoiler

     

    Hi there,

     

    I am running DMS Static Missions on an Arma 3 Exile Chernarus server and my RPT is spamming the following error related to an undefined variable:

     

    if !(_onM>
     8:05:26   Error Undefined variable in expression: _groupreinforcementsinfo
     8:05:26 File x\addons\dms\scripts\fn_MissionsMonitor_Static.sqf..., line 301
     8:05:28 "ExileServer - Job with handle 10059 added."
     8:05:39 "ExileZ Mod: Monitored Zombies    |    0    "
     8:05:41 Error in expression <fo deleteAt _forEachIndex;
    };
    } forEach _groupReinforcementsInfo;
    };

     

    Below are lines 294 to 302 in addons\dms\scripts\fn_MissionsMonitor_Static.sqf

     

    if (DMS_AllowStaticReinforcements) then
            {
                {
                    if (_x call DMS_fnc_GroupReinforcementsManager) then
                    {
                        _groupReinforcementsInfo deleteAt _forEachIndex;
                    };
                } forEach _groupReinforcementsInfo;
            };

     

    Does anyone know what I can tweak to stop this error from spamming in my RPT?

     

    Thanks!

     

    Vladick

     

     

    can you post (use pastebin link) the full fn_MissionsMonitor_Static.sqf file you are using?


  4. Well that was quick ;). 
     

    Usually these server restart loops/init fails are due to some missing comma ,semicolon, "" or brackets not closed.
    Guys, always provide as much info as possible including your RPT log files (server and client side) so we can help you much quicker.

    Anyway, glad to hear it worked out.


  5. On 7/20/2021 at 1:33 PM, MuRaZorWitchKING said:

    a2089c53c3847b2ed28ada79dd50e705.png

     

    Didn't realize we were playing DayZ SA now boys?

    I'm dead :rofl:

    LMFAOOOOOOOOOOOOOOOOOOOOOOOOOO


    lol, "loot refresh rate" aka "Wallmart restock day". 
    people forgot what's the challenge in games these days

    • Haha 1

  6. Try this overwrite, its from my old server. I'm pretty sure it works.
    It should do exactly what you want, since I was using the same logic of RANDOM spawn only.

     

    Spoiler


    
    private["_display","_spawnButton","_listBox","_listItemIndex","_numberOfSpawnPoints","_randNum","_randData","_randomSpawnIndex","_spawns_arr"];
    
    disableSerialization;
    diag_log "Selecting spawn location...";
    ExileClientSpawnLocationSelectionDone = false;
    
    ExileClientSelectedSpawnLocationMarkerName = "";
    createDialog "RscExileSelectSpawnLocationDialog";
    waitUntil
    {
    	_display = findDisplay 24002;
    	!isNull _display
    };
    _spawnButton = _display displayCtrl 24003;
    _spawnButton ctrlEnable false;
    _display displayAddEventHandler ["KeyDown", "_this call ExileClient_gui_loadingScreen_event_onKeyDown"];
    _listBox = _display displayCtrl 24002;
    lbClear _listBox;
    if (isNil "_spawns_arr") then {_spawns_arr = []};
    
    {
    	if (getMarkerType _x == "ExileSpawnZone") then
    	{
    		_spawns_arr = _spawns_arr + [[_x]];
    												
    	};
    }
    forEach allMapMarkers;
    
    
    _numberOfSpawnPoints = {getMarkerType _x == "ExileSpawnZone"} count allMapMarkers;
    if (_numberOfSpawnPoints > 0) then 
    {
    	_randNum = floor(random _numberOfSpawnPoints);
    	_randData = _spawns_arr select _randNum;
    	_randomSpawnIndex = _listBox lbAdd "Random";
    	_listBox lbSetData [_randomSpawnIndex, _randData select 0];
    };
    true

     

     

     


  7. You have too many errors in your logs. Seriously, it has a cluster of issues it seems. Isolate the issue, by starting from clean exilemod, then start adding exile overrides (changed exile code sqfs) you use. One by one.
    Only then start adding addons for AI,zombies, Vehicles,etc. One by one.

    The moment you will be able to start the server, you will identify which one is causing it. Isolate it and check logs again to see what error it spits out. AND ONLY THEN you will know what is there to fix and what solution to look for.

     

    From rpts you can see that DB is actually working and somewhat exile connected to it. So its a completely different issue from what you initially stated about database and "CallExtension 'extDB2' could not be found".
    Just go line after line (starting from Starting mission) in your RPT logs and look for code errors debug messages. 


  8. 1 hour ago, gmike15 said:

    I'm using TDAST, and definitely using the server file arma3server.exe  

     

    your RPT saying you running 64bit and not arma3server.exe, even name of your log files starting with arma3server_x64_2021-03-26_19-17-14.rpt

    TDAST is cancer, I don't want to even look at it. If you can, maybe use a different way to run your server?

     


  9. First of all:

    Are you sure DB login/password in your config files are correct?
    Have you changed or overwritten any of the exile_server\code original files?

    "ExileServer - ERROR! ERROR! ERROR! ERROR! ERROR! ERROR!"
    "ExileServer - ERROR! ERROR! ERROR! ERROR! ERROR! ERROR!"
    "ExileServer - ERROR! ERROR! ERROR! ERROR! ERROR! ERROR!"
    "ExileServer - ERROR! ERROR! ERROR! ERROR! ERROR! ERROR!"
    "ExileServer - ERROR! ERROR! ERROR! ERROR! ERROR! ERROR!"
    "ExileServer - ERROR! ERROR! ERROR! ERROR! ERROR! ERROR!"
    "ExileServer - ERROR! ERROR! ERROR! ERROR! ERROR! ERROR!"
    "ExileServer - ERROR! ERROR! ERROR! ERROR! ERROR! ERROR!"
    "ExileServer - ERROR! ERROR! ERROR! ERROR! ERROR! ERROR!"
    "ExileServer - ERROR! ERROR! ERROR! ERROR! ERROR! ERROR!"
    "ExileServer - ERROR! ERROR! ERROR! ERROR! ERROR! ERROR!"
    "ExileServer - ERROR! ERROR! ERROR! ERROR! ERROR! ERROR!"
    "ExileServer - You have added weapons to your server that spawn in with attachments."
    "ExileServer - This will allow duping and money farming!"
    "ExileServer - To solve this, please remove the following weapons from your loot tables and trader config OR replace them with their non-attachment equivalent:"
    "ExileServer - [""hlc_Pistol_mk25RX""]"
    "ExileServer - Example: Use arifle_Katiba_F instead of arifle_Katiba_ACO_pointer_snds_F."
    CallExtension 'extDB2' could not be found
    "ExileServer - MySQL connection error!"
    "ExileServer - Please have a look at @ExileServer/extDB/logs/ to find out what went wrong."
    "ExileServer - MySQL Error: Unable to locate extDB2 extension!"
    "ExileServer - Server will shutdown now :("
    CallExtension 'extDB2' could not be found

     

    I see you running arma3server_x64 instead of arma3server, not sure if extDB2 works with x64, anyway worth to try and switching to 32 bit server exe. <<<<<  Probably this 
    Also, check that you have all the dlls where they should be (tbbmalloc, extDB2 64 bit dlls and such), sometimes GSP block uploading DLLs .

     

     


  10. 2 hours ago, Rosso777 said:

    I appreciate the continued help. I tried your code and it resulted in the player requiring all the tools in the array; they should only require one of them.

     

    It does exactly what it should, for each _requiredTools. If you want it to check if one of the _requiredTools is in inventory you need to rewrite the code to something like this
    I can't test things right now, so take this code as a general direction and as example and try to make it work from there ...
     

    if( isClass(_itemConfig >> "Interactions" >> "Consuming") )  then
    {
    
    if ("Exile_Item_CanOpener" in magazines player || "Exile_Item_Pliers" in magazines player || "Exile_Item_Screwdriver"  in magazines player) then {_hasAllTools = true;} else {_hasAllTools = false;};
    	
    
    	(_dialog displayCtrl 1300) ctrlEnable _hasAllTools;
    };

     


  11. No. _itemClassName is the item you interact with (food,drink,etc) and not the tool. What I've meant by "change it" is add a proper magazine check, (as its done in ExileClient_gui_itemDetails_show). If you don't know how to do it, you can try and make changes directly in ExileClient_gui_itemDetails_show.sqf in this part of code:

    if( isClass(_itemConfig >> "Interactions" >> "Consuming") )  then
    {
        _requiredTools = getArray (_itemConfig >> "Interactions" >> "Consuming" >> "tools");
        _hasAllTools = true;
        {
            if !(_x in _equippedMagazines) exitWith 
            {
                _hasAllTools = false;
            };
        }
        forEach _requiredTools;
        (_dialog displayCtrl 1300) ctrlEnable _hasAllTools;
    };

    the values of _requiredTools are the one you want , so add a check for items you want
      //  _requiredTools = getArray (_itemConfig >> "Interactions" >> "Consuming" >> "tools");

    _requiredTools =  ["Exile_Item_CanOpener","Exile_Item_Pliers","Exile_Item_Knife","Exile_Item_Screwdriver"];

    and the overwrite the ExileClient_gui_itemDetails_show via customcode, as you did hundreds times before.


  12. I'm sorry, its very hard to understand you, 
    Can you explain what exactly you want to do and what you did and how, instead of bombarding with unrelated information about treechopping/bambi loadout/nearestConcreteMixer/etc? 

    Have you done the overwrite as I've described and it didn't work or something else? You do not provide any information, how do you want to get help if we have no idea what you did and how?

    What do you mean by "my version of exile" you've reuploaded exile mod client files to workshop as "alternative" version of exile?


  13. bin is binarized file you can't edit it straight-forward, well some parts you can, but potential of breaking something during is extremely high.  converting it to cpp, editing and converting it back to bin is the proper way to do it, so you did it properly.
    if I understand correctly what you've done is edited this classname ?

    class Exile_AbstractItem_Interaction_Eating_Can: Exile_AbstractItem_Interaction_Eating
        {
            tools[] = {"Exile_Item_CanOpener"};
        };
    

    by adding other tools like so:         tools[] = {"Exile_Item_CanOpener","Exile_Item_Screwdriver"};

     

    Quote

    readded/reuploaded to server 


    I don't understand how did you readd the edited and converted bin file back? Did you re-pbo the exile_client pbo?
    If you did then your signature check will fail due to new pbo...if you didn't, then how did you add it back to pbo?

    to overwrite mod configs, you need to create your own server mod and add config overwrites there, when your addon have dependency of exile_client set.
    maybe instead of overwriting exile config, just change the code of ExileClient_object_item_consume.sqf and overwrite it via mission, as you do with many tweaks that doesn't require of you to go and change built in configs ?


  14. At its current state its not supported imho. It is possible to rework the whole thing to work with 1.0.4, but so far no one've done it. Going 5 years back, thats when the original  GR8 Humanity was last updated, Exilemod was like v0.8 and a lot have changed since then. So take that into an account.


  15. On 4/16/2020 at 4:53 PM, krzychuzokecia said:

    I know almost nothing about DayZ, but from my understanding it's haram. If bear is part of DayZ Standalone, it's a no-go. If it's part of DayZ Mod for A2 - then licence allows to use it in Arma 2 only.

     

    Edit: I was wrong, it's possible to use DayZ Mod content in Arma, but apparently Mod doesn't contain any new wildlife (only A2 vanilla cows and sheep). @froggyluv


    You can't use Dayz SA content in Arma, it works the other way around tho. Arma content can be imported (if specific item/content license allows it) to Dayz SA.
    Bears are Dayz SA (not DayZ mod) assets, therefore can't be ported into Arma 3. So we all stuck with vanilla sheeps, goats, rabbits & cows and boars from A2, for now.

×