Results 1 to 5 of 5

Thread: [Mod] Fixed Spawn Points in rwg

  1. #1
    Colony Founder StompyNZ's Avatar
    Join Date
    Apr 2015
    Posts
    3,858
    Rep Power
    1

    [Mod] Fixed Spawn Points in rwg

    https://github.com/7D2DSDX/Mods/tree...xedSpawnPoints

    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.

    Code:
      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.

  2. #2
    Guppycurian Forum Whore Guppycur's Avatar
    Join Date
    Apr 2014
    Location
    Enemy for life
    Posts
    19,243
    Rep Power
    1
    Sample xml ideas?

  3. #3
    Colony Founder StompyNZ's Avatar
    Join Date
    Apr 2015
    Posts
    3,858
    Rep Power
    1
    im still looking for ideas on how to configure it

    Could read some xml or just use defaults and set up via commands
    Last edited by StompyNZ; 03-24-2018 at 05:50 AM.

  4. #4
    Colony Founder StompyNZ's Avatar
    Join Date
    Apr 2015
    Posts
    3,858
    Rep Power
    1
    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

  5. #5
    Colony Founder StompyNZ's Avatar
    Join Date
    Apr 2015
    Posts
    3,858
    Rep Power
    1
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •