Jump to content

Karbonite/Real Fuels Integration Configs [1/18/15]


Raptor831

Recommended Posts

While I have yet to test this, I am unsure that the 'conversionRate' parameter will work as expected. I've not dug into the regolith code, but I've not seen it elsewhere in example cases -- you may need to pre-compute the Input/Output units.

Secondarily, I will suggest a formatting tweak: place all converter MODULE{} blocks for a single part in a single @PART{} block.

The conversion rates are pre-computed to volume units (liters in this case), so they should respect conservation of mass and such. At least based on the "fact" that Karbonite is CH4NO2 (which is arbitrary anyway...). If you check out the XLS document on the repo, you'll see the calculations going on to get from liters to mass, do reactions, then mass to liters.

The formatting might not be a bad idea. If it doesn't make using the XLS a big pain, I'll adjust that.

Link to comment
Share on other sites

The conversion rates are pre-computed to volume units (liters in this case), so they should respect conservation of mass and such. At least based on the "fact" that Karbonite is CH4NO2 (which is arbitrary anyway...). If you check out the XLS document on the repo, you'll see the calculations going on to get from liters to mass, do reactions, then mass to liters.

The formatting might not be a bad idea. If it doesn't make using the XLS a big pain, I'll adjust that.

I may not have been clear, so I will risk rephrasing myself. In your REGO_ModuleResourceConverter additions, the scaling of inputs and outputs between the different converter parts (e.g., 1.25 v 2.5m) seem to be done with the field 'conversionRate'. After a quick look at Regolith's code (ModuleResourceConverter and the BaseConverter it extends), this field is not supported; I posit that this will give rise to the behavior that parts of both scales will consume and supply resources at the same rate, which assuredly is not your intent. My meaning earlier was that you will need to multiply the units in RecipeInputs and RecipeOutputs according to your conversionRate scalar value, rather than supply it to the converter MODULE.

I hope this helps.

@PART[KA_Converter_125_01N]:AFTER[Karbonite]:NEEDS[RealFuels]
{
// ...
MODULE
{
name = REGO_ModuleResourceConverter
ConverterName = Azine, LOX
StartActionName = Start Azine, LOX
StopActionName = Stop Azine, LOX
RecipeInputs = ElectricCharge, 1, Karbonite, 0.5 // note, halved
RecipeOutputs = Aerozine, 0.5035, False, LqdOxygen, 0.5085, True // halved, rounded because manual entry
}
// ...
}

Edited by KwirkyJ
Link to comment
Share on other sites

I may not have been clear, so I will risk rephrasing myself. In your REGO_ModuleResourceConverter additions, the scaling of inputs and outputs between the different converter parts (e.g., 1.25 v 2.5m) seem to be done with the field 'conversionRate'. After a quick look at Regolith's code (ModuleResourceConverter and the BaseConverter it extends), this field is not supported; I posit that this will give rise to the behavior that parts of both scales will consume and supply resources at the same rate, which assuredly is not your intent. My meaning earlier was that you will need to multiply the units in RecipeInputs and RecipeOutputs according to your conversionRate scalar value, rather than supply it to the converter MODULE.

I hope this helps.

@PART[KA_Converter_125_01N]:AFTER[Karbonite]:NEEDS[RealFuels]
{
// ...
MODULE
{
name = REGO_ModuleResourceConverter
ConverterName = Azine, LOX
StartActionName = Start Azine, LOX
StopActionName = Stop Azine, LOX
RecipeInputs = ElectricCharge, 1, Karbonite, 0.5 // note, halved
RecipeOutputs = Aerozine, 0.5035, False, LqdOxygen, 0.5085, True // halved, rounded because manual entry
}
// ...
}

Ah, I see what you mean now. That could be a problem. :) I'll take care of that as soon as I can.

Link to comment
Share on other sites

  • 2 weeks later...

Because I became weary of waiting, I wrote a python script for doing the conversion from release v0.1.3. You will find it and the test suite below; should run on both Python2 and 3. Not tested in-game, but the configs look correct in the file.


# overwrites file contents as needed
# written by KwirkyJ

# from shell: $ python /path/to/K2RF_cleanup.py /path/to/Karbonite.cfg

#@PART[somepart]
#{
# MODULE
# {
# name = REGO_ModuleResourceConverter
# converterName = Some Converter
# conversionRate = 0.5
# inputResources = r1, 1, r2, 2, r3, 3
# outputResources = r1, 1, Bool, r2, 2, Bool
# }
#}
#BECOMES
#@PART[somepart]
#{
# MODULE
# {
# name = REGO_ModuleResourceConverter
# ConverterName = Some Converter
# StartActionName = Start Some Converter
# StopActionName = Stop Some Converter
# inputResources = r1, 0.5, r2, 1.0, r3, 1.5
# outputResources = r1, 0.5, Bool, r2, 1.0, Bool
# }
#}

import argparse

from decimal import *
from os.path import isfile

def correct_inputs(line, factor) :
prefix, list = line.split('=')
elements = list.split(',')
adjlist = ''
for i in range(len(elements) / 2) :
i = i * 2
resource = elements[i].strip()
amount = Decimal(elements[i+1].strip())
amount = amount * factor
adjlist += ', {}, {}'.format(resource, amount.to_eng_string())
return '{}={}'.format(prefix, adjlist[1:])

def correct_outputs(line, factor) :
prefix, list = line.split('=')
elements = list.split(',')
adjlist = ''
for i in range(len(elements) / 3) :
i = i * 3
resource = elements[i].strip()
amount = Decimal(elements[i+1].strip())
store = elements[i+2].strip()
amount = amount * factor
amount = amount.to_eng_string()
adjlist += ', {}, {}, {}'.format(resource, amount, store)
return '{}={}'.format(prefix, adjlist[1:])

def main(f) :
getcontext().prec = 16
contents = []
factor = Decimal(1)
new_cont = []
indent = ''
# read in file, operate on contents as they are read
with open(f, 'rU') as file :
for line in file.readlines() :
line = line.strip()
if line == '}' : indent = indent[1:]
if 'conversionRate' in line :
_, val = line.split('=')
factor = Decimal(val.strip())
continue
if 'inputResources' in line :
line = line.replace('inputResources', 'RecipeInputs')
elif 'outputResources' in line :
line = line.replace('outputResources', 'RecipeOutputs')
elif 'converterName' in line :
line = line.replace('converterName', 'ConverterName')
if 'RecipeInputs' in line :
line = correct_inputs(line, factor)
elif 'RecipeOutputs' in line :
line = correct_outputs(line, factor)
if 'ConverterName' in line :
name = line.split('=')[1].strip()
new_cont.append('{}{}\n'.format(indent, line))
new_cont.append('{}StartActionName = Start {}\n'.format(indent, name))
new_cont.append('{}StopActionName = Stop {}\n'.format(indent, name))
else :
new_cont.append('{}{}\n'.format(indent, line))
if line == '{' : indent += ' '

# write updated contents to file
with open(f, 'w') as file :
file.writelines(new_cont)
return 0

if __name__ == '__main__' :
parser = argparse.ArgumentParser(description='clean up partmodules')
parser.add_argument('file', type=str, help='path to "Karbonite_RF.cfg"')
args = parser.parse_args()
if isfile(args.file) :
main(args.file)
else :
print('Supplied path \'{}\' is invalid; exiting'.format(args.file))

# dedicated script for converting 'wrong' modules to correct ones


# written by KwirkyJ
# from shell: $ python test_K2RF_cleanup.py

import unittest
import K2RF_cleanup as k2

from decimal import *
from os import remove

class TestCorrectInputs(unittest.TestCase) :
def setUp(self) :
self.line = 'RecipeInputs = ElectricCharge, 1, Karbonite, 2'

def test_one(self) :
factor = Decimal(1)
expected = 'RecipeInputs = ElectricCharge, 1, Karbonite, 2'
actual = k2.correct_inputs(self.line, factor)
self.assertEquals(actual, expected)

def test_one_with_whitespace(self) :
factor = Decimal(1)
self.line = ' \t{}'.format(self.line)
expected = ' \tRecipeInputs = ElectricCharge, 1, Karbonite, 2'
actual = k2.correct_inputs(self.line, factor)
self.assertEquals(actual, expected)

def test_halved(self) :
factor = Decimal('0.5')
expected = 'RecipeInputs = ElectricCharge, 0.5, Karbonite, 1.0'
actual = k2.correct_inputs(self.line, factor)
self.assertEquals(actual, expected)

def test_tripled(self) :
factor = Decimal('3')
expected = 'RecipeInputs = ElectricCharge, 3, Karbonite, 6'
actual = k2.correct_inputs(self.line, factor)
self.assertEquals(actual, expected)

def test_tripled_with_decimal(self) :
factor = Decimal('3.0')
expected = 'RecipeInputs = ElectricCharge, 3.0, Karbonite, 6.0'
actual = k2.correct_inputs(self.line, factor)
self.assertEquals(actual, expected)

class TestCorrectOutputs(unittest.TestCase) :
def test_one(self) :
factor = Decimal('1')
line = 'RecipeOutputs = Monopropellant, 0.3, True'
expected = line
actual = k2.correct_outputs(line, factor)
self.assertEquals(actual, expected)

def test_one_with_preceding_whitespace(self) :
factor = Decimal('1')
line = ' RecipeOutputs = Monopropellant, 0.3, True'
expected = line
actual = k2.correct_outputs(line, factor)
self.assertEquals(actual, expected)

def test_two_thirded(self) :
factor = Decimal('0.3')
line = 'RecipeOutputs = Monopropellant, 0.3, True, LqdHydrogen, 0.1, False'
expected = 'RecipeOutputs = Monopropellant, 0.09, True, LqdHydrogen, 0.03, False'
actual = k2.correct_outputs(line, factor)
self.assertEquals(actual, expected)

class TestMain(unittest.TestCase) :
def setUp(self) :
self.expected = '@PART[KA_Converter_250_01N]:AFTER[Karbonite]:NEEDS[RealFuels]\n{\n MODULE\n {\n name=REGO_ModuleResourceConverter\n ConverterName = Azine, LOX\n StartActionName = Start Azine, LOX\n StopActionName = Stop Azine, LOX\n RecipeInputs = ElectricCharge, 2, Karbonite, 1\n RecipeOutputs = Aerozine50, 1.06943544155199, False, LqdOxygen, 1.01695809636349, True\n }\n}\n\n@PART[KA_Converter_125_01N]:AFTER[Karbonite]:NEEDS[RealFuels]\n{\n MODULE\n {\n name = REGO_ModuleResourceConverter\n ConverterName = Azine, LOX\n StartActionName = Start Azine, LOX\n StopActionName = Stop Azine, LOX\n RecipeInputs = ElectricCharge, 1.0, Karbonite, 0.5\n RecipeOutputs = Aerozine50, 0.534717720775995, False, LqdOxygen, 0.508479048181745, True\n }\n}\n\n'

