Destiny of an Emperor: Hacking Battles

ROM Hacking: Change the Officers In Battles

You are here: [ Home –> Games –> Destiny of an Emperor –> Hacking Battles –> ROM Hacking ]

Presenting instructions on how to edit the Destiny of an Emperor ROM. Here we review how it is decided which officers appear in each battle and we explain how to edit those values to customize battles in any way you please. Combined with other edits and efforts you can completely revise the way in which each of Destiny of an Emperor’s battles are presented. Thanks for the location, Niahak!

Instructions and Warnings

Starting at line 30D70 of the Destiny of an Emperor ROM (as seen when opened with a hexadecimal editor) a reference for each battle in the game exists. Each reference consists of five hexadecimal pairs, and each pair represents an officer. By changing these values you can change the officer who appears in that battle. Please note that when adding a new officer to a battle that this officer will become recruitable in their region (defined with the other officer information in the ROM).

If you add an officer to multiple battles (e.g. you make Zhang Xun appear with Ji Ling and with Yuan Shu) they will only appear in the second battle if they have not been recruited. If they have been recruited, they will not appear in the second battle. There’s a catch, though: after the second battle a second copy of that officer will spawn in the fields and can be recruited, thus allowing the player to get two copies of a single officer. You can avoid this by changing their region to 0 (‘None’ in Destiny of an Editor), but this also means they won’t turn up in any random encounters.

Officer Battle Placement: Hexadecimal Source Code

Here is the hexadecimal code used to represent which officers appear in what battle. This code has been taken from an unmodified Destiny of an Emperor ROM. Click on a line number to jump to a detailed explanation. You need a Hex editor to edit the ROM.

30D70 0E040400000D100400000CBA3804040C
30D80 0D0E0000
0F040404040C0D0EBA101411
30D90 040404
BC170404001304040400BE1204
30DA0 0400
BBBC040400BC18160404BD150404
30DB0 00
BBBC1A19001E1F0404001D1C040000
30DC0
2421040400200404000023220404001B
30DD0 25BFC004
C12EC20404322C2D04002829
30DE0 310400
27040404042AC30404042B3304
30DF0 0400
261B2F30C4C7C844040435C50404
30E00 00
C5360404043E3F0404004041424304
30E10
46490404004F524B040048D804040053
30E20 C6040404
B0B1B2040037504A04004E4D
30E30 040404
47C94C5404606D0404005F6204
30E40 0404
CF6504040466CE6C04006E040404
30E50 04
CD616404046A67630404CB04040400
30E60
58685B04005E04040000CC040404005A
30E70 04040404
5C6B04040059CA6F04045704
30E80 040404
83770404047B0404040471727A
30E90 0404
9504040404767504040486850404
30EA0 04
719674840488918F04048004040404
30EB0
9493040404D0978C0404D27D87040479
30EC0 827F0404
9290D104047C8A8B04048E8D
30ED0 040404
887E81897826332D2CC0990404
30EE0 0404
41420400009D04040400B4B4B4B4
30EF0 B4
5D690404048878790404B704040404

Battles and Officer Assignments

Each line of code above is presented in the list below along with each battle that begins in that line. Each of the five officer slots is represented with a link that carries you down to an officer index. You can jump back up to the first appearance of an officer by using a link in the officer appearance index.

30D70

Jump to Code

Qing Zhou
0E 04 04 00 00
Tie Man Xia
0D 10 04 00 00
Tie Man Xia
0C BA 38 04 04
Qing Zhou (Cave)
0C 0D 0E 00 00

30D80

Jump to Code

Ma Yuan Yi
0F 04 04 04 04
Qing Zhou (Front)
0C 0D 0E BA 10
Si Shui Gate
14 11 04 04 04

30D90

Jump to Code

Hu Lao Gate
BC 17 04 04 00
Luo Yang (Gate 1) *1*
13 04 04 04 00
Luo Yang (Gate 2) *2*
BE 12 04 04 00

30DA0

Jump to Code

Luo Yang
BB BC 04 04 00
Yang Zhou
BC 18 16 04 04
Chang An (Gate 1)
BD 15 04 04 00

