Jump to content
  • 0

AxeCops Elevators in 1.0.6.1


neverwinter80

Question

Hello Epoch Community

i have installed AxeCops fantastic elevator mod and it works great with some tweaking on 1.0.6.1, what my issue is if i keep using MetalFloor_Preview_DZ as the stop class they disappear.

My question is has the name of this item changed in the update, or is there a setting that disallows this item to remain persistent?

i have not seen anything in InfiStar that is blocking it either.

Link to comment
Share on other sites

Recommended Posts

  • 0
On 4/17/2017 at 4:13 PM, neverwinter80 said:

Hello Epoch Community

i have installed AxeCops fantastic elevator mod and it works great with some tweaking on 1.0.6.1, what my issue is if i keep using MetalFloor_Preview_DZ as the stop class they disappear.

My question is has the name of this item changed in the update, or is there a setting that disallows this item to remain persistent?

i have not seen anything in InfiStar that is blocking it either.

you may need to add this to other allowed objects...

DZE_AllowedObjects   =    ["MetalFloor_Preview_DZ"];

Link to comment
Share on other sites

  • 0

The transparent elevator stops can't be removed. To remove them, I had to add these codes.

elevator_init.sqf line 24:
DZE_maintainClasses = DZE_maintainClasses + [ELE_StopClass];
DZE_isRemovable = DZE_isRemovable + [ELE_StopClass];
 

If you don't want anyone to remove the stop, the function to convert metal floor into elevator stop must be fixed to log the owner
ac_functions.sqf line 54:
PVDZE_obj_Swap = [_objectCharacterID,_object,[_dir,_location,dayz_playerUID],_classname,_obj,player,[],dayz_authKey];

 

Link to comment
Share on other sites

  • 0

I found a bug that the elevator moves walls and floors.


Fix : 214th line of elevator_functions.sqf
from

Quote

{ _x attachTo [_elevator]; _attachments set [count _attachments, _x]; } forEach (_elevator nearEntities ELE_Size);

to

Quote

{ _x attachTo [_elevator]; _attachments set [count _attachments, _x]; } forEach (_elevator nearEntities ["AllVehicles", ELE_Size]);

(If you don't want players to move vehicles with elevators, then change "AllVehicles" to "Man")

Link to comment
Share on other sites

  • 0

wait, I have some more updates for it.

We can't maintain the metalfloor of an elevator after calling it.
CharacterID (and damage) is not shared in "activating" (i.e. replacing the metalfloor with local one).

The elevator will stop working when metalfloor elevator or metalfloor_preview_dz on middle floor removed, or accidentally destroyed.

Link to comment
Share on other sites

  • 0

This isnt working for me i do not know what i am doing wrong.

when i select the first metal floor i want to be the elevator it gives me options to "upgrade to elevator" and ""upgrade to elevator stop" once upgraded to elevator it say "elevator machine built" then it gives me an option to "select elevator" when selected it says "elevator 1 selected"

when i choose the next metal floor to be the next stop i choose option "upgrade to elevator stop" when i upgrade the metal floor it disappears there is never an option to call the elevator I just get left with one metal floor with an option to "remove metal floor" or "select elevator"

Link to comment
Share on other sites

  • 0

So what was the fix for elevator stops being deleted? 

I'm using Schalldampfer's version and the stop gets stopped, hehe, apparently by the server_swapObject.sqf.  The floor gets deleted, but it seems to fail the check around line 45;

_allowed = [_object, "Server"] call check_publishobject;
if (!_allowed || !_proceed) exitWith { 
	if(!isNull(_object)) then {
		deleteVehicle _object; 
	};
	diag_log ("Invalid object swap by playerUID:" + _playerUID);
};

In the server report I am seeing;

"DELETE DIRECT: SERVER deleted object with ID: 1285"
"Invalid object swap by playerUID:xxxxxx"  (UID edited to protect the somewhat innocent)

So, as best I can make out, check_publishobject simply confirms the stop is in DayZ_SafeObjects - which it is, so perhaps it's !_proceed which is causing the issue?  I can't see why it should. 

 

Link to comment
Share on other sites

  • 0
3 hours ago, Darce said:

So what was the fix for elevator stops being deleted? 

I'm using Schalldampfer's version and the stop gets stopped, hehe, apparently by the server_swapObject.sqf.  The floor gets deleted, but it seems to fail the check around line 45;

In the server report I am seeing;

"DELETE DIRECT: SERVER deleted object with ID: 1285"
"Invalid object swap by playerUID:xxxxxx"  (UID edited to protect the somewhat innocent)

So, as best I can make out, check_publishobject simply confirms the stop is in DayZ_SafeObjects - which it is, so perhaps it's !_proceed which is causing the issue?  I can't see why it should. 

 

Do you have this?

DZE_AllowedObjects = ["MetalFloor_Preview_DZ"];

 

Link to comment
Share on other sites

  • 0

No.  I can't find any incidents of DZE_AllowedObjects anywhere.

With Object_Debug turned on I get the following in the server report;

 9:23:45 "DELETE DIRECT: SERVER deleted object with UID: 47032348036192"
 9:23:45 "DEBUG: Checking if Object: 23aaeb00# 307125: metal_floor_ghost.p3d REMOTE is allowed, published by Server"
 9:23:45 "DEBUG: Object: 23aaeb00# 307125: metal_floor_ghost.p3d REMOTE published by Server is allowed by any"
 9:23:45 Error in expression <2 is allowed by %3",_object,_playername,_saveObject];


_allowed
};

