Jump to content

[Minimum KSP version - 1.12] Kerbal Inventory System (KIS) v1.29


IgorZ

Recommended Posts

@MigBarSan KIS has issues with parts that change crew capacity. It creates the seat inventories based on the initial crew capacity listed in the config file which is usually the deflated state. The inflatable airlock is 0 crew deflated so as far as KIS is concerned there wouldn't be an inventory in the part. 1.19+ has a workaround but I haven't tried this yet and won't be able to until tomorrow morning. You can manually add an inventory for the inflated capacity using the following patch. For something with more seats you would need to copy the pod inventory block for each seat.

@PART[InflatableAirlock]:FINAL
{
	MODULE
	{
		name = ModuleKISInventory
		invType = Pod
	}
}

@MigBarSan EDIT: I thought I'd posted this yesterday. The patch above didn't work. Initially it looked like it worked, but moving a guy in and out with multiple inflation/deflation cycles got KIS "confused" and it ended up stripping the parts in inventory off the Kerbal. They just disappeared and KIS was throwing exceptions. It's something I'd flagged as a bug a couple months ago and IgorZ thought he'd fixed. Maybe it's because this part started at zero crew. The workaround I've been using on another part is to just set the deflated crewcapacity equal to the inflated capacity with a patch. It's a hack, but it works.

Edited by Tonka Crash
Link to comment
Share on other sites

So I continue to chip away at this project.

Created a little GhostParts.cfg MM patch that creates a new part and hides the original [AKI GolfClub]. Will post if it works.

Spoiler

// creates duplicate part without the space in the name
+PART[AKI?GolfClub]:FOR[SurfaceExperimentPack]
{
	@name = SEPGolfClub
	@cost = 25	// instead of 250 - unless it is Gold Plated and Tungsten signed by the great Kack Kicklaus himself 
}

// hides original part (so doesn't break saves)
@PART[AKI?GolfClub]:NEEDS[SurfaceExperimentPack]
{
	@TechRequired = Unresearchable
	@category = none
}

// zer0Kerbal

this should work.

Found out that patching @KISConfig means using LIFO, so if patching multiple sections, say EvaInventory (slots) and PodInventory, need to put them in upside down order compared to how they appear in original KISConfig (seemingly).

This brings me to the next question: is there a way to put a stack of a stackable item instead of multiple individual items? See patch below. Instead of listing three lines for ExSurveyState, is there a way to have a stack of 3 ExSurveyStakes added?

 

Spoiler

@KISConfig
{ @Editor
  { @PodInventory
    {
        addToAllSeats = ExMallet
        addToAllSeats = ExSurveyStake
        addToAllSeats = ExSurveyStake
        addToAllSeats = ExSurveyStake
    }
  }
}

 

Edited by zer0Kerbal
Link to comment
Share on other sites

6 hours ago, zer0Kerbal said:

So I continue to chip away at this project.

Created a little GhostParts.cfg MM patch that creates a new part and hides the original [AKI GolfClub]. Will post if it works.

[snip]

Found out that patching @KISConfig means using LIFO, so if patching multiple sections, say EvaInventory (slots) and PodInventory, need to put them in upside down order compared to how they appear in original KISConfig (seemingly).

This brings me to the next question: is there a way to put a stack of a stackable item instead of multiple individual items? See patch below. Instead of listing three lines for ExSurveyState, is there a way to have a stack of 3 ExSurveyStakes added?

Instead of :FOR you should use :NEEDS probably with a :FINAL. :FOR is really reserved for the mod author and signals to MM that the mod exists and creates a point in the patch process so :BEFORE and :AFTER can be used to target patches around the mod. :NEEDS indicates the patch should only run if the mod is found. The patches order shouldn't matter. MM applies them in order they are read. It may help if you run your patch with :FINAL so it applies after all other patches. By using the :FOR when your patch applies may be creating timing issues.

I've never seen a way to specify adding a stack of parts to an inventory through a patch. One option is to just increase the number of slots in the Inventory popup window.

@KISConfig:FINAL 
{
    // slotsX & slotsY represent number of slots in inventory pop-ups. By
    // default these can be restrictive. Easy to fill slots before mass or
    // volume limits.

    @EvaInventory // Bump up the seat inventory slots
    {
		@slotsX = 4 // 2
		@slotsY = 4 // 4
    }
}

 

Link to comment
Share on other sites

Thanks - so it has been working, mostly. Creates the copy - but doesn't hide the original. Made the changes you suggested:

Spoiler

// creates duplicate part without the space in the name
+PART[AKI?GolfClub]:NEEDS[SurfaceExperimentPack]:FINAL
{
	@name = SEPGolfClub
	@cost = 25	// instead of 250 - unless it is Gold Plated and Tungsten signed by the great Kack Kicklaus himself
}

// hides original part (so doesn't break saves)
@PART[AKI?GolfClub]:AFTER[SurfaceExperimentPack]
{
	@TechRequired = Unresearchable
	@category = none
}

// zer0Kerbal

 

Spoiler
 

and already are doing other patches for KISConfig; and it only works if you patch them in inverse order of they way the sections are in KISConfig. As far as stacking - how does a stacked part get stored? Maybe addToAllSeats = ELSurveyStake, 3 (would be fun if that worked) .

KISConfig:FINAL - is the FINAL needed? I do so like clean code that follows rules. :)

below works great. had to increase slots for this as you can see. :)

Spoiler

@KISConfig
{
  @EvaPickup {
    //@grabKey = g	
    //@attachKey = h	
    //@redockKey = y
    //@allowPartAttach = False
    //@allowStaticAttach = False
    //@allowSnapAttach = False
    @maxDistance = 5 // 3
    @grabMaxMass = 2 //1
    //@dropSndPath = KIS/Sounds/drop
    //@attachPartSndPath = KIS/Sounds/attachPart
    //@detachPartSndPath = KIS/Sounds/detachPart
    //@attachStaticSndPath= KIS/Sounds/attachStatic
    //@detachStaticSndPath = KIS/Sounds/detachStatic
    //@draggedIconResolution = 64
  }
}

@KISConfig {
  @EvaInventory   {
     //@inventoryKey = tab
     //@rightHandKey = x
     //@helmetKey = j
     @slotsX = 4
     @slotsY = 5
     //@slotSize = 50
     //@itemIconResolution = 128
     //@selfIconResolution = 128
     @maxVolume = 500
     //@openSndPath = KIS/Sounds/inventoryOpen
     //@closeSndPath = KIS/Sounds/inventoryClose
  }
}

// Specifies default settings of every new inventory created in the editor.
@KISConfig {
	@Editor {
		@PodInventory {
		// Specifies items to add to every pod's seat. To add more items add more lines.
			addToAllSeats = KIS.electricScrewdriver 	// Hotkey 1
			addToAllSeats = SEPGolfClub				// Hotkey 2
			addToAllSeats = ELMallet 
			addToAllSeats = KIS.evapropellant 		// Hotkey 3
			addToAllSeats = KIS.evapropellant 		// Hotkey 4	
			addToAllSeats = ELSurveyStake
			addToAllSeats = ELSurveyStake
			addToAllSeats = ELSurveyStake
		// Specifies items to add to the first pod's seat only.
			// addToTheFirstSeatOnly = KIS.evapropellant
			// addToTheFirstSeatOnly = SEPGolfClub
		}
	}
}
// zer0Kerbal
Edited by zer0Kerbal
Link to comment
Share on other sites

@zer0Kerbal The :FINAL isn't required. It's just telling MM to run this patch late in the sequence, so any other patches from mods have run before you do your final changes. Here's a wiki describing the order sequence. It's probably not a big deal in this case, but if you do enough patches, invariably you run into patch ordering problems.

Link to comment
Share on other sites

1 hour ago, Ribby Kerman said:

Will the newest version of the mod work with KSP 1.3?

I would say no way. The version of Unity that KSP uses for a game engine changed at 1.4, so it's unlikely any mod compiled for the current version of Unity will run on the version for 1.3.

Link to comment
Share on other sites

On 5/1/2019 at 10:24 AM, IgorZ said:

The user guide is provided as PDF for the offline convenience. If you only edit it, it won't get reflected in the game. You also need to capture each page of the new guide as DDS and store the pages in the part's definition folder. And if your new guide has different number of pages, you also need to adjust "page" property in the part config. Btw, the long term plan for the manual was to implement it as a Kspedia topic. If you could do it, it would be a great deal!

Is this still an open item?? At the moment I am trying to create some pages for myself.
I could try to convert the PDF manual to KSPedia

Link to comment
Share on other sites

2 hours ago, EngineerMartijn said:

Is this still an open item?? At the moment I am trying to create some pages for myself.
I could try to convert the PDF manual to KSPedia

It's still open. If you come up with something you can submit a PR at github to add it. Though it might be worth waiting to see what the next game update does to break KIS since it looks like it includes at least inventory management as stock.  

Link to comment
Share on other sites

4 hours ago, Tonka Crash said:

It's still open. If you come up with something you can submit a PR at github to add it. Though it might be worth waiting to see what the next game update does to break KIS since it looks like it includes at least inventory management as stock.  

was thinking that was well - KIS/KAS - mostly because of the surface experiments just announced for the 30 May DLC.

Link to comment
Share on other sites

is the KIS/KAS combo working with the recent update, for some unknown reason i can load tools/parts into slots in the VAB, but i can't access the tools the Kerbal is supposed to have when i exit the vesel. in the menu when i select the kerbal to bring up inventory its not on the list. 

Link to comment
Share on other sites

@Zero_sum KIS 1.20 and KAS 1.3 are working fine on KSP 1.7. I've been using both daily since 1.7 released. Mods that rely on Legacy functions may not work as intended with these later versions.

Look through the Troubleshooting wiki to make sure you have KIS installed correctly. Otherwise you need to provide some logs for people here to take a look at: 

 

Link to comment
Share on other sites

2 hours ago, Miner 36 said:

Is This in English 

I don't know what you are asking? Is KIS in English? Yes, most if not every mods is. It's also has localizations for Spanish, French, Italian, Portuguese, Russian and Chinese.

