Jump to content
LastS

How vehicles spawn work?

Recommended Posts

Hi, i would like to know how works the vehicles spawn system.

I set a high number of 4x4 to spawn, and set only 3 spawnpoits on eventsspawnpoints xml file, but only spawn 2 cars, and 1 spawn gets empty.

Later i set the desired points that i want to spawn 30 4x4, but i am flying with the admin tool to check if spawns and i cant see anything at spawns..

Is it bugged or how it works?

My code example for tests:

cfgeventspawns.xml

    <event name="VehicleOffroadHatchback">
		<pos x="4887.453125" z="2855.823242" a="257.481689" />
        <pos x="4812.296875" z="6798.160156" a="327.097870" />
        <pos x="5010.281250" z="6816.060547" a="203.527695" />
        <pos x="3300.640625" z="3822.350586" a="240.870575" />
        <pos x="9898.375000" z="8734.794922" a="241.005386" />
        <pos x="11447.343750" z="7570.854004" a="325.940186" />
        <pos x="11447.984375" z="7447.103516" a="106.006348" />
        <pos x="9246.359375" z="13611.951172" a="92.931969" />
        <pos x="6017.953125" z="7819.673828" a="69.972427" />
        <pos x="7648.000000" z="12665.000000" a="288.604095" />
        <pos x="7606.875000" z="12628.797852" a="67.133316" />
        <pos x="6911.546875" z="7801.909668" a="138.833054" />
        <pos x="6139.031250" z="7737.602051" a="225.997452" />
        <pos x="12621.187500" z="13833.891602" a="128.923950" />
        <pos x="12533.281250" z="13792.261719" a="9.391764" />
        <pos x="12588.015625" z="13816.601563" a="288.245911" />
        <pos x="2741.140625" z="12162.149414" a="113.329292" />
        <pos x="3534.265625" z="14188.257813" a="207.150467" />
        <pos x="1389.093750" z="11995.000000" a="72.688065" />
    </event>

and now the events.xml

       <event name="VehicleOffroadHatchback">
        <waves>0</waves>
        <nominal>80</nominal>
        <min>50</min>
        <max>80</max>
        <lifetime>300</lifetime>
        <restock>0</restock>
        <saferadius>1000</saferadius>
        <distanceradius>500</distanceradius>
        <cleanupradius>200</cleanupradius>
        <flags deletable="0" init_random="0" remove_damaged="1" sec_spawner="0"/>
        <position>fixed</position>
        <limit>mixed</limit>
        <active>1</active>
        <children>
            <child lootmax="0" lootmin="0" max="80" min="50" type="OffroadHatchback"/>
        </children>
    </event>

Can anyone help me? :/

Edited by LastS
value max
  • Like 1

Share this post


Link to post
Share on other sites

I'm not positive, but it does appear that you have you Min and Max mixed up in the bottom of the events code under children.

Share this post


Link to post
Share on other sites
7 hours ago, Taco Donkey said:

I'm not positive, but it does appear that you have you Min and Max mixed up in the bottom of the events code under children.

Yes, i fixed this, but i was not the problem..

Share this post


Link to post
Share on other sites

The Saferadius is to hight. Set to 100.

Share this post


Link to post
Share on other sites

Also, couldn't help notice you said you were "flying" with the admin tool to find the spawns. If it's the admin tool I use, then freecam will not let you see spawns far away from your character. You'll have noticed that if you use freecam to fly around the map you'll never see another zombie or player. This is because your character is still where it was when you left it, only the camera is moving around the map which won't trigger spawn events. You need to physically teleport yourself to the car spawn points if you want to check they're spawning.

Share this post


Link to post
Share on other sites
 

 

17 hours ago, LastS said:

 


       <event name="VehicleOffroadHatchback">
        <waves>0</waves>
        <nominal>80</nominal>
        <min>50</min>
        <max>80</max>
        <lifetime>300</lifetime>
        <restock>0</restock>
        <saferadius>1000</saferadius>
        <distanceradius>500</distanceradius>
        <cleanupradius>200</cleanupradius>
        <flags deletable="0" init_random="0" remove_damaged="1" sec_spawner="0"/>
        <position>fixed</position>
        <limit>mixed</limit>
        <active>1</active>
        <children>
            <child lootmax="0" lootmin="0" max="80" min="50" type="OffroadHatchback"/>
        </children>
    </event>

Can anyone help me? :/

This should help with some of the events.xml definitions.

nominal       How many items should spawn on the map, effects restock      0 = no spawn

lifetime      How long (in seconds) something will be out before despawning, after being idle     3600 = 1 hour, 3888000 = until server restart

restock      How long (in seconds) something will be out before respawning, after being idle      only restocks when nominal > min. 1800 = 30 minutes

min      Minimum count of item on map, effected by nominal        100 is average, above or below accordingly

quantmin      Percentage of minimum amount of item there is (in stack)        0 - 100%, magazines, water bottle fullness

quantmax      Percentage of maximum amount of item there is (in stack)       0 - 100%, magazines, water bottle fullness

cost     Priority during restock and cleanup       0-100

flags     Attributes if the item is available in map, by craft, or in cargo      crafted="1"

category     Loot category for spawn locations to choose from       Links to mapgroupproto.xml for loot locations

tag     Loot "location" within the group - only 1 per item       name="shelves", name="floor"

usage      Loot "groups" that can spawn the item - multiple per item       name="Military", name="Town", name="Industrial"

value      Rarity

The min and max you have changed below nominal refer to the damage (I've been told) - not amount of vehicles.

<nominal> is how many VEHICLE the server aims to keep on the map so set <nominal> to the maximum that you wish. Then change the children max to same as <nominal> then min to the minimum of vehicles you want the server to try and spawn.

FYI lifetime 300, appears to cause them to disappear very fast if damaged it seems.

This is the default events.xml for offraod hatchback below.This is telling the server to try and spawn 40 vehicles, with a minimum of 30 on the map at one time. 

    <event name="VehicleOffroadHatchback">
        <waves>0</waves>
        <nominal>40</nominal>
        <min>18</min>
        <max>22</max>
        <lifetime>300</lifetime>
        <restock>0</restock>
        <saferadius>1000</saferadius>
        <distanceradius>500</distanceradius>
        <cleanupradius>200</cleanupradius>
        <flags deletable="0" init_random="0" remove_damaged="1" sec_spawner="0"/>
        <position>fixed</position>
        <limit>mixed</limit>
        <active>1</active>
        <children>
            <child lootmax="0" lootmin="0" max="40" min="30" type="OffroadHatchback"/>
        </children>
    </event>

If you are having issues with vehicles you can remove all vehicles from your database by going to /mpmissions/dayzOffline.chernarusplus/storage_66435/data then deleting the vehicles.bin  then upon restart the server will look to the above events.xml to fill those spawn locations you've added. Good luck !

Edited by Fester808

Share this post


Link to post
Share on other sites

How can I spawn wehicle in specific spot?Also I have not find any engine belt anywhere.It is not in types.xml either.

Share this post


Link to post
Share on other sites
On 12/11/2018 at 11:10 PM, MacAgony said:

How can I spawn wehicle in specific spot?

1. Find the coordinates you want to spawn each vehicle at. You will need the X coordinate, the Z coordinate and the A coordinate (orientation). The X & Z coordinate relates to the exact location you want that car to spawn (can use this map to get them), or use the debug in game. Then the A coordinate is the yaw/orientation of the car - you can just use any number below 360 or if you want precise placement I would look at Arkensors offline mod and use XZA from that. 

2. Stop the server. Then go to mpmissions/{missionName}/cfgeventspawns.xml

open cfgeventspawns.xml

press CTRL + F to find (or find manually) the Offroad Hatch back, it will have a list of about 70 different spawn points. Now enter the XYA coordinates for each vehicle you wish to spawn from step 1 using the format shown in the .xml now save the xml and restart the server. 

Please note, the server tries to spawn (maximum) 40 hatchbacks as default. There are more than 40 spawnpoints as default. This means that following this tutorial won’t guarantee a vehicle to spawn at these ‘new spawn points’ right away. 

Let us know if you have any issues. 

Edited by Fester808

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×