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 15, 2012 at 10:17 pm #43893
MiDKnighT
ModeratorWell I haven't started coding yet but I did have some other "Duel" ideas… Before I said the duel results could be:
– A clear winner (loser is An Sha'd)
– A draw (nothing happens, both go back and continue)
– One participant is injured (Yi Xin status, loss of Bei Ji/Qi Shou status, possible troop loss)
– MAYBE: Both participants are injured and each get Yi Xin status and loss of Bei Ji/Qi Shou status.
But an "An Sha" isn't really "death" because life, raise, and resurrect can bring them back. Really "An Sha" is wounding them. What if a possible outcome of a duel was DEATH. Ie…the loser is actually killed and no longer seen in the game. Obviously we would need some protections with this like a "no kill" list and maybe some stat protections but wow that would be serious. You could permanently lose a guy (or an enemy) if they get killed in a duel. I would make the "devastating" wins somewhat rare unless there is a complete mismatch (Lu Bu vs Song Yong). So now I'm thinking the possible results are:
– A devastating win (loser is KILLED and removed from the game).
– A clear winner (loser is wounded aka An Sha'd).
– Both participants are wounded (An Sha'd).
– Loser flees, his men doubt his ability to lead (Yi Xin)
– A draw (nothing happens, both go back and continue).
July 16, 2012 at 9:57 am #43894DragonAtma
ModeratorDon't make a no-kill list; make a can-be-killed list, as anyone who's anyone shouldn't have to worry.
And it feels to me that Yi Xin would be a minor injury that takes a few days of rest to recover from, while doubt (aka morale loss) would be the loss of Qi Shou, Bei Ji, etc.
July 16, 2012 at 1:21 pm #43895MiDKnighT
ModeratorQuote:Don't make a no-kill list; make a can-be-killed list, as anyone who's anyone shouldn't have to worry.Well I was also going to have stat protections too. That would protect the best officers. Like anyone with STR > 220 can't be killed UNLESS they are on a different list… A matchup kill kind of list… The matchup kill list is a list of officers with a victor and loser. Ie… Something I was going to do for the Yuan Shao mod was if Guan Yu ever dueled Yan Liang or Wen Chou he KILLS them. Nobody else would be able to kill Yan Liang or Wen Chou because their STR is > 220. Other examples would be Guan Yu/Hua Xiong or Sun Jian/Hua Xiong.
If an officer has INT > 200, they would refuse any duel that could result in their death (ie…where they are badly mismatched).
July 16, 2012 at 2:21 pm #43896MiDKnighT
ModeratorProgress:
1. Add Jumps – done
2. Add Protect – done
3. Add Protect A.I. – done
4. Enhance An Sha
5. Add An Sha A.I.
6. Duel Success/Fail (does the target agree to duel?)
7. New Duel Text – New text bank?
8. Duel Mechanics – What is the outcome of the duel?
9. Duel A.I. – who proposes the duel and to who?
I'll probably have to talk to Niahak about #7.
July 16, 2012 at 6:30 pm #43897DragonAtma
ModeratorHey, #5 pulled a Brave Sir Robin!
…that said, I'm in the mood for some pseudocode (not to be confused with sudowoodocode). Gimme a
bitday or two and I'll write up some formulas for duel offer/acceptance and duel results.July 17, 2012 at 6:20 pm #43898MiDKnighT
ModeratorProgress:
1. Add code jumps – done
2. Add Protect – done
3. Add Protect A.I. – done
4. Enhance An Sha – done
5. Add An Sha A.I. – done
6. Duel Success/Fail (does the target agree to duel?)
7. New Duel Text – New text bank?
8. Duel Mechanics – What is the outcome of the duel?
9. Duel A.I. – who proposes the duel and to who?
I'll probably have to talk to Niahak about #7.
Protect Details:
– Protect combines Wuo Jian, Shui Jian, and Cheng Nei into 1 tactic.
– If it is cast with Ji Rou/Guard, Ji Mian, or Ce Mian active it will fail.
– Enemy A.I. won't cast "Protect" with Ji Rou/Guard, Ji Mian, or Ce Mian active.
An Sha details:
– The attacker's INT will be compared to the defender's INT. If the defender has 20+ more INT than the attacker then An Sha will fail.
– If the defender is smarter than the attacker (by less than 20) then it's possible for the tactic to succeed but it will be pretty rare.
– If the attacker is smarter than the defender, the more he is smarter the better the chance An Sha will succeed.
– But if an officer has INT > 160, it will be twice as hard to An Sha them vs an officer with INT < 160.
– There is an additional "No An Sha" list where you can add up to 32 officers (in addition to the original 7).
– There is a "secret sauce" formula to generate a "random number" that won't change much in battle unless major changes happen in the battle. That will make save state hacking a lot tougher if not impossible. If you save state and re-cast An Sha over and over, you'll almost definitely get the same result every time.
– As for An Sha A.I., an enemy won't attempt An Sha on someone who is 15+ INT smarter than them.
Will start looking at "Duel" later today.
July 17, 2012 at 10:51 pm #43899MiDKnighT
ModeratorStarted looking at the duel tactic but have to figure out how to call various text boxes with new text to be able to do everything we hope to do. Asking for help on it…
http://www.lordyuanshu.com/forums/topic/paging-meteorstrike-niahak-and-ludmeister
July 18, 2012 at 1:05 am #43900DragonAtma
ModeratorAccording to my notes…
-=-=-
So there are six types of characters. This is the priority they're assigned.
1. Force leaders [assign a field of 16 for the game to consult]: modder's choice, but presumably Liu Bei, Cao Cao, JIN XUAN CONUEROR OF WORLDS, Yuan Shu, etc. They do NOT like to offer or accept, often send out a high-str ally, and have lighter refusal penalties.
2. Strategists [assign a field of 16 for the game to consult]: modder's choice, but presumably Zhuge Liang, Jia Xu, Lu Xun. etc. Also whoever the player's strategist is. They're less likely to offer or accept but extra-fond of sending out a high-Str ally instead.
3. Str. Battle leader: Whoever's in the first slot. If defeated, this slot is empty as long as they're at 0 HP. They offer and accept a bit less than than normal and occasionally send a high-Str officer, especially if they would qualify as an Int officer.
4. Str officer [assign a field of 16 exceptions for the game to consult]: Officers whose Str is equal or greater than their Int. Also officers in that field (such as 204 str, 212 int Pang De). The default that every officer in china is judged by.
5. Int officer [assign a field of 16 exceptions for the game to consult]: Officer whose str is less than their Int. Also officers in that field (such as 216 str, 204 int Cao Pi) are reassigned, but only if they were priority 4. They offer and accept as much as str offciers, but are willing to send a higher-Str ally.
6. Worthless [assign a field of 16 for the game to consult]: modder's choice, but presumably Liu Shan, Xiahou Mao, George W. Bush, etc. Bandit force, Rebel force, Pirate Force, and Brigand Force (but not the 10,261-strong Pirates that guard Qing Long, unelss you assign them a slot) automatically go here too. They have the highest accept rate (but a low offer rate) and tend to do worse than their stats suggest, so please restrict it to useless pushovers!
Assigning fields of eight spaces each for most categories should be enough, but why limit it? We're expanding the game's size, so we have lots of room! Also there should be a field of 16 3-byte entries (officer, battle to trigger, new rank) where an officer (such as, oh, SIMA YI) promotes/demotes to a different category after a specific battle.
-=-=-
So if I don't get a chance to finish this on time, I recommend you use those types.
July 18, 2012 at 1:30 am #43901MiDKnighT
ModeratorThat sounds like the phase 6 stuff. I'm going to make duel accept/reject/outcome mostly stat based unless we can merge it with phase 6 at some point in the future. That is…if I can get the stinking text boxes working…ugh…
July 18, 2012 at 4:48 pm #43902MiDKnighT
ModeratorProgress:
1. Add code jumps – done
2. Add Protect – done
3. Add Protect A.I. – done
4. Enhance An Sha – done
5. Add An Sha A.I. – done
6. Get a Duel text box message system working – done
7. Find places to put new duel text. – done
8. Duel Success/Fail (does the target agree to duel?)
9. Duel Mechanics – What is the outcome of the duel?
10. Duel A.I. – who proposes the duel and to who?
July 19, 2012 at 7:23 pm #43903MiDKnighT
ModeratorProgress:
1. Add code jumps – done
2. Add Protect – done
3. Add Protect A.I. – done
4. Enhance An Sha – done
5. Add An Sha A.I. – done
6. Get a Duel text box message system working – done
7. Find places to put new duel text. – done
8. Duel Success/Fail (does the target agree to duel?) – done
9. Possible penalty for rejecting a duel – WORK IN PROGRESS
10. Duel Mechanics – What is the outcome of the duel?
11. Duel A.I. – who proposes the duel and to who?
More on Duel Success/Fail (does the target agree to duel?):
– Generals with INT < 150 will not consider their opponents stats. They will compare their own STR against a secret sauce random number and decide whether or not to duel. The higher their STR the more likely they are to accept the duel. There *may* be punishment for not accepting the duel.
– Generals with INT between 150 and 220 will look at their STR vs their opponent's STR and decide whether they have an advantage. If they do they will accept the duel. If it's close or they have a slight advantage, they will compare their own STR against a secret sauce random number and decide whether or not to duel. Again the higher their STR the more likely they are to accept the duel. There *may* be punishment for not accepting the duel.
– Generals with INT > 220 or generals on the "No Duel list" (32 slots) will not duel but they WILL send a stronger ally out if they see an advantage. If they do not see an advantage they will simply reject the duel. These generals will not be punished for rejecting the duel.
Next I'll work on possible punishment for not accepting the duel for the first 2 groups.
July 19, 2012 at 7:51 pm #43904DragonAtma
ModeratorKeep in mind that even people on the Do Not Duel list should consider making an exception if Li Ru and his 18 Str offers a duel.
As for using int, I'd take the challenger's str, then modify it in a random direction by a random, int-based number. So if Liu Feng has 180 war, Tian Feng may estimate his str as a random number between 175 and 185, while Wang Shuang may estimate it as a random number between 130 and 230. Remember, even an idiot can tell that an old guy with a cane probably doesn't have 240 Str.
July 19, 2012 at 8:03 pm #43905MiDKnighT
ModeratorThe duel accept/reject is already coded and it took a lot of work so I'm not too open to changes at this point (changing the middle of the assembly code makes you have to re-do the whole thing). However, the Li Ru example should be easy enough to add since it's at the end. Perhaps if they (INT > 220 or "No Duel List" officer) have a STR advantage of 50+ they accept even if they don't have a stronger ally.
The 2nd suggestion would be too hard to change at this point. However, STR is not the final say in who wins the duel. So even if someone is stronger they may not always win. So the intelligent guys don't know for sure who will win, they just see a STR advantage. Right now I'm thinking that deciding who wins a duel would come down to:
40% – their own STR
20% – their own AGI
20% – their party leader's STR
20% – secret sauce random number (each duel participant gets a different number)
Would add up to their "Duel Success Factor" which would be compared to their opponent's "Duel Success Factor". Then…
If the difference between the "Duel Success Factors" are close, then there may be a draw.
If there is a moderate difference in the "Duel Success Factors" then there is a clear winner and a clear loser.
If there is a big difference in the "Duel Success Factors" then it's possible the loser gets KILLED, loses (An Sha), or flees in terror (with a penalty).
Anybody who wins a duel *may* receive an agility boost, a "Bei Ji" boost, or both.
July 19, 2012 at 8:55 pm #43906MiDKnighT
ModeratorQuote:Keep in mind that even people on the Do Not Duel list should consider making an exception if Li Ru and his 18 Str offers a duel.This part is done. I guess I can't call it the "No Duel" list anymore, maybe just the "Rare Duel" list. Here's how it works:
– The INT > 220 or "Rare Duel List" officer will look for a stronger ally. If they find one they send them out to duel. If they can't find one (ie…they are the highest STR general alive on their team), they compare their STR vs the attacker. If it is 50+ higher then they accept the duel.
So I've been testing against Dong Zhuo and Hua Xiong. Dong Zhuo is on the "rare duel" list. Here's the results:
– Strong general requests a duel with Dong Zhuo, Dong Zhuo sends Hua Xiong to duel (but only if Hua Xiong is stronger).
– Weak general requests a duel with Dong Zhuo, Dong Zhuo sends Hua Xiong to duel.
Then I kill Hua Xiong… Now Dong Zhuo is the strongest on his team left:
– Strong general requests a duel with Dong Zhuo, Dong Zhuo rejects the duel.
– Weak general requests a duel with Dong Zhuo, Dong Zhuo accepts the duel.
July 19, 2012 at 10:01 pm #43907shifter420
Participanti dont really like these improvements, the mods are hard enough when they use raise on alive generals :( or other spells that are already in play
-
AuthorPosts
- You must be logged in to reply to this topic.

