Home › Forums › Destiny of an Emperor › DoaE Artificial Intelligence Enhancements + New Tactics
Tagged: Destiny of an Emperor, Destiny of an Emperor hack, Destiny of an Emperor hacking, Destiny of an Emperor Rom, DoaE artificial intelligence, NES AI, NES Artificial Intelligence, NES hacking, ROM Hacking, Yuan Shu
- This topic has 645 replies, 10 voices, and was last updated 4 years, 9 months ago by
MiDKnighT.
-
AuthorPosts
-
July 22, 2012 at 11:20 pm #43938
MiDKnighT
ModeratorBasic Duel is working. Charge always works unless your opponent dies before you charge (kinda like Final Fantasy 1). You can try it out here:
EDIT: Hold on, little buggy to fix…
Things to test/try:
– Make sure "Charge" always works against alive enemies.
– Make sure "All-Out" always works, particularly against tactic users.
– Try various scenarios for "Duel". Ie… have a weak guy challenge a strong guy, have a low INT guy challenge a high INT guy, etc…
– Try the enhanced "Remove".
July 23, 2012 at 1:32 pm #43939MiDKnighT
ModeratorI've got a version to test. This has:
– New "Protect" tactic
– Enhanced An Sha
– Basic "Duel" functionality (want to add more later)
– "Charge" always works (unless your targeted enemy is dead)
The slots for all the new tactics are:
11 – "Protect" (Wuo Jian slot)
12 – "Duel" (Shui Jian slot)
15 – "Charge" (Cheng Nei slot)
1A – "Enhanced Remove/An Sha" (same as old Remove/An Sha slot)
I haven't moved tactics around in the mod (yet) so expect to see the above tactics where their predecessors were. You'll need the save state from the first post to use "Charge".
https://www.box.com/s/d941e90b712311157ce5
Things to test/look out for:
– Does "Protect" work as advertised?
– Does "Charge" work as advertised?
– How do you like the new An Sha algorithms? It should make save state cheating nearly impossible.
– Try different duel scenarios… Ie…have a dumb general offer a duel to a smart general, a weak general offer to a strong one, etc…
– Does "All-Out" always work against tactic users?
July 23, 2012 at 2:43 pm #43940sonic.penguin
ModeratorYou replaced Shui Jian w/ Duel? I'm getting an error that I need to be near water to use the tactic, probably using the same instance as Shui Jian for being near water.
Text for Dueling seems pretty generic once seeing it in game, but the tactic seems to work. So far I havent lost though… I'm tempted atm just to keep dueling people and not even battle heh
July 23, 2012 at 2:49 pm #43941MiDKnighT
ModeratorQuote:You replaced Shui Jian w/ Duel? I'm getting an error that I need to be near water to use the tactic, probably using the same instance as Shui Jian for being near water.Oh! Didn't think about that. I was testing it in a fight near water. I can fix this.
Quote:Text for Dueling seems pretty generic once seeing it in game, but the tactic seems to work. So far I havent lost though… I'm tempted atm just to keep dueling people and not even battle hehYa this tactic isn't done by any means. I will make An Sha outcomes less likely once I enhance it further.
July 23, 2012 at 2:52 pm #43942sonic.penguin
ModeratorTry opening in DOAEditor, getting tons of 'unknown key' errors, I think it is a text overflow issue.
ATM, charge and protect seem to work, but havent tried the 'enhanced ansha' how does that one work?
July 23, 2012 at 2:56 pm #43943MiDKnighT
ModeratorTo fix the fighting near water thing just change:
0x39ECA: 12 –> FF
July 23, 2012 at 2:58 pm #43944MiDKnighT
ModeratorQuote:ATM, charge and protect seem to work, but havent tried the 'enhanced ansha' how does that one work?You can't save state cheat with it anymore. Also INT plays a bigger factor. And we have an expanded "No An Sha" list where you can add 32 more generals. Here's the guts of the changes:
An Sha code:
00:83B0:A4 4B LDY $004B = #$07 <– Defender
00:83B2:B9 A8 60 LDA $60A8,Y @ $61A7 = #$79 <– Get general ID
00:83B5:A0 1F LDY #$1F
00:83B7:D9 E0 84 CMP $84E0,Y @ $85DF = #$00 <– On No An Sha list?
00:83BA:F0 0E BEQ $83CA <– If on An Sha list, tactic fails
00:83BC:88 DEY
00:83BD:10 F8 BPL $83B7 <– End loop
00:83BF:20 A0 87 JSR $87A0 <– Function to compare INT
00:83C2:E0 01 CPX #$01 <– Does defender have more INT?
00:83C4:D0 0B BNE $83D1 <– If not, skip ahead
00:83C6:C9 14 CMP #$14 <– Does defender have 20+ more INT?
00:83C8:90 05 BCC $83CF <– If not, skip ahead
00:83CA:A0 1A LDY #$1A
00:83CC:4C 95 83 JMP $8395 <– Defender has 20+ more INT, tactic fails
00:83CF:69 EB ADC #$EB
00:83D1:E0 00 CPX #$00 <– Does attacker have more INT?
00:83D3:D0 0C BNE $83E1 <– If not, skip ahead
00:83D5:C9 7F CMP #$7F <– Does attacker have 127+ more INT?
00:83D7:90 02 BCC $83DB
00:83D9:A9 7E LDA #$7E <– If so, tactic only has 1 in 255 chance of failing
00:83DB:85 B0 STA $00B0 = #$00
00:83DD:A9 7F LDA #$7F
00:83DF:E5 B0 SBC $00B0 = #$00
00:83E1:85 B0 STA $00B0 = #$00 <– store tactic success factor (lower is better)
00:83E3:E0 00 CPX #$00
00:83E5:D0 0F BNE $83F6
00:83E7:A4 4B LDY $004B = #$09
00:83E9:BD A8 61 LDA $61A8,X @ $6258 = #$00 <– get defender's INT
00:83EC:C9 A0 CMP #$A0 <– going to be tougher to An Sha defenders with INT > 160
00:83EE:90 06 BCC $83F6
00:83F0:A5 B0 LDA $00B0 = #$00
00:83F2:65 B0 ADC $00B0 = #$00 <– double tactic success factor (tougher)
00:83F4:85 B0 STA $00B0 = #$00
00:83F6:20 C0 86 JSR $86C0 <– secret sauce number
00:83F9:C5 B0 CMP $00B0 = #$00 <– Is our tactic success factor < secret sauce number?
00:83FB:90 09 BCC $8406
00:83FD:A0 00 LDY #$00
00:83FF:84 B0 STY $00B0 = #$00
00:8401:A0 1A LDY #$1A
00:8403:4C 90 83 JMP $8390 <– Tactic succeeds
00:8406:A0 00 LDY #$00
00:8408:84 B0 STY $00B0 = #$00
00:840A:A0 1A LDY #$1A
00:840C:4C 95 83 JMP $8395 <– Tactic fails
An Sha A.I. Code:
00:8420:20 A0 87 JSR $87A0 <– Compare INT
00:8423:E0 00 CPX #$00 <– If we are smarter, continue on with the tactic
00:8425:D0 05 BNE $842C
00:8427:A0 1A LDY #$1A
00:8429:4C 00 80 JMP $8000
00:842C:C9 0F CMP #$0F <– We are not smarter, is the defender 15+ INT smarter?
00:842E:B0 F8 BCS $8428 <– If so, find something else to do.
00:8430:A0 1A LDY #$1A
00:8432:4C A8 83 JMP $83A8
July 23, 2012 at 3:03 pm #43945MiDKnighT
ModeratorQuote:Try opening in DOAEditor, getting tons of 'unknown key' errors, I think it is a text overflow issue.I'll have to check with Niahak on that.
July 23, 2012 at 3:15 pm #43946sonic.penguin
ModeratorMind posting the protect code and charge fix?
July 23, 2012 at 3:18 pm #43947MiDKnighT
ModeratorOK looking at the DoaEditor issue further. I think I might know the reason…
And it looks like YES you can edit the new stuff in DoaEditor Yay!
July 23, 2012 at 3:20 pm #43948MiDKnighT
ModeratorQuote:Mind posting the protect code and charge fix?It's kind of intertwined with the Duel stuff. I'll give you everything I have right now. You can just remove "Duel" for now:
Beware, it's BIG!!!
Duel / Protect / Enhanced An Sha:
0x2FED6: 1F2D3E2F34322FFFFF1364343BFFFFFFFFFF
0x39ECA: 12 –> FF
0x3B9D6: EAEAEAEAEAA91E2082C4
0x3B9F3: 4CEEB9A91E2082C4EAEAEA
0x3BB50: 80
0x782B0: A9012082C44C82A0
0x783A5: 4CD8B9EAEA4CCBB9
0x786B6: A9012082C44CE2B9
0x786D0: 4C8AA1
0x7A19A: 8A2024D14C4FBA
0x7BA5F: A90E2082C4
0x7B9D0:
000000000000A90E2082C4A90E2082C4
4CA0820000000000A90E2082C4004CA6
86008A2024D100000000004CA6860000
0x04090:
034CA88398C911D022A8AD22622902C9
00F0034CA883AD2462C900F0034CA883
AD2662C900F0034CA88398C912D0034C
E082C91AD0034C20844C008000000000
0x04260:
2062C011D047BD20622901C901D005A9
014CB782E8E8BD2062C900F0034CB582
E8E8BD2062C900F0034CB582CACACACA
A012BD206219D0819D2062A015BD2062
19D0819D2062A011A96020B0864CD082
A91E2082C4A44DC015D0034C348DEAEA
EAC01AD0034CB083A5AD65AE290FC5F3
90034C95834C9083A9009D20624C9583
C012D0034C00854C0082000000000000
4C00800000
0x043A0:
A91E2082C4A91E2082C4000000000000
0000000000000000E6ADA91E2082C400
A44BB9A860A01FD9E084F00E8810F820
A087E001D00BC9149005A01A4C958369
EBE000D00CC97F9002A97E85B0A97FE5
B085B0E000D00FA44BBDA861C9A09006
A5B065B085B020C086C5B09009A00084
B0A01A4C9083A00084B0A01A4C958300
00000000000000000000000000000000
20A087E000D007A91AA6784C0080C90F
90F74CA88300000000
0x4510:
A44BB9A860A01FD9C084F0748810F8EA
A678E005B005A64B4C2385BDE461AABD
9760AABDA861C996B025A678E005B005
A64B4C3D85BDE461AABD9760AABD9C61
85B020CB86C5B0B0034C00894C1086C9
DC90034C8085200087E000D007C91490
034C0089E001D007C90A90034C108685
B020CB86C5B0B0034C00894C10860000
A000A678E005B002A00598AA20008885
B1BDA860C900F013BD9C60C900F00CA5
B1C5B4900686B284B385B4C8A678E005
B004C00AD0D4E0059004C005D0CCA678
BDE46185B5A54B85B6A5B39DE461A5B2
854B200087E001D0034CE285A5B59DE4
61A5B6854B4CF485A5B5C5B3F0064C00
894C1086200087E001D0F6C93290034C
0x4610:
00894C10860000000000000000000000
20A088C9DC90034C9086A44BB9A860A0
1FD9C084F06A8810F8C904B0034C9086
20C386C980B0034C9086A96220208BA6
78BDE46185BFA90085BDA57885BEEAEA
A201A4BFC0059002A200BD2C6249009D
2C62BD2E6249009D2E62A201A4BEC005
9002A200B9E461A8BD26621930819D28
62EAEAA96AA6BDE0009002A96B20B086
20F087A96220B0864A4A4A6000000000
8514A9038515A91E2082C460EAEAEAEA
8514A9038515EAEAEAEAEAA91E2082C4
AD7360A00B79A8608810FAA00B79A861
8810FAA44A79A860A44B79A860A47879
A860A00779F8618810FAA00D79226288
10FAA00B799C608810FA600000000000
0x4710:
A678E005B005A64A4C1087E8E8EAEAEA
BD9C618528A678E005B005A64B4C3087
BDE461AABD9760AAEAEAEAEAEAEAEAEA
BD9C618529A528C5299007A200E5294C
4887A201A529E528A000842884296000
A678E005B005A64A4C6087E8E8EAEAEA
BDB4618528A678E005B005A64B4C8087
BDE461AABD9760AAEAEAEAEAEAEAEAEA
BDB4618529A528C5299007A200E5294C
9887A201A529E528A000842884296000
A678E005B005A64A4CB087E8E8EAEAEA
BDA8618528A678E005B005A64B4CD087
BDE461AABD9760AAEAEAEAEAEAEAEAEA
BDA8618529A528C5299007A200E5294C
E887A201A529E528A000842884296000
A900A20F95B0CA10FB60000000000000
0x4810:
E0059005E8E84C1188EAEAEAEABD9760
AABD9C61600000000000000000000000
E0059005E8E84C3188EAEAEAEABD9760
AABDB461600000000000000000000000
E0059005E8E84C5188EAEAEAEABD9760
AABDA861600000000000000000000000
A64BBD9C616000000000000000000000
00000000000000000000000000000000
A64BBDB4616000000000000000000000
00000000000000000000000000000000
A64BBDA8616000000000000000000000
00000000000000000000000000000000
4A4A4A60000000000000000000000000
E0059003E8E860BD9760600000000000
00000000000000000000000000000000
00000000000000000000000000000000
0x4910:
20F087A96120108BA96920908BEAEAEA
A67820008820C18885BA65BA85BAA678
20208820C08865BA85BAA200A478C005
9002A20520008820C08865BA85BA20C0
8620C08865BA85BAEAEAEAEAEAEAEAEA
A678BDE46185B1AA20008820C18885BB
65BB85BBA6B120208820C08865BB85BB
A200A4B1C0059002A20520008820C088
65BB85BB20C38620C08865BB85BBEAEA
A20086BDA5BAC5BBB007A20186BD4C00
8AE5BBC90AB0034C508A20F087A96C20
C08B20408DA96420B086000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
0x4A10:
A5BBE5BAC90AB0034C508AA96D20D08B
A678A478BDE461AA20D088864A98AA85
7920D088854B20F08720408DA96420B0
86000000000000000000000000000000
00000000000000000000000000000000
20F08720D386C9C0B005A97220B08620
408DA678A478BDE461AA20D088864A98
AA857920D088854B20F08720408DA973
20B08600000000000000000000000000
0x4B10:
20E08A200DD1600320F08A6000000000
20E08A200DD1610320F08A6000000000
20E08A200DD1620320F08A6000000000
20E08A200DD1630320F08A6000000000
20E08A200DD1640320F08A6000000000
20E08A200DD1650320F08A6000000000
20E08A200DD1660320F08A6000000000
20E08A200DD1670320F08A6000000000
20E08A200DD1680320F08A6000000000
20E08A200DD1690320F08A6000000000
20E08A200DD16A0320F08A6000000000
20E08A200DD16B0320F08A6000000000
20E08A200DD16C0320F08A6000000000
20E08A200DD16D0320F08A6000000000
20E08A200DD16E0320F08A6000000000
20E08A200DD16F0320F08A6000000000
0x4C10:
20E08A200DD1700320F08A6000000000
20E08A200DD1710320F08A6000000000
20E08A200DD1720320F08A6000000000
20E08A200DD1730320F08A6000000000
20E08A200DD1740320F08A6000000000
20E08A200DD1750320F08A6000000000
20E08A200DD1760320F08A6000000000
20E08A200DD1770320F08A6000000000
20E08A200DD1780320F08A6000000000
20E08A200DD1790320F08A6000000000
20E08A200DD17A0320F08A6000000000
20E08A200DD17B0320F08A6000000000
20E08A200DD17C0320F08A6000000000
20E08A200DD17D0320F08A6000000000
20E08A200DD17E0320F08A6000000000
20E08A200DD17F0320F08A6000000000
0x4D10:
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000A900A6789DD061A90E2082C4
A01A844DA44BA900999C60980A0AAAA9
009DD0609DD1602057E32057E2A679BD
0605297F9D0605A90485792036DFB99C
60300BC67910F4A901857A4C37A3A004
B9A36030138810F8A900857AA675E03D
D0034C63B14C37A3203BDFA012844D60
Text:
0x2C170:
80A1B4CEEA06213C506476B4F1011124
3746566E87919BA5AFB9C3CDD7E1EBF5
0x2C370:
B6B6B6B6B6B7B7B7B7B7B7B7B7B8B8B8
B8B8B8B8B8B8B8B8B8B8B8B8B8B8B8B8
0x2F690:
F0D99055F0E1A096CE3CF00A3433FBF0
4D2E2FAE46FDD0A266F0F2342DAE632E
ECF40AFBEE852EA0603237F0AA343D36
3463FDFFF40A37E0DE3334323BF0EB34
33A0603237F0AA343D363463FDFFF5A0
A33130333B680A663E643D333433FBF0
EB90A63364343B63FDFFF4A0A3313033
3B680A663E643D333433FBF0EB90A633
64343B63FDFFF50A37E0DE353B343390
A63364343BFBD0EB2F342D2D3E2D63FD
FFF40A37E0DE353B343390A63364343B
FBD0EB2F342D2D3E2D63FDFFF5A0A31A
181B1B1413B0EBA0A63364343B7AFDFF
F4A0A31A181B1B1413B0EBA0A6336434
3B7AFDFFF5A0A2F4A089D0EB323E3C31
F0F2CEB0FDFFF5612EB0F03DFBD0653B
3E2E2F0AFB32F0EC353833343D3234B0
EBB0B763FDF0A568A096333E64312F90
B33031383BF0EA68FBD0E83B343033EE
B0FDFFFBF4612EB0F03DFBD0653B3E2E
2F0AFB32F0EC353833343D3234B0EBB0
B763FDF0A568A096333E64312F90B330
31383BF0EA68FBD0E83B343033EEB0FD
FFF580A3653832F0E82D383E642E7AFD
FFF480A3653832F0E82D383E642E7AFD
FFF5612EB0F03DFB3630D0EB2E3F3434
337AFDFFF4612EB0F03DFB3630D0EB2E
3F3434337AFDFFF5612EFBF0F03D0A2D
F0AA687AFDFFF4612EFBF0F03D0A2DF0
AA687AFDFFFBF5A0A2F4A06531F0F22F
3B343390E8300A332D30667AFDFFF5A0
A2F48065313E2F37B0E6343D0A663E64
3D3334337AFDFF3364343B0A2F34672F
FF3364343B0A2F34672FFF3364343B0A
2F34672FFF3364343B0A2F34672FFF33
64343B0A2F34672FFF3364343B0A2F34
672FFF3364343B0A2F34672FFF336434
3B0A2F34672FFF3364343B0A2F34672F
FF3364343B0A2F34672FFF3364343B0A
2F34672FFF3364343B0A2F34672FFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
44D0-44EF = rare duel list (for rulers mainly)
44F0-450F = bigger no an sha list
July 23, 2012 at 3:40 pm #43949sonic.penguin
ModeratorAwesome, will be sure to present you w/ a list of bugs before too long, hehe. Looks promising! On second thought, maybe I'll just hold off until you get the text bugs fixed… unless these changes won't affect the text banks?
July 23, 2012 at 3:52 pm #43950MiDKnighT
ModeratorQuote:Awesome, will be sure to present you w/ a list of bugs before too long, hehe. Looks promising! On second thought, maybe I'll just hold off until you get the text bugs fixed… unless these changes won't affect the text banks?You can get it to work with DoaEditor…I just did. Here's what you do.
1. Open your ROM with DoaEditor and painful click through all the key errors.
2. Go to the text tab and go to the bottom.
3. Look for any text above and below the "Duel" text and fix it. In mine the one above the duel text had like a bazillion lines. Simply change it to say:
open slot[END]
4. Save your ROM with DoaEditor.
5. All better now.
July 23, 2012 at 3:52 pm #43951MiDKnighT
ModeratorGive it a try but take a backup first of course.
If you want to reduce the # of An Sha's simply make draws more likely. To do this change:
0x49BB: 0A
0x4A15: 0A
Increase this number and draws will be more likely.
July 23, 2012 at 3:57 pm #43952sonic.penguin
Moderatorquestion, if you lose, does your own guy get ansha'd?
and next would a "guard" fix be too much?
-
AuthorPosts
- You must be logged in to reply to this topic.

