Page 1 of 2

[mod] Random spawning with spawn sharing [rspawn]

Posted: Fri Jan 13, 2017 22:44
by taikedz
Causes players to receive a spawn point anywhere on the map. Players will likely spawn veeery far from eachother into prisitine areas.

This is primarily intended to be a server mod, to encourage the independent creation of communities across the map - let players create their own cities, and trek across the map to find eachother!

Features
  • * Player is assigned randomized spawn point on joining
    - * Player will respawn at their spawn point if they die.
    -- * If `beds` spawning is active, then beds can be used to reset the players' spawn point.
    * Players will not spawn in spaces that are protected.
    * Players can open their spawn to be visited by all - effectively making custom spawn towns
    * Commands
    - * Players can return to their spawn point with the `/spawn` command if they have `spawn` privilege.
    - * Players can request a new spawn point by typing `/newspawn` if they have the `newspawn` privilege.
    - * Players can set their spawn point by typing `/setspawn` if they have the `setspawn` privelege.
    - * Players can assign a new random spawn for another player using `/playerspawn` if they have the `spawnadmin` privilege.
A `/spawn add <guestplayer>` command allows a player visit someone else's spawn using '/spawn visit <hostplayer>'. In this way, collaborative towns centred around spawns can arise!

A customizable levvy can be configured to optionally prevent uncontrolled gathering around a spawn. By default, the cost of inviting a player to your spawn is 10 cobblestones. Cheap-o.

A `/spawn town open` command allows players to open their spawn up to everybody (no levvy), so any player can visit their spawn. Any explicitlly invited guests can help manage town guests with `/spawn town <ban/unban> <town name>`.
  • * License: LGPLv3
    * Source: Github
    * Download ZIP: Zip download
    * Depends: optional: beds

Re: [mod] Random spawn points with /spawn support [rspawn]

Posted: Mon Jan 16, 2017 04:34
by KCoombes
Very nice +1

Re: [mod] Random spawn points with /spawn support [rspawn]

Posted: Tue Jan 31, 2017 18:16
by taikedz
New feature - spawn_anywhere

New players will be assigned a spawn point somewhere in the vastness of the world... and may not meet another soul for ages.... ;-)

Re: [mod] Random spawn points with /spawn support [rspawn]

Posted: Tue Jan 31, 2017 20:25
by FaceDeer
taikedz wrote:New feature - spawn_anywhere

New players will be assigned a spawn point somewhere in the vastness of the world... and may not meet another soul for ages.... ;-)

Excellent, I was thinking of suggesting something like that. :) How about a way to specify a list of "spawn regions" to be randomly picked from, so that for example you could set up a couple of different towns and have players randomly be citizens of a particular one?

Re: [mod] Randomly assigned spawn with /spawn support [rspaw

Posted: Thu Feb 02, 2017 22:58
by KongarTheTerrible
Tons of error on install?
"Runtime error from mod 'rspawn' in callback environment_Step()
builtin/common/helpers.lua:515...
init.lua:41 'newspawn'
177: in function 'func'

etc

Re: [mod] Randomly assigned spawn with /spawn support [rspaw

Posted: Fri Feb 03, 2017 00:08
by taikedz
Hmm bizarre

Check your debug.log pls and paste the actual error text?

What version of minetest?

Re: [mod] Randomly assigned spawn with /spawn support [rspaw

Posted: Fri Feb 03, 2017 12:26
by taikedz
Line 41 is a debug line, I've turned it off in the latest code version, please try that.

If you are still getting issues, you should have a debug.txt log file in your minetest folder. Go to the end of the file to find the corresponding errors, and paste the exact messages here, or open an issue on github

Re: [mod] Random spawn points with /spawn support [rspawn]

Posted: Fri Feb 03, 2017 12:29
by taikedz
FaceDeer wrote:
taikedz wrote:New feature - spawn_anywhere

New players will be assigned a spawn point somewhere in the vastness of the world... and may not meet another soul for ages.... ;-)

Excellent, I was thinking of suggesting something like that. :) How about a way to specify a list of "spawn regions" to be randomly picked from, so that for example you could set up a couple of different towns and have players randomly be citizens of a particular one?
That would be neat. Not sure I want to burden this version with yet another type of spawning though :-P

It would be fairly easily done though - maintain a table of position & radius pairs, pick one, then kick off the randomized spawn with that position as the target....

Re: [mod] Randomly assigned spawn with /spawn support [rspaw

Posted: Sat Dec 29, 2018 16:47
by taikedz
Updated - this is very much geared towards use on a server, so now the randomized spawns are generated in advance so that new players receive their spawn points instantaneously.

Re: [mod] Randomly assigned spawn with /spawn support [rspaw

Posted: Wed Jan 09, 2019 14:31
by taikedz
Further updated to support inviting other players to your own spawn.

This should allow groups of players to start their own towns/cities far away from eachother, and encourage them to find eachother by trekking the distance...!

Re: [mod] Random spawning with /spawn + invitations [rspawn]

Posted: Thu Jan 10, 2019 08:32
by bell07
Great Mod!

For reference: my startanode mod does have some similar logic but for singlenode-worlds.

Can you pls. add a settings "min_pos_x" / "max_pos_x", "min_pos_z" / "max_pos_z" or just "radius" instead of hardcoded "-30000,30000"? So the server owner can decide how far the player should spawn to each other and may leave uninhabited areas to explore.

Re: [mod] Random spawning with /spawn + invitations [rspawn]

Posted: Thu Jan 10, 2019 10:21
by taikedz
Good idea. Done. :-)

Re: [mod] Random spawning with /spawn + invitations [rspawn]

Posted: Thu Jan 24, 2019 01:00
by taikedz
I changed things up a little.

I removed the "invite" mechanism in favour of a "guestlist" mechanism. Players now add their guests anytime, and guests can visit host spawns, whilst retaining their own.

This would in theory allow free association of players, and the creation of various towns around the server.

Re: [mod] Random spawning with spawn sharing [rspawn]

Posted: Sun Jan 27, 2019 03:06
by Sokomine
taikedz wrote: I removed the "invite" mechanism in favour of a "guestlist" mechanism. Players now add their guests anytime, and guests can visit host spawns, whilst retaining their own.
Thanks!
taikedz wrote: This would in theory allow free association of players, and the creation of various towns around the server.
Is there a way to make a spawn auto-invitable for all players? And add a kick-option for other trusted players?

Re: [mod] Random spawning with spawn sharing [rspawn]

Posted: Mon Jan 28, 2019 11:02
by taikedz
Sokomine wrote:Is there a way to make a spawn auto-invitable for all players?
I'm working on that. I've added a open-towns branch which still needs testing
Sokomine wrote:And add a kick-option for other trusted players?
I've added that in the "open-towns" branch. Any explicitly added guests, who are not exiled from your spawn themselves, can kick people out of your spawn on your behalf.

You can also "/spawn exile <playername>" to get them off your turf and prevent them from '/spawn visit'-ing you again. I'm working to make it so that such players get bounced when they attempt to return.


This is quickly becoming an all-out spawn management mod :-P

Re: [mod] Random spawning with spawn sharing [rspawn]

Posted: Wed Jan 30, 2019 21:16
by taikedz
I think, at last, I can safely say that town-spawns are done. Enjoy.

Re: [mod] Random spawning with spawn sharing [rspawn]

Posted: Sun Feb 03, 2019 01:42
by Sokomine
Thank you for adding the "open to everyone" function! It feels much better to meet other players.

Re: [mod] Random spawning with spawn sharing [rspawn]

Posted: Mon Feb 04, 2019 21:03
by texmex
Taikedz, the idea and development of rspawn is brilliant, something I’ve been wanting to see happen for a long time. It seems that people are catching on to more decentralized and distributed methods of in-world governance, which is great. I’ve been following the early development of a towny mod for MT, with similar ideas. Your spawn-based single-point radius based solution seem even more intuitive though (with the caveat that players can’t found a town just anywhere but based on rspawn picks).

I’m looking for ways to make this concept more visual and collective from the start. Though I haven’t tested the mod extensively and therefore might have missed something, some questions:
  • What do you think of making the list of established spawn public so that other mods may use it?
  • How about adding a callback on spawn creation that other mods can register functions to? In my case I would then be able to place some schematics at the centerpoint of the spawn, which would add to the lore of my game.I see that you emerge the area anyway, so node placement should work, right?
  • Can the spawn search function be made configurable allowing only listed biome names? No-one wants a desert spawn :)
  • What do you think of a setting for reusing spawns for new players up to a limit of a configurable number of players? This would make sure spawns are populated yet not saturated.

Re: [mod] Random spawning with spawn sharing [rspawn]

Posted: Tue Feb 05, 2019 10:51
by taikedz
Hi texmex

Glad you like it :-)