server_hive>
 9:23:45   Error position: <_saveObject];


_allowed
};

server_hive>
 9:23:45   Error Undefined variable in expression: _saveobject
 9:23:45 File z\addons\dayz_server\init\server_functions.sqf, line 165
 9:23:45 "Invalid object swap by playerUID:xxx"

So it looks like the server_functions is dropping the ball - it functions normally for something like upgrading a door, but errors out for the elevator stop.

check_publishobject = {
	private ["_saveObject","_allowed","_allowedObjects","_object","_playername"];

	_object = _this select 0;
	_playername = _this select 1;
	_allowed = false;

	#ifdef OBJECT_DEBUG
		diag_log format["DEBUG: Checking if Object: %1 is allowed, published by %2",_object,_playername];
	#endif

	if ((typeOf _object) in DayZ_SafeObjects) then {
		_saveObject = "DayZ_SafeObjects";
		_allowed = true;
	};
	
	//Buildings
	if (_object isKindOf "DZ_buildables") then {
		_saveObject = "DZ_buildables";
		_allowed = true;
	};
	
	#ifdef OBJECT_DEBUG
		diag_log format["DEBUG: Object: %1 published by %2 is allowed by %3",_object,_playername,_saveObject];
	#endif

	_allowed
};

To me it looks as if it passes the test for being in DayZ_SafeObjects but then has a mind fart at assigning _saveobject.

I'm missing something here.

Link to comment
Share on other sites

  • 0

So if I upgrade a door  (lock it)  this is reported;

 9:22:43 "DELETE DIRECT: SERVER deleted object with UID: 4634528045119"
 9:22:43 "DEBUG: Checking if Object: 2ec6ab00# 307083: steel_garage_locked.p3d REMOTE is allowed, published by Server"
 9:22:43 "DEBUG: Object: 2ec6ab00# 307083: steel_garage_locked.p3d REMOTE published by Server is allowed by DayZ_SafeObjects"
 9:22:43 "UPGRADE: Playername UID upgraded CinderWallDoorLocked_DZ @045021 [4514.1,8043.91,0.00143886]"
 9:22:49 "Playername UID LOCKED CinderWallDoorLocked_DZ with code: 829 @045021 [4514.9,8045.05,0.0009999]"

This is done by the player_upgrade.sqf which passes the same information as does the elevator script

Quote

PVDZE_obj_Swap = [_objectCharacterID,_object,[_dir,_location,_vector],_classname,_obj,player,[],dayz_authKey];

 

Link to comment
Share on other sites

  • 0

In AC_Functions.sqf I inserted the following, to see what is being passed to the check_publishObject function

	if ((typeOf _object) in DayZ_SafeObjects) then {
		diag_log format ["Elevator passing _objectCharacterID %1 _object %2 _obj %3  player %4",_objectCharacterID,_object,_obj,player];
	};

It returned the dialog below, which to me says that the stop is in DayZ_SafeObjects;

Quote

"Elevator passing _objectCharacterID 69760011 _object 850e1d00# 307592: metal_floor_ghost.p3d _obj 85d4e400# 307468: metal_floor.p3d  player B 1-1-B:1 (FONC)"

