Introduction

A continuation of the introduction to the YAML format describing the skills used by the creatures in game. This post provides an example of the workflow for creating the file describing a skill.

Workflow:

  1. Pick Attack
Stomp:
  1. Pick Animation for the Attack. It is not necessary to, but it is easier to map it to an aliased name like Anim, as then changing the speed can be done in a single place rather than multiple.
Stomp:
    Using:
        Anim: Stomp@3x # 3 cycles per second
  1. Calculate the SP cost from the PP of the move. Store it as a COST variable. Can also use a DAMAGE or DMG varialbe if you want.
Stomp:
    Using:
        Anim: Stomp@3x # 3 cycles per second
    Set:
        COST: 500/20
        DMG: 65
  1. Add the animation segments. In general, these will just be Setup, Launch, Recover. But you can have more complex animations for things like Thrash or Earthquake or Solar Beam where multiple animations are used in sequence. In that case, you need separate labels for them (they can't all be Anim, as that is ambiguous).
Stomp:
    Using:
        Anim: Stomp@3x # 3 cycles per second
    Set:
        COST: 500/20
        DMG: 65
    Sequence:
        - Anim.Setup:
        - Anim.Launch:
        - Anim.Recover:
  1. Add the Cost in the Setup or Launch segments. I like a division of about half the cost occurring over time during the Setup (so you can't use and then dodge-cancel for free, but it doesn't cost that much as long as you cancel before it is launched. But if the attack has been launched, even if it is interrupted by another attack (Protect or such) we want the cost to still apply, so we do it on the initial frame.
Stomp:
    Using:
        Anim: Stomp@3x # 3 cycles per second
    Set:
        COST: 500/20
        DMG: 65
    Sequence:
        - Anim.Setup:
            Cost: COST/T/2
        - Anim.Launch:
            Cost: COST*I/2
        - Anim.Recover:
  1. Add the interuption conditions. These are typically always the same, so we'll add them now Dodge/Impact in setup, HeavyImpact in Launch, Dodge/Impact in Recover, or just Impact if the user shouldn't be able to do anything for the recovery period. (HeavyImpact also counts as an Impact, so need not be listed separately).
Stomp:
    Using:
        Anim: Stomp@3x # 3 cycles per second
    Set:
        COST: 500/20 # 500/PP rounded to nearest multiple of 5
        DMG: 65
    Sequence:
        - Anim.Setup:
            Cost: COST/T/2
            Interruptible: [Dodge,Impact]
        - Anim.Launch:
            Cost: COST*I/2
            Interruptible: [HeavyImpact]
        - Anim.Recover:
            Interruptible: [Impact]
  1. If conditions need to be applied, e.g. Checking for Sunny Weather for Solarbeam there are a couple of options.
    • For Solar Beam, for example, the check should only be done at the beginning I have decided, the first frame. For that we would add it as a Set: variable to the overall attack, as that is only set at the beginning of the attack.
    • For a live update, the value should be done within a Set: within the segment it is needed.
    • For most moves, there isn't anything conditional like this, so you don't need to worry about it.
Solar Beam:
    Using:
        Anim: ...
    Set:
        COST: 500/10
        DMG: 120
        FAST: Weather.Sunny
    Sequence:
        # I haven't fully decided how the branching should be done on the FAST variable. So you can just write it in some way that makes sense, like 
        - Noop@0s: # To go to the beam action if we don't need the "turn" of charging. 0 second segment completes immediately.
            GoTo:
            - Segment: 3
              If: FAST
  1. (Back to normal attacks like Stomp) Add movement restrictions as appropriate. Moves may or may not require them, and may not need the same. E.g. Earthquake definitely needs some movement restriction no spritely running around while stomping to create earthquakes. But what the restrictions are may vary e.g. falling/ground-impact moves probably need a fast-fall enforced, but most others should be executable during a jump and such (flamethrower). Basically just think about what would make sense in Super Smash Bros during the attack, and during the different portions of it.
Stomp:
    Using:
        Anim: Stomp@3x # 3 cycles per second
    Set:
        COST: 500/20 # 500/PP rounded to nearest multiple of 5
        DMG: 65
    Sequence:
        - Anim.Setup:
            Cost: COST/T/2
            Interruptible: [Dodge,Impact]
            Motion:
                Horizontal: 0.5 # Half speed
        - Anim.Launch:
            Cost: COST*I/2
            Interruptible: [HeavyImpact]
            Motion:
                Horizontal: 0.5 # Half speed
                Fall: Fast # Forced Fast-Fall
        - Anim.Recover:
            Interruptible: [Impact]
            Motion: Last
  1. Add any spawned nodes that are needed for projectiles and such. E.g. if we pretended Stomp should shoot out something from the foot it would be:
Stomp:
    Using:
        Anim: Stomp@3x # 3 cycles per second
    Set:
        COST: 500/20 # 500/PP rounded to nearest multiple of 5
        DMG: 65
    Sequence:
      - Anim.Setup:
          Cost: COST/T/2
          Interruptible: [Dodge,Impact]
          Motion:
              Horizontal: 0.5 # Half speed
      - Anim.Launch:
          Cost: COST*I/2
          Interruptible: [HeavyImpact]
          Motion:
              Horizontal: 0.5 # Half speed
              Fall: Fast # Forced Fast-Fall
          Spawn: # Being able to spawn nodes is needed so we can attach both a hitbox and an FX to a projectile.
            - Name: Projectile
              At : Anim:SpawnPoint The Location to attach to. See discussion with FX below.
              Every: 0.05 # How often to spawn them, in seconds, if it is repeated.
              Endures: True # True if it needs to endure beyond the current (here Anim.Launch) segment.
      - Anim.Recover:
          Interruptible: [Impact]
          Motion: Last
  1. Add FX. I'm putting this before Hitboxes as it defines the visual and sound effects that are actually seen by the player, so it should look nice and make sense, and then the hitboxes should be defined to match the FX.
FX:
  "Location":
    - List
    - Of
    - FX
  "Other":
    - List

In general we will use the Anim:SpawnPoint location, which defines where projectiles or FX should be created for an attack. So on the Fist for Punches or Foot for Stomp, etc. Some other locations we can have are Spawn:<SPAWN_NAME>, or Ground for a ground node, or Ground:<OTHER_LOCATION> to project another location onto the ground, such as the foot/SpawnPoint for Stomp, or Self if it should be applied to the Mon itself (e.g. recoloring part of it for an FX like Metal Claw), or Target for the targets that have been hit by the attack. Because these haven't been created yet, it is very important to include a comment describing what is meant for the FX so we don't forget what we wanted to do later when it is actually implemented. The 2 word or so short form to specify which FX (will be the filename for the FX) is probably not enough. So for Stomp we could have:

Stomp:
    Using:
        Anim: Stomp@3x # 3 cycles per second
    Set:
        COST: 500/20 # 500/PP rounded to nearest multiple of 5
        DMG: 65
    Sequence:
      - Anim.Setup:
          Cost: COST/T/2
          Interruptible: [Dodge,Impact]
          Motion:
              Horizontal: 0.5 # Half speed
          FX:
              Anim:SpawnPoint:
                - CollapsingMarkerRing:
                      Scale: 0.2
                      Color: Warning
      - Anim.Launch:
          Cost: COST*I/2
          Interruptible: [HeavyImpact]
          Motion:
              Horizontal: 0.5 # Half speed
              Fall: Fast # Forced Fast-Fall
          FX:
              Anim:SpawnPoint:
                - TackleWind # Fist/Tackle wind cone. Basically a bunch of streaks in a parabolic cone.
                - HoofMarker # 
              Target:ImpactPoint:
                - TwinkleStar # 4 pointed flashing white star at teh impact point
                - HoofImprint # Leave behind a black hoof mark on the body of the opponent
              Target:TrueGround: # Ground exists at the feet even in the air. TrueGround only exists if the target is on the ground.
                - DustRing # Poof out a dust ring on the ground at the target
              Target:
                - ForceCrouch # Briefly force into a crouch state
                - Meteor # Like smash bros being knocked to earth
              Target.1: # Targets for damage group 1 only
                - PushAwayAxial:
                    From: Anim:SpawnPoint
      - Anim.Recover:
          Interruptible: [Impact]
          Motion: Last
  1. Add in the Hitboxes and Damage for the attack. These specify a location they are attached to with the At: parameter (unless the shape of the attack is a body part). These should match the locations of the FX, in general. There are also special hitboxes that are based on the shape of the body, like Arm or Head, etc. By default a Hitbox uses DamageGroup 0, which uses the Damage and Bonus'es of the segment. You can also specify other ones, so that different parts of the attack can have different damage and/or bonuses. That requires adding DamageGroup:, a list of other damage groups (Damage, Bonuses, Target set). Note that Target: refers to all targets, Target:GroupINDEX: refers to specific targets for a given damage group for the attack. The DamageGroup list starts with 1, and the segment is index 0. If you prefer, they can be names instead of indices (e.g. otherDamageGroup: PushBack: Damage: 5 (but with newlines and indentation))
Stomp:
    Using:
        Anim: Stomp@3x # 3 cycles per second
    Set:
        COST: 500/20 # 500/PP rounded to nearest multiple of 5
        DMG: 65
    Sequence:
      - Anim.Setup:
          Cost: COST/T/2
          Interruptible: [Dodge,Impact]
          Motion:
              Horizontal: 0.5 # Half speed
          FX:
              Anim:SpawnPoint:
                - CollapsingMarkerRing:
                      Scale: 0.2
                      Color: Warning
      - Anim.Launch:
          Cost: COST*I/2
          Damage: DMG # A fixed value (no /T, etc.) is applied only once, on the first impact. This is damage group 0.
          DamageGroup:
              - Damage: 5 # Very weak damage for the impact ring
          Interruptible: [HeavyImpact]
          Motion:
              Horizontal: 0.5 # Half speed
              Fall: Fast # Forced Fast-Fall
          FX:
              Anim:SpawnPoint:
                - TackleWind # Fist/Tackle wind cone. Basically a bunch of streaks in a parabolic cone.
                - HoofMarker # 
              Target:ImpactPoint:
                - TwinkleStar # 4 pointed flashing white star at teh impact point
                - HoofImprint # Leave behind a black hoof mark on the body of the opponent
              Target:TrueGround: # Ground exists at the feet even in the air. TrueGround only exists if the target is on the ground.
                - DustRing # Poof out a dust ring on the ground at the target
              Target:
                - ForceCrouch # Briefly force into a crouch state
                - Meteor # Like smash bros being knocked to earth
              Target:Group1 # Targets for damage group 1 only
                - PushAwayAxial:
                    From: Anim:SpawnPoint
          Hitbox:
            - Shape: Sphere # Or just use `Shape: Foot` `At: User`.
              Radius: 0.5
              At: Anim:SpawnPoint # This is the "spawnpoint" for attack projectiles and such, so for Stomp it will be on the foot.
              Remove: False # Can hit arbitrarily many enemies with Stomp, so don't remove on impact
            - Shape: Cylinder # This will be the "Shockwave" from the stomp, pushing enemies back
              Radius: RANGE
              Height: 1
              At: Ground:Anim:SpawnPoint # Project the spawnpoint onto the ground for the pulse. I forgot how I split the damage up for these, I'll check later.
              Remove: False
              Group: 1 # Damage group. Default is 0, which uses the Damage and Bonus parameters and such specified in the segment
      - Anim.Recover:
          Interruptible: [Impact]
          Motion: Last
  1. Add in the bonus effects. E.g. Burn, Flinch, Stat Up/Down, etc. But also any effects on the control or motion of the hit mon (they should not be FX). Each one has a chance that is a percent value (like 25%) or a float that is the chance itself (0.25). There are only a few valid targets for a bonus, unlike FX, as FX can happen at arbitrary locations, but bonuses can only apply to the creatures. These options are Target, Self, Ally, Enemy, Others, All. For a double battle in pokemon, the last should generally make sense. Target refers to whoever actually gets hit by the attack, so will be generally used. All of the others are applied regardless of the whether it was hit or not, e.g. the whole battlefield is affected. If that is too limiting I can rework how that is done. For example, a set of bonuses that clear binding, raises speed, and burns the enemies would be:
     Bonus:
       All:
         - ClearEntryHazards: 100%
       Self:
         - Speed+1: 10%
         - ClearBinds: 100%
       Enemy:
         - Burn: 10%

    For stomp we don't have any turned-based game bonuses, but we do have a few to apply to the targets like a meteor effect. Previously I included them under attacks, but they should be moved as they are not just visual/auditory but are gameplay elements (only moving around spawned nodes is done as an FX, not control of characters).

    Stomp:
    Using:
        Anim: Stomp@3x # 3 cycles per second
    Set:
        COST: 500/20 # 500/PP rounded to nearest multiple of 5
        DMG: 65
    Sequence:
      - Anim.Setup:
          Cost: COST/T/2
          Interruptible: [Dodge,Impact]
          Motion:
              Horizontal: 0.5 # Half speed
          FX:
              Anim:SpawnPoint:
                - CollapsingMarkerRing:
                      Scale: 0.2
                      Color: Warning
      - Anim.Launch:
          Cost: COST*I/2
          Damage: DMG # A fixed value (no /T, etc.) is applied only once, on the first impact. This is damage group 0.
          DamageGroup:
            - Damage: 5 # Very weak damage for the impact ring
              Bonus:
                  Target:
                    - PushAwayAxial:
                          From: Anim:SpawnPoint
          Interruptible: [HeavyImpact]
          Motion:
              Horizontal: 0.5 # Half speed
              Fall: Fast # Forced Fast-Fall
          FX:
              Anim:SpawnPoint:
                - TackleWind # Fist/Tackle wind cone. Basically a bunch of streaks in a parabolic cone.
                - HoofMarker # 
              Target:ImpactPoint:
                - TwinkleStar # 4 pointed flashing white star at teh impact point
                - HoofImprint # Leave behind a black hoof mark on the body of the opponent
              Target:TrueGround: # Ground exists at the feet even in the air. TrueGround only exists if the target is on the ground.
                - DustRing # Poof out a dust ring on the ground at the target
          Bonus:
              Target:
                - ForceCrouch # Briefly force into a crouch state
                - Meteor # Like smash bros being knocked to earth
          Hitbox:
            - Shape: Sphere # Or just use `Shape: Foot` `At: User`.
              Radius: 0.5
              At: Anim:SpawnPoint # This is the "spawnpoint" for attack projectiles and such, so for Stomp it will be on the foot.
              Remove: False # Can hit arbitrarily many enemies with Stomp, so don't remove on impact
            - Shape: Cylinder # This will be the "Shockwave" from the stomp, pushing enemies back
              Radius: RANGE
              Height: 1
              At: Ground:Anim:SpawnPoint # Project the spawnpoint onto the ground for the pulse. I forgot how I split the damage up for these, I'll check later.
              Remove: False
              Group: 1 # Damage group. Default is 0, which uses the Damage and Bonus parameters and such specified in the segment
      - Anim.Recover:
          Interruptible: [Impact]
          Motion: Last
  2. Implement the FX and Bonuses as needed. FX creation will be necessary for most skills, I anticipate, but the Bonuses should be fairly rare after the initial ones are created. This part a specific editor (beyond just a text editor used for the above YAML) would be advisable for, as the FX especially require viewing the actual results to ensure they are aesthetically pleasing.

Previous Post Next Post