naval/air damage table (Full Version)

All Forums >> [Current Games From Matrix.] >> [World War II] >> WW2: Time of Wrath >> Scenarios and Mods



Message


Michael the Pole -> naval/air damage table (10/7/2009 2:43:03 PM)

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]




doomtrader -> RE: naval/air damage table (10/7/2009 2:48:30 PM)

IIRC it's hardcoded




Bleck -> RE: naval/air damage table (10/7/2009 4:44:53 PM)

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.




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
1.78125