Server ops need an actual "set spawn" command.

SwervingLemon
New member
 
Posts: 2
Joined: Sat Nov 02, 2019 20:32

Server ops need an actual "set spawn" command.

by SwervingLemon » Sat Nov 02, 2019 20:48

I've been trying new seeds for about half an hour now, trying to find a nice one for my players.
Some notes:
1. I have either really bad luck of the default engine LOVES snow. I'd say about two-thirds of my attempts have resulted in snowy wonderlands that go on for kilometers.
2. Any seed is actually great - if I scout it for a bit, I tend to find a good triple intersection of biomes but that leads to the real problem.
3. There's no /setspawn command in the absence of Traxie's mod. Solutions I've seen work by setting everyone's static spawn which, if I'm not mistaken, over-rides the bed-down method and would displace players' personalized spawn point when all I want to do is set the starting spawn point/area for new players so they aren't spawning into, for example, a seemingly endless, snow-capped desert.
There's a ton of benign and useful server admin tools that I would hope would have found their way into the base build after six years.
Can we please get a bit of initial server config built in to the base program (or poke Traxie with a stick so he updates ServerEssentials)?
Also - the ability to keep the current mod config but change the seed and rebuild a new world would be awesome.
 

User avatar
jas
Member
 
Posts: 467
Joined: Mon Jul 24, 2017 18:15
GitHub: jastevenson303
IRC: jas_
In-game: jas

Re: Server ops need an actual "set spawn" command.

by jas » Sun Nov 03, 2019 05:56

That is a good idea.

Code: Select all
minetest.register_chatcommand("setspawn", {
        description = "Set server spawnpoint",
        privs = "server",
        params = "[save]",
        func = function(name, param)
                local player = minetest.get_player_by_name(name)
                if not player then
                        return false, "Must be in-game!"
                end

                local pos = player:get_pos()
                if param == "save" then
                        minetest.settings:set_string("static_spawnpoint",
                                        minetest.pos_to_string(pos))
                        return true, "Set spawn position"
                end
                return false, "Use /setspawn save"
        end,
})


Did not test. "/setspawn save" should persist the setting.

Ps. You are correct, bed mods checks for "respawn" setting, and if set (default on?) it will spawn player at their bed. It's easy, in beds mod, to modify this. Or you can disable the setting.
2009-10-7 02:04:55: ACTION[Server]: jas activates
 

User avatar
Hume2
Member
 
Posts: 356
Joined: Tue Jun 19, 2018 08:24
Location: Czech Republic
GitHub: Hume2
In-game: Hume2

Re: Server ops need an actual "set spawn" command.

by Hume2 » Sun Nov 03, 2019 11:03

Is your mapgen set properly? When no values are provided, mapgen sometimes doesn't use default values but a total mess instead. So try setting the values explicitly.
If you lack the reality, go on a trip or find a job.
 

micheal65536
Member
 
Posts: 142
Joined: Mon May 22, 2017 20:27

Re: Server ops need an actual "set spawn" command.

by micheal65536 » Sun Nov 03, 2019 14:16

Make a note of the co-ordinates of the point that you want to be the spawn point. For the X and Z co-ordinates, round to the nearest whole number. The Y co-ordinate should end in 0.5 - if it doesn't, make sure you are standing on the ground. Then add the line static_spawnpoint = (X,Y,Z), substituting your co-ordinate values in place of "X", "Y", and "Z", to the minetest.conf file for the Minetest installation that you're going to use to run the server. Make sure that there are no spaces after the commas between the values. This will apply to all worlds that you play with that Minetest installation so you'll probably want a separate Minetest installation just for the server (which you should do anyway because there are other server options that you'll probably also need to set in mintest.conf).

This shouldn't override bed spawns and should be compatible with other mods that might set per-player spawn points.
 

SwervingLemon
New member
 
Posts: 2
Joined: Sat Nov 02, 2019 20:32

Re: Server ops need an actual "set spawn" command.

by SwervingLemon » Mon Nov 04, 2019 00:33

Hume2 wrote:Is your mapgen set properly? When no values are provided, mapgen sometimes doesn't use default values but a total mess instead. So try setting the values explicitly.


Fair point. I'll have to give that a shot. It's v7 and I admittedly have never played with it's settings.
 

User avatar
Hume2
Member
 
Posts: 356
Joined: Tue Jun 19, 2018 08:24
Location: Czech Republic
GitHub: Hume2
In-game: Hume2

Re: Server ops need an actual "set spawn" command.

by Hume2 » Mon Nov 04, 2019 06:49

SwervingLemon wrote:
Hume2 wrote:Is your mapgen set properly? When no values are provided, mapgen sometimes doesn't use default values but a total mess instead. So try setting the values explicitly.


Fair point. I'll have to give that a shot. It's v7 and I admittedly have never played with it's settings.

Just hitting each option and clicking "Save" without changing anything should work. Once I heard from one guy that whole the world consisted of silver sand beaches. He also was never playing with mapgen settings before. We did this and everything was fine since then.
If you lack the reality, go on a trip or find a job.
 

User avatar
Pyrollo
Member
 
Posts: 325
Joined: Mon Jan 08, 2018 15:14
Location: Paris
GitHub: pyrollo
In-game: Naj

