Modding => Non-FFT Modding => Topic started by: formerdeathcorps on December 29, 2011, 12:48:32 am
Title: LuCT Hacking (PSX)
Post by: formerdeathcorps on December 29, 2011, 12:48:32 am
I am simply starting this, but I'm going to post my work.
So far:
PRG.EXE is the ASM file that contains the battle and world routines. PRG RAM = PRG ROM + 0xF900
SLUS_005.60 is the ASM file that contains the routines only loaded when the game is turned on (up until the New GAme/Continue/Tutorial menu). As far as I can tell, it is not loaded during the actual game. SLUS RAM = SLUS ROM + 0x157000
UBF.BIN is the file that contains almost no ASM (I haven't looked too carefully, the LEDecoder decompiled file is 125 MB and takes minutes to open). I suspect it contains all the storyline events, names, sprites, maps, and possibly sounds as well. This file is 16 MB, so I doubt all of it is loaded into the RAM; instead probably only the relevant sections are loaded.
UBF2.BIN is the file that contains ASM with variable RAM to ROM translation. I suspect it contains all the event triggers that tells the game to load only a subset of the events for the different story routes. The file is 1.4 MB, but I suspect only parts of it are loaded into RAM.
From what I've seen so far of the RAM, it seems like nothing changes much, and most of the RAM consists of tables. The same RAM data exists between across between the World Map, Formation Screen, and Battle. I suspect this is to track everything that happened in the storyline (which is more complicated than FFT). By comparison, in FFT, almost all of the RAM is reloaded between the World Map and Battle Screens (meaning FFT has more data to load when it comes to battle mechanics).
What I Need:
Gameshark Codes (This should help me figure out RAM addresses to track) Debuggers (You must be proficient in using a PSX debugger. Hopefully, you have played LuCT before as well. Hexers (You must be patient. Scan the UBF.BIN file for patterns and correspondences to game data. Let's make an event editor by the time we're done.)
Attached Files: Decompiled by LEDecoder (Thanks, Glain!)
Key.txt (This Post) UBF2.txt (Decompiled version of UBF2.BIN) SLUS.txt (Decompiled version of SLUS_005.60) PRG.txt (Decompiled version of PRG.EXE) UBF.BIN (Too large to decompile, most of the contents are gibberish, but I suspect TO's meat lie in here; hence why I need hexers and time to unravel this)
Title: Re: LuCT Hacking (PSX)
Post by: Pickle Girl Fanboy on December 30, 2011, 01:23:26 pm
Here's some ideas gleaned from data diving in Ogre Battle - The March Of The Black Queen and Tactics Ogre - The Knight Of Lodis.
In OB-MOTBQ, class data is stored by stat, in class order. So, it looks like this:
Strength Gain On Level Up 02 Fighter 03 Knight 03 Paladin 03 Wild Man 03 Evil One 03 Ninja 03 Ninja Master And so on... Since LUCT was coded right after MOTBQ, then it probably is coded similarly. You should first find or compile accurate data on something, and then search for it in a hex editor.
Before you do anything else, go to RHDN and GameFAQs, and see if anyone dumped any of the game data themselves. Also, download all PAR code, Gameshark, Game Genie, and Save State hacking guides. These are very useful resources.
Q: How do I find or compile accurate data on, say, stat gains on level up for each class? A: In OBMOTBQ, stat games are pseudo randomly chosen, starting with the minimum stat gains, which are then given a pseudo random bonus of +1 or +2. So, all you have to do is make a save state where you are about to level up, and then level up a few dozen times until you find the minimum stat gain. That minimum stat gain is what should be listed in the class data.
Q: What now? A: Find what order the classes are in, in the game data. This should be in any of the PAR, Gameshark, Game Genie, or Save State hacking guides. Look for any code which lets you change a characters current class. Such a code should come with a list of digits for this code, which will be the order in which classes are stored in the game.
Q: Okay, found it, what next? A: Now we make some educated guesses. I'll assume that class data is stored by stat, in class order. So, if we have the following information (NOT THE REAL INFO, JUST HYPOTHETICAL!):
Intelligence gains, organized by class: 01 02 01 01 You'll have to do this with at least ten classes if you want to find the data within a few searches. More classes are better. Be sure to use the Wildcard functionality in your hex editor while searching, if you have any gaps in your known data.
If this doesn't work, then it means that class data is probably stored by class, in stat order. That's somewhat more difficult to find, since you don't know what order it's in, but I know how Tactics Ogre - The Knight Of Lodis stored it's class data, so we're not without resources.
I found class data in TO -TKOL by searching for starting stats. The following is the specific block of data that I looked for, which led me to it.
Starting Strength Strength Gain on Level Up Starting Intelligence Intelligence Gain on Level Up Starting Agility Agility Gain on Level Up In TO - TKOL, the data was stored as the starting minimum stat and the minimum stat gain on level up, so you'll have to do some leveling up and recruiting to determine what the minimums are for TO - LUCT.
****
Finding the actual data should only take a few hours of rom or save state corruption (hint: use save state corruption if you're hacking the PS1 version of TO - LUCT, and use ROM corruption if you're hacking the SNES version). It goes by really freaking fast. The only actual difficult part is compiling the data, verifying it, checking it again to make sure you didn't fuck anything up, and then setting up the save state or save location to where you can load it and quickly check if what you corrupted is the relevant data.
http://gamehacking.org/?s=v2&sys=1&gid=1260&sid=5649 http://gamehacking.org/?s=v2&sys=1&gid=1260 ^PS1 TO - LUCT codes.
http://gamehacking.org/?s=v2&sys=6&gid=6156 ^SNES Japanese TO - LUCT codes.[/spoilers]
I'd volunteer, but I don't have a working PS1 emulator for Linux that is conducive to save state hacking, and I don't really care about TO - LUCT.
Title: Re: LuCT Hacking (PSX)
Post by: Pickle Girl Fanboy on December 31, 2011, 02:07:55 pm
Bump for news:
Quotehttp://www.gamefaqs.com/boards/198881-tactics-ogre/60552288 ^A "trainer". No idea what it is, but it looks useful.
http://db.gamefaqs.com/console/snes/file/tactics_ogre_hacking.txt ^Save state hacking guide for SNES version. Finding many of these things in a pSX save state should take maybe 20 minutes work with a hex editor. Plus, we got digits.
One last thing: There's a lot of LUCT fans at RHDN, and, though I didn't find any documents over there, you should make a topic about this project over there, as well as here. They will want what you find, and they might just help. And I think I remember a LUCT hacking community somewhere.
Title: Re: LuCT Hacking (PSX)
Post by: Pickle Girl Fanboy on February 21, 2012, 07:25:44 pm
http://www.romhacking.net/forum/index.php/topic,12273.msg179155.html#msg179155 ^Found someone who found some TO:LUCT stuff. Good luck.
Title: Re: LuCT Hacking (PSX)
Post by: Eternal on February 21, 2012, 07:27:08 pm
Edea's already a member of FFH, as a FFTA modder. I'll point her to this topic.
Title: Re: LuCT Hacking (PSX)
Post by: formerdeathcorps on June 15, 2012, 06:55:00 am
Routine for changing jobs in the formation menu is 0x10A744 in file UBF2.BIN or 0x1AA744 in RAM during the formation screen only.
Title: Re: LuCT Hacking (PSX)
Post by: formerdeathcorps on June 22, 2012, 11:15:52 pm
The specific location of the selected unit's stats is 0x1239A0 RAM in the pre-battle and formation menus.
00 = Job 01 = ??? 02 = Unit LVL 03 = Unit EXP 04/05 = Unit curHP 06/07 = Unit maxHP 08/09 = Unit curMP 0A/0B = Unit maxMP 0C/0D = Unit STR 0E/0F = Unit INT 10/11 = Unit AGI 12/13 = Unit DEX 14/15 = Unit VIT 16/17 = Unit MEN 18 = Unit Luck 19 = Alignment (00 = Neutral, 01 = Law, 02 = Chaos) 1A = ??? 1B = ??? 1C = Unit ID - 1 1D-20 = Unit Equips 21-23 = Spells
Title: Re: LuCT Hacking (PSX)
Post by: itoikenza on June 28, 2012, 10:32:14 pm