Jump to content

Check my code -- trying to add EC consumption to parts


Recommended Posts

Hello, I am a noob and I am lost. Any help appreciated. I have only a basic, cobbled-together understanding of Module Manager from digging into cfgs and reverse engineering things.

To simulate life support and also provide some more reason to put giant overkill solar panels on your big-ass space station, I am trying to add a small ElectricCharge consumption to every crewed part (not just commmand pods, but hitchhiker too, and science lab, as well as any other cool parts I find in mods) (I don't wish to add any consequences such as Kerbals dying when it runs out, though).

This is the way I have achieved it so far, but I dislike that the "generator nominal efficiency 1.00" text is appearing in every in crewed in-flight part menu:

@PART[*]:HAS[@INTERNAL]:Final
{    
    MODULE
    {
        name = ModuleGenerator
        isAlwaysActive = true
        OUTPUT_RESOURCE
        {
            name = ElectricCharge
            rate = -0.75
        }
    }    
}


I copied and pasted the ModuleGenerator from the stock RTG, and simply put a minus sign in front of the rate.  Is the rate per second or per minute? While it drains EC, it doesn't seem to be very fast.

I was wondering if it would be better to try and add a power-draining light module to the parts instead of ModuleGenerator? Or maybe try a negative rate solar panel module? Is there a simple way to say "Hey part, please drain x resource"? Maybe add ModuleResourceDrain?

Thanks

Edited by HandyAndy
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...