self.p1 = '_putResources.cfg'
contents1 = '@PART[KA_Converter_250_01N]:AFTER[Karbonite]:NEEDS[RealFuels]\n{\n MODULE\n {\n name=REGO_ModuleResourceConverter\n converterName = Azine, LOX\n conversionRate = 1\n RecipeInputs = ElectricCharge, 2, Karbonite, 1\n RecipeOutputs = Aerozine50, 1.06943544155199, False, LqdOxygen, 1.01695809636349, True\n }\n}\n\n@PART[KA_Converter_125_01N]:AFTER[Karbonite]:NEEDS[RealFuels]\n{\n MODULE\n {\n name = REGO_ModuleResourceConverter\n converterName = Azine, LOX\n conversionRate = 0.5\n RecipeInputs = ElectricCharge, 2, Karbonite, 1\n RecipeOutputs = Aerozine50, 1.06943544155199, False, LqdOxygen, 1.01695809636349, True\n }\n}\n\n'
with open(self.p1, 'w') as file :
file.write(contents1)

self.p2 = 'Recipe_puts.cfg'
contents2 = '@PART[KA_Converter_250_01N]:AFTER[Karbonite]:NEEDS[RealFuels]\n{\n MODULE\n {\n name=REGO_ModuleResourceConverter\n ConverterName = Azine, LOX\n conversionRate = 1\n inputResources = ElectricCharge, 2, Karbonite, 1\n outputResources = Aerozine50, 1.06943544155199, False, LqdOxygen, 1.01695809636349, True\n }\n}\n\n@PART[KA_Converter_125_01N]:AFTER[Karbonite]:NEEDS[RealFuels]\n{\n MODULE\n {\n name = REGO_ModuleResourceConverter\n ConverterName = Azine, LOX\n conversionRate = 0.5\n inputResources = ElectricCharge, 2, Karbonite, 1\n outputResources = Aerozine50, 1.06943544155199, False, LqdOxygen, 1.01695809636349, True\n }\n}\n\n'
with open(self.p2, 'w') as file :
file.write(contents2)

def test_main_1(self) :
k2.main(self.p1)
with open(self.p1, 'r') as f :
actual = f.read()
self.assertEquals(self.expected, actual)

def test_main_2(self) :
k2.main(self.p2)
with open(self.p2, 'r') as f :
actual = f.read()
self.assertEquals(self.expected, actual)

def tearDown(self) :
remove(self.p1)
remove(self.p2)

if __name__ == '__main__' :
unittest.main()
# test suite for K2RF_cleanup

Link to comment
Share on other sites

I have continued to work on this, and have made a patch that works properly in-game. The Karbonite_RemoveStock and Karbonite_New_Converters configs have been done away with and folded into the Karbonite_RF config file; INSTALLATION INSTRUCTIONS: delete aforementioned files and replace Karbonite_RF.cfg with the below, and all should be well.

NOTE: the 'standard' converter is deleted, though the config contains commented lines and instructions to simply rename them. Also note that the distiller parts without the 'MON' suffix do not have the a use clause at the end of their descriptions – a commented-out line is present for those with the wherewithal to fill it in.


// KwirkyJ cleaned things up and produced this config



!PART[KA_Converter_250_01]:FINAL:NEEDS[RealFuels] {} // yes, FINAL is poor form
!PART[KA_Converter_125_01]:FINAL:NEEDS[RealFuels] {} // but at least it works

// ======== /\
// USE EITHER THE ABOVE, TO REMOVE THE STOCK LFO CONVERTERS, OR
// COMMENT THE ABOVE PAIR AND UNCOMMENT BELOW TO REBRAND THEM WITHOUT
// ADJUSTMENT TO PROVIDED CONVERTER MODULES
// ======== \/

//@PART[KA_Converter_250_01]:AFTER[Karbonite]:NEEDS[RealFuels]
//{
// @title = BSP-2C Karbonite Converter
// @description = Add Karbonite, shake vigorously, and fuel products may or may not come out of this general purpose converter. Take cover before commencing conversion process. Do not eat contents. This converter is configured to produce hydrocarbon fuels and liquid oxygen.
//}
//@PART[KA_Converter_125_01]:AFTER[Karbonite]:NEEDS[RealFuels]
//{
// @title = BSP-1C Karbonite Converter
// @description = Add Karbonite, shake vigorously, and fuel products may or may not come out of this general purpose converter. Take cover before commencing conversion process. Do not eat contents. This converter is configured to produce hydrocarbon fuels and liquid oxygen.
//}



+PART[KA_Converter_250_01]:AFTER[Karbonite]:NEEDS[RealFuels]
{
@name = KA_Converter_250_01N
@title = BSP-2N Karbonite Converter
@description = Add Karbonite, shake vigorously, and fuel products may or may not come out of this general purpose converter. Take cover before commencing conversion process. Do not eat contents. This converter is configured to produce nitrous fuels and dinitrogen tetroxide.
!MODULE[REGO_ModuleResourceConverter],* {}
MODULE
{
name = REGO_ModuleResourceConverter
ConverterName = Azine, LOX
StartActionName = Start Azine, LOX
StopActionName = Stop Azine, LOX
RecipeInputs = ElectricCharge, 2, Karbonite, 1
RecipeOutputs = Aerozine50, 1.06943544155199, False, LqdOxygen, 1.01695809636349, True
}
MODULE
{
name = REGO_ModuleResourceConverter
ConverterName = Hydyne, LOX, Hzine
StartActionName = Start Hydyne, LOX, Hzine
StopActionName = Stop Hydyne, LOX, Hzine
RecipeInputs = ElectricCharge, 2, Karbonite, 1
RecipeOutputs = Hydyne, 1.1644502220112, False, LqdOxygen, 1.01695809636349, True, Hydrazine, 0.0826714788616067, True
}
MODULE
{
name = REGO_ModuleResourceConverter
ConverterName = Ammonia, LOX
StartActionName = Start Ammonia, LOX
StopActionName = Stop Ammonia, LOX
RecipeInputs = ElectricCharge, 1.5, Karbonite, 1
RecipeOutputs = LqdAmmonia, 1.02245918516123, False, LqdOxygen, 1.01695809636349, True
}
MODULE
{
name = REGO_ModuleResourceConverter
ConverterName = MMH, LOX
StartActionName = Start MMH, LOX
StopActionName = Stop MMH, LOX
RecipeInputs = ElectricCharge, 2, Karbonite, 1
RecipeOutputs = MMH, 0.96458773988951, False, LqdOxygen, 1.01695809636349, True
}
MODULE
{
name = REGO_ModuleResourceConverter
ConverterName = NTO
StartActionName = Start NTO
StopActionName = Stop NTO
RecipeInputs = ElectricCharge, 1.5, Karbonite, 1
RecipeOutputs = NTO, 1.15052686385799, False
}
MODULE
{
name = REGO_ModuleResourceConverter
ConverterName = UDMH, LOX
StartActionName = Start UDMH, LOX
StopActionName = Stop UDMH, LOX
RecipeInputs = ElectricCharge, 2, Karbonite, 1
RecipeOutputs = UDMH, 1.37756107717985, False, LqdOxygen, 1.01695809636349, True
}
}

+PART[KA_Converter_125_01]:AFTER[Karbonite]:NEEDS[RealFuels]
{
@name = KA_Converter_125_01N
@title = BSP-1N Karbonite Converter
@description = Add Karbonite, shake vigorously, and fuel products may or may not come out of this general purpose converter. Take cover before commencing conversion process. Do not eat contents. This converter is configured to produce nitrous fuels and dinitrogen tetroxide.
!MODULE[REGO_ModuleResourceConverter],* {}
MODULE
{
name = REGO_ModuleResourceConverter
ConverterName = Azine, LOX
StartActionName = Start Azine, LOX
StopActionName = Stop Azine, LOX
RecipeInputs = ElectricCharge, 1.0, Karbonite, 0.5
RecipeOutputs = Aerozine50, 0.534717720775995, False, LqdOxygen, 0.508479048181745, True
}
MODULE
{
name = REGO_ModuleResourceConverter
ConverterName = Hydyne, LOX, Hzine
StartActionName = Start Hydyne, LOX, Hzine
StopActionName = Stop Hydyne, LOX, Hzine
RecipeInputs = ElectricCharge, 1.0, Karbonite, 0.5
RecipeOutputs = Hydyne, 0.58222511100560, False, LqdOxygen, 0.508479048181745, True, Hydrazine, 0.04133573943080335, True
}
MODULE
{
name = REGO_ModuleResourceConverter
ConverterName = Ammonia, LOX
StartActionName = Start Ammonia, LOX
StopActionName = Stop Ammonia, LOX
RecipeInputs = ElectricCharge, 0.75, Karbonite, 0.5
RecipeOutputs = LqdAmmonia, 0.511229592580615, False, LqdOxygen, 0.508479048181745, True
}
MODULE
{
name = REGO_ModuleResourceConverter
ConverterName = MMH, LOX
StartActionName = Start MMH, LOX
StopActionName = Stop MMH, LOX
RecipeInputs = ElectricCharge, 1.0, Karbonite, 0.5
RecipeOutputs = MMH, 0.482293869944755, False, LqdOxygen, 0.508479048181745, True
}
MODULE
{
name = REGO_ModuleResourceConverter
ConverterName = NTO
StartActionName = Start NTO
StopActionName = Stop NTO
RecipeInputs = ElectricCharge, 0.75, Karbonite, 0.5
RecipeOutputs = NTO, 0.575263431928995, False
}
MODULE
{
name = REGO_ModuleResourceConverter
ConverterName = UDMH, LOX
StartActionName = Start UDMH, LOX
StopActionName = Stop UDMH, LOX
RecipeInputs = ElectricCharge, 1.0, Karbonite, 0.5
RecipeOutputs = UDMH, 0.688780538589925, False, LqdOxygen, 0.508479048181745, True
}
}



+PART[KA_Converter_250_01]:AFTER[Karbonite]:NEEDS[RealFuels]
{
@name = KA_Converter_250_01O
@title = BSP-2O Karbonite Converter
@description = Add Karbonite, shake vigorously, and fuel products may or may not come out of this general purpose converter. Take cover before commencing conversion process. Do not eat contents. This converter is configured to produce kerosene-related fuels.
!MODULE[REGO_ModuleResourceConverter],* {}
MODULE
{
name = REGO_ModuleResourceConverter
ConverterName = Ethanol75, LOX, Hzine, N2
StartActionName = Start Ethanol75, LOX, Hzine, N2
StopActionName = Stop Ethanol75, LOX, Hzine, N2
RecipeInputs = ElectricCharge, 1.5, Karbonite, 1
RecipeOutputs = Ethanol75, 1.42631235359096, False, LqdOxygen, 0.508479048181744, True, Hydrazine, 0.289350176015623, True, Nitrogen, 203.003503054896, True
}
MODULE
{
name = REGO_ModuleResourceConverter
ConverterName = RP-1, LOX, Hzine, N2
StartActionName = Start RP-1, LOX, Hzine, N2
StopActionName = Stop RP-1, LOX, Hzine, N2
RecipeInputs = ElectricCharge, 1.5, Karbonite, 1
RecipeOutputs = Kerosene, 0.627716289849053, False, LqdOxygen, 1.01695809636349, True, Hydrazine, 0.530475322695309, True, Nitrogen, 33.833917175816, True
}
MODULE
{
name = REGO_ModuleResourceConverter
ConverterName = LOX, CH4, N2
StartActionName = Start LOX, CH4, N2
StopActionName = Stop LOX, CH4, N2
RecipeInputs = ElectricCharge, 1.5, Karbonite, 1
RecipeOutputs = LqdOxygen, 1.01695809636349, False, LqdMethane, 1.37649909470898, True, Nitrogen, 812.014012219585, True
}
MODULE
{
name = REGO_ModuleResourceConverter
ConverterName = CH4, LOX, N2
StartActionName = Start CH4, LOX, N2
StopActionName = Stop CH4, LOX, N2
RecipeInputs = ElectricCharge, 1.5, Karbonite, 1
RecipeOutputs = LqdMethane, 1.37649909470898, False, LqdOxygen, 1.01695809636349, True, Nitrogen, 406.007006109792, True
}
MODULE
{
name = REGO_ModuleResourceConverter
ConverterName = Syntin, LOX, Hzine
StartActionName = Start Syntin, LOX, Hzine
StopActionName = Stop Syntin, LOX, Hzine
RecipeInputs = ElectricCharge, 2, Karbonite, 1
RecipeOutputs = Syntin, 0.580511845887995, False, LqdOxygen, 1.01695809636349, True, Hydrazine, 0.578700352031247, True
}
}

