Skip to content

V3 Doc Condition Builder

Aerun edited this page Jul 12, 2026 · 1 revision

Managing Conditions in Pokémon Studio

Condition Builder

The goal of the Condition Builder MVP should be to completely replace RPG Maker XP's Conditional Branch command without introducing regressions, while also providing the Pokémon-specific conditions that are considered essential for most fangame projects (badges, party, weather, terrain tags, system tags, maps, and inventory).

More advanced PSDK features (quests, Pokédex, followers, Day Care, advanced Pokémon data, etc.) can then be introduced incrementally through future iterations without impacting migration from RPG Maker XP.

Complete list of conditions by functional domain

Variables

Data Type Possible values Comparison operators
Variable Boolean true / false is true, is false
Variable Number literal value, another variable =, ≠, <, ≤, >, ≥
Variable String text, another variable is, is not, contains, starts with, ends with
Event Variable Boolean true / false is true, is false
Event Variable Number literal value, another variable =, ≠, <, ≤, >, ≥
Event Variable String text, another variable is, is not, contains, starts with, ends with

Legacy RPG Maker XP Switches and Self Switches become boolean variables in Pokémon Studio.

Important

We still have to define if we add the String type for the variables or not.

Event / Map / Position

Data Type Possible values Comparison operators
Event Facing Direction Enum Up, Down, Left, Right is, is not, is one of, is not one of
Player Facing Direction Enum Up, Down, Left, Right is, is not, is one of, is not one of
Player Position Enum Array of [Map, X, Y] is, is not, is one of, is not one of
Event Position Enum Array of [Map, X, Y] is, is not, is one of, is not one of
Current Map Reference Project maps is, is not, is one of, is not one of
Player Terrain Tag Enum / Reference Available terrain tags is, is not, is one of, is not one of
Player System Tag Enum / Reference Available system tags is, is not, is one of, is not one of
Zone Type Enum Indoor, Outdoor is, is not, is one of, is not one of

Important

Regions aren't fully implemented on PSDK yet so we need to define how we want to manage them.

Player

Data Type Possible values Comparison operators
Money Number Amount =, ≠, <, ≤, >, ≥
Step Count Number Integer =, ≠, <, ≤, >, ≥
Play Time Duration hh:mm:ss (in seconds on PSDK) =, ≠, <, ≤, >, ≥
Player State Enum Walking, Running, Surfing, Cycling, Diving, etc. is, is not, is one of, is not one of
Player Name String Text, Regexp is, is not, is one of, is not one of, contains, starts with
Player Appearance / Gender Enum Project-defined values is, is not, is one of, is not one of
Game Language Enum Available languages is, is not, is one of, is not one of

Note

We have to think about the comparison with variables when it's relevant.

Inventory

Data Type Possible values Comparison operators
Item Owned Database Reference Project items has, doesn't have
Item Category Database Reference Project items categories has, doesn't have
Item Quantity Number Quantity =, ≠, <, ≤, >, ≥
Repel Active Boolean true / false is true, is false

Note

We may think about a way to know if an Item is active or not, but not just the Repel. I.e. "If Share Exp is Active".

Badges / Progression

Data Type Possible values Comparison operators
Badge Owned Number Literal value / another variable has, doesn't have
Badge Count Number Integer =, ≠, <, ≤, >, ≥
Pokédex Obtained Boolean true / false is true, is false
Pokédex Variant Active Pokédex Reference Project Pokédex is, is one of, is not, is not one of
Starter Chosen Pokémon Reference Project Pokémon is, is one of, is not, is not one of

Note

Handle Regional Pokédex too.

Time / Environment

Data Type Possible values Comparison operators
Timer Duration Time value =, <, ≤, >, ≥
Weather Enum None, Rain, Snow, Storm, Fog, etc. is, is one of, is not, is not one of
Time of Day Enum Morning, Day, Evening, Night is, is one of, is not, is not one of

Input

Data Type Possible values Comparison operators
Input Key Enum Configured input actions is pressed, is held, is released
Hold Duration Duration Seconds =, ≠, <, ≤, >, ≥
Repeated Input Boolean true / false is true, is false

Pokémon / Party

Data Type Possible values Comparison operators
Party Size Number literal value =, ≠, <, ≤, >, ≥
Party Full Boolean true / false is true, is false
Pokémon in Party Pokémon Reference Project Pokémon contains, doesn't contain
Pokémon in PC Pokémon Reference Project Pokémon contains, doesn't contain
PC Full Boolean true / false is true, is false
Pokémon Species Pokémon Reference Project Pokémon is, is one of, is not, is not one of
Pokémon Level Number literal value =, ≠, <, ≤, >, ≥
Pokémon Status Enum Poisoned, Burned, Asleep, Paralyzed, Frozen, Fainted, Custom is, is one of, is not, is not one of
Pokémon HP Number / Percentage Value or percentage =, ≠, <, ≤, >, ≥
Pokémon IV Number literal value =, ≠, <, ≤, >, ≥
Pokémon EV Number literal value =, ≠, <, ≤, >, ≥
Pokémon Ability Database Reference Abilities is, is one of, is not, is not one of
Pokémon Nature Database Reference Natures is, is one of, is not, is not one of
Pokémon Form Reference Available forms is, is one of, is not, is not one of
Known Move Database Reference Moves has, doesn't have
Held Item Database Reference Items has, doesn't have
Holding Item Boolean true / false is true, is false
Shiny Pokémon Boolean true / false is true, is false
Egg Pokémon Boolean true / false is true, is false
Contest Stat Number literal value is true, is false

