This is an attempt to create a helper tool for Tool Assisted Speedruns in Factorio. A guide of how to use the tool can be found here: https://www.youtube.com/watch?v=V9tuNoDqc0E&t
The core idea, is when the TAS prints a warning it goes into warning_mode.
Then when a step is successfully executed it should terminate warning_mode.
Terminating warning_mode then prints a brief custom msg and a number of ticks that have elapsed since the mode began.
Validation
I have validated that it works in most instances, but i haven't touched compatibility_mode.
However the worst that can happen when a warning_mode termination is omitted, is that the next termination is inaccurate.
localized strings
Factorio has something called localized strings which combines localization and string.format fairly neatly
On the lua side they work by {"string_id", param1, param2} where the id is used to specify the string to use and the params are substituted in somewhere specified by the string in locale.
Core
The core idea, is when the TAS prints a warning it goes into warning_mode. Then when a step is successfully executed it should terminate warning_mode. Terminating warning_mode then prints a brief custom msg and a number of ticks that have elapsed since the mode began.
Validation
I have validated that it works in most instances, but i haven't touched compatibility_mode. However the worst that can happen when a warning_mode termination is omitted, is that the next termination is inaccurate.
localized strings
Factorio has something called localized strings which combines localization and string.format fairly neatly On the lua side they work by
{"string_id", param1, param2}
where the id is used to specify the string to use and the params are substituted in somewhere specified by the string in locale.