IgorZ

[1.3] Kerbal Inventory System (KIS) v1.5.0

487 posts in this topic

54 minutes ago, ManuG said:

Hello everyone :)

At first: Great Mod, i like it to give EVA some aditional purposes by things like that. I'm using KIS together with KAS and the USI colonisation system. After the last update of KSP to 1.3, i updated all mods to work with the new version - which seems to do so. But since the latest updates i have a second "disassemble" button when i'm right clicking on a structure on EVA. It's not a bad issue since both buttons seem to work, but it looks a bit confusing. Is there some sort of incompatibility with the updated mods? I read that KIS and KAS are standalone versions, could that be the issue?

"Disassembly" button doesn't belong to KIS or KAS. Try removing the both mods to figure out if they are the actual problem.

Share this post


Link to post
Share on other sites
1 hour ago, ManuG said:

Hello everyone :)

At first: Great Mod, i like it to give EVA some aditional purposes by things like that. I'm using KIS together with KAS and the USI colonisation system. After the last update of KSP to 1.3, i updated all mods to work with the new version - which seems to do so. But since the latest updates i have a second "disassemble" button when i'm right clicking on a structure on EVA. It's not a bad issue since both buttons seem to work, but it looks a bit confusing. Is there some sort of incompatibility with the updated mods? I read that KIS and KAS are standalone versions, could that be the issue?

The disassembly is something from USI. If you're getting two of them on every part, can you post a link to your log and make sure there's only 1 000_USITools folder in GameData

Share this post


Link to post
Share on other sites

Posted (edited)

24 minutes ago, TheRagingIrishman said:

The disassembly is something from USI. If you're getting two of them on every part, can you post a link to your log and make sure there's only 1 000_USITools folder in GameData

Great it seems something like that was the issue! There was only one USITools folder but i think i just have messed something up when updating USI life support, MKS and afterwards USITools to the newest version. I just moved the mods to a backup folder, reinstalled them and deleted the Tools folder before installing the newest version of USITools - solved the problem.

I can still send you a log if needed, but i think it was just silly me forgetting to delete old versions before installing the new ones :)

Thank you both for your quick answers though :)

Edited by ManuG

Share this post


Link to post
Share on other sites
2 hours ago, ManuG said:

Great it seems something like that was the issue! There was only one USITools folder but i think i just have messed something up when updating USI life support, MKS and afterwards USITools to the newest version. I just moved the mods to a backup folder, reinstalled them and deleted the Tools folder before installing the newest version of USITools - solved the problem.

I can still send you a log if needed, but i think it was just silly me forgetting to delete old versions before installing the new ones :)

Thank you both for your quick answers though :)

No if updating fixed it there's no need. Have fun and fly safe!

Share this post


Link to post
Share on other sites

Hey @IgorZ ,
thx for dedicating your time to the mod. In your OP the link in the section 'Other useful EVA mods' to KAS points to KIS1.1.3 instead of Kerbal Attachment System

Can sb tell me if  the KIS/KAS 1.3 versions are also compatible with 1.2.2 and if not where i can find them (want to continue my RSS/RO/RP-0 campaign)
THX in advance

Share this post


Link to post
Share on other sites

Posted (edited)

1 hour ago, KroShan said:

Hey @IgorZ ,
thx for dedicating your time to the mod. In your OP the link in the section 'Other useful EVA mods' to KAS points to KIS1.1.3 instead of Kerbal Attachment System

Thanks. I've fixed the link.

1 hour ago, KroShan said:

Can sb tell me if  the KIS/KAS 1.3 versions are also compatible with 1.2.2 and if not where i can find them (want to continue my RSS/RO/RP-0 campaign)
THX in advance

KIS 1.5 will crash the KSP 1.2+ game. KAS doesn't seem to cause obvious troubles but I cannot guarantee it's working as intended. If you need the versions for the older KSP version, go to the curse page and manually download the last compatible version of each mod.

Edited by IgorZ
1 person likes this

Share this post


Link to post
Share on other sites

Thank you,
the files tab on Curse told me that the versions CKAN would install for me are the latest for KSP 1.2.2.

Share this post


Link to post
Share on other sites

@IgorZ

We've discussed conditional stackability for KIS before, but if it's not looking likely that it'll be implemented in the short term, then I'd like to make some progress on fixing the collapsible cardboard box part of Surface Experiment Pack with whatever means are currently available.

The intended behavior of the cardboard box is as follows:

  • It starts "deployed"/"assembled", which means that it has ModuleKISInventory (so other parts can be put into it) and ModuleKISItem (to make it carriable like the KIS SC-62). In this state, ModuleKISItem will specify that it is not stackable, and give a volumeOverride that corresponds to a solid box.
  • If the inventory is empty (and has no custom name), then it can be "flattened"/"collapsed" by a EVA kerbal. ModuleKISInventory will be disabled on the part, and ModuleKISItem will be modified to specify that the part is stackable. volumeOverride will changed to correspond to a flat piece of cardboard (to save space when stored in inventory).
  • This can be reversed, i.e. a flattened box can be "deployed"/"assembled" back into a usable container by a EVA kerbal.

