Jump to content

[KSP 1.4.5] [x] Science! - KSP Science report and checklist (V5.17)


Recommended Posts

On 5.6.2017 at 3:43 PM, canisin said:

I felt curious and took a look at the code :D

I present the following change request: @Z-Key Aerospace

In file StatusWindow.cs, line 327,

replace


if( _filter.TotalCount - _filter.CompleteCount > 0 )

with


if (_filter.DisplayScienceInstances.Any(x => CanRunExperiment(x)))

This will mean that warp will be stopped if there are runnable experiments, rather than incomplete experiments! If I had some better github knowledge I would rather put this up as a pull request, but I don't :( Please excuse me for cluttering the forum like this.

1. How do you all know so much about programming languages?! :P

2. So you want to drop the feature to only show experiments that can still give you something. Instead the mod will show every available experiment at that place and time and the player has to gauge the usefulness of running them by checking the bar next to them?

Link to comment
Share on other sites

44 minutes ago, KerbMav said:

1. How do you all know so much about programming languages?! :P

2. So you want to drop the feature to only show experiments that can still give you something. Instead the mod will show every available experiment at that place and time and the player has to gauge the usefulness of running them by checking the bar next to them?

1. I do because that is what I studied and what I am doing to make a living. :) But I guess that question was more in jest. :)

2. The proposed change will not affect what is displayed, it will only change the warp stopping behavior. Warp will only be stopped if any of the buttons in the Here and Now window is clickable.

Link to comment
Share on other sites

9 minutes ago, canisin said:

1. I do because that is what I studied and what I am doing to make a living. :) But I guess that question was more in jest. :)

2. The proposed change will not affect what is displayed, it will only change the warp stopping behavior. Warp will only be stopped if any of the buttons in the Here and Now window is clickable.

1. Or out of desperation - I took a look into Roverdude's code for his own HarvesterModule - I gave up pretty quickly ...

2. Uuuhh!

Link to comment
Share on other sites

On 6/5/2017 at 9:43 AM, canisin said:

This will mean that warp will be stopped if there are runnable experiments, rather than incomplete experiments!

This is a good idea, but ideally it should be a configurable option, because the player may want to be notified of every possible experiment, even ones that have already been run.  There have been times when I've discarded a result from a common situation (e.g. flying over grasslands) to re-do the experiment in a more-elusive situation (e.g. flying over badlands).  I wouldn't want to miss the badlands opportunity just because I already have grasslands data stored in my goo pod or whatever.

Link to comment
Share on other sites

4 hours ago, Wyzard said:

This is a good idea, but ideally it should be a configurable option, because the player may want to be notified of every possible experiment, even ones that have already been run.  There have been times when I've discarded a result from a common situation (e.g. flying over grasslands) to re-do the experiment in a more-elusive situation (e.g. flying over badlands).  I wouldn't want to miss the badlands opportunity just because I already have grasslands data stored in my goo pod or whatever.

Well, you are the boss! :D Please let me know if I can be of any help.

Link to comment
Share on other sites

Hmmmm.  In addition to people posting about when Here&Now should pop, I'm also getting emails.  Guys - chill.

What I am actually working on is this

body-info-popup.png

So once there was this add-on called VOID but the developer went.  I tried to take it over but MS Visual Studio didn't like the code and I wasn't installing Xamarin.  Any how I've got used to KER's HUD but the one thing I really miss is the "Body Information" panels VOID used to have.  In the next [x] Science! release, if you hover the mouse over the Here&Now window as shown in the picture, you get Space High, Flying High and Atmosphere Depth.

Previously the pop-up just said how much science you had stored, that's still there at the bottom.

ALSO - I've got the checklist window to save it's settings a bit more often.  I can's see anything really wrong with it.  [x] Science! is saving settings when the game scene changes.  Now it also saves settings when you use the filter buttons at the bottom of the window or type a text filter or compact the window.

 

OK - popping Here&Now for experiments, you guys...  I will look at the issue but I'd be worried about Kerbal experiments - that is CrewReport, EVAReport, SoilSample.  Actually CrewReport could be OK.  EVA+Soil need a Kerbal to go EVA so I artificially add them and they are always greyed-out.  I haven't looked at your code so maybe you dealt with this, or maybe its OK anyway.

 

