Jump to content

[1.12.x] KEI - Kerbin Environmental Institute


linuxgurugamer

Recommended Posts

@RealGecko has left the modding scene, and turned this over to me, original thread here:  https://forum.kerbalspaceprogram.com/index.php?/topic/143433-ksp-1

The new version for KSP 1.4.1 has new dependencies:

New Dependencies

CKAN has been updated with the dependencies

"Field tests of our new science equipment is a common practice, that gives us a lot of valuable information. However this procedure is really time consuming. That's why Kerbal Space Center signed contract with Kerbal Environmental Institute to do this boring job for us."

Interview with Gene Kerman - KSC flight director. Kerbin Weekly.

Get science from KSC "biomes" in one click.

Warning!!! May give you unexpected science boost!!! :D

Using [x] Science! is recommended, to keep things clear.

D8eUKUc.png

hdL87nc.png

Tired of poking around KSC measuring pressure at R&D Observatory and taking surface samples from SPH Round Tank, trying to get some science to finally unlock RE-L10 "Poodle" and start flying to space? Well, no more!!! Gather all available science experiments from KSC with a click of a button and go explore!

Can be enabled in the midst of career.

Donations gratefully accepted

Patreon.png

https://www.patreon.com/linuxgurugamer

Edited by linuxgurugamer
Link to comment
Share on other sites

@westamastaflash

Feel free to investigate the possibility discussed:

How about once you collect science from one situation/biome on kerbin then the mod can collect any future science from that same situation/biome on kerbin.   Getting a new experiment unlocked and flying it around to a bunch of different places on kerbin gets really tedious after a couple playthroughs. 

Take a good look at [x] Science, it may already do most of what this needs.  In fact, KEI actually has a comment about how it "stole" some code from [x] Science.

Link to comment
Share on other sites

42 minutes ago, linuxgurugamer said:

How about once you collect science from one situation/biome on kerbin then the mod can collect any future science from that same situation/biome on kerbin.   Getting a new experiment unlocked and flying it around to a bunch of different places on kerbin gets really tedious after a couple playthroughs. 

 

I started looking at this. I've been through the [x] Science code before, so I have a pretty good idea of mostly what needs to be done. I was going to put together a stock settings screen as well.


- Stock and/or Blizzy toolbar

Non-KSC Kerbin Science Collection:
- Situation checkboxes to turn off/on KEI science collection at each of the various Kerbin situations. (for ease of a "collect all uncollected science" button)
- Flag to require a prior visit by the player with collected science from that situation / biome (if biome is applicable)

Require funds to run experiments (in career mode):
-
 Flag to turn on/off requiring funds (in career mode) to perform experiments.
    - Either a flat fee for each science point / situation, or a cost based on part cost. I'm leaning towards flat fee to simplify things. 
    - Science costs a configurable multiplier of funds: 1 sci per 1x funds KSC, 2x landed, 3x splashed down, 4x flying low, 6x flying high, 10x low orbit, 20x high orbit. These could be configurable as well.
- Slider to determine amount the cost multiplier (x10 to x1000) in multiples of 10, defaulting to x100. E.g. 50 science in low orbit would cost between 5k and 500k.

Percentage of Science Given
-
Configurable slider to give a certain percentage of science lower than the standard amount.

 

Also:
Support for Strategia's "Local Science" strategy (this might already be baked in to Strategia, need to check).
Support for some of the more arcane/complex science packs. A lot of these have special biomes or situations.

Edited by westamastaflash
Link to comment
Share on other sites

Personal opinion:  I'd be hesitant to go much beyond KSC with this, and *very* hesitant to go beyond surface/flying low.  This mod is designed to emulate sending your science team out around the building to test out their instruments - a job which is both trivially easy and tedious to do in KSP.  Adding anything beyond the 'trivially easy' should be weighed *very* carefully.

On the other hand, cost for KSC science should be zero - doing it by hand, it's fairly trivial to recover your science vessel fully, which would refund your entire cost in career.  So this shouldn't cost more than that.  I would argue that costs (if implemented) should be based on distance from the KSC to the nearest example of that biome, if at all possible.

I can currently unlock over a quarter of the CTT (and getting close to a half, I think) using just this mod.  Be *very* careful making it more powerful.  :wink:

Link to comment
Share on other sites

1 hour ago, westamastaflash said:

 

I started looking at this. I've been through the [x] Science code before, so I have a pretty good idea of mostly what needs to be done. I was going to put together a stock settings screen as well.


- Stock and/or Blizzy toolbar

Non-KSC Kerbin Science Collection:
- Situation checkboxes to turn off/on KEI science collection at each of the various Kerbin situations. (for ease of a "collect all uncollected science" button)
- Flag to require a prior visit by the player with collected science from that situation / biome (if biome is applicable)

