Jump to content

[Mod] Fixed Spawn Points in rwg


Recommended Posts



This little mod provides the required bits to be able to define a specific spawn point in rwg maps


the repo is set up for 0 0 facing 0 at terrain level +1, but will place you on the first air gap upwards if that spot is filled.


 public static bool useFixed = true;
 public static Dictionary<Vector2, float> fixedSpawnList = new Dictionary<Vector2, float> {{new Vector2(0, 0), 0f}};


the 'useFixed' param toggles using the static spawn, or the vanilla random point selection method. I made a small change to the vanilla method, if for some reason the 50 attempts to find a spawn within 500 to 2500 of a backpack fails, vanilla will then loop the entire spawn point list and then return the last item, whereas with the change it will find the nearest point to the backpack. The chances of hitting that code are pretty low so not a big deal.


Change the vector2 in 'fixedSpawnList' to change the x and z of the spawn point, and the 0f is the facing rotation.


You could add more entries to the list and select one at random or based on other options.


In a future version i'll add the ability to use a console command to set the spawn point etc and add a radius and other options.

Link to comment
Share on other sites

A few options that come to mind:


Spawn at a single set location.

Spawn at a random location within an area.

Spawn in a certain biome only (vanilla excludes biomeId 7, 8, 11, 12 already)

Spawn at a random location from a list of locations

Link to comment
Share on other sites

So the default spawn list is generated as each hub cell is created. any new hub cell being added will merge with the existing list then the whole thing shuffled. It has a grid of spawns but excludes anything within a certain distance of a hub, or a wilderness poi.


So the last spawn point on the list could end up being anywhere, but if you die deep in a massive wasteland biome it would trigger the last item on list code and always spawn you at the same spot.

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...