Jump to content

[Release] - A Plot for life v2.5. Keep your buildables on death. Take plot ownership


Recommended Posts

Is this meant to work with the regular UID's also and NOT just SteamID's? I'm not using the steam patch.

 

From what I hear 125548 is now the stable release but haven't verified yet.

 

To answer your question though, yep it should work with any playerUID (BIS playerUID or SteamID).  It just changes where the ID is stored / read from and does not change the UID at all.  Either should work fine.

Link to comment
Share on other sites

@RimBlock, funny you should ask! I merged it last night with the latest Snap_Pro ...

 

 

Thanks VM for that. 

 

I have linked your post above from the first post in this thread.

 

Raymix suggesting chaining his compiles.sqf is fine if that is the only mod installed but causes lots of confusion for some if there are common files between multiple mods with one superceeding another.  It is simpler to point to the Snap Build Pro version as that is the last one to be defined following Raymix's install instructions so no worries :) .

Link to comment
Share on other sites

From what I hear 125548 is now the stable release but haven't verified yet.

 

To answer your question though, yep it should work with any playerUID (BIS playerUID or SteamID).  It just changes where the ID is stored / read from and does not change the UID at all.  Either should work fine.

Damn ok, It's a great looking script but for some reason I run into endless amounts of problems when I try and use it.

Link to comment
Share on other sites

It should work straight off if you install on a vanilla server.  The problem comes when trying to add other mods as well.  The actual changes to the files is fairly minor (give or take the server_monitor.sqf which is a bit more) but the number of files is quite large for a mod and they are all the original files than need changing, there are not additional files (like with the majority of SnapBuildPro) so there is a bigger risk of conflict.

Link to comment
Share on other sites

Having trouble with the "loaded" version of the player_build provided by Pry. Snap works fine... and admin build works great... but custom recipes only work for people with fastbuild, everyone else gets cancel build after finishing all three rounds of the animation. 

 

All custom items have been added to dayz_allowedObjects = and as I said people with fastbuild enabled (listed in WG_adminBuild ) are able to build them just fine... written to database and all... but even admins can not build custom items unless they are on the fastbuild system.

 

Anyone know where I should start looking for the problem?

 

Cheers,

Bao

Link to comment
Share on other sites

Well... My eyes hurt and my brain is sore... but the problem is around line 616 in Pry's P4L / Snap_Pro / Instant Admin Build / Instant Admin Upgrade player_build.sqf

 

The line is currently _num_removed = ([player,_item] call BIS_fnc_invRemove);

and should be         _num_removed = ([player,_x] call BIS_fnc_invRemove);

