EpochModTeam / DayZ-Epoch

Experimental DayZ Mod for Arma 2
http://epochmodteam.github.io/DayZ-Epoch
226 stars 399 forks source link

Deployables not saving inventory #1729

Closed FARTBOXGAMING closed 8 years ago

FARTBOXGAMING commented 8 years ago

Some Back ground. Had an issue on my server where lockbox tent and safe inventory were not saving.

Updated my server to the latest server files and the lock box inventory saved to the data base with no problems.

started configing the C:\Epochserver\MPMissions\DayZ_Epoch_11.Chernarus\init.sqf to the way I wanted it. Now the lock boxes are no longer saving to the data base. The hiveext.log shows this.

2016-08-10 21:55:41 HiveExt: [Information] Method: 309 Params: 6325720692360:[[[],[]],[[ItemBandage],[1]],[[],[]]]:
2016-08-10 21:55:41 HiveExt: [Error] Error executing |CHILD:309:6325720692360:[[[],[]],[["ItemBandage"],[1]],[[],[]]]:|

Sorry about this next bit I could not see away of doing "spoiler to stop people having to scroll

This is my init.sqf (I think maybe I just have to many vehicles?) Ill have a play slowly changing things back to default and see how I get on.. if anybody knows the issue or it needs a fix let me know.

/*  
    For DayZ Epoch
    Addons Credits: Jetski Yanahui by Kol9yN, Zakat, Gerasimow9, YuraPetrov, zGuba, A.Karagod, IceBreakr, Sahbazz
*/

//Server settings
dayZ_instance = 11; //Instance ID of this server
dayZ_serverName = "ERD NZ"; //Shown to all players in the bottom left of the screen (country code + server number)

//Game settings
dayz_antihack = 1; // DayZ Antihack / 1 = enabled // 0 = disabled
dayz_antiWallHack = 1; //DayZ AntiWallhack / 1 = enabled // 0 = disabled, Adds items to the map to plug holes.
dayz_REsec = 1; // DayZ RE Security / 1 = enabled // 0 = disabled
dayz_enableRules = true; //Enables a nice little news/rules feed on player login (make sure to keep the lists quick).
dayz_quickSwitch = true; //Turns on forced animation for weapon switch. (hotkeys 1,2,3) False = enable animations, True = disable animations
dayz_POIs = true;
dayz_infectiousWaterholes = true;
dayz_ForcefullmoonNights = true; // Forces night time to be full moon.

//DayZMod presets
dayz_presets = "Custom"; //"Custom","Classic","Vanilla","Elite"

//Only need to edit if you are running a custom server.
if (dayz_presets == "Custom") then {
    dayz_enableGhosting = false; //Enable disable the ghosting system.
    dayz_ghostTimer = 60; //Sets how long in seconds a player must be disconnected before being able to login again.
    dayz_spawnselection = 1; //(Chernarus only) Turn on spawn selection 0 = random only spawns, 1 = spawn choice based on limits
    dayz_spawncarepkgs_clutterCutter = 2; //0 = loot hidden in grass, 1 = loot lifted, 2 = no grass
    dayz_spawnCrashSite_clutterCutter = 2;  // heli crash options 0 = loot hidden in grass, 1 = loot lifted, 2 = no grass
    dayz_spawnInfectedSite_clutterCutter = 2; // infected base spawn 0 = loot hidden in grass, 1 = loot lifted, 2 = no grass 
    dayz_bleedingeffect = 3; //1 = blood on the ground, 2 = partical effect, 3 = both
    dayz_OpenTarget_TimerTicks = 60 * 10; //how long can a player be freely attacked for after attacking someone unprovoked
    dayz_nutritionValuesSystem = true; //Enables nutrition system
    dayz_classicBloodBagSystem = true; // disable blood types system and use the single classic ItemBloodbag
};

//Temp settings
dayz_DamageMultiplier = 2; //1 - 0 = Disabled, anything over 1 will multiply damage. Damage Multiplier for Zombies.
dayz_maxGlobalZeds = 500; //Limit the total zeds server wide.
dayz_temperature_override = true; // Set to true to disable all temperature changes.

