[FIX] Tent Saving Issues for 1.8 - Problem

What map are you running because that doesn't look like the 1.8 code.

Without knowing the map, I can't test this so if you use it, make a backup first to be safe.

Try this, find
Code:
        if (_damage < 1) then {
            //diag_log format["OBJ: %1 - %2", _idKey,_type];
         
            //Create it
            _object = createVehicle [_type, _pos, [], 0, "CAN_COLLIDE"];
            _object setVariable ["lastUpdate",time];
            _object setVariable ["ObjectID", _idKey, true];

And replace it with
Code:
if (_damage < 1) then {
        diag_log("Spawned: " + str(_idKey) + " " + _type);
   
        _object = createVehicle [_type, _pos, [], 0, "CAN_COLLIDE"];
        _object setVariable ["lastUpdate",time];
        // Don't set objects for deployables to ensure proper inventory updates
        if (_ownerID == "0") then {
            _object setVariable ["ObjectID", str(_idKey), true];
        } else {
            _object setVariable ["ObjectUID", _worldspace call dayz_objectUID2, true];
        };

Let me know how you get on, but if it doesn't work you need to tell me what mod/map you're running.
 
firstly it would not work, so I asked for help then it start working before I do anything ?

Sorry to have bothered you but thanks.
 
What map are you running? I'm curious because the variables I've used aren't defined in your file so they may set off RPT errors or cause problems for you if you're using it with the wrong files.
 
I applied this to my server 2-3 days ago, tents are still not saving contents. I did however notice that it does not have anything to do with server restarts (as i thought prior). DayZ 1.8
 
I applied this to my server 2-3 days ago, tents are still not saving contents. I did however notice that it does not have anything to do with server restarts (as i thought prior). DayZ 1.8

Hmmm strange, if it's not to do with server restarts then it implies it's not issuing the correct publish command. If you send your mission and server pbos I will take a look at them when I get a chance.

This fix is only for the problem with them after a restart since it alters how the game reads them from the DB on startup to stop it turning them into static entities that don't get updated.
 
I sent you my PBOs earlier :) for help with loot tables. These issues are present with 0% customization on 1.8. Meaning that it is an issue with reality+dayzcode1.8.

I was watching the instance_deployable table in my database, saw a new entry which was a tent with no inventory. I asked the owner if he recently placed a tent and if there was any gear in it, he said yes it was nearly full, he also said he saved it a couple times. The only reason people(including me) blame server restarts is because that is when the server is supposed to repopulate the tent with its contents, BUT there is no contents since nothing was actually ever saved to the database.

Some of the tents in my database have inventories, so this does not seem to be all tents. Also the same thing goes for the vehicles not saving, or reverting back to their starting positions. Perhaps these two issues are the same/similar.
 
I found it to be something in the compile.sqf file, I have a seperate compile.sqf file for my stuff and it is working. Haven't got a clue what it does mind but it works

Code:
progressLoadingScreen 0.4;
call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\compiles.sqf";                    //Compile regular functions
progressLoadingScreen 0.5;
call compile preprocessFileLineNumbers "server_traders.sqf";                                    //Compile trader configs
call compile preprocessFileLineNumbers "dayz_code\compiles.sqf";                                 //Compile custom compiles
progressLoadingScreen 1.0;
 
I sent you my PBOs earlier :) for help with loot tables. These issues are present with 0% customization on 1.8. Meaning that it is an issue with reality+dayzcode1.8.

I was watching the instance_deployable table in my database, saw a new entry which was a tent with no inventory. I asked the owner if he recently placed a tent and if there was any gear in it, he said yes it was nearly full, he also said he saved it a couple times. The only reason people(including me) blame server restarts is because that is when the server is supposed to repopulate the tent with its contents, BUT there is no contents since nothing was actually ever saved to the database.

Some of the tents in my database have inventories, so this does not seem to be all tents. Also the same thing goes for the vehicles not saving, or reverting back to their starting positions. Perhaps these two issues are the same/similar.

Ah right, I'll go hunting for that post then.
Probably wont have time to look at it today though, will see how I am for time, got problems on my own server too haha.

