Open Lisias opened 10 months ago
I don't know if this is a bug on KSPe or in Module Manager. Need to check the code and the intended use cases (and alternatives) to decide. (this one is going to be tricky…)
Damn. I don't even know if TweakScale and the Companions are safe to be reloaded this way!!!
Note: I will not manage to walk from this one, restarting KSP takes longer on the users machines apparently (why not on mine? need to do some new benchmarks).
As a matter of fact, ideally only the new/changed parts should be reloaded - that would be a very useful use-case for the Welding tool. But first things first.
Another note: how exactly this feature used to work on KSP 1.3 and 1.4 to 1.7.3 era? Reloading DLLs at that time invariably created a new App Domain, wasting lots of memory and making things pretty slower due Serialization…
Yet another note to myself: I remember an add'on I stumble in 2018 that implemented IIRC hot loading of configs. Of course Mr Alzheimer passed around and I forgot the name and the features of that damned thing, but I clearly remember reading that code. As soon as I remember the name of the damned thing, I will edit this post and create a task for this.
Hello @Lisias ! First of all thanks for the amazing work and support you provide here, it's really appreciated !
I'm trying out the Welding mod and encountered the same assembly error (something being loaded twice) and was wondering if you managed to find/fix the issue ?
It's well beyond my competency and I have lots of mods installed, so restarting can take a while indeed (up to 3 minutes and I have a high end computer)
Wish you the best, thanks for the work, cheers
Hi, @Nemipune .
I'm kinda screwed on this one because none of my assemblies are meant to be reloaded, and this is exactly what this feature is meant to do - reaload everything, including assemblies. I think that most assemblies on KSP neither, but - obviously - can't affirm that with 100% of accuracy.
Additionally, this reload will not reapply patches - so your rig would be inconsistent even if I manage to pull a stunt from the hat on the Assemblies.
I'm trying to understand how to load Parts and Meshes into memory (I already understand how to load textures). I think this would be the best way to go - creating a tool on MM to load the new Part into memory, instead of making the MM to reload everything in a half baked state.
I completely understand the annoyance a KSP cold restart can be - it's the reason I recommend having a side KSP instalment only to weld things, and then once satisfied copy the welded parts to the rig where they will be really used.
If by any means you became aware of how to load a Mesh and a Part into memory, please post the hint here and I will follow it.
Alright ! Thanks for the quick answer
I'm not sure I'll manage to find a solution on my own but I'll ask around, I have a few tech savvy friends that play the game, maybe something will come out of it.
Will keep you posted if I find anything, thanks again for the good work !
Cheers
Changed to enhancement, as I will built something on KSPe to load a PART
from a config in runtime.
As the tittle says, Full description is WIP.
See https://github.com/net-lisias-ksp/KSPe/issues/17#issuecomment-1763517790 for details for while.