Lots of non-game-related obligations have been popping up, which have prevented me from making much code progress, which is why I skipped last week's update. However, enough progress has been made to justify another update.
The most important update this week has been the story progress: The second hub of chapter 2 has been set up and the first (of four) negotiation side-story has been completed. I estimate about 5-6 more days of writing to finish chapter 2. Chapter 3 will be more linear, though with a lot more branches than chapter 1, and chapter 4 will effectively just be a "consequences" chapter.
To accommodate my plans for chapter 3, I have modified the inventory commands to allow pulling their values from other inventory items, rather than just being hard-coded in the tiac. For example,
!ifaddinventory::leaders_remaining<=0::recruited::side_stories_completed
will add the current value of `side_stories_completed` inventory item to the item `recruited`'s count, but only if there are no more leaders to speak to. I've also changed the replace commands so that they can use inventory counts as well, by enclosing the item name in square brackets. For example,
!ifreplace::coins>=1::COIN_REPLACE::and coins
will replace the text `COIN_REPLACE` with "and 20 coins" if the player has 20 coins.
While the user-facing content has not seen much change, I have added the ability to restart from the beginning of a specific chapter, rather than always restarting from the very start of the story. This will be useful when you're deep in chapter 3 and die because you took the wrong path and got ambushed.
On the backend side, I have finally decided to just remove both analysis tools (story and music). They were useful at the beginning, but the sheer complexity of the new behaviors mean the tools would require far too much work to match the logic. Removing the story analysis tool was definitely more painful, as it means I now have to manually count the words leading up to choices in order to make bank-limited choices reasonable. To accommodate that, I have the banks reset at the beginning of each chapter. I have an idea for a "high-score" system to replace the joy of seeing those bank counts rise to ridiculous amounts, but that will be for later.
The next important code update will bring dynamic challenge word definitions. As it currently stands, `SPIKE` and `CHANGE` have hard-coded behaviors. This both makes it more difficult to maintain, and impossible for modders to add their own challenge words. So I have begun work on defining the challenge words `SPIKE`, `GHOST`, `SHADOW`, and `EXPLOSIVE` via JSON files, rather than hard-coding them. That will be the main code work for next week, while the story work will be focused on finishing chapter 2 and adding in the ghost challenge words.
Raw Git Log
- achievement and mod updates
- updated verbiage for achievement 011 to "Type It All" for an in-joke
- removed unnecessary "triggers_needed" from the achievements files
- added achievement 200 (untriggered so far) for the tailor dirty scene
- updated verbiage in mod mini-story achievements to omit the fact they're in the sample mod (making them semi-hidden)
- updated verbiage in mod mini-story based on feedback from WiW
split up sections in options main menuinstead of just having a "Settings" section, we now have a section for each type of option; this is to address the fact that the game now has a *lot* of options, and the section paragraph is too large on small screensremoved music analysis and fixed story analysismusic analysis tool has been broken since the music rework; I've given up on adjusting it for the new logic, as it was never very useful anywaysadjust story analysis tool to handle loops by recording the non-bank inventories at each bookmark choice and checking for same-inventory on loops; if the player ever has the same non-bank inventory when reaching the same bookmark, they're in an infinite loop; the game doesn't prevent this, in case the player wants this state, but the analysis tool now breaks outwriting: added greeter intro and first visit to second hubmodified inventory commands to allow copied valuesthe quantity param in each inventory command can now be another item name; if so, the inventory value for that item is used as the quantity for this commandsimilarly, text-replacement commands can now include inventory values by enclosing an item name in square bracketsadded ifremoveinventory text commandupdated documentation accordinglyadded ability to restart from a chapteradded previous_chapters field to Story chapter metadataadded RESTART_CHAPTER word commandupdated StoryManager.reset_progress and Story.reset_progress to accept a new from_chapter key; the story reset will now reset all chapters except those which are ancestors of the from_chapter, and will then attempt to set that chapter as the active chapteradded actions in the OptionsChapter to allow resetting from a specific chapter (only chapters with non-empty inventories are considered valid for this)when going to a new chapter, Story now checks the previous_chapters field array and pulls the first non-empty inventory to copy to the new chapterrenamed sample mod's chapters to avoid confusion with the main storyadded Util.logadded Util.log which just prints what is passed to itchanged all print statements to use this new Util.logthis is because I use print for debugging, but generally want to remove all these debugging statements once I'm done, so do a global search for "print"; but I also want to use stdout for proper loggingwriting: began H2SS01, Jane's recruitment side-storySSH key-handling changesimproved build automationcreated script to handle uploading to Steam/itch via CLI; skipping doing this via CI/CD because of the amount of extra work to put steamcmd in a GitLab CI runnerwriting: set up bargaining with Jane and first (terrible) optionbegan work on per-chapter story analysischanged tia/tiac loaders and objects to correctly use "filename" and "filepath" variables (instead of storing filepath in 'filename')changed checkbox list in StoryAnalysisEngine to a grid of labels (and checkboxes), with each chapter getting a checkboxSAE is currently in a broken state, as I attempt to figure out a reasonable way of handling the geometric growth of possibilitiesgave up on Story Analysis toolthe combinatorial explosion that is the hubs of chapter 2 means that, even if I could figure out a way to reduce the final output of the analysis tool to something usable, it would take forever to run; so I'm giving up on that for nowto reduce the difficulty of determining appropriate word counts for limited choices in chapter 2, I've changed the "copy inventory from previous chapter" logic to zero out the word/letter banks; this means that the player's word/letter count will not carry over between chapters; unfortunate, but basically necessaryremoved story analysis tool code and sceneafter manually counting the expected previous words, updated the word/letter-limited choices in chapter 2; will definitely need to test these once I get around to regular testing of chapter 2created dynamic challenge word definitionscreated new Challenge class which contains information about a challenge word typechallenge word types are loaded from JSON like the other custom datadefined the SPIKE, GHOST, SHADOW, and EXPLOSIVE challenge word typesthese currently do nothing, but will later be hooked up to replace the current hard-coded WordCommandswriting: finished Jane's side-storyfixed call issue with DebugStatewhen I renamed Chapter._get_progress to Chapter.get_progress, I forgot to update the call in DebugState; fixed