Help:Text modding: Difference between revisions

→‎Choices: Remove single_choice parameter size explanation, as unnecessary
m (→‎Choices: selected_index, more clarification)
(→‎Choices: Remove single_choice parameter size explanation, as unnecessary)
Line 163: Line 163:
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.


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.


To implement branching-path dialogue with this control node, the associated event flow must have the switch-type event <code>EventSystemActor::GeneralChoiceX</code>, where <code>X</code> is the number of choices available.
To implement branching-path dialogue with this control node, the associated event flow must have the switch-type event <code>EventSystemActor::GeneralChoiceX</code>, where <code>X</code> is the number of choices available.
autopatrol, editnews
151

edits