The key principle: only ever give ChoiceScript a maximum of two things at a time; anything in parentheses counts as one thing.
The method Meeps has shown you effectively starts by grouping these two things
(have_weapon = "yes") and (weapon_health > 0)
into one thing
((have_weapon = "yes") and (weapon_health > 0))
which lets you adds the next term as a second thing
((have_weapon = "yes") and (weapon_health > 0)) and (stamina >= 10)
and then turn that into one thing by slapping a new set of parens around it
(((have_weapon = "yes") and (weapon_health > 0)) and (stamina >= 10))
and so on. In the end, you could end up with these âtwo thingsâ â
((((have_weapon = "yes") and (weapon_health > 0)) and (stamina >= 10)) and (ultra_attack = "learned")) and (combat_type = "strongarm")
and while this alone would work fine after an *if, which can handle âtwo things,â for *selectable_if , the conditions all need to go inside a single final set of parentheses to become âone thing.â
(((((have_weapon = "yes") and (weapon_health > 0)) and (stamina >= 10)) and (ultra_attack = "learned")) and (combat_type = "strongarm"))
That big stack of parentheses at the beginning can be a helpful tool â start with as many as you have conditions that youâre checking (in this case, five), plus two parentheses at the end of each condition after the first, and thatâll boil a long list of conditions down to âone thingâ as far as ChoiceScript is concerned.
But that approach can get hard to visually check once youâve got more than four or five conditions. And itâs only sure to work if every condition is important in the same way, i.e. if theyâre all linked with and (as in this example) or all linked with or. For a mix of ors and ands, youâll need to understand the âno more than two things at a time principle,â and why it would work equally well to group your conditions into âone thingâ this way:
((((have_weapon = "yes") and (weapon_health > 0)) and ((stamina >= 10) and (ultra_attack = "learned"))) and (combat_type = "strongarm"))
or this way:
((have_weapon = "yes") and (((weapon_health > 0) and (stamina >= 10)) and ((ultra_attack = "learned") and (combat_type = "strongarm"))))