Page 2 of 2

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

Posted: Sat Jun 01, 2019 18:16
by taikedz
Sorry I haven't worked on this for a while. I started this project and the server it was tailored for, in Xmas 2018, and spent around 3 months doggedly maintaining it. I burned out and am still recuperating :-(

This is my sad tale of Minetest presence - a massive flurry of activity, and then a long hiatus because of burnout... has happened 3 times already....

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

Posted: Sun Jun 02, 2019 03:22
by FreeGamers
taikedz wrote: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
I may give this a test soon, it has a lot of features. Right now I'm using https://github.com/NathanSalapat/random_spawn for my survival server.

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

Posted: Mon Jun 03, 2019 09:20
by taikedz
jeremyweston wrote:I may give this a test soon, it has a lot of features. Right now I'm using https://github.com/NathanSalapat/random_spawn for my survival server.
Most welcome to :-)

I hadn't realized Nathan had had a go at this.

`rspawn` (mine) actually does the spawn point generation in advance, so players don't have to wait whilst the server emerges and searches for an adequate space.

The towns part was implemented at the request of players on Not So Simple Server ; in principle though I expect that once I get my rear in gear, I'll split those features out to a separate mod.

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

Posted: Tue Jun 11, 2019 19:05
by Sokomine
taikedz wrote: This is my sad tale of Minetest presence - a massive flurry of activity, and then a long hiatus because of burnout... has happened 3 times already....
Hm, yes, that may happen pretty easily. I do work on my mods with gaps of months or years apart depending on time and ideas.

Guess it's all fine as long as you keep comming back :-)

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

Posted: Tue Jun 11, 2019 20:35
by texmex
Once a modder, always a modder. The only way to stop is if you find a nicer game to mod instead. :D

Btw, if I haven’t said this already: this mod is great. Currently I especially appreciate the spawn_block feature which makes it a breeze to place spawn schematics via the node’s on_construct. The pre-generation feature also turns out to be crucial for a feature I’ working on.

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

Posted: Sat Jun 15, 2019 00:48
by paramat
It's a great concept. Having players spawn scattered across a world makes the evolution of a server so much more interesting and creates new possibilities. I might add such an option to MTG or the engine.

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

Posted: Sat Jun 15, 2019 05:51
by FreeGamers
paramat wrote:It's a great concept. Having players spawn scattered across a world makes the evolution of a server so much more interesting and creates new possibilities. I might add such an option to MTG or the engine.
I personally dislike spawning in survival servers that have huge towns already established. Sometimes it can take 20-30 minutes to even find an empty area with a tree to punch. Usually, you're directed to a specific area for new players which feels like a ghetto for newbies. I also dislike spawning in servers with tons of protected areas around spawn (owned by offline players) that make it so I can't interact with anything until I trek out of town. Often these towns give out free resources like food and access to safe mines to new players, which takes a lot of the struggle out of the game.

I want players to discover established communities by exploration or to have them be invited by other players to rendezvous and cooperate if they choose to. I use random spawn with a mod that limits the distance that the playertag appears in the world as well to maintain an isolation effect for newcomers. My server is still very new so I'll see if this is indeed how things manifest over time.

A random spawn should ensure that players are more scattered and are given a more traditional "in-the-wild" challenging survival experience. It also gives new players a bit of a buffer to get their own homestead and area setup for themselves. The only problem I forsee using a random spawn mod is that co-op friend players won't initially spawn together. This is alleviated with some simple communication and coordination between the players, so I don't see it as a big deal. This particular mod address that with some commands for collaboration. (I personally don't like enabling /home or /spawn commands to remove the ability to insta-teleport to safety, going deep underground should bring risk and danger to build suspense and heighten the fun of exploring and spelunking)

This type of spawning isn't for everyone. I notice some players just leave my server after spawning and being killed in the wild by mobs a few times, or by dying of thirst or hunger. Thats fine by me. The players that stick around in my server tend to be more cooperative after struggling to get setup. I think it weeds out some noobies a bit too. Its not a philosophy for everyone, but I don't like the game to be too easy or structured in the beginning. Eventually, optional peer-to-peer teleportation technology is available to players who get to mese and obsidian level of ore.

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

Posted: Sat Jun 15, 2019 15:51
by taikedz
paramat wrote:It's a great concept. Having players spawn scattered across a world makes the evolution of a server so much more interesting and creates new possibilities. I might add such an option to MTG or the engine.
Glad you like it :-) I need to whittle this down back to its core, I think it grew arms and legs a bit... I want to isolate the spawn randomizer as much as possible to its own thing, and put the town-making in a different mod... I'd be happy to redo this with a view to MTG inclusion, following the coding style an guidelines?

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

