Skip to content

Lua script that optimizes RNG manipulation for tool-assisted speedruns (TAS)

Notifications You must be signed in to change notification settings

ThunderAxe31/DankBot

Repository files navigation

DankBot

Lua script that optimizes RNG manipulation for tool-assisted speedruns (TAS).

This is a customizable bot mostly thought for RPG games. It relies on a system that does automatically manage branching, and progress through the resulting best iterations, while gradually discharging the slower ones. It's similar to Monte Carlo tree search, with the main difference of not using backtracking. Instead, it relies on the generation of multiple branches that are likely to be able to lead to the desired result. In case of failure, the script will display where and why a botting session failed, in order to let the user to be able to figure how to improve the usage of the script, by properly editing the route.lua file attached.

In order to use the script, put it in a folder together with an appropriate route.lua file, and launch it in BizHawk after having opened the movie file that will contain the TAS that will be created. It does automatically save progress, so you can stop it at any time by closing the script, and resume it by launching it again. A file named resume.lua will be automatically created with the data necessary, along with the relative savestate files in the same folder. For this reason, it's suggested to use this script in an empty folder.

All the actions executed by the bot will be decided by the route.lua file, which will contain all the game-specific data and actions to attempt and optimize for the desired TAS to create. The user should use a different route.lua file for each TASing project. It doesn't matter the game or the platform, as long as all the necessary informations are properly coded inside. In order to learn about how to write a compatible route.lua file, see the example files. Every event worth of note will be both printed in the Lua console and written to a log.txt file, so that the user can follow closely the botting session progress.