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
-
December 21, 2012 at 4:46 pm #44407
MiDKnighT
ModeratorNow tracing to see what parts of the profile it's looking for each time around. We want it to eventually read $A54F to fight and get it out of the loop:
1E:A729:B1 B7 LDA ($B7),Y @ $A549 = #$03
1E:A729:B1 B7 LDA ($B7),Y @ $A549 = #$03
1E:A729:B1 B7 LDA ($B7),Y @ $A54A = #$03
1E:A729:B1 B7 LDA ($B7),Y @ $A54A = #$03
1E:A729:B1 B7 LDA ($B7),Y @ $A54A = #$03
…
…bunch of times…
…
1E:A729:B1 B7 LDA ($B7),Y @ $A54F = #$FF
But even when it finds FF it's not breaking out of the loop? Looks like the reason is it's still deciding to use "protect" and the A.I. isn't letting it (again). Here's where it decides:
$A91B:BE A0 65 LDX $65A0,Y @ $65DB = #$11 <– Load enemy tactic to X
$A91E:BD A1 B8 LDA $B8A1,X @ $B8B2 = #$03 <– This is slot 03
$A921:C5 F4 CMP $00F4 = #$03 <– Is it slot 03? If yes then use that tactic
$A923:F0 07 BEQ $A92C
$A92C:A6 78 LDX $0078 = #$05
$A92E:B9 A0 65 LDA $65A0,Y @ $65DB = #$11 <– Load tactic to accumulator
$A931:F0 14 BEQ $A947
$A933:C9 FF CMP #$FF
$A935:D0 08 BNE $A93F
$A93F:9D 00 62 STA $6200,X @ $6205 = #$11 <– This is what I'm going to do!
$A942:A9 1E LDA #$1E <– Go to A.I. code
$A944:20 82 C4 JSR $C482 <– Go to A.I. code
$A947:4C 00 80 JMP $8000 <– Go to A.I. code
So somehow when it chooses "FF" I have to tell it NOT to use a tactic no matter what.
December 21, 2012 at 4:59 pm #44408sonic.penguin
ModeratorHmm, to add 2 cents to this, this occurred even before the officer personality was set up. I set up the officer personality just so it would use protect every time, but the glitch still occurred even w/ out the custom personality. It occurs even when going 'all-out'
Maybe it is Yuan Shu trying to sabotage the mod before it comes out…
December 21, 2012 at 7:26 pm #44409MiDKnighT
ModeratorI think I have it. Fix on the way.
December 21, 2012 at 7:43 pm #44410MiDKnighT
ModeratorFix is ready, it solves the hang issues in all your save states. There can be a minor pause after you enter in all your turns if it has trouble finding something to do. In Hua Xin's case he only had 1 of his 16 options available since Protect was already active. To avoid this pause try to give officers more than 1 option out of 16 (which was the case for Hua Xin with protect already active).
Since it overlaps a bit, I'll revise my previous fix:
0x05A00:
A6789DD0619D0062203BDFA206600000
0x79980:
A900C5F3F0034C96A8A2FF86F34C47A7
0000000000000000000000A9012082C4
000000000000A9012082C44CFAA6A901
2082C44CC0990000000000BA86BFE010
B0034C7099E07090034C70994C40A700
BAE010B009E8BD0001C91DD00160A206
4CEAA600000000000000000000000000
0x7A030:
00000000000000A90E2082C44C27A000
0x7A750:
A90E2082C40000A90E2082C400000000
What it does…
1E:9970:A9 00 LDA #$00 <– Check to see if we're attacking
1E:9972:C5 F3 CMP $00F3 = #$05
1E:9974:F0 03 BEQ $9979
1E:9976:4C 96 A8 JMP $A896 <– If using tactic jump here
1E:9979:A2 FF LDX #$FF
1E:997B:86 F3 STX $00F3 = #$05
1E:997D:4C 47 A7 JMP $A747 <– If attacking jump here
01:99F0:A6 78 LDX $0078 = #$05
01:99F2:9D D0 61 STA $61D0,X @ $61D5 = #$00 <– If we're attacking clear tactic status
01:99F5:9D 00 62 STA $6200,X @ $6205 = #$11 <– If we're attacking clear tactic
01:99F8:20 3B DF JSR $DF3B
01:99FB:A2 06 LDX #$06
01:99FD:60 RTS
December 21, 2012 at 7:44 pm #44411sonic.penguin
ModeratorOkay, let me try it out. I'll break it soon!!!! :cactuar:
December 21, 2012 at 7:45 pm #44412sonic.penguin
Moderatoroh, perhaps put these changes into an updated IPS patch as well?
You were right about the slight hang, but it is working atm. You da man!
December 21, 2012 at 7:51 pm #44413sonic.penguin
ModeratorMajor problem, something mustve written over some town GFX data…
December 21, 2012 at 8:03 pm #44414MiDKnighT
ModeratorQuote:Major problem, something mustve written over some town GFX data…Really? Where?
December 21, 2012 at 8:29 pm #44415sonic.penguin
Moderatorah, scratch that. Upon my last import of GFX I typed in the wrong address :P
December 21, 2012 at 8:37 pm #44416sonic.penguin
ModeratorOkay, seems to be working now. Thanks for checking into it. Back to work!
Also, any ideas also on increasing the officer and inn price without breaking the game?
I'm really pushing this mod for more balance in the economy and the players is really going to have to forego some weapons in light of saving the $$$$ for both recruiting officers and buying food.
December 21, 2012 at 10:46 pm #44417MiDKnighT
ModeratorAgg… More assembly work! I actually figured out the recruiting thing already but I put it in a bad spot which broke something. I'd have to find the old post where I did that and start from there.
December 22, 2012 at 4:31 am #44418sonic.penguin
ModeratorWork faster, slave!!

Nah its cool, whenever you get around to it :)
December 22, 2012 at 4:36 pm #44419MiDKnighT
ModeratorDecember 22, 2012 at 4:49 pm #44420MiDKnighT
ModeratorIPS patch and Yuan Shao mod have been updated with the fix on box.com.
https://www.box.com/files/0/f/268117333#/files/0/f/268117333
December 22, 2012 at 5:05 pm #44421DragonAtma
ModeratorBut… but box-ing day isn't for another four days!
-
AuthorPosts
- You must be logged in to reply to this topic.