+PART[KA_Converter_125_01]:AFTER[Karbonite]:NEEDS[RealFuels]
{
@name = KA_Converter_125_01O
@title = BSP-1O Karbonite Converter
@description = Add Karbonite, shake vigorously, and fuel products may or may not come out of this general purpose converter. Take cover before commencing conversion process. Do not eat contents. This converter is configured to produce kerosene-related fuels.
!MODULE[REGO_ModuleResourceConverter],* {}
MODULE
{
name = REGO_ModuleResourceConverter
ConverterName = Ethanol75, LOX, Hzine, N2
StartActionName = Start Ethanol75, LOX, Hzine, N2
StopActionName = Stop Ethanol75, LOX, Hzine, N2
RecipeInputs = ElectricCharge, 0.75, Karbonite, 0.5
RecipeOutputs = Ethanol75, 0.713156176795480, False, LqdOxygen, 0.2542395240908720, True, Hydrazine, 0.1446750880078115, True, Nitrogen, 101.5017515274480, True
}
MODULE
{
name = REGO_ModuleResourceConverter
ConverterName = RP-1, LOX, Hzine, N2
StartActionName = Start RP-1, LOX, Hzine, N2
StopActionName = Stop RP-1, LOX, Hzine, N2
RecipeInputs = ElectricCharge, 0.75, Karbonite, 0.5
RecipeOutputs = Kerosene, 0.3138581449245265, False, LqdOxygen, 0.508479048181745, True, Hydrazine, 0.2652376613476545, True, Nitrogen, 16.9169585879080, True
}
MODULE
{
name = REGO_ModuleResourceConverter
ConverterName = LOX, CH4, N2
StartActionName = Start LOX, CH4, N2
StopActionName = Stop LOX, CH4, N2
RecipeInputs = ElectricCharge, 0.75, Karbonite, 0.5
RecipeOutputs = LqdOxygen, 0.508479048181745, False, LqdMethane, 0.688249547354490, True, Nitrogen, 406.0070061097925, True
}
MODULE
{
name = REGO_ModuleResourceConverter
ConverterName = CH4, LOX, N2
StartActionName = Start CH4, LOX, N2
StopActionName = Stop CH4, LOX, N2
RecipeInputs = ElectricCharge, 0.75, Karbonite, 0.5
RecipeOutputs = LqdMethane, 0.688249547354490, False, LqdOxygen, 0.508479048181745, True, Nitrogen, 203.0035030548960, True
}
MODULE
{
name = REGO_ModuleResourceConverter
ConverterName = Syntin, LOX, Hzine
StartActionName = Start Syntin, LOX, Hzine
StopActionName = Stop Syntin, LOX, Hzine
RecipeInputs = ElectricCharge, 1.0, Karbonite, 0.5
RecipeOutputs = Syntin, 0.2902559229439975, False, LqdOxygen, 0.508479048181745, True, Hydrazine, 0.2893501760156235, True
}
}



+PART[KA_Converter_250_01]:AFTER[Karbonite]:NEEDS[RealFuels]
{
@name = KA_Converter_250_01H
@title = BSP-2H Karbonite Converter
@description = Add Karbonite, shake vigorously, and fuel products may or may not come out of this general purpose converter. Take cover before commencing conversion process. Do not eat contents. This converter is configured to produce liquid hydrogen and liquid oxygen.
!MODULE[REGO_ModuleResourceConverter],* {}
MODULE
{
name = REGO_ModuleResourceConverter
ConverterName = LH2, LOX, N2
StartActionName = Start LH2, LOX, N2
StopActionName = Stop LH2, LOX, N2
RecipeInputs = ElectricCharge, 6, Karbonite, 1
RecipeOutputs = LqdHydrogen, 2.06352544237182, False, LqdOxygen, 1.01695809636349, True, Nitrogen, 406.007006109792, True
}
MODULE
{
name = REGO_ModuleResourceConverter
ConverterName = LOX, LH2, N2
StartActionName = Start LOX, LH2, N2
StopActionName = Stop LOX, LH2, N2
RecipeInputs = ElectricCharge, 6, Karbonite, 1
RecipeOutputs = LqdOxygen, 1.01695809636349, False, LqdHydrogen, 2.06352544237182, True, Nitrogen, 406.007006109792, True
}
}

+PART[KA_Converter_125_01]:AFTER[Karbonite]:NEEDS[RealFuels]
{
@name = KA_Converter_125_01H
@title = BSP-1H Karbonite Converter
@description = Add Karbonite, shake vigorously, and fuel products may or may not come out of this general purpose converter. Take cover before commencing conversion process. Do not eat contents. This converter is configured to produce liquid hydrogen and liquid oxygen.
!MODULE[REGO_ModuleResourceConverter],* {}
MODULE
{
name = REGO_ModuleResourceConverter
ConverterName = LH2, LOX, N2
StartActionName = Start LH2, LOX, N2
StopActionName = Stop LH2, LOX, N2
RecipeInputs = ElectricCharge, 3.0, Karbonite, 0.5
RecipeOutputs = LqdHydrogen, 1.031762721185910, False, LqdOxygen, 0.508479048181745, True, Nitrogen, 203.0035030548960, True
}
MODULE
{
name = REGO_ModuleResourceConverter
ConverterName = LOX, LH2, N2
StartActionName = Start LOX, LH2, N2
StopActionName = Stop LOX, LH2, N2
RecipeInputs = ElectricCharge, 3.0, Karbonite, 0.5
RecipeOutputs = LqdOxygen, 0.508479048181745, False, LqdHydrogen, 1.031762721185910, True, Nitrogen, 203.0035030548960, True
}
}



@PART[KA_Distiller_250_01]:AFTER[Karbonite]:NEEDS[RealFuels]
{
// @description = We're not quite sure why some of our scientists try running Karbonite through a distillation process, but as it turns out, sometimes it leaves behind some useful (and less explosive) byproducts. SOMETHING ABOUT ITS OUTPUTS.
!MODULE[REGO_ModuleResourceConverter],* {}
MODULE
{
name = REGO_ModuleResourceConverter
ConverterName = HTP
StartActionName = Start HTP
StopActionName = Stop HTP
RecipeInputs = ElectricCharge, 1.75, LqdHydrogen, 1, LqdOxygen, 0.985651134201278
RecipeOutputs = HTP, 0.747173715077286, False
}
MODULE
{
name = REGO_ModuleResourceConverter
ConverterName = HTP, N2
StartActionName = Start HTP, N2
StopActionName = Stop HTP, N2
RecipeInputs = ElectricCharge, 1.5, Karbonite, 1
RecipeOutputs = HTP, 0.85656220607414, False, Nitrogen, 406.007006109792, True
}
MODULE
{
name = REGO_ModuleResourceConverter
ConverterName = Hzine
StartActionName = Start Hzine
StopActionName = Stop Hzine
RecipeInputs = ElectricCharge, 2, Karbonite, 1
RecipeOutputs = Hydrazine, 0.578700352031247, False
}
MODULE
{
name = REGO_ModuleResourceConverter
ConverterName = IRFNA-III
StartActionName = Start IRFNA-III
StopActionName = Stop IRFNA-III
RecipeInputs = ElectricCharge, 1.5, Karbonite, 1
RecipeOutputs = IRFNA-III, 1.02823531181671, False
}
MODULE
{
name = REGO_ModuleResourceConverter
ConverterName = N2
StartActionName = Start N2
StopActionName = Stop N2
RecipeInputs = ElectricCharge, 1.5, Karbonite, 1
RecipeOutputs = Nitrogen, 406.007006109792, False
}
MODULE
{
name = REGO_ModuleResourceConverter
ConverterName = NO2
StartActionName = Start NO2
StopActionName = Stop NO2
RecipeInputs = ElectricCharge, 1.75, Karbonite, 1
RecipeOutputs = NitrousOxide, 550.373980080283, False
}
}

@PART[KA_Distiller_125_01]:AFTER[Karbonite]:NEEDS[RealFuels]
{
// @description = We're not quite sure why some of our scientists try running Karbonite through a distillation process, but as it turns out, sometimes it leaves behind some useful (and less explosive) byproducts. SOMETHING ABOUT ITS OUTPUTS.
!MODULE[REGO_ModuleResourceConverter],* {}
MODULE
{
name = REGO_ModuleResourceConverter
ConverterName = HTP
StartActionName = Start HTP
StopActionName = Stop HTP
RecipeInputs = ElectricCharge, 0.875, LqdHydrogen, 0.5, LqdOxygen, 0.4928255671006390
RecipeOutputs = HTP, 0.3735868575386430, False
}
MODULE
{
name = REGO_ModuleResourceConverter
ConverterName = HTP, N2
StartActionName = Start HTP, N2
StopActionName = Stop HTP, N2
RecipeInputs = ElectricCharge, 0.75, Karbonite, 0.5
RecipeOutputs = HTP, 0.428281103037070, False, Nitrogen, 203.0035030548960, True
}
MODULE
{
name = REGO_ModuleResourceConverter
ConverterName = Hzine
StartActionName = Start Hzine
StopActionName = Stop Hzine
RecipeInputs = ElectricCharge, 1.0, Karbonite, 0.5
RecipeOutputs = Hydrazine, 0.2893501760156235, False
}
MODULE
{
name = REGO_ModuleResourceConverter
ConverterName = IRFNA-III
StartActionName = Start IRFNA-III
StopActionName = Stop IRFNA-III
RecipeInputs = ElectricCharge, 0.75, Karbonite, 0.5
RecipeOutputs = IRFNA-III, 0.514117655908355, False
}
MODULE
{
name = REGO_ModuleResourceConverter
ConverterName = N2
StartActionName = Start N2
StopActionName = Stop N2
RecipeInputs = ElectricCharge, 0.75, Karbonite, 0.5
RecipeOutputs = Nitrogen, 203.0035030548960, False
}
MODULE
{
name = REGO_ModuleResourceConverter
ConverterName = NO2
StartActionName = Start NO2
StopActionName = Stop NO2
RecipeInputs = ElectricCharge, 0.875, Karbonite, 0.5
RecipeOutputs = NitrousOxide, 275.1869900401415, False
}
}