enableRadio true;
enableSentences true;

// EPOCH CONFIG VARIABLES START //
#include "\z\addons\dayz_code\configVariables.sqf" // Don't remove this line
// See the above file for a full list including descriptions and default values
// Uncomment the lines below to change the default loadout
DefaultMagazines = ["ItemBandage","ItemBandage","ItemMorphine","ItemPainkiller","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","ItemBriefcase100oz","15Rnd_9x19_M9SD"];
DefaultWeapons = ["M9SD","ItemFlashlight","ItemHatchet","ItemMap","ItemFishingPole","ItemCompass","ItemKnife","ItemToolbox"];
DefaultBackpack = "DZ_Assault_Pack_EP1";
//DefaultBackpackItems = []; // Can include both weapons and magazines i.e. ["PDW_DZ","30Rnd_9x19_UZI"];
dayz_MapArea = 14000; // Distance from center of map to out of bounds line
dayz_paraSpawn = false; // Halo spawn
DZE_BackpackAntiTheft = true; // Prevent stealing from backpacks in trader zones
DZE_BuildOnRoads = false; // Allow building on roads
DZE_ConfigTrader = true; // Use config files for traders instead of database. Loads faster and uses less network traffic
DZE_MissionLootTable = false; // Use custom CfgLoot defined in mission file
DZE_PlayerZed = true; // Enable spawning as a player zombie when players die with infected status
DZE_R3F_WEIGHT = true; // Enable R3F weight. Players carrying too much will be overburdened and forced to move slowly.
DZE_slowZombies = false; // Force zombies to always walk
DZE_StaticConstructionCount = 0; // Steps required to build. If greater than 0 this applies to all objects.
DZE_GodModeBase = false; // Make player built base objects indestructible
DZE_requireplot = 1; // Require a plot pole to build  0 = Off, 1 = On
DZE_PlotPole = [30,45]; // Radius owned by plot pole [Regular objects,Other plotpoles]. Difference between them is the minimum buffer between bases.
DZE_BuildingLimit = 150; // Max number of built objects allowed in DZE_PlotPole radius
DZE_SelfTransfuse = true; // Allow players to bloodbag themselves
DZE_selfTransfuse_Values = [12000,15,120]; // [blood amount given, infection chance %, cooldown in seconds]
MaxDynamicDebris = 1; // Max number of random road blocks to spawn around the map
MaxVehicleLimit = 1000; // Max number of random vehicles to spawn around the map
spawnArea = 1400; // Distance around markers to find a safe spawn position
spawnShoremode = 0; // Random spawn locations  1 = on shores, 0 = inland
EpochUseEvents = false; //Enable event scheduler. Define custom scripts in dayz_server\modules to run on a schedule.
EpochEvents = [["any","any","any","any",30,"crash_spawner"],["any","any","any","any",0,"crash_spawner"],["any","any","any","any",15,"supply_drop"]];
// EPOCH CONFIG VARIABLES END //

// DO NOT EDIT BELOW HERE //
MISSION_ROOT=toArray __FILE__;MISSION_ROOT resize(count MISSION_ROOT-8);MISSION_ROOT=toString MISSION_ROOT;
diag_log 'dayz_preloadFinished reset';
dayz_preloadFinished=nil;
onPreloadStarted "diag_log [diag_tickTime,'onPreloadStarted']; dayz_preloadFinished = false;";
onPreloadFinished "diag_log [diag_tickTime,'onPreloadFinished']; if (!isNil 'init_keyboard') then {[] spawn init_keyboard;}; dayz_preloadFinished = true;";
with uiNameSpace do {RscDMSLoad=nil;}; // autologon at next logon

if (!isDedicated) then {
    enableSaving [false, false];
    startLoadingScreen ["","RscDisplayLoadCustom"];
    progressLoadingScreen 0;
    dayz_loadScreenMsg = localize 'str_login_missionFile';
    progress_monitor = [] execVM "\z\addons\dayz_code\system\progress_monitor.sqf";
    0 cutText ['','BLACK',0];
    0 fadeSound 0;
    0 fadeMusic 0;
};

