Please login or register.

Login with username, password and session length
Advanced search  

News:

Use of ePSXe before 2.0 is highly discouraged. Mednafen/RetroArch is recommended for playing/testing, pSX is recommended for debugging.

Pages: [1] 2 3
Glain [Posts: 514]
  • View Profile
  • share
  • [October 07, 2011, 11:27:15 PM]
This is my miscellaneous ASM thread, for assorted ASM hacks I've done that don't have a thread, or are scattered throughout miscellaneous threads. Basically I'm starting this thread at Pride's suggestion, as sometimes I'll write some ASM in some other section and it will get buried somewhere in a thread that's hard to find. Also, so I have a place to post some things I've done that don't fit anywhere else.

Applications

MassHexASM - For encoding ASM commands into PSX-ready binary commands (with the little-endian option), or decoding them from binary commands to ASM instructions. This way you don't have to manually switch byte order like you did with Renegade64. Ideally, the output can just be pasted into a patch file.
Thread: http://ffhacktics.com/smf/index.php?topic=7130.0

LEDecoder - Disassemble binary files into ASM commands, with an option for using little endian byte order. I couldn't find any MIPS disassemblers out there that would let you specify little endian, so I wrote this. (I used this program to disassemble some of the files in the EFFECT subdirectory of the ISO and found ASM commands in there...)
Thread: http://ffhacktics.com/smf/index.php?topic=7758.0

Spreadsheet ASM Hacks

UWEntries - Change which base jobs use which UNIT.BIN and WLDFACE.BIN entries. For changing special characters, not generics.
Thread: http://ffhacktics.com/smf/index.php?topic=7833.0

Gear Level ASM Hacks

Gear Level bugfix - Fixes a bug in FFT where the random gear routine could select extremely low level equipment in certain situations (e.g. Linen Robe in Chapter 4).
Post: http://ffhacktics.com/smf/index.php?topic=6971.msg142849#msg142849

Gear level based on Shop Availability (Story Progression) with override (0x16b)
This is the standard gear level patch (based on shop availability) with an FFTPatcher override.  My latest version.

Gear level based on Shop Availability (Story Progression) - Picks random equipment based on what's currently in the shops instead of the levels of the units. Allows enemy levels to scale with you without their equipment scaling.
Post: http://ffhacktics.com/smf/index.php?topic=6971.msg146276#msg146276

Other ASM Hacks

All formulas apply elemental (v2)
All formulas apply elemental.
Affects HP Damage, MP Damage, HP Healing, and MP Healing.

Ability element takes precedent over weapon element, and will be used unless
the ability's "Weapon Strike" and flag under "Hit Allies" are both checked, in which
case the Ability and Weapon elements will be combined.

Optional: You can specify a multiplier to be applied to damage and/or a separate multiplier for healing. 
The format for the multipliers is 16.16 fixed point (e.g. 1.25 = 00014000).
A multiplier of zero (default) will be ignored.

Swordskill strengthen (v2) - Strengthen should work with ability element for Holy/Dark sword; Dark Sword gains strengthen, status proc, (WP+Y)
This version has a variable flag to decide whether to use PA or MA.

