Jump to content

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


JPLRepo

Recommended Posts

On 22/07/2017 at 5:34 PM, JPLRepo said:

 

How far away are the planets? You say you have planet packs installed. There is a range.. so perhaps that is the issue as I never tested with planet packs. only stock.
The research buttons (old way) is enabled in sandbox because there are no contracts. That method is not available in career mode.
I would need more info. Like what packs you have installed, what planets you have discovered, and well, as per the OP, the KSP log and ResearchBodies log.

Do the research buttons still exist in science mode?

 

Im having some difficulties in actually finding planets without contracts

Link to comment
Share on other sites

@JPLRepo I'm not sure how this is supposed to exactly behave in sandbox mode, but it seems weird. I am trying to install OPM and want to make sure that all the planets are loading properly and playing nice with sigma binary and such before I start a career, so I am checking things in sand box. I only see some of the planets in the tracking station though, not all of them. Duna and Moho are missings, and so are neidon and urlum. When I remove research bodies the whole system is there as it should be. Is this something I should be concerned about? I will not that some of those planets do show up as "researched" in the observatory screen, like duna. 

Edited by Errol
Link to comment
Share on other sites

For those having issues with science/sandbox - Yeah as I personally don't play with this mod in those game modes, it's highly possible a few things are not quite right. The focus of the past 6+ months has been expanding and getting career mode working with the contracts, etc. I'll put it on my list. But as the OP suggests, this mod really is designed to work in career mode games.

Link to comment
Share on other sites

Hello. Getting a funny shine effect with one of my planet mods when used with Research Bodies.

unknown.png

 

From what the user with this problem told me, RB greys out any undiscovered planets. This alters the textures and thus this horrible shine effect takes place. It would be great if this issue could be fixed because it is prevalent in every planet mod from the way I am seeing the problem.

I understand that you have attempted to fix this issue before, but I can say that it has, unfortunately, not been successful. I took a quick look at your github update for RB where you pointed towards "shininess". Yes, this is a planetary property but this is not the source of the problem. The colourmaps of planets with oceans contain an alpha channel, where the land is set to Alpha 1 and the ocean is set to Alpha 255. This means only the ocean is shiny, and the land is not. The way that RB goes about hiding the planets is incorrect such that the alpha channel of the texture is lost when the planet becomes visible again.

It would be great if you could look into this issue further, thank you.

Link to comment
Share on other sites

  • 2 weeks later...
On 12/24/2017 at 3:59 PM, MisterFister said:

AVC is reporting that I currently have v1.9.5 installed, but my [modmanager] clearly reports that I've installed v1.9.6.  Is this a .version issue?

Same here, still.  SpaceDock, CurseForge, and Github all are labeled 1.9.6, but the .version inside all three says 1.9.5.  Ockham's Razor suggests that it did in fact get updated, except for incrementing the version note in the .version?

Link to comment
Share on other sites

Hey guys,

Could someone give me a hand and explain how exactly you scan bodies with telescopes? I have one up in orbit (TB-75M), and can click the “Track Bodies” button to find a planet, but unless I am missing something obvious I have no way of “scanning” a body like the instructions on the first page of this thread say you should. As such my planets are all sitting at 0 or 10% (those at 10% are after completing a research contract or paying for the research in the observatory). 

Link to comment
Share on other sites

3 hours ago, MechBFP said:

Hey guys,

Could someone give me a hand and explain how exactly you scan bodies with telescopes? I have one up in orbit (TB-75M), and can click the “Track Bodies” button to find a planet, but unless I am missing something obvious I have no way of “scanning” a body like the instructions on the first page of this thread say you should. As such my planets are all sitting at 0 or 10% (those at 10% are after completing a research contract or paying for the research in the observatory). 

Do you have the Tarsier Space Technology mod installed?

If you do, can you target the planet?  If you can (and I presume you can for your 10% bodies), go to your scope, ensure you "control from here" the scope, and target the body (I use MechJeb or KER for this).  Open the scope's camera window (GUI) and zoom in.  Take a picture and transmit the science.

