Jump to content

FE10: Radiant Dawn Hacking Notes


VincentASM
 Share

Recommended Posts

3 hours ago, Vicious Sal said:

That's pretty amazing, considering the fact that not all blocks are equally large. It made nightmare very suboptimal for this game. Looks very promising and I'll be sure to take it for a whirl! It might even help me with my problem in 1-6 for Reverse recruitment.

Thanks! Main reason for me using Excel is because of how simple it would be to share edits that way and merge character, item or class data from separate mods.

I'm also planning one for the FE10 Battle file. That determines assets in a similar vein to the Asset files in Fates. This paired along with the fact that there are unused PoR files meant I was able to load up Gurgurant in-game. That'll be saved for after I'm done with the data file though.

http://imgur.com/a/lojj8C4

Link to comment
Share on other sites

  • Replies 614
  • Created
  • Last Reply

Top Posters In This Topic

Okay, so I "finished" the unpacker/repacker. Main reason I put it in quotations is because running the game with the repacked cms file brought up an error from Dolphin. I selected "Ignore for this session" and the game ran fine along with all the data displaying correctly. So for now, I'm going to post it here for testing until I can find what's actually broken. Note that it likely won't work on Wii for now.

So, as for what you'll need prior to actually being able to run this, you'll need

1. Python 3

2.xlrd Plugin for Python

3.xlsxwriter for Python

4. Some way to edit xlsx files (I use Microsoft Excel)

 

Now, after installing the necessary programs, download the tools from here and extract it to a folder. Decompress your FE10Data.cms file and then drag it onto Extract.bat. After this is done, a xlsx file named "FE10 Data Table" will be created. Open that file in the program of your choice and edit away.

Before you save your changes, go to the "String List" sheet in the file and sort the column from A to Z. The main reason for this is because there's a random blank entry in there that might throw things off. After this, save the file. Lastly, you just drag and drop the Excel file onto rebuild, compress your newly generated file and put it to the test.

Some things to note here, you can only expand the Character, Class and Item tables. I don't really understand enough about the other tables to program them to expand correctly. Secondly, you can't change the order of the sheets in the xlsx or else it won't work when trying to rebuild.

Please let me know if you find somewhere in the game where it crashes even when ignoring the error upon startup. That way I can try to fix it. This is kind of a beta until I can get it to run on an actual Wii without issues.

EDIT: Forgot to mention, if you add a new string (like adding a new item with the IID "IID_GURGURANT") you have to add that string to the String List Sheet or it won't build correctly. I'll see if I can make a sort of workaround for this but it's mostly automatic anyway so some leg work isn't bad.

Edited by HeartlessSeph
Link to comment
Share on other sites

If getting it to work on console is possible, that'd be great. I tried messing with it a bit and I can confirm it locks up on console when trying to load a chapter.

Link to comment
Share on other sites

So, after looking at it more closely, I royally screwed up the skill data section which is likely why it crashes on Console. Luckily, this made me more closely look at how the skill section works so I think I should be able to make it expand-able.

Link to comment
Share on other sites

On 5/7/2020 at 2:23 AM, HeartlessSeph said:

Okay, so I "finished" the unpacker/repacker. Main reason I put it in quotations is because running the game with the repacked cms file brought up an error from Dolphin. I selected "Ignore for this session" and the game ran fine along with all the data displaying correctly. So for now, I'm going to post it here for testing until I can find what's actually broken. Note that it likely won't work on Wii for now.

So, as for what you'll need prior to actually being able to run this, you'll need

1. Python 3

2.xlrd Plugin for Python

3.xlsxwriter for Python

4. Some way to edit xlsx files (I use Microsoft Excel)

 

Now, after installing the necessary programs, download the tools from here and extract it to a folder. Decompress your FE10Data.cms file and then drag it onto Extract.bat. After this is done, a xlsx file named "FE10 Data Table" will be created. Open that file in the program of your choice and edit away.

Before you save your changes, go to the "String List" sheet in the file and sort the column from A to Z. The main reason for this is because there's a random blank entry in there that might throw things off. After this, save the file. Lastly, you just drag and drop the Excel file onto rebuild, compress your newly generated file and put it to the test.

Some things to note here, you can only expand the Character, Class and Item tables. I don't really understand enough about the other tables to program them to expand correctly. Secondly, you can't change the order of the sheets in the xlsx or else it won't work when trying to rebuild.

Please let me know if you find somewhere in the game where it crashes even when ignoring the error upon startup. That way I can try to fix it. This is kind of a beta until I can get it to run on an actual Wii without issues.

EDIT: Forgot to mention, if you add a new string (like adding a new item with the IID "IID_GURGURANT") you have to add that string to the String List Sheet or it won't build correctly. I'll see if I can make a sort of workaround for this but it's mostly automatic anyway so some leg work isn't bad.

I'll be sure to take a look in one of the following days. 

 

Link to comment
Share on other sites

57 minutes ago, HeartlessSeph said:

So, after looking at it more closely, I royally screwed up the skill data section which is likely why it crashes on Console. Luckily, this made me more closely look at how the skill section works so I think I should be able to make it expand-able.

Is there a reason it crashes specifically on console only? I'm pretty curious, actually. 

Link to comment
Share on other sites

3 hours ago, lightcosmo said:

Is there a reason it crashes specifically on console only? I'm pretty curious, actually. 

Likely because Emulators can just ignore the errors that pop up. I didn't test much on this so I didn't get a chance to see if it would crash if you kept going in. I'm going to re-do the script for that part and see if that prevents any errors from popping up on the emulator. If it does, it should then work on console too.

Link to comment
Share on other sites

On 5/6/2020 at 8:23 PM, HeartlessSeph said:

Now, after installing the necessary programs, download the tools from here and extract it to a folder. Decompress your FE10Data.cms file and then drag it onto Extract.bat. After this is done, a xlsx file named "FE10 Data Table" will be created. Open that file in the program of your choice and edit away.

So, how long is this supposed to take to actually make a datatable? I've been letting it go for a while and as far as I can tell it still hasn't finished.

Edited by JarheadHME
Link to comment
Share on other sites

27 minutes ago, HeartlessSeph said:

Likely because Emulators can just ignore the errors that pop up. I didn't test much on this so I didn't get a chance to see if it would crash if you kept going in. I'm going to re-do the script for that part and see if that prevents any errors from popping up on the emulator. If it does, it should then work on console too.

What I don't understand is, when I add a skill to a character, why it doesnt run. Is there a way to fix that? Also, thank you for the information!

Link to comment
Share on other sites

42 minutes ago, lightcosmo said:

What I don't understand is, when I add a skill to a character, why it doesnt run. Is there a way to fix that? Also, thank you for the information!

Unfortunately, this is extracting the entire file and rebuilding it that way. Hence, if one part of the file is built in a way that would throw an error, rebuilding it would always throw that error. I'm in the process of fixing it now and hopefully it will work correctly after. Sorry for the inconvenience there.

 

Just now, lightcosmo said:

What does the EXP tab do? If im assuming right, it affects EXP gains mode pending? 

I'm not entirely sure. I had either zero'd it out or FF'd it (don't remember now) and it cause EXP gain to always be 1. If you want to mess around with the values and document the changes after I fix the editor I would be willing to update that section to have labels.

Link to comment
Share on other sites

9 minutes ago, HeartlessSeph said:

Unfortunately, this is extracting the entire file and rebuilding it that way. Hence, if one part of the file is built in a way that would throw an error, rebuilding it would always throw that error. I'm in the process of fixing it now and hopefully it will work correctly after. Sorry for the inconvenience there.

 

I'm not entirely sure. I had either zero'd it out or FF'd it (don't remember now) and it cause EXP gain to always be 1. If you want to mess around with the values and document the changes after I fix the editor I would be willing to update that section to have labels.

No, dont apologise at all! I really appreciate the detail in to why it's not working! 

Well, the detail you put into this is amazing, but if I could help at all, I would like to!

Link to comment
Share on other sites

I'm getting an error when trying to rebuild it into a cms. I've changed two weapon ranks, I gave Ike A rank axes, and Micaiah D rank Dark magic. Everything else was entirely unchanged, I sorted the String List thing A-Z. The only other thing of note was Excel made me format the cell at Text since otherwise it was trying to make it a formula.

Am getting this error when doing it:

Traceback (most recent call last):
  File "Rebuild FE10 cms from Excel Table.py", line 1257, in <module>
    f.write(int_to_bytes(PersonWepRankPointer,4))
  File "Rebuild FE10 cms from Excel Table.py", line 609, in int_to_bytes
    if n > 0:
TypeError: '>' not supported between instances of 'NoneType' and 'int'

 

Link to comment
Share on other sites

4 hours ago, lightcosmo said:

No, dont apologise at all! I really appreciate the detail in to why it's not working! 

Well, the detail you put into this is amazing, but if I could help at all, I would like to!

So I updated the scripts to properly support the skill table. You'll actually see the unkSkillTable sheet isn't there anymore, because it's not unknown anymore! My hunch was right too in that fixing that table made the error messages go away when running the game so it should be able to work on a real Wii now. Give it a shot.

 

3 hours ago, JarheadHME said:

I'm getting an error when trying to rebuild it into a cms. I've changed two weapon ranks, I gave Ike A rank axes, and Micaiah D rank Dark magic. Everything else was entirely unchanged, I sorted the String List thing A-Z. The only other thing of note was Excel made me format the cell at Text since otherwise it was trying to make it a formula.

Am getting this error when doing it:


Traceback (most recent call last):
  File "Rebuild FE10 cms from Excel Table.py", line 1257, in <module>
    f.write(int_to_bytes(PersonWepRankPointer,4))
  File "Rebuild FE10 cms from Excel Table.py", line 609, in int_to_bytes
    if n > 0:
