Jump to content

FE10: Radiant Dawn Hacking Notes


VincentASM
 Share

Recommended Posts

On 9/3/2020 at 5:23 PM, 1234567890num said:

A decompressed FE10Data has the same file format as a .bin. I explained that file format a few posts above. The important thing in your case is making sure that all the pointers in the data between the skill you add and the skill you remove are properly listed in the Pointer List.

Thank you for the explanation on how the file format worked. I removed 2 skills from Ena and added 2 skills to Eddie. I had to shift all the blocks in between the edited sections and had to manually recalculate all the pointers in the section (mentioned in Step 3 of your guide).

I got many errors at first, but suddenly recalled to use compression LZ77 Type 10 instead of Type 11. Then it worked swimmingly.

eddie.thumb.jpg.2614755a834541a0bf00df06cf158ed8.jpg

10 hours ago, HeartlessSeph said:

In FE10Data? Yeah, I made a python script for it a while back but it requires Excel and I think a specific version of Python. It's not the most elegant solution but it did work. But I don't think simply removing from one character and adding to another would work depending what got shifted around.

Heya, your 010 template was a tremendous help. I was about to learn and make it myself until I spotted it a few pages back. Thanks.

 

2 hours ago, 1234567890num said:

@LordMewtwo73 How did you make Ashera killable without Ragnell? Would it be possible to make it so that either Ike or Micaiah can kill her? Or so that anyone can?

 

I would've assumed ashera has a skill that prevents everyone but Ike from dealing the finishing blow... in either her character block or her class block. However, after taking a look, I do not spot any skill that would indicate such an effect.

-SID_FINALBOSS          -SID_MANTLE             -SID_MIDDLE (no idea)          -SID_HIGHEST (indicate final class tier)

I did spot SID_IMMORTAL in the entire pool of skill strings. I guess you can try renaming/replacing it with a useless skill and see if it works.

 

 

Edited by FiveOVER
add reply
Link to comment
Share on other sites

  • Replies 614
  • Created
  • Last Reply

Top Posters In This Topic

There's SID_IMMORTAL and SID_INVINCIBILITY. They're in her unit block in zmap407e. Seems like the former is the one tied with Ike/Ragnell and the latter is the one tied with the auras.

I guess I could remove the SID_IMMORTAL to let anyone kill her (haven't tried it yet), but that still leaves the question about how to make both Ike and Micaiah be able to kill her.

E: that didn't work

Also, does anyone know how to guarantee Lehran's recruitment (remove his requirements)?

Edited by 1234567890num
Link to comment
Share on other sites

3 hours ago, 1234567890num said:

@LordMewtwo73 How did you make Ashera killable without Ragnell? Would it be possible to make it so that either Ike or Micaiah can kill her? Or so that anyone can?

In DATA\files\Scripts\C0407e.cmb, there is a pointer to IID_RAGNELL. Somewhere in that script, the game checks to see if the attacker is using Ragnell, and if so, Ashera dies for reals. I didn't look much into how the script works, because script files are a pretty complicated mess. Instead, I changed IID_RAGNELL to PID_IKE , then zeroed out the functions "UnitSearchItem" and "UnitGetEquipWepI", which are found directly after IID_RAGNELL. I couldn't really tell you why it worked, I just know that it did.

IID_RAGNELL is found at 0x0b4c

Link to comment
Share on other sites

Mucked around the zmap files a bit and I found out about the unit data. Taking from VincentASM's example on the first page (and based on Wooster's analysis on the fifth page),

Quote

