Stats GUI


Displays various statistics, such as biter evolution, playtime, and more. Blends in with the game's FPS/UPS indicator. Similar to EvoGUI.

Utilities
a month ago
1.1 - 2.0
124K

g Yes

3 years ago

Thank you, I was just building something and thought this would be great for debug.
I have made some amendments very small but now I can add sensors via remote interface.
requires calling the remote interface to update and i'm 100% certain you can do it better than my hack but though I would
A) ask if this is something you can add
and
B) do you want me to flick though the changes, very small adjustment

3 years ago

I will add a remote interface for the next version. Like you said, it shouldn't be too difficult. The only slight annoyance is that any mods adding a sensor will have to manage their own settings, because as far as I know, you can't add settings to another mod in the settings stage.

3 years ago
(updated 3 years ago)

Ah I avoided that. I figured for debug so only used during debug.
I simply added a global table used when registering sensors and bung this in
if settings["show_"..sensor_name] or global.mod_sensors[sensor_name] ~= nil then

posting example of in action hope you don't mind

--in my mod, I could bound up in a debug_print function but I only call during debug mode
local update_debug = function(surface)
if modmashsplinterthem.debug == true then
if remote.interfaces["StatsGui"] ~= nil and remote.interfaces["StatsGui"]["register_sensor"] ~= nil then
remote.call("StatsGui","register_sensor",{name = "current_surface", debug = surface.surface.name.." Energy = "..surface.energy})
end
end
end

3 years ago

I added a remote interface for the next version. As I said before, the mods adding the sensors are responsible for their own settings. You register a sensor by calling the mod's add_sensor interface, and provide as arguments an interface and function name for StatsGUI to call. It will then call that interface to get the string output for that sensor.

To not show the sensor, simply return nil instead of a string, and the mod will adjust the GUI accordingly.

I'll write documentation and provide an example, which will go on the GitHub repository.

3 years ago

Sweet, thank you. Much nicer than printing every nth tick in the console.

3 years ago
(updated 3 years ago)

I have released the updated mod, and written some documentation for the remote interface. Happy hacking!

3 years ago

Thank you

3 years ago

Is there a way to turn this display off and/or remove some of the stats? I have a number of other GUIs at the top which this one draws over (making it impossible to read either) and I can't find a setting to get it out of the way.

3 years ago

You can change the display type and enable/disable certain sensors in the main menu's mod settings panel.