Jump to content

How would I go about making a Kerbal use electricity?


Ako_Vendetta

Recommended Posts

You would need to write a plugin. The easiest approach would be to make all command pods consume electricity. Then, upon losing all electrical charge, make the plugin kill the kerbals after a set amount of time. The plugin could also be written to kill a kerbal on EVA once they ran out of fuel, since there is no built-in electricity in the EVA suits.

This would be the easiest approach, though the solution itself will vary in coding length depending on how you go about it. Most importantly, this does not require changes to the parts themselves other than a code block for electricity consumption, something that you can copy and paste from something like the lights or anything that consumes power. No additional transforms need be added to the pods.

Link to comment
Share on other sites

That's essentially what I want to do, is a very simplified life support system without having to micromanage oxygen levels and stuff. I figured simply having each Kerbal draw something like 0.01 electricity from whatever vessel it is occupying would suit my purpose, but I'm thinking doing this may be beyond my tools and knowledge of modding KSP (only had the game a week, but I have some experience writing mods for other games over the years.).

Thanks for the reply!

Link to comment
Share on other sites

That's essentially what I want to do, is a very simplified life support system without having to micromanage oxygen levels and stuff. I figured simply having each Kerbal draw something like 0.01 electricity from whatever vessel it is occupying would suit my purpose, but I'm thinking doing this may be beyond my tools and knowledge of modding KSP (only had the game a week, but I have some experience writing mods for other games over the years.).

Thanks for the reply!

Yes then in that case you can edit the CFG of a pod to consume electricity extremely easily, but for it to have an effect on the kerbals themselves you will need to write a plugin.\

Luckily in your case such a plugin is really just a basic script that passes a t/f statement on power level, starts a timer, and then sends the kill code for the kerbals. The only thing you will need from the API is the code to kill the kerbals, but you could ask any of the LS modders for how they implemented it, I am sure they would love to help you.

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