0F A0 - Unit ID used within the zmap file.
18 - Availability, with first digit being (1: Forced, 0: Optional) and second digit determining if the position is fixed (don't know how it works exactly). You also need to disable the forced deployment & fixed position in the Script file to actually disable them.
4C - Unknown
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, formatted in Start X, Start Y, End X, End Y. X=0 is the leftmost column while Y=0 is the top row.
01 Starting Lv. The game uses the higher one out of this and the Starting Lv in FE10data.
00 Unit Color (0: Blue, 1: Red, 2: Green, 3: Yellow)
00 Starting transformation gauge.
... (13/D unknown bytes, maybe related to autoleveling?)
00 00 04 63 Pointer -> invalid - Affinity? Most people have it as "invalid". I guess most people's affinities are defined by FE10data and the ones here are the exception.
00 00 03 49 Pointer -> IID_LIGHT - First weapon
... (The bytes after affinity are item pointers, 7 of them. The first usable weapon is the one equipped, but otherwise order doesn't matter)
00 00 03 1B Pointer -> IID_HERB - First item
... (The bytes after items are skill pointers, 5 of them. The capacity cost isn't waived. Mostly used on skills that suddenly appear/disappear, like Volug's locked Wildheart, the Feral Ones' permanent transformation, and Ashera's invincibility & immortality)
00 00 04 1D Pointer -> SEQ_NOATTACK - AI? I have no idea where exactly they store the AI codes
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? Still haven't seen any other MTYPE
00 00 04 35 Pointer -> SEQ_NOMOVE - What, another one?

These units are divided into groups. The most common zmap groups are mikata (PC), teki (default enemies), zoen (reinforcements), midori (green units), and ki (yellow units). For mikata, all of these are unimportant except one: Starting and ending XY co-ordinates. Remember that the first byte in a group's definition (more details here) shows how many units are in that particular group.

So, if you want to add deployment slots/enemies/yellow soldiers, here's what you have to do:

  1. Grab the appropriate zmap file
  2. Find the group definition and modify the first byte to reflect the number of units you want it to be
  3. Add 68 hex bytes for each unit within that group. You can put it anywhere in that group as long as it's not within the other unit's data.
  4. Repoint ALL the pointers in the Unit Data since you're moving all the strings in the object list. If you see above, there are at least 8 for each unit so...yeah.
  5. Repoint SOME of the pointers in the Pointer List and Group List. At least for this one you don't have to deal with pointers toward data before your new unit.
  6. Adding whatever data you want for the new unit. If you only want to add deployment slots, you can just copy paste another ally unit's data wholesale, changing only the XY coordinates.
  7. Making sure the new pointers are all properly documented on the Pointer List
  8. Making sure the headers are all correct

As you can see, it's a lot of work. However, I made a script that can do step 2-5 for you, so the work isn't THAT much. The link also has a similar script that you can use for similar file types (mess, shopitem, decompress FE10data) but it's less automatic.

PS: Tower deployment map is emap0407d, not bmap0407a.

An unrelated note: @LordMewtwo73 Did you figure out how to make Mercy equippable to others?

Edited by 1234567890num
Link to comment
Share on other sites

16 hours ago, 1234567890num said:

Mucked around the zmap files a bit and I found out about the unit data. Taking from VincentASM's example on the first page (and based on Wooster's analysis on the fifth page),

These units are divided into groups. The most common zmap groups are mikata (PC), teki (default enemies), zoen (reinforcements), midori (green units), and ki (yellow units). For mikata, all of these are unimportant except one: Starting and ending XY co-ordinates. Remember that the first byte in a group's definition (more details here) shows how many units are in that particular group.

So, if you want to add deployment slots/enemies/yellow soldiers, here's what you have to do:

  1. Grab the appropriate zmap file
  2. Find the group definition and modify the first byte to reflect the number of units you want it to be
  3. Add 68 hex bytes for each unit within that group. You can put it anywhere in that group as long as it's not within the other unit's data.
  4. Repoint ALL the pointers in the Unit Data since you're moving all the strings in the object list. If you see above, there are at least 8 for each unit so...yeah.
  5. Repoint SOME of the pointers in the Pointer List and Group List. At least for this one you don't have to deal with pointers toward data before your new unit.
  6. Adding whatever data you want for the new unit. If you only want to add deployment slots, you can just copy paste another ally unit's data wholesale, changing only the XY coordinates.
  7. Making sure the new pointers are all properly documented on the Pointer List
  8. Making sure the headers are all correct

As you can see, it's a lot of work. However, I made a script that can do step 2-5 for you, so the work isn't THAT much. The link also has a similar script that you can use for similar file types (mess, shopitem, decompress FE10data) but it's less automatic.

PS: Tower deployment map is emap0407d, not bmap0407a.

An unrelated note: @LordMewtwo73 Did you figure out how to make Mercy equippable to others?

I haven't really tested it out, but in the skill section of FE10 Data, some skills have SID Tables under them that have some attributes listed. For SID_MERCY, the attributes are listed as follows:

 

1 - SID_MERCY

0- SFXC_HUMAN

0- PID_ERINCIA

 

My assumption is that removing the attribute that shows PID_ERINCIA should allow it to be equipped on all units though I haven't actually tested it myself.

 

EDIT:

Turns out I was right. Removed 0-PID_ERINCIA and it allowed me to equip the skill to Micaiah. I recorded it to show here: https://streamable.com/speg73

Edited by HeartlessSeph
Updating after testing. Did not want to double post.
Link to comment
Share on other sites

12 hours ago, HeartlessSeph said:

I haven't really tested it out, but in the skill section of FE10 Data, some skills have SID Tables under them that have some attributes listed. For SID_MERCY, the attributes are listed as follows:

 

1 - SID_MERCY

0- SFXC_HUMAN

0- PID_ERINCIA

 

My assumption is that removing the attribute that shows PID_ERINCIA should allow it to be equipped on all units though I haven't actually tested it myself.

 

EDIT:

Turns out I was right. Removed 0-PID_ERINCIA and it allowed me to equip the skill to Micaiah. I recorded it to show here: https://streamable.com/speg73

What exactly did you do? I removed that and now nobody can equip it, not even Elincia.

On 9/6/2020 at 9:39 PM, LordMewtwo73 said:

In DATA\files\Scripts\C0407e.cmb, there is a pointer to IID_RAGNELL. Somewhere in that script, the game checks to see if the attacker is using Ragnell, and if so, Ashera dies for reals. I didn't look much into how the script works, because script files are a pretty complicated mess. Instead, I changed IID_RAGNELL to PID_IKE , then zeroed out the functions "UnitSearchItem" and "UnitGetEquipWepI", which are found directly after IID_RAGNELL. I couldn't really tell you why it worked, I just know that it did.

IID_RAGNELL is found at 0x0b4c

I couldn't figure out how to bypass the Ragnell & Ike check entirely, so I ended up just copying the part of the function after the check (where Ashera dies for real) into the part of the function where Ashera revives and nullifying the function's bytes that comes after that. Skips all the Ashera-killing fanfare, but it works well enough.

Edited by 1234567890num
Link to comment
Share on other sites

14 hours ago, 1234567890num said:

What exactly did you do? I removed that and now nobody can equip it, not even Elincia.

I couldn't figure out how to bypass the Ragnell & Ike check entirely, so I ended up just copying the part of the function after the check (where Ashera dies for real) into the part of the function where Ashera revives and nullifying the function's bytes that comes after that. Skips all the Ashera-killing fanfare, but it works well enough.

I used my Excel data tools. Trying to manually repoint all of the skill data after removing that entry is more headache than it's worth. Doing it in Excel is as simple as deleting the entry out and then rebuilding.

 

On another note, I'm surprised that this game uses so many of its icons. If you're expanding the Item table, you technically only have 2 slots available to add icons (254 & 255) before you have to go and replace other icons. I kinda wish there were some code wizards like FEGBA has that could expand the code to allow for more icons to be used. As of right now, it's only 1 byte so 256 is the max amount of icons.

Edited by HeartlessSeph
Link to comment
Share on other sites

10 hours ago, HeartlessSeph said:

I used my Excel data tools. Trying to manually repoint all of the skill data after removing that entry is more headache than it's worth. Doing it in Excel is as simple as deleting the entry out and then rebuilding.

 

On another note, I'm surprised that this game uses so many of its icons. If you're expanding the Item table, you technically only have 2 slots available to add icons (254 & 255) before you have to go and replace other icons. I kinda wish there were some code wizards like FEGBA has that could expand the code to allow for more icons to be used. As of right now, it's only 1 byte so 256 is the max amount of icons.

Yeah, it works. I also figured out that the "SIDTables" are actually mandatory requirement to equipping the skills with the 00/01 being Must/Mustn't respectively (like mustn't have the skill already equipped, must a dragon, etc). "SFXCTables" are similar but they're optional; only one of them are needed to fulfill the requirement.

