Jump to content

[1.12.x] ResearchBodies V1.13.0 (15th May 2022)


JPLRepo

Recommended Posts

4 hours ago, rasta013 said:

@JPLRepo As requested - raising the issue mentioned in the Contract Configurator thread re: an NRE and the death of Mission Control.  

Here's the error itself extracted from the log files

  Reveal hidden contents

[EXC 23:09:22.851] InvalidOperationException: Collection was modified; enumeration operation may not execute.
    System.Collections.Generic.List`1+Enumerator[Contracts.Contract].VerifyState ()
    System.Collections.Generic.List`1+Enumerator[Contracts.Contract].MoveNext ()
    ResearchBodies.ResearchBodies.CheckContracts ()
    EventVoid.Fire ()
    MissionControlBuilding.OnClicked ()
    SpaceCenterBuilding.EnterBuilding ()
    SpaceCenterBuilding.OnLeftClick ()
    SpaceCenterBuilding+<OnMouseTap>c__Iterator98.MoveNext ()

And a link for the output_log and KSP.log0 files generated during that crash.

I also opened the issue on the github repo as well and included the zip file of the logs.  Thanks for the help!

Thanks for doing that... Ironic I was working my way through the code just 2 days ago? marking it all up with comments so I figure out what is going on in the code. Then I plan to re-write and standardize as much of it as possible. Already found a number of areas for improvement. Of course, this doesn't help getting a quick fix out for issues like this.
This issue is being caused by ResearchBodies scanning the Offered Contracts list looking for Contracts offerred for CelestialBodies that are yet to be discovered and Declining them.
Two things with this:-
1) In programming terms it is iterating a list that could change whilst it is doing so.... Which is what causes your error above... The Contracts List changed whilst it was working through the list. So this should be fixed.
2) It actually declines any contracts it finds - which as I understand it means you take a reputation hit depending on your game settings. It would be better if they were withdrawn, or even better yet, never got generated in the first place. So I am exploring both of these in my code re-vamp.
As I don't know how long it's going to take me to work through the code (probably a couple of weeks given how time poor I am at the moment with real life work) if you get this error a restart of KSP should resolve it... Upon restart check the contracts offerred, or if Mission Control is still bugged out bring up the  Debug window ALT-F12 and go through the contracts, re-generate, delete contracts until it starts working again.
 

Link to comment
Share on other sites

hope u get it fixed. realy wanted to use this but with it conflicting with contract config contract packs it was causeing my missiong controll to get stack locked and would have to debug to clear stack lock then remove reearch bodies to get it working again.

Link to comment
Share on other sites

Just now, sidfu said:

hope u get it fixed. realy wanted to use this but with it conflicting with contract config contract packs it was causeing my missiong controll to get stack locked and would have to debug to clear stack lock then remove reearch bodies to get it working again.

I have a fix already... as a work-around... I wanted to completely re-do the code.. but if this is causing people enough issues I'll look to do a quick patch fix release in the next day or two.

3 hours ago, rasta013 said:

 

When I think of the ability to go and look for and find system bodies I always remember the planets out to Saturn have been known for thousands of years without the aid of a telescope and were finally recognized as other system bodies like Earth by someone with a simple quill and parchment doing some math.  The more distant bodies required an investment of time measured in years and predictive math combined with observations.  Perhaps the approach could be to require a more intricate method of discovery for anything beyond the immediate neighbors.  For instance, Eve and Duna/Ike could be found with a simple method like what is already used but anything beyond that (Moho/Dres/Jool(and moons)/Eeloo/other planet packs) would require an alternative method.

I could see it working something like this :

  • A contract or voluntary project could start the search for a new body
  • A search requires investment: time and funds, maybe even science as your researchers are occupied in the hunt. The telescope involved should be unavailable during this time.
  • Step 1: Locating where to look. Could(should?) be time based requiring investment of resources - possibly being able to go faster or slower depending on levels of investment
  • Step 2: A scan is initiated with further need of resources as above, again with possible variables available to increase/decrease time requirements
  • Step 3: Discovery!  This opens up the ability to travel to the body and awards the initial discovery science
  • Optional: More contracts/voluntary research to discover more about the body.  We learned a LOT about the planets by simply observing them

