Radiant Notes

0 views
Skip to first unread message

Carlee Members

unread,
Aug 3, 2024, 3:49:29 PM8/3/24
to syldiopenryo

Before I begin, I'm making the assumption that you have the FE10 disk image (aka ISO, ROM or whatever you want to call it) or know where to find one. Owning one is illegal, so I cannot tell you where to find it (Hint: use a search engine and common sense).

You will need a tool to compress/decompress LZ77. I recommend Batch-LZ77 (we used this for the FE12 translation patch and everything worked fine).

This topic might also be a useful reference (especially to show that the hacking, some of it at least, works).

Prologue 1: Viewing the Wii disk image

Okay, so you have FE10 on your PC. Now what? It's time to break the game apart and get the individual files out!

There are two options that you can take, although you may end up using both for different reasons.

1) WiiTools

This is sort of like GCTool for GameCube disk images and NDSTool for DS ROMs. It extracts all the files from a Wii disk image.

The version I used was v.2b. You'll need a recent version of libeay32.dll (OpenSSL Shared Library) and the vcredist_x86 (Visual C++ 2008 Codename Orcas redistributable) files installed to run them. If you don't know where to find these files, give me a shout. You'll also require an encryption key file, named ckey.bin, placed in the WiiTools directory.

Open up a command prompt and run WiiED. Then run WiiSO on the newly created files that WiiED made. The second step may take a very long time. If successful, all of the FE10 files will be extracted.

2) WiiScrubber

This is a tool used for removing garbage data, but also includes options for extracting and replacing individual files (the later versions anyway). Unlike WiiTools, you can't extract multiple files at once, but it's useful if you only want to extract one or two files. The replacing part is important if you want to play a hacked FE10.

I used version 1.2. Some of the earlier/later versions seem to have issues with replacing files.

Using WiiScrubber couldn't be easier. You don't need any extra files. Just open the .exe file and you'll be greated by a GUI that lets you do everything.

Prologue 2: Hex Editing basics

If you're familiar with using a hex editor, feel free to skip this step. It's kind of boring.

Anyway, I'm guessing most people are familiar with Nightmare modules when it comes to FE hacking. I never do any serious hacking so I don't really use them much, since all they do is speed up hacking. I have some Nightmare modules for FE10, but it wasn't feasible to make them for everything (plus I'm lazy).

So, it's time to get used to using a hex editor... I use WindHex, but there are tons of other hex editors that you could use.

Just open the file you want to edit with your hex editor.

You'll be greeted with a whole bunch of numbers and letters. Don't worry if you don't know what they all mean. Eventually you'll know what some of them mean and that's good enough.

Quick definitions

Byte:

See all those numbers and letters? Each pair of number/letters is a byte. When selecting with your cursor, the minimum you can select is typically a byte. Eg. 00 or 46 or 7F.

Hex:

Short for Hexadecimal. A numbering system that uses a base of 16 (i.e includes 16 unique symbols). Decimal numbers ("normal numbers" to most people) use a base of 10; they have 10 unique symbols: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9. Hex uses Decimal symbols, but adds 6 new symbols at the end: A, B, C, D, E, F. So when counting in hex, you'd go 5, 6, 7... as with decimal numbers, but when you reach 9 and continue counting, you'll go A, B, C... and so forth.

Hex editors display the values of the bytes in hex. You can convert between hex and decimal values by using the Windows Calculator (set to scientific mode). It might also be useful to memorise a few hex->dec values to save time.

Eg. Some Hex->Dec values


Chapter 4: Skill data

Not sure if this is true for Item data, but Skill data happens to consist of uniform size blocks, which can only mean one thing - I'm not too lazy to make a Nightmare module for it! Bad news is that there doesn't seem to be much interesting to edit.

Skill Editor
Skill order (you need this to operate the above)

The BBCode doesn't seem to like me so I'll continue here.

Chapter 8: Buddy support data

Data starts at exactly 0x1A2D4. It contains info on the Buddy support lists for characters (i.e which characters they can make Buddy relationships with and at what rate).

Order of buddy lists

See this page for info on Buddy support types and other stuff.

Eg. Ike's buddy list:


The next character's pacifist data begins each time there are eight 00's in a row.

The final character's pacifist data marks the end of the FE10Data file, not counting the footer.

Chapter 13: Not covered in FE10Data

Skipped Chapter Data and Group Data. The first one seems to include Map affinities, battle backgrounds, sky backgrounds and the like. It probably does not include stuff like starting classes and inventories, which you'd normally associate with chapter data. Group data, I'm guessing is to do with affiliations or something; I'll probably look it up when I'm bored.

Stuff I couldn't figure out:

Biorhythm Data - not the stat boosts. Maybe related to the actual sine waves? Here's the relevant data for it if anybody wants to try deciphering it.

Game Data - No, I didn't name this. It's such a generic term that I have no clue what it could be related to. It appears in FE9 as well, but it's just as puzzling. Again, here's the relevant data.

Chapter 14: Shop/forging data

Stored in the /Shop directory, in the separate shopitem_X.bin files, where X is:

n = Normal = ENG Easy
h = Hard = ENG Normal
m = Maniac = ENG Hard

