Quote
Originally posted by Artanis:
**Capture Odds Calculator!
And all you need is Flash 7!
...and all your stats... and your opponent's stats... But it works!
You need to know your strength, crew, your escorts strength & crew, and your opponent's strength & crew. Then click Calculate. It gives you the minimum odds (worst case in the random step, -5) and maximum odds (best case in the random step, +5)
It's not entirely accurate, as it can't/won't overflow, so your large-crew ships calculate to 75% odds.
For those that know more flash than me, I put the .swf up for download (you need Flash MX 2004.) Feel free to make the document open ship data into menues ect. Then tell me so I can update the page where this is and give you credit.
As far as I can tell, it's fairly bugless. Tell me if you find one.
(Edit: sig update)**
Hmm...wouldn't it be better to make an HTML/JavaScript one for those idiots who don't have Flash?
Sets to work because he's sick as hell of screwing with his Titles file
EDIT: Dammit, can't get it to work. If anyone wants to try and finish it, here's the raw code:
Quote
function calculate(ship_strength,ship_crew,escort_strength_a,escort_strength_b,escort_strength_c,escort_strength_d,escort_strength_e,escort_strength_f,escort_crew_a,escort_crew_b,escort_cre w_c,escort_crew_d,escort_crew_e,escort_crew_f,marines_crew,marines_percentage,target_strength,target_crew){
if(escort_strength_a == ""){escort_strength_a=0}
else{escort_strength_a=eval(escort_strength_a+"/10")};
if(escort_strength_b == ""){escort_strength_b=0}
else{escort_strength_b=eval(escort_strength_b+"/10")};
if(escort_strength_c == ""){escort_strength_c=0}
else{escort_strength_c=eval(escort_strength_c+"/10")};
if(escort_strength_d == ""){escort_strength_d=0}
else{escort_strength_d=eval(escort_strength_d+"/10")};
if(escort_strength_e == ""){escort_strength_e=0}
else{escort_strength_e=eval(escort_strength_e+"/10")};
if(escort_strength_f == ""){escort_strength_f=0}
else{escort_strength_f=eval(escort_strength_f+"/10")};
var escort_strength=eval(escort_strength_a+"+"+escort_strength_b+"+"+escort_strength_c+"+"+escort_strength_d+"+"+escort_strength_e+"+"+escort_strength_f);
var strength=eval(ship_strength+"+"+escort_strength);
if(escort_crew_a == ""){escort_crew_a=0}
else{escort_crew_a=eval(escort_crew_a+"/10")};
if(escort_crew_b == ""){escort_crew_b=0}
else{escort_crew_b=eval(escort_crew_b+"/10")};
if(escort_crew_c == ""){escort_crew_c=0}
else{escort_crew_c=eval(escort_crew_c+"/10")};
if(escort_crew_d == ""){escort_crew_d=0}
else{escort_crew_d=eval(escort_crew_d+"/10")};
if(escort_crew_e == ""){escort_crew_e=0}
else{escort_crew_e=eval(escort_crew_e+"/10")};
if(escort_crew_f == ""){escort_crew_f=0}
else{escort_crew_f=eval(escort_crew_f+"/10")};
var escort_crew=eval(escort_crew_a+"+"+escort_crew_b+"+"+escort_crew_c+"+"+escort_crew_d+"+"+escort_crew_e+"+"+escort_crew_f);
var crew=eval(marines_crew+"+"+escort_crew+"+"+ship_crew);
target_crew=eval(target_crew+"*10");
target_strength=eval(target_strength+"*5");
var sub_odds=eval(crew+"/"+target_strength);
sub_odds=eval(sub_odds+"*100");
var odds=eval(sub_odds+"+"+marines_percentage);
if(strength > target_strength){var odds=eval(odds+"+10")};
var max_odds=eval(odds+"+5");
var min_odds=eval(odds+"-5");
if(max_odds > 75){max_odds=75};
if(min_odds > 75){min_odds=75};
if(max_odds < 0){max_odds=1};
if(min_odds < 0){min_odds=1};
max_odds=max_odds.split(".");
min_odds=min_odds.split(".");
document.res_form.minodds.value=min_odds(0);
document.res_form.maxodds.value=max_odds(0)
}
If anybody sees the error I keep getting, let me know.
------------------
The programmer's code of entomology: there's always another bug.
Microsquash Winblows users: stop asking for plugins. (url="http://"http://www.aznt.com/EVN/EVNEW/")Make one yourself.(/url)
(This message has been edited by orcaloverbri9 (edited 11-29-2003).)
(This message has been edited by orcaloverbri9 (edited 11-29-2003).)