As a game developer
I want Pokémon Studio to expose the conditions required for the Event System MVP through a centralized Condition Registry
So that I can reproduce existing RPG Maker XP event logic without regressions and use the most common Pokémon-specific conditions
The Condition Registry is the declarative catalog of conditions available to the Condition Builder (see #780).
It defines which conditions exist and provides the metadata required to display, configure, validate, serialize and later interpret them. It does not manage the visual composition of conditions and does not execute gameplay logic.
The MVP must include:
- every condition required to replace RPG Maker XP's Conditional Branch command
- a limited set of Pokémon- and PSDK-specific conditions considered essential for common fangame workflows.
See #637 and the Wiki related page for further information.
The registry must remain extensible so that future condition domains can be added without modifying the Condition Builder itself.
Objectives
The MVP Condition Registry should:
- prevent regressions when migrating from RPG Maker XP
- expose the most common Pokémon fangame conditions
- centralize condition definitions and avoid hardcoded condition logic in the Condition Builder
- provide stable identifiers suitable for serialization
- make future condition additions predictable and maintainable.
Acceptance Criteria
Registry Architecture
Condition Definition Contract
Each registered condition defines at least:
Changing a display label must not invalidate existing serialized conditions.
Example structure:
{
id: 'player.money',
category: 'player',
labelKey: 'eventConditions.player.money',
operators: [
'equal',
'notEqual',
'lessThan',
'lessThanOrEqual',
'greaterThan',
'greaterThanOrEqual',
],
value: {
type: 'number',
editor: 'numberInput',
minimum: 0,
},
}
The exact implementation may differ, provided the same responsibilities remain clearly separated.
MVP Condition Catalog
Variables
Legacy RPG Maker XP Switches and Self Switches are represented through boolean variables and boolean event variables.
String variables are not part of this ticket until their support is explicitly validated.
Event and Player Direction
Supported values:
Supported operators:
- is
- is not
- is one of
- is not one of
For an Event Facing Direction condition, the definition must also provide a way to select the targeted event.
Player
Supported operators:
The comparison value must support a literal number.
Comparison against another variable may be added only if it is covered by the MVP operand model.
Time
Supported operators:
The editor must expose a readable duration while preserving the value format expected by the serialized condition.
Inventory
Item Owned supports:
Item Quantity supports:
Both conditions must use project item references rather than free-form identifiers.
Input
The condition must reference configured input actions rather than physical keyboard keys when supported by PSDK.
Supported states for the MVP must cover the behavior required to replace RPG Maker XP.
At minimum:
Additional states such as is held or is released should only be included if runtime support is confirmed for the MVP.
Progression
Badge Owned must reference the badge identifier or progression value used by the standard PSDK implementation.
Badge Count supports:
The implementation must avoid assuming that every project uses exactly eight badges.
Party
Pokémon in Party supports:
- contains
- does not contain
It must reference Pokémon species available in the project database.
Party Size supports:
The Registry must not hardcode a maximum party size of six.
Environment and Map
Weather supports:
- is
- is not
- is one of
- is not one of
Current Map must reference maps available in the project.
Player Terrain Tag and Player System Tag must reference the values available in the project configuration or PSDK data model.
Free-form values should not be used when structured project references are available.
Script
The Custom Script condition allows advanced users to provide a Ruby expression expected to return a boolean result.
The definition must:
- expose an appropriate code editor
- explain that the expression must evaluate to
true
- clearly identify the feature as advanced
- preserve the script content without transformation or information loss.
Pokémon Studio-side validation may verify that the field is not empty, but it is not expected to fully validate arbitrary Ruby code.
Operators
Example operator families:
| Value type |
Operators |
| Boolean |
is true, is false |
| Number |
=, ≠, <, ≤, >, ≥ |
| Enum or reference |
is, is not, is one of, is not one of |
| Ownership |
has, does not have |
| Collection membership |
contains, does not contain |
Operator labels may vary by condition when a more natural wording improves comprehension.
Value Editors and References
The registry defines the editor requirements, while the Condition Builder remains responsible for rendering the corresponding component.
Context-Dependent Conditions
Some conditions require contextual data.
Examples include:
- selecting an Event Variable
- selecting the event targeted by Event Facing Direction
- loading maps, items, Pokémon or tags from the current project.
For these conditions:
Validation
Serialization Compatibility
This ticket defines the metadata required for serialization but does not implement PSDK runtime execution.
Localization
Documentation
Identified and Relevant Use Cases
RPG Maker XP Migration
- Rebuilding Conditional Branch commands without losing supported behavior.
- Converting Switches into boolean Variables.
- Converting Self Switches into boolean Event Variables.
- Preserving common conditions involving money, items, timers, input and directions.
Common Pokémon Fangame Logic
- Checking whether the player owns a badge.
- Checking the player's badge count.
- Checking whether a Pokémon species is in the party.
- Checking party size.
- Checking the current map.
- Checking the active weather.
- Checking player terrain and system tags.
Advanced Compatibility
- Preserving uncommon or project-specific logic through a Custom Script condition when no dedicated registry definition exists.
Out of Scope
This story does not include:
- the Condition Builder design or UI implementation
- logical group creation using AND or OR
- condition tree serialization performed by the Builder
- PSDK runtime evaluation
- compilation into executable PSDK instructions
- RPG Maker XP migration logic
- plugin-defined condition registration
- String Variable conditions (probably not in 3.0 MVP neither)
- quests
- Pokédex conditions
- followers
- Day Care
- advanced Pokémon properties
- regions, until their PSDK data model is stabilized
- every potential condition listed in future iterations.
Product Notes
The registry should remain intentionally declarative.
It answers questions such as:
- What is this condition called?
- In which category does it appear?
- Which operators can be used?
- Which values must the user provide?
- Which editor should the Builder render?
- How is the condition identified in serialized data?
It should not:
- render the interface itself
- decide how logical groups are displayed
- execute gameplay logic
- generate arbitrary Ruby code
- contain feature-specific UI flows.
The MVP catalog should remain limited to confirmed migration requirements and high-frequency Pokémon fangame needs. Additional conditions should be delivered incrementally through dedicated tickets rather than expanding this story into the complete PSDK condition catalog.
As a game developer
I want Pokémon Studio to expose the conditions required for the Event System MVP through a centralized Condition Registry
So that I can reproduce existing RPG Maker XP event logic without regressions and use the most common Pokémon-specific conditions
The Condition Registry is the declarative catalog of conditions available to the Condition Builder (see #780).
It defines which conditions exist and provides the metadata required to display, configure, validate, serialize and later interpret them. It does not manage the visual composition of conditions and does not execute gameplay logic.
The MVP must include:
See #637 and the Wiki related page for further information.
The registry must remain extensible so that future condition domains can be added without modifying the Condition Builder itself.
Objectives
The MVP Condition Registry should:
Acceptance Criteria
Registry Architecture
Condition Definition Contract
Each registered condition defines at least:
Changing a display label must not invalidate existing serialized conditions.
Example structure:
The exact implementation may differ, provided the same responsibilities remain clearly separated.
MVP Condition Catalog
Variables
Legacy RPG Maker XP Switches and Self Switches are represented through boolean variables and boolean event variables.
String variables are not part of this ticket until their support is explicitly validated.
Event and Player Direction
Supported values:
Supported operators:
For an Event Facing Direction condition, the definition must also provide a way to select the targeted event.
Player
Supported operators:
>The comparison value must support a literal number.
Comparison against another variable may be added only if it is covered by the MVP operand model.
Time
Supported operators:
>The editor must expose a readable duration while preserving the value format expected by the serialized condition.
Inventory
Item Ownedsupports:Item Quantitysupports:>Both conditions must use project item references rather than free-form identifiers.
Input
The condition must reference configured input actions rather than physical keyboard keys when supported by PSDK.
Supported states for the MVP must cover the behavior required to replace RPG Maker XP.
At minimum:
Additional states such as
is heldoris releasedshould only be included if runtime support is confirmed for the MVP.Progression
Badge Ownedmust reference the badge identifier or progression value used by the standard PSDK implementation.Badge Countsupports:>The implementation must avoid assuming that every project uses exactly eight badges.
Party
Pokémon in Partysupports:It must reference Pokémon species available in the project database.
Party Sizesupports:>The Registry must not hardcode a maximum party size of six.
Environment and Map
Weathersupports:Current Mapmust reference maps available in the project.Player Terrain TagandPlayer System Tagmust reference the values available in the project configuration or PSDK data model.Free-form values should not be used when structured project references are available.
Script
The Custom Script condition allows advanced users to provide a Ruby expression expected to return a boolean result.
The definition must:
truePokémon Studio-side validation may verify that the field is not empty, but it is not expected to fully validate arbitrary Ruby code.
Operators
Example operator families:
Operator labels may vary by condition when a more natural wording improves comprehension.
Value Editors and References
trueorfalsevalues.The registry defines the editor requirements, while the Condition Builder remains responsible for rendering the corresponding component.
Context-Dependent Conditions
Some conditions require contextual data.
Examples include:
For these conditions:
Validation
Serialization Compatibility
This ticket defines the metadata required for serialization but does not implement PSDK runtime execution.
Localization
Documentation
Identified and Relevant Use Cases
RPG Maker XP Migration
Common Pokémon Fangame Logic
Advanced Compatibility
Out of Scope
This story does not include:
Product Notes
The registry should remain intentionally declarative.
It answers questions such as:
It should not:
The MVP catalog should remain limited to confirmed migration requirements and high-frequency Pokémon fangame needs. Additional conditions should be delivered incrementally through dedicated tickets rather than expanding this story into the complete PSDK condition catalog.