This would serve as a way of giving early and easy means of discovering the immediate neighbors without forcing the process on someone while still providing a deeper framework for later play that helps expand on the system.  If possible, any deeper system that is added should be able to be turned off allowing the simple method to be used for any system body to satisfy those who would not enjoy it since that was a factor in the past (and from some comments still is).

So this was my first brainstorm session after waking up so it might not be entirely coherent... :D

Thanks for the ideas, pretty similar to what I was thinking.. Except Step 3 is further expanded depending on how far away the body is with further scanning and picture taking contracts that gradually reveal the details of the body (progressive textures) I'm thinking of introducing these and using the telescope in this mod along with TST telescopes, DMOS scanners, SCANsat, etc to gradually reveal more details of the body. This could all be driven by a contracts system.. I'm looking for any more ideas from others? Now's your chance to offer suggestions.

Link to comment
Share on other sites

well if u can input llocking misssion control building where u caant even go in it or go to another building unles u clear the input lock then yeah its a big bug.

if u do a quick fix then u can spend all time u need to redo the code

Link to comment
Share on other sites

2 minutes ago, sidfu said:

well if u can input llocking misssion control building where u caant even go in it or go to another building unles u clear the input lock then yeah its a big bug.

if u do a quick fix then u can spend all time u need to redo the code

I will do a quick fix then. Can't say if it will be today or tomorrow or the next. Pretty busy with real life work this week. But before the weekend for sure.

Link to comment
Share on other sites

I can't seem to get this to work in either my modded or un-modded install. I start a new career, choose "Medium", upgrade the tracking station, launch the telescope in a 253x263km polar orbit, and then target Eve, point it towards the target marker, and click "Research Bodies", then the tracking button, but it always gives an error message about needing to be in space or "Oups, (sic) there is nothing new here." or "Result: VOID", despite them showing up as unknown in the zoomed-out and tracking station view. The button in the main SpaceCentre view also gives no clickable options. Only other mod is module manager 2.6.24 (same happens in my other save with 2.6.25).

Duna seems to work, despite being further away. Eve, Moho, Dres, and Jool do not.

Logfile: https://www.dropbox.com/s/t3kbcx8gq7o4wrv/UnresearchableBodies.log?dl=0

Definitely agree that the research of bodies needs to be more than clicking. Perhaps research programs from the ground to discover the body that take time to finish, and the telescope is used for more-detailed, higher levels of information about the body? Can you dynamically construct the information revealed about a body, like its name, orbit, moons, and reveal them one at a time as a research program, or even update information in one of the encyclopaedia pages, as more research is done (possibly including probes?).

Edit: I watched the video on the first page, and realized that it is a matter of clicking like mad to find the bodies. Not sure why this gameplay choice was made, but maybe I have not clicked enough times. Definitely a gameplay feature that is non-obvious and should be part of your overhaul.

Edited by larkvi
Link to comment
Share on other sites

1 hour ago, sidfu said:

well if u can input llocking misssion control building where u caant even go in it or go to another building unles u clear the input lock then yeah its a big bug.

if u do a quick fix then u can spend all time u need to redo the code

 

1 hour ago, JPLRepo said:

I will do a quick fix then. Can't say if it will be today or tomorrow or the next. Pretty busy with real life work this week. But before the weekend for sure.

Just to mention this and it's not ideal but...

The only time it actually locks up the game requiring a restart/debug menu frenzy is when you actually try to enter the building itself.  Until then, all is well.  As a result, the work around I'm using is CapCom.  This allows me to browse/accept contracts without any of the locking errors occurring.  Sure it means another mod but it works well and frankly CapCom is really quite nice anyway.  Particularly handy in acquiring contracts in flight without having to go back to the KSC plus it shows you all the same info you get in Mission Control...just a thought.

Link to comment
Share on other sites

1 minute ago, rasta013 said:

 

Just to mention this and it's not ideal but...

The only time it actually locks up the game requiring a restart/debug menu frenzy is when you actually try to enter the building itself.  Until then, all is well.  As a result, the work around I'm using is CapCom.  This allows me to browse/accept contracts without any of the locking errors occurring.  Sure it means another mod but it works well and frankly CapCom is really quite nice anyway.  Particularly handy in acquiring contracts in flight without having to go back to the KSC plus it shows you all the same info you get in Mission Control...just a thought.

i worded that wrong. its not locking the game it is input locking it. input lock can be cleared by opening debug and clearing it but u still wont beable to go into the building. useing the clear input lock is also a good way to fix the bug where the camrea gets stuck close to the buildings.

Link to comment
Share on other sites

Is this mod automatically compatible with all the planet packs or do they have to be added in the config? If so, does a mod that changes the Kerbol to not the "sun" (like galactic neighborhood, the "sun" is the center of the orbits always as I remember, so Kerbol is no longer that body) mean that we have to "discover" Kerbol?

Also, can you put that info up on the first page?

Edited by Storywalker4
Link to comment
Share on other sites

14 minutes ago, Storywalker4 said:

Is this mod automatically compatible with all the planet packs or do they have to be added in the config? If so, does a mod that changes the Kerbol to not the "sun" (like galactic neighborhood, the "sun" is the center of the orbits always as I remember, so Kerbol is no longer that body) mean that we have to "discover" Kerbol?

Also, can you put that info up on the first page?

There is no Kerbol in the Game - only on the Forums is it called that. In the game it is called "The Sun"
It is better if the mod has a config file, but if it does not it should still work with ResearchBodies as ResearchBodies adds default values for any bodies that it has no config for.
ResearchBodies works fine with Kopernicus and any planet mod packs. Pretty sure it says that in the OP, but I will double check. No it didn't but it does now.
 

30 minutes ago, rasta013 said:

 

Just to mention this and it's not ideal but...

The only time it actually locks up the game requiring a restart/debug menu frenzy is when you actually try to enter the building itself.  Until then, all is well.  As a result, the work around I'm using is CapCom.  This allows me to browse/accept contracts without any of the locking errors occurring.  Sure it means another mod but it works well and frankly CapCom is really quite nice anyway.  Particularly handy in acquiring contracts in flight without having to go back to the KSC plus it shows you all the same info you get in Mission Control...just a thought.

Nasty... I will fix tonight when I can.
Assume there are other log messages associated with the inputlock blocking trying to enter the building. But from what I saw yesterday the root cause I know and have a fix for. Assume it is then breaking something else that is causing the issue trying to enter the building.

1 hour ago, larkvi said:

I can't seem to get this to work in either my modded or un-modded install. I start a new career, choose "Medium", upgrade the tracking station, launch the telescope in a 253x263km polar orbit, and then target Eve, point it towards the target marker, and click "Research Bodies", then the tracking button, but it always gives an error message about needing to be in space or "Oups, (sic) there is nothing new here." or "Result: VOID", despite them showing up as unknown in the zoomed-out and tracking station view. The button in the main SpaceCentre view also gives no clickable options. Only other mod is module manager 2.6.24 (same happens in my other save with 2.6.25).

Duna seems to work, despite being further away. Eve, Moho, Dres, and Jool do not.

Logfile: https://www.dropbox.com/s/t3kbcx8gq7o4wrv/UnresearchableBodies.log?dl=0

Definitely agree that the research of bodies needs to be more than clicking. Perhaps research programs from the ground to discover the body that take time to finish, and the telescope is used for more-detailed, higher levels of information about the body? Can you dynamically construct the information revealed about a body, like its name, orbit, moons, and reveal them one at a time as a research program, or even update information in one of the encyclopaedia pages, as more research is done (possibly including probes?).

Edit: I watched the video on the first page, and realized that it is a matter of clicking like mad to find the bodies. Not sure why this gameplay choice was made, but maybe I have not clicked enough times. Definitely a gameplay feature that is non-obvious and should be part of your overhaul.

