Jump to content

[1.12] KIFA Kerbal Inventory for All - adds stock inventory to mod containers, put all mod parts in stock containers!


Atlas Gaming

Recommended Posts

4 hours ago, Atlas Gaming said:

OK - it is updated with above... although I'm not sure its worth updating further if yours does the same thing but better? I can just deprecate

Doesn't hurt to have it both, some people may want to keep their mod count low.

Link to comment
Share on other sites

  • 7 months later...

I dared to add those four patches to
GameData\KerbalInventoryForAll\InventoryforAll.cfg

@PART[*]:HAS[#title[*ervice??odule*],!MODULE[ModuleInventoryPart]] :LAST
{
	MODULE
	{
		name = ModuleInventoryPart
		InventorySlots = #$../mass$
		@InventorySlots *= 10
		@InventorySlots ^= :\.\d+::
		packedVolumeLimit = #$../mass$
		@packedVolumeLimit *= 750
		@packedVolumeLimit ^= :\.\d+::
	}
}

@PART[*]:HAS[#title[*ervice??ank*],!MODULE[ModuleInventoryPart]] :LAST
{
	MODULE
	{
		name = ModuleInventoryPart
		InventorySlots = #$../mass$
		@InventorySlots *= 4
		@InventorySlots ^= :\.\d+::
		packedVolumeLimit = #$../mass$
		@packedVolumeLimit *= 150
		@packedVolumeLimit ^= :\.\d+::
	}
}

@PART[*]:HAS[#title[*dapter??ank*],!MODULE[ModuleInventoryPart]] :LAST
{
	MODULE
	{
		name = ModuleInventoryPart
		InventorySlots = #$../mass$
		@InventorySlots *= 3
		@InventorySlots ^= :\.\d+::
		packedVolumeLimit = #$../mass$
		@packedVolumeLimit *= 75
		@packedVolumeLimit ^= :\.\d+::
	}
}

@PART[*]:HAS[@MODULE[ModuleInventoryPart]:HAS[#InventorySlots[0]]] :LAST
{
	-MODULE[ModuleInventoryPart] { }
}

The first checks for parts which should be a "service module" and uses the mass as calculation base.
The second is a sanity check, if the part's mass is so low that after the calculation and regex the value of InventorySlots is 0 just remove the whole ModuleInventoryPart again ...

My first check:

It did this to bluedog_Apollo_Block2_SM

		MODULE
		{
			name = ModuleInventoryPart
			InventorySlots = 2
			packedVolumeLimit = 75
		}


and bluedog_Apollo_Block3_SM gets

		MODULE
		{
			name = ModuleInventoryPart
			InventorySlots = 1
			packedVolumeLimit = 56
		}


bluedog_Gemini_ArrowSM gets

		MODULE
		{
			name = ModuleInventoryPart
			InventorySlots = 2
			packedVolumeLimit = 75
		}

 

Those inventory slots are good for putting EVA repair kits or such.

Edited by Gordon Dry
added "Adapter Tank"
Link to comment
Share on other sites

  • 11 months later...

I'm having an inventory problem that installing KIFA didn't resolve, but perhaps someone here knows or can guess what's causing the problem so I can fix it myself. 

I can stack all stackable items (stock, KIS, and KAS) with the expected quantity limit (yellow number) and volume calculation (green bar) in some non-storage parts which have had inventory capability added to them (ex. any crewable command module).

I can stack only certain stackable items (wrench, screwdriver, explosives, and KIS manual to be specific -- nothing else as far as I can tell) in actual inventory-specific cargo containers (ex. SN-01 Portable Container, SN-07K Container, etc.). There is no inventory or volume limit for these items but there is right-click +1/-1 functionality.

All other stackable items (ex. EVA Repair Kit, AAS-4 Strut Connector, JS-1 Joint Socket, RTS-1 Resource Transfer Station, etc.) will not stack in any inventory-specific cargo containers like they should.

It seems to me that there must be attributes in the screwdriver and command module parts files that are missing from JS-1 Joint Socket and SN-07K Container parts files that I could add  to to make my parts stackable. 

Alternately, if you think it's a mod conflict, my installed part-related mods are:

KIS, KAS, ModuleManager, KIFA, B9 Part Switch, Community Resource Pack, FIG, Infernal Robotics - Next, JSIPartUtilities, Konstruction, KSP Community Fixes, ReStock, TweakScale.

I use CKAN so everything should be up to date and I'm running the most recent version of KSP (1.12.4.3187).

Link to comment
Share on other sites

Update: I had a persistent Unity-crashing conflict (99% sure it was KSP_PartVolume) that forced me to uninstall and reinstall all mods and KIFA is now functioning normally. (Install order issue?)

Whatever the case, KIFA has solved my stackable-parts-not-stacking problem (hooray!) but now there is a secondary issue (or bonus feature, depending on your point of view). Containers now have two mostly-independent inventories -- stock and KIS.

The Stock/KIFA-created inventory which appears at the top of the part's GUI beneath "Part" and the KIS inventory which appears at the bottom of the part's GUI above "Crossfeed" don't share part inventories, each hold a different total number or parts, they calculate inventory part volumes differently, and they keep track of total used volume independently. They do, however, report their content masses correctly, so filling both inventories to their independent capacities will have the correct effect your TWR, etc.

Link to comment
Share on other sites

1 hour ago, KADC said:

Update: I had a persistent Unity-crashing conflict (99% sure it was KSP_PartVolume) that forced me to uninstall and reinstall all mods and KIFA is now functioning normally. (Install order issue?)

That's very odd, nothing it does should do that.  Please provide some details in that thread (https://forum.kerbalspaceprogram.com/index.php?/topic/201354-112x-ksp-part-volumes/

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...