Currently, the plan is to implement "flatten" and "assemble" as KSPEvent in a separate PartModule (ModuleSEPBox):

  • include some safety checks:
    • ensure KIS is installed -- SEP already has KIS as a dependency, should not be a problem
    • the part must also have ModuleKISInventory and ModuleKISItem -- already in the part config
  • enable/disable ModuleKISInventory using part.Modules.GetModule<ModuleKISInventory>().enabled
  • ModuleKISItem.stackable and ModuleKISItem.volumeOverride are public, can be accessed/modified via part.Modules.GetModule<ModuleKISItem>()

But it appears that some changes in KIS code would also be needed in order to support the desired functionality.

Presently, KIS seems to operate on the premise that ModuleKISItem fields do not change at runtime. When creating a KIS_Item (from scene, from save, or by splitting a stack) these all ultimately result in a call to KIS_Item.InitConfig(), which actually obtains the ModuleKISItem fields (e.g. stackability) from the part prefab. Likewise, part volume calculation uses the volumeOverride value from the part prefab if it is present.

Hence, the main set of changes needed is to make it such that KIS will instead uses the runtime values in ModuleKISItem:

  • when creating KIS_Item from scene, try to obtain ModuleKISItem from the part instance itself first, before fall back on the part prefab if that fails
  • when creating KIS_Item from save, either:
    • ("hard" way) check if ITEM node has a PART node with MODULE node for ModuleKISItem, try to parse that first, before fall back on the part prefab, OR
    • ("lazy" way) serialize KIS_Item.stackable, KIS_Item.volume, etc in KIS_Item.OnSave; load those instead of getting from scratch from prefab
  • when creating KIS_Item due to stack splitting, copy existing KIS_Item fields instead of building new KIS_Item from scratch from prefab

A secondary change is needed when attempting to stack, so that *both* the existing item in inventory slot and the item/part being dropped into the slot are checked to ensure that they are stackable -- this is needed to prevent a "deployed" box from being added to a stack of "flattened" boxes.

Does this plan look correct / reasonable? Let me know if I've missed something. If it all looks fine, then with your permission, I can proceed to make the changes and submit a PR for your perusal.

 

Share this post


Link to post
Share on other sites
On 6/15/2017 at 1:42 AM, cakepie said:

Hence, the main set of changes needed is to make it such that KIS will instead uses the runtime values in ModuleKISItem:

  • when creating KIS_Item from scene, try to obtain ModuleKISItem from the part instance itself first, before fall back on the part prefab if that fails
  • when creating KIS_Item from save, either:
    • ("hard" way) check if ITEM node has a PART node with MODULE node for ModuleKISItem, try to parse that first, before fall back on the part prefab, OR
    • ("lazy" way) serialize KIS_Item.stackable, KIS_Item.volume, etc in KIS_Item.OnSave; load those instead of getting from scratch from prefab
  • when creating KIS_Item due to stack splitting, copy existing KIS_Item fields instead of building new KIS_Item from scratch from prefab

Making the item persistable doesn't look as a good solution to me: you never know who will need what property, and saving all of them is an overkill. Thus, the persistence logic must be moved into the custom module which knows what it needs. And the real question is: how to improve the ModuleKISItem class to let a custom module (a descendant) to adjust the item.

The code which deals with the volume will need to be change, of course. As an acceptable solution it can be changed to accept a ModuleKISItem instead of the part prefab. When needed (e.g. in GetPartExternalScaleModifier) the prefab can be obtained from the module. What is not an acceptable solution is passing a ConfigNode around, since it's too error prone.

On 6/15/2017 at 1:42 AM, cakepie said:

A secondary change is needed when attempting to stack, so that *both* the existing item in inventory slot and the item/part being dropped into the slot are checked to ensure that they are stackable -- this is needed to prevent a "deployed" box from being added to a stack of "flattened" boxes.

It sounds right given we want the item to become a dynamic entity.

You don't need to make a "golden" PR before bothering me. Feel free to ping me in the message with a link to your branch once you have a working concept.

Share this post


Link to post
Share on other sites

Guys, a challenge announce! We all know the ironical style of the core KSP: those funny names, descriptions, missions, etc. I'd love to extend this style to the KIS part descriptions (and KAS 1.0 as well, but it's a long term goal). Alas, I'm not a native English speaker, so my sense of humor may look awkward in this language :) Any volunteers to make the descriptions "KSP-style" in English?

Even more. I'm working on refactoring KIS to start using the KSP localization system. I don't think the localizations must be the exact translations of the original language (e.g. English). As long as you can give a funny and, yet, informative description of the part in your native language, feel free to do so. I will take the Russian localization, so for the stock languages we need Spanish, Chinese, and Japan. Before end of week I'll prepare an English .cfg localization file. For now you'll have to extract the strings yourselves, sorry.

Share this post


Link to post
Share on other sites

Hi. You may remember me, you helped me with a problem a week or so ago. As a native English speaker and (I like to think) a since of humor I would be glad to come up with part discriptions for KIS

1 person likes this

Share this post


Link to post
Share on other sites
50 minutes ago, Chesus said:

Hi. You may remember me, you helped me with a problem a week or so ago. As a native English speaker and (I like to think) a since of humor I would be glad to come up with part discriptions for KIS

Great! I'll spend some time today to prepare a basic localization file with the part strings. Will share it as soon as it's ready.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now