øAslickproductions.org/forum/index.php?PHPSESSID=dg9cbo6f5cfg2noj1ie8haqla2&topic=1883.330e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/index24d3.htmlslickproductions.org/forum/index.php?PHPSESSID=dg9cbo6f5cfg2noj1ie8haqla2&board=13.100e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/index24d3.html.zxz²h^ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÈ0P.˜hOKtext/htmlISO-8859-1gzip8:Ö˜hÿÿÿÿÿÿÿÿWed, 11 Mar 2020 09:58:42 GMT0ó°° ®0®P®€§²ð®x²h^ÿÿÿÿÿÿÿÿà2˜h Grimoire LD's Notes, Patches, and Hacks (Dark Knight/Paladin Swap In Battle!)

Author Topic: Grimoire LD's Notes, Patches, and Hacks (Dark Knight/Paladin Swap In Battle!)  (Read 78696 times)

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,684
    • View Profile
Re: Grimoire LD's Notes, Patches, and Hacks (Commands stored directly in RAM!)
« Reply #330 on: February 08, 2014, 08:09:17 PM »
My first command I ever made, Seek, has been redone with the knowledge I now have.

What this command does is it looks at the targeted Enemy's Item Byte, looks for the Item Byte's mention in RAM, and changes that to +40 making the odds you will receive an item from defeating that Foe about 20% chance better. (5% for 40+, 25% for 80+, Always for C0+)

Because of its... kind of overpowered nature, it is a rare weapon in my mod, and because it is a weapon it's effect is not always guaranteed.
Seek - Remastered
Code: [Select]
$03/FFAE 7B TDC A:0001 X:0100 Y:1A35 P:envMxdIzC - Clear A.
$03/FFAF AA TAX A:0001 X:0100 Y:1A35 P:envMxdIzC - Transfer A to X.
$03/FFB0 AD 73 27 LDA $2773  [$00:2773] A:0001 X:0100 Y:1A35 P:envMxdIzC - Load Targeted Enemy's Item Byte into A.
--------------------------------------------------------------------(Looping Point)------------------------------------------------------------------------------
$03/FFB3 DD 8E 35 CMP $358E,x[$00:368E] A:0001 X:0100 Y:1A35 P:envMxdIzC - Is it the same as the byte in Stored Item Byte?
$03/FFB6 F0 08 BEQ $08    [$FFC0] A:0001 X:0100 Y:1A35 P:envMxdIzC - If so, branch to rest of routine.
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------
$03/FFB8 E0 02 00 CPX #$0002 A:0001 X:0100 Y:1A35 P:envMxdIzC - Has it looked at all enemy type Item Drops?
$03/FFBB F0 0D BEQ $0D    [$FFCA] A:0001 X:0100 Y:1A35 P:envMxdIzC - If so, branch to Return.
$03/FFBD E8 INX A:0001 X:0100 Y:1A35 P:envMxdIzC - +1 to X.
$03/FFBE 80 F3 BRA $F3    [$FFB3] A:0001 X:0100 Y:1A35 P:envMxdIzC - Loop back to Stored Item Bytes
-----------------------------------------------------------------------------------------------------------------------
$03/FFC0 69 3F ADC #$3F A:0001 X:0100 Y:1A35 P:envMxdIzC - Add 3F (+1) into A.
$03/FFC2 9D 8E 35 STA $358E,x[$00:368E] A:0001 X:0100 Y:1A35 P:envMxdIzC - Store A in Stored Item Byte.
$03/FFC5 A9 90 LDA #$90 A:0001 X:0100 Y:1A35 P:envMxdIzC - Load Search Graphic into A.
$03/FFC7 8D C4 33 STA $33C2  [$00:33C4] A:0001 X:0100 Y:1A35 P:envMxdIzC - Store A in Audiovisual Cue.
7B TDC - Clear A
STA $33C3 - Store 00 in Audiovisual Cue (to make the Scan graphic show before the attack graphic, rather than the Scan graphic making the rest of the animation look off)

 :edit: 4/15/14 - Changed the routine slightly to account for Scan's graphic.
« Last Edit: February 15, 2014, 09:10:41 PM by Grimoire LD »

chillyfeez

  • FF4 Hacker
  • *
  • Posts: 1,285
  • Gender: Male
  • Go ahead, ask me about Angel Feathers!
    • View Profile
Re: Grimoire LD's Notes, Patches, and Hacks (Commands stored directly in RAM!)
« Reply #331 on: February 08, 2014, 10:04:22 PM »
Re: Seek (remastered)
Is it stackable?

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,684
    • View Profile
