Jump to content

[Release v1.0.5] Precise Base Building - Persistent bases after restart! (Updated 22/09/15)


Mikeeeyy

Recommended Posts

  On 8/22/2014 at 8:56 PM, SmokeyBR said:

yes i could

how would i do this thou ? just backup ? and put the entire contents on pastebin ?

 

I guess that works, yeah.

Edit: Took a look at the CSV table as the SQL dump was all on 1 line, and I couldn't see anything wrong with any of the worldspace arrays, is that the whole table?

Link to comment
Share on other sites

sorry this is first time doing this and im not sure what u looking for

i have done a new base just to test if all the objects would stay in place (since my old base the objects were still slighty out of place)

iike i said on my first post just the cinder walls were still moving after testing ive deleted the entire base.

 

check the link again ive tried exporting as a SQL file, and yes should be the entire thing

Link to comment
Share on other sites

  On 8/22/2014 at 11:02 PM, SmokeyBR said:

sorry this is first time doing this and im not sure what u looking for

i have done a new base just to test if all the objects would stay in place (since my old base the objects were still slighty out of place)

iike i said on my first post just the cinder walls were still moving after testing ive deleted the entire base.

 

check the link again ive tried exporting as a SQL file, and yes should be the entire thing

 

Sorry bud I still don't see anything wrong with that, are you sure you installed it correctly?

Link to comment
Share on other sites

ya installing was done right went through it a few times

Could it be something to do with vectors maybe ? it changes few things on the part of

if (count _worldspace >= 2) then
        {

 

also, would it matter the way its built ? like i build my base snapping cinder walls to metal floors and not cinder wall with cinder wall, that way cinder walls would be intersecting each other

Link to comment
Share on other sites

  On 8/23/2014 at 5:30 AM, SmokeyBR said:

ya installing was done right went through it a few times

Could it be something to do with vectors maybe ? it changes few things on the part of

if (count _worldspace >= 2) then
        {

also, would it matter the way its built ? like i build my base snapping cinder walls to metal floors and not cinder wall with cinder wall, that way cinder walls would be intersecting each other

 

It could be something to do with that and no it shouldn't matter how it's built.

Link to comment
Share on other sites

Had this problem myself today, spent ages trying to figure it out, then checked my DB and the solution was so obvious I can't believe I didn't see it sooner.

 

Basically, you need to update server_swapObject.sqf as well, otherwise as soon as you upgrade an epoch buildable, it loses the accurate positioning. On restart, everything moves again, and it's even MORE obvious when upgraded parts are placed next to non-upgraded ones.

Link to comment
Share on other sites

7c18af8f84.jpg

Version 1.0.3

  • Fixed upgraded objects not being accurately saved. (Credit to: 'mdc' for pointing this out.)

86aab96380.jpg

  1. Open up 'server_swapObject.sqf' located in the compile folder. (dayz_server\compile\server_swapObject.sqf)
  2. Find:
    //get UID
    _uid = _worldspace call dayz_objectUID2;
    and then move it underneath:
    _allowed = [_object, "Server"] call check_publishobject;
    if (!_allowed || !_proceed) exitWith {
        if(!isNull(_object)) then {
            deleteVehicle _object;
        };
        diag_log ("Invalid object swap by playerUID:"+ str(_activatingplayerUID));
    };

    then add this underneath the _uid part:

    _worldspace set [0, (_worldspace select 0) call KK_fnc_floatToString];
    _worldspace set [1, (_worldspace select 1) call KK_fnc_positionToString]; 

    It should look like this:

    _allowed = [_object, "Server"] call check_publishobject;
    if (!_allowed || !_proceed) exitWith {
        if(!isNull(_object)) then {
            deleteVehicle _object;
        };
        diag_log ("Invalid object swap by playerUID:"+ str(_activatingplayerUID));
    };
    
    //get UID
    _uid = _worldspace call dayz_objectUID2;
    
    _worldspace set [0, (_worldspace select 0) call KK_fnc_floatToString];
    _worldspace set [1, (_worldspace select 1) call KK_fnc_positionToString];
    
    // Publish variables
    _object setVariable ["CharacterID",_charID,true];
  3. Find:
    _object setVariable ["OEMPos",(_worldspace select 1),true];

    and replace it with:

    _object setVariable ["OEMPos", call compile (_worldspace select 1), true];
  4. All done!
Link to comment
Share on other sites

Okay so I installed this a few days ago on both my cherno and napf server. I have a alot of really good builders that hate the gaps sometimes after restart All seemed well at first but I started to see some problems. Some of the object after restart would be turned. I have updated all the files to the most recent and it still seems to happen. So now for real problem. I now took the files out and the server wont start until.  THIS MOD CHANGES ALL THE WORLDSPACE IN YOUR DB. Once you install there is no easy way back!!!.

Link to comment
Share on other sites

  On 8/26/2014 at 2:15 AM, Powell said:

Okay so I installed this a few days ago on both my cherno and napf server. I have a alot of really good builders that hate the gaps sometimes after restart All seemed well at first but I started to see some problems. Some of the object after restart would be turned. I have updated all the files to the most recent and it still seems to happen. So now for real problem. I now took the files out and the server wont start until.  THIS MOD CHANGES ALL THE WORLDSPACE IN YOUR DB. Once you install there is no easy way back!!!.

 

If you didn't know this already and did not backup your database then you really shouldn't be hosting a server

Link to comment
Share on other sites

  On 8/26/2014 at 3:25 AM, Powell said:

I backed up DB but its been like a 2 days now. Dont want players to think they wasted there time...

maybe check this part?

2f14133ff6.png

If you've done everything as the installation says to I don't see why objects would change direction

Link to comment
Share on other sites

  On 8/26/2014 at 3:31 AM, Jossy said:

maybe check this part?

2f14133ff6.png

If you've done everything as the installation says to I don't see why objects would change direction

100% the same as posted. some worldspace [173,[10077.3,5420.95,0]] [174.139,[287.651,3425.74,5.959],"76561198034272938"] all metal floors ["0","[1861.296875,6190.629883,-0.691101]","76561198038818800",[[0,1,0],[0,0,1]]] wood

Link to comment
Share on other sites

  On 8/26/2014 at 4:08 AM, Powell said:

100% the same as posted. some worldspace [173,[10077.3,5420.95,0]] [174.139,[287.651,3425.74,5.959],"76561198034272938"] all metal floors ["0","[1861.296875,6190.629883,-0.691101]","76561198038818800",[[0,1,0],[0,0,1]]] wood

well that is an issue with vector building not this mod, while having vector building enabled the 0 has no effect on direction as direction will now be set with setVectorDirAndUp [[0,1,0],[0,0,1]];

 

check where the objects are getting the direction from in server_monitor and make sure it's not using setDir

Link to comment
Share on other sites

  On 8/26/2014 at 4:16 AM, Jossy said:

well that is an issue with vector building not this mod, while having vector building enabled the 0 has no effect on direction as direction will now be set with setVectorDirAndUp [[0,1,0],[0,0,1]];

 

check where the objects are getting the direction from in server_monitor and make sure it's not using setDir

Dont have Vector building in for a mod.

Link to comment
Share on other sites

  On 8/26/2014 at 5:49 AM, Powell said:

Dont have Vector building in for a mod.

 

then what is this? ",[[0,1,0],[0,0,1]]]"

 

I will tell you, these are vectors, 0,1,0 is the direction facing north, 0,0,1 is the vectorUp meaning the object is upright.

Link to comment
Share on other sites

Pleas help i corect add code in server monitor ?

if(isnil "MaxMineVeins") then {
MaxMineVeins = 0;
};
// Custon Configs End


if (isServer && isNil "sm_done") then {


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
    ]
};
Link to comment
Share on other sites

Oh ok pleas help for add code in my server_functions

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
    ]
};

  Reveal hidden contents

