View Single Post
Old 08-12-12, 10:15 AM   #778
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,214
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by TheDarkWraith View Post
just finished up the mega patch for AI crew damage control. Wow, that was a lot of code. More than I thought it would take
Brilliant!

Here are a few suggestions you might want to take into account:
  • setting a new memory variable: maximum % of the original damage that can be repaired (once damaged, equipment and compartments can't be fully restored to their original state, and the worst the damage, the lesser damaged zones are reparable). An example:

    HPs of a given compartment get reduced to 80% of their original total. Damage is 100-80=20%. If the maximum reparable damage is set to 75%, then the new maximum HP that can be attained after full reparairs is:

    80 + 20 * .75 = 95%

    for a 50% damage, we would have:

    50 + 50 * .75 = 87.5%

    These maximums should be calculated again for any new impact.

  • if the former function seems to you too complex, a possible alternative could be setting a minimum damage % below which the compartment won't be repaired (as above, once damaged equipment and compartments can't be fully restored to their original state, but in this case the maximum recoverable HPs wouldn't be affected by the amount of damage suffered).

  • memory variables affected adversely by number of compartments damaged and being managed at the same time.

  • memory variables affected positevely by number of crew complement (as stored in unit's cfg file), and by crew rating.

  • adding a chance that a % of crew complement (as stored in unit's cfg file) is permanently injured/killed after each impact, hence affecting irreversibly damage/flooding management efficiency.

  • locating the compartment(s) where batteries powering bilge pumps are placed. If this (these) compartment(s) get(s) damaged/flooded beyond a set level, flooding management is reduced/stopped.

Last edited by gap; 08-12-12 at 11:03 AM.
gap is offline   Reply With Quote