I use reality and with the base 1.8 files tents deployed and updated fine, until the restart, that's where the problem with reality lies. The fact that your issue is not that, means this is a different issue entirely, I'll have to do some digging.

It's possible your DB is corrupted. Though I wouldn't do anything to it until I can confirm if it's working on my end. When you say some tents work, are they different types of tent at all? Like camping tent vs dome tent?
 
I did not check to see if they are dome/old. I will do that now.

When you said "...tents deployed and updated fine, until the restart, that's where...."
Do you mean that once you place items in the tent, you can see them in the instance_deployable inventory ?
 
Yeah, when I place a tent it shows in instance_deployable (with empty inventory obviously), then I add an item and it updates in the DB. Then I restart server, check DB and it's still there. Then I take item out, and this time it doesn't remove the item from the DB.
That's what this fix is for.

What you're describing isn't quite the same. It sounds almost like it's publishing it to the DB wrong, but then if that were the case it would be all tents, not just some of them.
 
Ahh shit, yea completely different issues, you are dealing with a duping issue, i'm just stealing people's shit.
 
Ahh shit, yea completely different issues, you are dealing with a duping issue, i'm just stealing people's shit.
Indeed. I'll still take a look at your files as soon as I can though and at the very least it will show whether or not it's caused by your database. If it works fine on my end then it's your DB, if it doesn't work on my end then it's code related.
I'll let you know.
 
Yea, unfortunately i cannot seem to reproduce this issue on my localhost test server. So I think it is something wrong with the database. It is nearly 4AM in Australia(my server is in AU) so i am just going to backup the DB and try a fresh roll-out. I will be only restoring the survivor/profile tables to prevent carrying this issue over to the new DB. If you try to reproduce my issues I am sure you will have as much luck as i have on my test server. I appreciate the help you have given me and the rest of the community.
 
Yea, unfortunately i cannot seem to reproduce this issue on my localhost test server. So I think it is something wrong with the database. It is nearly 4AM in Australia(my server is in AU) so i am just going to backup the DB and try a fresh roll-out. I will be only restoring the survivor/profile tables to prevent carrying this issue over to the new DB. If you try to reproduce my issues I am sure you will have as much luck as i have on my test server. I appreciate the help you have given me and the rest of the community.

Let me know how you get on. I had to nip out for a bit so still haven't had a chance to check your files out.
 
Well it seems to be fixed. This is what I did:

When 1.8 was released i wiped my server migrated realitymain, then(like a dumbass) executed the SQL files released by dayzmod.com. This added some extra tables to the database(for official hive) even though these tables were not being used, i think some other aspects of the SQL files were impacting the database in a negative way. So what i did was backed up the Survivor/Profile tables, deleted the database, made a new database with the same name, restored the survivor/profile tables.

Now, after doing this i placed a tent ingame and it would not publish the gear to the DB. So i reverted server/mission PBOs back to completely fresh. I added each script that my server runs one by one, testing the tent saving each time. I added each script back, and tents save. Comparing my old PBOs to my new PBOs, there is not one difference......

Sooo... all i can think is that the database dickery that i did actually fixed the issue. I just do not understand what the issue could have been(other than DB).

I am tired as hell, so i have not looked at this time.... But didn't 1.8 add dome tents? How does a player spawn a dome tent? When you "build tent" is there a chance its a dome tent? whats the deal? Reason i ask, is even after all this work, if I place a tent and put an item in it, it shows up in the database.... almost all the time...... Still after all this work, sometimes the tent will still not publish items. So i was thinking maybe there is some sort of random chance to spawn a dome tent, and maybe this feature is broken, and wrecking the inventory publishing.

Let me know what you think...
 
Definitely sounds like it was the DB then. I had a similar issue a little while back with Oring where it wasn't saving vehicle positions or inventory changes and wiping the DB was the only way I could get it working again. Though that was in my first few days of hosting so it was probably some dumb mistake I made haha.

As for dome tents, I'm really not sure. One guy had said that they are a separate loot item you can find to place, but I can't see them in the loot tables anywhere so I really don't know.
 
Well I had a quick play with your files today and I couldn't replicate the problem on my end either, so sadly that's a sure fire sign that it was definitely your DB.
 
Back
Top