Warning

Pokémon Status should display a Select and an additional input if the user selects "custom".

Pokédex

Data Type Possible values Comparison operators
Seen Pokémon Count Number Integer =, ≠, <, ≤, >, ≥
Caught Pokémon Count Number Integer =, ≠, <, ≤, >, ≥
Pokémon Seen Pokémon Reference Project Pokémon has seen, hasn't seen
Pokémon Caught Pokémon Reference Project Pokémon has caught, hasn't caught
Pokédex Completed Boolean true / false is true, is false

Note

Handle Regional Pokédex too. See if we can add an additionnal select to handle that.

Quests

Data Type Possible values Comparison operators
Quest Reference Project quests is started, is completed, is failed, is not started
Quest Type Enum Main, Side is, is one of, is not, is not one of
Quest Objective Reference Quest objectives (need a quest first) is completed, isn't completed
Rewards Claimed Boolean true / false is true, is false

Followers / Characters

Data Type Possible values Comparison operators
Follower Count Number Integer =, ≠, <, ≤, >, ≥
FollowMe Active Boolean true / false is true, is false
FollowMe Let's Go Active Boolean true / false is true, is false

Day Care

Data Type Possible values Comparison operators
Egg Available Boolean true / false is true, is false
Pokémon in Day Care Pokémon Reference Project Pokémon contains, doesn't contain
Day Care Pokémon Count Number 0, 1, 2 =, ≠, <, ≤, >, ≥

Important

Think about the multi Day Care which is a native PSDK system.

Battle

Data Type Possible values Comparison operators
Battle Running Boolean true / false is true, is false
Wild Encounter Available Boolean true / false is true, is false

Script

Data Type Possible values Comparison operators
Custom Script Ruby code Boolean expression should return true

Proposed Prioritization

MVP - RPG Maker XP replacement (no regressions)

The MVP should fully cover every condition currently available through RPG Maker XP's Conditional Branch command while exposing them through Pokémon Studio's new condition builder.

Condition Priority
Boolean Variable Must
Numeric Variable Must
Boolean Event Variable Must
Numeric Event Variable Must
Timer Must
Player Facing Direction Must
Event Facing Direction Must
Money Must
Item Owned Must
Item Quantity Must
Input Key Must
Custom Script Must

In addition, the following Pokémon-specific conditions should be considered part of the MVP, despite not existing in RPG Maker XP, because they are extremely common in Pokémon fangames:

Condition Priority
Badge Owned Must
Badge Count Must
Pokémon in Party Must
Party Size Must
Weather Must
Player Terrain Tag Must
Player System Tag Must
Current Map Must

Iteration 1 - Common Pokémon Studio / PSDK features

Condition Priority
Play Time Should
Step Count Should
Time of Day Should
Season Should
Player State Should
Player Position Should
Event Position Should
Current Region Should
Pokémon in PC Should
Pokémon Seen Should
Pokémon Caught Should
Seen Pokémon Count Should
Caught Pokémon Count Should
Pokémon Level Should
Pokémon Status Should
Known Move Should
Held Item Should
Shiny Pokémon Should
Egg Pokémon Should

Iteration 2 - Advanced PSDK systems

Condition Priority
Quest Started / Completed / Failed Should
Quest Objective Completed Should
Quest Progress Should
Quest Rewards Claimed Should
Follower Count Should
Follower Type Should
Active Follower Should
Character State Should
Day Care Egg Available Should
Pokémon in Day Care Should
Battle Running Could
Wild Encounter Available Could
Encounter Type Could

Iteration 3 - Advanced gameplay and quality of life

Condition Priority
Player Name Could
Player Appearance / Gender Could
Game Language Could
Difficulty Could
Starter Chosen Could
Trainer Defeated Could
Rematch Available Could
Bag Full Could
PC Full Could
Party Full Could
Repel Active Could
Pokémon IV / EV / HP Could
Pokémon Ability Could
Pokémon Nature Could
Pokémon Form Could

Won't Have (MVP)

Condition Reason
Project-specific custom conditions Better handled through custom scripts or future extensions
Deep access to internal Ruby objects High technical complexity and poor UX

Clone this wiki locally