Jump to content

[1.8.x] AutomatedScienceSampler - V1.3.5 - 18.10.2019


SpaceTiger

Recommended Posts

few problems/issues

1) From what i have seen it doesn't work with probe cores. I was trying to send a probe up, to grab the transmit values but it just refused to work at all in my testing.

Hmm i never tried this with probes. Have to investigate further

2) The minimum science doesn't always work. while sitting on the pad it keeps trying to collect a bunch of 0 science reports.

The pad is an iffy situation. It does weird things and i could never figure out why this happens. ForScience calculates the wrong values while everywhere else it works perfectly fine.

3) While running at higher time warps, and using "transfer science to container" my experiments sometimes get stuck. By that i mean, it runs the experiment once, pulls it into the command pod, and then runs it again. At which point it cant pull it into the command pod again, and the results stay on whatever device did the experiment. And because of that it cant run new experiments until i manually clear it.

Can't store the same result twice in the same container. That's not a bug/glitch and is intended this way. Maybe there should be an option to dump those results ?

Still far better than trying to manually collect all these science reports though. Thanks for keeping this mod going, pretty much a required mod for me.

Always glad that it helps someone else too.
Link to comment
Share on other sites

So i had a weird crash, so i was looking through my log file and noticed this.

File 'C:/Games/SteamLibrary/steamapps/common/Kerbal Space Program - moded/KSP_Data/../GameData/KerboKatz/KerboKatzToolbar/PluginData/settings.cfg' does not exist

I pretty much just have forscience! zip d/l from the front page here and thats it. Went to look at the location and noticed that i didnt have a sub directory of KerboKatzToolbar in there.

I thought id just mention it in case it was a bug something got left out or to make life more miserable for myself for worrying about nothing ;)

I havent got any tests done to see if this is working as intended in game, I just know its loaded up.

Link to comment
Share on other sites

So i had a weird crash, so i was looking through my log file and noticed this.

File 'C:/Games/SteamLibrary/steamapps/common/Kerbal Space Program - moded/KSP_Data/../GameData/KerboKatz/KerboKatzToolbar/PluginData/settings.cfg' does not exist

I pretty much just have forscience! zip d/l from the front page here and thats it. Went to look at the location and noticed that i didnt have a sub directory of KerboKatzToolbar in there.

I thought id just mention it in case it was a bug something got left out or to make life more miserable for myself for worrying about nothing ;)

I havent got any tests done to see if this is working as intended in game, I just know its loaded up.

That's a harmless message and wouldn't cause your game to crash. Your output log would be helpful to figure out why your game crashed.

Link to comment
Share on other sites

Hmm i never tried this with probes. Have to investigate further

If that part of code didn't change in your version, I had a check for containers. If there are no containers onboard, then the addon would not run anything, since there was no place to store, and the logic to figure out which experiment to run of duplicate experiemnts would get nasty very quickly. Which is also a reason why I didn't run goo/scijrs either.

The pad is an iffy situation. It does weird things and i could never figure out why this happens.

The pad, and various other places, mostly around ksc that I know of are special biomes that aren't reported in the same way as science biomes. The strings don't match basicly. They aren't even listed in the science definitions that I could fine. I have a mostly working update soon that include MUCH improved detection of these special cases.

ForScience calculates the wrong values while everywhere else it works perfectly fine.

This is related to the above issue, but also the VERY MANY transient states that the vessel passes. The next version should have some basic protection against transient states.

Also, having a scientist onboard will reset experiments automatically!

I'm not sure yet if I'll be able to add lab logic yet, because honestly, I don't understand it yet. And using a transmitter for probes is on the radar as well. I'm not sure I'll delay the update for those features though.

Edited by WaveFunctionP
Link to comment
Share on other sites

That's a harmless message and wouldn't cause your game to crash. Your output log would be helpful to figure out why your game crashed.

Well my crash isnt related to ForScience, so your off the hook there ;) It looks more like a memory issue, which is a bummer since i was trying to keep it down to like 232312 mods so i wouldnt crash like that, lol.

Link to comment
Share on other sites

Can't store the same result twice in the same container. That's not a bug/glitch and is intended this way. Maybe there should be an option to dump those results ?

The bug/glitch/whatever is the fact that it tries to grab the same report twice. Which logically causes problems down the road with stuff working as it should. :)

