Jump to content

AlexALX

Members
  • Posts

    78
  • Joined

  • Last visited

Everything posted by AlexALX

  1. Так вот я наконец построил свою первую "МКС"!) И провёл стыковку забрав кербанафтов со станции. Попутно также выполнил некоторые другие задания)
  2. Так он не только мододел, а ещё и разработчик KSP.. Ну да ладно, вроде проблемы порешали, так что всё гуд уже. ps сорри за офтоп) больше не буду) я скоро подготовлю новую серию с постройкой "МКС"))
  3. @SnarkThank you for your time for create so veeeery long answer, i did read it completely and really grateful for that. You indeed made me feel better. Thank you. I'll put few things to spoiler as its off-topic for last time. This spoiler mostly for snark. While writing another long message JPLRepo already answered about how i can submit my changes, so i'm going to do that in any case. But still @JPLRepo is there actually proper way to do this via PR on github without license violation? Its still will be better for everyone else who might have same situation as me and want to do this properly. Also i prefer this way because of mention author name in commits (as one of contributors, this is generally part of github). ps zip was send to PM, so now everything is up to JPLRepo, of course when he will have free time.
  4. @Kerbal101 Та какие там приоритеты... Почитайте тот топик после моих сообщений, да я нарушил лицензию сделав форм и распространив модифицированную версию, но он даже не прочитал что я реально изменил там, и сказал "ты наверное удалил функционал отвечающий за отображение планет" ну или что там он сказал. Кароче я очень разочарован в том что он даже не пытался реально разобратся во всём этом и вместо того чтобы вникнуть всех тупо игнорил и говорит что это исправить невозможно. В общем в итоге я всё удалил пока он не даст внятный ответ и не прочитает что именно не так. А вообще помогай потом людям... Всё настроение только испортил.
  5. @JPLRepo Ok so i removed my fork, sorry for make you angry regarding license violation. Actually its first time for me when some MIT project includes ARR parts. But you also makes me extremely angry to not even try to understand why this slow down happens in first place. Instead of say "this is impossible to fix" you at least could look whats wrong with this code, but instead you actually ignore everyone who have this problem. And also you even didn't read my this message: All this makes me feel very sad and disappointing as well. My repo before contains improved version of code what is from this message with some additional changes for make it work properly. I can repeat that i didn't remove any functional from mod, i just implement cache for generated textures what actually do this slow down and slight improved code to not doing this jobs in all time when its already applied. That's all. And how then to call situation, when mod author even didn't want to try understand issue and find ways to fix it? And ignore everyone because he think "its impossible or very hard"? I think its even much worse than bad form/bad karma. And if someone actually do fix and then don't even take a few minutes to read what exactly was wrong. Here is actual change log what i think nobody read as well: For now i saved my work locally and won't share it anymore. Next question is - do you actually want to include my changes in this addon or not, i still can make PR. But i can't create private repository on github because its paid, so this mean i can't create PR without fork, and this cannot be done because of ARR, great. Also i can't fork without including particular files (as this files will be still in history), so actually your license break ability to make PR for those who may fork only for that reason. Tell me next time to not try help people. So i'll not do anything with it anymore until get proper answer. ps after all this stuff happen, right now all in my minds is about removing all my messages and code because i'm very upset, because mod author actually even don't want try to understand what was wrong in his own creation, and worry about license more than look at what actually was changed, but i'll not do this as i still want help other people (somewhere deep in my soul). pss And it seems like people in this thread more likes messages against my fault of license violation instead of actual fix, which made me even more upset. Whats wrong with people...
  6. Its difficult to understand where is ARR code and where is not (without looking inside all files), but for file what i changed its actually MIT i think so its should be ok to change it. In any case its temporary repository. I want to hear official answer from JPLRepo about this changes and i should to do next. And until that everything will stay as it is. So feel free to test my version to see if its working for your well.
  7. @Li0n Yep it works now! I have small delay when first time click on button (and menu shown without any option), but after few seconds its back to normal and i can see overlay in tracking center. Thank you)
  8. Ok, thank you. Also it seems after i updated this mod - i can't anymore use it in tracking center, button just do nothing (no menu shown), but it works in flight. So what can be wrong? I looked inside log files and there is no any errors when i'm pressing button or while loading, so logs are useless. However if i load new game it start works, so i think it might be issue with old saves (with old antenna helper installed before) or maybe due to large amount of vessels?
  9. Немного ещё повозился и зарелизил модифицированую версию с кешом и ускореной загрузкой а также русским переводом! Кто хочет может протестить. https://github.com/AlexALX/ResearchBodies/releases/tag/1.9.6.0-mod-1
  10. @MechBFP Grad to hear that! ---- I found small bug in my code, it can create cache for research level 6 textures when loading different saves in 1 game session and they are not needed, so i fixed this. Also i forgot mention that i disabled applying textures/changes to planets if they already applied before for all research levels. It seems works fine, but needed more tests. I updated link to new release, its not necessary to update, i just want to provide proper version for other people. ---- Also after some testing in different saves, i discover that textures actually always same for all planets, so maybe then isntead of create cache for each save i can make 1 global cache? I need to think about this later. ---- Oh also i did read license " Refere to the LICENSE files in the Distribution Folder. Parts of this code are ALL RIGHTS RESERVERED and may not be forked, modified or re-distributed without my express written permission. " So i need to remove all this stuff now? Just say what i need to do, i don't want have problems with that. And yea, i actually should saw this before create fork, so sorry...
  11. Can you please make support for multilanguage? I can try even help you with code changes and translating later to russian
  12. So i'm done, here is my fork: [License-violating link removed by moderator] You can see all changes what i made in this commit: [License-violating link removed by moderator] And also here is compiled modified version for everyone who want to test my solution: [License-violating link removed by moderator] First load will be still slow as always, but next one should be fast as it should be (as without this mod). Here is changelog: There is few issues what i didn't fix: - There is no any checks for texture updates, so if you install texture mod or so what will replace planet textures then you have to clear cache manually, it is located in "Kerbal Space Program\saves\Your Save\ResearchBodies". - There is possible to have some outdated cache files if you load older saves after had discovered planets. Its not major problem, except take some additional HDD space. I can make PR if author want to include this into mod. That's all, thank you for attention!
  13. Can you please make multilanguage support? I can even help with needed code changes and provide later russian translation.
  14. @MechBFP Actually i'll make more proper version and put everything as fork on github, so give me few hours and i'll do this) Also i'll place here ready modified version if someone want to test it.
  15. Hello, is there any chance to get multi language support in this mod? I even can try contribute code changes if needed.
  16. Сегодня я решил доказать разработчику мода (а вроде он ещё и разработчик KSP) что можно улучшить время загрузки игры при установке модификации "ResearchBodies" с небольшими правками кода и без изменения кода игры. Он сказал что это "невозможно". В итоге вот что вышло (на англ): Итого за пару часов я сделал для себя исправление долгой загрузки и расказал как я это сделал, а также доказал что это не "невозможно". Знаний в KSP модинге - ноль. В общем вот этим и занимался сегодня в KSP))
  17. 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: 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: So now it take less than 0.1 second! YAY. Also i checked my research folder in save and here is files: 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: I had feeling about recalculations (texture regenerating in this case) and as possible solution - implement cache, and i was right.
  18. 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..
  19. 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.
  20. 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.
  21. 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?
  22. 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.
  23. 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?
×
×
  • Create New...