Link to comment
Share on other sites

6 hours ago, MechBFP said:

Hey guys,

Could someone give me a hand and explain how exactly you scan bodies with telescopes? I have one up in orbit (TB-75M), and can click the “Track Bodies” button to find a planet, but unless I am missing something obvious I have no way of “scanning” a body like the instructions on the first page of this thread say you should. As such my planets are all sitting at 0 or 10% (those at 10% are after completing a research contract or paying for the research in the observatory). 

Each "research a celestial body" contract will only raise a single planet's value by 10%.

The TB-75M in orbit is mostly useful for discovering bodies.  Put one in high orbit around Kerbin, then right-click on the telescope to pull up the Research Bodies contract.  Pointing at a celestial body (use Haystack or Distant Object Enhancement) and spamming the button will unlock the planet/moon.  After that I just use the Shift-F12 debug menu and sit in the Mission Control, accepting and completing the "Research a Celestial Body" contract 10x for each planet/moon that I want to get to 100%.  I never use the "research using a telescope" contract or bother going into the observatory UI.

Unfortunately, the "RBResearchBodyBehaviourRB" does not allow a value to be passed in and is hard-coded to only give you 10% completion per contract completion.    Otherwise, I'd submit a PR to have a more balanced contract system where you'd only need 1-4 contracts completed per celestial body (maybe with longer durations).

Link to comment
Share on other sites

2 hours ago, WuphonsReach said:

Each "research a celestial body" contract will only raise a single planet's value by 10%.

The TB-75M in orbit is mostly useful for discovering bodies.  Put one in high orbit around Kerbin, then right-click on the telescope to pull up the Research Bodies contract.  Pointing at a celestial body (use Haystack or Distant Object Enhancement) and spamming the button will unlock the planet/moon.  After that I just use the Shift-F12 debug menu and sit in the Mission Control, accepting and completing the "Research a Celestial Body" contract 10x for each planet/moon that I want to get to 100%.  I never use the "research using a telescope" contract or bother going into the observatory UI.

Unfortunately, the "RBResearchBodyBehaviourRB" does not allow a value to be passed in and is hard-coded to only give you 10% completion per contract completion.    Otherwise, I'd submit a PR to have a more balanced contract system where you'd only need 1-4 contracts completed per celestial body (maybe with longer durations).

The telescope contracts can be adjusted for length of time with a cfg file somewhere in the Research Bodies folder.

You could adjust to 1 day or half a second if you wish.   The default is 90 days (which, IMHO, think is too long, even with KCT 45 or even 30 days is better) then you don't have to spam the menu button.  One day per 10% is enough to launch a satellite contract to pay the next 10% :) .

Peace.

Link to comment
Share on other sites

@mod developers

Can you please explain where is code what affecting loading time? I mean makes loading extremly slow, i want to look into it and maybe make some workaround to prevend this. Maybe even make some options to disable part of mod just for make it loading again at normal speed. It could be helpfull if you can at least tell lines of code in files. Thank you.

Link to comment
Share on other sites

2 minutes ago, AlexALX said:

@mod developers

Can you please explain where is code what affecting loading time? I mean makes loading extremly slow, i want to look into it and maybe make some workaround to prevend this. Maybe even make some options to disable part of mod just for make it loading again at normal speed. It could be helpfull if you can at least tell lines of code in files. Thank you.

It's to do with how it's hiding the planets. If there was a way to make this less slow I imagine it would have been implemented. It's a shame as it's the reason I uninstalled this as I already have too many mods, but if I ever manage to scale down my mod list a bit I will definitely consider putting this back in.

Link to comment
Share on other sites

10 minutes ago, Pleb said:

It's to do with how it's hiding the planets. If there was a way to make this less slow I imagine it would have been implemented. It's a shame as it's the reason I uninstalled this as I already have too many mods, but if I ever manage to scale down my mod list a bit I will definitely consider putting this back in.

