Super Jerome

[Updated] R3F Logistics Exile (with CUP)

229 posts in this topic

On 11/4/2018 at 10:00 AM, BeatenByBacon said:

Hey, one question. I installed the mod on my server and all of the functions of the mod appear twice in the scroll menu. Why is that so? and what do i have to change/remove in the script so the bug gets removed?

I just put the mod as it is into my server without changing anything in the mod.

Greets
Bacon

Apologies on bumping an older thread, but I'm having the same problem as this guy.

Installs just fine, but the menu shows up twice on the scroll wheel for everything. "Show Inventory/Take/Load/So on"

Share this post


Link to post
Share on other sites
Advertisement

Hey all,
I have noticed that if I use the R3F mod to move crates via "Take supply box", when the server restarts the crates are empty and not in the same position as I left them. But when I use Exile's "Move" function, they hold their contents and are in the same place as they were put in.

I have ran a couple of tests on different servers to be sure and the crate in question is Exile_Container_SupplyBox, has anyone else noticed this or is it just me?

Share this post


Link to post
Share on other sites

@MrNeal

You could compare the R3F "take supply box" to the Exile "move" function. The Exile "move" function handles it differently, like it is a base part.
Had the same problem with disappearing items in the supply box and the supply box teleporting to their original install position.

I had to make it so you cant install the Exile Supply Box in a base. Players would install and sell them at waste dump full of valuables. Next restart they would magically appear back at base, full of the same items. They have special voodoo powers.

config.cpp:

Spoiler

/*
    class SupplyBox
    {
        targetType = 2;
        target = "Exile_Container_SupplyBox";

        class Actions
        {
            class Mount: ExileAbstractAction
            {
                title = "Mount";
                condition = "(isNull (attachedTo ExileClientInteractionObject)) && ((ExileClientInteractionObject getvariable ['ExileOwnerUID',1]) isEqualTo 1)";
                action = "_this call ExileClient_object_supplyBox_mount";
            };

            class Install: ExileAbstractAction
            {
                title = "Install";
                condition = "isNull (attachedTo ExileClientInteractionObject) && ((ExileClientInteractionObject getvariable ['ExileOwnerUID',1]) isEqualTo 1)";
                action = "_this call ExileClient_object_supplyBox_install";
            };

            class Unmount: ExileAbstractAction
            {
                title = "Unmount";
                condition = "!(isNull (attachedTo ExileClientInteractionObject)) && ((ExileClientInteractionObject getvariable ['ExileOwnerUID',1]) isEqualTo 1)";
                action = "_this call ExileClient_object_supplyBox_unmount";
            };
            // Picks up the container so you can move it
            class Move: ExileAbstractAction
            {
                title = "Move";
                condition = "(getNumber(configFile >> 'CfgVehicles' >> typeOf ExileClientInteractionObject >> 'exileIsLockable') isEqualTo 0) || ((ExileClientInteractionObject getvariable ['ExileIsLocked',1]) isEqualTo 0)";
                action = "_this spawn ExileClient_object_construction_move";
            };
        };
    };   */

 

 

Share this post


Link to post
Share on other sites
On 1/29/2019 at 12:13 AM, aussie battler said:

@MrNeal

You could compare the R3F "take supply box" to the Exile "move" function. The Exile "move" function handles it differently, like it is a base part.
Had the same problem with disappearing items in the supply box and the supply box teleporting to their original install position.

I had to make it so you cant install the Exile Supply Box in a base. Players would install and sell them at waste dump full of valuables. Next restart they would magically appear back at base, full of the same items. They have special voodoo powers.

config.cpp:

  Reveal hidden contents