Re: Grimoire LD's Notes, Patches, and Hacks (Commands stored directly in RAM!)
« Reply #332 on: February 08, 2014, 10:21:04 PM »
It is not... for fairly obvious reasons. What the code does is it looks at the Item Byte of the Targeted Foe, it will then search for that Item Byte in the Stored Item Byte section of RAM (358E) should it find that exact byte, it will increase it by 40, should it fail to find that byte (meaning that's its already been +40'd) it will jump to a Return after three searches.

You can target each type of foe one by one though to increase the likelihood of getting items from all types that are present.

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,684
    • View Profile
Re: Grimoire LD's Notes, Patches, and Hacks (Commands stored directly in RAM!)
« Reply #333 on: February 08, 2014, 11:23:42 PM »
Bah! Looks like it was too good to be true... while 7E1C00 doesn't look to be read by anything, it is also not saved when you go to reload your file, so any changes you make to your commands will be set back to default. An idea of "abilities that last a session" is a strange one that doesn't seem to really work in a thematic sense.
Back to the drawing board on that then...

LordGarmonde

  • Baigan
  • *
  • Posts: 271
  • Gender: Male
  • "Power only breeds war..."
    • View Profile
Don't get discouraged - there's still plenty of kick-ass work! I just had a random thought about the above problem: what about modifying the code that is called when saving and forcing it to deal with the RAM in question?
"Now I know; and knowing makes it even more confusing..."

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,684
    • View Profile
I've never checked the save format, in all honesty I'm not even sure where in RAM it is located at. I do have to casually wonder what all is saved though... however that should be dealt with in the Main Menu section, which as we know, is Made of free space... you might be on to something there. I'll take a look later.

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,684
    • View Profile
Because Evasion is seriously out of balance in FFIV, I did what I could to rebalance that aspect of the game. I removed part of the accuracy divisor when attacking the backrow. This means that this character will no longer have stupid amounts of dodging and damage reduction for being in the backrow. By removing this it also seems as if the damage done to the back row is minimal to normal. Which... I wasn't expecting, but it works well enough for my purposes. This means that the backrow is no longer a haven for armored characters to stay safe and there should be a new tension for characters you would normally place in the backrow.

Code: [Select]
$03/C55A AD 81 26 LDA $2681  [$7E:2681] A:0080 X:0000 Y:0003 P:eNvMxdizc - Load Caster's class/row/Long Range
$03/C55D 29 20 AND #$20 A:0080 X:0000 Y:0003 P:eNvMxdizc  - Is it Long Range?
$03/C55F D0 0A BNE $0A    [$C56B] A:0000 X:0000 Y:0003 P:envMxdiZc - If so branch to 03C56B.
$03/C561 AD 85 26 LDA $2685  [$7E:2685] A:0000 X:0000 Y:0003 P:envMxdiZc - Load Caster's Status Byte 3.
$03/C564 29 02 AND #$02 A:0000 X:0000 Y:0003 P:envMxdiZc - Is it Jump?
$03/C566 D0 03 BNE $03    [$C56B] A:0000 X:0000 Y:0003 P:envMxdiZc - If so branch to 03C56B.
$03/C568 4E F8 38 LSR $38F8  [$7E:38F8] A:0000 X:0000 Y:0003 P:envMxdiZc - Divide Accuracy by 2.

To...

Code: [Select]
$03/C55A AD 81 26 LDA $2681  [$7E:2681] A:0080 X:0000 Y:0003 P:eNvMxdizc - Load Caster's class/row/Long Range
$03/C55D 29 20 AND #$20 A:0080 X:0000 Y:0003 P:eNvMxdizc  - Is it Long Range?
$03/C55F D0 0A BNE $0A    [$C56B] A:0000 X:0000 Y:0003 P:envMxdiZc - If so branch to 03C56B.
$03/C561 AD 85 26 LDA $2685  [$7E:2685] A:0000 X:0000 Y:0003 P:envMxdiZc - Load Caster's Status Byte 3.
$03/C564 29 02 AND #$02 A:0000 X:0000 Y:0003 P:envMxdiZc - Is it Jump?
$03/C566 D0 03 BNE $03    [$C56B] A:0000 X:0000 Y:0003 P:envMxdiZc - If so branch to 03C56B.
$03/C568 EA EA EA NOP (x3)

