Add hack for adding new control codes to messages #1849
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Wanted to get folks thoughts on this...
This PR adds a framework for adding additional text control codes to the game. No addition codes are implemented in this PR, but this PR is an enabler for PR #1814 so that the silver rupee count may be displayed in the text box when acquiring one, without requiring duplicating messages. Can also add things like key counts or any other dynamically generated messages.
To add new control codes, add the logic for the code to message.c, and add the control code to CONTROL_CODES in Messages.py
Also adds a new function to the item table for resolving an alternate text ID. This can be used to change the text ID based on some condition, such as collecting all of the silver rupees for a particular room.
Example showing a new control code being used for silver rupee shuffle: