Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong detection of usable converters when fuel cell contains more modules of type ModuleResourceConverter #30

Closed
jarosm opened this issue Feb 24, 2021 · 14 comments
Labels
bug Something isn't working question Further information is requested

Comments

@jarosm
Copy link
Owner

jarosm commented Feb 24, 2021

(Wrong first assumption of bug origin - Internal LFO of Malemute rover is not detected when using fuel cells.)

When fuel cell contains more then one ModuleResourceConverter module, then every module is processed. In reality, only one module can be active.

@jarosm jarosm added the question Further information is requested label Feb 24, 2021
@jarosm
Copy link
Owner Author

jarosm commented Feb 24, 2021

@Tacombel
Copy link

Perhaps is something different
image

@jarosm
Copy link
Owner Author

jarosm commented Feb 24, 2021

@Tacombel Is it working with other rovers?

@Tacombel
Copy link

I am testing it. Next I will try a stock rover and see.

@Tacombel
Copy link

This one also doesn't work, so I probably have a mod conflict somewhere
image

@jarosm
Copy link
Owner Author

jarosm commented Feb 24, 2021

@Tacombel I'm leaving this issue open so feel free to update it here

@Tacombel
Copy link

No problem using monopropellant
image

@jarosm
Copy link
Owner Author

jarosm commented Feb 24, 2021

@Tacombel Maybe the problem is, that there are two fuel options (LFO and LH2O)? BV probably can't sort it out properly. If it is the case, then it definitely needs some improvement.

@Tacombel
Copy link

Tacombel commented Feb 24, 2021

Probably. Malemute with monoprop is detected correctly. And this FC only have one option
image

@jarosm
Copy link
Owner Author

jarosm commented Feb 24, 2021

@Tacombel I need to know from which mod that fuell cell is or which mod adds that second option.

@Tacombel
Copy link

Tacombel commented Feb 24, 2021

The fuel cell is squad. The mod is Cryotanks.
image

patch CryoTanksFuelCells.cfg

//Adds a converter to fuel cells to produce ElectricCharge from LqdHydrogen and Oxidizer

//Produces ElectricCharge and consumes Oxidizer at the same rate as stock LFO converter
//Uses the same 15:1 unit ratio of LqdHydrogen to Oxidizer as CryoTanks, etc.

//N.B.: LH2/O->EC requires only 2/3 as much reaction mass per EC as LF/O->EC, but...
//...powering ZBO tanks with LH2O fuel cells uses 11.88x more LH2 than allowing boil-off

@part[FuelCell]:FOR[CryoTanks]
{
@module[ModuleResourceConverter]:HAS[#ConverterName[Fuel?Cell]]
{
@ConverterName = Fuel Cell (LFO)
@StartActionName = Start Fuel Cell (LFO)
@StopActionName = Stop Fuel Cell (LFO)
@ToggleActionName = Toggle Fuel Cell (LFO)
}
MODULE
{
name = ModuleResourceConverter
ConverterName = Fuel Cell (LH2O)
StartActionName = Start Fuel Cell (LH2O)
StopActionName = Stop Fuel Cell (LH2O)
ToggleActionName = Toggle Fuel Cell (LH2O)
FillAmount = 0.95
AutoShutdown = false
GeneratesHeat = false
UseSpecialistBonus = false
INPUT_RESOURCE
{
ResourceName = LqdHydrogen
Ratio = 0.0309375
FlowMode = STAGE_PRIORITY_FLOW
}
INPUT_RESOURCE
{
ResourceName = Oxidizer
Ratio = 0.0020625
FlowMode = STAGE_PRIORITY_FLOW
}
OUTPUT_RESOURCE
{
ResourceName = ElectricCharge
Ratio = 1.5
DumpExcess = false
}
}
}

@part[FuelCellArray]:FOR[CryoTanks]
{
@module[ModuleResourceConverter]:HAS[#ConverterName[Fuel?Cell]]
{
@ConverterName = Fuel Cell (LFO)
@StartActionName = Start Fuel Cell (LFO)
@StopActionName = Stop Fuel Cell (LFO)
@ToggleActionName = Toggle Fuel Cell (LFO)
}
MODULE
{
name = ModuleResourceConverter
ConverterName = Fuel Cell (LH2O)
StartActionName = Start Fuel Cell (LH2O)
StopActionName = Stop Fuel Cell (LH2O)
ToggleActionName = Toggle Fuel Cell (LH2O)
FillAmount = 0.95
AutoShutdown = false
GeneratesHeat = false
UseSpecialistBonus = false
INPUT_RESOURCE
{
ResourceName = LqdHydrogen
Ratio = 0.37125
FlowMode = STAGE_PRIORITY_FLOW
}
INPUT_RESOURCE
{
ResourceName = Oxidizer
Ratio = 0.02475
FlowMode = STAGE_PRIORITY_FLOW
}
OUTPUT_RESOURCE
{
ResourceName = ElectricCharge
Ratio = 18
DumpExcess = false
}
}
}

//LH2O fuel cells produce Water as an byproduct at a rate of 9/8 * Oxidizer by mass
//Only if mods that use Water are present

@part[FuelCell]:AFTER[CryoTanks]:NEEDS[KolonyTools|TacLifeSupport|KerbalHealth]
{
@module[ModuleResourceConverter]:HAS[#ConverterName[Fuel?Cell??LH2O?]]
{
OUTPUT_RESOURCE
{
ResourceName = Water
Ratio = 0.0116016
DumpExcess = true
}
}
}

@part[FuelCellArray]:AFTER[CryoTanks]:NEEDS[KolonyTools|TacLifeSupport|KerbalHealth]
{
@module[ModuleResourceConverter]:HAS[#ConverterName[Fuel?Cell??LH2O?]]
{
OUTPUT_RESOURCE
{
ResourceName = Water
Ratio = 0.13922
DumpExcess = true
}
}
}

@jarosm
Copy link
Owner Author

jarosm commented Feb 24, 2021

@Tacombel Found it. The problem is, that BV finds both resource converters and is expecting fuel for both of them. I bet, that generated power for that fuel cell is shown in the BV control panel as sum of output values of LFO and LH2O converters.

@Tacombel
Copy link

@jarosm And of course you are right. This is 2x1.5 Ec/s fuel cells
image

@jarosm jarosm changed the title Internal LFO of Malemute rover is not detected Wrong detection of usable converter when fuel cell contains more ModuleResourceConverters Mar 6, 2021
@jarosm jarosm changed the title Wrong detection of usable converter when fuel cell contains more ModuleResourceConverters Wrong detection of usable converters when fuel cell contains more modules of type ModuleResourceConverter Mar 6, 2021
@jarosm jarosm added the bug Something isn't working label Mar 6, 2021
@jarosm
Copy link
Owner Author

jarosm commented Mar 9, 2021

Fixed in version 1.3.1

@jarosm jarosm closed this as completed Mar 9, 2021
jarosm added a commit that referenced this issue Mar 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants