CyclesMod
Speedrunning mod that allows making precise cycles regardless of load times.
About this mod Author’s original text
CyclesMod
This mod makes cycles independent of load times. That means you will be able to make even the most ridiculous and absurdly precise cycles no matter how good or bad your computer is. Note that this mod allows for some cycles which cannot otherwise be made, and it may make you too fast for some cycles; this can be fixed by changing the settings.
How to Use
Normalize Cycles is the main setting of the mod. Turning this setting off means cycles will play out differently each time the room is reloaded. You should only turn this off to experiment with deliberately bad loads or to try and reproduce a specific PC setup.
By default, cycles will play under theoretically ideal conditions, as if loads were instant. This means objects start their cycles as late as possible. You can set a specific offset from the ideal time by editing the Extra Load Time setting. For example, setting Extra Load Time to 0.1s means cycles will start 0.1s earlier than the ideal time. If you find that having Normalize Loads enabled forces you to slow down to make cycles, you should increase this setting.
Force Clear Memory is meant for research purposes only. This introduces extra variance into loads that is likely to cause cycles to get off-sync. This is not the same as the cycle starting earlier: it means different objects in the room will individually start running at different times. Again, this for experimenting with bad loads.
Settings Cheat Sheet:
- Best loads: Normalize Loads = ON, Extra Load Time = 0.0, Force Clear Memory = OFF
- Good loads: Normalize Loads = ON, Extra Load Time > 0.0, Force Clear Memory = OFF
- Vanilla loads: Normalize Loads = OFF, Extra Load Time = 0.0, Force Clear Memory = OFF
- Bad loads: Normalize Loads = OFF, Extra Load Time > 0.0, Force Clear Memory = ON
How Cycles Work
Silksong (and Hollow Knight) only keep the current room loaded; the rest of the map is always unloaded. Whenever you go through a screen transition, the game pauses to load the new room into the game and unload the old room. This is called a "load." The amount of time a load takes depends on many things, but in general, better PCs will finish loads faster. This is why Hollow Knight and Silksong speedruns use an autosplitter which pauses the timer during loads: otherwise, people with worse computers would unfairly be forced to get slower times with the same gameplay.
It is a common belief that longer loads will result in worse cycles, since the game will have been running for longer by the time the load ends and the player regains control. However, this is not actually true (at least not strictly). To show why, and to demonstrate what actually causes cycle variance, we need to look deeper into how a load is structured.
The game internally divides a load into several different sections, called phases. The following is a brief summary of the purpose of each phase. Phases which do not always run are italicized.
- FetchBlocked: On some platforms and for some transitions, the game will wait for the camera to fade to black before continuing. This phase is generally skipped.
- ClearMemPreFetch: If the game is running low on memory, the game will manually run garbage collection to free up space for the load. This phase runs infrequently and takes about 0.1s or less to complete.
- Fetch: The game loads all assets for the new scene from the game files into memory. This phase makes up the majority of the load and can take anywhere from 0.1s to 2 or more seconds depending on hardware speed and the complexity of objects in the new scene (e.g. towns will take longer than most other rooms).
- ActivationBlocked: The game waits for the camera to finish fading to black if it hasn't already, and it usually has by now.
- Activation: The game instantiates all of the objects specified by the scene, which includes running Awake() for each of them. This takes about 0.05s.
- ClearMemPostActivation: The game once again checks for low memory and frees up what it can if ne
Install & use Install: BepInEx plugin
- The archive from playbuff is the mod itself — usually a BepInEx plugin (a .dll or a plugin folder once unzipped).
- Recommended: use a community mod manager (such as r2modman) — pick this game, import the mod, and the manager sets up BepInEx and its dependencies for you.
- Manual route: install the BepInEx loader in the game folder, then drop the unzipped .dll or plugin folder into BepInEx/plugins/.
- Launch the game — the BepInEx console logs every plugin it loads; seeing this mod in the log means it is installed.
Mods with listed dependencies need those installed too, or they will not load. Options are usually changed in-game or in the plugin's config file.
Install these first, or the mod will not work: