Building off of this topic, I’ve put together a doc on all the functions and procs relating to the branched promotion screen. Includes ASM dumps, inline comments, and names for functions. Please feel free to contribute/add/point out any inaccuracies!
I have no idea what this topic will achieve but it has to do with branched promos, so I’ll drop a heart. Good job.
So, progress is happening. The text is still bugged, but the menu and actual act of promotion has been mostly worked out. I’ll look into how the strings are stored/loaded in the text functions, as I think the issue is with the description strings and not the class names.
Note that the “display unarmed sprites at promotion screen” patch is necessary if any of the promotion options don’t use the weapon type that the unit is currently equipped with, otherwise it crashes when it tries to load the sprite.
I’ve used hardcoded values for this, but interesting to note that the values for which options to display get overwritten/pushed out of scope by the time the actual selected promotion gets saved, so I had to hack in the same hardcoded list in two separate places. Given that the game already hardcodes the third promo options for trainee classes I don’t think it’s too big a deal.
I’ll upload my source code when it’s done, it’s thankfully fairly simple to add new classes to the eligibility list.
So if you can tone this down to an easier method than whatever you’re doing currently (Provided you’re actually working a bit more than an average hacker would like), would it be possible to make certain choices show up depending on the seal you use ingame (Let’s say I turn the Heaven Seal, which is just a dummy item anyways, into a Reclass seal, and have only it display the options above)?
I’ve fixed the text issue by repointing where the proc saves/loads class descriptions - there happened to be exactly 0xA free slots right near the end of the proc storage perfect for this. As it’s now working as intended, here’s the source:
You can install it directly with EA or include the main event file in your existing buildfile. I’ve documented my source ASM so it should be fairly simple to edit which classes are eligible and what promotion options they get.
@Attila - I don’t plan on working on something like that for my own purposes, but that’s certainly possible and you’re free to use my code as a base. The routine already checks the unit’s current equipment (for loading battle sprites) so I’m sure there’s a way to build off that concept from within the branch promo screen rather than having to add external ASM. You’d just need to modify the BranchPromoEligibility ASM file to check against items held (stored in r9) or item used (not sure off the top of my head whether that’s still in the inventory at the time of drawing the promo screen) rather than against the unit’s current class.
To do full reclassing you’d also need to overwrite the data pulled from the class’s default promotion options if the reclass seal is present, but that’s pretty simple with the NewBranchPromoEligibility ASM file in my repo, just back up all the offsets in that file by 2 bytes. You’d need to find a different way to read in the promoteable class options since my method only holds 3 classes, probably just by reading from a .pool at the end.