Kerbal Inventory System (KIS)

Kerbal Inventory System (KIS)

1M Downloads

Stock Parts not stacking in 1.6.1 with no other mods

jasonttech opened this issue ยท 9 comments

commented

I noticed that only KIS parts were stacking in my main game. I made a fresh 1.6.1 install and added only KIS 1.18, no other mods Reproduction steps below.

  1. Start a sandbox game.
  2. Go to the SPH
  3. Add a Mk3 command pod and a large Mk3 container.
  4. Open the containers inventory.
  5. put a cubic strut in the container
  6. I also tried RCS, ant engine and a bunch on other parts, The only ones that would stack were the KIS parts.

This problem does not exist on 1.6.1 with KIS 1.16

This problem exists on 1.17
I also tried switching ModuleManager version between 3 and 4 and that had no effect.

I did not see any errors or hints of what might be wrong in KSP.log or output_log but I have attached the output_log below

output_log-KIS.txt

Thank you for your work on this awesome mod!

commented

The inconsistent behavior of the override can be caused by the saved info in the inventory. Need to check it.

As for the issue itself, the logs don't give an answer. Could you, please, attach the save file as well?

commented

Here's the last save. There's not much in it because I've started with a fresh save each time I test. I'm guessing you're not having this issue so I'm curious what could affect it since I get it from a clean install with no other mods. I also just tested on another computer and it is reproducible there.

I notice that the way you check if it is stackable in KIS_Item.cs changed a lot. The fact that the override mostly works and the KIS parts work make me think the problem if either here

KIS/Source/KIS_Item.cs

Lines 358 to 359 in 3bbcc57

var allModulesCompatible = avPart.partPrefab.Modules.Cast<PartModule>()
.All(m => KISAddonConfig.stackableModules.Contains(m.moduleName));
or on the config loading/parsing,

Again, thank you for your help with this!

save.zip

commented

Could you please also add KIS.log?

commented

Where would I find that? I don't see it in the KSP directory or the appdata one that it puts output_log and crash reports.

commented

I found some more weirdness with this. I tried adding strutCube to StackableItemOverride.
In the SPH it did not allow me to stack so I added 2 in separate slots. After launching it showed the 1x next to it and I was able to stack, I then reverted to SPH and it allowed me to stack and showed the 1x. I launched again and then tried splitting and it keeps the 1x for the on that started in there but the one that's split off does not show it. I can stack if I drag the non stackable onto the stackable, but if I drag the stackable onto the non stackable it does not work. This only affects items with the override, items without it are not stackable at all.

I also realized you probably meant KSP.log both logs are below after doing this.

image

output_log.txt

KSP.log

Edit: In case it matters for reproducing this I am on Windows 10 with 64 bit KSP.

commented

Is it something that can be added to the settings file or does it require a code change?

commented

Yeah, I was able to reproduce. Looks like game had new modules, that KIS is not aware of.

commented

Nope, it's in the code.