* public listing - yes that makes sense. There's already a function to list these, so exposing it via an API call should not be an issue.
* callbacks - that would make sense too. on_spawngen (background pregeneration) and on_spawnconsume (player actually is assigned to a spawn) would be the two main ones.
* search for biome - I'm not sure how I'd do this, programmatically. I don;t think there's a minetest.identify_biome(pos) function. I could add a list of forbidden spawns, under which you could list things like "defulat:desert_sand,default:desert_sand_stone" ...?
* spawn reuse - that would conflict with guest/town functionality... how do you town-ban a player whose spawn is yours for example?

Re: [mod] Random spawning with spawn sharing [rspawn]

Posted: Tue Feb 05, 2019 12:22
by texmex
taikedz wrote:search for biome - I'm not sure how I'd do this, programmatically. I don;t think there's a minetest.identify_biome(pos) function.
Fear not! 5.0.0 is around the corner and will feature minetest.get_biome_data(pos)
taikedz wrote:I could add a list of forbidden spawns, under which you could list things like "defulat:desert_sand,default:desert_sand_stone" ...?
This would be a nice complementary feature to the one above in that it would grant more granular control of what nodes within a biome to allow/forbid.
taikedz wrote:spawn reuse - that would conflict with guest/town functionality... how do you town-ban a player whose spawn is yours for example?
Yes, this would be an alternative mechanism, more like villages/towns of players "born" into it: Some players are loony, some griefy, some responsible but they all come from the same place. This grouping would allow for building more advanced game mechanisms of co-dependance, building more types of trust. :)

Re: [mod] Random spawning with spawn sharing [rspawn]

Posted: Tue Feb 05, 2019 13:33
by taikedz
texmex wrote: Fear not! 5.0.0 is around the corner and will feature minetest.get_biome_data(pos)
Good to know... *sigh* I guess I'm going to have to gear up for the 5.0.0 change some day...! :-p
texmex wrote: Yes, this would be an alternative mechanism, more like villages/towns of players "born" into it: Some players are loony, some griefy, some responsible but they all come from the same place. This grouping would allow for building more advanced game mechanisms of co-dependance, building more types of trust. :)
I'm not inclined to add this natively to the mod... however if I start adding event driven stuff like register_on_spawnassign(playername) I could provide a default behaviour of assigning a fresh spawn, but allow overriding the behaviour.... I have a feeling this is heading in a "rearchitecting" direction :-p

Re: [mod] Random spawning with spawn sharing [rspawn]

Posted: Tue Feb 05, 2019 13:39
by texmex
taikedz wrote:I'm not inclined to add this natively to the mod... however if I start adding event driven stuff like register_on_spawnassign(playername) I could provide a default behaviour of assigning a fresh spawn, but allow overriding the behaviour.... I have a feeling this is heading in a "rearchitecting" direction :-p
I'm okay with this of course, with the right API functions provided by the mod I'll just write the logic on my own. =)

Re: [mod] Random spawning with spawn sharing [rspawn]

Posted: Tue Feb 05, 2019 15:55
by texmex
Other logic I might want to implement is distribution of classes within a spawn, so that the population becomes diverse and versatile.

Re: [mod] Random spawning with spawn sharing [rspawn]

Posted: Fri May 31, 2019 19:44
by texmex
One of the more crazier spawns =D

Image

Re: [mod] Random spawning with spawn sharing [rspawn]

Posted: Sat Jun 01, 2019 18:09
by taikedz
............ yeah it's pretty indiscriminate :-p