Home › Forums › Destiny of an Emperor › New DOAE Enhancement: Equip All Officers in One Session
- This topic has 7 replies, 3 voices, and was last updated 3 weeks, 2 days ago by
MiDKnighT.
-
AuthorPosts
-
March 1, 2026 at 6:33 pm #55869
MiDKnighT
ModeratorWhen I was watching videos of Yuan Shao playthroughs on youtube I noticed that players are spending a ton of time in the item menu juggling around items and equipping officers. This is because in the original game you could only equip one guy then have to tear down all menus and start over. A very cumbersome process and probably the biggest issue with the original game.
What I wanted to do was be able to equip all officers in one “session”. How to do this? To allow the left arrow to go back to the previous menu instead of tearing down all menus. So with this enhancement you click to the root menu, then click item. From there with this enhancement you can freely go between the “General” <–> “Item” <–> “Equip” menus as many times as you want to in one session.
It sounds easy but this was an EXTREMELY DIFFICULT enhancement. Why? Because the original game was not designed to do this. They just had a “tear down all menus” function when you were done equipping an item or dropping an item or whatever. It took me a week with the help of A.I. to do this enhancement. I had to create functionality in the game that didn’t previously exist. Not easy when you’re trying to use the existing engine doing things it wasn’t designed to do. Why didn’t the original developers do this? Probably due to time and ROM space. It took a lot of coding to do this. Code that the original ROM didn’t really have room for.
Here are the gory details (A.I. summary included):
http://doaerhguide.wikidot.com/destiny-of-an-emperor-rom-hacking-guide-page-2#toc46
One note about A.I. with 6502 assembly & DOAE. It was not as helpful as I thought it would be. Sure it had some good ideas and I have to credit it with helping to design the EDGE engine (the edge engine keeps the game taking in multiple LEFT inputs if you held down the left arrow for longer than a very short time). One highly annoying thing about A.I. and 6502 assembly is that it will give you code suggestions with broken branches and jumps constantly. Both grok and chatgpt did this. Any code suggestion I had to be very careful for it not to break other stuff. The A.I. seemed to be happy to offer suggestions that would trash the functionality you had already created… I treat A.I. like having an assembly coder to bounce ideas off of but not to be trusted with code blocks. If you’re expecting A.I. to just be able to write DOAE enhancements for you… Don’t… You still have to know your way around 6502 assembly to make it work.
March 2, 2026 at 6:35 am #55870MiDKnighT
ModeratorI could see a couple of evolutions to this enhancement.
1. Currently the RIGHT arrow acts just like the LEFT. It goes back to the previous menu. This should be a fairly easy change but I was thinkign RIGHT could emulate the A button. Ie…go to the next menu.
2. This one would be A LOT harder. But I was thinking of putting the number of items in your pack next to the names here:

