Skip to content

Change Object ​

Category: Flow

An event content that dynamically changes properties of objects (NPCs, treasure chests, etc.) placed on the map. It is used to control object states according to game progression, such as changing an NPC's name, moving a position, swapping the appearance, toggling event enable/disable, or changing the minimap category.

Batch-change multiple properties with one event content

This event content has an internal change list and can bundle multiple property changes with one event content. For example, "move position + change facing + swap sprite" can be executed with a single Change Object.

Property list ​

This event content has a dynamic UI, and the "Value" input field switches depending on the selected "Property".

Item (tscn label)Input formatDescription
TargetSelectHow to specify the change target (This Object / Other Object)
ObjectSelect dialogWhen Target=Other, choose the object to change
PropertySelectThe item to change (14 types, see below)
ValueDynamicInput field according to Property (text, numeric, check, select, file select)
Add button—Add Property+Value to the change list
ChangesListList of currently set changes
Delete / Move Up / Move Down buttons—Edit the change list

Target ​

Choose how to specify the object to change.

ChoiceBehavior
This ObjectThe object itself that fired this event (= the event firing source)
Other ObjectSpecify the object individually with a select dialog

Typical case of changing the event firing source

Typical cases of changing "this object" are "disappear after talking with an NPC", or "swap the treasure chest's appearance to the 'opened state' sprite after it is opened". Use This Object for these.

Object (target object, only when Target=Other) ​

The select dialog displayed when Target is "Other Object". You can select from a list of objects placed across all maps.

  • Display format: unique_id (object_name @ map_key, cell X, Y)
  • Click the Select button to open the dialog
  • Disabled when Target=This Object

The select dialog is always up to date

Immediately before opening the Select dialog, the internal object index is rebuilt, so objects just added in other tabs are also displayed instantly (supported 2026-09-16).

Property ​

Select the property to change from the following 14 types. The Value input field switches according to the selection.

