Casper Gaming Developer Corner
Casper Gaming Developer Corner

Documentation

Back to Plugin


Quick InfoVersion: Alpha R5
Made for RPG Maker MZ 1.9.0

Cancel and Default ChoicesIn RPG Maker MZ, when setting up your choices you can usually choose what occurs when the player selects cancel and the default choice that begins selected when the choice window opens up.

If you make a conditional choice your cancel or default choice, weird things can happen. It is recommended to only set choices that will appear every time as your cancel and default choices.

Conditions in Event CommandTo add conditions into your Show Choices event command, use the text code:
<cgmzcc>YourConditionHere</cgmzcc>

Each choice can have one condition. For more complex conditionals, please use the ID condition and set up your complex conditional via the plugin parameters.

Valid conditions are as follows:

Switches can be checked if ON or OFF using the code:
switch:id,[off]
Example ON: <cgmzcc>switch:1</cgmzcc>
Example OFF: <cgmzcc>switch:1,off</cgmzcc>

Self Switches can be checked if ON or OFF using the code:
ss:id,mapId,eventId,[off]
Example ON: <cgmzcc>ss:A,2,3</cgmzcc>
Example OFF: <cgmzcc>ss:A,2,3,off</cgmzcc>

Variables can be checked against a provided value using the code:
var:id,value,[<|<=|=|!=|>=|>]
Example equals: <cgmzcc>var:1,25,=</cgmzcc>
Example greater than or equals: <cgmzcc>var:1,25,>=</cgmzcc>
Example not equals: <cgmzcc>var:1,25,!=</cgmzcc>

Items can be checked if owned or amount owned using the code:
item:id,[amount]
Example to check if has item: <cgmzcc>item:1</cgmzcc>
Example to check if has 10 of item: <cgmzcc>item:1,10</cgmzcc>

Weapons can be checked if owned or amount owned using the code:
weapon:id,[amount]
Example to check if has weapon: <cgmzcc>weapon:1</cgmzcc>
Example to check if has 10 of weapons: <cgmzcc>weapon:1,10</cgmzcc>
Note - will include equips

Armors can be checked if owned or amount owned using the code:
armor:id,[amount]
Example to check if has armor: <cgmzcc>armor:1</cgmzcc>
Example to check if has 10 of armor: <cgmzcc>armor:1,10</cgmzcc>
Note - will include equips

Gold can be checked for an amount possessed using the code: gold:[<|<=|=|!=|>=|>],amount,[id]
Example to check if has exactly 500 gold: <cgmzcc>gold:=,500</cgmzcc>
You can also include an id to check a [CGMZ] Currency System currency
Example: <cgmzcc>gold:=,500,gems</cgmzcc>

Skills can be checked if the party knows them by using the code: skill:id,[actor]
Example to check if any actor knows skill 1: <cgmzcc>skill:1</cgmzcc>
You can also include an actor id to check if a specific actor knows the skill.
Example: <cgmzcc>skill:1,2/cgmzcc>
This would check if actor id 2 knows skill id 1

Actors can be checked if they are in the party by using the code:
actor:id,[level]
Example to check if actor id 1 is in the party: <cgmzcc>actor:1</cgmzcc>

You can also check if the actor's level is above a given level by adding it on the end.
Example: <cgmzcc>actor:1,10</cgmzcc>
This will check if actor 1 is in the party and is at least level 10

Plugin CommandsThis plugin does not have any plugin commands.

Saved GamesThis plugin is fully compatible with saved games. This means you can:

✓ Add this plugin to a saved game and it will work as expected.
✓ Change any plugin params and changes will be reflected in saved games.
✓ Remove the plugin with no issue to save data.

Filename

The filename for this plugin MUST remain CGMZ_ConditionalChoices.js. This is what it comes as when downloaded. The filename is used to load parameters and execute plugin commands. If you change it, things will begin behaving incorrectly and your game will probably crash. Please do not rename the js file.


Known Issues

This plugin currently has no known issues that need to be fixed. If you believe you have encountered a bug, please report it to Casper Gaming.


Compatibility

This plugin currently has no known compatibility issues with other RMMZ plugins. If you believe you have encountered a conflict, please report it to Casper Gaming.


Version HistoryVersion AlphaR2
  • Added gold conditions with [CGMZ] Currency System integration
  • Fix bug with variable comparator parameter not being select type
Version AlphaR3
  • Added weapon equipped condition
  • Added armor equipped condition
Version AlphaR4
  • Added text code parameter
  • Added skill conditions
Version AlphaR5
  • Added actor in party condition
  • Added actor level condition

Back to Plugin