Re: Server ops need an actual "set spawn" command.

by Pyrollo » Mon Nov 04, 2019 09:17

SwervingLemon wrote:3. There's no /setspawn command

In my opinion, this command is useless. It would be used only once or twice in the server's life and can be done by editing minetest.conf file as micheal65536 told. In addition, you can specify which minetest.conf to use when launching minetestserver command. This allows to have per server configuration (and spawn point).
[ Display Modpack ] - [ Digiterms ] - [ Crater MG ] - [ LATE ]
 

MoNTE48
Member
 
Posts: 263
Joined: Sat Apr 06, 2013 11:58
GitHub: MoNTE48
In-game: MoNTE48
 

User avatar
paramat
Developer
 
Posts: 3456
Joined: Sun Oct 28, 2012 00:05
Location: UK
GitHub: paramat
IRC: paramat

Re: Server ops need an actual "set spawn" command.

by paramat » Sat Nov 16, 2019 00:31

> I'd say about two-thirds of my attempts have resulted in snowy wonderlands that go on for kilometers.

It sounds like you are using MTGame.
MTGame from 5.0.0 onwards has a 'spawn' mod that only spawns players in 'friendly' biomes:
"taiga"
"coniferous_forest"
"deciduous_forest"
"grassland"
"savanna"
Only one of those is snowy.
Even if the spawn mod is not functional for some reason, much more than 50% of the land area is non-snowy.

> Is your mapgen set properly? When no values are provided, mapgen sometimes doesn't use default values but a total mess instead.

No, this does not happen, the default values are obviousky automatically applied, that is what 'default' means.
A mess means the user has altered something somehow.

> Just hitting each option and clicking "Save" without changing anything should work.

This is unnecessary. It would also have no effect as you would be re-saving the current value.

> Once I heard from one guy that whole the world consisted of silver sand beaches. He also was never playing with mapgen settings before.

This guy had clearly altered something to get that result.
If what you stated was true this would have been reported in the issue tracker at Github.
 

User avatar
Hume2
Member
 
Posts: 356
Joined: Tue Jun 19, 2018 08:24
Location: Czech Republic
GitHub: Hume2
In-game: Hume2

Re: Server ops need an actual "set spawn" command.

by Hume2 » Sat Nov 16, 2019 08:48

paramat wrote:> Is your mapgen set properly? When no values are provided, mapgen sometimes doesn't use default values but a total mess instead.

No, this does not happen, the default values are obviousky automatically applied, that is what 'default' means.
A mess means the user has altered something somehow.

Yes, this does happen. Sometimes the default values aren't applied. The values in the mapgen don't seem to be initialised correctly when the option is not set explicitly which results in using a mess instead.

paramat wrote:> Just hitting each option and clicking "Save" without changing anything should work.

This is unnecessary. It would also have no effect as you would be re-saving the current value.

This really has an effect. Before doing so, the values aren't listed in minetest.conf at all. After doing that, they are listed here and are set to the default values.

paramat wrote:> Once I heard from one guy that whole the world consisted of silver sand beaches. He also was never playing with mapgen settings before.

This guy had clearly altered something to get that result.
If what you stated was true this would have been reported in the issue tracker at Github.

No, he didn't. He didn't even know that such options exist. While I was browsing the settings, everything seemed to be normal. I didn't change any of the displayed numbers, I just clicked "Save". And it worked.
I didn't report this to github yet because of lack of information on how to reproduce this.
If you lack the reality, go on a trip or find a job.
 

micheal65536
Member
 
Posts: 142
Joined: Mon May 22, 2017 20:27

Re: Server ops need an actual "set spawn" command.

by micheal65536 » Sun Nov 17, 2019 20:38

Hume2 wrote:Yes, this does happen. Sometimes the default values aren't applied. The values in the mapgen don't seem to be initialised correctly when the option is not set explicitly which results in using a mess instead.

Hume2 wrote:This really has an effect. Before doing so, the values aren't listed in minetest.conf at all. After doing that, they are listed here and are set to the default values.

It's normal for the values not to be listed in minetest.conf. The mapgen parameters are saved per-world in map_meta.txt inside the world directory (which includes not only modified values but also the default values at the time that the world was created). I've never come across mapgen parameters in minetest.conf and honestly I didn't even know that this was possible (nor would I recommend it).
 

User avatar
Hume2
Member
 
Posts: 356
Joined: Tue Jun 19, 2018 08:24
Location: Czech Republic
GitHub: Hume2
In-game: Hume2

Re: Server ops need an actual "set spawn" command.

by Hume2 » Mon Nov 18, 2019 06:57

micheal65536 wrote:It's normal for the values not to be listed in minetest.conf. The mapgen parameters are saved per-world in map_meta.txt inside the world directory (which includes not only modified values but also the default values at the time that the world was created). I've never come across mapgen parameters in minetest.conf and honestly I didn't even know that this was possible (nor would I recommend it).

You can then compare the values in map_meta.txt and the default values. And when such bug occurs, you get that the values in map_meta.txt are way different.
If you lack the reality, go on a trip or find a job.
 


Return to Feature Discussion



Who is online

Users browsing this forum: No registered users and 1 guest