Question Can I edit which vehicles spawn where?

MattyDienhoff

Missing Survivor
Joined
Jan 9, 2018
Location
Adelaide, Australia
Hey Alamo! Long time no see. :D

Forgive me if this has been discussed already and I missed it, I did a quick search but then I got lazy and decided to ask instead: Is there a way edit vehicle spawns? That is, to change which vehicle spawns in each spot - say I wanted to replace some of the modern pickup spawns with Normas or pizza hatchbacks or something.

I do know how to adjust the total number of vehicles that'll spawn (MaxCars), and I always do to make cars more scarce, but it'd be fun to tweak which ones spawn as well as how many. I want to increase variety, make it harder (by making the better vehicles easier to find) and reducing the number of 'quirky' vehicles on the map, esp. in Lifeline. :p
 

Mystyk

Skilled Survivor
Staff member
Joined
Jan 9, 2018
Location
Australia
I wonder that, too. I tried editing some file but nothing changed. I love the orange Caballo and would rather see that spawn instead of half the other junk around.
Same, I know how to edit how many cars spawn in a level but not specific cars.
 

QMJS

Zed Hunter
Joined
Jan 9, 2018
Location
Eastern USA
Well, this is something I haven't actually done. But, the file that controls it is vehicle_spawns_win.markup (same name, different file for Lifeline).

It's something you probably would want to try hex editing (use something like HxD). The information inside is an array, with a list of vehicles at the end. No idea what exactly you would need to change, but it controls what vehicle spawns in a particular spot.

There is an easier method though, but not quite as powerful. You can't change a specific spawn, but you could change all instances of a particular vehicle to another type.

There are two ways to go about it.

In the contentmanager directory, find vehicles.xml

Original
<VehicleDef AccelerationRating="0.8" DurabilityRating="0.8" EntityClass="police_car" HandlingRating="0.8" Id="police_car" InventorySlotCount="6" MapIcon="VEHICLE" SeatCount="4" TopSpeedRating="1.0" Weight="1" IconId="109">
<Description Flags="" Notes="" Text="Trumbull County bought these second hand off the Feds six years ago. They still have great speed and handling. Seats four (two uncomfortably)." />
<DisplayName Flags="" Notes="" Text="Police Cruiser" />
</VehicleDef>
<VehicleDef AccelerationRating="0.4" DurabilityRating="0.6" EntityClass="sedan_old" HandlingRating="0.4" Id="sedan_old" InventorySlotCount="6" MapIcon="VEHICLE" SeatCount="4" TopSpeedRating="0.2" Weight="1" IconId="109">
<Description Flags="" Notes="" Text="This will get you where you need to go, slowly, and for a price. Four seats of unregulated fares await." />
<DisplayName Flags="" Notes="" Text="Taxi" />
</VehicleDef>

To swap all instances of a police car to a taxi, and taxi to police car, switch the EntityClass= and Id= fields around:

<VehicleDef AccelerationRating="0.8" DurabilityRating="0.8" EntityClass="sedan_old" HandlingRating="0.8" Id="sedan_old" InventorySlotCount="6" MapIcon="VEHICLE" SeatCount="4" TopSpeedRating="1.0" Weight="1" IconId="109">
<Description Flags="" Notes="" Text="Trumbull County bought these second hand off the Feds six years ago. They still have great speed and handling. Seats four (two uncomfortably)." />
<DisplayName Flags="" Notes="" Text="Police Cruiser" />
</VehicleDef>
<VehicleDef AccelerationRating="0.4" DurabilityRating="0.6" EntityClass="police_car" HandlingRating="0.4" Id="police_car" InventorySlotCount="6" MapIcon="VEHICLE" SeatCount="4" TopSpeedRating="0.2" Weight="1" IconId="109">
<Description Flags="" Notes="" Text="This will get you where you need to go, slowly, and for a price. Four seats of unregulated fares await." />
<DisplayName Flags="" Notes="" Text="Taxi" />
</VehicleDef>


I'd test it there. I am not completely sure that alone will do it.

If not, step 2 would be to find the matching xml in Game\scripts\entities\vehicles\implementations\xml\police_car.xml and Game\scripts\entities\vehicles\implementations\xml\sedan_old ands swap the <Vehicle name="police_car" and Vehicle name="sedan_old" tags between the two.

I don't think that the second part is necessary, but that is where I would look if the first step doesn't do it.
 

MattyDienhoff

Missing Survivor
Joined
Jan 9, 2018
Location
Adelaide, Australia
Sweet. That's a good lead, thanks @QMJS . :D

I forgot to mention, I could've sworn I saw a mod on the Nexus that claimed to change which vehicles spawned in each spot (even had a map showing the changes), but I didn't bookmark it at the time and when I went back to look for it I couldn't find it. It was a big difficulty overhaul sort of mod.

EDIT: I found it! "Dilemma YOSE edition" on the Nexus. Here's the map of the vehicle changes its author made, and what looks like some sort of map editor they used for that purpose. :unsure:



Under "tools used" the author wrote "SoD_win_markup (vehicle_spawns_win.markup map editor)", but I can't find any tool or utility called that anywhere. Has anyone heard of it before?
 
Last edited:

Mystyk

Skilled Survivor
Staff member
Joined
Jan 9, 2018
Location
Australia
Never heard of that mod. I'll try as QMJS suggested, though. Try, as it all looks hard šŸ˜ƒ
 

QMJS

Zed Hunter
Joined
Jan 9, 2018
Location
Eastern USA
Sweet. That's a good lead, thanks @QMJS . :D

I forgot to mention, I could've sworn I saw a mod on the Nexus that claimed to change which vehicles spawned in each spot (even had a map showing the changes), but I didn't bookmark it at the time and when I went back to look for it I couldn't find it. It was a big difficulty overhaul sort of mod.

EDIT: I found it! "Dilemma YOSE edition" on the Nexus. Here's the map of the vehicle changes its author made, and what looks like some sort of map editor they used for that purpose. :unsure:



Under "tools used" the author wrote "SoD_win_markup (vehicle_spawns_win.markup map editor)", but I can't find any tool or utility called that anywhere. Has anyone heard of it before?
He never released it. That is how I knew the markup was basically an array, It was something he wrote himself, then he sort of disappeared. I wanted that simply for the ability to turn on the 'locked' status. All it actually does is prevent driving (at story start where you need to get the keys for that first truck). The flag works, but is only set for that first truck. Being able to set them all would let me turn on/off driving when out of fuel.
I suppose someone could make a similar program to import/change/save, but I don't have the time available. Maybe that is something @chikawowwow could come up with? Or you could try to get in touch with him again, but he never really responded to me or Phacops.
 
Top