Dumping duplicate data would be one solution to the problem however.

If that part of code didn't change in your version, I had a check for containers. If there are no containers onboard, then the addon would not run anything, since there was no place to store, and the logic to figure out which experiment to run of duplicate experiemnts would get nasty very quickly. Which is also a reason why I didn't run goo/scijrs either.

I seem to recall you mentioning the fact that you were thinking about adding a container just for probes/whatnot. Most experiments could be stored as pure data, the only exceptions being goo/scijrs/surface samples. So adding a stack/radial hard drive might be an easy, or at least logical, way to go about this.

Link to comment
Share on other sites

If that part of code didn't change in your version, I had a check for containers. If there are no containers onboard, then the addon would not run anything, since there was no place to store, and the logic to figure out which experiment to run of duplicate experiemnts would get nasty very quickly. Which is also a reason why I didn't run goo/scijrs either.

I just realized i added a check at some point to see if the vessel was controllable and it only checks for manned pods. This could be the root of this issue.

The pad, and various other places, mostly around ksc that I know of are special biomes that aren't reported in the same way as science biomes. The strings don't match basicly. They aren't even listed in the science definitions that I could fine. I have a mostly working update soon that include MUCH improved detection of these special cases.

This is related to the above issue, but also the VERY MANY transient states that the vessel passes. The next version should have some basic protection against transient states.

I didn't know this. Very interesting might have to dig deeper into the code to fix this.

I

Also, having a scientist onboard will reset experiments automatically!

I'm not sure yet if I'll be able to add lab logic yet, because honestly, I don't understand it yet. And using a transmitter for probes is on the radar as well. I'm not sure I'll delay the update for those features though.

Does this mean you are working on your own version of ForScience again ?

Well my crash isnt related to ForScience, so your off the hook there ;) It looks more like a memory issue, which is a bummer since i was trying to keep it down to like 232312 mods so i wouldnt crash like that, lol.

Could be the memory leak caused by the heat gauges

The bug/glitch/whatever is the fact that it tries to grab the same report twice. Which logically causes problems down the road with stuff working as it should. :)

Dumping duplicate data would be one solution to the problem however.

I could add another option which disables ForScience ability to grab the same report twice.
Link to comment
Share on other sites

Hey there, as mentioned above, I don't think its working with probes, at least I'm not getting anything.

Does the green gears toggle show that its active?

Here are some exceptions thrown which I think are related:

[EXC 21:10:49.056] MissingFieldException: Field '.GameEvents.OnScienceRecieved' not found.

[EXC 21:10:49.056] MissingFieldException: Field '.GameEvents.OnScienceRecieved' not found.

[EXC 21:14:28.010] ArgumentOutOfRangeException: Argument is out of range.
Parameter name: index
System.Collections.Generic.List`1[ModuleScienceContainer].get_Item (Int32 index)
KerboKatz.ForScienceContinued.UpdateCurrent ()
KerboKatz.ForScienceContinued.FixedUpdate ()

[EXC 21:14:47.813] ArgumentOutOfRangeException: Argument is out of range.
Parameter name: index
System.Collections.Generic.List`1[ModuleScienceContainer].get_Item (Int32 index)
KerboKatz.ForScienceContinued.UpdateCurrent ()
KerboKatz.ForScienceContinued.FixedUpdate ()
[EXC 21:14:48.834] ArgumentOutOfRangeException: Argument is out of range.
Parameter name: index
System.Collections.Generic.List`1[ModuleScienceContainer].get_Item (Int32 index)
KerboKatz.ForScienceContinued.UpdateCurrent ()
KerboKatz.ForScienceContinued.FixedUpdate ()
[EXC 21:16:19.287] ArgumentOutOfRangeException: Argument is out of range.
Parameter name: index
System.Collections.Generic.List`1[ModuleScienceContainer].get_Item (Int32 index)
KerboKatz.ForScienceContinued.MainWindow (Int32 windowID)
UnityEngine.GUILayout+LayoutedWindow.DoWindow (Int32 windowID)
UnityEngine.GUI.CallWindowDelegate (UnityEngine.WindowFunction func, Int32 id, UnityEngine.GUISkin _skin, Int32 forceRect, Single width, Single height, UnityEngine.GUIStyle style)
[EXC 21:16:23.833] ArgumentOutOfRangeException: Argument is out of range.
Parameter name: index
System.Collections.Generic.List`1[ModuleScienceContainer].get_Item (Int32 index)
KerboKatz.ForScienceContinued.UpdateCurrent ()
KerboKatz.ForScienceContinued.FixedUpdate ()
[EXC 21:16:25.104] ArgumentOutOfRangeException: Argument is out of range.
Parameter name: index
System.Collections.Generic.List`1[ModuleScienceContainer].get_Item (Int32 index)
KerboKatz.ForScienceContinued.UpdateCurrent ()
KerboKatz.ForScienceContinued.FixedUpdate ()

Link to comment
Share on other sites

Hey there, as mentioned above, I don't think its working with probes, at least I'm not getting anything.

Does the green gears toggle show that its active?

Yes it does

Here are some exceptions thrown which I think are related:

-Snip-

little pieces of the log don't really tell much. If its not too much work i would like you to upload the full output log somewhere so i can have a close look at it.
Link to comment
Share on other sites

I just realized i added a check at some point to see if the vessel was controllable and it only checks for manned pods. This could be the root of this issue.

I didn't know this. Very interesting might have to dig deeper into the code to fix this.

Does this mean you are working on your own version of ForScience again ?

Yeah, assuming my next playthrough goes without major issues, I'll be publishing an updated release soon. Maybe this weekend. hard to say, ofcourse.

Feel free to use any of the bits you like, you won't step on my toes. :)

Link to comment
Share on other sites

Hoi, First of all i wanted to thank u both for forScience, Im using it for over a Year now and don'know how i could ever played withoud it.

I think it would be great if u two (WaveFunctionP, SpaceTiger) Could work together. I would have a really hard time if i had to chose wich one i like more...

For the Probecore problem. It was possible in the old ForScience to throw an Science Container on your ship and it worked just fine. It seems FSC does'nt work that way anymore.

By the way, FC is repeating Experiments as long as u don't have done those already. It would great if it wouldn't do that as soon as u recycled an Experiment. At Least for the goo/scijrs

Link to comment
Share on other sites

few problems/issues

1) From what i have seen it doesn't work with probe cores. I was trying to send a probe up, to grab the transmit values but it just refused to work at all in my testing.

This got fixed in the newest version now :).

3) While running at higher time warps, and using "transfer science to container" my experiments sometimes get stuck. By that i mean, it runs the experiment once, pulls it into the command pod, and then runs it again. At which point it cant pull it into the command pod again, and the results stay on whatever device did the experiment. And because of that it cant run new experiments until i manually clear it.

The bug/glitch/whatever is the fact that it tries to grab the same report twice. Which logically causes problems down the road with stuff working as it should. :)

Dumping duplicate data would be one solution to the problem however.

Added an option to dump duplicate results which can be found if you enable the transferring of results

Hoi, First of all i wanted to thank u both for forScience, Im using it for over a Year now and don'know how i could ever played withoud it.

I think it would be great if u two (WaveFunctionP, SpaceTiger) Could work together. I would have a really hard time if i had to chose wich one i like more...

For the Probecore problem. It was possible in the old ForScience to throw an Science Container on your ship and it worked just fine. It seems FSC does'nt work that way anymore.

By the way, FC is repeating Experiments as long as u don't have done those already. It would great if it wouldn't do that as soon as u recycled an Experiment. At Least for the goo/scijrs

Would have to dig a bit more to see if i can add some checks for this.
Link to comment
Share on other sites

For the Probecore problem. It was possible in the old ForScience to throw an Science Container on your ship and it worked just fine. It seems FSC does'nt work that way anymore.

There are a few mods out there to add science containers, and while i normally hate mods that try to throw in everything and the kitchen sink... A science container or 2 would fill out the core functionality, and remove a possible dependance on 2nd or 3rd party mods that may or may not be updated.

Link to comment
Share on other sites

There are a few mods out there to add science containers, and while i normally hate mods that try to throw in everything and the kitchen sink... A science container or 2 would fill out the core functionality, and remove a possible dependance on 2nd or 3rd party mods that may or may not be updated.

An MM patch is all that is need to add a container to the probe core, fyi.

Link to comment
Share on other sites

it's referring to the 'MODULE = ModuleScienceContainer' definition in the part configs that tells the game you can store experiments. Which all the command pods and the mobile science lab have in stock. Many mods may have their own parts with that module as well, including some parts without crew space.

Link to comment
Share on other sites

So I'm confused no, which is this the latest version of this mod, or is it the one from the other thread that isn't called "forscience continued". Which one should be used with 1.0.2?

Link to comment
Share on other sites

So I'm confused no, which is this the latest version of this mod, or is it the one from the other thread that isn't called "forscience continued". Which one should be used with 1.0.2?

I'm not sure if ForScience still works with 1.0.2 but ForScienceContinued(this one) works with 1.0.2.

Link to comment
Share on other sites

I'm not sure if ForScience still works with 1.0.2 but ForScienceContinued(this one) works with 1.0.2.

Yep, and maybe the original developer should contribute to this one instead for sanity sakes.

it's referring to the 'MODULE = ModuleScienceContainer' definition in the part configs that tells the game you can store experiments. Which all the command pods and the mobile science lab have in stock. Many mods may have their own parts with that module as well, including some parts without crew space.

So it automatically stores the experiment to the pod if available. What happens if there's more than one container in the craft?

This is certainly very useful collecting all experiments without getting out and ditching them, however I've seen experimental, how well is it working (is it safe)?

Link to comment
Share on other sites

So it automatically stores the experiment to the pod if available. What happens if there's more than one container in the craft?

This is certainly very useful collecting all experiments without getting out and ditching them, however I've seen experimental, how well is it working (is it safe)?

If there is more than one container you can select where to store the experiments.

Its working well and it will not break your save game or anything like that.

The cut off is not correctly working for me. It runs experiments with 0 science although the cut off is set to 2.
There are special biomes that i just learned about a few days ago. Most thing around the KSC are marked as different biomes but the science results are based on the general biome. I'm currently working on a filter for those and going to release a new version containing some more debug info for me to catch them more easily with logs.
Link to comment
Share on other sites

I'm not sure if ForScience still works with 1.0.2 but ForScienceContinued(this one) works with 1.0.2.
If there is more than one container you can select where to store the experiments.

Its working well and it will not break your save game or anything like that.

There are special biomes that i just learned about a few days ago. Most thing around the KSC are marked as different biomes but the science results are based on the general biome. I'm currently working on a filter for those and going to release a new version containing some more debug info for me to catch them more easily with logs.


