Jump to content

[1.12] CommNet Antennas Extension / Info / Consumptor (2022-03-12)


flart

Recommended Posts

  • 2 weeks later...

Ref Extra-Consumptor -> CommNet Antennas Info

[WRN 19:55:48.498] [ModuleManager] 2 warnings related to GameData/Extras-Consumptor/CommNetAntennasInfo/Configs/ModuleGeneratorAntenna.cfg

	@PART[*]:HAS[@MODULE[ModuleDataTransmitte*]:HAS[#antennaType[RELAY]]]:LAST[CommNetAntennasInfo]
{
    tempVar = #$MODULE[ModuleDataTransmitte*]/antennaPower$
    @tempVar *= 0.00000000001
	    MODULE
    {
        name = ModuleGeneratorAntenna
        isAlwaysActive = false
        INPUT_RESOURCE
        {    
            name = ElectricCharge
            rate = #$../../tempVar$
        }
    }
}
	
@PART[*]:HAS[@MODULE[ModuleDataTransmitte*]:HAS[#antennaType[DIRECT]]]:LAST[CommNetAntennasInfo]
{
    tempVar = #$MODULE[ModuleDataTransmitte*]/antennaPower$
    @tempVar *= 0.00000000001
    @tempVar *= 0.4
	    MODULE
    {
        name = ModuleGeneratorAntenna
        isAlwaysActive = false
        INPUT_RESOURCE
        {    
            name = ElectricCharge
            rate = #$../../tempVar$
        }
    }
}
	
// INTERNAL Antennas Consumption is disabled, because 0.8 EC/year doesn't make a difference.
//@PART[*]:HAS[@MODULE[ModuleDataTransmitte*]:HAS[#antennaType[INTERNAL]]]:LAST[CommNetAntennasInfo]
//{
//    tempVar = #$MODULE[ModuleDataTransmitte*]/antennaPower$
//    @tempVar *= 0.00000000001
//
//    MODULE
//    {
//        name = ModuleGeneratorAntenna
//        isAlwaysActive = false
//        INPUT_RESOURCE
//        {    
//            name = ElectricCharge
//            rate = #$../../tempVar$
//        }
//    }
//}

 

Edited by dxeh
Link to comment
Share on other sites

Extras-Consumptor/CommNetAntennasInfo/ suppose to be merged with CommNetAntennasInfo/ in the GameData, like 
GameData/CommNetAntennasInfo/Configs/ModuleGeneratorAntenna.cfg

possible that it's the reason of the warnings, though exact path there should not be important. 
Otherwise, I need log

 

 

Link to comment
Share on other sites

On 8/4/2018 at 12:21 AM, flart said:

Extras (CommNet Antennas Consumptor on CKAN)

enables ModuleGeneratorAntenna, which makes antennas consume EC for supporting CommNet when extended (always for static)
Default rate depends from Antenna power: 100G is 1EC/s, changeable in the config.

Just a suggestion. Maybe you can make it possible to deactivade and activate antennas. Some high power antennas always consume power and on launch they suck all the batterys empty before you can extend your solar panels. That make it really problematic for probes. Or is there any other solution to that?

Link to comment
Share on other sites

On 2/24/2020 at 12:42 AM, Wurmi said:

Maybe you can make it possible to deactivade and activate antennas.

Yea, I was thinking about it.
My idea was to add fake ModuleDeployableAntenna to static antennas, that doesn't really deploy anything, but enables/disables antennas. It didn't work. Probably it demands a real pivot and an animation for the module to work.
Making new ModuleDataTransmitterDisableable is out of scope, because I don't want to make it not compatible with the NF: Exploration

Spoiler

@PART[RelayAntenna100]
{
	MODULE
	{
		name = ModuleDeployableAntenna
		showStatus = false
		isTracking = false
		pivotName = None // Rescalar
		windResistance = 1		
		animationName = None // dish
		extendActionName = Enable <<1>>
		retractActionName = Disable <<1>>
		extendpanelsActionName = Toggle <<1>>
	}
}

 

 

Edited by flart
Link to comment
Share on other sites

19 hours ago, flart said:

Making new ModuleDataTransmitterDisableable is out of scope, because I don't want to make it not compatible with the NF: Exploration

ok, i not have much idea of modding but what talk against to add a new module called "active" to all antennas and make the full antenna with all functions disabled? Because thats basicly what you want. I didn´t played with NF: Exploration much yet, so i am not sure if this disturb the gameplay of it.

Edited by Wurmi
Link to comment
Share on other sites

  • 1 month later...

I like to play with a relatively low DSN multiplier (0.05 or lower) and I noticed today that the info mod seems to be multiplying the DSN multiplier a second time (see images below)

(maybe the game has been changed so that it handles the DSN multiplication itself before handing the data off to the mod, and the mod does it again?)

OuHDAks.png

LUwCMqR.png

Edited by yuravian
Link to comment
Share on other sites

  • 2 months later...

I have a similar situation to Wurmi.

DMagics Orbital Science mod contains two Signals Intelligence Dish antennas, one of which is a 10T dish, always on even when not deployed.

He uses a custom deployment mechanism in his mod.  I scanned the source and there is no power toggle.

The part is here is you wish to see it ...

https://www.dropbox.com/s/2ykp6e0z3kbjd7l/2020-06-17_20-33-59.png

The result of the consumptor is 100 EC/Sec, which is killer to attain without a nuclear reactor.

Can you put in a toggle for parts, or a maximum cap on consumption?

The flaw you coded out, action groups, would have worked as well.

I'll take an example of a ModuleManager entry to disable the consumpter for this part, for now.

Thank you for the mods.

Edited by SkiRich
Link to comment
Share on other sites

I made this in case anyone has the same issue with wild consumption values on big antennas.

Adjust as needed.

Name the file with a z in front so it loads last.

// Patches to ModuleGenerator
// created by RS June 17th, 2020

@PART[dmSIGINT]:LAST[CommNetAntennasInfo]
{
  -MODULE[ModuleGeneratorAntenna] { }
}

@PART[dmSIGINT.End]:LAST[CommNetAntennasInfo]
{
  -MODULE[ModuleGeneratorAntenna] { }
}

@PART[dmSIGINT.Small]:LAST[CommNetAntennasInfo]
{
  -MODULE[ModuleGeneratorAntenna] { }
}

 

Link to comment
Share on other sites

Hello @flart

There seems to be a bug. I tested this in KSP v1.9.1, CommNet Antennas Info v2.4.1 with Antenna Helper being the only other mod installed.

Steps to reproduce: Set advanced options range modifier to 2. An RA-2 (default antenna power of 2G) shows an Antenna power of 8G. It should be 2G * 2 = 4G.

It seems your mod is taking the range modifier, raising it to a power of 2 and using that as the multiplier for antenna power.

I've tested this in game as well - there are more details are in the Antenna Helper mod thread, which has the same problem.

Edit: Please disregard all of this. I made a mistake. I am very sorry for the confusion.

The mod shows the correct antenna power ratings with different range modifier settings. My mistake was because I had a leftover MM patch in place that doubled antenna power. Sorry!

Edited by MalevolentNinja
Link to comment
Share on other sites

Commnet Antennas Info v2.5.0 Prerelease

  • ksp 1.8-1.9
  • CommNetAntennasConsumptor:
    • supported DMagic Orbiral Science: Soil Moisture Sensor and SIGINT
    • added ModuleAntennaToggler - module to disable/enable every "static" (unretractable) antenna. 
      So now you can disable static antennas, and they will stop consuming EC, but a vessel's antenna power will be decreased.
      Also if you disable antenna at launch, it will be auto-enabled on transmission request and later auto-disabled
      (same as retractable antennas auto-deployed and auto-retracted)
  • added Bandwidth field to PAW


https://github.com/yalov/CommNetAntennasInfo/releases

 

In the next version Consumptor probably will be fully excluded from the CommNet Antennas Info to the separate repo.

 

@Wurmi@SkiRich, you might find this interesting

@DMagic thanks for the help with ModuleAntennaToggler

 

Edited by flart
Link to comment
Share on other sites

1 hour ago, flart said:

Version 2.5.0 Prerelease

  • ksp 1.8-1.9
  • CommNetAntennasConsumptor:
    • supported DMagic Orbiral Science: Soil Moisture Sensor and SIGINT
    • added ModuleAntennaToggler - module to disable/enable every "static" (unretractable) antenna. 
      So now you can disable static antennas, making them isn't consuming EC, and a vessel will lose its antenna power.
      Also if you disable antenna at launch, it will be autoenabled on transmission request and later autodisabled
      (same as retractable antennas autodeplyed and autoretracted)
  • added Bandwidth field to PAW


https://github.com/yalov/CommNetAntennasInfo/releases

 

In the next version Consumptor probably be fully excluded from the CommNet Antennas Info to the separate repo.

 

@Wurmi@SkiRich, you might find this interesting

@DMagic thanks for the help with ModuleAntennaToggler

 

Wow, that will work.  gonna test this out a bit later.  Thank you!

What is the purpose of the bandwidth field? I want to make sure I understand it.

Link to comment
Share on other sites

43 minutes ago, SkiRich said:

What is the purpose of the bandwidth field?

Just the same "Bandwidth: X Mits/sec"  line from the Info in the editor added also to the PAW of antennas in the Flight.
It shows how quickly experiment's data (Mit) will be sent to Kerbin. Also [Consumption EC/Mits] multiply by [Bandwidth Mits/sec] equals to [Consumption EC/sec]

 

Edited by flart
Link to comment
Share on other sites

Commnet Antennas Info v3.0.0

  • The Extras/Consumptor is excluded to the separate CommNet Antennas Consumptor repo

Commnet Antennas Consumptor v3.0.0

  • CommNetAntennasConsumptor was excluded from the "CommNet Antennas Info"
  • supported DMagic Orbiral Science: Soil Moisture Sensor and SIGINT
  • added ModuleAntennaToggler - module to disable/enable every "static" (unretractable) antenna. 
    So now you can disable static antennas, and they will stop consuming EC, but a vessel will lose its antenna power.
    Also if you disable antenna at launch, it will be auto-enabled on transmission request and later auto-disabled
    (same as retractable antennas auto-deployed and auto-retracted)

    screenshot60_cr.png?raw=true  screenshot61_cr.png?raw=true
Edited by flart
Link to comment
Share on other sites

After installing Antenna Consumptor v3.0.0 (KSP 1.8.1), CommNet Antennas Info shows me a consumption of 18.4 EC/per Year for the most Antennas. But in real I have a consumption of 35EC/sek!!!
Is there a conflict with Kerbalism or another mod?

Also the CommNet Toggler isn`t still active for all Antennas.

Edited by Cheesecake
Link to comment
Share on other sites

1 hour ago, flart said:

does Kerbalism do something with antennas

It changes everything ;)

Power consumption is increased while transmitting science data. ( configcode )

ModuleAntennaToggler sounds like it would be very with Kerbalism, because a fixed, slow antenna can ruin a station's data rate. Does it change the transmitter module's "isEnabled" state? That should be enough to make it compatible: https://github.com/Kerbalism/Kerbalism/blob/master/src/Kerbalism/Comms/AntennaInfoCommNet.cs#L34

Edited by HansAcker
Link to comment
Share on other sites

 

1 hour ago, HansAcker said:

Does it change the transmitter module's "isEnabled" state?

CommNetToggler makes all static antennas retractable, but without an animation, and ksp changes isEnabled and CanComm() accordingly to retracted state.
Manually I have not changed isEnabled.

https://github.com/yalov/CommNetAntennasConsumptor/blob/master/CommNetAntennasConsumptor/ModuleAntennaToggler.cs#L20

 

Link to comment
Share on other sites

@Cheesecake I tested with the default config of Kerbalism,

Bandwidth and Packet size is changed to low values, but the Consumptor and Toggler works as intended. 
It doesn't brake the CAE/CAI/CAC. 

Give me some screenshots with a problem and a log. For now, the mods looks pretty compatible with the Kerbalism.

 

Spoiler

 

RNaTIlE.jpg

 

UkQzbrT.jpg

 

Link to comment
Share on other sites

Thanks for your help.
After further investigations it`s neither CommNet Consumptor nor Kerbalism. But I don`t know which mod. I have another savegame where the Antennas need EC too (without Antenna Consumptor --> Kerbalism) but only a little bit. So there is something wrong with my Savegame.

Link to comment
Share on other sites

  • 3 weeks later...

hi, I have been using this great mod for a long time, and I recently decided to translate it to my native language, french. I have created a pull request on github, but since it is my first time contributing to this website, i am not really sure of what I have done. Anyway, thank you for creating this mod!

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...