• Welcome to Final Fantasy Hacktics. Please login or sign up.
 
May 18, 2024, 01:16:24 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.


Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Aqueous

21
Thanks Choto,

I was looking at the routine starting x122f0c since there's to it in the routine I was originally looking at, and only for abilities that display stat changes (others skip the link via branch) but the calculations are done using data already placed on the stack - trick is to try to find when that data is placed there.

Will try to look again when I get home. Just irks me to have Support Abilities that alter stats without a preview for the player!
22
Hi guys,

I had a quick question if anyone could answer - was any progress made into mining World.BIN to find out how stat change previews are done (like when you have Move+1 selected and see +1 next to Move)?

I've tried to check it out myself but having some difficulty finding exactly what routine decides that an ability has stat changes etc.

Thanks in advance.
23
PSX FFT Hacking / Re: ASM Help
April 15, 2015, 03:00:10 pm
I'll check into whether any data is being overwritten tonight once I can load up the game.

Thank you for all the help Xif.
24
PSX FFT Hacking / Re: ASM Help
April 15, 2015, 09:37:41 am
Hi Xif, thanks for the feedback, I didn't realise loading also required a delay. It's no worries, like you alluded to I was just trying to save space...especially when writing hacks that use Kanji space since it seems quite coveted.

I'll change the register used and will either stick a nop behind or change the order in some cases so that by the time a register needs to be used it's finished loading. I also usually don't bother storing existing register values and then reloading them but in this case I'm concerned that when the routine is called, there are values in those registers already in some cases that would then be used by the next routine.

Edit - how about this:

sw r4,0x0008(r29)
sw r5,0x000c(r29)
lui r3,0x8019
lbu r2,0x38f9(r3)
lbu r4,0x38fb(r3)
- Swapped these around
andi r2,r2,0x007f
lw r3,0x2d90(r3)
andi r5,r4,0x0001
beq r5,r0,0x000018788c
andi r5,r4,0x0002
sb r2,0x0012(r3)
beq r5,r0,0x0000187898
andi r5,r4,0x0004
sb r2,0x0014(r3)
beq r5,r0,0x00001878a4
andi r5,r4,0x0008
sb r2,0x0015(r3)
beq r5,r0,0x00001878b0
andi r5,r4,0x0010
sb r2,0x0016(r3)
beq r5,r0,0x00001878bc
lbu r4,0x0025(r3)
sb r2,0x0017(r3)
lw r5,0x000c(r29)
ori r2,r4,0x0001
- Swapped around
sb r2,0x0025(r3)
lw r4,0x0008(r29) - Moved the load before the jump (just in case something needs it immediately in the next routine)
jr r31
nop

I rejigged the order so in all cases of loading from memory there's at least one line before that register is used. Updated my previous post.
25
If you felt that giving a Lancer Lv8 Jump from the start is overpowered, you could also link the new skillset to the 12 Jump skillset using RAD.

