[Release] BaseBuilding 1.2 Improvements 0.1 (better and editable Keycode, permanent Owner)

Unfortunately this won't get us very far. It may solve the immediate issue of the deletion but it's being deleted as a cleanup since the tent is not getting assigned a correct UID. It is being given an ID of 0, which according to the above (and to my logs) cannot happen. So the tent will still not get sent to database. Commenting that line simply lets the game continue to try and publish the invalid ID.

Which leads to this log spam:

Code:
22:32:46 "DEBUG: Deleting object TentStorage with invalid ID at [6885.76,11463.1,0.000823975]"
22:32:46 "DEBUG: Deleting object TentStorage with invalid ID at [6885.76,11463.1,0.000823975]"
22:32:46 "DEBUG: Deleting object TentStorage with invalid ID at [6885.76,11463.1,0.000823975]"
22:33:00 "DEBUG: Deleting object TentStorage with invalid ID at [6885.76,11463.1,0.000823975]"
22:33:12 "DEBUG: Deleting object TentStorage with invalid ID at [6885.76,11463.1,0.000823975]"
22:33:15 Server: Object 3:155 not found (message 94)
22:33:15 "DEBUG: Deleting object TentStorage with invalid ID at [6885.76,11463.1,0.000823975]"
22:33:16 "DEBUG: Deleting object TentStorage with invalid ID at [6885.76,11463.1,0.000823975]"
22:33:17 Server: Object 3:157 not found (message 70)
22:33:17 "DEBUG: Deleting object TentStorage with invalid ID at [6885.76,11463.1,0.000823975]"
22:33:17 "DEBUG: Deleting object TentStorage with invalid ID at [6885.76,11463.1,0.000823975]"
22:33:17 "DEBUG: Deleting object TentStorage with invalid ID at [6885.76,11463.1,0.000823975]"
22:33:30 "DEBUG: Deleting object TentStorage with invalid ID at [6885.76,11463.1,0.000823975]"
22:33:42 "DEBUG: Deleting object TentStorage with invalid ID at [6885.76,11463.1,0.000823975]"
22:33:52 "DELETE: Deleted by UID: 0"

But hey I got good news :) I got a fix finally...


Reality users! If you are still having problems getting this add-on working...

Make 100% sure you have daimyo's original BB1.2 working on your server. Once you know that, follow the directions by Kikyou2, make the changes shown in this post and in my server_publishObject.

Bliss Users!
Same as Reality, but you need also need to follow La.usch.io's post on database tweaks...

Now...
Inside Player_Build.sqf, near the bottom...

Replace this:

Code:
// Send to database
_fuel = _code / 1000; //added to calculate valid fuel value for the database
_object setVariable ["characterID",dayz_playerUID,true];
dayzPublishObj = [dayz_playerUID,_object,[_dir,_location],_classname,_fuel,_code]; //added _code to pass to the publishObj function to prevent calculation errors
publicVariableServer "dayzPublishObj";
} else {cutText ["You need the EXACT amount of whatever you are trying to build without extras.", "PLAIN DOWN"];call _funcExitScript;};

With this:

Code:
    if ((typeOf _object) in allbuildables_class) then {            // Send to database if part of the buildlist array
 
    _fuel = _code / 1000; //added to calculate valid fuel value for the database
    _object setVariable ["characterID",dayz_playerUID,true];
 
        dayzPublishObj = [dayz_playerUID,_object,[_dir,_location],_classname,_fuel,_code]; //added _code to pass to the publishObj function to prevent calculation errors
            publicVariableServer "dayzPublishObj";
 
    } else {                                                    //Send to database if part of _allowedObjects
 
    _object setVariable ["characterID",dayz_characterID,true];
 
        dayzPublishObj = [dayz_characterID,_object,[_dir,_location],_classname];
            publicVariableServer "dayzPublishObj";
    };
 
} else {                                                    //Exits construction if you don't have the exact materials
 
    cutText ["You need the EXACT amount of whatever you are trying to build without extras.", "PLAIN DOWN"];
    call _funcExitScript;
};

