Final Fantasy Hacktics

Projects => Completed Mods => FFT Arena => Topic started by: dw6561 on June 20, 2016, 09:37:37 pm

Title: FFT Arena 1.40 ASMs
Post by: dw6561 on June 20, 2016, 09:37:37 pm
Here are the ASM's we're using for FFT Arena 1.40! For people making the patches, all you have to do is check all of the hacks and you're good. I tried to make it as simple as possible, so please let me know if there are any problems.

What's in the XML files:

Old Oil (actually current oil :P)
MP Regen/MP Poison
Wall reduces most forms of damage to 1 revert


Formula 05 becomes DmgMP_[Weapon]
Slow Dance repurposed to Break Dance
Formula 39 lowers PA and MA by 1
Formula 28 becomes Heal_(Y)% Hit_UnBrave(PA+X)% NE
Formula 14 becomes DmgMP_F(MA*Y)
Formula 44 becomes Dmg_(CasMaxMP)
Jump CT formula hack
Formula 63 becomes New Shuriken v2
Formula 57 becomes Gil Toss
Book Formula Changes to MA*WP
Tons Become Magic Evadable


Regenerator grants MP Regen and Regen
Sunken State gives Faith Status
Catch becomes New Caution
MP Switch Overflows to HP Damage
Equip X Supports
1/3 of MP
Train becomes Desperation - Updated to work for all weapons
Luck UP Support Hack
Brave Up gets MP Cost Trigger
Abandon ACTUALLY gives 50% evade bonus


Also included: MP Regen/MP Poison color edits, Extended Item Attributes.

UPDATE: Desperation is (theoretically) fixed to work with all weapons now. USE AT YOUR OWN RISK. Abandon Fixed to be 50% instead of 33%.

Attached free XML contains the old desperation just in case the other one doesn't work.
Title: Re: FFT Arena 1.40 ASMs
Post by: Emmy on June 21, 2016, 12:41:27 am
Sunken State in vanilla has a countergrasp trigger, not hp damage.  I also noticed your hack doesn't change this trigger.
Title: Re: FFT Arena 1.40 ASMs
Post by: dw6561 on June 26, 2016, 05:42:39 pm
I updated the XML files for the things we talked about in the final discussion. Please let me know if anything is wrong with my hacks.
Title: Re: FFT Arena 1.40 ASMs
Post by: Gaignun on June 27, 2016, 12:37:25 pm
Is changing weaknesses from 200% damage to 150% damage an easy hack?  This might be advisable if Oil is too strong in 1.40.
Title: Re: FFT Arena 1.40 ASMs
Post by: dw6561 on June 27, 2016, 07:48:38 pm
Corrected an error in RSM bundle, and uploaded the extended item attributes.