initialized = false;
call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\variables.sqf";
progressLoadingScreen 0.05;
call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\publicEH.sqf";
progressLoadingScreen 0.1;
call compile preprocessFileLineNumbers "\z\addons\dayz_code\medical\setup_functions_med.sqf";
progressLoadingScreen 0.15;
call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\compiles.sqf";
progressLoadingScreen 0.2;
call compile preprocessFileLineNumbers "\z\addons\dayz_code\system\BIS_Effects\init.sqf";
progressLoadingScreen 0.25;
call compile preprocessFileLineNumbers "server_traders.sqf";
call compile preprocessFileLineNumbers "\z\addons\dayz_code\system\mission\chernarus11.sqf"; //Add trader city objects locally on each machine early
initialized = true;

setTerrainGrid 25;
if (dayz_REsec == 1) then {call compile preprocessFileLineNumbers "\z\addons\dayz_code\system\REsec.sqf";};
execVM "\z\addons\dayz_code\system\DynamicWeatherEffects.sqf";

if (isServer) then {
    call compile preprocessFileLineNumbers "\z\addons\dayz_server\system\dynamic_vehicle.sqf";
    execVM "\z\addons\dayz_server\traders\chernarus11.sqf"; //Add trader agents
    execVM "\z\addons\dayz_server\system\server_monitor.sqf";
    if (dayz_infectiousWaterholes && (toLower worldName == "chernarus")) then {execVM "\z\addons\dayz_code\system\mission\chernarus\infectiousWaterholes\init.sqf";};
};

//Must be global spawned, so players don't fall through buildings (might be best to spilt these to important, not important)
if (dayz_POIs && (toLower worldName == "chernarus")) then { execVM "\z\addons\dayz_code\system\mission\chernarus\poi\init.sqf"; };
// Lootable objects from CfgTownGeneratorDefault.hpp
if (dayz_townGenerator) then { execVM "\z\addons\dayz_code\system\mission\chernarus\LegacyTownGenerator\MainLootableObjects.sqf"; };

if (!isDedicated) then {
    if (dayz_antiWallHack != 0) then {
        //Enables Map Plug items
        execVM "\z\addons\dayz_code\system\mission\chernarus\security\init.sqf";
        //Enables Plant lib fixes
        call compile preprocessFileLineNumbers "\z\addons\dayz_code\system\antihack.sqf";
    };

    if (toLower(worldName) == "chernarus") then {
        diag_log "WARNING: Clearing annoying benches from Chernarus";
        ([4654,9595,0] nearestObject 145259) setDamage 1;
        ([4654,9595,0] nearestObject 145260) setDamage 1;
    };

    if (dayz_enableRules) then { execVM "rules.sqf"; };
    if (!isNil "dayZ_serverName") then { execVM "\z\addons\dayz_code\system\watermark.sqf"; };
    execVM "\z\addons\dayz_code\compile\client_plantSpawner.sqf";
    execFSM "\z\addons\dayz_code\system\player_monitor.fsm";
    //[false,12] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf";
    if (DZE_R3F_WEIGHT) then {execVM "\z\addons\dayz_code\external\R3F_Realism\R3F_Realism_Init.sqf";};
    waitUntil {scriptDone progress_monitor};
    cutText ["","BLACK IN", 3];
    3 fadeSound 1;
    3 fadeMusic 1;
    endLoadingScreen;
};

Thanks in advance

FARTBOXGAMING commented 8 years ago

Further to my testing... I restored the default init.sqf but the problem still remained. So i shut the server down and removed all object_data entries. started the server backup and the items in the lock box now save to the database.

I think maybe to many entries in the object_data table is causing issues with deploy-able inventory saving. please let me know if you would like further testing... I dont want to put my server live until this is sorted.

oiad commented 8 years ago

Are you sure you are using the current HiveExt.dll ? It's changed a few times recently.

nigeyuk commented 8 years ago

I am seeing this issue with Tents on Panthera, items added do not save after a restart.

