linuxgurugamer

[1.4.1+] SelectableDataTransmitter

Recommended Posts

With great pleasure, I would like to announce the release of my newest mod, the SelectableDataTransmitter.

Download:  https://github.com/linuxgurugamer/SelectableDataTransmitter/releases

License: MIT

SelectableDataTransmitter is a module which is used to allow an antenna be switchable between DIRECT mode and RELAY mode.
While an antenna is being reconfigured, the antennaPower is set to 0, so that it is active, but unable to do anything until it is fully reconfigured.
In the editor, two buttons are show,, Set DIRECT, and Set RELAY, this is so you can reference a specific setting in an action group.  In flight, only 
one button is shown.  While reconfiguration is in progress, neither is shown, but a message is shown showing the time until the reconfig is complete.

In the cfg file, there needs to be a section called ANTENNATYPE for each antenna type.  Each section needs to have all the values that a normal
antenna would have in the ModuleDataTransmitter section.

The module itself will need to have two lines, one specifying the defaultAntennaType, and the second specifying the time needed to reconfigure the antenna.

If a cfg would only have a single ANTENNATYPE section, it will behave exactly like ModuleDataTransmitter

The cfg definition should look like the following (and remove the ModuleDataTransmatter):

    MODULE
    {
        name = SelectableDataTransmitter

        defaultAntennaType = DIRECT
        reconfigTime = 60 // seconds

        ANTENNATYPE
        {
            antennaType = DIRECT
            packetInterval = 0.03
            packetSize = 2
            packetResourceCost = 50
            requiredResource = ElectricCharge
            DeployFxModules = 0
            antennaPower = 115000000000
            ProgressFxModules = 1
            antennaCombinable = True
        }
        ANTENNATYPE
        {
            antennaType = RELAY
            packetInterval = 0.03
            packetSize = 2
            packetResourceCost = 50
            requiredResource = ElectricCharge
            DeployFxModules = 0
            antennaPower = 25000000000
            ProgressFxModules = 1
            antennaCombinable = True
        }
    }

 

Currently being used by the following mods:

 

Edited by linuxgurugamer

Share this post


Link to post
Share on other sites

As of right now, this is being used by the OctoSat Continued mod, for the OctoSat Gargantuan Dish and OctoSat Side Dish

Share this post


Link to post
Share on other sites

New Release: 0.1.2

  • Added call to properly rebuild Commnet after change of transmitter

 

 

Share this post


Link to post
Share on other sites

Linux,

I just stumbled across this bouncing around the forums today and really like the idea.  I've got an antenna overhaul floating around in the back of my head that might make use of this.  I'm not a coder of any sort but I can write patches to beat the band and I feel the antennas across stock and numerous mods feels disconnected, unrelated and frankly so overly redundant that I find myself still using about 4 different antennas from the plethora available.

All that said, if I use this as part of overhauling stuff, would I be able to :FINAL patch this safely into pretty much every single ModuleDataTransmitter that's been loaded? The plan is to overhaul them on a mod-by-mod basis since I want variety and forced choices rather than constantly seeking to find the highest bit rate with the lowest EC and longest range as the sole means of solving comms questions.  Since I want to include mods like SSTU the :FINAL method is generally the only way to ensure that I hit each .cfg that has it.

Share this post


Link to post
Share on other sites
On 2/12/2017 at 1:13 PM, rasta013 said:

Linux,

I just stumbled across this bouncing around the forums today and really like the idea.  I've got an antenna overhaul floating around in the back of my head that might make use of this.  I'm not a coder of any sort but I can write patches to beat the band and I feel the antennas across stock and numerous mods feels disconnected, unrelated and frankly so overly redundant that I find myself still using about 4 different antennas from the plethora available.

All that said, if I use this as part of overhauling stuff, would I be able to :FINAL patch this safely into pretty much every single ModuleDataTransmitter that's been loaded? The plan is to overhaul them on a mod-by-mod basis since I want variety and forced choices rather than constantly seeking to find the highest bit rate with the lowest EC and longest range as the sole means of solving comms questions.  Since I want to include mods like SSTU the :FINAL method is generally the only way to ensure that I hit each .cfg that has it.