Regarding your FE10Data editor, I do have some comments. First of all, for some reason some of the support type tables have a value of 65280-ish. In PersonData your unk1 is the starting Lv (although the game chooses the higher one within this and the corresponding zmap file) and the basemov doesn't work. In JobData your unk1 and unk3 are Armor weight and Mount weight respectively (which can also be negative).

In ChapterData the Chapter#s determine the used BGM+Shop files, Mess file, and Script file respectively. Your Loss Conditions (Maniac) all have the number 1. There's also Win Condition 3 and Loss Condition 5 for each difficulty that isn't used (and you skipped as padding) since there's only 6 lines available and the texts will overlap if you put in too many. Finally, within your 8 bytes of "unknowns", the 1st byte is the Map ID (which brings you to the Debug Map if tampered) and the 6th byte is the group you're following in order from 0-5: Dawn Brigade, Crimean Knights, Greil Mercenaries, Laguz Alliance (Crimea + Greil), Everyone (Dawn + Crimea + Greil).

How did you decode the Japanese texts in Python?

Edited by 1234567890num
Link to comment
Share on other sites

5 hours ago, 1234567890num said:

Yeah, it works. I also figured out that the "SIDTables" are actually mandatory requirement to equipping the skills with the 00/01 being Must/Mustn't respectively (like mustn't have the skill already equipped, must a dragon, etc). "SFXCTables" are similar but they're optional; only one of them are needed to fulfill the requirement.