The shopitem_X.bin files are mostly a whole bunch of pointers. Don't forget, you can easily make new pointers by going backwards from the label.

Eg. In shopitem_h.bin the label IID_BLIZZARD is found at 0xA9CF. Subtract 20 from it and it becomes the pointer that points to it, in this case 00 00 A9 AF. Such a pointer already exists at 0x2B98. Must be from the Part 3 Chapter 13 Bargains.

The order seems to be Armory (debug chapter, first chapter to last chapter), Vendor (same), Bargains (same) and Forge (same). At the very end is the Forging card data.

Individual items in the shops are separated by four 00's in a row. The shops appear to be terminated by eight 00's in a row.

Unlike in the FE10Data file, not every item appears here. There are a whole bunch though. To add more items, you need to replace the existing IID labels with your own. Make sure they're consistent with the ones found in the FE10Data file. Try not to go over the space you're given (unless you're happy with repairing pointers), but it's okay if the new label is shorter than the older one (just replace unneeded text with 00's).

It should be possible, although I've never tried it in FE9 and 10, to expand the file and add in new code or labels at the end. I tried this with FE11 and it seems to work fine for both the chapter you're editing and the next one (I coded my own Armory at the end of the Chapter 1 script file).

As for the Forging cards...

Forging Card Editor
List of Cards

0F A0 18 4C - Unknown, possibly to do with unit colour?
00 00 03 C8 Pointer -> PID_MICAIAH - Who the character is
00 00 03 8D Pointer -> JID_LIGHTMAGE - Class
06 11 0A 0B - Starting and ending XY co-ordinates?
01 Unknown, one of these numbers has to be starting Level though, right?
...
00 00 04 63 Pointer -> invalid - Affinity? Not sure
00 00 03 49 Pointer -> IID_LIGHT - First weapon
...
00 00 03 1B Pointer -> IID_HERB - First item
...
00 00 04 1D Pointer -> SEQ_NOATTACK - AI?
00 00 04 35 Pointer -> SEQ_NOMOVE - This stuff is probably useless for playable characters
00 00 04 2A Pointer -> SEQ_NOHEAL
00 00 03 9B Pointer -> MTYPE_NORMAL - Movement type?
00 00 04 35 Pointer -> SEQ_NOMOVE - What, another one?


Chapter 16: Basic scripting

Stored in the X.cmb files in the /Scripts directory.

No, this isn't related to dialogue. It's to do with editing events in the game.

So, what's the point of editing events? Well, you can change what items are stored in villages and treasure chests, as well as the hidden treasures. In theory, if you're really good, you could probably code your own chapter.

I probably won't be able to figure out exactly how the events are called, but there are some key points that I can tell you.

Unless preceded by a 1D or 38 byte, pointers are byte-reversed and point exactly to the address. Eg. D4 03 00 00 points to 0x3D4 (03 and D4 swap places).

If there's a 1D or 38, the following two bytes are likely a non-reversed pointer. These pointers point to an address + 2C. So if you see something like 38 02 44, the 02 44 is a pointer that points to the address 0x270 (244 + 2C).

Final Chapter: Basic ripping

Time to end with something a little different. I'll explain how to view/use a bunch of files. Most of this stuff applies to FE9 as well, and to an extent FE11.

Here are some tools by Dark Twilkitri for decompressing TPL and CMS files. Place them in the same directory as the files you want to convert and double-click on the relevant program.

BIN

Usually identified by a .bin extension. Raw binary files with no compression. If the file you're looking at doesn't fall into the below filetypes, it's probably a binary file (I'm guessing).

CMS

Usually identified by a .cms extension (not to be confused with .cmb and .cmp). The very first byte seems to be a 10. These are files compressed using LZ77. Just use a LZ77 (de)compressor. The decompressed files could be anything.

TLP

Usually identified by a .tpl extension. The first four bytes are 00 20 AF 30. These seem to be compressed image files. You can decompress them using Dark Twilkitri's TLPCNV program. The decompressed files are usually bitmaps or DDS files.

DDS

Image files. Can be viewed with Thakis's ddsview program or the NVIDIA dds plug-in for photoshop.

M

Message files. You can open them with a text editor like Notepad.

THP

Movie files. You can view them with Thakis's thpplay program. I think the thp format is supported by some random movie players as well.

CMB

Uncompressed files. Try opening them with a text editor or hex editor.

BRSTRM

Music files. They are supported by recent versions of the in_cube plug-in for WinAMP. I seem to recall in_cube is now part of a larger videogame music plug-in.

BRSAR

Haven't really looked into this, but I'm guessing it's a file containing many sound files inside. Maybe sound effects? I don't know. Quickly Googling around, it looks like there are programs designed for these files.

PAK

Package files. The first few bytes reads "pack" in ASCII. Usually contains a bunch of random files. I don't know if any programs extract these files, but there is a cheap trick that I use. If you're looking for TPL files, for example, run a search for the TPL header (00 20 AF 30). Then dump everything from that point and onwards. Of course, you may want to determine where the packed file actually ends, but TLPCNV seems to do a good job handling the unwanted data most of the time.

CMP

Compressed package files. Basically a PAK file with LZ77 compression.

Epilogue

c80f0f1006
Reply all
Reply to author
Forward
0 new messages