Jump to content
ReDBaroN

0.3.6 Safes & Lockboxes - Cannot always open

Recommended Posts

Hi, since the 0.3.6 update, accessing safes and lockboxes seems to be random. Running version 0.3.6.024

Sometimes you can, sometimes you can't. When you can't, you only get the examine option which does nothing.

Can't seem to work out the difference between when it works or not. have tried unlocking everything around etc. Doesn't seem to make a difference.

Share this post


Link to post
Share on other sites

last server update:

[Changed] Disable simulation of locked storage devices. This also prevents removal of items until device is unlocked/re-simulated.

 

in 

a3_epoch_server\compile\epoch_vehicle\EPOCH_load_storage.sqf

Ligne 112 > _vehicle enableSimulationGlobal true;

 

 

Share this post


Link to post
Share on other sites
25 minutes ago, kk4pi said:

last server update:

[Changed] Disable simulation of locked storage devices. This also prevents removal of items until device is unlocked/re-simulated.

 

in 

a3_epoch_server\compile\epoch_vehicle\EPOCH_load_storage.sqf

Ligne 112 > _vehicle enableSimulationGlobal true;

 

 

well spotted, no doubt something to do with the issue....

Seems odd but, some players, including me say that running off some considerable distance, looting and returning and they get the ability to open them again. But, other players say that's not working for them.

Did you remove this line? has it worked for you?

Share this post


Link to post
Share on other sites

i edited the described file in my serverside a3_epoch_server.pbo and it works fine! safe can be unlocked and locked and interact...

so, download the file from your server, open it with pbo manager, edit the described file, repack the pbo, reupload it, restart your server... done!

big thx kk4pi

Share this post


Link to post
Share on other sites

From the sounds of it it could simply be the addition of enableSimulationGlobal false on these objects at first spawn. However that was added with 0.3.5.055 server build.

I have commented out these lines and repacked the pbo found here:https://github.com/EpochModTeam/Epoch/blob/experimental/Server_Install_Pack/@epochhive/addons/a3_epoch_server.pbo?raw=true

Please give this a test and let me know if that does anything.

Thanks!

Share this post


Link to post
Share on other sites
3 hours ago, vbawol said:

From the sounds of it it could simply be the addition of enableSimulationGlobal false on these objects at first spawn. However that was added with 0.3.5.055 server build.

I have commented out these lines and repacked the pbo found here:https://github.com/EpochModTeam/Epoch/blob/experimental/Server_Install_Pack/@epochhive/addons/a3_epoch_server.pbo?raw=true

Please give this a test and let me know if that does anything.

Thanks!

This fixed it.  @vbawl for the win!

Share this post


Link to post
Share on other sites
6 hours ago, vbawol said:

From the sounds of it it could simply be the addition of enableSimulationGlobal false on these objects at first spawn. However that was added with 0.3.5.055 server build.

I have commented out these lines and repacked the pbo found here:https://github.com/EpochModTeam/Epoch/blob/experimental/Server_Install_Pack/@epochhive/addons/a3_epoch_server.pbo?raw=true

Please give this a test and let me know if that does anything.

Thanks!

Thanks. This fixed it for me too! 

Share this post


Link to post
Share on other sites

in our last EPOCH_load_storage.sqf was "_vehicle enablesimulationGlobal false" already integrated and it worked.

Now, after update to 0.3.6, the EPOCH_load_storage.sqf is exacly the same then before, but we have also the Problems, that Safes / Lockboxes have sometime no cursortarget.

So it can't be only a problem with enablesimulationglobal.

Any Idea, why there is sometimes no cursortarget for safes / lockboxes?

Share this post


Link to post
Share on other sites

Enable simulation. To fix the bug with the glitch that you can look inside when its locked use this here in client init.

[] spawn {
    disableSerialization;

    while { true } do {
        waitUntil { !isNull findDisplay 602 };
        _open = 0;
        _near = 0;
        {
            _near = _near + 1;
            if !(_x getVariable ['EPOCH_Locked', true]) then {
                _open = _open + 1;
            };
        } forEach (nearestObjects[player,['Safe_EPOCH','Lockbox_EPOCH'],4]);
        if (_near > 0 && _open == 0) then {
            ((findDisplay 602) displayCtrl 6401) ctrlSetPosition [-9999 * safeZoneW,-9999 * SafeZoneH,0,0];
            ((findDisplay 602) displayCtrl 6401) ctrlCommit 0;
            ctrlSetFocus ((findDisplay 602) displayCtrl 6321);
            ctrlActivate ((findDisplay 602) displayCtrl 6321);
        };
        waitUntil { isNull findDisplay 602 };            
    };
};

Share this post


Link to post
Share on other sites

Works great, but Shelfes / Workbenches next to locked Safes / Lockboxes can't be accessed.

For that, you can modify it as follow:

[] spawn {
    disableSerialization;
    while {true} do {
        waitUntil {!isNull findDisplay 602};
        if (cursortarget iskindof "WeaponHolderSimulated" || cursortarget iskindof "GroundWeaponHolder" || isnull cursortarget) then {
            _open = 0;
            _near = 0;
            { 
                _near = _near + 1;
                if !(_x getVariable ['EPOCH_Locked', true]) then { 
                    _open = _open + 1;
                }; 
            } forEach (nearestObjects[player,['Safe_EPOCH','Lockbox_EPOCH'],4]);
            if (_near > 0 && _open == 0) then {
                ((findDisplay 602) displayCtrl 6401) ctrlSetPosition [-9999 * safeZoneW,-9999 * SafeZoneH,0,0];
                ((findDisplay 602) displayCtrl 6401) ctrlCommit 0;
                ctrlSetFocus ((findDisplay 602) displayCtrl 6321);
                ctrlActivate ((findDisplay 602) displayCtrl 6321);
            };
        };
        waitUntil {isNull findDisplay 602};
    };
};
 

