SUBSIM Radio Room Forums

SUBSIM Radio Room Forums (https://www.subsim.com/radioroom/index.php)
-   Dangerous Waters (https://www.subsim.com/radioroom/forumdisplay.php?f=181)
-   -   Doubt about sinking subs with one torpedo. (https://www.subsim.com/radioroom/showthread.php?t=96322)

kage 11-11-06 04:48 AM

Quote:

Originally Posted by JgzMan
If I were going to randomize damage, I would do it as follows:

1) Reduce damage of each and every weapon in the game by, say, 15%, or 25%, or somthing similar. Call that number X. (the actual number, mind you, not the %)
2) each time a weapon explodes, add to the damage a random number ranging from 0 to 2X.

That seems that it wouldn't require too much editing. Each weapon would need an additional constant assosaited with it (the number 2X, for that particular weapon) and a RAND function. To save time, you might call the RAND function on launch, or even on weapon load. Whenever the CPU load is lowest.

X, being a database variable, would (presuming it's available to doctrines) make 2X an easy value to calculate.

However, we cannot adjust how much damage a weapon does on the fly in that fashion. The only workable solution is to rely on proximity detonation.

Your suggestion may be workable as a "lethality distribution", however; up the damage value by 2.5 times its current value, and have it detonate up to Y meters away, where Y would give about 0.8X of damage or something.

As such, it may even be a way to uniformly calculate what distance it should detonate at.


As for "whenever cpu load is lowest" I'd say screw that - the ideal impact will be negligible to begin with, not that we really know when it's at its least. Selecting the distance randomly at firing time is by far the most convenient from a scripting perspective, though.


All times are GMT -5. The time now is 11:48 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 1995- 2025 Subsim®
"Subsim" is a registered trademark, all rights reserved.