+PART[KA_Distiller_250_01]:AFTER[Karbonite]:NEEDS[RealFuels]
{
@name = KA_Distiller_250_01M
@title = BSX-200-MON Karbonite Distiller
@description = We're not quite sure why some of our scientists try running Karbonite through a distillation process, but as it turns out, sometimes it leaves behind some useful (and less explosive) byproducts. This distiller contains components to mix precise ratios of oxides of nitrogen.
!MODULE[REGO_ModuleResourceConverter],* {}
MODULE
{
name = REGO_ModuleResourceConverter
ConverterName = MON1, N2
StartActionName = Start MON1, N2
StopActionName = Stop MON1, N2
RecipeInputs = ElectricCharge, 1.5, Karbonite, 1
RecipeOutputs = MON1, 1.16158537362325, False, Nitrogen, 406.007006109792, True
}
MODULE
{
name = REGO_ModuleResourceConverter
ConverterName = MON10, N2
StartActionName = Start MON10, N2
StopActionName = Stop MON10, N2
RecipeInputs = ElectricCharge, 1.5, Karbonite, 1
RecipeOutputs = MON10, 1.12639843351329, False, Nitrogen, 365.406305498813, True
}
MODULE
{
name = REGO_ModuleResourceConverter
ConverterName = MON15, N2
StartActionName = Start MON15, N2
StopActionName = Stop MON15, N2
RecipeInputs = ElectricCharge, 1.5, Karbonite, 1
RecipeOutputs = MON15, 1.10461058210504, False, Nitrogen, 365.406305498813, True
}
MODULE
{
name = REGO_ModuleResourceConverter
ConverterName = MON20, N2
StartActionName = Start MON20, N2
StopActionName = Stop MON20, N2
RecipeInputs = ElectricCharge, 1.5, Karbonite, 1
RecipeOutputs = MON20, 1.0879995438031, False, Nitrogen, 345.105955193323, True
}
MODULE
{
name = REGO_ModuleResourceConverter
ConverterName = MON3, N2
StartActionName = Start MON3, N2
StopActionName = Stop MON3, N2
RecipeInputs = ElectricCharge, 1.5, Karbonite, 1
RecipeOutputs = MON3, 1.15476096542982, False, Nitrogen, 324.805604887834, True
}
}

+PART[KA_Distiller_125_01]:AFTER[Karbonite]:NEEDS[RealFuels]
{
@name = KA_Distiller_125_01M
@title = BSX-100-MON Karbonite Distiller
@description = We're not quite sure why some of our scientists try running Karbonite through a distillation process, but as it turns out, sometimes it leaves behind some useful (and less explosive) byproducts. This distiller contains components to mix precise ratios of oxides of nitrogen.
!MODULE[REGO_ModuleResourceConverter],* {}
MODULE
{
name = REGO_ModuleResourceConverter
ConverterName = MON1, N2
StartActionName = Start MON1, N2
StopActionName = Stop MON1, N2
RecipeInputs = ElectricCharge, 0.75, Karbonite, 0.5
RecipeOutputs = MON1, 0.580792686811625, False, Nitrogen, 203.0035030548960, True
}
MODULE
{
name = REGO_ModuleResourceConverter
ConverterName = MON10, N2
StartActionName = Start MON10, N2
StopActionName = Stop MON10, N2
RecipeInputs = ElectricCharge, 0.75, Karbonite, 0.5
RecipeOutputs = MON10, 0.563199216756645, False, Nitrogen, 182.7031527494065, True
}
MODULE
{
name = REGO_ModuleResourceConverter
ConverterName = MON15, N2
StartActionName = Start MON15, N2
StopActionName = Stop MON15, N2
RecipeInputs = ElectricCharge, 0.75, Karbonite, 0.5
RecipeOutputs = MON15, 0.552305291052520, False, Nitrogen, 182.7031527494065, True
}
MODULE
{
name = REGO_ModuleResourceConverter
ConverterName = MON20, N2
StartActionName = Start MON20, N2
StopActionName = Stop MON20, N2
RecipeInputs = ElectricCharge, 0.75, Karbonite, 0.5
RecipeOutputs = MON20, 0.54399977190155, False, Nitrogen, 172.5529775966615, True
}
MODULE
{
name = REGO_ModuleResourceConverter
ConverterName = MON3, N2
StartActionName = Start MON3, N2
StopActionName = Stop MON3, N2
RecipeInputs = ElectricCharge, 0.75, Karbonite, 0.5
RecipeOutputs = MON3, 0.577380482714910, False, Nitrogen, 162.4028024439170, True
}
}
// Raptor831 did the heavy lifting behind things here

Link to comment
Share on other sites

  • 3 months later...
Does this work with 1.0.2? I've noticed some references to regolith which is no longer in use thanks to the new stock resource system, leaving me thinking the answer is probably no, but not 100% sure...

No, it doesn't work with 1.0.2. Or, the things it relies on do not work in 1.0.2. Regolith got rolled into stock (more or less), and RF isn't updated officially yet for 1.0.2.

That said, I probably won't update it. Two reasons: 1) Karbonite/Regolith changed quite a bit, so there would be a goodly amount of time needed to update, and 2) regex is starting a RealISRU mod to do essentially what this mod did (or at least attempted). The new mod will be part of the RO suite, but I'll be sure there are at least a stock-ish set to be used.

Link to comment
Share on other sites

No, it doesn't work with 1.0.2. Or, the things it relies on do not work in 1.0.2. Regolith got rolled into stock (more or less), and RF isn't updated officially yet for 1.0.2.

That said, I probably won't update it. Two reasons: 1) Karbonite/Regolith changed quite a bit, so there would be a goodly amount of time needed to update, and 2) regex is starting a RealISRU mod to do essentially what this mod did (or at least attempted). The new mod will be part of the RO suite, but I'll be sure there are at least a stock-ish set to be used.

I have significant doubts that regex will do much, if anything, to include Karbonite in his Real ISRU. He's already said that if it isn't a real process, it's not making it into the mod, and since Karbonite would amount to a wonder compound, he's unlikely to allow it in. I will ask there, but I'm not holding my breath...

Link to comment
Share on other sites

  • 6 months later...
On 5/21/2015, 6:12:07, Raptor831 said:

No, it doesn't work with 1.0.2. Or, the things it relies on do not work in 1.0.2. Regolith got rolled into stock (more or less), and RF isn't updated officially yet for 1.0.2.

That said, I probably won't update it. Two reasons: 1) Karbonite/Regolith changed quite a bit, so there would be a goodly amount of time needed to update, and 2) regex is starting a RealISRU mod to do essentially what this mod did (or at least attempted). The new mod will be part of the RO suite, but I'll be sure there are at least a stock-ish set to be used.

I know it's been forever, but I'm curious if anyone has ever bothered / attempted to update this to work with the new resource / conversion system. I have spent some time looking through the RealISRU thread and have been unable to find configs that include Karbonite in any way. Generally, it seems the makers / users of that mod consider Karbonite to be "Unicorn Poop" and react fairly harsh at the mere suggestion of including it. That said, I would still like to use Karbonite with Real Fuels, so I'm brought back here.

If there hasn't been any work done to update this to the new system, how hard would it be to do the update myself? I've looked into the configs and it seems that, aside from the conversionRate variable, which doesn't exist in the new system, the resource converters could be implemented easily in the new system. What effect does the the conversionRate variable have and how critical is to the conversion process?

Link to comment
Share on other sites

1 hour ago, SpacedInvader said:

I know it's been forever, but I'm curious if anyone has ever bothered / attempted to update this to work with the new resource / conversion system. I have spent some time looking through the RealISRU thread and have been unable to find configs that include Karbonite in any way. Generally, it seems the makers / users of that mod consider Karbonite to be "Unicorn Poop" and react fairly harsh at the mere suggestion of including it. That said, I would still like to use Karbonite with Real Fuels, so I'm brought back here.

If there hasn't been any work done to update this to the new system, how hard would it be to do the update myself? I've looked into the configs and it seems that, aside from the conversionRate variable, which doesn't exist in the new system, the resource converters could be implemented easily in the new system. What effect does the the conversionRate variable have and how critical is to the conversion process?

The rate just was how much conversion was done in 1 second of game-time. It was really just to limit the amount of stuff going in/coming out of the converter.

Doubtful RealISRU will pick up Karbonite. :wink: But really, it's more or less adding the right resources and amounts to each end. Doing the configs is the easy part. (Never liked chemistry in school!) I honestly don't know what the "new" syntax is for the converters/generators, so I can't say exactly how hard. But essentially it's doing chem/math and then making the same part over and over for each conversion.

 

Edit: Heck, looking at KwirkyJ's stuff, the work might be even easier, since the conversionRate was dropped from Regolith back in the day. Might want to start there.

Edited by Raptor831
Link to comment
Share on other sites

30 minutes ago, Raptor831 said:

The rate just was how much conversion was done in 1 second of game-time. It was really just to limit the amount of stuff going in/coming out of the converter.

Doubtful RealISRU will pick up Karbonite. :wink: But really, it's more or less adding the right resources and amounts to each end. Doing the configs is the easy part. (Never liked chemistry in school!) I honestly don't know what the "new" syntax is for the converters/generators, so I can't say exactly how hard. But essentially it's doing chem/math and then making the same part over and over for each conversion.

 

Edit: Heck, looking at KwirkyJ's stuff, the work might be even easier, since the conversionRate was dropped from Regolith back in the day. Might want to start there.

I was probably just going to use the conversion rates that you guys had already come up with, since a lot of work had already gone into them and the new system seems to support them just fine. As for the new syntax, it's basically the same as Regolith, except each input and output is in its own node.

Link to comment
Share on other sites

16 hours ago, SpacedInvader said:

So, I should have a workable config by tomorrow afternoon.

Why, by the way, did you decide to separate into different conversions outputs that come from the same reaction (i.e. LqdOxygen and LqdHydrogen)? It seems like extra work / complexity for no reason?

Mostly because you generally only want/need 1 of the resources. Also, how do you describe the process in a little tooltip? It was simpler to say "Make me LOX" or "Make me LH2". Yeah, there are places where just splitting it into LH2/LOX would be useful, but for almost any other combination, you can't get the whole mixture from one reaction. Also, in reality you aren't going to have one converter that can do all sorts of conversions. Each converter should be a processor of a single reaction, so you're not gonna get MMH/NTO from a magic box. And especially not in the ratios you want, since each engine in RF has it's own specific mass ratio. So, I figured it was simpler to just pick the resources you want to make individually.

Link to comment
Share on other sites

8 minutes ago, Raptor831 said:

