DayZ
Ghaleas May 24, 2021 @ 12:30am
Spawning mod cars on vanilla map
Hello survivors!

I was messing around with mods, spawning modded items ect. So far it works. But I'd like modded vehicles to spawn as well.
I've used my brain a bit (yeah I know it's unusual) and tinkered around with cfgeventspawns.xml to give the modded vehicle some spawn points of already existing cars (since the Olga and Gunter can sometimes spawn at the same place I thought that it couldn't really harm to have a modded car spawn instead of a vanilla one), I messed with the types.xml so the vehicle parts would spawn at industrial sites (and also re-added old vehicle's parts to also spawn at industrial sites).
As it is for now I discovered that my events.xml got reset so the vehicles wouldn't spawn... So far it seems logical right?

Do you guys know if I need to edit anything else than :
- events
- types
- cfgeventspawn
< >
Showing 1-7 of 7 comments
Styxie Oct 26, 2022 @ 11:34pm 
I am trying to do the same, did you get any replies
Liven Oct 27, 2022 @ 1:48am 
Maybe this can help you: https://www.youtube.com/watch?v=HC6lZVYo2L4&ab_channel=Emir
You can join the discord linked in the description, this guy is good at modifying xmls
Ghaleas Oct 27, 2022 @ 4:35am 
Originally posted by Liven:
Maybe this can help you: https://www.youtube.com/watch?v=HC6lZVYo2L4&ab_channel=Emir
You can join the discord linked in the description, this guy is good at modifying xmls
Thank you! However I did get my answer a long time ago and forgot to remove this thread, silly me ^^'
EliDesigns Feb 9, 2023 @ 12:30pm 
@Ghaleas

If you got the answer, could you help others out with sharing your knowledge, since I would like to do the same
Ghaleas Feb 9, 2023 @ 12:46pm 
Originally posted by EliDesigns:
@Ghaleas

If you got the answer, could you help others out with sharing your knowledge, since I would like to do the same


Of course! To spawn modded vehicles, you need to check out the event lists. One of them holds vehicle part spawns, and another holds vehicle locations. What I generally do is copy one of the vehicle's locations (For example if I am using a mod that adds a large sedan, I usually take OLGA spawn points) and one of the vehicle's spawning configuration (again, the OLGA or the SARKA are good trades because they both have 6 door panels and 4 wheels) and set the modded car items there.

For example, this is what I did with the modded Namalsk map (usually works with vanilla maps).

I opened the event.xml file which looked like so in the car spawning section :

<event name="VehicleCivilianCars">
<nominal>10</nominal>
<min>10</min>
<max>10</max>
<lifetime>300</lifetime>
<restock>0</restock>
<saferadius>200</saferadius>
<distanceradius>50</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="1" min="1" type="OffroadHatchback"/>
<child lootmax="0" lootmin="0" max="1" min="1" type="CivilianSedan"/>
<child lootmax="0" lootmin="0" max="1" min="1" type="Hatchback_02"/>
<child lootmax="0" lootmin="0" max="1" min="1" type="Sedan_02"/>
</event>

I then added the following line for one of my mods between the "Sedan_02" event and the end of the line :

<child lootmax="0" lootmin="0" max="1" min="1" type="Civilian_Vaz_2126_Blue"/>
<child lootmax="0" lootmin="0" max="1" min="1" type="Civilian_Vaz_2126"/>
<child lootmax="0" lootmin="0" max="1" min="1" type="Civilian_Vaz_2126_Red"/>
<child lootmax="0" lootmin="0" max="1" min="1" type="Civilian_Vaz_2126_Green"/>
</children>

The mod I was using was adding as you would have guessed, a Lada VAZ 2126. With this done, the new event possibilities were created.

I then opened "cfgspawnabletypes.xml". I went down to the vehicle section and found these lines :

<type name="OffroadHatchback">
<attachments chance="1.00">
<item name="HatchbackWheel" chance="1.00" />
</attachments>
<attachments chance="1.00">
<item name="HatchbackWheel" chance="1.00" />
</attachments>
<attachments chance="1.00">
<item name="HatchbackWheel" chance="1.00" />
</attachments>
<attachments chance="1.00">
<item name="HatchbackWheel" chance="1.00" />
</attachments>
<attachments chance="1.00">
<item name="HatchbackWheel" chance="1.00" />
</attachments>
<attachments chance="1.00">
<item name="CarRadiator" chance="1.00" />
</attachments>
<attachments chance="0.30">
<item name="CarBattery" chance="1.00" />
</attachments>
<attachments chance="0.30">
<item name="SparkPlug" chance="1.00" />
</attachments>
<attachments chance="1.00">
<item name="HeadlightH7" chance="1.00" />
</attachments>
<attachments chance="1.00">
<item name="HeadlightH7" chance="1.00" />
</attachments>
<attachments chance="1.00">
<item name="HatchbackDoors_Driver" chance="1.00" />
</attachments>
<attachments chance="1.00">
<item name="HatchbackDoors_CoDriver" chance="1.00" />
</attachments>
<attachments chance="1.00">
<item name="HatchbackHood" chance="1.00" />
</attachments>
<attachments chance="1.00">
<item name="HatchbackTrunk" chance="1.00" />
</attachments>
</type>

These make Lada Niva spawns and usually are about the same for all of the cars. Now I just copied it once more and replaced each part by hand to get a new set of lines that resembles to something like this :

<type name="Civilian_Vaz_2126_Green">
<attachments chance="1.00">
<item name="Sedan_02_Wheel" chance="1.00" />
</attachments>
<attachments chance="1.00">
<item name="Sedan_02_Wheel" chance="1.00" />
</attachments>
<attachments chance="1.00">
<item name="Sedan_02_Wheel" chance="1.00" />
</attachments>
<attachments chance="1.00">
<item name="Sedan_02_Wheel" chance="1.00" />
</attachments>
<attachments chance="1.00">
<item name="Sedan_02_Wheel" chance="1.00" />
</attachments>
<attachments chance="1.00">
<item name="CarRadiator" chance="1.00" />
</attachments>
<attachments chance="0.30">
<item name="CarBattery" chance="1.00" />
</attachments>
<attachments chance="0.30">
<item name="SparkPlug" chance="1.00" />
</attachments>
<attachments chance="1.00">
<item name="HeadlightH7" chance="1.00" />
</attachments>
<attachments chance="1.00">
<item name="HeadlightH7" chance="1.00" />
</attachments>
<attachments chance="1.00">
<item name="Vaz_2126_Doors_Driver_Green" chance="1.00" />
</attachments>
<attachments chance="1.00">
<item name="Vaz_2126_Doors_CoDriver_Green" chance="1.00" />
</attachments>
<attachments chance="1.00">
<item name="Vaz_2126_Doors_BackLeft_Green" chance="1.00" />
</attachments>
<attachments chance="1.00">
<item name="Vaz_2126_Doors_BackRight_Green" chance="1.00" />
</attachments>
<attachments chance="1.00">
<item name="Vaz_2126_Doors_Trunk_Green" chance="1.00" />
</attachments>
<attachments chance="1.00">
<item name="Vaz_2126_doors_Hood_Green" chance="1.00" />
</attachments>
</type>

Did that for all of the variants, and it was good to go.

Now Namalsk has a simplified vehicle system which means that vehicles all have a chance of spawning in the same spot. Can't quite remember how I did it on Chernarus but if I do remember I'll come back to you!
EliDesigns Feb 10, 2023 @ 2:42pm 
thnx for the explainations very helpfull !!
EliDesigns Feb 11, 2023 @ 2:40am 
@Ghaleas sended you a Friends request, since i still got some problems, maybe you can help out or point me into the right direction
< >
Showing 1-7 of 7 comments
Per page: 1530 50

Date Posted: May 24, 2021 @ 12:30am
Posts: 7