• Welcome to Final Fantasy Hacktics. Please login or sign up.
 

Collection of ASM/Hex

Started by formerdeathcorps, May 18, 2010, 11:30:45 am

formerdeathcorps

May 18, 2010, 11:30:45 am Last Edit: January 16, 2011, 06:21:42 pm by formerdeathcorps
It's high time FFH gets back to more research of basic game mechanics:

Deconstructions and Modifications (Debugs/Parts of Razele's Hacks):

Walled units can take damage (v2).  The AI may target walled units with healing or damage (needs confirmation).  The AI still will not target walled units with healing or damage.
BATTLE.BIN
0x120D52 from 0x40 to 0x42
0x124AE2 change 0x40 to 0x42

Remove item duplication (v1).  This deletes the best fit feature.
WORLD/WORLD.BIN
0xB5254 change 8853 to 303D (courtesy of Cheetah at finding the offset and Jack of All Trades for providing me an old backup of my hack to easily spot this offset)

Performing units will evade attacks.
BATTLE.BIN
0x11F3DC change 0x08 to 0x09

Oil takes 2x damage from fire attacks.
BATTLE.BIN
0x11F464 change 982D428C to B74D0508
0xEC6DC
982D438C
5A006390
80006430
03008014
00000000
C74D0508
00000000
F7384490
80008430
03008014
00000000
C74D0508
00000000
CE384384
40180300
CE3843A4
982D428C
1B190608
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000

Oil takes 2x damage from fire; float takes 2x damage from wind (v2).
BATTLE.BIN
0x11F464 change 982D428C to B74D0508
0xEC6DC
98 2D 43 8C
5A 00 63 90
40 00 64 30
05 00 80 14
80 00 64 30
09 00 80 14
00 00 00 00
CF 4D 05 08
00 00 00 00
F7 38 44 90
10 00 84 30
09 00 80 14
00 00 00 00
BB 4D 05 08
00 00 00 00
F7 38 44 90
80 00 84 30
03 00 80 14
00 00 00 00
CF 4D 05 08
00 00 00 00
CE 38 43 84
40 18 03 00
CE 38 43 A4
98 2D 42 8C
1B 19 06 08
00 00 00 00

Oil takes 2x damage from fire; blind takes 2x damage from darkness (v2).
BATTLE.BIN
0x11F464 change 982D428C to 3A4E0508
0xEC8E8
982D438C
59006490
20008430
06008014
5A006490
80008430
09008014
00000000
534E0508
00000000
F7384490
01008430
09008014
00000000
3E4E0508
00000000
F7384490
80008430
03008014
00000000
534D0508
00000000
CE384384
40180300
CE3843A4
982D428C
1B190608
00000000

Razele's Item Limitation Hack (v2).

BATTLE.BIN
Replace XX with amount of max items you want per battle
Replace YY with XX + 1
Replace ZZ so that XX+ZZ = 0x100 (in hex) or 256 (in decimal).

Ex : For 10 max items per battle,
XX = 0x0A
YY = 0x0B
ZZ = 0x100-0x0A = 0xF6

0x11B864 change 21900000 to 6F4D0508
0x119ED4 change 44384294 to 8F4D0508
0xEC5BC
21900000
0580013C
D0972134
1580023C
AC354234
00002390
YY00642C
05008014
00000000
ZZFF6324
XX000424
804D0508
00000000
21200300
21180000
804D0508
00000000
000024A0
000043A0
01002124
01004224
01005226
0E00442E
EDFF8014
00000000
1580033C
BB356334
000060A0
1980013C
21900000
1A0A0608
00000000
1580023C
BB354290
21004014
00000000
1580023C
00344234
000044AC
040045AC
080046AC
21300000
0580023C
D0974234
1580033C
AC356334
00004490
00006590
21208500
6400852C
0200A014
00000000
63000424
000044A0
01004224
01006324
0100C624
0E00C42C
F3FF8014
00000000
01000424
1580023C
BB3544A0
1580023C
00344234
0000448C
0400458C
0800468C
1980023C
44384294
B7030608
00000000

Only X species of monsters are mountable.
BATTLE.BIN
0x10D3E4 change 0x03 to 0xYY
0xYY = 3 * X.  The monsters will go in order of job number, as listed in FFTPatcher.

Blade Grasp now blocks all melee 1 range weapons except bags (v2).
BATTLE.BIN
0x126054 change F6384290 to 5C4D0508
0x12605C change 0x10 to 0x20
0xEC570
D8384390
40200300
21208300
80200400
0680053C
2128A400
BD2EA590
F6FFA524
0A00A52C
0300A014
F3384290
17340608
00000224
17340608
00000000

Blade Grasp now blocks all melee and lunging weapons (v2).  If you want to exclude bags and cloths, change 0xED to 0xEF and 0x04 to 0x02.
BATTLE.BIN
0x126054 change F6384290 to 564E0508
0x12605C change 0x10 to 0x20
0xEC958
D8384390
40200300
21208300
80200400
0680053C
2128A400
BD2EA590
F6FFA524
0A00A52C
0700A014
BD2EA590
EDFFA524
0400A52C
0300A014
F3384290
17340608
00000224
17340608
00000000

Blade Grasp now blocks all sharp weapons + fists (v2) except axes and flails (which are pathetic as is).
BATTLE.BIN
0x126054 change F6384290 to 564E0508
0x12605C change 0x10 to 0x20
0xEC958
D8384390
40200300
21208300
80200400
0680053C
2128A400
BD2EA590
FAFFA524
0600A52C
0700A014
BD2EA590
F0FFA524
0100A52C
0300A014
F3384290
17340608
00000224
17340608
00000000

Hex Edits

Change brave gain by chickened units.
BATTLE.BIN
0x11C290 change 0x81 to 0xYY
The brave gained + 0x80 = 0xYY.  Obviously, you cannot gain more than 127 brave.

Change brave gain by Brave Up.
BATTLE.BIN
0x124090 change 0x83 to 0xYY
The brave gained + 0x80 = 0xYY.  Obviously, you cannot gain more than 127 brave.

Change faith gain of Face Up.
BATTLE.BIN
0x1240A4 change 0x83 to 0xYY
The faith gained + 0x80 = 0xYY.  Obviously, you cannot gain more than 127 faith.

Arrow Guard now blocks gunshots.
BATTLE.BIN
0x126128 change 0xF5 to 0xF6
0x12612C change 0x02 to 0x03

Change reaction ability activation rate (v1).  Note, this affects all reactive counter abilities.
BATTLE.BIN
0x12639C change 0x64 to 0xYY
The chance of a reaction to activate is (Br / YY).

Change the stat required to activate reactions (v1).  Note, this affects all reactive counter abilities.
BATTLE.BIN
0x126398 change 0x24 to 0xYY
The list of what number corresponds to what stat is here: http://www.ffhacktics.com/wiki/Formula_Hacking.

Change initial items.
SCUS_942.21
0x3322C-332A7
I will explain how to fix this without knowing any ASM.  XX 00 0Y 34 means that you will start out with XX copies of any item ZZ 97 2Y A0, where ZZ references the item.  Note how Y corresponds (for the sake of safety, Y should only be either 2 or 3).  You will notice 05 00 02 34 appears first and 01 00 02 34 appears second.  This is because you start with 5 potions (D0), but 1 of rarer chemist consumables.  Thus, changing the 05 will change the initial amount of potions, changing 01 will change the initial amount of all the other chemist items (except antidote and PD).

ASM

Invite will now be appropriately used by the AI (v1).

BATTLE.BIN
0x1271E4 change 08004014 to 694E0508
0x127220 change 08004014 to 744E0508
0xEC9A4
08004014
00000000
59008290
00000000
40004230
03004014
00000000
80380608
00000000
7A380608
00000000
08004014
00000000
59008290
00000000
40004230
03004014
00000000
89380608
00000000
90380608
00000000

Blind and Confuse overrides concentrate/transparent accuracy bonus and now divides accuracy by 2 (v3).  Will affect monsters and humans equally.
BATTLE.BIN
0x11E350 change DC 38 to 82 26
0x11E35C change 42 10 02 00 to 7B 4E 05 08
0xEC9EC
42 10 02 00
00 00 62 A0
24 63 C0 01
00 00 62 90
00 00 00 00
42 10 02 00
D8 14 06 08
The destruction of the will is the rape of the mind.
The dogmas of every era are nothing but the fantasies of those in power; their dreams are our waking nightmares.

philsov

Just another rebel plotting rebellion.

LastingDawn

My goodness!! This is beautiful work! I love that Reaction = YY hack the most! Instead of gawking, I should probably try to assist you as I can. I'll be on IRC for pretty much this week until Friday.
"Moment's anger can revert to joy,
sadness can be turned to delight.
A nation destroyed cannot be restored,
the dead brought back to life."

Art of War

Beta & Gretchen Forever!!!!

philsov

QuoteI love that Reaction = YY hack the most!

It is deliciously tempting, especially with its synergy with the Brave to Fury hack from SB.
Just another rebel plotting rebellion.

LastingDawn

Eh? Didn't Zodiac create the Fury hack? Or is my mind playing tricks on me...?
"Moment's anger can revert to joy,
sadness can be turned to delight.
A nation destroyed cannot be restored,
the dead brought back to life."

Art of War

Beta & Gretchen Forever!!!!

philsov

aha, he did indeed.  Don't mind that aspect then >_>.  

Still!  Synergy!  Hoooooooot.
Just another rebel plotting rebellion.

R999

About time you posted this :)   Good work man.

