Expose game time elapsed in seconds in the multiplayer list API
Moderator: ickputzdirwech
-
- Fast Inserter
- Posts: 205
- Joined: Fri Oct 05, 2018 4:34 pm
- Contact:
Expose game time elapsed in seconds in the multiplayer list API
I made a graph showing the player counts on the most popular servers on my stats dashboard. It would be cool if I could also get the UPS these servers are running at, this can easily be determined by calculating game time elapsed / real time elapsed * 60. But the game time elapsed that's exposed in the multiplayer API is in whole minutes, which is too low of a precision to be useful. It would be really cool to be able to graph UPS as well.
Re: Expose game time elapsed in seconds in the multiplayer list API
You can get in game time very precise by grabbing game.tick at two points.
elapsed game seconds will be (tick2 - tick1) / 60
elapsed game seconds will be (tick2 - tick1) / 60
My Mods: mods.factorio.com
-
- Fast Inserter
- Posts: 205
- Joined: Fri Oct 05, 2018 4:34 pm
- Contact:
Re: Expose game time elapsed in seconds in the multiplayer list API
I'm well aware of that, but as you may or may not have noticed I'm monitoring the public server list, not my own servers. I cannot run lua code on these servers.
Re: Expose game time elapsed in seconds in the multiplayer list API
How do you get game time elapsed?
My Mods: mods.factorio.com
-
- Fast Inserter
- Posts: 205
- Joined: Fri Oct 05, 2018 4:34 pm
- Contact: