Jump to content

Science and mods!


DYJ

Recommended Posts

I've been looking at the interfaces of the ModuleScienceExperiment and ModuleScienceContainer classes, and experimented around with their public fields, but the result wasn't quite what I expected, and ended up mostly incomprehensible. :)

Basically what I'd like to do is a "better science" mod that makes science more fun - for example eliminates the need for going EVA to store and re-run simple, observation-type experiments. For example, it makes no sense to not be able to record multiple crew reports from inside the vessel. I hope Kerbals have invented pencils and notepads. ;)

I guess it will be necessary to inherit from these classes and re-implement some of the functionality. Any suggestion where to look for information / examples? Maybe an existing mod that messes with these classes? :)

Link to comment
Share on other sites

  • 2 months later...
  • 4 months later...

It looks like there are a few interesting new additions to ModuleScienceExperiment.


usageReqMaskInternal = 1
usageReqMaskExternal = 8

These seem to control the requirements necessary to actually start an experiment. The values are from an enum that specifies the crew requirement.


Never = -1,
Always = 0,
VesselControl = 1,
CrewInVessel = 2,
CrewInPart = 4,
ScientistCrew = 8,

So you can make an experiment be unmanned only (I think, I'm not sure exactly how it works), require a crew, or a scientist. CrewInPart is interesting, as it allows for ScienceLab-types of experiments.

The second field, usageReqMaskExternal, refers to the requirement for EVA experiment deployment. There is a new KSPEvent, DeployExperimentExternal(), this triggers EVA deployment if possible.

Link to comment
Share on other sites

  • 3 months later...

I'm just wondering if anyone knows if it's possible to have a 'Resource' available instead of 'Science' so that you can produce different types of resources depending on where you are or what Biome. Have an idea for a few crazy mods that could use this setup.

Link to comment
Share on other sites

I'm just wondering if anyone knows if it's possible to have a 'Resource' available instead of 'Science' so that you can produce different types of resources depending on where you are or what Biome. Have an idea for a few crazy mods that could use this setup.

I know you can limit resources to broad location, specifically : Crustal, Oceanic, Atmospheric or Interplanetary as well as being able to determine what bodies they actually appear on and abundance/dispersal parameters. But to my knowledge they cannot be limited to biome the same way science experiments can. Someone please correct me if I'm wrong about this but I've never seen a way to do it.

That said, the existence of biome parameters in place in the game leads me to believe that you could potentially code this in a plug-in to accomplish what you want. Not being a coder myself I'm not sure on that though, just seems kind of sensible...

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