Jump to content

[1.8.1-1.12.x] Modular Launch Pads v2.8.0: Launch clamps evolved: Real-style launch bases and towers [24 December 2024]


AlphaMensae

Recommended Posts

First off, I just want to say how much I love this mod! It’s my go-to for launches, and the level of detail and functionality you’ve put into it is outstanding.

I’ve been exploring kOS and would love to integrate some of the launch pad features into my scripts. Most of the interactions work well, but I haven’t been able to trigger the fueling options via kOS. I was wondering if there’s any way to make this accessible or if there are plans to support this functionality in the future?

I’d really appreciate any insights you can share. Thanks again for all your hard work on this incredible mod!  I have used this code without any success of finding a way to start the fueling process.

 

FUNCTION testGenerators {
    SET basePart TO SHIP:PARTSNAMED("AM.MLP.FlatLaunchBaseSmall")[0].
    PRINT "Testing " + basePart:NAME + " (" + basePart:TYPENAME + ")".
    LOCAL genCount IS 0.
    FOR moduleName IN basePart:ALLMODULES {
        IF moduleName = "ModuleGenerator" {
            SET genCount TO genCount + 1.
            SET genModule TO basePart:GETMODULE(moduleName).
            PRINT "Generator " + genCount + ": ".
            PRINT "  Events: " + genModule:ALLEVENTNAMES:JOIN(", ").
            PRINT "  Actions: " + genModule:ALLACTIONNAMES:JOIN(", ").
            IF genModule:ALLACTIONNAMES:CONTAINS("activate generator") {
                genModule:DOACTION("activate generator", TRUE).
                PRINT "  Activated generator " + genCount.
                WAIT 1. // Brief pause to let it settle
                PRINT "  New Events: " + genModule:ALLEVENTNAMES:JOIN(", ").
                PRINT "  New Actions: " + genModule:ALLACTIONNAMES:JOIN(", ").
            } ELSE {
                PRINT "  No activate action—already active or unavailable.".
            }
        }
    }
}

 

Link to comment
Share on other sites

33 minutes ago, ItchyBrother said:

First off, I just want to say how much I love this mod! It’s my go-to for launches, and the level of detail and functionality you’ve put into it is outstanding.

I’ve been exploring kOS and would love to integrate some of the launch pad features into my scripts. Most of the interactions work well, but I haven’t been able to trigger the fueling options via kOS. I was wondering if there’s any way to make this accessible or if there are plans to support this functionality in the future?

I’d really appreciate any insights you can share. Thanks again for all your hard work on this incredible mod!  I have used this code without any success of finding a way to start the fueling process.
 

Sorry, I'm not the one to ask about kOS, I don't use it and barely know anything about it. 

I would say that fueling a rocket is a pre-flight thing, and not something that needs to be automated.

Link to comment
Share on other sites

4 hours ago, AlphaMensae said:

Sorry, I'm not the one to ask about kOS, I don't use it and barely know anything about it. 

I would say that fueling a rocket is a pre-flight thing, and not something that needs to be automated.

It isn't so much about kOS I believe, than trying to find, for lack of a better word, how you are using the pad fueling option.  For example, if I right click on the Flat Launch Base 2 there are two Generators.  One marked Generator:EC and the other Generator that give an option to Start/Stop Fueling.  How are you implementing the fueling option or are you?  - Maybe something else is?!  

Link to comment
Share on other sites

16 minutes ago, ItchyBrother said:

It isn't so much about kOS I believe, than trying to find, for lack of a better word, how you are using the pad fueling option.  For example, if I right click on the Flat Launch Base 2 there are two Generators.  One marked Generator:EC and the other Generator that give an option to Start/Stop Fueling.  How are you implementing the fueling option or are you?  - Maybe something else is?!  

Oh, it's two ModuleGenerator part modules. One outputs the resource ElectricCharge, the other various fuel resources:

MODULE
{
    name = ModuleGenerator
    isAlwaysActive = false
    OUTPUT_RESOURCE
    {
        name = ElectricCharge
        rate = 100
    }
}


MODULE
{
    name = ModuleGenerator
    isAlwaysActive = false
    requiresAllinputs = false
    resourceThreshold = 0.001
    activateGUIName = Start Fueling
    shutdownGUIName = Stop Fueling

    OUTPUT_RESOURCE
    {
        name = LiquidFuel
        rate = 36
    }
    
    OUTPUT_RESOURCE
    {
        name = Oxidizer
        rate = 44
    }

    OUTPUT_RESOURCE
    {
        name = MonoPropellant
        rate = 5
    }

    OUTPUT_RESOURCE:NEEDS[CommunityResourcePack]
    {
        name = LqdHydrogen
        rate = 165 // 11 * 15
    }

    OUTPUT_RESOURCE:NEEDS[CommunityResourcePack]
    {
        name = LqdMethane
        rate = 165 // 11 * 15
    }

}


 

Link to comment
Share on other sites

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...