Mostly because you generally only want/need 1 of the resources. Also, how do you describe the process in a little tooltip? It was simpler to say "Make me LOX" or "Make me LH2". Yeah, there are places where just splitting it into LH2/LOX would be useful, but for almost any other combination, you can't get the whole mixture from one reaction. Also, in reality you aren't going to have one converter that can do all sorts of conversions. Each converter should be a processor of a single reaction, so you're not gonna get MMH/NTO from a magic box. And especially not in the ratios you want, since each engine in RF has it's own specific mass ratio. So, I figured it was simpler to just pick the resources you want to make individually.

That makes sense, though then the question falls to why bother including by-products of reactions. For example, the Hydyne reaction also produces LqdOxygen and Hydrazine, they are simply not the primary result, and as such, allowed to bleed off as excess. I guess the answer is that this at least accounts for the rest of the Karbonite molecule, but it still leads to situations like the LOx, LH2, N2 where the same reaction, in the same quantities, is repeated twice on a part. It would be nice if it were possible to select in-game which resources were kept and which were allowed to bleed off excess so you could choose which you preferred to keep and simplify the part.

Link to comment
Share on other sites

Ok, here it is, updated to the new resource model, confirmed working on my test install, and formatted for clarity. Save it as Karbonite_RF.cfg.

// Raptor831 did the heavy lifting behind things here
// KwirkyJ cleaned things up and produced this config
// SpacedInvader updated things to the new system



!PART[KA_Converter_250_01]:FINAL:NEEDS[RealFuels] {} // yes, FINAL is poor form
!PART[KA_Converter_125_01]:FINAL:NEEDS[RealFuels] {} // but at least it works

// ======== /\
// USE EITHER THE ABOVE, TO REMOVE THE STOCK LFO CONVERTERS, OR
// COMMENT THE ABOVE PAIR AND UNCOMMENT BELOW TO REBRAND THEM WITHOUT
// ADJUSTMENT TO PROVIDED CONVERTER MODULES
// ======== \/

//@PART[KA_Converter_250_01]:AFTER[Karbonite]:NEEDS[RealFuels]
//{
// @title = BSP-2C Karbonite Converter
// @description = Add Karbonite, shake vigorously, and fuel products may or may not come out of this general purpose converter. Take cover before commencing conversion process. Do not eat contents. This converter is configured to produce hydrocarbon fuels and liquid oxygen.
//}
//@PART[KA_Converter_125_01]:AFTER[Karbonite]:NEEDS[RealFuels]
//{
// @title = BSP-1C Karbonite Converter
// @description = Add Karbonite, shake vigorously, and fuel products may or may not come out of this general purpose converter. Take cover before commencing conversion process. Do not eat contents. This converter is configured to produce hydrocarbon fuels and liquid oxygen.
//}



+PART[KA_Converter_250_01]:AFTER[Karbonite]:NEEDS[RealFuels]
{
	@name = KA_Converter_250_01N
	@title = BSP-2N Karbonite Converter
	@description = Add Karbonite, shake vigorously, and fuel products may or may not come out of this general purpose converter. Take cover before commencing conversion process. Do not eat contents. This converter is configured to produce nitrous fuels and dinitrogen tetroxide.
	
	!MODULE[ModuleResourceConverter],* {}
	
	MODULE
	{
		name = ModuleResourceConverter
		ConverterName = Azine, LOX
		StartActionName = Start Azine, LOX
		StopActionName = Stop Azine, LOX
		
		INPUT_RESOURCE
		{
			ResourceName = ElectricCharge
			Ratio = 2
		}
		
		INPUT_RESOURCE
		{
			ResourceName = Karbonite
			Ratio = 1
		}
		
		OUTPUT_RESOURCE
		{
			ResourceName = Aerozine50
			Ratio = 1.06943544155199
			DumpExcess = false
		}
	 
		OUTPUT_RESOURCE
		{
			ResourceName = LqdOxygen
			Ratio = 1.01695809636349
			DumpExcess = true
		}
	}

	MODULE
	{
		name = ModuleResourceConverter
		ConverterName = Hydyne, LOX, Hzine
		StartActionName = Start Hydyne, LOX, Hzine
		StopActionName = Stop Hydyne, LOX, Hzine
		
		INPUT_RESOURCE
		{
			ResourceName = ElectricCharge
			Ratio = 2
		}
		
		INPUT_RESOURCE
		{
			ResourceName = Karbonite
			Ratio = 1
		}
		
		OUTPUT_RESOURCE
		{
			ResourceName = Hydyne
			Ratio = 1.1644502220112
			DumpExcess = false
		}
		
		OUTPUT_RESOURCE
		{
			ResourceName = LqdOxygen
			Ratio = 1.01695809636349
			DumpExcess = true
		}
		
		OUTPUT_RESOURCE
		{
			ResourceName = Hydrazine
			Ratio = 0.0826714788616067
			DumpExcess = true
		}
	}

	MODULE
	{
		name = ModuleResourceConverter
		ConverterName = Ammonia, LOX
		StartActionName = Start Ammonia, LOX
		StopActionName = Stop Ammonia, LOX
		
		INPUT_RESOURCE
		{
			ResourceName = ElectricCharge
			Ratio = 1.5
		}
		
		INPUT_RESOURCE
		{
			ResourceName = Karbonite
			Ratio = 1
		}
		
		OUTPUT_RESOURCE
		{
			ResourceName = LqdAmmonia
			Ratio = 1.02245918516123
			DumpExcess = false
		}
		
		OUTPUT_RESOURCE
		{
			ResourceName = LqdOxygen
			Ratio = 1.01695809636349
			DumpExcess = true
		}
	}

	MODULE
	{
		name = ModuleResourceConverter
		ConverterName = MMH, LOX
		StartActionName = Start MMH, LOX
		StopActionName = Stop MMH, LOX
		
		INPUT_RESOURCE
		{
			ResourceName = ElectricCharge
			Ratio = 2
		}
		
		INPUT_RESOURCE
		{
			ResourceName = Karbonite
			Ratio = 1
		}
		
		OUTPUT_RESOURCE
		{
			ResourceName = MMH
			Ratio = 0.96458773988951
			DumpExcess = false
		}
		
		OUTPUT_RESOURCE
		{
			ResourceName = LqdOxygen
			Ratio = 1.01695809636349
			DumpExcess = true
		}
	}

	MODULE
	{
		name = ModuleResourceConverter
		ConverterName = NTO
		StartActionName = Start NTO
		StopActionName = Stop NTO
		
		INPUT_RESOURCE
		{
			ResourceName = ElectricCharge
			Ratio = 1.5
		}
		
		INPUT_RESOURCE
		{
			ResourceName = Karbonite
			Ratio = 1
		}
		
		OUTPUT_RESOURCE
		{
			ResourceName = NTO
			Ratio = 1.15052686385799
			DumpExcess = false
		}
	}

	MODULE
	{
		name = ModuleResourceConverter
		ConverterName = UDMH, LOX
		StartActionName = Start UDMH, LOX
		StopActionName = Stop UDMH, LOX
		
		INPUT_RESOURCE
		{
			ResourceName = ElectricCharge
			Ratio = 2
		}
		
		INPUT_RESOURCE
		{
			ResourceName = Karbonite
			Ratio = 1
		}
		
		OUTPUT_RESOURCE
		{
			ResourceName = UDMH
			Ratio = 1.37756107717985
			DumpExcess = false
		}
		
		OUTPUT_RESOURCE
		{
			ResourceName = LqdOxygen
			Ratio = 1.01695809636349
			DumpExcess = true
		}
	}
}

+PART[KA_Converter_125_01]:AFTER[Karbonite]:NEEDS[RealFuels]
{
	@name = KA_Converter_125_01N
	@title = BSP-1N Karbonite Converter
	@description = Add Karbonite, shake vigorously, and fuel products may or may not come out of this general purpose converter. Take cover before commencing conversion process. Do not eat contents. This converter is configured to produce nitrous fuels and dinitrogen tetroxide.

	!MODULE[ModuleResourceConverter],* {}

	MODULE
	{
		name = ModuleResourceConverter
		ConverterName = Azine, LOX
		StartActionName = Start Azine, LOX
		StopActionName = Stop Azine, LOX
		
		INPUT_RESOURCE
		{
			ResourceName = ElectricCharge
			Ratio = 1.0
		}
		
		INPUT_RESOURCE
		{
			ResourceName = Karbonite
			Ratio = 0.5
		}
		
		OUTPUT_RESOURCE
		{
			ResourceName = Aerozine50
			Ratio = 0.534717720775995
			DumpExcess = false
		}
		
		OUTPUT_RESOURCE
		{
			ResourceName = LqdOxygen
			Ratio = 0.508479048181745
			DumpExcess = true
		}
	}

	MODULE
	{
		name = ModuleResourceConverter
		ConverterName = Hydyne, LOX, Hzine
		StartActionName = Start Hydyne, LOX, Hzine
		StopActionName = Stop Hydyne, LOX, Hzine
		
		INPUT_RESOURCE
		{
			ResourceName = ElectricCharge
			Ratio = 1.0
		}
		
		INPUT_RESOURCE
		{
			ResourceName = Karbonite
			Ratio = 0.5
		}
		
		OUTPUT_RESOURCE
		{
			ResourceName = Hydyne
			Ratio = 0.58222511100560
			DumpExcess = false
		}
		
		OUTPUT_RESOURCE
		{
			ResourceName = LqdOxygen
			Ratio = 0.508479048181745
			DumpExcess = true
		}
		
		OUTPUT_RESOURCE
		{
			ResourceName = Hydrazine
			Ratio = 0.04133573943080335
			DumpExcess = true
		}
	}

	MODULE
	{
		name = ModuleResourceConverter
		ConverterName = Ammonia, LOX
		StartActionName = Start Ammonia, LOX
		StopActionName = Stop Ammonia, LOX
		
		INPUT_RESOURCE
		{
			ResourceName = ElectricCharge
			Ratio = 0.75
		}
		
		INPUT_RESOURCE
		{
			ResourceName = Karbonite
			Ratio = 0.5
		}
		
		OUTPUT_RESOURCE
		{
			ResourceName = LqdAmmonia
			Ratio = 0.511229592580615
			DumpExcess = false
		}
		
		OUTPUT_RESOURCE
		{
			ResourceName = LqdOxygen
			Ratio = 0.508479048181745
			DumpExcess = true
		}
	}

	MODULE
	{
		name = ModuleResourceConverter
		ConverterName = MMH, LOX
		StartActionName = Start MMH, LOX
		StopActionName = Stop MMH, LOX
		
		INPUT_RESOURCE
		{
			ResourceName = ElectricCharge
			Ratio = 1.0
		}
		
		INPUT_RESOURCE
		{
			ResourceName = Karbonite
			Ratio = 0.5
		}
		
		OUTPUT_RESOURCE
		{
			ResourceName = MMH
			Ratio = 0.482293869944755
			DumpExcess = false
		}
		
		OUTPUT_RESOURCE
		{
			ResourceName = LqdOxygen
			Ratio = 0.508479048181745
			DumpExcess = true
		}
	}

	MODULE
	{
		name = ModuleResourceConverter
		ConverterName = NTO
		StartActionName = Start NTO
		StopActionName = Stop NTO
		
		INPUT_RESOURCE
		{
			ResourceName = ElectricCharge
			Ratio = 0.75
		}
		
		INPUT_RESOURCE
		{
			ResourceName = Karbonite
			Ratio = 0.5
		}
		
		OUTPUT_RESOURCE
		{
			ResourceName = NTO
			Ratio = 0.575263431928995
			DumpExcess = false
		}
	}

	MODULE
	{
		name = ModuleResourceConverter
		ConverterName = UDMH, LOX
		StartActionName = Start UDMH, LOX
		StopActionName = Stop UDMH, LOX
		
		INPUT_RESOURCE
		{
			ResourceName = ElectricCharge
			Ratio = 1.0
		}
		
		INPUT_RESOURCE
		{
			ResourceName = Karbonite
			Ratio = 0.5
		}
		
		OUTPUT_RESOURCE
		{
			ResourceName = UDMH
			Ratio = 0.688780538589925
			DumpExcess = false
		}
		
		OUTPUT_RESOURCE
		{
			ResourceName = LqdOxygen
			Ratio = 0.508479048181745
			DumpExcess = true
		}
	}
}



