Jump to content

Looking for help - adding a new science experiment to existing part


tjsnh

Recommended Posts

So, I'm looking to add a science experiment to an existing part.

For example, I'd like to add an experiment called "Take HD Photo" to the stayputnik probe core, and have it yield science roughly equal to the goo canister (but I don't want it to be the goo experiment). The final product is intended to be used in career mode.

Any advice on where to start? Links to good tutorials on this?

Edited by tjsnh
Link to comment
Share on other sites

What I've done so far:

Added the following into /gamedata/squad/resources/sciencedefs.cfg

EXPERIMENT_DEFINITION
{
id = hdphoto
title = HD Photo
baseValue = 10
scienceCap = 13
dataScale = 2

requireAtmosphere = False
situationMask = 51
biomeMask = 51

RESULTS
{
default = You record an HD photograph of the situation.

}
}

and added the following into the cfg file for, for-now, the stayputnik :

MODULE
{
name = ModuleHDphoto

experimentID = hdphoto

experimentActionName = Take HD Photo
resetActionName = Reset Camera

useStaging = False
useActionGroups = True
hideUIwhenUnavailable = True

xmitDataScalar = 0.3
dataIsCollectable = True
collectActionName = Take Photo
interactionRange = 1.2
rerunnable = True
}

This doesn't seem to be enough - right clicking on the stayputnik gives no option to take the photo.

Anyone know what I'm missing?

Link to comment
Share on other sites

That worked - thanks!

I changed name = ModuleScienceExperiment

For some reason I thought name = needed to be a unique identifier.

So, follow-up,

Anyone know how to make it require a kerbal to run the experiement? For example, if I added my "HDphoto" experiment to a crew transport pod (not a capsule) ?

Edited by tjsnh
Link to comment
Share on other sites

xmitDataScalar to 1.0 worked - transmitted data is worth the same as retrieved.

(for those following along, I had to set this in the PART config, not the sciencedefs config - might be a useful feature for modding in "black and white crappy camera" part low in the tree, and "HD digital camera" part high in the tree)

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