ALSO! You need to edit your server_publishObject / server_objectPublish! However, because I can't account for what mod/map/changes you have made, use this as a guide:

server_publishObject / server_objectPublish

Merge at your discretion.


You should now have
  • Buildables and custom buildables saving to DB again (with Kikyou2's improvements!)
  • Tents saving to DB once again
  • Loot in tents updating/saving once again (make sure it is a newly placed tent after your changes to the database and with my final fixes, cannot guarantee old tents update properly)
Enjoy :D
Did everything like you said but somehow the tents still are not saving/updating after the server has been restarted.
Using the normal BB1.2 without any fixes is working fine.
 
I got tents and items in tent to save to DB but custom buildings still will not with the above instructions, anyone else with same issue?

Did everything like you said but somehow the tents still are not saving/updating after the server has been restarted.
Using the normal BB1.2 without any fixes is working fine.

Bliss or Reality? If Bliss I can't really confirm it works or provide support beyond pointing toward database tweaks like La.usch.io's post. I guess I should edit my post to reflect that.

@Matt2k When you say custom buildings, do you mean recipes you made or the standard base building recipes?

@Gweincalar Have you tried putting down a tent and see what the arma2oaserver.rpt says? Are your buildables saving correctly? Btw, if you are using vanilla DayZ, hell you can straight up replace it. I should probably clarify the server_publishObject.sqf but I'm really tired so it'll have to wait.

If you guys use Reality and really, really can't get it work even after attempting my fix, PM me the mission.pbo's and server.pbo's (or just the affected files if you have secrets you don't wanna share :( ) and I'll see what I can do with them tomorrow.
 
Nope, tried with my stock (except BB & kik improvements) PBO's. Still returning the same error. Reality Hive.

Database: [Error] Error 1452 (Cannot add or update a child row: a foreign key constraint fails (`user-1413`.`instance_deployable`, CONSTRAINT `instance_deployable_ibfk_2` FOREIGN KEY (`owner_id`) REFERENCES `survivor` (`id`))) in MySQLStmtExecute SQL: 'insert into `instance_deployable` (`unique_id`, `deployable_id`, `owner_id`, `instance_id`, `worldspace`, `inventory`, `Damage`,`Hitpoints`, `Fuel`, `created`) select ?, d.id, ?, ?, ?, ?, ?, ?, ?, CURRENT_TIMESTAMP from deployable d where d.class_name = ? VALUES(35289990440282, 89608966, 1, "[282.009,[3528.86,9904.4,0.024]]", "[]", 0, "[]", 1.2339999675750732, "Infostand_2_EP1")'
 
i dont know how its for other builds.

but i found another problem depending on what version of BLISS you use.

i tried the dayz server conrolcenter and there my patch for example not work!
then i updated the dlls and it works now there too!

update all your DLLs (hiveext mysql and so one) by using the DLLs from here https://github.com/thevisad/DayZ-Private-master

Cheers

L@usch
 
Bliss or Reality? If Bliss I can't really confirm it works or provide support beyond pointing toward database tweaks like La.usch.io's post. I guess I should edit my post to reflect that.

@Matt2k When you say custom buildings, do you mean recipes you made or the standard base building recipes?

@Gweincalar Have you tried putting down a tent and see what the arma2oaserver.rpt says? Are your buildables saving correctly? Btw, if you are using vanilla DayZ, hell you can straight up replace it. I should probably clarify the server_publishObject.sqf but I'm really tired so it'll have to wait.

If you guys use Reality and really, really can't get it work even after attempting my fix, PM me the mission.pbo's and server.pbo's (or just the affected files if you have secrets you don't wanna share :( ) and I'll see what I can do with them tomorrow.
I use the normal dayz on a reality server, just with a few plugins like self bloodbag and a tow/lift vehicles plugin. Also i replaced my server_publishObject.sqf with yours. If i use the normal BB1.2 everything works fine, tents are updating, objects are spawning correctly. If i attempt to use BB1.2 with the fixes the normal BB object that you can build spawn correct and also get saved/updated to the database, just the tents do not.

Also i had to make a change to my database, i had to remove the foreign key constraint for the owner_id of deployables because if you want to place a tent, it sends the characterID and not the playerID, what results in an error and the tent doesn't even get saved to the database.
 
Nope, tried with my stock (except BB & kik improvements) PBO's. Still returning the same error. Reality Hive.

Database: [Error] Error 1452 (Cannot add or update a child row: a foreign key constraint fails (`user-1413`.`instance_deployable`, CONSTRAINT `instance_deployable_ibfk_2` FOREIGN KEY (`owner_id`) REFERENCES `survivor` (`id`))) in MySQLStmtExecute SQL: 'insert into `instance_deployable` (`unique_id`, `deployable_id`, `owner_id`, `instance_id`, `worldspace`, `inventory`, `Damage`,`Hitpoints`, `Fuel`, `created`) select ?, d.id, ?, ?, ?, ?, ?, ?, ?, CURRENT_TIMESTAMP from deployable d where d.class_name = ? VALUES(35289990440282, 89608966, 1, "[282.009,[3528.86,9904.4,0.024]]", "[]", 0, "[]", 1.2339999675750732, "Infostand_2_EP1")'

Im having almost the exact same error, i used the above fix and my tents work, but i cant for the life of me get the basebuildings to save in my DB
 
Nope, tried with my stock (except BB & kik improvements) PBO's. Still returning the same error. Reality Hive.

Database: [Error] Error 1452 (Cannot add or update a child row: a foreign key constraint fails (`user-1413`.`instance_deployable`, CONSTRAINT `instance_deployable_ibfk_2` FOREIGN KEY (`owner_id`) REFERENCES `survivor` (`id`))) in MySQLStmtExecute SQL: 'insert into `instance_deployable` (`unique_id`, `deployable_id`, `owner_id`, `instance_id`, `worldspace`, `inventory`, `Damage`,`Hitpoints`, `Fuel`, `created`) select ?, d.id, ?, ?, ?, ?, ?, ?, ?, CURRENT_TIMESTAMP from deployable d where d.class_name = ? VALUES(35289990440282, 89608966, 1, "[282.009,[3528.86,9904.4,0.024]]", "[]", 0, "[]", 1.2339999675750732, "Infostand_2_EP1")'

You might have installed everything correctly, but your database is at fault. I fixed this early on by simply updating my schema. Beyond that idk how to help ya yet, as I'm still learning MySQL syntax.

@Gweincalar After deleting the key, is it saving properly? If not, add the keys as index entries I had a feeling some people might run into this issue.

In navicat, with Reality 0.39, the keys aren't foreign key's...they are indexes

Code:
idx1_instance_deployable    deployable_ id    Normal    BTREE
idx2_instance_deployable    owner_id          Normal    BTREE
idx3_instance_deployable    instance_id      Normal    BTREE
 
I fixed this early on by simply updating my schema. If you have Reality, try re-merging up to 0.39.

@Gweincalar After deleting the key, is it saving properly? I had a feeling some people might run into this issue.

Personaly im quite new to reality, how would i go about doing that?
 
I fixed this early on by simply updating my schema. If you have Reality, try re-merging up to 0.39.

@Gweincalar After deleting the key, is it saving properly? I had a feeling some people might run into this issue.
Well it's saving fine and you wont get the error that @Rossymond has because there's no key constraint. But sadly it's not Updating / removing the objects afterall. I belive the server can't work with "2" different types of owner IDs even if they point to the same owner. Currently i have the choice to wether use the vanilla BB1.2 where everything works, or no tents. I hope that there's a way to fix this problem.
 
Bliss or Reality? If Bliss I can't really confirm it works or provide support beyond pointing toward database tweaks like La.usch.io's post. I guess I should edit my post to reflect that.

@Matt2k When you say custom buildings, do you mean recipes you made or the standard base building recipes?

@Gweincalar Have you tried putting down a tent and see what the arma2oaserver.rpt says? Are your buildables saving correctly? Btw, if you are using vanilla DayZ, hell you can straight up replace it. I should probably clarify the server_publishObject.sqf but I'm really tired so it'll have to wait.

If you guys use Reality and really, really can't get it work even after attempting my fix, PM me the mission.pbo's and server.pbo's (or just the affected files if you have secrets you don't wanna share :( ) and I'll see what I can do with them tomorrow.


standard bb recipes
 
Well, there are always two types of owner ID's. You have the characterID which is limited to you current character (so if you die, you get a new ID, cause it's a new survivor) and the other is your Player UID. Kikyou2's changes utilize the Player UID so that your ownership remains persistent even if you die. With my changes, normal dayz buildables with build using characterID and BB items use playerUID.

