• Welcome to Final Fantasy Hacktics. Please login or sign up.
 
April 16, 2024, 05:01:40 am

News:

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


ASM Hack Proposals (for modders and ASMers)

Started by Xifanie, August 14, 2014, 05:30:56 pm

Choto

October 25, 2014, 06:38:55 pm #140 Last Edit: October 25, 2014, 06:48:25 pm by Choto
@Pride: Humans dropping what they have equipped makes more logical sense to me. Also the chance to drop seems like it would be a better option.

Question: We have a hack that lets guests participate in random battles. If they are "injured" in a random battle, would they still be able to participate in story battles? Probly something that needs to be tested I guess.

also, how should undead behave? Should they have a chance to reanimate on each turn? Should they have a chance to reanimate on each turn even after being "knocked out"? Or should they RIP at that point?

also, changing the death countdown to 2 or 1 (customizable) should be doable

After thinking about it some, I think I'll be ok with an Inn/Proposition type system. I guess you could hack it by using smart encounters or moving between two blue locations, but screw it. It would be a compromise between gil management and unit management as you'd likely drop off some units, then go do some battling or story progression and return later to get the units back.

Angel

I would leave Guests as impossible to injure; no change from vanilla.
  • Modding version: PSX
* Angel should quit being a lazy bitch
<@Elric> I agree to that as well

nyanyame nyanyajuu nyanyado no nyarabide nyakunyaku inyanyaku nyanyahan nyanyadai nyannyaku nyarabete nyaganyagame
At the end of the day, are we not all trapped inside lemons?

Xifanie

October 29, 2014, 08:39:19 pm #142 Last Edit: October 29, 2014, 09:34:13 pm by Xifanie
Quote from: Pride on October 23, 2014, 04:58:16 pm
So I'm gonna do this one. Should human units still give off equipment based treasures, or treasures based off of their job? Should I do the second suggestion where the items randomize on level or go with the original idea? Or something else?


I don't think humans should "generate" items, I saw this more as scavenging/poaching, so I'm not quite sure what you would get from a wizard's bones or a ninja's skin. I think a regular set for all humans if they are without equipped items would do just fine.

I'm quite sad no one looked into Pride's post. I don't personally have anything to add since I already stated my opinion in my original post... I came up with the idea and I would definitely like to see it happen. :/

Added another proposal:



Alternate Animations



Description:
Assign a different animation for abilities based on the sprite type to allow things such as flawless animations for Blue Magic (humans using monster abilities), monsters using human reactions, and others.

I would suggest a half-word for the ability ID, one byte for the sprite type (1 bit per type), and all the regular animation bytes. I've never messed with those, but I'm guessing that's all there is to it.

PS: Also added a notice in the first post for new posters
  • Modding version: PSX
Love what you're seeing? https://supportus.ffhacktics.com/ 💜 it's really appreciated

Anything is possible as long as it is within the hardware's limits. (ie. disc space, RAM, Video RAM, processor, etc.)
<R999> My target market is not FFT mod players
<Raijinili> remember that? it was awful

Glain

So I took a shot at a hack to hide excessive recovery.  As it stands, this will hide passive HP/MP recovery when the unit was already at full, but displays the full amount of recovery otherwise even if it goes over max (e.g. healing for 100 at 765/800 HP would still display 100).

At first I thought that formulas and movement actions were handled differently, but it seems the same routine is handling both, so to limit which abilities were affected, I ended up checking the byte at 0x801938e8, which seems to be 1 for active abilities and 0 for passive, but there could be some cases I missed.  Removing that check will make it work for all abilities, not just passive/movement ones.

If you want to move this hack's location in kanji space, just change the Offset in the first <Location> tag.


  <Patch name="Hide excessive HP/MP recovery">
    <Description>
      Excessive HP/MP recovery is not displayed.
    </Description>
    <Location file="BATTLE_BIN" offset="ED9C4" mode="ASM">
        @hide_excessive_recovery:
           
                addiu   sp, sp, -24
                sw      ra, 4(sp)
                sw      s0, 8(sp)
                sw      s1, 12(sp)
                sw      s2, 16(sp)
                sw      s3, 20(sp)
               
                lui     t0, 0x8019
                lbu     t1, 0x38e8(t0)  # Active ability?
                lw      s0, 0x2d90(t0)  # Action
                lw      s1, 0x2d8c(t0)  # Return action
                lw      s2, 0x2d98(t0)  # Action target
                lw      s3, 0x2d94(t0)  # Return action target

                # Skip if not a passive ability?
                bne     t1, zero, hide_excessive_recovery_end
                move    a0, s0
               
                # Hide excessive recovery for action
                jal     @hide_excessive_recovery_single
                move    a1, s2
               
                # Hide excessive recovery for return action
                move    a0, s1
                jal     @hide_excessive_recovery_single
                move    a1, s3
           
            hide_excessive_recovery_end:
           
                lw      s3, 20(sp)
                lw      s2, 16(sp)
                lw      s1, 12(sp)
                lw      s0, 8(sp)
                lw      ra, 4(sp)
                addiu   sp, sp, 24
               
                jr      ra
                nop
           
        # a0 = Action, a1 = Target
        @hide_excessive_recovery_single:

                beq     a0, zero, hide_excessive_recovery_single_end
                nop

                lhu     t0, 0x28(a1)    # Target HP
                lhu     t1, 0x2a(a1)    # Target Max HP
                lhu     t2, 0x2c(a1)    # Target MP
                lhu     t3, 0x2e(a1)    # Target Max MP
                lbu     t4, 0x25(a0)    # Action display type
                   
                slt     t5, t0, t1      # 1 if HP not max
                sltiu   t5, t5, 1       # 1 if HP IS max (boolean not)
                sll     t5, t5, 6       # 0x40 if HP is max
                not     t5, t5          # 0x40 flag is zeroed out if HP is max (binary not)

                slt     t6, t2, t3      # 1 if MP not max
                sltiu   t6, t6, 1       # 1 if MP IS max (boolean not)
                sll     t6, t6, 4       # 0x10 if MP is max
                not     t6, t6          # 0x10 flag is zeroed out if MP is max (binary not)
               
                and     t4, t4, t5      # Action type: HP recovery flag zeroed out if HP is max
                and     t4, t4, t6      # Action type: MP recovery flag zeroed out if MP is max
           
            hide_excessive_recovery_single_end:
           
                jr      ra
                sb      t4, 0x25(a0)    # Save action display type
    </Location>
    <Location file="BATTLE_BIN" offset="18BFD0" mode="ASM" offsetMode="RAM">
                lui     s1, 0x8019
                jal     @hide_excessive_recovery
                nop
                lw      a1, 0x2d98(s1)
                lw      a0, 0x2d90(s1)
    </Location>
  </Patch>
  • Modding version: Other/Unknown

Xifanie

Awesome! I have no idea what I'm looking at, but awesome \o/

Going to update the main post now.

Bump: Also added my newest proposal, New Options.
  • Modding version: PSX
Love what you're seeing? https://supportus.ffhacktics.com/ 💜 it's really appreciated

Anything is possible as long as it is within the hardware's limits. (ie. disc space, RAM, Video RAM, processor, etc.)
<R999> My target market is not FFT mod players
<Raijinili> remember that? it was awful

3lric

That New Options idea is great Xif, I hope someone finds time to work on that.

Glain, im interested in using that hide excessive recovery hack, does it also work with things like Move-HP Up?
  • Modding version: PSX

Glain

Yep.  Right now it's supposed to only work on "passive" recovery, i.e. Move-HP Up, Move-MP Up, and Regen.