You can't be sure that there is no other ways to do this, at least i want to try and understand that. As programmer its actually a challenge for me. So i need just slight help to see what actual code doing this, and then try something to do with this.

Link to comment
Share on other sites

1 hour ago, AlexALX said:

You can't be sure that there is no other ways to do this, at least i want to try and understand that. As programmer its actually a challenge for me. So i need just slight help to see what actual code doing this, and then try something to do with this.

The solution would be to make changes to the stock game code. so the mod does not have to do what it does to work around how the stock game code works.

Link to comment
Share on other sites

31 minutes ago, JPLRepo said:

The solution would be to make changes to the stock game code. so the mod does not have to do what it does to work around how the stock game code works.

Is there any change to get this by telling ksp developers about this issue? In new patches or so. And still no any information about where this code located... Why you just can't tell me where it is so i can understand that finally?

Edited by AlexALX
Link to comment
Share on other sites

25 minutes ago, AlexALX said:

Is there any change to get this by telling ksp developers about this issue? In new patches or so. And still no any information about where this code located... Why you just can't tell me where it is so i can understand that finally?

I am a KSP developer.... it is not an issue with the stock code. and there is no likelihood of rewriting a large chunk of the stock code just for what this mod does. Doing that - may as well make the mod stock.

But that is not something I have anything to do with and not something I am paid to do.

The code is on github link in the opening post.

Link to comment
Share on other sites

Just now, JPLRepo said:

I am a developer....

The code is on github link in the opening post.

I understand that code is on github, i already downloaded it, but finding exact part in all this stuff can take much time, so everything what i ask is part of code (lines in file) what actually do this slow down, so i can debug and test different things with that code.

Link to comment
Share on other sites

26 minutes ago, JPLRepo said:

I am a KSP developer.... it is not an issue with the stock code. and there is no likelihood of rewriting a large chunk of the stock code just for what this mod does. Doing that - may as well make the mod stock.

But that is not something I have anything to do with and not something I am paid to do.

The code is on github link in the opening post.

Ok, i didn't saw your edited message when wrote previous comment. So you want to say that there is 100% no any other way to do this to speed up loading without modify stock code? If so, is there at least opportunity to disable/enable this mod in real-time, for example in KSP before scene change? So if i'm want just to test some craft or so i can start without this slow loading, and when i want go out of the kerbnit SOI then enable it. Or something like this. If it also possible to load it even without scene change it will just amazing (even with hang or so). And another thing - what exact feature do this slow down? Because i can separate mod to few parts: hiding planets, modify planet surface (gray textures), contracts. So if this is caused for example because of gray textures for planets then i can live without this feature if it will improve loading times.

And last thing - i can make russian translation for this mod, so if i'll do that, i can make PR into github?

Link to comment
Share on other sites

1 minute ago, AlexALX said:

Ok, i didn't saw your edited message when wrote previous comment. So you want to say that there is 100% no any other way to do this to speed up loading without modify stock code? If so, is there at least opportunity to disable/enable this mod in real-time, for example in KSP before scene change? So if i'm want just to test some craft or so i can start without this slow loading, and when i want go out of the kerbnit SOI then enable it. Or something like this. If it also possible to load it even without scene change it will just amazing (even with hang or so). And another thing - what exact feature do this slow down? Because i can separate mod to few parts: hiding planets, modify planet surface (gray textures), contracts. So if this is caused for example because of gray textures for planets then i can live without this feature if it will improve loading times.

And last thing - i can make russian translation for this mod, so if i'll do that, i can make PR into github?

no there isn't... it already does what it does on scene change as appropriate... however, disabling and enabling... not really... the planet changes possibly. but not the mapnodes changes. not without considerable difficulty.
the slow down - is because when the scene changes it must apply all the changes to the celestialbodies and the mapnodes. as I just said, it's possible. There already is debug code that does all this already that is not available in the released dll. but can be enabled with a compile directive.
PRs can be submitted to the Dev branch.