TypeError: '>' not supported between instances of 'NoneType' and 'int'

 

Believe it or not, the weapon ranks are strings, so if the weapon ranks set you are attempting to put onto a character does not exist in the base game, you'll have to copy and paste that to the end of the string list. I don't think having duplicate values would affect anything but I'm unsure. I'll probably be doing a video tutorial on using these scripts at some point.

Edited by HeartlessSeph
Gave wrong information. Duplicate removal is only in the Data table building process.
Link to comment
Share on other sites

Hm, I added it to the strings list and upon trying to start a new game, it crashes while trying to start it.

Exact steps:

  1. Decompress FE10Data.cms
  2. Extract FE10Data.cms.decompressed
  3. Open FE10 Data Table.xlsx in MS Excel
  4. Format Micaiah weapon ranks to be text only
  5. Change Micaiah weapon ranks from:  "---------D--" to "---------DD-"
  6. Add the second block above to String List, sort String List A-Z, save file
  7. Run new xlsx file through Rebuild.bat
  8. Recompress new FE10Data.cms file
  9. Rename and replace game file FE10Data.cms file with new edited one
  10. Launch game, create new file
  11. Game should crash right after fading to black after making the new save file.

At least mine does, hopefully I'm not insane and just doing something really small and dumb or something.

 

Okay, I think I'm probably doing something wrong. Just tried again with something simple like just increasing a weapon's Mt, still crashed upon trying to load. (In dolphin btw)

Edited by JarheadHME
Link to comment
Share on other sites

I thought the people in this thread may be interested. Thanks to the knowledge posted over the years here, I have finished my quarantine project: a complete randomizer for FE10. I posted it on reddit here. I learned quite a bit of various things regarding hacking FE10, so I may also be of some assistance regarding questions in this thread.

Also, @HeartlessSeph, the stuff you posted recently is amazing and I really wish I had it when I was doing this project!

Link to comment
Share on other sites

On 5/9/2020 at 1:29 PM, LordMewtwo73 said:

I thought the people in this thread may be interested. Thanks to the knowledge posted over the years here, I have finished my quarantine project: a complete randomizer for FE10. I posted it on reddit here. I learned quite a bit of various things regarding hacking FE10, so I may also be of some assistance regarding questions in this thread.

Also, @HeartlessSeph, the stuff you posted recently is amazing and I really wish I had it when I was doing this project!

Awesome stuff! I remember someone was working on a randomizer before but it wasn't 100%. Was that you?

The crashing with the updated script has me stumped at the moment. The only other thing I can think of is Pointer Region 1. Am I correct in stating that Pointer Region 1 is simply a list of pointers in the data region? Because with that logic, my file is coming up with a hell of a lot less pointers than the base game's region. Finding the culprit in that region will suck since there's so many to go through but I'll see if I can do it.

 

EDIT: I seem to have found the issue. I have a whole bunch of pointers missing because some of what I wrote off as padding in the Character and Class blocks are actually data related to Laguz it seems. I'll look through it and update the table. I won't post an update again until the crashes stop though.

Edited by HeartlessSeph
Link to comment
Share on other sites

So, after looking through it quite a bit, I actually found the source of the crashes according to Dolphin. When the game error comes up, it says there's an invalid read from 0x31599. This actually originates from the Chapter Data Section since I didn't realize some of the unknown integers are actually pointers. The data that is causing an invalid read is actually the chapter win condition which is being pointed to a random part of the file. You can actually see the improper pointer in the chapter data sheet yourself. Right now it should say 202137 under unk[4] which equates to 31599 in hex. This would bring you to a pointer that states to route the map.

This makes me think that all the unk's there can potentially be pointers so I'll just write the file to be as such other than in areas where it's obviously not pointers. I'll see if I can get around to this tomorrow and run some tests. 

Link to comment
Share on other sites

Hm, that's kinda strange. The randomizer also gets an invalid read error from somewhere when starting up, though we mostly narrowed down where it was, though I don't know if that error's been fixed yet.

If you need some help with testing I'm available, it sounds like you've got it mostly covered but just in case.

Link to comment
Share on other sites

9 hours ago, JarheadHME said:

Hm, that's kinda strange. The randomizer also gets an invalid read error from somewhere when starting up, though we mostly narrowed down where it was, though I don't know if that error's been fixed yet.

If you need some help with testing I'm available, it sounds like you've got it mostly covered but just in case.

I actually would need help with testing. My "testing" mostly comes down to opening up Chapter 1 and seeing if my edits worked so any help is appreciated.

Got most of the Chapter Data mapped out so once I get home I'll be able to fix it. If there's still errors after fixing this section I'll honestly be dumbfounded. Hopefully that wont be the case though.

Link to comment
Share on other sites

After some issues, since I work with mac and parallels desktop simulator, I got a working Excel sheet. Tomorrow I'll be restarting my old reverse Recruitment project ^^. Let's see if it does not get stuck on 1-6. =D

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...