You can make it work for every ability by commenting out one of the lines in the patch (adding a #), like so:
# Skip if not a passive ability?
# bne     t1, zero, hide_excessive_recovery_end
  • Modding version: Other/Unknown

Choto

Here is a "Lite" version of the Alternate Death Hack. This one provides the "KO" battle functionality without disabling them from use after battle. So units will still have a death countdown and become KO'd. Once KO'd they won't be revivable except optionally with undead revival.

Speaking of options, here is the main hack:

<Patch name="Alternate Death Hack Lite Version">
    <Description>
This hack will disable unit crystallization and treasuring by death counter countdown. Abilities can still be made to crystallize and treasure units. Unlike the full version, this will not make units unavailable after battle. Units are still unrevivable once KO'd.
    </Description> 
<Location offset="11C128" file="BATTLE_BIN"><!--Death Counter Manipulation -->
03000392
2C00013C
121C2134
FF002230
06006210
020A0100
FF002230
03006210
020A0100
FF002230
03006214
FF000134
AD0C0608
070001A2
07000492
FF000234
C0500508
00000000
1000A230
4F004010
0100C230
4D004010
</Location>
<Location offset="ED300" file="BATTLE_BIN"><!--Death Counter Manipulation  -->
09008210
21100000
FFFF8424
FF008330
FF000234
070003A2
03004314
25100000
5C0C0608
00000000
AD0C0608
25100000
</Location>
<Location offset="1249dc " file="BATTLE_BIN"><!--disable revival -->
40510508
1980013C
</Location>
<Location offset="ED500 " file="BATTLE_BIN"><!--disable revival -->
8C2D238C
FF000434
07006190
00000000
07008114
05000134
B60160A0
AC0160A0
8C0160A0
B10160A0
8E0161A0
900160AC
3400BF8F
792E0608
3000B28F
</Location>
</Patch>


Add these two location tags to the END of the hack for the desired functionality. The first allows Undead units to continue attempting to revive each turn when KO'd.
<Location offset="ED300 " file="BATTLE_BIN"><!--Undead Revive after KO each turn -->
07
</Location>


The second allows units to attempt to revive EACH turn when dead (but not KO'd). This was supposed to emulate the "Units rot or reanimate without skipped turns" hack but I still have no fuckin clue how that one works anyway, so I'm not sure if its the same.

<Location offset="ED318 " file="BATTLE_BIN"><!--Undead Revive EACH turn -->
01
</Location>


Choosing niether option means undead will either revive or become KO'd when death counter expires... I think.

I'm still working on the proposition end of the full hack but progress has been encouraging. It'll just take some time. In the meantime if you try this hack let me know if there are inconsistencies.

Aqueous

I have a proposal if others think it would be beneficial to everyone: a formula that allows for "morphing" skills. I suppose it would be a derivative of the current Morbol formula but one that allows you to switch back as well. Perfect would be allowing the X and Y variables in FFTPatcher to control the sprite and job you morph into.

I have tried knocking my head against this myself recently but mixed results. For starters, I'm not sure if it's just me, but in my game the Morbol effect changes the target to a blank sprite - this even occurs in an unmodded version sans adding Moldball Virus to a job skillset. The routine is picking up the current sprite (0x92) but for some reason it doesn't work.

Regardless, I've found where the sprite can be controlled if that is of interest to anyone. The remaining issue is stripping out the part of the routine that changes your "job" to Morbol.

Xifanie

This isn't the first time someone had this idea. But practically, it is impossible or would require very heavy limitations, completely killing the point. There can only be 9 spritesheets loaded at a time. It will only ever properly work if the spritesheet was already loaded in the VRAM.

Let's say you have 9 spritesheets loaded, including 2 shapeshifter. One shapeshifter transforms, bam, 10 sprites. The result is a glitchy sprite.

Same scenario with 1 shapeshifter... you would need to hack the game to unload a spritesheet and load a new one mid-effect. This takes -seconds-.

I'm sorry, I wish I could say this is viable, but it is not at all. You would need to think of something new that covers those enormous limitations.
  • Modding version: PSX
Love what you're seeing? https://supportus.ffhacktics.com/ 💜 it's really appreciated

Anything is possible as long as it is within the hardware's limits. (ie. disc space, RAM, Video RAM, processor, etc.)
<R999> My target market is not FFT mod players
<Raijinili> remember that? it was awful

Aqueous

No worries Xif, thank you for the answer, at least now I know to not bother wasting any more time on it.

I'm guessing that's why I was getting a blank sprite when using Moldball Virus yet it works fine normally: Malboros use it so the Malboro sprite is already loaded.

MJNess

October 10, 2015, 04:20:32 pm #151 Last Edit: October 10, 2015, 04:28:52 pm by MJNess
I hope this thread still lives. 

I have a proposal but I'm not sure if it is feasible or even possible. Adding durability to equips. Where in battles the durability goes down after being hit or after you hit  (Basically just like in Diablo games). And there being a repair shop in goug/trade/fort towns (any town basically) just like the inn idea which is awesome btw.

For example an armor has let's say a 50/50 durability. During a battle when it is hit with a regular attack the durability goes down a point or two or probably depending on the power of the attack or type of the attack. And when it reaches zero then the armor breaks and it's gone forever. Rend ability chops it down by a fixed number most probably by a large value as to make it widely used by players and having safeguard only damages it at half value. And repairs of course will be charged depending on the type and durability left on the armor.

Is this possible? I'm still very new to modding and don't want to waste time doing something that's not possible.

Xifanie

It would basically need to be restricted purely to battles (i.e auto "recover" after every battle), and could not track equip changes. It would be an insane amount of work to add very little, a feature most wouldn't even want.
  • Modding version: PSX
Love what you're seeing? https://supportus.ffhacktics.com/ 💜 it's really appreciated

Anything is possible as long as it is within the hardware's limits. (ie. disc space, RAM, Video RAM, processor, etc.)
<R999> My target market is not FFT mod players
<Raijinili> remember that? it was awful

Blitzball Pro

Hi Xifanie, I am a new member here and first off I wanted to say I love the Soldier Office ASM hack. I don't have any skills yet with hex editing, eventing or spriting yet, all of which I plan on improving, but a lot of the work you've done on here just blows my mind. Also wanted to say I am extremely anxious for the alternate animations asm if that is still coming along, quite a few months since this topic was active. I have quite a bit of work done in fft patcher including a blue mage class, but I am unaware of any alternate method to avoid animation disparity between human and monster classes and it would honestly be one of the most useful hacks I could imagine. If you are still working on it I would love any additional information. Thank you.
That moment when Delita smacks Olan around and you realize his holy days are over . . .

Xifanie

Same as a few other hacks: it seems yo be working perfectly fine right now, but I will only release it after thoroughly testing it in JotF because no one ever bug reports to tell me my hacks aren't working. I haven't worked on it for months, but we're also not in testing phase either.
  • Modding version: PSX
Love what you're seeing? https://supportus.ffhacktics.com/ 💜 it's really appreciated

Anything is possible as long as it is within the hardware's limits. (ie. disc space, RAM, Video RAM, processor, etc.)
<R999> My target market is not FFT mod players
<Raijinili> remember that? it was awful

Blitzball Pro

I would be more than happy to test it if it would help speed the process up. I'm not very proficient with hex, but I've played the game itself 20+ years and can probably be some help. . . It would be very useful for a patch I've been working on to practice things.
That moment when Delita smacks Olan around and you realize his holy days are over . . .

Xifanie

Well, if you are ready to report me stuff, got Windows with Microsoft Excel 2007 or higher and can use it, get on IRC and we'll discuss the details.

Also, where did you learn to time travel?
  • Modding version: PSX
Love what you're seeing? https://supportus.ffhacktics.com/ 💜 it's really appreciated

Anything is possible as long as it is within the hardware's limits. (ie. disc space, RAM, Video RAM, processor, etc.)
<R999> My target market is not FFT mod players
<Raijinili> remember that? it was awful

Blitzball Pro

Ha ha, I will attempt to get on irc soon as I can get on my pc, I'm assuming it is the pjirc tab in the top section? I do have excel and office 2007. Lol, time travel is unnecessary when you can blame it on selective memory. Should have said the better part of 20 years, appreciate the fact checking though ha ha. Oldest should be going down for his nap momentarily so will attempt some computer time then.
That moment when Delita smacks Olan around and you realize his holy days are over . . .

Angel

  • Modding version: PSX
* Angel should quit being a lazy bitch
<@Elric> I agree to that as well

nyanyame nyanyajuu nyanyado no nyarabide nyakunyaku inyanyaku nyanyahan nyanyadai nyannyaku nyarabete nyaganyagame
At the end of the day, are we not all trapped inside lemons?

Blitzball Pro

Thank you, as I am trying to open IRC up now and not having any luck whatsoever, though my wifi signal is not very strong in here either and my wife has paranormal people over checking the place out so not sure if some of their equipment might be interfering with wifi signal.
That moment when Delita smacks Olan around and you realize his holy days are over . . .