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
-
August 11, 2012 at 2:44 pm #44275
MiDKnighT
ModeratorThe only way my changes would make Zhuge Liang attack more is if he is trying to use a tactic that the A.I. won't let him. Like if he's trying to do Ce Mian when it is already active.
August 11, 2012 at 2:56 pm #44276MiDKnighT
ModeratorPerhaps I can do a quick fix for guys like Zhuge Liang but I'd need to expand the ROM again to do the full "officer profiles enhancement".
My idea for the "general profiles" enhancement. Each "profile" would have 16 slots (one line of hex) where you'd put slot numbers and "FF" for attack. Let's say you have an officer where you want him to attack 75% of the time and use duel (in slot 03) 25% of the time. His profile would look like this:
FF FF FF FF FF FF FF FF FF FF FF FF 03 03 03 03
Then we randomly pick one of those to decide what that officer will do. Then the normal A.I. stuff is used. For someone like Zhuge Liang maybe he only attacks 1 in 16 so it would be something like:
FF 00 00 00 01 01 02 02 03 03 03 04 04 05 06 07
Or perhaps have a defensive profile that favors healing, life/raise, and guard/protect (in slots 04 and 05). His profile might be:
FF 02 02 02 02 02 03 03 03 03 04 04 04 05 05 05
Anyways I gotta run, will be back later.
August 11, 2012 at 6:24 pm #44277sonic.penguin
ModeratorYeah, somehow we've gotta get ZGL and his like to almost never attack. It makes it so cheap when he whacks a 500 vs. a Zhang Fei power hit of 3,000 normal hit
August 11, 2012 at 6:28 pm #44278MiDKnighT
ModeratorI may have found a way to do the "officer profiles" thing without expanding the ROM (by using page 1E and not accessing memory). I think I'll just go ahead and work on that.
August 11, 2012 at 7:26 pm #44279sonic.penguin
ModeratorYeah, something is messed up. ZGL just keeps attacking no matter if guard or protect is up…
Okay, so rather than having a unique profile for every officer, you'd have, say 8 different profiles that you could plug in hex id's for to reference each one and in special cases they would use "Negate" and such? I like the idea because atm its just too all over the place. Zhang Fei should be shouting duels like every turn…
ALSO, any way that you can make Duel always succeed even under 'Thwart' status so as to create an alternative for the stupid guys instead of only being cancellable by 'Negate' ?
August 11, 2012 at 7:59 pm #44280MiDKnighT
ModeratorQuote:Yeah, something is messed up. ZGL just keeps attacking no matter if guard or protect is up…Hmm, if you like you can send me your latest rom + save state so I can see it and find out why.
Quote:Okay, so rather than having a unique profile for every officer, you'd have, say 8 different profiles that you could plug in hex id's for to reference each one and in special cases they would use "Negate" and such? I like the idea because atm its just too all over the place. Zhang Fei should be shouting duels like every turn…There will be as many profiles as you like within reason (probably like 20). You'll be able to assign a profile to a general. For example Zhang Fei and Lu Bu would probably have the same profile, etc…
Quote:ALSO, any way that you can make Duel always succeed even under 'Thwart' status so as to create an alternative for the stupid guys instead of only being cancellable by 'Negate' ?Let me get the other stuff done then I can dig into this and see.
August 12, 2012 at 12:36 am #44281DragonAtma
ModeratorHmm, I wonder if you can set your team to auto… it'd be like All-Out, only they're actually using skills!
August 12, 2012 at 2:53 am #44282sonic.penguin
ModeratorWell, then there'd be no point in playing then right? Hmm, let me retry the latest patch and try updating w/ the hex again. I do like the idea of having officer profiles and attack patterns. An officer that focuses 80% on healing would be a big target!
August 12, 2012 at 2:56 am #44283sonic.penguin
ModeratorOh, almost forgot, I did apply that part of the code (which you later erased) to my mod. Would that affect things or would it have been overwritten w/ the update?
August 12, 2012 at 3:09 am #44284DragonAtma
ModeratorPeng, keep in mind that the AI would be inferior to if the player picked commands by hand; it'd merely be a saner version of All-Out.
And, of course, someone could use ONLY that as a challenge play-through…
August 12, 2012 at 3:13 am #44285sonic.penguin
ModeratorYeah I guess you're right, but usually All-out is just to wrap up a battle that is already won. I'm testing it more, but it seems that no one is really even using tactics in my mod now that I'm paying more attention to it
August 12, 2012 at 3:24 am #44286sonic.penguin
ModeratorOkay, I have a WORKING copy where people are using tactics again HOWEVER it is a pre-IPS version Aug. 7th pre-patch, so essentially, not to point the finger, but something in the IPS patch is screwing it up and causing enemy officers not to use tactics.
Upon checking my older version, even good old Zhang Fei started using tactics in his measly fashion again on the very first turn, ZGL buffed everyone and my whole party died in 3 turns :P
August 12, 2012 at 5:18 am #44287MiDKnighT
ModeratorQuote:Oh, almost forgot, I did apply that part of the code (which you later erased) to my mod. Would that affect things or would it have been overwritten w/ the update?Probably still relevant. Just need to add more. I have no idea why your smart dudes aren't using tactics. Would need to see a ROM + save state to understand why. I'm getting more of a handle on the default A.I. Here are my notes:
00:A6EA:20 3B DF JSR $DF3B
00:A6ED:A2 06 LDX #$06
00:A6EF:B9 A8 61 LDA $61A8,Y @ $61B3 = #$34 <– Check INT
00:A6F2:D9 9C 61 CMP $619C,Y @ $61A7 = #$50 <– Compare INT to STR
00:A6F5:90 2A BCC $A721 <– If INT > STR, skip ahead
00:A6F7:DD 3B A8 CMP $A83B,X @ $A840 = #$C8
00:A6FA:B0 03 BCS $A6FF
00:A6FC:CA DEX
00:A6FD:10 F8 BPL $A6F7
00:A6FF:A5 7D LDA $007D = #$17
00:A701:29 07 AND #$07
00:A703:A8 TAY
00:A704:BD 42 A8 LDA $A842,X @ $A847 = #$1C
00:A707:18 CLC
00:A708:79 49 A8 ADC $A849,Y @ $A854 = #$78
00:A70B:10 02 BPL $A70F
00:A70D:A9 00 LDA #$00
00:A70F:85 F3 STA $00F3 = #$04
00:A711:A5 AE LDA $00AE = #$CD
00:A713:65 AF ADC $00AF = #$C4
00:A715:29 1F AND #$1F
00:A717:C5 F3 CMP $00F3 = #$04
00:A719:B0 2D BCS $A748
00:A71B:20 9B A8 JSR $A89B <— Find a tactic
00:A71E:4C 48 A7 JMP $A748 <– All done?
00:A721:DD 51 A8 CMP $A851,X @ $A857 = #$F0 <– Check INT against a value
00:A724:B0 03 BCS $A729
00:A726:CA DEX
00:A727:10 F8 BPL $A721
00:A729:A5 7D LDA $007D = #$17
00:A72B:29 07 AND #$07
00:A72D:A8 TAY
00:A72E:BD 58 A8 LDA $A858,X @ $A85E = #$18
00:A731:18 CLC
00:A732:79 5F A8 ADC $A85F,Y @ $A866 = #$F4
00:A735:10 02 BPL $A739
00:A737:A9 00 LDA #$00 <– Going to attack
00:A739:85 F3 STA $00F3 = #$00 <– Going to attack
00:A73B:A5 AE LDA $00AE = #$B1
00:A73D:65 AF ADC $00AF = #$74
00:A73F:29 1F AND #$1F
00:A741:C5 F3 CMP $00F3 = #$00 <– Are we going to attack?
00:A743:B0 03 BCS $A748 <– Skip to A748
00:A745:20 9B A8 JSR $A89B <— Find a tactic
00:A748:A2 FF LDX #$FF
The thing is… I haven't changed any code on when it decides to attack. The only thing I can think of is that your smart dude is trying to do something that the A.I. doesn't like then it's eventually reverting back to an attack. With ROM + save state I'd know exactly what's going on.
August 12, 2012 at 4:29 pm #44288MiDKnighT
ModeratorWell I got the profile lists working but it broke the damage calculations then my FCE Ultra froze up and I lost my changes. Ugh… Will give it another whirl soon.
August 12, 2012 at 7:56 pm #44289sonic.penguin
ModeratorSent it! And it's not just high level/INT people, its ALL enemy officers and its only affected by the August 7th patch.
-
AuthorPosts
- You must be logged in to reply to this topic.