However that is not a requirement. Both can use playerUID but there were other syntax issues with normal dayz items trying to use Kikyou2's publish statement. So I separated the two.

Well it's saving fine and you wont get the error that @Rossymond has because there's no key constraint. But sadly it's not Updating / removing the objects afterall. .

So brand new tents are saving initially for you...but then not writing in new items or getting removed from DB after packing? Deleting the key constraint could be why, because having no key might nullify things.

Do you have logs I can see?
 
Well, there are always two types of owner ID's. You have the characterID which is limited to you current character (so if you die, you get a new ID, cause it's a new survivor) and the other is your ...

The tents get updated until the server restarts. If you try to put items in after the restart the DB entry for the tent does not get updated. Everything works fine until the server restart, and i don't know why.

Here's the link for my arma2oaserver.rpt, if you need something else just pm me. Don't want to spam the thread with links
 
Gweincalar look down of your log

16:10:43 Error in expression <uel =_this select 4;
_code =_this select 5;
seems you have an error in your script
 
I am starting to get a little confused by all this now, with people having different success rates etc.

Currently my BB 1.2 works well, all bar the keycodes not working after restart. Which to be honest, is not really an issue for my lot.

With kik's improvements, everything seems to install fine. I then get the above database error. As for tent's I have no idea, did not try them.

