linuxgurugamer

[1.8.x] Extended information about scientific experiments in VAB & SPH

Recommended Posts

Written by @DennyTX, but not updated since it's release, and DennyTX doesn't respond.  Original thread here:  https://forum.kerbalspaceprogram.com/index.php?/topic/121633-131-extended-information-about-scientific-experiments-in-vab-30-jan-2018/&

Goal: a bit helping to select proper experiment for mission.

 This simple plugin adds additional info about science experiment to its information panel (RightMouseClick). Now You  can find info about situation when experiment will work and its relations from biomes while constructing your vessel in VAB. Also it adds usage requirements and can trace multiple experiments definitions in one part. Works in VAB-SPH only.

Observed partmodules can be configured using CFG. So, it can trace parts containing stock science module "ModuleScienceExperiment", additional infos will be collected  from its EXPERIMENT_DEFINITION node. Example cfg with nodes for stock science parts, OLDD, StationScience and DMagic's science parts are enclosed. Seems like it can trace any handmaded sciencemodules with its own names from different mods, but only if it were inherited from stock ModuleScienceExperiment.

Availability

dis2NtP.png

tX2YFFP.png

 

 

Edited by linuxgurugamer

Share this post


Link to post
Share on other sites

@linuxgurugamer

Apologies if you have a preferred platform for bug reports, but the github issue tracker is disabled for this mod so I will report here.

In the SituationHelper class, a list of possible values is defined for usageReqMaskInternal & usageReqMaskExternal. However, this list does not contain every possible value and can cause an NRE on a value not explicitly defined (as discovered by @4x4cheesecake in the Probes Before Crew thread)

 

Edited by d4harp

Share this post


Link to post
Share on other sites

Thanks @d4harp to bring up the issue here already :)

@linuxgurugamer It's actually a "KeyNotFoundException" but it is pretty rare so I've talked about an NRE by habit before...

KeyNotFoundException: The given key was not present in the dictionary.
  at System.Collections.Generic.Dictionary`2[System.Int32,System.String].get_Item (Int32 key) [0x00000] in <filename unknown>:0 
  at ScienceSituationInfo.SituationModule.Start () [0x00000] in <filename unknown>:0 

In order to replicate the issue, it requires (additional to this mod) a science experiment with an valid "usageReqMaskInternal" value != -1, 0, 1, 2, 4, 5, 8 in the "ModuleScienceExperiment" node. To me, it happens in the combination of "Probes before Crew" + "Stockalike Station Parts Expansion Redux" + this mod, because this combination changes the usageReqMaskInternal of the sspx greenhouses to 12.

As soon as I enter the editor, the excetion appears.

Full log: https://www.dropbox.com/s/0hcn27460jq8d9a/output_log(experiment_mask).txt?dl=0

Share this post


Link to post
Share on other sites
1 hour ago, 4x4cheesecake said:

Thanks @d4harp to bring up the issue here already :)

@linuxgurugamer It's actually a "KeyNotFoundException" but it is pretty rare so I've talked about an NRE by habit before...


KeyNotFoundException: The given key was not present in the dictionary.
  at System.Collections.Generic.Dictionary`2[System.Int32,System.String].get_Item (Int32 key) [0x00000] in <filename unknown>:0 
  at ScienceSituationInfo.SituationModule.Start () [0x00000] in <filename unknown>:0 

In order to replicate the issue, it requires (additional to this mod) a science experiment with an valid "usageReqMaskInternal" value != -1, 0, 1, 2, 4, 5, 8 in the "ModuleScienceExperiment" node. To me, it happens in the combination of "Probes before Crew" + "Stockalike Station Parts Expansion Redux" + this mod, because this combination changes the usageReqMaskInternal of the sspx greenhouses to 12.

As soon as I enter the editor, the excetion appears.

Full log: https://www.dropbox.com/s/0hcn27460jq8d9a/output_log(experiment_mask).txt?dl=0

Found the problem.

New release, 1.3.3.2

  • Added missing situation mask 9 & 12,rare, but can happen
     

Share this post


Link to post
Share on other sites

About

I was in SPC with KSP 1.6.1 RO / RP-1 setup with KerbalismRO.

Share this post


Link to post
Share on other sites
9 minutes ago, Gordon Dry said:

About

I was in SPC with KSP 1.6.1 RO / RP-1 setup with KerbalismRO.

log file please.

I'll take a look, but I don't support or have anything to do with Kerbalism because it changes too much.  But I need the log file to determine where the problem is

Share this post


Link to post
Share on other sites

Actually I was not able to trigger that specific issue. So when I stumble upon it again I can post a log.
(But ofc I got other issues, as always)

Share this post


Link to post
Share on other sites

New release, 1.3.4

  • Added InstallChecker
  • Updated AssemblyVersion.tt
  • Updated for KSP 1.8

Share this post


Link to post
Share on other sites

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.