/*
    class SupplyBox
    {
        targetType = 2;
        target = "Exile_Container_SupplyBox";

        class Actions
        {
            class Mount: ExileAbstractAction
            {
                title = "Mount";
                condition = "(isNull (attachedTo ExileClientInteractionObject)) && ((ExileClientInteractionObject getvariable ['ExileOwnerUID',1]) isEqualTo 1)";
                action = "_this call ExileClient_object_supplyBox_mount";
            };

            class Install: ExileAbstractAction
            {
                title = "Install";
                condition = "isNull (attachedTo ExileClientInteractionObject) && ((ExileClientInteractionObject getvariable ['ExileOwnerUID',1]) isEqualTo 1)";
                action = "_this call ExileClient_object_supplyBox_install";
            };

            class Unmount: ExileAbstractAction
            {
                title = "Unmount";
                condition = "!(isNull (attachedTo ExileClientInteractionObject)) && ((ExileClientInteractionObject getvariable ['ExileOwnerUID',1]) isEqualTo 1)";
                action = "_this call ExileClient_object_supplyBox_unmount";
            };
            // Picks up the container so you can move it
            class Move: ExileAbstractAction
            {
                title = "Move";
                condition = "(getNumber(configFile >> 'CfgVehicles' >> typeOf ExileClientInteractionObject >> 'exileIsLockable') isEqualTo 0) || ((ExileClientInteractionObject getvariable ['ExileIsLocked',1]) isEqualTo 0)";
                action = "_this spawn ExileClient_object_construction_move";
            };
        };
    };   */

 

 

Thanks @aussie battler Removing the install is not a biggie at the moment and is the lesser of two evils.

 

Share this post


Link to post
Share on other sites
Quote

ExileServer_object_lock_network_hotwireLockRequest.sqf

Line 52:


_object enableRopeAttach true;
_object setVariable ["R3F_LOG_disabled", false, true];

ExileServer_object_lock_network_lockToggle.sqf

   Line 66:


[_sessionID,"lockResponse",["Unlocked!", true , netId _object , _objectPinCode, 0]] call ExileServer_system_network_send_to;
_object enableRopeAttach true;
_object setVariable ["R3F_LOG_disabled", false, true];

Line 92:


[_sessionID,"lockResponse",["Locked!",true, netId _object, _objectPinCode, 2]] call ExileServer_system_network_send_to;
_object enableRopeAttach false;
_object setVariable ["R3F_LOG_disabled", true, true];

This dosent work for me... 

This post means the same : Fixing R3F son you cant tow/lift locked vehicles

If i try this i cant lock / unlock vehicels anymore.

Can someone pleas tell me how not to tow / lift locked vehicles?

Share this post


Link to post
Share on other sites
On 5/1/2018 at 4:21 AM, aussie battler said:

I found this: https://armajunkies.atlassian.net/browse/AJAW-139?page=com.atlassian.jira.plugin.system.issuetabpanels%3Aall-tabpanel


 And worked out that it was for vehicleRespawnManager.sqf set to a 10sec check timer on wasteland. I use to run a wasteland server, here is the file:


vehicleRespawnManager.sqf
 

  Reveal hidden contents

// ******************************************************************************************
// * This project is licensed under the GNU Affero GPL v3. Copyright © 2014 A3Wasteland.com *
// ******************************************************************************************
//    @file Name: vehicleRespawnManager.sqf
//    @file Author: AgentRev

if (!isServer) exitWith {};

#define RESPAWN_LOOPING_TIME 10 //(5*60)

