øAslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&topic=378.0;prev_next=preve:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/indexd71b-2.htmllayedslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&topic=378.0e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/indexd71b-2.html.zx.ug^ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÈ…¬aõOKtext/htmlISO-8859-1gzip@øÕaõÿÿÿÿÿÿÿÿÑHTue, 10 Mar 2020 11:24:53 GMT0ó°° ®0®P®€§²ð®.ug^ÿÿÿÿÿÿÿÿ%aõ Recall Command

Author Topic: Recall Command  (Read 7503 times)

Cleteromagos

  • Octomammoth
  • *
  • Posts: 22
    • View Profile
Re: Recall Command
« Reply #15 on: April 27, 2008, 06:09:46 AM »
Quote from: Deathlike
The only time the "Not Enough MP" message is displayed is when a target is Charmed and simply doesn't have enough MP to cast the spell that was randomly selected.

 :hmm:

Unless I remember incorrectly (a distinct possibility), in FFIV (the SFC version at the very least), MP needed to cast a spell is subtracted at the moment casting is begun (as opposed to upon casting). Spells in a menu may be dimmed out based on MP at the time the menu is generated to prohibit the selection of a spell which cannot be cast due to a lack thereof. Due to this, schematically it would appear to be impossible for the player to initiate casting of a spell which could fail based on lack of MP.

However, if a character’s MP is siphoned away after the menu is called and before it is dismissed, it is not updated and the player can select a spell which should be greyed-out (this was not the case in FFVI, and probably also V). In the case of this anomaly, the game will see the PC go through the required casting time before calling the dialogue box in question: “Not enough MP.â€

Obviously, the message is also seen whenever a monster attempts to cast a spell as a matter of course without enough MP.

Quote from: Deathlike
It might sounds strange, but Toad is probably the most useful spell of the bunch, given the implications of the status itself vs MP consumption.
Are there enemies which Tornado would fail on, considering the period in which the command is available …?


Deathlike2

  • Moderator
  • *
  • Posts: 3,538
  • I'm looking at you, bitch!
    • View Profile
Re: Recall Command
« Reply #16 on: April 27, 2008, 09:11:34 AM »
Quote from: Deathlike
The only time the "Not Enough MP" message is displayed is when a target is Charmed and simply doesn't have enough MP to cast the spell that was randomly selected.

 :hmm:

Unless I remember incorrectly (a distinct possibility), in FFIV (the SFC version at the very least), MP needed to cast a spell is subtracted at the moment casting is begun (as opposed to upon casting). Spells in a menu may be dimmed out based on MP at the time the menu is generated to prohibit the selection of a spell which cannot be cast due to a lack thereof. Due to this, schematically it would appear to be impossible for the player to initiate casting of a spell which could fail based on lack of MP.

However, if a character’s MP is siphoned away after the menu is called and before it is dismissed, it is not updated and the player can select a spell which should be greyed-out (this was not the case in FFVI, and probably also V). In the case of this anomaly, the game will see the PC go through the required casting time before calling the dialogue box in question: “Not enough MP.”

That's usually the other possibility, but the number of monsters that cast Psych/Osmose are far and few between (there's the Dark Sage, and the Insectus monsters in FF4A, the Insectus uses it as a magic counter though).

Quote
Obviously, the message is also seen whenever a monster attempts to cast a spell as a matter of course without enough MP.

No, that never happens. Monsters never consume MP. Consider Scarmaglione (the "living" version). His primary attack is Thunder. If Tellah syphons all of his MP, his attack will still occur, regardless. If Thunder ever misses, that's due to magic evade that all characters have except for Dark Knight Cecil.

Quote
Quote from: Deathlike
It might sounds strange, but Toad is probably the most useful spell of the bunch, given the implications of the status itself vs MP consumption.
Are there enemies which Tornado would fail on, considering the period in which the command is available …?

Other than the bosses, no monster is ever immune to the spell. It may be difficult, but that's only because there is a level comparison done.

The Tornado spell has the boss bit set, so it always fails to work on a boss. On the other hand, the one on Abel's Lance is not, which is the only difference. I'm not sure if any other property is different, other than the "set monster to death" vs when Abel Lance's Tornado is used. I believe a custom version of the spell is written for that weapon anyways, the original spell would not do that, even if the boss bit was removed.
Working on the next Yet To Be Named FF4 "Hardtype" Hack Download Latest: v1.48

Video Demos: #1 #2 #3

Dragonsbrethren

  • Forum Overlord
  • *
  • Posts: 1,820
    • View Profile
    • Dragonsbrethren Industries
Re: Recall Command
« Reply #17 on: June 20, 2008, 10:12:01 PM »
Phoenix, do you have a disassembly of this command handy? I was going to make one myself, then I remembered (What is it with me and stupid puns tonight?) this thread. I'm going to upgrade it a bit for my hack, far less (Or maybe no) chance of failing, level 2 elementals, but I'll probably scrap the tornado and death effects.

Phoenix

  • FF4 Hacker
  • *
  • Posts: 456
    • View Profile
    • Phoenix Hacks
Re: Recall Command
« Reply #18 on: June 20, 2008, 11:24:24 PM »
Indeed I do, and lucky for you, I've also commented the whole routine (not saying whether I'm completely right or not, but those are my thoughts). The offsets are for FF2us 1.0 (headered), as usual. Here's the disassembly from my ASM Interpreter (again, it might be wrong, so double check yourself!):

Code: [Select]
Offset Hex Data ASM Interpretation Comments
------ -------- ------------------ --------
1EC05 7B Transfer D to A ; zero out A
1EC06 AA Transfer A to X ; zero out X
1EC07 A9 A0 Load A with #A0 ; A = #A0
1EC09 20 79 83 Jump to subroutine at 18579 ; < Sets A to a random number between X and A >
1EC0C C9 08 Compare A with #08 ; let the random number be r
1EC0E B0 04 Branch to 1EC14 if carry is set ; if r < #8
1EC10 A9 2A Load A with #2A ; spell #2A = Stone
1EC12 80 40 Branch to 1EC54 ;
1EC14 C9 10 Compare A with #10 ;
1EC16 B0 04 Branch to 1EC1C if carry is set ; if #8 <= r < #10
1EC18 A9 26 Load A with #26 ; spell #26 = Virus
1EC1A 80 38 Branch to 1EC54 ;
1EC1C C9 18 Compare A with #18 ;
1EC1E B0 04 Branch to 1EC24 if carry is set ; if #10 <= r < #18
1EC20 A9 27 Load A with #27 ; spell #27 = Weak
1EC22 80 30 Branch to 1EC54 ;
1EC24 C9 20 Compare A with #20 ;
1EC26 B0 04 Branch to 1EC2C if carry is set ; if #18 <= r < #20
1EC28 A9 2B Load A with #2B ; spell #2B = Fatal
1EC2A 80 28 Branch to 1EC54 ;
1EC2C C9 38 Compare A with #38 ;
1EC2E B0 04 Branch to 1EC34 if carry is set ; if #20 <= r < #38
1EC30 A9 1D Load A with #1D ; spell #1D = Fire1
1EC32 80 20 Branch to 1EC54 ;
1EC34 C9 50 Compare A with #50 ;
1EC36 B0 04 Branch to 1EC3C if carry is set ; if #38 <= r < #50
1EC38 A9 20 Load A with #20 ; spell #20 = Ice-1
1EC3A 80 18 Branch to 1EC54 ;
1EC3C C9 68 Compare A with #68 ;
1EC3E B0 04 Branch to 1EC44 if carry is set ; if #50 <= r < #68
1EC40 A9 23 Load A with #23 ; spell #23 = Lit-1
1EC42 80 10 Branch to 1EC54 ;
1EC44 C9 80 Compare A with #80 ;
1EC46 B0 04 Branch to 1EC4C if carry is set ; if #68 <= r < #80
1EC48 A9 19 Load A with #19 ; spell #19 = Toad
1EC4A 80 08 Branch to 1EC54 ;
1EC4C A9 09 Load A with #09 ; if #80 <= r < #A0
1EC4E 8D CA 34 Store A to $7E:34CA ; load message #09?
1EC51 4C B1 85 Jump to location 187B1 ; < 33C8 = #F8, 33C9 = #03 > = special
1EC54 48 Push A (1 byte) onto stack ; A = #03?
1EC55 AA Transfer A to X ;
1EC56 86 E5 Store X to $00:D+$E5 ; E5 = #03?
1EC58 A2 A0 97 Load X with #97A0 ; \
1EC5B 86 80 Store X to $00:D+$80 ;  |
1EC5D A9 0F Load A with #0F ;  | Load spell/item effect
1EC5F 85 82 Store A to $00:D+$82 ;  | data into 289C-A1
1EC61 A9 06 Load A with #06 ;  |
1EC63 20 5E 84 Jump to subroutine at 1865E ; /
1EC66 AD A0 28 Load A with 1 byte at $7E:28A0 ; \
1EC69 29 7F 'AND' A with #7F ;  |
1EC6B 85 DF Store A to $00:D+$DF ;  |
1EC6D A9 03 Load A with #03 ;  |
1EC6F 85 E1 Store A to $00:D+$E1 ;  |
1EC71 20 E0 83 Jump to subroutine at 185E0 ;  | Load 28A2-4 with
1EC74 A6 E3 Load X with 2 bytes at $00:D+$E3 ;  | element/status effect
1EC76 7B Transfer D to A ;  | data of spell
1EC77 A8 Transfer A to Y ;  |
1EC78 BF 90 A5 0F Load A with 1 byte at 7A790+X ;  |
1EC7C 99 A2 28 Store A to $7E:28A2+Y ;  |
1EC7F C8 Increment Y ;  |
1EC80 E8 Increment X ;  |
1EC81 C0 03 00 Compare Y with #0003 ;  |
1EC84 D0 F2 Branch to 1EC78 if zero flag is clear ; /
1EC86 AD 8B 26 Load A with 1 byte at $7E:268B ; \
1EC89 85 A9 Store A to $00:D+$A9 ;  |
1EC8B AD 8C 26 Load A with 1 byte at $7E:268C ;  | A9 = current MP
1EC8E F0 04 Branch to 1EC94 if zero flag is set ;  | = #FF if > #FF
1EC90 A9 FF Load A with #FF ;  |
1EC92 85 A9 Store A to $00:D+$A9 ; /
1EC94 AD A1 28 Load A with 1 byte at $7E:28A1 ; \
1EC97 29 7F 'AND' A with #7F ;  | Compare MP cost with
1EC99 C5 A9 Compare A with data at $00:D+$A9 ;  | character's current MP
1EC9B F0 06 Branch to 1ECA3 if zero flag is set ;  |
1EC9D 90 04 Branch to 1ECA3 if carry is clear ;  | if MP cost is <= current MP
1EC9F 68 Pull 1 byte from stack and store in A ;  | then A = spell number
1ECA0 4C AD EA Jump to location 1ECAD ;  | else return
1ECA3 68 Pull 1 byte from stack and store in A ;  |
1ECA4 8D D2 26 Store A to $7E:26D2 ; /
1ECA7 EE 5D 35 Increment 1 byte at $7E:355D ; increment 355D
1ECAA 20 36 CC Jump to subroutine at 1CE36 ; < Spell/Item Subroutine >
1ECAD 60 Return from subroutine ; return


Dragonsbrethren

  • Forum Overlord
  • *
  • Posts: 1,820
    • View Profile
    • Dragonsbrethren Industries
Re: Recall Command
« Reply #19 on: June 20, 2008, 11:35:34 PM »
Thanks. :happy:

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,684
    • View Profile
Re: Recall Command
« Reply #20 on: December 22, 2009, 04:22:15 PM »
Well, I think I have my replacement ability for Baigan, great work here! With this info. I can make him into a semi-Blue Mage (sort of similar to Brina in After Years).