js2k6 Posted November 2, 2014 Report Share Posted November 2, 2014 just added this to my dev server, copied all the items in object_data from one of my live servers. everything looks perfect using p4l, snap-pro (with a custom player_build.sqf... and extra build items) loving your work. thanks! Link to comment Share on other sites More sharing options...
KostiCZ Posted November 2, 2014 Report Share Posted November 2, 2014 Does anybody try to apply this principle also to vehicles? Maybe it can prevent cars and helis jumping on wooden/metal floors after player leave them? Link to comment Share on other sites More sharing options...
Mikeeeyy Posted November 2, 2014 Author Report Share Posted November 2, 2014 Does anybody try to apply this principle also to vehicles? Maybe it can prevent cars and helis jumping on wooden/metal floors after player leave them? Hmmm.. that's a very good suggestion. I'll have a look into it. Link to comment Share on other sites More sharing options...
Mikeeeyy Posted November 2, 2014 Author Report Share Posted November 2, 2014 just added this to my dev server, copied all the items in object_data from one of my live servers. everything looks perfect using p4l, snap-pro (with a custom player_build.sqf... and extra build items) loving your work. thanks! Glad you like it bud ;) Link to comment Share on other sites More sharing options...
Mikeeeyy Posted November 2, 2014 Author Report Share Posted November 2, 2014 Version 1.0.4 Added support for vehicles, vehicles now save exactly where they were along with their direction. Open up 'server_updateObject.sqf' located in the compile folder. (dayz_server\compile\server_updateObject.sqf) Find: _object_position = { private["_position","_worldspace","_fuel","_key"]; _position = getPosATL _object; _worldspace = [ round(direction _object), _position ]; _fuel = 0; if (_object isKindOf "AllVehicles") then { _fuel = fuel _object; }; _key = format["CHILD:305:%1:%2:%3:",_objectID,_worldspace,_fuel]; //diag_log ("HIVE: WRITE: "+ str(_key)); _key call server_hiveWrite; }; And replace it with: _object_position = { private["_position","_worldspace","_fuel","_key"]; _position = getPosATL _object; _worldspace = [ (getDir _object) call KK_fnc_floatToString, _position call KK_fnc_positionToString ]; _fuel = 0; if (_object isKindOf "AllVehicles") then { _fuel = fuel _object; }; _key = format["CHILD:305:%1:%2:%3:",_objectID,_worldspace,_fuel]; //diag_log ("HIVE: WRITE: "+ str(_key)); _key call server_hiveWrite; }; Link to comment Share on other sites More sharing options...
PeterBeer Posted November 2, 2014 Report Share Posted November 2, 2014 Version 1.0.4 Added support for vehicles, vehicles now save exactly where they were along with their direction. Open up 'server_swapObject.sqf' located in the compile folder. (dayz_server\compile\server_swapObject.sqf) Find: _object_position = { private["_position","_worldspace","_fuel","_key"]; _position = getPosATL _object; _worldspace = [ round(direction _object), _position ]; _fuel = 0; if (_object isKindOf "AllVehicles") then { _fuel = fuel _object; }; _key = format["CHILD:305:%1:%2:%3:",_objectID,_worldspace,_fuel]; //diag_log ("HIVE: WRITE: "+ str(_key)); _key call server_hiveWrite; }; And replace it with: _object_position = { private["_position","_worldspace","_fuel","_key"]; _position = getPosATL _object; _worldspace = [ (getDir _object) call KK_fnc_floatToString, _position call KK_fnc_positionToString ]; _fuel = 0; if (_object isKindOf "AllVehicles") then { _fuel = fuel _object; }; _key = format["CHILD:305:%1:%2:%3:",_objectID,_worldspace,_fuel]; //diag_log ("HIVE: WRITE: "+ str(_key)); _key call server_hiveWrite; }; server_swapObject.sqf you sure its in there 0_o Link to comment Share on other sites More sharing options...
Mikeeeyy Posted November 2, 2014 Author Report Share Posted November 2, 2014 server_swapObject.sqf you sure its in there 0_o Oops, you found my copy and paste error ;) I'll update it now. The OP is correct though. Link to comment Share on other sites More sharing options...
Mikeeeyy Posted November 2, 2014 Author Report Share Posted November 2, 2014 Just a side note, this will not give vehicles precise coordinates when they are spawned, but any time after that they will be precise. Imo it doesn't matter if they're not precise when they are spawned as they are only at the trader. Link to comment Share on other sites More sharing options...
SmokeyBR Posted November 2, 2014 Report Share Posted November 2, 2014 Mikeeeyy Do you use privateHive tools ? ive noticed after i installed precise base building privatehive tools stopped gettting worldspace locations for objects bases, will this happen for vehicles too, if i update ? Link to comment Share on other sites More sharing options...
SmokeyBR Posted November 2, 2014 Report Share Posted November 2, 2014 srry for double post. delete. Link to comment Share on other sites More sharing options...
Mikeeeyy Posted November 2, 2014 Author Report Share Posted November 2, 2014 Mikeeeyy Do you use privateHive tools ? ive noticed after i installed precise base building privatehive tools stopped gettting worldspace locations for objects bases, will this happen for vehicles too, if i update ? I'm not quite sure what tools you're talking about and this addon shouldn't affect the ability to fetch an object's position. Link to comment Share on other sites More sharing options...
KostiCZ Posted November 7, 2014 Report Share Posted November 7, 2014 Implemented 2 days ago and till now no problems. Some vehicles jumping on metal floor are stable now, even ATV is not jumping so much as before. Thanks Mikeeeyy Link to comment Share on other sites More sharing options...
Mikeeeyy Posted November 7, 2014 Author Report Share Posted November 7, 2014 Implemented 2 days ago and till now no problems. Some vehicles jumping on metal floor are stable now, even ATV is not jumping so much as before. Thanks Mikeeeyy Np buddy, glad you like it. Link to comment Share on other sites More sharing options...
DamianL Posted November 10, 2014 Report Share Posted November 10, 2014 Hi guys, I have to apologise as I'm new to DayZ server administration and am pretty well out of my depth. It's a long and painful, not to mention embarrassing story, but I don't have a good backup of my db, so am hoping to be able to fix it manually. I'm getting the _worldspace select error and am trying to remove the offending entries from the object_data table. Mikeeey, you mentioned in an earlier post that I need to find an entry where the worldspace coordinates don't have quotes around them, but I have lots and lots of these. I noticed that cars and other vehicles don't have quotes around the coordinates, but the majority of player built items do. Am I correct in thinking that all of the building components that were placed by a player, which don't have quotes around them, are what is preventing me from logging in, and that they all need to have the quotes added? Or is there just specific type of entry that requires the quotes? Sorry for posting such a question, but as I say, I'm really out of my depth. Link to comment Share on other sites More sharing options...
DamianL Posted November 10, 2014 Report Share Posted November 10, 2014 I think I can save one of you good folk from going through the pain of helping me. I think I've worked out what's happened. I started off by making a backup of the object_data table and confirmed I could import it back into the db. Then I deleted everything in the table and started importing in big chunks. When I got to a block that caused the worldspace error to occur, I split it up into smaller blocks until I new I had a chunk that contained both good and broken entries, and then started hunting for the difference. Now I don't even know if my issue is related to the mod after all. I found some wooden stairs that I knew for sure was causing the error, and found that there are a couple of quotes which don't seem to need to be there. I've bolded and underlined them below. "2014-11-09 00:00:00","154","[""140.945129"",""[6518.806641,9386.414063,44.0231018]""]","[]","[]","0.00000","0.00000" I deleted those 2 quotes, imported it back into the db and my server starts fine. No worldspace error. I think it should be within my capability to do a find-and-replace on my backup now. Hopefully, all is not lost after all... Link to comment Share on other sites More sharing options...
Mikeeeyy Posted November 10, 2014 Author Report Share Posted November 10, 2014 I think I can save one of you good folk from going through the pain of helping me. I think I've worked out what's happened. I started off by making a backup of the object_data table and confirmed I could import it back into the db. Then I deleted everything in the table and started importing in back in big chunks. When I got to a block that caused the worldspace error to occur, I split it up into smaller blocks until I new I had a chunk that contained both good and broken entries. But now I don't even know if my issue is related to this mod at all. I found some wooden stairs that I knew for sure was causing the error and found that there are a couple of quotes which don't seem to need to be there. I bolded and underlined them below. "2014-11-09 00:00:00","154","[""140.945129"",""[6518.806641,9386.414063,44.0231018]""]","[]","[]","0.00000","0.00000" I deleted those 2 quotes, imported it back into the db and my server starts fine. No worldspace error. I think it should be within my capability to do a find-and-replace on my backup now. Hopefully, all is not lost after all... That is very strange, haven't seen that before. Link to comment Share on other sites More sharing options...
Sandbird Posted November 12, 2014 Report Share Posted November 12, 2014 So this is going to replace the worldspace coords to this right ? : [267.546,"[6043.805176,1438.859619,0.498425]"] (with quotes i mean) And there is no way to remove them from the db cell ? Because call compiling that string will also remove the extra decimal points. Link to comment Share on other sites More sharing options...
Gr8 Posted November 13, 2014 Report Share Posted November 13, 2014 I installed this script, now i get "Not Setup Yet" error when i update garage doors and block doors to combo lock them. Also cant revert this script :( i guess, it has something to do with the db Link to comment Share on other sites More sharing options...
Mikeeeyy Posted November 13, 2014 Author Report Share Posted November 13, 2014 So this is going to replace the worldspace coords to this right ? : [267.546,"[6043.805176,1438.859619,0.498425]"] (with quotes i mean) And there is no way to remove them from the db cell ? Because call compiling that string will also remove the extra decimal points. I don't think there's a way. Link to comment Share on other sites More sharing options...
Mikeeeyy Posted November 13, 2014 Author Report Share Posted November 13, 2014 I installed this script, now i get "Not Setup Yet" error when i update garage doors and block doors to combo lock them. Also cant revert this script :( i guess, it has something to do with the db Did you change everything correctly in the swapObject sqf? Link to comment Share on other sites More sharing options...
f3cuk Posted November 13, 2014 Report Share Posted November 13, 2014 So this is going to replace the worldspace coords to this right ? : [267.546,"[6043.805176,1438.859619,0.498425]"] (with quotes i mean) And there is no way to remove them from the db cell ? Because call compiling that string will also remove the extra decimal points. Did you try using a SQL trigger that string replaces any double quotes in the worldspace field? E.g. DELIMITER $$ CREATE TRIGGER clean_worldspace AFTER INSERT ON object_data FOR EACH ROW BEGIN UPDATE object_data SET worldspace = REPLACE(worldspace,'"','') WHERE worldspace LIKE '%"%' END; $$ DELIMITER ; Link to comment Share on other sites More sharing options...
Sandbird Posted November 13, 2014 Report Share Posted November 13, 2014 Did you try using a SQL trigger that string replaces any double quotes in the worldspace field? E.g. DELIMITER $$ CREATE TRIGGER clean_worldspace AFTER INSERT ON object_data FOR EACH ROW BEGIN UPDATE object_data SET worldspace = REPLACE(worldspace,'"','') WHERE worldspace LIKE '%"%' END; $$ DELIMITER ; I thought about doing this in end....but i am also using the Vehicle Color mod....and that uses quotes as well...so it will break that mod doing so. Sure i can disable the trigger if its a vehicle and fire up only on objects.....but juggling 10 different things at the same time...i am bound to forget something somewhere with all these 'hacks' and all hell will break lose at some point.... Thats why i want a clean fix. Every coordinates inserted to be without quotes. Link to comment Share on other sites More sharing options...
boomdead123 Posted December 2, 2014 Report Share Posted December 2, 2014 is this compatable with if not how do i make it compatible? Link to comment Share on other sites More sharing options...
smexy Posted December 3, 2014 Report Share Posted December 3, 2014 I had vectoring installed but it wasn't saving the angles to the database so I tried to follow all these steps and now my server gets stuck on "Hive: Starting" where did I go wrong?? Also is server_Publicobject and server_publishfullobject both need to be edited? Thanks! Link to comment Share on other sites More sharing options...
Fidy Posted December 7, 2014 Report Share Posted December 7, 2014 Had some errors in a different mod, my bad. Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now