So for example, originally I dummied out the old Lancer job, made a copy of it as a new Job and used that as the accessible Lancer job. For that job, I gave it the new skillset and selected "Shares With" as Lancer on RAD. What that meant was when I learned the first skill in the new Lancer skillset (let's spare "Spear Rush" or whatever) it would also learn Level Jump 2 from the 12 Jump skillset set to the dummied out Lancer. That way, you could make it so you still "level up" your Jump skillset.
26
Scope of the question is probably a bit too big IMO (and likely if you tried to implement everything that had been discovered you'd get burnt out).

Maybe target something more specific you're interested in doing in a mod for the game and we can tell you if it can be done with existing knowledge.
27
PSX FFT Hacking / Re: ASM Requests
April 15, 2015, 08:57:13 am
Quote from: The Damned on April 15, 2015, 04:38:51 am
I'll try to make this the last consecutive post I make in here if I can help it. After all, I can wait for things as I've said, especially since I still don't know how to do them myself unfortunately.

That said, having remembered what I forgot to ask above, I should ask it now before I forget yet again. Thankfully, these requests are all easier to explain than the above:


1. Is there a way to make it possible to view skill sets that are already "Mastered!" so that you no longer get auto-locked out of any class's ability screen information if you buy all of its skills (or if they come inherently learned, like with Mime and monsters)?

2. Can formulas be made that specifically cancel a status without needing the appropriate inflict status for it? If so, could one also potentially use another inflict status that also adds something at the same time? (I'm guessing "no".)

3. Is there a way to "junction" status onto the various Charge skills (as a way to help differentiate them beyond just damage)?

4. Finally, can reactions (in theory) be made to react only a limited amount of times per battle before they stop working or are we stuck with unlimited reactions? I vaguely recall this being asked years ago with regards to HP Restore, but I can't recall if it was every answered and otherwise the closest thing is Auto Potion, which doesn't qualify.

Regardless, as ever, thanks.


Will answer to the extent of what I know:

2. Yes but depends on the level of configurability.

The quick, dirty way would be to make a formula hack that takes the existing status applying formula and just adds in an extra section that then adds/cancels additional statuses. Could be made to use X or Y for the additional status ID. The limitation would be that you'd be restricted within a certain status "section" ie. below are "two" examples of what I mean:

0x01a7/0x1b - Attack's Status Infliction 1
         0x80 -
         0x40 - Crystal
         0x20 - Dead
         0x10 - Undead
         0x08 - Charging
         0x04 - Jump
         0x02 - Defending
         0x01 - Performing
   0x01a8/0x1c - Attack's Status Infliction 2
         0x80 - Petrify
         0x40 - Invite
         0x20 - Darkness
         0x10 - Confusion
         0x08 - Silence
         0x04 - Blood Suck
         0x02 - Cursed
         0x01 - Treasure

So you'd be restricted into applying statuses within only one of such "sections". So if you wanted to add Darkness and Confusion, no problem. If you wanted to add Undead and Darkness though then this would need to be hardcoded.

3. What do you mean by "junction"? You mean Charge + 1 adds a particular status, Charge + 2 adds another etc.? Could hack the Charge routine to apply certain statuses based on the power stat - again, though, it would be hardcoded simply because in FFTPatcher there's no input fields available for the Charge skills to put a Status ID or whatever.

4. Tentative on this, someone more experienced with ASM hacking might have a more complete answer. From my perspective, you'd need to be storing a byte of information (ie. the number of times it triggered) then pull that byte into the reaction command routine. Not a problem provided there's empty space attributed to the unit for a byte that we KNOW won't affect anything else...which is probably where the main challenge lies. Someone else might know if there's sections of the unit data which are available.
28
PSX FFT Hacking / Re: ASM Help
April 15, 2015, 08:05:24 am
Got a few hacks coming up that I thought I'd share. Some are tested, some aren't as of yet, I'll indicate which are or aren't. Please feel free to tell me if some of these have already been done, and I'll post the ASM for critique too. These are just things I've written for my own mod so don't know how useful they'd be to others.

First one:

Remove Hardcoding on Stat Reduction Formulas

Untested

Uses the Inflict Status ID to decide which stats to reduce. Enter the following into Inflict Status ID in FFTPatcher to reduce the following stats:
1 - SP
2 - PA
4 - MA
8 - Brave
16 - Faith

These are additive. So if you enter "3" into Inflict Status the ability should reduce SP and PA.

Two ways to apply it. First is replacing the existing code, second is using a jump to Kanji space (I will add this in a post edit later today)

Replacing Existing Code:

<Patch name="Remove Hardcode on Stat Reduction Formulas">
<Description>Uses Inflict Status ID to determine stats to reduce: 1 for SP, 2 for PA, 4 for MA, 8 for Brave, 16 for Faith - works additively (ie. Entering "3" will reduce SP and PA)
</Description>
<Location file="BATTLE_BIN" offset="120860">

0800A4AF
0C00A5AF
1980033C
F9386290
FB386490
7F004230
902D638C
01008530
0200A010
02008530
120062A0
0200A010
04008530
140062A0
0200A010
08008530
150062A0
0200A010
10008530
160062A0
0200A010
25006490
170062A0
0C00A58F
01008234
0800A48F
0800E003
250062A0

</Location>
</Patch>

ASM:


 
   
   
   
   
 
 
   
   
   
   
 
 
   
   
   
   
 
 
   
   
   
   
 
 
   
   
   
   
 
 
   
   
   
   
 
 
   
   
   
   
 
 
   
   
   
   
 
 
   
   
   
   
 
 
   
   
   
   
 
 
   
   
   
   
 
 
   
   
   
   
 
 
   
   
   
   
 
 
   
   
   
   
 
 
   
   
   
   
 
 
   
   
   
   
 
 
   
   
   
   
 
 
   
   
   
   
 
 
   
   
   
   
 
 
   
   
   
   
 
 
   
   
   
   
 
 
   
   
   
   
 
 
   
   
   
   
 
 
   
   
   
   
 
 
   
   
   
   
 
 
   
   
   
   
 
 
   
   
   
   
 
 
   
   
   
   
 
 
   
   
   
   
 
RAM           Battle BIN     ASM                                 Comments
00187860120860sw r4,0x0008(r29)Free r4 for use
00187864120864sw r5,0x000c(r29)Free r5 for use
00187868120868lui r3,0x8019
0018786c12086Clbu r2,0x38f9(r3)Load Ability X
00187870120870lbu r4,0x38fb(r3)Load Inflict Status ID
00187874120874andi r2,r2,0x007fCap r2 at 127
00187878120878lw r3,0x2d90(r3)Load Current Action Data Pointer
0018787c12087Candi r5,r4,0x0001SP Check - (Check if Inflict Status ID includes 1)
00187880120880beq r5,r0,0x000018788cBranch to next
00187884120884andi r5,r4,0x0002PA Check - (Check if Inflict Status ID includes 2) - runs before branch above
00187888120888sb r2,0x0012(r3)Store X in -ve SP change
0018788c12088Cbeq r5,r0,0x0000187898
00187890120890andi r5,r4,0x0004MA Check - (Check if Inflict Status ID includes 4) - runs before branch above
00187894120894sb r2,0x0014(r3)Store X in -ve PA change
00187898120898beq r5,r0,0x00001878a4
0018789c12089Candi r5,r4,0x0008Brave Check - (Check if Inflict Status ID includes 8) - runs before branch above
001878a01208A0sb r2,0x0015(r3)Store X in -ve MA change
001878a41208A4beq r5,r0,0x00001878b0
001878a81208A8andi r5,r4,0x0010Faith Check - (Check if Inflict Status ID includes 8) - runs before branch above
001878ac1208ACsb r2,0x0016(r3)Store X in -ve Brave change
001878b01208B0beq r5,r0,0x00001878bc
001878b41208B4lbu r4,0x0025(r3)Load Attack type flag
001878b81208B8sb r2,0x0017(r3)Store X in -ve Faith change
001878bc1208BClw r5,0x000c(r29)Restore r5
001878c01208C0ori r2,r4,0x0001
001878c41208C4lw r4,0x0008(r29)Restore r4
001878c81208C8jr r31
001878cc1208CCsb r2,0x0025(r3)Store Attack Type Flag (psuedo status)


Since it's untested, might be additional code that enforces the hardcoding that I've missed. Or typos!
29
Quote from: The Damned on April 07, 2015, 07:55:40 pm
Hunh. I wasn't aware this even existed.

Pride, would it be possible to tie this functionality to a Movement instead of a Support? Or does it absolutely have to be a Support like how Jump still has to exist as a "dummy" skill set for this to draw from even if Jump is no longer the Lancer's primary?

Also, since the skill set is something isn't normally learn-able--if we having the Jump skill set be Izlude's original one--I have to ask if the Jump capacity just naturally maxes out to whatever the highest ability in set is, i.e. getting a Jump with range 8 and vertical 8 because that's naturally what's in Izlude's set.

Regardless, (belated) good job, as always.


Many CPU skillsets come preloaded with abilities learned, in 34 Jump's case both Vert Jump and Level Jump 8 are learned. If you use this with 12 Jump then only the abilities you've learned yourself under that skillset will be available.
30
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.
31
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.
32
PSX FFT Hacking / Re: RAD 3: 35 jobs.
April 04, 2015, 07:11:21 pm
Just thought I'd update on this - I think I've got it sorted and I'll attach the file if/when I have it ready in case anyone else wants the functionality.

Basically, I've added a filter option called "THIS Job" to the list - you can now filter job availability on the level of the job in question (rather than a static job you pick like "Monk"). So as an example, if you take Knight, select THIS Job -> Less Than and enter 5, the Knight class will only be available as long as its level is below 5. Once its level goes to 5 or above, it will be unavailable.

I'm also looking at bringing "Master" into the hack soon so you can make that a requirement instead of a Job level.

I don't know how useful it will be for others or if there's even a demand for such a thing but for me it means I can create "Prestige" job classes, for example: Knight turning into Arc Knight when it's mastered.
33
PSX FFT Hacking / Re: ASM Help
March 31, 2015, 02:46:02 pm
Quote from: Pride on March 30, 2015, 12:10:13 pm
Lets use my Jump hack since its what you mentioned.

At first the game continues to run after setting the break point. What would cause a the game to read my hack? Probably selecting the "Act" menu since the hack adds "Jump" to the "Act" menu. The game breaks on a first location, not my hack. So I run the game again (F9) and on the second break, it finds my hack. I'm now able to step through and go through it line by line.


I've tried it mostly in execute lines so far rather than read/write but I will try with that too and see if it works properly. With execute it doesn't though, it just breezes past the line of code without breaking. I think Xif's suggestion is working though :)

Quote from: Xifanie on March 30, 2015, 03:03:01 pm
You might be experiencing a processor instruction set architecture incompatibility. It is a known issue, along with another I forgot about (it tends to be one or the other). Basically, if it's the case with you, you're screwed. There IS a way to make it work though:

  • Force a break (Debug, Break)

  • In the disassembler window, ctrl+g (go) and type in the desired offset

  • Press F6 (Run to cursor)


At this point, if you interrupt the debugging process in any way, you have to start all over.

Tell me how that works. Yes it's annoying, but for me it's the only way I can use execute breakpoints, so I do use it.


Thank you Xif, this seems to be working. It's creating a Breakpoint automatically this way then when I continue playing it triggers it. Not sure if that's how you intended for it to work but it seems to be doing it, at least it has on this occasion.

Quote from: Choto on March 30, 2015, 10:29:36 pm
Did you hit any breakpoints in the past ever?


Only ever when the game is loading up, I've never hit any whilst in-game before though....
34
PSX FFT Hacking / Re: ASM Help
March 30, 2015, 11:34:51 am
I've having real issues with breakpoints in psX so any help would be greatly appreciated.

Generally I'm setting Execute breakpoints for lines of code that are being executed! Seems logical to me.... But the breakpoints aren't triggering, stuff is just continuing like normal. I posted in Jack of All Trades' Jump thread trying to turn Pride's hack into connecting the Jump skillset to another skillset and had the problem there originally, lines of code that -were- executing were not triggering a breakpoint.

Is there anything not obvious I should know about setting them?

Thank you.
35
One second,

Do I need to change the 0x92 and 0x02 in both sections then? There's two instances and only one is highlighted in your original post so those were the ones I changed.

If so I hope that's the reason! Having said that I'm still not understanding breakpoints then because my breakpoints should still be triggering, right?

Edit: Awesome, thank you, that's sorted that. And I've got my version of the hack working now. That's only for secondary though so I need to add to the code to make it so it looks at primary as well? Or am I misunderstanding what "primary skill" is?

Anyway it's working! Thank you for the help, everyone :)

I'm still really confused about breakpoints though, even with 0x92 and 0x02 still in there that should've just meant the branch failed, right? Hence why I wasn't getting Jump. I still should've had the breakpoint trigger though....
36
Here's the xml:

<?xml version="1.0" encoding="utf-8" ?>
<Patch name="JP UP gives Jump">
  <Description>JP UP gives access to skillset x34</Description>
   <Location file="BATTLE_BIN" offset="F762C">
     E8FFBD27
     1000BFAF
     90004392
     00000000
     40006330
     03006010
     21302002
     7E69060C
     34000534
     12004392
     1000BF8F
     1800BD27
     0800E003
     00000000
     92006590
     00000000
     0200A230
     04004010
     00000000
     34000234
     000002A2
     01001026
     FF000234
     000002A2
     0800E003
     00000000
   </Location>
   <Location file="BATTLE_BIN" offset="11A4F0">
     9979050C
     00000000
   </Location>
   <Location file="BATTLE_BIN" offset="13347C">
     8B79050C
   </Location>
  </Patch>

</Patches>

I've attached a screenie showing the code in the debugger, you can see it at the correct addresses in the RAM. I've attached a savestate too.

Sigh. Thank you.
37
Tied it to JP UP and equipped it. No Jump.

I must be doing something wrong, don't worry. If breakpoints can be trusted, and I wasn't doing something wrong with them, the issue I had was the main body of code not being executed at all. So somehow the jump(s) you added weren't being reached. I have no idea how or why at the moment but I'm going to try putting a break on the routine your jump was put in and take it from there.
38
Quote from: Pride on March 25, 2015, 10:05:26 pm
That hack should work, its one I've made a long time ago and I made sure it was tested before posting it.


I know...other people have posted right here saying it's working great. I also looked at the routine where you've inserted the jump and you've stuck it right in where the Defend/Equip Change check is so...that should be working.

I would say I just screwed up installing it but I've checked the code in the Disassembly at the precise point where it should be and...it's there. I'm going to try sticking a breakpoint at the beginning of the routine where the jump is rather than on the jump itself.

Thanks for the info on breakpoints also, Choto, I was a little bit unsure. It seems I've been doing the correct thing by selecting Execute.

And in general just thank you for the help :)
39
Yep, tried that and bricked the game. I'll try again :)

EDIT: Ok, it's not crashing the game anymore and I know why it was to begin with - something really silly - and the code wasn't correctly injected into Battle.BIN so Disassembly had a bunch of "illegal" in that section of the code.

However, now instead the hack just isn't working! What's weird though is that I can't seem to see this code even being referenced. I've set a breakpoint on the offset for the jump (0x1814F0), both read/write AND execute, and nothing ever triggers.

Weirdly though I've tried with the default hack...and the same thing. Tried it on a Vanilla ISO as well, hm...
40
Hi Pride,

Is it possible to attach a skillset to another skillset? I'd like to attach Jump to another skillset so I can give Dragoons worthwhile skills but keep their Jump ability. I've tried editing your code to change it from a support to a skillset lookup but I break the game!

Thanks in advance.