+PART[KA_Converter_250_01]:AFTER[Karbonite]:NEEDS[RealFuels]
{
	@name = KA_Converter_250_01O
	@title = BSP-2O Karbonite Converter
	@description = Add Karbonite, shake vigorously, and fuel products may or may not come out of this general purpose converter. Take cover before commencing conversion process. Do not eat contents. This converter is configured to produce kerosene-related fuels.
	
	!MODULE[ModuleResourceConverter],* {}
	
	MODULE
	{
		name = ModuleResourceConverter
		ConverterName = Ethanol75, LOX, Hzine, N2
		StartActionName = Start Ethanol75, LOX, Hzine, N2
		StopActionName = Stop Ethanol75, LOX, Hzine, N2
		
		INPUT_RESOURCE
		{
			ResourceName = ElectricCharge
			Ratio = 1.5
		}
		
		INPUT_RESOURCE
		{
			ResourceName = Karbonite
			Ratio = 1
		}
		
		OUTPUT_RESOURCE
		{
			ResourceName = Ethanol75
			Ratio = 1.42631235359096
			DumpExcess = false
		}
		
		OUTPUT_RESOURCE
		{
			ResourceName = LqdOxygen
			Ratio = 0.508479048181744
			DumpExcess = true
		}
		
		OUTPUT_RESOURCE
		{
			ResourceName = Hydrazine
			Ratio = 0.289350176015623
			DumpExcess = true
		}
		
		OUTPUT_RESOURCE
		{
			ResourceName = Nitrogen
			Ratio = 203.003503054896
			DumpExcess = true
		}
	}

	MODULE
	{
		name = ModuleResourceConverter
		ConverterName = RP-1, LOX, Hzine, N2
		StartActionName = Start RP-1, LOX, Hzine, N2
		StopActionName = Stop RP-1, LOX, Hzine, N2
		
		INPUT_RESOURCE
		{
			ResourceName = ElectricCharge
			Ratio = 1.5
		}
		
		INPUT_RESOURCE
		{
			ResourceName = Karbonite
			Ratio = 1
		}
		
		OUTPUT_RESOURCE
		{
			ResourceName = Kerosene
			Ratio = 0.627716289849053
			DumpExcess = false
		}
		
		OUTPUT_RESOURCE
		{
			ResourceName = LqdOxygen
			Ratio = 1.01695809636349
			DumpExcess = true
		}
		
		OUTPUT_RESOURCE
		{
			ResourceName = Hydrazine
			Ratio = 0.530475322695309
			DumpExcess = true
		}
		
		OUTPUT_RESOURCE
		{
			ResourceName = Nitrogen
			Ratio = 33.833917175816
			DumpExcess = true
		}
	}

	MODULE
	{
		name = ModuleResourceConverter
		ConverterName = LOX, CH4, N2
		StartActionName = Start LOX, CH4, N2
		StopActionName = Stop LOX, CH4, N2
		
		INPUT_RESOURCE
		{
			ResourceName = ElectricCharge
			Ratio = 1.5
		}
		
		INPUT_RESOURCE
		{
			ResourceName = Karbonite
			Ratio = 1
		}
		
		OUTPUT_RESOURCE
		{
			ResourceName = LqdOxygen
			Ratio = 1.01695809636349
			DumpExcess = false
		}
		
		OUTPUT_RESOURCE
		{
			ResourceName = LqdMethane
			Ratio = 1.37649909470898
			DumpExcess = true
		}
		
		OUTPUT_RESOURCE
		{
			ResourceName = Nitrogen
			Ratio = 812.014012219585
			DumpExcess = true
		}
	}

	MODULE
	{
		name = ModuleResourceConverter
		ConverterName = CH4, LOX, N2
		StartActionName = Start CH4, LOX, N2
		StopActionName = Stop CH4, LOX, N2
		
		INPUT_RESOURCE
		{
			ResourceName = ElectricCharge
			Ratio = 1.5
		}
		
		INPUT_RESOURCE
		{
			ResourceName = Karbonite
			Ratio = 1
		}
		
		OUTPUT_RESOURCE
		{
			ResourceName = LqdMethane
			Ratio = 1.37649909470898
			DumpExcess = false
		}
		
		OUTPUT_RESOURCE
		{
			ResourceName = LqdOxygen
			Ratio = 1.01695809636349
			DumpExcess = true
		}
		
		OUTPUT_RESOURCE
		{
			ResourceName = Nitrogen
			Ratio = 406.007006109792
			DumpExcess = true
		}
	}

	MODULE
	{
		name = ModuleResourceConverter
		ConverterName = Syntin, LOX, Hzine
		StartActionName = Start Syntin, LOX, Hzine
		StopActionName = Stop Syntin, LOX, Hzine
		
		INPUT_RESOURCE
		{
			ResourceName = ElectricCharge
			Ratio = 2
		}
		
		INPUT_RESOURCE
		{
			ResourceName = Karbonite
			Ratio = 1
		}
		
		OUTPUT_RESOURCE
		{
			ResourceName = Syntin
			Ratio = 0.580511845887995
			DumpExcess = false
		}
		
		OUTPUT_RESOURCE
		{
			ResourceName = LqdOxygen
			Ratio = 1.01695809636349
			DumpExcess = true
		}
		
		OUTPUT_RESOURCE
		{
			ResourceName = Hydrazine
			Ratio = 0.578700352031247
			DumpExcess = true
		}
	}
}

+PART[KA_Converter_125_01]:AFTER[Karbonite]:NEEDS[RealFuels]
{
	@name = KA_Converter_125_01O
	@title = BSP-1O Karbonite Converter
	@description = Add Karbonite, shake vigorously, and fuel products may or may not come out of this general purpose converter. Take cover before commencing conversion process. Do not eat contents. This converter is configured to produce kerosene-related fuels.

	!MODULE[ModuleResourceConverter],* {}

	MODULE
	{
		name = ModuleResourceConverter
		ConverterName = Ethanol75, LOX, Hzine, N2
		StartActionName = Start Ethanol75, LOX, Hzine, N2
		StopActionName = Stop Ethanol75, LOX, Hzine, N2
		
		INPUT_RESOURCE
		{
			ResourceName = ElectricCharge
			Ratio = 0.75
		}
		
		INPUT_RESOURCE
		{
			ResourceName = Karbonite
			Ratio = 0.5
		}
		
		OUTPUT_RESOURCE
		{
			ResourceName = Ethanol75
			Ratio = 0.713156176795480
			DumpExcess = false
		}
		
		OUTPUT_RESOURCE
		{
			ResourceName = LqdOxygen
			Ratio = 0.2542395240908720
			DumpExcess = true
		}
		
		OUTPUT_RESOURCE
		{
			ResourceName = Hydrazine
			Ratio = 0.1446750880078115
			DumpExcess = true
		}
		
		OUTPUT_RESOURCE
		{
			ResourceName = Nitrogen
			Ratio = 101.5017515274480
			DumpExcess = true
		}
	}

	MODULE
	{
		name = ModuleResourceConverter
		ConverterName = RP-1, LOX, Hzine, N2
		StartActionName = Start RP-1, LOX, Hzine, N2
		StopActionName = Stop RP-1, LOX, Hzine, N2
		
		INPUT_RESOURCE
		{
			ResourceName = ElectricCharge
			Ratio = 0.75
		}
		
		INPUT_RESOURCE
		{
			ResourceName = Karbonite
			Ratio = 0.5
		}
		
		OUTPUT_RESOURCE
		{
			ResourceName = Kerosene
			Ratio = 0.3138581449245265
			DumpExcess = false
		}
		
		OUTPUT_RESOURCE
		{
			ResourceName = LqdOxygen
			Ratio = 0.508479048181745
			DumpExcess = true
		}
		
		OUTPUT_RESOURCE
		{
			ResourceName = Hydrazine
			Ratio = 0.2652376613476545
			DumpExcess = true
		}
		
		OUTPUT_RESOURCE
		{
			ResourceName = Nitrogen
			Ratio = 16.9169585879080
			DumpExcess = true
		}
	}

	MODULE
	{
		name = ModuleResourceConverter
		ConverterName = LOX, CH4, N2
		StartActionName = Start LOX, CH4, N2
		StopActionName = Stop LOX, CH4, N2
		
		INPUT_RESOURCE
		{
			ResourceName = ElectricCharge
			Ratio = 0.75
		}
		
		INPUT_RESOURCE
		{
			ResourceName = Karbonite
			Ratio = 0.5
		}
		
		OUTPUT_RESOURCE
		{
			ResourceName = LqdOxygen
			Ratio = 0.508479048181745
			DumpExcess = false
		}
		
		OUTPUT_RESOURCE
		{
			ResourceName = LqdMethane
			Ratio = 0.688249547354490
			DumpExcess = true
		}
		
		OUTPUT_RESOURCE
		{
			ResourceName = Nitrogen
			Ratio = 406.0070061097925
			DumpExcess = true
		}
	}

	MODULE
	{
		name = ModuleResourceConverter
		ConverterName = CH4, LOX, N2
		StartActionName = Start CH4, LOX, N2
		StopActionName = Stop CH4, LOX, N2
		
		INPUT_RESOURCE
		{
			ResourceName = ElectricCharge
			Ratio = 0.75
		}
		
		INPUT_RESOURCE
		{
			ResourceName = Karbonite
			Ratio = 0.5
		}
		
		OUTPUT_RESOURCE
		{
			ResourceName = LqdMethane
			Ratio = 0.688249547354490
			DumpExcess = false
		}
		
		OUTPUT_RESOURCE
		{
			ResourceName = LqdOxygen
			Ratio = 0.508479048181745
			DumpExcess = true
		}
		
		OUTPUT_RESOURCE
		{
			ResourceName = Nitrogen
			Ratio = 203.0035030548960
			DumpExcess = true
		}
	}

	MODULE
	{
		name = ModuleResourceConverter
		ConverterName = Syntin, LOX, Hzine
		StartActionName = Start Syntin, LOX, Hzine
		StopActionName = Stop Syntin, LOX, Hzine
		
		INPUT_RESOURCE
		{
			ResourceName = ElectricCharge
			Ratio = 1
		}
		
		INPUT_RESOURCE
		{
			ResourceName = Karbonite
			Ratio = 0.5
		}
		
		OUTPUT_RESOURCE
		{
			ResourceName = Syntin
			Ratio = 0.2902559229439975
			DumpExcess = false
		}
		
		OUTPUT_RESOURCE
		{
			ResourceName = LqdOxygen
			Ratio = 0.508479048181745
			DumpExcess = true
		}
		
		OUTPUT_RESOURCE
		{
			ResourceName = Hydrazine
			Ratio = 0.2893501760156235
			DumpExcess = true
		}
	}
}



