AI Roguelite

AI Roguelite

Not enough ratings
Modding Instructions
By AI Roguelite: AI-generated RPG
Instructions for modding AI Roguelite and uploading the mods to Steam Workshop
   
Award
Favorite
Favorited
Unfavorite
General
Create a mod in the game under options, then modify the mod directory which will override default settings. For each type of override, find the existing vanilla version under the "Default" directory and use it as an example for the corresponding folder in your mod directory.

You can also upload the mod to steam workshop via the in-game mod options. Please test your mod in the game to make sure it's working before uploading it.
World Presets
You can make new world presets in "world_presets" of your mod directory following the examples in the existing default/world_presets. You must use ordered-prompts.txt to specify the order in which you want to present your presets to the user. The presets will be appended to the vanilla presets; there is no overriding logic in this case.

Be sure to specify survival_bars if applicable. If survival_bars is specified, each comma-delineated string must correspond to a survival bar ID inside survival_bars of either the mod or default directory.
Survival bars
You must use ordered-survival-bars.txt to specify the order the user would see your survival bars in the new game selection as well as within the game itself. You can then add your own survival bar txt file with the desired parameters. You can also override existing survival bars by specifying an existing ID, but this behavior is not tested. At this time, health is not treated as a survival bar, and contains separate logic which cannot be modded.

Configs for survival bars: Most options you can specify for survival bars in the txt file are self-explanatory if referring to those in the Default directory. check_for_decrease_event and check_for_increase_event must correspond to an existing folder gpt_calibration_results. per_turn_change can be CONSTANT_REGEN, CONSTANT_DRAIN, or CONSTANT_DRAIN_LENIENT. check_for_consumable, if specified, must also correspond to a folder in gpt_calibration_results, and will be used to check whether a consumable can heal this survival bar type. check_for_consumable_prio influences the order in which a consumable is checked for survival bars. For example, if "granola bar" would've healed both "HUNGER" and "ENERGY" survival bars, the winning candidate is the one with lower priority number.
Event checks
  • Under the "Default" directory, find the relevant event check you want to modify under gpt_calibration_input.
  • Under the "AI" directory, use gpt_testing.exe to figure out a good prompt for event checks. To use gpt_testing.exe, you must use a command line utility such as CMD, and call it with the format "gpt_testing.exe [model_name]" for example gpt_testing.exe KoboldAI/GPT-Neo-1.3B-Adventure. Fire up the exe and modify "input.txt". If "topScores" line is present, the output will be in logprob form. Delete that line if you want free-form text generation instead. disallowedTokens uses the separator "<|SEP|>". repetitionPenalty defaults to 1. Please note if increasing repetition penalty, some non-GPT-Neo models are much more sensitive than GPT-Neo models.
  • In the mod directory's gpt_calibration_input, you must make a "version.txt" file with a number such as 1. Increase the version number when you update the mod which triggers the user's calibration to run if they use a non-standard model.
  • For each event check you want to override, make a folder with the same name, with your example txt files for calibration. A file beginning with "yes" is treated as a positive example and beginning with "no" is treated as a negative example. Then you must run my_gpt_calibration.exe for a select number of commonly used models, by running gpt_calibration_caller.bat. You should then see the results in gpt_calibration_results. Please note the goose ai calibration endpoint is going through my server and is rate-limited to 30 calls per day to avoid racking up costs.
Prompts
Under the "Default" directory, find the prompts you want to override, and copy the modified versions into your mod directory's "Prompts" directory. Use gpt_testing.exe to quickly test whether a prompt has the desired effect before testing it in the game.

Variables to replace are encased in the dollar sign bracket notation, e.g. ${example_variable}. These flags will tell the program to replace these strings with the corresponding actual strings from the game/story.

In general, capitalized variable names are reusable throughout all of the prompts, whereas lowercase variable names are specific to that prompt.
11 Comments
Alyndiar 4 Feb @ 9:53am 
I found the problem. I was using ordered_prompts.txt instead of ordered-prompts.txt. All solved.
Alyndiar 3 Feb @ 7:45pm 
I'm trying to use language codes like in your World Preset examples, but I just want to have English and French. For some reason, nothing shows in the World Presets when I activate my mod. Any help you could give me would be welcome.
AI Roguelite: AI-generated RPG  [author] 29 Dec, 2024 @ 12:08pm 
Calibration is no longer used. It was a system I invented for older LLMs that couldn't follow instructions very well. Can you explain more what you mean by "override survival bars reliably"?
Airjelly 29 Dec, 2024 @ 11:05am 
Thanks for your quick reply. How do I do the calibration process without the gpt_testing.exe? Also is it possible to override survival bars reliably? It seems to be very finicky. Spent a few hours today working on it again, but I just kept going in circles.
AI Roguelite: AI-generated RPG  [author] 28 Dec, 2024 @ 3:39pm 
Also, survival bar drains scale with area level. So it will help to level up before venturing into higher-level areas, and/or enable level scaling when starting a new game.
AI Roguelite: AI-generated RPG  [author] 28 Dec, 2024 @ 3:37pm 
This guide is extremely outdated; my apologies.

Under survival_bars you can modify some parameters for hunger.txt. You could change per_turn_Drain to CONSTANT_DRAIN_LENIENT, although this might result in some cases where it rises unexpectedly because CONSTANT_DRAIN_LENIENT was mostly written with "mood" in mind.

You can also modify the corresponding event check, event-checks-chatgpt/check_player_hunger_change.txt
Airjelly 28 Dec, 2024 @ 1:30pm 
I might be retarded but I don't see an AI directory or any gpt_testing.exe or related files. I'm trying to make a slower hunger mod, because on insane its just untenable / nonimmersive, but I still want hardcore death. Please help.
jxur32 17 Aug, 2023 @ 12:14pm 
ta wen
̋̊̑͂͆̅¢h³MÏǪ£ Ør9 20 Apr, 2023 @ 1:27pm 
ChatGPT has it's own event checks and prompts that are similar but follow a different format. By itself it doesn't need the other models trained - however - if you want your mod to support ChatGPT and other models you'll need to do both. You can check out my mods for some real-world examples. The Lovecraftian Prompts mod has both ChatGPT and other model event checks that you can look at for inspiration on how to make your own.
monsterfurby 12 Apr, 2023 @ 12:26pm 
Does ChatGPT follow different rules or does it also need the other models to be trained?