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


How to format a hack for FFTorgASM

Started by Dome, June 17, 2011, 08:07:13 am

Dome

June 17, 2011, 08:07:13 am Last Edit: June 17, 2011, 06:19:40 pm by Dome
Tutorial:
Quote from: pokeytax on June 17, 2011, 05:49:45 pm
I'm hijacking this thread, it's now "How to format a hack for FFTorgASM". (You can do this, Dome, it's not even harder than modding Spam!)

We are going to convert Xifanie's no-music hack:


SCUS_942.21
0x00033DF4
01000234
0x00033E90
01000234
0x00034010
01000234


Step 1
Create a completely empty .xml file. It looks like this and you don't even need to understand it. You just need to paste this once and then keep putting more hacks in the same file.

<?xml version="1.0" encoding="utf-8" ?>
<Patches>
</Patches>


Step 2
Add the skeleton for this patch. You'll do this every time you want to add a new hack to "dome.xml".

<?xml version="1.0" encoding="utf-8" ?>
<Patches>
<Patch name="Disable the game music">
</Patch>

</Patches>


This will get your hack to show up. It won't do anything yet, though - we need to add the three places the code is modified.

Step 3
Add the code for each spot. Code is inserted with a Location tag.

The file is the game file being written to. SCUS_942.21 codes to "SCUS_942_21". BATTLE.BIN codes to "BATTLE_BIN" and WORLD.BIN codes to "WORLD_WORLD_BIN". OPEN.BIN to "OPEN_OPEN_BIN"... basically, look at the path on the CD and replace slashes and periods with "_".

The offset is the address. Just take the "0x00012345" chunk and snip the "0x" and any leading zeroes.
The code comes between the two.


<Location file="SCUS_942_21" offset="33DF4">
01000234
</Location>


Steps 4 & 5
Put in the three code snippets this hack needs and you're done. That's really all there is to it for 80% of hacks. The ALMA and RAD .xml files are huge but it's just a bunch of Location tags; it's no more complicated than this.


<?xml version="1.0" encoding="utf-8" ?>
<Patches>
<Patch name="Disable the game music">
<Location file="SCUS_942_21" offset="33DF4">
01000234
</Location>

<Location file="SCUS_942_21" offset="33E90">
01000234
</Location>
<Location file="SCUS_942_21" offset="34010">
01000234
</Location>
</Patch>
</Patches>


Just save this as an .xml file in any text editor.

The End

To add a new hack, just tack on another framework and go from there:


<?xml version="1.0" encoding="utf-8" ?>
<Patches>
<Patch name="Disable the game music">
<Location file="SCUS_942_21" offset="33DF4">
01000234
</Location>
<Location file="SCUS_942_21" offset="33E90">
01000234
</Location>
<Location file="SCUS_942_21" offset="34010">
01000234
</Location>
</Patch>
<Patch name="Sound Test">
</Patch>

</Patches>


"Be wise today so you don't cry tomorrow"

RedWorld

Wow Dome! I really like this! c: I'll have to figure out what to request once I figure out how to do it. (ASM stuff of course.) c:


"Dear God, what's it like in your funny little brains? It must be boring." - Sherlock Holmes

pokeytax

June 17, 2011, 05:49:45 pm #2 Last Edit: June 17, 2011, 06:01:30 pm by pokeytax
I'm hijacking this thread, it's now "How to format a hack for FFTorgASM". (You can do this, Dome, it's not even harder than modding Spam!)

We are going to convert Xifanie's no-music hack:


SCUS_942.21
0x00033DF4
01000234
0x00033E90
01000234
0x00034010
01000234


Step 1
Create a completely empty .xml file. It looks like this and you don't even need to understand it. You just need to paste this once and then keep putting more hacks in the same file.

<?xml version="1.0" encoding="utf-8" ?>
<Patches>
</Patches>


Step 2
Add the skeleton for this patch. You'll do this every time you want to add a new hack to "dome.xml".

<?xml version="1.0" encoding="utf-8" ?>
<Patches>
<Patch name="Disable the game music">
</Patch>

</Patches>


This will get your hack to show up. It won't do anything yet, though - we need to add the three places the code is modified.

Step 3
Add the code for each spot. Code is inserted with a Location tag.

The file is the game file being written to. SCUS_942.21 codes to "SCUS_942_21". BATTLE.BIN codes to "BATTLE_BIN" and WORLD.BIN codes to "WORLD_WORLD_BIN". OPEN.BIN to "OPEN_OPEN_BIN"... basically, look at the path on the CD and replace slashes and periods with "_".

The offset is the address. Just take the "0x00012345" chunk and snip the "0x" and any leading zeroes.
The code comes between the two.


<Location file="SCUS_942_21" offset="33DF4">
01000234
</Location>


Steps 4 & 5
Put in the three code snippets this hack needs and you're done. That's really all there is to it for 80% of hacks. The ALMA and RAD .xml files are huge but it's just a bunch of Location tags; it's no more complicated than this.


<?xml version="1.0" encoding="utf-8" ?>
<Patches>
<Patch name="Disable the game music">
<Location file="SCUS_942_21" offset="33DF4">
01000234
</Location>

<Location file="SCUS_942_21" offset="33E90">
01000234
</Location>
<Location file="SCUS_942_21" offset="34010">
01000234
</Location>
</Patch>
</Patches>


Just save this as an .xml file in any text editor.

The End

To add a new hack, just tack on another framework and go from there:


<?xml version="1.0" encoding="utf-8" ?>
<Patches>
<Patch name="Disable the game music">
<Location file="SCUS_942_21" offset="33DF4">
01000234
</Location>
<Location file="SCUS_942_21" offset="33E90">
01000234
</Location>
<Location file="SCUS_942_21" offset="34010">
01000234
</Location>
</Patch>
<Patch name="Sound Test">
</Patch>

</Patches>
  • Modding version: PSX

Dome

June 17, 2011, 06:47:59 pm #3 Last Edit: June 17, 2011, 06:48:35 pm by Dome
I started with this

Blank support ability over short charge adds 25% bonus skill hit
Abilities like talk skill, spells, physical abilities gain 25% to hit unless they are 100% to hit to start with.
BATTLE.BIN
0x0011F5D8
1980013C
CE382294
CE3830A4
D03822A4
D0382394
CE382294
92006492
10008430
03000410
21104300
82180200
21106200
902D248C


I did it right?

<?xml version="1.0" encoding="utf-8" ?>
<Patches>
<Patch name="Blank support ability over Short charge adds 25% bonus skill hit">
<Location file="BATTLE_BIN" offset="11F5D8">
1980013C
CE382294
CE3830A4
D03822A4
D0382394
CE382294
92006492
10008430
03000410
21104300
82180200
21106200
902D248C
</Location>
</Patch>
</Patches>



"Be wise today so you don't cry tomorrow"

pokeytax

  • Modding version: PSX

Dome

Thanks for the awesome tutorial, Poke :-)

"Be wise today so you don't cry tomorrow"

Dome

I've tried it, and it seems to boost the hit % by 10 and not 25
Did I do something wrong?

"Be wise today so you don't cry tomorrow"

formerdeathcorps

Quote from: Dome on June 18, 2011, 07:54:57 am
I've tried it, and it seems to boost the hit % by 10 and not 25
Did I do something wrong?


No.  It's a 5/4x multiplier to hit chance so what normally be 40% rises to 50% while something normally being 80% rises to 100%.
The destruction of the will is the rape of the mind.
The dogmas of every era are nothing but the fantasies of those in power; their dreams are our waking nightmares.

Pride

Requesting that this be moved to tutorials
  • Modding version: PSX
Check out my ASM thread. Who doesn't like hax?