Project Zomboid

Project Zomboid

Tread's Military Vehicle Zone Defs (Spawns) [41.65+]
 This topic has been pinned, so it's probably important
Trealak  [developer] 1 Feb, 2022 @ 2:37pm
Technicalities
Game sees this mod as 2 things: as a map mod and as a vehicle spawn list.

Map mod part is a bit "fake". Mod includes no proper map and does not overwrite anything. I needed it only to define new zones, which I did fully via lua code (normally mappers use map editors to create new map and define such zones for it). My idea was simple "what would happen if I make a map mod, without a map and leave only new zone definitions in it". It turned out that this approach worked and allowed me to add zones to Native map (which normally is uneditable for modders).

Vehicle spawn list part is also not a classical spawn list like regular vehicle mods use. I made new vehicle spawn group definitions as usual but instead of assigning cars to them I wrote special filter/splitter function. The function "grabs" all already loaded vehicle types assigned to either "military" (mods) or "army" (native code) groups and places them in custom groups I prepared. All the vehicles stay in original groups as well. This way my spawns should work alongside any spawns defined on custom maps.

At the moment [version 41.65], native "army" spawn group is empty and I assign all "military" group vehicles to it. This approach allows game to spawn vehicles in already defined "army" parking spots. In detail, "army" list is merge of "army" and "military" list so if TIS releases any Native army vehicles list will contain them as well.

The filter/splitter function depends completely on mask lists I defined. I added to them all the suitable vehicles I was aware of at the time of writing this mod. Should you know of other suitable candidates please suggest.

Zones available in this mod:
  • army - default, NATIVE zone used for army vehicles- Some instances are placed on NATIVE map (as of v. 41.65) but not used yet (no vehicle spawns defined),
  • military - default military zone used by many mods and on many custom maps,
  • military_light_veh - my custom zone for Light Military Vehicles (everything except trailers, BIG trucks, APCs, Tanks etc.), all "unsorted" vehicles from "military" also count in here,
  • military_light_trailers - my custom zone for Light Military Trailers (reasonable in size),
  • military_heavy_veh - my custom zone for Heavy Military Vehicles (BIG Trucks, APCs, Tanks etc.),
  • military_heavy_trailers - my custom zone for Heavy Military Trailers (semi-trailers, long trailers etc.),
  • military_burnt - my custom zone for Destroyed Military Vehicles,
  • military_light - my custom zone = military_light_veh + military_light_trailers,
  • military_heavy - my custom zone = military_heavy_veh + military_heavy_trailers,
  • military_vehicles - my custom zone = military_light_veh + military_heavy_veh (all Military Vehicles, NO Trailers),
  • military_trailers - my custom zone = military_light_trailers + military_heavy_trailers (all Military Trailers, NO Vehicles),
  • military_chaos - my custom zone = All Army & Military Vehicles & Trailers at random angle and with higher damage chance.
Last edited by Trealak; 1 Feb, 2022 @ 3:37pm
< >
Showing 1-4 of 4 comments
G-t01l3t. 4 Feb, 2022 @ 1:13am 
Hey, I just read this through - you have a really practical and well-thought out mod!

I really appreciate how informative and organized this write up was as well.

This for example: ---> "At the moment [version 41.65]...will contain them as well", is gonna be super awesome.

Really interesting how there is already pre-existing/ defined zones for "army" and yet no vehicles have been assigned to army yet. Small marks of an E.Access game but forward thinking of them to have the zones out first so modders/ they themselves can get to vehicle spawns later.

Cheers and best wishes for the development of this mod!
Trealak  [developer] 4 Feb, 2022 @ 2:57am 
Hey LeZom Boid Jamez,
thanks for the good word! I hope you'll enjoy the mod and I would be really grateful for feedback. I would like to fix any bugs found and receive balance feedback (as well as suggestions) so I can work on it a bit more and at some point consider it finished. Still mod is not very popular yet and feedback is rather non-existent ;).
G-t01l3t. 4 Feb, 2022 @ 1:34pm 
I'll keep my eyes open.

Some thoughts about what a user might practically look for(?):

- Checking and paying attention to any military/ army vehicles (both mod and vanilla) spawning in areas that they should NOT be.
- Recognising a 'military zone' during game play, making sure that it does spawn ONLY all military vehicles; check for balance - maybe too many OP vehicles showing up in one area for example.
- Check for military vehicles(mod + vanilla) showing up in 'non-military' areas that could use your mask lists amended to them


I use quite a number of vehicle mods; some of them military style, so I'll definitely look out for spawn areas of those if the session deems me to come across a zone.


Question: I play on Vehicle Stories on the most common setting, does this affect your mod?


Let us know if there's anything else specific we could be looking for because this is one of those ones that you kind of have to pay attention to in order to realize what could be better or if something is wrong (cause as you said, before this mod there was NO vanilla vehicles coded to spawn in those military zones that you mentioned in your OP.) And even when things go right, it's easy for the user to imagine that it was a vanilla feature, or that the vehicle's mod author set it up, or (most likely) they don't even pay attention and take it for granted so as to not take themselves out of immersion.

:Thedead: Take it easy! :Thedead:
Trealak  [developer] 4 Feb, 2022 @ 1:56pm 
Answer: Vehicle Stories should not affect my mod at all - I do not use them so any you see is native.

You make quite good points and balance wise it is exactly what needs attention. Nonetheless, we have to keep in mind that not all military vehicles spawned will be result of my mod. I do not alter mods spawning lists, so they will also spawn, as vehicle mod creator designed.

Since there were no "military" spawns so far, most modders set some chances to spawn their vehicles in many native areas (trailer parks, junk yards and even regular parking stalls). Most of vehicles spawning there will not be result of my mod.

Second thing to keep in mind is that I placed a few military spawns in non-military locations. Reasoning behind it is that in chaos things happen - someone went AWOL to save his family, got stranded on roadside, got order to bring VIP from his house, became zombie while shopping and his ride stayed in parking lot etc. ;) Still those spawns are rather few.

Last thing is the fact that I made "light" military vehicles a special type (like police cars etc.) so they have chance of showing up in regular parking spots.

I think that proper assessment of this mod, out of debug mode would be rather hard. In debug you can however press F2 and inspect whether this spawn location belongs to any of my spawn groups (see screenshots for how it looks like in-game)
< >
Showing 1-4 of 4 comments
Per page: 1530 50