Final Fantasy Hacktics

Projects => Completed Mods => The Lion War => Topic started by: Raidus on February 20, 2025, 07:00:40 pm

Title: Conflict with ASMs
Post by: Raidus on February 20, 2025, 07:00:40 pm
Hello! I have a problem with conflict in asm's "Appy Defense: Item" and "Event Instructions Upgrade v1.377" and I don't know how to resolve it. Appy Defense is the main asm of my mod so I really hope someone can help me with this. Thanks in advance! I'm using the TLW 2.031.

(https://freeimage.host/i/39hAczb)
Title: Re: Conflict with ASMs
Post by: Raidus on February 20, 2025, 07:06:47 pm

(https://i.postimg.cc/5yKZtvHg/conflict.jpg) (https://postimg.cc/fSXH2VfS)
Title: Re: Conflict with ASMs
Post by: Nyzer on February 20, 2025, 10:57:19 pm
That's a kanji space address, so you'd have to move the address (and adjust any jumps or load addresses accordingly) in the XML file. Probably would be easier to move the location of the defense XML's kanji code.
Title: Re: Conflict with ASMs
Post by: Raidus on February 24, 2025, 10:16:20 am
Quote from: Nyzer on February 20, 2025, 10:57:19 pmThat's a kanji space address, so you'd have to move the address (and adjust any jumps or load addresses accordingly) in the XML file. Probably would be easier to move the location of the defense XML's kanji code.
Thanks for responding!
Now, how do I know where I should move this kanji code?
Title: Re: Conflict with ASMs
Post by: Nyzer on February 24, 2025, 11:14:05 am
There is a Free Space button in OrgASM. Select All, then click it.
Title: Re: Conflict with ASMs
Post by: Raidus on February 25, 2025, 09:27:09 am
Quote from: Nyzer on February 24, 2025, 11:14:05 amThere is a Free Space button in OrgASM. Select All, then click it.

(https://i.postimg.cc/HxXP1dDT/conflict2.jpg) (https://postimages.org/)

Can you explain to me what exactly I have to do here in this FFTorgASM window so that I can try to solve this problem? I've already tried putting the numbers and letters that are there in the "Next Adress" tab in the box above the "MOVE" button, the conflict has even disappeared, but the game keeps crashing when the first unit is going to move. What am I doing wrong? Or is there no solution to this problem?

Translated with DeepL.com (free version)
Title: Re: Conflict with ASMs
Post by: Nyzer on February 25, 2025, 04:20:55 pm
I don't know how reliable that Move button is. I've seen a few issues come up from improper moves of free space code. You'd have to get into ASM editing to edit the files themselves, directly, and that can get a bit complicated because of the different formats and offset modes that can go into ASM hacking.

The first thing that you would want to do is to go get the files from before you made that change. Because if the jumps no longer line up, now we don't even know where they were originally supposed to go. And it may not be obvious to find that out again.

Then you want to make sure that the defense ASM file is actually in ASM mode. Which means instead of being a bunch of random numbers and letters looking like a Gameshark code, it would have lines like "addiu r29,r29,-0x0020" and "j 0x00152000". If it's not, then you need to run it through MassHexASM to convert it, but you would need the offsets in RAM. If the tag with "<Location file= >" doesn't have "offsetMode="RAM"" in it, you need to get a calculator in programming mode and add 0x67000 to each offset value (such as "offset=F1230") and use that value in MassHexASM's Location field to correctly convert the hex code to ASM. Doing so will show all the "j" and "jal" commands with the RAM location they jump to. This lets you find out all of the jump locations that need to be corrected when the free space code is moved.