Bug #19996
Antenna PartInfo and PAW doesn't respect rangeModifer or DSNModifier settings values.
10%
Description
The PartInfo tooltips included for the ModuleDataTransmitter part module don't respect the rangeModifier or DSNModifier settings values as set in the Advanced Difficulty settings menu. When you have rangeModifier or DSNModifier values that are different to the default (1.0), the tooltips do not display the correct antennaPower rating value or the correct communication distance capabilities with respect to the 3 DSN levels.
Firstly, this is due to the partInfo only accounting for the antennaPower rather than the antennaPower * (HighLogic.CurrentGame.Parameters.CustomParams<CommNetParams>().rangeModifier) or however you would want to call that modified value.
Secondly, when calculating the max range with respects to the DSN levels, again the antennaPower must be multiplied by the rangeModifier and also the DSN power rating is only called by GameVariables.Instance.GetDSNRange whereas it should be something along the lines of GameVariables.Instance.GetDSNRange * (HighLogic.CurrentGame.Parameters.CustomParams<CommNetParams>().DSNModifier) ... again you would probably refer to that in a more sane way.
By doing this, it will allow players to correctly predict their antenna capabilities when using different modifier settings rather than the Editor Tooltips providing erroneous information.
Reproduction Steps:
- Start new Sandbox game with default Difficulty Settings.
- Go to Editor scene and inspect the PartInfo tooltip of an antenna and note the Antenna Power Rating and range distances compared to the DSN levels.
- Go to Settings > Difficulty Settings > Advanced and change the Range and/or DSN Modifier values.
- Go back to an Editor scene and inspect the antenna PartInfo tooltip again. Observe that the Antenna Power Rating and DSN Range distances have not changed.
Platform: Windows x64 - Vanilla KSP 1.4.5.2243
Whilst that is being considered, it also may be worth returning the GetDSNRange value in a more extensible way. As it currently sits, it can only provide 3 levels of feedback, clamped to the 3, vanilla power output ratings. This makes it hard for mods, such as Sarbian's Custom Barn Kit, to correctly interface with these levels as they are explicitly stated as 0f, 0.5f and 1.0f giving no leeway for the scope of adding additional levels of facilities. This is an aside as I appreciate its not really a bug but more of a related backend feature request.
History
#1 Updated by Poodmund over 6 years ago
To add to the supplementary GETDSNRange info, it may be better to request the Tracking Station's maxLevel - 1 in UpgradeableObjects and use that returned value to run a for loop to distinguish how many levels are specified. Then you could list the DSN powers elsewhere and assign them sequentially against the levels in use. Just an idea.
#2 Updated by Poodmund about 6 years ago
It seems a mod have addressed all the issues that I have raised above, the PartInfo window plugin from the mod, CommNet Antennas Info: https://forum.kerbalspaceprogram.com/index.php?/topic/177292-151-commnet-antennas-extension-2018-11-04/
- shows a combinability exponent (it's different even among the stock antennas)
- shows modified ratings (if you have changed antennas or DSN power modifiers in the settings)
- shows all DSN levels (Custom Barn Kit supported, and isn't dependency)
- shows DSN ratings, hightlights active DSN level,
- shows range to Built-in antenna for relays
- shows "Consumption" as EC/Mit
- compact version for internal antennas
https://i.imgur.com/nchrbiP.jpg
https://github.com/yalov/CommNetAntennasExtension/
Reference may be made for inspiration.
#3 Updated by Poodmund over 5 years ago
- File Untitled-1.png Untitled-1.png added
- Subject changed from Antenna PartInfo doesn't respect rangeModifer or DSNModifier settings values. to Antenna PartInfo and PAW doesn't respect rangeModifer or DSNModifier settings values.
- Status changed from New to Confirmed
- % Done changed from 0 to 10
As an update, the PAW also does not respect the Range Modifier value either:
#4 Updated by Poodmund over 4 years ago
Poodmund wrote:
As an update, the PAW also does not respect the Range Modifier value either:
Its pretty crazy how this is two years old now and has had no other input.