2016-08-09 22:04:22 HiveExt: [Error] Error executing |CHILD:309:84520645901171:[[["FNFAL_DZ","G36A_Camo_DZ","BAF_LRR_scoped","M240_DZ","M4A1_DZ","PDW_DZ"],[1,1,1,1,1,1]],[["30Rnd_556x45_Stanag","8Rnd_B_Saiga12_74Slug","8Rnd_9x18_Makarov","30Rnd_762x39_AK47","Attachment_Sup9","48Rnd_40mm_MK19","100Rnd_762x51_M240","64Rnd_9x19_SD_Bizon","10Rnd_303British","8Rnd_12Gauge_Buck","20Rnd_762x51_SB_SCAR"],[2,1,1,1,1,1,1,2,1,1,1]],[[],[]]]:|
2016-08-09 22:04:22 HiveExt: [Error] Error executing |CHILD:309:84520645901171:[[["FNFAL_DZ","G36A_Camo_DZ","BAF_LRR_scoped","M240_DZ","M4A1_DZ","PDW_DZ"],[1,1,1,1,1,1]],[["30Rnd_556x45_Stanag","8Rnd_B_Saiga12_74Slug","8Rnd_9x18_Makarov","30Rnd_762x39_AK47","Attachment_Sup9","48Rnd_40mm_MK19","100Rnd_762x51_M240","64Rnd_9x19_SD_Bizon","10Rnd_303British","8Rnd_12Gauge_Buck","20Rnd_762x51_SB_SCAR"],[2,1,1,1,1,1,1,2,1,1,1]],[[],[]]]:|
icomrade commented 8 years ago

Update the HiveDLL, server pbo, client addons from the test build zip, and run the SQL added in this commit for the file (Server Files/SQL/1.0.6_Updates.sql) https://github.com/EpochModTeam/DayZ-Epoch/commit/b10e73b1b82ed817f6074e9d238a406e035cb041 on your DB. Tents and storage items are saving properly for me.

11:47:57 HiveExt(0): [Information] Method: 309 Params: 1156901130100240:[[[G36A_Camo_DZ,ItemGPS,ItemHatchet,ItemMatchbox],[1,1,1,1]],[[5Rnd_86x70_L115A1,ItemTent,350Rnd_BB_Magazine,PartWoodPile,5Rnd_762x51_M24,30Rnd_556x45_StanagSD,30Rnd_556x45_Stanag],[1,1,2,3,2,2,1]],[[],[]]]:
11:47:57 HiveExt(0): [Information] Result: ["PASS"]
FARTBOXGAMING commented 8 years ago

Hi thanks for reply

I downloaded the latest files last night and rebuilt the server from scratch.

saves worked fine at first. I then adjusted my init as above. Things stopped saving. Replaced the init with a copy of the orginal. Still not saving. So I removed all entry from the objecy_data table. Let the cars etc generate and then tested the saving to lock boxes and it worked again.

FARTBOXGAMING commented 8 years ago

Maybe sombody else could test setting the max vehicles in their init to 1000 boot their server up and test saving to lock boxes and check their hive . That's the only thing I can see that's causing it. FYI this is a dedicated box running Windows 7 pro., 4gb of ram with a 2.4ghz Xeon G5 hp all running on bn esxi

FARTBOXGAMING commented 8 years ago

Ahh ok, makes sense,

I'll test tonight. And report back.

To be honest did not have a good look at the rpt after the rebuild. Prior to rebuilding I could not see anything to relations f to this I. The rpt.

If it fixes and you don't have time to fix the issue perhaps make a comment In the init file to adjust the file in the dayz_server pbo so scrubs like me know to do it .

Standby I will test tonight after work in around 8 hours.

icomrade commented 8 years ago

Try with https://github.com/EpochModTeam/DayZ-Epoch/commit/a885c8c147f0451cbc56deb98e831ffdc06df35c I don't have any issues saving storage items with this commit.

icomrade commented 8 years ago

Updates on this?

FARTBOXGAMING commented 8 years ago

Had all sorts of problems after Changing the suggested file.

