[FE9] Character Editor and Randomizer


#1

So i used the time between exams and the new semester to give a crack at making an FE9 randomizer. What i ended up with was a Character Editor/Randomizer for Windows. I haven’t actually done a complete test run yet, but I’m posting it here now for 2 reasons: The semester started, and i hit some brick walls i would like to ask for some help with.

It takes a (now both PAL and US) FE9 root folder, that can be extracted with GCTool (remember to mark “Also extract header, apploader, DOL, and TOC”). All the decompressing/recompressing of relevant files is handled automatically with a modified version of Nintenlord’s compressor, including automatic recompressing if you exit without saving with the X button. Then GCrebuilder can be used to rebuild the ISO.
I’ve done what i can in the way of hint tooltips and ensuring people don’t break anything.

Character editing features:

  • Bases
  • Growths
  • Weapon ranks — What weapons you can actually use is class based though
  • Level
  • Class — Automatically changes the textures to class defaults
  • Textures
  • Portrait
  • Build and Weight
  • Weapons and Items — Only replacing, no adding
  • Skills — Only replacing, no adding
  • Enemy growths — Applied globally to anything not on the playable characters list actually

I also made a randomizer section with:

  • Bases
  • Growths
  • Class

The randomizer creates a log with the changed values in it, as well as one with only the growths for avoiding spoilers.

Bases and Growths both swap Str and Mag so the higher one matches the class’s weapon type.

Class randomizing has some nuances: A character’s highest weaponrank is applied to the new class’s primary weapon, and the last item in their inventory becomes an Iron weapon for their new class. Laguz classes are handled by counting 1 laguz level = 2 beorc levels, and weapon ranks are assigned by level too. Laguz have a Laguz Stone as their starting weapon (i tested, it works).
For now Ike is forced to become a flying unit so that he can recruit Marcia and Jill.

As for the features i would like to make but need some help with:

  • Allowing more items in starting inventories. Just putting the items in the dispos entries is not reflected in game, seems like everyone’s number of weapons/items is hardcoded somewhere.
  • Allowing more skills than in vanilla. Same as above, just putting them in the empty slots is not reflected in game.
  • Moving Marcia and Jill. I found so many nicely named and ordered function names in the Scripts folder, but i can’t figure out where they are called :frowning:

If you want to try it it’s in my Onedrive public folder. You need the whole “FE9 Character Editor and Randomizer” folder: https://1drv.ms/f/s!AsfU3qRjcTTdhi8Mglgc0qgyEr-C

Source code on Github: https://github.com/jespoketheepic/FE9-Character-Editor-and-Randomizer


#2

Yesterday: “An FE9 randomizer would be too complicated. It can’t be done.”
Today: “Ok well fuck me I guess it can.”


#3

Bless you for this chief
Also, I’m assuming this is the case for all laguz classes but I can’t say for sure. Ike randomized into a Hawk and lost his beak weapon after the prologue.


#4

Oh, that is the part where the Trainer sword gets replaced with an Iron Sword, hadn’t thought of that. Others should be fine i think?


#5

Wow, this is impressive stuff. I was looking into doing this next for Yune, but it seems I was beaten to the punch on this. It’s good to know that it is possible to do. (In theory, FE10 should be somewhat similar, right?) Nice work!

Also, I was wondering if you’d like to help me out with getting this supported in Yune. It’d save me a lot of time seeing as you already put in the work to get things working. If you have any reference docs, that would be a lot of help too.


#6

Ended up spending way longer than it could have on support for the US version, but it should work now. Also fixed a ton of small things.


#7

With the new semester starting i won’t have the time/motivation for this kind of thing again for a while. But i should probably get around to writing documentation about all of this, and put the source code up on github.


#8

I’m running it at the point at the root folder being put into the software. But it’s been loading for quiet a bit. It says “Compressor running.give it a minute…” I think it’s been around 15 minutes, is this normal?


#9

Are you on not-Windows? I forgot to put in the post that the compressor is a bottleneck that’s limiting it to Windows, so your error would be what happens in that case.


#10

I am on Windows 7.


#11

This is nice, it’s refreshing to see some non-GBA games get some attention.


#12

The “give it a minute” is pretty literal. The application should open a command window where it spews its progress and exceptions, what does that say?


#13

Sounds good. I have some experience with messing around with FE9 a while back, and I think I got stuck around the same part you did, namely, expanding skill counts. I’m surprised to learn that changing a character’s class does work without issue though, because I surely thought either the game would soft lock trying to play an unknown animation for a model or you’d get some nightmarish blend of the wrong texture slapped on the wrong model. But any documentation you might have would definitely help. I actually referenced your FE4 randomizer a few times to see how you handled some specific cases as well.

I work on Yune in my spare time, so it’s not too much time I have either to work on it (only after work or on weekends usually). So I’m generally pretty slow, not to mention I’ll be doing preliminary research as well.

But my initial thought when doing FE9 was to hopefully not rely on any external tool. Ideally, it would be most natural to load a single file like we do with most other games. In theory, ISOs aren’t encrypted or anything, so you could directly change the ISO without any bad side effects until you start needing to move files around or change the length of files. Of course, theory can be very far removed from practical in some cases. :slight_smile:

I’ll probably start working on FE9 after I finish up the final bits of Random Recruitment on GBAFE and the last randomization options for FE4, but I’ll probably be looking into general processing for ISOs first before I do anything specifically with FE9.


#14

Changing class is definitely the most involved thing going on here. The game is actually really good at not crashing (it once ran pretty fine despite me forgetting to recompress system.cmp!), but it’s also quick to display everyone as textureless black Rangers. The key is that a character’s class in system.cmp has to match with the one in the dispos.cmp of the chapter where the character joins in, specifically in the dispos.c section of the file which is not always the first. Then the textures have to match the class.
It was made enormously much easier by the fact that increasing the size of the .cmp files doesn’t seem to cause any problems at all, at least not on the scale i have been working.


#15

My rebuilt ISO freezes/whitescreens after the prologue cutscene, any advice?

Unmodified ISO works just fine.


#16

Would it be possible to change the name ID’s for each character as well? So If I wanted to change a portrait I could change the name to match?


#17

Can you send me the your system.cmp and \zmap\bmap01\dispos.cmp? Then i can look if there is an issue there.


#18

Hey can someone here help me with the FE9 Randomizer? I need to rebuild the ISO but i keep getting an error saying “Folder ‘&&systemdata’ not found”

When I choose my root folder


#20

#21

When you extract the ISO using GCTool, check “Also extract header, apploader, DOL, and TOC”