Jump to content

[1.4.2] ForScience! v1.5.2 - Your science autopilot.


Recommended Posts

Here is a module manager configuration that will enable you to collect science from probes.

skips

What does making a probe into a science container accomplish for you? Does it take the data from the module and reset it or something?

Link to comment
Share on other sites

What does making a probe into a science container accomplish for you? Does it take the data from the module and reset it or something?

It allows this mod to collect science from a ship that contains a probe and no pod. Note that you cannot collect science from the Goo Experiment or Materials Bay as they require a Scientist crew member and probe's have 0 crew requirement.

skips

Link to comment
Share on other sites

It allows this mod to collect science from a ship that contains a probe and no pod. Note that you cannot collect science from the Goo Experiment or Materials Bay as they require a Scientist crew member and probe's have 0 crew requirement.

skips

Sorry, I am new to science-ing, usually I play in sandbox. By collect you mean, the experiment popup not the Kerbal going EVA and doing a "Take" from the pod right?

Link to comment
Share on other sites

Sorry, I am new to science-ing, usually I play in sandbox. By collect you mean, the experiment popup not the Kerbal going EVA and doing a "Take" from the pod right?

This mod collects science points as they become available for manned Pods. With a scientist aboard, the science from the Goo and Materials Bay experiments will be collected as well. When you recover the spacecraft, all of the collected science gets added to your total. The Module Manager configuration file extends this capability to Probes (i.e., spacecraft with no manned Pod).

skips

Link to comment
Share on other sites

Does this support Dmagic's science mod? If not, any chance of this getting support for it? I noticed you mention this only supports stock science modules. I'm not sure what system Dmagic is currently using, stock or custom.

Link to comment
Share on other sites

Here’s a question, which I ask here because of the conceptual proximity: how hard would it be to create a mod that does all the experiments at KSC as science parts are unlocked, without having to actually drive around vacuuming them up?

Here’s an example of what I mean: when you unlock the materials bay, you open the “KSC Junior Science Team” mod button in the toolbar and click a now-active button for the SC-9001. You then get all the materials-bay-experiment science points from all 30+ KSC biomes, plus all those experiments are marked as done in the Science archive. Ditto when you unlock the Gravioli, barometer, etc. The idea being that you’re assigning a team of junior scientists to go out and run a bunch of experiments at KSC with the new instruments.

I know that ForScience! makes that surface-grind at KSC a whole lot easier, and I’ll probably use it for that soon, but I feel like the Jr. Science Team approach would be even easier on the player. Whether or not it’s easy to implement is less clear to me—thus my question here.

Edited by meyerweb
Cleaned up forum migration errors (Unicode and hyperlinking were both botched—sigh)
Link to comment
Share on other sites

I'm considering removing the filter for low value science to allow for auto collection of data to be used in the science lab. Since the science popups don't happen anymore, it doesn't seem like it is as big of deal to collect 0 value science data now.

I would interested to hear anyone thoughts about it.

I have been playing with this mod for a couple of days and have three suggestions.

1. Leave the minimum science limit but consider lowering it to 0.01 science. (I am not unhappy with it remaining at 0.1 science return.)

2. Expand the filter to eliminate storing any experiment that would result in zero net science. This change would clean up some of the mess that appears in the Science Archive with experiments that cannot be executed being listed with zero science value.

3. Enable the execution of the non-rerunnable experiments once, if there is no scientist aboard and only if the returned science is greater than the minimum. This change would allow the use of these experiments with unmanned craft albeit only once per flight. This change would meet the spirit of both the squad implementation and this mod.

skips

Link to comment
Share on other sites

Here is a git difference that allows ForScience to execute non-rerunnable experiments once per flight. In addition, the reordering of the tests prevents zero science return entries in the Science Archive list.

skips

diff --git a/Source/ForScience.cs b/Source/ForScience.cs
index aa2c83b..9bd5e83 100644
--- a/Source/ForScience.cs
+++ b/Source/ForScience.cs
@@ -110,28 +110,28 @@ namespace ForScience
Debug.Log("[For Science] Checking experiment: " + currentScienceSubject(currentExperiment.experiment).id);
#endif

- if (ActiveContainer().HasData(newScienceData(currentExperiment))) // we have the same experiment data onboard, so we skip it
+ if (!currentExperiment.experiment.IsAvailableWhile(currentSituation(), currentBody())) // this experiement isn't available here so we skip it
{
#if DEBUG
- Debug.Log("[For Science] Skipping: We already have that data onboard.");
+ Debug.Log("[For Science] Skipping: Experiment is not available for this situation/atmosphere.");
#endif
}
- else if (!currentExperiment.rerunnable & !IsScientistOnBoard()) // no cheating goo and materials here
+ else if (IsOnetimeNotRunnable(currentExperiment)) // no cheating goo and materials here
{
#if DEBUG
Debug.Log("[For Science] Skipping: Experiment is not repeatable.");
#endif
}
- else if (!currentExperiment.experiment.IsAvailableWhile(currentSituation(), currentBody())) // this experiement isn't available here so we skip it
+ else if (currentScienceValue(currentExperiment) < 0.1) // this experiment has no more value so we skip it
{
#if DEBUG
- Debug.Log("[For Science] Skipping: Experiment is not available for this situation/atmosphere.");
+ Debug.Log("[For Science] Skipping: No more science is available: ");
#endif
}
- else if (currentScienceValue(currentExperiment) < 0.1) // this experiment has no more value so we skip it
+ else if (ActiveContainer().HasData(newScienceData(currentExperiment))) // we have the same experiment data onboard, so we skip it
{
#if DEBUG
- Debug.Log("[For Science] Skipping: No more science is available: ");
+ Debug.Log("[For Science] Skipping: We already have that data onboard.");
#endif
}
else
@@ -140,6 +140,7 @@ namespace ForScience
Debug.Log("[For Science] Running experiment: " + currentScienceSubject(currentExperiment.experiment).id);
#endif
ActiveContainer().AddData(newScienceData(currentExperiment)); //manually add data to avoid deployexperiment state issues
+ completedExperiments.Add( currentExperiment );
}

}
@@ -315,6 +316,22 @@ namespace ForScience
}
return returnvalue;
}
+
+ private bool IsOnetimeNotRunnable( ModuleScienceExperiment currentExperiment )
+ {
+ var returnvalue = false;
+ if (!currentExperiment.rerunnable & !IsScientistOnBoard())
+ {
+ foreach (ModuleScienceExperiment doneExperiment in completedExperiments)
+ {
+ if (doneExperiment == currentExperiment)
+ {
+ returnvalue = true;
+ }
+ }
+ }
+ return returnvalue;
+ }
}
}

Link to comment
Share on other sites

I have been playing with this mod for a couple of days and have three suggestions.

1. Leave the minimum science limit but consider lowering it to 0.01 science. (I am not unhappy with it remaining at 0.1 science return.)

2. Expand the filter to eliminate storing any experiment that would result in zero net science. This change would clean up some of the mess that appears in the Science Archive with experiments that cannot be executed being listed with zero science value.

3. Enable the execution of the non-rerunnable experiments once, if there is no scientist aboard and only if the returned science is greater than the minimum. This change would allow the use of these experiments with unmanned craft albeit only once per flight. This change would meet the spirit of both the squad implementation and this mod.

skips

#2 I'm not sure what you mean. It already filters out experiments that have no science value. Though it may still be possible to get transient invalid states from the game, which I can only throttle, not eliminate. And a higher throttle makes it less sensitive. (Which is why you no longer get those small biomes in orbit during timewarp now. It's a trade off.)

#3 I have plans to handle run once experiments eventually. It will most likely be implemented with special probe logic. I don't have an eta as I am busy with other projects at the moment.

- - - Updated - - -

Here’s a question, which I ask here because of the conceptual proximity: how hard would it be to create a mod that does all the experiments at KSC as science parts are unlocked, without having to actually drive around vacuuming them up?

Here’s an example of what I mean: when you unlock the materials bay, you open the “KSC Junior Science Team†mod button in the toolbar and click a now-active button for the SC-9001. You then get all the materials-bay-experiment science points from all 30+ KSC biomes, plus all those experiments are marked as done in the Science archive. Ditto when you unlock the Gravioli, barometer, etc. The idea being that you’re assigning a team of junior scientists to go out and run a bunch of experiments at KSC with the new instruments.

