Jump to content

Golgofinyanin

Member
  • Posts

    13
  • Joined

  • Last visited

Reputation Activity

  1. Like
    Golgofinyanin reacted to Mikeeeyy in [Release v1.0.5] Precise Base Building - Persistent bases after restart! (Updated 22/09/15)   
    Precise Base Building
    What is it?
    Ever made a super neat base and then after a server restart it moves slightly creating gaps in your walls? This fixes that problem and keeps all buildables exactly where you placed them after a server restart. It also saves vehicle positions precisely which may or may not reduce the 'buginess' of vehicles on player placed floors.
    What's new in version 1.0.5?
    This version removes the quotation marks wrapping the direction and position values in the worldspace field. Installation is now also a lot easier.
    Upgrading from v1.0.4 to 1.0.5
    Tutorial to uninstall v1.0.4 is here: https://docs.google.com/document/d/1eQe0gf8VkKji_NRjLB_o1STTo1BnKlWkkEA6N29rvU4 (I refuse to use the text editor on this website... abysmal...)
    Then simply follow the installation tutorial below.
    You MUST execute this query on your database: http://pastebin.com/QZgLH6tw
    Compatibility:
    Works with Snap Building Pro.
    Works with Plot for Life.
    Works with Build Vectors.
    Works with Private Hive Tools.
    Objects already in the database won't be affected.
    Credit:
    KillzoneKid for the 'KK_fnc_floatToString' and 'KK_fnc_positionToString' functions which makes this possible.Installation:
    Un-PBO your dayz_server.pbo. Open up 'server_publishObject.sqf' located in the compile folder (dayz_server\compile\server_publishObject.sqf).
    Find this line:_key = format["CHILD:308:%1:%2:%3:%4:%5:%6:%7:%8:%9:",dayZ_instance, _class, 0 , _charID, _worldspace, [], [], 0,_uid];and replace it with:
    _key = format["CHILD:308:%1:%2:%3:%4:%5:%6:%7:%8:%9:",dayZ_instance, _class, 0 , _charID, _worldspace call AN_fnc_formatWorldspace, [], [], 0,_uid]; Open up 'server_functions.sqf' located in the init folder (dayz_server\init\server_functions.sqf).
    All these functions to the very bottom:KK_fnc_floatToString = { private "_arr"; if (abs (_this - _this % 1) == 0) exitWith { str _this }; _arr = toArray str abs (_this % 1); _arr set [0, 32]; toString (toArray str ( abs (_this - _this % 1) * _this / abs _this ) + _arr - [32]) }; KK_fnc_positionToString = { format [ "[%1,%2,%3]", _this select 0 call KK_fnc_floatToString, _this select 1 call KK_fnc_floatToString, _this select 2 call KK_fnc_floatToString ] }; AN_fnc_formatWorldspace = { private "_ws"; _ws = toArray str _this; format ["[%1,%2%3]", _this select 0 call KK_fnc_floatToString, _this select 1 call KK_fnc_positionToString, toString ([_ws, (_ws find 93) + 1, count _ws - 2] call BIS_fnc_subSelect)] }; Open up 'server_swapObject.sqf' located in the compile folder (dayz_server\compile\server_swapObject.sqf).
    Find this line:_key = format["CHILD:308:%1:%2:%3:%4:%5:%6:%7:%8:%9:",dayZ_instance, _class, 0 , _charID, _worldspace, [], [], 0,_uid];and replace it with:
    _key = format["CHILD:308:%1:%2:%3:%4:%5:%6:%7:%8:%9:",dayZ_instance, _class, 0 , _charID, _worldspace call AN_fnc_formatWorldspace, [], [], 0,_uid]; Open up 'server_updateObject.sqf' located in the compile folder (dayz_server\compile\server_updateObject.sqf).
    Find this: _worldspace = [ round (getDir _object), _position ];and replace it with: _worldspace = [getDir _object, _position] call AN_fnc_formatWorldspace; Save all the files you've edited, repack your 'dayz_server' folder into a PBO and you're done!
×
×
  • Create New...