+PART[KA_Converter_250_01]:AFTER[Karbonite]:NEEDS[RealFuels]
{
	@name = KA_Converter_250_01H
	@title = BSP-2H Karbonite Converter
	@description = Add Karbonite, shake vigorously, and fuel products may or may not come out of this general purpose converter. Take cover before commencing conversion process. Do not eat contents. This converter is configured to produce liquid hydrogen and liquid oxygen.

	!MODULE[ModuleResourceConverter],* {}

	MODULE
	{
		name = ModuleResourceConverter
		ConverterName = LH2, LOX, N2
		StartActionName = Start LH2, LOX, N2
		StopActionName = Stop LH2, LOX, N2
		
		INPUT_RESOURCE
		{
			ResourceName = ElectricCharge
			Ratio = 6
		}
		
		INPUT_RESOURCE
		{
			ResourceName = Karbonite
			Ratio = 1
		}
		
		OUTPUT_RESOURCE
		{
			ResourceName = LqdHydrogen
			Ratio = 2.06352544237182
			DumpExcess = false
		}
		
		OUTPUT_RESOURCE
		{
			ResourceName = LqdOxygen
			Ratio = 1.01695809636349
			DumpExcess = true
		}
		
		OUTPUT_RESOURCE
		{
			ResourceName = Nitrogen
			Ratio = 406.007006109792
			DumpExcess = true
		}
	}

	MODULE
	{
		name = ModuleResourceConverter
		ConverterName = LOX, LH2, N2
		StartActionName = Start LOX, LH2, N2
		StopActionName = Stop LOX, LH2, N2
		
		INPUT_RESOURCE
		{
			ResourceName = ElectricCharge
			Ratio = 6
		}
		
		INPUT_RESOURCE
		{
			ResourceName = Karbonite
			Ratio = 1
		}
		
		OUTPUT_RESOURCE
		{
			ResourceName = LqdOxygen
			Ratio = 1.01695809636349
			DumpExcess = false
		}
		
		OUTPUT_RESOURCE
		{
			ResourceName = LqdHydrogen
			Ratio = 2.06352544237182
			DumpExcess = true
		}
		
		OUTPUT_RESOURCE
		{
			ResourceName = Nitrogen
			Ratio = 406.007006109792
			DumpExcess = true
		}
	}
}

+PART[KA_Converter_125_01]:AFTER[Karbonite]:NEEDS[RealFuels]
{
	@name = KA_Converter_125_01H
	@title = BSP-1H Karbonite Converter
	@description = Add Karbonite, shake vigorously, and fuel products may or may not come out of this general purpose converter. Take cover before commencing conversion process. Do not eat contents. This converter is configured to produce liquid hydrogen and liquid oxygen.

	!MODULE[ModuleResourceConverter],* {}

	MODULE
	{
		name = ModuleResourceConverter
		ConverterName = LH2, LOX, N2
		StartActionName = Start LH2, LOX, N2
		StopActionName = Stop LH2, LOX, N2
		
		INPUT_RESOURCE
		{
			ResourceName = ElectricCharge
			Ratio = 3
		}
		
		INPUT_RESOURCE
		{
			ResourceName = Karbonite
			Ratio = 0.5
		}
		
		OUTPUT_RESOURCE
		{
			ResourceName = LqdHydrogen
			Ratio = 1.031762721185910
			DumpExcess = false
		}
		
		OUTPUT_RESOURCE
		{
			ResourceName = LqdOxygen
			Ratio = 0.508479048181745
			DumpExcess = true
		}
		
		OUTPUT_RESOURCE
		{
			ResourceName = Nitrogen
			Ratio = 203.0035030548960
			DumpExcess = true
		}
	}

	MODULE
	{
		name = ModuleResourceConverter
		ConverterName = LOX, LH2, N2
		StartActionName = Start LOX, LH2, N2
		StopActionName = Stop LOX, LH2, N2
		
		INPUT_RESOURCE
		{
			ResourceName = ElectricCharge
			Ratio = 3
		}
		
		INPUT_RESOURCE
		{
			ResourceName = Karbonite
			Ratio = 0.5
		}
		
		OUTPUT_RESOURCE
		{
			ResourceName = LqdOxygen
			Ratio = 0.508479048181745
			DumpExcess = false
		}
		
		OUTPUT_RESOURCE
		{
			ResourceName = LqdHydrogen
			Ratio = 1.031762721185910
			DumpExcess = true
		}
		
		OUTPUT_RESOURCE
		{
			ResourceName = Nitrogen
			Ratio = 203.0035030548960
			DumpExcess = true
		}
	}
}



@PART[KA_Distiller_250_01]:AFTER[Karbonite]:NEEDS[RealFuels]
{
	// @description = We're not quite sure why some of our scientists try running Karbonite through a distillation process, but as it turns out, sometimes it leaves behind some useful (and less explosive) byproducts. SOMETHING ABOUT ITS OUTPUTS.

	!MODULE[ModuleResourceConverter],* {}

	MODULE
	{
		name = ModuleResourceConverter
		ConverterName = HTP
		StartActionName = Start HTP
		StopActionName = Stop HTP
		
		INPUT_RESOURCE
		{
			ResourceName = ElectricCharge
			Ratio = 1.75
		}
		
		INPUT_RESOURCE
		{
			ResourceName = LqdHydrogen
			Ratio = 1
		}
		
		INPUT_RESOURCE
		{
			ResourceName = LqdOxygen
			Ratio = 0.985651134201278
		}
		
		OUTPUT_RESOURCE
		{
			ResourceName = HTP
			Ratio = 0.747173715077286
			DumpExcess = false
		}
	}

	MODULE
	{
		name = ModuleResourceConverter
		ConverterName = HTP, N2
		StartActionName = Start HTP, N2
		StopActionName = Stop HTP, N2
		
		INPUT_RESOURCE
		{
			ResourceName = ElectricCharge
			Ratio = 1.5
		}
		
		INPUT_RESOURCE
		{
			ResourceName = Karbonite
			Ratio = 1
		}
		
		OUTPUT_RESOURCE
		{
			ResourceName = HTP
			Ratio = 0.85656220607414
			DumpExcess = false
		}
		
		OUTPUT_RESOURCE
		{
			ResourceName = Nitrogen
			Ratio = 406.007006109792
			DumpExcess = true
		}
	}

	MODULE
	{
		name = ModuleResourceConverter
		ConverterName = Hzine
		StartActionName = Start Hzine
		StopActionName = Stop Hzine
		
		INPUT_RESOURCE
		{
			ResourceName = ElectricCharge
			Ratio = 2
		}
		
		INPUT_RESOURCE
		{
			ResourceName = Karbonite
			Ratio = 1
		}
		
		OUTPUT_RESOURCE
		{
			ResourceName = Hydrazine
			Ratio = 0.578700352031247
			DumpExcess = false
		}
	}

	MODULE
	{
		name = ModuleResourceConverter
		ConverterName = IRFNA-III
		StartActionName = Start IRFNA-III
		StopActionName = Stop IRFNA-III
		
		INPUT_RESOURCE
		{
			ResourceName = ElectricCharge
			Ratio = 1.5
		}
		
		INPUT_RESOURCE
		{
			ResourceName = Karbonite
			Ratio = 1
		}
		
		OUTPUT_RESOURCE
		{
			ResourceName = IRFNA-III
			Ratio = 1.02823531181671
			DumpExcess = false
		}
	}

	MODULE
	{
		name = ModuleResourceConverter
		ConverterName = N2
		StartActionName = Start N2
		StopActionName = Stop N2
		
		INPUT_RESOURCE
		{
			ResourceName = ElectricCharge
			Ratio = 1.5
		}
		
		INPUT_RESOURCE
		{
			ResourceName = Karbonite
			Ratio = 1
		}
		
		OUTPUT_RESOURCE
		{
			ResourceName = Nitrogen
			Ratio = 406.007006109792
			DumpExcess = false
		}
	}

	MODULE
	{
		name = ModuleResourceConverter
		ConverterName = NO2
		StartActionName = Start NO2
		StopActionName = Stop NO2
		
		INPUT_RESOURCE
		{
			ResourceName = ElectricCharge
			Ratio = 1.75
		}
		
		INPUT_RESOURCE
		{
			ResourceName = Karbonite
			Ratio = 1
		}
		
		OUTPUT_RESOURCE
		{
			ResourceName = NitrousOxide
			Ratio = 550.373980080283
			DumpExcess = false
		}
	}
}

@PART[KA_Distiller_125_01]:AFTER[Karbonite]:NEEDS[RealFuels]
{
	// @description = We're not quite sure why some of our scientists try running Karbonite through a distillation process, but as it turns out, sometimes it leaves behind some useful (and less explosive) byproducts. SOMETHING ABOUT ITS OUTPUTS.

	!MODULE[ModuleResourceConverter],* {}

	MODULE
	{
		name = ModuleResourceConverter
		ConverterName = HTP
		StartActionName = Start HTP
		StopActionName = Stop HTP
		
		INPUT_RESOURCE
		{
			ResourceName = ElectricCharge
			Ratio = 0.875
		}
		
		INPUT_RESOURCE
		{
			ResourceName = LqdHydrogen
			Ratio = 0.5
		}
		
		INPUT_RESOURCE
		{
			ResourceName = LqdOxygen
			Ratio = 0.4928255671006390
		}
		
		OUTPUT_RESOURCE
		{
			ResourceName = HTP
			Ratio = 0.3735868575386430
			DumpExcess = false
		}
	}

	MODULE
	{
		name = ModuleResourceConverter
		ConverterName = HTP, N2
		StartActionName = Start HTP, N2
		StopActionName = Stop HTP, N2
		
		INPUT_RESOURCE
		{
			ResourceName = ElectricCharge
			Ratio = 0.75
		}
		
		INPUT_RESOURCE
		{
			ResourceName = Karbonite
			Ratio = 0.5
		}
		
		OUTPUT_RESOURCE
		{
			ResourceName = HTP
			Ratio = 0.428281103037070
			DumpExcess = false
		}
		
		OUTPUT_RESOURCE
		{
			ResourceName = Nitrogen
			Ratio = 203.0035030548960
			DumpExcess = true
		}
	}

	MODULE
	{
		name = ModuleResourceConverter
		ConverterName = Hzine
		StartActionName = Start Hzine
		StopActionName = Stop Hzine
		
		INPUT_RESOURCE
		{
			ResourceName = ElectricCharge
			Ratio = 1.0
		}
		
		INPUT_RESOURCE
		{
			ResourceName = Karbonite
			Ratio = 0.5
		}
		
		OUTPUT_RESOURCE
		{
			ResourceName = Hydrazine
			Ratio = 0.2893501760156235
			DumpExcess = false
		}
	}

	MODULE
	{
		name = ModuleResourceConverter
		ConverterName = IRFNA-III
		StartActionName = Start IRFNA-III
		StopActionName = Stop IRFNA-III
		
		INPUT_RESOURCE
		{
			ResourceName = ElectricCharge
			Ratio = 0.75
		}
		
		INPUT_RESOURCE
		{
			ResourceName = Karbonite
			Ratio = 0.5
		}
		
		OUTPUT_RESOURCE
		{
			ResourceName = IRFNA-III
			Ratio = 0.514117655908355
			DumpExcess = false
		}
	}

	MODULE
	{
		name = ModuleResourceConverter
		ConverterName = N2
		StartActionName = Start N2
		StopActionName = Stop N2
		
		INPUT_RESOURCE
		{
			ResourceName = ElectricCharge
			Ratio = 0.75
		}
		
		INPUT_RESOURCE
		{
			ResourceName = Karbonite
			Ratio = 0.5
		}
		
		OUTPUT_RESOURCE
		{
			ResourceName = Nitrogen
			Ratio = 203.0035030548960
			DumpExcess = false
		}
	}

	MODULE
	{
		name = ModuleResourceConverter
		ConverterName = NO2
		StartActionName = Start NO2
		StopActionName = Stop NO2
		
		INPUT_RESOURCE
		{
			ResourceName = ElectricCharge
			Ratio = 0.875
		}
		
		INPUT_RESOURCE
		{
			ResourceName = Karbonite
			Ratio = 0.5
		}
		
		OUTPUT_RESOURCE
		{
			ResourceName = NitrousOxide
			Ratio = 275.1869900401415
			DumpExcess = false
		}
	}
}



