naval/air damage table

Share scenarios and mods with other players here.
Post Reply
User avatar
Michael the Pole
Posts: 680
Joined: Sat Oct 30, 2004 2:13 am
Location: Houston, Texas

naval/air damage table

Post by Michael the Pole »

Bleck, as long as you're giving away all the secrets in the store, can you tell us where the table that assigns damage from air attacks on naval units lives?

Can you foresee any immediate consequences (from a programming standpoint) to altering this table?

As you can see, I'm thinking of designing my own naval patch, if I can get some of the "crazed modders" to help me out with some of the actual coding. It has been suggested to me that we can implement some of the suggested changes (ex. restricting ship repairs to one level/turn) as "house rules," which strikes me as brilliant.[&o]
"One scoundrel is a disgrace, two is a law-firm, and three or more is a Congress." B. Franklin

Mike

A tribute to my heroes: http://www.youtube.com/watch?v=8fRU2tlE5m8
User avatar
doomtrader
Posts: 5319
Joined: Tue Jul 22, 2008 5:21 am
Location: Poland
Contact:

RE: naval/air damage table

Post by doomtrader »

IIRC it's hardcoded
User avatar
Bleck
Posts: 741
Joined: Sun Mar 08, 2009 1:35 pm
Location: Poland
Contact:

RE: naval/air damage table

Post by Bleck »

1. defenderBonus = amount of enemy aircraft carriers in attacked sea zone
2. chanceOfSpotting (global, one time checked) = (6.66 * [attacker country aircraft tech level] * [attacker country navy tech level] * [attacker unit effective strength]) / (first on list enemy naval unit country navy tech level)
3. if Random (range 0 - 99) < chanceOfSpotting then repeat 10 times:
3.1) chance = 5 * [attacker unit effective strength]
3.2) if Random (range 0 - 99) < chance then:
3.2.1) pick random enemy naval unit (defender)
3.2.2) if defender is a sub unit and Random (range 1 - 99) < 50 then cancel this attack (jump to 3.1)
3.2.3) defender.HP = defender.HP - 1
3.2.4) chanceOfDefenderHittingAttacker = ([defender country navy tech level] + defenderBonus) * [attacker effective strength]
3.2.5) if Random (range 0 - 99) < chanceOfDefenderHittingAttacker then:
3.2.5.1) attacker.HP = attacker.HP - 1
Jump to 3.1 if not executed 10 times.
Wastelands Interactive member (Programmer)
Post Reply

Return to “Scenarios and Mods”