Skip to content

Conversation

@rrealmuto
Copy link

@rrealmuto rrealmuto commented Jan 13, 2023

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:

GLideN64_THE_LEGEND_OF_ZELDA_020
GLideN64_THE_LEGEND_OF_ZELDA_021
GLideN64_THE_LEGEND_OF_ZELDA_022

@Cuphat Cuphat added the Component: ASM/C Changes some internals of the ASM/C libraries label Jan 14, 2023
@rrealmuto
Copy link
Author

Any opinion on merging this prior to silver rupee shuffle? Or should I just merge it into the silver rupee branch and it'll all be under that PR?

@fenhl
Copy link
Collaborator

fenhl commented Jan 16, 2023

Merging before silver rupee shuffle would be useful for #1841.

@fenhl
Copy link
Collaborator

fenhl commented Jan 22, 2023

Given that there are already 3 separate use-cases for this PR (current collected small key/silver rupee count, using cosmetics to customize gendered terms referring to Link, and #1854), I'm in favor of merging it.

@rrealmuto
Copy link
Author

rrealmuto commented Jan 23, 2023

I'm good w/ the idea of merging this beforehand. I want to revisit the MessageContext struct a bit before marking this ready. The struct, which was taken from decomp, does not match the struct used by 1.0. Would like to get it corrected before merging.

Edit: I'm just an idiot the struct matches perfectly :)

@rrealmuto
Copy link
Author

Closing this because #1841 was already merged without it. It will be included with silver rupee shuffle.

@rrealmuto rrealmuto closed this Feb 15, 2023
@rrealmuto rrealmuto deleted the control_codes branch September 23, 2023 00:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Component: ASM/C Changes some internals of the ASM/C libraries

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants