[SCRIPTING] HELP WITH HIMEWORKS CHOICE OPTIONS SCRIPT

Posts

Pages: 1
I've been planning out a collaboration with someone off this site on a project that's kind of Adventure Game-ish in design, in an RPGMaker VX Ace engine. A lot of the interaction is meant to involve collecting items which give you new options for interacting with things in your environment. I thought the HimeWorks Choice Options script would be good for this, since it allows for conditional options while interacting with an event. Unfortunately, it seems that having an item in your inventory isn't one of the conditions that it lets you use to set whether an option appears.

The first solution that comes to mind is to use switches associated with all the events where you gain or lose items, so the events can check fro the switches rather than the inventory items. But that's a bunch of extra work I'd rather avoid if possible. Does anyone know how I might be able to alter the script to make it possible to check for inventory items in the first place? Or any other more elegant solutions than adding so many extra switches?
Looks like you should just be able to do something like:
hide_choice(NUM, "$game_party.items.include?($data_items)")

Replace NUM with the number of the choice you want to hide and replace ID with the ID of the item you want to check for.

You can also do:
hide_choice(NUM, "$game_party.weapons.include?($data_weapons)")
hide_choice(NUM, "$game_party.armors.include?($data_armors)")
Sorry, I didn't see this message earlier, but what point in the script call would I replace with the item's ID number? I'm not clear on which section is supposed to be the ID field. Would this be able to hide a choice if an item is not present? If so, how would I do that?
Oops, sorry. Must have missed a bit off. It should be:
hide_choice(NUM, "$game_party.items.include?($data_items[ID])")


You can replace $data_items with $data_weapons or $data_armors. If you want to check if it isn't present, just put a ! at the start. E.g.:
hide_choice(NUM, "!$game_party.items.include?($data_items[ID])")
Thanks, that's a huge help.

I find this whole system completely unintuitive, but since this is really all I really need to know to implement the system anyway, I can deal with not really getting the mechanics.
I think it takes a wee bit of scripting knowledge to be able to use it to its full potential (I find that with quite a few of HimeWorks' scripts).
Pages: 1