The context is:

 

            if (!_isBuildAdmin) then {
                //diag_log "Is Admin REMOVE NOT OK";
                if (_typeIsString) then {
                    _tobe_removed_total = ([player,_item] call BIS_fnc_invRemove);
                    _removed_total = _tobe_removed_total;
                };
                if (!_typeIsString) then {
                    {
                        _removed = 0;
                        _itemIn = _x select 0;
                        _countIn = _x select 1;
                        // //diag_log format["Recipe Finish: %1 %2", _itemIn,_countIn];
                        _tobe_removed_total = _tobe_removed_total + _countIn;
            
                        {                    
                            if( (_removed < _countIn) && ((_x == _itemIn) || configName(inheritsFrom(configFile >> "cfgMagazines" >> _x)) == _itemIn)) then {
                            _num_removed = ([player,_x] call BIS_fnc_invRemove);
                                _removed = _removed + _num_removed;
                                _removed_total = _removed_total + _num_removed;
                                if(_num_removed == 1) then {
                                    _temp_removed_array set [count _temp_removed_array,_x];
                                };
                            };
                        } forEach magazines player;
                    } forEach _needBuildItem;
                };
            } else {

 

Sorry I don't know how to put in in a spoiler yet so I'm not posting the whole file.

 

Thanks for the work on the file BTW Pry. It had been making my head spin for days. I'm really glad someone was able to put it together and post it.

 

Now if I could just get the EvacChopper to publish to the database.  It doesn't seem to care that my CharacterID will hold a 24 digit number.

 

Cheers,

Bao

Link to comment
Share on other sites

 

 

Now if I could just get the EvacChopper to publish to the database.  It doesn't seem to care that my CharacterID will hold a 24 digit number.

 

Cheers,

Bao

 

For the evac chopper, the fact the DB can hold a long int does not help as the hiveext.dll is limited to getting only an int length value back :( .  It is hard coded in the dll.  Check out the comments on the issue report on the GitHub for more info.

 

That is the way I looked to go before choosing to use a whole different field to store the value.

 

Sorry, did see your PM and have been meaning to reply but have been crazy busy.

 

oh, and putting [sp0iler] [/sp0iler] around text puts it in the spoiler panel (change the 0 -> o in the example). 

Link to comment
Share on other sites

Alright not sure if this is a bug or what.

The Plot Poles work fine after death, but soon as a server restart happens players lose their poles is there anyway to fix this?

 

What do you mean "lose their poles' ?.  Do they vanish or are they not seen as the owner or something else ?.

 

It just me or is player_changeCombo.sqf missing from the rar in the OP.

 

It is not there as there is nothing to be changed in that file.  It does noting related ot object ownership so nothing needed to be changed.

Link to comment
Share on other sites

Arent you missing the building maint from here?

 

 

Also, i got everything working, but when the server restarts it all get deleted, do i need to do something in mysql?

if (!isDedicated) then {
fnc_usec_damageActions =        compile preprocessFileLineNumbers "Custom\fn_damageActions.sqf";
fnc_usec_selfActions =            compile preprocessFileLineNumbers "Custom\fn_selfActions.sqf";
player_packTent =            compile preprocessFileLineNumbers "Custom\player_packTent.sqf";
player_packVault =            compile preprocessFileLineNumbers "Custom\player_packVault.sqf";
player_unlockVault =            compile preprocessFileLineNumbers "Custom\player_unlockVault.sqf";
player_removeObject =            compile preprocessFileLineNumbers "Custom\remove.sqf";
player_lockVault =            compile preprocessFileLineNumbers "Custom\player_lockVault.sqf";
player_updateGui =            compile preprocessFileLineNumbers "Custom\player_updateGui.sqf";
player_tentPitch =            compile preprocessFileLineNumbers "Custom\tent_pitch.sqf";
player_vaultPitch =            compile preprocessFileLineNumbers "Custom\vault_pitch.sqf";
player_build =                compile preprocessFileLineNumbers "Custom\player_build.sqf";
};
Link to comment
Share on other sites

 

 

> vault_pitch.sqf

_tent setVariable ["CharacterID",_combination,true];
_object setVariable ["ownerPUID",_playerUID,true];
_tent setVariable ["OEMPos",_location,true];

mistake

> _object

 

and guide

Find:
_tent setVariable ["CharacterID",_combination,true];

and add directly under it:
_object setVariable ["ownerPUID",_playerUID,true];
Link to comment
Share on other sites

 

Arent you missing the building maint from here?

 

 

Also, i got everything working, but when the server restarts it all get deleted, do i need to do something in mysql?

if (!isDedicated) then {
fnc_usec_damageActions =        compile preprocessFileLineNumbers "Custom\fn_damageActions.sqf";
fnc_usec_selfActions =            compile preprocessFileLineNumbers "Custom\fn_selfActions.sqf";
player_packTent =            compile preprocessFileLineNumbers "Custom\player_packTent.sqf";
player_packVault =            compile preprocessFileLineNumbers "Custom\player_packVault.sqf";
player_unlockVault =            compile preprocessFileLineNumbers "Custom\player_unlockVault.sqf";
player_removeObject =            compile preprocessFileLineNumbers "Custom\remove.sqf";
player_lockVault =            compile preprocessFileLineNumbers "Custom\player_lockVault.sqf";
player_updateGui =            compile preprocessFileLineNumbers "Custom\player_updateGui.sqf";
player_tentPitch =            compile preprocessFileLineNumbers "Custom\tent_pitch.sqf";
player_vaultPitch =            compile preprocessFileLineNumbers "Custom\vault_pitch.sqf";
player_build =                compile preprocessFileLineNumbers "Custom\player_build.sqf";
};

 

Building Maint does not work based on owner of the objects so nothing needed changing.

 

 

 

 

> vault_pitch.sqf

_tent setVariable ["CharacterID",_combination,true];
_object setVariable ["ownerPUID",_playerUID,true];
_tent setVariable ["OEMPos",_location,true];

mistake

> _object

 

and guide

Find:
_tent setVariable ["CharacterID",_combination,true];

and add directly under it:
_object setVariable ["ownerPUID",_playerUID,true];

 

 

Thanks, have amended the code.  Will upload later today.

 

Only the owner of a safe get's the option to "Open Locked Safe"

No one else can get any options on a safe and the owner is never required to actually "Unlock Locked Safe"

 

Are you using 2.2.4 ?.  Is this happening to newly placed safes or old safes placed before you installed the mod ?.

 

If you are using 2.2.4 then you should not have a problem.  As default, the owner does not need to input the safe code.  This is how Epoch core has it but it never worked correctly as the ownership was overwritten by the safe code.  As we can now store the ownership and the safe code, it is working again.  Owners do not need to input the safe code to unlock.  This can be changed fairly easily if it is not the way you want it.

Link to comment
Share on other sites

Are you using 2.2.4 ?.  Is this happening to newly placed safes or old safes placed before you installed the mod ?.

 

If you are using 2.2.4 then you should not have a problem.  As default, the owner does not need to input the safe code.  This is how Epoch core has it but it never worked correctly as the ownership was overwritten by the safe code.  As we can now store the ownership and the safe code, it is working again.  Owners do not need to input the safe code to unlock.  This can be changed fairly easily if it is not the way you want it.

I've gotten passed the issue. If you go to here: 

Cen Fixed the issue. My next issue now is that if you place a plot pole and die, within the same restart, the script works fine. But if you've place a plot pole and the server restarts it looses the biding to your character and you need to place a new one, weather you've died or not. Although I assume it's something I probably fucked up on I just wonder if others have reported the issue or if you may have an idea of where my error could be. I have nothing in client or server RPT to help me

 

EDIT:

Figured it out, I forgot to add something in the servermonitor.sqf :D

Link to comment
Share on other sites

After you placed the plot pole, check the db.  make sure the worldspace field for the plot pole in the object_data table has your playerUID in it.  If not then you need to look for this line in the player_build.sqf and make sure it matches.

 

Look for 

PVDZE_obj_Publish

The line should read

PVDZE_obj_Publish = [dayz_characterID,_tmpbuilt,[_dir,_location,_playerUID],_classname];

I would suspect you are missing the playerUID part.

Link to comment
Share on other sites

After you placed the plot pole, check the db.  make sure the worldspace field for the plot pole in the object_data table has your playerUID in it.  If not then you need to look for this line in the player_build.sqf and make sure it matches.

 

Look for 

PVDZE_obj_Publish

The line should read

PVDZE_obj_Publish = [dayz_characterID,_tmpbuilt,[_dir,_location,_playerUID],_classname];

I would suspect you are missing the playerUID part.

Alright thanks for the help. But I found that I was missing this in my server monitor:

_object setVariable ["OwnerPUID", _ownerPUID, true];

Forgot to add it in with the other stuff above it

Link to comment
Share on other sites

Yep that will be pretty significant  ;) .  Glad you found it.

 

Vault_pitch.sqf updated on the github.  Link in the first post.  Will update the download zip file shortly.

 

People with v2.2.4 installed need only download the vault_pitch.sqf file and replace the one they have or take a look at post above for the one line fix.

Link to comment
Share on other sites

I have downloaded all of the latest files from your github and placed them into the right directories. I have gone back through all of my previous script installations to ensure there are no conflictions and this is fine. The problem I am having is that the line in my mission's init.sql file that executes the server monitor isn't locating it properly inside of my server file's "custom" folder. This is the RPT error I receive causing my server to error out when people join;

15:19:43 APlotForLife
15:19:43 Warning Message: Script custom\APlotForLifev2.2.1\server_monitor.sqf not found
15:19:43 "[_serverMonitor: <null>]"
15:19:43 Error in expression <
diag_log format["[_serverMonitor: %1]",_serverMonitor];
};