30DB0

Jump to Code

Chang An
BB BC 1A 19 00
Yuan
1E 1F 04 04 00
Huai Nan
1D 1C 04 00 00

30DC0

Jump to Code

Chen Cang Fortress
24 21 04 04 00
Nan Yang (Gate 1)
20 04 04 00 00
Nan Yang (Gate 2)
23 22 04 04 00
Nan Yang
1B 25 BF C0 04

30DD0

Jump to Code

Bo Hai
C1 2E C2 04 04
Xu Shou’s Fortress
32 2C 2D 04 00
Guan Zhong
28 29 31 04 00

30DE0

Jump to Code

Yuan Shang (Town)
27 04 04 04 04
Ji Zhou (Gate 1)
2A C3 04 04 04
Ji Zhou (Gate 2)
2B 33 04 04 00

30DF0

Jump to Code

Ji Zhou
26 1B 2F 30 C4
Gui Yang
C7 C8 44 04 04
Ling Ling
35 C5 04 04 00

30E00

Jump to Code

Ling Ling (Gate 1)
C5 36 04 04 04
Wu Ling
3E 3F 04 04 00
Chang Sha
40 41 42 43 04

30E10

Jump to Code

Liu Kui’s Fortress
46 49 04 04 00
Fu Shui
4F 52 4B 04 00
Fu Shui (Gate 1)
48 D8 04 04 00
Luo (Gate 1)
53 C6 04 04 04

30E20

Jump to Code

Luo Castle
B0 B1 B2 04 00
Mian Zhu Guan Fortress
37 50 4A 04 00
Cheng Du (Gate 1)
4E 4D 04 04 04

30E30

Jump to Code

Cheng Du
47 C9 4C 54 04
Ling Ling (Wu)
60 6D 04 04 00
Wu Ling (Wu)
5F 62 04 04 04

30E40

Jump to Code

Jian An
CF 65 04 04 04
Hui Ji Fortress
66 CE 6C 04 00
Yan Xun *3*
6E 04 04 04 04

30E50

Jump to Code

Wu
CD 61 64 04 04
Po Yang
6A 67 63 04 04
Po Yang (Gate 1)
CB 04 04 04 00

30E60

Jump to Code

Jin Du
58 68 5B 04 00
Jin Du (Gate 1)
5E 04 04 00 00
Lu Meng (Town)
CC 04 04 04 00
Jian Ye (Gate 1)
5A 04 04 04 04

30E70

Jump to Code

Jian Ye (Gate 2)
5C 6B 04 04 00
Jian Ye (Gate 3)
59 CA 6F 04 04
Jian Ye
57 04 04 04 04

30E80

Jump to Code

Guang Ling
83 77 04 04 04
Guang Ling (Gate 1)
7B 04 04 04 04
He Nei Fortress
71 72 7A 04 04

30E90

Jump to Code

He Nei Fortress (Gate 1)
95 04 04 04 04
Ru Nan (Gate 1)
76 75 04 04 04
Ru Nan (Gate 2)
86 85 04 04 04

30EA0

Jump to Code

Ru Nan
71 96 74 84 04
Chen Liu Fortress
88 91 8F 04 04
Chen Liu Fortress (Gate 1)
80 04 04 04 04

30EB0

Jump to Code

Chen Jiao *4*
94 93 04 04 04
Xu Huang *5*
D0 97 8C 04 04
Chin
D2 7D 87 04 04
Luo Yang (Gate 1)
79 82 7F 04 04

30EC0

Jump to Code

Luo Yang (Gate 2)
92 90 D1 04 04
Luo Yang (Gate 3)
7C 8A 8B 04 04
Luo Yang (Sima Zhao and Shi)
8E 8D 04 04 04

30ED0

Jump to Code

Luo Yang (Sima Yi)
88 7E 81 89 78
Yuan Shao (Ambush)
26 33 2D 2C C0
Zhou Cang *6*
99 04 04 04 04

30EE0

Jump to Code

Huang Zhong and Wei Yan *7*
41 42 04 00 00
Pang Tong (Ambush)
9D 04 04 04 00
Pirate Inn
B4 B4 B4 B4 B4