// Start monitoring the vehicle
while {true} do
{
    if (count A3W_respawningVehicles == 0) then
    {
        uiSleep 10;
    }
    else
    {
        _sleepIter = (RESPAWN_LOOPING_TIME / count A3W_respawningVehicles) max 0.01;

        {
            _startTime = diag_tickTime;
            _veh = [_x, "Vehicle", objNull] call fn_getFromPairs;

            // Check if vehicle is not being towed or moved
            if (isNull (_veh getVariable ["R3F_LOG_est_transporte_par", objNull]) &&
                isNull (_veh getVariable ["R3F_LOG_est_deplace_par", objNull])) then
            {
                _settings = _x;

                private ["_vehClass", "_startPos", "_lastSeenAlive", "_respawnPos", "_respawnTimer", "_minDistance", "_desertedTimer", "_proxyTimer", "_proxyDistance", "_desertedTimeout", "_brokenTimeout"];
                {
                    _key = _x select 0;
                    _value = _x select 1;

                    switch (_key) do
                    {
                        case "Class":            { _vehClass = _value };
                        case "StartPos":         { _startPos = _value };
                        case "LastSeenAlive":    { _lastSeenAlive = _value };
                        case "RespawnPos":       { _respawnPos = _value };
                        case "RespawnTimer":     { _respawnTimer = _value };
                        case "MinDistance":      { _minDistance = _value };
                        case "DesertedTimer":    { _desertedTimer = _value };
                        case "ProxyTimer":       { _proxyTimer = _value };
                        case "ProxyDistance":    { _proxyDistance = _value };
                        case "DesertedTimeout":  { _desertedTimeout = _value };
                        case "BrokenTimeout":    { _brokenTimeout = _value };
                    };
                } forEach _settings;

                _proxyTimer = _proxyTimer - _desertedTimer;

                _broken = false;
                _deserted = false;

                _alive = alive _veh;
                _canMove = canMove _veh;

                // Is the vehicle still alive?
                if (_alive) then
                {
                    // Can the vehicle move?
                    if (_canMove) then
                    {
                        // Check for broken wheels
                        {
                            if (_veh getHitPointDamage _x >= 1) exitWith
                            {
                                _canMove = false;
                            };
                        } forEach (_veh getVariable ["vehicleRespawn_wheelHitPoints", []]);
                    };

                    // Is the vehicle broken?
                    if (!_canMove && {{alive _x} count crew _veh == 0}) then
                    {
                        // Is there a respawn timer?
                        if (_respawnTimer > 0) then
                        {
                            // Is the vehicle not yet marked as broken?
                            if (_brokenTimeout == 0) then
                            {
                                // Set broken timeout
                                _brokenTimeout = diag_tickTime + _respawnTimer;
                            }
                            else // The vehicle was previously broken
                            {
                                _lastOccupantTimestamp = _veh getVariable ["vehSaving_lastUse", 0];

                                // Did somebody get in/out since it was marked as broken?
                                if (_lastOccupantTimestamp > _brokenTimeout) then
                                {
                                    // Readjust broken timeout
                                    _brokenTimeout = _lastOccupantTimestamp + _respawnTimer;
                                };

                                // If the broken timeout has been reached, mark the vehicle as dead
                                if (diag_tickTime >= _brokenTimeout) then { _broken = true };
                            };
                        }
                        else // The vehicle respawns immediatly since there is no respawn timer
                        {
                            // Mark the vehicle as dead
                            _broken = true;
                        };
                    }
                    else // The vehicle is not currently broken, or someone's inside
                    {
                        // Reset broken timeout
                        _brokenTimeout = 0;
                    };

                    [_settings, "BrokenTimeout", _brokenTimeout] call fn_setToPairs;
                    [_settings, "LastSeenAlive", diag_tickTime] call fn_setToPairs;
                }
                else // The vehicle is destroyed
                {
                    // Adjust broken timeout relative to destruction time
                    _brokenTimeout = (_lastSeenAlive max (_veh getVariable ["processedDeath", 0])) + _respawnTimer;

                    // If the broken timeout has been reached, mark the vehicle as dead
                    if (diag_tickTime >= _brokenTimeout) then { _broken = true };
                };

                if (_alive) then
                {
                    // Check if the vehicle is displaced, deserted, or looted
                    if (_desertedTimer > 0 &&
                       {(getPosWorld _veh) vectorDistance _startPos >= _minDistance || _veh getVariable ["itemTakenFromVehicle", false]} &&
                       {{alive _x} count crew _veh == 0}) then
                    {
                        // Is the vehicle not yet marked as deserted?
                        if (_desertedTimeout == 0) then
                        {
                            // Mark the vehicle as deserted
                            _desertedTimeout = diag_tickTime + _desertedTimer;
                        };

                        _proxyExtra = 0;

                        // Is there a proximity timer
                        if (_proxyTimer > 0) then
                        {
                            _lastOwnerUID = _veh getVariable ["lastVehicleOwnerUID", "0"];
                            _lastOwner = objNull;

                            // Find the owner unit
                            {
                                if (getPlayerUID _x == _lastOwnerUID) exitWith
                                {
                                    _lastOwner = _x;
                                };
                            } forEach playableUnits;

                            // Is the last owner within proximity distance
                            if (isPlayer _lastOwner && {_lastOwner distance _veh <= _proxyDistance}) then
                            {
                                // Take proximity timer extra into account
                                _proxyExtra = _proxyTimer;
                            };
                        };

                        // Is the desertion timeout reached?
                        if (diag_tickTime >= _desertedTimeout + _proxyExtra) then
                        {
                            // Mark as deserted
                            _deserted = true;
                        };
                    }
                    else // The vehicle is still good
                    {
                        // Reset desertion timeout
                        _desertedTimeout = 0;
                    };

                    [_settings, "DesertedTimeout", _desertedTimeout] call fn_setToPairs;
                };

                // Respawn vehicle
                if ((_alive && (_deserted || (_broken && _desertedTimeout == 0))) ||
                   (!_alive && _broken)) then
                {
                    _veh enableSimulationGlobal true;
                    _towedVeh = _veh getVariable ["R3F_LOG_remorque", objNull];

                    // Clean-up if vehicle is towing via R3F
                    if (!isNull _towedVeh) then
                    {
                        _towedVeh enableSimulationGlobal true;
                        _towedVeh setVariable ["R3F_LOG_est_transporte_par", objNull, true];
                        _veh setVariable ["R3F_LOG_remorque", objNull, true];

                        if (local _towedVeh) then
                        {
                            [_towedVeh] call detachTowedObject;
                        }
                        else
                        {
                            pvar_detachTowedObject = [netId _towedVeh];
                            publicVariable "pvar_detachTowedObject";
                        };
                    };

                    if (count _respawnPos < 3) then
                    {
                        _respawnPos = getPosATL _veh;
                    };

                    sleep 0.1;

                    if (_veh getVariable ["ownerUID",""] isEqualTo "") then
                    {
                        deleteVehicle _veh;
                    };

                    if (_vehClass isKindOf "Ship_F") then
                    {
                        [_respawnPos, _vehClass, _settings] spawn boatCreation;
                    }
                    else
                    {
                        [_respawnPos, _vehClass, _settings] spawn vehicleCreation;
                    };
                };
            };

            uiSleep (_sleepIter - (diag_tickTime - _startTime));
        } forEach A3W_respawningVehicles;
    };
};

 

 