BTW I'm not releasing this yet.  Next I'm going to get the Here&Now window to save it's position and visibility.

Link to comment
Share on other sites

1 hour ago, Z-Key Aerospace said:

Hmmmm.  In addition to people posting about when Here&Now should pop, I'm also getting emails.  Guys - chill.

What I am actually working on is this

body-info-popup.png

So once there was this add-on called VOID but the developer went.  I tried to take it over but MS Visual Studio didn't like the code and I wasn't installing Xamarin.  Any how I've got used to KER's HUD but the one thing I really miss is the "Body Information" panels VOID used to have.  In the next [x] Science! release, if you hover the mouse over the Here&Now window as shown in the picture, you get Space High, Flying High and Atmosphere Depth.

Previously the pop-up just said how much science you had stored, that's still there at the bottom.

ALSO - I've got the checklist window to save it's settings a bit more often.  I can's see anything really wrong with it.  [x] Science! is saving settings when the game scene changes.  Now it also saves settings when you use the filter buttons at the bottom of the window or type a text filter or compact the window.

 

OK - popping Here&Now for experiments, you guys...  I will look at the issue but I'd be worried about Kerbal experiments - that is CrewReport, EVAReport, SoilSample.  Actually CrewReport could be OK.  EVA+Soil need a Kerbal to go EVA so I artificially add them and they are always greyed-out.  I haven't looked at your code so maybe you dealt with this, or maybe its OK anyway.

 

BTW I'm not releasing this yet.  Next I'm going to get the Here&Now window to save it's position and visibility.

KER has a body information panel though? Doesn't list jets or oceans, unless there is options for those under edit.

screenshot3.png

Link to comment
Share on other sites

2 hours ago, strudo76 said:

KER has a body information panel though? Doesn't list jets or oceans, unless there is options for those under edit.

How on earth did I miss that?  Oh well I coded it now.  Actually I like mine - don't need to open a whole new window just to find one value.

Now this...

here-and-now-settings.png

Actually this causes me a problem.  What I really want to do is close the window and have it pop-up when something needs doing.  That means running in the background when the window is closed which we don't do.

I think for the moment I'll leave it as it is.  Apart from anything else, as people have mentioned, having both windows open and the fact that everything is running in the main thread means that [x] Science! does cause frame-rate stutter.

I like the fact that closing the windows prevents stuttering.

Link to comment
Share on other sites

5 hours ago, Z-Key Aerospace said:

How on earth did I miss that?  Oh well I coded it now.  Actually I like mine - don't need to open a whole new window just to find one value.

Actually this causes me a problem.  What I really want to do is close the window and have it pop-up when something needs doing.  That means running in the background when the window is closed which we don't do.

I think for the moment I'll leave it as it is.  Apart from anything else, as people have mentioned, having both windows open and the fact that everything is running in the main thread means that [x] Science! does cause frame-rate stutter.

I like the fact that closing the windows prevents stuttering.

I agree. Having it available as a quick tooltip will be very convenient. Especially if the Here&Now window visibility and position is preserved.

Does the "Suppress Experiment" option stop the stutter. If not, something that might be very handy is an option that stops the core function of the mod, but leaves the window open, with something the makes it obvious that the Here&Now feature isn't currently active. I usually close the window to prevent the stutter when I don't need it so much, but often forget to open it again until I've missed multiple science opportunities.

Link to comment
Share on other sites

This issue is slowly driving me insane!

I keep getting a message New situation: in space near xxx

and it drops me out of time warp and there is nother there!!!!!!!!! I just literally keeps stopping my time warp every couple seconds if that!

I have to turn off science here and now.  Can someone please tell me what is causing this and how I can either get science from it or just tell it to stop killing my timewarp unless there is real science to be gotten!!!!!

Thx

 

 

Link to comment
Share on other sites

OK, I'm planning on releasing a new version.  Gonna start testing tonight.

I've done...

Saving settings more often.

  • When you type a filter
  • When you change the selected filter
  • When you minimise the window

Added visibility and position settings to Here and Now

Added buttons to Here and Now