Require funds to run experiments (in career mode):
-
 Flag to turn on/off requiring funds (in career mode) to perform experiments.
    - Either a flat fee for each science point / situation, or a cost based on part cost. I'm leaning towards flat fee to simplify things. 
    - Science costs a configurable multiplier of funds: 1 sci per 1x funds KSC, 2x landed, 3x splashed down, 4x flying low, 6x flying high, 10x low orbit, 20x high orbit. These could be configurable as well.
- Slider to determine amount the cost multiplier (x10 to x1000) in multiples of 10, defaulting to x100. E.g. 50 science in low orbit would cost between 5k and 500k.

Percentage of Science Given
-
Configurable slider to give a certain percentage of science lower than the standard amount.

 

Also:
Support for Strategia's "Local Science" strategy (this might already be baked in to Strategia, need to check).
Support for some of the more arcane/complex science packs. A lot of these have special biomes or situations.

See @DStaal's remark above.

Please make these changes non-default, in other words, if someone doesn't change any settings, it works as it currently does.

If you have any issues with the settings page, let me know.

Also, regarding the situation, it has to be in atmosphere only, I don't want anything in orbit to be part of this, so I'm nixing the low/high orbit.  I would also suggest that you make each of the situations (landed, splashed down, flying low, flying high) individually selectable

14 minutes ago, DStaal said:

I would argue that costs (if implemented) should be based on distance from the KSC to the nearest example of that biome, if at all possible.

To keep it interesting, rather than the nearest example of that biome, which may be difficult to determine, use the nearest location of that biome which has been visited, that should be stored somewhere in the save file

Link to comment
Share on other sites

1 hour ago, linuxgurugamer said:

Please make these changes non-default, in other words, if someone doesn't change any settings, it works as it currently does.

Was planning to :-)

1 hour ago, linuxgurugamer said:

Also, regarding the situation, it has to be in atmosphere only, I don't want anything in orbit to be part of this, so I'm nixing the low/high orbit.  I would also suggest that you make each of the situations (landed, splashed down, flying low, flying high) individually selectable

No orbital science. Got it. Already was planning for individual selections for each situation.

1 hour ago, linuxgurugamer said:

To keep it interesting, rather than the nearest example of that biome, which may be difficult to determine, use the nearest location of that biome which has been visited, that should be stored somewhere in the save file

I think costs will require some more thought. Costs are a hard thing because some of the custom science parts that implement the same experiments cost a different amount. Determining the location and then measuring the distance to the KSC can be done, but it's kind of a pain.

I was thinking the costs here would essentially follow the "pay funds to have someone else do the legwork, buy the parts, etc for you". So you pay to not run the mission yourself (I mean, your plane 'flying high' can always return to the KSC for 100%, for only the cost of fuel). I was going to make each situation cost multiplier configurable (At KSC, Landed, Splashed, Flying Low, Flying High), 0 funds / sci to 1000 funds / sci. So if you wanted to keep KSC free, but make the other ones cost funds, you could.

 

Edited by westamastaflash
Link to comment
Share on other sites

Hello. Re update KEI-1.2.4. Output_log.txt  error:

Spoiler

IsolatedStorageException: Could not find file "C:\KSP\Kerbal Space Program 1.3.1.1891 Live\GameData\KEI\Plugins\PluginData\KEI\ExcludedExperiments.lst".
  at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) [0x00000] in <filename unknown>:0
  at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share) [0x00000] in <filename unknown>:0
  at System.IO.File.OpenRead (System.String path) [0x00000] in <filename unknown>:0
  at System.IO.StreamReader..ctor (System.String path, System.Text.Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize) [0x00000] in <filename unknown>:0
  at System.IO.StreamReader..ctor (System.String path) [0x00000] in <filename unknown>:0
  at System.IO.File.OpenText (System.String path) [0x00000] in <filename unknown>:0
  at System.IO.File.ReadAllLines (System.String path) [0x00000] in <filename unknown>:0
  at KSP.IO.File.ReadAllLines[KEI] (System.String filename, .Vessel flight) [0x00000] in <filename unknown>:0
 

Downloaded Zip file structure:

Spoiler

Folder PATH listing for volume Windows
Volume serial number is 3291-8D63
C:.
|   ExcludedExperiments.cfg
|   KEI.version
|   LICENSE.md
|   MiniAVC-LICENSE.txt
|   README.md
|   
>---PluginData
|   À---KEI
|           atmosphereAnalysis.msg
|           barometerScan.msg
|           crewReport.msg
|           dmlaserblastscan.msg
|           dmNAlbedoScan.msg
|           evaReport.msg
|           ExcludedExperiments.lst
|           ExcludedManufacturers.lst
|           facilityUpgrade.msg
|           gravityScan.msg
|           magScan.msg
|           mobileMaterialsLab.msg
|           mysteryGoo.msg
|           seismicScan.msg
|           surfaceSample.msg
|           temperatureScan.msg
|           unknownExperiment.msg
|           
>---Plugins
|       KEI.dll
|       
}---Textures
        kei-icon.png

