Jump to content

Can't get ModuleGenerator working


gsuberland

Recommended Posts

I'm trying to build a generator part that takes liquid fuel and oxidizer, and produces electricty. I'm using ModuleGenerator to take the fuel as INPUT_RESOURCE and produce electricity using OUTPUT_RESOURCE.

Here's the full config:

PART
{
//General Parameters
name = GSTek_Generator
module = Part
author = gsuberland

// --- asset parameters ---
mesh = model.mu
scale = 1
rescaleFactor = 1

// --- node definitions ---
// definition format is Position X, Position Y, Position Z, Up X, Up Y, Up Z
node_attach = 0, 0.0, 0, 0.0, -1.0, 0.0

// --- FX definitions ---

// --- editor parameters ---
cost = 2500
category = Utility
subcategory = 0
title = Mk.I Electric Generator
manufacturer = GSTek Industries
description = Generates electricity by burning liquid fuel and oxidiser through a small internal turbine.

// attachment rules: stack, srfAttach, allowStack, allowSrfAttach, allowCollision
attachRules = 0,1,0,0,0

// --- standard part parameters ---
mass = 0.07
dragModelType = default
maximum_drag = 0.1
minimum_drag = 0.1
angularDrag = 1
crashTolerance = 11
maxTemp = 2800

MODULE
{
name = ModuleGenerator
isAlwaysActive = false
requiresAllInputs = true
startEventGUIName = Start Generator
endEventGUIName = Stop Generator

INPUT_RESOURCE
{
name = LiquidFuel
rate = -1.0
}
INPUT_RESOURCE
{
name = Oxidizer
rate = -1.0
}
OUTPUT_RESOURCE
{
name = ElectricCharge
rate = 5.0
}
}
}

When I use it in game, it appears and I can activate it, but it does nothing - I get "Efficiency: 0.00" on the right-click menu for the generator, despite it being directly stuck to a fuel source. No fuel is used, no electricity is produced.

Any ideas as to why this is happening?

Link to comment
Share on other sites

Since the nodes there are INPUT and OUTPUT, your rates all need to be positive, those tags control if it adds or subtracts.

Though, I would expect it to add both fuel/lox AND electricity they way you have it...

This was actually the first part I ever made, so, here is working cfg:

PART
{
// Kerbal Space Program - Part Config
// GW-101 Liquid Fuel Generator
// 1m Size

// --- general parameters ---
name = LFOG1m
module = Part
author = Cheebsta

MODEL
{
model = CheebCorp/Parts/combustGens/LFOG1m/model
rotation = -90, 0, 180
}

node_stack_top = 0.0, 0.973775, 0.0, 0.0, 1.0, 0.0, 1
node_stack_bottom = 0.0, -1.019975, 0.0, 0.0, 1.0, 0.0, 1

cost = 1200
category = Utility
subcategory = 0
title = GW-101 Liquid Fuel Generator
manufacturer = Cheeb Corp
description = A higher pollution alternative to traditional RTG and Solar power options.

attachRules = 1,0,1,1,0

mass = 0.05
dragModelType = default
maximum_drag = 0.2
minimum_drag = 0.2
angularDrag = 2
crashTolerance = 7
breakingForce = 200
breakingTorque = 200
maxTemp = 3600

MODULE
{
name = ModuleGenerator
isAlwaysActive = false
OUTPUT_RESOURCE
{
name = ElectricCharge
rate = 32.0
}
INPUT_RESOURCE
{
name = LiquidFuel
rate = 0.225
}
INPUT_RESOURCE
{
name = Oxidizer
rate = 0.275
}
requiresAllInputs = true
}

RESOURCE
{
name = ElectricCharge
amount = 200
maxAmount = 200
}
}

Rates are in seconds. RESOURCE tag give "internal battery".

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