PropertyTypeDescription
NameTextObject name
Cell XNumericObject's X coordinate (cell units)
Cell YNumericObject's Y coordinate (cell units)
FacingSelect (Down/Up/Left/Right)Initial facing
Facing FixedCheckWhen ON, facing does not change with the movement direction
Walking AnimeCheckPlay animation while walking
Step AnimeCheckPlay step animation
EnableCheckEnable event firing (turning OFF also disables the collision shape and affects appearance)
Event IDSelect (events/*.json)The event to fire
TriggerSelect (on Collision / push Button)How the event fires
Occurrence FormulaFormulaFormula for appearance condition (shown if the result is true)
AnimationTextanimation name of AnimatedSprite2D
SpriteFile selectObject's appearance (data/objects/*.tscn)
Minimap CategoryTextChip category on the minimap (key of minimap_categories.json)

Value ​

The UI switches dynamically according to Property:

  • Name / Occurrence Formula / Animation / Minimap Category: Free text (LineEdit)
  • Cell X / Cell Y: Numeric SpinBox (-9999 to 9999)
  • Facing Fixed / Walking Anime / Step Anime / Enable: Checkbox
  • Facing: 4-choice OptionButton (down / up / left / right)
  • Trigger: 2-choice OptionButton (on Collision / push Button)
  • Event ID: Select OptionButton (from events/*.json list)
  • Sprite: Text + file select button (data/objects/*.tscn)

Changes ​

A list of changes added with the Add button. Multiple changes can be recorded in one event content, and the runtime applies them in array order.

  • Delete: Delete the selected item
  • Move Up / Move Down: Change the order of the selected item

Duplicate properties are overwritten

If you try to Add the same property twice, the existing change is overwritten (position in the list is preserved). This prevents indeterminate apply order that would occur if the same property were included multiple times in the array (bug fix on 2026-08-29).

Runtime behavior ​

When this event content is executed, it is processed in the following order:

1. Resolve the target object ​

Find the target object according to Target:

  • This Object: Get the firing source object (current_local_key) of the currently running event
    • If the firing source cannot be identified: Output warning log and proceed to the next event content without doing anything
  • Other Object: Search for the object with the specified unique_id
    • If unique_id is empty: Output warning log and proceed to the next event content without doing anything

2. Silent skip if the target object is not found ​

If the target object does not exist on the current map (placed on another map, already deleted, etc.), this event content proceeds to the next event content without doing anything (not treated as an error by design).

3. Apply the change list sequentially ​

Apply the change list (Changes array) in order from the top:

  1. Check whether the property key is valid (if invalid, output warning log and continue)
  2. Convert the value to the appropriate type (int / bool / string)
  3. Update the corresponding entry in save data (restored at next load)
  4. Also immediately update the actual object node's property

4. Special processing per property ​

Some properties trigger additional processing when changed:

Cell X / Cell Y ​

  • Automatically compute the screen pixel coordinates (foot center) from the cell coordinates and reposition

Facing ​

  • Automatically switch the AnimatedSprite2D's animation according to the facing
  • Also synchronize the animation in save data (protects the appearance after load from breaking, supported 2026-09-17)

Step Anime ​

  • Reapply the current animation (toggle play / stop)

Enable Event ​

  • Occurrence condition evaluation runs automatically in the next frame, updating visibility

Animation ​

  • Pre-validate whether the applicable animation exists in SpriteFrames
  • If a nonexistent name is specified, neither save data nor the actual node is updated, and the change itself is skipped (with a warning log)
  • A safety mechanism to prevent a situation where an invalid animation name remains in save data and is not fixed even after load (supported 2026-08-29)

Sprite (swapping the appearance tscn) ​

  • Delete the existing AnimatedSprite2D child, then extract the AnimatedSprite2D from the new tscn and attach it
  • The object itself (RigidBody2D + script + properties + unique_id) is preserved, so event settings do not break
  • The pre-swap animation name (facing equivalent) is automatically carried over to the new sprite
  • Specifying an empty string completely removes the appearance

Minimap Category ​

  • A redraw instruction is immediately issued to the minimap HUD, and the changed chip is reflected instantly (supported 2026-10-03)

5. Proceed to the next event content ​

When all changes have been applied, proceed immediately to the next event content.

Typical usage flows ​

Flow 1: Make an NPC disappear (after conversation) ​

Erase the NPC and its appearance after talking with it:

  1. Show Text ← "Thanks, I'm leaving now"
  2. Change Object (this event content)
    • Target: This Object
    • Change list:
      • Enable = OFF (disable collision shape)
      • Sprite = empty string (remove appearance)

Flow 2: Swap chest to opened state ​

After the chest event completes, swap the appearance to the "opened state" sprite:

  1. Show Text ← "Got a potion!"
  2. (item add processing)
  3. Change Object (this event content)
    • Target: This Object
    • Change list:
      • Sprite = res://.../chest_open.tscn
      • Event ID = empty (disable subsequent event firing)

Flow 3: Move an NPC's position ​

Staging where an NPC moves to another place:

  1. Show Text ← "Then I'll wait over there"
  2. Change Object (this event content)
    • Target: Other Object (select the NPC)
    • Change list:
      • Cell X = 20
      • Cell Y = 15
      • Facing: down

Flow 4: Change minimap category of stairs ​

Display hidden stairs on the minimap when discovered in the dungeon:

  1. Show Text ← "Found hidden stairs!"
  2. Change Object (this event content)
    • Target: Other Object (hidden stairs)
    • Change list:
      • Minimap Category = stairs (key of minimap_categories.json)

Flow 5: Change facing (expression change during conversation) ​

The NPC turns to face another direction:

  1. Show Text ← "Hmm, let me think..."
  2. Change Object (this event content)
    • Target: This Object
    • Change list:
      • Facing = down
      • Facing Fixed = ON

Flow 6: Switch Event ID (staged conversation) ​

Fire different events on the 1st vs. subsequent conversations:

  1. (1st conversation processing)
  2. Change Object (this event content)
    • Target: This Object
    • Change list:
      • Event ID = npc_a_second_talk (event for subsequent occasions)

Alternative: Local Flag

The same purpose can be achieved with Set Local Flag + Conditional Branch. Use local flags for simple read-check logic, and this event content when you want to switch the entire event.

Flow 7: Batch change of multiple properties ​

After defeating a monster, change it to a skeleton state (position stays, change appearance, movement, and event):

  1. (battle victory processing)
  2. Change Object (this event content)
    • Target: This Object
    • Change list:
      • Sprite = res://.../bones.tscn
      • Walking Anime = OFF
      • Step Anime = OFF
      • Event ID = bones_check (examining shows traces of becoming bones)
      • Trigger = push Button

Flow 8: Conditional appearance ​

Toggle appear/not-appear based on variable state:

  1. Change Object (this event content)
    • Target: Other Object (specific NPC)
    • Change list:
      • Occurrence Formula = {quest_phase} >= 2

When the occurrence condition is changed, the NPC's visibility is automatically re-evaluated in the next frame.

Typical combinations ​

For the overall picture, see Combination pattern collection.

NPC disappearance after conversation ​

Erase the NPC on completion of conversation:

  1. Show Text
  2. Change Object (this event content) (Enable OFF + Sprite empty)

Appearance swap + 2nd-time event ​

Typical for chests and doors:

  1. (main processing)
  2. Change Object (this event content) (Sprite swap + Event ID switch)

Conditional + object appearance control ​

Show NPC according to game progress:

  1. Conditional Branch (condition)
  2. Change Object (this event content) (change occurrence condition)
  3. End If

Combination with Set Move Route ​

Change position and then start movement:

  1. Change Object (this event content) (Cell X/Y change)
  2. Set Move Route for subsequent movement
Related event contentPurpose
Set Local FlagPer-object ON/OFF flag (lighter than this event content)
Set Move RouteRoute movement of objects
Change MapSwitch maps (this event content is for changing objects within a map)
Conditional BranchConditional check before applying the change
Move to EventConfirm after Event ID change
PageRelated content
Map tab (editor)Object placement
Formula ReferenceNotation of the Occurrence Formula
Event content indexList of all event contents

Notes ​

Target=This Object is only valid when the event firing source can be identified ​

"This Object" refers to the event firing source object. If the event is not started via a firing source (NPC conversation, etc.), a warning log is output and the event ends without doing anything.

Silent when the target object is not found ​

If the object specified by Target=Other does not exist on the current map, this event content proceeds to the next event content without doing anything. The game does not stop even in unintended cases such as specifying an NPC on another map.

Same property is overwritten on Add ​

Even if you Add the same property twice, only one remains in the array, and the value is overwritten (position preserved). If you want to change another property, select a different item in the Property dropdown before Add.

Animation has pre-validation ​

Even if a nonexistent animation name is specified, it is pre-validated at runtime and not applied (with a warning log). This prevents a situation where an invalid animation name remains in save data and is not fixed even after load.

Sprite swap is appearance only, event settings are preserved ​

Even if you swap the sprite, the object itself (script, properties, unique_id, event settings) is preserved. You can use it to "change only the appearance while keeping the behavior the same". Specifying an empty string removes the appearance.

Reflected in save data, so persistent ​

Properties changed by this event content are saved to save data. The changes are maintained even after save/load.

Change order is array order ​

When multiple changes are added to the list, they are applied in array order at runtime. If the order affects the result, adjust the order with Move Up / Move Down (although ordering dependence is almost nonexistent for normal property changes).

Facing change is automatically reflected in AnimatedSprite2D ​

When you change the Facing property, the AnimatedSprite2D's animation is automatically switched to the corresponding facing. You do not need to separately change the Animation property.

Enable Event OFF simultaneously disables appearance and collision shape ​

Setting Enable Event to OFF automatically removes the object's display itself in the next frame, not just event firing (processed as part of occurrence condition evaluation). This allows the "make NPC disappear after event completion" use case to be written simply.

Minimap Category is a key in minimap_categories.json ​

The value specified for the Minimap Category property is a key defined in minimap_categories.json on the Minimap tab. Specifying an undefined key issues a warning on the minimap side, but the runtime continues.

Regarding the Minimap Category property, the following 2 points were fixed on 2026-10-03:

  1. Added choice in the editor UI: Although it was implemented on the runtime at the time of F2R (2026-08-30) design, it was not appearing in the Property pulldown on the editor side. Fixed so that users can select it.
  2. Immediate reflection: There was a bug where even if this property was changed, the minimap continued to display the old chip until the PC moved. Fixed. The minimap is now redrawn immediately upon change.