Home › Forums › Destiny of an Emperor › Destiny of an Emperor RH Guide ( MOVED! to http://doaerhguide.wikidot.com )
Tagged: Battles, Destiny of an Editor, Destiny of an Emperor, Destiny of an Emperor hacking, Destiny of an Emperor Mods, Destiny of an Emperor Rom, DoaE rom, DoaE Rom hacking, FCEUX, Feidian, Graphics, hacking DoaE, Map, NES ROM hacking, nes8 template, Portraits, ROM Hacking, ROM hacking information
- This topic has 985 replies, 17 voices, and was last updated 2 years, 9 months ago by
MiDKnighT.
-
AuthorPosts
-
July 20, 2012 at 8:37 pm #40123
MiDKnighT
ModeratorOuch, could be a bug. I'll investigate in the near future… :)
July 20, 2012 at 11:42 pm #40125sonic.penguin
ModeratorCan we anticipate a new upcoming mod?
July 21, 2012 at 12:27 am #40127sonic.penguin
Moderatorawesome, hope you find some useful info. Lots of respectable stuff hanging around here :finger:
July 21, 2012 at 4:07 am #40128MiDKnighT
ModeratorNice, another Destiny lover. Best game eva. Welcome home!
July 21, 2012 at 6:38 pm #40130sonic.penguin
Moderatoractually, you can reach levels like 51/52/53/54 but eventually things start wrapping around and get quite goofy. If you go much over 65000 HP things get weird too
July 22, 2012 at 5:10 pm #40132sonic.penguin
ModeratorThis is the info we currently have on DAMAGE and WEAPONS:
Without going into too much detail, the amount of damage you will do will mainly depend on your STR and A.P. However, there is some randomization that occurs when you hit. See this post:
Now pick a random number between 0 and 255, and if the number is greater than or equal to 240 (F0), this is an excellent blow, so damage potential is 51. Otherwise, pick a random number between 0 and 15, and use this number to extract the damage potential from an array. The end resulting damage potential will be one of the following:
51 = 1 in 16 chance, excellent blow. Otherwise, damage potential is one of the following 3 values:
20 = 2 in 16 chance
23 = 6 in 16 chance
25 = 8 in 16 chance
These values live at 0x39948:
14 17 17 17 19 19 19 19 19 19 19 19 17 17 17 14
If you change these values you are changing the randomization of how random your normal attacks are (yours and the enemies). For example if you changed one of those 19's to a 1 and a normal attack will sometimes barely touch the opponent. Or change to an FF and occasionally a normal attack will result in brutal damage. But that's not what we would want to do…we would rather change the critical hits. With that said…
To change critical hit chances and damage there are 3 checks in the code to see if our random value is above F0 which means we got a critical hit. They are at:
00:AC19:A6 7C LDX $007C = #$4F
00:AC1B:A9 00 LDA #$00
00:AC1D:A4 7A LDY $007A = #$01
00:AC1F:F0 02 BEQ $AC23
00:AC21:A9 02 LDA #$02
00:AC23:E0 F0 CPX #$F0 <
Check whether to make "critical hit" sound00:9847:A5 7C LDA $007C = #$62
00:9849:C9 F0 CMP #$F0 <
Check whether to do "critical hit" damage00:9920:A5 7C LDA $007C = #$B4
00:9922:C9 F0 CMP #$F0 <
Check to see if "critical hit" text is usedIn the ROM:
0x3AC33: E0 F0 <– for the sound
0x39859: C9 F0 <– for the damage
0x39932: C9 F0 <– for the text
And we have the "how bad will a critical hit hurt value":
00:984D:A9 33 LDA #$33
Default is 33 (51). This value is stored in:
0x3984D: A9 33
So if we were to make a critical hit twice as likely and make it hurt twice as bad we would make the following changes:
0x3AC33: E0 E1
0x39859: C9 E1
0x39932: C9 E1
0x3985D: A9 66
Note that lowering the first 3 values from F0 to E1 increases the critical hit chances.
Just for testing purposes if you set the first 3 to 00 and the last one to FF then every hit will be a brutal critical hit.
— Weapon Damage
Credit: Meteorstrike and James
12 = ( NONE )
25 = Dagger
38 = Flail
56 = Ax
84 = Club
128 = Spear
192 = Sabre
435 = Trident
289 = Bow
655 = Sword
1024 = Battleax
1280 = Scimitar
768 = Crossbow
1536 = Lance
1792 = Wan Sheng
1792 = Bo Ye
2048 = Qing Guang
2048 = Nu Long
2048 = Qing Long
4096 = Halberd
http://www.gamefaqs.com/boards/563402-destiny-of-an-emperor/44112071
The low byte values for these are stored starting at 0x3E710 and the high byte values are stored starting at 0x3E724.
Changing the A.P. strength of weapons displayed in a general's profile:
38609 -> 00 0A 0F 14 1E 32 46
Dagger
Flail
Ax
Club
Spear
Sabre
38610 -> 64 50 78 8C 96 82 AA BE BE F0 F0 F0 FA
Trident
Bow
Sword
Battleax
Scimitar
Crossbow
Lance
Bo Ye
Wan Sheng
Qing Guang
Nu Long
Qing Long
Halberd
Change that FA at the end to FF and the Halberd displays an attack power of 255.
Change the BE BE to F0 F0 and all the magical swords have a displayed attack power of 240.
July 23, 2012 at 6:19 pm #40134MiDKnighT
ModeratorQuote:Hey, just thought I'd put this out here. I used a cheat code to gain max levels quickly and seen how the values are being used, I figured telling what order their used would make it easier to see what's happening.Anyways let's say you have 20,18,16,14,12 for soldier growth values. From levels 1-20 it uses the first value of 20, it uses it twice, then at 21 it uses the 2nd value 18, then at 31 it uses the 3rd value 16, at 41 it uses the 4th value 14, and then completely omits the final value.
So basically it uses the first value twice then proceeds from where it should starting at the 2nd value until the last one which is the 4th, omitting the final value because all levels will have been reached by then.
Just thought I would put this here as It might help somebody knowing it does this. See ya around.
Did some digging on this. Here's the main code in play:
Level Up:
00:B471:B9 A8 60 LDA $60A8,Y @ $6151 = #$00 <– Get general ID
00:B474:A8 TAY
00:B475:A9 07 LDA #$07
00:B477:20 C8 E3 JSR $E3C8 <– Gets level progression using general ID.
…
00:E3DA:B1 F3 LDA ($F3),Y @ $B90D = #$8A <– Guan Yu's level progression value
…
00:B47A:30 2C BMI $B4A8 <– Go to B4A8
00:B4A8:29 7F AND #$7F <– For Guan Yu converted 8A to 0A
00:B4AA:A8 TAY
…
…
…
00:B500:86 25 STX $0025 = #$0F
00:B502:B9 50 B5 LDA $B550,Y @ $B55A = #$24 <– Read level up value
I trade it leveling up to level 12 and it was still using the first value. I'll have to trade at a higher level to see how/when it uses a bigger number.
July 27, 2012 at 12:35 am #40140MiDKnighT
ModeratorAdded "Duel", "Protect", and Enhanced An Sha to IPS patch 1.2.
July 29, 2012 at 5:21 pm #40144Lord Yuan Shu
KeymasterWe ever figure out how to find / edit other villagers in other towns?
I know I was able to find every villager in the first village (Lou Sang), which was nice because I was able to switch in a playable character for a random villager to recruit them. It would be nice to be able to keep doing that sort of thing throughout the game, but I couldn't for the life of me find the data for the other villagers.
Welcome to Lord Yuan Shu Walkthrough Guides ·
Huo Hu's Adventure started Destiny of an Emperor hackingJuly 29, 2012 at 5:53 pm #40145MiDKnighT
ModeratorQuote:We ever figure out how to find / edit other villagers in other towns?Sure…but the trick is you have to find their starting address and position then search the ROM for that address. But that can be tough since they tend to move around… Remember this that I was playing with for a Gongsun Zan mod?

I had switched a town person in Xu Zhou for Liu Bei and put him in front of the castle for a forced recruit.
July 29, 2012 at 6:32 pm #40146Lord Yuan Shu
KeymasterAwesome, yea I do remember you doing that now.
Should be somewhat easy to find the starting address of the villagers, since they re-appear back in their original spots no matter what building you go in.
So the code for their opening position is all in a row (not like the items / battles where it is a sequence of 1st part of the location (ie battle #1 position 1, battle #2 position 2, etc)?
Welcome to Lord Yuan Shu Walkthrough Guides ·
Huo Hu's Adventure started Destiny of an Emperor hackingJuly 29, 2012 at 7:23 pm #40147MiDKnighT
ModeratorQuote:So the code for their opening position is all in a row (not like the items / battles where it is a sequence of 1st part of the location (ie battle #1 position 1, battle #2 position 2, etc)?It reads just like the map coordinates at $60-$63 with one exception. There's a bit that says whether they are walking around or standing and facing a certain direction.
For example, the Xu Zhou guy that I switched to Liu Bei…his address is at 0x31AA6. His location address is: 03 08 1D 01. That "1" in the 3rd value tells him to walk around. If I look at Song Ren. His address is at 0x31AC4: 04 18 8A 18. The "8" in the 3rd value tells him to stand still facing up.
July 29, 2012 at 7:50 pm #40148sonic.penguin
ModeratorActually, I started a sort of list that I never finished but have used it frequently when changing town sprites as I am loading the Flames of Wu mod with more townspeople being recruitable instead of the random-encounter we are used to. Here is what I have, we have Lousang and Xuzhou already so I didn't put those in. These are what I have gleaned so far, there might be some holes and some 'close' addresses actually affect people in huts/houses, but its a start to finding what you need
LuoSang –
XuZhou –
QingZhou – 31A51-31A73
DaXing – 31A34-31A4F
TieMenXia – 31A07-31A32
SiShuiGate – 319BA-31A05
HuLaoGuan – 31996-319B8
????? 31931-3196D
????? 3190D-3192F
LuoYang1 –
LuoYang2 –
YangZhou – 318B6-3190B
ChangAn – 318B6-3190B
Yuan – 3187B-318B4
HuaiNan – 31857-31879
ChenCang – 31847-31855
NanYang – 3180C-31845
BoHai – 317D8-3180A
Chang –
GuangZong – 317A1-317CC
JiZhou – 3177D-3179F
ChangSha – 31742-3177B
GuiYang – 3170E-31740
LingLing – 316E1-3170C
WuLing – 316B6-316DF
LuoFengPo –
FuShui –
Luo –
MianZhuGuan –
ChengDu –
JianAn – 315C3-315EC
HuiJi –
Wu –
PoYang –
JinDu –
JianYe –
GuangLing –
HeFei –
RuNan –
ChenLiu –
Chen –
July 29, 2012 at 8:14 pm #40149MiDKnighT
ModeratorSweet Sonic, this should go in the guide.
July 29, 2012 at 9:56 pm #40150Lord Yuan Shu
KeymasterAh, this is great news, I'll have to check it out.
Welcome to Lord Yuan Shu Walkthrough Guides ·
Huo Hu's Adventure started Destiny of an Emperor hacking -
AuthorPosts
- You must be logged in to reply to this topic.