After one run of ksp:

Spoiler

Folder PATH listing for volume Windows
Volume serial number is 3291-8D63
C:.
|   ExcludedExperiments.cfg
|   KEI.version
|   LICENSE.md
|   MiniAVC-LICENSE.txt
|   README.md
|   
>---PluginData
|   }---KEI
|           atmosphereAnalysis.msg
|           barometerScan.msg
|           crewReport.msg
|           dmlaserblastscan.msg
|           dmNAlbedoScan.msg
|           evaReport.msg
|           ExcludedExperiments.lst
|           ExcludedManufacturers.lst
|           facilityUpgrade.msg
|           gravityScan.msg
|           magScan.msg
|           mobileMaterialsLab.msg
|           mysteryGoo.msg
|           seismicScan.msg
|           surfaceSample.msg
|           temperatureScan.msg
|           unknownExperiment.msg
|           
>---Plugins
|   |   KEI.dll
|   |   
|   }---PluginData
|       }---KEI
}---Textures
        kei-icon.png

I feel it unlikely that this is intended.

Link to comment
Share on other sites

I just noticed that as well when I tried to build the app. The PluginData Folder needs to go under Plugins, or else the DLL needs to go at the top level. I corrected it in my local repo by creating a "Plugins" folder and putting plugindata under there.

Edited by westamastaflash
Link to comment
Share on other sites

2 hours ago, westamastaflash said:

I just noticed that as well when I tried to build the app. The PluginData Folder needs to go under Plugins, or else the DLL needs to go at the top level. I corrected it in my local repo by creating a "Plugins" folder and putting plugindata under there.

I'm going to be adding a Settings page this evening to control the toolbar button, so pull it down when I release so you can continue with it

Link to comment
Share on other sites

New release, 1.2.5

  • Added code to properly read files in PluginData
  • Added code to support ToolbarControl, gives option for Blizzy toolbar if desired
    • Note, this makes the ToolbarController a hard dependency
  • Added Settings page to control toolbar option
     
Edited by linuxgurugamer
Link to comment
Share on other sites

I found a small bug in the new version, clicking the "Close" button doesn't close the window.  I'm not sure yet whether the problem is in KEI or in the ToolbarControl.  

Until I get this fixed, clicking the toolbar button will close the window as normal

Edit:  Looks like the problem is in the ToolbarController, I should have it fixed soon

Edited by linuxgurugamer
Link to comment
Share on other sites

1 hour ago, Apaseall said:

Lastest version KEI (KEI-1.2.5) error message:

  Hide contents

NullReferenceException: Object reference not set to an instance of an object
  at KEI.KEI.OnGUI () [0x00000] in <filename unknown>:0

output_log.txt:

https://www.dropbox.com/s/z3t5mquilwh1gc4/save for KEI (1.2.5) testing.output_log.txt?dl=0

Please update to ToolbarController 1.3.4 (the latest) and try again.

I'm not sure if that will fix it, but I can't debug an older version

Thanks

Edit:  Were you still at the mainmenu, or were you at the Space Center?

and, I only see it 4 times in the log, was it contineous, or just those first 4?

Edited by linuxgurugamer
Link to comment
Share on other sites

Here is a recent log: https://www.dropbox.com/s/2qmtn4pf71t838n/save for GPO Testing.2.output_log.txt?dl=0

As you can see I made it for a different issue, but I believe it - yes 1.3.4.

4 instances of error in log - yes. but ... that would be once every scene? change, i.e. outside? to sph (1), sph to launch (1+1) etc.

I use this: https://www.spacedock.info/mod/600/ExceptionDetector

It save constantly checking output log every time something goes wrong. Have to be quick sometimes to read the error. I have found that one error can lead to some very strange and seemingly unrelated behaviour, which is why I am picky :)

Link to comment
Share on other sites

@linuxgurugamer FYI, both KEI and Toolbar Controller aren't updating via CKAN.  KEI shows 1.2.6 as available, but CKAN won't update it past 1.2.3; TC shows latest version as 1.3.1.

One of these being out-of-date is probably why the KEI window pops up every time I change scenes go to the astronaut complex or R&D complex at the KSC and can't be closed until I go back to the KSC-overview scene where I can close it with the toolbar button.

Edited by SilverlightPony
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...