YARM - Resource Monitor

by Narc

This mod helps you to keep track of your mining sites, with useful data such as the percent mined, and estimated time to depletion.

Utilities
2 months ago
0.14 - 2.0
147K
Mining

b [Fixed v1.0.3] Non-recoverable error related to productivity adjusted display

3 months ago

Just updated and got this

The mod YARM - Resource Monitor (1.0.1) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event YARM::on_tick (ID 0)
YARM/resmon/locale.lua:137: attempt to index field 'force' (a nil value)
stack traceback:
YARM/resmon/locale.lua:137: in function 'site_amount'
YARM/resmon/yatable/cell_factories.lua:235: in function 'get_tooltip'
YARM/resmon/yatable/cell_factories.lua:74: in function <YARM/resmon/yatable/cell_factories.lua:68>
(...tail calls...)
YARM/resmon/yatable.lua:153: in function 'render'
YARM/resmon/ui.lua:48: in function 'update_player'
YARM/resmon.lua:837: in function 'update_players'
YARM/resmon.lua:881: in function 'on_tick_internal'
YARM/resmon.lua:916: in function <YARM/resmon.lua:911>

3 months ago

Well, that one's weird, it doesn't seem likely for a site to have no force... I'll try to figure it out, will be a few minutes.

3 months ago

Ok, I can't quite figure out what happened for this case, but I can do something to hopefully fix it (if we're lucky). At the same time, if you're able to send me a save file showing this problem I'd be really grateful -- I can maybe inspect it to figure out how it happened.

3 months ago

Might be fixed in v1.0.2, please let me know

3 months ago
(updated 3 months ago)

Error is still occuring when I try to load a save game with the mod enabled.
Similar errors (pasted below) occur in a new game.

This error occurs after pressing the button to "Filter: all sites" after adding a site to YARM:

The mod YARM - Resource Monitor (1.0.2) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event YARM::on_gui_click (ID 1)
YARM/resmon/locale.lua:137: attempt to index field 'force' (a nil value)
stack traceback:
YARM/resmon/locale.lua:137: in function <YARM/resmon/locale.lua:123>
(...tail calls...)
YARM/resmon/yatable/cell_factories.lua:73: in function <YARM/resmon/yatable/cell_factories.lua:68>
(...tail calls...)
YARM/resmon/yatable.lua:153: in function 'render'
YARM/resmon/ui.lua:48: in function 'update_player'
YARM/resmon/click.lua:27: in function 'set_filter'
YARM/resmon/click.lua:14: in function <YARM/resmon/click.lua:7>

This error occurs if I press the button to "Filter: all sites" first, then add a site to YARM:

The mod YARM - Resource Monitor (1.0.2) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event YARM::on_tick (ID 0)
YARM/resmon/locale.lua:137: attempt to index field 'force' (a nil value)
stack traceback:
YARM/resmon/locale.lua:137: in function <YARM/resmon/locale.lua:123>
(...tail calls...)
YARM/resmon/yatable/cell_factories.lua:73: in function <YARM/resmon/yatable/cell_factories.lua:68>
(...tail calls...)
YARM/resmon/yatable.lua:153: in function 'render'
YARM/resmon/ui.lua:48: in function 'update_player'
YARM/resmon/ui.lua:27: in function 'update_force_members'
YARM/resmon.lua:475: in function 'submit_site'
YARM/resmon.lua:820: in function 'update_players'
YARM/resmon.lua:881: in function 'on_tick_internal'
YARM/resmon.lua:916: in function <YARM/resmon.lua:911>

3 months ago

Ok, thank you for the reproduction steps, I will do my best to fix it as soon as I can

3 months ago

I only had 2 non-default settings for the mod.

Map Settings
Adjust values for productivity researched - Enabled
Show both raw and adjusted values - Enabled

Reset the settings to defaults and the mod seems to work fine.Upon further testing, enabling "Adjust values for productivity researched" seems to cause the error to occur.

3 months ago

Hello,
same here, crashes after around 5 seconds in an existing save game:

The mod YARM - Resource Monitor (1.0.2) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event YARM::on_tick (ID 0)
YARM/resmon/locale.lua:137: attempt to index field 'force' (a nil value)
stack traceback:
YARM/resmon/locale.lua:137: in function <YARM/resmon/locale.lua:123>
(...tail calls...)
YARM/resmon/yatable/cell_factories.lua:73: in function <YARM/resmon/yatable/cell_factories.lua:68>
(...tail calls...)
YARM/resmon/yatable.lua:153: in function 'render'
YARM/resmon/ui.lua:48: in function 'update_player'
YARM/resmon.lua:837: in function 'update_players'
YARM/resmon.lua:881: in function 'on_tick_internal'
YARM/resmon.lua:916: in function <YARM/resmon.lua:911>

3 months ago

I only had 2 non-default settings for the mod.

Map Settings
Adjust values for productivity researched - Enabled
Show both raw and adjusted values - Enabled

Reset the settings to defaults and the mod seems to work fine.Upon further testing, enabling "Adjust values for productivity researched" seems to cause the error to occur.

Can confirm this does work as a temporary workaround.

3 months ago

Mm, I see, my beta testers (i.e., just me) played without productivity, thanks for the research!

3 months ago

I disabled these, however I am still getting what seems like the same error.

Error while running event YARM::on_tick (ID 0)
YARM/resmon/locale.lua:137: attempt to index field 'force' (a nil value)
stack traceback:
YARM/resmon/locale.lua:137: in function 'site_amount'
YARM/resmon/yatable/cell_factories.lua:235: in function 'get_tooltip'
YARM/resmon/yatable/cell_factories.lua:74: in function <YARM/resmon/yatable/cell_factories.lua:68>
(...tail calls...)
YARM/resmon/yatable.lua:153: in function 'render'
YARM/resmon/ui.lua:48: in function 'update_player'
YARM/resmon.lua:837: in function 'update_players'
YARM/resmon.lua:881: in function 'on_tick_internal'
YARM/resmon.lua:916: in function <YARM/resmon.lua:911>

3 months ago

I disabled these, however I am still getting what seems like the same error.

Error while running event YARM::on_tick (ID 0)
YARM/resmon/locale.lua:137: attempt to index field 'force' (a nil value)
stack traceback:
YARM/resmon/locale.lua:137: in function 'site_amount'
YARM/resmon/yatable/cell_factories.lua:235: in function 'get_tooltip'
YARM/resmon/yatable/cell_factories.lua:74: in function <YARM/resmon/yatable/cell_factories.lua:68>
(...tail calls...)
YARM/resmon/yatable.lua:153: in function 'render'
YARM/resmon/ui.lua:48: in function 'update_player'
YARM/resmon.lua:837: in function 'update_players'
YARM/resmon.lua:881: in function 'on_tick_internal'
YARM/resmon.lua:916: in function <YARM/resmon.lua:911>

Edit: nevermind, the one map I had open still had the setting enabled

3 months ago

Fixed in v1.0.3, thank you for all the help reproducing it!

New response