Regarding your FE10Data editor, I do have some comments. First of all, for some reason some of the support type tables have a value of 65280-ish. In PersonData your unk1 is the starting Lv (although the game chooses the higher one within this and the corresponding zmap file) and the basemov doesn't work. In JobData your unk1 and unk3 are Armor weight and Mount weight respectively (which can also be negative).

In ChapterData the Chapter#s determine the used BGM+Shop files, Mess file, and Script file respectively. Your Loss Conditions (Maniac) all have the number 1. There's also Win Condition 3 and Loss Condition 5 for each difficulty that isn't used (and you skipped as padding) since there's only 6 lines available and the texts will overlap if you put in too many. Finally, within your 8 bytes of "unknowns", the 1st byte is the Map ID (which brings you to the Debug Map if tampered) and the 6th byte is the group you're following in order from 0-5: Dawn Brigade, Crimean Knights, Greil Mercenaries, Laguz Alliance (Crimea + Greil), Everyone (Dawn + Crimea + Greil).

How did you decode the Japanese texts in Python?

Thanks for the info, I'll make the adjustments to the tables. Support probably has values like that because I have it reading as two bytes when it's probably two separate one byte values. I can fix that pretty easily.

I didnt really make it read the Japanese text. I just had it write the bytes as is to Excel which would output the Japanese text once done. I assume if you had a system which could not read japanese that it would not display correctly.

Link to comment
Share on other sites

On 9/9/2020 at 6:12 PM, HeartlessSeph said:

I didnt really make it read the Japanese text. I just had it write the bytes as is to Excel which would output the Japanese text once done. I assume if you had a system which could not read japanese that it would not display correctly.

Turns out the problem was that the new file wasn't in the encoding that supports Japanese texts. I guess xlsxwriter takes care of that problem automatically.

I found out a bit more about your FE10Data Editor. In your Biorhythm Data, compared to the data in the first post of this thread: the numbers in your Hidden Item% are actually the Skill Activation%, the numbers in your unk[4] are actually Hidden Item%, while the numbers in your Skill Activation% are actually unknown.

Also, back in Chapter Data,

On 9/9/2020 at 12:28 PM, 1234567890num said:

Finally, within your 8 bytes of "unknowns", the 6th byte is the group you're following in order from 0-5: Dawn Brigade, Crimean Knights, Greil Mercenaries, Laguz Alliance (Crimea + Greil), Everyone (Dawn + Crimea + Greil).

I was half-correct; the 6th byte is the group's BEXP stash. I also found out that the 7th byte is the group's Convoy from 0-6 (0 is No Convoy, the rest follows the same order as the BEXP stash). The 8th byte is the mounted units' Mov addition (on indoor maps they're set to FE, which is -2); you can use this to add Mov, but the final Mov are all still capped at 20.

I don't know how to change groups (as in actual units), but I'm pretty sure it's not in ChapterData or Scripts.

Edited by 1234567890num
Link to comment
Share on other sites

  • 4 weeks later...

Would any of you happen to know how to do these things?
Make skills locked.
Change skill activation %.
Change map affinity.
Alter bonus exp from objectives.
Bring up the base screen on maps that don't have it like the prologue.
Remove + stats on weapons like Ragnell.
Change promotion stat gains.
Alter the exp formula.
Alter win and lose conditions.
A way to move units between parties. Or a way to combine parties.

I have not modded the game in around a year or two. I am trying to get back into it though. Is there an easier way these days? Before it was just nightmare modules and HxD editing.

Link to comment
Share on other sites

On 10/9/2020 at 2:48 PM, GoForBroke said:

Would any of you happen to know how to do these things?
Change skill activation %.
Alter bonus exp from objectives.
Bring up the base screen on maps that don't have it like the prologue.
Alter the exp formula.
Alter win and lose conditions.
A way to move units between parties. Or a way to combine parties.

I have not modded the game in around a year or two. I am trying to get back into it though. Is there an easier way these days? Before it was just nightmare modules and HxD editing.

The ones still listed above are unknowns for now. As for the rest, all of them are editable on decompressed FE10Data. You can either use HxD or use Heartless Seph's tool here.

