EvoGUI - Evolution Factor Indicator and more

by Narc

Places some indicators on your UI for various little statistics that are nice to have.

Utilities
3 years ago
0.13 - 1.1
100K

b function missmatch with moweather integration

7 years ago

Running this mod with MoWeather I get this error each second when I activate the Time of Day/Sunlight option.

[EvoGui|on_tick:update_gui] Error: [EvoGUI|day_time|update_ui] Error: EvoGUI/value_sensors/day_time.lua:7: Error when running interface functoin MoWeather.getdaytime: moweather/scripts/day-night.lua:32: attempt to index local 'Dat' (a nil value)

I guess you want to call one of this functions:

ModInterface.getdaystart = function(surf) return MoConfig.Surfaces[surf].Time.DayStart end
ModInterface.getdayend = function(surf) return MoConfig.Surfaces[surf].Time.DayEnd end
ModInterface.getdayturn = function(surf) return MoConfig.Surfaces[surf].Time.DayTurn end
ModInterface.daytimeleft = function(surf) return (MoConfig.Surfaces[surf].Time.DayEnd-game.tick)/60 or 0 end
ModInterface.getdaylight = function(surf) return MoConfig.Surfaces[surf].Time.Light end

7 years ago
(updated 7 years ago)

I think I fixed it (seems to be working for me).

Change line 7 in day_time.lua for this:
function get_day_time(player) return remote.call("MoWeather", "daytimeleft", 1) end

And line 27 for this:
local brightness = math.floor((1 - game.surfaces[1].darkness) * 100)

Edit: No, it doesn't work. There is no error anymore but the time is incorrect and it doesn't update. The brightness is fixed though.

7 years ago

Shouldn't it just be requesting getdaytime for the current surface (i.e., player.surface)? I hope this post is from before the 0.4.104 update, which did exactly that.

7 years ago
(updated 7 years ago)

Hello I'm loving the mod so far but when I combined it with Moweather I receive this message.

[EvoGui|on_tick:update_gui] Error: [EvoGUI|day_time|update_ui] Error: EvoGUI/value_sensors/day_time.lua:7: Error when running interface functoin MoWeather.getdaytime: moweather/scripts/day-night.lua:33: attempt to index local 'Dat' (a nil value)

I have no idea has to how to code so I came looking for a copy and paste method or new download, but I have the current 0.4.106 version. Keep up the good work, I'm looking forward to using this informative mod.

7 years ago

Okay, I think I see what went wrong now -- @ludsoe sent me the wrong code (or else MoWeather is intended to work this way, but has a bug).

I'll make it work with MoWeather v0.3.90 in EvoGUI v0.4.107, but be aware it may just break again in future.


As a note, the mod portal hasn't sent me any emails to notify me of discussions (it probably doesn't do that yet), and I rarely remember to check. If you want quicker response, I suggest making an issue on Github, posting on the old EvoGUI forum thread, or PMing me on the forums. I get notifications for all of those.

6 years ago
(updated 6 years ago)

Just noting that this error still seems to happen with moWeather installed when the player walks inside a factorissimo2 factory.

The console spam does turn off though if the time option is turned off, which is simple enough to do when working on factories.

New response