Link to comment
Share on other sites

so on the equip aliases do you have to have aliashead or can you just use Head.        

 alias = aliasHead,**/bn_upperJaw01
 alias = leftHandWrist,**/bn_1_elbow_b01

and is there a list of equippable slots and kerbal bones anywhere? 

and did this module ModuleKISItemEvaTweaker get replaced by this module ModuleKISItemAttachTool ?

 

Link to comment
Share on other sites

36 minutes ago, COL.R.Neville said:

so on the equip aliases do you have to have aliashead or can you just use Head.        

 alias = aliasHead,**/bn_upperJaw01
 alias = leftHandWrist,**/bn_1_elbow_b01

and is there a list of equippable slots and kerbal bones anywhere? 

and did this module ModuleKISItemEvaTweaker get replaced by this module ModuleKISItemAttachTool ?

 

I found this post with a list of all bones (if it's still current). This page describes how KIS uses aliases with them. The aliases are defined in KIS/settings.cfg. Not sure what you mean by "equippable slots" The alias statements are just creating shorthand names for the bones and from the the wiki page must start with the string alias. I'm guessing it simplifies parsing the string to know it's an alias.  And, that should be a lowercase L in bn_l_elbow_b01. It looks like you have the number 1 in your post. 

ModuleKISItemEvaTweaker adjusts Kerbal movement attributes, like run/walk speeds.

ModuleKISItemAttachTool (no wiki) controls the types of attachment (surface/node) a tool can perform and the sounds associated with the tool.

Where it gets interesting (or confusing) is these are both extended from ModuleKISItem, so any settings for ModuleKISItem can also be included with either ModuleKISItemEvaTweaker or ModuleKISItemAttachTool. 

Link to comment
Share on other sites

okay thanks man i appreciate it.

i would think being in the alias id should id it as an alias hehe. but good to know that you have to use aliaswhatever for it to work. 

except that for some reason the evatweaker module doesnt seem to be working anymore. well at least in the context of attaching items to a evakerbal. 

im trying to get all my kerbalhacks omni tools and holo visor etc working again. 

equippable slots. 

MODULE
    {
        name = ModuleKISItemAttachTool
        shortcutKeyAction = equip
        equipable = true
        stackable = true
        equipSlot = rightHand
        equipBoneName = aliasRightPalm
        equipPos = (-0.15,0.022,0.01)
        equipDir = (0,90,15)
        toolPartAttach = true
        toolStaticAttach = false
        toolPartStack = true
        attachPartSndPath = KIS/Sounds/attachScrewdriver
        detachPartSndPath = KIS/Sounds/detachScrewdriver
        allowPartAttach = Disabled
    }

so ive found rightHand so far im guessing there is a leftHand too but.... hehe 

I need stuff like lefteye righteye or is it eyeballLeft etc....

this is the old evatweaker which used to work but doesnt anymore.

MODULE
    {
        name = ModuleKISItemEvaTweaker
        shortcutKeyAction = equip
        equipable = true
        equipSlot = leftHandWrist
        equipMeshName = body01
        equipBoneName = bn_l_elbow_b01
        equipPos = (-0.15,0.022,0.01)
        equipDir = (0,90,15)
    }

so the above no longer works but this seems to 

MODULE
    {
        name = ModuleKISItemAttachTool
        shortcutKeyAction = equip
        equipable = true
        stackable = true
        equipSlot = rightHand
        equipBoneName = aliasRightPalm
        equipPos = (-0.15,0.022,0.01)
        equipDir = (0,270,15)
        toolPartAttach = true
        toolStaticAttach = false
        toolPartStack = true
        attachPartSndPath = KIS/Sounds/attachScrewdriver
        detachPartSndPath = KIS/Sounds/detachScrewdriver
        allowPartAttach = Disabled
    }

 

 

 

Link to comment
Share on other sites

For Equip Slots I found the following list in the code:   leftHand rightHand jetpack eyes helmet

Quote

MODULE
    {
        name = ModuleKISItemEvaTweaker
        shortcutKeyAction = equip
        equipable = true
        equipSlot = leftHandWrist
        equipMeshName = body01
        equipBoneName = bn_l_elbow_b01
        equipPos = (-0.15,0.022,0.01)
        equipDir = (0,90,15)
    }

The problem with this block is directly addressed in the wiki page about alias. The equipMeshName and equipBoneName are replaced with the equpBoneName = aliasname

Link to comment
Share on other sites

1.21 (May 16th, 2019):

  • [Fix #89] Portable containers revert to previous content when dropped.
  • [Fix #328] KIS fails on every new DLC or major patch that changes kerbal models.
  • [Fix #330] Make KIS containers mass and volume physically realistic. Read the issue description for details!
Edited by IgorZ
Link to comment
Share on other sites

The Breaking Ground DLC is about to be released.  It includes an inventory system in the stock game.  I wonder how that may impact the need for KIS.  If KIS is no longer needed, can we still use KAS?

sidebar:  I cross-posted this to the KAS thread as well.

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...