øAslickproductions.org/forum/index.php?topic=2133.0e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/index0a6b.htmlslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&topic=2133.0e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/index0a6b.html.zx×g^ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÈ[@>¸ˆOKtext/htmlISO-8859-1gzip@øÕ¸ˆÿÿÿÿÿÿÿÿTue, 10 Mar 2020 04:38:06 GMTù0ó°° ®0®P®€§²ð®¡g^k¸ˆ Do PC spells use MP in autobattles?

Author Topic: Do PC spells use MP in autobattles?  (Read 907 times)

avalanche

  • Mom Bomb
  • *
  • Posts: 122
    • View Profile
Do PC spells use MP in autobattles?
« on: October 24, 2015, 03:06:40 PM »
Do PC spells use MP in autobattles?  It seems they must not, because the scripts would stall out if spells could not be cast to kill or trigger monster AI reflex scripts.  Also, in Tellah vs Golbez, Tellah casts Meteo and he never has the 99 MP necessary.  So does anyone know if that is true about autobattles?

I took a major hiatus and am trying to get back into my project, and I am super rusty.  Appreciate the help!

chillyfeez

  • FF4 Hacker
  • *
  • Posts: 1,285
  • Gender: Male
  • Go ahead, ask me about Angel Feathers!
    • View Profile
Re: Do PC spells use MP in autobattles?
« Reply #1 on: October 24, 2015, 04:49:14 PM »
I don't know the answer to that, but I assume MP is not used for all of the reasons you just listed.

FF4kster does allow you edit autobattles, though, so you could just force one in somewhere to test it out...

avalanche

  • Mom Bomb
  • *
  • Posts: 122
    • View Profile
Re: Do PC spells use MP in autobattles?
« Reply #2 on: October 24, 2015, 07:47:10 PM »
A tiny bit of rust removed...  It appears that in one of the spell routines, it checks the auto-battle bit as one of a few reasons to skip the MP-using section of code.  Along with checking if it's a monster casting, and some other mystery byte at $355D I have not yet identified.

Code: [Select]
03:CE46  AD 8B 38    LDA $388B
03:CE49  D0 30       BNE $30

$388B appears to simply have a copy of the 0x20 bit from the encounter flags byte, which is auto-battle.

Thanks for the moral support!

chillyfeez

  • FF4 Hacker
  • *
  • Posts: 1,285
  • Gender: Male
  • Go ahead, ask me about Angel Feathers!
    • View Profile
Re: Do PC spells use MP in autobattles?
« Reply #3 on: October 24, 2015, 09:12:10 PM »
355D is a byte used to make commands that use the magic routine not cost MP.
I think only Recall uses it by default, because the other ones just skip the MP reducing part of the routine.

Deathlike2

  • Moderator
  • *
  • Posts: 3,538
  • I'm looking at you, bitch!
    • View Profile
Re: Do PC spells use MP in autobattles?
« Reply #4 on: October 24, 2015, 11:49:39 PM »
355D is a byte used to make commands that use the magic routine not cost MP.
I think only Recall uses it by default, because the other ones just skip the MP reducing part of the routine.

Recall from Tellah does use MP... but it uses the MP of the spell being cast (successful or not - assuming you have enough to cast it).

Autobattle can force characters to cast spells that they don't own/have anyways.
Working on the next Yet To Be Named FF4 "Hardtype" Hack Download Latest: v1.48

Video Demos: #1 #2 #3

chillyfeez

  • FF4 Hacker
  • *
  • Posts: 1,285
  • Gender: Male
  • Go ahead, ask me about Angel Feathers!
    • View Profile
Re: Do PC spells use MP in autobattles?
« Reply #5 on: October 25, 2015, 07:50:09 AM »
Oh, hey, Deathlike2.
Yeah, I was going off of some of Grimoire LDs notes, but I think I got it backwards... Recall manipulated that byte of RAM so the spell does use MP, and the other commands (salve, pray, Armor, etc) do not do anything with it, so they do not cost MP.