Would probably work

Share this post


Link to post
Share on other sites

Cool thanks for the input.  I'll let you know how it works out and most likely end up bugging you with questions about it along the way... :P

 

Share this post


Link to post
Share on other sites

Hey linuxgurugamer, I'm having an issue with an MM patch trying to add this ability to every antenna in my modded game (lots of part mods + KSPi).

So far I've tried a variety of different configurations, but none have worked. I've even gone to the Module Manager and MM Community Patches threads looking for help, but it seems this should work, so I'm hoping you may have some input.

My current MM config is:
 

Spoiler

@part[*]:HAS[@MODULE[ModuleDataTransmitter]]:FINAL
{
    // -MODULE[ModuleDataTransmitter] {}

    @MODULE[ModuleDataTransmitter]
    {
        @name = SelectableDataTransmitter
        defaultAntennaType = DIRECT
        reconfigTime = 60 // seconds

        ANTENNATYPE[DIRECT]
        {
            packetInterval = 0.03
            packetInterval = 0.10
            packetSize = 2
            packetResourceCost = 20.0
            requiredResource = ElectricCharge
            DeployFxModules = 0
            antennaPower = 100000000000
            antennaCombinable = True
        }
        ANTENNATYPE[RELAY]
        {
            packetInterval = 0.03
            packetInterval = 0.10
            packetSize = 2
            packetResourceCost = 20.0
            requiredResource = ElectricCharge
            DeployFxModules = 0
            antennaPower = 100000000000
            antennaCombinable = True
        }
        ANTENNATYPE[INTERNAL]
        {
            packetInterval = 0.03
            packetInterval = 0.10
            packetSize = 2
            packetResourceCost = 20.0
            requiredResource = ElectricCharge
            DeployFxModules = 0
            antennaPower = 100000000000
            antennaCombinable = True
        }
    }
}

After I am able to get SelectableDataTransmitter on all my antennas my next task will be to re-use the default antenna settings (like packet size, power, etc.) for each different antenna type, which I'm not sure how to implement at the moment, but I want to get the MM patch working first. Do you happen to have any tips or something I'm missing that is keeping this from working? The weird thing is I haven't been able to find this module in my game period, despite having Contares and a few of the other mods that are already supported by this mod. Any help is greatly appreciated, thanks!

Share this post


Link to post
Share on other sites

I have not seen any of my antennas have this module avaliable to them yet for the selection between direct and relay.

 

Ok, didn't see that I had to make the patch myself. I remember this mod use to come with a patch for the stock antennas. My bad.

Edited by Jivaii

Share this post


Link to post
Share on other sites
On 11/26/2017 at 11:16 AM, Jivaii said:

I remember this mod use to come with a patch for the stock antennas

You must be thinking of some other mod, sorry

Anyway, there is a bug which makes this not work, I hope to be able to work on it sometime in the next few weeks

Share this post


Link to post
Share on other sites

What would it take to make this mod compatible with CommNet Constellations?  At the moment, an antenna that uses this can't be assigned to a constellation.

 

Share this post


Link to post
Share on other sites
2 hours ago, DStaal said:

What would it take to make this mod compatible with CommNet Constellations?  At the moment, an antenna that uses this can't be assigned to a constellation.

 

No idea, I'd have to do some investigation, which I don't have time right now.

Open an issue so it doesn't get lost

Share this post


Link to post
Share on other sites
17 minutes ago, linuxgurugamer said:

No idea, I'd have to do some investigation, which I don't have time right now.

Open an issue so it doesn't get lost

Ok, done.  Thanks.  Not a major issue - My use-case is in octo-sat relays, and I can simply change which lines are commented in the config files to fix.  (Which switches back to normal.)

Share this post


Link to post
Share on other sites
15 minutes ago, DStaal said:

Ok, done.  Thanks.  Not a major issue - My use-case is in octo-sat relays, and I can simply change which lines are commented in the config files to fix.  (Which switches back to normal.)

I wrote this mod specifically for the OctoSat satellites.  I'm not totally happy with it, there seems to be some lingering issues

Share this post


Link to post
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.