Jump to content

Simple, stupid question


Recommended Posts

Hey there everybody.

I have JUST started to wet my beak into the world of KSP part programming.

What is the proper procedure to program the following:

Attach radially

Hold a small electric charge (say 200?)

It activates

- it uses electric charge (rate of 2.0)

and it can deactivate.

And I'd like a "Toggle" option in the action groups.

Just need the basics, I think I can figure out the fiddly bits that go between.

Oh, and how hard is it to do lighting effects?

(lights on when part active)

Thanks!

- A

Link to comment
Share on other sites

For the radial attachment, if you know it's size and it's centered properly just put half that in the node section, this pic will help with orientation.

And altho I sent some of this to you in a message I'll post it here with some extras.


//GENERATOR
MODULE {
name = ModuleGenerator

isAlwaysActive = False // True means always active

activateGUIName = Star Algae Growth //Buttons for toggling on/off, can be named anything.
shutdownGUIName = Stop Algae Growth

requiresAllInputs = True //Can't remember but should be it needs all resources
// --- POWER RESERVE SAFETY --- Stops if it hits this number
resourceThreshold = 0.1
// --- POWER RESERVE SAFETY ---
INPUT_RESOURCE {
name = Name
rate = 0.2
}

OUTPUT_RESOURCE {
name = Name
rate = 0.01
}
}

Another way I do it (Deployable Algae tank [needs light to grow])


//ALGAE GENERATOR
MODULE {
name = ModuleGenerator
isAlwaysActive = False
activateGUIName = Star Algae Growth
shutdownGUIName = Stop Algae Growth
requiresAllInputs = True
// --- POWER RESERVE SAFETY ---
resourceThreshold = 0.1
// --- POWER RESERVE SAFETY ---
INPUT_RESOURCE {
name = Light
rate = 1
}
INPUT_RESOURCE {
name = ElectricCharge
rate = 0.2
}
OUTPUT_RESOURCE {
name = Algae
rate = 0.1
}
}

//LIGHT CATCHER
MODULE
{
name = ModuleDeployableSolarPanel
raycastTransformName = suncatcher
pivotName = sunPivot
animationName = OpenClose
resourceName = Light
chargeRate = 1
powerCurve
{
key = 206000000000 0 0 0
key = 13599840256 1 0 0
key = 68773560320 0.5 0 0
key = 0 10 0 0
}

Once you learn what what dose you can mash them together pretty good. There are also some good plugins from other modders to do other things, e.g. Umbra Space Industries has a good setup so the generators won't work unless deployed ect.

Help Threads, Mass Tutorials or Video Only Tutorials There are a few more vids than the Mass section

Edited by Lt Vax
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...