Jump to content

How can I add an experiment en-mass to all probe cores?


tjsnh

Recommended Posts

I've added a science experiment "Take Photo" into MyMod/Resources/ScienceDefs.cfg as follows:

EXPERIMENT_DEFINITION
{
id = takephoto
title = Photograph
baseValue = 12
scienceCap = 15
dataScale = 2

requireAtmosphere = False
situationMask = 48
biomeMask = 3

RESULTS
{
default = You record a photograph of the situation.

}
}

I would like to add the following experiment block onto all (or at least, almost all) the existing squad probe cores without having to edit the files under /gamedata/squad :

MODULE
{
name = ModuleScienceExperiment

experimentID = takephoto

experimentActionName = Take Photo
resetActionName = Reset Camera

useStaging = False
useActionGroups = True
hideUIwhenUnavailable = True

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

Any thoughts on how I might go about this?

Is there a better way to add this experiment onto all the probe cores?

Edited by tjsnh
Link to comment
Share on other sites

I've added a science experiment "Take Photo" into MyMod/Resources/ScienceDefs.cfg as follows:

*SNIP*

Any thoughts on how I might go about this?

Is there a better way to add this experiment onto all the probe cores?

This is what Module Manager is for!!!

all you need to do is make a new cfg that looks like this:


@PART
[*]:HAS[@MODULE[ModuleCommand]:HAS[#minimumCrew[0]]]
{
MODULE
{
name = ModuleScienceExperiment

experimentID = takephoto

experimentActionName = Take Photo
resetActionName = Reset Camera

useStaging = False
useActionGroups = True
hideUIwhenUnavailable = True

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

Save that as whatever_you_want.cfg and put it somewhere in your GameData folder and it will add the science experiment module to all parts in GameData that have ModuleCommand and a minimum crew of 0. That's one way of doing it, if that adds stuff to parts you don't want you may need change the criteria as I know there are some mods that add command pods that don't require crew in them for them to operate.

I am assuming you have Module Manager already as a lot of mods come with it, If not get it here and put the MM dll in your GameData folder and nowhere else! Don't put it in a folder in GameData put it directly into GameData.

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