Jump to content

Generating ScienceData


Recommended Posts

Situation:  New Science game.  First Command Pod sitting on launch pad with a custom ModuleScienceContainer.

This Event is active:

        [KSPEvent(active = true, guiActive = true, guiName = "Review Custom ScienceData")]
        public void ShowCustomDataEvent()
        {
            print("[SensibleScience] ModuleSensibleScienceContainer :: ShowCustomDataEvent");
            
            var data = new ScienceData(30f, 1f, 0f, "surfaceSample@KerbinSrfLandedLaunchPad", "Random Data");
            var page = new ExperimentResultDialogPage(part, data, data.baseTransmitValue, data.transmitBonus, false, "", true, 
                                                      new ScienceLabSearch(vessel, data), 
                                                      new Callback<ScienceData>(onDiscardData), 
                                                      new Callback<ScienceData>(onKeepData), 
                                                      new Callback<ScienceData>(onTransmitData), 
                                                      new Callback<ScienceData>(onSendToLab));
            ExperimentsResultDialog.DisplayResult(page);
        }

 

If I click on the event with no other interaction, I get an ExperimentsResultDialog with the specified 30 Mits but no science value.

However, if I EVA my kerbal, grab a surface sample and dump/reset it, then re-board my pod and click on the event the ExperimentsResultDialog now shows the expected science (and FULL xmit value, as defined).

Does KSP track activated experiments/situations?  If so, what calls do I need to make to activate specific experiment or subject IDs?

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