Help:Text modding: Difference between revisions

m
→‎Choices: selected_index, more clarification
m (Remove cancel_index ref to selected_index)
m (→‎Choices: selected_index, more clarification)
Line 159: Line 159:
The MSBT library used by WildBits is out of date, and has slight errors.
The MSBT library used by WildBits is out of date, and has slight errors.


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 existence of <code>selected_index</code> is, as far as is currently known, an error. Always make sure <code>selected_index</code> is 0. It does not correspond to any valid part of the Choice control's binary layout, so any other value will produce unintended results. The parameter 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 <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 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.
autopatrol, editnews
151

edits