Board of Slick
Library of the Ancients => Final Fantasy IV Research & Development => Topic started by: fedorajoe on October 23, 2016, 06:52:53 PM
-
When you fight a player character as an enemy... what determines the weapon the enemy is equipped with?
Just playing around, I tested enemy Kain and Enemy Yang, and if told to use the Fight command, they have weapons equipped. But I can't see how to change the values, and it doesn't seem to relate to what the actual characters/actors have equipped.
Anybody know?
Thanks!
-
Indeed, this was an old mystery that I put to bed some time ago. It is set to be the Deathbringer. I posit that this is part of a removed sequence where the Dark Knight copy would attack Paladin Cecil normally at one point or another...
http://slickproductions.org/forum/index.php?topic=1883.msg22449#msg22449
Here is the information on that, but here is the pertinent part of that...
02/D028 AD 4E ED LDA $ED4E [$7E:ED4E] A:0080 X:0000 Y:0012 P:eNvMxdizc - Load Monster... something (Yousei's RAM notes say that ED50 is palette data so it may deal something with size or graphic or something)
$02/D02B 29 10 AND #$10 A:001F X:0000 Y:0012 P:envMxdizc - Get rid of all but 10.
$02/D02D F0 1B BEQ $1B [$D04A] A:0010 X:0000 Y:0012 P:envMxdizc - All normal monsters branch here where Battle Characters continue on.
----------------------------------------------------------------------------------------------------------------
$02/D02F A9 18 LDA #$18 A:0010 X:0000 Y:0012 P:envMxdizc - Load Deathbringer into A.
$02/D031 20 BA D8 JSR $D8BA [$02:D8BA] A:0018 X:0000 Y:0012 P:envMxdizc - Jump to Subroutine
The weapon number (yes, singular they never planned on any other weapon being available to Enemy PC's) follows the normal listings.
-
Given that it's a two-byte load command preceded by a branch and followed by a subroutine jump, it'd be tricky to rewire in order to get a character-dependent routine in there... but nothing's impossible.
It will most likely be something I implement for my own purposes eventually, so I'Lloyd remember to post here when I do.
-
Oh nice! Thank you, this was driving me bonkers!