By the way, let's help me finish that tutorial. This place needs more hackers.

formerdeathcorps

All right, added some stuff on blade grasp to reflect the options I was discussing in my hack's thread.  As for that ASM tutorial, I think it would be easier if we involve more people in the iRC chat or have people here give me questions to answer so I can try to explain what I do.
The destruction of the will is the rape of the mind.
The dogmas of every era are nothing but the fantasies of those in power; their dreams are our waking nightmares.

philsov

I'm rare to chat but would prefer the message board format so everything is easily logged.

So as far as questions go... I'm interested in finding the location of the status inflicting reactions (dragon spirit, regenerator, sunken, caution) for use of hex editing.  How can I go about it?  Are there ptterns to look for?  Etc
Just another rebel plotting rebellion.

SentinalBlade

Nice work, FDC.

I cant find my notes, but i should be able to make time this weekend, and maybe we could collaborate on some of these things...


Why are you overwriting some of Razel's seemingly unrelated hacks? has Zodiac not allotted you space in battle.bin yet?

formerdeathcorps

May 19, 2010, 05:54:46 pm #10 Last Edit: January 16, 2011, 06:30:15 pm by formerdeathcorps
Philsov, I was about to type up what I have found reaction abilities for public notice, and you just happened to ask that question.  Yes, there are things to search for, but without knowledge of ASM (or at least the ability to recompile hex => instructions either in your head or with a program), it's hard to decipher.  Plus, these abilities are scattered in frightfully illogical ways in BATTLE.BIN.
SB, Zodiac has given me space; I just haven't reassigned offsets yet because my patch doesn't need them (I'm overwriting hacks of Razele that I'm not using).  When I release the latest version of my patch, I'll repoint my hacks.