+PART[KA_Distiller_250_01]:AFTER[Karbonite]:NEEDS[RealFuels]
{
	@name = KA_Distiller_250_01M
	@title = BSX-200-MON Karbonite Distiller
	@description = We're not quite sure why some of our scientists try running Karbonite through a distillation process, but as it turns out, sometimes it leaves behind some useful (and less explosive) byproducts. This distiller contains components to mix precise ratios of oxides of nitrogen.

	!MODULE[ModuleResourceConverter],* {}

	MODULE
	{
		name = ModuleResourceConverter
		ConverterName = MON1, N2
		StartActionName = Start MON1, N2
		StopActionName = Stop MON1, N2
		
		INPUT_RESOURCE
		{
			ResourceName = ElectricCharge
			Ratio = 1.5
		}
		
		INPUT_RESOURCE
		{
			ResourceName = Karbonite
			Ratio = 1
		}
		
		OUTPUT_RESOURCE
		{
			ResourceName = MON1
			Ratio = 1.16158537362325
			DumpExcess = false
		}
		
		OUTPUT_RESOURCE
		{
			ResourceName = Nitrogen
			Ratio = 406.007006109792
			DumpExcess = true
		}
	}

	MODULE
	{
		name = ModuleResourceConverter
		ConverterName = MON10, N2
		StartActionName = Start MON10, N2
		StopActionName = Stop MON10, N2
		
		INPUT_RESOURCE
		{
			ResourceName = ElectricCharge
			Ratio = 1.5
		}
		
		INPUT_RESOURCE
		{
			ResourceName = Karbonite
			Ratio = 1
		}
		
		OUTPUT_RESOURCE
		{
			ResourceName = MON10
			Ratio = 1.12639843351329
			DumpExcess = false
		}
		
		OUTPUT_RESOURCE
		{
			ResourceName = Nitrogen
			Ratio = 365.406305498813
			DumpExcess = true
		}
	}

	MODULE
	{
		name = ModuleResourceConverter
		ConverterName = MON15, N2
		StartActionName = Start MON15, N2
		StopActionName = Stop MON15, N2
		
		INPUT_RESOURCE
		{
			ResourceName = ElectricCharge
			Ratio = 1.5
		}
		
		INPUT_RESOURCE
		{
			ResourceName = Karbonite
			Ratio = 1
		}
		
		OUTPUT_RESOURCE
		{
			ResourceName = MON15
			Ratio = 1.10461058210504
			DumpExcess = false
		}
		
		OUTPUT_RESOURCE
		{
			ResourceName = Nitrogen
			Ratio = 365.406305498813
			DumpExcess = true
		}
	}

	MODULE
	{
		name = ModuleResourceConverter
		ConverterName = MON20, N2
		StartActionName = Start MON20, N2
		StopActionName = Stop MON20, N2
		
		INPUT_RESOURCE
		{
			ResourceName = ElectricCharge
			Ratio = 1.5
		}
		
		INPUT_RESOURCE
		{
			ResourceName = Karbonite
			Ratio = 1
		}
		
		OUTPUT_RESOURCE
		{
			ResourceName = MON20
			Ratio = 1.0879995438031
			DumpExcess = false
		}
		
		OUTPUT_RESOURCE
		{
			ResourceName = Nitrogen
			Ratio = 345.105955193323
			DumpExcess = true
		}
	}

	MODULE
	{
		name = ModuleResourceConverter
		ConverterName = MON3, N2
		StartActionName = Start MON3, N2
		StopActionName = Stop MON3, N2
		
		INPUT_RESOURCE
		{
			ResourceName = ElectricCharge
			Ratio = 1.5
		}
		
		INPUT_RESOURCE
		{
			ResourceName = Karbonite
			Ratio = 1
		}
		
		OUTPUT_RESOURCE
		{
			ResourceName = MON3
			Ratio = 1.15476096542982
			DumpExcess = false
		}
		
		OUTPUT_RESOURCE
		{
			ResourceName = Nitrogen
			Ratio = 324.805604887834
			DumpExcess = true
		}
	}
}

+PART[KA_Distiller_125_01]:AFTER[Karbonite]:NEEDS[RealFuels]
{
	@name = KA_Distiller_125_01M
	@title = BSX-100-MON Karbonite Distiller
	@description = We're not quite sure why some of our scientists try running Karbonite through a distillation process, but as it turns out, sometimes it leaves behind some useful (and less explosive) byproducts. This distiller contains components to mix precise ratios of oxides of nitrogen.

	!MODULE[ModuleResourceConverter],* {}

	MODULE
	{
		name = ModuleResourceConverter
		ConverterName = MON1, N2
		StartActionName = Start MON1, N2
		StopActionName = Stop MON1, N2
		
		INPUT_RESOURCE
		{
			ResourceName = ElectricCharge
			Ratio = 0.75
		}
		
		INPUT_RESOURCE
		{
			ResourceName = Karbonite
			Ratio = 0.5
		}
		
		OUTPUT_RESOURCE
		{
			ResourceName = MON1
			Ratio = 0.580792686811625
			DumpExcess = false
		}
		
		OUTPUT_RESOURCE
		{
			ResourceName = Nitrogen
			Ratio = 203.0035030548960
			DumpExcess = true
		}
	}

	MODULE
	{
		name = ModuleResourceConverter
		ConverterName = MON10, N2
		StartActionName = Start MON10, N2
		StopActionName = Stop MON10, N2
		
		INPUT_RESOURCE
		{
			ResourceName = ElectricCharge
			Ratio = 0.75
		}
		
		INPUT_RESOURCE
		{
			ResourceName = Karbonite
			Ratio = 0.5
		}
		
		OUTPUT_RESOURCE
		{
			ResourceName = MON10
			Ratio = 0.563199216756645
			DumpExcess = false
		}
		
		OUTPUT_RESOURCE
		{
			ResourceName = Nitrogen
			Ratio = 182.7031527494065
			DumpExcess = true
		}
	}

	MODULE
	{
		name = ModuleResourceConverter
		ConverterName = MON15, N2
		StartActionName = Start MON15, N2
		StopActionName = Stop MON15, N2
		
		INPUT_RESOURCE
		{
			ResourceName = ElectricCharge
			Ratio = 0.75
		}
		
		INPUT_RESOURCE
		{
			ResourceName = Karbonite
			Ratio = 0.5
		}
		
		OUTPUT_RESOURCE
		{
			ResourceName = MON15
			Ratio = 0.552305291052520
			DumpExcess = false
		}
		
		OUTPUT_RESOURCE
		{
			ResourceName = Nitrogen
			Ratio = 182.7031527494065
			DumpExcess = true
		}
	}

	MODULE
	{
		name = ModuleResourceConverter
		ConverterName = MON20, N2
		StartActionName = Start MON20, N2
		StopActionName = Stop MON20, N2
		
		INPUT_RESOURCE
		{
			ResourceName = ElectricCharge
			Ratio = 0.75
		}
		
		INPUT_RESOURCE
		{
			ResourceName = Karbonite
			Ratio = 0.5
		}
		
		OUTPUT_RESOURCE
		{
			ResourceName = MON20
			Ratio = 0.54399977190155
			DumpExcess = false
		}
		
		OUTPUT_RESOURCE
		{
			ResourceName = Nitrogen
			Ratio = 172.5529775966615
			DumpExcess = true
		}
	}

	MODULE
	{
		name = ModuleResourceConverter
		ConverterName = MON3, N2
		StartActionName = Start MON3, N2
		StopActionName = Stop MON3, N2
		
		INPUT_RESOURCE
		{
			ResourceName = ElectricCharge
			Ratio = 0.75
		}
		
		INPUT_RESOURCE
		{
			ResourceName = Karbonite
			Ratio = 0.5
		}
		
		OUTPUT_RESOURCE
		{
			ResourceName = MON3
			Ratio = 0.577380482714910
			DumpExcess = false
		}
		
		OUTPUT_RESOURCE
		{
			ResourceName = Nitrogen
			Ratio = 162.4028024439170
			DumpExcess = true
		}
	}
}

A side effect that I found in having more than one copy of the same reaction for different primary outputs is that it allows you to run both at the same time to double the output. Not super critical, but worth noting I think.

Edited by SpacedInvader
Link to comment
Share on other sites

  • 5 months later...
On 5/3/2016 at 10:56 AM, Crashonaut said:

would anyone know how to adapt this for the new updates?

That depends on how much Karbonite/Regolith/stock changed between now and then. Regolith got rolled into stock (or at least a version of it) so you'd be basically transcribing one module to the other. But the maths are still there if you can read it, so the "hard" work is done.

Unfortunately, I won't be able to do much with this now. Just don't have the time or motivation to move on this anymore, at least not currently. The license is pretty permissive, though, so anyone can make a fork if they feel so inclined.

Link to comment
Share on other sites

  • 1 month later...

parts of it work, i'm still trying to figure out why some of the distillers will only work with the first output not the other ones, and why some appear in the VAB but when you launch they revert to normal.

Edit: After some figuring out, the BSP 2's only work if they are 'hard coded' into the Original Karbonite files, I don't know enough to figure out why the modulemanager file doesn't seem to replace them when a ship is loaded

Edited by Crashonaut
did some testing
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...