I am not sure at all what is going on for you... Your log looks fine, no errors, etc.
You said you can find Duna? but not Eve? All I saw in your log was you found Ike.
Are you absolutely sure you are pointing the telescope at Eve within 6%? and you say your orbit is above 250K... So I am not sure why it's not working for you.

Edited by JPLRepo
Link to comment
Share on other sites

@JPLRepo New small functionality bug to report found during testing...

Not a code error this time...instead, the researchbodies.cfg in the save folder doesn't get reverted in case you go backwards after doing an initial discovery.  This of course causes the loss of science for discovery.  The bodies remained discovered and able to be researched after you revert a save game whether through a revert after launch for some reason or more likely, if you go to an older save game which is how I found this in the first place.  Will also open this up on GitHub since this is not a game breaking bug and I have no idea what kind of back flips you might have to go through to change this operation since I imagine it will require checking and re-checking the .cfg file in some shape form or fashion.

Link to comment
Share on other sites

14 minutes ago, rasta013 said:

@JPLRepo New small functionality bug to report found during testing...

Not a code error this time...instead, the researchbodies.cfg in the save folder doesn't get reverted in case you go backwards after doing an initial discovery.  This of course causes the loss of science for discovery.  The bodies remained discovered and able to be researched after you revert a save game whether through a revert after launch for some reason or more likely, if you go to an older save game which is how I found this in the first place.  Will also open this up on GitHub since this is not a game breaking bug and I have no idea what kind of back flips you might have to go through to change this operation since I imagine it will require checking and re-checking the .cfg file in some shape form or fashion.

Thanks... I have plans to do away with that file... and move the persistent data (save data) into the persistent.sfs file, and quick saves, etc. Which would resolve that issue.

Edited by JPLRepo
Link to comment
Share on other sites

2 hours ago, JPLRepo said:

Thanks... I have plans to do away with that file... and move the persistent data (save data) into the persistent.sfs file, and quick saves, etc. Which would resolve that issue.

Cool good to know!

Had another idea/suggestion that may or may not be entirely impossible but figured I'd bring it up since I just experienced it and it reminded me of this quirk - which have always nagged at me since I know of the impossibility they represent but I have no idea how hard it would be, if even possible, to make work in game.  

Is there anyway to make Kerbin get in the way of the telescope?  (and) Is there anyway to have bodies be more difficult/impossible to discover when looking in the direction of the sun?

 

Edited by rasta013
Line break hell...
Link to comment
Share on other sites

On 26/05/2016 at 4:37 PM, rasta013 said:

Cool good to know!

Had another idea/suggestion that may or may not be entirely impossible but figured I'd bring it up since I just experienced it and it reminded me of this quirk - which have always nagged at me since I know of the impossibility they represent but I have no idea how hard it would be, if even possible, to make work in game.  

Is there anyway to make Kerbin get in the way of the telescope?  (and) Is there anyway to have bodies be more difficult/impossible to discover when looking in the direction of the sun?

 

Are you saying the telescope sees through Kerbin? IE: it can discover and research a body when Kerbin is between the telescope and that body?

In the direction of the sun: possibly. Will add that into the mix for the whole discovery expansion piece.

Link to comment
Share on other sites

3 hours ago, JPLRepo said:

Are you saying the telescope sees through Kerbin? IE: it can discover and research a body when Kerbin is between the telescope and that body?

In the direction of the sun: possibly. Will add that into the mix for the whole discovery expansion piece.

It certainly seems that way.  I'll double check it again in a pure test and with my entire mod set to see if it's working the same way in both setups but yesterday when I brought that up I had nailed Neidon and if Kerbin wasn't in the way then I certainly picked it off through the upper atmosphere LOL.  It may have been just a visual thing on my part so will test it deeper and report back.

Link to comment
Share on other sites

Whilst testing my 'fix' for the broken mission control issue I stumbled into another issue with regard to Kopernicus and Sigma Binaries.
Causing you to have trouble "discovering" bodies. Which I think a few posts back people were mentioning they were having issues with discovery. I think it's linked.
I know this is an edge case, but more and more people are using Kopernicus. So I have been working on fixing that as well before I release a patch.
Hopefully will have something in the next day or two and can release a patch.

