Jump to content

[REQUEST] Making Inline Atmospheric Processors for KSPI


Rushligh

Recommended Posts

Hello all,


So I've been messing around with  a lot of Space Planes; I've got the Mk2 expansion and starlion industries upgrade with KSPI. One thing the pack is majorly missing is atmosphere processing.
 

I've been wondering if there's a way to make a separate part that can convert atmosphere intake (intake atm)  to a gas/liquid fuel much like the stock KSPI processors, but not acting as it's own intake. ideally it would use the ratio of gasses in the current atmosphere and same charge-output ratios as the processors.

the point of this is the have in inline processor hooked up to a few streamline standard intakes to use with KSPI and other engines. cuts down on part count, drag, and weight, and makes it more realistic and pretty.

tl;dr i want a part to be an inline atmosphere processor, but not an intake, that can convert from intakeATM to other gasses.

I've tried cut-paste code from the processors, but the KSPI setup is far beyond me.
[EDIT]

the code in the .cfg file seems to refer to another module somewhere else, or perhaps something in a DLL file. also, sorry, i wasn't clear that this was a request for said part.

Edited by Rushligh
Link to comment
Share on other sites

Something like the ATMscoop from Karbonite? 

USI Karbonite

It is it's own scoop that can be turned on to pull Karbonite, ArgonGas, XenonGas from the Atmosphere... and it's an air intake. It looks like it can be changed to pull in fuel too. 

Try playing with that to being  inline

Seeker

Edited by Seeker89
Link to comment
Share on other sites

Yes, but I'm looking for something that follows KSPI's atmosphere composition rations; also, something that uses intake ATM as a resource to convert. i don't want a part that IS an intake.

I was thinking about using the ATLAS engine for the fuelswitch, something that uses a negative fuel amount to generate fuel, and positive resource. i just need a module for figuring out how much of each resource should be available at a given time.

Link to comment
Share on other sites

It is pretty easy to add a converter to an existing part with a simple module manager script and it is very satisfying when it works.

Some examples to get you started

have a look at mechjeb and engineer for all how it patches the existing command pods. Find your bit you want to patch and use the name 

Then look at the stock IRSU in the squad directory, it's pretty straight forward to change one of the converter scripts to do what you want.

Ge 

 

 

 

 

 

Link to comment
Share on other sites

thaks, that's a good idea. I chekced the IRSU's, and it seems the just convert one resource to another using a preset ratio (varying with heat) my objective is to vary the output based on atmospheric composition (like the scoops in kspi).

following the IRSU idea, i though about a drill and modified what i could/would. i don't know what all the values represent though...

What does harvester type represent, and what options are there?
What does impact transform represent exactly, and what alternate options are there?
is there a way to substitute ore for any Interstellar gas, or would i have to create a separate module for each and switch between them?
Would this even work for detecting the correct ratio of each resource in air?
I would make and test it myself however ksp take a LONG time to load for me.

MODULE
    {
        name = ModuleResourceHarvester
        HarvesterType = 0  (What does this represent?)
        Efficiency = 5
        ResourceName = Ore (is there a way to set this as a switch for different interstellar fuels?)
        ConverterName = Atmospheric Processor
        StartActionName = Start Processor
        StopActionName = Stop Processor
        ImpactTransform = ImpactTransform (i know this represents the drill head's contact, but how?)
        ImpactRange = 0
        AutoShutdown = true
        UseSpecialistBonus = true
        SpecialistEfficiencyFactor = 0.2
        SpecialistBonusBase = 0.05
        Specialty = Engineer
        EfficiencyBonus = 1
        GeneratesHeat = false
        INPUT_RESOURCE
        {
            ResourceName = ElectricCharge
            Ratio = 15
        }.

        INPUT_RESOURCE
        {
            ResourceName = IntakeAtm
            Ratio = 15
        }.

}

[UPDATE] i took a look at the Karbonite atmosphere scoops. still curious about the above, but more so about switching the resource types. also curious if the configuration used in Karbonite for their scoops requires contact with the air like the KSPI scoops (at speed?), of if they merely generate it based on its abundance?

Edited by Rushligh
update
Link to comment
Share on other sites

I would still modify an intake to accept the correct resource, copying the settings for the intake will provide the correct balance.    

If you make an edit script you need to change the edit for each type of intake to make them balance correctly.

however in this case I would copy the radial intake (the whole folder) and modify the script in the copy, changing the name of course.

I tried making a script last night but I don't have the correct mods for IntakeAtm. IntakeAir worked fine though.

Ge 

EDIT:  Here is my config for mk2 parts, it's basically copied from the squad files, save it to a new .cfg somewhere in your gamedata folder. And change the where it says IntakeAir to IntakeAtm

@PART[mk2Cockpit*]:FINAL
{
    MODULE
    {
        name = ModuleOverheatDisplay
    }

    MODULE
    {
         name = ModuleResourceConverter
         ConverterName = AirCompressor
         StartActionName = Start ISRU [AirToLFOx]
         StopActionName = Stop ISRU [AirToLFOx] 
        AutoShutdown = true
        TemperatureModifier
        {
            key = 0 100000
            key = 750 50000
            key = 1000 10000
            key = 1250 500    
            key = 2000 50    
            key = 4000 0
        }                
        GeneratesHeat = true
        DefaultShutoffTemp = .8
        ThermalEfficiency 
        {
            key = 0 0 0 0
            key = 500 0.1 0 0
            key = 1000 1.0 0 0
            key = 1250 0.1 0 0
            key = 3000 0 0 0 
        }


        UseSpecialistBonus = true
        SpecialistEfficiencyFactor = 0.2
        SpecialistBonusBase = 0.05
        Specialty = Engineer
        EfficiencyBonus = 1

         
         INPUT_RESOURCE
         {
            ResourceName = IntakeAir
            Ratio = 0.5
            FlowMode = STAGE_PRIORITY_FLOW
           }
         INPUT_RESOURCE
         {
            ResourceName = ElectricCharge
            Ratio = 30
         }
         OUTPUT_RESOURCE
         {
            ResourceName = LiquidFuel
            Ratio = 0.45
            DumpExcess = false
            FlowMode = STAGE_PRIORITY_FLOW
         }
         OUTPUT_RESOURCE
         {
            ResourceName = Oxidizer
            Ratio = 0.55
            DumpExcess = false
            FlowMode = STAGE_PRIORITY_FLOW
         }
    }

    MODULE
    {
         name = ModuleResourceConverter
         ConverterName = LiquidFuel
         StartActionName = Start ISRU [AirToLqdFuel]
         StopActionName = Stop ISRU [AirToLqdFuel]
        AutoShutdown = true
        TemperatureModifier
        {
            key = 0 100000
            key = 750 50000
            key = 1000 10000
            key = 1250 500    
            key = 2000 50    
            key = 4000 0
        }                
        GeneratesHeat = true
        DefaultShutoffTemp = .8
        ThermalEfficiency 
        {
            key = 0 0 0 0
            key = 500 0.1 0 0
            key = 1000 1.0 0 0
            key = 1250 0.1 0 0
            key = 3000 0 0 0 
        }
        
        UseSpecialistBonus = true
        SpecialistEfficiencyFactor = 0.2
        SpecialistBonusBase = 0.05
        Specialty = Engineer
        EfficiencyBonus = 1

         
         INPUT_RESOURCE
         {
            ResourceName = IntakeAir
            Ratio = 0.45
            FlowMode = STAGE_PRIORITY_FLOW
           }
         INPUT_RESOURCE
         {
            ResourceName = ElectricCharge
            Ratio = 30
         }
         OUTPUT_RESOURCE
         {
            ResourceName = LiquidFuel
            Ratio = 0.9
            DumpExcess = false
            FlowMode = STAGE_PRIORITY_FLOW
         }
    }
    
    

    MODULE
    {
        name = ModuleCoreHeat
        CoreTempGoal = 1000                    //Internal temp goal - we don't transfer till we hit this point
        CoreToPartRatio = 0.1                //Scale back cooling if the part is this % of core temp
        CoreTempGoalAdjustment = 0            //Dynamic goal adjustment
        CoreEnergyMultiplier = 0.1            //What percentage of our core energy do we transfer to the part
        HeatRadiantMultiplier = 0.05        //If the core is hotter, how much heat radiates?
        CoolingRadiantMultiplier = 0        //If the core is colder, how much radiates?
        HeatTransferMultiplier = 0            //If the part is hotter, how much heat transfers in?
        CoolantTransferMultiplier = 0.01    //If the part is colder, how much of our energy can we transfer?
        radiatorCoolingFactor = 1            //How much energy we pull from core with an active radiator?  >= 1
        radiatorHeatingFactor = 0.01        //How much energy we push to the active radiator
        MaxCalculationWarp = 1000            //Based on how dramatic the changes are, this is the max rate of change
        CoreShutdownTemp = 4000                //At what core temperature do we shut down all generators on this part?
        MaxCoolant = 500                    //Maximum amount of radiator capacity we can consume - 50 = 1 small
    }
}

Edited by genericeventhandler
Link to comment
Share on other sites

i understand what you're saying here, but you're missing a major thing. using the "resource converter" module allows you to set the rate to whatever you want. i want one that varies the output depending on he atmosphere's composition; realistically. i also want one that does it with interstellar gasses. making LfOx out of nothing is paramount to cheating. anybody can do that.

borrowing from Karbonite's code, this is what i've got so far...

MODULE
    {
        name = ModuleResourceHarvester
        HarvesterType = 2
        Efficiency = 20
        ResourceName = //i need a way to be able to toggle between interstellar gasses.
        ConverterName = Atmospheric Processor
        StartActionName = Begin Processing
        StopActionName = Halt processing
     INPUT_RESOURCE
     {
        ResourceName = ElectricCharge
        Ratio = 300
     }
INPUT_RESOURCE
     {
        ResourceName = IntakeAtm  //KSPI's alternate name of air intake they interact the same, however they use a separate variable to allow the mod to correct he composition and density of atmospheres
        Ratio = 20
     }
    }

This part would be places in a mk 1 hull with tweakscale, a mk2 Hull, MK3 Hull, And a J-factor Hull (the done core part)
Using the "Resource harvester" should work as i assume KSPI tells the game how much of each gas should be present at a given time.

Edited by Rushligh
forgot to mention...
Link to comment
Share on other sites

As far as I know, the rate can't be dynamically changed like that. The density of the atmosphere and the air flow from intakes very with speed and altitude. 

For interstellar gases you need a resource config, look at the xenon config for an example, and make an intake for the new resource. 

For different inputs, you need a separate module section for a new converter. And you need three per resource. LfOx, Lf, Ox. LfOx will only fill the tanks until one of the resources hits maximum. LF and Ox are needed to top up if either is less than maximum. 

If it's cheating or not, well the difference between converting ore to fuel, or air to fuel. Is just the name of the resource. They are both resources in the same way, my config is slower to refuel than mining for ore! Do what you want to do, it's a sandbox game your only limit is what can't you do!

 

Link to comment
Share on other sites

  • 1 year later...

As I just came across this thread on an unrelated search, I thought I would state this for others who might find their way here as well:

KSPI (release thread here http://forum.kerbalspaceprogram.com/index.php?/topic/155255-122-ksp-interstellar-extended-11211-9-3-2017-release/), now includes the features the OP of this thread has been pining for (and more).

Any air intake (including stock ones or intakes from other mods) can now (for quite some time) collect resources present in the atmosphere of a celestial body. The intake air can then be separated into its constituent parts in some of KSPI's ISRU parts. KSPI also models different detailed atmospheric definitions for each planet and will automatically adapt and work with planets added by planet/system packs as well. The collection & processing also works in the background (i.e. when focused on another vessel).

With all that said - if you are longing for a new function, please don't abuse part configs the way it has been discussed here (you might break stuff without meaning to), instead write a simple plugin to do the task you want or ask someone to do it for you (here the OP had the right idea with the request thread).

Anyways, sorry for the thread revival, but I just thought I'd set the record straight. Thanks for reading so far.

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