This video is me taking a break from gameplay to talk about the 50 Generals I usuallly recruit for one reason or another. I will give you some of my thoughts on them and why I might.
Officers. Quicklisting (All).Heroes of ChinaMain characters and non-player characters of Destiny of an Emperor (in order of appearance).
Portraits & SpritesPortraits for DoaE are stored in 48×48 bitmaps made up of 4 colors. When displayed in the game, these colors are black, skin color, brown, and whatever background color is chosen for the character. When the DoaE graphics engine loads the portraits in, it loads them in 8×48 slices like so:.(images from CayJay)These slices are indexed with values 00-FF.
That means in the original game there is a max of 255 'slices'. There are about 30 completely unique characters (180 or so slices) and about 70 slices used for generic characters.When loading a new portrait into the game, there are some rules:. The portraits must be 48×48 pixels. The portraits must be 4 colors. However, these aren't the 4 colors you see in the game, they are:BLACK (0,0,0)GREEN (99,207,97)BLUE (57,51,255)WHITE (220,255,255)The parenthesis show the exact RGB color mapping.
Also note that 'WHITE' becomes whatever background color you choose for the character in DoaEditor.If you're looking for portrait backgrounds sonic penguin has provided a bmp with different portrait backgrounds to use for original portraits: Loading Portraits With FeidianCredit: MiDKnighT and NiahakSoftware used (for me):- Php –- Feidian –- nes8 template – Download tiles.rar- Infranview –- Nana –- MS Paint- Destiny of an Editor (DoaE tool)Put feidian in the Php folder and extract nes8 from tiles.rar and stick it in the Phptiles folder. Also put the rom in the Php folder for simplicity.OK so here's what we do next.1. Find the tiles in the rom.
You can use Nana to do this. Open the rom with nana at a dos prompt like 'nana destiny.nes' and look at the tiles by pressing 't' and change to NES format by pressing the number 3 for NES tiles. To see the portraits right you have to use the 'Command Prompt). Syntax is:Code:cd php feidian.php -cr nes8,6,128,0×008810 doae.nes outputnes8 = template6 = # of tiles wide128 = number of lines0×008810 = starting addressdoae.nes = romoutput = bmp output fileOnce you run this you should have an output file that is basically a bitmap. If you open it up in paint you should see the portraits clearly in a blue/green/black/white state.
It should look like this:3. Now you'll want to pull portraits from another Rom. DoaE2 is the easiest Use nana to find the starting addresses for the portrats in DoaE2 but I found some already at:0x100xSo the syntax would be. Php feidian.php -cr nes8,6,128,0×10 doae2e.nes d2Now you'll have a d2 bmp file.4. The problem with DoaE2 portraits is that the colors are swapped. So if you try to directly use a DoaE2 portrait and put it in DoaE1 it won't look right. To fix this we can use Infranview to swap colors.
Edit the palette on your DoaE2 bmp and switch the colors. The skin color of your characters should be green.
The colors (specifically) should be:0 0 0 black97 207 99 green57 51 255 blue220 255 255 whitishNow save your bmp.Original DoaE2 colors:Fixed colors (change green to white, blue to green, white to blue, and black to black (right color codes):5. Open your DoaE1 bmp and your DoaE2 bmp in paint. Zoom in on both.
Cut your portrait from your DoaE2 bmp and paste it exactly over the DoaE1 portrait you are replacing. So for example you would cut DoaE2 Ji Ling and put him on top of DoaE1 Pang Tong.6.
Save your DoaE1 bmp after doing this (don't do save as, just save). For example here's how my 1st bmp looked for the Yuan Shao mod:(Note that I painstakingly added backgrounds to some of the portraits in MS Paint using some of the DoaE1 original backgrounds).7. Now you can load your bmp back into the rom with feidian. Php feidian.php -ci nes8,6,128,0×008810 output.bmp doae.nesNote: If your portraits in the ROM look garbled after this it means that somehow during your process your bmp ended up in the wrong format. It needs to be the exact same format as the one you unloaded (DPI, resolution, colors, etc)8. Open Destiny of an Editor and change your general to the portrait you replaced. In this example it would be Pang Tong.
It will look like Pang Tong in the tool but in the game it will be your new pic.You're done!. If you want to use pics from other games, it can be trickier. Other NES games are fairly easy like ROTK1. You'll just have to pull the portraits out (either via screenshot or feidian) and change the colors to the blue/green/white/black format using the color codes I provided before by editing the palette in Infranview. If the pic has more than 4 colors (pretty much all SNES portraits do) you'll have to 'Diffuse' down to 4 colors in Infranview.
This could really mess up the pic if it's a SNES portrait or more complicated portrait because it uses more colors. However, you could always touch it up with MS Paint.If you want to test and see how your portrait will look in the game (with a white background), edit the palette in Infranview and replace the colors with this:green = 252 213 156black = 0 0 0white = 253 253 250blue = 256 108 80It's not exact but close enough If you want to see how it would look with a different color background change white to whatever background color.Example from Yuan Shao mod with a white background: (ooh pretty)(NOTE: Don't save the bmp with these colors. The game won't recognize them)Then export this palette for later reference.Also note that anything that is white will use the background color you use in the DoaE tool. So if their eyes are white and you change the background color to purple their eyes will be purple (not good). To fix this either leave the background white or fill in the white colors in the portrait (besides the background). New Portraits Banks for Up to 340 Unique PortraitsCredit: MiDKnighT.TO EXPAND YOUR ROM:Use the latest version of 'Destiny of an Editor' to expand your ROM (preferred method).Now you have a 1MB ROM.
This allows us to add more portraits and other stuff!More info about ROM expansion can be found in this thread:Nowa little about how the portrait system works. A portrait is made up of 6 horizontal slices. Each slice is indexed from 00 to FF and they are stored in 2 banks in the ROM at 0×8810 and 0xC810. The reason we could never have more than 255 slices before was because of this two character index system. In order to have MORE portraits we need a 2nd pointer, a place to put our new slices, and new code in the game to allow it to use our new banks.USING NEW PORTRAIT BANKS:You can use 'Destiny of an Editor' to add new portrait banks while expanding your ROM and assign the portraits to generals (preferred).
The 2nd pointer. Each general has a little 'profile' if you will in the ROM. I'm going to borrow an old post from Niahak to show this:Officer structure notes (from various sources, as well as DoaEd code)STRINTRegionSpriteSprite color (AP as enemy)DP as enemySoldiers (Enemy)Soldiers (Ally)TacticsAGIportrait 1portrait 2portrait 3portrait 4portrait 5portrait 6portrait BG (single-color BG only)unknown. 00:8330:85 15 STA $0015 = #$0F00:8332:84 25 STY $0025 = #$0F00:8334:A0 11 LDY #$1100:8336:B1 F3 LDA ($F3),Y @ $B8F9 = #$3600:8338:C9 F1 CMP #$F100:833A:90 04 BCC $834000:833C:E9 E0 SBC #$E100:833E:85 F1 STA $00F1 = #$0200:8340:A5 15 LDA $0015 = #$0F00:8342:10 06 BPL $8:49 80 EOR #$8000:8346:E6 F1 INC $00F1 = #$0200:8348:85 15 STA $0015 = #$0F00:834A:A4 25 LDY $0025 = #$0F00:834C:4C DA CF JMP $CFDAEssentially it has to figure out where to look in the ROM for the slice based on what the index number is and if that new bit is set.3. Loading your portraits!
Of course my preferred method is feidian. The two existing banks you'd load at 0×8810 and 0xC810.
Note that any slice at hex:80 or above will go to page 2.The new banks you can load into will be at:0x40810 (F1)0x44810 (F1 – 2nd page)0x48810 (F3)0x4C810 (F3 – 2nd page)0x50810 (F5)0x54810 (F5 – 2nd page)0x58810 (F7)0x5C810 (F7 – 2nd page)0x60810 (F9)0x64810 (F9 – 2nd page)0x68810 (FB)0x6C810 (FB – 2nd page)0x70810 (FD)0x74810 (FD – 2nd page)Note: If you want to do the expanded sprites section below then don't use page FDAnd with these new banks you can load 128 rows for each page (the first page has slices 00-7F, the 2nd page has slices 80-FF). Example commands which would load up banks F1 and F3: Using Php and Feidian to Properly Inject PortraitsCredit: sonic.penguinA common error when using php and feidian is getting the 'Php is not an internal or external command' error message. This is one of the most technical aspects of DOAE Mod editing and often one of the most frustrating, yet also one of the most rewarding once you get it correct!
These are step-by-step instructions that will help you to get new portraits into your DOAE mod once you have 'Php' folder with Feidian installed properly into it.1. Copy your php with feidian folder into C:2. Open the command prompt using. C:UsersOwnercdphpC:Phpphp feidian.php,—————————————————————————.
FEIDIAN: The Freaking Easy, Indispensible, Dot-Image formAt coNverter Version 0.90a (C)Derrick Sobodash 2003,2004 `—————————————————————————'C:Phpphp feidian.php -ci nes8,6,128,0x40810,pictures1.bmp DOAE.nesInjecting 8×8 into DOAE.nesConverting bitmap to bitplaneInjecting new bitplane dataDOAE.nes was updated!4. Assigning a portrait to a general. Destiny of an Editor now allows you to pick your portrait bank with an expanded ROM! Loading New Sprite Banks for Up to 210 Sprites (Expanded ROM)Credit: MiDKnighTFollow these instructions to add 126 new sprite slots for a grand total of 210 sprites in the game.
Likely more than you will ever need.You can use 'Destiny of an Editor' to expand your ROM and add new sprite slots (preferred) or1. Add the following hex code to these locations for the new slots.
Php feidian.php -ci nes8,1,1008,0×70090 newsprites1.bmp YuanShaoDoaE.nesYou can put 42 sprites on each ROM page.3. Assigning your new sprite to a general. The current sprites available are 00-53.
If you have loaded pages 1C, 1D, and 1E with sprites then you can now use slots 54-D1. Changing Default Portrait Background ColorsCredit: MiDKnighTYou can change the portrait background colors in DoaEditor for a general but you are limited to these colors right?00=Black (no portrait)01=Light Blue02=Dark Blue03=Green04=Purple05=Gray06=Hot Pink07=Rust Orange08=Clown Barf (greenish-brown)09=WhiteWrong, you.can. change those colors These colors are set at 0x3D10E (or 0x7D10E and 0xFD10E in 1MB rom). 21 11 1A 14 00 15 17 18 20And you can use the NES pallettes to see these colors:Note that you can't change the '00 – No portrait color' but you can change all the others. Want to change 'hot pink' to gray? Easy, just change the '15' in the hex sequence above to '2D'.
Want to change 'clown barf' to an actual brown? Just change '18' to '08'.
Changing Sprite ColorsCredit: Meteorstrike and MiDKnighTThis is actually pretty easy. Just change line 0x3C610 (0x7C610 and 0xFC610 in a 1MB ROM) using the color palette below: TownsTown names can be changed by:1. Open the ROM in your hex editor.2. Load the doaetable.tbl from DoaEditor.3. Find the town names at 0x3FC90 (0x7FC90 and 0xFFC90 in a 1MB ROM)4. Change the town name as needed.
Be careful about spacing! Theotown bridges. The other town names have pointers to them and we don't want to move them. Changing Town ColorsCredit: MiDKnighTTown colors can be changed by playing with the pallettes at 0x3C665 to 0x3C66F (in a 1MB ROM 0x7C665-0x7C66F and 0xFC665-0xFC66F). Simply use the NES color palette to know the colors:Here I have changed all the values from 0x3C665 to 0x3C66F (in a 1MB ROM 0x7C665-0x7C66F and 0xFC665-0xFC66F) to '01' which is blue:Night has fallen upon Xu ZhouYou can also change the colors of the world map, forts, villages, etc All the palettes for these are in the 0x3C6## area (0x7C6## and 0xFC6## in a 1MB ROM).
See below World Map Color EditingCredit: sonic.penguinYou can edit the world map colors at the following addresses. Use the Palette to choose colors. Bear in mind that some tiles use the same colors, for example, grass spots and trees.World Map Color Edits (256 ROM):3C601-7C602 Grass Colors3C603- Tree Colors and Grass Spots3C605-7C607 Mountain Colors3C609-7C60B Hill Colors3C60D-7C60F Water ColorsWorld Map Color Edits (1Mb ROM):7C601-7C602 Grass Colors7C603- Tree Colors and Grass Spots7C605-7C607 Mountain Colors7C609-7C60B Hill Colors7C60D-7C60F Water Colors InnCredit: MidKnightThe cost of staying at the inn comes down the formula MULTIPLIER. # OF OFFICERS IN YOUR PARTY. The key to finding the multilier lies here. 0E:91B7:AC 11 60 LDY $6011 = #$020E:91BA:BE 11 60 LDX $6011,Y @ $6013 = #$7E0E:91BD:BD A2 91 LDA $91A2,X @ $9220 = #$01$6011 = Map hierarchy (02 = inside a building). It uses that value to pull the place ID which in this case is 7E (Xu Zhou).
Using that ID it looks at the data in $91A2 to $9221 to find the multiplier which is 0x391B2 to 0×39231 in the ROM. This explains why the prices are vastly different between Xu Zhou, who's multiplier is 01, and Jian Ye, who's multiplier is 0x40 (64). StoresCredit: Meteorstrike, James, and MiDKnighTWant to edit what the shop keeper sells? Want to edit the price? Sure First, you need to know the item codes.The list of items is on page 1.So want to edit the Chang An weapon store?
Here's an example of how to do itThe weapons for sale in Chang An are:FlailAxClubLeatherBandanaCapLooking up their item codes I have. 41 42 43 5B 68 69Searching for this string I find it on Line 0x390D0 in my hex editor.Simply change those values and you change the items. 0x38CA0: 010x38CA4: 90 VillagersCredit: Meteorstrike, sonic penguin, and MiDKnighTVillagers are defined at around 0×31### and 0×32###. LSRLSRLSRLSRWhich again chops the X1 value and gives us a value we can use to tell the villager how he is standing. 0x37560: 24241F1F1A2222241F1A1F22241F1A0AcontinuedYou can put up to 5.25 entries there (125). 00:B525:C0 64 CPY #$6400:B527:90 05 BCC $B52E00:B529:A9 FA LDA #$FA00:B52B:4C 42 B5 JMP $B54200:B52E:C0 4B CPY #$4B00:B530:90 05 BCC $B53700:B532:A9 C8 LDA #$C800:B534:4C 42 B5 JMP $B54200:B537:C0 32 CPY #$3200:B539:90 05 BCC $B54000:B53B:A9 96 LDA #$9600:B53D:4C 42 B5 JMP $B54200:B540:A9 64 LDA #$6400:B542:85 10 STA $0010 = #$0000:B544:4C 13 B5 JMP $B51300:B513:A9 0E LDA #$0E00:B515:20 82 C4 JSR $C482function to switch page to 0E00:B518:A5 10 LDA $0010 = #$C800:B51A:4C AF B4 JMP $B4AFLevel up code added. 00:B4D6:4C 0B B5 JMP $B50B00:B50B:A9 0D LDA #$0D00:B50D:20 82 C4 JSR $C482function to switch page to 0D00:B510:4C 00 B5 JMP $B50000:B500:86 25 STX $0025 = #$0F00:B502:B9 50 B5 LDA $B550,Y @ $B5AF = #$FF00:B505:AA TAX00:B506:4C 0B B5 JMP $B50B00:B50B:A9 0E LDA #$0E00:B50D:20 82 C4 JSR $C482function to switch page to 0E00:B510:8A TXA00:B511:A6 25 LDX $0025 = #$FF00:B513:4C D9 B4 JMP $B4D9 TP GainsCredit: MeteorstrikeFirst of all you must be learning a new tactic to gain tactical points.
And you have to have an officer in your party capable of learning the new tactic (INT must be high enough). With that said, here's a post to show the random TP gains:Now, as far as how many POINTS you gain for the TP, this is stored in a list of 16 entries, each which contains a number between 3 and 5.
A random entry in this table is chosen and its number is how many TP you gained.The table is located at 0x3B666 and contains the following values. 05 08 0a 0f 11 14 19 1eEver notice how you gained about 4x more experience points when you entered a new chapter?
It's because of the formula for calculating experience, which is based off of the above list. Each officer's/rebel force's experience value is determined separately.Soldiers. multiplier / 256 = experience awardedThe formula was arrived at via mathematics, not via code inspection, so it may be off, if ever so slightly. EventsEvents are things that happen in the game. For example when Liu Bei leaves and sits on the fancy chair. That is an event.
Or when they build a bridge south of Gui Yang. An event controls that too Events actually call to a specific part of the ROM to do something. For example, event 8822 is when Tao Qian asks you if you'd like to take over. Once you get into that event the code takes over and you lose Liu Bei The '8822' is jumping to a part of the code.
It's essentially '8822' flipped around where the first 2 represents the 3rd ROM section value (8 then 9 then A since the ROM part starts at $8000). So you can absolutely influence events by changing the numbers/letters but you have to know where we want to jump to. That's the tricky part. Event ListCredit: Xu Yuan and MiDKnighT. Event 0025 – Yuan Shu whining about Dong Zhuo.
Event 0221 – Dead. Event 0222 – Recruiting Song Yong and Song Ren. Event 0A28 –Villager telling you to go to the cave in the West. Event 1033 – Qing Long recieved! (Appears to work anywhere, just assure that the person you may give this event to has more than one line.) Note from sonic.penguin: You can actually use this to gain Qing Long after a battle. Event 1229 – Battle with Yuan Shang (same issue as before with Ma Yuanyi). Event 152F – Coming to the rescue of Shu?.
Event 1827 – Showing the Intro Letter to Sima Hui's servant. Event 182D – Saving Guan Yu from Wu? Or maybe its Zhang Fei? Trigger to report back to Liu Bei. Event 1A25 – Yuan Shao's Retreat at Luo Yang. Event 1D2F – Liu Bei's praising Guan Yu and Zhang Fei and talk about Swordsmith. Event 2023 – Recruiting Chen Deng.
Event 248E – From the one instance I experimented at the fellow seemed to sell only the Xuzhou items, maybe this changes depending on what Chapter Zone you are in? Worth more experimentation. Event 2D27 – Hearing of Pang Tong and Zhuge from Sima Hui. Event 2D31 – Swordsmith going on about his masterpiece and need for ore. Event 2E2C – Jingzhou is at peace, stop Yuan Shao. I thought you couldn't finish Jingzhou without defeating Yuan Shao?. Event 4134 – After being trounced by Sima Yi's Thunder.
(Event Trigger to get Guan Suo I believe.). Event 4325 – Dong Zhuo is dead message? (Not sure what this does or who normally says it. Liu Bei?. Event 4333 – Battling with Lu Meng. Event 482A – Zhuge Liang sleeping event. Appears to work nearly flawlessly, Zhuge Liang's sprite will appear where ever the X/Y ordinarily is supposed to.
Unfortunately he runs off to Gui Yang. Event 4923 – Battling Ma Yuanyi (Will bring up the Ma Yuanyi fight with Rebel Force's with unbeatable numbers if no battle is won after starting a new game.).
Event 4934 – Sima Yi trigger? I'm not entirely sure what this does. (Note from Boneduke: this one makes Runan appear on your Gullwing list in the original ROM. Unlike most other gullwing warps, Runan isnt given from just entering the city).
Event 4D27 – Yuan Shu trying to flee from his loss. If 'No' is selected, Yuan Shu joins Yuan Shao for another battle.
Event 4D2D – Someone tells party that Zhuge Liang has some info. For them. Event 4E28 – Xu Zhe's (Xu Shu's) Stalker moving from the bridge (what an odd plot device?). Event 5134 – Allows the bridge to be built south of Luo Yang and triggers rebuilt Luo Yang. Event 5824 – Meeting with Sun Ce.
Event 5829 – Level Up! Works perfectly.
Event 5991 – Inn, doesn't seem that you ever have enough money when used outside of a real inn. Odds are though that the cost can only go to 65,535 gold. So if you want to make a really expensive inn by all means. Event 642B – If you had lost to Zhao Fan the first time I believe? (Seems to always be an ambush though). Event 642D – How peculiar this is clear the actual 'Recruit Zhuge Liang' event but if an officer in an area were to join you anyway they join you instead. In fact testing this on Song Ren and Song Yong they can be recruited individually.
This may have potential. Event 651E -Saving seems to work fine and it appears that castles are designated by Zones it seems.
At least in LouSang when I tried to invite Liu Bei it had told me that it was Tao Qian's castle. Event 6792 – A supply station, it appears to work anywhere.
I guess that has a bit of potential. (Note from Boneduke: this is a Food vendor). Tharsis.
Event 6C34 – Sima Yi's death. Event 712E – Jingzhou finished trigger. Event 7224 – Yang Jin recruitment. Event 7825 – Mission Objective: Defeat Yuan Shu.
Event 7831 – Some Wu Officers running away saying they'll have the final victory. Event 7923 – Battling the Zhang Bros. (Seems to work perfectly, unsure of after events though.). Event 7B2D – Xu Zhe telling the party where to find Zhuge Liang. Event 8029 – Defeating Yuan Shao and Shu for the final time. Event 8525 – Returning to Liu Bei after defeating Dong Zhuo.
Event 8728 – Receive the Black Powder from Sima Hui. Event 8822 – Obtaining Xuzhou (May work in Castles?). Event 8B24 – Meeting with Cao Cao. Event 902E – Pang Tong becomes a battle. Event 9433 – Sun Quan's death event. Event 9931 – 'Tell Liu Bei that Wei has an Alliance with Wu'.
I'm not sure what that does. (Note from Boneduke: this is one of two events that must be triggered in order to progress the storyline from Chengdu to Wu in the original ROM.
The other is event 7831). Event 9D34 – Credits!. Event A12D – Zhang Fei gathering intelligence on Wu. Event A133 – Battle with Pirates. (Appears to work anywhere and unlike other 'forces' when called randomly these pirates have set amounts of Troops. (note from Boneduke: finishing this Pirate battle also grants a gullwing warp. I believe it is Jianan in the original ROM).
Event A429 – Being pointed towards the Ma's. Event A42E – News on Zhuge Jin visiting Liu Bei to say that Zhuge was home (start of the Zhuge chain). Event A624 – Chi Tu Ma Story. (For what it's worth this seems to work anywhere). Event B08E – Well it's clear the Merchant format but he continues to sell the Weapons from the value above. This doesn't make much sense all in all maybe it depends on the NPC you attached it to?. Event B327 – Buying the Silver Key (I think?) from the Merchant.
The 4000 Gold is still required. Event B726 – Finding out info. On the walls of Nan Yang. Event B72E – Pang Tong joins you (and likely cancels the encounter with him). Event B731 – I'm not sure who this belongs to. I'll paste the lines though and see if anyone recognizes them. You routed my men.
In all my years of war, I have never suffered such adefeat. I wouldbe honored tofight at your side if you'llhave me.EVENT-B731 My guess is either Wei Yan or Huang Zhong, but the text has been jumping around a bit recently, so I'm not too sure. Event BD30 – Liu Bei declaring himself Emperor. Event C523 – Han Zhong Bridge Event (Requires Han Zhong to activate). Event C533 – Recruiting Jiang Wei.
Just like the Zhuge recruitment this seems to be able to be used nearly anywhere. Event CA2A – Directing the player back to LouSang to find Zhuge Liang. (This does put Cui Zhouping in his home, wasn't there a theory that there were two sets for Lou Sang only because of Cui Zhouping or something?). Event CB28 – Receives Zhou Ltr, I wonder if it works on earlier Zhao Yun's found? (Note from Boneduke: No, I don't think it would - Zhao Yun has to be standing in the exact place he is in the original ROM when you offer him the letter, in order to trigger the proper response.
If you even move him one space in the same Place, the event no longer works. So I am sure it would not work if you tried to trigger it on a villager/officer in a different place - such as the Zhao Yun found earlier in the bar). Event CC26 – Intro letter given. (If you're going to give this to someone new, assure they have a secondary line so you're not given more than 1 Intro Letter if you speak with them again.).
Event CD92 – Outside billeting appears to work fine and I guess that has potential for swapping officers out on the fly. Event E516 – Zhao Yun's Recruitment Pledge. Event E628 – Having two bandits join you in a tunnel?. Event E62A – Cui Zhouping telling you he's already left. Event E724 – Wang Jin?.
Event E91C – Main recruit event. Event ED2E – If you ram into the door speech. Event EE2A – Zhao Fan having you rest. If accepted it is the same case as the Ma and Yuan battle scenario as displayed earlier.
Event F231 – Lu Bu's Demise. 0E:8BE4:A9 19 LDA #$19This instruction is found at 0x38bf4.
Silver Key PriceCredit: MiDKnighTI found where to change the Silver Key price.0x367D8: A9 A0 85 10 A9 0F 85 11The price is 4000 which in hex is FA0. So if I wanted to make the price say 12,000 which is 2EE0 in hex I would change it to:0x367D8: A9 E0 85 10 A9 2E 85 11Of course you'd need to change the text in DoaEditor but this is the amount it will take from you wallet when you purchase the key. Forced Officer Leave EventsCredit: MiDKnighTI’ve added 12 forced officer leave events. Here’s the main things to know about it:.
You add the event to the text. Example: “Lu Bu has been defeated, Song Yong ran home to his mommy.EVENT-A83FEND”.
This probably only works in the “after battle” text. 0x3ae2b:'A678 A900 9D1362' - 'A91E 2082C4 EAEA'0x7ae2b:a90e 2082c4 a678 e0ff d002 a200 a900 9d1362 4c1baeEffectively, this subroutine was zeroing out something concerning officer orders. It is officer before the one that canceled that is affected by this subroutine. Of course, when we cancel the leader's orders, we zero out the value corresponding to the member who goes before him in battle and that means 'ff' gets added to the pointer where party orders get stored ($6213). So '00' is placed in $6312, which happens to be the status byte for poor old Guo Si. You just toasted him.The new subroutine checks for the 'ff' value, and puts a '00' in there instead, thus saving Guo Si's life. I'd say he owes me now.
Keeping characters that leave (Liu Bei, Guan Yu, Zhang Fei, Lu Bu, Xu Shu)Credit: MiDKnighTTo keep Liu Bei from leaving your party, change. 00:AFA3:A9 00 LDA #$0000:AFA5:8D 9C 60 STA $609C = #$80. 0x39b26, 0x39b2a, 0x39b2e: Food use threshold0x39b26: e80x39b2a: 030x39b2e: 00String them together: 0003e8 (1000)Every (active) soldier in your army is counted, and that total is divided by this threshold. If the value is less than one, then it becomes one. This is the amount of food your army eats every step on the map. This value is only calculated after a battle. That's why your army doesn't eat after leaving the first village at the start of a game (until you fight a battle).Editing the display of food/cost in the merchant menu addresses:Original ROM Size.
21AB 0B Push start21E5 17 c Hiroshi Motomiya 19892225 12 c M and M Co. 19892265 0F c Shueisha 198922A2 1D Produced by Capcom Co., Ltd./22E6 13 Capcom U.S.A., Inc.2329 0B Licensed by2365 18 Nintendo of America Inc.The first two bytes above (like 21AB) are the values in the PPU table where the next line of text will begin to be stored.
Every line on the screen is 0×20 bytes long. These byte pairs aren't exactly an (X, Y) pair it's not that simple. Suffice it to say that most of you will want to write text on lines beginning with 21a0, 21e0, 2220, 2260, 22a0, 22e0, 2320, and 2360. The third byte (like 17) is much more understandable– it is how long the line is (23 characters).Once you have your text edited and looking pretty, DoaE begins to tell the story.
It wipes the screen and textual abnormalities happen. Well, there's another little place that tells DoaE how to wipe the screen after it's done showing the copyright info:This string that determines how the Title Screen is wiped is at 0x1d340 – 0x1d362. 21AB 4B 0A21E5 57 0AFF2225 52 0A2265 4F 0A22A2 5D 0AFF22E6 53 0A2329 4B 0A2365 58 0AFFFairly similar to how the Title Screen text is formatted above. The differences are that the length byte (#3) is OR'ed by 40 presumably used as a 'fill' function by the DoaE engine.
The fourth byte ends up being the 'fill character'. In this case, it is '0a', or a space.You can change the title colors for 'Destiny of an Emperor' by modifying values between 3C699-3C69B (7C699-7C69B in 1MB). You will need to refer to the color palette for color choices: Opening BiosCredit: MiDKnighTThe portraits for the opening bios are listed from 0x1D4C4-0x1D4D0. These are just a list of general IDs. They are listed in this order:Liu Bei – A8Guan Yu – A9Zhang Fei – AAZhang Jao – OCDong Zhuo – BBLu Bu – C0Yuan Shao – 26Yuan Shu – 1BZhao Yun – D7Ma Chao – B0Huang Zhong – 41Zhuge Liang – D5Pang Tong – 9DSimply change these general IDs to change the portraits displayed. The text is right after this section. To edit it use a hex editor and load the doaetable.tbl from DoaEditor.
Then (carefully) edit the text while preserving line breaks. The breaks are usually a function like 20####.Note that editing this is a major pain:) Starting LineupCredit: MiDKnighT and ludmeisterBy default you start with the characters Liu Bei (A8), Guan Yu (A9), and Zhang Fei (AA). This lineup is stored at 0×35558-0x3555A (A9 AA A8). Change these to different general IDs if you want a new starting lineup. Note that in the opening sequence the first character (in hex) will use color palette 1 (Guan Yu), the second character (in hex) will use palette 2 (Zhang Fei), and the third character (in hex) will use palette 0 (Liu Bei).Starting Equipment:Liu Bei: 0x3557CGuan Yu: 0x3556CZhang Fei: 0×35574Add 0x80 to the item ID to pre-equip it. But if you want the weapons pre-equipped your gonna have to add a bit of code to make that happen when the game starts.
You can do this with. 00:97C0:A9 0A LDA #$0A00:97C2:8D F8 61 STA $61F8 = #$0000:97C5:A9 01 LDA #$01. $60B4 - $60BA = Allies AC$60C0 - $60C6 = Allies Weapons$6100 - $6137 = Allies ItemsNote that Guan Yu is general 1, Zhang Fei is general 2, Liu Bei is general 3, the first general you recruit will be general 4, etc Changing MusicCredit: sonic penguin, Xhinaeria, and MeteorstrikeTo change the music of the game, simply replace the address with the hex values below. For example, the World Map music is located at address 3BF8F and has a value of 27. Code:“38″ - “60″For 0×8010-0x880f, go into FCEUX’s PPU with DoaE running, while your party is in the overworld, and copy 0×1000-0x17ff.
Paste those bytes directly into the DoaE ROM.Here’s a screenshot of just enough done of the new font to take care of the numbers: Dual Colored Font AND Status ScreenCredit: ludmeisterNOTE: Using this requires the above section on Dual Colored font to be implemented prior to adding this codeThis palette swap is essential so that you can read the title screen.:smirk.