Link to comment
Share on other sites

@JPLRepo What's this issue with Kopernicus you speak of? I just came here to ask you if it's normal to be hard to find some bodies and if it's possible to find other bodies by chance. What I mean is, I was looking at Eve and found Tekto a moon from OPM and I was unable to find Gilly, until searching form Urlum (which I couldn't find). I was using MJ to align with the targets. Everytime I found a body that wasn't what I was tageting they were kind off aligned.

Oh and even for Minmus, I had to spam the research buttom a little. Anyway, this is a great mod nevertheless and I'm having a great time with it!

Thanks!

Link to comment
Share on other sites

42 minutes ago, VaPaL said:

@JPLRepo What's this issue with Kopernicus you speak of? I just came here to ask you if it's normal to be hard to find some bodies and if it's possible to find other bodies by chance. What I mean is, I was looking at Eve and found Tekto a moon from OPM and I was unable to find Gilly, until searching form Urlum (which I couldn't find). I was using MJ to align with the targets. Everytime I found a body that wasn't what I was tageting they were kind off aligned.

Oh and even for Minmus, I had to spam the research buttom a little. Anyway, this is a great mod nevertheless and I'm having a great time with it!

Thanks!

It's not dealing with Sigma Binaries and any planet packs that use barycenter (Kopernicus setting).
I am working on adding a bit more information as well:
63kiL4E.png

EDIT: The plan is to greatly expand the Discovery feature to be a bit more useful and more gameplay mechanics... like contracts. I also think clicking a button needs to be done away with. Perhaps to initially detect the planet (like above). and then a research plan that requires you to invest resources such as time, money, science points and pointing a telescope at it for a period of time to eventually discover the body and further research to uncover it's orbit and pictures with space telescopes and scanners to gradually build up the picture of it (so you don't automatically get a high-res planet in the tracking station/map view, etc.
Also an idea: upgrades to the telescopes, or combining forces of two or more telescopes should be able to increase range as well.

Edited by JPLRepo
Link to comment
Share on other sites

10 minutes ago, VaPaL said:

Cool! I like the ideas! Do you plan some sort of integration with TST?

It already does... But yes - I plan to expand that integration. As well as look to integrate with Dmagic's mods (DMOS, SCANsat) and a few others.

Link to comment
Share on other sites

A couple things (I know you have a lot on your plate with this mod already)

  • CactEye is another telescope mod to consider supporting; Angel-125 ran it for a while, but it recently underwent a change in management
  • Galactic Neighborhood was a mod simon56modder was hoping to integrate with at some point (not sure if he ever achieved that). It's run by Sigma88, of SigmaBinary fame. It's basically a super mod that achieves compatibility with every major (and minor) planet pack out there, and includes Sigma Binary. Yeah. Good luck, Commander.:D

 

22 hours ago, VaPaL said:

Cool! I like the ideas! Do you plan some sort of integration with TST?

I believe he knows the guy who works on TST quite well actually...

Link to comment
Share on other sites

41 minutes ago, Deimos Rast said:

A couple things (I know you have a lot on your plate with this mod already)

  • CactEye is another telescope mod to consider supporting; Angel-125 ran it for a while, but it recently underwent a change in management
  • Galactic Neighborhood was a mod simon56modder was hoping to integrate with at some point (not sure if he ever achieved that). It's run by Sigma88, of SigmaBinary fame. It's basically a super mod that achieves compatibility with every major (and minor) planet pack out there, and includes Sigma Binary. Yeah. Good luck, Commander.:D

 

I believe he knows the guy who works on TST quite well actually...

Cacteye - I'm not going to go out of my way to integrate ResearchBodies with this mod. But if they want to make changes to their mod to support ResearchBodies then I will support any queries. But my focus will be on itegrating this with TST.
Galactic Neighborhood - Should be supported in the next version given I am fixing RB to work with Kopernicus properly and support barycenter and sigma binaries it "should" work. Anyone willing to be my QA tester? Send me a PM.

Link to comment
Share on other sites

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