Adding text is easy, just find an unused text id and add data in git-tracked assets/text/message_data.h.
However removing text is impossible and modifying text is sub-optimal, at least without going to edit the extracted text in extracted/ directly (which is heavily discouraged as that's not git-tracked and overwritten on make setup)
Modifying text is sub-optimal but not impossible because text data can be added before the #include "text/message_data.h" line using an existing message id, and will then take priority as being found first by the game's message system linear search. It is sub-optimal though because the original data is still present in the rom in the end, it just goes unused.
Solution 1: extract each message in its own file
A la "new assets system", we extract each message in its own file and include the 2000ish resulting files in assets/text/message_data.h. That way there is full control over which messages are present or not, and they can be easily replaced.
Solution 2: macro guard each message
Each message in the extracted/ text is wrapped in a #ifndef MESSAGE_0xMSGID #endif, allowing to remove messages by #defineing the corresponding macro in assets/text/message_data.h before the #include "text/message_data.h" line.
Solution 3: skip extracting messages to remove
Somehow provide a list of text ids to the text extraction script, of text to not write to extracted/. Then those messages will be removed and new ones can be added with the "freed" ids.
I don't like this solution because extracted/ is supposed to reflect untouched rom contents
The short discord discussion on the topic that sparked this issue and where the above solutions were mentioned:
from https://discord.com/channels/688807550715560050/688851317593997489/1373446887713275964
to https://discord.com/channels/688807550715560050/688851317593997489/1373449070139543656
Adding text is easy, just find an unused text id and add data in git-tracked
assets/text/message_data.h.However removing text is impossible and modifying text is sub-optimal, at least without going to edit the extracted text in extracted/ directly (which is heavily discouraged as that's not git-tracked and overwritten on make setup)
Modifying text is sub-optimal but not impossible because text data can be added before the
#include "text/message_data.h"line using an existing message id, and will then take priority as being found first by the game's message system linear search. It is sub-optimal though because the original data is still present in the rom in the end, it just goes unused.Solution 1: extract each message in its own file
A la "new assets system", we extract each message in its own file and include the 2000ish resulting files in
assets/text/message_data.h. That way there is full control over which messages are present or not, and they can be easily replaced.Solution 2: macro guard each message
Each message in the extracted/ text is wrapped in a
#ifndef MESSAGE_0xMSGID#endif, allowing to remove messages by#defineing the corresponding macro inassets/text/message_data.hbefore the#include "text/message_data.h"line.Solution 3: skip extracting messages to remove
Somehow provide a list of text ids to the text extraction script, of text to not write to extracted/. Then those messages will be removed and new ones can be added with the "freed" ids.
I don't like this solution because extracted/ is supposed to reflect untouched rom contents
The short discord discussion on the topic that sparked this issue and where the above solutions were mentioned:
from https://discord.com/channels/688807550715560050/688851317593997489/1373446887713275964
to https://discord.com/channels/688807550715560050/688851317593997489/1373449070139543656