Question: Changing a Battle Command to a single spell
#7
You're going to run into a hard limit with the commands you can add: the game treats commands after 'Possess' differently (well, technically you can replace Magitek but then you have to rework that rider status), and trying to get it to allow them from a battle menu call will be an uphill battle.

However... something could be coded to allow a single command to perform different spells based on the caster who uses it.  You would make this command (say, "SPECIAL") set the spell based on the actor ID of the character who calls it.  Granted, this would break the ability to mimic the command or set it on a Gogo-esque character, but from what you described as your goal that might not be a problem.


Health and Shock have hardcoded animations based on their command IDs (GP Rain does too).  To get around that, you can change the command ID to #02 (MAGIC) in your block of code (by storing it in $b5) before executing a hit.  However, this will make monsters that counter the magic command counter your special command as well.

Here's the locations of the command pointers, taken from Assassin's C2 Disassembly.
Code:
Code pointers for commands; special commands start at C2/1A03

C2/19C7: C8 15     (Fight)
C2/19C9: 97 18     (Item)
C2/19CB: 41 17     (Magic)
C2/19CD: 36 19     (Morph)
C2/19CF: 27 19     (Revert)
C2/19D1: 91 15     (Steal)   (05)
C2/19D3: 10 16     (Capture)
C2/19D5: 47 18     (Swdtech)
C2/19D7: 8D 18     (Throw)
C2/19D9: 85 18     (Tools)
C2/19DB: 9D 15     (Blitz)   (0A)
C2/19DD: 5B 19     (Runic)
C2/19DF: 5F 17     (Lore)
C2/19E1: 1F 15     (Sketch)
C2/19E3: 76 19     (Control)
C2/19E5: 26 17     (Slot)
C2/19E7: 60 15     (Rage)    (10)
C2/19E9: 9D 19     (Leap)
C2/19EB: 1E 15     (Mimic)
C2/19ED: 7D 17     (Dance)
C2/19EF: 4C 19     (Row)
C2/19F1: 6A 19     (Def.)    (15)
C2/19F3: F6 17     (Jump)
C2/19F5: 41 17     (X-Magic)
C2/19F7: 07 19     (GP Rain)
C2/19F9: 63 17     (Summon)
C2/19FB: 1E 17     (Health)  (1A)
C2/19FD: 1A 17     (Shock)
C2/19FF: E5 17     (Possess)
C2/1A01: 5F 17     (Magitek)
C2/1A03: B2 19     (1E) (Enemy Roulette)
C2/1A05: 1E 15     (1F) (Jumps to RTS)
C2/1A07: 72 50     (20) (#$F2 Command script)
C2/1A09: D1 50     (21) (#$F3 Command script)
C2/1A0B: 0B 50     (22) (Poison, Regen, and Seizure/Phantasm damage or healing)
C2/1A0D: 57 4F     (23) (#$F7 Command script)
C2/1A0F: 97 4F     (24) (#$F5 Command script)
C2/1A11: CD 50     (25)
C2/1A13: 5F 4F     (26) (Doom cast when Condemned countdown reaches 0; Safe, Shell, or
                        Reflect* cast when character enters Near Fatal (* no items
                        actually do this, but it's supported); or revival due to Life 3.)
C2/1A15: DD 50     (27) (Display Scan info)
C2/1A17: 1E 15     (28) (Jumps to RTS)
C2/1A19: 61 51     (29) (Remove Stop, Reflect, Freeze, or Sleep when time is up)
C2/1A1B: DE 20     (2A) (Run)
C2/1A1D: 2D 64     (2B) (#$FA Command script)
C2/1A1F: A8 51     (2C)
C2/1A21: B2 51     (2D) (Drain from being seized)
C2/1A23: FA 1D     (2E) (#$F8 Command script)
C2/1A25: 1A 1E     (2F) (#$F9 Command script)
C2/1A27: 5E 1E     (30) (#$FB Command script)
C2/1A29: 1E 15     (31) (Jumps to RTS)
C2/1A2B: 1E 15     (32) (Jumps to RTS)
C2/1A2D: 1E 15     (33) (Jumps to RTS)

As for making GP Rain into another 'cast spell' command like health, you're going to have to apply hex like the following with a hex editor like HxD.
EDIT 4/23/2020 [Stored to wrong variable, C2/190D changed from "85 B6" to "85 B5"]
[On Morendo's testing and discovery, changed C2/1911's "JMP $1765" to "JMP $1741"]
Code:
Spell [Was GP Rain]
C2/1907: A9 59        LDA #$59       (Spell d89 [h59], Empowerer)
c2/1909: 85 B6        STA $B6        (Set spell/animation)
c2/190b: A9 02        LDA #$02
%%%c2/190d: 85 B5        STA $B5        (Set command to Magic)
c2/190f: A9 05        LDA #$05
%%%c2/1911: 4C 41 17     JMP $1741      (Go into the SLOT command, display spell name and continue)
c2/1914: EA EA        NOP
This changes the spell being called by the command, tells the game to treat the command like magic, and then executes one hit.  If you want the command to skip MP depletion, you can change the LDA #$02 to LDA #$0F, Slot.  If you want it to keep a custom animation (default, throwing coins), then change c2/190b and c2/190d to 80 02 EA EA.

NOTE: This will take its targeting from the command, not the spell you select.  So, if you set the command to target all in FF3USME it will, even though Empowerer is single-target.  Getting the command to target based on spell targeting is a little more complicated; it draws some design from actions like Rage.  I've got notes on it, but not on hand at the moment... we can discuss it later if the need arises.
Reply


Messages In This Thread
RE: Question: Changing a Battle Command to a single spell - by C-Dude - 12-14-2019, 04:31 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Kefka final battle and Statue of the Gods 3 tier Question calebbyramen 9 5,479 07-11-2023, 06:52 AM
Last Post: Everything
  Condensing Spell List in Battle GrayShadows 91 87,840 08-10-2021, 09:44 PM
Last Post: Gi Nattak
  Single-Enemy Formations that Allow Pincer PowerPanda 0 1,182 07-08-2021, 09:12 PM
Last Post: PowerPanda
  Making a Command cast a single spell Febreeze 8 6,343 08-11-2020, 08:52 PM
Last Post: Everything
  Question - Changing the way Wait Battle Mode works MC50 2 2,872 01-12-2019, 11:51 AM
Last Post: seibaby
  Changing the MP Needed in battle window mrTentacle 6 6,805 12-23-2016, 10:51 PM
Last Post: madsiur
  ASM coding - Checking battle command in use Catone 4 4,909 11-30-2015, 03:52 PM
Last Post: Catone
  Changing Sabin's Spiraler (animation question) Alex Rodrick 5 5,943 03-06-2015, 01:26 PM
Last Post: Catone
  Changing the Command name tsushiy 8 8,344 06-11-2014, 05:36 AM
Last Post: tsushiy
  Command Changing xxChuckFrostxx 1 2,504 12-25-2013, 02:08 AM
Last Post: Vanya

Forum Jump:


Users browsing this thread: 1 Guest(s)