My mod is coming along beautifully. I only need to change a couple more things in coding, then the big task of making all the monsters more difficult will become the forefront of the mod. After all, all these new abilities should have something of equal value to fight. So far I have up through the Mist Cave balanced. And it looks pretty good so far. There is a "high risk, high reward" mentality with each battle. Enemies are more difficult than they ever were, but in this difficulty comes the opportunity for great amounts of Exp. and their completely altered drop tables makes each battle a (hopefully) exciting encounter until the end. Granted at the start you can probably just use Dark Omen a bunch then heal up at the Inn to gain some quick and easy Exp.

 :edit: I made another change to the basic battle system, I noticed that while my Calcify to Imbued Weapons worked wonderfully, it still didn't work on bosses, so I went through my Fight notes, found that important piece, and changed it to a different value...

Code: [Select]
$03/C855 20 97 C9 JSR $C997  [$03:C997] A:0001 X:0680 Y:001A P:envMxdizC  - Jump out of Routine (Appears to be Random Number Generator)
$03/C858 AD FD 38 LDA $38FD  [$7E:38FD] A:0039 X:0000 Y:0000 P:envMxdiZc - Looks to load a random number likely generated from the previous routine.
$03/C85B F0 C9 BEQ $C9    [$C826] A:0001 X:0000 Y:0000 P:envMxdizc - If it is 1 or higher it is considered a successful check/pass.
$03/C85D AD 70 27 LDA $2770  [$7E:2770] A:0001 X:0000 Y:0000 P:envMxdizc - Load Target's Level/Boss Bit.
$03/C860 30 C4 BMI $C4    [$C826] A:0005 X:0000 Y:0000 P:envMxdizc - Break if Minus (meaning that the Boss Bit is an 80) and branch to 03C826.
$03/C862 AD 9E 26 LDA $269E  [$7E:269E] A:0005 X:0000 Y:0000 P:envMxdizc - Load Caster's Status Inflict Byte 1.
$03/C865 8D 08 39 STA $3908  [$7E:3908] A:0002 X:0000 Y:0000 P:envMxdizc - Store A in 7E3908.

To...

Code: [Select]
$03/C855 20 97 C9 JSR $C997  [$03:C997] A:0001 X:0680 Y:001A P:envMxdizC  - Jump out of Routine (Appears to be Random Number Generator)
$03/C858 AD FD 38 LDA $38FD  [$7E:38FD] A:0039 X:0000 Y:0000 P:envMxdiZc - Looks to load a random number likely generated from the previous routine.
$03/C85B F0 C9 BEQ $C9    [$C826] A:0001 X:0000 Y:0000 P:envMxdizc - If it is 1 or higher it is considered a successful check/pass.
$03/C85D AD 19 27 LDA $2719  [$7E:2719] A:0001 X:0000 Y:0000 P:envMxdizc - Load Target's Attack Elemental
$03/C860 30 C4 BMI $C4    [$C826] A:0005 X:0000 Y:0000 P:envMxdizc - Break if Minus (meaning that the Immune bit is triggered) and branch to 03C826.
$03/C862 AD 9E 26 LDA $269E  [$7E:269E] A:0005 X:0000 Y:0000 P:envMxdizc - Load Caster's Status Inflict Byte 1.
$03/C865 8D 08 39 STA $3908  [$7E:3908] A:0002 X:0000 Y:0000 P:envMxdizc - Store A in 7E3908.

So I can decide which foes I want immune to Imbued Weapons that doesn't rely solely on the Boss Bit.
« Last Edit: February 14, 2014, 11:39:24 AM by Grimoire LD »

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,684
    • View Profile
Made one change to the Dark Wave formula which was causing some strange issues with targeting. The game uses a "target" to look at for Dark Wave instead of using the Mirror Data at 2680. When this is used from a weapon the game draws the amount of HP to remove from the Current Target's HP rather than the Caster. So I changed this to look at the mirror data here...

$03/E9F1   AD 89 26   LDA $2689  [$7E:2689]   A:0004   X:0280   Y:0000   P:envmxdizC - And everything looks to be working great!

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,684
    • View Profile
I did so much cool with Cid that I didn't want him to be just be there and then be gone as the normal plot of the game, so instead I did something else...

First I need to disable any Item Switching when a character is loaded from a Shadow Slot for obvious reasons for this plan to work.

Secondly... the means in which this is done is without hacking of any kind (except for what I just mentioned above)

I am not sure if this known, but if you have a default character load to a Shadow Slot and say... we load Kain to Shadow Slot 2. When his second actor joins it will be loaded from Shadow Slot 2 but Also Saved to Shadow Slot 2 so his third iteration no longer needs an Actor Slot to himself and can self load from Shadow Slot 2.

So with that in mind I changed Kain3 to load Cid2 and Tellah3 to load Edge2.

Now here is how my event works. I changed the Magazine to "Switch" when used it will ask "Choose Yes to replace Cid for Edge. Choose No to replace Edge for Cid or keep Edge."