Link to comment
Share on other sites

  On 8/28/2014 at 9:40 AM, DimitriPokki said:

Oh ok pleas help for add code in my server_functions

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
    ]
};

  Reveal hidden contents

 

Just place it at the very bottom.

Link to comment
Share on other sites

ok Mikkeyyy I am confused,

in the install notes you say put the two functions in the server_monitor.sqf, and now you say to put them in the server_functions.sqf?
So where do they go ?
If they go in the latter can you edit the tutorial ?
 
 
Anyways, using the steps at the beginning i discovered that my server_publish object.sqf  looks like this , which is slightly different to the one
that you posted as example.

 

  Reveal hidden contents

 

you have the _proceed variable that in my case would be unintialized so it could trigger an error. Also

I dont have _object setVariable ["OEMPos",(_worldspace select 1),true]; so ...

Please advise.

Link to comment
Share on other sites

  On 8/29/2014 at 5:50 AM, Kronky said:

ok Mikkeyyy I am confused,

in the install notes you say put the two functions in the server_monitor.sqf, and now you say to put them in the server_functions.sqf?

So where do they go ?

If they go in the latter can you edit the tutorial ?

 

 

Anyways, using the steps at the beginning i discovered that my server_publish object.sqf  looks like this , which is slightly different to the one

that you posted as example.

 

  Reveal hidden contents

 

you have the _proceed variable that in my case would be unintialized so it could trigger an error. Also

I dont have _object setVariable ["OEMPos",(_worldspace select 1),true]; so ...

Please advise.

 

Wow, I never noticed that screw up, like I said in the OP, I kinda rushed to get it out so my bad, I've fixed the tutorial now. As for your other problem, you're in the wrong file, for that part of the tutorial you should be editing 'server_swapObject.sqf'.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Advertisement
×
×
  • Create New...