Skip to content

User Manual: Scripts

Raylynx Creations edited this page Apr 23, 2026 · 5 revisions

Battle scripts

scr_battle_backgrounds - Battle backgrounds

image

This scripts holds all constants and function to create your own custom battle backgrounds, all you need to do is use the constant to determinate what type of background is gonna be used.

Usually the function takes two parameters being the name being the constant representing the battle background and depth at which the background is gonna be located when drawing, the function then creates an obj_renderer (for more information on this object check obj_renderer page) which will be in charge of rendering the background at the depth level specified.

Since an object is used to render the background, it contains all properties an object has, but we only care about its depth, and its events that it can run which are step, draw and clean_up, the essential you need to run your own logic for background drawing, inside the function that creates them those methods are assigned so the background can come to life, with the draw method alone should be enough, but for more complex battle backgrounds you can use step method to do the heavy numeric logic and just focus on drawing.

If you're looking to make reactive background so in attacks it behaves differently or generates even bullets for attacks then you can use some global variables to control that or access the properties of the target object or struct so you can control them in a remote way.

More on how to create battle backgrounds is found in the User Manual: Battle backgrounds page.

scr_random_encounter - Random encounter functions

image

a

scr_enemies - Enemies

image

a

scr_enemie_attacks - Enemy normal attacks

image

a

scr_enemie_bullets - Enemy bullet behaviors

a

scr_menu_attacks - Enemy menu attacks

a

scr_flee_events - Flee events

image

a

scr_player_attacks - Player attacks

image

a

Overworld scripts

scr_cell_functions - Cell option behaviors

image

a

Utility scripts

scr_custom_dialog_functions - Custom user made functions/behaviors

image

a

scr_item_functions - Item function behaviors

image

a

General scripts

scr_game_constants - Game constant configuration

image

a

scr_game_menu - Game menu

image

a

scr_game_settings - Game settings configuration

a

scr_get_texts_functions - Auxiliar language text files fetching functions

image

a

scr_initial_save_file_data - Initial save file configuration

image

a

scr_language_texts - Language translation

a

scr_room_border_ids - Room border definition

a

scr_room_music_ids - Overworld room music definition

a

Clone this wiki locally