Home › Forums › Destiny of an Emperor › DoaE math
Tagged: An Sha, Bei Ji, Fu Bing, MeteorStrike, Power Pil
- This topic has 16 replies, 9 voices, and was last updated 12 years, 2 months ago by Jiang Wei.
-
AuthorPosts
-
June 18, 2009 at 6:37 pm #4972yellowscarvesaregangstaParticipant
Hi, been a year since I discovered this site, and recently my DaoE craving has returned.
Being a computer science major, I'm interested in the development of AI's. So I decided to make a java AI that fights DaoE battles. I'll make a bunch of different AI's and I'll simulate thousands/millions of battles between them, to determine the optimal strategy for any situation. Then I can include 2-player or 1-player mode where you can battle against the AI or someone else, and manually set the starting armies, tactics, items, and terrain.
This project will be fairly straight-forward, except for a few things: built-in variables and formulas. I'd like to know the following:
1) How is an attack's damage calculated? I know it's a function of #troops, strength, weapon, and enemy armor, but does anyone know the exact formula?
2) What are the odds of doing heavy damage?
3) What are the odds of an attack getting repelled?
4) What formula (function of Agility) determines the order of who attacks?
4b–Does your formation have any affect on who attacks first among your own generals?
5) What formula (function of INT of attacker & defender) determines whether a tactic succeeds or fails?
6) What are the odds of a tactic like Ji Mian or Ce Mian wearing off in a given round?
7) What formula determines how much damage a successful fire or water tactic does?
8] What formula determines how many troops are healed by a healing tactic?
9) What are the odds of the standard AI attacking your front general? your 2nd? etc. (for a separate purpose of designing my AI to choose the optimal formation against the standard AI).
If no one knows these things, I'll just do the simulations while varying these numbers, and record different results for different conditions. I could also start taking stats during my DaoE battles to get estimates.
June 18, 2009 at 9:24 pm #36486NiahakModeratorThis topic may have all the wonderful gooey details; if not, you may be able to track down MeteorStrike and see if he's willing to help.
I don't know any of them myself, I'm afraid. Reading through assembly and following along is a bit much for me; I didn't want to learn the NES assembly.
This does sound like a cool project, though :) I should've thought of this as an assignment when I was a TA for the AI course in school…
June 18, 2009 at 11:46 pm #36487yellowscarvesaregangstaParticipantThat thread answered questions 7 and 8.
Meteor mentioned a damage calculator he once had on geocities, so he must know the answer to #1 as well (and judging by the reading, i have a feeling he knows the answer to all of them lol). So Meteor, i humbly request a small beam of the divine light that is your vast wisdom =)
I thought of a couple more questions, ones that perhaps non-gurus could answer:
1a) Could a Power Pill (or random heavy damage) be combined with either the Bei Ji or Fu Bing tactic?
1b) If heavy damage applies to Fu Bing, is the 2nd attack half of the heavy damage, or half of what the normal damage would have been?
2) Can Bei Ji and Fu Bing both be in effect on one officer at the same time?
(Though come to think of it, I don't think those two tactics can be in one's repertoire at the same time, so no one could have ever tested this out.)
EDIT:
3) Can a Power Pill attack be repelled? What about a Bei Ji attack? What about the 2nd attack of a Fu Bing attack?
4) How does the tactic damage formula change when a fire/water protection tactic is in effect? (this one's for Meteor ofc)
June 19, 2009 at 2:59 am #36488NiahakModeratorUnfortunately YSAG (may I call you that?) Meteor does not grace this esteemed forum with his presence :)
I'm not sure what your best bet to contact him is. James may know a way, or you may have to try posting at the gamefaqs board to get his attention.
I'm afraid I just haven't played enough DoaE to answer both of those. I think 1a) is true (Power Pill + Bei Ji), I just haven't had to try it.
June 19, 2009 at 5:54 am #36489Lord Yuan ShuKeymasterHey Yellow Scarves Gangster. Always good to hear DoaE research happening huohu
As for 1 – yes, you can use a Power Pill with Bei Ji and Fu Bing. A Power Pill attack will connect 100% of the time, unless Ji Mian is in effect. If an officer is just under Bei Ji though, the attack can be dodged. I am pretty sure you can dodge Fu Bing as well.
As for the Heavy Damage aspect of Fu Bing – I don't know off hand, but I'm leaning towards the double-damage happening for both parts of Fu Bing (including the 2nd, 'half' damage attack).
No, we cannot get Fu Bing and Bei Ji. Fu Bing is one of the earlier tactics on the bottom slot. Bei Ji is one of the last along with An Sha.
Regarding #4, the magic defense spells…It seems like it shields you to the tune of roughly half the damage you would normally be receiving. That's just me guessing from playing the game many times, I'm sure MeteorStrike has a more accurate reading if he's looked into it.
What's with DaoE? Destiny An Of Emperor? :)
Welcome to Lord Yuan Shu Walkthrough Guides ·
Huo Hu's Adventure started Destiny of an Emperor hackingJune 19, 2009 at 6:42 pm #36490yellowscarvesaregangstaParticipantQuote:What's with DaoE? Destiny An Of Emperor?Uhhh yeah…what game are YOU guys talking about?? Destiny Of An Emperor? What the heck game is that?? :P
What I'll do is allow some freedom with the tactics. I'll allow the user to give each army any combination of tactics, and user can also choose whether traditionally separate tactics can both be in effect at once. For instance, you can make an army have both Ce Mian and Ji Mian (or Fu Bing and Bei Ji), and you also decide whether both of those tactics can be used on your enemy at the same time. In addition, you'll get to choose whether an army has a tactician, or whether each officer has his own tactics (like enemy armies in DoaE) and own amount of TP. So my program will simulate many unrealistic scenarios but the ai will be that much smarter as a result :D
Then if I ever learn NES assembly, i'll make a mod that replaces Capcom's AI with some version of mine, so the battles will be much harder. Or I can give Meteor my AI and tell him to make such a mod =)
For now, I'll go stalk/find Meteor.
What about like, the former Capcom employees who designed DoaE? Where are they hiding? :twisted:
June 19, 2009 at 8:08 pm #36491DragonAtmaModeratorActually, there may be AI armies that have someone using Fu Bing and someone using Bei Ji in the same party…
IIRC by releasing Mi Zhu or someone you can have someone AI using the third-tier fire skill in the same area as someone using first-tier fire skill!
June 19, 2009 at 8:43 pm #36492Lord Yuan ShuKeymasterhaha, the original DoaE makers are probably retired at this point. Game was released back when dinosaurs were around (ok not, but 1989 is close enough).
MeteorStrike may be a lost cause. I saw towards the end of his work he was mentioning something about real life and a job, so he may be busy lol huohu.
There can be no Fu Bing and Bei Ji. It is true that if you 'fire' Mi Zhu, he gets Yan Re in the first area while others have Lian Huo. However, it is impossible to have Lian Huo and Yan Re. Just as it's impossible to have Fu Bing and Bei Ji.
Well, if you could really create your own tactics, you could get some dominant combinations. How about Wan Fu, Jin Xian, Ce Mian, Ji Mian, Bei Ji and An Sha? Covers pretty much everything…
Welcome to Lord Yuan Shu Walkthrough Guides ·
Huo Hu's Adventure started Destiny of an Emperor hackingJune 19, 2009 at 10:13 pm #36493yellowscarvesaregangstaParticipantQuote:Well, if you could really create your own tactics, you could get some dominant combinations. How about Wan Fu, Jin Xian, Ce Mian, Ji Mian, Bei Ji and An Sha? Covers pretty much everything…The goal isn't to make the AI determine the ideal combination, but to determine the best strategy for each possible non-trivial and non-redundant combination.
Real life is for looozers, that's why I'm a poker player :D
June 25, 2009 at 8:00 am #36494UltraCraig64ParticipantThat would explain why I can't read your, can't read your, no I can't read y-your poker face. I preferred these strong tactics in DOAE2, because they were balanced better. What I mean is that these few tactics were not completely tantamount to success in a battle; there was a lot more to consider in major fights.
What!? Zhuge Liang controls even the heavens?
June 25, 2009 at 3:56 pm #36495Lord Yuan ShuKeymasterYa DoaE2 is all about regular attacks at high HP levels (since the damage done is tied so dramatically to the amount of current hp / total hp any given unit has). But, they have stuff like formations in DoaE 2. Thus it's more complicated.
Welcome to Lord Yuan Shu Walkthrough Guides ·
Huo Hu's Adventure started Destiny of an Emperor hackingJanuary 1, 2012 at 9:33 am #36496MeteorStrikeParticipantNice, I just realized my username is a tag and there is another topic referencing it… Well, it's been 2 years, so I guess this project is no longer active, but reading this reminded me that I should upload the Damage Calculator again to my new site. Since its a javascript page, anyone interested in knowing the formula can just look at the javascript code. I'll have to remind myself to upload it later.
I'm actually taking another break from DOAE for now. My recent rush to complete the DOAE 2 map generator before my vacation time ended left me a little exhausted. I didn't spend nearly as much time on it as I did on DOAE 2 stuff back in 2010, or on DOAE 1 back in 2009, but the anxiety of trying to finish before the new year while playing Megaman X2 and X3 on the side, and going to meet up with chicks at the strip clubs left me a little overwhelmed. :p
I'm going to try and finish my quarterly goals for this coming quarter at work a little early, and then I will look into the DOAE 1 map generator, and then if I still have time, I might explore some of these other questions, but I think 12AM is already looking into this stuff. He might come and help answer the remaining questions if this get bumped with my new message. :)
January 1, 2012 at 10:42 pm #36497sonic.penguinModeratorQuote:the anxiety of trying to finish before the new year while playing Megaman X2 and X3 on the side,Ah I always liked the SNES X series, X-X3 had the secret skills which I never learned about until years later, they're always fun to revisit and get the Zero Saber to 2-hit everyone :)
January 2, 2012 at 5:32 am #36498MeteorStrikeParticipantOK, I uploaded the Damage Calculator that I had from 2009. Let's see if I can post a link to it now…
http://meteorstrike.000space.com/NES/Destiny_of_an_Emperor/DamageCalc.php
It's pretty much the exact same file except I fixed up the HTML Tables a little bit so it looks a little better.
Note that this script is for physical attacks. It is not for tactics or any of that other stuff. I only hacked it because I was always curious about the damage formula myself and how the soldier count was a factor in it. I think MidNight might be more interested in the other details, but at least that script should answer #1 and #2. The rest of the questions are probably much easier to answer, because the damage formula, (I think) is probably the biggest one to trace, so hopefully the rest should be easy. (I think MidNight already did some work on the other questions too.)
January 2, 2012 at 1:21 pm #36499MiDKnighTModeratorAwesome tool! Looks like if you do "view source" on the webpage you can see all the code for it?
Now we need to get ludmeister back here too. He was playing with a lot of the damage stuff.
-
AuthorPosts
- You must be logged in to reply to this topic.