Sign in to follow this  
xFleury

How do I get my server to automaticallly reset when empty?

Recommended Posts

xFleury    0

I noticed my server regenerates when everyone is dead, but I want it to also regenerate if everyone leaves. Is that a server-side mod?

Share this post


Link to post
Share on other sites
Daniel86268    286

Not sure why anyone would want that, because that makes everyone start over all the time.

(Just imagine you play with some peeps, everyone takes a pee break and leaves for a minute to not get killed by a random hound attack, and you have to start over.)

But I guess to each their own, here ya go.

(And yes, it's a server mod.)

Share this post


Link to post
Share on other sites
xFleury    0

My server is being left empty in either winter/spring/summer, and almost no one wants to start the game in those seasons. Periodically, I'm manually resetting the server back to day 1, and the moment I do that, the server fills up with players.

I saw that "Reset on Empty" mod, but it hasn't been updated since 2015, and there's a guy saying that he's had it reset the server while he was transitioning into a cave. I'm skeptical that that is what the other server admins are using.

Share this post


Link to post
Share on other sites
Daniel86268    286
15 hours ago, xFleury said:

My server is being left empty in either winter/spring/summer, and almost no one wants to start the game in those seasons.

Fair enough.

15 hours ago, xFleury said:

it hasn't been updated since 2015, and there's a guy saying that he's had it reset the server while he was transitioning into a cave.

Just try it out then. Just add it to your server, launch it, and test a few scenarios, such as traveling to the caves, etc.

Share this post


Link to post
Share on other sites
xFleury    0

I asked the guy who's hosting all the "DST United States" servers (there's about 10 of them) what he's using to reset them, and he said he's manually resetting them.

On 2/12/2019 at 10:45 PM, linweiqing said:

 

捕获.PNG

Your post isn't self explanatory; is the highlighted part a change that needs to get made, or are you just emphasizing that the mod *should* work?

Share this post


Link to post
Share on other sites
cezarica    426

The #AllPlayers is defined outside of the scope of the code he used. Based on last comment apparently it doesn't take into consideration people that are transitioning between the two shards so I would go with a:

if #TheNet:GetClientTable() == 1 then


instead of the one highlighted line above. This should work for dedicated servers not player hosted servers, I mean those where [Host] is listed as a player.

Edited by cezarica

Share this post


Link to post
Share on other sites
CarlZalph    2,495
9 hours ago, cezarica said:

The #AllPlayers is defined outside of the scope of the code he used. Based on last comment apparently it doesn't take into consideration people that are transitioning between the two shards so I would go with a:


if #TheNet:GetClientTable() == 1 then


instead of the one highlighted line above. This should work for dedicated servers not player hosted servers, I mean those where [Host] is listed as a player.

This is what I used to use:

local activeplayercount = #(TheNet:GetClientTable() or {}) - (TheNet:IsDedicated() and 1 or 0)

 

  • Like 1

Share this post


Link to post
Share on other sites
linweiqing    3
On 2019/2/15 at 11:43 AM, xFleury said:

I asked the guy who's hosting all the "DST United States" servers (there's about 10 of them) what he's using to reset them, and he said he's manually resetting them.

Your post isn't self explanatory; is the highlighted part a change that needs to get made, or are you just emphasizing that the mod *should* work?

Well, the following reply has already told you what I want to say.:p:wilsondisappointed:

Share this post


Link to post
Share on other sites
cezarica    426
17 hours ago, CarlZalph said:

This is what I used to use:


local activeplayercount = #(TheNet:GetClientTable() or {}) - (TheNet:IsDedicated() and 1 or 0)

 

I see what you did there. Nice trick. :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this