striker Posted August 1, 2014 Report Share Posted August 1, 2014 Hey guys, Thought I'll show you a script I made for my server. Not much to be said about it other than you can now rotate objects around more than one axis. Ever wanted barn doors with the garage doors so you can fit that beautiful MTVR in your garage? Now you can :D ... Somewhat. This is the product of a days work in scripting... with the help of a Mountain Dew or two... NOTE: I did not make the snap build part. https://www.youtube.com/watch?v=1fCYdG99D50&feature=youtu.be Not sure if it is the first of its kind or I just suck at using Google. Come check it out at my server: 216.244.85.250:2313 (Might have trouble connecting because STEAM. Go to http://www.DayZBox.com for help) Sincerely, DayzBox Admin - BILLY insertcoins, SWAT_BigBear, xBowBii and 2 others 5 Link to comment Share on other sites More sharing options...
Uro Posted August 1, 2014 Report Share Posted August 1, 2014 You should pm the people who created snap building / snapping pro and see if you guys can work together, integrating these mods would be awesome for the base building part of Epoch :) SWAT_BigBear 1 Link to comment Share on other sites More sharing options...
Achmed Posted August 1, 2014 Report Share Posted August 1, 2014 Looks cool. Couldn't read the menu options on my mobile but would there be any way to make it work with keyboard keys (like the page up and page down work) or even lock a item in place pay pressing and holding a key and that then stops it moving around the normal way but then let's you control it's tilt etc Link to comment Share on other sites More sharing options...
raymix Posted August 2, 2014 Report Share Posted August 2, 2014 Did you also make custom hive dll? You can't really store vector rotations to database currently, I know that A3E will change that. Other than that, merging with snap pro should take like 5 mins, depending on how complex your player controls are in terms of code :ph34r: Edit: scratch that, I think it's possible, just gotta modify few files here and there and should work with fresh servers. KamikazeXeX, Uro and xBowBii 3 Link to comment Share on other sites More sharing options...
striker Posted August 2, 2014 Author Report Share Posted August 2, 2014 Did you also make custom hive dll? You can't really store vector rotations to database currently, I know that A3E will change that. Other than that, merging with snap pro should take like 5 mins, depending on how complex your player controls are in terms of code :ph34r: Edit: scratch that, I think it's possible, just gotta modify few files here and there and should work with fresh servers. Hey raymix, The vector rotation is indeed saved to the database. Not only does it work with new servers, it works with existing servers too. No modified files that would be too complicated to edit and change. I am currently working with your files to get it setup correctly. Should have something to show in a few days... :) raymix 1 Link to comment Share on other sites More sharing options...
striker Posted August 2, 2014 Author Report Share Posted August 2, 2014 You should pm the people who created snap building / snapping pro and see if you guys can work together, integrating these mods would be awesome for the base building part of Epoch :) He found me ;) Looks cool. Couldn't read the menu options on my mobile but would there be any way to make it work with keyboard keys (like the page up and page down work) or even lock a item in place pay pressing and holding a key and that then stops it moving around the normal way but then let's you control it's tilt etc Anything is possible :D Woah looks really nice!!!! @Raymix ? :wub: :wub: Apparently, @raymix worked... :P xBowBii 1 Link to comment Share on other sites More sharing options...
f3cuk Posted August 2, 2014 Report Share Posted August 2, 2014 So does this also mean we might have sideways garagedoors soon? Link to comment Share on other sites More sharing options...
striker Posted August 2, 2014 Author Report Share Posted August 2, 2014 So does this also mean we might have sideways garagedoors soon? Indeed ;) Link to comment Share on other sites More sharing options...
KamikazeXeX Posted August 3, 2014 Report Share Posted August 3, 2014 Did you also make custom hive dll? You can't really store vector rotations to database currently, I know that A3E will change that. Other than that, merging with snap pro should take like 5 mins, depending on how complex your player controls are in terms of code :ph34r: Edit: scratch that, I think it's possible, just gotta modify few files here and there and should work with fresh servers. +1! All my players would love this! Link to comment Share on other sites More sharing options...
raymix Posted August 3, 2014 Report Share Posted August 3, 2014 Hey raymix, The vector rotation is indeed saved to the database. Not only does it work with new servers, it works with existing servers too. No modified files that would be too complicated to edit and change. I am currently working with your files to get it setup correctly. Should have something to show in a few days... :) That is awesome! Can't wait to check out your solution for publishing rotations, did you create an extra nested array for the same table for DB? :) Link to comment Share on other sites More sharing options...
striker Posted August 3, 2014 Author Report Share Posted August 3, 2014 That is awesome! Can't wait to check out your solution for publishing rotations, did you create an extra nested array for the same table for DB? :) Ill post a small snippet. I'm sure you will understand it. :) -= PMed Instead =- Link to comment Share on other sites More sharing options...
hogscraper Posted August 3, 2014 Report Share Posted August 3, 2014 nice! I played around with [_object,_pitch,_bank] BIS_fnc_setPitchBank; a while back but couldn't figure out a way to get them not to revert back to flat on restart. Looks awesome! Link to comment Share on other sites More sharing options...
Jossy Posted August 4, 2014 Report Share Posted August 4, 2014 How/have you solved the duplicate UID issue? If you build 2 block garage doors on the same spot? Before finding this post and the other post I already did this on my own server, let me know if you're struggling with anything :) xBowBii and raymix 2 Link to comment Share on other sites More sharing options...
striker Posted August 4, 2014 Author Report Share Posted August 4, 2014 How/have you solved the duplicate UID issue? If you build 2 block garage doors on the same spot? Before finding this post and the other post I already did this on my own server, let me know if you're struggling with anything :) Hey Jossy, That is awesome that you were able to create the same thing too! I am surprised that you did not share it on the forums here. (To my knowledge anyway). I read that you did a full database conversion. That seems a bit "extreme" to get vectors to work. I personally don't have any checks against that because I did not know about that until now. But, a simple fix would be to create your own function like this dayz_objectUID2 = { private["_position","_dir","_key"]; _dir = _this select 0; _key = ""; _position = _this select 1; { _x = _x * 10; if ( _x < 0 ) then { _x = _x * -10 }; _key = _key + str(round(_x)); } count _position; _key = _key + str(round(_dir)); _key}; That is the default one, but you can create a fourth one that includes vectors. Really not to hard to do. Hope to see more from you! Link to comment Share on other sites More sharing options...
Jossy Posted August 5, 2014 Report Share Posted August 5, 2014 That is exactly what I did :lol: I haven't shared it on the forum because as of right now it's a hack job mixed into many other mods which also aren't finished, I only finished the new UID calculation yesterday, but anyway, in regards to the UID, the hive runs into errors when trying to insert UID's longer than 19 numbers (I think) so at this stage I have the vectorUp using an extra 3 digitsin the UID, but now that I think about it, if I was to build somewhere in 1####, 1####, 1###+ (1000Ft) in the air it may cause an error :huh: I'm going to test that now and perhaps start working on a proper release, I'll github it so people can contribute, since the rotations aren't all finished either someone else may be able to figure out the Y axis rotation while I'm busy with other stuff xBowBii 1 Link to comment Share on other sites More sharing options...
striker Posted August 5, 2014 Author Report Share Posted August 5, 2014 That is exactly what I did :lol: I haven't shared it on the forum because as of right now it's a hack job mixed into many other mods which also aren't finished, I only finished the new UID calculation yesterday, but anyway, in regards to the UID, the hive runs into errors when trying to insert UID's longer than 19 numbers (I think) so at this stage I have the vectorUp using an extra 3 digitsin the UID, but now that I think about it, if I was to build somewhere in 1####, 1####, 1###+ (1000Ft) in the air it may cause an error :huh: I'm going to test that now and perhaps start working on a proper release, I'll github it so people can contribute, since the rotations aren't all finished either someone else may be able to figure out the Y axis rotation while I'm busy with other stuff Nice, database currently supports 24 digits. Which would leave you with 6 digits to play with at the max uid count. I'd love that you release it!! :) We are trying as fast as we can! xBowBii 1 Link to comment Share on other sites More sharing options...
Jossy Posted August 5, 2014 Report Share Posted August 5, 2014 Nice, database currently supports 24 digits. Which would leave you with 6 digits to play with at the max uid count. BIGINT, -9223372036854775808 to 9223372036854775807 normal. 0 to 18446744073709551615 UNSIGNED* [Error] Error executing |CHILD:308:24:WoodStairs_DZ:0:50000:[134.875,[16620.7,14106.3,1002.34],"****",[0,0,1]]:[]:[]:0:16621141061002135448:| 20 digits results in error, now it's unlikely someone is going to build 1000m in the air that often, but I know it does happen.. so I'll need to fix this before working on a clean release :huh: Link to comment Share on other sites More sharing options...
striker Posted August 5, 2014 Author Report Share Posted August 5, 2014 BIGINT, -9223372036854775808 to 9223372036854775807 normal. 0 to 18446744073709551615 UNSIGNED* [Error] Error executing |CHILD:308:24:WoodStairs_DZ:0:50000:[134.875,[16620.7,14106.3,1002.34],"****",[0,0,1]]:[]:[]:0:16621141061002135448:| 20 digits results in error, now it's unlikely someone is going to build 1000m in the air that often, but I know it does happen.. so I'll need to fix this before working on a clean release :huh: How old is you database? Go to your database and go to the structure of your objects table. Should give you a type of BIGINT with 24 next to it. Link to comment Share on other sites More sharing options...
Jossy Posted August 5, 2014 Report Share Posted August 5, 2014 yes it is 24 so in theory the DB can hold a lot more than this 19 or 24 digits so maybe it's the DLL that is the bottleneck here? EDIT, I can confirm that it's the DLL, manually entering a longer UID worked fine until I changed it back to BIGINT(8), then it was limited back to it's 20 digit unsigned length.. back to the drawing board! Link to comment Share on other sites More sharing options...
striker Posted August 5, 2014 Author Report Share Posted August 5, 2014 That is probably what it is. But the weird thing is, I have the script working "fine" on my server. When I upgrade it, nothing gets deleted. That being said, I doubt the locations are exactly the same. But as a safety measure, i'm adding in a check. Long story short, your limited to... 2 :mellow: Link to comment Share on other sites More sharing options...
Jossy Posted August 5, 2014 Report Share Posted August 5, 2014 that will only happen at times where you build double garage doors like the ones in my screenshot for example, because the pivot point is the same worldspace coord, and I too had it all working up until I noticed they were deleting due to the duped UID's ;) Link to comment Share on other sites More sharing options...
striker Posted August 5, 2014 Author Report Share Posted August 5, 2014 Yep, a simple solution is if they just made the uid the id in the database times a few thousand to prevent ingame collisions with world objects... I mean the database id is unique... :lol: Link to comment Share on other sites More sharing options...
ekroemer Posted August 5, 2014 Report Share Posted August 5, 2014 Probably the HiveExt.dll will be updated to support steam ID's, because now you can change the DB's CharacterID field to BigInt but the dll will truncate that to integer (https://github.com/vbawol/DayZ-Epoch/issues/1371). Perhaps you should file an issue and ask vbawol to adapt the UID calls, as well? Jossy 1 Link to comment Share on other sites More sharing options...
Jossy Posted August 5, 2014 Report Share Posted August 5, 2014 Yep, a simple solution is if they just made the uid the id in the database times a few thousand to prevent ingame collisions with world objects... I mean the database id is unique... :lol: I think that defeats the purpose of the UID function, in order for the game to know what record to grab from the DB, it needs to know the calculation needed for that object to find the UID in the Db, I have written up a working solution for the UID field anyway, now it's just a matter of polishing up messy code and working on the instructions for release If you knew this and were being sarcastic, then I apologize :wub: Link to comment Share on other sites More sharing options...
striker Posted August 5, 2014 Author Report Share Posted August 5, 2014 I guess, but, there is a easy way to convert it back to the database objectid field for lookup... It is called division :P Current Method: Object spawn: Sets uid for database to the object. Object place: Creates uid using position and dir. Object update: find using object uid. My method possibly: Object spawn: Sets uid using object id * 10000000 Object create: Well, nothing Object update find using object (uid / 10000000) *object id is auto incremented in database* Anyway, I seen that your script does not include the Y axis. Does that mean you cannot tilt the object forward and backwards? Also, what degree can your users tilt the object at? 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