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, 10 months ago by
MiDKnighT.
-
AuthorPosts
-
July 11, 2012 at 1:49 pm #43846
sonic.penguin
ModeratorQuote:Now to get sonic all excited… Imagine Lu Bu leading a party… That makes everyone under him a better "dueler" and makes Lu Bu himself nearly invincible in duels.:lsd:
July 11, 2012 at 5:02 pm #43847MiDKnighT
ModeratorWoohoo…the following tactics are working now (enemy doesn't repeat them when already active):
Ce Mian
Ji Mian
Ji Rou
Wuo Jian
Shui Jian
Cheng Nei
Now just need to work on the ones that require targeting:
Yi Xin
Li Jian
Qi Shou
Bei Ji
And make sure that the enemy has negate to switch to it when Ce Mian is in effect. UPDATE: Now it only switches to negate if they have the tactic. Yay!
July 11, 2012 at 6:34 pm #43848sonic.penguin
Moderatorcode…code…code
July 11, 2012 at 6:41 pm #43849MiDKnighT
ModeratorQuote:code…code…codeWorking on it. I'm up to about 100 lines of code (18 lines of hex) and counting so far. Biggest enhancement I've ever done…
Last part of phase 2 will be the "targeted" tactics but I've got to set up all the jumps for that which is a major pain.
July 11, 2012 at 7:00 pm #43850sonic.penguin
ModeratorQuote:enemy doesn't repeat them when already activebut do they switch between them?
July 11, 2012 at 7:11 pm #43851MiDKnighT
ModeratorQuote:but do they switch between them?I'll lay out all the code details when I'm done but here's what it does. Let's say Wuo Jian had already been cast before and the default DOAE engine decides to (stupidly) do it again. My code basically says:
If tactic = Wuo Jian
…then check to see if it is already enabled
…if already enabled
…then increment a random number generator and go back to the top and pick something else
So far this is working great… Unless you were using a debugger you would never know that it had originally tried to cast Wuo Jian. During game play you'll just see it casting other tactics that aren't already active. It will just miraculously stop using Wuo Jian if it's active. But if Wuo Jian is negated it will be ok for the A.I. to use it again.
July 11, 2012 at 8:01 pm #43852MiDKnighT
ModeratorOK! Finished out easier than I thought. It's ready for testing! I need some testers to verify that the A.I. is working as advertised. I've added the changes to the Yuan Shao mod for testing:
https://www.box.com/s/70fe97d0d9ee91445bf7
Once we get a couple of people to verify that it's working ok I'll release all the changes.
What to look for:
– Enemies with INT > 180 should be complete bastards now as they should not re-use tactics that are already active… Difficulty should be a lot higher against smart enemies but I don't know by how much yet…
– If Thwart is already active, they won't run it again (unless negated or expired).
– If the good guys used Thwart, smart enemies (180+) with negate will only attack or attempt to negate.
– If Evade is already active, they won't run it again (unless negated or expired).
– If Guard is already active, they won't run it again (unless negated).
– If Douse is already active, they won't run it again (unless negated).
– If Levee is already active, they won't run it again (unless negated).
– If Barrier is already active, they won't run it again (unless negated).
– If Doubt is already active vs one of your allies, they shouldn't try to doubt the same person.
– If Mislead is already active vs one of your allies, they shouldn't try to mislead the same person.
– If Haste is already active for one of the bad guys, they won't run it again (unless negated).
– If Rally is already active, they won't run it again (unless negated).
I will test too but would appreciate others testing it out to look for any of the above statements not being true or any game freezes, crashes, etc…
July 11, 2012 at 8:36 pm #43853MiDKnighT
ModeratorBeen testing it some. Difficulty has increased but not tooooo much. Major battles are actually more epic now as the enemy is a bit more intelligent and not doing stupid things. I just tried 3 boss battles and I only saw the enemies with 180+ INT do 2 stupid things:
– Did negate when there was nothing to negate. This isn't too bad as you might have just casted something and it could cancel your stuff before it really starts.
– Healed someone else who was fully healed when the caster was hurting. Ya this one kinda sucks but not sure how to address this just yet.
July 11, 2012 at 9:50 pm #43854sonic.penguin
ModeratorTesting it. Youre right, the AI acts more logically now although not too much more difficult, although I'd probably like to bump the 180 around to different values more mod-specific…
EDIT: Just tried final battle… code makes it REALLY hard to do much vs. 4 heavy tactic users that are = or + your intelligence. I barely took down Cao Cao and the other 4 guys wasted me as I ran out of TP. With a code like this, tactic cost will have to be changed.
July 11, 2012 at 10:04 pm #43855MiDKnighT
ModeratorQuote:although I'd probably like to bump the 180 around to different values more mod-specific…Yep, I'll leave instructions on how to change that value once testing is done.
Quote:EDIT: Just tried final battle… code makes it REALLY hard to do much vs. 4 heavy tactic users that are = or + your intelligence. I barely took down Cao Cao and the other 4 guys wasted me as I ran out of TP. With a code like this, tactic cost will have to be changed.Or it would have to be re-balanced. This change tips the scale towards the enemies a bit. It also depends on what you set the "180" to. If I had set it to "240" then the final battle wouldn't have changed that much.
July 11, 2012 at 10:08 pm #43856MiDKnighT
ModeratorWow ya you're right, the final battle they don't play around.
If I keep these changes in the mod I might have to tone down a couple of fights… But once I make Thwart, Evade, and Guard mutually exclusive that might also help tone it down.
July 12, 2012 at 12:32 am #43857MiDKnighT
ModeratorRally / Bei Ji isn't working right. They are still calling that one even after active… Will investigate…
Same thing probably happening with Haste / Qi Shou. The format that they are using for those is different…
July 12, 2012 at 12:34 am #43858Xu Yuan
ParticipantI really like these ideas. And it's great to see you made progress with them! But shouldn't an enemy also have limited resources, just as you do? Shouldn't they have a TP limit and not be able to spam whatever they want for the rest of time?
Or is that an old hack that's been done a long time ago.
July 12, 2012 at 12:36 am #43859MiDKnighT
ModeratorThat idea has been tossed around for a while. It would take some effort… Perhaps the amount of TP the enemy has depends on chapter and battle ID. Of course, they *should* have more TP than you since they are defending…
EDIT: The framework I'm using for these changes would actually work pretty well for subtracting enemy TP. I'd just have to stretch out my code some… If others are interested I can investigate further.
July 12, 2012 at 4:38 am #43860sonic.penguin
Moderatorwell, all youd have to do was wait for them to buff, negate them, and have them rebuff to waste TP. Would just cause players to "TP starve" them which wouldn't be too hard to do. Might eliminate the need to take them out fast though.
-
AuthorPosts
- You must be logged in to reply to this topic.

