MortenTobiasNielsen / Factorio-TAS-Generator

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
MIT License
13 stars 4 forks source link

Changed Goal and Log level #279

Closed theis999 closed 1 year ago

theis999 commented 1 year ago

Added dependency on MOD: Speedrun_goals Added log config to control print level Added print config for more specific printing control Added variables.lua file to hold other generated variables Removed goal files as goals are now controlled by Speedrun_goals

Goals and log-level now have separate menus. Where the goal is controlled by speedrun goals.

Speedrun goals

Speedrun goal handles rock yield and always day.

settings-updates.lua controls the settings of speedrun goals, so we can set the settings how we want them.

Variables

The variables.lua file allows us to insert the variables we want / need without messing with control.lua or steps.lua. As both files are sufficiently large already.

Log level

I have included 3 levels of logging. So we can reduce the amount of information printed to console more precisely. We can easily enough introduce new levels with this setup.

In addition more specific settings are introduced to control printing of comment, research queue and save game.

theis999 commented 1 year ago

It is a bit annoying that the help doesn't show up for log-levels as i did actually type it out. image

Speedrun Goals One of my projects for this mod is to create a custom GUI for winning the game. Which includes the total time taken for beating the game in milliseconds and time to research technologies instead of kills image As this is likely to include several lines of code to create, i want it far away from the rest of the TAS handling.

MortenTobiasNielsen commented 1 year ago

Strange that the help message isn't shown, but seems to be an issue with the framework, so nothing really to do about it other than crossing fingers that it will be solved at some point.

Sounds like a nice mod, which will be useful for many players. I did though think that speed runners aren't allowed to use mods, so will they be able to use this?

theis999 commented 1 year ago

...I did though think that speed runners aren't allowed to use mods, so will they be able to use this?

They do, so they won't. But that doesn't particularly matter to me :)

I've changed the integration with the mod, so it only handles the endgame trigger and displaying the endgame gui. I have removed most uses of debug_state. I have added a new Error method, which should only be used for fatal errors.

MortenTobiasNielsen commented 1 year ago

When I generate script with this branch my run doesn't work at all. It seems to just be something with it needing a dependency, but I would really appreciate it if that wasn't the case. I do not think the dependency provides enough value for it to warrant a breaking change.

theis999 commented 1 year ago

I have run my steel axe TAS using this branch, and it worked perfectly fine. Providing me with End game GUI that i previously had to hack in.

theis999 commented 1 year ago

I'll close this PR and reopen a new one to keep it more focus as a lot have changed.