DayZ
GunnerTruckOshkosh
Wilma Fingerdoo  [developer] Oct 8, 2022 @ 6:35pm
Events.xml in reply to sPoOkeYs comment
you dont add the spawnabletypes to the events.xml you have to either
add the class name of the gunner truck you are using into one of the vanilla vehicle spawn events (in the events.xml) to use the vanilla vehicle spawn points which is the easiest way,
or make a new event in the events.xml for the gunner truck and then go around and find spots on the map get the coordinates and add them to the cfgeventspawns.xml file but that is very tedious.

easiest way is find one of the vanilla ones in events.xml for example VehicleHatchback02 (it can be any of the vehicle events in the events.xml

(i think the vanilla files are a little off but this is pulled straight from a vanilla file i think the min and max for the event should be min 9 and max 15 for the values they have listed for the children because as far as im aware the min of the children should add up to the min of the event and again all the max of the children should add up to the max of the event. and the nominal should be between those values and be the nominal amount on the server)

<event name="VehicleHatchback02">
<nominal>8</nominal>
<min>5</min>
<max>11</max>
<lifetime>300</lifetime>
<restock>0</restock>
<saferadius>500</saferadius>
<distanceradius>500</distanceradius>
<cleanupradius>200</cleanupradius>
<flags deletable="0" init_random="0" remove_damaged="1"/>
<position>fixed</position>
<limit>mixed</limit>
<active>1</active>
<children>
<child lootmax="0" lootmin="0" max="5" min="3" type="Hatchback_02"/>
<child lootmax="0" lootmin="0" max="5" min="3" type="Hatchback_02_Black"/>
<child lootmax="0" lootmin="0" max="5" min="3" type="Hatchback_02_Blue"/>
</children>
</event>

then under children section there is 3 colours that spawn, i would copy one of those lines and paste it in under those 3 then change the class name on the line you just pasted to "GunnerTruck" or whatever class name you want to use depending on the colour and the map ect then adjust the min and max values of the child line you just added to however many you want to spawn and then adjust the min, nominal and max values of the event itself depending how many you have added so it will look something like this.

<event name="VehicleHatchback02">
<nominal>15</nominal>
<min>12</min>
<max>20</max>
<lifetime>300</lifetime>
<restock>0</restock>
<saferadius>500</saferadius>
<distanceradius>500</distanceradius>
<cleanupradius>200</cleanupradius>
<flags deletable="0" init_random="0" remove_damaged="1"/>
<position>fixed</position>
<limit>mixed</limit>
<active>1</active>
<children>
<child lootmax="0" lootmin="0" max="5" min="3" type="Hatchback_02"/>
<child lootmax="0" lootmin="0" max="5" min="3" type="Hatchback_02_Black"/>
<child lootmax="0" lootmin="0" max="5" min="3" type="Hatchback_02_Blue"/>
<child lootmax="0" lootmin="0" max="5" min="3" type="GunnerTruck"/>
</children>
</event>

so the first nominal min and max relate to the whole event and the mins and maxs in the children section relates to how many you want of each colour you want to spawn.

It is very difficult to explain in text but if this is confusing you can search add more cars dayz on youtube, scalespeeder has some videos on adjusting the values of the vanilla cars and explains each value in more detail the only real difference is to add a modded vehicle you are adding a new line with the new child (GunnerTruck) its not difficult its just awkward to explain in text, a video makes it much clearer
< >
Showing 1-3 of 3 comments
sPo0keY Oct 9, 2022 @ 6:14pm 
ok thanks for the reply and the great info so just copy and past and rename?.
sry im still new to all this
Last edited by sPo0keY; Oct 10, 2022 @ 5:00pm
sPo0keY Oct 11, 2022 @ 5:44am 
</event>
<event name="GunnerTruckDeerisle">
<nominal>5</nominal>
<min>1</min>
<max>10</max>
<lifetime>3888000</lifetime>
<restock>0</restock>
<saferadius>500</saferadius>
<distanceradius>500</distanceradius>
<cleanupradius>200</cleanupradius>
<flags deletable="0" init_random="0" remove_damaged="1"/>
<position>fixed</position>
<limit>mixed</limit>
<active>1</active>
<children>
<child lootmax="0" lootmin="0" max="5" min="3" type="GunnerTruckDeerisleWhite"/>
<child lootmax="0" lootmin="0" max="5" min="3" type="GunnerTruckDeerisleTan"/>
<child lootmax="0" lootmin="0" max="5" min="3" type="CivilianSedan_Wine"/>
</children>
</event>
Wilma Fingerdoo  [developer] Oct 11, 2022 @ 11:51am 
No worries il try and explain with a bit more detail it might be a bit long, hopefully it will help.
also you shouldnt need to put the lifetime to 3888000 in the events spawn file they just stay anyway as everything is handled by the events spawner
you would normally only need to put the lifetime of the ones in the types to 3888000 if you are using a trader or spawning them in via admin tools for them to stay for 45days as the events.xml spawned vehicles are handled completely by the events system.

you would have to use one of the events already in the events.xml file unless you where going to add in all the x,y and rotation coordinates for each new spawn point in the cfgeventspawns.xml file.


The first way, If you were to use one of the vanilla events and just replace 2 of the vanilla vehicle children that is by far the easiest way
so you would go to your events.xml find one of the vehicle events again im using the vehiclehatchback02 for demonstration but any will do.

This is how it looks as standard (numbers may vary on deerisle)

<event name="VehicleHatchback02">
<nominal>8</nominal>
<min>5</min>
<max>11</max>
<lifetime>300</lifetime>
<restock>0</restock>
<saferadius>500</saferadius>
<distanceradius>500</distanceradius>
<cleanupradius>200</cleanupradius>
<flags deletable="0" init_random="0" remove_damaged="1"/>
<position>fixed</position>
<limit>mixed</limit>
<active>1</active>
<children>
<child lootmax="0" lootmin="0" max="5" min="3" type="Hatchback_02"/>
<child lootmax="0" lootmin="0" max="5" min="3" type="Hatchback_02_Black"/>
<child lootmax="0" lootmin="0" max="5" min="3" type="Hatchback_02_Blue"/>
</children>
</event>

And change it to this to replace 2 of the coloured variants

<event name="VehicleHatchback02">
<nominal>8</nominal>
<min>5</min>
<max>11</max>
<lifetime>300</lifetime>
<restock>0</restock>
<saferadius>500</saferadius>
<distanceradius>500</distanceradius>
<cleanupradius>200</cleanupradius>
<flags deletable="0" init_random="0" remove_damaged="1"/>
<position>fixed</position>
<limit>mixed</limit>
<active>1</active>
<children>
<child lootmax="0" lootmin="0" max="5" min="3" type="Hatchback_02"/>
<child lootmax="0" lootmin="0" max="5" min="3" type="GunnerTruckDeerisleWhite"/>
<child lootmax="0" lootmin="0" max="5" min="3" type="GunnerTruckDeerisleTan"/>
</children>
</event>

all i did was change the 2 class names on the 3rd and 4th to last lines and that would work ( you would have to either clear the vehicle database in the storage folder to respawn vehicles that have been spawned already or go around and delete any hatchbacks black and blue that had already spawned).





The second way, would be the second easiest not much different to the first,would be to add the extra child lines in so that you keep the vanilla cars and its colour varients and the gunnertruck like this (how i showed it the first time but with the class names you look to be using)


<event name="VehicleHatchback02">
<nominal>20</nominal>
<min>15</min>
<max>25</max>
<lifetime>300</lifetime>
<restock>0</restock>
<saferadius>500</saferadius>
<distanceradius>500</distanceradius>
<cleanupradius>200</cleanupradius>
<flags deletable="0" init_random="0" remove_damaged="1"/>
<position>fixed</position>
<limit>mixed</limit>
<active>1</active>
<children>
<child lootmax="0" lootmin="0" max="5" min="3" type="Hatchback_02"/>
<child lootmax="0" lootmin="0" max="5" min="3" type="Hatchback_02_Black"/>
<child lootmax="0" lootmin="0" max="5" min="3" type="Hatchback_02_Blue"/>
<child lootmax="0" lootmin="0" max="5" min="3" type="GunnerTruckDeerisleWhite"/>
<child lootmax="0" lootmin="0" max="5" min="3" type="GunnerTruckDeerisleTan"/>
</children>
</event>

So all i did was copy the line with Hatchback_02_Blue pasted it twice below and added the gunnertruck classes i want then on those 2 lines you just pasted in with the gunnertruck classes where it says max and min put the maximum and minimum of those vehicles you want to spawn then all i do is add up all the mins so that makes 15 in this case and put that in the min at the start of the event, add up the maxs 25 in this case and add that to the max at the beginning of the event and then i put in a middle number for the nominal i just picked 20. and it should be good to go (as with above method you may need to delete the cars that have previously spawned to make the new ones spawn the car spawning can be a pain in the ass sometimes iv had it look like its not working and then a few restarts later it works...)



The Third way (i dont recommend this for the first time maybe at a later date you could do this theres some great videos scalespeeder and others have on youtube on adding in new vehicle positions )
If you wanted to put in all the positions you want the truck to spawn in you would have to make the eventname in the events.xml match up to a named list of positions in the cfgeventspawns.xml and for vehicles it must start Vehicle so you could do
<event name="VehicleGunnerTruck"> it can be whatever you want as long as it starts with vehicle and you have a matching name in the cfgeventspawns.xml. then go round the map spawn the vehicle in the place you want it then use either communityonlinetools esp menu to get the coordinates and rotation or use vppadmintools and press P to copy the co-ordinates to clipboard and add them into the correct place in cfgeventspawns.xml move onto the next location and do the same.

so you would do

<event name="VehicleGunnerTruck">
<nominal>8</nominal>
<min>5</min>
<max>11</max>
<lifetime>300</lifetime>
<restock>0</restock>
<saferadius>500</saferadius>
<distanceradius>500</distanceradius>
<cleanupradius>200</cleanupradius>
<flags deletable="0" init_random="0" remove_damaged="1"/>
<position>fixed</position>
<limit>mixed</limit>
<active>1</active>
<children>
<child lootmax="0" lootmin="0" max="5" min="3" type="GunnerTruckDeerisle"/>
<child lootmax="0" lootmin="0" max="5" min="3" type="GunnerTruckDeerisleTan"/>
<child lootmax="0" lootmin="0" max="5" min="3" type="GunnerTruckDeerisleWhite"/>
</children>
</event>

and then in the cfgeventspawns.xml add in something like

<event name="VehicleGunnerTruck">
<pos x="13683.495117" z="11178.530273" a="1.486752" />
<pos x="4575.873047" z="8278.430664" a="318.470703" />
<pos x="2181.526855" z="3291.955566" a="87.347031" />
<pos x="7998.980469" z="14637.250977" a="339.290222" />
</event>

X is the X coordinate Z is the Z coordinate and A is the rotation that you would have to get yourself in game, you can have as many or as few as you want iv only put 4 as an example i think vanilla have around 60ish, obviously just make sure if you have 4 sets of coordinates you dont as it to spawn more than 4 vehicles. it should be good to go
< >
Showing 1-3 of 3 comments
Per page: 1530 50