.com.unity Forums
  The Official e-Store of Shrapnel Games

This Month's Specials

BCT Commander- Save $8.00
winSPWW2- Save $5.00

   







Go Back   .com.unity Forums > Shrapnel Community > Space Empires: IV & V > SEIV

Reply
 
Thread Tools Display Modes
  #21  
Old July 28th, 2007, 02:39 PM
Suicide Junkie's Avatar
Suicide Junkie Suicide Junkie is offline
Shrapnel Fanatic
 
Join Date: Feb 2001
Location: Waterloo, Ontario, Canada
Posts: 11,451
Thanks: 1
Thanked 4 Times in 4 Posts
Suicide Junkie is on a distinguished road
Default Re: SE4 weapon index

My formula there has the benefit of only having one multiplication/division, given Aaron's tendency for pure +/-.

If you multiply everything together, how would you avoid going over 100% when including a component such as combat sensors?
It seems to me you'd have to frame everything in terms of decreasing penalties (CS1=0.5, CS2=0.6, etc), and you would have to include a default value for ships with no sensors which is not 1 or 0.
Reply With Quote
  #22  
Old July 28th, 2007, 03:45 PM
PvK's Avatar

PvK PvK is offline
National Security Advisor
 
Join Date: Dec 1999
Posts: 8,806
Thanks: 54
Thanked 33 Times in 31 Posts
PvK is on a distinguished road
Default Re: SE4 weapon index

Multiplication is the way probability actually works for independent factors in mathematics and the universe at large.

For example, I remember asking a kid in high school if he needed a ride home. His understanding of probability was like Space Empires', as he demonstrated by explaining, "No. My mom has a 50% chance of giving me a ride, and John's mom has a 50% chance of giving me a ride, so I have a total 100% chance of getting a ride home." It was actually hard to convince him that there was any chance neither would give him a ride home (perhaps though because he realized he was being silly and making a bad argument to get my goat, but that's the way SE4 works, which does get my goat and decrease my interest in it).

Assuming he was right about the 50% chance of each (a silliness in itself), the total chance was actually 75%, because the factors don't add to each other. One has a 50% chance of coming through, and the other only matters if the other fails, so its 50% only applies to the remaining 50%.

The math is:
Total Chance = 1.0 - (1.0 - Chance A) x (1.0 - Chance B)

That's for independent positive chances of causing something. Things like, if your computer has a 60% chance of finding out how to fix the Hyperdrive, and your Chief Engineer has a 30% chance of finding a solution on his own, you'd get:

Chance = 1.0 - (1.0 - 0.6) x (1.0 - 0.3)
Chance = 72%

This passes the following sanity checks:
* The total chance is less than 100%, since neither was certain.
* The chance is higher than either independent chance, since both provide a chance if the other fails.
* Note that if you think of 100 possible outcomes, 60 of which are covered by the computer, that leaves 40 not covered by the computer. 30% of _those_ will on average be covered by the engineer, so .3 x 40 = 12, and 60 + 12 = 72. Perfect.

Now, for negative (preventative) causes. Suppose your weapon targets accurately 70% of the time, but my shield deflects 90% of all hits (so only 10% get through). In that case, of 100 expected average tries, 70 will be potential hits. The shield applies in _those_ cases, because it's a negative effect dependent on a hit. Of 70 well-targeted shots, 90% get deflected, 10% get through, so 7 on average will be accurate AND get through.

You could do this with two random number checks, or you could just multiply:
(chance of good aim) x (chance of avoiding deflection)

chance of success = 0.7
chance of failure = 0.1

Just like for multiple things that lead to a success, there can be multiple things that can lead to a failure. Maybe you have an ace gunner who corrects computer targeting errors 80% of the time, but the enemy also has ECM that jams your view and prevents a hit 10% of the time. Assuming these are all accurate statements, the math for this is:

chance of a hit = causative chance x (1 - preventative chance)

where:
causative chance = 1.0 - (1.0 - computer targeting) x (1.0 - gunner correction)
and
preventative chance = 1.0 - (1.0 - shield deflection) x (1.0 - ECM jamming)

I get:
chance of a hit = 0.94 (chance the computer or gunner get an accurate shot) x (1 - 0.91) = 8.46% chance of a hit which gets past the deflector.

Note in this kind of system, the 90% deflector shield is obviously a very powerful effect that as you would expect, dominates the chances. But, also as you would expect, it will NEVER make it entirely impossible to get through - the chance will just always be under 10% as long as that deflector is having a 90% chance of blocking. As long as all the causative factors are greater than 0.0, and all the preventative factors are less than 1.0, there is always a chance of something happening or not. And, that chance makes sense, assuming your values are correct.
Reply With Quote
  #23  
Old July 28th, 2007, 04:34 PM
Suicide Junkie's Avatar
Suicide Junkie Suicide Junkie is offline
Shrapnel Fanatic
 
Join Date: Feb 2001
Location: Waterloo, Ontario, Canada
Posts: 11,451
Thanks: 1
Thanked 4 Times in 4 Posts
Suicide Junkie is on a distinguished road
Default Re: SE4 weapon index

That was a very long winded way of saying "not actually just multiplying everything together"

Given the new two-step system, you still have a problem with counters.
Given a 90% ECM, there is no way to counteract its effects with a superior sensor.

Consider troops and spotting. What is the benefit of camo gear? Quite a lot. If you add a thermal sensor, it should bring the chance to spot back up to better than before the camo gear came out. But it can't under your given system since that defense avoid% is guaranteed. (You'd have to add a complex web of interdependencies to each factor)

The way I'd do it is have a base attack value of 50, and a base defense value of 50 (say, settings.txt)
50/(50+50) = 50% to hit

Camo gear = 150pts defense.
50/(50+200) = 20% to hit

Thermal scanners = 250pts attack.
300/(300+200) = 60% to hit (vs camo, or 86% vs normal).
Reply With Quote
  #24  
Old July 28th, 2007, 05:57 PM
PvK's Avatar

PvK PvK is offline
National Security Advisor
 
Join Date: Dec 1999
Posts: 8,806
Thanks: 54
Thanked 33 Times in 31 Posts
PvK is on a distinguished road
Default Re: SE4 weapon index

I like the elegance of your system, but it also abstracts. In your example, thermal imaging helps in all situations, when in fact it only helps in certain situations. To really model it, yes you do need to apply factors against each other. That's modifying the value used for one cause or prevention. By using probability math, you can get correct cause & effect, but yes, it's more work.
Reply With Quote
  #25  
Old July 28th, 2007, 07:11 PM
Suicide Junkie's Avatar
Suicide Junkie Suicide Junkie is offline
Shrapnel Fanatic
 
Join Date: Feb 2001
Location: Waterloo, Ontario, Canada
Posts: 11,451
Thanks: 1
Thanked 4 Times in 4 Posts
Suicide Junkie is on a distinguished road
Default Re: SE4 weapon index

Most importantly, there is only one multiplication/division for Aaron to worry about.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 05:58 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2024, Shrapnel Games, Inc. - All Rights Reserved.