øAslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&topic=290.msg7798e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/index6a7e.htmlslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&topic=290.15e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/index6a7e.html.zxlSg^ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÈ0P.¶,OKtext/htmlISO-8859-1gzip0|Ö¶,ÿÿÿÿÿÿÿÿTue, 10 Mar 2020 09:00:51 GMT0ó°° ®0®P®€§²ð®kSg^ÿÿÿÿÿÿÿÿo+¶, "Twin" Command

Author Topic: "Twin" Command  (Read 13537 times)

Phoenix

  • FF4 Hacker
  • *
  • Posts: 456
    • View Profile
    • Phoenix Hacks
Re: "Twin" Command
« Reply #15 on: February 13, 2008, 11:26:49 PM »
0x60 is an RTS instruction in assembly (Return from Subroutine) so you have that right. However, if there are branch instructions within a subroutine, you could have more than one RTS, so it doesn't conclusively tell you where one subroutine ends and another ends. I looked at the data in Hex, and there are similar portions for some (maybe all) of the commands. Especially a load instruction: A9 xx 8D [LDA #$8Dxx, if my ASM understanding is correct], where xx is the number of the command. This was common across most of the cursory data I looked at. I haven't delved any deeper, but I'm sure that points to something...I kind of got caught up in something else, and that's where I stopped. I'll start again when I finish what I'm working on, but if you forge on ahead and find anything, please post.

Paladin

  • FF4 Hacker
  • *
  • Posts: 105
  • Gender: Male
  • Warrior of Light
    • View Profile
    • FinalFantasyIV.net
Re: "Twin" Command
« Reply #16 on: February 14, 2008, 11:29:48 AM »
Cool...yeah I started looking into disassembly last night and downloaded a tool called "DisPel" off of Romhacking dot net and dumped some addresses out. I also found a rather technical, but extremely descriptive document on there on the 65c816 that included descriptions for the all the instruction byte mapping mnemonics.

Quote
Edit-Imzogelmo: That's exactly how I got started with the ASM. Using that and looking at some commented code for reference, it eventually does start to make sense. Give it time to soak in, don't rush it.

I'm going try and force-feed myself this stuff until I get the hang of it...or a headache  :laugh:

I am really interested in the commands because like some others have said, many of them are rather useless or fairly unbalanced. That's pretty evident in the way FF4A was modified to include items that were supposed to boost up some of these commands, like Rosa's white ring for the Pray Command, or Palom/Porom's twin stars to add W.Meteo to the twin command.

It'd be nice to compile this data to completely modify the commands or add routines like Minitrue did with the random summon.

I can't guarantee that I'll get crazy with this ASM stuff quickly...but if I make any progress I'll be sure to share.

If there are any good utilites/documents anyone recommends for someone new to ASM, especially in the context of FF-IV SNES/SFC I'd be obliged!
« Last Edit: February 29, 2008, 09:35:10 AM by Imzogelmo »

Phoenix

  • FF4 Hacker
  • *
  • Posts: 456
    • View Profile
    • Phoenix Hacks
Re: "Twin" Command
« Reply #17 on: February 14, 2008, 04:20:41 PM »
The Tower of Bab-il documents contain one on the spell effect subroutine code, which I find helpful. If you don't already have that you should take a look; you can download it off of Romhacking.net.

Phoenix

  • FF4 Hacker
  • *
  • Posts: 456
    • View Profile
    • Phoenix Hacks
Re: "Twin" Command
« Reply #18 on: February 29, 2008, 07:13:57 AM »
New bit of info on Twin: the targeting for the spells is determined by the command targeting, not the spells' targeting. I was trying to make of the spells an attack spell and one a cure spell, but you can't have that since you either have to target the enemy or your party with the command.

Dragonsbrethren

  • Forum Overlord
  • *
  • Posts: 1,820
    • View Profile
    • Dragonsbrethren Industries
Re: "Twin" Command
« Reply #19 on: February 29, 2008, 07:17:24 AM »
Ha, I tried that exact same thing in my hack.

Deathlike2

  • Moderator
  • *
  • Posts: 3,538
  • I'm looking at you, bitch!
    • View Profile
Re: "Twin" Command
« Reply #20 on: April 09, 2008, 12:46:33 PM »
Some questions about the command...

1) What is the probability of the spells that are to be cast (if you can find out what that distribution is in FF4A, that would be a nice bonus  :wink:)?

2) The game selects one of the twins Wisdom stat to power the spell being cast, what is the probability for this setup?

