The Editor is screwing with me again when scaling Parts with `PartModuleVariant`
Lisias opened this issue · 11 comments
Ok, it's happening again.
Editor is royally screwing with me. AGAIN.
How to Reproduce
- Build something like this (using parts with Variants):
- Select a subassembly and ALT+Click:
- Note how things already gone South:
- Try to attach it on a radial symetry:
Parts without Variants are working fine.
This feature was working fine until recently. What happened? Kraken knows.
This is a 1.12.5 KSP with minimal installation (KSP-Recall, TweakScale, Modular Management).
KSP.log: KSP.log
Craft file: Untitled Space Craft Var.craft.zip
References
Docking and undocking DID NOT screwed anything (yet).
Cheat two instances of the craft below to orbit, then dock them and then undock them. No visible issues were found, but I need to further test things to be sure (as the radial attachment problem).
Craft file:
Untitled Space Craft Var.zip
The first good news on this crapfest: radial attachments are working fine, as long you manage to keep the craft intact on launch (i.e., do not load it in Editor, or avoid using parts with variants as radial attachments).
Same thing from the previous test:
(all fuel tanks are scaled)
Until further evidences is gathered, I'm not considering it as my fault - because this Kraken damned feature was working until recently.
New test. I took the very same craft of the last test, ReRooted it on Editor to the Mainsail Engine, then launched it. Twice. Then I quit to Main Menu and reloaded the game, and focused one of the crafts using the Tracking Station.
First good sign: no craft was screwed on this process.
Now I docked and undocked, but did a quicksave before and after, so I can compare the SFS files.
Analysing the craft files from these saves will pinpoint any craft corruption.
Analysis of the quicksaves using KDIFF3 revealed that the overall structure of both crafts were preserved after undocking, with only minimal differences on positioning probably due float
lack of precision.
For the sake of curiosity, one of the crafts kept the docking information after undocking, I don't know if this is mishap (a harmless bug) or by design, but I found it weird to preserve such information after undocking.
Ahh! Finally identified the trigger!!! :)
If the root part of the craft has PartModuleVariant
, then the craft gets screwed when loaded on the Editor!!
The two problems detected on this issue were reproduced on KSP 1.7.3 - WHAT A HELL???? KSP 1.7.3 were working fine for years, and since I plat 1.7.3 now and then, I would had noticed this problem for sure!!
JESUS FSCKING CHRIST. KSP 1.4.3 is also affected. WHAT IN HELL IS HAPPENING HERE? I have a huge collection of issues in the last 5 years proving that TweakScale was being updated to cope with KSP's idiosyncrasies with success (after some tears and blood).
I didn't released any new TweakScale versions since August, the 1.4.3 code is not touched since I don't even remeber now, and obviously KSP 1.4.3 was released in 2018. What changed?
Oh, well… I looks as it's my fault after all. Doing regression tests on previous releases of TweakScale, the problem happened only on TS 2.4.7.3 - at least, on KSP 1.4.3.
Since 2.4.7.3 was released on Jul, and the first reports started to happen on late aug IIRC, it fits.
Found the culprit. It is the commit that solved #307 , commit 8412a38 .
NOW I understand why that was needed. When the part have ModulePartVariants
, the needed data is not available at that precise moment for an absolute
moving!
What I fail to understand is why in hell things work on Flight Scene so - if I'm doing something wrong, so I'm doing something wrong and I'm doing it all the time.
Anyway, Editor is screwed and this is not going to change. I need to cope with the shit somehow.
"Fixed" (krap!!!) commit on 97170c3 .
Damn. :(