• Welcome to Final Fantasy Hacktics. Please login or sign up.
 
April 19, 2024, 10:40:09 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.


Golem HP

Started by Kapilapis, January 31, 2021, 05:39:51 pm

Kapilapis

Has anyone ever made an ASM hack to change how Golem's HP works? I believe a Golem with only 1 HP would be an interesting idea to play around with, but I couldn't find any results when I searched.
I also tried looking at the wiki to see if I could find them address for that value and see if I could learn how to change that, but I had no luck there either.
  • Modding version: PSX

nitwit

Ctrl f golem through these pages.

https://ffhacktics.com/smf/index.php?topic=12518.msg228353#msg228353

https://ffhacktics.com/smf/index.php?topic=10381.msg220911#msg220911

https://ffhacktics.com/smf/index.php?topic=11211.msg218573#msg218573

Wiki:
https://ffhacktics.com/w/index.php?search=golem&title=Special%3ASearch&go=Go

Haven't looked at it, but with Dokurider's notes/hacks and the wiki pages, you could set the golem's "HP" to 1.

Kapilapis

I had read those and looked through the wiki pages. I think the part where HP is calculated should be in >this page<, but my attempt to compare it to anything in the >Data/Table Locations< page was fruitless. I also downloaded the "New Asm Files.7z" and found that same routine within "New Text Document (2)". It has more notes on what each line does, but none of them say where the Golem's HP value is set.
  • Modding version: PSX

Orkney

Hi,

This problem also interests me.

I look for "golem" in the wiki (like niwit suggested)

I found those two routines  Main_Reaction_Routine_-_performs_ability_effects and Formula_01_-_06_Aftermath

In this routines, it seems that the amount of golem is stored at 8019000X (X = team) - 0x0A0C. --> 8018F5F4 (as mentionned in the Data/Table_Locations)

So i looked for 0X0AC and found this routine Main_Action_Routine_-_performs_ability_effects

Look's like there's a part of code that may be of interest in the main reaction routine and in the main action routine.

0018bfa8: 8c422d98 lw r2,0x2d98(r2) Load Defender's Data
0018bfac: 34100001 ori r16,r0,0x0001
0018bfb0: 90430005 lbu r3,0x0005(r2) Load Defender's Team
0018bfb4: 9442002a lhu r2,0x002a(r2) Load Defender's Max HP
0018bfb8: 30630030 andi r3,r3,0x0030 enemy team check
0018bfbc: 000318c2 srl r3,r3,0x03
0018bfc0: 3c018019 lui r1,0x8019
0018bfc4: 00230821 addu r1,r1,r3
0018bfc8: a422f5f4 sh r2,-0x0a0c(r1)          Store Team's Golem Amount?

They both store the Target Max Hp as golem amount (the summoner is the target of the golem)...
I can't find anything else, and i'm not familiar with those routines, there's no return locations, i can't tell when they occurs..
I don't understand why the team as to be the enemy team..

EDIT : it's the same routine at two different links ! Probably the one to be changed
  • Modding version: PSX

Kapilapis

I tried changing the 0x002a in
0018bfb4: 9442002a lhu r2,0x002a(r2) Load Defender's Max HPto 0x0022 (the address for level) and it did not seem to work, sadly. Unless I did something wrong with my xml.
  • Modding version: PSX

Orkney

What happens ?

Does'nt work at all ? Or remains unchanged ?
  • Modding version: PSX

Kapilapis

Remained unchanged, yeah.
  • Modding version: PSX

Orkney

Ok then,

if you are sure you have applied the xml correctly (to a savestate or an ISO ?)

You'll need to use a breakpoint at the golem adress and track another routine..

You also could ask on the discord, the bests ASMers may answer you :)

EDIT : i just read the discord channel, you obviously already know it :)
  • Modding version: PSX

Kapilapis

February 03, 2021, 06:57:57 am #8 Last Edit: February 03, 2021, 07:15:33 am by Kapilapis
I decided to give this another go this morning. Turns out my hack did not [not do anything]. It, in fact, made golem have thousands of HP. For some reason trying to load Level as the HP value did not go as expected at all. But now we know we are in the right place!

Edit: I think I see the issue. HP is a halfword, while level is just a byte. So it actually loaded the Level and Brave values together as the halfword it was looking for. I tried changing it to lbu but the spreadsheet gave me an error, so... trying to figure out what I could use.
  • Modding version: PSX

Kapilapis

Hope this is important enough to warrant the double post, but: I did it! After reading a few more tutorials and learning more about ASM itself, I managed to set Golem's HP to 1! Thanks a lot for locating that routine, Orkney. I wouldn't have done this without your help.
  • Modding version: PSX

Orkney

Nice !

Glad to have been helpful

  • Modding version: PSX