Misc Reactions:
0x11706C Hamedo
0x11DFB4 Weapon Guard
0x11E3B0 Abandon
0x121324 Finger Guard (note, it has its denominator set at 0x121334)
0x1213FC Catch (note, it has its denominator set at 0x121404)

Check Phase I (route to 0x125AF0):
0x125AC4: Blade Grasp
0x125ACC: Arrow Guard

Check Phase II (route to 0x125C1C):
0x125B3C: Sunken State
0x125B58: Caution
0x125B60: Dragon Spirit
0x125B7C: Brave Up
0x125B98: Faith Up
0x125BA0: Counter Tackle
0x125BC4: Counter Flood
0x125BE0: Absorb Used MP
0x125BE8: Counter
0x125C0C: Blank

Check Phase III (route to 0x125CC8):
0x125C78: MP Switch
0x125C80: Distribute
0x125CB4: Damage Split

Check Phase IV (route to 0x125DEC):
0x125D1C: A Save
0x125D24: MA Save
0x125D34: Speed Save
0x125D44: Regenerator
0x125DD4: Gilgame Heart
0x125DE0: Auto Potion

Check Phase V (route to 0x125DF4)
0x125D68: HP Restore
0x125D70: MP Restore
0x125D88: Critical Quick
0x125DA0: Meatbone Slash

Changeable Elements:

0x125F0C: 5A008290
0x125F14: 01004230
Changing 5a and 01 lets you change what status effect triggers the reactions of Check Phase V.

0x126070: 64000234
0x126074: 24008390
Changing 64 changes the denominator for blade grasp (and possibly for arrow guard too).  Changing 24 changes what status is indexed in the numerator.

