Milestones

by Wiwiweb

Keep track of your progress in a fun way by finding out how fast you created key items. Look back on your factory's history, compare with your friends, or challenge yourself. Supports any list of items and comes with presets for popular big mods. Can be added to existing games.

Utilities
2 months ago
1.1
216K

b [Won't fix] Editing existing scenario causes crash

1 year, 3 months ago

When loading an existing scenario into the editor, milestones causes the following crash:

The mod Milestones (1.3.13) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event Milestones::on_nth_tick(60)
Milestones/scripts/milestones_util.lua:314: attempt to index field 'production_aliases' (a nil value)
stack traceback:
Milestones/scripts/milestones_util.lua:314: in function 'is_production_milestone_reached'
Milestones/scripts/tracker.lua:65: in function <Milestones/scripts/tracker.lua:48>

1 year, 3 months ago

That's a field added in 1.3.8.
Normally Milestones would run a migration script to initialize that field in existing games.
But I guess scenarios do not fire on_configuration_changed events? Which means the migration script never ran.

I went and asked other mod makers and I was told "ugh" and "Scenarios are jank, stay away from them if you can πŸ™ƒ".

I'm sorry but I think I'm not going to support scenario migration, I'm not even sure if it's possible for me to. If you remove Milestones, save your scenario, then add Milestones again it should work though you will lose your precise times.

New response