Posted: Sat Jun 15, 2019 15:51
by taikedz
jeremyweston wrote: Sometimes it can take 20-30 minutes to even find an empty area with a tree to punch. (...) tons of protected areas around spawn (owned by offline players) that make it so I can't interact with anything until I trek out of town.
I know how you feel... I actually made this mod simply because I wanted to explicitly avoid making a spawn town at all (more for lazy reasons initially!) - and also because of the problems that come with having a single spawn town... everything you outlined...
jeremyweston wrote: (I personally don't like enabling /home or /spawn commands to remove the ability to insta-teleport to safety, going deep underground should bring risk and danger to build suspense and heighten the fun of exploring and spelunking)
Yes I did note that this could be an issue for some. Ability to turn off the /spawn command itself is perhaps something I'd add.
jeremyweston wrote: The players that stick around in my server tend to be more cooperative after struggling to get setup. I think it weeds out some noobies a bit too.
This was another concern I had with my old server. I paired this with a chat mod to prevent long-distance chatting so that people who joined and started begging for free stuff would have no real option other than to either fend for themselves or go to another server.

It was an artificial way of "raising the bar." Once I implemented "towns" though, it was possible to entirely subvert that ; but the mechanism currently in the mod allows the owner of the opened spawn to moderate their space on their own. No admin required :-)

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

Posted: Sat Jun 15, 2019 19:12
by texmex
I’m back on the issue of (forced) distribution of new players between existing spawn points. Any ideas on how to proceed? I’m thinking new players should be put on spawns with fewer members to even out the population but at the same time the spawn point would need online players to welcome the new player. I sense that herein would be a conflict because the more spawn points the higher demand on players being online…

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

Posted: Mon Jun 17, 2019 10:24
by taikedz
Part of the idea was to allow "self-managing spawn towns" ("spowns"??) -- so demands on players to manage their own spawn towns is not so bad.

For the distribution... I'd nearly say that would be an entirely different mod (made for compatibility with this one, perhaps). One could try tracking which spowns have the most regularly-returning players and choosing from that list (heuristic to be defined). Or, a new player could be offered a choice of which spown to join on first joining the server.

Or simply distribute evenly -- then, "spowns" are defined by the presence of a "spown stone" which players can use to jump between them. They can manually choose to join a different spown once, after which changing spown costs, some admin-defined price (idk, say, 10 mese blocks).

Mechanisms abound. I'd even go so far as to add hooks to this mod for other people to implement the distribution logic separately...

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

Posted: Mon Jun 17, 2019 10:25
by taikedz
Yeah. Spowns. Bite me.

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

Posted: Mon Jun 17, 2019 16:20
by texmex
taikedz wrote:I'd even go so far as to add hooks to this mod for other people to implement the distribution logic separately...
That sounds very good :)

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

Posted: Mon Oct 11, 2021 18:01
by mcaygerhard
UPDATE: all issues were solved upstream

i installed the mod, start a server and everythinhg is fine.. before anything the hardware are 8 cores xeon, 8G RAM and SSD disk, remove AWS server with debian 9 powered, at subs.fusilsystem.com (yes is the sub nasa no rulez server, only for braves)

finally after months of use we had to remove this mod because a poor behaviour performance.. After a while, if the area is small it is exhausted to find free points in the area for a new spawn point, and if it is very large the server is unable to handle the memory for the lua engine https://github.com/taikedz-mt/rspawn/issues/6

Code: Select all