I use phpmyadmin, as I just prefer it. If anyone could tell me how to update my schema, I would appreciate that.

I have also been trying to use a buildable item such as Gunrack1 as a storage box. But with no success yet in getting it to write to DB. This would then mean an end to tents, and just using a few types of box.

If anyone can come up with an explanation to update the DB Schema that would be great, if not i'll just carry on using the original version with keypads removed, as I've spent a lot of time on this now, and have lots of other things to finish off :)
 
i deleted my database and reinstalled it, making sure it went to 0.40, and it solved nothing sadly
 
The tents get updated until the server restarts. If you try to put items in after the restart the DB entry for the tent does not get updated. Everything works fine until the server restart, and i don't know why.

Here's the link for my arma2oaserver.rpt, if you need something else just pm me. Don't want to spam the thread with links

You did not make the correct changes to your server_publishObject...
Refer to this post

Gweincalar look down of your log

16:10:43 Error in expression <uel =_this select 4;
_code =_this select 5;
seems you have an error in your script


^^
 
Hello so I got base building 1.2 improvement script working but now I cannot take parts off cars anymore. Before adding the improvement my slavage script worked but now its showing option like cargo check, repair vehicle and salvage vehicle, but you get "cannot find files" errors when you click em. Any clues?
 
I cant get anything to work I do the 5 steps for epoch and just nothing happens you need scrap metal and u should scroll and get a build menu right? can anyone help me?
 
So are we writing this off as not working or for epoch only since so few have been able to make it work
 
I thought it was supposed to work better on epoch? since they have building in that mod but not by default im willing to pay for someone to get this to work on my server cause just isn't working for me as I dunno if I have to do more then just follow the 5 steps
 
Back
Top