• If you have a mod, tool or prefab, please use the Resources section. Click Mods at the top of the forums.

RWG spawn locations

Crater Creator

Community Moderator
Is it possible to make the player spawn in a specific location for a single player, RWG game?

I'm making a lot of fine tweaks to the RWG mixer (finer than the previewer will show), and I'd like to always spawn in the same spot. I know I can teleport after I spawn. But if I could always spawn there directly, I wouldn't have to wait for the world to generate around whatever random position at which it spawns me, and then wait for it to generate again after the teleport.

 
Drat! Well thanks for the response. It seems my turnaround time from tweaking the .xml to seeing the results in game isn't going to get under two minutes then.

 
I'm just working on a patchscript that will let you set a spawn point for medi mod, but it will work for other mods too :)

 
Not sure this will work, but I have a way which I wanna test after getting some free time.

The idea is to generate the spawnable biome only where exists specific area in whole world.

Set all block CanPlayersSpawnOn=false excepting a few block which exists only in this biome.

The easiest way to restrict biome generation area is distance_from_center in biome_spawn_rule.

Although, you can restrict more specific by using Cylinder in biome_generator, such as 100 block circle from (500,500).

 
ok, I have a working patch script if you were willing to try an sdx mod ;)

it lets you set the spawn location, and optionally have a radius. Will post it in a bit

 
Haven't tried playing around with this... but...

Code:
<spawnpoints>
   <spawnpoint position="1000,0,-1000" rotation="0,45,0"/>
<spawnpoint position="-1000,0,-1000" rotation="0,315,0"/>
   <spawnpoint position="-1000,0,1000" rotation="0,135,0"/>
   <spawnpoint position="1000,0,1000" rotation="0,225,0"/>

<spawnpoint position="0,0,-1000" rotation="0,0,0"/>
<spawnpoint position="-1000,0,0" rotation="0,180,0"/>
<spawnpoint position="0,0,1000" rotation="0,270,0"/>
<spawnpoint position="1000,0,0" rotation="0,90,0"/>
</spawnpoints>
That's in /data/worlds/random gen/spawnpoints.xml

I would guess, if you delete a ton of those and set co-ordinates, you'll spawn in the same place every time.

 
Haven't tried playing around with this... but...

Code:
<spawnpoints>
   <spawnpoint position="1000,0,-1000" rotation="0,45,0"/>
<spawnpoint position="-1000,0,-1000" rotation="0,315,0"/>
   <spawnpoint position="-1000,0,1000" rotation="0,135,0"/>
   <spawnpoint position="1000,0,1000" rotation="0,225,0"/>

<spawnpoint position="0,0,-1000" rotation="0,0,0"/>
<spawnpoint position="-1000,0,0" rotation="0,180,0"/>
<spawnpoint position="0,0,1000" rotation="0,270,0"/>
<spawnpoint position="1000,0,0" rotation="0,90,0"/>
</spawnpoints>
That's in /data/worlds/random gen/spawnpoints.xml

I would guess, if you delete a ton of those and set co-ordinates, you'll spawn in the same place every time.
Sadly that's not working no longer, since 5 or more alpha before.

 
I think if the game cannot find a suitable spawnpoint (a biome that allows players to spawn in) it will dump him at 0,0 instead. Thats what I have been using to make people spawn in the map center in Horde Mode. Downside is that it also removes respawning, dumping players where they have died instead.

I think if you would make all blocks except for a small bunch not allow spawns it would most likely result in this as well, unless it happens to randomly select the spot you wanted instead.

Its like a world with only wasteland and some patches of water biome, sometime the player will spawn in such a water biome if happens to be at the correct spot, otherwise the player gets deposited in 0,0.

But it could be worth a test, but I think it would probably require a edit to the spawn code.

I hope A17 these things (spawn points, additional biomes, road smoothing etc) will be exposed in the xmls.

 
yeah the default spawnpoint is Undef which is vector3.zero

I had my script working, but tried some other stuff and broke it... I'll post it later today once I get a few bits working better on it

 
Back
Top