Added mouse-over pop-up to Here and Now with body information

New single icon mode.  Right click opens Here and Now.

If using both icons then right-click mutes music.

Setting - Start with muted music

x-science-right-click.png

 

 

Link to comment
Share on other sites

@Z-Key Aerospace I can't wait the new release and I'm so excited.

Have you tried solving the problem with the game stuttering while [x] science pop-up window is opened or when changing from one biome to another?

Keep up the good work man! :rolleyes:

 

On 16.06.2017 at 5:12 PM, strozyk85 said:

In version 1.3 I'm experiencing stutters every few seconds while the x-science windows are open. I've also tested this on clear instal with just x-science installed and it still happens. In 1.2.2 I didn't have this problem.

edit: I've turned off 'debris check' and it didn't help. When the x-science UI is closed, everything is ok but when it's opened I get stuttering every 5-10 seconds.

 

 

Edited by strozyk85
Link to comment
Share on other sites

20 hours ago, strozyk85 said:

Have you tried solving the problem with the game stuttering while [x] science pop-up window is opened or when changing from one biome to another?

Get a faster box!

I removed the coroutines that were making the system _seem_ smoother.  I kept getting people complain about the occasional exception that would be thrown up.  Most often it would be when exiting KSP.  Like almost the last line in the logfile.  It seemed to me that if the last [x] Science! update took too long then its coroutine just got killed because Unity didn't want to wait for it any longer.

Now that we have the Here&Now window it seems to me that it is a good thing that we aren't on a separate thread because otherwise we could zoom through loads of biomes before we get a chance to stop time-warping.  However I think that although [x] Science is pretty efficient all the extra stuff it does now is becoming a bit more of a burden.

I have an idea that maybe we could add new update types for loaded and unloaded vessels.  So KSP has all vessels in its save file.  It makes them live when they are within a couple of kilometres of the camera - loads them into RAM in a different format.  [x] Science! works by being as dumb as bricks.  If it ever goes wrong it fixes its self next update.  It is really uncomplicated like that and it means it is not to difficult to maintain.  Essentially,  it just brute-forces that save file every update.

However things _are_ getting stretched and I'd like to speed things up if I can.  If I walk the save file for all vessels and stash the results then most of the time I ought to be able to just zoom through the loaded vessels and add the science total to the unloaded ones.  Most changes should happen on the tiny number of loaded vessels, so those updates will be faster.  Should be easy!  No Problem!  Small matter of programming!

I think the real issue will be if I can hook enough events to be sure nothing has happened to an unloaded vessel.  That and also the issue of loaded and unloaded vessels swapping places as they go in and out of range.   All comes down to managing lists.

In the mean time - get a faster box.  Actually managing your total launched part count will help.  Not having masses of science instruments that you don't use.  Ditching Kopernicus mods you don't really need.  That kinda thing will help.

I like having my space junk in orbit.  It makes me launch better, but that stuff can really add up.  Try going through your debris and pruning that stuff.  There is a [x] Science! setting to discount debris but just deleting the stuff is even better.

My personal priorities for [x] Science! are to add some stats to the tracking station scene and to try and change the way [x] Science! handles completed experiments.  At the moment completion of experiments is in-lined all over the place and so having a setting to say an experiment goes green at 90% collected or at 99% collected or at <1MIT remaining is just not feasible.  Not something I'm interested in really but like the single button/2 button thing people are asking for it.

 

Edited by Z-Key Aerospace
Spelling mistake
Link to comment
Share on other sites

18 minutes ago, Z-Key Aerospace said:

Essentially,  it just brute-forces that save file every update.

18 minutes ago, Z-Key Aerospace said:

If I walk the save file for all vessels and stash the results then most of the time I ought to be able to just zoom through the loaded vessels and add the science total to the unloaded ones.  Most changes should happen on the tiny number of loaded vessels, so those updates will be faster.

I'm surprised that unloaded vessels are considered at all; I didn't think [x] Science looked at anything besides the current active vessel.  An unloaded vessel isn't going to perform any experiments, and AFAIK its motion doesn't trigger the "here and now" thing, so I don't see what'd need to be checked or updated on it every frame.