I know that ForScience! makes that surface-grind at KSC a whole lot easier, and I’ll probably use it for that soon, but I feel like the Jr. Science Team approach would be even easier on the player. Whether or not it’s easy to implement is less clear to meâ€â€thus my question here.

I have no plans to ever do something like this. (Too cheaty.) Having the mod feel like cheating is one (good) thing, having it actually cheat is another. In fact, it is a pretty good game design prinicple that you make the player feel like they are cheating, while not actually doing so.

- - - Updated - - -

Does this support Dmagic's science mod? If not, any chance of this getting support for it? I noticed you mention this only supports stock science modules. I'm not sure what system Dmagic is currently using, stock or custom.

DMagic uses custom modules (bits of c# code) to handle his experiments. I realize that his mod is very popular, and maybe I'll add support one day, but I've been down the rabbit hole of supporting third parties before, and I don't care to repeat the experience. He's a great guy. He helped answer many of my questions as I developed the mod. But I don't want this mod broken every time an update is released. (Keep in mind, the mod functioned as intended since .25 with no updates to the code. This new version was only updated to improve functionality.)

Edited by WaveFunctionP
Link to comment
Share on other sites

#2 I'm not sure what you mean. It already filters out experiments that have no science value. Though it may still be possible to get transient invalid states from the game, which I can only throttle, not eliminate. And a higher throttle makes it less sensitive. (Which is why you no longer get those small biomes in orbit during timewarp now. It's a trade off.)

#3 I have plans to handle run once experiments eventually. It will most likely be implemented with special probe logic. I don't have an eta as I am busy with other projects at the moment.

1. Add the Goo Experiment to a spacecraft without a scientist aboard.

2. On launchpad activate the Goo Experiment manually.

3. Launch the rocket.

4. After retrieval, examine the Science Archive in the R&D center. It will show zero science accomplished entries for "Flying over Kerbin" and the biome on which the craft landed.

See my previous post with the git differences. The issue with the Science Archive has to do with the order in which you do the tests. If you reorder them as I have done, the zero science entries will not appear in the Science Archive.

I also included a IsOnetimeNotRunnable() function that can be used to allow run once experiments to execute once per flight. This implementation has the interesting side-effect that if you have two experiments on board, they each get executed in different biomes.

Feel free to use or throw away the changes that I posted.

skips

PS: You can get the current code to work with probes by just adding a Container to the probe. A simple Module Manager configuration file is all that is needed. - ss

Edited by skips
Additional Information
Link to comment
Share on other sites

  • 5 months later...

KSP 1.0.5 broke this mod. There was a change made to the constructor for the ScienceData class that invalidated some of the code. The function newScienceData() assumes that the ScienceData constructor takes 5 arguments. In KSP 1.0.5, the constructor takes 7 arguments. If you are maintaining this mod, you can restore the functioning of it by changing newScienceData() to be

        private ScienceData newScienceData(ModuleScienceExperiment currentExperiment)
{
return new ScienceData(
currentExperiment.experiment.baseValue * currentScienceSubject(currentExperiment.experiment).dataScale,
currentExperiment.xmitDataScalar,
0f,
currentScienceSubject(currentExperiment.experiment).id,
currentScienceSubject(currentExperiment.experiment).title,
false,
currentExperiment.part.flightID
);
}

skips

Link to comment
Share on other sites

  • 5 months later...
27 minutes ago, Alshain said:

Interesting, does it still collect science if you are flying at high speeds through the atmosphere?  I'm all for reducing tedium, but I don't want to cheat either.

The guiding principle is that it should feel like cheating without actually cheating.

You can always eva during early re-entry or while parachuting to collect and reset modules while "flying", so there are no restrictions during flight. The mod doesn't really do anything that can't be done manually. It just removes the tedium, and lets you focus on building, flying and exploring, which are far more engaging experiences in the game, but keeping the incentive from science to do more things.

Link to comment
Share on other sites

On 5/6/2015 at 9:29 PM, WaveFunctionP said:

Of all the mods on this list, this one feels the most like cheating.

STANDS ON SOAPBOX

When I see statements similar to the above concerning "cheating" in KSP, I just want to scream. First, Merriam-Webster defines "cheating" as: to take something from (someone) by lying or breaking a rule

Please note, in order to cheat, you must take something or take unfair advantage of SOMEONE ELSE.  There needs to be another person/player involved.

I don't know about you, but I don't compete against another player in KSP.  I'm not gaining an advantage so as to achieve a higher score against another player.  What I AM DOING is playing a single-player game the way I WANT TO.  Heck, some players consider MechJeb as cheating to use it to auto-dock or rendezvous.  For me, having rendezvoused a hundred or so times manually, I just finally decided, "let somebody else do the work".  Since then, MJ, MJ has rendezvoused for me 

Am I "cheating"?  No.  I play the game I the way I want to.  And, so should you, without the self-righteous judgement of others.

Sidebar:  Does this mean I could alter a fuel tank CFG to have 1000000 units of LF/O and weigh nothing?  Yep.

GETS OFF SOAPBOX

 

As for me, I've never used For Science.  I'm all the way through the tech tree (except the 1000-cost nodes) for the umpteenth time.  I may use the mod in the future.

Edited by Apollo13
Link to comment
Share on other sites

6 hours ago, Alshain said:

Interesting, does it still collect science if you are flying at high speeds through the atmosphere?  I'm all for reducing tedium, but I don't want to cheat either.

If by "cheating" you mean "assuming a race that can build space ships has developed the technology to TRANSFER STUFF THROUGH THOSE SHIPS WITHOUT HAVING TO GO OUTSIDE" then no, you can't do it without cheating.

Link to comment
Share on other sites

10 hours ago, WaveFunctionP said:

The guiding principle is that it should feel like cheating without actually cheating.

You can always eva during early re-entry or while parachuting to collect and reset modules while "flying", so there are no restrictions during flight. The mod doesn't really do anything that can't be done manually. It just removes the tedium, and lets you focus on building, flying and exploring, which are far more engaging experiences in the game, but keeping the incentive from science to do more things.

Well it does though, if you don't get into space, it allows you to dump science parts and use lesser parachutes to return.  While you could just not do that, it could also happen if you are forced to abort due to a launch mishap, and then you get the science you shouldn't be getting anyway.  That's ok though, I'll stick to doing it the good ol fashioned way.

For the rest of you, you are reading way too far into the word 'cheating'.  It's a perspective thing, I don't expect everyone to view it the same way, but it is how I view it and I don't want to make it that easy in my game.

Link to comment
Share on other sites

9 hours ago, nobodyhasthis2 said:

Does the configuration window work in 1.1?

I seem to just get FS in the tool bar. Science is being collected but that configuration window is missing. That means the per craft settings seem missing.

Sorry, I just saw your post in the sciencesampler.

ForScience have never has a configuration window. It has always just had an on/off toggle and just worked like magic. You may be thinking of the forked version call ForScience Extended, which is now named AutomatedScienceSampler, since his rewrite.

Edited by WaveFunctionP
Link to comment
Share on other sites

Is there any known interaction between this mod and RemoteTech?  I was using it before installing RT without issue, and now that RT is installed the toolbar button flickers in and out, and the mod doesn't do anything.  Any ideas? 

Link to comment
Share on other sites

3 hours ago, jdub3350 said:

Is there any known interaction between this mod and RemoteTech?  I was using it before installing RT without issue, and now that RT is installed the toolbar button flickers in and out, and the mod doesn't do anything.  Any ideas? 

The mod really shouldn't do anything if there are no science containers on the vessel. I just noticed that it isn't handling probes properly right now on my play through as well. The flickering button is the mod registering and unregistered the button on the toolbar. So, I dun goofed somewhere. I'l try to get a fix in for probes (and apparently destroyed vessels too) this weekend.

Link to comment
Share on other sites

2 hours ago, WaveFunctionP said:

The mod really shouldn't do anything if there are no science containers on the vessel. I just noticed that it isn't handling probes properly right now on my play through as well. The flickering button is the mod registering and unregistered the button on the toolbar. So, I dun goofed somewhere. I'l try to get a fix in for probes (and apparently destroyed vessels too) this weekend.

Thanks! 

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...