-
Notifications
You must be signed in to change notification settings - Fork 39
Interactable objects (DB)
jjppof edited this page Nov 4, 2023
·
3 revisions
Database file for interactable objects. See an example. This json file is an array of objects, each object corresponds to an interactable object type. Interactable object properties set in the map will override these ones.
-
key_name
[string]
: the interactable object unique key name. -
anchor_x
[number]
: x anchor of the sprite. 0 is 0%, 1 is 100%, see. -
anchor_y
[number]
: y anchor of the sprite. 0 is 0%, 1 is 100%, see. -
scale_x
[number]
: x scale of the sprite. 0 is 0%, 1 is 100%, see. -
scale_y
[number]
: y scale of the sprite. 0 is 0%, 1 is 100%, see. -
has_shadow
[boolean]
: whether this IO has a shadow or not. Default isfalse
. -
body_radius
[number]
: the radius of the colliding body. -
collision_body_bevel
[number]
: collision bodies of interactable objects are not a circle by default. Use this property to set the bevel of the edges of the collision body. -
custom_body_polygon
[array]
: instead of creating a regular body, use this property to create a custom polygon as a collision body for this object. This property expects an array of [x,y] positions, example:[[0,0],[5,0],[5,5],[0,5]]
. Instead of numbers,"sprite_width"
and"sprite_height"
are also accepted. -
send_to_back
[bool]
: if true, this sprite will always be positioned behind the hero. -
psynergies_info
[object]
: an object of psynergy keys that this Interactable Object interacts with and the associated settings of the specified psynergy.-
[ability key name]
[object]
: ability key name as the object key-
interaction_type
[string]
: the type of interaction between the interactable object and the psynergy, it can be:-
"once"
: can interact only once. -
"infinite"
: can interact multiple times.
-
-
-
-
pushable
[bool]
: if true, this object can be pushed. -
rollable
[bool]
: if true, this object can be rolled. -
breakable
[bool]
: if true, this object can be broken when jumping over it. -
is_rope_dock
[bool]
: if true, this object will be a rope dock. -
whirlwind_source
[bool]
: if true, this object will be a whirlwind source. -
actions
[object]
: an object of objects describing the animations of this interactable object. The key of each internal object should be the action key:-
animations
[array]
: array of animations key name. -
frame_rate
[number|array|array of array]
: the animations frame rate. If all animations have the same frame rate, just set a number for it. If each animation has a different frame rate, set it as an array with the animations property array length indicating a frame rate for each animation. If each frame of an animation has a different frame rate, but all the animations follow the same pattern, set it as an array of an array containing a frame rate for each frame (eg.[[x, y, z]]
, for 3 frames). Finally, if all animations have different patterns of frame rate, set it as an array with animations property array length and, in each position of this array, set an array with the frame rate for each frame (eg.[[a, b, c], [x, y, z]]
, for 2 animations of 3 frames). -
frames_count
[number|array]
: if it's an array, it has to have the same length asanimations
property array, for each animation specify the number of frames it has. But, if all animations have the same number of frames, just specify a number for it. -
loop
[boolean|array]
: if it's an array, it has to have the same length asanimations
property array, for each animation, specify if the animation is going to loop or not. But, if all positions have the same behavior, just specify a boolean for it. -
initial_animation
[string]
: initial animation key name of this action. -
spritesheet
[object]
: the spritesheet paths of this action:-
image
[string]
: the spritesheet image relative path. -
json
[string]
: the spritesheet json relative path.
-
-
same_as
[string]
: if you have similar actions that share exactly the same info but only the image is different, you can solely use this property to specify the other action key in which this action is similar.
-
-
initial_action
[string]
: initial action key name. -
events
[array]
: array of objects describing the events that this object creates:-
type
[string]
:-
"jump"
: creates a single jump event. -
"jump_around"
: create a series of jump events around the object. -
"climb"
: create four climb events corresponding to top/bottom entrance/exit. -
"rope"
: create four rope events around this object, which is a rope dock, so the hero can jump into it.
-
-
active
[bool]
: if it's initially active or not. -
dont_propagate_affected_by_reveal
[bool]
: if true and if this interactable object is affected by Reveal psynergy, this event won't be sensible to Reveal. Optional property. Default isfalse
. -
x_shift
[number]
: the amount of x shift in tile size of the event position. -
y_shift
[number]
: the amount of y shift in tile size of the event position. -
dynamic
[bool]
: only for"climb"
type. If true, collision blocks will be created to limit the climbing area. -
top_event_y_shift
[number]
: property only for"climb"
type. The relative y position of the last climb event. -
collision_tiles_relative_pos
[array]
: property only for"climb"
type. If necessary, create collision bodies around the stair. Positions are relative.-
x
[number]
: x relative position. -
y
[number]
: y relative position.
-
-
-
stop_animation_on_start
[boolean]
: if true, will stop this interactable object animation on init. -
allow_jumping_over_it
[boolean]
: if true, a jump event won't be stopped if the jump target location has this interactable object. -
allow_jumping_through_it
[boolean]
: if true, a jump event won't be stopped if the location between the jump start and target locations has this interactable object.
- Home
- Introduction for developers
- Tutorials
- Game initialization settings
- Map settings
-
Game Events
- Add item to party event
- Audio play event
- Battle event
- Branch event
- Camera fade event
- Camera follow event
- Camera move event
- Camera shake event
- Casting aura event
- Change collision layer event
- Char animation play event
- Char blend mode event
- Char exp event
- Char fall event
- Char hue event
- Char item manipulation event
- Char level change event
- Char rotation event
- Char shadow visibility event
- Char tween position event
- Chest event
- Colorize char event
- Colorize map event
- Control bgm event
- Create storage var event
- Custom collision body event
- Destroyer event
- Dialog event
- Djinn get event
- Djinn set status event
- Emoticon event
- Event activation event
- Event caller event
- Event holder event
- Event loop event
- Exit Sand mode event
- Face direction event
- Flame char event
- Generic sprite event
- Grant ability event
- IO anim play event
- IO tween position event
- Item checks event
- Jump event
- Layer tween event
- Layer visibility event
- Look event
- Main chars join split event
- Map blend mode event
- Map opacity event
- Move event
- Outline char event
- Particles event
- Party join event
- Permanent status event
- Psynergy stone event
- Set char activation event
- Set char collision event
- Set char visibility event
- Set IO activation event
- Set IO collision event
- Set IO visibility event
- Set NPC collision event
- Set party coins event
- Set value event
- Storage change event
- Summon event
- Teleport event
- Tile event manage event
- Timer event
- Tint char event
- Databases
- Code reference