30EF0

Jump to Code

Jian Ye (Taishi Ci)
5D 69 04 04 04
Ru Nan (Sima Yi)
88 78 79 04 04
Lu Bu (Shu Ambush)
B7 04 04 04 04

Footnotes

*1
Li Jue is coded to appear alone, but sometimes he appears with Guo Si. We've never figured out why. It is probably a conflict with the Li Jue appearance below. Guo Si was perhaps intended?
*2
Xu Rong is coded to appear alone. If I recall correctly, though he sometimes appears with another officer.
*3
Yan Xun has a battle in the code but it appears to have been cut from the actual game.
*4
Chen Jiao appears with Wang Lang in the code, but the battle itself seems to have been cut from the game!
*5
Xu Huang appears with Guo Jia and Song Xian in the code, but the battle itself seems to have been cut from the game!
*6
A battle was created for Zhou Cang, but it isn't fought.
*7
You never fight Huang Zhong and Wei Yan. It should be noted that this battle entry also has nothing to do with recruiting Huang Zhong and Wei Yan in Chang Sha.

Officer Reference Table

Here are the hexadecimal reference values for each officer. Please not that not all officers have stats and thus will not be worth placing in battles without first being edited. Also note that there are consequences for changing certain officers. Please read the notes below.

HEXOfficer
03Bandit Force
C8Bao Long
02Brigand Force
63Bu Xi
18Cai Yong
74Cao Ang
70Cao Cao [E]
75Cao Chun
73Cao Hong [F]
71Cao Pi
72Cao Ren
76Cao Xiu
96Cao Zhang
77Cao Zhen
95Cao Zhi
3BChen Deng
1FChen Ji
94Chen Jiao [F]
23Chen Lan
34Chen Lin [X]
6AChen Pu
90Chen Qun
62Chen Wu
44Chen Ying
89Cheng Yu
10Cheng Yuan Zhi
79Dian Wei
CBDing Feng
BDDong Min
BBDong Zhuo
52Fa Zheng
5FFan Zhang
15Fen Chou
CFGan Ning
C2Gao Lan
C9Gao Pei
3FGong Zhi
CEGu Yong
AFGuan Ping
A4Guan Suo [E]
ACGuan Xing
A9Guan Yu
12Guo Ji
97Guo Jia [F]
33Guo Tu
64Han Dang
24Han Xian
40Han Xuan
38Han Zhong
82Hou Cheng
16Hu Zhen
14Hua Xiong
5EHuang Gai
53Huang Quan
41Huang Zhong
B8Huo Hu
61Jang Qin
1DJi Ling
1AJia Xu
8FJiang Gan
D4Jiang Wei
3EJin Xuan
30Ju Shou
6CKan Ze
7CLe Xin
1ELei Bo
4ELei Tong
C6Leng Bao
7DLi Dian
21Li Feng
13Li Jue
17Li Ru
11Li Su
37Li Yan
22Liang Gang
20Liang Ji
60Ling Tong
50Liu Ba
A8Liu Bei
ABLiu Chan [X]
92Liu Dai
35Liu Du
AELiu Feng
46Liu Kui
4ALiu Xun
7FLiu Ye
47Liu Zheng
BCLu Bu (Dong Zhuo)
C4Lu Bu (Ji Zhou)
C0Lu Bu (Nan Yang)
B7Lu Bu (Shu)
BFLu Fan
C1Lu Guang
6FLu Ji
CCLu Meng
65Lu Su
69Lu Sun
D1Lu Wen
C3Lu Xiang
B0Ma Chao
B1Ma Dai
9FMa Liang
A0Ma Su
2AMa Yan
0FMa Yuan Yi
8BMao Jie
48Meng Da
3DMi Zhe
80Niu Jin
B2Pang De
9DPang Tong
B4Pirate
01Pirate Force
04Rebel Force
2EShen Pei
8ESi Ma Shi
88Si Ma Yi
8DSi Ma Zhao
0ASong Ren
8CSong Xian [F]
0BSong Yong
56Sun Ce [E]
9ESun Gan [X]
59Sun Huan
57Sun Quan
5ASun Yi
58Sun Yu
5DTai Si Ci
D8Tao Qian [1]
31Tian Feng
8AWang Can
09Wang Gui
93Wang Lang [F]
54Wang Lei
87Wang Shuang
81Wei Xu
42Wei Yan
2DWen Hun
6DWu Fan
4DWu Lan
4CWu Yi
85Xia Hou De
7AXia Hou Dun
84Xia Hou Mao
86Xia Hou Shang
7BXia Hou Yuan
C5Xing Dao Rong
D0Xu Huang [F]
BEXu Rong
CAXu Sheng
32Xu Shou
D6Xu Zhe
78Xu Zhu
6BXue Zong
D2Xun Huo
D3Xun You [X]
2CYan Liang
6EYan Xun [F]
4FYan Yan
4BYang Huai
B9Yang Jin
43Yang Ling
91Yang Xiu
A5Yi Ji [E]
7EYu Jin
27Yuan Shang
26Yuan Shao
1BYuan Shu
28Yuan Tan
29Yuan Xi
25Yuan Yin
ADZhang Bao
AAZhang Fei
2FZhang He
68Zhang Hong
0CZhang Jao
19Zhang Ji
0EZhang Liang
83Zhang Liao
49Zhang Ren
51Zhang Song [E]
1CZhang Xun
2BZhang Yi
67Zhang Zhao
C7Zhao Fan
D7Zhao Yun
BAZheng Mao
99Zhou Cang
08Zhou Chao
5CZhou Tai
66Zhou Yu
CDZhu Ge Jin
D5Zhu Ge Liang
5BZhu Zhi
HEXOfficer
01Pirate Force
02Brigand Force
03Bandit Force
04Rebel Force
08Zhou Chao
09Wang Gui
10Cheng Yuan Zhi
11Li Su
12Guo Ji
13Li Jue
14Hua Xiong
15Fen Chou
16Hu Zhen
17Li Ru
18Cai Yong
19Zhang Ji
20Liang Ji
21Li Feng
22Liang Gang
23Chen Lan
24Han Xian
25Yuan Yin
26Yuan Shao
27Yuan Shang
28Yuan Tan
29Yuan Xi
30Ju Shou
31Tian Feng
32Xu Shou
33Guo Tu
34Chen Lin [X]
35Liu Du
7FLiu Ye
37Li Yan
38Han Zhong
40Han Xuan
41Huang Zhong
42Wei Yan
43Yang Ling
44Chen Ying
46Liu Kui
47Liu Zheng
48Meng Da
49Zhang Ren
50Liu Ba
51Zhang Song [E]
52Fa Zheng
53Huang Quan
54Wang Lei
56Sun Ce [E]
57Sun Quan
58Sun Yu
59Sun Huan
60Ling Tong
61Jang Qin
62Chen Wu
63Bu Xi
64Han Dang
65Lu Su
66Zhou Yu
67Zhang Zhao
68Zhang Hong
69Lu Sun
70Cao Cao [E]
71Cao Pi
72Cao Ren
73Cao Hong [F]
74Cao Ang
75Cao Chun
76Cao Xiu
77Cao Zhen
78Xu Zhu
79Dian Wei
80Niu Jin
81Wei Xu
82Hou Cheng
83Zhang Liao
84Xia Hou Mao
85Xia Hou De
86Xia Hou Shang
87Wang Shuang
88Si Ma Yi
89Cheng Yu
90Chen Qun
91Yang Xiu
92Liu Dai
93Wang Lang [F]
94Chen Jiao [F]
95Cao Zhi
96Cao Zhang
97Guo Jia [F]
99Zhou Cang
0ASong Ren
0BSong Yong
0CZhang Jao
ADZhang Bao
0EZhang Liang
0FMa Yuan Yi
1AJia Xu
1BYuan Shu
1CZhang Xun
1DJi Ling
1ELei Bo
1FChen Ji
2AMa Yan
2BZhang Yi
2CYan Liang
2DWen Hun
2EShen Pei
2FZhang He
3BChen Deng
3DMi Zhe
3EJin Xuan
3FGong Zhi
4ALiu Xun
4BYang Huai
4CWu Yi
4DWu Lan
4ELei Tong
4FYan Yan
5ASun Yi
5BZhu Zhi
5CZhou Tai
5DTai Si Ci
5EHuang Gai
5FFan Zhang
6AChen Pu
6BXue Zong
6CKan Ze
6DWu Fan
6EYan Xun [F]
6FLu Ji
7AXia Hou Dun
7BXia Hou Yuan
7CLe Xin
7DLi Dian
7EYu Jin
8AWang Can
8BMao Jie
8CSong Xian [F]
8DSi Ma Zhao
8ESi Ma Shi
8FJiang Gan
9DPang Tong
9ESun Gan [X]
9FMa Liang
A0Ma Su
A4Guan Suo [E]
A5Yi Ji [E]
A8Liu Bei
A9Guan Yu
AAZhang Fei
ABLiu Chan [X]
ACGuan Xing
AELiu Feng
AFGuan Ping
B0Ma Chao
B1Ma Dai
B2Pang De
B4Pirate
B7Lu Bu (Shu)
B8Huo Hu
B9Yang Jin
BAZheng Mao
BBDong Zhuo
BCLu Bu (Dong Zhuo)
BDDong Min
BEXu Rong
BFLu Fan
C0Lu Bu (Nan Yang)
C1Lu Guang
C2Gao Lan
C3Lu Xiang
C4Lu Bu (Ji Zhou)
C5Xing Dao Rong
C6Leng Bao
C7Zhao Fan
C8Bao Long
C9Gao Pei
CAXu Sheng
CBDing Feng
CCLu Meng
CDZhu Ge Jin
CEGu Yong
CFGan Ning
D0Xu Huang [F]
D1Lu Wen
D2Xun Huo
D3Xun You [X]
D4Jiang Wei
D5Zhu Ge Liang
D6Xu Zhe
D7Zhao Yun
D8Tao Qian [1]