Locking the skills should entail changing the number of SID and SFXC table entries in SkillData into 0, but I haven't test this.

Edited by 1234567890num
Link to comment
Share on other sites

@1234567890num Thank you for the reply. Also does Heartless Seph's tool let me edit the mounted unit move that is subtracted on indoor maps? That was another thing I was trying to do . But I don't know if it is in map data or FE10data. Thank you for the Python scripts. I had wanted to add additional enemies to some maps. Is the zmap script the best way to add bytes if I wanted to add an item or character that wasn't already listed in the map data in? Before I would just replace existing pids or iids. If I wanted to add items to the shop would free bytes others be the best for that?

@HeartlessSeph Thank you for the post on page 17 on this thread with the editor. Seeing the data in an excel spreadsheet instead of having to open each individual nightmare module was heartwarming. It also made me learn to import Python modules with pip. If I add a skill to the characters or classes through the excel method do I have to repoint things in HxD? I've had problems trying to add pointers to existing items in the zmap files before. So I try to do what I can to avoid repointing pointers. 

Link to comment
Share on other sites

My zmap scripts add 104 bytes (68 in hex), which is the data for each unit. It does not add any data regarding that new unit or the string/object list. So if you want to add them, you should do some repointing (or use my other script). In conclusion: use zmap scripts to free up some spaces for new units before using other script/manually adding new bytes for the new pid/iid.

Yes, free bytes others is the better way to add things to shop.

HeartlessSeph's tool does not require any extra pointing. It does rebuild stuff from scratch and may change the order of the data. No big deal for normal play, but if you want to make a patch it can bloat the patch size.

Mounted unit's Mov penalty is in FE10Data. Particularly the ChapterData. However, last I checked it's not shown on the program, so check my post above for details.

 

Edited by 1234567890num
Link to comment
Share on other sites

  • 3 weeks later...
On 8/20/2020 at 12:15 AM, 1234567890num said:

You can also change Florete's properties by hacking FE10Data based on the item section on the first post. The weapon type at min/max range is wrong, though; it should be the weapon rank type needed and the actual type of damage done. If you wanna make florete ignore the magical weapon triangles, you could probably change it to whatever weapon type White Breath is.

Yes. I tried this and it worked. Breath is considered "neutral". Changing the pointer from "sword" to this will make it deal magic damage.

Also your link doesn't seem to work. (The link of the script you made)

Edited by afterburner
Link to comment
Share on other sites

On 5/24/2020 at 12:34 AM, HeartlessSeph said:

I just winged it and wrote the bytes for that whole section without any pattern or anything. So far, I'm about 25% of the way through the re-writing Excel table to file for FE10Battle.cms. It's going a lot quicker than the initial script since I have a base now and none of the tables have any variance in their sizes. It should be finished by Monday most likely.

5 months ago I wrote that I would do this but stopped working on it. Finally got around to finishing it (I think). It's the same link as the FE10Data tools but I'll post again just in case: https://www.dropbox.com/s/5y5zudoop2ykw9p/FE10GameData Tools.7z?dl=0

Anyone willing can test can download it and mess around with it. It works the same way too. I mainly made it to mess with the Weapon Section that lets you load up models and effects for Weapons. It's how I added Gurgurant in. Not sure what else can be expanded or how most of the data connects. I haven't tested it myself as of yet so I apologize if there are any errors.

Link to comment
Share on other sites

  • 2 months later...
7 hours ago, HeartlessSeph said:

I'm going to post an update to my tools to make them more user friendly. And by that I mean actually compile them into an exe. What should I name the program?

This sounds great! The name is your choice, as the developer! 

Link to comment
Share on other sites

16 hours ago, lightcosmo said:

This sounds great! The name is your choice, as the developer! 

Tellius Tools maybe? I wanted to extend mod support to Path of Radiance at some point too.

 

Going to be looking into how the cmb files are done pretty soon. Got some newfound knowledge from modding another game so hopefully I can crack it this time.

Link to comment
Share on other sites

1 hour ago, HeartlessSeph said:

Tellius Tools maybe? I wanted to extend mod support to Path of Radiance at some point too.

 

Going to be looking into how the cmb files are done pretty soon. Got some newfound knowledge from modding another game so hopefully I can crack it this time.

Well, the name is ultimately up to you, but looking into cmb files sounds interesting! 

Link to comment
Share on other sites

4 hours ago, HeartlessSeph said:

Tellius Tools maybe? I wanted to extend mod support to Path of Radiance at some point too.

Maybe Ashera Editor? It's not as clear as Tellius Tools, though.

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...