Hi,
I want to add new vehicles, but don’t know how to make them spawn in game. There are a file like item_groups.json for vehicles, they spawn randomly, or the spawn is harcoded?
Thanks in advance.
Hi,
I want to add new vehicles, but don’t know how to make them spawn in game. There are a file like item_groups.json for vehicles, they spawn randomly, or the spawn is harcoded?
Thanks in advance.
This. Look into mapgen.cpp and mapgen_functions.cpp and search for add_vehicle. That function places the vehicles (using their id). You’ll have to add more add_vehicle calls with the id of your vehicles.
For now I have only modified json archives, and I’m not sure how to find the cpp ones. I have to compile the game? I have downloaded the source, but it’s an old version (0.6).
I have found the current version in the compilation post in this forum. I will try it, thanks.
You will have to compile once you’ve made your changes; that’s correct.