I haven't looked at the code so I don't know how it's structured, but it seems to me like there are several separate tasks that can probably be done at different times, in response to different events:

  • Building the big science list, figuring out which experiments are available and the completion level for each.  Only needs to be done when the player loads a save, performs an experiment, or unlocks a new science part in the tech tree.  The rest of the time, this information is constant and can be cached.  It's also the same for all vessels, so it can be shared between them.
  • Filtering the big science list to figure out which experiments are relevant to the active vessel, for "here and now" purposes and for the "available on this vessel" option in the science list window.  Only needs to be done when the player switches to a new vessel or when the active vessel's part count changes; the rest of the time, it can be cached.
  • Checking the active vessel's situation against available experiments, for "here and now" and the "available right now" option in the science list.  Needs to be done every frame, but this should be pretty quick since the available experiment info is cached.

Again, I haven't looked at the code; maybe you have things split up this way already.  But if you're re-doing all the above work in every frame, you might be able to get some big savings by splitting things up and caching the information that only changes in response to certain events.

18 minutes ago, Z-Key Aerospace said:

At the moment completion of experiments is in-lined all over the place and so having a setting to say an experiment goes green at 90% collected or at 99% collected or at <1MIT remaining is just not feasible.

Back when I first tried this mod in 1.2, I uninstalled it because the science list showed a bunch of Mun surface experiments (IIRC) at 99% but not quite finished, because, presumably, it was still possible to get a tiny amount of science from each.  I wasn't going to spend hours (and funds) doing another Mun landing in every biome just to get that last 0.1 science (or whatever it was), so those 99% experiments were basically permanent clutter in the list, and it seemed likely that I'd accumulate more of them from other planets/moons for the same reason.

I don't know if things have changed since then, and I haven't done any Mun landings in 1.3 yet (haven't played much in the past few weeks).  I've found that the "here and now" feature is useful enough that I'll keep using this mod even if the science list window is full of 99% clutter.  But, yeah, it'd be helpful to have a configurable threshold for when an experiment is considered "done".

Link to comment
Share on other sites

On 29/06/2017 at 3:13 PM, Wyzard said:

I'm surprised that unloaded vessels are considered at all; I didn't think [x] Science looked at anything besides the current active vessel.  An unloaded vessel isn't going to perform any experiments, and AFAIK its motion doesn't trigger the "here and now" thing, so I don't see what'd need to be checked or updated on it every frame.

I assure you [x] Science! isn't doing anything it doesn't need to do.

Link to comment
Share on other sites

5 hours ago, Z-Key Aerospace said:

I assure you [x] Science! isn't doing anything it doesn't need to do.

I can believe that; I was just surprised that it's necessary to look at unloaded vessels.  Like I said, I haven't looked at the code.  :wink:

Link to comment
Share on other sites

Could you exclude Station Science experiments from the list? These are supposed to be executed while docked to a station and work differently from standard ones.

I've done it for myself (still on 1.2.2) but I think it makes sense to include it for everybody. This needs to be added to science.cfg:

		// --- Station Science ----------------------------
		// [x] Science should ignore StationScience
		plantGrowth =			AvoidAll
		bioproducts =			AvoidAll
		eccentricKuarqs =		AvoidAll
		retrogradeKuarqs =		AvoidAll
		progradeKuarqs =		AvoidAll
		kuarqsBioproducts =		AvoidAll

@tomf I hope you don't mind this as the current mod maintainer:)

Link to comment
Share on other sites

I made a request a few weeks ago that might have been missed and I'm hoping that you can look into it now.

I often launch probes that are never going to return to Kerbin, e.g. a mapping probe to the moons of Jool. I will probably include a Gravioli detector.

If I try to use the here and now window it stops the warp at every biome transition even after I have transmitted the gravity data from that biome even though no more science can be transmitted. I still want it to kill the warp when we cross over one of the more elusive biomes that haven't been gravity scanned yet.

Can the here and now window have 2 modes, one that stops warp for any possible science and one that only stops the warp if you can do an experiment that will return transmittable data.

 

 

15 hours ago, Raphaello said:

 

@tomf I hope you don't mind this as the current mod maintainer:)

No problem at all.

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