Galv's Puzzle Functions MZ

Puzzle Functions
RPG Maker MZ Plugin
Galv
​

Introduction
Additional functionality to make puzzle-making easier.





Features
This plugin adds some functions to use that may help with eventing puzzles and/or quests.

1. Self-switch flipping
Change self switches for any event from any event
Change self switches for events adjacent to other events
Specify turning these self switches off, on or flip them

2. Determine location without having to use Control Variables beforehand.
Test to see if an event or player is at an x,y location
Test to see if an event or player is at another event’s location

3. Group switch/self-switch checking
Test to see if a group of specified switches are on or off
Test to see if a group of events have a certain self switch on or off

4. Checking event activation order
Set a combination
Make events add combination values
Check if the player has activated the events in the right order set in the combination specified.

5. Multiple Item Checking
Check if there are multiple items, armors, weapons in inventory using code with only one conditional branch.

Simple examples of all of the above can be seen in the demo.


How to Use
- Copy the "GALV_PuzzleFunctionsMZ.js" file into your project's /js/plugins/ folder.
- Activate plugin using the 'Plugin Manager'
- Read the 'HELP' documentation (also found in plugin manager) for more details and try the demo if you don't understand.


Plugin
Get it here


Credit and Thanks
- Galv


Terms
Free to use in any RPG Maker MZ project including commercial. Please credit "Galv".
:)
@Galv huge fan of your work!

Happy to see that you are already working on MZ! That gives me confidence to buy that Engine faster 😍
This plugin looks super useful.
Awesome work Galv! Thank you!

I definitely want to make that puzzle where you light up the adjacent flames!
I love this, but can you add in the ability to set the Self Switch of an event on a different map?
I love this, but can you add in the ability to set the Self Switch of an event on a different map?

In case he can't add it... there is a regular script call to change a self switch on another map.
In case he can't add it... there is a regular script call to change a self switch on another map.
Oh? What's the call?
Oh? What's the call?

It is going to be:

$gameSelfSwitches.setValue([mapId, eventID, 'A'], true)

You put the numbers in for MapID and Event ID.
You're a hero! I've been making a puzzle heavy game, and this plugin will be so dang helpful! Thanks for creating and sharing it!
Thanks again for sharing this plugin. I thought I'd let you know that there's an issue when I try to use a script call ( Galv.PUZ.isAt(t,e) ) and don't specifically state the event ( i.e. Galv.PUZ.isAt(0) ). As in, leaving blank for "this event" gives the error "Cannot read property 'x' of undefined. I tried putting " " in that spot, which stopped the error message, but didn't work right (unsurprisingly). I ended up just manually entering all of the event IDs I needed, but I thought I should let you know what's up. Either way, this plugin is awesome, and I'm excited about what I'm able to do with it.
Thanks for letting me know, I forgot to update the text from the port.
You'll need to use: this._eventId instead of leaving it blank.
I updated this plugin so the instructions are correct in latest version.
I love those kind of plugins. Something that gives you that extra help while you event.
It doesn't replace eventing or does all the work for you, but instead works hand in hand with it.

Thanks for porting it!
Awesome plugin, this will help a lot.
Thank you!
I am receiving this error, I even tried to copy and paste the exact same puzzle and funtions from the demo.
TypeError: Cannot set property '1' of undefined
at Object.Galv.PUZ.setComb (GALV_PuzzleFunctionsMZ.js:290)
at eval (eval at Game_Interpreter.command355 (rmmz_objects.js:11256), <anonymous>:1:10)
at Game_Interpreter.command355 (rmmz_objects.js:11256)
at Game_Interpreter.<computed> [as command355] (VisuMZ_0_CoreEngine.js:6363)
at Game_Interpreter.executeCommand (rmmz_objects.js:9625)
at Game_Interpreter.<computed>.<computed> [as executeCommand] (VisuMZ_1_EventsMoveCore.js:6254)
at Game_Interpreter.update (rmmz_objects.js:9530)
at Game_Event.updateParallel (rmmz_objects.js:9424)
at Game_Event.<computed>.<computed> [as updateParallel] (VisuMZ_1_EventsMoveCore.js:6254)
at Game_Event.update (rmmz_objects.js:9416)
Did you start a new game after adding the plugin?
Did you start a new game after adding the plugin?

No, that seems to be required but the other puzzle functions work without.
That function required variables that are created on new game in order for it to work. The others didn't.
Puzzle Functions
RPG Maker MZ Plugin
Galv
​

Introduction
Additional functionality to make puzzle-making easier.





Features
This plugin adds some functions to use that may help with eventing puzzles and/or quests.

1. Self-switch flipping
Change self switches for any event from any event
Change self switches for events adjacent to other events
Specify turning these self switches off, on or flip them

2. Determine location without having to use Control Variables beforehand.
Test to see if an event or player is at an x,y location
Test to see if an event or player is at another event’s location

3. Group switch/self-switch checking
Test to see if a group of specified switches are on or off
Test to see if a group of events have a certain self switch on or off

4. Checking event activation order
Set a combination
Make events add combination values
Check if the player has activated the events in the right order set in the combination specified.

5. Multiple Item Checking
Check if there are multiple items, armors, weapons in inventory using code with only one conditional branch.

Simple examples of all of the above can be seen in the demo.


How to Use
- Copy the "GALV_PuzzleFunctionsMZ.js" file into your project's /js/plugins/ folder.
- Activate plugin using the 'Plugin Manager'
- Read the 'HELP' documentation (also found in plugin manager) for more details and try the demo if you don't understand.


Plugin
Get it here


Credit and Thanks
- Galv


Terms
Free to use in any RPG Maker MZ project including commercial. Please credit "Galv".
:)

This was really helpful! You saved me sir! Thanks! <3

Original thread: https://forums.rpgmakerweb.com/threads/galvs-puzzle-functions-mz.126383/