Jump to content

How to make science experiments take resources?


Brent Kerman

Recommended Posts

First you need to add the resource with a config file - see the GameData\Squad\Resources\ResourcesGeneric.cfg for format. I think you'll need to define where it's found - see Ore.cfg in the same directory. Then you'll need a way to acquire and store the resource - I'm guessing you would create a part with a ModuleResourceHarvester (see stock drills) and another part to store it. The last step would be to use run an experiment that requires the resource - I'm not sure if stock modules can do this - and if they can they probably consume the resources(rodents). May require a custom plugin - especially if you don't want to consume the resource, just require it be present. Good luck with this!

Edited by wasml
Link to comment
Share on other sites

11 hours ago, wasml said:

First you need to add the resource with a config file - see the GameData\Squad\Resources\ResourcesGeneric.cfg for format. I think you'll need to define where it's found - see Ore.cfg in the same directory. Then you'll need a way to acquire and store the resource - I'm guessing you would create a part with a ModuleResourceHarvester (see stock drills) and another part to store it. The last step would be to use run an experiment that requires the resource - I'm not sure if stock modules can do this - and if they can they probably consume the resources(rodents). May require a custom plugin - especially if you don't want to consume the resource, just require it be present. Good luck with this!

I did the first parts already ( Make resource, store it ) , and the MPL uses electric to process science, so I think I could make my experiment use resources but I am not sure what coding I need to do.

Link to comment
Share on other sites

I've never played with ModuleScienceLab or ModuleScienceConverter before - my only suggestion would be to look at the API for those modules and experiment. Don't know if you've seen this site - has the API classes broken out - though it appears it's KSP 1.1.2

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