Friendlier time posting in messages and UISuggestion

If I use the command 'srestart restart 1800', the chat message will say the server is restarting in 1800 seconds.

Players are not going to understand how long 1800 seconds are and shouldn't have to do math in their heads. This is the same for the UI.

Could you please provide friendlier times? For instance 1800 = 30 minutes or 5400 = 1 hour 30 minutes. This will be much friendlier and players will better understand how long it will be until restart,.

That was one of the concerns I had while developing, and I came out with conclusion that most players (including myself) won't bother thinking about how much time exactly it is. They would just look at the number and have a approximate understanding if its soon or not. Plus as soon as the countdown reaches the value in config, it starts to be printed out, with increasing speed while it gets closer to zero, so I think players won't miss the point where they should be heading to the safe location. Let me know if I'm being wrong here, surely I can implement different messages.

2nPs7BoIlVmWZu9.png 2CHEVSKII

That was one of the concerns I had while developing, and I came out with conclusion that most players (including myself) won't bother thinking about how much time exactly it is. They would just look at the number and have a approximate understanding if its soon or not. Plus as soon as the countdown reaches the value in config, it starts to be printed out, with increasing speed while it gets closer to zero, so I think players won't miss the point where they should be heading to the safe location. Let me know if I'm being wrong here, surely I can implement different messages.

To be fair I do think it will work as it is. People get the concept of countdowns, they can see it's counting down one at a time each second so it must be in seconds. Thing is, if the countdown starts at 1,800 though, people can't quite understand how long that is without thinking. I wouldn't immediately think "oh that's 30 minutes".

This is why the message above your post says 'Posted 9 hours ago'. It doesn't say 32,400 seconds ago or 9/3/2021 8am. This usability feature does the math for people so they can immediately understand without thinking or work. 

I tend to think that's how 'software' should be developed and I think that's the trend nowadays. Take the work out of features so they are easy to understand at a glance.

So that's my philosophy on it anyway. It's your call man! :)

 

Wo3Yquc5VEMV2nw.png Bumfuzzler

To be fair I do think it will work as it is. People get the concept of countdowns, they can see it's counting down one at a time each second so it must be in seconds. Thing is, if the countdown starts at 1,800 though, people can't quite understand how long that is without thinking. I wouldn't immediately think "oh that's 30 minutes".

This is why the message above your post says 'Posted 9 hours ago'. It doesn't say 32,400 seconds ago or 9/3/2021 8am. This usability feature does the math for people so they can immediately understand without thinking or work. 

I tend to think that's how 'software' should be developed and I think that's the trend nowadays. Take the work out of features so they are easy to understand at a glance.

So that's my philosophy on it anyway. It's your call man! :)

 

Implemented as the custom formatting syntax in the 3.1.0 update, try it out and give feedback please

udbWpST78BWcTsU.png 2CHEVSKII

Implemented as the custom formatting syntax in the 3.1.0 update, try it out and give feedback please

Sorry im a noob where does this get changed? in the Config or Lang file?

Im trying to get it too look likein chat to say "Server will restart in 01h:29m:34s

18xjERGPksBWICb.png DeXGaming

Sorry im a noob where does this get changed? in the Config or Lang file?

Im trying to get it too look likein chat to say "Server will restart in 01h:29m:34s

In the lang file. Syntax is explained in the docs

Looks comprehensive! Extremely flexible work here! Love it! I hope to test this out tonight.

Meanwhile, I read the docs, and I have a question.

I see you can use <min!+ minutes ><sec+ seconds> which will give you '30 minutes 20 seconds'. Does that mean <hr!+ hrs><min!+ mins ><sec+ secs> would produce '2 hrs 3 mins 34 secs'?

Just trying to make sure I understand.

lPFGayRDsmwsfdb.png Bumfuzzler

Looks comprehensive! Extremely flexible work here! Love it! I hope to test this out tonight.

Meanwhile, I read the docs, and I have a question.

I see you can use <min!+ minutes ><sec+ seconds> which will give you '30 minutes 20 seconds'. Does that mean <hr!+ hrs><min!+ mins ><sec+ secs> would produce '2 hrs 3 mins 34 secs'?

Just trying to make sure I understand.

If you add ! to some time, it uses the total value of this time part, which means the whole time left merged into a single representation (hr/min/sec), and in fact its a floating point value, so you can set precision with #0.3 <- in which 3 would mean 3 numbers after dot (could be up to 6).
If all you need is to show value in form of '<hours> (if > 0) <minutes> (if > 0) <seconds> (if > 0)' - just use <hr?+ hrs> <min?+ mins> <sec?+ secs>. ? modifier allows value to be displayed only if it's > 0. Ask if there are some other unclear things on this.

Just tested it out and looks great! Thanks for the addition, it really polishes the process.

I cannot figure out how to get this plugin to work. The older version was very straight forward, though this new version is very confusing. :( 
Can you please explain where to add the Time formatting? I'm assuming it's in the lang file, which i've set as;
"[Alert] Command usage error": "Usage: /srestart <hr#2?:><min#2?:><sec#2?> | /srestart cancel | /srestart status",
Tried initiating a restart using the command srestart restart 0h 35m 0s though nothing is happening. What am i missing?

kD57VdUrVWEhPjh.jpg BOOBLEJ

Can you please explain where to add the Time formatting? I'm assuming it's in the lang file

Check out the language file. There's a message at the very end. 

Here's what I sent mine to:
  "UI countdown format": "{0:sfmt::<hr?+ hrs> <min?+ mins> <sec?+ secs>} left"​

That should read out 3hrs 23mins 19secs
TLjyCKcQjt6Awci.png Bumfuzzler
Check out the language file. There's a message at the very end. 

Here's what I sent mine to:
  "UI countdown format": "{0:sfmt::<hr?+ hrs> <min?+ mins> <sec?+ secs>} left"​

That should read out 3hrs 23mins 19secs
Thanks for the quick reply! Hmm, I'm not seeing "UI countdown format" in the Language file. Mind linking yours?
{
  "Chat prefix": "<color=#d9770f>Smooth Restarter</color>: ",
  "No permission": "<color=#d9420f>You</color> have no permission to use this command",
  "Kick reason": "Server is restarting",
  "Help message": "/sr <color=#1a97ba>[command]</color> <color=#1aba8f>[arguments]</color>\nCommands: <color=#1a97ba>help</color>, <color=#1a97ba>status</color>, <color=#1a97ba>restart</color>, <color=#1a97ba>cancel</color>\nTo get information about command usage, type '/sr <color=#1a97ba>help</color> <color=#1aba8f>[command]</color>'",
  "Help message: Help": "/sr <color=#1a97ba>help</color> <color=#1aba8f>[command]</color> - Outputs general help message or command usage help if command is specified",
  "Help message: Status": "/sr <color=#1a97ba>status</color> - Outputs current restart status",
  "Help message: Restart": "/sr <color=#1a97ba>restart</color> <color=#1aba8f>[time]</color> - Initiates new restart process\nTime must be in one of the following formats:\n<color=#77ba20>123</color> - delay before restart in seconds\n<color=#77ba20>123</color><h|m|s> - delay before restart in <hours|minutes|seconds>\n<color=#77ba20>1</color>h <color=#77ba20>2</color>m <color=#77ba20>3</color>s - delay before restart in hr+min+sec, all optional\n<color=#77ba20>1</color>:<color=#77ba20>23</color> - schedule restart on 1:23 (24hr format)",
  "Help message: Cancel": "/sr <color=#1a97ba>cancel</color> - Cancels current restart process",
  "Restarting already": "Cannot do restart - already restarting. Use '/sr <color=#1a97ba>status</color>' to get info about current restart process, or try '/sr <color=#1a97ba>cancel</color>' to cancel current restart before starting new one",
  "Not restarting": "Cannot cancel restart - plugin does not perform a restart currently.",
  "Cancelled successfully": "Restart was successfully cancelled",
  "Restart reason: Timed": "Planned",
  "Restart reason: Oxide update": "New Oxide update is out",
  "Restart reason: Command": "Command from <color=#dbc30b>{0}</color>",
  "Restart reason: API call": "API call from <color=#dbc30b>{0}</color>",
  "Announcement: Restart initiated": "Server will be restarted in <color=#a4db0b>{0}</color> seconds ({1})",
  "Announcement: Countdown tick": "<color=#a4db0b>{0}</color> seconds left before server restart",
  "Announcement: Restart cancelled": "Server restart was cancelled",
  "Restart initiated": "Restart initiated successfully",
  "Status: Restarting": "Server is restarting, <color=#a4db0b>{1:0}</color> seconds left",
  "Status: Restarting (global.restart)": "Server is restarting natively",
  "Status: Restart planned": "Server restart planned on <color=#a4db0b>{0:hh\\:mm}</color> (<color=#a4db0b>{1:0}</color> seconds left)",
  "Status: No planned restarts": "Server is not restarting, no planned restarts found",
  "UI title": "Smooth Restarter",
  "UI countdown format": "{0:sfmt::<hr?+ hrs> <min?+ mins> <sec?+ secs>} left"
}