Link to comment
Share on other sites

40 minutes ago, JPLRepo said:

no there isn't... it already does what it does on scene change as appropriate... however, disabling and enabling... not really... the planet changes possibly. but not the mapnodes changes. not without considerable difficulty.
the slow down - is because when the scene changes it must apply all the changes to the celestialbodies and the mapnodes. as I just said, it's possible. There already is debug code that does all this already that is not available in the released dll. but can be enabled with a compile directive.
PRs can be submitted to the Dev branch.

Hm, i still not understand - can mod disable/enable hiding feature (what slow down loading) in KSP before change scene to flight or not? This should be actually very easy thing, i'm not asking disable it while flight but before that. Like to have some switch what you can press before launch vessel or go to tracking center. Why i want to have this feature? Its simple - i'm recording videos, and when i'm testing some vessels or do missions in kerbin SOI i simply don't need this mod to hide bodies because i don't even look for them in map view, but when i'm planning cross-planet mission and will record video of process - then i'll need enable mod and hide any undiscovered bodies. Right now if disable mod via moving mod to another directory outside of gamedata it will cause contracts loss.

Link to comment
Share on other sites

5 hours ago, AlexALX said:

Hm, i still not understand - can mod disable/enable hiding feature (what slow down loading) in KSP before change scene to flight or not? This should be actually very easy thing, i'm not asking disable it while flight but before that. Like to have some switch what you can press before launch vessel or go to tracking center. Why i want to have this feature? Its simple - i'm recording videos, and when i'm testing some vessels or do missions in kerbin SOI i simply don't need this mod to hide bodies because i don't even look for them in map view, but when i'm planning cross-planet mission and will record video of process - then i'll need enable mod and hide any undiscovered bodies. Right now if disable mod via moving mod to another directory outside of gamedata it will cause contracts loss.

Not without code changes.
But given what you just explained you want to do. Why don't you make a second copy of the vessel or save file with the mod off... or a second install of the game for what you are wanting to do and save yourself all the time required.

Link to comment
Share on other sites

13 hours ago, JPLRepo said:

Not without code changes.
But given what you just explained you want to do. Why don't you make a second copy of the vessel or save file with the mod off... or a second install of the game for what you are wanting to do and save yourself all the time required.

I assume that you mean code of mod, yes? I think i can do this myself somehow. As for second game or save - how time will be synced then with reseaching contracts? As i said reseach contracts will lost if i play without this mod. And as i'm playing career its not possible to do what you saying. So best solution would be just ability to turn on/off planet hidding before scene change when i wish.

Edited by AlexALX
Link to comment
Share on other sites

So i did few tests and... was very surprised that actually all this slow down makes part what changes colors/textures on planets. By disabling some parts of code i did track it - this slow down caused by ProgressiveCBMaps and not reseachbodies itself. When i disable this addon via moving folder or in code - everything loads again fast, orbits are hidden, but i can switch between planet  using tab (but planet name shows as "unknown object"), so i'll continue investigation and maybe make some solution for my needs..

Edited by AlexALX
Link to comment
Share on other sites

So i able to "fix" this slow loading by few lines of code and without any feature loss from this mod. Its not ideal but its working and now i have again 5 seconds of loading time instead of ~40. So this "100% impossible task" can be fixed by few hours of investigation and thinking. What exactly i did? Ok lets go...

All changes what i did was made in one file - ResearchBodies\ProgressiveCBMaps\CelestialBodyInfo.cs

