Help:Text modding: Difference between revisions

Jump to navigation Jump to search
m
Remove cancel_index ref to selected_index
(Choice node fix, misc clarifications)
m (Remove cancel_index ref to selected_index)
Line 161: Line 161:
The value of <code>selected_index</code> is, as far as is currently known, an error. It does not correspond to any valid part of the Choice control's binary layout. It is believed to have been a misunderstanding made by the original reverse engineer, in that all Choice controls come at the end of a dialogue line, and therefore end with <code>0x0000</code>, a "null character" which tells the game that the string has ended. It could also be a Nintendo internal library inconsistency between BotW and other games.
The value of <code>selected_index</code> is, as far as is currently known, an error. It does not correspond to any valid part of the Choice control's binary layout. It is believed to have been a misunderstanding made by the original reverse engineer, in that all Choice controls come at the end of a dialogue line, and therefore end with <code>0x0000</code>, a "null character" which tells the game that the string has ended. It could also be a Nintendo internal library inconsistency between BotW and other games.


The value of <code>cancel_index</code> is the choice that is selected when the player presses the B button. It refers to the same zero-indexed list as <code>selected_index</code>. From a game design standpoint, this should usually refer to the last choice.
The value of <code>cancel_index</code> is the choice that is selected when the player presses the B button. It refers to the <code>choice_labels</code> as a zero-indexed list, i.e. the first label is 0, second is 1, third is 2, and fourth is 3. From a game design standpoint, this should usually refer to the last choice.


The <code>unknown</code> code field's purpose is the total byte size of the parameters. There is one parameter per choice plus the <code>cancel_index</code>, and each of those is 2 bytes long, so it should always be 6 for a two-choice, 8 for a three-choice, and 10 for a four-choice control. A single_choice control does not contain a <code>cancel_index</code>, however, it does always contain a <code>0x01CD</code> at the end, so its parameter size is 4.
The <code>unknown</code> code field's purpose is the total byte size of the parameters. There is one parameter per choice plus the <code>cancel_index</code>, and each of those is 2 bytes long, so it should always be 6 for a two-choice, 8 for a three-choice, and 10 for a four-choice control. A single_choice control does not contain a <code>cancel_index</code>, however, it does always contain a <code>0x01CD</code> at the end, so its parameter size is 4.
autopatrol, editnews
201

edits

Navigation menu