3) Are there other random facts that should be known about this command?
Working on the next Yet To Be Named FF4 "Hardtype" Hack Download Latest: v1.48

Video Demos: #1 #2 #3

Deathlike2

  • Moderator
  • *
  • Posts: 3,538
  • I'm looking at you, bitch!
    • View Profile
Re: "Twin" Command
« Reply #21 on: September 20, 2008, 03:01:21 AM »
Mega  :bump:

I got around to testing this with a Game Genie code (to add the command to Rydia's slot).. I'll quote relevent points.

2. When neither twin is in the party, any character that uses "Twin" causes only the character in slot #1 (the middle slot) to start casting. If that one character has enough MP, they will cast Flare or Comet.

Yep.

Quote
3. When only one twin is in the party, if there is a character in slot #1, any character using "Twin" causes Palom/Porom and the slot #1 character to start casting. The twin's MP and the slot #1 character's MP is used.

I'll need a save with Palom+Porom in the party to confirm this, but that shouldn't be surprising.

Quote
4. When only one twin is in the party, if there is not a character in slot #1, Palom/Porom's "Twin" command is grayed out as if the other twin is dead. However, other character's "Twin" commands will not be grayed out, and if you use them the game will freeze. (In my case, Palom started casting, came forward with the message "Failed.", then came forward again with "Comet", but the spell animation never started because the game froze.)

Probably hardcoded for some odd ball default if it can't find the twins.

Quote
So, apparently you can't give any command to any character. Has anyone else played around with the command? Am I wrong on any of this? Does anyone know of a way to fix this behavior?

Well, I believe it's wrong, but perhaps it has to do with my playthrough. Here's what I've found..

1) The Slot #1 character does go into Twin casting mode.. the character executing the command does not.

2) There's a very good chance (maybe it's me using a Game Genie code that's affecting it) that a "double spell" occurs, where two Twin spells are cast in succession. The character that casts ths spell consumes the MP of both.. the one that executes the command only consumes MP for the latter spell. This tells me that "both twins" are casting the spell, but the lone character is executing both "twins" in separate instances.. which is amusing (especially if the character is Paralyzed in response to them damned King-Ryus).

3) The mythical Kain spell casting stance is revealed! However, he's unable to execute probably because he has no MP to work with. Still, this is awesomeness.

Game Genie codes to temporarily affect the command list can be found here: http://www.videogamesource.com/super-nintendo/final_fantasy_2_ecodes.html

Those codes are for FF2 US v1.0

Some of the info I've gathered have be found via this manner (well, only for some reasonable analysis anyways).
« Last Edit: September 20, 2008, 03:09:52 AM by Deathlike2 »
Working on the next Yet To Be Named FF4 "Hardtype" Hack Download Latest: v1.48

Video Demos: #1 #2 #3

Deathlike2

  • Moderator
  • *
  • Posts: 3,538
  • I'm looking at you, bitch!
    • View Profile
Re: "Twin" Command
« Reply #22 on: September 20, 2008, 03:13:23 AM »
Some pics to go with it:




You will need to scale the pictures to see Kain's hands look different.
Working on the next Yet To Be Named FF4 "Hardtype" Hack Download Latest: v1.48

Video Demos: #1 #2 #3

Phoenix

  • FF4 Hacker
  • *
  • Posts: 456
    • View Profile
    • Phoenix Hacks
Re: "Twin" Command
« Reply #23 on: September 20, 2008, 09:30:59 AM »
Since you  :bump: ed this, I thought I'd mention that I found the code that determins the twin slots. If one of the twin's character IDs were not in the party, then the twin slots defaulted to 00, which is the first slot, or middle character. This is why that behavior was a little screwy. I wrote a patch to fix this behavior, and it will gray out the twin command if both twins are not in the party. I'm not sure if it'll work for the FuSoYa/Golbez vs Zemus battle in the original version of the game, because they need to be put in the twin slots, but it works with my (forthcoming) hack.

Deathlike2

  • Moderator
  • *
  • Posts: 3,538
  • I'm looking at you, bitch!
    • View Profile
Re: "Twin" Command
« Reply #24 on: September 20, 2008, 09:57:07 AM »
This screwy behavior is awesome though..

1) Twin's a novelty command.

2) If the spells were replacable... then awesomeness could strike.

What you really need is a hack to tweak the Twin command speeds to FF2's speeds. That would be more useful moving forward...
Working on the next Yet To Be Named FF4 "Hardtype" Hack Download Latest: v1.48

Video Demos: #1 #2 #3

