HIME hidden choice help

Hi!

I am using HIME's hidden choice plugin and I am also using HIME's large choice plugin.

However, I was creating a list of missions with these plugins, and I had a problem.
I thought that the list of this event would be very long, and as a countermeasure, I made a conditional branch of the hidden choice as a script, but it seems that these conditions cannot be checked at once.

In the case of the attached image (named 1st), if actor 10 is at the party, option 2 should be hidden and if actor 7 is not at the party, option 2 should be hidden as well.
By the way, it seems that the script at the bottom overwrites the script at the top so it does not work properly.

As shown in the script below, if actor #7 is not in the party, it will work properly if #2 is hidden.
However, if there is actor number 10 written in the above script, it will not work if option 2 is hidden.
(For reference, it doesn't work to write all in one script.)

In case of conditional branch provided by basic tool, not script, it works well even if duplicated.
If there is only this method, the basic tool conditional branch will be used, but it will be difficult to organize.

If use the conditional branch provided by the basic, it must fill the screen of one event like the attached image (named 2nd) to hide 4 options.
(Conditional branch effects in the 1st and 2nd images are the same.)

Some missions require a specific actor, and don't come out without any of a number of players, and require a number of conditional branches, such as the appearance of a specific item.
You want to check for more than one actor in one hide_choice script, correct? Let's look at some examples~

This says "is actor #7 in the party?":
JavaScript:
$gameParty.members().contains($gameActors.actor(7))
contains always returns true or false, so you don't need to add === true at the end. 🙂

This says "is actor #7 not in the party?":
JavaScript:
!$gameParty.members().contains($gameActors.actor(7))
The ! in front of something in JavaScript means not: it swaps true <-> false.

Not is an example of a "logical operator". You can use other logical operators, like and (&&) or or (||), to combine true/false values. For example, this says "is actor #10 is in the party or actor #7 not in the party?":
JavaScript:
$gameParty.members().contains($gameActors.actor(10)) || !$gameParty.members().contains($gameActors.actor(7))
So this will be true if:
  • Actor #10 is in the party, or
  • Actor #10 is not in the party and actor #7 is not in the party.
You can use this sort of thing in Conditional Branch > Script, or directly in the hide_choice script call. 😤

Hope that helps! You can find more details about || and && here:
(There's a Korean language option in the top-right, in case that helps. ^_^)
You want to check for more than one actor in one hide_choice script, correct? Let's look at some examples~

This says "is actor #7 in the party?":
JavaScript:
$gameParty.members().contains($gameActors.actor(7))
contains always returns true or false, so you don't need to add === true at the end. 🙂

This says "is actor #7 not in the party?":
JavaScript:
!$gameParty.members().contains($gameActors.actor(7))
The ! in front of something in JavaScript means not: it swaps true <-> false.

Not is an example of a "logical operator". You can use other logical operators, like and (&&) or or (||), to combine true/false values. For example, this says "is actor #10 is in the party or actor #7 not in the party?":
JavaScript:
$gameParty.members().contains($gameActors.actor(10)) || !$gameParty.members().contains($gameActors.actor(7))
So this will be true if:
  • Actor #10 is in the party, or
  • Actor #10 is not in the party and actor #7 is not in the party.
You can use this sort of thing in Conditional Branch > Script, or directly in the hide_choice script call. 😤

Hope that helps! You can find more details about || and && here:
(There's a Korean language option in the top-right, in case that helps. ^_^)


If so, it seems like a long line of script would be a long way to hide a single option while taking care of it.

In fact, the HIME plugin site wrote "hide_choice(3, "$gameSwitches.value(3) === false")" when checking the switch.

Oh I know that site too.
Unfortunately, there are places to be translated, but those two sites have not been translated. (Oh, it was easy to understand, so no translation was necessary.)

Still, it would be easier to manage the scripts in order if I put them in one line! It will be less easy to find out when option 1 comes out, so it will be easier to find later!

Now, the remaining problem is that I have to put several conditions in one option, so I think I should be confused.
(ex: To play this mission, the player must have an item, must be switched off, have an actor, but this mission must not have been cleared before, any mission must have been cleared, etc...)

I hate to write complicated things, but I have to do it.

Thank you. I haven't thought about or and and used in scripts with similar questions before.

How do you think about making a switch for every 200 missions for mission clear check? Ha ha ha ha ha
I notice Shaz helped you out with the other script calls over in this thread~ 😤

Yes: if the conditions are complicated, the instructions you write for the computer will be complicated! 😛

If you want to remember each mission's clear status, that is one true/false value per mission. If the missions can be done in any order, then yes, you will need one switch per mission. Alternatively, if you have to complete some missions before others, e.g. maybe there's a main plot where you have to do 20 missions in order, you could have one variable per plot, and use the variable(s) to track your progress. 🙂

[Edit: whoops, fixed the link...]

Original thread: https://forums.rpgmakerweb.com/threads/hime-hidden-choice-help.122632/