Buddies

From Rivals of Aether Unofficial Workshop Manual

Custom buddies are structured the same way as custom characters, with config.ini and the following folders: /sprites, /scripts, /sounds. You can read more about this structure in the File Structure page. A good way to start making one is to use a blank buddy template or the Sandbert Jr. buddy template, both of which can be found in Other Coding Infos.


The core buddy folder should also include:

  • icon [15x15px] – used for the in-game buddies sub-menu
  • preview.png [any size, but 16:9 aspect ratio, 960×540 recommended] – used in the preview window on the Steam Workshop website.

A buddy can only execute the scripts load.gml, update.gml, pre_draw.gml and post_draw.gml.

The default names of Buddy Sprites also differ from the ones used by characters.


By default, a buddy is not affected by its owner’s custom colors. However, you can define a list of characters you want to affect your buddy’s colors by calling add_compatible_urls(). The function accepts both urls of published workshop characters and default character indexes. If you want the buddy to be affected by any character’s custom colors, pass all to the function.

Examples[edit | edit source]

// load.gml
// this buddy can only borrow Zetterburn's and Sandbert's custom colors:
add_compatiable_urls( CH_ZETTERBURN, 1865940669 );

// load.gml
// this buddy will borrow any character's custom colors (including both workshop and default ones):
add_compatiable_urls( all );

Variables[edit | edit source]

These are all the variables you can access for pet_obj:

Variable Default Description
type 0 The type of buddy.

0= Grounded1= Flying

can_switch_type false Whether the buddy will automatically switch type after going through the wait animation. (In the air, the buddy will fly toward their landing point, then go into the wait animation.)
idle_spr sprite_get( “idle”) The sprite to loop when idle.
run_spr sprite_get(“run”) The sprite to loop when running.
turn_spr sprite_get(“turn”) The sprite to play when turning around (should turn from facing left to right.)
ledge_spr sprite_get(“ledge”) The sprite to play when idling at ledge.
wait_spr sprite_get(“wait”) The sprite to play when idling normally.
taunt_spr sprite_get(“taunt”) The sprite to play when taunting.
pet_w 30 The approximate width of the buddy, in pixels.
run_speed 3 The speed of the run state, in pixels per frame.
max_run_dist 200 The distance you can get away from the buddy before it starts to run toward you. Should be a fair bit more than double pet_w to avoid stuttering.
state The current state of the buddy.

“idle”“run”“taunt”

teetering If the buddy is in their ledge animation. Only relevant if state == “idle”
waiting If the buddy is in their wait animation. Only relevant if state == “idle”
state_timer The number of frames since starting the current state. This value is also reset when starting the ledge or wait animations.
owner The instance_id of the player that owns this buddy.
player The player number of the buddy's owner.

Extra Variables[edit | edit source]

When can_switch_type is set to true, you will also need to initialize the following variables:

Variable Description
grnd_idle_spr The sprite to loop when idle on ground.
grnd_run_spr The sprite to loop when running on ground.
grnd_turn_spr The sprite to play when turning on ground. Should turn from facing left to right.
grnd_wait_spr The sprite to play when idling on ground. Should transition from grnd_idle_spr to air_idle_spr.)
grnd_taunt_spr The sprite to play when taunting on ground.
air_idle_spr The sprite to loop when idle in the air.
air_run_spr The sprite to loop when moving in the air.
air_turn_spr The sprite to play when turning in the air. Should turn from facing left to right.
air_wait_spr The sprite to play when idling in the air. Should transition from air_idle_spr to grnd_idle_spr.)
air_taunt_spr The sprite to play when taunting in the air.
idle_timer Is set to 0 when the buddie's state is "idle".
Cookies help us deliver our services. By using our services, you agree to our use of cookies.