Your deployable table is basically a list of available objects to delpoy around the map. I have used that table to place flags on the map so I have added
FlagCarrierBLUFOR_EP1 to the class_name field. The ID is generated automatically when you add the new
class_name.
Refresh the table and make a note of the
ID, in my case it is
8. Then go to the
instance_deployable table and add a new row and edit the following fields:
id is automatically generated, don't worry about it.
unique_id is normally generated by the game but is seems safe take the last number and add a 1.
deployable_id is the
id from the
deployable table so, for me, is 8.
owner_id, you need to open the survivor table and find an
id in there to use, same as we have done in deployable. The only thing here is when that survivor is cleaned out of the table the deployable may also be cleaned up, like tents. I use one of my own and make sure I leave him in the table even after dying (haven't actually got so far as cleaning the entry out to see what happens)
instance_id is your world id, default for Chernarus is a
1, check the
world table if you use any other maps and to ensure you should use a 1 for chernarus.
worldspace is the location of the new object. The easiest way to get this is to take your survivor and stand in the spot that you want to spawn the new object, even look the way you want it orientated. Wait a minute then go to the survivor table, find your current survivor. With mySQL run this command
Code:
SELECT * FROM `dayz`.`survivor` where is_dead=0 and unique_id='<insert your unique id here>'
You need to put your own unique_id in, normally an 8 digit number (but can vary). A worldspace array looks like this:
[158,[6917.85,8100.64,0.00296021]]
Inventory. Default empty inventory is
[], for items that take stuff you can add an inventory array in here. Usually best to copy the inventory from an already existing item. Or for a new one, spawn it into the game then add some items and edit the results. Most people don't know that Land_Campfire / Land_Fire_burning can hold an inventory (8 slots). It is not persistent and a burning fire will consume what you put into it. And, allegedly,adding wood will make the fire burn for longer. Is very handy for storing stuff temporarily when going on runs into dangerous territory.
last_updated I usually copy the value from the row above.
created is generated by mySQL, don't worry about.
Since the last dayz / hive update there are some new fields, I can only guess at what these may do but the defaults will work fine, so if you leave them mySQL will fill the fields with the defaults. Maybe they are to fix issues with 1.7.5.1 and just 'be there' for queries from the game, I don't know. I would like to think they are a sign of things to come..
Hitpoints default value
[], hitpoints are normally used in the instance_vehicle to define the parts of the vehicle that are damaged, have seen a video of zeds breaking a house, I winder if there are plans for houses to be damaged incrementally and pull survivors through windows
Fuel: fairly self explanatory, default vale of
0 (zero) will do, normal values range from 1 (full tank) down to zero (out of fuel, boooh). Are they introducing generators or some other static object that requires fuel ?
Damage, again a default of
0 (zero) will suffice here, values range from zero to one. Normally with vehicles, damage of one means ka-boom..
Hope that helps explain the fields for you and give you a clue as what to do with them. Again, I have been warned off from using this table to spawn objects so I would keep an eye on server performance etc. I only run a small, friendly server and can't say I have noticed anything. You can check the .rpt log to see if they have spawned, there usually is an error along the lines of
cannot generate non-ai blah blah for banned stuff.
The best way to add buildings is by building your server using the
--with-buildings option and updating the database with the same options to create the tables. However stuff like Land_Fire_burning really belongs in the deployable tables as they have an inventory..
Once you have added all your new objects, take a backup of the database and keep it, in case your survivor, that owns the new objects, gets cleaned out and you lose your objects. You don't want to lose your work..