Skip to content
agrastiOs edited this page Feb 25, 2016 · 3 revisions

Actions

Like most RPGs, battles are an integral part of EarthBound, and what better way to fight than with yo-yos, baseball bats, and PSI Rockin'? Of course, the properties of these actions have to be defined somewhere, and that's what we'll look at in this chapter.

List of files used:

  • battle_action_table.yml

Configuring Battle Actions

The battle_action_table.yml file describes every single possible action that can be taken during a battle by either side, be it using a PSI ability, an item, or any of the miscellaneous abilities available. Let's take a look at the entry for PSI Rockin:

12:
  Action type: psi
  Code Address: $c29568
  Direction: enemy
  PP Cost: 40
  Target: all
  Text Address: $ef8543
  • Action type - Defines whether it is a psi ability, an item's action, a physical attack (which can be a physical (affected by shields and defending) attack or a physical (unaffected by shields and defending) attack), an other action (such as Paula's Pray), or nothing (which you should never use, but exists nonetheless).
  • Code Address - Indicates the location of the assembly code to be executed when this action is triggered, whether through a pointer or a CCScript label (see the next section).
  • Direction - Indicates whether the action should happen to the enemy or to the party; the actual group referenced by this varies depending on who is using the action, whether it is one of the player characters or an enemy.
  • PP Cost - The amount of PP points which will be subtracted from the ability-user's statistics.
  • Target - Can either be all (to indicate all enemies or all party members), one (to indicate a specific character), row (to indicate a row of enemies), random (to randomly select an enemy) or none (for miscellaneous battle actions).
  • Text Address - Takes either a pointer or a CCScript label to the text to use as the action's text displayed when it has been used.

Modifying PSI and Battle Items' Damage

This nifty CCScript file can change the damage of PSI and some items! Download

Modifying Actions' Effects

Now while editing PSI Power costs and targets can sound like the most exciting past-time since eating sliced bread was invented, it is a lot more rewarding to actually create completely new actions that change the purpose of PSI Abilities – whether this is to heal more, to make enemies instantly die, or whatever other crazy effect your brain can come up with!

Lamentably, while CoilSnake makes a lot of things easy, it still requires the use of ASM (assembly code) to modify the effects of battle actions. SNES programming is beyond the scope of this manual, but if you feel daring enough to learn this dark and ancient voodoo, you might be interested to know that you can write this code from within CCScript (see the CCScript tutorial for information on this), then reference it from within battle_action_table.yml.

Conclusion

With the power to change battle actions, you can find new and innovative ways to let your characters annihilate Giygas' minions (or even Giygas himself, with the mighty Smelly Sock of Doom!). The next step is to define these battle enemies...

Clone this wiki locally