Skip to content

Event scripts: <event.h>

Natives for event scripts: towns, maps, cutscenes and dungeon systems.

Natives are built-in engine functions declared with NATIVE(...). A native with one result returns a value (for example, count = get_counter(3);). A native with multiple results writes to pointer arguments (for example, get_actor_pos(0, &x, &y, &z);). OPTIONAL(...) marks arguments that a call can omit. Natives return immediately and do not yield frames; use WAIT(); to pause a script for one frame (25 FPS on PAL).

Declared in sdk/event.h and sdk/helpers/event.h. See C Language, SDK, and Patches for SDK syntax and API Reference for all headers. Generated by dc2tk api-docs from the SDK's headers; change the headers, not this page.

Natives

Native Number What it does
get_pad_held 0 Returns the bitmask of controller buttons currently held down.
get_pad_pressed 1 Returns the bitmask of controller buttons pressed this frame.
get_pad_released 2 Returns the bitmask of controller buttons released this frame.
get_analog_sticks 3 Reads the analog sticks as floats, each the raw stick value divided by 128.
go_to_interior 6 Requests a move into an interior map once the event ends.
go_to_outside 7 Requests a move from an interior back out to an outdoor map.
init_event 8 Resets the event system state (sequences, sprites, effects, lip sync, world coordinate) and turns off camera follow on the active camera.
load_chara 9 Loads a character model from a pack file into a scene character slot, using memory stack stack_no.
set_chara_active 10 With one argument, makes that scene character active so it is stepped and drawn.
clear_memory_stack 11 Empties scene memory stack stack_no and every stack above it, releasing the buffers of the higher ones.
assign_memory_stack 12 Gives memory stack stack_no the free space left in the stack below it, locking the lower stack.
set_flag 13 Sets or clears a bit flag in the save data.
get_flag 14 Returns a bit flag from the save data (0 or 1).
set_counter 15 Stores a 16-bit counter in the save data at index.
get_counter 16 Returns the 16-bit save data counter at index.
VM_ARGS 17 Sets the directory that file names given to later load calls are relative to.
delete_chara 18 Removes a scene character and clears any event object handles that refer to it.
load_chara_motion 19 Loads an extra motion pack into an already loaded scene character, using memory stack stack_no.
VM_ARGS 20 Requests a jump to another map once the event ends.
set_rain 21 Starts the event rain effect when on is non-zero, stops it when 0.
delete_chara_ext_motion 22 Removes the extra motions that were added to a scene character with load_chara_motion.
set_marker 23 Does nothing in the retail game.
VM_ARGS 24 Sets the origin and Y rotation (radians) of the event's world coordinate frame, which event positions and the camera are placed relative to.
finish_event 25 Ends the event: applies a pending world coordinate to the camera and resets sequences, sprites, hit effects, lip sync and the world coordinate.
get_dungeon_event_point 26 Finds a place on the dungeon floor and writes its position and Y rotation.
load_image 27 Loads an .img texture file into event texture block image_no, using memory stack stack_no.
delete_image 28 Frees the event texture block image_no loaded with load_image.
set_dungeon_map 29 Reads two integers and does nothing with them in the retail game.
load_item_model 30 Loads an item's model into a scene character slot, using memory stack stack_no.
open_use_item_menu 31 Opens the use-item menu after the script yields.
set_local_flag 32 Sets or clears an event-local bit flag that is not saved.
get_local_flag 33 Returns an event-local bit flag (0 or 1).
open_party_select_menu 34 Opens the party selection menu after the script yields.
VM_ARGS 35 Starts reading files from disc in the background into the shared read buffer, where later load calls find them.
check_background_load 36 Returns 1 while background file reads are still in progress, 0 once all are done.
get_treasure_box_items 37 Does nothing and reports failure in the retail game; the out parameters are left unchanged.
set_treasure_box_state 38 Sets the state value of the treasure box nearest the player.
set_treasure_box_lid 39 Sets how far the lid of the treasure box nearest the player is open, 0.0 closed to 1.0 open.
add_item 40 Gives the player count of an item (default 1).
get_item_type 41 Returns an item's weapon category: 1 Max melee, 2 Max gun, 3 Monica melee, 4 Monica magic, 0 anything else.
get_free_item_slot 42 Returns the index of the first empty slot in the player's bag, or -1 when the bag is full.
get_chara_fit_scale 43 Returns the scale factor that fits a scene character's bounding box to a cube of half-size size.
play_movie 44 Plays a full-screen movie file (.PSS) to the end before returning, using memory stack stack_no, and draws captions when enabled.
clear_local_counters 45 Sets every event-local counter to 0.
start_crossfade 46 Captures the screen and cross-fades from it.
set_time_of_day 47 Sets the scene's time of day in hours, wrapped into 0 to 24.
set_map_light 48 Selects which lighting set of the active map is used.
VM_ARGS 49 Sets the texture animations used for lip sync on an actor: talk_anim is the moving mouth, idle_anim (optional) the closed mouth.
reset_lip_sync_anim 50 Clears the lip sync texture animation setup.
trigger_lip_sync_anim 51 Switches the lip sync texture animation.
reset_camera 52 Puts a camera back to following character 0.
get_active_chara 53 Returns the number of the playable character currently in control.
set_active_chara 54 Sets which playable character is in control, in the save data and battle state.
set_dungeon_floor 55 Sets the current floor of the current dungeon in the save data.
get_dungeon_floor 56 Returns the current floor of the current dungeon.
set_lip_sync_motion 57 Sets the body motions used while an actor talks: talk_motion while speaking and idle_motion after, each with motion flags.
reset_lip_sync_motion 58 Clears the lip sync motion setup.
trigger_lip_sync_motion 59 Switches the lip sync motion.
set_background_color 60 Sets the screen clear colour, components 0 to 255, alpha defaulting to 128.
open_dungeon_map_menu 61 Opens the dungeon map menu after the script yields, passing value as the menu's first parameter.
go_to_dungeon 62 Ends the event and switches the game to the dungeon.
VM_ARGS 63 Ends the event and switches the game to the town edit mode for map_no.
get_menu_result 64 Writes up to five result values left by the last menu, one per argument given.
load_npc_chara 65 Loads the model of party character npc (1 to 31) into scene character slot chara, using memory stack stack_no.
place_treasure_box 66 With one argument (-1 on the disc), places the floor's treasure boxes automatically.
place_monster 67 Dungeon only.
load_dungeon_map 68 Loads a dungeon map and resets the floor state, sound and music.
load_monster_data 69 Dungeon only.
get_npc_status 70 Returns the status bits of party character npc (1 to 32); the value 1 bit means the character is in the party now.
set_npc_status 71 Sets the status bits of party character npc (1 to 32).
get_party_npc 72 Returns the number (1 to 32) of the first party character whose status has the in-party bit set, or -1 when there is none.
set_local_counter 73 Stores an event-local counter that is not saved.
get_local_counter 74 Returns an event-local counter.
find_local_counter 75 Returns the index of the first event-local counter equal to value, or -1 when none matches.
get_train_seat_pos 76 Writes the position and Y rotation (radians) of train seat seat (0 to 11).
show_chapter_title 77 Opens the chapter title screen for chapter (counted from 1) after the script yields.
set_projection 78 Sets the projection distance used while the event is drawn; larger values give a narrower view.
VM_ARGS 79 Returns the event's projection distance.
fade_in 80 Fades the screen in over frames from colour r, g, b (0 to 255).
fade_out 81 Fades the screen out over frames to colour r, g, b (0 to 255, default black).
run_dungeon_debug_command 82 Runs a debug command.
seek_disc_file 83 Seeks the disc drive to the start of the named file.
get_look_yaw 84 Returns atan2(dx, dz): the Y rotation in radians that faces along the offset dx, dz.
set_motion_blur 85 Sets the strength of the scene's motion blur; 0 turns it off.
load_event_script 86 Requests loading another event script and starting event_no in it.
calc_talk_camera 87 Computes a camera for a conversation between two points: the look-at point is their midpoint raised 30 units and the camera sits at a fixed offset rotated by angle (radians) around it.
spawn_hit_effect 88 Starts a spark burst in hit effect slot (0 to 4) at x, y, z.
copy_chara 89 Copies scene character src into slot dst, sharing its textures and allocating from memory stack stack_no.
get_start_button 90 Returns the pad button the event treats as its start button.
enter_interior 91 Requests entering an interior once the event ends.
get_monster_talk_data 92 Reads data on the dungeon monster the player spoke to: its scene character slot, its monster id and the talk_param it was placed with.
VM_ARGS 93 Enables or disables a named function point (an interaction trigger) on the active map.
get_map_no 94 Returns the current map number.
get_submap_no 95 Returns the current sub map number.
get_prev_map_no 96 Returns the previous map number.
get_prev_submap_no 97 Returns the previous sub map number.
set_rain_chara 98 Sets which scene character rain splashes come off.
get_edit_part_pos 99 Finds a placed part by name on the active edit map and writes its position and Y rotation.
get_chara_pos 100 Writes the position of a scene character.
get_chara_screen_pos 101 Writes the screen position in pixels of a point at 85% of a scene character's height, where a speech balloon would go.
turn_chara_toward 102 Turns a scene character's yaw toward a world point by at most max_turn radians, taking the shorter way.
set_chara_pos 103 Places a scene character at a world position.
set_chara_rot 104 Sets a scene character's rotation in radians around the x, y and z axes; each angle is wrapped into -pi to pi.
VM_ARGS 105 Reads a scene character's rotation in radians around the x, y and z axes into three out parameters.
set_chara_motion 106 Starts a motion or motion sequence on a scene character by name.
set_chara_motion_step 107 Sets how many motion frames a scene character's current motion advances each tick.
set_chara_texture_anim 108 Turns a texture animation group on a scene character's texture block on or off.
set_chara_scale 109 Sets a scene character's scale along x, y and z (1.0 is normal size).
attach_chara_to_frame 110 Makes the follower character's root frame follow the named model frame (bone) of chara, without parenting it, so it moves with that bone.
detach_chara_from_frame 111 Stops a character's root frame following another model's frame, undoing attach_chara_to_frame on the follower.
set_shadow_no_cull 112 Sets the no-cull attribute on a scene character's shadow frame so the shadow is not clipped off screen (1) or is culled normally (0).
get_chara_angle_to 113 Returns the yaw in radians that faces a scene character toward a world point, ignoring height.
get_chara_width 114 Returns a scene character's body width from its model info.
get_chara_height 115 Returns a scene character's body height from its model info, in world units.
get_chara_depth 116 Returns a scene character's body depth from its model info.
set_chara_visible 117 Shows (1) or hides (0) a scene character.
get_chara_visible 118 Reads whether a scene character is shown into visible.
set_chara_cloth_anim 119 Turns the stepping of a scene character's cloth and hair animation on (1) or off (0).
get_chara_motion_progress 120 Returns how far a scene character's current motion has played, from 0.0 to 1.0.
check_chara_motion_end 121 Returns 1 when a scene character's motion reaches its last frame within the next two ticks or no motion plays, else 0.
set_chain_chara_motion 122 Like set_chara_motion but for an action character, setting the motion on it and on every part chained onto it.
set_chara_extra_sound 123 Sets an action character's second sound bank, the loaded sound id its motions play extra sound effects from.
copy_chara_sound_info 124 Copies an action character's sound settings (sound banks and footsteps) to every part chained onto it.
VM_ARGS 192 Opens a message window on a message.
close_message 193 Closes a message window, clears its message number and text, and restores its default reveal speed and bubble centre.
advance_message_page 194 Moves a message window on to its next page when it is waiting at a page break and not scrolling; otherwise does nothing.
place_message_bubble 195 Places a speech bubble and points its tail at the speaker.
set_message_tail 196 Turns a speech bubble's tail on (1) or off (0), optionally setting the tail's length and half its width at the root, in screen pixels.
set_message_slot 197 Forces a speech bubble into a screen slot, counting from 1; 0 lets the game choose.
set_message_speed 198 Sets how many characters a message window reveals per frame; 0 shows the text at once.
set_message_cursor 199 Puts a message window's select cursor on a line; -1 hides it.
is_message_shown 200 Returns 1 when all the window's text is shown (state 3), else 0.
is_message_page_wait 201 Returns 1 when the window is waiting at a page break (state 5), else 0.
is_message_closed 202 Returns 1 when the window has fully faded out (state 0), else 0.
set_message_prompt 203 Sets whether a message window draws the button prompt once its text is shown (1) or not (0).
set_message_bubble 204 Switches a message window to the speech-bubble frame (window mode 1).
set_message_window_flag 205 Sets a message window's frame mode straight to 1 (speech bubble) when on is non-zero, else 0 (no frame), without changing its colours.
set_camera_pos 206 Puts the active camera's eye at a world position at once.
VM_ARGS 207 Reads the active camera's eye position into x, y and z.
set_camera_target 208 Puts the active camera's look-at point at a world position at once.
VM_ARGS 209 Reads the active camera's look-at point into x, y and z.
set_camera_speed 210 Sets how many steps the active camera's eye and look-at point take to reach their next positions.
step_camera 211 Moves the active camera's eye and look-at point the given number of steps toward their next positions; a negative count puts them there at once.
set_message_window_mode 212 Sets the frame drawn around a message window, with its colour and outline: 0 none, 1 speech bubble, 2 help (becomes 4), 3 floating menu, 4 plain menu, 5 yes/no menu, 6 menu with selection band, 7 bottom centre, 8 fourth menu style, 9 bottom bubble, 10 bottom bubble (timer variant), 11 screen centre, 12 plain (stored as 0).
apply_message_preset 213 Empties a message window and applies a preset: 0 speech bubble at the language's reveal speed, 1 system text shown at once, 2 free-placed text shown at once, 3 names over characters, 4 plain menu window, 5 small-font bubble with slow fade, 6 plain menu revealing one character per frame.
set_message_sysmes 214 Sets the system message number that item code slot 1 to 16 inserts into the window's text.
set_message_item 215 Sets item code slot 1 to 16 of a message window to insert an item's name, given the item number.
set_message_value 216 Sets a number the message text inserts: slot 0 sets the single value code, slots 1 to 16 set the numbered value codes and clear their padding width.
get_message_state 217 Returns a message window's state: 0 closed, 1 opening, 2 revealing text, 3 fully shown, 4 closing, 5 waiting at a page break, 6 scrolling.
get_npc_message_no 218 Looks up the event message number of a kind of line a party-capable town character says and writes it to mes_no (0 for an unknown character); kind 0 is the character's name.
set_message_source 219 Points a message window at a message buffer: source 0 makes the window read its messages from sysmes.mes, any other value makes its item codes read from system.mes.
VM_ARGS 220 Returns a message window's frame mode (see set_message_window_mode).
is_voice_playing 222 Returns 1 while a voice stream started by the event is playing, else 0.
set_message_first_choice 223 Sets the first line of a message window that the select cursor can choose, for question menus.
get_message_first_choice 224 Returns the first selectable line of a message window.
set_message_close_timer 225 Sets the number of frames before a message window closes by itself; 0 for never.
VM_ARGS 226 Sets one of several message window options chosen by option: 0 line indent on/off, 1 cursor centring on/off, 2 half-width character width (float, negative for default), 3 shows the aquarium fish list (no values), 4 fixed frame size (width, height, or x, y, width, height), 5 shade of a line (line, shade), 6 alpha of a line (line, alpha), 7 text colour (r, g, b, a), 8 outline style, 9 text offset inside the fixed frame (x, y, negative for default), 10 window alpha (128 opaque).
VM_ARGS 227 Reads one of several values chosen by query: 0 line indent flag, 1 cursor centring flag, 2 number of fish in the main aquarium tank, each into the third argument.
load_message_file 228 Loads a text file into the event scene's memory stack and makes show_message read message numbers from it.
play_message_se 229 Plays a system sound effect for message windows: kind 0 or 1 plays system sound 25, 2 plays sound 0, 3 plays sound 1.
set_message_string 230 Sets string slot 1 to 16 that the message text's string codes insert.
get_message_prompt 231 Returns whether a message window draws its button prompt.
init_asq 300 Does nothing in the retail build: the body reads no arguments and reports success.
sync_asq_chara 301 Does nothing in the retail build: the body reads no arguments and reports success.
set_asq_pos 302 Does nothing in the retail build: the body reads no arguments and reports success.
move_asq_to 303 Does nothing in the retail build: the body reads no arguments and reports success.
set_asq_move_step 304 Does nothing in the retail build: the body reads no arguments and reports success.
turn_asq_to_point 305 Does nothing in the retail build: the body reads no arguments and reports success.
turn_asq_to_angle 306 Does nothing in the retail build: the body reads no arguments and reports success.
clear_asq_rot 307 Does nothing in the retail build: the body reads no arguments and reports success.
wait_asq_rot 308 Does nothing in the retail build: the body reads no arguments and reports success.
turn_asq_while_moving 309 Does nothing in the retail build: the body reads no arguments and reports success.
set_asq_rot 310 Does nothing in the retail build: the body reads no arguments and reports success.
delay_asq_rot 311 Does nothing in the retail build: the body reads no arguments and reports success.
check_asq 312 Does nothing in the retail build: the body reads no arguments and reports success.
trigger_asq_motion 313 Does nothing in the retail build: the body reads no arguments and reports success.
play_asq_motion 314 Does nothing in the retail build: the body reads no arguments and reports success.
VM_ARGS 315 Does nothing in the retail build: the body reads no arguments and reports success.
queue_asq_motion 316 Does nothing in the retail build: the body reads no arguments and reports success.
trigger_asq_anime 317 Does nothing in the retail build: the body reads no arguments and reports success.
VM_ARGS 318 Does nothing in the retail build: the body reads no arguments and reports success.
play_asq_se 319 Does nothing in the retail build: the body reads no arguments and reports success.
show_image 320 Shows (1) or hides (0) one of the 8 event images (0 to 7).
set_image_source_rect 321 Sets the part of the texture an event image shows, in texels: left x, top y, width, height.
set_image_screen_rect 322 Sets the screen rectangle an event image draws into, in pixels: left x, top y, width, height.
set_image_texture 323 Gives an event image (0 to 7) the loaded texture of the given name.
move_image_to 324 Slides an event image's top-left corner to screen x, y over the given number of frames; 0 jumps there.
fade_image 325 Fades an event image's alpha in to 128 (fade_in = 1) or out to 0 (fade_in = 0) over the given number of frames.
set_image_color 326 Sets an event image's colour and alpha, each 0 to 128 where 128 is full.
init_sprite 350 Resets an event sprite (0 to 47) to a hidden, untextured, white screen sprite.
set_sprite_draw 351 Sets the draw pass of an event sprite: 0 hidden, 1 normal pass, 2 first pass.
set_sprite_type 352 Sets where an event sprite lives: 0 on screen (screen position, turns around the screen z axis), 1 in the world as a depth-tested billboard.
set_sprite_texture 353 Gives an event sprite the named texture from a texture block.
set_sprite_pos 354 Sets the centre of an event sprite: screen pixels for screen sprites (y is shifted down 32), world units for world sprites.
set_sprite_size 355 Sets an event sprite's width and height before scaling.
set_sprite_uv 356 Sets the part of the texture an event sprite shows, in texels: u, v, width, height.
set_sprite_color 357 Sets an event sprite's colour and alpha, with 128.0 as full.
VM_ARGS 358 Sets an event sprite's horizontal and vertical scale.
set_sprite_blend 359 Sets an event sprite's alpha blend mode: 1 normal, 2 additive, 3 subtractive, 4 none, 5 full additive.
is_camera_path_running 400 Returns 1 while the camera sequence is still following its path, 0 once it has reached the end.
clear_camera_seq 401 Stops every track of the event camera sequence, clears its state and drops all queued camera commands.
delay_camera_moves 402 Queues a wait of a number of frames on the camera position track, so the next queued eye or look-at command starts that much later.
set_camera_seq_pos 403 Queues putting the camera eye at a world position at once, on the camera position track.
set_camera_seq_ref 404 Queues putting the camera look-at point at a world position at once, on the camera position track.
VM_ARGS 405 Queues moving the camera eye to (x, y, z) and the look-at point to (ref_x, ref_y, ref_z) at an even speed over a number of frames.
move_camera_ref 406 Queues moving only the camera look-at point to a world position at an even speed over a number of frames.
clear_camera_path 407 Queues removing every point from the camera path, on the camera position track.
set_camera_path_frames 408 Queues setting how many frames the camera takes to run the whole camera path.
add_camera_path_point 409 Queues adding an eye point (x, y, z) and a look-at point (ref_x, ref_y, ref_z) to the end of the camera path, up to 16 points.
start_camera_path 410 Queues running the camera along a spline through the camera path points over the path's frame count; the position track continues once the end is reached.
delay_camera_orbit 411 Queues a wait of a number of frames on the camera orbit track (angle, height and distance), so the next queued orbit command starts that much later.
set_camera_orbit_angle 412 Queues placing the camera eye at an angle around the look-at point, keeping its distance.
set_camera_orbit_height 413 Queues placing the camera eye a height in world units above the look-at point.
set_camera_orbit_dist 414 Queues placing the camera eye a horizontal distance in world units from the look-at point, keeping its angle.
set_camera_orbit 415 Queues placing the camera eye around the look-at point by angle in radians about the vertical axis, height above it and horizontal distance from it, all at once.
move_camera_orbit 416 Queues changing the camera's angle (radians), height and distance around the look-at point to new values at an even speed over a number of frames.
delay_camera_fade 419 Queues a wait of a number of frames on the camera fade track, so the next queued fade starts that much later.
init_camera_fade 420 Queues a fade track command that does nothing and finishes at once.
fade_camera_in 421 Queues fading the screen in from a colour over a number of frames, on the camera fade track.
fade_camera_out 422 Queues fading the screen out to a colour over a number of frames, on the camera fade track.
slow_camera_move 423 Queues letting the camera's last eye and look-at movement carry on and die away: each frame for a number of frames the movement per frame is multiplied by rate (such as 0.96) and applied.
slow_camera_orbit 424 Queues letting the camera's last angle, height and distance change carry on and die away: each frame for a number of frames the change per frame is multiplied by rate and applied.
mark_camera_orbit_loop 425 Queues marking a return point on the camera orbit track; commands after it are kept so a later loop_camera_orbit can run them again.
loop_camera_orbit 426 Queues jumping the camera orbit track back to the return point set by mark_camera_orbit_loop, repeating the commands after it.
mark_camera_move_loop 427 Queues marking a return point on the camera position track; commands after it are kept so a later loop_camera_moves can run them again.
loop_camera_moves 428 Queues jumping the camera position track back to the return point set by mark_camera_move_loop, repeating the commands after it.
delay_camera_shake 429 Queues a wait of a number of frames on the camera shake track, so the next queued shake starts that much later.
shake_camera 430 Queues shaking the camera eye and look-at point by an offset (x, y, z in world units) that alternates direction every two frames and shrinks to nothing over a number of frames.
move_camera_eased 431 Queues moving the camera eye to (x, y, z) and the look-at point to (ref_x, ref_y, ref_z) over a number of frames with eased speed.
move_camera_orbit_eased 432 Queues changing the camera's angle (radians), height and distance around the look-at point over a number of frames with eased speed.
delay_camera_chara 433 Queues a wait of a number of frames on the camera character track, so the next queued character attach starts that much later.
attach_chara_to_camera 434 Queues keeping a character at a distance in world units in front of the camera eye, along the line to the look-at point, for a number of frames.
move_camera_pos 435 Queues moving only the camera eye to a world position at an even speed over a number of frames.
shake_camera_target 436 Queues shaking only the camera look-at point by an offset (x, y, z in world units) that flips direction every frame and shrinks to nothing over a number of frames.
check_actor_busy 450 Returns 1 while any track of the actor's sequence still has queued commands running, and 0 once every track has finished.
VM_ARGS 451 Stops every track of the actor's sequence, drops its queued commands, forgets which event object it drives and clears its position and rotation.
bind_actor_object 452 Makes the actor's sequence drive an event object handle, set up earlier by the event object handle natives.
delay_actor_moves 453 Queues a wait of a number of frames on the actor's position track, so the next queued position command starts that much later.
VM_ARGS 454 Queues putting the actor at a world position at once.
move_actor_to 455 Queues moving the actor to a world position at an even speed over a number of frames.
clear_actor_path 456 Queues removing every point from the actor's walking path.
set_actor_path_frames 457 Queues setting how many frames the actor takes to walk its whole path.
add_actor_path_point 458 Queues adding a world position to the end of the actor's walking path, up to 16 points.
start_actor_path 459 Queues walking the actor along a spline through its path points over the path's frame count, turning it to face the direction of travel.
delay_actor_turns 460 Queues a wait of a number of frames on the actor's rotation track, so the next queued rotation command starts that much later.
set_actor_rot 461 Queues setting the actor's rotation at once, in radians about the x, y and z axes.
turn_actor_to 462 Queues turning the actor to a rotation (radians) at an even speed over a number of frames.
turn_actor_toward 463 Queues turning the actor to face a world position over a number of frames.
delay_actor_motion 464 Queues a wait of a number of frames on the actor's motion track, so the next queued motion command starts that much later.
set_actor_motion 465 Queues starting a named motion on the actor at once.
VM_ARGS 466 Queues a named motion that starts once the actor's current motion ends.
wait_actor_motion_end 467 Queues holding the actor's motion track until its current motion ends.
trigger_actor_motion_seq 468 Queues telling the actor's motion sequence to move on to its next part.
set_actor_blend_speed 469 Queues setting how fast the actor blends from one motion into the next; values of 0 or below become the default 0.2.
delay_actor_texture_anim 470 Queues a wait of a number of frames on the actor's texture animation track, so the next queued texture animation command starts that much later.
VM_ARGS 471 Queues turning a texture animation on the actor on or off.
wait_actor_motion_trigger 472 Queues holding the actor's motion track until its motion sequence reaches its trigger state (status 3).
jump_actor_to 473 Queues moving the actor to a world position along a jump arc over a number of frames.
delay_actor_color 474 Queues a wait of a number of frames on the actor's colour track, so the next queued colour change starts that much later.
set_actor_color 475 Queues changing the colour and alpha of the actor over a number of frames, or at once when frames is 0 or left out.
reset_actor_motion 476 Queues putting the actor's motion back to its start.
delay_actor_scale 477 Queues a wait of a number of frames on the actor's scale track, so the next queued scale change starts that much later.
set_actor_scale 478 Queues changing the actor's scale on each axis over a number of frames, or at once when frames is 0 or left out.
set_actor_motion_time 479 Queues jumping the actor's current motion to a time, in motion frames from its start.
set_actor_motion_ratio 481 Queues jumping the actor's current motion to a share of its length, from 0.0 at the start to 1.0 at the end.
set_actor_motion_speed 482 Queues setting how many motion frames the actor's motion advances each step; 1.0 is normal speed.
VM_ARGS 483 Queues keeping the actor at a named frame (bone) of another event object handle, plus an offset, for a number of frames: 0 places it once, -1 keeps it there until the sequence is cleared.
add_actor_pos 484 Queues adding an offset (world units) to the actor's position every frame for a number of frames, 1 when left out.
delay_actor_se 485 Queues a wait of a number of frames on the actor's sound effect track, so the next queued sound effect plays that much later.
play_actor_se 486 Queues playing a sound effect, by its number within a loaded sound bank, on the actor's sound effect track.
VM_ARGS 487 Queues writing the actor's sequence position and rotation to its object and putting its dynamic- animation parts (swinging hair, cloth and the like) back to rest.
move_actor_eased 488 Queues moving the actor to a world position over a number of frames with eased speed.
attach_actor_to_camera 489 Queues keeping the actor at a distance in world units in front of the active camera eye, along its view line, for a number of frames; -1 keeps it there until the sequence is cleared.
turn_actor_eased 490 Queues turning the actor to a rotation (radians) over a number of frames with eased speed.
step_actor_motion 491 Queues stepping the actor's motion once right away, so a newly set motion's pose shows without waiting for the next frame.
get_contents_pos 501 Does nothing.
get_pot_pos 502 Writes the world position of the pot or box the player carries and throws in dungeons into x, y and z.
get_pot_state 503 Returns the state of the carried pot: 0 none, 1 held, 2 thrown and flying.
get_person_status 504 Does nothing and reports failure; the result is left unchanged.
get_player_chara 505 Returns the number of the character the player controls in the event scene.
get_prev_camera_pos 506 Writes the eye position of the event scene's previous camera (the one set_prev_camera_id names) into x, y and z.
get_prev_camera_ref 507 Writes the look-at position of the event scene's previous camera (the one set_prev_camera_id names) into x, y and z.
set_camera_next_ref 508 Gives the active follow camera a look-at position it moves toward.
open_menu 509 Asks the game to open a menu once the event yields.
get_menu_status 510 Does nothing and reports failure.
load_equip_model 511 Loads the model of a party member's current equipment for an event character, using memory stack stack_no.
get_equip_item 512 Returns the item number in an equipment slot (0 to 4; 0 and 1 are the weapons) of party member 0 or 1.
set_time_flow 513 Turns the passing of the time of day in the event scene on (1) or off (0).
set_door_material 514 Does nothing.
enable_scene_skip 515 Lets the player skip the current cutscene, fading to black when skipped.
set_active_camera_id 516 Sets which camera number of the event scene is the active one.
set_prev_camera_id 517 Sets which camera number of the event scene counts as the previous camera, the one the get_prev_camera natives read.
load_event_dng_map 519 Loads a dungeon map for display in an event into memory stack stack_no, from event texture file tex_index, and builds the path the player's piece moves along from room to next_room.
unload_event_dng_map 520 Frees the textures of the event dungeon map.
move_dng_map_piece 521 Starts (1) or stops (0) the player's piece moving along its path on the event dungeon map.
show_event_dng_map 522 Shows (non-zero) or hides (0) the event dungeon map.
fade_event_dng_map 523 Shows the event dungeon map and fades it in (fade_in = 1) or out (fade_in = 0) over a number of frames.
get_prev_eye_goal 524 Writes the eye position the event scene's previous camera is moving toward into x, y and z.
get_prev_ref_goal 525 Writes the look-at position the event scene's previous camera is moving toward into x, y and z.
set_camera_goal_pos 526 Gives the active follow camera an eye position it moves toward.
check_line_hit 527 Casts a line segment from the from point to the to point against the map's collision polygons, skipping polygons whose ignore bits overlap ignore_mask, and also against treasure boxes when check_boxes is 1.
set_follow_pos 528 Sets the world point the active follow camera looks at and trails.
set_follow_pos_a 529 Sets the world point the active follow camera looks at and trails.
set_follow_offset 530 Sets an offset in world units that the active follow camera adds to its follow point.
set_camera_follow 531 Turns following on (1) or off (any other value) for the active follow camera.
step_follow_camera 532 Advances the active follow camera by a number of frames toward its follow point and target angle.
set_follow_angle 533 Sets the angle in radians around the follow point that the active follow camera turns toward.
set_follow_height 534 Sets how far above the follow point the active follow camera sits, in world units.
set_follow_distance 535 Sets how far the active follow camera stays from its follow point, in world units.
get_direction_angle 536 Computes the direction from the first point to the second.
set_dungeon_stage 537 Stores a stage number in the dungeon record of the save data.
get_dungeon_stage 538 Returns the stage number stored in the dungeon record of the save data.
set_camera_control 539 Turns the player's camera control on or off for the active camera.
get_follow_angle 540 Returns the current angle in radians of the active follow camera around its follow point.
get_follow_height 541 Returns the height of the active follow camera above its follow point, in world units.
get_follow_distance 542 Returns the distance of the active follow camera from its follow point, in world units.
find_invention_index 543 Looks up an item in the list of inventions the player has made.
run_pending_map_jump 544 Carries out the map jump stored on the scene when one is pending: it leaves the current interior when the stored target is the exit name, otherwise it enters the named interior map.
start_door_mode 545 Hands control to the door sequence for the door the scene last touched, passing that door's place numbers, position and facing angle.
get_money 546 Returns how much money the player has.
add_money 547 Adds money to the player's purse.
get_item_count 548 Returns how many of an item the player holds.
check_button_pressed 549 Checks whether a pad button went down this frame.
get_language 550 Returns the game language: 0 Japanese, 1 English, 2 French, 3 German, 4 Italian, 5 Spanish.
check_invention_ideas 551 Checks whether the player has the three ideas an invention item needs, from photos or memo entries.
set_villager_ai 552 Lets a registered villager move on its own again (on = 1) or holds it in place (on = 0).
count_photos_of 553 Counts the photos in the player's photo slots that show a subject.
get_photo_count 554 Returns how many photo slots hold a photo.
set_contents_misc 555 Does nothing.
set_scene_status 556 Sets or clears status bits on a scene entry.
start_subgame 557 Starts a minigame: 1 fishing, 2 fish race, 3 buggy game.
VM_ARGS 558 Sets fish race state by command: 0 aquarium number, 1 ranking, 2 class, 3 race progress, each from value; 4 adds 1 to the tournament count; 7 reloads the race prizes.
VM_ARGS 559 Reads fish race state into value by command: 0 aquarium number, 1 ranking, 2 class, 3 race progress, 5 tournament count.
set_save_value 560 Changes save data by command: 0 sets the game progress to value; 1 unlocks the badge of monster value; 2 repairs every ridepod part and refills its energy; 3 sets a flag that makes the next load_bgm do nothing; 4 removes the first electric fish from the aquarium.
VM_ARGS 561 Reads save data into value by command: 0 game progress, 2 whether the first aquarium tank holds an electric fish, 4 play time in frames, 5 the caption-off setting, 6 the current fishing tournament kind.
VM_ARGS 562 Removes every dungeon monster and clears ridepod projectiles, then resets monster memory, collision, effects, monster textures and the monster sound port.
VM_ARGS 563 Menu helpers by command: 0 (prompt, answer, code) sets the text a name entry checks against; 1 clears fish fatigue and ends the current fishing tournament; 3 shows (1) or hides (0) the Geostone parts announcement; 4 resets the loading bar; 5 (stack, town) builds a town's Geostone announcement in a scene memory stack and starts the download effect; 7 clears the announcement.
VM_ARGS 564 Menu queries by command, written to value: 0 floors with a cleared spheda challenge, 1 the town square event type, 3 scoops newly marked known, 4 scoops newly marked obtained, 8 1 once the Geostone download effect has ended.
get_analysis_flag 565 Checks one town analysis entry.
get_town_percent 566 Returns a town's Georama completion percentage, the sum of the percent of every analysis entry that is met.
VM_ARGS 567 Georama helpers by command: 1 (slot) loads the current villager's model into that character slot at the town's start point; 2 reloads the NPC living in the placed house into slot 8; 3 (&can_burn) gives whether any placed part can burn.
find_chara_slot 568 Searches scene character slots 8 to 63 for the character with this number.
load_monster_talk_file 569 Starts a background load of the current dungeon's monster talk message file in the current language.
load_monster_talk_message 570 Copies the loaded monster talk file into a message window's text data, allocating from a scene memory stack.
VM_ARGS 571 Leaves the event for Georama edit mode.
get_chapter 572 Returns the story chapter derived from the game progress: 0 below progress 2, 1 at progress 2 or 3, otherwise progress minus 2.
get_npc_train_value 573 Returns a value from a built-in table of NPC train data.
register_villager 574 Registers a villager in a scene character slot.
set_eye_view_parts 575 Switches between two named part groups on the active maps for the first-person view.
set_quest_state 576 Changes a quest request by command: 0 sets its accepted flag to flag, 1 marks it cleared and ignores flag.
get_quest_state 577 Returns a quest request's state; command must be 0.
check_pipe_hit 578 Like check_line_hit but sweeps a pipe of the given radius from the from point to the to point, collecting up to 16 hits.
get_last_interior_map 579 Returns the number of the interior map the player last left, or -1 while still inside an interior.
set_event_data 581 Writes one field of the scene's current event data: 0 flag, 1 event number, 2 point number, 3 to 5 event arguments 1 to 3, 6 map event check type, 7 map event number, 13 character slot, 14 character number.
run_stopwatch 582 Stopwatch by command: 0 starts timing against the play time; 1 stops it and writes minutes, seconds, hundredths, and 1 when under 7261 frames, or -1 into value1 if it was never started.
request_edit_event 583 Asks the event loop to act on the town's edit event: 0 sets a scene map flag and restarts it, 1 resets it.
VM_ARGS 584 Fishing tournament queries by command: 0 (message) writes the top-ten record table into a message window; 2, 3 and 4 write the free entry places, the total weight of the three heaviest fish, and the rank into value.
set_chara_draw_distance 585 Sets the camera distance beyond which a character is not drawn, in world units, on the character and all its linked parts.
set_chara_lighting 586 Turns scene lighting on or off for a character's model, or for one named frame of it.
set_chara_flat_color 587 Sets the flat color of a character's model, or of one named frame of it.
get_extra_mode 588 Returns the extra mode flag, nonzero while a bonus mode started from the title screen is being played.
set_wind 589 Sets the scene wind used by swinging model parts, as a strength and a direction vector that is normalized.
set_extra_mode 590 Sets the extra mode flag that marks a bonus mode started from the title screen.
reset_sound_port 600 Stops every sound on a sound port and reinitializes it.
VM_ARGS 601 Loads a sound bank onto a port and gives its sound id.
play_se 602 Plays sound effect se_no from a loaded sound bank.
get_sound_id 603 Reads the sound id of a scene sound bank: 0 ambient, 1 to 3 base map, 4 battle.
pause_se 604 Pauses sound effect se_no of a loaded sound bank.
stop_se 605 Stops sound effect se_no of a loaded sound bank.
VM_ARGS 606 Sets the volume of a playing sound effect.
set_se_pan 607 Sets the pan of sound effect se_no in a sound bank, 0 to 127 with 64 centered.
set_se_pitch 608 Sets the pitch of sound effect se_no in a sound bank.
stop_all_se_on_port 609 Stops every sound effect on a sound port; -1 stops all ports except music.
load_bgm 610 Loads a music file by number into the scene's music slot.
play_bgm 611 Plays a track of the loaded music file, stopping the previous one; scripts use track 0.
stop_bgm 612 Stops a track of the loaded music file.
VM_ARGS 613 Starts opening the event voice stream.
play_stream 614 Plays the opened event voice stream.
stop_stream 615 Stops and closes the event voice stream.
prepare_stream 616 Sets up the opened event voice stream for mono or stereo and starts preloading it.
attach_camera_to_actor 617 Queues a camera sequence command that keeps the camera orbiting an actor at the actor's position plus the offset, at an angle in radians, a height and a distance in world units.
detach_camera_from_actor 618 Queues a camera sequence command that stops the camera orbiting an actor.
get_stream_status 619 Returns the state of the event voice stream, 0 when it is idle or finished.
get_system_sound_id 620 Returns the sound id of the system sound bank, for use with play_se.
check_stream_busy 621 Checks whether a stream request is still in progress.
load_env_sound 622 Loads an ambient sound bank by number, unless it is already loaded.
play_env_sound 623 Plays an ambient loop from the ambient sound bank, stopping the previous one.
play_system_se 624 Plays a sound effect from the system sound bank.
reset_source_sounds 625 Stops and unloads all positional sound sources and resets the event and object sound ports.
reset_env_sounds 626 Stops the ambient loop, unloads the ambient sound bank and resets the sound sources.
reset_base_sounds 627 Stops and unloads the base map sound bank and the battle sound bank.
load_source_sound 628 Loads a positional sound source bank by number, unless it is already loaded.
load_footstep_sound 629 Does nothing and reports failure.
load_door_sound 630 Does nothing and reports failure.
load_box_sound 631 Does nothing and reports failure.
load_battle_sound 632 Loads a battle sound bank by number, unless it is already loaded.
delete_sound_port 633 Releases a sound port in the sound driver, freeing what was loaded on it, and reinitializes the port.
stop_env_sound 634 Stops the ambient loop.
fade_in_bgm 635 Fades the music in from silence over a number of frames.
fade_out_bgm 636 Fades the music out over a number of frames.
VM_ARGS 637 Sets the volume of the playing music.
set_sound_reverb 638 Does nothing and reports failure.
set_env_bgm_volume 639 Sets the volume of the map's ambient environment sound loop, as a factor from 0.0 to 1.0.
check_stream_audible 640 Reads the output level of the event stream and returns 1 when either channel is outside -10 to 10, 0 when both are near silence.
set_env_bgm_auto 641 Turns on (1) or off (0) the environment sound following the time band of the map.
skip_next_bgm_load 642 Makes the next scene music load be skipped once, keeping the music already loaded.
skip_next_sound_load 643 Makes the next sound set load (load_sound_set or a map change) be skipped once.
allow_bgm_load 644 Clears the flag set by skip_next_bgm_load so the next music load happens normally.
allow_sound_load 645 Clears the flag set by skip_next_sound_load so the next sound set load happens normally.
load_se_base 646 Loads the base sound effect bank with the given number, unless that bank is already loaded or the number is negative.
load_sound_set 647 Loads everything listed for a sound data id: the base, battle, environment and source effect banks, the reverb setting and the environment sound loop.
close_stream 648 Stops and closes the event stream, restoring its saved volume.
open_stream_named 649 Marks the event stream as reading from a file name, but the engine only builds the path and never opens the file.
load_bgm_pack 650 Makes the given music number the loaded music pack, taking the file from the preloaded background buffers.
VM_ARGS 651 Returns the number of the currently loaded music pack.
get_bgm_master_volume 652 Returns the master volume factor of the active music channel.
set_bgm_master_volume 653 Sets the master volume factor of the active music channel and reapplies the music volume.
get_battle_bgm_volume 654 Returns the volume the dungeon battle music is played at.
set_battle_bgm_volume 655 Sets the volume the dungeon battle music is played at.
set_reverb_input 656 Sets a sound processor parameter on both cores that the menus also use when switching reverb: nonzero on sets it to -4, 0 sets it to -52.
stop_source_se 657 Stops every sound effect still playing from the scene's loaded source effect banks.
pause_bgm 658 Pauses the music playing on the active music channel.
open_stream_wav 659 Opens the numbered stream file (number printed as seven digits plus .wav, such as 5400015.wav) on the event stream for playback.
save_bgm_status 660 Saves the active music's state (playing, paused or stopped, track, volumes, loaded pack) into a single save slot that restore_bgm_status reads.
restore_bgm_status 661 Restores the music state saved by save_bgm_status: track, volumes, and whether it plays, is paused or is stopped.
get_saved_bgm_no 662 Returns the music pack number stored by the last save_bgm_status.
get_se_status 663 Returns the playback state of a sequence sound: 0 stopped, 1 playing, 2 paused, 3 port paused, or -1 when the sound id or number is invalid or the sound is not a sequence.
stop_all_se 664 Stops every sound effect, including source effects and looping effects, and resets the looping effect manager.
stop_all_sound 665 Stops the music, resets the music channel and stops every sound effect.
skip_next_bgm_play 666 Makes the next music play request be ignored once.
allow_bgm_play 667 Clears the flag set by skip_next_bgm_play so the next music play request happens normally.
VM_ARGS 668 Returns the default music number of a map's sound data, or -1 when it has none.
set_movie_caption 669 Controls subtitles shown over a movie.
register_villager_here 670 Registers a scene character as a town villager in the given villager slot, using the character's current position and facing as its home spot.
set_fishing_tournament 671 Runs a fishing tournament command.
bind_handle_chara 700 Binds an event object handle (0 to 31) to a scene character, so the other handle natives act on it.
VM_ARGS 701 Binds a handle to a placed map part of the active maps, found by number or by name.
set_handle_pos 702 Moves the object bound to a handle to a position in world units, relative to the event's world origin when one is set.
set_handle_rot 703 Sets the rotation of the object bound to a handle, in radians, offset by the event's world rotation for characters and world objects.
get_handle_pos 704 Writes the position of the object bound to a handle, in the event's coordinates, to x, y and z.
get_handle_rot 705 Writes the rotation in radians of the object bound to a handle to x, y and z.
set_handle_motion 706 Starts a named motion on the character bound to a handle.
set_handle_motion_step 707 Sets how many motion frames the character bound to a handle advances per tick.
VM_ARGS 708 Turns texture animations of the character bound to a handle on or off.
set_handle_scale 709 Sets the scale of the object bound to a handle on each axis.
set_handle_visible 710 Shows (1) or hides (0) the character or map object bound to a handle.
get_handle_visible 711 Returns whether the object bound to a handle is shown.
set_handle_frame_visible 712 Shows or hides a named model frame of the character or frame bound to a handle.
set_handle_shadow 713 Turns the shadow of the character bound to a handle on (1) or off (0).
set_handle_translate 714 Writes a translation into the root frame matrix of the character, or the local matrix of the frame, bound to a handle, offsetting the model from its position.
bind_handle_sprite 715 Binds a handle to an event sprite by number.
set_handle_foot_sound 716 Sets the footstep sound id of the character bound to a handle.
set_handle_frame_draw 717 Writes a raw draw value into a named model frame of the character or frame bound to a handle.
get_handle_frame_pos 718 Writes the world position of a named model frame of the character bound to a handle, in the event's coordinates, to x, y and z.
set_handle_se_bank 719 Sets the sound effect bank id that the character bound to a handle plays its motion sounds from.
get_handle_frame_draw 720 Returns the draw value of a named model frame of the character or frame bound to a handle, or 0 when the frame is not found.
bind_handle_chara_frame 721 Binds a handle to a named model frame inside a scene character, so it can be moved, rotated or hidden on its own.
set_handle_fade_flag 722 Sets the fade flag of the character bound to a handle.
reset_handle_dynamics 723 Updates the position of the character bound to a handle, resets its dynamic animation parts (swinging pieces such as hair or cloth) to rest, then steps them 10 times.
set_handle_shadow_draw 724 Writes a raw draw value into a named frame of the shadow model of the character bound to a handle.
bind_handle_geostone 725 Binds a handle to the dungeon geostone object.
bind_handle_named_chara 726 Binds a handle to the character with the given name among the player's linked characters.
apply_handle_motion 727 Applies the pending motion change of the character bound to a handle at once instead of waiting for the next update.
VM_ARGS 728 Binds a handle to a placed part of the active edit map, found by number or by name.
set_handle_frame_alpha 729 Sets the opacity of a named model frame of the character or frame bound to a handle, from 0.0 (invisible) to 1.0.
VM_ARGS 730 Binds a handle to a named function point of the active map.
set_handle_foot_bank 731 Sets the footstep sound effect bank of the character bound to a handle.
bind_handle_door 732 Binds a handle to the door part of the generated dungeon floor and returns 1 on success, 0 otherwise.
init_sphida 750 Clears the sphida (dungeon golf) game state so no game exists.
create_sphida_game 751 Creates a sphida game in the numbered scene memory stack and starts it.
set_sphida_playing 752 Sets whether the sphida game runs; while 0 nothing is stepped or drawn.
set_sphida_map_scroll 753 Lets the player scroll the sphida mini map while an event runs (1) or not (0).
set_sphida_line_marks 754 Shows (1) or hides (0) the shot line points on the sphida mini map.
set_sphida_line_point 755 Sets one of the 5 shot line points (index 0 to 4) marked on the sphida mini map, in world units.
set_sphida_pin_pos 756 Sets the position of the sphida pin in world units.
get_sphida_pin_pos 757 Writes the position of the sphida pin to x, y and z.
set_sphida_ball_pos 758 Sets the position of the sphida ball in world units.
get_sphida_ball_pos 759 Writes the position of the sphida ball to x, y and z.
set_sphida_pin_color 760 Sets the pin colour, 0 or 1, which picks its mini map marker.
get_sphida_pin_color 761 Returns the pin colour (0 or 1).
set_sphida_ball_color 762 Sets the ball colour, 0 or 1, which picks its mini map marker.
get_sphida_ball_color 763 Returns the ball colour (0 or 1).
set_sphida_par 764 Sets the shots of par left for the hole.
get_sphida_par 765 Returns the shots of par left for the hole (one more while the debug flag is on).
get_sphida_map_scale 766 Returns the sphida mini map scale (0 to 2, from the dungeon map setting).
get_sphida_tex_bank 767 Returns the texture bank the sphida status panel draws from.
set_sphida_status_panel 768 Shows (1) or hides (0) the sphida status panel and power gauge.
reset_sphida_gauge 769 Resets the sphida power gauge to idle: no power, cursor at rest, result code -10.
start_sphida_gauge 770 Starts a swing on the sphida power gauge; the cursor begins to charge.
press_sphida_gauge 771 Presses the sphida power gauge: while charging it sets the power, while running back to the impact point it stops the cursor for judging.
get_sphida_shot_power 772 Returns the power set on the sphida gauge, from 0.0 to 1.0.
get_sphida_gauge_result 773 Returns the result of the last swing: -10 no swing yet, -3 to 3 how far from the impact point the cursor stopped (0 is on it), 4 ran past without a stop, 5 ran back to empty without power set.
set_sphida_safe_zone 774 Sets the width of the accurate zone around the impact point on the sphida gauge, kept within 1 to 6.
get_sphida_club_stats 775 Writes the stats of sphida club number 9 to 14: power is the launch speed, extra is a second float the shot scripts read, and safe_level is the gauge safe zone width.
set_sphida_spin_mark 776 Sets the spin mark on the sphida ball panel, x across and y down, each from -1.0 to 1.0.
set_sphida_club 777 Sets the club the player holds in the sphida game (9 to 14).
set_sphida_carry_angle 778 Stores the angle in radians at which the sphida ball is struck, which the status panel uses to draw the carry.
get_sphida_cursor_pos 779 Writes the screen position of the sphida gauge cursor to x and y.
load_sphida_pin_collision 780 Loads the pin collision from a model file that must already be in the preloaded background buffers, allocating from the numbered scene memory stack.
get_sphida_prize 781 Writes the sphida prize item and its count for the current dungeon floor to item and count.
set_sphida_last_challenge 782 Marks whether the last challenge of the current spheda hole is under way (nonzero) or not (0).
get_sphida_last_challenge 783 Returns the spheda last-challenge flag set by set_sphida_last_challenge.
get_sphida_bonus_mode 784 Returns 1 while one of the spheda bonus courses is being played, else 0.
set_sphida_hole 785 Sets the current spheda hole number in the save data.
get_sphida_hole 786 Returns the current spheda hole number from the save data.
set_sphida_score 787 Stores a spheda score for hole 0 to 8 in the save data; hole = -1 means the current hole.
get_sphida_score 788 Returns the saved spheda score of hole 0 to 8.
run_mt_test 998 Debug leftover that does nothing.
VM_ARGS 999 Debug leftover that does nothing and ignores its argument.
set_vector_zero 1000 Sets the three out variables to 0.0.
normalize_vector 1001 Normalizes the vector held in x, y, z in place to length 1.
copy_vector 1002 Copies src_x, src_y, src_z into the three out variables.
add_vector 1003 Adds add_x, add_y, add_z to the vector held in x, y, z, in place.
subtract_vector 1004 Subtracts sub_x, sub_y, sub_z from the vector held in x, y, z, in place.
scale_vector 1005 Multiplies the vector held in x, y, z by scale, in place.
divide_vector 1006 Divides the vector held in x, y, z by divisor, in place.
get_vector_length 1007 Returns the length of the vector x, y, z.
get_distance 1008 Returns the distance between two points, in world units.
get_square_root 1009 Returns the square root of value.
get_atan2 1010 Returns atan2(y, x) in radians from -pi to pi.
compare_angles 1011 Compares two angles in radians, wrapping their difference into -pi..pi.
wrap_angle 1012 Wraps the angle held in the variable into the range -pi..pi radians, in place.
VM_ARGS 1013 Reads a random number from 0 up to but not including range into result.
get_segment_point_dist 1014 Returns the distance from point p to the segment from a to b, or -1.0 when p projects outside the segment.
create_sword_trail 1015 Creates the single event sword trail, a ribbon drawn between pairs of points, in the given scene memory stack.
delete_sword_trail 1016 Forgets the event sword trail made by create_sword_trail so it is no longer drawn.
set_sword_trail_color 1017 Sets the RGBA colour of the leading edge and of the trailing edge of the event sword trail, each 0 to 255 with 128 as neutral.
add_sword_trail_point 1018 Records a new pair of points, the leading edge and the trailing edge, into the event sword trail.
add_chara_pos 1019 Moves a character by an offset added to its current position, in world units.
add_chara_rot 1020 Turns a character by adding to its current rotation, in radians.
spawn_treasure_box 1021 Puts a treasure box in the first free slot of the dungeon at x, y, z, turned by angle radians, holding count of item number item (count defaults to 1).
get_nearest_parts_pos 1022 Finds the map parts placed within a box of half-size radius around x, y, z and reads the position of the nearest one into the out variables.
step_control_camera 1023 Advances the player-controlled camera by one frame.
set_control_camera_angle 1024 Puts the player-controlled camera's eye at an angle around its look-at point, in radians, keeping its distance and height.
move_control_camera 1025 Moves the player-controlled camera from the pad's turn and swing-back input, using the character's rotation and keeping the camera clear of map walls near its look-at point.
set_camera_rot_cancel 1026 Sets which ways the player-controlled camera may not move, as bits: 1 shoulder buttons do not turn it, 2 right stick does not turn it, 0x40 the swing-behind button does nothing, 0x80 it does not swing round walls.
set_control_camera_range 1027 Sets the limits of the player-controlled camera: height added to the eye at the nearest and farthest distance, and the minimum and maximum horizontal distance from the look-at point, in world units.
get_nearest_treasure_box 1028 Finds the nearest active treasure box of the dungeon within 30 units of x, y, z.
convert_chara_no 1029 Stub left in the engine: it returns nothing and always reports failure.
init_chara_trail 1030 Creates a weapon trail in trail slot 0 or 1 of a character, allocated in the given scene memory stack.
set_chara_trail_color 1031 Sets the RGBA colours of the two edges of a character's weapon trail, each 0 to 255 with 128 as neutral.
set_chara_trail_texture 1032 Maps a character's weapon trail with the named texture from texture block tex_block, using the texel rectangle starting at u, v with the given width and height.
start_chara_trail 1033 Starts a character's weapon trail between two named model frames, such as the blade's base and tip.
set_chara_scene_type 1034 Sets the scene type of a character slot.
get_event_data 1035 Reads a field of the event that started the script into the out variables.
set_prev_floor 1036 Stores the previous floor number of the current dungeon in the save data.
get_prev_floor 1037 Returns the previous floor number of the current dungeon from the save data.
set_fast_floor 1038 Stub left in the engine: it does nothing and always reports failure.
VM_ARGS 1039 Writes one field of a dungeon floor's save record.
get_floor_info 1040 Returns one field of a dungeon floor's save record, using the same field numbers as set_floor_info; field 5 gives all the progress flag bits.
get_next_floor 1041 Returns the floor that follows floor along the given route of the current dungeon map, or 0 when the floor is unknown.
disable_pad_auto_repeat 1042 Turns off auto-repeat for held controller buttons.
set_pad_auto_repeat 1043 Turns on auto-repeat for the controller buttons in mask, firing after delay frames and then every interval frames while held.
set_dungeon_pause 1044 Sets (on = 1) or clears (on = 0) dungeon pause bits.
check_dungeon_pause 1045 Returns the dungeon pause bits that are set within mask; nonzero means at least one is set.
reset_dungeon_timer 1046 Resets the dungeon frame timer to 0.
get_dungeon_timer 1047 Returns the number of frames counted since the dungeon timer was last reset.
VM_ARGS 1048 Loads a skin onto a character from a pack file into scene memory stack stack_no.
check_camera_collision 1049 Tests the line from one point to another against the map's camera collision.
get_parts_point_pos 1050 Finds the map parts nearest x, y, z within radius and looks up the named function point on it.
get_random_circle_pos 1051 Reads the world position of random circle 0 to 2 of the floor into the out variables; circle = -1 means the circle the player last stood on.
disable_random_circle 1052 Turns off random circle 0 to 2 of the floor; circle = -1 means the circle the player last stood on.
swap_map_lighting 1053 Swaps the first eight lighting entries of the active map with the next eight, if the map has at least sixteen.
stop_geostone_anim 1054 Stops the geostone floating up and down.
set_geostone_flag 1055 Sets whether the geostone is on the floor.
attach_geostone 1056 Attaches the geostone model to a named frame of a character's model so it follows it, such as "item" for a held item.
detach_geostone 1057 Detaches the geostone model from the character frame set by attach_geostone.
get_player_move_type 1058 Returns how the player character moves: 0 on foot, 1 or 4 ridepod on legs, 2 or 5 on treads, 3 on wheels, 6 through the air.
set_exit_flag 1059 Sets the scene's exit flag, which event scripts read back with get_exit_flag.
get_exit_flag 1060 Returns the scene's exit flag.
get_e3_version 1061 Returns whether this is the E3 show demo build.
check_pad_button 1062 Returns the state of logical pad button 0 to 127 this frame; nonzero when the button fires according to its binding.
stop_control_camera 1063 Stops the player-controlled camera from moving.
set_dungeon_brightness 1064 Sets the scale applied to the colours the dungeon is drawn with; 1.0 is normal.
get_random_circle_trap 1065 Rolls and returns a random trap number for a random circle of kind 0 or 1.
apply_random_circle_trap 1066 Applies the effect of a random circle trap to the active character.
show_status_bar 1067 Slides the dungeon status bar in (show = 1) or out (show = 0).
spawn_pull_items 1068 Scatters count pickups from x, y, z that fly to the player.
open_chara_change_menu 1069 Opens the dungeon character change menu; the script is suspended while it is open.
get_sound_port_bank 1070 Returns the sound bank handle loaded into sound port 0 to 11.
VM_ARGS 1071 Finds map parts in the active maps by number or by name and reads its position into the out variables.
disable_scene_skip 1072 Makes the running drama scene unskippable by clearing its skip state.
get_circle_motion_frame 1073 Returns the current motion frame of the random circle model.
set_chara_motion_frame 1074 Sets the current motion frame of a character, such as to sync it with get_circle_motion_frame.
update_chara_motion 1075 Advances a character's motion one step: changes to its pending motion, blends into it and poses the model.
reset_chara_cloth 1076 Puts a character's cloth and hair back to rest on its model, then simulates them for 10 steps so they settle.
change_player_chara 1077 Switches the dungeon player to another character, reloading its model, icons and sounds.
VM_ARGS 1078 With an int, adds the character to the party when state is 1 and removes it otherwise.
set_chara_change_enabled 1079 Lets the player change to a character (on = 1) or forbids it (on = 0).
set_chara_change_mask 1080 Unmasks (on = 1) or masks (on = 0) changing to a character, a second switch kept apart from set_chara_change_enabled.
VM_ARGS 1081 Sets the directory later file names are loaded relative to, such as "event/dng/".
remove_item 1082 Removes count of an item from the player's inventory; count defaults to 1.
equip_chara_item 1083 Equips an owned item on character 0 to 2, swapping it with the item in its slot.
load_pack_file 1084 Loads a pack file into the read buffer so later file loads search it first.
set_bit_ctrl 1085 Sets (on = 1) or clears (otherwise) the given bits of the 8-bit control value kept in the save data.
check_bit_ctrl 1086 Returns 1 if any of the given bits of the save data's control value are set, else 0.
load_arg_script 1087 Loads a compiled argument script (.stb) and runs it at once to build the event argument data, kept in scene memory stack stack_no.
get_item_have_count 1088 Returns how many of an item the player owns.
set_skip_button 1089 Sets the logical pad button that skips the drama scene.
set_skip_fade_color 1090 Sets the colour the screen fades to when the drama scene is skipped, as red, green and blue from 0 to 255.
get_debug_mode 1091 Returns 1.
VM_ARGS 1092 Looks up a map by number or by name and returns its type: 1 for a georama map that has edit data, -1 when the map is not found.
clear_dungeon_collisions 1093 Reinitializes the dungeon scene's collision primitive manager, removing every collision primitive it holds.
set_map_draw 1094 Turns drawing of the map behind the event on (1) or off (0).
check_memory_card_load 1095 Returns the memory card load state the current game mode was entered with (1 after loading a save from the title screen), then resets it to 0, so only the first call sees it.
VM_ARGS 1096 Sets the scene's current map number.
get_chest_contents 1097 Reads the treasure chest nearest the player in the dungeon: its flags, the two item numbers it holds and the count of each.
skip_villager_load 1098 Makes the scene skip its next load of town villagers and sub villagers.
skip_loading_screen 1099 Sets a flag so the next request to start the now-loading screen returns at once without showing it.
init_effect_scripts 1100 Creates the event effect script manager in scene memory stack stack_no.
set_effect_script_heap 1101 Gives the effect script manager a work heap of heap_size bytes (default 14000) taken from scene memory stack stack_no.
clear_effect_scripts 1102 Deletes every running effect, unloads every effect script base, empties the work heap, frees their texture blocks and removes the effect script manager.
VM_ARGS 1103 Loads an effect script base, given by name or by number, so effects can be created from it.
create_effect 1104 Starts an effect from a loaded effect script base.
finish_effect 1105 Switches the effect in owner's slot to program number 300, the program effect scripts use for their ending.
delete_effect 1106 Deletes the effect in owner's slot at once.
set_effect_vector1 1107 Sets the first work vector of the effect created last, usually its position in world units.
set_effect_vector2 1108 Sets the second work vector of the effect created last, such as a scale or direction, depending on the effect script.
set_effect_target 1109 Sets the target id of the effect created last; -1 for none.
load_effect_script_pack 1110 Builds the effect script base effect_name from file_name, which must already be loaded by the background loader or present in the loaded pack.
VM_ARGS 1111 Sets work value number index of the effect created last to an int or float.
set_chara_status 1200 Changes a party character's status condition bits (1 poison, 2 slow, 0x10 power up, others unnamed).
add_weapon_hp 1201 Adds amount to the weapon durability gauge in weapon_slot of the character active in battle; negative values reduce it.
add_hp_rate 1202 Changes the active battle character's HP by rate.
VM_ARGS 1203 Returns the scene's time of day, a float from 0 to 24.
VM_ARGS 1204 With one argument (&over_item) it receives the number of the first item the player holds more of than its limit, or 0.
check_bag_overflow 1205 Returns how many items sit in the overflow slots past the end of the player's current bag.
get_game_mode 1206 Returns the main game mode: 1 town and georama, 2 dungeon, 3 title screen; other values are debug screens.
check_fast_clear 1207 Compares the time since reset_floor_timer with the floor's target clear time and saves a new best.
check_floor_challenge 1208 Tests the floor's practice condition.
get_floor_sub_games 1209 Returns the floor's sub games as bits: 1 spheda challenge, 2 fishing record.
reset_floor_timer 1210 Starts timing the floor's clear time from the current play time.
init_screen_wave 1211 Resets the raster screen wave effect and sets its amplitude, speed and pitch.
start_screen_wave 1212 Turns the screen wave on, moving amplitude, speed and pitch to the given values over frames frames (at once when frames is 0 or 1).
stop_screen_wave 1213 Turns the screen wave off, moving amplitude, speed and pitch to the given values over frames frames first (at once when frames is 0 or 1).
VM_ARGS 1214 Plays a motion on an animated piece of a placed map part, such as a train engine.
VM_ARGS 1215 Moves a function point of the active map to x, y, z.
turn_camera_to 1216 Turns the player camera toward the yaw angle (radians), step by step each frame until it is within 0.1 of it.
compare_part_name 1217 Compares the part name of placed part part_no in the active map with name; returns 0 when they match, nonzero otherwise, and -1 when the part does not exist.
get_trial_version 1218 Returns 0; this build is never a trial version.
show_floor_title 1219 Shows (1) or hides (0) the current dungeon floor's title in a frame at the bottom of the screen.
VM_ARGS 1220 Reads the position of a function point in the active map.
VM_ARGS 1221 Reads the rotation of a function point in the active map, in radians.
play_default_motion 1222 Stops the action of a scene character and plays its default motion on it and every chained part.
add_synth_points 1223 Adds synthesis points to the weapon in weapon_slot (0 or 1) of chara (0 or 1).
get_debug_flag 1224 Returns the game's debug flag.
open_minimap_door 1225 Marks the door at a world position as open on the dungeon mini map and updates the navigation map around it.
check_boss_floor 1226 Returns nonzero on a boss floor, where the mini map symbols are hidden.
queue_dungeon_event 1227 Sets the event the dungeon runs when it can; -1 clears the request.
check_chara_switchable 1228 Returns whether the player may switch to chara (0 Max, 1 Monica, 2 Ridepod, 3 Monica's monster form).
init_sepia 1229 Prepares the sepia screen effect: a screen sized texture in the event texture block at block_offset (default 0) and an image buffer from scene memory stack stack_no, or the shared read buffer when stack_no is -1.
start_sepia 1230 Captures the current screen, tints it sepia and shows it until end_sepia.
end_sepia 1231 Turns the sepia screen effect off.
copy_monster_to_actor 1232 Copies a loaded dungeon monster's model into scene character slot actor, replacing what was there.
unlock_stack 1233 Clears the lock on scene memory stack stack_no so it can be reused.
clear_event_running 1234 Clears the scene's flag that says an event is running.
set_slot_chara_id 1235 Sets the character id stored in scene character slot.
get_slot_chara_id 1236 Returns the character id stored in scene character slot, or -1 when the slot does not exist.
find_villager_slot 1237 Searches the villager and talk slots of the scene for chara_id and returns its slot number, or -1.
find_near_random_stone 1238 Looks for a random stone within 30 units of x, y, z.
init_mono_flash 1239 Prepares the mono flash screen effect: two screen sized textures in the first two event texture blocks and their image buffers from scene memory stack stack_no, or the shared read buffer when stack_no is negative.
start_mono_flash 1240 Captures the current screen and starts the mono flash effect, switching images every interval frames.
end_mono_flash 1241 Turns the mono flash screen effect off.
delete_villager 1242 Removes the town villager with character id npc from the scene's villager manager.
set_dungeon_weather 1243 Sets the dungeon weather: 0 normal, 2 rain.
set_chara_max_hp 1244 Sets a party character's maximum HP and refills HP to it.
set_chara_defence 1245 Sets a party character's defence value.
compare_place_name 1246 Compares the placement name of placed part part_no in the active map with name; returns 0 when they match, nonzero otherwise, and -1 when the part does not exist.
open_item_choice_menu 1247 Opens the item choice menu and leaves the script so the menu can run; follow with wait.
VM_ARGS 1248 Sets or clears every georama analysis condition linked to analysis entry entry of map map_no.
set_atlamillia_visible 1249 Shows or hides the Atlamillia model parts on scene character actor.
add_medals 1250 Adds amount to the player's medal count, kept between 0 and 999.
set_map_effect_id 1251 Sets the dungeon's map effect id.
get_map_effect_id 1252 Returns the dungeon's map effect id.
init_dungeon_floor 1253 Calls the dungeon floor start hook, which is empty in this build.
finish_dungeon_floor 1254 Calls the dungeon floor end hook, which is empty in this build.
hide_random_stones 1255 Moves all twelve random stones of the generated floor far below the map, out of play.
get_floor_status 1256 Returns the current floor's status flags (1 Max blocked, 2 Monica blocked, 4 items blocked, other bits set by scripts).
set_floor_status 1257 Sets the bits in mask on the current floor's status flags when on is nonzero, clears them when 0.
get_floor_cell_attr 1258 Returns the attribute flags of the generated floor's grid cell at a world position, or 1 when the position is off the grid.
set_actor_near_dist 1259 Turns on fading for scene character actor and sets the distance in world units within which it is not drawn.
set_saved_time 1260 Stores a time of day in hours in the event info, for a later get_saved_time.
get_saved_time 1261 Returns the time of day stored with set_saved_time.
get_door_part 1262 Returns the active map's part number of the generated floor's door, or -1 when there is none.
reset_monica_equipment 1263 Puts Monica's default weapon back on and, unless her costume is flagged to stay, her default costume pieces too.
add_chara_hp_rate 1264 Changes a party character's HP by rate times the gauge (for example -0.7 removes 70 percent), never dropping below 1.
clear_dungeon_effects 1265 Clears every rocket, machine gun shot and laser in the dungeon and deletes every running dungeon effect script.
set_bgm_time_volume 1266 When on is nonzero the active BGM's volume follows the time of day lighting; 0 turns that off.
get_chara_weapon_hp 1267 Reads the durability of the weapon in weapon_slot (0 or 1) of chara (0 Max, 1 Monica, 2 Ridepod, 3 Monica's monster form).
add_chara_weapon_hp 1268 Adds amount to the durability of the weapon in weapon_slot (0 or 1) of chara (0 Max, 1 Monica, 2 Ridepod, 3 Monica's monster form); negative values reduce it.
get_chara_weapon_abs 1269 Reads the absorption (ABS) points of the weapon in weapon_slot (0 or 1) of chara (0 Max, 1 Monica, 2 Ridepod, 3 Monica's monster form).
add_chara_weapon_abs 1270 Adds amount to the absorption (ABS) points of the weapon in weapon_slot (0 or 1) of chara (0 Max, 1 Monica, 2 Ridepod, 3 Monica's monster form); negative values reduce them.
create_dungeon_effect 1271 Starts a dungeon effect script by name at x, y, z and sets its value 0 to value.
return_monica_items 1272 Moves the items Monica has equipped into the player's bag, for when she leaves the party.
set_pause_enabled 1273 Allows (1) or blocks (0) the player pausing the game.
start_fishing_tournament 1274 Starts the fishing tournament schedule on the current day.
VM_ARGS 492 Numbers the disc calls that this table never registers.
VM_ARGS 800

get_pad_held

extern int get_pad_held(void) NATIVE(0);

Returns the bitmask of controller buttons currently held down.

Original name: _GET_PADON.

get_pad_pressed

extern int get_pad_pressed(void) NATIVE(1);

Returns the bitmask of controller buttons pressed this frame.

Original name: _GET_PADDOWN.

get_pad_released

extern int get_pad_released(void) NATIVE(2);

Returns the bitmask of controller buttons released this frame.

Original name: _GET_PADUP.

get_analog_sticks

extern void get_analog_sticks(float *left_x, float *left_y, OPTIONAL(float *right_x, float *right_y)) NATIVE(3);

Reads the analog sticks as floats, each the raw stick value divided by 128. Writes as many of left x, left y, right x, right y as arguments are given.

Original name: _GET_APAD.

go_to_interior

extern void go_to_interior(int jump_point, string map_name, OPTIONAL(enum program event_no, int entrance)) NATIVE(6);

Requests a move into an interior map once the event ends. jump_point is the entry point (-1 for the default), event_no is the event started on arrival (default 100) and entrance picks the interior's entrance (default 0).

Original name: _GOTO_INTERIOR.

go_to_outside

extern void go_to_outside(int jump_point, string map_name, OPTIONAL(enum program event_no)) NATIVE(7);

Requests a move from an interior back out to an outdoor map. jump_point is the entry point (-1 for the default) and event_no is the event started on arrival (default 100).

Original name: _GOTO_OUTSIDE.

init_event

extern void init_event(void) NATIVE(8);

Resets the event system state (sequences, sprites, effects, lip sync, world coordinate) and turns off camera follow on the active camera. Called at the start of an event.

Original name: _INITIALIZE.

load_chara

extern void load_chara(enum memory_stack stack_no, chara_pack pack_path, string cfg_name, chara_slot chara, OPTIONAL(int no_outline)) NATIVE(9);

Loads a character model from a pack file into a scene character slot, using memory stack stack_no. cfg_name names the model inside the pack (such as "info.cfg"); a non-zero no_outline loads the model without its outline. A single argument is instead an id of a stored argument list holding the first four values.

Original name: _LOAD_CHARA.

set_chara_active

extern void set_chara_active(int on_or_chara, OPTIONAL(int chara)) NATIVE(10);

With one argument, makes that scene character active so it is stepped and drawn. With two arguments, the first is on/off and the second the character: 0 deactivates it, non-zero activates it.

Original name: _CHARA_ACTIVE.

clear_memory_stack

extern void clear_memory_stack(enum memory_stack stack_no) NATIVE(11);

Empties scene memory stack stack_no and every stack above it, releasing the buffers of the higher ones.

Original name: _CLEAR_STACK.

assign_memory_stack

extern void assign_memory_stack(enum memory_stack stack_no) NATIVE(12);

Gives memory stack stack_no the free space left in the stack below it, locking the lower stack. Stacks 0 and 1 are ignored.

Original name: _ASSIGN_STACK.

set_flag

extern void set_flag(flag flag, int value) NATIVE(13);

Sets or clears a bit flag in the save data. value 0 clears it, non-zero sets it.

Original name: _SET_FLAG.

get_flag

extern int get_flag(flag flag) NATIVE(14);

Returns a bit flag from the save data (0 or 1).

Original name: _GET_FLAG.

set_counter

extern void set_counter(int index, int value) NATIVE(15);

Stores a 16-bit counter in the save data at index.

Original name: _SET_CNT.

get_counter

extern int get_counter(int index) NATIVE(16);

Returns the 16-bit save data counter at index.

Original name: _GET_CNT.

VM_ARGS

extern void set_current_dir VM_ARGS(OPTIONAL(string dir)) NATIVE(17);

Sets the directory that file names given to later load calls are relative to. An empty string, "DEFAULT" or no argument resets it to the default.

Original name: _SET_CURRENT_DIR.

delete_chara

extern void delete_chara(chara_slot chara, OPTIONAL(int delete_texture)) NATIVE(18);

Removes a scene character and clears any event object handles that refer to it. Its texture block is freed too unless delete_texture is 0 (default 1).

Original name: _DELETE_CHARA.

load_chara_motion

extern void load_chara_motion(enum memory_stack stack_no, chara_pack pack_path, string cfg_name, chara_slot chara) NATIVE(19);

Loads an extra motion pack into an already loaded scene character, using memory stack stack_no. cfg_name names the entry inside the pack (such as "info.cfg"). A single argument is instead an id of a stored argument list.

Original name: _LOAD_MOTION.

VM_ARGS

extern void jump_to_map VM_ARGS(int jump_point, map_id map, OPTIONAL(enum program event_no)) NATIVE(20);

Requests a jump to another map once the event ends. map is a map number or a map name string; jump_point is the entry point (-1 for the default) and event_no is the event started on arrival (default 100).

Original name: _MAP_JUMP.

set_rain

extern void set_rain(int on) NATIVE(21);

Starts the event rain effect when on is non-zero, stops it when 0.

Original name: _SET_RAIN.

delete_chara_ext_motion

extern void delete_chara_ext_motion(chara_slot chara) NATIVE(22);

Removes the extra motions that were added to a scene character with load_chara_motion.

Original name: _DEL_EXT_MOTION.

set_marker

extern void set_marker(int value) NATIVE(23);

Does nothing in the retail game.

Original name: _SET_MARKER.

VM_ARGS

extern void set_world_coord VM_ARGS(OPTIONAL(float x, float y, float z, float rot_y)) NATIVE(24);

Sets the origin and Y rotation (radians) of the event's world coordinate frame, which event positions and the camera are placed relative to. Pass all four values, or none to reset the frame to the world origin.

Original name: _SET_WORLD_COORD.

finish_event

extern void finish_event(void) NATIVE(25);

Ends the event: applies a pending world coordinate to the camera and resets sequences, sprites, hit effects, lip sync and the world coordinate.

Original name: _FINISH.

get_dungeon_event_point

extern void get_dungeon_event_point(float *x, float *y, float *z, float *rot_y, OPTIONAL(enum dungeon_event_point_kind kind)) NATIVE(26);

Finds a place on the dungeon floor and writes its position and Y rotation. kind 0 (the default) is the grid cell the player stands in, 1 the treasure box the player is at, 2 the first way32 to way35 map part, 3 the first way36 to way51 map part.

Original name: _GET_DUN_WORLD_COORD.

load_image

extern void load_image(enum memory_stack stack_no, string file_name, int image_no, OPTIONAL(int *block)) NATIVE(27);

Loads an .img texture file into event texture block image_no, using memory stack stack_no. With three arguments the image is also registered as event sprite image image_no; with a fourth argument the texture block number is written into it instead.

Original name: _LOAD_IMG.

delete_image

extern void delete_image(int image_no) NATIVE(28);

Frees the event texture block image_no loaded with load_image.

Original name: _DEL_IMG.

set_dungeon_map

extern void set_dungeon_map(int value_a, int value_b) NATIVE(29);

Reads two integers and does nothing with them in the retail game.

Original name: _SET_DNG_MAP.

load_item_model

extern void load_item_model(enum memory_stack stack_no, item_id item, string cfg_name, int chara, OPTIONAL(int variant)) NATIVE(30);

Loads an item's model into a scene character slot, using memory stack stack_no. cfg_name names the model inside the item's pack; variant picks which of the item's model files to use (default 0).

Original name: _LOAD_ITEM.

open_use_item_menu

extern void open_use_item_menu(int *used_item, OPTIONAL(item_id item, ...)) NATIVE(31);

Opens the use-item menu after the script yields. The following integers are passed to the menu as parameters (item numbers it accepts). When the menu closes, the chosen item is written into used_item; scripts treat 0 or less as cancelled.

Original name: _GOTO_USE_ITEM.

set_local_flag

extern void set_local_flag(int flag, int value) NATIVE(32);

Sets or clears an event-local bit flag that is not saved. value 0 clears it.

Original name: _SET_LOCAL_FLAG.

get_local_flag

extern int get_local_flag(int flag) NATIVE(33);

Returns an event-local bit flag (0 or 1).

Original name: _GET_LOCAL_FLAG.

open_party_select_menu

extern void open_party_select_menu(void) NATIVE(34);

Opens the party selection menu after the script yields.

Original name: _GOTO_SELECT_PARTY.

VM_ARGS

extern void start_background_load VM_ARGS(any file, ...) NATIVE(35);

Starts reading files from disc in the background into the shared read buffer, where later load calls find them. Each argument is a file path string, or an item number followed by a variant number naming that item's model file. Poll check_background_load until it finishes.

Original name: _SET_LOADBG_FILE.

check_background_load

extern int check_background_load(void) NATIVE(36);

Returns 1 while background file reads are still in progress, 0 once all are done.

Original name: _CHECK_LOADBG_FILE.

get_treasure_box_items

extern void get_treasure_box_items(int *item_a, int *item_b) NATIVE(37);

Does nothing and reports failure in the retail game; the out parameters are left unchanged.

Original name: _GET_TB_ITEMNO.

set_treasure_box_state

extern void set_treasure_box_state(enum treasure_box_state state) NATIVE(38);

Sets the state value of the treasure box nearest the player.

Original name: _SET_TB_STATUS.

set_treasure_box_lid

extern void set_treasure_box_lid(float open) NATIVE(39);

Sets how far the lid of the treasure box nearest the player is open, 0.0 closed to 1.0 open.

Original name: _SET_TB_ANGLE.

add_item

extern void add_item(item_id item, OPTIONAL(int count)) NATIVE(40);

Gives the player count of an item (default 1). Owning ITEM_CAMERA is what opens the main menu's invention entry (MenuInternInit's HatumeiMenuOkFlag); ITEM_PHOTO_ALBUM opens its album. Taking photos also needs the camera in one of Max's active-item slots, which no native fills: the player moves it there in the item menu.

Original name: _ADD_ITEM.

get_item_type

extern int get_item_type(item_id item) NATIVE(41);

Returns an item's weapon category: 1 Max melee, 2 Max gun, 3 Monica melee, 4 Monica magic, 0 anything else. Fails for an unknown item.

Original name: _GET_ITEM_TYPE.

get_free_item_slot

extern int get_free_item_slot(void) NATIVE(42);

Returns the index of the first empty slot in the player's bag, or -1 when the bag is full.

Original name: _GET_ITEM_SPACE.

get_chara_fit_scale

extern float get_chara_fit_scale(chara_slot chara, float size) NATIVE(43);

Returns the scale factor that fits a scene character's bounding box to a cube of half-size size.

Original name: _GET_ADJUST_POLYGON_SCALE.

play_movie

extern void play_movie(enum memory_stack stack_no, string file_name, OPTIONAL(int init_sound)) NATIVE(44);

Plays a full-screen movie file (.PSS) to the end before returning, using memory stack stack_no, and draws captions when enabled. init_sound 0 skips initialising the sound library (default 1).

Original name: _LOAD_MOVIE.

clear_local_counters

extern void clear_local_counters(void) NATIVE(45);

Sets every event-local counter to 0.

Original name: _INIT_LOCAL_CNT.

start_crossfade

extern void start_crossfade(int frames_or_direction, OPTIONAL(enum cross_fade_type type, int frames)) NATIVE(46);

Captures the screen and cross-fades from it. With one argument it is the length in frames of a dissolve. With three arguments they are direction (0 fade in, otherwise fade out), type (1 wipe, otherwise dissolve) and frames. Frames are the NTSC game's (30 a second): the PAL engine takes 5/6 of them (rounded down, at least 1) as its own frames (25 a second), so n frames last about n/30 seconds.

Original name: _SET_CROSSFADE.

set_time_of_day

extern void set_time_of_day(float hours) NATIVE(47);

Sets the scene's time of day in hours, wrapped into 0 to 24.

Original name: _SET_TIME.

set_map_light

extern void set_map_light(int light_no) NATIVE(48);

Selects which lighting set of the active map is used. Out-of-range values are ignored.

Original name: _SET_ACTIVE_LIGHT.

VM_ARGS

extern void set_lip_sync_anim VM_ARGS(int actor, any talk_anim, OPTIONAL(string idle_anim)) NATIVE(49);

Sets the texture animations used for lip sync on an actor: talk_anim is the moving mouth, idle_anim (optional) the closed mouth. trigger_lip_sync_anim then switches between them.

Original name: _SET_PAKU_ANIM.

reset_lip_sync_anim

extern void reset_lip_sync_anim(void) NATIVE(50);

Clears the lip sync texture animation setup.

Original name: _RESET_PAKU_ANIM.

trigger_lip_sync_anim

extern void trigger_lip_sync_anim(int on) NATIVE(51);

Switches the lip sync texture animation. on non-zero stops the idle animation and plays the talk animation; 0 stops the talk animation and plays the idle animation, if one is set.

Original name: _TRG_PAKU_ANIM.

reset_camera

extern void reset_camera(enum camera_reset_mode mode, OPTIONAL(float angle, float height)) NATIVE(52);

Puts a camera back to following character 0. mode 0 sets the active camera to follow at its current distance, keeping its current angle and height unless given. mode 1 sets the previous camera to follow behind the character's facing plus angle (radians), with height defaulting to its current height, and hands control back.

Original name: _RESET_CAMERA.

get_active_chara

extern int get_active_chara(void) NATIVE(53);

Returns the number of the playable character currently in control.

Original name: _GET_ACTIVE_CHR_NO.

set_active_chara

extern void set_active_chara(int chara) NATIVE(54);

Sets which playable character is in control, in the save data and battle state.

Original name: _SET_ACTIVE_CHR_NO.

set_dungeon_floor

extern void set_dungeon_floor(int floor) NATIVE(55);

Sets the current floor of the current dungeon in the save data.

Original name: _DNG_SET_FLOOR_ID.

get_dungeon_floor

extern int get_dungeon_floor(void) NATIVE(56);

Returns the current floor of the current dungeon.

Original name: _DNG_GET_FLOOR_ID.

set_lip_sync_motion

extern void set_lip_sync_motion(int actor, string talk_motion, enum chara_motion_flag talk_flags, OPTIONAL(string idle_motion, enum chara_motion_flag idle_flags)) NATIVE(57);

Sets the body motions used while an actor talks: talk_motion while speaking and idle_motion after, each with motion flags. trigger_lip_sync_motion then switches between them.

Original name: _SET_PAKU_MOTION.

reset_lip_sync_motion

extern void reset_lip_sync_motion(void) NATIVE(58);

Clears the lip sync motion setup.

Original name: _RESET_PAKU_MOTION.

trigger_lip_sync_motion

extern void trigger_lip_sync_motion(enum lip_sync_motion_mode mode) NATIVE(59);

Switches the lip sync motion. mode 0 plays the talk motion, 1 plays the idle motion once the talk motion has finished, 2 plays the idle motion at once. Modes 1 and 2 do nothing when no idle motion is set.

Original name: _TRG_PAKU_MOTION.

set_background_color

extern void set_background_color(float r, float g, float b, OPTIONAL(float a)) NATIVE(60);

Sets the screen clear colour, components 0 to 255, alpha defaulting to 128.

Original name: _SET_BG_COLOR.

open_dungeon_map_menu

extern void open_dungeon_map_menu(int value) NATIVE(61);

Opens the dungeon map menu after the script yields, passing value as the menu's first parameter.

Original name: _GOTO_DNG_MAP.

go_to_dungeon

extern void go_to_dungeon(int dungeon, OPTIONAL(int floor, enum program event_no)) NATIVE(62);

Ends the event and switches the game to the dungeon. floor and event_no default to -1 (none).

Original name: _GOTO_DNG.

VM_ARGS

extern void go_to_edit_mode VM_ARGS(map_id map_no, OPTIONAL(enum program event_no)) NATIVE(63);

Ends the event and switches the game to the town edit mode for map_no. event_no defaults to -1 (none).

Original name: _GOTO_EDIT.

get_menu_result

extern void get_menu_result(int *result_0, OPTIONAL(int *result_1, int *result_2, int *result_3, int *result_4)) NATIVE(64);

Writes up to five result values left by the last menu, one per argument given.

Original name: _GET_MENU_PARAM.

load_npc_chara

extern void load_npc_chara(enum npc_model_set model_set, enum memory_stack stack_no, npc_id npc, int chara) NATIVE(65);

Loads the model of party character npc (1 to 31) into scene character slot chara, using memory stack stack_no. model_set 0 uses the normal model, otherwise the event train model.

Original name: _LOAD_CHARA_NPC.

place_treasure_box

extern void place_treasure_box(item_id item, OPTIONAL(float x, float y, float z, float rot_y)) NATIVE(66);

With one argument (-1 on the disc), places the floor's treasure boxes automatically. With five, puts a box holding one of item at x, y, z facing rot_y (radians).

Original name: _AUTO_SET_TREASURE_BOX.

place_monster

extern void place_monster(monster_kind monster, OPTIONAL(float x, float y, float z, float rot_x, float rot_y, float rot_z, int talk_param)) NATIVE(67);

Dungeon only. With one argument (-1 on the disc), places the floor's monsters at random spots away from the event point. Otherwise spawns monster at x, y, z with optional rotation in radians and a talk_param that get_monster_talk_data returns later.

Original name: _AUTO_SET_MONSTER.

load_dungeon_map

extern void load_dungeon_map(string map_name, OPTIONAL(string room_cfg, enum automap_gen_flag gen_flags)) NATIVE(68);

Loads a dungeon map and resets the floor state, sound and music. When room_cfg is given the floor is built by the map generator from that room layout file, with gen_flags as generation options (0x1 dummy trees, 0x2 preset floor, 0x4 dummy mountain, 0x8 fixed start, 0x10 no way in or out, 0x20 no healing point, 0x40 fixed floor).

Original name: _LOAD_DUNGEON_MAP_FILE.

load_monster_data

extern void load_monster_data(monster_kind monster, OPTIONAL(int reset)) NATIVE(69);

Dungeon only. With one argument (ignored), resets monster memory and loads every monster listed for the current floor. With two, loads the single monster; a non-zero reset clears monster memory first.

Original name: _LOAD_MONSTER_FILE.

get_npc_status

extern int get_npc_status(npc_id npc) NATIVE(70);

Returns the status bits of party character npc (1 to 32); the value 1 bit means the character is in the party now.

Original name: _GET_NPC_STATUS.

set_npc_status

extern void set_npc_status(npc_id npc, enum npc_status status) NATIVE(71);

Sets the status bits of party character npc (1 to 32).

Original name: _SET_NPC_STATUS.

get_party_npc

extern int get_party_npc(void) NATIVE(72);

Returns the number (1 to 32) of the first party character whose status has the in-party bit set, or -1 when there is none.

Original name: _GET_NOW_PARTY_CHARA.

set_local_counter

extern void set_local_counter(int index, int value) NATIVE(73);

Stores an event-local counter that is not saved.

Original name: _SET_LOCAL_CNT.

get_local_counter

extern int get_local_counter(int index) NATIVE(74);

Returns an event-local counter. Fails for an index out of range.

Original name: _GET_LOCAL_CNT.

find_local_counter

extern int find_local_counter(int value) NATIVE(75);

Returns the index of the first event-local counter equal to value, or -1 when none matches.

Original name: _GET_LOCAL_CNT2.

get_train_seat_pos

extern void get_train_seat_pos(int seat, float *x, float *y, float *z, float *rot_y) NATIVE(76);

Writes the position and Y rotation (radians) of train seat seat (0 to 11). On map 120 the height is 0.

Original name: _GET_TRAIN_NPC_POS.

show_chapter_title

extern void show_chapter_title(int chapter) NATIVE(77);

Opens the chapter title screen for chapter (counted from 1) after the script yields.

Original name: _GOTO_DRAW_CHAPTER.

set_projection

extern void set_projection(float distance) NATIVE(78);

Sets the projection distance used while the event is drawn; larger values give a narrower view.

Original name: _SET_PROJECTION.

VM_ARGS

extern float get_projection VM_ARGS(...) NATIVE(79);

Returns the event's projection distance.

Original name: _GET_PROJECTION.

fade_in

extern void fade_in(int frames, OPTIONAL(float r, float g, float b)) NATIVE(80);

Fades the screen in over frames from colour r, g, b (0 to 255). Frames are the NTSC game's (30 a second): the PAL engine takes 5/6 of them (rounded down, at least 1) as its own frames (25 a second), so n frames last about n/30 seconds.

Original name: _SET_FADE_IN.

fade_out

extern void fade_out(int frames, OPTIONAL(float r, float g, float b)) NATIVE(81);

Fades the screen out over frames to colour r, g, b (0 to 255, default black). Frames are the NTSC game's (30 a second): the PAL engine takes 5/6 of them (rounded down, at least 1) as its own frames (25 a second), so n frames last about n/30 seconds.

Original name: _SET_FADE_OUT.

run_dungeon_debug_command

extern void run_dungeon_debug_command(enum dungeon_debug_command command) NATIVE(82);

Runs a debug command. command 0 adds 512 HP to the dungeon party character.

Original name: _DNG_DEBUG_COMMAND.

seek_disc_file

extern void seek_disc_file(string file_name) NATIVE(83);

Seeks the disc drive to the start of the named file.

Original name: _CD_SEEK.

get_look_yaw

extern float get_look_yaw(float dx, float dz) NATIVE(84);

Returns atan2(dx, dz): the Y rotation in radians that faces along the offset dx, dz.

Original name: _GET_ROT_LOOK_POS.

set_motion_blur

extern void set_motion_blur(int strength) NATIVE(85);

Sets the strength of the scene's motion blur; 0 turns it off.

Original name: _SET_MOTION_BLUR.

load_event_script

extern void load_event_script(string path, enum program event_no) NATIVE(86);

Requests loading another event script and starting event_no in it. "_1" is inserted before ".stb" when the path lacks it, and the path is converted for the current language.

Original name: _LOAD_SCRIPT.

calc_talk_camera

extern void calc_talk_camera(float x1, float y1, float z1, float x2, float y2, float z2, float angle, float *cam_x, float *cam_y, float *cam_z, float *look_x, float *look_y, float *look_z) NATIVE(87);

Computes a camera for a conversation between two points: the look-at point is their midpoint raised 30 units and the camera sits at a fixed offset rotated by angle (radians) around it. Writes the camera position and look-at position.

Original name: _SET_TALK_CAMERA.

spawn_hit_effect

extern void spawn_hit_effect(int slot, float x, float y, float z, OPTIONAL(float dir_x, float dir_y, float dir_z, float spread, float speed, float power, float gravity, int life, int count)) NATIVE(88);

Starts a spark burst in hit effect slot (0 to 4) at x, y, z. The optional settings default to direction (0, 1, 0), spread 50, speed 35, power 0, gravity 0.05, life 30 frames and count 32 sparks; pass all of them or none.

Original name: _HIT_EFFECT.

copy_chara

extern void copy_chara(enum memory_stack stack_no, int src, int dst) NATIVE(89);

Copies scene character src into slot dst, sharing its textures and allocating from memory stack stack_no. A single argument is instead an id of a stored argument list.

Original name: _COPY_CHARA.

get_start_button

extern int get_start_button(void) NATIVE(90);

Returns the pad button the event treats as its start button.

Original name: _GET_START_BUTTON.

enter_interior

extern void enter_interior(int jump_point, string map_name, OPTIONAL(enum program event_no)) NATIVE(91);

Requests entering an interior once the event ends. jump_point is the entry point (-1 for the default) and event_no the event started on arrival (default 100). Unused on the disc.

Original name: _MOVE_INTERIOR.

get_monster_talk_data

extern void get_monster_talk_data(int *monster_chara, int *id_or_param, OPTIONAL(int *talk_param)) NATIVE(92);

Reads data on the dungeon monster the player spoke to: its scene character slot, its monster id and the talk_param it was placed with. With two arguments the second receives talk_param.

Original name: _GET_MONSTER_TALK_DATA.

VM_ARGS

extern void set_func_point_enabled VM_ARGS(any place, string name, int enable) NATIVE(93);

Enables or disables a named function point (an interaction trigger) on the active map. place is a map part number or part name string; an empty string means the map's own function points.

Original name: _FUNC_POINT_SHOW.

get_map_no

extern int get_map_no(void) NATIVE(94);

Returns the current map number.

Original name: _GET_NOW_MAP_NO.

get_submap_no

extern int get_submap_no(void) NATIVE(95);

Returns the current sub map number.

Original name: _GET_NOW_SUBMAP_NO.

get_prev_map_no

extern int get_prev_map_no(void) NATIVE(96);

Returns the previous map number.

Original name: _GET_OLD_MAP_NO.

get_prev_submap_no

extern int get_prev_submap_no(void) NATIVE(97);

Returns the previous sub map number.

Original name: _GET_OLD_SUBMAP_NO.

set_rain_chara

extern void set_rain_chara(chara_slot chara) NATIVE(98);

Sets which scene character rain splashes come off. -1 clears the splash particles.

Original name: _SET_RAIN_CHARA_NO.

get_edit_part_pos

extern void get_edit_part_pos(string part_name, float *x, float *y, float *z, float *rot_y) NATIVE(99);

Finds a placed part by name on the active edit map and writes its position and Y rotation.

Original name: _GET_EDIT_PARTS_POS.

get_chara_pos

extern void get_chara_pos(chara_slot chara, float *x, float *y, float *z) NATIVE(100);

Writes the position of a scene character.

Original name: _GET_CHARA_POS.

get_chara_screen_pos

extern void get_chara_screen_pos(chara_slot chara, int *screen_x, int *screen_y) NATIVE(101);

Writes the screen position in pixels of a point at 85% of a scene character's height, where a speech balloon would go.

Original name: _GET_CHARA_TALK_POS.

turn_chara_toward

extern void turn_chara_toward(chara_slot chara, float x, float y, float z, float max_turn) NATIVE(102);

Turns a scene character's yaw toward a world point by at most max_turn radians, taking the shorter way. Call it once per frame in a loop to turn smoothly.

Original name: _TURN_CHARA.

set_chara_pos

extern void set_chara_pos(chara_slot chara, float x, float y, OPTIONAL(float z)) NATIVE(103);

Places a scene character at a world position. Called with a single argument, that argument is instead the key of a stored argument block holding the character and position.

Original name: _SET_CHARA_POS.

set_chara_rot

extern void set_chara_rot(chara_slot chara, float x, float y, OPTIONAL(float z)) NATIVE(104);

Sets a scene character's rotation in radians around the x, y and z axes; each angle is wrapped into -pi to pi. Called with a single argument, that argument is the key of a stored argument block holding the character and rotation.

Original name: _SET_CHARA_ROT.

VM_ARGS

extern void get_chara_rot VM_ARGS(chara_slot chara, any x, any y, any z) NATIVE(105);

Reads a scene character's rotation in radians around the x, y and z axes into three out parameters.

Original name: _GET_CHARA_ROT.

set_chara_motion

extern void set_chara_motion(chara_slot chara, string motion_name, OPTIONAL(enum chara_motion_flag flags, float step, int reset)) NATIVE(106);

Starts a motion or motion sequence on a scene character by name. flags: 1 pauses on the current frame, 2 holds the last frame instead of looping, 4 restarts from the first frame without blending. When step is given and not -1 and flag 4 is set, the motion is applied at once and advances step frames per tick; reset non-zero clears the current motion first.

Original name: _SET_MOTION.

set_chara_motion_step

extern void set_chara_motion_step(chara_slot chara, float step) NATIVE(107);

Sets how many motion frames a scene character's current motion advances each tick.

Original name: _SET_STEP.

set_chara_texture_anim

extern void set_chara_texture_anim(chara_slot chara, int on, OPTIONAL(string anim_name)) NATIVE(108);

Turns a texture animation group on a scene character's texture block on or off. With on = 1 it starts the named group; with on = 0 it stops the named group, or every group when no name is given.

Original name: _SET_TEX_ANIM.

set_chara_scale

extern void set_chara_scale(chara_slot chara, float x, float y, float z) NATIVE(109);

Sets a scene character's scale along x, y and z (1.0 is normal size). Called with a single argument, that argument is the key of a stored argument block holding the character and scale.

Original name: _SET_SCALE.

attach_chara_to_frame

extern void attach_chara_to_frame(chara_slot chara, string frame_name, int follower) NATIVE(110);

Makes the follower character's root frame follow the named model frame (bone) of chara, without parenting it, so it moves with that bone.

Original name: _SET_REFERENCE.

detach_chara_from_frame

extern void detach_chara_from_frame(chara_slot chara) NATIVE(111);

Stops a character's root frame following another model's frame, undoing attach_chara_to_frame on the follower.

Original name: _DEL_REFERENCE.

set_shadow_no_cull

extern void set_shadow_no_cull(chara_slot chara, OPTIONAL(int no_cull)) NATIVE(112);

Sets the no-cull attribute on a scene character's shadow frame so the shadow is not clipped off screen (1) or is culled normally (0). The code reads the second argument whenever any argument is passed, so pass it explicitly.

Original name: _SHADOW_CLIP_OFF.

get_chara_angle_to

extern float get_chara_angle_to(chara_slot chara, float x, float y, float z) NATIVE(113);

Returns the yaw in radians that faces a scene character toward a world point, ignoring height. Returns 0 when the point is directly above or below the character.

Original name: _GET_COORDINATE_ANGLE.

get_chara_width

extern float get_chara_width(chara_slot chara) NATIVE(114);

Returns a scene character's body width from its model info.

Original name: _GET_CHARA_WIDTH.

get_chara_height

extern float get_chara_height(chara_slot chara) NATIVE(115);

Returns a scene character's body height from its model info, in world units.

Original name: _GET_CHARA_HEIGHT.

get_chara_depth

extern float get_chara_depth(chara_slot chara) NATIVE(116);

Returns a scene character's body depth from its model info.

Original name: _GET_CHARA_WEIGHT.

set_chara_visible

extern void set_chara_visible(chara_slot chara, int visible, OPTIONAL(int fade, float fade_speed)) NATIVE(117);

Shows (1) or hides (0) a scene character. With fade = 1 it fades in or out instead of popping, changing alpha by fade_speed per frame (default 0.1, so 10 frames).

Original name: _SET_CHARA_SHOW.

get_chara_visible

extern void get_chara_visible(chara_slot chara, int *visible, OPTIONAL(int *fade)) NATIVE(118);

Reads whether a scene character is shown into visible. The fade flag is written only when argc is 2, and then to the slot after visible, so as shipped a three-argument call never receives it.

Original name: _GET_CHARA_SHOW.

set_chara_cloth_anim

extern void set_chara_cloth_anim(chara_slot chara, int on) NATIVE(119);

Turns the stepping of a scene character's cloth and hair animation on (1) or off (0).

Original name: _CHARA_DA_ENABLE.

get_chara_motion_progress

extern float get_chara_motion_progress(chara_slot chara) NATIVE(120);

Returns how far a scene character's current motion has played, from 0.0 to 1.0. Fails unless called with two arguments.

Original name: _GET_MOT_NOW_WAIT.

check_chara_motion_end

extern int check_chara_motion_end(chara_slot chara) NATIVE(121);

Returns 1 when a scene character's motion reaches its last frame within the next two ticks or no motion plays, else 0.

Original name: _CHECK_MOTION_END.

set_chain_chara_motion

extern void set_chain_chara_motion(chara_slot chara, string motion_name, OPTIONAL(enum chara_motion_flag flags, float step, int reset)) NATIVE(122);

Like set_chara_motion but for an action character, setting the motion on it and on every part chained onto it. Flags: 1 pause, 2 hold last frame, 4 restart without blending.

Original name: _ACTCHR_SET_MOTION.

set_chara_extra_sound

extern void set_chara_extra_sound(chara_slot chara, int sound) NATIVE(123);

Sets an action character's second sound bank, the loaded sound id its motions play extra sound effects from.

Original name: _SET_CHARA_EX_SOUNDID.

copy_chara_sound_info

extern void copy_chara_sound_info(chara_slot chara) NATIVE(124);

Copies an action character's sound settings (sound banks and footsteps) to every part chained onto it.

Original name: _ACTCHR_SOUND_INFO_COPY.

VM_ARGS

extern void show_message VM_ARGS(int mes, message text, OPTIONAL(int *char_count)) NATIVE(192);

Opens a message window on a message. An int is a message number: from the text file loaded with load_message_file if any, else from the town NPC talk text for window 0, else from the event message file; showing the number the window already holds moves to its next page, and -1 lays out nothing. A string is shown as literal text. The optional out parameter receives the number of characters laid out.

Original name: _MES_MAKE.

close_message

extern void close_message(int mes) NATIVE(193);

Closes a message window, clears its message number and text, and restores its default reveal speed and bubble centre.

Original name: _MES_CLOSE.

advance_message_page

extern void advance_message_page(int mes) NATIVE(194);

Moves a message window on to its next page when it is waiting at a page break and not scrolling; otherwise does nothing.

Original name: _MES_NEXTPAGE.

place_message_bubble

extern void place_message_bubble(int mes, int speaker, int listener, OPTIONAL(int listener_x, int listener_y)) NATIVE(195);

Places a speech bubble and points its tail at the speaker. With three arguments it takes the speaker and listener scene characters and uses their screen positions; with five it takes speaker_x, speaker_y, listener_x, listener_y screen coordinates directly.

Original name: _SET_MES_AUTOSET.

set_message_tail

extern void set_message_tail(int mes, int on, OPTIONAL(int length, int half_width)) NATIVE(196);

Turns a speech bubble's tail on (1) or off (0), optionally setting the tail's length and half its width at the root, in screen pixels.

Original name: _SET_MES_SHIPPO.

set_message_slot

extern void set_message_slot(int mes, int slot) NATIVE(197);

Forces a speech bubble into a screen slot, counting from 1; 0 lets the game choose.

Original name: _SET_MES_POS.

set_message_speed

extern void set_message_speed(int mes, float speed, OPTIONAL(float default_speed)) NATIVE(198);

Sets how many characters a message window reveals per frame; 0 shows the text at once. The optional second value also sets the default speed the window returns to on close.

Original name: _SET_MES_DRAWSPEED.

set_message_cursor

extern void set_message_cursor(int mes, int line) NATIVE(199);

Puts a message window's select cursor on a line; -1 hides it. Moving from no cursor restarts the cursor animation.

Original name: _SET_MES_CURSOR.

is_message_shown

extern int is_message_shown(int mes) NATIVE(200);

Returns 1 when all the window's text is shown (state 3), else 0.

Original name: _CHECK_MES_COMPLETE.

is_message_page_wait

extern int is_message_page_wait(int mes) NATIVE(201);

Returns 1 when the window is waiting at a page break (state 5), else 0.

Original name: _CHECK_MES_WAIT.

is_message_closed

extern int is_message_closed(int mes) NATIVE(202);

Returns 1 when the window has fully faded out (state 0), else 0.

Original name: _CHECK_MES.

set_message_prompt

extern void set_message_prompt(int mes, int on) NATIVE(203);

Sets whether a message window draws the button prompt once its text is shown (1) or not (0).

Original name: _SET_MES_OKURI.

set_message_bubble

extern void set_message_bubble(int mes, int unused) NATIVE(204);

Switches a message window to the speech-bubble frame (window mode 1). The second argument is read and ignored.

Original name: _SET_MES_FUKIDASHI.

set_message_window_flag

extern void set_message_window_flag(int mes, int on) NATIVE(205);

Sets a message window's frame mode straight to 1 (speech bubble) when on is non-zero, else 0 (no frame), without changing its colours.

Original name: _SET_MES_WIN_FLAG.

set_camera_pos

extern void set_camera_pos(float x, float y, float z) NATIVE(206);

Puts the active camera's eye at a world position at once. Called with a single argument, that argument is the key of a stored argument block holding the position.

Original name: _SET_CAMERA_POS.

VM_ARGS

extern void get_camera_pos VM_ARGS(any x, any y, any z) NATIVE(207);

Reads the active camera's eye position into x, y and z.

Original name: _GET_CAMERA_POS.

set_camera_target

extern void set_camera_target(float x, float y, float z) NATIVE(208);

Puts the active camera's look-at point at a world position at once. Called with a single argument, that argument is the key of a stored argument block holding the position.

Original name: _SET_CAMERA_REF.

VM_ARGS

extern void get_camera_target VM_ARGS(any x, any y, any z) NATIVE(209);

Reads the active camera's look-at point into x, y and z.

Original name: _GET_CAMERA_REF.

set_camera_speed

extern void set_camera_speed(float steps) NATIVE(210);

Sets how many steps the active camera's eye and look-at point take to reach their next positions.

Original name: _SET_CAMERA_SPEED.

step_camera

extern void step_camera(int steps) NATIVE(211);

Moves the active camera's eye and look-at point the given number of steps toward their next positions; a negative count puts them there at once.

Original name: _CAMERA_STEP.

set_message_window_mode

extern void set_message_window_mode(int mes, enum mes_window_mode mode) NATIVE(212);

Sets the frame drawn around a message window, with its colour and outline: 0 none, 1 speech bubble, 2 help (becomes 4), 3 floating menu, 4 plain menu, 5 yes/no menu, 6 menu with selection band, 7 bottom centre, 8 fourth menu style, 9 bottom bubble, 10 bottom bubble (timer variant), 11 screen centre, 12 plain (stored as 0).

Original name: _SET_MES_WINDOW_MODE.

apply_message_preset

extern void apply_message_preset(int mes, enum mes_preset preset) NATIVE(213);

Empties a message window and applies a preset: 0 speech bubble at the language's reveal speed, 1 system text shown at once, 2 free-placed text shown at once, 3 names over characters, 4 plain menu window, 5 small-font bubble with slow fade, 6 plain menu revealing one character per frame.

Original name: _SET_MES_PRESET.

set_message_sysmes

extern void set_message_sysmes(int mes, int slot, int sysmes_no) NATIVE(214);

Sets the system message number that item code slot 1 to 16 inserts into the window's text. Slots outside 1 to 16 are ignored.

Original name: _SET_MES_ITEM_DIRECT.

set_message_item

extern void set_message_item(int mes, int slot, item_id item) NATIVE(215);

Sets item code slot 1 to 16 of a message window to insert an item's name, given the item number. Slots outside 1 to 16 are ignored.

Original name: _SET_MES_ITEM.

set_message_value

extern void set_message_value(int mes, int slot, int value) NATIVE(216);

Sets a number the message text inserts: slot 0 sets the single value code, slots 1 to 16 set the numbered value codes and clear their padding width.

Original name: _SET_MES_VALUE.

get_message_state

extern int get_message_state(int mes) NATIVE(217);

Returns a message window's state: 0 closed, 1 opening, 2 revealing text, 3 fully shown, 4 closing, 5 waiting at a page break, 6 scrolling.

Original name: _GET_MES_STATUS.

get_npc_message_no

extern void get_npc_message_no(npc_id npc, int kind, int *mes_no, OPTIONAL(int *option_count)) NATIVE(218);

Looks up the event message number of a kind of line a party-capable town character says and writes it to mes_no (0 for an unknown character); kind 0 is the character's name. For kind 4 it also writes the character's option count to option_count.

Original name: _GET_PARTY_CHARA_MES_NO.

set_message_source

extern void set_message_source(int mes, enum mes_source source, int unused) NATIVE(219);

Points a message window at a message buffer: source 0 makes the window read its messages from sysmes.mes, any other value makes its item codes read from system.mes. The third argument is read and ignored.

Original name: _MES_SET_BUFF.

VM_ARGS

extern int get_message_window_mode VM_ARGS(any mes, ...) NATIVE(220);

Returns a message window's frame mode (see set_message_window_mode).

Original name: _GET_MES_WINDOW_MODE.

is_voice_playing

extern int is_voice_playing(void) NATIVE(222);

Returns 1 while a voice stream started by the event is playing, else 0.

Original name: _GET_MES_VOICE.

set_message_first_choice

extern void set_message_first_choice(int mes, int line) NATIVE(223);

Sets the first line of a message window that the select cursor can choose, for question menus.

Original name: _SET_MES_QUESTION_GYOU.

get_message_first_choice

extern int get_message_first_choice(int mes) NATIVE(224);

Returns the first selectable line of a message window.

Original name: _GET_MES_QUESTION_GYOU.

set_message_close_timer

extern void set_message_close_timer(int mes, int frames) NATIVE(225);

Sets the number of frames before a message window closes by itself; 0 for never.

Original name: _SET_MES_CLOSE_CNT.

VM_ARGS

extern void set_message_option VM_ARGS(int mes, enum mes_option option, OPTIONAL(any value1, int value2, int value3, int value4)) NATIVE(226);

Sets one of several message window options chosen by option: 0 line indent on/off, 1 cursor centring on/off, 2 half-width character width (float, negative for default), 3 shows the aquarium fish list (no values), 4 fixed frame size (width, height, or x, y, width, height), 5 shade of a line (line, shade), 6 alpha of a line (line, alpha), 7 text colour (r, g, b, a), 8 outline style, 9 text offset inside the fixed frame (x, y, negative for default), 10 window alpha (128 opaque).

Original name: _SET_MES_ETC.

VM_ARGS

extern void get_message_info VM_ARGS(int mes, enum mes_info_query query, any value, OPTIONAL(int *result1, int *result2)) NATIVE(227);

Reads one of several values chosen by query: 0 line indent flag, 1 cursor centring flag, 2 number of fish in the main aquarium tank, each into the third argument. Query 3 takes a villager number as the third argument and writes two fields of that villager's info to the fourth and fifth.

Original name: _GET_MES_ETC.

load_message_file

extern void load_message_file(int mes, enum memory_stack stack_no, OPTIONAL(message_file file_name)) NATIVE(228);

Loads a text file into the event scene's memory stack and makes show_message read message numbers from it. Called with two arguments it unloads instead and the window goes back to the event message file.

Original name: _LOAD_MES.

play_message_se

extern void play_message_se(enum message_se kind) NATIVE(229);

Plays a system sound effect for message windows: kind 0 or 1 plays system sound 25, 2 plays sound 0, 3 plays sound 1. Other values fail.

Original name: _MES_SE_PLAY.

set_message_string

extern void set_message_string(int mes, int slot, string text) NATIVE(230);

Sets string slot 1 to 16 that the message text's string codes insert.

Original name: _SET_MES_STR.

get_message_prompt

extern int get_message_prompt(int mes) NATIVE(231);

Returns whether a message window draws its button prompt. The code only runs when called with a single argument, so the usual two-argument call fails and leaves the result unchanged.

Original name: _GET_MES_OKURI.

init_asq

extern void init_asq(int slot) NATIVE(300);

Does nothing in the retail build: the body reads no arguments and reports success. Parameters follow how the disc calls it.

Original name: _ASQ_INIT.

sync_asq_chara

extern void sync_asq_chara(chara_slot slot, int chara) NATIVE(301);

Does nothing in the retail build: the body reads no arguments and reports success. Parameters follow how the disc calls it.

Original name: _ASQ_SYNC_CHARA.

set_asq_pos

extern void set_asq_pos(int slot, float x, float y, float z) NATIVE(302);

Does nothing in the retail build: the body reads no arguments and reports success. Parameters follow how the disc calls it.

Original name: _ASQ_SET_POS.

move_asq_to

extern void move_asq_to(int slot, float x, float y, float z, int frames) NATIVE(303);

Does nothing in the retail build: the body reads no arguments and reports success. Parameters follow how the disc calls it.

Original name: _ASQ_MOVE.

set_asq_move_step

extern void set_asq_move_step(void) NATIVE(304);

Does nothing in the retail build: the body reads no arguments and reports success. Never called on the disc.

Original name: _ASQ_MOVE_STEP.

turn_asq_to_point

extern void turn_asq_to_point(int slot, float x, float y, float z, float rate) NATIVE(305);

Does nothing in the retail build: the body reads no arguments and reports success. Parameters follow how the disc calls it.

Original name: _ASQ_ROT_REF.

turn_asq_to_angle

extern void turn_asq_to_angle(void) NATIVE(306);

Does nothing in the retail build: the body reads no arguments and reports success. Never called on the disc.

Original name: _ASQ_ROT_ANGLE.

clear_asq_rot

extern void clear_asq_rot(void) NATIVE(307);

Does nothing in the retail build: the body reads no arguments and reports success. Never called on the disc.

Original name: _ASQ_CLEAR_ROT.

wait_asq_rot

extern void wait_asq_rot(void) NATIVE(308);

Does nothing in the retail build: the body reads no arguments and reports success. Never called on the disc.

Original name: _ASQ_WAIT_ROT.

turn_asq_while_moving

extern void turn_asq_while_moving(void) NATIVE(309);

Does nothing in the retail build: the body reads no arguments and reports success. Never called on the disc.

Original name: _ASQ_ROT_MOVE.

set_asq_rot

extern void set_asq_rot(int slot, float angle) NATIVE(310);

Does nothing in the retail build: the body reads no arguments and reports success. Parameters follow how the disc calls it.

Original name: _ASQ_SET_ROT.

delay_asq_rot

extern void delay_asq_rot(void) NATIVE(311);

Does nothing in the retail build: the body reads no arguments and reports success. Never called on the disc.

Original name: _ASQ_DELAY_ROT.

check_asq

extern void check_asq(void) NATIVE(312);

Does nothing in the retail build: the body reads no arguments and reports success. Never called on the disc.

Original name: _ASQ_CHECK.

trigger_asq_motion

extern void trigger_asq_motion(int slot) NATIVE(313);

Does nothing in the retail build: the body reads no arguments and reports success. Parameters follow how the disc calls it.

Original name: _ASQ_MOTION_TRG.

play_asq_motion

extern void play_asq_motion(int slot, string motion_name) NATIVE(314);

Does nothing in the retail build: the body reads no arguments and reports success. Parameters follow how the disc calls it.

Original name: _ASQ_MOTION_PLAY.

VM_ARGS

extern void stop_asq_motion VM_ARGS(int slot, any value) NATIVE(315);

Does nothing in the retail build: the body reads no arguments and reports success. Parameters follow how the disc calls it.

Original name: _ASQ_MOTION_STOP.

queue_asq_motion

extern void queue_asq_motion(void) NATIVE(316);

Does nothing in the retail build: the body reads no arguments and reports success. Never called on the disc.

Original name: _ASQ_MOTION_NEXT.

trigger_asq_anime

extern void trigger_asq_anime(int slot) NATIVE(317);

Does nothing in the retail build: the body reads no arguments and reports success. Parameters follow how the disc calls it.

Original name: _ASQ_ANIME_TRG.

VM_ARGS

extern void set_asq_anime VM_ARGS(int slot, any anime, OPTIONAL(any extra)) NATIVE(318);

Does nothing in the retail build: the body reads no arguments and reports success. Parameters follow how the disc calls it.

Original name: _ASQ_ANIME.

play_asq_se

extern void play_asq_se(void) NATIVE(319);

Does nothing in the retail build: the body reads no arguments and reports success. Never called on the disc.

Original name: _ASQ_SE_PLAY.

show_image

extern void show_image(int on, int image) NATIVE(320);

Shows (1) or hides (0) one of the 8 event images (0 to 7). The visibility flag comes first and the image number second.

Original name: _IMG_SET_DRAW.

set_image_source_rect

extern void set_image_source_rect(int image, int x, int y, int width, int height) NATIVE(321);

Sets the part of the texture an event image shows, in texels: left x, top y, width, height.

Original name: _IMG_SET_GET.

set_image_screen_rect

extern void set_image_screen_rect(int image, int x, int y, int width, int height) NATIVE(322);

Sets the screen rectangle an event image draws into, in pixels: left x, top y, width, height.

Original name: _IMG_SET_PUT.

set_image_texture

extern void set_image_texture(int image, string texture_name) NATIVE(323);

Gives an event image (0 to 7) the loaded texture of the given name.

Original name: _IMG_SET_NAME.

move_image_to

extern void move_image_to(int image, int x, int y, int frames) NATIVE(324);

Slides an event image's top-left corner to screen x, y over the given number of frames; 0 jumps there.

Original name: _IMG_SET_MOVE.

fade_image

extern void fade_image(int image, int fade_in, int frames) NATIVE(325);

Fades an event image's alpha in to 128 (fade_in = 1) or out to 0 (fade_in = 0) over the given number of frames.

Original name: _IMG_SET_FADE.

set_image_color

extern void set_image_color(int image, int r, int g, int b, int a) NATIVE(326);

Sets an event image's colour and alpha, each 0 to 128 where 128 is full.

Original name: _IMG_SET_COLOR.

init_sprite

extern void init_sprite(int sprite) NATIVE(350);

Resets an event sprite (0 to 47) to a hidden, untextured, white screen sprite.

Original name: _SPRITE_INIT.

set_sprite_draw

extern void set_sprite_draw(int sprite, enum event_sprite_draw mode) NATIVE(351);

Sets the draw pass of an event sprite: 0 hidden, 1 normal pass, 2 first pass.

Original name: _SPRITE_SET_DRAW.

set_sprite_type

extern void set_sprite_type(int sprite, enum event_sprite_type type) NATIVE(352);

Sets where an event sprite lives: 0 on screen (screen position, turns around the screen z axis), 1 in the world as a depth-tested billboard.

Original name: _SPRITE_SET_TYPE.

set_sprite_texture

extern void set_sprite_texture(int sprite, string texture_name, int tex_block) NATIVE(353);

Gives an event sprite the named texture from a texture block.

Original name: _SPRITE_SET_TEXTURE.

set_sprite_pos

extern void set_sprite_pos(int sprite, enum screen_x x, enum screen_y y, OPTIONAL(float z)) NATIVE(354);

Sets the centre of an event sprite: screen pixels for screen sprites (y is shifted down 32), world units for world sprites. z defaults to 0.

Original name: _SPRITE_SET_POS.

set_sprite_size

extern void set_sprite_size(int sprite, enum screen_x width, enum screen_y height) NATIVE(355);

Sets an event sprite's width and height before scaling. A height of 416 or 448 is enlarged by 64.

Original name: _SPRITE_SET_PUTSIZE.

set_sprite_uv

extern void set_sprite_uv(int sprite, int u, int v, int width, int height) NATIVE(356);

Sets the part of the texture an event sprite shows, in texels: u, v, width, height.

Original name: _SPRITE_SET_UVSIZE.

set_sprite_color

extern void set_sprite_color(int sprite, enum color_level r, enum color_level g, enum color_level b, enum color_level a) NATIVE(357);

Sets an event sprite's colour and alpha, with 128.0 as full.

Original name: _SPRITE_SET_COLOR.

VM_ARGS

extern void set_sprite_scale VM_ARGS(int sprite, float scale_x, float scale_y, OPTIONAL(any unused)) NATIVE(358);

Sets an event sprite's horizontal and vertical scale. A fourth argument seen on the disc is ignored.

Original name: _SPRITE_SET_SCALE.

set_sprite_blend

extern void set_sprite_blend(int sprite, enum alpha_macro mode) NATIVE(359);

Sets an event sprite's alpha blend mode: 1 normal, 2 additive, 3 subtractive, 4 none, 5 full additive. Sprites start at 1.

Original name: _SPRITE_SET_ALPHAB.

is_camera_path_running

extern int is_camera_path_running(void) NATIVE(400);

Returns 1 while the camera sequence is still following its path, 0 once it has reached the end.

Original name: _CMRS_CHECK.

clear_camera_seq

extern void clear_camera_seq(void) NATIVE(401);

Stops every track of the event camera sequence, clears its state and drops all queued camera commands. Call it before queuing a new camera shot.

Original name: _CMRS_INIT.

delay_camera_moves

extern void delay_camera_moves(int frames) NATIVE(402);

Queues a wait of a number of frames on the camera position track, so the next queued eye or look-at command starts that much later.

Original name: _CMRS_PRDELAY.

set_camera_seq_pos

extern void set_camera_seq_pos(float x, float y, float z) NATIVE(403);

Queues putting the camera eye at a world position at once, on the camera position track.

Original name: _CMRS_SET_POS.

set_camera_seq_ref

extern void set_camera_seq_ref(float x, float y, float z) NATIVE(404);

Queues putting the camera look-at point at a world position at once, on the camera position track.

Original name: _CMRS_SET_REF.

VM_ARGS

extern void move_camera_to VM_ARGS(float x, float y, float z, float ref_x, float ref_y, float ref_z, int frames, OPTIONAL(any extra1, any extra2)) NATIVE(405);

Queues moving the camera eye to (x, y, z) and the look-at point to (ref_x, ref_y, ref_z) at an even speed over a number of frames. The call fails with any count other than seven arguments; one disc script passes nine.

Original name: _CMRS_MOVE.

move_camera_ref

extern void move_camera_ref(float x, float y, float z, int frames) NATIVE(406);

Queues moving only the camera look-at point to a world position at an even speed over a number of frames.

Original name: _CMRS_MOVE_REF.

clear_camera_path

extern void clear_camera_path(void) NATIVE(407);

Queues removing every point from the camera path, on the camera position track.

Original name: _CMRS_INIT_PAS.

set_camera_path_frames

extern void set_camera_path_frames(int frames) NATIVE(408);

Queues setting how many frames the camera takes to run the whole camera path.

Original name: _CMRS_SET_PAS_FRM.

add_camera_path_point

extern void add_camera_path_point(float x, float y, float z, float ref_x, float ref_y, float ref_z) NATIVE(409);

Queues adding an eye point (x, y, z) and a look-at point (ref_x, ref_y, ref_z) to the end of the camera path, up to 16 points.

Original name: _CMRS_ADD_PAS.

start_camera_path

extern void start_camera_path(void) NATIVE(410);

Queues running the camera along a spline through the camera path points over the path's frame count; the position track continues once the end is reached.

Original name: _CMRS_START_PAS.

delay_camera_orbit

extern void delay_camera_orbit(int frames) NATIVE(411);

Queues a wait of a number of frames on the camera orbit track (angle, height and distance), so the next queued orbit command starts that much later.

Original name: _CMRS_AHDDELAY.

set_camera_orbit_angle

extern void set_camera_orbit_angle(float angle) NATIVE(412);

Queues placing the camera eye at an angle around the look-at point, keeping its distance. The angle is in radians about the vertical axis; the eye goes to ref + dist * (sin angle, 0, cos angle).

Original name: _CMRS_SET_ANGLE.

set_camera_orbit_height

extern void set_camera_orbit_height(float height) NATIVE(413);

Queues placing the camera eye a height in world units above the look-at point.

Original name: _CMRS_SET_HEIGHT.

set_camera_orbit_dist

extern void set_camera_orbit_dist(float dist) NATIVE(414);

Queues placing the camera eye a horizontal distance in world units from the look-at point, keeping its angle.

Original name: _CMRS_SET_DIST.

set_camera_orbit

extern void set_camera_orbit(float angle, float height, float dist) NATIVE(415);

Queues placing the camera eye around the look-at point by angle in radians about the vertical axis, height above it and horizontal distance from it, all at once. While the camera follows an event object these set the follow angle, height and distance instead.

Original name: _CMRS_SET_AHD.

move_camera_orbit

extern void move_camera_orbit(float angle, float height, float dist, int frames) NATIVE(416);

Queues changing the camera's angle (radians), height and distance around the look-at point to new values at an even speed over a number of frames.

Original name: _CMRS_MOVE_AHD.

delay_camera_fade

extern void delay_camera_fade(int frames) NATIVE(419);

Queues a wait of a number of frames on the camera fade track, so the next queued fade starts that much later.

Original name: _CMRS_FADE_DELAY.

init_camera_fade

extern void init_camera_fade(void) NATIVE(420);

Queues a fade track command that does nothing and finishes at once.

Original name: _CMRS_FADE_INIT.

fade_camera_in

extern void fade_camera_in(int frames, OPTIONAL(float r, float g, float b)) NATIVE(421);

Queues fading the screen in from a colour over a number of frames, on the camera fade track. The colour components run from 0 to 255 and default to black; give all three or none.

Original name: _CMRS_FADE_IN.

fade_camera_out

extern void fade_camera_out(int frames, OPTIONAL(float r, float g, float b)) NATIVE(422);

Queues fading the screen out to a colour over a number of frames, on the camera fade track. The colour components run from 0 to 255 and are read only when all three are given; otherwise the fade is to black.

Original name: _CMRS_FADE_OUT.

slow_camera_move

extern void slow_camera_move(float rate, int frames) NATIVE(423);

Queues letting the camera's last eye and look-at movement carry on and die away: each frame for a number of frames the movement per frame is multiplied by rate (such as 0.96) and applied.

Original name: _CMRS_PR_SLOWING.

slow_camera_orbit

extern void slow_camera_orbit(float rate, int frames) NATIVE(424);

Queues letting the camera's last angle, height and distance change carry on and die away: each frame for a number of frames the change per frame is multiplied by rate and applied.

Original name: _CMRS_AHD_SLOWING.

mark_camera_orbit_loop

extern void mark_camera_orbit_loop(void) NATIVE(425);

Queues marking a return point on the camera orbit track; commands after it are kept so a later loop_camera_orbit can run them again.

Original name: _CMRS_AHD_KEEP.

loop_camera_orbit

extern void loop_camera_orbit(void) NATIVE(426);

Queues jumping the camera orbit track back to the return point set by mark_camera_orbit_loop, repeating the commands after it.

Original name: _CMRS_AHD_RETURN.

mark_camera_move_loop

extern void mark_camera_move_loop(void) NATIVE(427);

Queues marking a return point on the camera position track; commands after it are kept so a later loop_camera_moves can run them again.

Original name: _CMRS_PR_KEEP.

loop_camera_moves

extern void loop_camera_moves(void) NATIVE(428);

Queues jumping the camera position track back to the return point set by mark_camera_move_loop, repeating the commands after it.

Original name: _CMRS_PR_RETURN.

delay_camera_shake

extern void delay_camera_shake(int frames) NATIVE(429);

Queues a wait of a number of frames on the camera shake track, so the next queued shake starts that much later.

Original name: _CMRS_QUAKE_DELAY.

shake_camera

extern void shake_camera(float x, float y, float z, int frames) NATIVE(430);

Queues shaking the camera eye and look-at point by an offset (x, y, z in world units) that alternates direction every two frames and shrinks to nothing over a number of frames. With frames = -1 the shake keeps its full size and never ends until the camera sequence is cleared.

Original name: _CMRS_QUAKE.

move_camera_eased

extern void move_camera_eased(float x, float y, float z, float ref_x, float ref_y, float ref_z, int frames, enum scene_seq_ease ease, float ease_rate) NATIVE(431);

Queues moving the camera eye to (x, y, z) and the look-at point to (ref_x, ref_y, ref_z) over a number of frames with eased speed. ease is 0 to speed up and slow down, 1 to speed up only, 2 to slow down only; ease_rate is the share of the frame count (0 to 1) spent changing speed.

Original name: _CMRS_MOVE2.

move_camera_orbit_eased

extern void move_camera_orbit_eased(float angle, float height, float dist, int frames, enum scene_seq_ease ease, float ease_rate) NATIVE(432);

Queues changing the camera's angle (radians), height and distance around the look-at point over a number of frames with eased speed. ease is 0 to speed up and slow down, 1 to speed up only, 2 to slow down only; ease_rate is the share of the frame count spent changing speed.

Original name: _CMRS_MOVE_AHD2.

delay_camera_chara

extern void delay_camera_chara(int frames) NATIVE(433);

Queues a wait of a number of frames on the camera character track, so the next queued character attach starts that much later.

Original name: _CMRS_CHARA_DELAY.

attach_chara_to_camera

extern void attach_chara_to_camera(chara_slot chara, float dist, int frames) NATIVE(434);

Queues keeping a character at a distance in world units in front of the camera eye, along the line to the look-at point, for a number of frames. frames = -1 keeps it there until the camera sequence is cleared.

Original name: _CMRS_CHARA_ATTACH.

move_camera_pos

extern void move_camera_pos(float x, float y, float z, int frames) NATIVE(435);

Queues moving only the camera eye to a world position at an even speed over a number of frames.

Original name: _CMRS_MOVE_POS.

shake_camera_target

extern void shake_camera_target(float x, float y, float z, int frames) NATIVE(436);

Queues shaking only the camera look-at point by an offset (x, y, z in world units) that flips direction every frame and shrinks to nothing over a number of frames. With frames = -1 the shake keeps its full size and never ends until the camera sequence is cleared.

Original name: _CMRS_QUAKE2.

check_actor_busy

extern int check_actor_busy(int actor) NATIVE(450);

Returns 1 while any track of the actor's sequence still has queued commands running, and 0 once every track has finished. Poll it in a loop with wait to hold the script until the actor is done.

Original name: _OBJS_CHECK.

VM_ARGS

extern void clear_actor_seq VM_ARGS(int actor, OPTIONAL(any unused)) NATIVE(451);

Stops every track of the actor's sequence, drops its queued commands, forgets which event object it drives and clears its position and rotation. Any second argument is ignored.

Original name: _OBJS_INIT.

bind_actor_object

extern void bind_actor_object(int actor, int handle) NATIVE(452);

Makes the actor's sequence drive an event object handle, set up earlier by the event object handle natives. Most scripts pass the same number for both.

Original name: _OBJS_SYNC_OBJ.

delay_actor_moves

extern void delay_actor_moves(int actor, int frames) NATIVE(453);

Queues a wait of a number of frames on the actor's position track, so the next queued position command starts that much later.

Original name: _OBJS_POS_DELAY.

VM_ARGS

extern void set_actor_pos VM_ARGS(int actor, any x, float y, float z, OPTIONAL(any extra)) NATIVE(454);

Queues putting the actor at a world position at once. The call fails with any count other than four arguments.

Original name: _OBJS_SET_POS.

move_actor_to

extern void move_actor_to(int actor, float x, float y, float z, int frames, OPTIONAL(int on_ground)) NATIVE(455);

Queues moving the actor to a world position at an even speed over a number of frames. With on_ground = 1 the actor's height follows the ground under it while moving and at the end.

Original name: _OBJS_MOVE.

clear_actor_path

extern void clear_actor_path(int actor) NATIVE(456);

Queues removing every point from the actor's walking path.

Original name: _OBJS_INIT_PAS.

set_actor_path_frames

extern void set_actor_path_frames(int actor, int frames) NATIVE(457);

Queues setting how many frames the actor takes to walk its whole path.

Original name: _OBJS_SET_PAS_FRM.

add_actor_path_point

extern void add_actor_path_point(int actor, float x, float y, float z) NATIVE(458);

Queues adding a world position to the end of the actor's walking path, up to 16 points.

Original name: _OBJS_ADD_PAS.

start_actor_path

extern void start_actor_path(int actor, OPTIONAL(int on_ground)) NATIVE(459);

Queues walking the actor along a spline through its path points over the path's frame count, turning it to face the direction of travel. With on_ground = 1 its height is also fitted to the ground each frame.

Original name: _OBJS_START_PAS.

delay_actor_turns

extern void delay_actor_turns(int actor, int frames) NATIVE(460);

Queues a wait of a number of frames on the actor's rotation track, so the next queued rotation command starts that much later.

Original name: _OBJS_ROT_DELAY.

set_actor_rot

extern void set_actor_rot(int actor, float rot_x, float rot_y, float rot_z) NATIVE(461);

Queues setting the actor's rotation at once, in radians about the x, y and z axes.

Original name: _OBJS_SET_ROT.

turn_actor_to

extern void turn_actor_to(int actor, float rot_x, float rot_y, float rot_z, OPTIONAL(int frames)) NATIVE(462);

Queues turning the actor to a rotation (radians) at an even speed over a number of frames. With a negative frame count it instead adds the rotation every frame and keeps spinning until the actor's sequence is cleared. The call fails without the frames argument.

Original name: _OBJS_ROTATION.

turn_actor_toward

extern void turn_actor_toward(int actor, float x, float y, float z, int frames) NATIVE(463);

Queues turning the actor to face a world position over a number of frames.

Original name: _OBJS_REFERENCE.

delay_actor_motion

extern void delay_actor_motion(int actor, OPTIONAL(int frames)) NATIVE(464);

Queues a wait of a number of frames on the actor's motion track, so the next queued motion command starts that much later.

Original name: _OBJS_MOTION_DELAY.

set_actor_motion

extern void set_actor_motion(int actor, string motion_name, OPTIONAL(enum chara_motion_flag flags, float speed, int apply_now)) NATIVE(465);

Queues starting a named motion on the actor at once. flags: 1 holds the current frame, 2 stops on the last frame instead of looping, 4 starts from the first frame without blending. speed, when not -1, sets the playback step and restarts the motion from its first frame; apply_now = 1 also steps the motion once and resets the actor's dynamic parts so the new pose shows immediately.

Original name: _OBJS_SET_MOTION.

VM_ARGS

extern void queue_actor_motion VM_ARGS(int actor, string motion_name, OPTIONAL(enum chara_motion_flag flags, float speed, any extra5)) NATIVE(466);

Queues a named motion that starts once the actor's current motion ends. flags: 1 holds the current frame, 2 stops on the last frame instead of looping, 4 starts from the first frame without blending; speed, when not -1, sets the playback step.

Original name: _OBJS_NEXT_MOTION.

wait_actor_motion_end

extern void wait_actor_motion_end(int actor) NATIVE(467);

Queues holding the actor's motion track until its current motion ends.

Original name: _OBJS_MOTION_WAIT.

trigger_actor_motion_seq

extern void trigger_actor_motion_seq(int actor) NATIVE(468);

Queues telling the actor's motion sequence to move on to its next part.

Original name: _OBJS_SEQ_MOT_TRG.

set_actor_blend_speed

extern void set_actor_blend_speed(int actor, OPTIONAL(float step)) NATIVE(469);

Queues setting how fast the actor blends from one motion into the next; values of 0 or below become the default 0.2.

Original name: _OBJS_CHENGE_STEP.

delay_actor_texture_anim

extern void delay_actor_texture_anim(int actor, OPTIONAL(int frames)) NATIVE(470);

Queues a wait of a number of frames on the actor's texture animation track, so the next queued texture animation command starts that much later.

Original name: _OBJS_TEXA_DELAY.

VM_ARGS

extern void set_actor_texture_anim VM_ARGS(int actor, any on, OPTIONAL(string anim_name)) NATIVE(471);

Queues turning a texture animation on the actor on or off. With on = 0 and no name it stops all of the actor's texture animations; with on = 1 it plays the named animation, such as a face or eye-blink loop.

Original name: _OBJS_TEX_ANIME.

wait_actor_motion_trigger

extern void wait_actor_motion_trigger(int actor) NATIVE(472);

Queues holding the actor's motion track until its motion sequence reaches its trigger state (status 3).

Original name: _OBJS_SEQ_MOT_TRG_WAIT.

jump_actor_to

extern void jump_actor_to(int actor, float x, float y, float z, float gravity, int frames) NATIVE(473);

Queues moving the actor to a world position along a jump arc over a number of frames. gravity shapes the arc; disc scripts pass small negative values such as -0.4.

Original name: _OBJS_JUMP.

delay_actor_color

extern void delay_actor_color(int actor, int frames) NATIVE(474);

Queues a wait of a number of frames on the actor's colour track, so the next queued colour change starts that much later.

Original name: _OBJS_COLOR_DELAY.

set_actor_color

extern void set_actor_color(int actor, float r, float g, float b, float a, OPTIONAL(int frames)) NATIVE(475);

Queues changing the colour and alpha of the actor over a number of frames, or at once when frames is 0 or left out. Components run from 0 to 128, where 128 is normal; only event sprites take a colour.

Original name: _OBJS_SET_COLOR.

reset_actor_motion

extern void reset_actor_motion(int actor) NATIVE(476);

Queues putting the actor's motion back to its start.

Original name: _OBJS_RESET_MOTION.

delay_actor_scale

extern void delay_actor_scale(int actor, int frames) NATIVE(477);

Queues a wait of a number of frames on the actor's scale track, so the next queued scale change starts that much later.

Original name: _OBJS_SCALE_DELAY.

set_actor_scale

extern void set_actor_scale(int actor, float scale_x, float scale_y, float scale_z, OPTIONAL(int frames)) NATIVE(478);

Queues changing the actor's scale on each axis over a number of frames, or at once when frames is 0 or left out. 1.0 is normal size.

Original name: _OBJS_SET_SCALE.

set_actor_motion_time

extern void set_actor_motion_time(int actor, float time) NATIVE(479);

Queues jumping the actor's current motion to a time, in motion frames from its start.

Original name: _OBJS_SET_MOTION_NOW_TIME.

set_actor_motion_ratio

extern void set_actor_motion_ratio(int actor, float ratio) NATIVE(481);

Queues jumping the actor's current motion to a share of its length, from 0.0 at the start to 1.0 at the end.

Original name: _OBJS_SET_MOTION_WAIT_TIME.

set_actor_motion_speed

extern void set_actor_motion_speed(int actor, float step) NATIVE(482);

Queues setting how many motion frames the actor's motion advances each step; 1.0 is normal speed.

Original name: _OBJS_SET_STEP.

VM_ARGS

extern void attach_actor_to_frame VM_ARGS(int actor, int handle, string frame_name, OPTIONAL(any x_or_frames, float y, float z, int frames)) NATIVE(483);

Queues keeping the actor at a named frame (bone) of another event object handle, plus an offset, for a number of frames: 0 places it once, -1 keeps it there until the sequence is cleared. Takes 3, 4, 6 or 7 arguments; with 4 the fourth is the frame count, with 6 or 7 the offset is x, y, z and the seventh is the frame count.

Original name: _OBJS_SET_EOH_FRAME_POS.

add_actor_pos

extern void add_actor_pos(int actor, float x, float y, float z, OPTIONAL(int frames)) NATIVE(484);

Queues adding an offset (world units) to the actor's position every frame for a number of frames, 1 when left out.

Original name: _OBJS_ADD_POS.

delay_actor_se

extern void delay_actor_se(int actor, int frames) NATIVE(485);

Queues a wait of a number of frames on the actor's sound effect track, so the next queued sound effect plays that much later.

Original name: _OBJS_SE_DELAY.

play_actor_se

extern void play_actor_se(int actor, int sound, int se_no) NATIVE(486);

Queues playing a sound effect, by its number within a loaded sound bank, on the actor's sound effect track.

Original name: _OBJS_SE_PLAY.

VM_ARGS

extern void reset_actor_dynamics VM_ARGS(int actor, OPTIONAL(any unused1, any unused2, any unused3)) NATIVE(487);

Queues writing the actor's sequence position and rotation to its object and putting its dynamic- animation parts (swinging hair, cloth and the like) back to rest. Extra arguments are ignored.

Original name: _OBJS_RESET_DA_POSITION.

move_actor_eased

extern void move_actor_eased(int actor, float x, float y, float z, int frames, enum scene_seq_ease ease, OPTIONAL(float ease_rate)) NATIVE(488);

Queues moving the actor to a world position over a number of frames with eased speed. ease is 0 to speed up and slow down, 1 to speed up only, 2 to slow down only; ease_rate is the share of the frame count spent changing speed. The call fails with any count other than seven arguments.

Original name: _OBJS_MOVE2.

attach_actor_to_camera

extern void attach_actor_to_camera(int actor, float dist, int frames) NATIVE(489);

Queues keeping the actor at a distance in world units in front of the active camera eye, along its view line, for a number of frames; -1 keeps it there until the sequence is cleared.

Original name: _OBJS_ATTACH_CAMERA.

turn_actor_eased

extern void turn_actor_eased(int actor, float rot_x, float rot_y, float rot_z, int frames, enum scene_seq_ease ease, float ease_rate) NATIVE(490);

Queues turning the actor to a rotation (radians) over a number of frames with eased speed. ease is 0 to speed up and slow down, 1 to speed up only, 2 to slow down only; ease_rate is the share of the frame count spent changing speed.

Original name: _OBJS_ROTATION2.

step_actor_motion

extern void step_actor_motion(int actor) NATIVE(491);

Queues stepping the actor's motion once right away, so a newly set motion's pose shows without waiting for the next frame.

Original name: _OBJS_NORMAL_DRIVE.

get_contents_pos

extern void get_contents_pos(void) NATIVE(501);

Does nothing.

Original name: _GET_CONTENTS_POS.

get_pot_pos

extern void get_pot_pos(float *x, float *y, float *z) NATIVE(502);

Writes the world position of the pot or box the player carries and throws in dungeons into x, y and z.

Original name: _GET_BPOT_POS.

get_pot_state

extern int get_pot_state(void) NATIVE(503);

Returns the state of the carried pot: 0 none, 1 held, 2 thrown and flying.

Original name: _GET_BPOT_STATUS.

get_person_status

extern int get_person_status(int npc) NATIVE(504);

Does nothing and reports failure; the result is left unchanged.

Original name: _GET_PERSON_STATUS.

get_player_chara

extern int get_player_chara(void) NATIVE(505);

Returns the number of the character the player controls in the event scene.

Original name: _GET_CONTROL_CHRID.

get_prev_camera_pos

extern void get_prev_camera_pos(float *x, float *y, float *z) NATIVE(506);

Writes the eye position of the event scene's previous camera (the one set_prev_camera_id names) into x, y and z.

Original name: _GET_BEFORE_CAMERA_POS.

get_prev_camera_ref

extern void get_prev_camera_ref(float *x, float *y, float *z) NATIVE(507);

Writes the look-at position of the event scene's previous camera (the one set_prev_camera_id names) into x, y and z.

Original name: _GET_BEFORE_CAMERA_REF.

set_camera_next_ref

extern void set_camera_next_ref(float x, float y, float z) NATIVE(508);

Gives the active follow camera a look-at position it moves toward.

Original name: _SET_CAMERA_NEXT_REF.

open_menu

extern void open_menu(enum menu_open_type menu_type, OPTIONAL(int param, ...)) NATIVE(509);

Asks the game to open a menu once the event yields. menu_type picks it, such as 6 shop, 7 save, 16 or 17 the item menu for overflowing items, 25 the monster book; any further arguments are passed to that menu as parameters.

Original name: _GOTO_MENU.

get_menu_status

extern void get_menu_status(void) NATIVE(510);

Does nothing and reports failure.

Original name: _GET_MENU_STATUS.

load_equip_model

extern void load_equip_model(enum memory_stack stack_no, enum user_chara member, enum equip_slot slot, string cfg_name, int chara, OPTIONAL(int attach_chara)) NATIVE(511);

Loads the model of a party member's current equipment for an event character, using memory stack stack_no. member is 0 or 1; slot 0 to 2 loads the equipment as character attach_chara and attaches it to the matching bone of chara, slot 3 or 4 loads it as a skin onto chara.

Original name: _LOAD_EQUIP.

get_equip_item

extern int get_equip_item(enum user_chara member, enum equip_slot slot) NATIVE(512);

Returns the item number in an equipment slot (0 to 4; 0 and 1 are the weapons) of party member 0 or 1.

Original name: _GET_EQUIP_ITEMNO.

set_time_flow

extern void set_time_flow(int on) NATIVE(513);

Turns the passing of the time of day in the event scene on (1) or off (0).

Original name: _SET_TIME_STEP_ENABLE.

set_door_material

extern void set_door_material(void) NATIVE(514);

Does nothing.

Original name: _SET_DOOR_MATERIAL.

enable_scene_skip

extern void enable_scene_skip(void) NATIVE(515);

Lets the player skip the current cutscene, fading to black when skipped.

Original name: _INIT_DRAMA_SCENE.

set_active_camera_id

extern void set_active_camera_id(int camera) NATIVE(516);

Sets which camera number of the event scene is the active one.

Original name: _SET_ACTIVE_CMRID.

set_prev_camera_id

extern void set_prev_camera_id(int camera) NATIVE(517);

Sets which camera number of the event scene counts as the previous camera, the one the get_prev_camera natives read.

Original name: _SET_BEFORE_CMRID.

load_event_dng_map

extern void load_event_dng_map(enum memory_stack stack_no, int tex_index, int dungeon, int room, int next_room) NATIVE(519);

Loads a dungeon map for display in an event into memory stack stack_no, from event texture file tex_index, and builds the path the player's piece moves along from room to next_room. The map starts hidden.

Original name: _DNGMAP_LOAD.

unload_event_dng_map

extern void unload_event_dng_map(void) NATIVE(520);

Frees the textures of the event dungeon map.

Original name: _DNGMAP_DELETE.

move_dng_map_piece

extern void move_dng_map_piece(int moving) NATIVE(521);

Starts (1) or stops (0) the player's piece moving along its path on the event dungeon map.

Original name: _DNGMAP_MOVE_PIECE.

show_event_dng_map

extern void show_event_dng_map(int on) NATIVE(522);

Shows (non-zero) or hides (0) the event dungeon map.

Original name: _DNGMAP_ONOFF.

fade_event_dng_map

extern void fade_event_dng_map(int fade_in, int frames) NATIVE(523);

Shows the event dungeon map and fades it in (fade_in = 1) or out (fade_in = 0) over a number of frames.

Original name: _DNGMAP_SET_FADE.

get_prev_eye_goal

extern void get_prev_eye_goal(float *x, float *y, float *z) NATIVE(524);

Writes the eye position the event scene's previous camera is moving toward into x, y and z.

Original name: _GET_BEFORE_CAMERA_NEXT_POS.

get_prev_ref_goal

extern void get_prev_ref_goal(float *x, float *y, float *z) NATIVE(525);

Writes the look-at position the event scene's previous camera is moving toward into x, y and z.

Original name: _GET_BEFORE_CAMERA_NEXT_REF.

set_camera_goal_pos

extern void set_camera_goal_pos(float x, float y, float z) NATIVE(526);

Gives the active follow camera an eye position it moves toward.

Original name: _SET_CAMERA_NEXT_POS.

check_line_hit

extern void check_line_hit(int ignore_mask, float from_x, float from_y, float from_z, float to_x, float to_y, float to_z, int check_boxes, void *result1, OPTIONAL(void *result2, void *result3, void *result4, void *result5, void *result6, void *result7, void *result8)) NATIVE(527);

Casts a line segment from the from point to the to point against the map's collision polygons, skipping polygons whose ignore bits overlap ignore_mask, and also against treasure boxes when check_boxes is 1. Here hit is the index of the nearest polygon hit or -1 for none, and kind is that polygon's area kind. The outputs depend on the argument count: 9 writes hit; 10 writes hit, kind; 12 writes hit x, y, z, hit; 13 adds kind; 15 writes hit x, y, z, the normalized reflection direction x, y, z, then hit; 16 adds kind.

Original name: _CHK_INTERSECTION_POINT.

set_follow_pos

extern void set_follow_pos(float x, float y, float z) NATIVE(528);

Sets the world point the active follow camera looks at and trails. The camera moves toward it as it steps, with the follow offset added on top.

Original name: _SET_FCAMERA_FOLLOW.

set_follow_pos_a

extern void set_follow_pos_a(float x, float y, float z) NATIVE(529);

Sets the world point the active follow camera looks at and trails. The code is identical to set_follow_pos.

Original name: _SET_FCAMERA_FOLLOW_A.

set_follow_offset

extern void set_follow_offset(float x, float y, float z) NATIVE(530);

Sets an offset in world units that the active follow camera adds to its follow point.

Original name: _SET_FCAMERA_FOLLOW_OFS.

set_camera_follow

extern void set_camera_follow(int on) NATIVE(531);

Turns following on (1) or off (any other value) for the active follow camera. While off, the camera stays where it is.

Original name: _SET_FCAMERA_FOLLOW_FLAG.

step_follow_camera

extern void step_follow_camera(int frames) NATIVE(532);

Advances the active follow camera by a number of frames toward its follow point and target angle. A negative value snaps it there at once.

Original name: _FCAMERA_STEP.

set_follow_angle

extern void set_follow_angle(float angle) NATIVE(533);

Sets the angle in radians around the follow point that the active follow camera turns toward. The camera eases to it as it steps.

Original name: _SET_FCAMERA_ANGLE.

set_follow_height

extern void set_follow_height(float height) NATIVE(534);

Sets how far above the follow point the active follow camera sits, in world units.

Original name: _SET_FCAMERA_HEIGHT.

set_follow_distance

extern void set_follow_distance(float distance) NATIVE(535);

Sets how far the active follow camera stays from its follow point, in world units.

Original name: _SET_FCAMERA_DIST.

get_direction_angle

extern void get_direction_angle(float from_x, float from_y, float from_z, float to_x, float to_y, float to_z, float *yaw, OPTIONAL(float *rot_y, float *rot_z)) NATIVE(536);

Computes the direction from the first point to the second. With 7 arguments the last receives the yaw in radians, atan2(dx, dz). With 9 arguments the last three receive a rotation of pitch, yaw and 0.

Original name: _GET_REF_ANGLE.

set_dungeon_stage

extern void set_dungeon_stage(int stage) NATIVE(537);

Stores a stage number in the dungeon record of the save data.

Original name: _DNG_SET_STAGE_ID.

get_dungeon_stage

extern int get_dungeon_stage(void) NATIVE(538);

Returns the stage number stored in the dungeon record of the save data.

Original name: _DNG_GET_STAGE_ID.

set_camera_control

extern void set_camera_control(int on) NATIVE(539);

Turns the player's camera control on or off for the active camera. Nonzero enables both following and pad control; 0 disables both so a script can drive the camera.

Original name: _SET_CAMERA_CTRL.

get_follow_angle

extern float get_follow_angle(void) NATIVE(540);

Returns the current angle in radians of the active follow camera around its follow point.

Original name: _GET_FCAMERA_ANGLE.

get_follow_height

extern float get_follow_height(void) NATIVE(541);

Returns the height of the active follow camera above its follow point, in world units.

Original name: _GET_FCAMERA_HEIGHT.

get_follow_distance

extern float get_follow_distance(void) NATIVE(542);

Returns the distance of the active follow camera from its follow point, in world units.

Original name: _GET_FCAMERA_DIST.

find_invention_index

extern int find_invention_index(item_id item) NATIVE(543);

Looks up an item in the list of inventions the player has made. Returns its position in that list, or -1 when it has not been invented.

Original name: _GET_INVENTION_ID.

run_pending_map_jump

extern void run_pending_map_jump(void) NATIVE(544);

Carries out the map jump stored on the scene when one is pending: it leaves the current interior when the stored target is the exit name, otherwise it enters the named interior map. Fails when no jump is pending.

Original name: _FUNCTION_MAP_JUMP.

start_door_mode

extern void start_door_mode(void) NATIVE(545);

Hands control to the door sequence for the door the scene last touched, passing that door's place numbers, position and facing angle.

Original name: _FUNCTION_DOOR_MODE.

get_money

extern int get_money(void) NATIVE(546);

Returns how much money the player has.

Original name: _GET_MONEY.

add_money

extern void add_money(int amount) NATIVE(547);

Adds money to the player's purse. A negative amount takes money away.

Original name: _ADD_MONEY.

get_item_count

extern int get_item_count(item_id item) NATIVE(548);

Returns how many of an item the player holds.

Original name: _GET_ITEM_NUM.

check_button_pressed

extern int check_button_pressed(enum check_button button) NATIVE(549);

Checks whether a pad button went down this frame. button 0 is cancel and 1 is confirm (cross and circle, swapped for Japanese), 2 is square and 3 is select. Returns 1 or 0.

Original name: _CHECK_BUTTON.

get_language

extern int get_language(void) NATIVE(550);

Returns the game language: 0 Japanese, 1 English, 2 French, 3 German, 4 Italian, 5 Spanish.

Original name: _GET_LANGUAGE.

check_invention_ideas

extern int check_invention_ideas(item_id item) NATIVE(551);

Checks whether the player has the three ideas an invention item needs, from photos or memo entries. Returns 1 when all three are present, else 0.

Original name: _CHECK_INVENT_ITEM.

set_villager_ai

extern void set_villager_ai(int on, int chara) NATIVE(552);

Lets a registered villager move on its own again (on = 1) or holds it in place (on = 0). chara is the scene character slot the villager was registered in.

Original name: _SET_AI.

count_photos_of

extern void count_photos_of(int subject, enum photo_subject_kind kind, OPTIONAL(int *count)) NATIVE(553);

Counts the photos in the player's photo slots that show a subject. Called as (subject, &count) the subject is an idea number; with three arguments kind picks what subject means: 0 idea number, 2 NPC number, 3 monster number.

Original name: _CHECK_INVENT_PHOTO.

get_photo_count

extern int get_photo_count(void) NATIVE(554);

Returns how many photo slots hold a photo.

Original name: _GET_PHOTO_NUM.

set_contents_misc

extern void set_contents_misc(void) NATIVE(555);

Does nothing.

Original name: _SET_CONTENTS_ETC.

set_scene_status

extern void set_scene_status(enum scene_data_kind kind, int index, OPTIONAL(enum scene_status bits, int on)) NATIVE(556);

Sets or clears status bits on a scene entry. kind picks the list: 1 character, 2 map, 3 message, 4 camera, 6 or 7 game object; on defaults to 1, and 0 clears the bits instead. bits is always read, so a two-argument call reads a stray stack value.

Original name: _SET_STATUS.

start_subgame

extern void start_subgame(enum subgame_type type) NATIVE(557);

Starts a minigame: 1 fishing, 2 fish race, 3 buggy game.

Original name: _GOTO_SUBGAME.

VM_ARGS

extern void set_fish_race_value VM_ARGS(enum gyorace_set_command command, OPTIONAL(any value, int name_slot, int entry)) NATIVE(558);

Sets fish race state by command: 0 aquarium number, 1 ranking, 2 class, 3 race progress, each from value; 4 adds 1 to the tournament count; 7 reloads the race prizes. Commands 5 and 6 are called as (command, message, name_slot, entry) and copy that race entry's fish name (5) or race time as mm:ss:hh text (6) into the message's name slot, counted from 1.

Original name: _SET_GYORACE_ETC.

VM_ARGS

extern void get_fish_race_value VM_ARGS(enum gyorace_get_command command, any value, OPTIONAL(int place, int *prize_item, int *prize_count)) NATIVE(559);

Reads fish race state into value by command: 0 aquarium number, 1 ranking, 2 class, 3 race progress, 5 tournament count. Command 4 is called as (4, race, place, &prize_item, &prize_count) and reads the prize for a place counted from 1.

Original name: _GET_GYORACE_ETC.

set_save_value

extern void set_save_value(enum save_set_command command, OPTIONAL(int value, int unused)) NATIVE(560);

Changes save data by command: 0 sets the game progress to value; 1 unlocks the badge of monster value; 2 repairs every ridepod part and refills its energy; 3 sets a flag that makes the next load_bgm do nothing; 4 removes the first electric fish from the aquarium. A third argument is ignored.

Original name: _SET_SAVEDATA_ETC.

VM_ARGS

extern void get_save_value VM_ARGS(enum save_get_command command, any value, OPTIONAL(int *result)) NATIVE(561);

Reads save data into value by command: 0 game progress, 2 whether the first aquarium tank holds an electric fish, 4 play time in frames, 5 the caption-off setting, 6 the current fishing tournament kind. Commands 1 and 3 are called as (command, input, &result): 1 gives whether the badge of monster input is unlocked, 3 the bait item on fishing rod input.

Original name: _GET_SAVEDATA_ETC.

VM_ARGS

extern void clear_monsters VM_ARGS(any unused) NATIVE(562);

Removes every dungeon monster and clears ridepod projectiles, then resets monster memory, collision, effects, monster textures and the monster sound port. The argument is not read; the disc passes -1.

Original name: _DEL_MONSTER.

VM_ARGS

extern void set_menu_value VM_ARGS(enum menu_set_command command, OPTIONAL(any arg1, any arg2, any arg3)) NATIVE(563);

Menu helpers by command: 0 (prompt, answer, code) sets the text a name entry checks against; 1 clears fish fatigue and ends the current fishing tournament; 3 shows (1) or hides (0) the Geostone parts announcement; 4 resets the loading bar; 5 (stack, town) builds a town's Geostone announcement in a scene memory stack and starts the download effect; 7 clears the announcement. Commands 2 and 6 do nothing.

Original name: _SET_MENU_ETC.

VM_ARGS

extern void get_menu_value VM_ARGS(enum menu_get_command command, any value, OPTIONAL(void *value2)) NATIVE(564);

Menu queries by command, written to value: 0 floors with a cleared spheda challenge, 1 the town square event type, 3 scoops newly marked known, 4 scoops newly marked obtained, 8 1 once the Geostone download effect has ended. 2 (fish, &size) gives a fish's record size; 5 (&obtained, &total) the scoop totals; 6 (&count, &status) Donny's shop lineup count and status; 7 (confirm, &done) steps the Geostone announcement and gives 1 when it has ended.

Original name: _GET_MENU_ETC.

get_analysis_flag

extern int get_analysis_flag(int analysis_id) NATIVE(565);

Checks one town analysis entry. analysis_id is town * 100 + entry, with towns counted from 1, and the result is whether all of the entry's conditions hold.

Original name: _GET_ANALYZE.

get_town_percent

extern int get_town_percent(int town) NATIVE(566);

Returns a town's Georama completion percentage, the sum of the percent of every analysis entry that is met. town counts from 0.

Original name: _GET_DIORAMA_PERCENT.

VM_ARGS

extern void run_georama_command VM_ARGS(int command, OPTIONAL(any value)) NATIVE(567);

Georama helpers by command: 1 (slot) loads the current villager's model into that character slot at the town's start point; 2 reloads the NPC living in the placed house into slot 8; 3 (&can_burn) gives whether any placed part can burn.

Original name: _GEORAMA_FUNC.

find_chara_slot

extern int find_chara_slot(int chara_no) NATIVE(568);

Searches scene character slots 8 to 63 for the character with this number. Returns the slot, or -1 when none matches.

Original name: _GET_CHARA_ID.

load_monster_talk_file

extern void load_monster_talk_file(void) NATIVE(569);

Starts a background load of the current dungeon's monster talk message file in the current language.

Original name: _SET_LOADBG_FILE_MONS_TALK.

load_monster_talk_message

extern void load_monster_talk_message(int message, enum memory_stack stack) NATIVE(570);

Copies the loaded monster talk file into a message window's text data, allocating from a scene memory stack. Use after load_monster_talk_file has finished loading.

Original name: _LOAD_MES_MONS_TALK.

VM_ARGS

extern void start_georama_mode VM_ARGS(any unused) NATIVE(571);

Leaves the event for Georama edit mode. The argument is not read.

Original name: _GOTO_EDITMODE.

get_chapter

extern int get_chapter(void) NATIVE(572);

Returns the story chapter derived from the game progress: 0 below progress 2, 1 at progress 2 or 3, otherwise progress minus 2.

Original name: _GET_CHAPTER.

get_npc_train_value

extern int get_npc_train_value(int column, int npc) NATIVE(573);

Returns a value from a built-in table of NPC train data. npc picks the row, counted from 1, and column the value; scripts use column 1 for a seat and 2 for an x offset.

Original name: _GET_NPC_TRAIN_ETC.

register_villager

extern void register_villager(chara_slot slot, npc_id villager, OPTIONAL(int place)) NATIVE(574);

Registers a villager in a scene character slot. With a place number it starts at that villager place's position and facing; without, a blank place is allocated from scene memory stack 4.

Original name: _REGISTER_VILLAGER.

set_eye_view_parts

extern void set_eye_view_parts(int on) NATIVE(575);

Switches between two named part groups on the active maps for the first-person view. Nonzero shows the first group and hides the second; 0 does the reverse.

Original name: _EYE_VIEW_DRAW_ON_OFF.

set_quest_state

extern void set_quest_state(enum quest_set_command command, int quest, int flag) NATIVE(576);

Changes a quest request by command: 0 sets its accepted flag to flag, 1 marks it cleared and ignores flag.

Original name: _SET_QUEST_ETC.

get_quest_state

extern int get_quest_state(enum quest_get_command command, int quest) NATIVE(577);

Returns a quest request's state; command must be 0. The result is -1 invalid, 0 not taken, 1 accepted, 2 cleared.

Original name: _GET_QUEST_ETC.

check_pipe_hit

extern void check_pipe_hit(int ignore_mask, float from_x, float from_y, float from_z, float to_x, float to_y, float to_z, float radius, int check_boxes, void *result1, OPTIONAL(void *result2, void *result3, void *result4, void *result5, void *result6, void *result7, void *result8)) NATIVE(578);

Like check_line_hit but sweeps a pipe of the given radius from the from point to the to point, collecting up to 16 hits. Here hit is the number of hits and the position, reflection and kind come from the first. The outputs depend on the argument count: 10 writes hit; 11 writes hit, kind; 13 writes hit x, y, z, hit; 14 adds kind; 16 writes hit x, y, z, reflection x, y, z, hit; 17 adds kind.

Original name: _CHK_INTERSECTION_POINT_PIPE.

get_last_interior_map

extern int get_last_interior_map(void) NATIVE(579);

Returns the number of the interior map the player last left, or -1 while still inside an interior.

Original name: _GET_OLD_INTERIOR_MAP_NO.

set_event_data

extern void set_event_data(enum event_data_field field, int value) NATIVE(581);

Writes one field of the scene's current event data: 0 flag, 1 event number, 2 point number, 3 to 5 event arguments 1 to 3, 6 map event check type, 7 map event number, 13 character slot, 14 character number.

Original name: _SET_EVENT_DATA.

run_stopwatch

extern void run_stopwatch(enum stopwatch_command command, OPTIONAL(void *value1, void *value2, void *value3, int *value4)) NATIVE(582);

Stopwatch by command: 0 starts timing against the play time; 1 stops it and writes minutes, seconds, hundredths, and 1 when under 7261 frames, or -1 into value1 if it was never started. 2 (frames) sets the time limit; 3 (x, y, style) sets the screen position and display style.

Original name: _STOPWATCH.

request_edit_event

extern void request_edit_event(enum edit_event_command command) NATIVE(583);

Asks the event loop to act on the town's edit event: 0 sets a scene map flag and restarts it, 1 resets it.

Original name: _SET_FUNC_ETC.

VM_ARGS

extern void get_fishing_tournament_value VM_ARGS(enum fish_tour_get_command command, any value, OPTIONAL(int *prize_item, int *prize_count)) NATIVE(584);

Fishing tournament queries by command: 0 (message) writes the top-ten record table into a message window; 2, 3 and 4 write the free entry places, the total weight of the three heaviest fish, and the rank into value. 1 is called as (1, place, &prize_item, &prize_count) and reads the prize for a place counted from 1.

Original name: _GET_FISHINGTOURNAMENT_ETC.

set_chara_draw_distance

extern void set_chara_draw_distance(chara_slot chara, float distance) NATIVE(585);

Sets the camera distance beyond which a character is not drawn, in world units, on the character and all its linked parts.

Original name: _SET_CHARA_FAR_DIST.

set_chara_lighting

extern void set_chara_lighting(chara_slot chara, int on, OPTIONAL(string frame_name)) NATIVE(586);

Turns scene lighting on or off for a character's model, or for one named frame of it. Off draws it flat with neutral color 128.

Original name: _SET_MODEL_LIGHT_SWITCH.

set_chara_flat_color

extern void set_chara_flat_color(chara_slot chara, float r, float g, float b, float a, OPTIONAL(string frame_name)) NATIVE(587);

Sets the flat color of a character's model, or of one named frame of it. Each channel runs 0 to 255 with 128 as neutral.

Original name: _SET_MODEL_LIGHT_COLOR.

get_extra_mode

extern int get_extra_mode(void) NATIVE(588);

Returns the extra mode flag, nonzero while a bonus mode started from the title screen is being played.

Original name: _GET_OMAKE_FLAG.

set_wind

extern void set_wind(float power, OPTIONAL(float dir_x, float dir_y, float dir_z)) NATIVE(589);

Sets the scene wind used by swinging model parts, as a strength and a direction vector that is normalized. A negative power removes the wind, and the direction can then be left out.

Original name: _SET_WIND.

set_extra_mode

extern void set_extra_mode(int flag) NATIVE(590);

Sets the extra mode flag that marks a bonus mode started from the title screen.

Original name: _SET_OMAKE_FLAG.

reset_sound_port

extern void reset_sound_port(enum snd_port port) NATIVE(600);

Stops every sound on a sound port and reinitializes it. Ports: 0 music, 1 objects, 2 ambient, 3 base map, 4 event, 5 monsters, 6 system, 8 menu, 9 battle, 11 second music.

Original name: _SND_INIT_PORT.

VM_ARGS

extern void load_sound VM_ARGS(enum snd_port port, any file, OPTIONAL(int *sound_id)) NATIVE(601);

Loads a sound bank onto a port and gives its sound id. Called as (port, file, &sound_id) or as (file, &sound_id) for port 4; file is a path string, or an int sound data number whose event sound file is used. Port 8 uses the second event sound buffer.

Original name: _SND_LOAD_SOUND.

play_se

extern void play_se(int sound_id, int se_no, OPTIONAL(int volume, int pan)) NATIVE(602);

Plays sound effect se_no from a loaded sound bank. volume runs 0 to 127 and pan 0 to 127 with 64 centered; without them the bank defaults are used.

Original name: _SND_SE_PLAY.

get_sound_id

extern void get_sound_id(enum se_bank bank, int *sound_id, OPTIONAL(int *source_sound_id)) NATIVE(603);

Reads the sound id of a scene sound bank: 0 ambient, 1 to 3 base map, 4 battle. Bank 5 is called as (5, source_no, &source_sound_id) for a sound source; with one argument the id of the last loaded sound is written.

Original name: _GET_SND_ID.

pause_se

extern void pause_se(int sound_id, int se_no) NATIVE(604);

Pauses sound effect se_no of a loaded sound bank.

Original name: _SND_SE_PAUSE.

stop_se

extern void stop_se(int sound_id, int se_no) NATIVE(605);

Stops sound effect se_no of a loaded sound bank.

Original name: _SND_SE_STOP.

VM_ARGS

extern void set_se_volume VM_ARGS(int sound_id, int se_no, any volume) NATIVE(606);

Sets the volume of a playing sound effect. An int is an absolute volume from 0 to 127; a float scales the effect's default volume, capped at 127.

Original name: _SND_SET_SE_VOL.

set_se_pan

extern void set_se_pan(int sound_id, int se_no, int pan) NATIVE(607);

Sets the pan of sound effect se_no in a sound bank, 0 to 127 with 64 centered.

Original name: _SND_SET_SE_PAN.

set_se_pitch

extern void set_se_pitch(int sound_id, int se_no, int pitch) NATIVE(608);

Sets the pitch of sound effect se_no in a sound bank.

Original name: _SND_SET_SE_PITCH.

stop_all_se_on_port

extern void stop_all_se_on_port(enum snd_port port) NATIVE(609);

Stops every sound effect on a sound port; -1 stops all ports except music.

Original name: _SND_SE_ALL_STOP.

load_bgm

extern void load_bgm(bgm_file bgm_file) NATIVE(610);

Loads a music file by number into the scene's music slot. Does nothing when that file is already loaded, or once after set_save_value command 3 set the skip flag.

Original name: _LOAD_BGM.

play_bgm

extern void play_bgm(int track, OPTIONAL(int volume)) NATIVE(611);

Plays a track of the loaded music file, stopping the previous one; scripts use track 0. volume runs 0 to 127, and -1 or leaving it out uses the default.

Original name: _PLAY_BGM.

stop_bgm

extern void stop_bgm(int track) NATIVE(612);

Stops a track of the loaded music file.

Original name: _STOP_BGM.

VM_ARGS

extern void open_stream VM_ARGS(enum stream_channel channel, any voice, OPTIONAL(string base_name)) NATIVE(613);

Starts opening the event voice stream. An int voice is a voice number found in the voice packs and a string is a stream file name; with three arguments voice is a pack name and base_name a file inside it. The channel is not used; poll check_stream_busy until it finishes.

Original name: _STREAM_OPEN.

play_stream

extern void play_stream(enum stream_channel channel, OPTIONAL(int volume)) NATIVE(614);

Plays the opened event voice stream. Without a volume the maximum stream volume is used; the volume is lowered by the current reverb depth. The channel is not used.

Original name: _STREAM_PLAY.

stop_stream

extern void stop_stream(enum stream_channel channel) NATIVE(615);

Stops and closes the event voice stream. The channel is not used.

Original name: _STREAM_STOP.

prepare_stream

extern void prepare_stream(enum stream_channel channel) NATIVE(616);

Sets up the opened event voice stream for mono or stereo and starts preloading it. The channel is not used.

Original name: _STREAM_STANDBY.

attach_camera_to_actor

extern void attach_camera_to_actor(int actor, float ofs_x, float ofs_y, float ofs_z, float angle, float height, float distance, OPTIONAL(string frame_name, enum scene_cmr_sync_mode mode)) NATIVE(617);

Queues a camera sequence command that keeps the camera orbiting an actor at the actor's position plus the offset, at an angle in radians, a height and a distance in world units. frame_name follows that frame of the model instead (empty for the actor itself); mode 0 keeps the angle fixed, 1 turns with the actor's heading, 2 follows the frame's full orientation.

Original name: _CMRS_SYNC_OBJ.

detach_camera_from_actor

extern void detach_camera_from_actor(void) NATIVE(618);

Queues a camera sequence command that stops the camera orbiting an actor.

Original name: _CMRS_RELEASE_OBJ.

get_stream_status

extern int get_stream_status(enum stream_channel channel) NATIVE(619);

Returns the state of the event voice stream, 0 when it is idle or finished. The channel is not used.

Original name: _STREAM_GET_STATUS.

get_system_sound_id

extern int get_system_sound_id(void) NATIVE(620);

Returns the sound id of the system sound bank, for use with play_se.

Original name: _GET_SYS_SND_ID.

check_stream_busy

extern int check_stream_busy(void) NATIVE(621);

Checks whether a stream request is still in progress. Returns nonzero until open_stream or prepare_stream has finished.

Original name: _STREAM_OPEN_CHECK.

load_env_sound

extern void load_env_sound(int bank) NATIVE(622);

Loads an ambient sound bank by number, unless it is already loaded.

Original name: _LOAD_SE_ENV.

play_env_sound

extern void play_env_sound(int se_no, OPTIONAL(float volume)) NATIVE(623);

Plays an ambient loop from the ambient sound bank, stopping the previous one. -1 switches back to the automatic ambient sound at full volume. volume is truncated to a whole number, so only 0 and 1 are useful.

Original name: _PLAY_ENV_BGM.

play_system_se

extern void play_system_se(system_se se_no) NATIVE(624);

Plays a sound effect from the system sound bank. Negative numbers do nothing.

Original name: _SYS_SE_PLAY.

reset_source_sounds

extern void reset_source_sounds(void) NATIVE(625);

Stops and unloads all positional sound sources and resets the event and object sound ports.

Original name: _INIT_SE_SRC.

reset_env_sounds

extern void reset_env_sounds(void) NATIVE(626);

Stops the ambient loop, unloads the ambient sound bank and resets the sound sources.

Original name: _INIT_SE_ENV.

reset_base_sounds

extern void reset_base_sounds(void) NATIVE(627);

Stops and unloads the base map sound bank and the battle sound bank.

Original name: _INIT_SE_BAS.

load_source_sound

extern void load_source_sound(int bank) NATIVE(628);

Loads a positional sound source bank by number, unless it is already loaded.

Original name: _LOAD_SE_SRC.

load_footstep_sound

extern void load_footstep_sound(void) NATIVE(629);

Does nothing and reports failure.

Original name: _LOAD_SE_FOOT.

load_door_sound

extern void load_door_sound(void) NATIVE(630);

Does nothing and reports failure.

Original name: _LOAD_SE_DOOR.

load_box_sound

extern void load_box_sound(void) NATIVE(631);

Does nothing and reports failure.

Original name: _LOAD_SE_BOX.

load_battle_sound

extern void load_battle_sound(int bank) NATIVE(632);

Loads a battle sound bank by number, unless it is already loaded.

Original name: _LOAD_SE_BATTLE.

delete_sound_port

extern void delete_sound_port(enum snd_port port) NATIVE(633);

Releases a sound port in the sound driver, freeing what was loaded on it, and reinitializes the port.

Original name: _SND_DELETE_PORT.

stop_env_sound

extern void stop_env_sound(void) NATIVE(634);

Stops the ambient loop.

Original name: _STOP_ENV_BGM.

fade_in_bgm

extern void fade_in_bgm(int frames) NATIVE(635);

Fades the music in from silence over a number of frames.

Original name: _FADE_IN_BGM.

fade_out_bgm

extern void fade_out_bgm(int frames) NATIVE(636);

Fades the music out over a number of frames.

Original name: _FADE_OUT_BGM.

VM_ARGS

extern void set_bgm_volume VM_ARGS(any volume) NATIVE(637);

Sets the volume of the playing music. An int sets it directly (0 to 127, negative restores the bank's default volume); a float multiplies the current volume by that factor.

Original name: _SET_BGM_VOL.

set_sound_reverb

extern void set_sound_reverb(void) NATIVE(638);

Does nothing and reports failure. The engine leaves this native empty.

Original name: _SND_SET_REVERB.

set_env_bgm_volume

extern void set_env_bgm_volume(float volume) NATIVE(639);

Sets the volume of the map's ambient environment sound loop, as a factor from 0.0 to 1.0.

Original name: _SND_SET_ENV_VOL.

check_stream_audible

extern int check_stream_audible(enum stream_channel channel) NATIVE(640);

Reads the output level of the event stream and returns 1 when either channel is outside -10 to 10, 0 when both are near silence. The channel argument is ignored; the event stream is always used.

Original name: _STREAM_SILENT_CHECK.

set_env_bgm_auto

extern void set_env_bgm_auto(int on) NATIVE(641);

Turns on (1) or off (0) the environment sound following the time band of the map.

Original name: _AUTO_CHANGE_ENV.

skip_next_bgm_load

extern void skip_next_bgm_load(void) NATIVE(642);

Makes the next scene music load be skipped once, keeping the music already loaded. The flag clears itself when used.

Original name: _BGM_LOAD_CANCEL.

skip_next_sound_load

extern void skip_next_sound_load(void) NATIVE(643);

Makes the next sound set load (load_sound_set or a map change) be skipped once. The flag clears itself when used.

Original name: _SOUND_LOAD_CANCEL.

allow_bgm_load

extern void allow_bgm_load(void) NATIVE(644);

Clears the flag set by skip_next_bgm_load so the next music load happens normally.

Original name: _BGM_LOAD_ENABLE.

allow_sound_load

extern void allow_sound_load(void) NATIVE(645);

Clears the flag set by skip_next_sound_load so the next sound set load happens normally.

Original name: _SOUND_LOAD_ENABLE.

load_se_base

extern void load_se_base(int bank_no) NATIVE(646);

Loads the base sound effect bank with the given number, unless that bank is already loaded or the number is negative. Reports failure in those cases.

Original name: _LOAD_SE_BASE.

load_sound_set

extern void load_sound_set(sound_set sound_data_id) NATIVE(647);

Loads everything listed for a sound data id: the base, battle, environment and source effect banks, the reverb setting and the environment sound loop. Banks already loaded are kept. Skipped once after skip_next_sound_load.

Original name: _LOAD_SOUND.

close_stream

extern void close_stream(enum stream_channel channel) NATIVE(648);

Stops and closes the event stream, restoring its saved volume. The channel argument is ignored; the event stream is always used.

Original name: _STREAM_CLOSE.

open_stream_named

extern void open_stream_named(enum stream_channel channel, string file_name) NATIVE(649);

Marks the event stream as reading from a file name, but the engine only builds the path and never opens the file. The channel argument is ignored.

Original name: _STREAM_OPEN2.

load_bgm_pack

extern void load_bgm_pack(bgm_file bgm_no) NATIVE(650);

Makes the given music number the loaded music pack, taking the file from the preloaded background buffers. Does nothing when that number is already loaded or negative, and fails when the file was not preloaded.

Original name: _LOAD_BGM_PACK.

VM_ARGS

extern int get_bgm_no VM_ARGS(...) NATIVE(651);

Returns the number of the currently loaded music pack.

Original name: _GET_BGM_NO.

get_bgm_master_volume

extern float get_bgm_master_volume(void) NATIVE(652);

Returns the master volume factor of the active music channel.

Original name: _GET_MASTER_VOL.

set_bgm_master_volume

extern void set_bgm_master_volume(float volume) NATIVE(653);

Sets the master volume factor of the active music channel and reapplies the music volume. 1.0 is normal.

Original name: _SET_MASTER_VOL.

get_battle_bgm_volume

extern float get_battle_bgm_volume(void) NATIVE(654);

Returns the volume the dungeon battle music is played at.

Original name: _GET_BTL_BGM_VOL.

set_battle_bgm_volume

extern void set_battle_bgm_volume(float volume) NATIVE(655);

Sets the volume the dungeon battle music is played at.

Original name: _SET_BTL_BGM_VOL.

set_reverb_input

extern void set_reverb_input(int on) NATIVE(656);

Sets a sound processor parameter on both cores that the menus also use when switching reverb: nonzero on sets it to -4, 0 sets it to -52.

Original name: _SND_IN_REVERB.

stop_source_se

extern void stop_source_se(void) NATIVE(657);

Stops every sound effect still playing from the scene's loaded source effect banks.

Original name: _SND_STOP_SRC.

pause_bgm

extern void pause_bgm(void) NATIVE(658);

Pauses the music playing on the active music channel.

Original name: _SND_PAUSE_BGM.

open_stream_wav

extern void open_stream_wav(enum stream_channel channel, int stream_no) NATIVE(659);

Opens the numbered stream file (number printed as seven digits plus .wav, such as 5400015.wav) on the event stream for playback. The channel argument is ignored; the event stream is always used.

Original name: _STREAM_OPEN3.

save_bgm_status

extern void save_bgm_status(int unused) NATIVE(660);

Saves the active music's state (playing, paused or stopped, track, volumes, loaded pack) into a single save slot that restore_bgm_status reads. The argument is ignored.

Original name: _GET_ACTIVE_BGM_STATUS.

restore_bgm_status

extern void restore_bgm_status(int unused) NATIVE(661);

Restores the music state saved by save_bgm_status: track, volumes, and whether it plays, is paused or is stopped. The argument is ignored.

Original name: _SET_ACTIVE_BGM_STATUS.

get_saved_bgm_no

extern int get_saved_bgm_no(void) NATIVE(662);

Returns the music pack number stored by the last save_bgm_status.

Original name: _GET_BGM_STATUS_NOW_NO.

get_se_status

extern int get_se_status(int sound_id, int se_no) NATIVE(663);

Returns the playback state of a sequence sound: 0 stopped, 1 playing, 2 paused, 3 port paused, or -1 when the sound id or number is invalid or the sound is not a sequence.

Original name: _GET_SE_STATUS.

stop_all_se

extern void stop_all_se(void) NATIVE(664);

Stops every sound effect, including source effects and looping effects, and resets the looping effect manager.

Original name: _SE_ALL_STOP.

stop_all_sound

extern void stop_all_sound(void) NATIVE(665);

Stops the music, resets the music channel and stops every sound effect.

Original name: _SOUND_ALL_STOP.

skip_next_bgm_play

extern void skip_next_bgm_play(void) NATIVE(666);

Makes the next music play request be ignored once. The flag clears itself when used.

Original name: _BGM_PLAY_CANCEL.

allow_bgm_play

extern void allow_bgm_play(void) NATIVE(667);

Clears the flag set by skip_next_bgm_play so the next music play request happens normally.

Original name: _BGM_PLAY_ENABLE.

VM_ARGS

extern int get_map_default_bgm VM_ARGS(map_id map) NATIVE(668);

Returns the default music number of a map's sound data, or -1 when it has none. Called without map, it uses the current map (or sub map when one is active).

Original name: _GET_DEF_BGM_NO.

set_movie_caption

extern void set_movie_caption(enum movie_caption_mode mode, int value, OPTIONAL(int start_frame, string text, int frames)) NATIVE(669);

Controls subtitles shown over a movie. With mode 0, value turns captions on (1) or off (0), and off clears all 18 caption slots. With mode 1, value is the slot (0 to 17) and the caption shows text from start_frame for frames frames, both NTSC frames (30 a second), which the PAL engine takes 5/6 of.

Original name: _SET_MOVIE_CC.

register_villager_here

extern void register_villager_here(chara_slot chara, int villager_slot, enum memory_stack memory_stack) NATIVE(670);

Registers a scene character as a town villager in the given villager slot, using the character's current position and facing as its home spot. The spot record is allocated from the numbered scene memory stack.

Original name: _REGISTER_VILLAGER2.

set_fishing_tournament

extern void set_fishing_tournament(enum fish_tour_set_command command, OPTIONAL(int value)) NATIVE(671);

Runs a fishing tournament command. 0 sets the tournament rank to value (kept within 0 to 100), 1 clears the recorded entries, 2 loads the tournament prize list, 3 advances the tournament counter (wrapping back to 1).

Original name: _SET_FISHINGTOURNAMENT_ETC.

bind_handle_chara

extern void bind_handle_chara(int handle, int chara) NATIVE(700);

Binds an event object handle (0 to 31) to a scene character, so the other handle natives act on it.

Original name: _EOH_SYNC_CHARA.

VM_ARGS

extern void bind_handle_map_part VM_ARGS(int handle, any part, OPTIONAL(string piece_name, string frame_name)) NATIVE(701);

Binds a handle to a placed map part of the active maps, found by number or by name. With a piece name it binds that piece of the part in local coordinates; with a frame name too it binds that frame of the piece.

Original name: _EOH_SYNC_OBJ.

set_handle_pos

extern void set_handle_pos(int handle, float x, float y, float z) NATIVE(702);

Moves the object bound to a handle to a position in world units, relative to the event's world origin when one is set. Sprites and frames take the position as given.

Original name: _EOH_SET_POS.

set_handle_rot

extern void set_handle_rot(int handle, float x, float y, OPTIONAL(float z)) NATIVE(703);

Sets the rotation of the object bound to a handle, in radians, offset by the event's world rotation for characters and world objects. Sprites use only z. The engine rejects calls with three arguments, so pass all of x, y and z.

Original name: _EOH_SET_ROT.

get_handle_pos

extern void get_handle_pos(int handle, float *x, float *y, float *z) NATIVE(704);

Writes the position of the object bound to a handle, in the event's coordinates, to x, y and z. They are left unchanged when the handle is empty.

Original name: _EOH_GET_POS.

get_handle_rot

extern void get_handle_rot(int handle, float *x, float *y, float *z) NATIVE(705);

Writes the rotation in radians of the object bound to a handle to x, y and z. They are left unchanged when the handle is empty.

Original name: _EOH_GET_ROT.

set_handle_motion

extern void set_handle_motion(int handle, string motion_name, OPTIONAL(enum chara_motion_flag flags, float step, int unused)) NATIVE(706);

Starts a named motion on the character bound to a handle. flags is a bit set: 1 pauses, 2 holds the last frame instead of looping, 4 restarts from the first frame. When step is given and not -1, the motion switches at once and plays at that many frames per tick. Calls with a fifth argument are rejected.

Original name: _EOH_SET_MOTION.

set_handle_motion_step

extern void set_handle_motion_step(int handle, float step) NATIVE(707);

Sets how many motion frames the character bound to a handle advances per tick.

Original name: _EOH_SET_STEP.

VM_ARGS

extern void set_handle_texture_anim VM_ARGS(int handle, any mode, OPTIONAL(string anim_name)) NATIVE(708);

Turns texture animations of the character bound to a handle on or off. (handle, 0) stops them all; (handle, on, name) turns the named one on or off; (handle, name) turns it on; (handle, off_name, on_name) switches from one to the other.

Original name: _EOH_SET_TEX_ANIM.

set_handle_scale

extern void set_handle_scale(int handle, float x, float y, float z) NATIVE(709);

Sets the scale of the object bound to a handle on each axis. 1.0 is normal size.

Original name: _EOH_SET_SCALE.

set_handle_visible

extern void set_handle_visible(int handle, int visible) NATIVE(710);

Shows (1) or hides (0) the character or map object bound to a handle. For a function point it enables or disables the point.

Original name: _EOH_SET_SHOW.

get_handle_visible

extern int get_handle_visible(int handle) NATIVE(711);

Returns whether the object bound to a handle is shown. The result is left unchanged when the handle is empty.

Original name: _EOH_GET_SHOW.

set_handle_frame_visible

extern void set_handle_frame_visible(int handle, string frame_name, int visible) NATIVE(712);

Shows or hides a named model frame of the character or frame bound to a handle. Any nonzero visible counts as 1.

Original name: _EOH_SET_FRAME_SHOW.

set_handle_shadow

extern void set_handle_shadow(int handle, int on) NATIVE(713);

Turns the shadow of the character bound to a handle on (1) or off (0).

Original name: _EOH_SET_SHADOW.

set_handle_translate

extern void set_handle_translate(int handle, float x, float y, float z) NATIVE(714);

Writes a translation into the root frame matrix of the character, or the local matrix of the frame, bound to a handle, offsetting the model from its position.

Original name: _EOH_SET_TRANSLATE.

bind_handle_sprite

extern void bind_handle_sprite(int handle, int sprite) NATIVE(715);

Binds a handle to an event sprite by number.

Original name: _EOH_SYNC_SPRITE.

set_handle_foot_sound

extern void set_handle_foot_sound(int handle, int foot_sound_id) NATIVE(716);

Sets the footstep sound id of the character bound to a handle.

Original name: _EOH_SET_FOOT_SOUND_ID.

set_handle_frame_draw

extern void set_handle_frame_draw(int handle, string frame_name, int draw) NATIVE(717);

Writes a raw draw value into a named model frame of the character or frame bound to a handle. 0 hides the frame.

Original name: _EOH_SET_FRAME_STATUS.

get_handle_frame_pos

extern void get_handle_frame_pos(int handle, string frame_name, float *x, float *y, float *z) NATIVE(718);

Writes the world position of a named model frame of the character bound to a handle, in the event's coordinates, to x, y and z. They are left unchanged when the frame is not found.

Original name: _EOH_GET_FRAME_POS.

set_handle_se_bank

extern void set_handle_se_bank(int handle, int sound_id) NATIVE(719);

Sets the sound effect bank id that the character bound to a handle plays its motion sounds from.

Original name: _EOH_SET_SOUND_ID.

get_handle_frame_draw

extern int get_handle_frame_draw(int handle, string frame_name) NATIVE(720);

Returns the draw value of a named model frame of the character or frame bound to a handle, or 0 when the frame is not found.

Original name: _EOH_GET_FRAME_STATUS.

bind_handle_chara_frame

extern void bind_handle_chara_frame(int handle, int chara, string frame_name) NATIVE(721);

Binds a handle to a named model frame inside a scene character, so it can be moved, rotated or hidden on its own.

Original name: _EOH_SYNC_CHROBJ.

set_handle_fade_flag

extern void set_handle_fade_flag(int handle, int flag) NATIVE(722);

Sets the fade flag of the character bound to a handle.

Original name: _EOH_SET_FADE_FLAG.

reset_handle_dynamics

extern void reset_handle_dynamics(int handle) NATIVE(723);

Updates the position of the character bound to a handle, resets its dynamic animation parts (swinging pieces such as hair or cloth) to rest, then steps them 10 times. Used after teleporting a character.

Original name: _EOH_RESET_DA_POSITION.

set_handle_shadow_draw

extern void set_handle_shadow_draw(int handle, string frame_name, int draw) NATIVE(724);

Writes a raw draw value into a named frame of the shadow model of the character bound to a handle. 0 hides it.

Original name: _EOH_SET_SHADOW_FRAME_STATUS.

bind_handle_geostone

extern void bind_handle_geostone(int handle) NATIVE(725);

Binds a handle to the dungeon geostone object.

Original name: _EOH_SYNC_GEOSTONE.

bind_handle_named_chara

extern void bind_handle_named_chara(int handle, int unused, string chara_name) NATIVE(726);

Binds a handle to the character with the given name among the player's linked characters. The second argument is ignored.

Original name: _EOH_SYNC_SEARCH_CHARA.

apply_handle_motion

extern void apply_handle_motion(int handle) NATIVE(727);

Applies the pending motion change of the character bound to a handle at once instead of waiting for the next update.

Original name: _EOH_NORMAL_DRIVE.

VM_ARGS

extern void bind_handle_edit_part VM_ARGS(int handle, any part, OPTIONAL(string piece_name, string frame_name)) NATIVE(728);

Binds a handle to a placed part of the active edit map, found by number or by name. With a piece name it binds that piece in local coordinates; with a frame name too it binds that frame of the piece.

Original name: _EOH_SYNC_EDIT_OBJ.

set_handle_frame_alpha

extern void set_handle_frame_alpha(int handle, string frame_name, float alpha) NATIVE(729);

Sets the opacity of a named model frame of the character or frame bound to a handle, from 0.0 (invisible) to 1.0.

Original name: _EOH_SET_FRAME_ALPHA.

VM_ARGS

extern void bind_handle_func_point VM_ARGS(int handle, any part, string point_name) NATIVE(730);

Binds a handle to a named function point of the active map. part picks the placed part that owns it, by number or by name; an empty name "" searches the map's own points.

Original name: _EOH_SYNC_FUNCP.

set_handle_foot_bank

extern void set_handle_foot_bank(int handle, int bank) NATIVE(731);

Sets the footstep sound effect bank of the character bound to a handle.

Original name: _EOH_SET_FOOT_SE_ID.

bind_handle_door

extern int bind_handle_door(int handle) NATIVE(732);

Binds a handle to the door part of the generated dungeon floor and returns 1 on success, 0 otherwise.

Original name: _EOH_SYNC_DOOR_PARTS.

init_sphida

extern void init_sphida(void) NATIVE(750);

Clears the sphida (dungeon golf) game state so no game exists.

Original name: _SPHIDA_INIT.

create_sphida_game

extern void create_sphida_game(enum memory_stack memory_stack, int tex_bank, OPTIONAL(int kind, int course)) NATIVE(751);

Creates a sphida game in the numbered scene memory stack and starts it. kind 0 places the pin and ball at random on the dungeon floor, 1 uses the fixed story hole, 2 sets up bonus course number course. tex_bank is the texture bank the status panel draws from.

Original name: _SPHIDA_SET_UP.

set_sphida_playing

extern void set_sphida_playing(int on) NATIVE(752);

Sets whether the sphida game runs; while 0 nothing is stepped or drawn. Fails when no sphida game exists.

Original name: _SPHIDA_SET_PLAY_FLAG.

set_sphida_map_scroll

extern void set_sphida_map_scroll(int on) NATIVE(753);

Lets the player scroll the sphida mini map while an event runs (1) or not (0). Fails when no sphida game exists.

Original name: _SPHIDA_SET_MINIMAP_FLAG.

set_sphida_line_marks

extern void set_sphida_line_marks(int on) NATIVE(754);

Shows (1) or hides (0) the shot line points on the sphida mini map. Fails when no sphida game exists.

Original name: _SPHIDA_SET_MM_LINE_FLAG.

set_sphida_line_point

extern void set_sphida_line_point(int index, float x, float y, float z) NATIVE(755);

Sets one of the 5 shot line points (index 0 to 4) marked on the sphida mini map, in world units. Indexes of 5 or more are ignored. Fails when no sphida game exists.

Original name: _SPHIDA_SET_MM_LINE_POS.

set_sphida_pin_pos

extern void set_sphida_pin_pos(float x, float y, float z) NATIVE(756);

Sets the position of the sphida pin in world units. Fails when no sphida game exists.

Original name: _SPHIDA_SET_PIN_POS.

get_sphida_pin_pos

extern void get_sphida_pin_pos(float *x, float *y, float *z) NATIVE(757);

Writes the position of the sphida pin to x, y and z. Fails when no sphida game exists.

Original name: _SPHIDA_GET_PIN_POS.

set_sphida_ball_pos

extern void set_sphida_ball_pos(float x, float y, float z) NATIVE(758);

Sets the position of the sphida ball in world units. Fails when no sphida game exists.

Original name: _SPHIDA_SET_BALL_POS.

get_sphida_ball_pos

extern void get_sphida_ball_pos(float *x, float *y, float *z) NATIVE(759);

Writes the position of the sphida ball to x, y and z. Fails when no sphida game exists.

Original name: _SPHIDA_GET_BALL_POS.

set_sphida_pin_color

extern void set_sphida_pin_color(int color) NATIVE(760);

Sets the pin colour, 0 or 1, which picks its mini map marker. Fails when no sphida game exists.

Original name: _SPHIDA_SET_PIN_COL.

get_sphida_pin_color

extern int get_sphida_pin_color(void) NATIVE(761);

Returns the pin colour (0 or 1). Fails when no sphida game exists.

Original name: _SPHIDA_GET_PIN_COL.

set_sphida_ball_color

extern void set_sphida_ball_color(int color) NATIVE(762);

Sets the ball colour, 0 or 1, which picks its mini map marker. Fails when no sphida game exists.

Original name: _SPHIDA_SET_BALL_COL.

get_sphida_ball_color

extern int get_sphida_ball_color(void) NATIVE(763);

Returns the ball colour (0 or 1). Fails when no sphida game exists.

Original name: _SPHIDA_GET_BALL_COL.

set_sphida_par

extern void set_sphida_par(int par) NATIVE(764);

Sets the shots of par left for the hole. Ignored while the debug flag is on. Fails when no sphida game exists.

Original name: _SPHIDA_SET_PAR_COUNT.

get_sphida_par

extern int get_sphida_par(void) NATIVE(765);

Returns the shots of par left for the hole (one more while the debug flag is on). Fails when no sphida game exists.

Original name: _SPHIDA_GET_PAR_COUNT.

get_sphida_map_scale

extern int get_sphida_map_scale(void) NATIVE(766);

Returns the sphida mini map scale (0 to 2, from the dungeon map setting). Fails when no sphida game exists.

Original name: _SPHIDA_GET_MINI_LEVEL.

get_sphida_tex_bank

extern int get_sphida_tex_bank(void) NATIVE(767);

Returns the texture bank the sphida status panel draws from. Fails when no sphida game exists.

Original name: _SPHIDA_GET_TEXB.

set_sphida_status_panel

extern void set_sphida_status_panel(int on) NATIVE(768);

Shows (1) or hides (0) the sphida status panel and power gauge. Fails when no sphida game exists.

Original name: _SPHIDA_SET_STATUS_FLAG.

reset_sphida_gauge

extern void reset_sphida_gauge(void) NATIVE(769);

Resets the sphida power gauge to idle: no power, cursor at rest, result code -10. Fails when no sphida game exists.

Original name: _SPHIDA_RESET_POWGAGE.

start_sphida_gauge

extern void start_sphida_gauge(void) NATIVE(770);

Starts a swing on the sphida power gauge; the cursor begins to charge. Fails when no sphida game exists.

Original name: _SPHIDA_START_POWGAGE.

press_sphida_gauge

extern void press_sphida_gauge(void) NATIVE(771);

Presses the sphida power gauge: while charging it sets the power, while running back to the impact point it stops the cursor for judging. Does nothing at other stages. Fails when no sphida game exists.

Original name: _SPHIDA_TRIGGER_POWGAGE.

get_sphida_shot_power

extern float get_sphida_shot_power(void) NATIVE(772);

Returns the power set on the sphida gauge, from 0.0 to 1.0. Fails when no sphida game exists.

Original name: _SPHIDA_GET_SHOT_POW.

get_sphida_gauge_result

extern int get_sphida_gauge_result(void) NATIVE(773);

Returns the result of the last swing: -10 no swing yet, -3 to 3 how far from the impact point the cursor stopped (0 is on it), 4 ran past without a stop, 5 ran back to empty without power set. Fails when no sphida game exists.

Original name: _SPHIDA_GET_POWGAGE_CODE.

set_sphida_safe_zone

extern void set_sphida_safe_zone(int level) NATIVE(774);

Sets the width of the accurate zone around the impact point on the sphida gauge, kept within 1 to 6. Fails when no sphida game exists.

Original name: _SPHIDA_SET_POWGAGE_SAFE_LEVEL.

get_sphida_club_stats

extern void get_sphida_club_stats(int club_no, float *power, float *extra, void *safe_level) NATIVE(775);

Writes the stats of sphida club number 9 to 14: power is the launch speed, extra is a second float the shot scripts read, and safe_level is the gauge safe zone width. Fails for other numbers.

Original name: _SPHIDA_GET_CULB_DEF.

set_sphida_spin_mark

extern void set_sphida_spin_mark(float x, float y) NATIVE(776);

Sets the spin mark on the sphida ball panel, x across and y down, each from -1.0 to 1.0. Fails when no sphida game exists.

Original name: _SPHIDA_SET_SPIN_MARK_POS.

set_sphida_club

extern void set_sphida_club(int club_no) NATIVE(777);

Sets the club the player holds in the sphida game (9 to 14). Fails when no sphida game exists.

Original name: _SPHIDA_SET_CULB_NO.

set_sphida_carry_angle

extern void set_sphida_carry_angle(float angle) NATIVE(778);

Stores the angle in radians at which the sphida ball is struck, which the status panel uses to draw the carry. Nothing is calculated here. Fails when no sphida game exists.

Original name: _SPHIDA_CALC_CARRY.

get_sphida_cursor_pos

extern void get_sphida_cursor_pos(float *x, float *y) NATIVE(779);

Writes the screen position of the sphida gauge cursor to x and y. Fails when no sphida game exists.

Original name: _SPHIDA_GET_PG_CURSOR_POS.

load_sphida_pin_collision

extern void load_sphida_pin_collision(enum memory_stack memory_stack, string model_file) NATIVE(780);

Loads the pin collision from a model file that must already be in the preloaded background buffers, allocating from the numbered scene memory stack. Fails when no sphida game exists.

Original name: _SPHIDA_SET_COL_MODEL.

get_sphida_prize

extern void get_sphida_prize(int index, int *item, int *count) NATIVE(781);

Writes the sphida prize item and its count for the current dungeon floor to item and count. index picks one of the floor's 3 prizes; values above 2 use the last.

Original name: _SPHIDA_GET_PRIZE.

set_sphida_last_challenge

extern void set_sphida_last_challenge(int on) NATIVE(782);

Marks whether the last challenge of the current spheda hole is under way (nonzero) or not (0). Fails while no spheda game is running.

Original name: _SPHIDA_SET_LAST_CHALLENGE.

get_sphida_last_challenge

extern int get_sphida_last_challenge(void) NATIVE(783);

Returns the spheda last-challenge flag set by set_sphida_last_challenge. Fails while no spheda game is running.

Original name: _SPHIDA_GET_LAST_CHALLENGE.

get_sphida_bonus_mode

extern int get_sphida_bonus_mode(void) NATIVE(784);

Returns 1 while one of the spheda bonus courses is being played, else 0. Fails while no spheda game is running.

Original name: _SPHIDA_GET_OMAKE_MODE.

set_sphida_hole

extern void set_sphida_hole(int hole) NATIVE(785);

Sets the current spheda hole number in the save data.

Original name: _SPHIDA_SET_NOW_HOLE.

get_sphida_hole

extern int get_sphida_hole(void) NATIVE(786);

Returns the current spheda hole number from the save data.

Original name: _SPHIDA_GET_NOW_HOLE.

set_sphida_score

extern void set_sphida_score(int hole, int score) NATIVE(787);

Stores a spheda score for hole 0 to 8 in the save data; hole = -1 means the current hole. Out- of-range holes are ignored.

Original name: _SPHIDA_SET_SCORE.

get_sphida_score

extern int get_sphida_score(int hole) NATIVE(788);

Returns the saved spheda score of hole 0 to 8. With hole = -1 it returns the total of all nine holes; holes above 8 give 0.

Original name: _SPHIDA_GET_SCORE.

run_mt_test

extern void run_mt_test(void) NATIVE(998);

Debug leftover that does nothing.

Original name: _MT_TEST.

VM_ARGS

extern void run_test VM_ARGS(OPTIONAL(any value)) NATIVE(999);

Debug leftover that does nothing and ignores its argument.

Original name: _TEST.

set_vector_zero

extern void set_vector_zero(float *x, float *y, float *z) NATIVE(1000);

Sets the three out variables to 0.0.

Original name: _ZERO_VECTOR.

normalize_vector

extern void normalize_vector(float *x, float *y, float *z) NATIVE(1001);

Normalizes the vector held in x, y, z in place to length 1.

Original name: _NORMAL_VECTOR.

copy_vector

extern void copy_vector(float *x, float *y, float *z, float src_x, float src_y, float src_z) NATIVE(1002);

Copies src_x, src_y, src_z into the three out variables.

Original name: _COPY_VECTOR.

add_vector

extern void add_vector(float *x, float *y, float *z, float add_x, float add_y, float add_z) NATIVE(1003);

Adds add_x, add_y, add_z to the vector held in x, y, z, in place.

Original name: _ADD_VECTOR.

subtract_vector

extern void subtract_vector(float *x, float *y, float *z, float sub_x, float sub_y, float sub_z) NATIVE(1004);

Subtracts sub_x, sub_y, sub_z from the vector held in x, y, z, in place.

Original name: _SUB_VECTOR.

scale_vector

extern void scale_vector(float *x, float *y, float *z, float scale) NATIVE(1005);

Multiplies the vector held in x, y, z by scale, in place.

Original name: _SCALE_VECTOR.

divide_vector

extern void divide_vector(float *x, float *y, float *z, float divisor) NATIVE(1006);

Divides the vector held in x, y, z by divisor, in place. Fails and leaves the vector unchanged when divisor is 0.

Original name: _DIV_VECTOR.

get_vector_length

extern float get_vector_length(float x, float y, float z) NATIVE(1007);

Returns the length of the vector x, y, z. Pass 0.0 for y to get the length on the ground plane.

Original name: _DIST_VECTOR.

get_distance

extern float get_distance(float x1, float y1, float z1, float x2, float y2, float z2) NATIVE(1008);

Returns the distance between two points, in world units.

Original name: _DIST_VECTOR2.

get_square_root

extern float get_square_root(float value) NATIVE(1009);

Returns the square root of value.

Original name: _SQRT.

get_atan2

extern float get_atan2(float y, float x) NATIVE(1010);

Returns atan2(y, x) in radians from -pi to pi. Scripts pass x then z of an offset to get a yaw angle.

Original name: _ATAN2F.

compare_angles

extern int compare_angles(float a, float b, float tolerance) NATIVE(1011);

Compares two angles in radians, wrapping their difference into -pi..pi. Returns 0 when a - b is within tolerance, 1 when it is larger and -1 when it is smaller.

Original name: _ANGLE_CMP.

wrap_angle

extern void wrap_angle(float *angle) NATIVE(1012);

Wraps the angle held in the variable into the range -pi..pi radians, in place.

Original name: _ANGLE_LIMIT.

VM_ARGS

extern void get_random VM_ARGS(any range, void *result) NATIVE(1013);

Reads a random number from 0 up to but not including range into result. A float range gives a float; an int range gives an int.

Original name: _GET_RAND.

get_segment_point_dist

extern float get_segment_point_dist(float ax, float ay, float az, float bx, float by, float bz, float px, float py, float pz) NATIVE(1014);

Returns the distance from point p to the segment from a to b, or -1.0 when p projects outside the segment.

Original name: _LINE_POINT_DIST.

create_sword_trail

extern void create_sword_trail(enum memory_stack stack_no, int capacity, int division) NATIVE(1015);

Creates the single event sword trail, a ribbon drawn between pairs of points, in the given scene memory stack. capacity is how many point pairs it keeps and division how many smoothed points are made between two pairs; both colours start at 128, 128, 128, 128.

Original name: _CREATE_SWORD_EFFECT.

delete_sword_trail

extern void delete_sword_trail(void) NATIVE(1016);

Forgets the event sword trail made by create_sword_trail so it is no longer drawn. Its memory stays in the scene stack.

Original name: _DELETE_SWORD_EFFECT.

set_sword_trail_color

extern void set_sword_trail_color(int edge_r, int edge_g, int edge_b, int edge_a, int back_r, int back_g, int back_b, int back_a) NATIVE(1017);

Sets the RGBA colour of the leading edge and of the trailing edge of the event sword trail, each 0 to 255 with 128 as neutral. Fails if no trail exists.

Original name: _SWORD_EFFECT_COLOR.

add_sword_trail_point

extern void add_sword_trail_point(float edge_x, float edge_y, float edge_z, float back_x, float back_y, float back_z, OPTIONAL(float life)) NATIVE(1018);

Records a new pair of points, the leading edge and the trailing edge, into the event sword trail. life defaults to 1.0 and drops by 0.1 each frame until the pair disappears. Does nothing if no trail exists.

Original name: _SWORD_EFFECT_ADD_POINT.

add_chara_pos

extern void add_chara_pos(chara_slot chara, float dx, float dy, float dz) NATIVE(1019);

Moves a character by an offset added to its current position, in world units.

Original name: _ADD_CHARA_POS.

add_chara_rot

extern void add_chara_rot(chara_slot chara, float rx, float ry, float rz) NATIVE(1020);

Turns a character by adding to its current rotation, in radians. Each axis is wrapped into -pi..pi.

Original name: _ADD_CHARA_ROT.

spawn_treasure_box

extern void spawn_treasure_box(float x, float y, float z, float angle, item_id item, OPTIONAL(int count)) NATIVE(1021);

Puts a treasure box in the first free slot of the dungeon at x, y, z, turned by angle radians, holding count of item number item (count defaults to 1).

Original name: _POST_TREASURE_BOX.

get_nearest_parts_pos

extern void get_nearest_parts_pos(float x, float y, float z, float radius, float *parts_x, float *parts_y, float *parts_z) NATIVE(1022);

Finds the map parts placed within a box of half-size radius around x, y, z and reads the position of the nearest one into the out variables. Fails without writing when no parts are found.

Original name: _GET_PARTS_ORIGIN.

step_control_camera

extern void step_control_camera(void) NATIVE(1023);

Advances the player-controlled camera by one frame.

Original name: _CTRLC_STEP.

set_control_camera_angle

extern void set_control_camera_angle(float angle) NATIVE(1024);

Puts the player-controlled camera's eye at an angle around its look-at point, in radians, keeping its distance and height.

Original name: _CTRLC_SET_ROTATE.

move_control_camera

extern void move_control_camera(int chara) NATIVE(1025);

Moves the player-controlled camera from the pad's turn and swing-back input, using the character's rotation and keeping the camera clear of map walls near its look-at point. Fails if the character does not exist.

Original name: _CTRLC_MOVE_CAMERA.

set_camera_rot_cancel

extern void set_camera_rot_cancel(enum camera_rot_cancel mask) NATIVE(1026);

Sets which ways the player-controlled camera may not move, as bits: 1 shoulder buttons do not turn it, 2 right stick does not turn it, 0x40 the swing-behind button does nothing, 0x80 it does not swing round walls. 0 allows all.

Original name: _CTRLC_SET_ROT_CANCEL.

set_control_camera_range

extern void set_control_camera_range(float near_height, float far_height, float min_dist, float max_dist) NATIVE(1027);

Sets the limits of the player-controlled camera: height added to the eye at the nearest and farthest distance, and the minimum and maximum horizontal distance from the look-at point, in world units.

Original name: _CTRLC_MOVE_RANGE.

get_nearest_treasure_box

extern void get_nearest_treasure_box(float x, float y, float z, float *box_x, float *box_y, float *box_z, int *index) NATIVE(1028);

Finds the nearest active treasure box of the dungeon within 30 units of x, y, z. Reads its position into box_x, box_y, box_z and its slot into index, or 0, 0, 0 and -1 when none is near.

Original name: _GET_NEAR_TBOX_POS.

convert_chara_no

extern int convert_chara_no(int short_no) NATIVE(1029);

Stub left in the engine: it returns nothing and always reports failure.

Original name: _CONV_CHRNO_S2L.

init_chara_trail

extern void init_chara_trail(chara_slot chara, int slot, enum memory_stack stack_no, int capacity, int division) NATIVE(1030);

Creates a weapon trail in trail slot 0 or 1 of a character, allocated in the given scene memory stack. capacity is how many recorded points it keeps and division how many smoothed points are made between two; both colours start at 128, 128, 128, 128.

Original name: _SWE_INIT.

set_chara_trail_color

extern void set_chara_trail_color(chara_slot chara, int slot, int r0, int g0, int b0, int a0, int r1, int g1, int b1, int a1) NATIVE(1031);

Sets the RGBA colours of the two edges of a character's weapon trail, each 0 to 255 with 128 as neutral. Fails if the trail slot is empty.

Original name: _SWE_SET_COLOR.

set_chara_trail_texture

extern void set_chara_trail_texture(chara_slot chara, int slot, int tex_block, string tex_name, int u, int v, int width, int height) NATIVE(1032);

Maps a character's weapon trail with the named texture from texture block tex_block, using the texel rectangle starting at u, v with the given width and height. Fails if the trail slot is empty or the texture is not found.

Original name: _SWE_SET_TEXTURE.

start_chara_trail

extern void start_chara_trail(chara_slot chara, int slot, string from_frame, string to_frame, int length, int fade_frames, int hold_frames) NATIVE(1033);

Starts a character's weapon trail between two named model frames, such as the blade's base and tip. length is how many smoothed points stay fully opaque, hold_frames how long it stays before fading and fade_frames how long the fade takes.

Original name: _SWE_START_EFFECT.

set_chara_scene_type

extern void set_chara_scene_type(chara_slot chara, enum scene_chara_type type) NATIVE(1034);

Sets the scene type of a character slot. Type 1 is hit by attacks aimed at the player, 3 by attacks aimed at monsters, and 4 is drawn in the later effect pass after the other characters.

Original name: _SET_CHARA_TYPE.

get_event_data

extern void get_event_data(enum event_data_field field, void *value, OPTIONAL(void *value2, void *value3, void *value4)) NATIVE(1035);

Reads a field of the event that started the script into the out variables. field: 0 flag, 1 event number, 2 point number, 3-5 event args 1-3, 6 map event check type, 7 map event number, 8 position x, y, z and yaw, 9 map parts number, 10 position x, y, z, 11 rotation (y only with one out, x, y, z with three), 12 scale x, y, z, 13 character slot, 14 character number, 15 game object number.

Original name: _GET_EVENT_DATA.

set_prev_floor

extern void set_prev_floor(int floor) NATIVE(1036);

Stores the previous floor number of the current dungeon in the save data.

Original name: _DNG_SET_PREV_FLOOR.

get_prev_floor

extern int get_prev_floor(void) NATIVE(1037);

Returns the previous floor number of the current dungeon from the save data.

Original name: _DNG_GET_PREV_FLOOR.

set_fast_floor

extern void set_fast_floor(void) NATIVE(1038);

Stub left in the engine: it does nothing and always reports failure.

Original name: _DNG_SET_FAST_FLOOR.

VM_ARGS

extern void set_floor_info VM_ARGS(int dungeon, int floor, enum floor_info_field field, any value) NATIVE(1039);

Writes one field of a dungeon floor's save record. field: 0 unknown, 1 best clear time in frames, 2 and 3 unknown, 4 spheda cleared, 5 progress bits ORed into the flags (1 open, 8 practice, 0x10 time clear, 0x20 fishing, 0x80 spheda, 0x100 geostone found, 0x200 geostone read, 0x400 seal cleared), 6 kill count, 7 visit count.

Original name: _SET_FLOOR_INFO.

get_floor_info

extern int get_floor_info(int dungeon, int floor, enum floor_info_field field) NATIVE(1040);

Returns one field of a dungeon floor's save record, using the same field numbers as set_floor_info; field 5 gives all the progress flag bits.

Original name: _GET_FLOOR_INFO.

get_next_floor

extern int get_next_floor(int floor, int route) NATIVE(1041);

Returns the floor that follows floor along the given route of the current dungeon map, or 0 when the floor is unknown.

Original name: _GET_NEXT_FLOOR.

disable_pad_auto_repeat

extern void disable_pad_auto_repeat(void) NATIVE(1042);

Turns off auto-repeat for held controller buttons.

Original name: _PAD_AUTO_REPEAT_OFF.

set_pad_auto_repeat

extern void set_pad_auto_repeat(enum pad_button mask, int delay, int interval) NATIVE(1043);

Turns on auto-repeat for the controller buttons in mask, firing after delay frames and then every interval frames while held.

Original name: _PAD_SET_AUTO_REPEAT.

set_dungeon_pause

extern void set_dungeon_pause(enum dng_pause mask, int on) NATIVE(1044);

Sets (on = 1) or clears (on = 0) dungeon pause bits. Bits: 1 monster AI, 2 player step, 4 player control, 0x10 monster draw, 0x20 sky draw, 0x80 map draw, 0x100 minimap, 0x200 pickups, 0x400 player status, 0x800 exit heal, 0x1000 enemy step, 0x2000 weapon draw, 0x4000 battle music, 0x8000 pad reset, 0x10000 monster names.

Original name: _DNG_PAUSE.

check_dungeon_pause

extern int check_dungeon_pause(enum dng_pause mask) NATIVE(1045);

Returns the dungeon pause bits that are set within mask; nonzero means at least one is set.

Original name: _DNG_CHECK_PAUSE.

reset_dungeon_timer

extern void reset_dungeon_timer(void) NATIVE(1046);

Resets the dungeon frame timer to 0.

Original name: _DNG_RESET_TIMER.

get_dungeon_timer

extern int get_dungeon_timer(void) NATIVE(1047);

Returns the number of frames counted since the dungeon timer was last reset.

Original name: _DNG_GET_TIMER.

VM_ARGS

extern void load_chara_skin VM_ARGS(enum memory_stack stack_no, any pack, string info_name, int chara) NATIVE(1048);

Loads a skin onto a character from a pack file into scene memory stack stack_no. pack is either an item number, whose model file is used, or a file path string; info_name names the skin entry inside the pack.

Original name: _LOAD_SKIN.

check_camera_collision

extern void check_camera_collision(float from_x, float from_y, float from_z, float to_x, float to_y, float to_z, void *hit_or_hit_x, OPTIONAL(float *hit_y, float *hit_z, int *hit)) NATIVE(1049);

Tests the line from one point to another against the map's camera collision. With 7 arguments the 7th receives the index of the polygon hit or -1; with 10 arguments the 7th to 9th receive the hit position and the 10th the polygon index.

Original name: _CHK_CAMERA_COL.

get_parts_point_pos

extern void get_parts_point_pos(float x, float y, float z, float radius, string point_name, int *found, float *point_x, float *point_y, float *point_z) NATIVE(1050);

Finds the map parts nearest x, y, z within radius and looks up the named function point on it. found receives 1 and the point's world position goes into the out variables, or found receives 0 when the parts has no such point; fails without writing if no parts are near.

Original name: _GET_PARTS_FUNC_POS.

get_random_circle_pos

extern void get_random_circle_pos(int circle, float *x, float *y, float *z) NATIVE(1051);

Reads the world position of random circle 0 to 2 of the floor into the out variables; circle = -1 means the circle the player last stood on. Fails without writing when there is none.

Original name: _RANDOM_CIRCLE_GET_POS.

disable_random_circle

extern void disable_random_circle(int circle) NATIVE(1052);

Turns off random circle 0 to 2 of the floor; circle = -1 means the circle the player last stood on.

Original name: _RANDOM_CIRCLE_OFF.

swap_map_lighting

extern void swap_map_lighting(void) NATIVE(1053);

Swaps the first eight lighting entries of the active map with the next eight, if the map has at least sixteen.

Original name: _DNG_XCHG_MAP_LIGHT.

stop_geostone_anim

extern void stop_geostone_anim(void) NATIVE(1054);

Stops the geostone floating up and down.

Original name: _GEOSTONE_ANIME_OFF.

set_geostone_flag

extern void set_geostone_flag(int on) NATIVE(1055);

Sets whether the geostone is on the floor. With 0 the geostone's map parts are moved away to a fixed hidden position.

Original name: _GEOSTONE_SET_FLAG.

attach_geostone

extern void attach_geostone(chara_slot chara, string frame_name) NATIVE(1056);

Attaches the geostone model to a named frame of a character's model so it follows it, such as "item" for a held item.

Original name: _GEOSTONE_SET_REFERENCE.

detach_geostone

extern void detach_geostone(void) NATIVE(1057);

Detaches the geostone model from the character frame set by attach_geostone.

Original name: _GEOSTONE_DEL_REFERENCE.

get_player_move_type

extern int get_player_move_type(void) NATIVE(1058);

Returns how the player character moves: 0 on foot, 1 or 4 ridepod on legs, 2 or 5 on treads, 3 on wheels, 6 through the air.

Original name: _GET_ROBO_MOVE_TYPE.

set_exit_flag

extern void set_exit_flag(int value) NATIVE(1059);

Sets the scene's exit flag, which event scripts read back with get_exit_flag.

Original name: _SET_EXIT_FLAG.

get_exit_flag

extern int get_exit_flag(void) NATIVE(1060);

Returns the scene's exit flag.

Original name: _GET_EXIT_FLAG.

get_e3_version

extern int get_e3_version(void) NATIVE(1061);

Returns whether this is the E3 show demo build. The retail game always gives 0.

Original name: _GET_E3_VERSION.

check_pad_button

extern int check_pad_button(int button) NATIVE(1062);

Returns the state of logical pad button 0 to 127 this frame; nonzero when the button fires according to its binding.

Original name: _CHK_PAD_CTRL.

stop_control_camera

extern void stop_control_camera(void) NATIVE(1063);

Stops the player-controlled camera from moving.

Original name: _CTRLC_STAY.

set_dungeon_brightness

extern void set_dungeon_brightness(float rate) NATIVE(1064);

Sets the scale applied to the colours the dungeon is drawn with; 1.0 is normal.

Original name: _BSCN_SET_BLIGHT_RATE.

get_random_circle_trap

extern int get_random_circle_trap(int kind) NATIVE(1065);

Rolls and returns a random trap number for a random circle of kind 0 or 1. Gives -2 when the active character is 2, and -1 for character 3 unless the trap is 4 or 12.

Original name: _GET_RND_CIRCLE_TRAPID.

apply_random_circle_trap

extern float apply_random_circle_trap(int trap) NATIVE(1066);

Applies the effect of a random circle trap to the active character. Trap 1 returns 10% of the sum of both weapons' maximum ABS; 2 refills HP, 3 repairs both characters' weapons, 6 takes half the HP, 8 to 11 halve a weapon's durability. The result is only written for trap 1.

Original name: _SET_RND_CIRCLE_STATUS.

show_status_bar

extern void show_status_bar(int show, OPTIONAL(float speed)) NATIVE(1067);

Slides the dungeon status bar in (show = 1) or out (show = 0). speed is the fraction moved per frame, default 0.02 and scaled by 1.2; a speed of 1.0 or more shows or hides it at once.

Original name: _SET_STATUSBAR_SHOW.

spawn_pull_items

extern void spawn_pull_items(float x, float y, float z, enum pull_item_type type, int count, float value) NATIVE(1068);

Scatters count pickups from x, y, z that fly to the player. type: 0 coin and 3 large coin (value is the money), 1 weapon growth orb (value is the growth for the active character's weapon), 2 gate key, 4 item.

Original name: _SET_PULL_ITEM.

open_chara_change_menu

extern void open_chara_change_menu(int unused) NATIVE(1069);

Opens the dungeon character change menu; the script is suspended while it is open. The argument is read and ignored.

Original name: _MENU_CHARA_CHENGE.

get_sound_port_bank

extern int get_sound_port_bank(enum snd_port port) NATIVE(1070);

Returns the sound bank handle loaded into sound port 0 to 11.

Original name: _GET_EVENT_INFO_SNDID.

VM_ARGS

extern void get_parts_pos VM_ARGS(any parts, float *x, float *y, float *z) NATIVE(1071);

Finds map parts in the active maps by number or by name and reads its position into the out variables. Fails if none is found.

Original name: _GET_PARTS_POS.

disable_scene_skip

extern void disable_scene_skip(void) NATIVE(1072);

Makes the running drama scene unskippable by clearing its skip state.

Original name: _CANCEL_DRAMA_SCENE.

get_circle_motion_frame

extern float get_circle_motion_frame(void) NATIVE(1073);

Returns the current motion frame of the random circle model.

Original name: _GET_RNDC_MOT_NOWT.

set_chara_motion_frame

extern void set_chara_motion_frame(chara_slot chara, float frame) NATIVE(1074);

Sets the current motion frame of a character, such as to sync it with get_circle_motion_frame.

Original name: _SET_CHARA_MOT_NOWT.

update_chara_motion

extern void update_chara_motion(chara_slot chara) NATIVE(1075);

Advances a character's motion one step: changes to its pending motion, blends into it and poses the model.

Original name: _CHARA_NORMAL_DRIVE.

reset_chara_cloth

extern void reset_chara_cloth(chara_slot chara) NATIVE(1076);

Puts a character's cloth and hair back to rest on its model, then simulates them for 10 steps so they settle.

Original name: _CHARA_RESET_DA.

change_player_chara

extern void change_player_chara(enum user_chara chara) NATIVE(1077);

Switches the dungeon player to another character, reloading its model, icons and sounds. Fails if that character is already active.

Original name: _DNG_SETUP_MAIN_UNIT.

VM_ARGS

extern void set_party_member VM_ARGS(enum user_chara chara, any state) NATIVE(1078);

With an int, adds the character to the party when state is 1 and removes it otherwise. Passing &variable instead reads 1 into it if the character is in the party, else 0.

Original name: _JOIN_PARTY_MEMBER.

set_chara_change_enabled

extern void set_chara_change_enabled(enum user_chara chara, int on) NATIVE(1079);

Lets the player change to a character (on = 1) or forbids it (on = 0).

Original name: _SET_CHARA_CHANGE_FLAG.

set_chara_change_mask

extern void set_chara_change_mask(enum user_chara chara, int on) NATIVE(1080);

Unmasks (on = 1) or masks (on = 0) changing to a character, a second switch kept apart from set_chara_change_enabled.

Original name: _SET_CHARA_CHANGE_MASK.

VM_ARGS

extern void change_dir VM_ARGS(OPTIONAL(directory dir)) NATIVE(1081);

Sets the directory later file names are loaded relative to, such as "event/dng/". An empty string, or no argument, clears it so files load from the root.

Original name: _CHANGE_DIR.

remove_item

extern void remove_item(item_id item, OPTIONAL(int count)) NATIVE(1082);

Removes count of an item from the player's inventory; count defaults to 1.

Original name: _SUB_ITEM.

equip_chara_item

extern void equip_chara_item(enum user_chara chara, item_id item) NATIVE(1083);

Equips an owned item on character 0 to 2, swapping it with the item in its slot. Fails if the item is not owned or is already equipped. Only the equipment slots its item type has (weapons, clothes, ridepod parts); never an active-item slot, so not the camera.

Original name: _SET_CHARA_EQUIP.

load_pack_file

extern void load_pack_file(string file_name) NATIVE(1084);

Loads a pack file into the read buffer so later file loads search it first.

Original name: _LOAD_PACK_FILE.

set_bit_ctrl

extern void set_bit_ctrl(enum bit_ctrl bits, int on) NATIVE(1085);

Sets (on = 1) or clears (otherwise) the given bits of the 8-bit control value kept in the save data.

Original name: _SET_BIT_CTRL.

check_bit_ctrl

extern int check_bit_ctrl(enum bit_ctrl bits) NATIVE(1086);

Returns 1 if any of the given bits of the save data's control value are set, else 0.

Original name: _GET_BIT_CTRL.

load_arg_script

extern void load_arg_script(enum memory_stack stack_no, string file_name) NATIVE(1087);

Loads a compiled argument script (.stb) and runs it at once to build the event argument data, kept in scene memory stack stack_no.

Original name: _LOAD_ARG.

get_item_have_count

extern int get_item_have_count(item_id item) NATIVE(1088);

Returns how many of an item the player owns.

Original name: _GET_ITEM_HAVE_NUM.

set_skip_button

extern void set_skip_button(int button) NATIVE(1089);

Sets the logical pad button that skips the drama scene.

Original name: _SET_SKIP_BOTTON.

set_skip_fade_color

extern void set_skip_fade_color(float r, float g, float b) NATIVE(1090);

Sets the colour the screen fades to when the drama scene is skipped, as red, green and blue from 0 to 255.

Original name: _SET_SKIP_FCOL.

get_debug_mode

extern int get_debug_mode(void) NATIVE(1091);

Returns 1. This build always reports debug mode on; scripts on the disc never call it.

Original name: _GET_DEBUG_MODE.

VM_ARGS

extern int get_map_type VM_ARGS(any map, ...) NATIVE(1092);

Looks up a map by number or by name and returns its type: 1 for a georama map that has edit data, -1 when the map is not found.

Original name: _GET_MAP_TYPE.

clear_dungeon_collisions

extern void clear_dungeon_collisions(void) NATIVE(1093);

Reinitializes the dungeon scene's collision primitive manager, removing every collision primitive it holds.

Original name: _DNG_COLLISION_ALL_CLR.

set_map_draw

extern void set_map_draw(int on) NATIVE(1094);

Turns drawing of the map behind the event on (1) or off (0).

Original name: _SET_MAP_DRAW.

check_memory_card_load

extern int check_memory_card_load(void) NATIVE(1095);

Returns the memory card load state the current game mode was entered with (1 after loading a save from the title screen), then resets it to 0, so only the first call sees it.

Original name: _CHECK_MC_LOAD.

VM_ARGS

extern void set_current_map VM_ARGS(map_id map_no) NATIVE(1096);

Sets the scene's current map number. When it changes, the old number is kept as the previous map.

Original name: _SET_NOW_MAP_NO.

get_chest_contents

extern void get_chest_contents(int *flags, int *item_a, int *item_b, int *count_a, int *count_b) NATIVE(1097);

Reads the treasure chest nearest the player in the dungeon: its flags, the two item numbers it holds and the count of each.

Original name: _GET_TBOX_PARAM.

skip_villager_load

extern void skip_villager_load(void) NATIVE(1098);

Makes the scene skip its next load of town villagers and sub villagers. Each skip flag clears itself once used.

Original name: _CANCEL_LOAD_VILLAGER.

skip_loading_screen

extern void skip_loading_screen(void) NATIVE(1099);

Sets a flag so the next request to start the now-loading screen returns at once without showing it.

Original name: _CANCEL_NOW_LOADING.

init_effect_scripts

extern void init_effect_scripts(enum memory_stack stack_no, OPTIONAL(int texb_offset)) NATIVE(1100);

Creates the event effect script manager in scene memory stack stack_no. It uses the event's texture blocks starting texb_offset blocks in (default 0). Call before any other effect script native.

Original name: _ESM_INITIALIZE.

set_effect_script_heap

extern void set_effect_script_heap(enum memory_stack stack_no, OPTIONAL(int heap_size)) NATIVE(1101);

Gives the effect script manager a work heap of heap_size bytes (default 14000) taken from scene memory stack stack_no. Needs init_effect_scripts first.

Original name: _ESM_INIT_FIX.

clear_effect_scripts

extern void clear_effect_scripts(void) NATIVE(1102);

Deletes every running effect, unloads every effect script base, empties the work heap, frees their texture blocks and removes the effect script manager.

Original name: _ESM_CLEAR.

VM_ARGS

extern void load_effect_script VM_ARGS(any effect) NATIVE(1103);

Loads an effect script base, given by name or by number, so effects can be created from it. Does nothing if it is already loaded.

Original name: _ESM_LOAD_BASE.

create_effect

extern void create_effect(string effect_name, OPTIONAL(int owner, int *slot)) NATIVE(1104);

Starts an effect from a loaded effect script base. owner (default -1) is the id the effect belongs to. With the third argument the effect also takes a free slot under owner and slot receives its number, or -1 on failure; later natives use owner and slot to address it. Natives without owner and slot act on the effect created last.

Original name: _ESM_CREATE.

finish_effect

extern void finish_effect(int owner, int slot) NATIVE(1105);

Switches the effect in owner's slot to program number 300, the program effect scripts use for their ending.

Original name: _ESM_FINISH.

delete_effect

extern void delete_effect(int owner, int slot) NATIVE(1106);

Deletes the effect in owner's slot at once.

Original name: _ESM_DELETE.

set_effect_vector1

extern void set_effect_vector1(float x, float y, float z) NATIVE(1107);

Sets the first work vector of the effect created last, usually its position in world units. The engine also accepts a five argument form (owner, slot, x, y, z) for an effect in a slot.

Original name: _ESM_SET_VECT1.

set_effect_vector2

extern void set_effect_vector2(float x, float y, float z) NATIVE(1108);

Sets the second work vector of the effect created last, such as a scale or direction, depending on the effect script. The engine also accepts a five argument form (owner, slot, x, y, z) for an effect in a slot.

Original name: _ESM_SET_VECT2.

set_effect_target

extern void set_effect_target(int target_id) NATIVE(1109);

Sets the target id of the effect created last; -1 for none. The engine also accepts a three argument form (owner, slot, target_id) for an effect in a slot.

Original name: _ESM_SET_TARGET_ID.

load_effect_script_pack

extern void load_effect_script_pack(string effect_name, string file_name) NATIVE(1110);

Builds the effect script base effect_name from file_name, which must already be loaded by the background loader or present in the loaded pack.

Original name: _ESM_LOAD_BASE_PACK.

VM_ARGS

extern void set_effect_value VM_ARGS(int index, any value) NATIVE(1111);

Sets work value number index of the effect created last to an int or float. The engine also accepts a four argument form (owner, slot, index, value) for an effect in a slot.

Original name: _ESM_SET_VALUE.

set_chara_status

extern void set_chara_status(enum user_chara chara, enum chara_status_attr status_bits, int clear) NATIVE(1200);

Changes a party character's status condition bits (1 poison, 2 slow, 0x10 power up, others unnamed). With clear = 1 the bits are removed, otherwise they are added. The engine also accepts a two argument form (status_bits, clear) for the character active in battle.

Original name: _SET_CHARA_CONDITION.

add_weapon_hp

extern void add_weapon_hp(enum equip_slot weapon_slot, int amount) NATIVE(1201);

Adds amount to the weapon durability gauge in weapon_slot of the character active in battle; negative values reduce it. For the Ridepod or a monster form it changes that gauge instead.

Original name: _ADD_WHP.

add_hp_rate

extern void add_hp_rate(float rate, enum hp_rate_kind mode, OPTIONAL(float frames)) NATIVE(1202);

Changes the active battle character's HP by rate. mode 0 scales by max HP, mode 1 by current HP; modes 2 and 3 do the same but never drop below 1. The bar animates over frames (default 0).

Original name: _ADD_HP_RATE.

VM_ARGS

extern float get_time_of_day VM_ARGS(...) NATIVE(1203);

Returns the scene's time of day, a float from 0 to 24.

Original name: _GET_TIME.

VM_ARGS

extern void check_item_limit VM_ARGS(any item, OPTIONAL(int count, int *allowed)) NATIVE(1204);

With one argument (&over_item) it receives the number of the first item the player holds more of than its limit, or 0. With three arguments (item, count, &allowed) allowed receives count if the player can hold count more of item, otherwise 0.

Original name: _CHECK_GET_ITEM_LIMIT.

check_bag_overflow

extern int check_bag_overflow(void) NATIVE(1205);

Returns how many items sit in the overflow slots past the end of the player's current bag.

Original name: _CHECK_ITEM_OVER.

get_game_mode

extern int get_game_mode(void) NATIVE(1206);

Returns the main game mode: 1 town and georama, 2 dungeon, 3 title screen; other values are debug screens.

Original name: _GET_NOW_LOOP_NO.

check_fast_clear

extern int check_fast_clear(void) NATIVE(1207);

Compares the time since reset_floor_timer with the floor's target clear time and saves a new best. Returns 0 for no record, 1 for the first clear within the target time, 2 for a better time.

Original name: _IS_CLEAR_DESTROY.

check_floor_challenge

extern void check_floor_challenge(int timing, int *result, int *challenge_type) NATIVE(1208);

Tests the floor's practice condition. timing selects which condition kinds are tested now (the disc uses 0 and 1). result receives 0 none, 1 failed, 2 met for the first time, 3 met again; challenge_type receives the floor's condition kind (-1 for none, 6 to 9 for the parameterised kind 2).

Original name: _IS_CLEAR_PRACTICE.

get_floor_sub_games

extern int get_floor_sub_games(void) NATIVE(1209);

Returns the floor's sub games as bits: 1 spheda challenge, 2 fishing record.

Original name: _IS_PLAY_SUB_GAME.

reset_floor_timer

extern void reset_floor_timer(int unused) NATIVE(1210);

Starts timing the floor's clear time from the current play time. The argument is ignored; the disc passes -1.

Original name: _RESET_SUBJECT_COUNTER.

init_screen_wave

extern void init_screen_wave(float amplitude, float speed, float pitch) NATIVE(1211);

Resets the raster screen wave effect and sets its amplitude, speed and pitch. The disc passes speed and pitch as fractions of pi.

Original name: _SCR_EFF_INIT_RASTER.

start_screen_wave

extern void start_screen_wave(float amplitude, float speed, float pitch, int frames) NATIVE(1212);

Turns the screen wave on, moving amplitude, speed and pitch to the given values over frames frames (at once when frames is 0 or 1). A value of -1 keeps that setting.

Original name: _SCR_EFF_START_RASTER.

stop_screen_wave

extern void stop_screen_wave(float amplitude, float speed, float pitch, int frames) NATIVE(1213);

Turns the screen wave off, moving amplitude, speed and pitch to the given values over frames frames first (at once when frames is 0 or 1). A value of -1 keeps that setting.

Original name: _SCR_EFF_STOP_RASTER.

VM_ARGS

extern void set_map_part_motion VM_ARGS(any part, string piece_name, string motion_name, OPTIONAL(enum chara_motion_flag motion_flags)) NATIVE(1214);

Plays a motion on an animated piece of a placed map part, such as a train engine. part is the placed part's number or name, searched in every active map; piece_name names the piece inside it. motion_flags (default 0) are passed to the motion.

Original name: _SET_MPCHARA_MOTION.

VM_ARGS

extern void set_func_point_pos VM_ARGS(any part, string point_name, float x, float y, float z) NATIVE(1215);

Moves a function point of the active map to x, y, z. part is a placed part's number or name, or "" for the map's own function points.

Original name: _FUNC_POINT_POS.

turn_camera_to

extern void turn_camera_to(float angle) NATIVE(1216);

Turns the player camera toward the yaw angle (radians), step by step each frame until it is within 0.1 of it.

Original name: _CTRLC_ROT_BACK.

compare_part_name

extern int compare_part_name(int part_no, string name) NATIVE(1217);

Compares the part name of placed part part_no in the active map with name; returns 0 when they match, nonzero otherwise, and -1 when the part does not exist.

Original name: _PARTS_NAME_STRCMP.

get_trial_version

extern int get_trial_version(void) NATIVE(1218);

Returns 0; this build is never a trial version.

Original name: _GET_TRIAL_VERSION.

show_floor_title

extern void show_floor_title(int on) NATIVE(1219);

Shows (1) or hides (0) the current dungeon floor's title in a frame at the bottom of the screen.

Original name: _SET_FLOOR_EPISODE.

VM_ARGS

extern void get_func_point_pos VM_ARGS(any part, string point_name, float *x, float *y, float *z) NATIVE(1220);

Reads the position of a function point in the active map. part is a placed part's number or name, or "" for the map's own function points.

Original name: _FUNC_POINT_GET_POS.

VM_ARGS

extern void get_func_point_rot VM_ARGS(any part, string point_name, float *rot, OPTIONAL(float *rot_y, float *rot_z)) NATIVE(1221);

Reads the rotation of a function point in the active map, in radians. With one out argument it receives the Y rotation; with three they receive X, Y and Z. part is a placed part's number or name, or "" for the map's own points.

Original name: _FUNC_POINT_GET_ROT.

play_default_motion

extern void play_default_motion(int actor, OPTIONAL(enum chara_motion_flag motion_flags)) NATIVE(1222);

Stops the action of a scene character and plays its default motion on it and every chained part. motion_flags (default 0) are passed to the motion.

Original name: _ACTCHR_SET_DEF_MOTION.

add_synth_points

extern void add_synth_points(enum user_chara chara, enum equip_slot weapon_slot, int points) NATIVE(1223);

Adds synthesis points to the weapon in weapon_slot (0 or 1) of chara (0 or 1).

Original name: _ADD_FUSION_POINT.

get_debug_flag

extern int get_debug_flag(void) NATIVE(1224);

Returns the game's debug flag.

Original name: _GET_DEBUG_FLAG.

open_minimap_door

extern void open_minimap_door(float x, float y, float z) NATIVE(1225);

Marks the door at a world position as open on the dungeon mini map and updates the navigation map around it.

Original name: _MINIMAP_DOOR_ENABLE.

check_boss_floor

extern int check_boss_floor(void) NATIVE(1226);

Returns nonzero on a boss floor, where the mini map symbols are hidden.

Original name: _DNG_CHECK_BOSS_MAP.

queue_dungeon_event

extern void queue_dungeon_event(int event_no) NATIVE(1227);

Sets the event the dungeon runs when it can; -1 clears the request.

Original name: _DNG_RUN_EVENT.

check_chara_switchable

extern int check_chara_switchable(enum user_chara chara) NATIVE(1228);

Returns whether the player may switch to chara (0 Max, 1 Monica, 2 Ridepod, 3 Monica's monster form). It checks the unlock flags, HP, blocking status conditions and the floor's restrictions.

Original name: _CHECK_ENABLE_CHARA_CHANGE.

init_sepia

extern void init_sepia(enum memory_stack stack_no, OPTIONAL(int block_offset)) NATIVE(1229);

Prepares the sepia screen effect: a screen sized texture in the event texture block at block_offset (default 0) and an image buffer from scene memory stack stack_no, or the shared read buffer when stack_no is -1.

Original name: _INIT_SEPIA.

start_sepia

extern void start_sepia(void) NATIVE(1230);

Captures the current screen, tints it sepia and shows it until end_sepia. Needs init_sepia first.

Original name: _START_SEPIA.

end_sepia

extern void end_sepia(void) NATIVE(1231);

Turns the sepia screen effect off.

Original name: _END_SEPIA.

copy_monster_to_actor

extern void copy_monster_to_actor(enum memory_stack stack_no, int monster, int actor) NATIVE(1232);

Copies a loaded dungeon monster's model into scene character slot actor, replacing what was there. stack_no is the scene memory stack the copy is allocated from; monster is the monster's base number.

Original name: _COPY_MONS2SCNCHR.

unlock_stack

extern void unlock_stack(enum memory_stack stack_no) NATIVE(1233);

Clears the lock on scene memory stack stack_no so it can be reused.

Original name: _UNLOCK_STACK.

clear_event_running

extern void clear_event_running(void) NATIVE(1234);

Clears the scene's flag that says an event is running.

Original name: _RESET_EVENT_TRG.

set_slot_chara_id

extern void set_slot_chara_id(chara_slot slot, int chara_id) NATIVE(1235);

Sets the character id stored in scene character slot.

Original name: _SET_CHARA_NO.

get_slot_chara_id

extern int get_slot_chara_id(chara_slot slot) NATIVE(1236);

Returns the character id stored in scene character slot, or -1 when the slot does not exist.

Original name: _GET_CHARA_NO.

find_villager_slot

extern int find_villager_slot(npc_id chara_id) NATIVE(1237);

Searches the villager and talk slots of the scene for chara_id and returns its slot number, or -1.

Original name: _SEARCH_CHARA_NO.

find_near_random_stone

extern void find_near_random_stone(float x, float y, float z, float *stone_x, float *stone_y, float *stone_z, int *found) NATIVE(1238);

Looks for a random stone within 30 units of x, y, z. found receives 1 and the out position the stone's position, or found is -1 and the position is 0, 0, 0.

Original name: _GET_NEAR_RANDOM_STONE_POS.

init_mono_flash

extern void init_mono_flash(enum memory_stack stack_no) NATIVE(1239);

Prepares the mono flash screen effect: two screen sized textures in the first two event texture blocks and their image buffers from scene memory stack stack_no, or the shared read buffer when stack_no is negative.

Original name: _INIT_MONO_FLASH.

start_mono_flash

extern void start_mono_flash(int interval) NATIVE(1240);

Captures the current screen and starts the mono flash effect, switching images every interval frames. Needs init_mono_flash first.

Original name: _START_MONO_FLASH.

end_mono_flash

extern void end_mono_flash(void) NATIVE(1241);

Turns the mono flash screen effect off.

Original name: _END_MONO_FLASH.

delete_villager

extern void delete_villager(npc_id npc) NATIVE(1242);

Removes the town villager with character id npc from the scene's villager manager.

Original name: _DELETE_VILLAGER.

set_dungeon_weather

extern void set_dungeon_weather(enum dng_weather weather) NATIVE(1243);

Sets the dungeon weather: 0 normal, 2 rain. Rain also switches the environment sound to its rain variant.

Original name: _DNG_SET_WEATHER.

set_chara_max_hp

extern void set_chara_max_hp(enum user_chara chara, int max_hp) NATIVE(1244);

Sets a party character's maximum HP and refills HP to it.

Original name: _SET_CHARA_MAXHP.

set_chara_defence

extern void set_chara_defence(enum user_chara chara, int defence) NATIVE(1245);

Sets a party character's defence value.

Original name: _SET_CHARA_DEFENCE.

compare_place_name

extern int compare_place_name(int part_no, string name) NATIVE(1246);

Compares the placement name of placed part part_no in the active map with name; returns 0 when they match, nonzero otherwise, and -1 when the part does not exist.

Original name: _PLACE_PARTS_NAME_STRCMP.

open_item_choice_menu

extern void open_item_choice_menu(int *item, int consume, item_id allowed_item, ...) NATIVE(1247);

Opens the item choice menu and leaves the script so the menu can run; follow with wait. When the menu closes, item receives the number of the item chosen. With consume = 1 a chosen item from the allowed list is used up. The trailing arguments list allowed item numbers.

Original name: _GOTO_USE_ITEM2.

VM_ARGS

extern void set_georama_analyze_flag VM_ARGS(map_id map_no, int entry, int flag) NATIVE(1248);

Sets or clears every georama analysis condition linked to analysis entry entry of map map_no.

Original name: _DBG_SET_ANALYZE_FLAG.

set_atlamillia_visible

extern void set_atlamillia_visible(enum atlamillia_part mode, int actor, int visible) NATIVE(1249);

Shows or hides the Atlamillia model parts on scene character actor. mode 0 changes both parts, 1 the first, 2 the second.

Original name: _ATRAMIRIA_ON_OFF.

add_medals

extern void add_medals(int amount) NATIVE(1250);

Adds amount to the player's medal count, kept between 0 and 999.

Original name: _ADD_YARIKOMI_MEDAL.

set_map_effect_id

extern void set_map_effect_id(int effect_id) NATIVE(1251);

Sets the dungeon's map effect id.

Original name: _SET_MAP_EFFECT_ID.

get_map_effect_id

extern int get_map_effect_id(void) NATIVE(1252);

Returns the dungeon's map effect id.

Original name: _GET_MAP_EFFECT_ID.

init_dungeon_floor

extern void init_dungeon_floor(void) NATIVE(1253);

Calls the dungeon floor start hook, which is empty in this build.

Original name: _DNG_FLOOR_INIT.

finish_dungeon_floor

extern void finish_dungeon_floor(void) NATIVE(1254);

Calls the dungeon floor end hook, which is empty in this build.

Original name: _DNG_FLOOR_FINISH.

hide_random_stones

extern void hide_random_stones(void) NATIVE(1255);

Moves all twelve random stones of the generated floor far below the map, out of play.

Original name: _CLEAR_RND_STONE.

get_floor_status

extern int get_floor_status(void) NATIVE(1256);

Returns the current floor's status flags (1 Max blocked, 2 Monica blocked, 4 items blocked, other bits set by scripts).

Original name: _GET_FLOOR_STATUS.

set_floor_status

extern void set_floor_status(enum dng_floor_status mask, int on) NATIVE(1257);

Sets the bits in mask on the current floor's status flags when on is nonzero, clears them when 0.

Original name: _SET_FLOOR_STATUS.

get_floor_cell_attr

extern int get_floor_cell_attr(float x, float y, float z) NATIVE(1258);

Returns the attribute flags of the generated floor's grid cell at a world position, or 1 when the position is off the grid.

Original name: _AMG_GET_ATTR_STATUS.

set_actor_near_dist

extern void set_actor_near_dist(int actor, float dist) NATIVE(1259);

Turns on fading for scene character actor and sets the distance in world units within which it is not drawn.

Original name: _SET_NEAR_DIST.

set_saved_time

extern void set_saved_time(float hours) NATIVE(1260);

Stores a time of day in hours in the event info, for a later get_saved_time.

Original name: _SET_KEEP_TIME.

get_saved_time

extern float get_saved_time(void) NATIVE(1261);

Returns the time of day stored with set_saved_time.

Original name: _GET_KEEP_TIME.

get_door_part

extern int get_door_part(void) NATIVE(1262);

Returns the active map's part number of the generated floor's door, or -1 when there is none.

Original name: _GET_DOOR_PARTS_ID.

reset_monica_equipment

extern void reset_monica_equipment(int unused) NATIVE(1263);

Puts Monica's default weapon back on and, unless her costume is flagged to stay, her default costume pieces too. The argument is ignored.

Original name: _CHECK_EQUEP_CHANGE.

add_chara_hp_rate

extern void add_chara_hp_rate(enum user_chara chara, float rate) NATIVE(1264);

Changes a party character's HP by rate times the gauge (for example -0.7 removes 70 percent), never dropping below 1.

Original name: _ADD_HP_RATE2.

clear_dungeon_effects

extern void clear_dungeon_effects(void) NATIVE(1265);

Clears every rocket, machine gun shot and laser in the dungeon and deletes every running dungeon effect script.

Original name: _DNG_EFFECT_ALL_CLEAR.

set_bgm_time_volume

extern void set_bgm_time_volume(int on) NATIVE(1266);

When on is nonzero the active BGM's volume follows the time of day lighting; 0 turns that off.

Original name: _AUTO_CHENGE_BGM_VOL.

get_chara_weapon_hp

extern void get_chara_weapon_hp(enum user_chara chara, enum equip_slot weapon_slot, int *whp, OPTIONAL(int *max)) NATIVE(1267);

Reads the durability of the weapon in weapon_slot (0 or 1) of chara (0 Max, 1 Monica, 2 Ridepod, 3 Monica's monster form). whp receives the current value and max, when given, the maximum.

Original name: _UDATA_GET_WHP.

add_chara_weapon_hp

extern void add_chara_weapon_hp(enum user_chara chara, enum equip_slot weapon_slot, int amount) NATIVE(1268);

Adds amount to the durability of the weapon in weapon_slot (0 or 1) of chara (0 Max, 1 Monica, 2 Ridepod, 3 Monica's monster form); negative values reduce it.

Original name: _UDATA_ADD_WHP.

get_chara_weapon_abs

extern void get_chara_weapon_abs(enum user_chara chara, enum equip_slot weapon_slot, int *abs, OPTIONAL(int *max)) NATIVE(1269);

Reads the absorption (ABS) points of the weapon in weapon_slot (0 or 1) of chara (0 Max, 1 Monica, 2 Ridepod, 3 Monica's monster form). abs receives the current value and max, when given, the maximum; for the Ridepod max is 0.

Original name: _UDATA_GET_ABS.

add_chara_weapon_abs

extern void add_chara_weapon_abs(enum user_chara chara, enum equip_slot weapon_slot, int amount) NATIVE(1270);

Adds amount to the absorption (ABS) points of the weapon in weapon_slot (0 or 1) of chara (0 Max, 1 Monica, 2 Ridepod, 3 Monica's monster form); negative values reduce them.

Original name: _UDATA_ADD_ABS.

create_dungeon_effect

extern void create_dungeon_effect(string effect_name, float x, float y, float z, int value) NATIVE(1271);

Starts a dungeon effect script by name at x, y, z and sets its value 0 to value. The engine also accepts a seven argument form (name, x, y, z, x2, y2, z2) that sets the second vector instead.

Original name: _DNG_CREATE_EFFECT.

return_monica_items

extern void return_monica_items(void) NATIVE(1272);

Moves the items Monica has equipped into the player's bag, for when she leaves the party.

Original name: _LEAVE_MONICA_ITEM_CHECK.

set_pause_enabled

extern void set_pause_enabled(int on) NATIVE(1273);

Allows (1) or blocks (0) the player pausing the game.

Original name: _PAUSE_ENABLE_FLAG.

start_fishing_tournament

extern void start_fishing_tournament(void) NATIVE(1274);

Starts the fishing tournament schedule on the current day.

Original name: _FORCE_BOOT_TOUR.

VM_ARGS

extern void _EXT_492 VM_ARGS(...) NATIVE(492);

Numbers the disc calls that this table never registers. The engine prints "not found ext" and moves on, so these calls do nothing.

VM_ARGS

extern void _EXT_800 VM_ARGS(...) NATIVE(800);

Helpers

Inline helper functions that wrap common sequences of native calls.

Helper What it does
init_actor Clears the actor's sequence and makes it drive the event object handle with the same number.
init_chara_actor Binds a handle to a scene character and sets up the actor of the same number to drive it.
init_sprite_actor Binds a handle to an event sprite and sets up the actor of the same number to drive it.
init_map_piece_actor Binds a handle to a named piece of a map part and sets up the actor of the same number to drive it.
init_map_part_actor Binds a handle to a map part and sets up the actor of the same number to drive it.
bind_actor_to_chara Binds a handle to a scene character and sets up an actor with a different number to drive that handle.
activate_chara_actor Activates a scene character, binds a handle to it and sets up the actor of the same number to drive it.
load_chara_actor Loads a character pack on memory stack 5, activates it and sets up the handle and actor of the same number to drive it.
load_scene_chara Loads a character pack into a scene character slot on memory stack 5.
load_active_chara Loads a character pack into a scene character slot on memory stack 5 and activates it.
load_inactive_chara Loads a character pack into a scene character slot on memory stack 5 and leaves it inactive.
add_chara_motions Loads an extra motion pack into a scene character on memory stack 5.
load_party_equipment Loads a party member's current skins onto an event character on memory stack 5, and its weapon as character weapon.
load_party_member Loads a party member's base pack into a scene character on memory stack 5 with its current skins, and its weapon as character weapon.
activate_chara Makes a scene character active.
deactivate_chara Makes a scene character inactive, so it is neither stepped nor drawn.
place_actor Queues putting the actor at a world position facing the yaw angle in radians.
warp_actor Queues putting the actor at a world position facing the yaw angle in radians and settles its hair and cloth there.
set_actor_yaw Queues turning the actor to a yaw angle in radians, level on the other axes.
turn_actor_to_yaw Queues turning the actor to a yaw angle in radians over a number of frames, level on the other axes.
place_chara Places a scene character at a world position facing the yaw angle in radians.
set_chara_yaw Turns a scene character to a yaw angle in radians, level on the other axes.
place_handle Moves the object bound to a handle to a position facing the yaw angle in radians.
set_handle_yaw Turns the object bound to a handle to a yaw angle in radians, level on the other axes.
play_handle_motion Starts a motion from its first frame on the character bound to a handle.
set_camera_view Queues putting the camera eye and look-at point at two world positions at once.
cut_camera Drops all queued camera commands, then queues putting the camera eye and look-at point at two world positions at once.
begin_camera_path Queues clearing the camera path and setting how many frames the camera takes to run the new one.
play_actor_motions Queues a motion on the actor with the given flags and the motion that follows it with its own flags.
play_actor_motion_then_loop Queues a motion on the actor from its first frame, stopping on its last frame, then loops the next motion from its first frame.
loop_actor_motion Queues a looping motion on the actor from its first frame.
play_actor_motion_once Queues a motion on the actor from its first frame that stops on its last frame.
snap_actor_motion Queues a looping motion on the actor from its first frame and shows its first pose at once.
switch_lip_sync_anim Clears the lip sync setup, then makes the actor's talk animation the moving mouth.
set_actor_face Stops the actor's texture animations, then plays a face and an eye animation.
stop_actor_texture_anims Queues stopping all of the actor's texture animations.
switch_actor_texture_anim Stops the actor's texture animations, then plays one named animation.
play_actor_texture_anim Queues playing a named texture animation on the actor, such as a face or eye-blink loop.
set_handle_face Stops the texture animations of the character bound to a handle, then plays a face and an eye animation.
stop_handle_texture_anims Stops all texture animations of the character bound to a handle.
switch_handle_texture_anim Stops the texture animations of the character bound to a handle, then plays one named animation.
play_handle_texture_anim Plays a named texture animation on the character bound to a handle.
set_message_style Sets a message window's frame style and how many characters it reveals per frame.
show_map_part Binds a handle to a map part and shows it.
hide_map_part Binds a handle to a map part and hides it.
show_map_piece Binds a handle to a named piece of a map part and shows it.
hide_map_piece Binds a handle to a named piece of a map part and hides it.
init_screen_sprite Resets an event sprite to a screen sprite showing a texture from a texture block.
set_sprite_alpha Sets an event sprite to its full colour with the given alpha, 128 being opaque.
crop_sprite Shows a width by height region of the sprite's texture starting at u, v, drawn at that same size.
begin_actor_path Queues clearing the actor's walking path and setting how many frames it takes to walk the new one.
play_actor_se_after Queues a sound effect on the actor's sound effect track after waiting a number of frames.
reset_memory_stack Gives a memory stack the free space below it and empties it.
start_bgm Loads a music file and plays its first track.

init_actor

Clears the actor's sequence and makes it drive the event object handle with the same number.

static inline void init_actor(int actor)
{
    clear_actor_seq(actor);
    bind_actor_object(actor, actor);
}

init_chara_actor

Binds a handle to a scene character and sets up the actor of the same number to drive it.

static inline void init_chara_actor(int actor, chara_slot chara)
{
    bind_handle_chara(actor, chara);
    clear_actor_seq(actor);
    bind_actor_object(actor, actor);
}

init_sprite_actor

Binds a handle to an event sprite and sets up the actor of the same number to drive it.

static inline void init_sprite_actor(int actor, int sprite)
{
    bind_handle_sprite(actor, sprite);
    clear_actor_seq(actor);
    bind_actor_object(actor, actor);
}

init_map_piece_actor

Binds a handle to a named piece of a map part and sets up the actor of the same number to drive it.

static inline void init_map_piece_actor(int actor, any part, string piece)
{
    bind_handle_map_part(actor, part, piece);
    clear_actor_seq(actor);
    bind_actor_object(actor, actor);
}

init_map_part_actor

Binds a handle to a map part and sets up the actor of the same number to drive it.

static inline void init_map_part_actor(int actor, any part)
{
    bind_handle_map_part(actor, part);
    clear_actor_seq(actor);
    bind_actor_object(actor, actor);
}

bind_actor_to_chara

Binds a handle to a scene character and sets up an actor with a different number to drive that handle.

static inline void bind_actor_to_chara(int actor, int handle, chara_slot chara)
{
    bind_handle_chara(handle, chara);
    clear_actor_seq(actor, chara);
    bind_actor_object(actor, handle);
}

activate_chara_actor

Activates a scene character, binds a handle to it and sets up the actor of the same number to drive it.

static inline void activate_chara_actor(int actor, chara_slot chara)
{
    set_chara_active(chara);
    bind_handle_chara(actor, chara);
    clear_actor_seq(actor);
    bind_actor_object(actor, actor);
}

load_chara_actor

Loads a character pack on memory stack 5, activates it and sets up the handle and actor of the same number to drive it.

static inline void load_chara_actor(int actor, string pack, chara_slot chara)
{
    load_chara(5, pack, "info.cfg", chara);
    set_chara_active(chara);
    bind_handle_chara(actor, chara);
    clear_actor_seq(actor);
    bind_actor_object(actor, actor);
}

load_scene_chara

Loads a character pack into a scene character slot on memory stack 5.

static inline void load_scene_chara(chara_slot chara, string pack)
{
    load_chara(5, pack, "info.cfg", chara);
}

load_active_chara

Loads a character pack into a scene character slot on memory stack 5 and activates it.

static inline void load_active_chara(chara_slot chara, string pack)
{
    load_chara(5, pack, "info.cfg", chara);
    set_chara_active(chara);
}

load_inactive_chara

Loads a character pack into a scene character slot on memory stack 5 and leaves it inactive.

static inline void load_inactive_chara(chara_slot chara, string pack)
{
    load_chara(5, pack, "info.cfg", chara);
    set_chara_active(0, chara);
}

add_chara_motions

Loads an extra motion pack into a scene character on memory stack 5.

static inline void add_chara_motions(chara_slot chara, string pack)
{
    load_chara_motion(5, pack, "info.cfg", chara);
}

load_party_equipment

Loads a party member's current skins onto an event character on memory stack 5, and its weapon as character weapon.

static inline void load_party_equipment(int member, chara_slot chara, int weapon)
{
    load_equip_model(5, member, 4, "info.cfg", chara);
    load_equip_model(5, member, 3, "info.cfg", chara);
    load_equip_model(5, member, 2, "info.cfg", chara, weapon);
}

load_party_member

Loads a party member's base pack into a scene character on memory stack 5 with its current skins, and its weapon as character weapon.

static inline void load_party_member(int member, string pack, chara_slot chara, int weapon)
{
    load_chara(5, pack, "info.cfg", chara);
    load_equip_model(5, member, 4, "info.cfg", chara);
    load_equip_model(5, member, 3, "info.cfg", chara);
    load_equip_model(5, member, 2, "info.cfg", chara, weapon);
}

activate_chara

Makes a scene character active.

static inline void activate_chara(chara_slot chara)
{
    set_chara_active(1, chara);
}

deactivate_chara

Makes a scene character inactive, so it is neither stepped nor drawn.

static inline void deactivate_chara(chara_slot chara)
{
    set_chara_active(0, chara);
}

place_actor

Queues putting the actor at a world position facing the yaw angle in radians.

static inline void place_actor(int actor, float x, float y, float z, float yaw)
{
    set_actor_pos(actor, x, y, z);
    set_actor_rot(actor, 0.0, yaw, 0.0);
}

warp_actor

Queues putting the actor at a world position facing the yaw angle in radians and settles its hair and cloth there.

static inline void warp_actor(int actor, float x, float y, float z, float yaw)
{
    set_actor_pos(actor, x, y, z);
    set_actor_rot(actor, 0.0, yaw, 0.0);
    reset_actor_dynamics(actor);
}

set_actor_yaw

Queues turning the actor to a yaw angle in radians, level on the other axes.

static inline void set_actor_yaw(int actor, float yaw)
{
    set_actor_rot(actor, 0.0, yaw, 0.0);
}

turn_actor_to_yaw

Queues turning the actor to a yaw angle in radians over a number of frames, level on the other axes.

static inline void turn_actor_to_yaw(int actor, float yaw, int frames)
{
    turn_actor_to(actor, 0.0, yaw, 0.0, frames);
}

place_chara

Places a scene character at a world position facing the yaw angle in radians.

static inline void place_chara(chara_slot chara, float x, float y, float z, float yaw)
{
    set_chara_pos(chara, x, y, z);
    set_chara_rot(chara, 0.0, yaw, 0.0);
}

set_chara_yaw

Turns a scene character to a yaw angle in radians, level on the other axes.

static inline void set_chara_yaw(chara_slot chara, float yaw)
{
    set_chara_rot(chara, 0.0, yaw, 0.0);
}

place_handle

Moves the object bound to a handle to a position facing the yaw angle in radians.

static inline void place_handle(int handle, float x, float y, float z, float yaw)
{
    set_handle_pos(handle, x, y, z);
    set_handle_rot(handle, 0.0, yaw, 0.0);
}

set_handle_yaw

Turns the object bound to a handle to a yaw angle in radians, level on the other axes.

static inline void set_handle_yaw(int handle, float yaw)
{
    set_handle_rot(handle, 0.0, yaw, 0.0);
}

play_handle_motion

Starts a motion from its first frame on the character bound to a handle.

static inline void play_handle_motion(int handle, string motion)
{
    set_handle_motion(handle, motion, CHARA_MOTION_RESTART);
}

set_camera_view

Queues putting the camera eye and look-at point at two world positions at once.

static inline void set_camera_view(float x, float y, float z, float ref_x, float ref_y, float ref_z)
{
    set_camera_seq_pos(x, y, z);
    set_camera_seq_ref(ref_x, ref_y, ref_z);
}

cut_camera

Drops all queued camera commands, then queues putting the camera eye and look-at point at two world positions at once.

static inline void cut_camera(float x, float y, float z, float ref_x, float ref_y, float ref_z)
{
    clear_camera_seq();
    set_camera_seq_pos(x, y, z);
    set_camera_seq_ref(ref_x, ref_y, ref_z);
}

begin_camera_path

Queues clearing the camera path and setting how many frames the camera takes to run the new one.

static inline void begin_camera_path(int frames)
{
    clear_camera_path();
    set_camera_path_frames(frames);
}

play_actor_motions

Queues a motion on the actor with the given flags and the motion that follows it with its own flags.

static inline void play_actor_motions(int actor, string motion, enum chara_motion_flag flags, string next, enum chara_motion_flag next_flags)
{
    set_actor_motion(actor, motion, flags);
    queue_actor_motion(actor, next, next_flags);
}

play_actor_motion_then_loop

Queues a motion on the actor from its first frame, stopping on its last frame, then loops the next motion from its first frame.

static inline void play_actor_motion_then_loop(int actor, string motion, string next)
{
    set_actor_motion(actor, motion, CHARA_MOTION_RESTART | CHARA_MOTION_HOLD);
    queue_actor_motion(actor, next, CHARA_MOTION_RESTART);
}

loop_actor_motion

Queues a looping motion on the actor from its first frame.

static inline void loop_actor_motion(int actor, string motion)
{
    set_actor_motion(actor, motion, CHARA_MOTION_RESTART);
}

play_actor_motion_once

Queues a motion on the actor from its first frame that stops on its last frame.

static inline void play_actor_motion_once(int actor, string motion)
{
    set_actor_motion(actor, motion, CHARA_MOTION_RESTART | CHARA_MOTION_HOLD);
}

snap_actor_motion

Queues a looping motion on the actor from its first frame and shows its first pose at once.

static inline void snap_actor_motion(int actor, string motion)
{
    set_actor_motion(actor, motion, CHARA_MOTION_RESTART, -1.0, 1);
}

switch_lip_sync_anim

Clears the lip sync setup, then makes the actor's talk animation the moving mouth.

static inline void switch_lip_sync_anim(int actor, string talk_anim)
{
    reset_lip_sync_anim();
    set_lip_sync_anim(actor, talk_anim);
}

set_actor_face

Stops the actor's texture animations, then plays a face and an eye animation.

static inline void set_actor_face(int actor, string face, string eyes)
{
    set_actor_texture_anim(actor, 0);
    set_actor_texture_anim(actor, 1, face);
    set_actor_texture_anim(actor, 1, eyes);
}

stop_actor_texture_anims

Queues stopping all of the actor's texture animations.

static inline void stop_actor_texture_anims(int actor)
{
    set_actor_texture_anim(actor, 0);
}

switch_actor_texture_anim

Stops the actor's texture animations, then plays one named animation.

static inline void switch_actor_texture_anim(int actor, string anim)
{
    set_actor_texture_anim(actor, 0);
    set_actor_texture_anim(actor, 1, anim);
}

play_actor_texture_anim

Queues playing a named texture animation on the actor, such as a face or eye-blink loop.

static inline void play_actor_texture_anim(int actor, string anim)
{
    set_actor_texture_anim(actor, 1, anim);
}

set_handle_face

Stops the texture animations of the character bound to a handle, then plays a face and an eye animation.

static inline void set_handle_face(int handle, string face, string eyes)
{
    set_handle_texture_anim(handle, 0);
    set_handle_texture_anim(handle, 1, face);
    set_handle_texture_anim(handle, 1, eyes);
}

stop_handle_texture_anims

Stops all texture animations of the character bound to a handle.

static inline void stop_handle_texture_anims(int handle)
{
    set_handle_texture_anim(handle, 0);
}

switch_handle_texture_anim

Stops the texture animations of the character bound to a handle, then plays one named animation.

static inline void switch_handle_texture_anim(int handle, string anim)
{
    set_handle_texture_anim(handle, 0);
    set_handle_texture_anim(handle, 1, anim);
}

play_handle_texture_anim

Plays a named texture animation on the character bound to a handle.

static inline void play_handle_texture_anim(int handle, string anim)
{
    set_handle_texture_anim(handle, 1, anim);
}

set_message_style

Sets a message window's frame style and how many characters it reveals per frame.

static inline void set_message_style(int window, enum mes_window_mode mode, float speed)
{
    set_message_window_mode(window, mode);
    set_message_speed(window, speed);
}

show_map_part

Binds a handle to a map part and shows it.

static inline void show_map_part(int handle, any part)
{
    bind_handle_map_part(handle, part);
    set_handle_visible(handle, 1);
}

hide_map_part

Binds a handle to a map part and hides it.

static inline void hide_map_part(int handle, any part)
{
    bind_handle_map_part(handle, part);
    set_handle_visible(handle, 0);
}

show_map_piece

Binds a handle to a named piece of a map part and shows it.

static inline void show_map_piece(int handle, any part, string piece)
{
    bind_handle_map_part(handle, part, piece);
    set_handle_visible(handle, 1);
}

hide_map_piece

Binds a handle to a named piece of a map part and hides it.

static inline void hide_map_piece(int handle, any part, string piece)
{
    bind_handle_map_part(handle, part, piece);
    set_handle_visible(handle, 0);
}

init_screen_sprite

Resets an event sprite to a screen sprite showing a texture from a texture block.

static inline void init_screen_sprite(int sprite, string texture, int tex_block)
{
    init_sprite(sprite);
    set_sprite_type(sprite, EVENT_SPRITE2_TYPE_SCREEN);
    set_sprite_texture(sprite, texture, tex_block);
}

set_sprite_alpha

Sets an event sprite to its full colour with the given alpha, 128 being opaque.

static inline void set_sprite_alpha(int sprite, float alpha)
{
    set_sprite_color(sprite, 128, 128, 128, alpha);
}

crop_sprite

Shows a width by height region of the sprite's texture starting at u, v, drawn at that same size.

static inline void crop_sprite(int sprite, int u, int v, int width, int height)
{
    set_sprite_uv(sprite, u, v, width, height);
    set_sprite_size(sprite, width, height);
}

begin_actor_path

Queues clearing the actor's walking path and setting how many frames it takes to walk the new one.

static inline void begin_actor_path(int actor, int frames)
{
    clear_actor_path(actor);
    set_actor_path_frames(actor, frames);
}

play_actor_se_after

Queues a sound effect on the actor's sound effect track after waiting a number of frames.

static inline void play_actor_se_after(int actor, int frames, int sound, int se_no)
{
    delay_actor_se(actor, frames);
    play_actor_se(actor, sound, se_no);
}

reset_memory_stack

Gives a memory stack the free space below it and empties it.

static inline void reset_memory_stack(enum memory_stack stack_no)
{
    assign_memory_stack(stack_no);
    clear_memory_stack(stack_no);
}

start_bgm

Loads a music file and plays its first track.

static inline void start_bgm(int bgm_file)
{
    load_bgm(bgm_file);
    play_bgm(0);
}

Programs

Program entry-point numbers started by the engine (enum program). Register an entry point in a script with PROGRAM(name, function);.

Program Number When it runs
setup 99 Sets the map up from story flags without starting a scene: most retail bodies only set objects and flags without calling _INITIALIZE, some program 100 functions call the same function first (s01), and the engine starts it directly only from the debug future-map select (mainloop3.cpp).
map_start 100 Start event of a town, field or interior map: the edit loop runs it on entry when no other event is named (editloop.cpp EditInit and EditMapJump), _MAP_JUMP, _GOTO_INTERIOR, _GOTO_OUTSIDE and _FUNCTION_MAP_JUMP default to it, and retail scripts print "start_event" there; in dungeon scripts it is only the first value of the debug run-event command (dng_debug.cpp command_int).
debug_test 150 Developer test hook: the edit loop reloads the map script and runs 150 when Square is pressed on the second controller (editloop.cpp kKeyOpenEvent, GamePad Down2), and scripts reuse it as a _LOAD_SCRIPT target.
board_train 250 Train door function point on station maps (s02, s04, s09-s12, s31, s34, i02h01): retail bodies ask whether to depart and then jump to the destination map.
gate 300 Gate event: in towns the engine sends point number 300 when the player stands in the coloured time gate marker (CScene::GetMapEvent, SCENE_GAMEOBJ_SLOT_TG) and scripts warp through it, and on dungeon floors 300 is the first "door01" function point that needs an item to open.
key_door 348 Locked door of a dungeon floor part: every "key" function point in the dungeon maps carries point number 348, and retail bodies ask to use item 340 to open it.
fish_race_end 350 Runs when a fish race in the gyorace subgame ends normally (gyorace.cpp RunEvent(350)); defined only by i03h05.
fish_race_end_bonus 352 Runs when a fish race ends in the title-screen bonus mode (gyorace.cpp RunEvent(352) when OmakeFlag is set); defined only by i03h05.
save_point 400 Save point: in towns the engine sends point number 400 when the player stands at the save point game object (CScene::GetMapEvent, SCENE_GAMEOBJ_SLOT_SAVEPOINT), and most retail bodies open the menu (open_menu_faded).
talk_or_dungeon_start 1000 In towns the edit loop runs it when the player presses the confirm button next to a character (editloop.cpp GetTalkEvent then RunEvent(1000)); in dungeon scripts it is the default start event of the dungeon loop, which retail scripts use to pick the floor from the menu (dng_main.cpp sets event_no 1000 when none is given).
floor_start 1010 Starts a dungeon floor whose number is already chosen: _GOTO_DNG from the town gate menu, the new game and save-load paths in title.cpp and the edit-loop menu jump pass 1010, and retail bodies set the floor up (and program 1000 ends by calling it).
treasure_chest 1100 Runs when the player presses confirm at a treasure chest on a dungeon floor (dng_main.cpp TreasureBoxMan->CheckEvent).
random_circle 1120 Runs when the player steps onto one of the floor's random circles (dng_main.cpp RandomCircle.CheckEvent).
geostone 1130 Runs when the player presses confirm at the floor's geostone (dng_main.cpp GeoStone.CheckEvent).
monster_talk 1150 Runs when the player presses confirm or square next to a monster that can talk (dng_main.cpp CheckMonsterTolk, which also fills EdEventInfo.monster_talk).
player_dead 1200 Runs when the controlled character's HP reaches zero (actionchara.cpp queues battle_area event 1200 with ACTION_PROG_DEAD), and retail bodies run the game-over sequence.
monsters_cleared 1500 Runs once when no monsters or mimics are left on the floor or boss map (dng_main.cpp sets battle_clear).
random_stone_help 2500 One-time help shown the first time Max or Monica presses confirm at a random stone (dng_main.cpp SearchRandomStone, save bit flag 0x32).
monster_help 2510 One-time help requested by the e202a monster script through _RUN_EVENT_SCRIPT(2510) when its attack type is 0 (guarded by bit flag 51); retail bodies show dungeon message 2610.
level_up_help 2520 One-time help shown at the first level up in a dungeon (dng_main.cpp LevelupInfo.phase, save bit flag 0x34).
robot_bike_help 2530 One-time help shown the first time the robot character moves in its bike form (dng_main.cpp USER_CHARA_ROBO with move_type 3, SAVE_FLAG_ROBO_BIKE_EVENT_SEEN).
magic_sword_help 2540 One-time help shown the first time Monica's magic sword gauge holds a charge (dng_main.cpp GetMagicSwordCounterNow, save bit flag 0x3B).
spheda_shot 3000 Spheda: the player stands at the ball and presses the action button (sphida.cpp SPHIDA_EVENT_SHOT).
spheda_menu 3001 Spheda: the player presses the menu button near the ball (sphida.cpp SPHIDA_EVENT_NEAR_BALL).
spheda_menu_last 3002 Spheda: as spheda_menu with fewer than two shots of par left (sphida.cpp SPHIDA_EVENT_NEAR_BALL_LAST).
spheda_menu_away 3003 Spheda bonus courses: the player presses the menu button away from the ball (sphida.cpp SPHIDA_EVENT_OMAKE_AWAY).
spheda_debug_start 4000 Spheda test start: the debug subgame menu enters dungeon map 2 floor 1 with event 4000 (mainloop.cpp), and retail bodies load the floor and call setup_spheda.
spheda_bonus_menu 6000 Start of the title-screen bonus dungeon mode (title.cpp InitOmakeEnv, OMAKE_TYPE_DUNGEON), where retail bodies open the Spheda course menu; the *_sfida scripts also _LOAD_SCRIPT into it.
spheda_bonus_course 6001 Loads a Spheda bonus hole after the course menu: *_sfida scripts start it with _LOAD_SCRIPT and retail bodies place the ball and call setup_spheda.
story_1 10010 Story event 1 「OPENING PART1」 (opening part 1) on map m07, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_2 10020 Story event 2 「OPENING PART1.5」 (opening part 1.5) on map m06, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_3 10030 Story event 3 「OPENING PART2」 (opening part 2) on dungeon 1 floor 21, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_4 10040 Story event 4 「OPENING PART3」 (opening part 3) on dungeon 1 floor 21, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_5 10050 Story event 5 「OPENING PART4」 (opening part 4) on dungeon 1 floor 21, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_6 10060 Story event 6 「OPENING PART5」 (opening part 5) on map m06, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_7 10070 Story event 7 「OPENING PART6」 (opening part 6) on map d01e01, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_50 10500 Story event 50 「プロローグ・モニカの戦い」 (prologue, Monica's battle) on dungeon 1 floor 20, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_100 11000 Story event 100 「ダンジョンでの最初の通信」 (first call in the dungeon) on dungeon 1 floor 1, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_101 11010 Story event 101 「回想・主人公とジラードの食事」 (flashback, the hero's meal with Gerard) on map i04h01b, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_102 11020 Story event 102 「回想・母の思い出」 (flashback, memories of mother) on map i04h01, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_103 11030 Story event 103 「象登場」 (the elephant appears) on dungeon 1 floor 4, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_104 11040 Story event 104 「ひとまず退却」 (retreat for now) on dungeon 1 floor 4, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_105a 11051 Story event 105A 「次の日の朝」 (the next morning) on map m01, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_105b 11052 Story event 105B 「スターブルのヒント」 (Starbull's hint) on map m01, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_105c 11053 Story event 105C 「発明完了!」 (invention complete) on map m01, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_106 11060 Story event 106 「スティーブ始動」 (Steve starts up) on map m01, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_107 11070 Story event 107 「象との再戦」 (rematch with the elephant) on dungeon 1 floor 4, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_108a 11081 Story event 108A 「象を倒して、ポルカス退却」 (elephant beaten, Flotsam retreats) on dungeon 1 floor 4, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_108b 11082 Story event 108B 「象に負ける」 (losing to the elephant) on dungeon 1 floor 4, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_108c 11083 Story event 108C 「象と3度目以降」 (the elephant from the third try on) on map i01h01, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_109a 11091 Story event 109A 「町長の隠し事」 (the mayor's secret) on map m03, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_109b 11092 Story event 109B 「バース鉄道復活」 (the railway revived) on map i03h01a, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_110 11100 Story event 110 「ピエロロボ登場・ボス戦前」 (clown robot appears, before the boss fight) on dungeon 1 floor 7, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_111 11110 Story event 111 「ピエロロボ破壊・ボス戦後」 (clown robot destroyed, after the boss fight) on dungeon 1 floor 7, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_201 12010 Story event 201 「外へ出る」 (going outside) on map s01, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_202 12020 Story event 202 「列車に乗り込む」 (boarding the train) on map s01, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_203 12030 Story event 203 「列車の中での会話」 (talk on the train) on map s08, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_204 12040 Story event 204 「ポルカス再び登場」 (Flotsam appears again) on map s03, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_205 12050 Story event 205 「列車崩壊」 (the train breaks apart) on map s08, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_206 12060 Story event 206 「モニカ登場・ポルカス撃退」 (Monica appears, Flotsam driven off) on map s03, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_207 12070 Story event 207 「森へ到着・モニカの説明」 (arriving at the forest, Monica's explanation) on map s02, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_208 12080 Story event 208 「コビトたちとの出会い」 (meeting the dwarves) on map g01, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_209 12090 Story event 209 「コビトたちの事情」 (the dwarves' trouble) on map g01, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_215 12150 Story event 215 「小人たち発見・怪魚の沼の幸せボケ」 (dwarves found dazed at the monster-fish swamp) on map s05, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_220 12200 Story event 220 「ノームとの会話」 (talk with the gnome) on map s05, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_230 12300 Story event 230 「具合が悪くなったマスターウータン」 (Master Utan falls ill) on map s05, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_235 12350 Story event 235 「沼の前にて」 (in front of the swamp) on map s05, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_240 12400 Story event 240 「エンペラマーダンを釣り上げる!」 (reeling in the Emperor Mardan) on map s05, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_245 12450 Story event 245 「マーダン魔法解く」 (Mardan's spell broken) on map s05, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_247 12470 Story event 247 「元に戻った3人、一時帰還」 (the three restored, temporary return) on map s05, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_250 12500 Story event 250 「カーペントリオン発進!」 (the Carpentrion launches) on map g01i07, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_253 12530 Story event 253 「岩をどかすマスターウータン」 (Master Utan moves the rock) on map s05, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_254a 12541 Story event 254A 「ジオラマやろう」 (let's do Georama) on map s02, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_254b 12542 Story event 254B 「移住のさせ方」 (how to make people move in) on map g01, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_255a 12551 Story event 255A 「ラフレシア育つその1(種)」 (the Rafflesia grows, part 1 (seed)) on dungeon 2 floor 15, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_255b 12552 Story event 255B 「ラフレシア育つその2(太陽のしずく)」 (the Rafflesia grows, part 2 (sun drop)) on dungeon 2 floor 15, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_256 12560 Story event 256 「花の上へ」 (onto the flower) on dungeon 2 floor 15, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_257 12570 Story event 257 「七色蝶登場」 (the rainbow butterfly appears) on dungeon 2 floor 15, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_260 12600 Story event 260 「七色蝶を倒す・ホーリーとの別れ」 (rainbow butterfly beaten, farewell to Hollie) on dungeon 2 floor 15, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_270 12700 Story event 270 「ジオラマ進行1・ジュラク復活」 (Georama progress 1, Jurak revived) on map f01, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_272 12720 Story event 272 「ジュラクとの会話」 (talk with Jurak) on map f01, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_275 12750 Story event 275 「ジオラマ進行2・ジュラクモール開店」 (Georama progress 2, Jurak Mall opens) on map f01, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_277 12770 Story event 277 「モンスターへんげのこと」 (about monster transformation) on map f01, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_280 12800 Story event 280 「ジオラマ進行3・ジュラク大いに語る」 (Georama progress 3, Jurak talks at length) on map f01, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_283 12830 Story event 283 「次のエリアへ→てんびん谷」 (on to the next area, Balance Valley) on map s02, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_285 12850 Story event 285 「ジオラマ進行100%ボーナス」 (Georama 100% bonus) on map f01, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_300 13000 Story event 300 「てんびん谷到着」 (arriving at Balance Valley) on map s04, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_302 13020 Story event 302 「これがてんびん谷」 (this is Balance Valley) on map g02, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_304 13040 Story event 304 「リンが危ない」 (Lin is in danger) on map g02i02, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_305 13050 Story event 305 「ダック先生を連れてくる」 (bringing the doctor) on map i05h01, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_306 13060 Story event 306 「ダンク先生到着・冒険の始まり」 (the doctor arrives, the adventure begins) on map g02i02, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_307 13070 Story event 307 「回想・看病をしてくれる母さん」 (flashback, mother nursing the hero) on dungeon 3 floor 2, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_308 13080 Story event 308 「ボスがいないボスの谷」 (the boss's valley without its boss) on dungeon 3 floor 8, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_312 13120 Story event 312 「ボスの谷・困っているボス」 (the boss's valley, the troubled boss) on dungeon 3 floor 8, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_317 13170 Story event 317 「ボスの巣を救う、白き風の花ゲット」 (saving the boss's nest, getting the white wind flower) on dungeon 3 floor 8, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_320 13200 Story event 320 「ラオチャオに初めて会う」 (first meeting with Lao Chao) on map f02i08, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_324 13240 Story event 324 「ラオチャオ調理」 (Lao Chao cooks) on map f02i08, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_328 13280 Story event 328 「リンの家に戻る」 (back to Lin's house) on map g02i02, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_330 13300 Story event 330 「リン復活」 (Lin recovers) on map g02i02, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_332 13320 Story event 332 「ヨルダの木到着」 (arriving at the Jorda tree) on dungeon 3 floor 18, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_336 13360 Story event 336 「リンを連れて木の下へ・メムイータ登場」 (taking Lin under the tree, the Memo Eater appears) on dungeon 3 floor 18, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_340 13400 Story event 340 「メムイータを倒す」 (Memo Eater beaten) on dungeon 3 floor 18, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_344 13440 Story event 344 「ニード町長・釣り大会開催する」 (Mayor Need holds a fishing contest) on map s45, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_348 13480 Story event 348 「灯台に初めて来ました」 (first visit to the lighthouse) on dungeon 3 floor 23, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_352 13520 Story event 352 「星の砂時計を使う」 (using the star hourglass) on dungeon 3 floor 23, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_356 13560 Story event 356 「ギルトーニ撃退・クレストとの別れ」 (Gaspard driven off, farewell to Crest) on map d03b02, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_360 13600 Story event 360 「次のエリアへ出発」 (leaving for the next area) on map s04, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_364 13640 Story event 364 「ジオラマ進行1・ラオチャオ飯店復活」 (Georama progress 1, Lao Chao restaurant revived) on map f02, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_368 13680 Story event 368 「ジオラマ進行2・アイテム屋「星の砂時計」」 (Georama progress 2, the Star Hourglass item shop) on map f02, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_372 13720 Story event 372 「ジオラマ進行3・大賢者クレスト復活」 (Georama progress 3, the sage Crest revived) on map f02, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_376 13760 Story event 376 「ジオラマ進行100%ボーナス」 (Georama 100% bonus) on map f02, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_400 14000 Story event 400 「ベニーティオ到着」 (arriving at Veniccio) on map s09, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_402 14020 Story event 402 「はじめての海」 (the sea for the first time) on map g03, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_404 14040 Story event 404 「出会い・パウとシグー」 (meeting Pau and Shigura) on map s27, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_406 14060 Story event 406 「回想・海ってどんなところ?」 (flashback, what is the sea like) on dungeon 4 floor 2, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_408 14080 Story event 408 「操られるシグー」 (Shigura under control) on dungeon 4 floor 9, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_410 14100 Story event 410 「アイテムなしでシグーのところに来る」 (reaching Shigura without the item) on dungeon 4 floor 9, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_412 14120 Story event 412 「オズモンドとの出会い(E408後)」 (meeting Osmond (after E408)) on map f03i0301, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_414 14140 Story event 414 「オズモンドとの出会い・寝ている(E408前)」 (meeting Osmond asleep (before E408)) on map f03i0301, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_416 14160 Story event 416 「シグーへの挑戦」 (challenging Shigura) on dungeon 4 floor 9, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_420 14200 Story event 420 「シグー正気に戻る」 (Shigura comes to his senses) on dungeon 4 floor 9, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_424 14240 Story event 424 「ニード町長・ギョレースカップ開催」 (Mayor Need holds the fish race cup) on map s45, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_428 14280 Story event 428 「Dr・チャップとの出会い」 (meeting Dr. Chapp) on map f03i0302, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_432 14320 Story event 432 「シーグラの村到着」 (arriving at the Shingala village) on dungeon 4 floor 20, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_436 14360 Story event 436 「シーグラの村到着・ほんやく機なし」 (arriving at the Shingala village without a translator) on dungeon 4 floor 20, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_438 14380 Story event 438 「シグー復活・その時、村が襲われる!」 (Shigura revived, then the village is attacked) on map s27, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_440 14400 Story event 440 「竜たちを操る男ドクタージャミング」 (Dr. Jaming, the man controlling the dragons) on dungeon 4 floor 20, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_444 14440 Story event 444 「さよならシグー・南へ帰るシーグラたち」 (goodbye Shigura, the Shingala head south) on dungeon 4 floor 20, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_448 14480 Story event 448 「開発開始!時を越える列車」 (development begins, the train that crosses time) on map f03i04, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_452 14520 Story event 452 「次のエリアへ出発・ガンドール火山へ」 (leaving for the next area, the Gundorada volcano) on map s09, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_456 14560 Story event 456 「ジオラマ進行1ルナ研(オズモンド)復活」 (Georama progress 1, Osmond's Luna lab revived) on map f03, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_460 14600 Story event 460 「ジオラマ進行2・Dr.チャップ復活」 (Georama progress 2, Dr. Chapp revived) on map f03, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_464 14640 Story event 464 「ジオラマ進行3・センターラボ復活」 (Georama progress 3, the Center Lab revived) on map f03i04, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_468 14680 Story event 468 「ジオラマ進行100%ボーナス」 (Georama 100% bonus) on map f03i0301, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_500 15000 Story event 500 「ヘイムラダ到着・降り注ぐ火炎雨」 (arriving at Heim Rada under raining fire) on map s10, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_504 15040 Story event 504 「上空の軍艦・急げユリス」 (the warship overhead, hurry Yuris) on map s41, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_508 15080 Story event 508 「工場長グイスコン・時限ばくだんをくれる」 (factory chief Gaskon hands over a time bomb) on map f04, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_512 15120 Story event 512 「火口に初めて来ました」 (first visit to the crater) on dungeon 5 floor 16, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_516 15160 Story event 516 「時限ばくだん使用・軍艦現る」 (using the time bomb, the warship appears) on dungeon 5 floor 16, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_520 15200 Story event 520 「落ちていく軍艦・モニカは!?」 (the warship falls, where is Monica) on dungeon 5 floor 16, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_522 15220 Story event 522 「赤いアトラミリアが青く光る不思議」 (the red Atlamillia glows blue) on map f04, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_524 15240 Story event 524 「反乱軍指導者ドナ・ホーンと出会う」 (meeting rebel leader Donna Horn) on map s39, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_526 15260 Story event 526 「溶岩の川・ふたつに割れる」 (the lava river splits in two) on dungeon 5 floor 22, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_528 15280 Story event 528 「ギルトーニとの最後の戦い」 (last battle with Gaspard) on dungeon 5 floor 22, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_532 15320 Story event 532 「ギルトーニの告白」 (Gaspard's confession) on dungeon 5 floor 22, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_536 15360 Story event 536 「ギルトーニの最期・回想」 (Gaspard's end, flashback) on dungeon 5 floor 22, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_540 15400 Story event 540 「反乱軍反撃開始」 (the rebels strike back) on map s30, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_548 15480 Story event 548 「ジオラマ進行1大工房&グイスコン復活」 (Georama progress 1, the great workshop and Gaskon revived) on map f04, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_552 15520 Story event 552 「ジオラマ進行2・OPルーム・ドナホーン」 (Georama progress 2, the OP room and Donna Horn) on map f04, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_556 15560 Story event 556 「ジオラマ進行3・パズノス要塞完成」 (Georama progress 3, the Paznos fortress complete) on map f04, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_560 15600 Story event 560 「ジオラマ進行100%・父の剣」 (Georama 100%, father's sword) on map s39, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_600 16000 Story event 600 「イクシオン発進・未来への旅立ち」 (the Ixion launches toward the future) on map f03i04, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_604 16040 Story event 604 「月花宮殿に来ました」 (arriving at the Moon Flower Palace) on map s33, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_608 16080 Story event 608 「月花宮殿にてグリフォンに出会う」 (meeting Griffon at the Moon Flower Palace) on dungeon 6 floor 0, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_610 16100 Story event 610 「グリフォンの言い分」 (Griffon's side of the story) on dungeon 6 floor 0, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_612 16120 Story event 612 「奪われたアトラミリア・宮殿浮上」 (the Atlamillia stolen, the palace rises) on dungeon 6 floor 0, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_616 16160 Story event 616 「一時帰還・エイナの指令」 (temporary return, Eina's orders) on map s70, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_640 16400 Story event 640 「ラピスが揃う・クロノユニオン発動」 (the Lapis gathered, the Chronounion activated) on map s66, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_648 16480 Story event 648 「再び・宮殿へ乗り込む」 (storming the palace again) on map s37, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_700 17000 Story event 700 「アンドレアの幻(ジオラマ説明)」 (Andrea's vision (Georama explanation)) on map s68, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_702 17020 Story event 702 「ホールにかけられたヒントの絵」 (the hint painting in the hall) on map d06e01, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_704 17040 Story event 704 「栽培園の思い出」 (memories of the cultivation garden) on dungeon 6 floor 11, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_708 17080 Story event 708 「思い出・花を摘んだ人」 (memory, the one who picked the flower) on dungeon 6 floor 21, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_716 17160 Story event 716 「グリフォン現る」 (Griffon appears) on dungeon 6 floor 27, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_720 17200 Story event 720 「戦闘中回想1」 (flashback during battle 1) on dungeon 6 floor 27, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_724 17240 Story event 724 「戦闘中回想2」 (flashback during battle 2) on dungeon 6 floor 27, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_728 17280 Story event 728 「思い出してサン・ダークエレメント登場」 (remember, Sun; the Dark Element appears) on dungeon 6 floor 27, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_732 17320 Story event 732 「エンディングPART1・星の転生」 (ending part 1, rebirth of the star) on map s67, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_736 17360 Story event 736 「エンディングPART2・別れ」 (ending part 2, farewell) on map s66, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_737 17370 Unlisted story event 737 on map s66 right after ending part 2 (story_736), reached by _MAP_JUMP; it follows the 10000 + 10 x event numbering of event/view_pal.txt.
story_744 17440 Story event 744 「ジオラマ進行1花壇復活」 (Georama progress 1, the flower beds revived) on map s44, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_748 17480 Story event 748 「ジオラマ進行2・花の庭園完成」 (Georama progress 2, the flower garden complete) on map s44, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_800 18000 Story event 800 「ニード町長奮起!バース鉄道拡大計画」 (Mayor Need's railway expansion plan) on map m02, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_804 18040 Story event 804 「モニカが来た」 (Monica arrives) on dungeon 7 floor 5, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_808 18080 Story event 808 「メタルポルカス登場」 (Metal Flotsam appears) on dungeon 7 floor 27, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_812 18120 Story event 812 「メタルポルカス撃退」 (Metal Flotsam driven off) on dungeon 7 floor 27, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_816 18160 Story event 816 「魔神登場」 (the genie appears) on dungeon 7 floor 38, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
story_820 18200 Story event 820 「魔神撃退」 (the genie driven off) on dungeon 7 floor 38, from the debug event list event/view_pal.txt, whose program numbers are 10000 + 10 x event + part.
boss_linda 21010 Boss battle "VS Linda" on dungeon 1 floor 4, listed with type B in the debug event list event/view_pal.txt.
boss_halloween 21020 Boss battle "VS Halloween" on dungeon 1 floor 7, listed with type B in the debug event list event/view_pal.txt.
boss_flotsam 22010 Boss battle "VS Flotsam (Subgame)" on map s03, listed with type B in the debug event list event/view_pal.txt.
boss_butterfly 22030 Boss battle "VS Butterfly" on dungeon 2 floor 15, listed with type B in the debug event list event/view_pal.txt.
boss_memo_eater 23020 Boss battle "VS Memo Eater" on dungeon 3 floor 18, listed with type B in the debug event list event/view_pal.txt.
boss_gaspard_and_fire 23030 Boss battle "VS Gaspard and Fire" on dungeon 3 floor 23, listed with type B in the debug event list event/view_pal.txt.
boss_puppet_shigura 24010 Boss battle "VS Puppet Shigura" on dungeon 4 floor 9, listed with type B in the debug event list event/view_pal.txt.
boss_jaming_and_shingala 24020 Boss battle "VS Jaming and Shingala" on dungeon 4 floor 20, listed with type B in the debug event list event/view_pal.txt.
boss_death_ark 25010 Boss battle "VS Death Ark" on dungeon 5 floor 16, listed with type B in the debug event list event/view_pal.txt.
boss_gaspard_2 25020 Boss battle "VS Gaspard 2" on dungeon 5 floor 22, listed with type B in the debug event list event/view_pal.txt.
boss_monster_gaspard 25030 Boss battle "VS Monster Gaspard" on dungeon 5 floor 22, listed with type B in the debug event list event/view_pal.txt.
boss_trentos 26010 Boss battle "VS Trentos" on dungeon 2 floor 12, listed with type B in the debug event list event/view_pal.txt.
boss_lapis_garter 26020 Boss battle "VS Lapis Garter" on dungeon 3 floor 15, listed with type B in the debug event list event/view_pal.txt.
boss_sea_dragon 26030 Boss battle "VS Sea Dragon" on dungeon 4 floor 14, listed with type B in the debug event list event/view_pal.txt.
boss_inferno 26040 Boss battle "VS Inferno" on dungeon 5 floor 8, listed with type B in the debug event list event/view_pal.txt.
boss_sirus 26050 Boss battle "VS Sirus" on dungeon 6 floor 0, listed with type B in the debug event list event/view_pal.txt.
boss_emperor_griffon 27010 Boss battle "VS Emperor Griffon 1-3" on dungeon 6 floor 27, listed with type B in the debug event list event/view_pal.txt.
boss_dream_spiral_1 27020 Boss battle "VS Dream Spiral 1" on dungeon 6 floor 27, listed with type B in the debug event list event/view_pal.txt.
boss_dream_spiral_2 27030 Boss battle "VS Dream Spiral 2" on dungeon 6 floor 27, listed with type B in the debug event list event/view_pal.txt.
boss_dream_spiral_3 27040 Boss battle "VS Dream Spiral 3" on dungeon 6 floor 27, listed with type B in the debug event list event/view_pal.txt.
boss_dream_spiral_4 27050 Boss battle "VS Dream Spiral 4" on dungeon 6 floor 27, listed with type B in the debug event list event/view_pal.txt.
boss_dream_spiral_5 27060 Boss battle "VS Dream Spiral 5" on dungeon 6 floor 27, listed with type B in the debug event list event/view_pal.txt.
boss_dark_element 27070 Boss battle "VS Dark Element" on dungeon 6 floor 27, listed with type B in the debug event list event/view_pal.txt.
boss_metal_flotsam 28010 Boss battle "VS Metal Flotsam" on dungeon 7 floor 27, listed with type B in the debug event list event/view_pal.txt.
boss_dark_genie 28020 Boss battle "VS Dark Genie" on dungeon 7 floor 38, listed with type B in the debug event list event/view_pal.txt.

Constants

Name Value What it is
PI 3.1415927

enum alpha_macro

Alpha blend macro passed to mgCDrawEnv::SetAlpha (mg_drawenv.hpp mgAlphaMacroID); 0 leaves the alpha register as it was.

Name Value
MG_ALPHA_MACRO_NONE 0
MG_ALPHA_MACRO_BLEND 1
MG_ALPHA_MACRO_ADD 2
MG_ALPHA_MACRO_SUB 3
MG_ALPHA_MACRO_OPAQUE 4
MG_ALPHA_MACRO_ADD_FIX 5

enum atlamillia_part

Which Atlamillia frames AtraMiriaOnOff changes: both, or only the first or second.

Name Value
ATLAMILLIA_BOTH 0
ATLAMILLIA_FIRST 1
ATLAMILLIA_SECOND 2

enum automap_gen_flag

Dungeon floor generation options (AUTOMAP_GEN_FLAG in automap.hpp).

Name Value
AUTOMAP_GEN_DUMMY_TREE 1
AUTOMAP_GEN_PRESET_FLOOR 2
AUTOMAP_GEN_DUMMY_MOUNTAIN 4
AUTOMAP_GEN_FIXED_START 8
AUTOMAP_GEN_NO_IN_OUT 16
AUTOMAP_GEN_NO_HEALING 32
AUTOMAP_GEN_FIXED_FLOOR 64

enum bit_ctrl

Bits of the save data's 8-bit control value CSaveData::bit_ctrl: 1 blocks the world and dungeon map moves (menumain.cpp message 0x2A), 2 blocks Georama edit mode (editloop.cpp), 8 hides the Atlamillia on loaded characters (charasetup.cpp, _LOAD_CHARA), 0x10 opens the dungeon floor map in place of the world map move (SetCommonMenuModeID).

Name Value
BIT_CTRL_NO_MAP_MOVE 1
BIT_CTRL_NO_EDIT 2
BIT_CTRL_HIDE_ATLAMILLIA 8
BIT_CTRL_DUNGEON_MAP_MOVE 16

enum camera_reset_mode

Camera _RESET_CAMERA puts back on character 0: the active camera at its current distance and angle, or the previous camera behind the character's facing.

Name Value
CAMERA_RESET_ACTIVE 0
CAMERA_RESET_BEHIND 1

enum camera_rot_cancel

Ways the player-controlled camera is kept from turning, bits of CCameraControl::rot_cancel (cameracontrol.hpp CameraRotCancel).

Name Value
CAMERA_ROT_CANCEL_BUTTON 1
CAMERA_ROT_CANCEL_ANALOG 2
CAMERA_ROT_CANCEL_ROT_BACK 64
CAMERA_ROT_CANCEL_AUTO_MOVE 128

enum chara_motion_flag

Playback flags of a character motion (CharaMotionFlag in character.hpp, as CCharacter2::SetMotion takes them).

Name Value
CHARA_MOTION_PAUSE 1
CHARA_MOTION_HOLD 2
CHARA_MOTION_RESTART 4

enum chara_status_attr

Status condition bits of a party character (userdata.hpp CHARA_STATUS_ATTR).

Name Value
CHARA_STATUS_POISON 1
CHARA_STATUS_SLOW 2
CHARA_STATUS_UNK_4 4
CHARA_STATUS_UNK_8 8
CHARA_STATUS_POWER 16
CHARA_STATUS_UNK_20 32
CHARA_STATUS_UNK_40 64

enum check_button

Button _CHECK_BUTTON tests: confirm and cancel follow the language's circle and cross layout.

Name Value
CHECK_BUTTON_CANCEL 0
CHECK_BUTTON_CONFIRM 1
CHECK_BUTTON_SQUARE 2
CHECK_BUTTON_SELECT 3

enum cross_fade_type

How a cross-fade takes the captured screen away (CrossFadeType in effectlist.hpp); any value other than CROSS_FADE_WIPE dissolves.

Name Value
CROSS_FADE_DISSOLVE 0
CROSS_FADE_WIPE 1

enum dng_floor_status

Bits of DNG_BATTLE_AREA::floor_status, the current floor's seal restrictions (scenesnd.hpp DNG_FLOOR_DISABLE_*).

Name Value
DNG_FLOOR_DISABLE_MAX 1
DNG_FLOOR_DISABLE_MONICA 2
DNG_FLOOR_DISABLE_ITEMS 4

enum dng_pause

Dungeon systems an event pauses, bits of DNG_BATTLE_AREA::pause_flag (scenesnd.hpp DNG_PAUSE_*); 8 is unnamed in the decomp and makes DngStep return right after monster AI, skipping effects and scene characters.

Name Value
DNG_PAUSE_MONSTER_AI 1
DNG_PAUSE_PLAYER_STEP 2
DNG_PAUSE_PLAYER_CONTROL 4
DNG_PAUSE_SCENE_STEP 8
DNG_PAUSE_MONSTER_DRAW 16
DNG_PAUSE_SKY_DRAW 32
DNG_PAUSE_MAP_DRAW 128
DNG_PAUSE_MINIMAP 256
DNG_PAUSE_PICKUPS 512
DNG_PAUSE_PLAYER_STATUS 1024
DNG_PAUSE_EXIT_HEAL 2048
DNG_PAUSE_ENEMY_STEP 4096
DNG_PAUSE_WEAPON_DRAW 8192
DNG_PAUSE_BATTLE_MUSIC 16384
DNG_PAUSE_PAD_RESET 32768
DNG_PAUSE_MONSTER_NAMES 65536

enum dng_weather

Dungeon weather (scenesnd.hpp DNG_WEATHER).

Name Value
DNG_WEATHER_NORMAL 0
DNG_WEATHER_RAIN 2

enum dungeon_debug_command

Command ScriptDebugCommand runs; 0 adds 512 HP to the dungeon party character.

Name Value
DNG_DEBUG_ADD_HP 0

enum dungeon_event_point_kind

Place GetDungeonEventPoint finds on the dungeon floor (DungeonEventPointKind in dng_event.hpp).

Name Value
DUNGEON_EVENT_POINT_PLAYER 0
DUNGEON_EVENT_POINT_TREASURE_BOX 1
DUNGEON_EVENT_POINT_WAY_20 2
DUNGEON_EVENT_POINT_WAY_24 3

enum edit_event_command

Command of _SET_FUNC_ETC: 0 sets map jump flag 0x80 and requests EVENT_REQUEST_RESTART_EDIT, 1 requests EVENT_REQUEST_RESET_EDIT.

Name Value
EDIT_EVENT_RESTART 0
EDIT_EVENT_RESET 1

enum event_data_field

Field of the scene's CSceneEventData that _GET_EVENT_DATA and _SET_EVENT_DATA read or write.

Name Value
EVENT_DATA_FLAG 0
EVENT_DATA_EVENT_NO 1
EVENT_DATA_POINT_NO 2
EVENT_DATA_ARG1 3
EVENT_DATA_ARG2 4
EVENT_DATA_ARG3 5
EVENT_DATA_CHECK_TYPE 6
EVENT_DATA_MAP_EVENT_NO 7
EVENT_DATA_POS_YAW 8
EVENT_DATA_PARTS_NO 9
EVENT_DATA_POSITION 10
EVENT_DATA_ROTATION 11
EVENT_DATA_SCALE 12
EVENT_DATA_CHARA_SLOT 13
EVENT_DATA_CHARA_NO 14
EVENT_DATA_GAMEOBJ_NO 15

enum event_sprite_draw

Draw pass of an event sprite (eventsprite.hpp EVENT_SPRITE2_DRAW).

Name Value
EVENT_SPRITE2_DRAW_OFF 0
EVENT_SPRITE2_DRAW_NORMAL 1
EVENT_SPRITE2_DRAW_FIRST 2

enum event_sprite_type

Where an event sprite lives (eventsprite.hpp EVENT_SPRITE2_TYPE).

Name Value
EVENT_SPRITE2_TYPE_SCREEN 0
EVENT_SPRITE2_TYPE_WORLD 1

enum fish_tour_get_command

Command of _GET_FISHINGTOURNAMENT_ETC.

Name Value
FISH_TOUR_GET_RECORDS 0
FISH_TOUR_GET_PRIZE 1
FISH_TOUR_GET_ENTRY_REMAIN 2
FISH_TOUR_GET_TOP_WEIGHT 3
FISH_TOUR_GET_RANK 4

enum fish_tour_set_command

Command of _SET_FISHINGTOURNAMENT_ETC.

Name Value
FISH_TOUR_SET_RANK 0
FISH_TOUR_SET_RESET_RECORD 1
FISH_TOUR_SET_LOAD_PRIZE 2
FISH_TOUR_SET_COUNT 3

enum floor_info_field

Field of a dungeon floor's save record (DNG_FLOOR_SAVE) that _GET_FLOOR_INFO and _SET_FLOOR_INFO address.

Name Value
FLOOR_INFO_UNK_0 0
FLOOR_INFO_FAST_DESTROY_TIME 1
FLOOR_INFO_UNK_8 2
FLOOR_INFO_UNK_A 3
FLOOR_INFO_SPHEDA_CLEAR 4
FLOOR_INFO_FLAG 5
FLOOR_INFO_KILL_COUNT 6
FLOOR_INFO_VISIT_COUNT 7

enum gyorace_get_command

Command of _GET_GYORACE_ETC.

Name Value
GYORACE_GET_AQUARIUM_NO 0
GYORACE_GET_RANKING 1
GYORACE_GET_CLASS 2
GYORACE_GET_RACE_NO 3
GYORACE_GET_PRIZE 4
GYORACE_GET_TOUR_COUNT 5

enum gyorace_set_command

Command of _SET_GYORACE_ETC.

Name Value
GYORACE_SET_AQUARIUM_NO 0
GYORACE_SET_RANKING 1
GYORACE_SET_CLASS 2
GYORACE_SET_RACE_NO 3
GYORACE_SET_ADD_TOUR_COUNT 4
GYORACE_SET_FISH_NAME 5
GYORACE_SET_RACE_TIME 6
GYORACE_SET_LOAD_PRIZE 7

enum hp_rate_kind

How CBattleCharaInfo::AddHp_Rate scales the change: by max or current HP, optionally never dropping below 1.

Name Value
HP_RATE_MAX 0
HP_RATE_NOW 1
HP_RATE_MAX_KEEP_1 2
HP_RATE_NOW_KEEP_1 3

enum lip_sync_motion_mode

Which lip sync motion _TRG_PAKU_MOTION starts: the talk motion, the idle motion once the talk motion has ended, or the idle motion at once.

Name Value
LIP_SYNC_TALK 0
LIP_SYNC_IDLE_WHEN_DONE 1
LIP_SYNC_IDLE 2

enum menu_get_command

Command of _GET_MENU_ETC.

Name Value
MENU_GET_SPHEDA_CLEARS 0
MENU_GET_SQUARE_EVENT 1
MENU_GET_FISH_RECORD 2
MENU_GET_SCOOP_KNOWN 3
MENU_GET_SCOOP_OBTAINED 4
MENU_GET_SCOOP_TOTAL 5
MENU_GET_DONY_SHOP 6
MENU_GET_DOWNLOAD_STEP 7
MENU_GET_DOWNLOAD_DONE 8

enum menu_open_type

Menu an event asks the game to open, MenuArg.open_type (menumain.hpp MenuOpenType).

Name Value
MENU_OPEN_MAIN_TOWN 0
MENU_OPEN_MAIN_DUNGEON 1
MENU_OPEN_GEORAMA 2
MENU_OPEN_DNG_TREE_MAP 3
MENU_OPEN_CHARA_CHANGE 4
MENU_OPEN_NAME_REGIST 5
MENU_OPEN_SHOP 6
MENU_OPEN_SAVE 7
MENU_OPEN_TITLE_SAVE 8
MENU_OPEN_USE_ITEM 9
MENU_OPEN_INVENT 10
MENU_OPEN_CHAPTER 11
MENU_OPEN_REMOVAL 12
MENU_OPEN_WORLD_MOVE 13
MENU_OPEN_CHARA_CHANGE_DUNGEON 14
MENU_OPEN_GYORACE_FISH_SEL 15
MENU_OPEN_MAIN_TOWN_ITEM_OVER 16
MENU_OPEN_MAIN_DUNGEON_ITEM_OVER 17
MENU_OPEN_OPTION 18
MENU_OPEN_WORLD_MOVE_B 19
MENU_OPEN_COSTUME 20
MENU_OPEN_MAIN_CHARA_BG_DUNGEON 21
MENU_OPEN_USE_ITEM_B 22
MENU_OPEN_GYORACE 23
MENU_OPEN_SPHIDA 24
MENU_OPEN_MONSTER_BOOK 25
MENU_OPEN_SUBGAME_SAVE 26
MENU_OPEN_TITLE_SUBGAME_SAVE 27
MENU_OPEN_SPHIDA_SCORE_VIEW 28
MENU_OPEN_MAIN_CHARA_BG 29

enum menu_set_command

Command of _SET_MENU_ETC; 2 and 6 do nothing.

Name Value
MENU_SET_KEYWORD 0
MENU_SET_FINISH_TOUR 1
MENU_SET_DOWNLOAD_SHOW 3
MENU_SET_LOADING_RESET 4
MENU_SET_DOWNLOAD_START 5
MENU_SET_DOWNLOAD_CLEAR 7

enum mes_info_query

Value _GET_MES_ETC reads: the window's line indent or cursor centring flag, the fish count of the main aquarium tank, or two fields of a villager's info.

Name Value
MES_INFO_LINE_INDENT 0
MES_INFO_CURSOR_CENTERING 1
MES_INFO_AQUARIUM_FISH_NUM 2
MES_INFO_VILLAGER 3

enum mes_option

Message window setting _SET_MES_ETC changes, each switch case naming the ClsMes field it writes.

Name Value
MES_OPT_LINE_INDENT 0
MES_OPT_CURSOR_CENTERING 1
MES_OPT_HALF_FONT_WIDTH 2
MES_OPT_AQUARIUM_FISH 3
MES_OPT_FIXED_FRAME 4
MES_OPT_LINE_SHADE 5
MES_OPT_LINE_ALPHA 6
MES_OPT_TEXT_COLOR 7
MES_OPT_OUTLINE 8
MES_OPT_TEXT_OFFSET 9
MES_OPT_ALPHA 10

enum mes_preset

Settings ClsMes::Preset applies to a message window (MesPreset in nd_meswin.hpp).

Name Value
MES_PRESET_FUKIDASHI 0
MES_PRESET_SYSTEM 1
MES_PRESET_PLAIN 2
MES_PRESET_NPC_NAME 3
MES_PRESET_WINDOW 4
MES_PRESET_SMALL_FUKIDASHI 5
MES_PRESET_WINDOW_REVEAL 6

enum mes_source

Message buffer _MES_SET_BUFF points a window at: 0 calls ClsMes::SetBuff with the sysmes.mes buffer, any other value SetBuff_system with system.mes.

Name Value
MES_SOURCE_SYSMES 0
MES_SOURCE_SYSTEM 1

enum mes_window_mode

Frame a message window draws around its text (MesWindowMode in nd_meswin.hpp).

Name Value
MES_WIN_NONE 0
MES_WIN_FUKIDASHI 1
MES_WIN_HELP 2
MES_WIN_FLOATING 3
MES_WIN_VERSATILE_1 4
MES_WIN_YESNO 5
MES_WIN_VERSATILE_3 6
MES_WIN_BOTTOM 7
MES_WIN_VERSATILE_4 8
MES_WIN_DQ_FUKIDASHI 9
MES_WIN_DQ_FUKIDASHI_2 10
MES_WIN_CENTRE 11
MES_WIN_PLAIN 12

enum message_se

Sound _MES_SE_PLAY plays: 0 and 1 play system sound 25 (scripts use them for confirm and cancel on a message), 2 SYSTEM_SE_CURSOR, 3 SYSTEM_SE_DECIDE.

Name Value
MES_SE_CONFIRM 0
MES_SE_CANCEL 1
MES_SE_CURSOR 2
MES_SE_DECIDE 3

enum movie_caption_mode

Mode of _SET_MOVIE_CC.

Name Value
MOVIE_CAPTION_ENABLE 0
MOVIE_CAPTION_SET 1

enum npc_model_set

Which model _LOAD_CHARA_NPC loads: 0 the character model (NPC_MODEL_PATH_CHARA), any other value the event train model (NPC_MODEL_PATH_EVENT_TRAIN).

Name Value
NPC_MODEL_CHARA 0
NPC_MODEL_EVENT_TRAIN 1

enum npc_status

Party character status bits CUserDataManager::SetPartyCharaStatus stores: 1 in the party now, 2 joined and waiting in town, 4 living in a house, and 128 alone records the character as joined with full ability points.

Name Value
NPC_STATUS_IN_PARTY 1
NPC_STATUS_JOINED 2
NPC_STATUS_RESIDENT 4
NPC_STATUS_JOIN 128

enum pad_button

Controller button bits as CGamePad reports them (gamepad.hpp PadButton).

Name Value
PAD_L2 1
PAD_R2 2
PAD_L1 4
PAD_R1 8
PAD_TRIANGLE 16
PAD_CIRCLE 32
PAD_CROSS 64
PAD_SQUARE 128
PAD_SELECT 256
PAD_L3 512
PAD_R3 1024
PAD_START 2048
PAD_UP 4096
PAD_RIGHT 8192
PAD_DOWN 16384
PAD_LEFT 32768

enum photo_subject_kind

What a photo's subject number means in CheckInventPhoto: USER_PICTURE_INFO neta_id, npc_no or monster_no.

Name Value
PHOTO_SUBJECT_IDEA 0
PHOTO_SUBJECT_NPC 2
PHOTO_SUBJECT_MONSTER 3

enum pull_item_type

Kind of pickup that flies to the player (dng_object.hpp PULL_ITEM_TYPE).

Name Value
PULL_ITEM_MONEY 0
PULL_ITEM_WEAPON_EXP 1
PULL_ITEM_GATE_KEY 2
PULL_ITEM_MONEY_LARGE 3
PULL_ITEM_ITEM 4
PULL_ITEM_ITEM2 5
PULL_ITEM_BADGE 6
PULL_ITEM_STOLEN 7

enum quest_get_command

Command of _GET_QUEST_ETC.

Name Value
QUEST_GET_STATUS 0

enum quest_set_command

Command of _SET_QUEST_ETC: 0 calls QuestRequestSetFlag, 1 QuestRequestClear.

Name Value
QUEST_SET_ACCEPTED 0
QUEST_SET_CLEARED 1

enum flag_engine

Save bit flags the engine itself names (SAVE_BIT_FLAG in savedata.hpp, kBitFlagGekkaView in editmenu.cpp, bit_flag_tour_cycled in menuaqua.cpp); other flag numbers stay plain.

Name Value
SAVE_FLAG_ROBO_BIKE_EVENT_SEEN 53
SAVE_FLAG_TOUR_CYCLED 63
SAVE_FLAG_ITEM_BOARD_EXPANDED 254
SAVE_FLAG_TOURNAMENT_STARTED 344
SAVE_FLAG_TOURNAMENT_CYCLE 424
SAVE_FLAG_EDIT_BLOCKED 520
SAVE_FLAG_GEKKA_VIEW 702
SAVE_FLAG_COSTUME_UNLOCK 799

enum save_get_command

Command of _GET_SAVEDATA_ETC.

Name Value
SAVE_GET_PROGRESS 0
SAVE_GET_BADGE 1
SAVE_GET_ELECTRIC_FISH 2
SAVE_GET_BAIT 3
SAVE_GET_PLAY_TIME 4
SAVE_GET_CAPTION_OFF 5
SAVE_GET_TOUR_TYPE 6

enum save_set_command

Command of _SET_SAVEDATA_ETC.

Name Value
SAVE_SET_PROGRESS 0
SAVE_SET_BADGE 1
SAVE_SET_REPAIR_ALL 2
SAVE_SET_SKIP_LOAD_BGM 3
SAVE_SET_DELETE_ELECTRIC_FISH 4

enum scene_chara_type

Scene type of a character slot as CScene::SetType stores it: colprim.cpp lets type 1 be hit only by attacks aimed at the player and type 3 only by attacks aimed at monsters, and dng_main.cpp draws type 4 in the later pass.

Name Value
SCENE_CHARA_TYPE_PLAYER 1
SCENE_CHARA_TYPE_MONSTER 3
SCENE_CHARA_TYPE_LATE_DRAW 4

enum scene_cmr_sync_mode

How the event camera turns while it orbits an object (sceneseq.hpp SceneCmrSyncMode).

Name Value
SCENE_CMR_SYNC_FIXED 0
SCENE_CMR_SYNC_YAW 1
SCENE_CMR_SYNC_FRAME 2

enum scene_data_kind

List of scene slots a call addresses (scene.hpp SCENE_DATA_KIND).

Name Value
SCENE_DATA_CHARA 1
SCENE_DATA_MAP 2
SCENE_DATA_MESSAGE 3
SCENE_DATA_CAMERA 4
SCENE_DATA_SKY 5
SCENE_DATA_GAMEOBJ 6
SCENE_DATA_EFFECT 7

enum scene_seq_ease

Speed curve of an eased camera or actor move or turn (sceneseq.hpp SceneSeqEase).

Name Value
SCENE_SEQ_EASE_IN_OUT 0
SCENE_SEQ_EASE_IN 1
SCENE_SEQ_EASE_OUT 2

enum scene_status

Status bits of a scene slot: the shared slot bits (scene.hpp SCENE_DATA_STATUS) and the character slot bits (scenevillager.hpp SCENE_CHARA_STATUS).

Name Value
SCENE_DATA_LOADED 1
SCENE_DATA_ACTIVE 2
SCENE_DATA_ASSIGNED 4
SCENE_CHARA_NO_SHADOW 8
SCENE_CHARA_HIDE 16
SCENE_CHARA_EXCLAMATION 32
SCENE_CHARA_NO_LIGHTING 64
SCENE_CHARA_NO_FADE 128
SCENE_CHARA_NO_DIST 256
SCENE_CHARA_NO_MODEL 512

enum chara_slot_engine

Scene character slots the engine always fills the same way (charasetup.cpp, LoadGameObject). 1 to 5 hold the controlled character's weapons or the Ridepod's parts; villagers take 8 to 23 and 24 to 31 in an order that changes with the story, and scripts reuse those slots for their own characters, so those have no names.

Name Value
CHARA_PLAYER 0
CHARA_TIME_GATE_MARKER 120
CHARA_TIME_GATE_BASE 121
CHARA_SAVE_POINT 122
CHARA_SAVE_BOOK 123

enum se_bank

Scene sound bank whose id _GET_SND_ID reads: CScene se_env_id, se_base_id (1 to 3), se_battle_id, or a sound source through GetSeSrcID.

Name Value
SE_BANK_ENV 0
SE_BANK_BASE 1
SE_BANK_BASE_2 2
SE_BANK_BASE_3 3
SE_BANK_BATTLE 4
SE_BANK_SOURCE 5

enum snd_port

Sound port of the sound manager (snd_mngr.hpp sndPORT).

Name Value
SND_PORT_BGM 0
SND_PORT_OB 1
SND_PORT_ENV 2
SND_PORT_BASE 3
SND_PORT_EVENT 4
SND_PORT_ENEMY 5
SND_PORT_SYSTEM 6
SND_PORT_CHARA 7
SND_PORT_MENU 8
SND_PORT_BATTLE 9
SND_PORT_BGM2 11

enum stopwatch_command

Command of _STOPWATCH.

Name Value
STOPWATCH_START 0
STOPWATCH_STOP 1
STOPWATCH_LIMIT 2
STOPWATCH_LAYOUT 3

enum subgame_type

Minigame that sgInitSubGame starts (subgame.hpp SUBGAME_TYPE).

Name Value
SUBGAME_NONE 0
SUBGAME_FISHING 1
SUBGAME_GYORACE 2
SUBGAME_BUGGY 3
SUBGAME_UNUSED 4

enum treasure_box_state

State of a treasure box slot (TreasureBoxState in dng_event.hpp); 2 keeps the box but drops it from the mini map and the nearest-box search, so it can no longer be opened.

Name Value
TREASURE_BOX_STATE_NONE 0
TREASURE_BOX_STATE_UNOPENED 1
TREASURE_BOX_STATE_OPENED 2

enum memory_stack

Scene memory stack a load allocates from (CScene::stack[], bound in editloop.cpp for town and dng_main.cpp for dungeons): 0 player characters, 1 main map data, 2 main map characters, 3 sub data, 4 sub map characters, 5 to 8 the four event buffers. Clearing a stack also clears every stack above it.

Name Value
MEMORY_STACK_PLAYER 0
MEMORY_STACK_MAIN_DATA 1
MEMORY_STACK_MAIN_CHARA 2
MEMORY_STACK_SUB_DATA 3
MEMORY_STACK_SUB_CHARA 4
MEMORY_STACK_EVENT 5
MEMORY_STACK_EVENT_2 6
MEMORY_STACK_EVENT_3 7
MEMORY_STACK_EVENT_4 8

enum equip_slot

Equipment slot of a party character (userdata.hpp CHARA_DATA::equip[5]): the two weapons, then the hat, shoes and body costume. Extends action.h's existing equip_slot with slots 3 and 4.

Name Value
EQUIP_MAIN_WEAPON 0
EQUIP_SUB_WEAPON 1
EQUIP_HAT 2
EQUIP_SHOES 3
EQUIP_BODY 4

enum user_chara

Playable character a party-data native addresses (userdata.hpp USER_CHARA): Max, Monica, the Ridepod, or Monica's monster form. Natives that read equipment accept only 0 and 1.

Name Value
USER_CHARA_MAX 0
USER_CHARA_MONICA 1
USER_CHARA_ROBO 2
USER_CHARA_MONSTER 3

enum stream_channel

Stream number the stream natives take; the engine discards it and always uses its event stream, number 1 (event_func.cpp event_stream), which is the only value scripts pass.

Name Value
STREAM_CHANNEL_EVENT 1

enum screen_x

Horizontal position on the 512 x 416 screen that full-screen event sprites are laid out in (mglib.cpp GetScreenSize; set_sprite_size stretches 416 to fill the 480-line PAL screen).

Name Value
SCREEN_WIDTH 512

enum screen_y

Vertical position on that 512 x 416 screen.

Name Value
SCREEN_HEIGHT 416

enum color_level

Colour and alpha level of an event sprite, where 128 is 1.0: full alpha, and a colour that leaves the texture as it is (eventsprite.cpp CEventSprite2 defaults).

Name Value
COLOR_FULL 128

Value kinds

Typedef aliases that indicate what a parameter value represents (see Value kinds).

Kind Type What it is
message any Value kinds: what a parameter's value means. They read as their base type; the decompiler uses them to comment values (a message id gets the line it shows, read from the disc).
message_file string
directory string
item_id int
map_id any
flag int
bgm_file int
sound_set int
system_se int
chara_slot int
npc_id int
monster_kind int
chara_pack string