Rivals of Aether

Rivals of Aether

Sandbert(ASSIST)
Bulldoger  [developer] 26 Feb, 2023 @ 6:33am
Assist Buddy Creation Tutorial
Hello reader, in here you'll find useful things to know when making an assist
using this assist buddy template.

DISCLAIMER: Buddies are limited! If you want to make a complex buddy,
you will most likely have to find a workaround for some issues! However, as long as you
follow the instructions, a simple assist which does an attack will work.

REQUIRED ASSETS
-Large Portrait (158x62, the face close-up you would see in a win screen).
-Small portrait for meter (16*16, scaled up by 2).
-An attack strip for the assist, called assist_attack.
-A sound for when the assist is charged.
-A sound for when the assist is activated.
-The buddy's icon and preview.

OPTIONAL:
-Any dust or hit effects of your choosing. Use spawn_assist_dust_fx() for dust effects.
-Any other sound effects.

TO START CREATING YOUR ATTACK
In init.gml, you can find a template attack. You can fill it in like you would any other
attack for a character. The attack strip must be called assist_attack, don't worry about
setting it in there.
For the attack and window values, only the ones
already present will work, but for the hitboxes anything works. Be sure to keep the hitbox as a
projectile, though; in the tips section you can find how to convert it to a "physical hitbox".



IMPORTANT:
-HITBOXES CAN ONLY BE PROJECTILES! THIS CAUSES THEM TO HAVE NO HITBOX GROUP!
You CAN make a complex hitbox shape using masks! If you create a shape in an image editor
and use that as the projectile mask, you can have any hitbox shape you want.
KEEP HITBOX_TYPE AT 2
-The assist is permanently in 0-gravity. Hspeed and vspeed set is the speed
applied every frame.
-If you want your character to have the HUD element in another position,
make a variable called assistHUDOffset and change the numbers in the array to an
x and y offset respectively
-Buddies can't run scripts like hit_player.gml and got_hit.gml, therefore there are
blocks of code that replace those types of scripts in update.gml. They are clearly marked.
If you want to spawn a visual effect manually, use assist_spawn_dust_fx()

TIPS:
If you want the hitbox to move along with the buddy, set both the hitbox's hspeed and vspeed
together with the buddy's hspeed and vspeed.
If you want the hitbox to work like a physical one, set these values for the hitbox.
set_hitbox_value(atk, hitbox_num, HG_PROJECTILE_MASK, -1);
set_hitbox_value(atk, hitbox_num, HG_PROJECTILE_SPRITE, sprite_get("invisible"));
set_hitbox_value(atk, hitbox_num, HG_PROJECTILE_HSPEED, 0);
set_hitbox_value(atk, hitbox_num, HG_PROJECTILE_VSPEED, 0);
set_hitbox_value(atk, hitbox_num, HG_PROJECTILE_GRAVITY, 0);
set_hitbox_value(atk, hitbox_num, HG_PROJECTILE_GROUND_FRICTION, 0);
set_hitbox_value(atk, hitbox_num, HG_PROJECTILE_AIR_FRICTION, 0);
set_hitbox_value(atk, hitbox_num, HG_PROJECTILE_WALL_BEHAVIOR, 1);
set_hitbox_value(atk, hitbox_num, HG_PROJECTILE_GROUND_BEHAVIOR, 1);
set_hitbox_value(atk, hitbox_num, HG_PROJECTILE_ENEMY_BEHAVIOR, 1);
set_hitbox_value(atk, hitbox_num, HG_PROJECTILE_UNBASHABLE, true);
set_hitbox_value(atk, hitbox_num, HG_PROJECTILE_PARRY_STUN, true);
set_hitbox_value(atk, hitbox_num, HG_PROJECTILE_DOES_NOT_REFLECT, true);
set_hitbox_value(atk, hitbox_num, HG_PROJECTILE_IS_TRANSCENDENT, true);
set_hitbox_value(atk, hitbox_num, HG_PROJECTILE_PLASMA_SAFE, true);

Now, let’s go through the process of making an assist buddy.
1. Concept. Think of what you want your buddy to do. Think of something iconic for the character, or something mechanically interesting.
In this case, I went for Zhongli from Genshin Impact, with his shield skill. He will use Dominus Lapidis; create a stone pillar, which is a hitbox, and simultaneously give the player a shield effect.

2. Make a base sprite. You can do this step later of course, but it helps with visualizing the attack. Call it assist_attack. Be sure to set offsets in the buddy’s load.gml!



3. Set the assist’s init parameters. Open the buddy’s init.gml and go down to the comment with “ASSIST SPECIFIC”. You can tailor yout buddy here. Most important are assistMeterMax and chargeSpeed., as well as assistTimerMax and assistSpawnOffset. assistTimerMax should be the full time your assist is on the battlefield. The sounds can be changed to your liking.
The large portrait’s size can be changed but please just leave it at 158*62 pixels.
For Zhongli, I set the meter to 80 (you need 80% dealt to activate the assist) and kept the assistTimerMax at 60. I left chargeSpeed untouched and made Zhongli appear behind you, using assistSpawnOffset.

4. Make the attack. You can fill in the attack in init.gml, after the comment saying "you can create the attack in here".

It will translate to an attack made by the buddy in-game. Be sure to keep the hitbox’s type at 2, and remember, only use the attack and window values provided! You can have multiple windows fine, just do window_num++ before you set the values for window 2. You can give the hitboxes any hitbox values except for type. If you want a complex-shaped hitbox, you can draw one and set the hitbox’s projectile mask to that. If you want a hitbox to work like a physical one, use the hitbox values I provided.
I gave Zhongli a single physical hitbox, for his stone pillar. I did some coding to give the owner a shield as well, using the various script replacements in the buddy’s update.gml.
IMPORTANT! If you change any attack values in update or init, you will have to call recompile_assist_attack() to actually update them.
5. Sprite the rest of the attack, as well as the portraits. Again, this can be done in any order, but I prefer this. Make a large 158*62 portrait as a face close up and make a 16*16 HUD icon. Name them the following:
The attack: assist_attack_strip<strip length>.png
The large portrait: portrait_big.png
The icon: portrait_small.png
6. Polish. Add hit effects, sounds, whatever you feel is neccesary to finish the assist.
7. That’s it! Assist done! Now you can upload it like any other piece of workshop content, just be sure to link this workshop item so other people can make their own assists ;).