This is done by removing three actors.

Remove Edge from Party
Remove Kain3(Cid2) from Party
Remove Tellah3(Edge2) from Party
Yes/No Dialogue IF Yes:
Add Kain3(Cid2) to Party

If No
Add Tellah3(Edge2) to party

And it was as simple as that. I suppose if you didn't want to use any hacking you can Explicitly warn the player about removing the current equipment on Cid/Edge so they will return with nothing and need re-equipped.


koala_knight

  • Tunnel Armor
  • *
  • Posts: 166
  • Gender: Male
    • View Profile
Re: Grimoire LD's Notes, Patches, and Hacks (1 Party Member Switch Item Created!)
« Reply #339 on: February 19, 2014, 10:08:52 PM »
I don't recall the state of event editing in FF4, nor am I very aware of the availability of space for such a thing, but would it be viable to create something like the party switching thing they did for FF4A?

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,684
    • View Profile
Re: Grimoire LD's Notes, Patches, and Hacks (1 Party Member Switch Item Created!)
« Reply #340 on: February 19, 2014, 10:25:53 PM »
That would be a highly unfortunate no...

The issue is not event space, there's Tons of it, FFIV's event system has been Completely cracked and the editor lets you edit events so easily. The issue is with the way the Shadow Slot system is set up. When a character leaves your party (and aren't specifically excluded from battle, Rydia at Fabul as the largest case of this) they are either Discarded or placed into an assigned Shadow Slot. Now unfortunately there are only five Shadow Slots and one of those Shadow Slots are foolishly enough occupied by FuSoYa at the end game. But even if we had more Shadow Slots it wouldn't make a difference without the actors to load and FFIV is strapped for usable actors. In this Shadow Slot they can only be drawn by drawing these characters from their Shadow Slot over their preferably corresponding abilities and equipment (that part is easy enough to change) but the default game basically only has Two (Possibly Three. Since Anna does count as a character but for some reason the editor doesn't let you edit her or Golbez) available Slots.

Now Phoenix made a patch to make all the characters fit into the prescribed space by changing the way the storing system worked. At the time he wasn't aware that his compounding of data was also making it so you could never Critical Hit again and it screwed up the Experience tables.

So in short... it is not plausible at this very moment. Should we find more space in RAM there might be a way to make it work from a Main Menu branch. But how we would go about that is completely obscure to me. Granted I have found a roughly 200 byte area in RAM that never seems to be used around 7E1C00.

koala_knight

  • Tunnel Armor
  • *
  • Posts: 166
  • Gender: Male
    • View Profile
Re: Grimoire LD's Notes, Patches, and Hacks (1 Party Member Switch Item Created!)
« Reply #341 on: February 20, 2014, 10:59:15 AM »
Interesting. Thanks for the insight. It would be an impressive feat.

Pinkpuff

  • Flan Princess
  • *
  • Posts: 924
  • Find a Megalixir in Unprecedented Crisis!
    • View Profile
Re: Grimoire LD's Notes, Patches, and Hacks (1 Party Member Switch Item Created!)
« Reply #342 on: February 20, 2014, 02:24:54 PM »
Now Phoenix made a patch to make all the characters fit into the prescribed space by changing the way the storing system worked. At the time he wasn't aware that his compounding of data was also making it so you could never Critical Hit again and it screwed up the Experience tables.

It made me so sad that it never quite worked out. If someone were to ever figure out a way to accomplish this seamlessly (or even playably!) I think I would cry tears of joy IRL.
Let's dance!

fedorajoe

  • Mom Bomb
  • *
  • Posts: 123
  • Gender: Male
  • "G...Golbez!"
    • View Profile
Grimoire LD, I had another question in follow up to our prior conversation on command editing.

When a spell is cast by a command (like in my example, where the Pressure command casts Hold), is it possible to edit the palette of the spell visual?  In other words, if I wanted Pressure's visuals to be a different palette than you see when you normally cast Hold, is this possible?  I'm not sure if one could load such an instruction into the command without having to alter the spell itself.

Thanks!

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,684
    • View Profile
I'm afraid that is all in the spell data. I've never come across anything that did anything which loaded specific palettes. That sort of matter is mostly pre-loaded in ROM with the Spell. I could be wrong though to say it is never completely stored in RAM. What you can do however is make a dummy Hold that is used purely for the spell and switch the casted spell to that one. Right after W Meteo there are two unused spell slots that you could use for this very purpose. This would also have the effect of making the spell's success based on Wisdom rather than Will and you can change accuracy rates as you please in such an event.