Deathlike2

  • Moderator
  • *
  • Posts: 3,538
  • I'm looking at you, bitch!
    • View Profile
Re: "Twin" Command
« Reply #25 on: November 20, 2008, 11:28:16 AM »
Ok, I've done quite a bit of analysis on the Twin command, worthy of the :bump:

FF4A's Double Meteor uses the following formula..

Base Spell Power = 1000

Damage = (Spell Power - Target's Magic Defense + rand (0, 255)) * Spell Multiplier

So, the required Intelligence to maximize damage regardless of the target's magic defense is 52... which may be a bit difficult to get Porom at that stat.


In the SNES version of the game, the Wisdom stat is not randomly selected between the twins... rather it is determined by slot position. Go figure on that.
The character in the earliest slot position (middle slot) has their Wisdom used, regardless of who executes the Twin command.

 :edit:

In the GBA version of the game,  the Intelligence stat is not randomly selected between the twins... it is determined moreso by the Agility of the character.
Unfortunately, this implies that the Porom is the prime candidate for this command to favor. It doesn't matter who executes the Twin command.

 :edit:

Fixed the correct Intelligence required.
« Last Edit: November 20, 2008, 12:18:35 PM by Deathlike2 »
Working on the next Yet To Be Named FF4 "Hardtype" Hack Download Latest: v1.48

Video Demos: #1 #2 #3

Deathlike2

  • Moderator
  • *
  • Posts: 3,538
  • I'm looking at you, bitch!
    • View Profile
Re: "Twin" Command
« Reply #26 on: November 20, 2008, 05:49:23 PM »
Ok, I've revised this because I forgot to test resistance.. the formula looks more like this...

Damage = (Spell Power * Elemental Modifer - Target's Magic Defense) * Spell Multiplier + (rand(0,255) * Elemental Modifier) * Spell Modifier
Working on the next Yet To Be Named FF4 "Hardtype" Hack Download Latest: v1.48

Video Demos: #1 #2 #3

Deathlike2

  • Moderator
  • *
  • Posts: 3,538
  • I'm looking at you, bitch!
    • View Profile
Re: "Twin" Command
« Reply #27 on: November 21, 2008, 07:16:58 AM »
Better looking formula, same result...

Damage = (((Spell Power + rand(0,255)) * Elemental Modifier) - Target's Magic Defense) * Spell Multiplier

More analysis suggests that targets with 0 magic defense need a minimum of 36 Intelligence to kill at 9999 damage.

The spell redoing obviously favors Porom in the calculations since 36-52 Intelligence is tough to get, but she does get a +2 Str, +2 Int, +2 Spr level games in addition to +1 to all stats (which makes her slightly better than Rosa and Palom in some twisted way).
« Last Edit: November 21, 2008, 07:49:55 AM by Deathlike2 »
Working on the next Yet To Be Named FF4 "Hardtype" Hack Download Latest: v1.48

Video Demos: #1 #2 #3

Deathlike2

  • Moderator
  • *
  • Posts: 3,538
  • I'm looking at you, bitch!
    • View Profile
Re: "Twin" Command
« Reply #28 on: September 23, 2009, 09:55:36 AM »
Since this thread (http://www.gamefaqs.com/boards/genmessage.php?board=929937&topic=51477370) was started, I've started to look into Twin more.

If Palom's AGI = Porom's AGI, the game uses the character you select the command with. The AGI range of difference (both twins AGI don't necessary have to be the same, they simply have to be close to each other) I have yet to determine, but it's perhaps a 4-8 AGI point difference.

If Palom's AGI > Porom's AGI, the game selects Palom's Intellect to be used.

If Palom's AGI < Porom's AGI, the game selects Porom's Intellect to be used.
Working on the next Yet To Be Named FF4 "Hardtype" Hack Download Latest: v1.48

Video Demos: #1 #2 #3

Deathlike2

  • Moderator
  • *
  • Posts: 3,538
  • I'm looking at you, bitch!
    • View Profile
Re: "Twin" Command
« Reply #29 on: September 23, 2009, 10:29:55 AM »
The AGI difference required for a particular twin to always be selected must be greater than 10. That means that the Assassin Dagger in general is the different maker (when you consider all the other AGI boosting equipment) when it comes to which twin's Intellect is used.

Please note Porom's AGI advantage stems from having a slightly higher AGI naturally, and having a 4/8 chance of gaining it... whereas Palom only has a 3/8 chance.
Working on the next Yet To Be Named FF4 "Hardtype" Hack Download Latest: v1.48

Video Demos: #1 #2 #3