private string currentBiome() // we keep a running check on the vessels state to see if we've changed biomes.
{
if (currentVessel().landedAt != string.Empty) // more string emptys for weird biomes
{
if (currentVessel().landedAt == "KSC_Pad_Grounds") return "LaunchPad"; // handle a bunch of special biomes around ksc
else if (currentVessel().landedAt == "KSC_LaunchPad_Platform") return "LaunchPad";
else if (currentVessel().landedAt == "KSC_Pad_Flag_Pole") return "LaunchPad";
else if (currentVessel().landedAt == "KSC_Pad_Water_Tower") return "LaunchPad";
else if (currentVessel().landedAt == "KSC_Pad_Tanks") return "LaunchPad";
else if (currentVessel().landedAt == "KSC_Pad_Round_Tank") return "LaunchPad";
else if (currentVessel().landedAt == "KSC_SPH_Grounds") return "SPH";
else if (currentVessel().landedAt == "KSC_SPH_Round_Tank") return "SPHRoundTank";
else if (currentVessel().landedAt == "KSC_SPH_Main_Building") return "SPHMainBuilding";
else if (currentVessel().landedAt == "KSC_SPH_Water_Tower") return "SPHWaterTower";
else if (currentVessel().landedAt == "KSC_SPH_Tanks") return "SPHTanks";
else if (currentVessel().landedAt == "KSC_Crawlerway") return "Crawlerway";
else if (currentVessel().landedAt == "KSC_Mission_Control_Grounds") return "MissionControl";
else if (currentVessel().landedAt == "KSC_Mission_Control") return "MissionControl";
else if (currentVessel().landedAt == "KSC_VAB_Grounds") return "VAB";
else if (currentVessel().landedAt == "KSC_VAB_Round_Tank") return "VABRoundTank";
else if (currentVessel().landedAt == "KSC_VAB_Pod_Memorial") return "VABPodMemorial";
else if (currentVessel().landedAt == "KSC_VAB_Main_Building") return "VABMainBuilding";
else if (currentVessel().landedAt == "KSC_VAB_Tanks") return "VABTanks";
else if (currentVessel().landedAt == "KSC_Astronaut_Complex_Grounds") return "AstronautComplex"; // yes, it is messy
else if (currentVessel().landedAt == "KSC_Astronaut_Complex") return "AstronautComplex";
else if (currentVessel().landedAt == "KSC_Administration_Grounds") return "Administration";
else if (currentVessel().landedAt == "KSC_Administration") return "Administration";
else if (currentVessel().landedAt == "KSC_Flag_Pole") return "FlagPole";
else if (currentVessel().landedAt == "KSC_R&D_Grounds") return "R&D";
else if (currentVessel().landedAt == "KSC_R&D_Corner_Lab") return "R&DCornerLab";
else if (currentVessel().landedAt == "KSC_R&D_Central_Building") return "R&DCentralBuilding";
else if (currentVessel().landedAt == "KSC_R&D_Wind_Tunnel") return "R&DWindTunnel";
else if (currentVessel().landedAt == "KSC_R&D_Main_Building") return "R&DMainBuilding";
else if (currentVessel().landedAt == "KSC_R&D_Tanks") return "R&DTanks";
else if (currentVessel().landedAt == "KSC_R&D_Observatory") return "R&DObservatory";
else if (currentVessel().landedAt == "KSC_R&D_Side_Lab") return "R&DSideLab";
else if (currentVessel().landedAt == "KSC_R&D_Observatory") return "R&DObservatory";
else if (currentVessel().landedAt == "KSC_R&D_Small_Lab") return "R&DSmallLab";
else if (currentVessel().landedAt == "KSC_Tracking_Station_Grounds") return "TrackingStation";
else if (currentVessel().landedAt == "KSC_Tracking_Station_Hub") return "TrackingStationHub";
else if (currentVessel().landedAt == "KSC_Tracking_Station_Dish_East") return "TrackingStationDishEast";
else if (currentVessel().landedAt == "KSC_Tracking_Station_Dish_South") return "TrackingStationDishSouth";
else if (currentVessel().landedAt == "KSC_Tracking_Station_Dish_North") return "TrackingStationDishNorth"; // very messy
else return currentVessel().landedAt; // you're still here?
}
else return ScienceUtil.GetExperimentBiome(currentBody(), currentVessel().latitude, currentVessel().longitude); //else give up, err...return squad's *cough* highly accurate biome *cough*
}

This should return the proper biomes.


private bool StatesHaveChanged() // Track our vessel state, it is used for thread control to know when to fire off new experiments.
{
if (currentVessel() != stateVessel | currentSituation() != stateSituation | currentBody() != stateBody | currentBiome() != stateBiome)
{
stateVessel = currentVessel();
stateBody = currentBody();
stateSituation = currentSituation();
stateBiome = currentBiome();
stopwatch.Reset();
stopwatch.Start();
}

if (stopwatch.ElapsedMilliseconds > 100) // trottling detection to kill transient states.
{
stopwatch.Reset();
#if DEBUG
Debug.Log("[For Science] Vessel in new experiment state.");
#endif
return true;
}
else return false;
}

And this should throttle those transient states that I was speaking of earlier.

The entire structure of forscience was reworked for this release. Most of the complicated stuff has been moved to smaller helper functions, and nearly all of the state variables were removed as a result, making for much more readable code I hope.

If you have an questions, just PM me, I'd be glad to help.

Link to comment
Share on other sites

We already do kind of work together :).

-SNIP-

This should return the proper biomes.

-SNIP-

And this should throttle those transient states that I was speaking of earlier.

The entire structure of forscience was reworked for this release. Most of the complicated stuff has been moved to smaller helper functions, and nearly all of the state variables were removed as a result, making for much more readable code I hope.

If you have an questions, just PM me, I'd be glad to help.

Thanks i was doing something very similar. But there are some other spots on the runway like that too "KSC_Runway_Light_NE","KSC_Runway_Light_NW" and "KSC_Runway_Section_3" which all 3 return "Runway" experiments.

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