• Welcome to Final Fantasy Hacktics. Please login or sign up.
 
November 10, 2024, 02:25:52 pm

News:

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


Choto's ASM Hacks and Effects

Started by Choto, February 27, 2012, 06:05:00 pm

LastingDawn

Hello Choto, I have a little bit of a request, but its a request I can put forth with full details, I would try my hand at it myself, but I'm not really sure about correct PSX ASM terminology and the like or where this formula is in RAM or ROM.

Do you recall the "Libra" skills from other FF games? It shows you the enemy's stats, weaknesses, etc. Well I always thought that the "???" would be a perfect reason for a Libra skill in FFT. In a normal sense its plain why they didn't use anything like that, because removing the "???" normally means they have about 999 HP.

But with the ability to change the divisor of HP that "???" increases there's no need for any HP increase at all.

Here is the thought. To take formula 5D Dragon: Set_Quick and change it to 5D Clear ??? from Target if applicable.

The way to go about this is rather simple. Have the code look at the target's stats. Look at 0x0006 (where the formula for Steal Heart would look) and have it look for a 04 bit. If found, Libra would minus that value by 04, thereby showing you the stats and equipment of the enemy in question. The exceptions would be if the enemy is a Monster and Male/Female to allow players the choice to have enemies that they don't want scanned to not be scanned (or use an unknown in the ENTD if easier)

This is just a thought I'd throw out there, but it might help people who want to keep more than the Lucavi mysteries, but also in giving it a classic FF feel with Libra.
"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!!!!

Choto

May 18, 2014, 01:15:57 pm #81 Last Edit: May 18, 2014, 01:47:12 pm by Choto
Well the formula end of it would be cakesauce. The hard part would be finding the "divisor" that modifies the HP amounts and stuff. AFAIK it's tied to raw stats....

The harder part would be finding the time to do it. I'll put it on my list of back burner stuff but if you can find the divisor or where the game makes the modification it would make things very easy to do.... assuming there are no other complications. fwiw I think it's a neat idea.

Edit: Well I happen to have found where it uses the divisor... maybe i'll look into it soon

LastingDawn

Ah, sorry about that. The Divisor is in Raven's Terrain, Status, and Multiplier Workbooks. I wouldn't have mentioned this at all had that part not already been found, hehe. My first worry was that it wasn't dynamic, but that was also my first test. The "???" is dynamically loaded and can be added and removed whenever one would please, had there been functionality for it in the game itself.
"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!!!!

Choto

So you have all the stuff you need except the formula. It's as simple as load a value, subtract from the value, store that value.

Here is where the targets data is loaded from:

80192d8c - Attacker Current Action Data Pointer
80192d90 - Target Current Action Data Pointer
80192d94 - Attacker's Data Pointer
80192d98 - Target Data Pointer


So we do:

lui r1, 0x8019
lw r2, 0x2d98(r1)        #load address of targets data
nop
lbu r3, 0x06(r2)           #load from that address + 6 (the ??? flag)
nop
andi r3, r3, 0xfb          #mask off the 0x04 bit (only that flag is turned off)
sb r3, 0x06(r2)            #store back into targets data without ??? flag
jr r31
nop


then we just need to put it into the right spot of the formula but I'll get into that later. I'm going to edit this post as I go along in the hack since it's simple. If you want to learn the ASM side of it perhaps it will help you to see the process.

LastingDawn

Hmm, that does seem remarkably simple. Very similar to SNES ASM in many regards. It's just a matter of knowing where the mirror data is and what is located there. It seems like FDC did a large disassembly of FFT's Battle.bin as I did with FFIV, it seems like it's mostly a matter of knowing what each Formula works to from that specific area. The Current Action matter is lost on me though, what does that particularly refer to?
"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!!!!

Choto

Added a mime redesign hack. Some things need to be added later on so this is v1.0