Share this post


Link to post
Share on other sites

Still doesnt work , with he mans one either unless i did something wrong, i have it in the init and if a shelf is right next to a safe you cant access it if the safe is locked once you unlock the safe the shelf is able to be access

 

UPDATE<> ok i fixed it this call in the code needs to be changed <> } forEach (nearestObjects[player,['Safe_EPOCH','Lockbox_EPOCH'],4]);< The 4 needs to be changed to 1

Share this post


Link to post
Share on other sites
11 hours ago, viper179 said:

Still doesnt work , with he mans one either unless i did something wrong, i have it in the init and if a shelf is right next to a safe you cant access it if the safe is locked once you unlock the safe the shelf is able to be access

 

UPDATE<> ok i fixed it this call in the code needs to be changed <> } forEach (nearestObjects[player,['Safe_EPOCH','Lockbox_EPOCH'],4]);< The 4 needs to be changed to 1

By changing it to 1, the glitching-bug will stay!

4m is correct, but the shelf must be in cursortarget to become access!

Share this post


Link to post
Share on other sites

That workaround He-man posted should work but is also adding another endless loop to the scheduler. Ideally it should be event driven, and to do that properly we need to get BI to extend the InventoryOpened event handler to also return other connected containers. Please Vote this up: http://feedback.arma3.com/view.php?id=23192

But in the mean time I will figure something out as I would prefer not to use the old method that was using setpos as it was often very slow for detecting cursorTarget changes. 

The Epoch AH already has a temp workaround that checks for nearby locked supplies however its not working well so here is another take on it. This solution is mostly event driven but does have to use spawn and waituntil so its not perfect. This is sort of a hybrid from what has been shared by He-man in this thread. 

New security_checks.h line:

InventoryOpened = "_this spawn EPOCH_initUI;_container = _this select 1;_lockedNear = false;if (_container isKindOf 'GroundWeaponHolder') then {{if (locked _x in [2, 3] ||_x getVariable['EPOCH_Locked', false]) exitWith {_lockedNear = true}} forEach (player nearSupplies 10);};if (locked _container in [2, 3] || _container getVariable['EPOCH_Locked', false] || _lockedNear) then {[] spawn {disableSerialization;waitUntil {!isNull findDisplay 602};_display = findDisplay 602;_ctrl_cargo = _display displayCtrl 6401;_ctrl_ground = _display displayCtrl 6321;_ctrl_cargo ctrlEnable  false;ctrlSetFocus _ctrl_ground;ctrlActivate _ctrl_ground;};};";

I have also updated the server settings pbo found here: https://github.com/EpochModTeam/Epoch/blob/f196d8461fd014820499b224b7157bc3a929cb12/Server_Install_Pack/@epochhive/addons/a3_epoch_server_settings.pbo?raw=true

The idea here is to use event handlers as we have before and simply detect if access to a container should be blocked. If so, we force the player to the ground inventory tab and disable the cargo tab. 

Please give this a test and report back, Thanks!

Share this post


Link to post
Share on other sites
19 minutes ago, vbawol said:

Make sure you are testing it without admin and you are using the Epoch AH. Whatever proves to work good will become a part of the main gamemode code in the next update.

Ahh, thanks for the reminder. Yes, now the crate tab is disabled correctly. 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Similar Content

    • By salival
      Hi guys,
      Quite a few admins asked me to release my Change Code script so here it is, It comes with BattlEye filters, too.
      This will allow players to set the code on placement/upgrade of doors, lockboxes and safes as well as changing them after they are placed.
      https://github.com/oiad/changeCode
    • By Warburgg
      Hello everyone. I would like to ask for help regarding a problem I have been having on my server.
      Items stored in the vault are not being stored in the SQL database.
      I have tested with the safe and the lockbox and both are not working but with the tent it works and saves the items in the database after the server restart.
      ArmA2OA.RPT: https://pastebin.com/X2cT7BBU
      arma2oaserve.RPT: https://pastebin.com/rqFNGbDy
      server_log.txt: https://pastebin.com/ZVWAzgNP
      Please help me. My players do not want to stay on the server because of this and if I remove the safe and leave only the tent (which is what saves the items) they will cry hahaha
    • By salival
      Hi,
      Here's a simple safe zone relocation script for vehicles. 
      Simple relocate only safe zone script.
      Extremely quick and low overhead since we're only scanning the safe zone array instead of every vehicle.
      Uses the Epoch DZE_SafeZonePosArray for convenience.
      Install instructions and download link: https://github.com/oiad/safeZoneRelocate
    • By Demellion
      Tested much, and still found the same ways to avoid (EPOCH_Locked) variable state of the vaults. 
      Result: I am still able to violate access of the locked vaults via inventory glitches.
      My advise still to use this fix:
       
       
  • Advertisement
  • Supporters
  • Discord

×
×
  • Create New...