untoldwind / KontrolSystem2

Autopilot scripting system for KSP2
Other
54 stars 15 forks source link

field science_value for experiment #175

Open PhilouDS opened 6 months ago

PhilouDS commented 6 months ago

Hi,

The type CompletedResearchReport from ksp::science has the fields data_value and sample_value as for the type Experiment. But CompletedResearchReport also has the filed science_value. Is it possible to get this field for Experiment please?

Until now, I used experiment_id and research_location_id to know if an experiment has already be completed but I've noticed this is unsufficient: if I've received only data but not samples from an experiment, this experiment still appears as a completed report. So, I want to compare the total science value of the completed report with the total science value in my experiment to know if I have to run the experiment.

Unless, you know an other mean to do that.

untoldwind commented 6 months ago

The internal logic seems to be a bit more complicated as there the "final" science value has several internal multipliers. In https://github.com/untoldwind/KontrolSystem2/releases/tag/v0.5.9.2 I added an experiment.potential_science_value() method that should perform that calculation (without actually handing in a research report).

PhilouDS commented 6 months ago

ok thanks. It seems to work as intended. Good to know: experiment.potential_science_value() takes into account the difficulty setting for science rewards... which is not the case for completedresearchreport.science_value.

(and sorry for that but I still have problem with VSC: ) image

github-actions[bot] commented 4 months ago

This issue is stale because it has been open for 60 days with no activity.

github-actions[bot] commented 2 months ago

This issue is stale because it has been open for 60 days with no activity.