Gaignun, that hack wouldn't be difficult to make. That being said, I don't think oil will be TOO bad in 1.4 since we limited its sources, took it off of hawk's eye, etc. The only real way to get it reliably is via short edge, which received a proc chance nerf to 50%. We'll see how it fares.
Title: Re: FFT Arena 1.40 ASMs
Post by: dw6561 on June 29, 2016, 01:41:15 pm
Added a poll for initial: Reflect after discovering that the status does indeed wear off.
Title: Re: FFT Arena 1.40 ASMs
Post by: dw6561 on June 29, 2016, 11:12:04 pm
Corrected a rather glaring error with the formula 39 hack being inserted at the same place as the formula 44 hack, messing up the climhazzard formula. I feel like such a derp. :P
Title: Re: FFT Arena 1.40 ASMs
Post by: dw6561 on July 01, 2016, 11:49:09 pm
Updated the "Brave Up gets MP Cost Trigger" hack so that it actually works instead of being a clone of faith up. Also, the hack that makes wall reduce most forms of damage to 1 is present in Arena, so I had to disable that as well.
Title: Re: FFT Arena 1.40 ASMs
Post by: dw6561 on July 04, 2016, 03:17:10 pm
Fixed an issue with Chakra Band and Choice Band's attributes being swapped around. Once again, feel free to notify me if there's an issue with any of the things I post here.
Title: Re: FFT Arena 1.40 ASMs
Post by: dw6561 on July 07, 2016, 08:58:07 pm
Platina Armor should now give +1 MA instead of PA, and I also removed the unfury calculation from the hacks because that was causing issues for some people while patching. It was really just there as a resource for those who want to use it for another patch.
Title: Re: FFT Arena 1.40 ASMs
Post by: Barren on July 08, 2016, 09:48:05 am
Keep up the good work DW
Title: Re: FFT Arena 1.40 ASMs
Post by: dw6561 on July 09, 2016, 02:57:36 pm
Added the Book formula change we have long been waiting for.
Title: Re: FFT Arena 1.40 ASMs
Post by: Barren on July 14, 2016, 07:28:27 am
I was testing 1.4 just now and my paladin tried to use reraise on my time mage, after the time mage moved the reraise spell didn't work. It only worked if the targeted wasn't moving
Title: Re: FFT Arena 1.40 ASMs
Post by: Andrew on July 14, 2016, 11:56:48 am
(Already talked to Barren via PM about this)
Title: Re: FFT Arena 1.40 ASMs
Post by: Gaignun on July 15, 2016, 08:26:14 am
It sounds like the Reraise spell is targeting the panel and not the unit.  It has been awhile since I played with FFTA, but doesn't the AI also target panels and not units when using Time and Summon magic?
Title: Re: FFT Arena 1.40 ASMs
Post by: Barren on July 15, 2016, 08:32:00 am
Just spoke to Andrew about it, he told me that it was missing the check target CT AI flag.
Title: Re: FFT Arena 1.40 ASMs
Post by: dw6561 on July 16, 2016, 10:54:51 pm
Alright guys, there's apparently something wrong with regenerator. It's sometimes acting like its supposed to, and other times it reacts with counter tackle instead. I don't know what the issue is, but 1.40 will have to be delayed until I figure out why this is happening and the issue is fixed. There shouldn't be anything wrong with my code, but I could have done something stupid with it and just not noticed.
Title: Re: FFT Arena 1.40 ASMs
Post by: dw6561 on July 17, 2016, 06:05:31 pm
Turns out the issues with regenerator were caused by the brave up hack! It was one instruction down from where it was supposed to be, so it overwrote the next line which loads the next set of reactions (0x8c). Because Counter Tackle and Regenerator share a bit (0x02), it then sees counter tackle and proceeds to react with that. This has been amended, and Regenerator should work as intended now.
Title: Re: FFT Arena 1.40 ASMs
Post by: Barren on July 17, 2016, 06:14:55 pm
Is there going to be this update for the new ppf file then on discord?
Title: Re: FFT Arena 1.40 ASMs
Post by: Andrew on July 17, 2016, 06:56:07 pm
Yup, it's up right now.
Title: Re: FFT Arena 1.40 ASMs
Post by: dw6561 on July 23, 2016, 01:54:48 am
We were having several issues with wall, so we decided to have MP Regen be the blank status and MP Poison be Dark/Evil Looking. Additionally, both are 1/8 now and are canceled on death to balance accordingly.

Also, if anyone uses that wall hack, don't. Changing the byte at 0x19ef56 to 00 apparently has a profound effect on the AI's behavior. Apparently, changing the byte DOES allow AI to target walled units, but it also messes up status recovery substantially from what I've noticed. This is obviously too broad of a fix and needs to be looked into further, but in the meantime we have a short term fix.
Title: Re: FFT Arena 1.40 ASMs
Post by: dw6561 on July 23, 2016, 07:34:46 pm
Ethereal spear and Mage Masher formula is now fixed.
Title: Re: FFT Arena 1.40 ASMs
Post by: dw6561 on August 07, 2016, 08:39:39 pm
I apologize to anyone who used the old XML's, because I hadn't updated them in a long time. They should be good to go now, but still let me know if I forgot something.

Added a section called "Future ASM's" that shows the hacks we're developing for the next patch.
Title: Re: FFT Arena 1.40 ASMs
Post by: dw6561 on August 19, 2016, 11:20:45 pm
Abandon fix is up along with making Tons Magic Evadable.
Title: Re: FFT Arena 1.40 ASMs
Post by: Gaignun on August 20, 2016, 12:31:41 am
You figured out the issue with Abandon?  What was the problem in the end?
Title: Re: FFT Arena 1.40 ASMs
Post by: dw6561 on August 20, 2016, 01:09:53 am
The problem with abandon was that the hack that was used didn't take into account how FFT actually calculates the evade. The abandon calculation is done before the game calculates evasion, so it does the operations on the number 100%.

What the abandon hack does is this:
001853c4: 90620000 lbu r2,0x0000(r3)   Load base hit%
001853c8: 00022882 srl r5,r2,0x02      r5 = r2 / 4
001853cc: 00451023 subu r2,r2,r5      r2 = r2 - r2 / 4 = approx r2 * 3/4
001853d0: a0620000 sb r2,0x0000(r3)   Store new hit%

