This is just the first commit for the removel of all global set ObjectIDs and ObjectUIDs.
Also objects will no longer be send over the network. Only the netID will. The actual object can be resolved with the netID on the server.
This reverts all the last changes to server_playerSync and creates a new global variable for dayz_onBack. This should be the best way to save the gear correct and still get dayz_onBack if the player leaves the server. This change removes the constant sending of the whole player inventory over the network from force or regluar_save. It should no longer be needed since the server does the counting now.
If the weight system is active all weights of the items will be displayed on the trader infos.
Also update the trading files and replace switch with call and exitwith which is faster.
- 5 new backpacks
- 19 new textures for the Czech backpack
- 2 new textures for the coyote backpack
- reconfigured weapon count of all old backpacks
- 30 new backpack types included an upgraded version
This adds 5 new backpacks. 4 from the ice apo mod 1 from Arma 2 ACR.
This also adds many different skins for the Czech backpack thx @lennard91 and 2 new skins for the coyote backpack from the KSK Mod.
I’ve reconfigured the weapon count of the old backpacks. A weapon can be a pistol with 5 slots too. So, a Large Gunbag can hold 6 weapons or 12 pistols now. This is more intuitive as it was before. 6x10 = 60, 12x5=60 The backpack has still the same gear count as before. I removed the display info in the trader menu how many weapons a backpack can hold. This information is obsolete with this commit because a backpack with a gear count of 20 can hold 4 weapons now and it could be confusing for players if they consider only large weapons but no pistols.
We added 15 reconfigured backpack types with DZE1 as indicator. Those new backpack types have an upgraded version with DZE2 as indicator. The gear count, the names and descriptions of all new backpacks got changed.
This commit was made by @seelenapparat, @DeVloek, @airwavesman
Replaced vehicle sethit/setvariable method with sethit/gethit and removed setvariable "Hit_" commands for vehicles (hit_partname can now probably be added to the setvariable filters list).
Modified object_getHit.sqf return to now provide the selection name in order to reduce redundant config lookups. Returns '[Damage, Part Name]', instead of just 'Damage'
Modified vehicle_GetHitpoints.sqf to remove incorrect hipoints from returning. Previously this script would return all hitpoints from any vehicle the current vehicle config inherited from, even if the hitpoint didn't exist in the calling vehicle. this posed a problem since getHit on an invalid part name returns Nil
This reverts commit b8dba25
As discussed with oiad on Discord, this serves no purpose now, since
DZE_lockDoor == charID means the player either just unlocked, built,
upgraded or downgraded the door, so they want to see the action.
Logically a combo lock can be removed while a door is open. In case of
it being locked, you already know the code, so it is assumed you put it
in before removing it. Completing two-three steps at once is more
convenient for the player.
Also removed _isDestructable because there are no classes which inherit
from "BuiltItems" and have a lock
@oiad Add the Javelin magazine as trade_items to a trader which only
sells magazines (like FriendlyAssaultRifleAmmo) and the Javelin weapon
as trade_weapons to a trader which only sells weapons (like
FriendlyAssaultRifle), then test your changes from f8a230e with both in
your gear. You will see it allows you to sell all the magazines and the
weapon at both traders. This is because the only condition to add the
item to the sellable array is that it exists as an entry in the
category. It never checks the entry type. This commit will check to make
sure the type matches in the config and the player's inventory.
I changed your static "trade_any_vehicle" to find the type in the
config, because it could also be "trade_any_boat/bicycle/vehicle_free".
Boats are handled differently for the hitpoints check in sellItems.sqf.
Also I noticed that both the _HasKey check and your new _y == _myVehType
check were not working for upgraded vehicles _DZE[1-4] because they had
been swapped out to _baseVehicle. I forgot to account for that when I
added that feature.
This should resolve both problems. I tested both and everything looks
good. It can do with some more thorough testing though. Note
DZE_SaleRequiresKey is false by default.
Continuation of 8035df0
This is important to have on publish to identify cheaters who spam
create objects in the database or create objects with bad inventory.
- Renamed variables to backport to vanilla
- Removed % and & due to code filtering in publicvariableval.txt
Changes in modular_build.sqf were the same as player_build.sqf.
Tested with building, upgrading buildable/vehicle/tent, downgrading,
buying a vehicle, destroying tent and removing an object.
The previous fix 4fa36dfd94 was not working correctly, if you had say the a stinger launcher and a stinger ammo it would detect them both as weapons, this properly classifies them and all others as how they should be.
Moved to use epoch_tempKeys also
This forces the player to only be able to sell a vehicle from the gear menu instead of backpack and vehicle menu since most of the time you would be using add all.
From: https://epochmod.com/forum/topic/44413-prevent-selling-vehicles-from-backpack/?tab=comments#comment-297328
limits distance to object, as well as validating random auth key. added server_deleteObjDirect which is only for direct execution on the server, whereas server_deleteObj should be used for PVEH execution only
* Dont show you have the item if it's not nearby
This was showing you had a vehicle in the trader menu even if it was
over the other side of the map, I think this works better only showing
it if it's within the trader zone.
* Forgot missing operator
* Remove public variable event handler when using config traders.
This stops the public variable event handler from being loaded when
you're using config based traders, it's not needed in this situation
* Change nearestObjects to nearEntities in z_checkCloseVehicle.sqf
* Fixes vehicle selling not able to sell correctly
If more than 1 vehicle of the same classname was in a trader and the
local vehicle was further away it would not be able to be sold till
moved closer. We are using DZE_myVehicle for everything and we do
previous checks to make sure it's not null and local so we can assume it
is okay to use.
Fixes
https://epochmod.com/forum/topic/43643-vehicle-dze4-can-not-be-sell/#comment-290036
Fixes mistake from ffef031 @icomrade . _amount here is the quantity the
player enters in the quantity box when buying. The only time it is less
than or equal to zero is if the player enters zero or a negative number.
It has nothing to do with the buy or sell price.
Thanks Sercan for reporting.
Z_checkArrayInConfig is expecting weapons in position 0 for _this, all other stuff like get z_at_getGearItems.sqf and z_at_getVehicleItems.sqf passes the weapons array in position 0.
* server_updateObject force update for single currency
This modifies server_updateObject to force update/save to the hive if
the item being saved is in the DZE_MoneyStorageClasses array.
Previously if you force saved the object multiple times, the coins would
not get updated until the inventory changed, which if this was for a
bank object it would never update.
(This applies if you are using PVDZ_veh_Save to save the object)
* z_at_calcDefaultCurrencyNoImg prettyfication
This fixes a long standing issue in my brain about how this text was
always displayed, to me it seemed very untidy and just thrown together
(since I borrowed it from the IMG version)
Changes the output from this example: 7 Ruby 1 Amethyst 3 Gold 4 10oz
Silver 5 Silver
To this prettier and more logical example: 7 Ruby, 1 Amethyst, 3 Gold, 4
10oz Silver and 5 Silver
Make texts great again!
* z_at_logtrade fixes
Removes hard coded "Coins" text and replaces it with configVariables
version.
Also removes duplicate code and simplifies it.
* Merge z_calcDefaultCurrency and z_calcDefaultCurrencyNoImg
This merges these two files together since they are largely the same,
this also adds an optional argument to change the font size which is
useful for custom scripts that use this function.
Examples of use:
[_number,true] call z_calcCurrency; // Return a string of text with no
images
[_number,false] call z_calcCurrency; // Return a string of text with
images
[_number,false,0.7] call z_calcCurrency; // Return a string of text with
the currency in it and sets the font size to 0.7
* Localization changes/additions.
Fixes a few localizations, extends range for removing camo nets from
toolbox by 10m, I have found that 5m is just not enough.
* Toolbox change
Update camonet removal to 10m instead of 5m
* Safe zone no building near/blacklisted buildings no building near
Adds a check in dze_buildChecks to disallow building within a certain
distance of a safezone or a blacklisted object name.
* typo
fix typo
* Safezone/blacklisted changes
As per requests.
* Rework
Rework
* Remove unused variables
as per subject
* Misc changes
Fix unprivated var in calcfreespace
Made single currency buy/sell reporting more englishery
Localization cleanup of extra spaces
* rework
rework
* Advanced trading modifications, maintain_area modifications
This lot of changes brings forth the following:
Sets up a "default" set of compiles that are the minimum needed for
maintain_area.sqf and custom scripts to utilize the gem based currency
that @icomrade added.
maintain_area.sqf: This will now utilize the gem based currency system.
Removed the redundant Z_Vehicle and replaced it with the Epoch built in
DZE_myVehicle
z_at_buyItems: Code tidying and optimization
z_at_checkCloseVehicle: Tidied up the code since removing Z_Vehicle
allowed us to remove some now useless code.
z_at_getVehicleItems: Removed the nearestObjects check for your vehicle
since we now do z_checkCloseVehicle on Advanced trading start up.
* Advanced trading missed redundant variables
As per description
* Advanced trading rework
We don't need to check for close vehicle anymore now for backpack money
since we've made z_vehicle redundant.
* Revert "Advanced trading rework"
This reverts commit a589bd19b9.
* Advanced trading rework
We don't need to check for close vehicle anymore now for backpack money
since we've made z_vehicle redundant.
* Advanced trading rework
More rework
* Remove single currency add/remove coins functions
at request of @ebaydayz.
* Update z_at_buyItems.sqf
* Update z_at_buyItems.sqf
* Update z_at_canAfford.sqf
* Update z_at_fillBuyableList.sqf
All of this is already checked in z_checkCloseVehicle at startup. If Z_VehicleChanges between the time the menu is started and the buyable list is filled it's not a big deal, since it only affects the highlighted color.
* Update server_handleSafeGear.sqf
* Update snappoints.hpp
* Update z_at_buyItems.sqf
* Advanced trading fixes
Fixes a few issues and a dupe with advanced trading as well as some
localization of where a vehicle key is going.
Z_at_buyItems: Now adds localization for the key getting added to your
toolbelt, backpack and vehicle, this stops players thinking they didn't
get a key when infact it was added to their backpack/vehicle.
Z_at_canAfford.sqf: This fixes a dupe from a bad copy paste for whomever
wrote this script, it was using _backpackMoney in the
z_allowTakingMoneyFromVehicle part, changed to the proper variable
_vehicleMoney.
z_at_fillBuyableList.sqf: this fixes a bug where a vehicle would show
green even when it isn't local, just basically added more checking to
make sure the vehicle it's making green in the list is a) local, b)
alive and that the typeOf == _name.
z_at_logTrade.sqf: fixes some tidyness.
advancedTrading/init.sqf: adds a z_checkCloseVehicle call otherwise even
with Z_AllowTakingMoneyFromVehicle = true it will not get currency from
your vehicle until you clicked on the "Vehicle" tab.
dayz_server/server_tradeObject.sqf: More tidying as per the
z_at_logTrade and removes the useless Player:, as it is obvious a player
has bought something not an AI.
dayz_server/server_handleSafeGear.sqf: Makes the diag_log at the end
more human readable with GPS coordinates as well as the lock code for
the safe or the lockbox.
* advanced trading fixes. I hate you github
WHY U GET MISSED?? STUPID GITHUB.
* snappoints changes
Fixes the issue @SmokeyBR reported
https://github.com/EpochModTeam/DayZ-Epoch/issues/1766#issuecomment-253864795
Adds all floor types to snap list for all barriers so you can snap a
sandbag etc to a floor instead of manually lining it up