Footnotes

[1]
Tao Qian appears in the game as a Shu officer. There was no recorded Shu officer named Tao Qian. This was just Capcom’s lazy method of creating a name reference for Tao Qian of Xu Zhou, from the beginning of the game. If you change Tao Qian’s name you will also change any reference to Tao Qian at the beginning of the game. Seeing as how you are changing battles anyway, you can remove Tao Qian from the mix, avoid the trouble of editing associated scripts, update an unused officer like Sun Gan, and toss him into battle with a new identity.
[E]
Cao Cao, Guan Suo, Sun Ce, Yi Ji and Zhang Song all have officer entries in the ROM. None of these officers are recruitable and none of them appear in battles. If you recreate their identities, though, you will affect the appearance of characters in the game. Cao Cao and Sun Ce both make appearances earlier in the game. Guan Suo appears to tell you about Sima Yi’s Thunder. Yi Ji speaks with you in Jingzhou. Zhang Song speaks with you before entering Shu. Cao Cao and Sun Ce do not actually have stats or portraits (but you can change that if you wish).
[F]
Cao Hong, Chen Jiao, Guo Jia, Song Xian, Wang Lang, Xu Huang and Yan Xun appear in random encounters but cannot be recruited because you never defeat them in a castle battle. If you assign one of these officers (or a remade version of one of them) to a castle battle they will become recruitable after fighting them. To prevent them from being recruited (with the side affect of making sure they won’t turn up in random encounters) you can set their region to ‘0’ (or none in Destiny of an Editor).
[X]
Chen Lin, Liu Chan, Sun Gan and Xun You were all created by Capcom and stored in the ROM, but as far as we know there is no reference made to their names at any point in the game. This means you can give them a new identity and assign them to a battle wherever you please.

© 1989 Hiroshi Motomiya, © 1989 M and M Co., © 1989 Shueisha, Produced by Capcom Co. Ltd.

Kongming’s
Archives

Sections

Content

Cheats and Glitches

Images and Media

DoaE Gameboy

Downloads

Games »

Universal

March 7, 2014