Jump to content

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


linuxgurugamer

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
Link to comment
Share on other sites

  • 3 weeks later...
  • 1 month later...
  • 3 weeks later...
  • 2 weeks later...

@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
Link to comment
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

Link to comment
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
     
Link to comment
Share on other sites

  • 3 months later...
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

Link to comment
Share on other sites

  • 5 months later...
  • 1 month later...

While I'm waiting on my mod list to be v1.8.1 compatible, I saw this and it sounds like something I'd like to add but I'm on 1.7.3 currently.  I see that there are versions for 1.4, 1.5, 1.6, and 1.8...I tried using the 1.8 version with my install but it's not working.

Is there a quick hack I might be able to try to get this to work, or would I need to compile this somehow for 1.7 compatibility?

Link to comment
Share on other sites

25 minutes ago, Klock said:

While I'm waiting on my mod list to be v1.8.1 compatible, I saw this and it sounds like something I'd like to add but I'm on 1.7.3 currently.  I see that there are versions for 1.4, 1.5, 1.6, and 1.8...I tried using the 1.8 version with my install but it's not working.

Is there a quick hack I might be able to try to get this to work, or would I need to compile this somehow for 1.7 compatibility?

For 1.7.x, try the 1.6 version.  Most 1.6 mods also work with 1.7.  (And don't work with 1.8.)

Link to comment
Share on other sites

  • 3 months later...

Would it be in the scope of this mod to add a line in the part info window to display an experiment part’s transmission %? DMagic experiments do it, and stock can show total science available, but there doesn’t seem to be an option in the stock module to show transmission.

I also asked about this here which might explain it better:

 

Link to comment
Share on other sites

The value required to display here would be 'xmitDataScalar' located in the part config inside the 'ModuleScienceExperiment' module.

i.e.

	MODULE
	{
		name = ModuleScienceExperiment
		experimentID = barometerScan
		experimentActionName = #autoLOC_502065 //#autoLOC_502065 = Log Pressure Data
		resetActionName = #autoLOC_502064 //#autoLOC_502064 = Delete Data
		useStaging = False
		useActionGroups = True
		hideUIwhenUnavailable = False
		xmitDataScalar = 0.5
		dataIsCollectable = True
		collectActionName = #autoLOC_238018 //#autoLOC_238018 = Take Data
		interactionRange = 1.5
		rerunnable = True
		usageReqMaskInternal = 1
		usageReqMaskExternal = 8
	}

Would only allow for 50% of the science data to be transmitted back.

Link to comment
Share on other sites

I miss amount of the data of an experiment (iirc  baseValue * dataScale from the EXPERIMENT_DEFINITION), because I want to know inside the Editor, how many data will be there, and how many EC I need for sending it to the Kerbin

@linuxgurugamer
 

Edited by flart
Link to comment
Share on other sites

  • 2 months later...
On 4/2/2020 at 12:48 PM, flart said:

I miss amount of the data of an experiment (iirc  baseValue * dataScale from the EXPERIMENT_DEFINITION), because I want to know inside the Editor, how many data will be there, and how many EC I need for sending it to the Kerbin

@linuxgurugamer
 

I'm not sure that is possible, since the EC cost and amount of data depends on where the data is coming from.

It would be nice, and I suppose I might be able to do it one day.  I'm busy right now with other stuff, but will make a enhancement entry on Github

Link to comment
Share on other sites

On 6/21/2020 at 4:40 AM, linuxgurugamer said:

I'm not sure that is possible, since the EC cost and amount of data depends on where the data is coming from.

I did some testing, and for the same experiment I have 20 Mits, 6 science on the Launchpad and 20 Mits, 140 science for the Duna 100km orbit,
so some patches probably indeed could change biome modifiers, but after that, amount of the Mits is the same in different biomes 

@linuxgurugamer

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