Lastingdawn, sorry I just saw that I dropped the ball on that hack. Now of course I have no time but remind me down the road and we'll finish it up.

Xifanie

That's pretty awesome, I love the idea. It's mostly the only way it can work; well if we wanted it FFVI style, you could have one ability slot per ally on the field, but I'd just keep it the way it is.
I just wish compatibility was better than it is... stupid skillset types.
  • 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

Vanya

Bravo, Choto. That is a waaay better Mime.
  • Modding version: Other/Unknown
¯\(°_0)/¯

Timbo

  • Modding version: PSX
  • Discord username: Timbo

Jumza

Holy crap, that's crazy and amazing Choto!
  • Modding version: PSX
Nyzer: Alma teleports out of her own possessed body.
Raijinili: Remember that you're telling a modding community that the game they love could use some fixing.

MiKeMiTchi

Love the redesign idea! Great job, Choto. ;)
Jot5 GFX Designer :: Spriter :: Mitchi

Choto

tyty guys :D was a fun hack

Quote from: Xifanie on September 16, 2014, 10:07:39 pm
I just wish compatibility was better than it is... stupid skillset types.


If I ever get to it, I think i can trick the game into accepting other types of abilities in normal skillsets. I got potion to work from a normal skillset once.. we'll see

nitwit

What hacks do you want to see Choto?

Choto

Quote from: nitwit on September 19, 2014, 05:29:08 am
What hacks do you want to see Choto?


What are you asking? Are you implying that you are going to take requests or just want my opinion of what I think should be done?

nitwit

Quote from: Choto on September 19, 2014, 09:03:23 amWhat are you asking? Are you implying that you are going to take requests or just want my opinion of what I think should be done?

Hahaha take requests from Choto!  As if could pick up MIPS that fast!

I wouldn't say I'm asking what you think should be done, although I do want to know that.  More like what kind of things do you want?  You could make two lists, one realistic which considers time and effort and the other assuming infinite time and resources.

I don't know.  Most people seem to ask hackers for requests.  I want to know what the hackers want.

Xifanie

  • 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

Choto

Quote from: Xifanie on September 19, 2014, 10:53:17 am
I think this is kinda what my topic is for? :v
ASM Hack Proposals


Wrong thread :P

I have some desires that are kind of pipe dreams. I'd like to load formation sprites into sample.lzw and get them to load correctly. I'd like to be able to allow a unit to end up somewhere else after they use an ability.

More.attainable ideas... getting ability types to work in any skillset. I have a berserker.hack that I want to get to. I'd love to get a much better handle on effect editing. I think I'm close to attempting a legit red.magic skillset. I think pride cracked into that a bit but it may be doable now. I have an alternate crystallization mechanic in mind that would just set the unit unusable for some number of days.

I also want chapter 2 of jot5 to be finished because until then I have to try to pick up other people's slack with spriting, forcing me to put off any further asm hacks.  Speaking of which there should be a reaction hack associated with that which will give us much more freedom in terms of proc triggers/chances and counter abilities

DuxorW

When you say legit red magic skillset, what exactly do you mean? Just curious/interested, as I use red mages in my personal hard mode patch.

Celdia

By legit I would assume he means (not to put words in your mouth, Choto, so feel free to correct me here) something like how RM worked in previous job-oriented FF games where if you learned Cure and Esuna as a White Mage and Bolt and Fire as a Black Mage then when you changed that character's job to Red Mage they would have Cure, Esuna, Bolt and Fire all already learned on the RM skillset.

Mechanically speaking, I would guess that the Calculator routines could be most-easily modified to do it...but that's just a non-ASMer's opinion.
  • Modding version: PSX
  • Discord username: Celdia#0

DuxorW

Yeah, that's what I was assuming as well.

I wish there was a similar fix for blue mages so that they could learn monster abilities from crystals. Learn on hit doesn't care what skillset the caster's ability is in as long as the same ability is in the target's primary skill set, so it would be great if crystals operated similarly.