» Uncategorized Posts

Skins

Skins are fairly self-explanatory if you’re familiar with the term already; they’re cosmetics that can potentially replace all of a characters’ sprites and sounds while keeping gameplay pretty much the same. When Workshop is enabled in the match rules, skins can be equipped by selecting a character, and then using the gear-shaped button that appears on the player window.

In terms of file structure as well as underlying behavior, they work similarly to a custom character. That means a lot of the Intruduction page applies here, as well. Same folders, same file structure.

The main difference here is the addition of a “character” property in the config.ini. This determines the character the skin is assigned to.

Templates

The following templates for every character contain all of the sprites they use, as well as scripts with every animation-related variable you can change and attack scripts for all of their attack properties. Most of the properties in the attacks folder won’t be changed unless an Advanced Skin is used, which is explained below.

Basic skins

Basic skins are meant to be purely cosmetic; changes are restricted to things that don’t affect actual gameplay, and can generally be safer to use in tournaments and a more competitive setting. (Though for tournament organizers, skins may still have terrible visual and audio clarity. That should be as bad as they get.) The scripts Basic skins run are:

  • load.gml – called right after the item is loaded into the game. This is where you would normally set sprites’ origins and bounding boxes. To help place origins correctly, use the Rivals Workshop Helper.
  • colors.gmlused to generate the alternate color palettes for the character.
  • init.gml – called once the player object is created. This is where you want to initialize most of the player variables. In basic skins, only certain animation-related variables will keep their changes from this script.

Basic skins also restrict the attack and hitbox properties you can set to the following:

  • AG_SPRITE
  • AG_AIR_SPRITE
  • AG_WINDOW_ANIM_FRAMES
  • AG_WINDOW_ANIM_FRAME_START
  • AG_WINDOW_HITPAUSE_FRAME
  • AG_WINDOW_HAS_SFX
  • AG_WINDOW_SFX
  • AG_WINDOW_SFX_FRAME
  • HG_VISUAL_EFFECT
  • HG_VISUAL_EFFECT_X_OFFSET
  • HG_VISUAL_EFFECT_Y_OFFSET
  • HG_HIT_SFX
  • HG_EXTRA_CAMERA_SHAKE
  • HG_PROJECTILE_SPRITE
  • HG_PROJECTILE_ANIM_SPEED
  • HG_PROJECTILE_DESTROY_EFFECT
  • HG_HIT_PARTICLE_NUM

Advanced skins

A skin can be switched to an Advanced skin by switching the “advanced” property in its config.ini to “1”. With this, you’re able to essentially create variants of the character with edited moves and properties.
The scripts Advanced skins run are:

  • load.gml – called right after the item is loaded into the game. This is where you would normally set sprites’ origins and bounding boxes. To help place origins correctly, use the Rivals Workshop Helper.
  • colors.gmlused to generate the alternate color palettes for the character.
  • init.gml – called once the player object is created. This is where you want to initialize most of the player variables.
  • update.gml – called every frame. Used for gameplay mechanics.
  • set_attack.gml – called at the beginning of every attack. Used to change things like Dspecial into Dspecial_air under certain conditions.
  • attack_update.gml – called every frame, but only if the character is performing an attack (attack type is stored inside the attack variable).
  • animation.gml – called every frame. Used for animation purposes such as changing the character’s sprite_index and image_index.
  • pre_draw.gml – used to draw sprites other than the player’s sprite. Everything will be drawn behind the player character.
  • post_draw.gml – used to draw sprites other than the player’s sprite. Everything will be drawn in front of the player character.

Advanced skins can also have any of their attack or hitbox properties changed. The templates have scripts for every attack the character uses (and then some), though they won’t necessarily be kept up to date with balance patches. If you want to use the base game’s current version of an attack property, simply delete the line that sets it, or use the // symbol to comment out the line.

get_bg_data

Returns the values of a custom stage’s specific background layer, using one of the following indexes:

Note that this only works on custom stages. Using this on a default stage will always return 0.

ArgumentTypeDescription
layer:realThe layer to check. Layers 1-6 are background, Layer 7 is ground level, and layers 8-9 are the foreground.
data:realThe data index to check. Can be one of the indexes listed above.

Example, called from a stage’s article1_update.gml:
//This will make the article's Y coordinate move at the same rate as the first background layer's Y-autoscroll speed.
y += get_bg_data(1, BG_LAYER_AUTOSCROLL_Y);

set_bg_data

Sets the values of a custom stage’s specific background layer.

You can set the following indexes:

Note that this only works on custom stages. Using this on a default stage will do nothing.

ArgumentTypeDescription
layer:realThe layer to change.Layers 1-6 are background, Layer 7 is ground level, and layers 8-9 are the foreground.
data:realThe data index to set. Can be one of the indexes listed above.
value:realThe value the data will be set to.

Example, called from a stage’s update.gml:
//This will cause the first background layer to sway up and down by 10 pixels over time.
set_bg_data(1, BG_LAYER_AUTOSCROLL_Y, sin(get_gameplay_time()) * 10 );

set_victory_sidebar

Overwrites character’s results screen sidebar image. (the one displaying their placement, defaulting to results_small.png.) Can be assigned to a 79x31px custom sprite using

sprite_get( sprite )  Reference→

ArgumentTypeDescription
sprite:realThe custom sprite to use

Example, called from load.gml:

set_victory_sidebar( sprite_get( "custom" ));

set_victory_portrait

Overwrites character’s victory portrait. Can be assigned to a 350x350px custom sprite using

sprite_get( sprite )  Reference→

ArgumentTypeDescription
sprite:realThe custom sprite to use

Example, called from load.gml:

set_victory_portrait( sprite_get( "custom" ));