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 9 months, 2 weeks ago by MiDKnighT.
-
AuthorPosts
-
January 11, 2014 at 11:47 am #52860sonic.penguinModerator
A Romhacking guide change was done because the current officer stat system using: LDR, POL, etc is broken. I added the original version of the item drop code for coding along with some notes on the version that MiDKnighT created for use with POL.
— Spoils of War – POL version (uses POL to determine drop rate)
Credit: ludmeister (with some minor additions by MiDKnighT)It requires at least a 512K ROM, and uses page 1E for its work.
0x3a547:
Code:"A900 8573 20D79A A202 1E0005 38 7E0005 CA 10F6" -> "a91e 2082c4 200d82 2095d4 ea a900 8573 20d79a"0x7a530:
Code:A200A9009D05629DAF60E8E006D0F560
00000000000000A90E2082C44C50A5EA
2082C400000000000000000000000000
2020A52050A6A2021E0005387E0005CA
10F6A92EC500F00FA5AD65604A65AF65
10297FC56E3005A90E4C40A565AE4A65
61651165AD290F856EAD3670AACA8A29
070A0A0A0A656E856EEAEAEAA5AE6552
651165626563297FC9153010A56EA8B9
D0A5856EA900856F4C37A5EAA56EA8B9
50A6856EA900856F4C37A5EA00000000
31313131313131313132303030282B2C
313131313131323232303030282B2C38
323232323232323330303028282B2C38
323232333333303028282B2B2C2C3838
32333333333330302828282B2C2C3838
33333333333334303028282B2C2C3838
34343434343434303028282B2C2C3838
343434343434302128282B2B2C2C3838
AD9060AABD2064C900D005A908856E60
4A4A4A4A856E600000000000000000000x7a560: This contains the algorithm guts. It decides whether something was found, and if so, whether it was a rare drop or not. Then, it picks a random item from 0 to 15, and gets that item from the correct chapter. Extra chapters are treated as the normal chapter of the same rank (Extended Wu would be treated as Wu).
0x7a5e0 – 0x7a65f: These are the random common drops. 8 regions, 16 items per region. This item table just has ordinary items (Elixirs, Gullwings, Steeds, Power Pills, Revives, and Smoke Pots), except for one Red Hare in Wei's region.
EDIT: Alternately, this table weaves in some gold and ration drops:
Code:01010731313131313132303030282B2C
010208313131323232303030282B2C38
020309093232323233303028282B2C38
03040A3232333333303028282B2C2C38
04040A33333333303028282B2C2C3838
04050A0B3333333334303028282B2C38
05060B0C34343434343028282B2C2C38
060C0C34343434213028282B2C2C38380x7a660 – 0x7a6df: These are the random rare drops. 8 regions, 16 items per region. You will probably want to make these more helpful drops, such as equipment, as they can be offered rarely and thus can be made to not totally break the game. The format for this table is exactly the same as the common drop table.
Party leader's POL attribute affects how often items are dropped. If your party leader has higher POL you will get more item drops.
You can change the ratio of rare to common drops. The value to change is in this instruction:
Code:1E:A59C:C9 15 CMP #$15This is the chance, out of 128, that this current drop is rare, as when execution reaches this instruction, we know we are receiving a drop. Change 0x7a5ad, making the value smaller to make rare drops more rare, and larger to make them more common. If you change this value to greater than 0x40, you would be making "rare" drops more common than "common" drops– silly you :geek: . Default chance for this drop to be rare is 20/128, or 5 out of 32.
3. Obviously, you can change the items that drop. It does seem that you can make more gold coins or food rations drop. I don't recommend that you allow reception of items that you cannot sell or discard :wink:
— Spoils of War Original (does not use POL to determine drop)
Credit: ludmeisterFirst, here are the Hex changes to the ROM. It requires at least a 512K ROM, and uses page 1E for its work.
0x3a547:
Code:
“A900 8573 20D79A A202 1E0005 38 7E0005 CA 10F6” -> “a91e 2082c4 200d82 2095d4 ea a900 8573 20d79a”0x7a547:
Code:
a90e 2082c4 4c50a5 ea 2082c40x7a560: This contains the algorithm guts. It decides whether something was found, and if so, whether it was a rare drop or not. Then, it picks a random item from 0 to 15, and gets that item from the correct chapter. Extra chapters are treated as the normal chapter of the same rank (Extended Wu would be treated as Wu).
Code:
a202 1e0005 38 7e0005 ca 10f6 a5ad 6560
4a 65af 6510 297f c908 3005 a90e 4c40a5
65ae 4a 6561 6511 65ad 290f 856e ad3670
aa ca 8a 2907 0a 0a 0a 0a 656e 856e eaeaea
a5ae 6552 6511 6562 6563 297f c915 3010
a56e a8 b9d0a5 856e a900 856f 4c37a5 ea
a56e a8 b950a6 856e a900 856f 4c37a5 ea0x7a5e0 – 0x7a65f: These are the random common drops. 8 regions, 16 items per region. This item table just has ordinary items (Elixirs, Gullwings, Steeds, Power Pills, Revives, and Smoke Pots), except for one Red Hare in Wei’s region.
Code:
31313131313131313132303030282B2C
313131313131323232303030282B2C38
323232323232323330303028282B2C38
323232333333303028282B2B2C2C3838
32333333333330302828282B2C2C3838
33333333333334303028282B2C2C3838
34343434343434303028282B2C2C3838
343434343434302128282B2B2C2C3838EDIT: Alternately, this table weaves in some gold and ration drops:
Code:
01010731313131313132303030282B2C
010208313131323232303030282B2C38
020309093232323233303028282B2C38
03040A3232333333303028282B2C2C38
04040A33333333303028282B2C2C3838
04050A0B3333333334303028282B2C38
05060B0C34343434343028282B2C2C38
060C0C34343434213028282B2C2C38380x7a660 – 0x7a6df: These are the random rare drops. 8 regions, 16 items per region. You will probably want to make these more helpful drops, such as equipment, as they can be offered rarely and thus can be made to not totally break the game. The format for this table is exactly the same as the common drop table.
Helpful tips to make Battle Spoils work for you
1. You can make all drops more or less common. The value to change is in this instruction:
Code:
1E:A567:C9 08 CMP #$08This determines the chance, out of 128, to gain an item. Change 0x7a578, making it larger to make drops more common, and of course make it smaller to make drops more rare. Default drop chance is 8/128, or 1 in 16.
2. You can change the ratio of rare to common drops. The value to change is in this instruction:
Code:
1E:A59C:C9 15 CMP #$15This is the chance, out of 128, that this current drop is rare, as when execution reaches this instruction, we know we are receiving a drop. Change 0x7a5ad, making the value smaller to make rare drops more rare, and larger to make them more common. If you change this value to greater than 0×40, you would be making “rare” drops more common than “common” drops– silly you :geek: . Default chance for this drop to be rare is 20/128, or 5 out of 32.
3. Obviously, you can change the items that drop. It does seem that you can make more gold coins or food rations drop. I don’t recommend that you allow reception of items that you cannot sell or discard :wink:
I have tested this algorithm, and it will not bork the game if you don’t have any space to put the item; it will just scream at you with the default message saying that you don’t have any more room.
Here is a list of item ID’s you can use:
00 ~*006038 coins [glitch]
01 ~96 coins
02 ~237 coins
03 ~592 coins
04 ~1013 coins
05 ~1533 coins
06 ~4028 coins
07 ~29 food
08 ~125 food
09 ~821 food
0A ~2011 food
0B ~5902 food
0C ~10151 food
0D ~2098390 food
0E ~2148799 food
0F ~*86607 food [glitch]
10 [blank] ->
16 [blank]
17 Silver Key ->
18 Silver Key
19 Gemsword
1A Ma Letter [???]
1B Gun Powder
1C Intro Letr
1D Iron Ore
1E Dead Wood
1F Saltpeter
20 [glitch]
21 Chi Tu Ma [Red Hare]
22 Zhou Letr [Zhang Ltr]
23 Gold Key
24 Gullwing ->
28 Gullwing
29 [blank] ->
2A [blank]
2B Smoke Pot
2C Steed
2D Resurrect -> (glitched, use 30)
30 Resurrect
31 Elixir A
32 Elixir B
33 Elixir C
34 Elixir D
35 Power Pill ->
38 Power Pill
39 Dagger ->
40 Dagger
41 Flail [Club]
42 Ax [Ax]
43 Club [Mace]
44 Spear [Flail]
45 Sabre [Spear]
46 Trident
47 Bow
48 Sword
49 Battleax [Great Ax]
4A Scimitar
4B Crossbow
4C Lance [Dadao]
4D Wan Sheng [Wansheng]
4E Bo Ye [Boye]
4F Qing Guang [Qingguang]
50 Nu Long [Nulong]
51 Qing Long [Qinglong]
52 Halberd
53 Robe ->
59 Robe
5A Leather ->
5B Leather
5C Padded ->
5D Padded
5E Ring M ->
5F Ring M
60 Chain M ->
61 Chain M
62 Splint M ->
63 Splint M
64 Plate M ->
65 Plate M
66 Bandana ->
68 Bandana
69 Cap
6A Hood
6B Wood H
6C Copper H
6D Bronze H
6E Iron H
6F Steel H
6F [glitch] ->
7F [glitch]
80 “I found a small keyhole.” ->
FF “I found a small keyhole.”January 11, 2014 at 7:47 pm #52868sonic.penguinModeratorMidKnight I have a request… any way you can cook up some code to allow “Dual Wielding” at the expense of body armor? So once you equip a second weapon, your body armor de-equips and once you equip body armor, any second weapon is de-equipped? Is that even possible?
January 15, 2014 at 8:31 am #52921MiDKnighTModeratorI’ve got a giant pile of bugs to fix. That’s a code area that lud played with a lot so perhaps he’s best one to do it if we can find him.
January 15, 2014 at 10:22 am #52924sonic.penguinModeratorFor some reason, I can’t find in the guide how to find the displayed A.C. table for armor… I know I found it once on my own but it could be something useful to add in the guide especially since the Base A.C. enhancement will cause changes that need to be made to the displayed A.C. of armor. Auto-changes to armor should be made in the IPS patch to max out at 255 with the BEST armor and BEST helmet + 100 Base Ac, so the best armor max would be like 80 and the best helmet max would be 75.
Also, I remember this base AC formula needing modified as well to allow for an advantage only for high STR officers as it was giving high INT officers 100 AC as well which makes them into gods… INT should play a much more minor role in comparison with STR (think muscles make them tougher and brains make them squishier) since INT already acts as a natural tactic barrier
January 15, 2014 at 4:17 pm #52951sonic.penguinModeratorCan you fix the links in the romhacking guide to each section in the table of contents? Since the forum switchover it hasn’t worked the samel
January 16, 2014 at 2:20 pm #52995sonic.penguinModeratorJust changed this in the guide to be more…. concise and easier to understand without thinking >_>
0x7AA00-0x7AAFF = LDR settings for officers
0x7AB00-0x7ABFF = VIT settings for officers
0x7AC00–0x7ACFF = POL settings for officersJanuary 16, 2014 at 5:36 pm #53015MiDKnighTModeratorIPS patch 1.3 updated with recent bug fixes.
January 16, 2014 at 10:10 pm #53025sonic.penguinModeratorTrying to add this code to pre-equip items and it is breaking the mod
0×35447: 4CC0B5EAEA
0x357D0: A90A8DF861A9018DC0608DC160A9028DC260A9148DB4608DB5604C3C94January 16, 2014 at 10:34 pm #53027sonic.penguinModeratorThis happened when I tried editing the name of the last value in the profile section ‘Peasant’ to ‘Turban’
************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
at DoaEditor.MainForm.SaveWpnIcons() in C:\Users\mpolaski\Documents\DOAE\DOAE_Editor_Source\DoaEditor\MainForm.Profiles.cs:line 440
at DoaEditor.MainForm.SaveProfiles(Byte[] entireRom) in C:\Users\mpolaski\Documents\DOAE\DOAE_Editor_Source\DoaEditor\MainForm.Profiles.cs:line 397
at DoaEditor.MainForm.export_Click(Object sender, EventArgs e) in C:\Users\mpolaski\Documents\DOAE\DOAE_Editor_Source\DoaEditor\MainForm.cs:line 1676
at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ToolStrip.WndProc(Message& m)
at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtrJanuary 16, 2014 at 11:10 pm #53029sonic.penguinModeratorYep, that was it.
January 16, 2014 at 11:18 pm #53030sonic.penguinModeratorFound a major bug… I discovered this one when I used Ambush and the text borked up the game.
1.3 apparently overwrote the wrong section of text in the ROM. The whole bottom part of the games text bank (I think its #3) is all %@*^# up with duel text that wrote over the wrong areas and now the game will lock up if it has to reference those borked up text lines.1. Gonna need a restore to the original text
2. Gotta make sure the necessary duel text is in the right spots.January 18, 2014 at 12:30 am #53065sonic.penguinModeratorOkay, so something got erased from the guide the provided detailed information regarding how officer data is configured. It looked something like this but it is not this… I just need to know the order of the values so I know what I can change for rebel, pirate, brigand, bandit forces as they have to be edited manually this way.
STR
INT
AGI
Sprite ID
Weapon from ID Table
AC From ID Table
Soldiers From ID Table
Best Tactic available
Portrait slice
Portrait bank
Portrait ColorI could really use this back in the guide.
January 18, 2014 at 7:49 am #53066MiDKnighTModeratorJanuary 18, 2014 at 9:17 am #53067sonic.penguinModeratorThis, thanks:
Officer structure notes (from various sources, as well as DoaEd code)STR
INT
Region
Sprite
Sprite color (AP as enemy)
DP as enemy
Soldiers (Enemy)
Soldiers (Ally)
Tactics
AGI
portrait 1
portrait 2
portrait 3
portrait 4
portrait 5
portrait 6
portrait BG (single-color BG only)
unknown
unknown
Name spacing
Officer name
I’ll clean it up and add it back to the guide until a better way is found to edit rebel forces. I mean, it was cool getting like 5 hits on a rebel force but was just a little excessive
January 19, 2014 at 10:33 pm #53131sonic.penguinModerator -
AuthorPosts
- You must be logged in to reply to this topic.