But I'm tossed if I can understand why it isn't when it comes to the check_publishObject function.  

Link to comment
Share on other sites

  • 0

Solved!

The old localisation problem.

if I move the following from elevator_init to the init/variables then it works fine

DZE_maintainClasses = DZE_maintainClasses + [ELE_StopClass];
DZE_isRemovable = DZE_isRemovable + [ELE_StopClass];
DayZ_SafeObjects = DayZ_SafeObjects + [ELE_StopClass];

So it appears that when it's in the elevator_init then the global DayZ_SafeObjects doesn't have the stop class.  When it's added in the init/variables then it does.

Working fine now, thanks  :)

Link to comment
Share on other sites

  • 0
13 hours ago, Schalldampfer said:

I'm using it.

I'm having trouble installing it.

Would you mind taking a look at my files?

Or maybe providing your files?

Installing your version I get no option for upgrade or anything.

I tried original version and got option for upgrade but no option to move elevator.

I must be placing the code in wrong place.

Here are my files:

https://www.dropbox.com/s/tddtrpy5qsncgql/variables.sqf?dl=0

https://www.dropbox.com/s/u278dbbjdwuvstj/fn_selfActions.sqf?dl=0

https://www.dropbox.com/s/p2riaiumsng9dih/init.sqf?dl=0

 

Thank you.

Edit: I'm adding my server rpt: https://www.dropbox.com/s/f7bj14my7rvxetm/arma2oaserver.RPT?dl=0

I did a search for elevator in rpt and nothing. As though the script wasn't being called.

Link to comment
Share on other sites

  • 0
18 hours ago, Hux said:

I'm having trouble installing it.

Would you mind taking a look at my files?

Or maybe providing your files?

Installing your version I get no option for upgrade or anything.

I tried original version and got option for upgrade but no option to move elevator.

I must be placing the code in wrong place.

Here are my files:

https://www.dropbox.com/s/tddtrpy5qsncgql/variables.sqf?dl=0

https://www.dropbox.com/s/u278dbbjdwuvstj/fn_selfActions.sqf?dl=0

https://www.dropbox.com/s/p2riaiumsng9dih/init.sqf?dl=0

 

Thank you.

Edit: I'm adding my server rpt: https://www.dropbox.com/s/f7bj14my7rvxetm/arma2oaserver.RPT?dl=0

I did a search for elevator in rpt and nothing. As though the script wasn't being called.

overwrite original version with my files, it may work better. I have made mine by editing the original version, so I think I have forgotten something in install instruction.

Link to comment
Share on other sites

  • 0
5 hours ago, Schalldampfer said:

overwrite original version with my files, it may work better. I have made mine by editing the original version, so I think I have forgotten something in install instruction.

I'm using your version.

Thanks for the reply.

Link to comment
Share on other sites

  • 0

Any luck with this working in 1.0.6.2? I need help understanding step 6:

6. Configuration: in `Dayz_Epoch_**.Mapname\dayz_code\init\variables.sqf`. Customize and add below:

```sqf
//elevator
ELE_MaxRange = DZE_PlotPole select 0; // maximum range the elevator can travel / stop points can be built (in meter)
ELE_Speed = 30; // speed of the elevator (meters per second)
ELE_StopWaitTime = 0; // disable the wait time if you call the elevator
ELE_RequiredBuildTools = ["ItemToolbox", "ItemCrowbar"]; // required tools for building an elevator and elevator stop
ELE_RequiredBuildItems = [["PartGeneric",2], "PartEngine", "ItemGenerator", "ItemJerrycan"]; // required items to build an elevator
ELE_RequiredBuildStopItems = [["PartGeneric",2]]; // required items to build an elevator stop
ELE_StopClass = "MetalFloor_Preview_DZ"; // elevator stop classname
```
before lines you added in 3.

Do I add this above s_player_elevator_next = -1; or above the block completely?

 

This is a great community and glad to see it still active after all these years. Very helpful for Noobs like me. 

Update: I get an elevator initialized msg in the log but no other mention. Seems like I am missing a click action or something to give me the option to build the elevator.

Edited by Stephen
Update
Link to comment
Share on other sites

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
  • Discord

×
×
  • Create New...