Defense (Equipment grants damage reduction) (v2)
In the item data, this patch interprets Unknown 1 as Physical damage reduction (percentage) and Unknown 2 as Magical damage reduction (percentage).
The damage reduction percentage for each piece of equipment is added to determine the total damage reduction.
An ability's classification as physical or magical is determined by the 'Physical Attack' and 'Magical Attack' AI flags for the ability.
If an ability is flagged with both (this shouldn't happen, really), both damage reduction percentages (physical AND magical) will be applied
(the sum of the two)!

Crystals - Learn from any base job
This hack's for learning from crystals where the enemy base job is different from yours. For example, Night Sword from Gafgarion. You'll need to put the ability to learn in the same slot as the skillset you're learning into. Since this one did appear in another thread, there's more info on it here.

Hide excessive HP/MP recovery
Excessive HP/MP recovery is not displayed.
Post: http://ffhacktics.com/smf/index.php?topic=10535.msg203041#msg203041

Signed Ability Y Values
This allows you to use negative numbers for Y values in formulas. Any Y > 127 is considered as the negative number Y - 256 (e.g. 253 becomes -3). The source for this one is just changing lbu to lb where this particular address (0x801938fa) is read.

Target's Faith in Spell damage calculations becomes XX%

[Half of MP] becomes [No MP Cost]
Might be useful as an enemy-only ability for bosses, to use MP-heavy abilities without depleting their MP.

Require Materia Blade -> Require Item Type X (Default Lance)

Formula Hacks

Formula 3B: Mana Burn/Feedback (v2)
Version 2 of the mana burn hack, which caps damage at MA * Y.  Damages MP and deals equivalent HP damage.

Formula 11: Damage = MA * (WP+Y)

Elemental cancel: Formulas 17,3e,44
This makes formulas [17], [3e], and [44] subject to elemental cancel. Useful if you don't want bosses to be affected.

Formula 54 becomes HealMP_(Y%)

Formula 44: Use HP instead of MP

----- Latest -----

Fix Reraise Graphic Width
The graphic width for the Reraise status text is slightly too short; this patch fixes that.

Start button skips events, effects, battle and event text, etc.
Thread: http://ffhacktics.com/smf/index.php?topic=11608.0

Speed shortens ability CT
This one uses a curve where CT is affected more at lower speeds, and the effect depends on the CT factor you choose (default 5).  With CT Factor = 5, it begins taking effect at Speed = 5 and ability CT halves by Speed = 10, and would quarter by Speed = 20. 
Basically, for any ability, the CT is affected by a multiplier where ((CT Multiplier) = (CT Factor) / Speed).

Geomancy single ability
A single ability for geomancy, having the appropriate effect based on terrain.  Ability ID can be specified; default is 0x7E (Pitfall)

JP scroll glitch actual fix (Disable paging on confirm menu)
This patch disables paging up or down while the confirm menu is up on the ability learn screen.  As a result, there is no way to do the JP scroll glitch.

Unit slots backfilled when unit is removed from party
Removing a unit from the party no longer leaves a gap in the party!

Speed up text crawls
Speeds up text crawls significantly.
Text delays longer than a certain amount are changed to that amount.  Default is 2.  Lower is faster.

Switch unit number with L1 and R1 buttons (formation)
Switch unit number with L1 and R1 buttons in the formation screen.  Changes unit order as appropriate.  L1 and R1 still work normally (switching the selected unit) in menus.

Press buttons to win!
Press a button combination (default L1 + Select) to win the current battle.  It needs to be done while the game is processing the battle event conditionals, so between turns, or between a unit moving and acting, or somesuch.  Works even in Bethla Sluice.

Load Formation ignored if unit not in party
Doesn't try to load a unit from the party from the ENTD (Load Formation flag set) if they're not in the party, and instead uses whatever data is in the ENTD for that unit.  You won't normally encounter this scenario, but if it were to happen in the normal game, it would create a messed up unit that would overwrite Ramza when the battle/event was over.

Break out of multi-battle sequences
Break out of multi-battle sequences by pressing a button combination directly after exiting the formation screen.  Default is L1 + R1.
Includes the "Load Formation ignored if unit not in party" patch, because that situation can occur if breaking out of a sequence where a Guest has already left the party.

Equipment duplication glitch fixes
Fixes the equipment duplication glitches that can be triggered from using Best Fit in the shops.

Level down fix
Fixes leveling down to subtract raw stats based on old level instead of new level, so it should subtract the same amount gained in the previous level.  Also fixes level up abilities so that they add the same amount as leveling up via experience gain.

Crits always deal bonus damage
Crit XA bonus minimum is 1 instead of 0.  Maximum is still XA - 1.

Always crit
Always get a critical hit.  Can be useful if you're testing crits or somesuch.
« Last Edit: February 13, 2019, 01:01:49 AM by Glain »
Choto [Posts: 820]
  • View Profile
  • share
  • [October 08, 2011, 12:58:54 AM]
Re: Glain's Assorted ASM [Latest: Crystals, Mana burn, (MA+Y)*WP]
« Reply #1 on: October 08, 2011, 12:58:54 AM »
Thanks for setting this up!

question about mana burn - is there any way to alter how much MP drain/HP damage it does?
Glain [Posts: 514]
  • View Profile
  • share
  • [October 08, 2011, 01:33:31 AM]
Re: Glain's Assorted ASM [Latest: Crystals, Mana burn, (MA+Y)*WP]
« Reply #2 on: October 08, 2011, 01:33:31 AM »
Not currently. I could think about doing something like that though. A damage formula, or percentage, or something of the sort?
ALL THE THINGS Official Caretaker.
RavenOfRazgriz [Posts: 3030]
  • View Profile
  • share
  • [October 18, 2011, 05:44:28 AM]
Re: Glain's Assorted ASM [Latest: Crystals, Mana burn, (MA+Y)*WP]
« Reply #3 on: October 18, 2011, 05:44:28 AM »
For your hacks, could you list other things you've done, like the various Random Equipment Hacks (The original thread contains lots of ASM-talk and is very hard for an ASM-idiot to read and understand what the hacks there actually do, and is buried) and your apps, etc?

Also, were you the one who made a hack so that AI units with <Random> R/S/M chosen would always come into battle with one if chosen?  If so, can you repost that hack here too?  I know -somebody- made that hack and I can't find it.
Glain [Posts: 514]
  • View Profile
  • share
  • [October 27, 2011, 12:04:17 AM]
Re: Glain's Assorted ASM [Latest: Crystals, Mana burn, (MA+Y)*WP]
« Reply #4 on: October 27, 2011, 12:04:17 AM »
Yeah, the random gear hack thread is sorta crazy... a little while ago I edited it to put the hacks at the top, and attached an XML at the bottom of the post. I figured the patch that does gear level based on shop availability was the one to feature, as once that became available, the other patch options didn't seem to see much use.

Other than that, I could link to the various threads for the other hacks/apps from here, I suppose?

Not sure about the R/S/M thing; I don't think that hack was me. Sounds interesting, actually, because I think I have seen AI come in with nothing on one or more of those slots even though they were set to Random.
« Last Edit: October 27, 2011, 12:10:17 AM by Glain »
SaGa Frontier Hacker
Pickle Girl Fanboy [Posts: 1482]
  • View Profile
  • Bio Research Lab
  • share
  • [October 27, 2011, 12:30:39 AM]
Re: Glain's Assorted ASM [Latest: Crystals, Mana burn, (MA+Y)*WP]
« Reply #5 on: October 27, 2011, 12:30:39 AM »
Either add links to your other threads here, or get them in the sticky.
ALL THE THINGS Official Caretaker.
RavenOfRazgriz [Posts: 3030]
  • View Profile
  • share
  • [October 27, 2011, 01:41:24 AM]
Re: Glain's Assorted ASM [Latest: Crystals, Mana burn, (MA+Y)*WP]
« Reply #6 on: October 27, 2011, 01:41:24 AM »
Yeah, the random gear hack thread is sorta crazy... a little while ago I edited it to put the hacks at the top, and attached an XML at the bottom of the post. I figured the patch that does gear level based on shop availability was the one to feature, as once that became available, the other patch options didn't seem to see much use.

Honestly - I can't tell how to use most of them because with all the shit going on it's impossible to tell what they do.  You have one spot where you try to tl;dr explain them but the names you gave them are too vague to matter and the descriptions are equally so.  Putting them here with better names + better descriptions would be incredibly appreciated.  The Story Progression one is used the most in large part because it's the easiest to understand at a glance, the others aren't even getting a fair shot.

Not sure about the R/S/M thing; I don't think that hack was me. Sounds interesting, actually, because I think I have seen AI come in with nothing on one or more of those slots even though they were set to Random.

Maybe it was Pokeytax then?

I could've sworn I saw that ASM at some point.  Maybe I'm insane.
Glain [Posts: 514]
  • View Profile
  • share
  • [November 02, 2011, 03:53:32 AM]
Re: Glain's Assorted ASM [Latest: Crystals, Mana burn, (MA+Y)*WP]
« Reply #7 on: November 02, 2011, 03:53:32 AM »
All right, I went through and added the links to my apps/hacks/what have you. Not sure I did a better job tl;dr'ing the gear level ones, but at least they're more succinct than in the thread.
Choto [Posts: 820]
  • View Profile
  • share
  • [November 08, 2011, 07:20:32 PM]
Re: Glain's Assorted ASM [Latest: Crystals, Mana burn, (MA+Y)*WP]
« Reply #8 on: November 08, 2011, 07:20:32 PM »
Requesting this be added to the "important links" list so it doesn't get lost in the mix. I think some of Glains utilities are in there already but in different threads.
ALL THE THINGS Official Caretaker.
RavenOfRazgriz [Posts: 3030]
  • View Profile
  • share
  • [January 11, 2012, 04:13:53 AM]
Re: Glain's Assorted ASM [Latest: Crystals, Mana burn, (MA+Y)*WP]
« Reply #9 on: January 11, 2012, 04:13:53 AM »
Does your Formula 11 becomes MA*(WP+Y) hack accept Attack UP / Defense UP / Protect or Magic AttackUP / Magic DefendUP / Shell?  Is there a way to change what it accepts?

I'm going through flagging my AI for a few skills using it, and you don't list whether the skills using the formula are treated as physical or magical, just how to change which evasion it accepts.
Glain [Posts: 514]
  • View Profile
  • share
  • [January 11, 2012, 02:33:54 PM]
Re: Glain's Assorted ASM [Latest: Crystals, Mana burn, (MA+Y)*WP]
« Reply #10 on: January 11, 2012, 02:33:54 PM »
I know we talked about this on IRC, but as a general answer, it should be magic damage and be subject to everything that entails. I used formula [4e] as a base and it uses the same magic damage calculation routine, which should take all that into account, or at least I assumed it did. I should probably test that.
May I kill him?
Pride [Posts: 839]
  • View Profile
  • share
  • [January 11, 2012, 02:50:40 PM]
Re: Glain's Assorted ASM [Latest: Crystals, Mana burn, (MA+Y)*WP]
« Reply #11 on: January 11, 2012, 02:50:40 PM »
According to the notes, jal 0x00188964 leads to a section that calculates using magic damage.


    • Modding version: PSX
  • Check out my ASM thread. Who doesn't like hax?
    ALL THE THINGS Official Caretaker.
    RavenOfRazgriz [Posts: 3030]
    • View Profile
    • share
    • [January 13, 2012, 09:25:40 PM]
    Re: Glain's Assorted ASM [Latest: Crystals, Mana burn, (MA+Y)*WP]
    « Reply #12 on: January 13, 2012, 09:25:40 PM »
    Hey Glain, you're smart.  How would you like to tackle changing which Reactions are tied to which triggers?  I've got some basic stuff I'd /like/ but don't need on a life-or-death level I'd make use of in Journey of the Five if you're interested:


    And something a bit more bold...

    Glain [Posts: 514]
    • View Profile
    • share
    • [January 13, 2012, 10:35:00 PM]
    Re: Glain's Assorted ASM [Latest: Crystals, Mana burn, (MA+Y)*WP]
    « Reply #13 on: January 13, 2012, 10:35:00 PM »
    I could look at making a patch to change which flags are for which counter abilities. I'm not promising results or anything, but I may look into it. It sounds interesting.

    I was hoping, when I looked into the question of "Where does Counter Tackle figure out which ability to counter with?" that it would be something associated with the ability, but from what I saw of the code, it might be hardcoded to ability ID, which would make the second part a lot harder.

    (Hardcoded as in, Is my Ability ID [Counter Tackle's Ability ID]? If so, use [Dash's Ability ID])
    ALL THE THINGS Official Caretaker.
    RavenOfRazgriz [Posts: 3030]
    • View Profile
    • share
    • [January 15, 2012, 03:20:05 PM]
    Re: Glain's Assorted ASM [Latest: Crystals, Mana burn, (MA+Y)*WP]
    « Reply #14 on: January 15, 2012, 03:20:05 PM »
    Heh.  I see.

    If you can't do it, it's no big.  Like I said, it's not life or death, just a detail I'd like to polish up and something I'd imagine other people would like too.
    ALL THE THINGS Official Caretaker.
    RavenOfRazgriz [Posts: 3030]
    • View Profile
    • share
    • [January 21, 2012, 10:25:49 PM]
    Re: Glain's Assorted ASM [Latest: Elemental cancel, Swordskill strengthen]
    « Reply #15 on: January 21, 2012, 10:25:49 PM »
    Swordskill strengthen - I do hope you mean they gain /everything/, and not /just/ Strengthen.  It'd be pretty derpy if it didn't accept Half/Weak/Cancel/Absorb.  If it is /everything/, this is 90% of an ASM hack I need.  By "Dark Sword", I assume you mean the formula for both Dark Sword and Night Sword.  Would it be possible to get a variation of this hack where the Dark Sword and Night Sword formula are Abs[HP/MP]_(PA*(WP+Y))/2?  That'd be perfect for my needs.
    Glain [Posts: 514]
    • View Profile
    • share
    • [January 22, 2012, 04:22:14 PM]
    Re: Glain's Assorted ASM [Latest: Elemental cancel, Swordskill strengthen]
    « Reply #16 on: January 22, 2012, 04:22:14 PM »
    Yes, it seems to be everything (Half/Weak/Cancel/Absorb should all work). And yes, I was referring to the skillset Dark Sword, so that's Dark/Night sword, specifically formulas [2f] and [30].

    Regarding "halving" the damage: It seems what the formulas all do is: Load in two factors, then call the damage routine to multiply them. That damage routine is apparently shared by just about every formula (the multiplication to addition change would never have been so easy if it wasn't). You can see it'd be a bit problematic to try to put a division by 2 in there at the end as it would affect every single formula.

    So basically what I'm saying is that it'd be a lot easier/better to do [(PA div 2) * (WP+Y)] or [PA * ((WP+Y) div 2)] where div is integer division. It just has a lot more error from truncating decimals than [(PA * (WP+Y)) div 2] does.

    EDIT: I can probably just put it in what I have, but I can't think of an easy way to configure whether or not you want Dark/Night sword to be halved, so it'd probably have to be a separate hack.
    « Last Edit: January 22, 2012, 04:47:00 PM by Glain »
    ALL THE THINGS Official Caretaker.
    RavenOfRazgriz [Posts: 3030]
    • View Profile
    • share
    • [January 22, 2012, 06:01:03 PM]
    Re: Glain's Assorted ASM [Latest: Elemental cancel, Swordskill strengthen]
    « Reply #17 on: January 22, 2012, 06:01:03 PM »
    You could use X=0 normal, X=1 halved to try and combine both into one hack, Glain.  If you wanted to get ambitious, you could also beef up the Mighty Sword formula (2E) to also accept all this shit and be halved or not halved by X=0 and X=1, since that formula is also NS and likely no-Element as well.  Then you could toss in your MA*WP+Y edit as Formula 18 (Seriously, no one edits Formula 18, man) under the same stuff and have the super obscene all-in-one Swordskill Formula Patch of Awesome.  I'd also say to divide the XA and not the WP, since you generally want the weapon scaling more than the PA scaling.

    /total overachiever.
    Glain [Posts: 514]
    • View Profile
    • share
    • [January 22, 2012, 08:15:23 PM]
    Re: Glain's Assorted ASM [Latest: Elemental cancel, Swordskill strengthen]
    « Reply #18 on: January 22, 2012, 08:15:23 PM »
    I've got it as (PA / 2^X) * (WP+Y) now. Integer division, of course. Updated the main post with it.

    Bah, formula [2e]. Psh. Maybe later or something. It's weird.

    I can't centralize all the formulas unless I can introduce another variable, not X or Y since they're both already used; I need a parameter to tell my function which formula we're on (should we be absorbing HP, MP, etc).
    « Last Edit: January 22, 2012, 08:21:13 PM by Glain »
    ALL THE THINGS Official Caretaker.
    RavenOfRazgriz [Posts: 3030]
    • View Profile
    • share
    • [January 22, 2012, 09:11:21 PM]
    Re: Glain's Assorted ASM [Latest: Elemental cancel, Swordskill strengthen]
    « Reply #19 on: January 22, 2012, 09:11:21 PM »
    What about the register that holds the "Z" value for Items?  I imagine that's not being used for anything at the time an ability is cast. Unless the "Z" is really either X or Y and Melonhead just labeled it as Z because you can't affect it through a formula, in which case, derp.  The game must have a way of telling which Formula is which.  I don't think FDC and I ever had an issue when designing aspects of his Formula Hack when we needed to see which Formula was being called, but hell if I remember exactly where that info was stored, either.

    The other alternative is to topload everything onto Y.  0-7 is PA/1, +0-7 Y, 8-15 is PA/2, +0-7 Y, etc., then use X to determine which formula it is.  Bit ugly, but it does the job.

    Still, this suits everything I personally need it for perfectly.  I just like things to exceed what I need them for because I know that either I'll think of a use for the things I didn't think I'd need, or that someone else definitely will use it, at least in a cast like this.  Very much thanks for what you've done so far with it, in any case.
    Pages: [1] 2 3