Oct 10 17:53:39 venenux-server minetestserver: 2021-10-10 17:53:39: [Server]: [rspawn] DEBUG : Trying somewhere around (0,0,0)
Oct 10 17:53:39 venenux-server minetestserver: 2021-10-10 17:53:39: [Server]: [rspawn] DEBUG : Searching (-96,0,-96) to (96,192,96)
Oct 10 17:53:39 venenux-server minetestserver: 2021-10-10 17:53:39: ERROR[Main]: ServerError: AsyncErr: environment_Step: Runtime error from mod 'rspawn' in callback environment_Step(): ...ib/games/minetest/games/venenux/mods/rspawn/init.lua:74: find_nodes_in_area(): area volume exceeds allowed value of 4096000
Oct 10 17:53:39 venenux-server minetestserver: 2021-10-10 17:53:39: ERROR[Main]: stack traceback:
Oct 10 17:53:39 venenux-server minetestserver: 2021-10-10 17:53:39: ERROR[Main]: #011[C]: in function 'find_nodes_in_area'
Oct 10 17:53:39 venenux-server minetestserver: 2021-10-10 17:53:39: ERROR[Main]: #011...ib/games/minetest4/games/venenux/mods/rspawn/init.lua:74: in function 'newspawn'
Oct 10 17:53:39 venenux-server minetestserver: 2021-10-10 17:53:39: ERROR[Main]: #011...minetest4/games/venenux/mods/rspawn/lua/pregeneration.lua:33: in function 'func'
Oct 10 17:53:39 venenux-server minetestserver: 2021-10-10 17:53:39: ERROR[Main]: #011/usr/share/minetest4/builtin/common/after.lua:18: in function </usr/share/minetes4t/builtin/common/after.lua:4>
Oct 10 17:53:39 venenux-server minetestserver: 2021-10-10 17:53:39: ERROR[Main]: #011/usr/share/minetest4/builtin/game/register.lua:420: in function </usr/share/minetest4/builtin/game/register.lua:400>
Oct 10 17:53:39 venenux-server minetestserver: 2021-10-10 17:53:39: ERROR[Main]: stack traceback:
Oct 10 17:57:30 venenux-server minetestserver: 2021-10-10 17:57:30: [Main]: Automatically selecting world at [/var/lib/games/minetest/worlds/venenuxharcore]
1. of course the excees value of area is cos we try to enhanced the size of the area.. but the mod does not take in consideration that when minetest uses database for auth, still there are a txt files that defines old map and auth, so setting still are cached or something i dont known
2. after removes the mod there's no more crash of the server around memory exausted

i will post this at the github issues but in more details

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

Posted: Wed Oct 27, 2021 15:29
by mcaygerhard
@taikedz updated the mod and nows is most performed! well a quite bit

git was updated: changelog:

* fix for CONTENT_IGNORE errors cos try to replace already defined node with nil
* prevent infinite recursion in set_newplayer_spawn
* fix the big area search by limit the altitude due it multiplies twice and generated a big area

In human beings words.. this changes fixed some errors like a custom block below the player when respawns, if ws not defined, generated a error in server that in some circumstances crash the hole server, it also solves a performance hit due a big area generation when search for places to respawn and set a new spawn request in big servers..

This mod performs very well in normal mid to little servers, still this mos must be high tested in big servers but for the moment in my very big one VenenuX sub.nasa-g0v it not crash anymore!

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

Posted: Wed Oct 27, 2021 22:57
by taikedz
mcaygerhard wrote:
Wed Oct 27, 2021 15:29
@taikedz updated the mod and nows is most performed! well a quite bit

git was updated: changelog:

* fix for CONTENT_IGNORE errors cos try to replace already defined node with nil
* prevent infinite recursion in set_newplayer_spawn
* fix the big area search by limit the altitude due it multiplies twice and generated a big area

In human beings words.. this changes fixed some errors like a custom block below the player when respawns, if ws not defined, generated a error in server that in some circumstances crash the hole server, it also solves a performance hit due a big area generation when search for places to respawn and set a new spawn request in big servers..

This mod performs very well in normal mid to little servers, still this mos must be high tested in big servers but for the moment in my very big one VenenuX sub.nasa-g0v it not crash anymore!
Thanks for posting and updating 😊

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

Posted: Thu Oct 28, 2021 03:06
by mcaygerhard
taikedz wrote:
Wed Oct 27, 2021 22:57
Thanks for posting and updating 😊
update the main first post.. curently i has several problems for the auth redux mod.. got an error in db.lua.. the migration of the data spected some values that seems corrupted .. i will lost my user base snif sniff ..

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

Posted: Fri Jul 22, 2022 03:04
by mcaygerhard
taikedz wrote:
Wed Oct 27, 2021 22:57
Thanks for posting and updating 😊
hi @taikedz i upgraded adn change the rspawn way of the mod.. try many ways and debug with more than 20 players at time.. including cheaters.. at the sub nasa gov.. i finally get to work stable and its pretty well

https://t.me/s/venenux_games/141 and taikedz i have two PR if you have some time to i can close it and made new one.. with my working changes .. tomorrow i wil update the code to improve the block spawn (able to do not use by settings, it makes dirty the spawn already build XD )