Collection of types and functions to get information and manipulate in-game science experiments.
Represents a completed research report
Name | Type | Read-only | Description |
---|---|---|---|
definition | ksp::science::ExperimentDefinition | R/O | Get the definition of the experiment. |
experiment_id | string | R/O | |
research_location_id | string | R/O | |
science_value | float | R/O |
Represents an in-game science experiment.
Name | Type | Read-only | Description |
---|---|---|---|
crew_required | int | R/O | |
current_experiment_state | ksp::science::ExperimentState | R/O | |
current_running_time | float | R/O | |
current_situation_is_valid | bool | R/O | |
definition | ksp::science::ExperimentDefinition | R/O | Get the definition of the experiment. |
experiment_id | string | R/O | |
experiment_location | Option<ksp::science::ResearchLocation> | R/O | Get the research location the experiment was last performed. |
experiment_uses_resources | bool | R/O | |
has_enough_resources | bool | R/O | |
previous_experiment_state | ksp::science::ExperimentState | R/O | |
region_required | bool | R/O | |
resources_cost | ksp::resource::ResourceSetting[] | R/O | |
time_to_complete | float | R/O | |
valid_locations | ksp::science::ResearchLocation[] | R/O |
experiment.cancel_experiment ( ) -> bool
experiment.pause_experiment ( ) -> bool
experiment.run_experiment ( ) -> bool
Represents definition of an in-game science experiment.
Name | Type | Read-only | Description |
---|---|---|---|
data_value | float | R/O | |
display_name | string | R/O | |
id | string | R/O | |
requires_eva | bool | R/O | |
sample_value | float | R/O | |
transmission_size | float | R/O |
Science experiment state
experimentstate.to_string ( ) -> string
String representation of the number
Name | Type | Read-only | Description |
---|---|---|---|
ALREADYSTORED | ksp::science::ExperimentState | R/O | Experiment has already stored results |
BLOCKED | ksp::science::ExperimentState | R/O | Experiment is blocked |
INSUFFICIENTCREW | ksp::science::ExperimentState | R/O | Experiment requires more available crew members |
INSUFFICIENTSTORAGE | ksp::science::ExperimentState | R/O | Not enough storage capacity for experiment |
INVALIDLOCATION | ksp::science::ExperimentState | R/O | Location not valid |
LOCATIONCHANGED | ksp::science::ExperimentState | R/O | Experiment location changed |
NOCONTROL | ksp::science::ExperimentState | R/O | Experiment requires control of the vessel |
NONE | ksp::science::ExperimentState | R/O | Unknown state |
OUTOFRESOURCE | ksp::science::ExperimentState | R/O | Experiment ran out of resources |
PAUSED | ksp::science::ExperimentState | R/O | Experiment is paused |
READY | ksp::science::ExperimentState | R/O | Experiment is ready to run |
RUNNING | ksp::science::ExperimentState | R/O | Experiment is running |
experimentstateconstants.from_string ( value : string ) -> Option<ksp::science::ExperimentState>
Parse from string
Parameters
Name | Type | Optional | Description |
---|---|---|---|
value | string | Enum value to lookup |
Represents a research location of a science experiment.
Name | Type | Read-only | Description |
---|---|---|---|
body_name | string | R/O | |
id | string | R/O | |
requires_region | bool | R/O | |
science_region | string | R/O | |
science_situation | ksp::science::ScienceSituation | R/O |
Represents the stored report of a science experiment
Name | Type | Read-only | Description |
---|---|---|---|
definition | ksp::science::ExperimentDefinition | R/O | Get the definition of the experiment. |
ec_required | float | R/O | |
experiment_id | string | R/O | |
report_type | ksp::science::ScienceReportType | R/O | |
research_location | ksp::science::ResearchLocation | R/O | Get the research location the experiment was performed at. |
research_location_id | string | R/O | |
time_required | float | R/O | |
transmission_percentage | float | R/O | |
transmission_size | float | R/O | |
transmission_status | bool | R/O |
researchreport.start_transmit ( ) -> bool
Science experiment type
scienceexperimenttype.to_string ( ) -> string
String representation of the number
Name | Type | Read-only | Description |
---|---|---|---|
Both | ksp::science::ScienceExperimentType | R/O | Science experiment producing both sample and data |
DataType | ksp::science::ScienceExperimentType | R/O | Science experiment producing data |
SampleType | ksp::science::ScienceExperimentType | R/O | Science experiment producing sample |
scienceexperimenttypeconstants.from_string ( value : string ) -> Option<ksp::science::ScienceExperimentType>
Parse from string
Parameters
Name | Type | Optional | Description |
---|---|---|---|
value | string | Enum value to lookup |
Type of science report
sciencereporttype.to_string ( ) -> string
String representation of the number
Name | Type | Read-only | Description |
---|---|---|---|
DataType | ksp::science::ScienceReportType | R/O | Science data |
SampleType | ksp::science::ScienceReportType | R/O | Science sample for experiments |
sciencereporttypeconstants.from_string ( value : string ) -> Option<ksp::science::ScienceReportType>
Parse from string
Parameters
Name | Type | Optional | Description |
---|---|---|---|
value | string | Enum value to lookup |
Situation of a science experiment
sciencesituation.to_string ( ) -> string
String representation of the number
Name | Type | Read-only | Description |
---|---|---|---|
Atmosphere | ksp::science::ScienceSituation | R/O | Experiment inside an atmosphere |
HighOrbit | ksp::science::ScienceSituation | R/O | Experiment in high orbit |
Landed | ksp::science::ScienceSituation | R/O | Experiment while landed |
LowOrbit | ksp::science::ScienceSituation | R/O | Experiment in low orbit |
None | ksp::science::ScienceSituation | R/O | No specific situation required |
Splashed | ksp::science::ScienceSituation | R/O | Experiment while splashed |
sciencesituationconstants.from_string ( value : string ) -> Option<ksp::science::ScienceSituation>
Parse from string
Parameters
Name | Type | Optional | Description |
---|---|---|---|
value | string | Enum value to lookup |
Name | Type | Description |
---|---|---|
ExperimentState | ksp::science::ExperimentStateConstants | Science experiment state |
ScienceExperimentType | ksp::science::ScienceExperimentTypeConstants | Science experiment type |
ScienceReportType | ksp::science::ScienceReportTypeConstants | Type of science report |
ScienceSituation | ksp::science::ScienceSituationConstants | Situation of a science experiment |
pub sync fn get_completed_research_reports ( ) -> ksp::science::CompletedResearchReport[]
Get all completed research reports.