However, remember that this "base hit%" does not factor in evasion. So, this number is 100%, as it was initialized in an earlier routine and not touched until now. What this routine is doing is multiplying by 3/4 which is what we wanted to do to the final number and not this one. I think the creator of the hack thought that he was doing the operations on the final hit% itself and not this base hit% thingy. So we end up with 75% as the new base hit%.


What it does:
Assuming Genji Gauntlet (30% MEV) ONLY

The abandon calculation sets Base Hit% = 75% as explained earlier.
Base Hit% - Accessory Evade = 75% - 30% = 45%
45% * 100 = 4500%
Modified Hit% / Original Hit% = 4500% / 75% = 60%

Thus, 60% is our final evade.

(Base Hit - Evade) * 100 / Base Hit is the formula that is used.

Vanilla's Abandon:
(50 - Evade) * 100 / 50 = (50 - Evade) * 2 = 100 - 2 * Evade (essentially just giving double evasion)

Arena's Abandon:
(75 - Evade) * 100 / 75 = (75 - Evade) * 4 / 3 (Which is NOT evasion * 1.5)

What I did was I just said screw it and forced it to store 67% as the new base hit%. So we now have:

(67 - Evade) * 100 / 67 = (67 - Evade) * 100 / 2/3 = (67 - Evade) * 3 / 2 = 100 - Evade * 3 / 2

which is what we want.
Title: Re: FFT Arena 1.40 ASMs
Post by: dw6561 on August 20, 2016, 02:42:57 am
Abandon fixed again, this time it was 1 byte that was causing problems. Should have been 3c038019 instead of 3c028019.
Title: Re: FFT Arena 1.40 ASMs
Post by: Adhelbert on November 21, 2016, 01:42:11 pm
Hi everyone  :mrgreen:

Just want to say that formula 14 seems to make game crash when you use it  :|

I already know that golem formula is hardcoded, so i'm asking if there is a correct way to make this formula works properly  :)

Thanks
Title: Re: FFT Arena 1.40 ASMs
Post by: dw6561 on November 21, 2016, 04:31:53 pm
About that, I did fix this formula as it is in the current arena and it works perfectly fine. I'll upload the newest version of it fairly soon here. I didn't realize I didn't update it here.
Title: Re: FFT Arena 1.40 ASMs
Post by: dw6561 on December 05, 2016, 01:10:19 am
Fury Bug Uncovered!
The fury hack is made up of two parts: Storing a "fury multiplier", and actually multiplying it with the XA and dividing by 10000 to get the final damage. The first part is called in "Attacker Berserk/Frog Check" which is in many physical damage formulas. The second part is called in the XA * YA calculation. Well, there's the problem...Some of our formulas, most notibly the cover fire formula and the bullrush formula, use attacker berserk/frog but never call the XA * YA calculation, which means it never executes the second section of the fury hack! This causes problems for formulas that use the XA * YA calculation and not fury, like magic since it never calculates a new fury multiplier.

Of course, I released my crude fix for this bug, but it only really intercepts the problem before the next attack. If what I think is true, my fix doesn't actually "fix" the problem, and counter flood may not be the only thing unintentionally affected by fury (like counter tackle, which is most likely why I thought bullrush itself was affected!). If to top that off, there's also numerous load delay errors in the fury hack that we'll need to eventually iron out. This being a long-term goal for Arena's future, I thought it would be a good idea to bring this up now before we (meaning I) completely slaughter Arena's code even more.
Title: Re: FFT Arena 1.40 ASMs
Post by: Andrew on December 05, 2016, 01:33:04 am
Good stuff, DW!!
Title: Re: FFT Arena 1.40 ASMs
Post by: Gaignun on December 05, 2016, 04:37:02 am
So, if I am understanding this correctly, do Cover Fire and Bullrish assign some Fury data to a register that is used by unrelated skills, like magic, later on?
Title: Re: FFT Arena 1.40 ASMs
Post by: HalfGodBro on January 26, 2018, 04:36:17 am
Sorry for bumping this, but is there any update on this? I'm looking for the ASM Hack used to make the new Brave PAxY Formula :) and also the PAxY one only, would save me a lots of time for my mod, thanks :)
Title: Re: FFT Arena 1.40 ASMs
Post by: saw2th on January 25, 2020, 03:36:48 am
Is there an updated version of this? or label discontinued ones with "(currently unused)"