Hi @aussie battler I am also having an issue where AI captured / Mission won vehicles are  despawning, Is this an existing file or does it need to go in R3F somewhere?

Thanks in advance

 

Share this post


Link to post
Share on other sites
17 minutes ago, aussie battler said:

@Mike-Lee-Toris What about ExileServer_object_vehicle_database_load.sqf, did you modify that as well?



@MrNeal are you using Occupation? Vehicles stopped despawning when I stopped using occupation for roaming ai.

Yes, but only for fast nights. I use A3XAI for roaming AI and vehicles. 
I take it the file does not fix the issue then?

Share this post


Link to post
Share on other sites

I would tell players to hop into driver and then tow. But other server owners said that it doesnt work:

On 4/21/2019 at 8:59 PM, aussie battler said:

@NFGCaboose-1 I think it gets cleaned up with some of the DMS mission objects once the player moves away. I tell player to get in the towed vehicle as driver & then tow it.

@aussie battler I tried that and it still deletes it. After further investigation I found that it happens anywhere, doesn't have to be a safe zone. Once you get out of the vehicle that you are using to tow the towed vehicle vanishes. I love the performance of Occupation but this one little problem is killing it. Right now I am running Occupation for crate missions and disabling the roaming AI and then using A3XAI for roaming and the problem stopped but A3XAI bogs down the server. Gonna give FUMS a try and see if it handles better. Thanks for your help.

 

Share this post


Link to post
Share on other sites
Advertisement

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.