How to Generate a unique_id

axeman

OpenDayZ Rockstar!
Hi, nice new forum. I am looking for a way to generate valid unique_id's when adding to bliss database. I want to be able to add items to instance_deployable, referencing the deployable table.

Currently I have been creating 40 or 50 sand bags and taking their ID (then deleting the sandbag), can't see any real logic to the numbering though.

I have tried taking one of the IDs and adding 1 or 10, sooner or later though it breaks, presumably because of a duplicate or invalid id..

I haven't, yet, upgraded to the compatible version for 1.73 as I have a LAN this weekend and didn't want to break the admin page until afer, I notice there were 'big schema changes'..

Any advice on creating unique_id's much appreciated :) ta..
 
I am spawning new items into the game when I restart the server. Currently I have a crashed C130J (scenery), some OpFor Flags (used to mark certain areas) and extra fires in the cities to make it a bit spookier and easier to navigate the cities at night..

Mostly they work ok but when generating a unique_id, by taking an exisitng one and incrementing the number, the objects don't always spawn in-game.

I just wondered if there is a correct way of generating the unique_ids. A thought has occurred, are they the same IDs as a survivor will have ? In which case there may be a way to use a keygen or find out how the keygens work to create an ID.

Here are some records from the table (instance_deployable) that I am editing:

id unique_id deployable_id owner_id instance_id worldspace inventory last_updated created
23 66655233960310 5 12 1 [310.043,[6665.53,2339.62,0]] [] 24/10/2012 22:27 24/10/2012 22:27
24 6669823458092 5 12 1 [91.9765,[6669.81,2345.76,0]] [] 24/10/2012 22:27 24/10/2012 22:27
30 66197229570233 5 12 1 [232.77,[6619.67,2295.75,0]] [] 24/10/2012 22:48 24/10/2012 22:48
31 66288229950147 5 12 1 [147.152,[6628.76,2299.54,0]] [] 24/10/2012 22:49 24/10/2012 22:49
32 66177233500314 5 12 1 [314.009,[6617.68,2335,0]] [] 24/10/2012 22:49 24/10/2012 22:49
34 66358234300344 5 12 1 [343.654,[6635.84,2342.98,0]] [] 24/10/2012 22:50 24/10/2012 22:50
44 11998991336075 5 12 1 [74.7848,[11998.9,9133.55,0]] [] 25/10/2012 01:09 25/10/2012 01:09
 
I don't believe these unique ids matter too much. Whenever I add a new instance I usually just start at 1000 and increment by 1 for every new object. Works perfectly for me. I've even accidentally used the same ID for different objects and it still seems to work fine. I'm using the new schema with the latest Bliss.
 
Also, the easiest / best way of adding objects is to the mission file directly. Use the 3D editor to precisely place objects, convert it to 2D editor, and merge with your DayZ Mission File. It's much easier to manage.
 
Aah, I see, I didn't run the --with-buildings option on the original build, will give that a go, thanks for the info.

I have added loads into the instance_vehicle also, after updating the vehicle table, where required (have added a Police Car, Land Rover and URAL INS).. Have not had any issues, that I know of, with them but will use the vehicles script from now on..

I am also using the instance_vehicle to reset choppers on a server restart, am changing the worldspace to one of a selection of pre-defined points and resetting fuel, damage etc. to repair..

Am doing that and then resetting server using the dot net battleye rcon api. This is from a web-page and/or from an .exe on the server that is on a schedule..

Will have a look at the mission file, is working so far and have a LAN this weekend so fingers crossed, will setup properly after that.
 
Back
Top