Firstly i added simple log function inside public void setVisualLevel(int level) function, so it looks like:

 

		public void setVisualLevel(int level)
		{
			if (mesh == null)
				return;

            EVEWrapper.LogFormatted_DebugOnly("setVisualLevel "+level+" for "+Body.bodyName);

And after i run my KSP and started new game, i got next log:
 

Quote

[LOG 00:00:35.023] 1/30/2018 12:00:35 AM,ResearchBodies-PCBMWrapper,Success: True
[LOG 00:00:35.129] 1/30/2018 12:00:35 AM,ProgressiveCBMaps-EVEWrapper,setVisualLevel 6 for Sun
[LOG 00:00:35.133] 1/30/2018 12:00:35 AM,ProgressiveCBMaps-EVEWrapper,setVisualLevel 6 for Kerbin
[LOG 00:00:40.267] 1/30/2018 12:00:40 AM,ProgressiveCBMaps-EVEWrapper,setVisualLevel 6 for Mun
[LOG 00:00:45.491] 1/30/2018 12:00:45 AM,ProgressiveCBMaps-EVEWrapper,setVisualLevel 1 for Minmus
[LOG 00:00:46.980] 1/30/2018 12:00:46 AM,ProgressiveCBMaps-EVEWrapper,setVisualLevel 1 for Moho
[LOG 00:00:48.299] 1/30/2018 12:00:48 AM,ProgressiveCBMaps-EVEWrapper,setVisualLevel 1 for Eve
[LOG 00:00:53.039] 1/30/2018 12:00:53 AM,ProgressiveCBMaps-EVEWrapper,setVisualLevel 1 for Duna
[LOG 00:00:54.401] 1/30/2018 12:00:54 AM,ProgressiveCBMaps-EVEWrapper,setVisualLevel 1 for Ike
[LOG 00:00:55.592] 1/30/2018 12:00:55 AM,ProgressiveCBMaps-EVEWrapper,setVisualLevel 1 for Jool
[LOG 00:00:56.788] 1/30/2018 12:00:56 AM,ProgressiveCBMaps-EVEWrapper,setVisualLevel 1 for Laythe
[LOG 00:01:02.040] 1/30/2018 12:01:02 AM,ProgressiveCBMaps-EVEWrapper,setVisualLevel 1 for Vall
[LOG 00:01:03.425] 1/30/2018 12:01:03 AM,ProgressiveCBMaps-EVEWrapper,setVisualLevel 1 for Bop
[LOG 00:01:04.656] 1/30/2018 12:01:04 AM,ProgressiveCBMaps-EVEWrapper,setVisualLevel 1 for Tylo
[LOG 00:01:05.889] 1/30/2018 12:01:05 AM,ProgressiveCBMaps-EVEWrapper,setVisualLevel 1 for Gilly
[LOG 00:01:07.130] 1/30/2018 12:01:07 AM,ProgressiveCBMaps-EVEWrapper,setVisualLevel 1 for Pol
[LOG 00:01:08.335] 1/30/2018 12:01:08 AM,ProgressiveCBMaps-EVEWrapper,setVisualLevel 1 for Dres
[LOG 00:01:09.662] 1/30/2018 12:01:09 AM,ProgressiveCBMaps-EVEWrapper,setVisualLevel 1 for Eeloo
[LOG 00:01:10.049] [SCANsat] Unloading Kopernicus On Demand PQSMod For Kerbin

As you can see this mod slow down loading by 35 seconds in my case with this exact run (it can be slower/faster depending on your PC).

So what next? I start my "debugging" by disabling some functions to understand where is exactly happens this slow down. After some time i did track it to function getMeshTexture and rescaleMap. This functions get planet texture and rescale it according to current research stage. And it doing this EVERY time while switching between scenes.

Also i discover that this mod actually doing some unnecessarily job like loading kerbin again and apply textures/clouds etc for already researched bodies on research level 6. Is there any reason to do this if body by default have research level 6? So i did added this simple code into function setVisualLevel where Case 6:

 

				case 6:
                    if (currentDetailLevel == 6) return;
					if (currentDetailLevel == 0 && Body.pqsController != null)
					{

And run game - it already bit improved loading time by few seconds only for not doing this for already researched bodies. I did not saw any difference in-game for my bodies so i think its ok, correct me if i'm wrong.

Next step was improve somehow texture generation part. And as always best solution for such tasks is make CACHE for generated textures. There is few ways to do this and for tests i just store them as png in game saves directory, and then load it from cache instead of generate it EVERY time.

So i created function "SaveCache" and added it to the end of setVisualLevel function:
 

					currentDetailLevel = 6;
					processEVEClouds();
					break;
			}

            SaveCache();
		}

        private void SaveCache()
        {
            byte[] bytes = smallScaledMap.EncodeToPNG();
            File.WriteAllBytes("saves/" + HighLogic.SaveFolder + "/research/cache_"+currentDetailLevel+"_"+Body.bodyName+".png", bytes);
        }

Also i created manually (as its just for tests) folder "research" in my save game ("Kerbal Space Program\saves\Reseach Test\research"). After that i also modified a bit setVisualLevel by moving variable "currentDetailLevel = 1" before calling setVisualOn in all case parts, so now all case parts looks like:
 

				case 1:
					if (currentDetailLevel == 0 && Body.pqsController != null)
					{
						Body.pqsController.ActivateSphere();
						Body.pqsController.EnableSphere();
						mesh.enabled = true;
					}
					removeFromPlanetariumCamera();
					//visualHeight = 64;
					visualHeight = 32;
					//shiny = 0;
					shiny = originalshiny;
					currentDetailLevel = 1;
					setVisualOn(true);
					setBumpOff();
					processEVEClouds();
					break;

Next thing was modify function setVisualOn to add cache check:
 

		internal void setVisualOn(bool _greyscale = false)
		{
			if (mesh == null)
				return;
			if (!File.Exists("saves/" + HighLogic.SaveFolder + "/reseach/cache_" + currentDetailLevel + "_" + Body.bodyName + ".png")) {
				getMeshTexture(_greyscale);
				OverlayGenerator.Instance.ClearDisplay();
			}
			//rescaleType = 0;
			rescaleMap();
			mesh.material.SetTexture("_MainTex", smallScaledMap);
			if (hasShininess)
				mesh.material.SetFloat("_Shininess", shiny);
		}

