KSP Interstellar Extended

KSP Interstellar Extended

1M Downloads

Bug in CryoTanksFuelSwitcher.cfg causes texture / render issues with CryoTanks

valderrama opened this issue ยท 2 comments

commented

This is a copy of my comment in the KSPIE support thread here.

Overview

I believe there is a bug in KSPIE/WarpPlugin introduced by changes to CryoTanksFuelTankSwitcher.cfg in v1.25.2 and partially fixed in v1.25.4 that is affecting the CryoEngines / CryoTanks mod.

Symptoms

CryoTanks textures fail to render properly, see screenshot:
kspie-cryotanks-bug

Possibly related error messages in the log regarding B9PartSwitch and CryoTanks:

[Part]: PartModule indexing mismatch at hydrogen-125-2, index 0.
Node 'ModuleB9PartSwitch' found in loaded data, but 'TweakScale' is defined in prefab.
Looking for ModuleB9PartSwitch in other indices...
 
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 35)

...ModuleB9PartSwitch module found at index 2.
 
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 35)

[ERROR] [Part hydrogen-125-2] [ModuleB9PartSwitch 'fuelSwitch'] OnLoad was called with the wrong ModuleID and the correct module could not be found
 
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 35)

[Part]: PartModule indexing mismatch at hydrogen-125-2, index 1.
Node 'TweakScale' found in loaded data, but 'USI_ModuleRecycleablePart' is defined in prefab.
Looking for TweakScale in other indices...
 
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 35)

...TweakScale module found at index 0.
 
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 35)

[Part]: PartModule indexing mismatch at hydrogen-125-2, index 2.
Node 'USI_ModuleRecycleablePart' found in loaded data, but 'ModuleB9PartSwitch' is defined in prefab.
Looking for USI_ModuleRecycleablePart in other indices...
 
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 35)

...USI_ModuleRecycleablePart module found at index 1.
 
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 35)

[Part]: PartModule indexing mismatch at hydrogen-125-2, index 3.
Node 'ModuleB9PartSwitch' found in loaded data, but 'ModuleCryoTank' is defined in prefab.
Looking for ModuleB9PartSwitch in other indices...
 
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 35)

...ModuleB9PartSwitch module found at index 2.
 
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 35)

[Part]: PartModule indexing mismatch at hydrogen-125-2, index 4.
Node 'ModuleCryoTank' found in loaded data, but 'ModuleB9PartInfo' is defined in prefab.
Looking for ModuleCryoTank in other indices...
 
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 35)

Root Cause

In the initial changes in 1.25.2 there were two different part node rules that contain the following deletion:

!MODULE[ModuleB9PartSwitch] {}

However in 1.25.4 only the first instance on line 25 was fixed with the following change:

!MODULE[ModuleB9PartSwitch]:HAS[#moduleID[fuelSwitch]] {}

Solution

To fix the issue the second instance on line 171 must also have the HAS criteria added to the MODULE deletion.

After applying the fix and relaunching my game the textures now render properly and no errors related to B9PartSwitch and CryoTanks are observed in the log:
kspie-cryotanks-fix

commented

fixed it with 6f99197

commented

Thanks for the quick response. Your work is appreciated!