0x126134: 64000234
0x126144: 24008390
Changing 64 changes the denominator for some reaction abilities (I suspect the offset I found earlier might not be fully representative of all reactions).  Changing 24 changes what status is indexed in the numerator.

0x1261E4: 2C008294
Changing 2C changes what status is indexed (this indexes MP...I think this is the reference for MP Restore).

0x1262C4: 2A00A294
0x1262C8: 2800A394
0x1262CC: 06008484
0x1262D0: 23104300
0x1262D4: 23808200
This one's tricky.  I'm not sure which reaction is indexed here.  This is calculating MaxHP (2A)-CurHP (28) and then comparing that against the value at 0x192D96.

I'm not sure, but I may have the other half of astra/wall targeting solved.  Change 0x120D52 from 0x40 to 0x42.  Just don't do input this with your debugger after you cast astra (because I suspect once a unit has wall/astra, the game will loop such that it cannot recheck until the unit has lost wall/astra).

Can't seem to find where counter magic or reflect resides.
The destruction of the will is the rape of the mind.
The dogmas of every era are nothing but the fantasies of those in power; their dreams are our waking nightmares.

LastingDawn

You sir have now proceeded into one of the most coveted territory! Support and Reactions have long been nearly inaccessible! Thank you for opening the gates wide open for the rest of us!
"Moment's anger can revert to joy,
sadness can be turned to delight.
A nation destroyed cannot be restored,
the dead brought back to life."

Art of War

Beta & Gretchen Forever!!!!

Cheetah

Keep up the great work FDC. These are some really great gains.
Current Projects:

Timbo

Pretty excited to see what comes out of this.
  • Modding version: PSX
  • Discord username: Timbo

Vanya

Bravo! Commence with the showering of much loves!

*Loves begin showering on FDC*
  • Modding version: Other/Unknown
¯\(°_0)/¯

AvengerXP

QuoteASM

Invite will now be appropriately used by the AI (v1).

BATTLE.BIN
0x1271E4 change 08004014 to 694E0508
0x127220 change 08004014 to 744E0508
0xEC9A4
08004014
...

My BATTLE.BIN PSX file contains at
0x1271E4 06004010
0x127220 07004014

Is it an error or a minor difference and I can simply overwrite these? And just to be extra-careful, what does the first line at 0xEC9A4 look like to you in your file before change?

QuoteChange reaction ability activation rate (v1). Note, this affects all reactive counter abilities.
BATTLE.BIN
0x12639C change 0x64 to 0xYY
The chance of a reaction to activate is (Br / YY).

0x12639C contains 0x33, the closest 64 i see is at 1263A0. Is it that one?

What kind of fucked up PSX do I have? It looks NTSC English alright...

EDIT : I forgot to praise you, my bad. These are all excellent, especially the Brave Value reaction % since having 100% Reactions is in my opinion a superb game-breaking bug when using Hamedo or Blade Grasp.

zombero

Thanks for the useful information.  Though unfortunately, Br/YY is not an accurate formula Blade Grasp and Arrow Guard.  It is the abs(Br-YY) mod 100 = hit rate.  This means if you set YY to anything other than 100, you get roll over issues.  I.E. if I want to nerf Blade Grasp and make it Br-130, at 70 Brave this will work well, abs(70-130) mod 100 = 60% chance to be hit, not nearly so powerful as reducing it to 30% like normal Blade Grasp would.  But if you had 29 brave, abs(29-130) mod 100 = 1% chance to be hit.  That's no good :(

Also:
126070 is the location for Blade Grasp's YY only.  Arrow Guard's is at 126134.

formerdeathcorps

OK...my blind hack and blade grasp hacks technically don't work as posted.  I'll post the correct versions later.

I'm currently working on a hack from secondadvent's notes.  If used correctly, I should be able to delete the NS and non-elemental status from each weapon formula.  Now, you truly will have dark sword and MP Drain be dark elemental.
The destruction of the will is the rape of the mind.
The dogmas of every era are nothing but the fantasies of those in power; their dreams are our waking nightmares.

LastingDawn

And that would be positively fantastic. Welcome back formerdeathcorps. Your presence has been missed.
"Moment's anger can revert to joy,
sadness can be turned to delight.
A nation destroyed cannot be restored,
the dead brought back to life."

Art of War

Beta & Gretchen Forever!!!!

zombero

Removing NS and non-elem from formulas is always a good thing :D Though I'm curious, how is it your Blind hack works then?  I haven't experimented with that yet.