So you know who’s pack is full before trying to give them an item.
March 2, 2026 at 6:49 pm #55871Xian Zhu Xuande
ParticipantSounds very cool. The menuing in DoaE is probably one of the game’s rough edges for some folks coming in, even if people do eventually figure out how to fly through them.
LLM code generation has been such a mixed bag. I’m honestly a bit surprised you were able to get that much out of it for ROM editing, given there are some real novel aspects involved in what you described.
I find it can work wonders when you tell it specifically what to do and how to do it, or tell it some specific details about what to fix or how something should be changed. But “vibe coding” as folks call it—seems really rough around the edges to me. It’s been great for making some one-off non-production tools, though.
March 2, 2026 at 10:00 pm #55872MiDKnighT
ModeratorHey long time no chat.
Ya this enhancement has been on my radar for a long time but it was a daunting task to do. Years ago Ludmeister and I came up with this enhancement which allowed you to equip all the items for 1 officer:
http://doaerhguide.wikidot.com/destiny-of-an-emperor-rom-hacking-guide-page-2#toc45
But what I always wanted to do was what was done here. Even with a very experienced 6502 assembly modder (ludmeister) we struggled with it. With A.I. readily available I thought that would be what would get me over the hump. I overestimated how much help I would get from A.I. for sure. What I thought would take a couple of days took a week. I was shocked at how many times it gave me code revisions that were either flat out wrong, full of errors, or would keep breaking stuff. I even told it to check all the branches before giving me any code and it would still screw it up lol. I’d say the biggest benefit of A.I. was giving me some ideas that I hadn’t thought of before. Like edge detection which was actually really important or the game would interpret you hitting the left arrow as left left left left left. Apparantly all NES games have some kind of edge detection for the controller inputs.
I should probably update the guide and mention that this is an expanded ROM only feature. There’s simply no room to do this in the original ROM. The system page on the original ROM (page 0F) is jam packed with stuff. It’s actually impressive how much the original developers were able to squeeze into that one 16k page. But…apparantly not enough room for a good menu system like its counterpart Final Fantasy 1 had. I always wished DOAE could have a menu / item system like FF1. This solution is still not THAT good but it’s certainly better than what was in the original game where you had to tear down all the menus after doing anything. With this enhancement I figure players could do more of the fun stuff and less of the cumbersome menu/item swapping/equipping.
March 3, 2026 at 11:44 pm #55873MiDKnighT
ModeratorPart 2 is done. Now RIGHT arrow will move the menu forward (between General–>Item–>Equip). Now you can use the LEFT and RIGHT arrows to freely navigate forwards and backwards between those 3 menus. I also fixed the timing as the previous LEFT was a bit jumpy. I have a cooldown timer of 02 which acts similar to the existing in game menus. 1 was too jumpy and 3 was too slow. There’s a balance between speed and jumpiness. Now it is acting more like a real DOAE menu.
Updated the same section of the wiki:
http://doaerhguide.wikidot.com/destiny-of-an-emperor-rom-hacking-guide-page-2#toc46Of course I thought this would take about an hour to do since the game already supported going forward in the menus with the A button (the RIGHT arrow mimics the A button). But of course there are always unforseen complications, stack problems, etc… so this took a good chunk of one day.
The next “quality of life” enhancement I’d like to do is update the general menus in the weapon shop, merchant shop, and “general” menu I just updated to list the number of items in each officer’s “pack” after their name like “Liu Bei (5)”. That way if you are buying an item or passing an item you know exactly who has room in their pack for it. This was also an annoying part of the original game where you’d often get “so and so can’t carry anymore” when trying to buy an item or something. With this change that won’t happen. I expect this to be harder than the RIGHT arrow functionality but not as hard as the LEFT arrow functionality (I hope).
All 3 of these enhancements will go into Yuan Shao’s Revenge 3.08 whenever that happens. I’ve also offered up these changes to Boneduke for “King Wu of Wei” in case he wants to get his hands dirty with DOAE modding again.
March 5, 2026 at 2:25 pm #55874MiDKnighT
ModeratorFinished this one. Another “quality of life” enhancement. One annoying thing about the original game was when you’d go to buy an item or pass an item and it would tell you “Liu Bei cannot carry anymore”. Now you can see how many items are in your pack before your buy anything or if you are passing items back and forth:
.webp)
More details here:
http://doaerhguide.wikidot.com/destiny-of-an-emperor-rom-hacking-guide-page-2#toc47April 8, 2026 at 12:21 pm #55884AirJei
ParticipantThis is a major breakthrough, very important. Thank you for bringing new features that make the game more fun.
April 27, 2026 at 9:12 am #55888MiDKnighT
ModeratorSo I have 3 “quality of life” enhancements from this.
1. Fixing the clunky menu to make it easier to equip multiple items/officers
http://doaerhguide.wikidot.com/destiny-of-an-emperor-rom-hacking-guide-page-2#toc582. Display pack size/space on the screen.
http://doaerhguide.wikidot.com/destiny-of-an-emperor-rom-hacking-guide-page-2#toc593. Adding a “grace period” so that you don’t enter a battle one step after the last battle.
http://doaerhguide.wikidot.com/start#toc58Idea for a 4th is to fix the cave thing where you can fight in chapter 1 then gullwing to a chapter 8 cave and fight chapter 1 enemies. I’ll look into this. I’m thinking that when you warp into a cave it should set the “chapter for battles” variable to the same as the area the warp is coming from. I’ll see how feasible this is.
-
AuthorPosts
- You must be logged in to reply to this topic.