if (!isDedicated) t>
15:19:43   Error position: <_serverMonitor];
};

if (!isDedicated) t>
15:19:43   Error Undefined variable in expression: _servermonitor
15:19:43 File mpmissions\__cur_mp.Chernarus\init.sqf, line 97

This is the line inside of my missions init.sql file that is pointing to the server monitor.

	diag_log text "APlotForLife";
	_serverMonitor = 	[] execVM "custom\APlotForLifev2.2.1\server_monitor.sqf";
	diag_log format["[_serverMonitor: %1]",_serverMonitor];

All of this script is exactly as it you provide us with on the github, I didn't directly take your init file because mine was custom so I just replaced the server monitor directory with the lines above. How can i fix this?

 

Thanks.

Link to comment
Share on other sites

Im with Villayer so;

/vilayercodecustom/dayz_epoch/custom/APlotForLifev2.2.1/server_monitor.sqf

Inside of the Git download it was in the server folder so I presumed we uploaded the custom folder into the server file.

Link to comment
Share on other sites

If the "/vilayercodecustom/dayz_epoch" folder has the OAserver.exe in it then it should be fine but I am guessing there may be something with the Vilayer setup that is not 100% compatible.  Maybe others using this mod with Vilayer may be able to better advise.

 

Another option is to put the server_monitor.sqf in to your@DayZ_Epoch_Server/dayz_server.pbo and leave the path as it originally was. 

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
×
×
  • Create New...