Did not want to copy in details of my issues until I had completed testing.

The outline of the issue is after making the change, When I place lockbox when I first look at the lock box I get open lockbox but nothing happens if I look at it again no scroll or green text.

What I. Noticed in the object_data was the number of vehicles when set to 1000 would not generate on the first start of the server. On first start I got about 450 vehicles. If I stop and start the server it slowly climbed so Next time I start they're were say 600. If I kept restarting the server I would get more generated but less and less each time. In the end it peaked out at about 960.

I spent several hours testing restart of the server to try to generate all of the vehicles and test if this was the problem with the lock box. However ran out of time and had to go to bed

However it did notice that there was no error I. The hive log for the lock box . Down side there was no entry for it at all. I'm guessing all the vehicle entries was killing the data base etc. I'll try again tonight with fresh database and standard amount of vehicles 300 see if I get same issue and report back

icomrade commented 8 years ago

Set my server to 1500, didn't notice any issues. Although the vehicles aren't spawned all immediately at startup, they took about 5 minutes to spawn to completion (you can see a log output with the execution duration in the server's RPT). It's possible your server's performance could be dropped so low by spawning all of the vehicles that other commands aren't processed right away.

FARTBOXGAMING commented 8 years ago

Thanks... you fix seems to of corrected my issue for lock boxes not saving items because of to many cars...

as for the other issues experienced getting to this point they were me screwing up server files I think. Long story short commit https://github.com/EpochModTeam/DayZ-Epoch/commit/a885c8c147f0451cbc56deb98e831ffdc06df35c fixed my initial problem.. cheers. I will continue to config my server and post any other bugs I find.

Regards

FARTBOXGAMING commented 8 years ago

So this issue came back..

What I noticed is when I first put down a lock box the ObjectUID in the data base was set to this 39680289074129 when putting gear into it I get this error in the Hive Log [Error] Error executing |CHILD:309:39680289074129

After I reboot the server the OjectUID changes to this 593 which is +1 of its ObjectID Now the reboot has changed these values I do not get an error in the Hive log and things save as normal.

Icomrade can you confirm on the test server if somebody puts down a lockbox that the OBJECTUID is the same after restart? and that stuff saves to the lock box before the first restart?

thanks.

oiad commented 8 years ago

Object IDS did change for me on restart for a lockbox and a safe and contents was unaltered on restart.

I did not get any hive errors.

I would suggest for you to wipe your database and do a fresh database install from the 106.sql and use the LATEST hiveext.dll.

icomrade commented 8 years ago

the objectUID will always be different on the next restart, it makes no difference unless there's a collision and on restart any collisions will be resolved. are you running any mods?

FARTBOXGAMING commented 8 years ago

I am running a couple of mods. However this was an issue from Post rebuilding the server from scratch without mods. I think I thought the issue was resolved prior to putting the mods on as I was testing on lock boxes that had already passed over a restart.

thinking everything was all working I proceeded with a couple of mods

If I had of known that this was still an issue I would never of put the mods on to help with diagnostics.

If you are saying its working on your server, I guess I will give up on this until you get the official server files released for the public use. I can not say that its an issue with any of the code in this git hub listing because I am running MOds and can not prove that it happened before adding them.

However I did experience the issue prior to adding any mods.

cheers for your help anyway

icomrade commented 8 years ago

Test again with the changes from https://github.com/EpochModTeam/DayZ-Epoch/commit/e8cd89a194a7764a2e053a3f08dd995726e2a2f4 and download the dayz_server.pbo that was updated today and client package that was updated yesterday. you will need to update both your client and server instances, any players playing on your server will need to update their client installation as well. you also need to re-update any custom code in your mission, I see you are using a custom compiles.sqf that has definitely been changed since this issue was opened. You also have multiple script errors in your mission (please use the startup parameter -showScriptErrors and regularly check your server's .RPT file for any errors.

FARTBOXGAMING commented 8 years ago

Thank you, I really didn't expect support as I had mods that I know are impossible to know the effects of others coding and scripts,

I'm not going to have time to look at this until next weekend.

Regards