There is no point in having two variables for the same purpose.
It is also pointless to keep an action count tally like r_action_count
was doing, since it is only ever checked for being 0 or 1. Any count
higher or lower than that is irrelevant.
I will make this change in vanilla too.
Avoids setVariable value restrictions for players with special
characters in their name.
Also avoids issues with storing non-ASCII characters from player names
in DB inventory field.
This changes a few functions that were being used to use the already
defined variables instead
Fixed a few string issues with Advanced trading and plot managment.
I wasn't aware modular_build had permanentPlot stuff in it so i've moved
the ownerPUID setting to inside the main PFL stuff. Saves having 2 if
statements.
Plot for Life and Plot Management work best together. They essentially
provide the same functionality. Both let you keep your plot after death
by using UID instead of CharacterID. Plot Management doesn't even have
an option to save characterID, so by default it is always keeping all
friends and the owner permanently until they are removed. The only major
difference between them is Plot For Life also adds permanent ownership
of built items on the plot, which is behavior most people expect. It
doesn't make sense to keep ownership of the plot after death but not the
other objects built on it. The other functionality it adds (take
ownership) can be toggled with a config variable.
It is rare that someone would want Plot For Life enabled, but Plot
Management disabled or vice versa. If they really want that they can
still do it manually, but consolidating them to a single config option
greatly simplifies things for everyone else.
I removed links to mod githubs because many changes have been made to
the 1.0.6 versions, so outdated information there will likely confuse
people. Authors are already credited in the README and change log.
In variables.sqf "DZ_storage_base" is now the parent class which
includes all tents and stashes. DZE_checkNearbyRadius variable is not
used (identical to DZE_PlotPole select 0).
The change in module_build will only fix items that d ono have an offset
set in the config.
BoundingBox can be a bit generous but the player should be able to work
with any overestimation in size.
DZE_RequiredItemsCheck returns bool, displays an error of all the tools
the player is missing to build the item.
DZE_BuildChecks returns array of bools, canBuild and if the item is a
plotPole. Also has the ability to check if the player has required
tools to build using DZE_RequiredItemsCheck.
The vanilla build script still needs to be modified to work over water
and allow players to place floating objects, but now uses plot checks.
It would be easiest to just modify the configs to use the epoch building
scripts instead.
fnc_getSetPos now accepts a position as the second element of the input
array. the object will be set to this position if it is used. This
change requires no code updates
Note: scripts with build and/or tool checks should be updated to use the
new functions
The hive call in server_publishObject is the same between vanilla and
Epoch. The only difference is vanilla uses the _inventory area for
owner, lock code, etc. variables where as modular Epoch items just store
an empty array there.
The object classname does not need to be sent in the PV because it can
be obtained on the server.
PVDZE_veh_Publish was not used.
It makes no sense to rename the identical DayZ PVs to have an E in their
name. I don't see any good reason it was done in the first place. All it
accomplishes is breaking script compatibility between the two mods and
requiring different publicvariable.txt filters. The only time it makes
sense is for custom Epoch variables that aren't used in vanilla.
All admins have to do to update custom scripts is swap the names
according to the change log.
Note I've submitted a pull request to replace PVDZ_veh_Save with
PVDZ_obj_Save in official too because they are duplicates.
@raymix in most of your helper functions you are using exitWith {}; in
the same way the main player_build uses it. The problem is exitWith
inside of a called function only exits that function, not the parent
script it was called from.
When a helper function exits the main script continues on with undefined
variables and other problems. The easiest solution was to just remove
these helper functions for now. I just directly substituted their code
back into the main modular_build file and removed the passes to and from
them.
We should consolidate player_build and modular_build into one file first
since they are about 80% identical. After that we need to integrate
plot4life. Dividing player_build up into smaller sub functions like this
can be left for last.
I tested this thoroughly and can confirm the undefined errors are fixed
now.