And last thing is to modify function rescaleMap, in the start i added this code to load texture from cache if it exists:
 

		private void rescaleMap()
		{

			if (File.Exists("saves/" + HighLogic.SaveFolder + "/reseach/cache_" + currentDetailLevel + "_" + Body.bodyName + ".png")) {
				byte[] bytes = File.ReadAllBytes("saves/" + HighLogic.SaveFolder + "/reseach/cache_" + currentDetailLevel + "_" + Body.bodyName + ".png");
				Texture2D tex = new Texture2D(visualHeight * 2, visualHeight);
				tex.LoadImage(bytes);
				smallScaledMap = tex;
				return;
			}

			smallScaledMap = newScaledMap;

After that modifications i saved file and compiled mod and run KSP. First loading was as always slow, but all next was very fast, here is log:

 

Quote

[LOG 01:05:02.225] 1/30/2018 1:05:02 AM,ResearchBodies-PCBMWrapper,Success: True
[LOG 01:05:02.229] 1/30/2018 1:05:02 AM,ProgressiveCBMaps-EVEWrapper,setVisualLevel 6 for Sun
[LOG 01:05:02.230] 1/30/2018 1:05:02 AM,ProgressiveCBMaps-EVEWrapper,setVisualLevel 6 for Kerbin
[LOG 01:05:02.232] 1/30/2018 1:05:02 AM,ProgressiveCBMaps-EVEWrapper,setVisualLevel 6 for Mun
[LOG 01:05:02.233] 1/30/2018 1:05:02 AM,ProgressiveCBMaps-EVEWrapper,setVisualLevel 1 for Minmus
[LOG 01:05:02.236] 1/30/2018 1:05:02 AM,ProgressiveCBMaps-EVEWrapper,setVisualLevel 1 for Moho
[LOG 01:05:02.239] 1/30/2018 1:05:02 AM,ProgressiveCBMaps-EVEWrapper,setVisualLevel 1 for Eve
[LOG 01:05:02.242] 1/30/2018 1:05:02 AM,ProgressiveCBMaps-EVEWrapper,setVisualLevel 1 for Duna
[LOG 01:05:02.244] 1/30/2018 1:05:02 AM,ProgressiveCBMaps-EVEWrapper,setVisualLevel 1 for Ike
[LOG 01:05:02.247] 1/30/2018 1:05:02 AM,ProgressiveCBMaps-EVEWrapper,setVisualLevel 1 for Jool
[LOG 01:05:02.249] 1/30/2018 1:05:02 AM,ProgressiveCBMaps-EVEWrapper,setVisualLevel 1 for Laythe
[LOG 01:05:02.252] 1/30/2018 1:05:02 AM,ProgressiveCBMaps-EVEWrapper,setVisualLevel 1 for Vall
[LOG 01:05:02.254] 1/30/2018 1:05:02 AM,ProgressiveCBMaps-EVEWrapper,setVisualLevel 1 for Bop
[LOG 01:05:02.257] 1/30/2018 1:05:02 AM,ProgressiveCBMaps-EVEWrapper,setVisualLevel 1 for Tylo
[LOG 01:05:02.260] 1/30/2018 1:05:02 AM,ProgressiveCBMaps-EVEWrapper,setVisualLevel 1 for Gilly
[LOG 01:05:02.262] 1/30/2018 1:05:02 AM,ProgressiveCBMaps-EVEWrapper,setVisualLevel 1 for Pol
[LOG 01:05:02.265] 1/30/2018 1:05:02 AM,ProgressiveCBMaps-EVEWrapper,setVisualLevel 1 for Dres
[LOG 01:05:02.267] 1/30/2018 1:05:02 AM,ProgressiveCBMaps-EVEWrapper,setVisualLevel 1 for Eeloo
[LOG 01:05:02.273] [SCANsat] Unloading Kopernicus On Demand PQSMod For Kerbin

So now it take less than 0.1 second! YAY. Also i checked my research folder in save and here is files:
x4sDjpr.png

So basically i did solve this issue for myself within few hours WITHOUT any knowledge in KSP modding at all. Of course its not ideal solution and there should be made more checks for texture changes (if texture mod installed/removed) and also cache manager to remove outdated files or so. In any case there IS solution to improve loading times without modify base game code or remove some features from mod. Impossible you say? I say POSSIBLE.

So now if people also want solution like this, then this code can be improved and may included into mod if author want this. Also there is possible to load this textures to memory and then use it within 1 game session, so if you exit and open again it will generate textures again, but ONCE. Actually i still prefer cache on HDD because of fast first loading after game restart.

That's all what i wanted to say. Thank you for attention, best luck everyone!

ps also from my old message:

On 13.12.2017 at 10:15 PM, AlexALX said:

Ok, but why it makes slower a lot? I can understand if it slower for few seconds, but in 10 times its not normal. Maybe there is something wrong with loading so it doing some job in loop for a while or something like this? Because i really don't understand what algorithms can slow down this... Even if i remove all mods except this one (and required one) it still doing exact same thing - it loading very slow. Are you sure that this is not an glitch somewhere in algorithms? Maybe it recalculates something each time when loading and you can do some cache or something like this? I'm programmer so for me its looks very weird that one mod slow down loading in 10 times...

I had feeling about recalculations (texture regenerating in this case) and as possible solution - implement cache, and i was right.

Edited by AlexALX
Link to comment
Share on other sites

6 hours ago, AlexALX said:

So i did few tests and... was very surprised that actually all this slow down makes part what changes colors/textures on planets. By disabling some parts of code i did track it - this slow down caused by ProgressiveCBMaps and not reseachbodies itself. When i disable this addon via moving folder or in code - everything loads again fast, orbits are hidden, but i can switch between planet  using tab (but planet name shows as "unknown object"), so i'll continue investigation and maybe make some solution for my needs..

that plugin is one I wrote... and is part of ResearchBodies.

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