Jump to content

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


IgorZ

Recommended Posts

6 hours ago, bobisback said:

So I loaded up a bunch of tools into seat one and seat two of my cockpit. When i get to space though I am not sure how to access them. Nothing shows up on the menu of the cockpit and my kerbal's inventory is empty. Any ideas?

The kerbal must be seated at the moment of launch to use the items that you've assigned in the editor. If you want to deliver items and kerbals separately, then you need using special parts - containers.

Link to comment
Share on other sites

I have a problem with parts on the ground. I often place a part on the ground only to have it detonate a few seconds later. This occurs whether or not the part is actually attached to the ground. Each time I leave an area and return to it half or more of the parts on the ground or attached to it are gone. Sometimes I hear the explosions as I arrive. This glitch has destroyed 100% of the grounded parts I have on Duna and everything attached to them. It does not occur when the parts are attached to a ship. Parts stored onboard ships are safe.

Is this common? Is there a known fix? It's a real show stopper for me.

Link to comment
Share on other sites

3 minutes ago, Ron Devu said:

I have a problem with parts on the ground. I often place a part on the ground only to have it detonate a few seconds later. This occurs whether or not the part is actually attached to the ground. Each time I leave an area and return to it half or more of the parts on the ground or attached to it are gone. Sometimes I hear the explosions as I arrive. This glitch has destroyed 100% of the grounded parts I have on Duna and everything attached to them. It does not occur when the parts are attached to a ship. Parts stored onboard ships are safe.

Is this common? Is there a known fix? It's a real show stopper for me.

Very common, there's lots of various attempts at fixing it.  ;)

The issue is that the surface of the ground is computed, not exactly fixed - as are the parts locations.  If rounding errors mean they overlap - kaboom.  Best fixes are not attaching to the ground, and using something like World Stabilizer which lifts the parts a bit on scene load, or using something like MKS's ground tether/WBI's parking brake to keep things stable.

Link to comment
Share on other sites

2 hours ago, Ron Devu said:

Is this common? Is there a known fix? It's a real show stopper for me.

I can only confirm what @DStaal said. This problem was existing from the beginning of KIS mod, but with earlier game versions it was less probable. Now, with all the updates, it's almost guaranteed that an attached part will eventually explode. So, the best suggestion is to not use this feature and don't count on it in the base building. The only stable solution till now is assigning an incredibly huge inertia to the part. Such part won't be attached to the surface, but it is almost impossible to move it (afaik, that's exactly what MKS ground tether does). However, before integrating this solution into KIS, an extensive testing and researching must be done. Not gonna happen in KIS v1.

Link to comment
Share on other sites

1 hour ago, IgorZ said:

I can only confirm what @DStaal said. This problem was existing from the beginning of KIS mod, but with earlier game versions it was less probable. Now, with all the updates, it's almost guaranteed that an attached part will eventually explode. So, the best suggestion is to not use this feature and don't count on it in the base building. The only stable solution till now is assigning an incredibly huge inertia to the part. Such part won't be attached to the surface, but it is almost impossible to move it (afaik, that's exactly what MKS ground tether does). However, before integrating this solution into KIS, an extensive testing and researching must be done. Not gonna happen in KIS v1.

 

Ok here's my solution. Kick it around. I believe that:

1,. No vessel created in the VAB has this problem.

2. No debris created by the crash of a VAB-created vessel has this problem.

3. Thus, every piece of debris from a VAB-created ship inherits vessel status from it's parent ship when the ship breaks up.

4. No part in KIS inventory has vessel status.

5. Having vessel status includes regular application of some kind of clipping correction algorithm.

6. Thus, when parts are attached to a ship they become part of a vessel and benefit from the anti-clipping algorithm.

7. The solution to the problem is to ensure that every part taken from inventory and placed using engineer tools is assigned vessel status, if it would not otherwise inherit vessel status.

As a possibly irrelevant side note:

8. All Kerbals have vessel status.

Edited by Ron Devu
new thoughts
Link to comment
Share on other sites

58 minutes ago, Ron Devu said:

No vessel created in the VAB has this problem.

What "this problem" can be for a vessel created in VAB? We're talking about pylons being attached to the surface in flight. Have you tried to launch a lone pylon from VAB to ensure it never explodes when attached to the surface, say, on Duna? I wonder how you did that.

And could you please elaborate what exactly is this "status" that exists for the other vessels but not for the vessels, created by KIS? Preferably, in terms of code components.

Link to comment
Share on other sites

1 hour ago, IgorZ said:

What "this problem" can be for a vessel created in VAB? We're talking about pylons being attached to the surface in flight. Have you tried to launch a lone pylon from VAB to ensure it never explodes when attached to the surface, say, on Duna? I wonder how you did that.

And could you please elaborate what exactly is this "status" that exists for the other vessels but not for the vessels, created by KIS? Preferably, in terms of code components.

"This problem" refers to things on the ground spontaneously exploding. A VAB created vessel does not do this.

For info on what a vessel is, i can only refer you to this page : https://wiki.kerbalspaceprogram.com/wiki/API:Vessel

I assume the game keeps a list of active vessels at all times and does frequent collision checking on them.

I suspect that parts taken from inventory and placed via KIS/KAS are not being entered on the vessel list mentioned in the link, and thus do not benefit from all utilities that ensure vessels do not do things like suddenly shoot up in the air and explode.

If they are, in fact, being created as vessels, then surely it must be the case that KIS/KAS is not handling collision detection the same way the main KSP program does.

Mind you these are all just suspicions and beliefs, not hard facts, and I am certainly not a programming expert.

Link to comment
Share on other sites

37 minutes ago, Ron Devu said:

"This problem" refers to things on the ground spontaneously exploding. A VAB created vessel does not do this.

Unsure of where your getting your info on this, however VAB created vessel can and will spontaneously explode while on the ground .... I refer you to your late comment quoted below ......

37 minutes ago, Ron Devu said:

Mind you these are all just suspicions and beliefs, not hard facts, and I am certainly not a programming expert.

:rolleyes:

37 minutes ago, Ron Devu said:

For info on what a vessel is, i can only refer you to this page : https://wiki.kerbalspaceprogram.com/wiki/API:Vessel

I assume the game keeps a list of active vessels at all times and does frequent collision checking on them

I'm fairly certain that @IgorZknows what a vessel is

37 minutes ago, Ron Devu said:

I suspect that parts taken from inventory and placed via KIS/KAS are not being entered on the vessel list mentioned in the link, and thus do not benefit from all utilities that ensure vessels do not do things like suddenly shoot up in the air and explode.

How KIS attaches parts is through Unity, not necessarily KSP itself ... take a look at the code and you will see this, the parts are being directly instantiated by KIS/KAS

Oh, I guess I should think about your later statement again linked below ......

37 minutes ago, Ron Devu said:

Mind you these are all just suspicions and beliefs, not hard facts, and I am certainly not a programming expert.

Anyways, @IgorZ, perhaps directly turning off the collides before instantiating the parts may help .. Take a look at the reloadable missile rail I put into BDAc, I had to do something funky with the colliders to keep missiles from going off during reload if I remember correctly

EDIT: I think I remember .... something about KSP needing 3 fixed updates to allow for some kraken sauce to do its thing ... It should still be in BDAc although I haven't looked at that code for over a year

Credit @flywlyxfor that ... at least I believe it was them who did the original reloadable missile deal

Edited by DoctorDavinci
Link to comment
Share on other sites

1 hour ago, Ron Devu said:

I suspect that parts taken from inventory and placed via KIS/KAS are not being entered on the vessel list mentioned in the link, and thus do not benefit from all utilities that ensure vessels do not do things like suddenly shoot up in the air and explode.

This guess is totally wrong. All parts created by KIS are vessels, otherwise the game would not be able to deal with them. Even when you see a lone part (say, pylon) it's a standalone vessel from the game's perspective.

1 hour ago, Ron Devu said:

Mind you these are all just suspicions and beliefs, not hard facts, and I am certainly not a programming expert.

Too bad. I hoped you can give useful information on how we can solve this years-old problem...

51 minutes ago, DoctorDavinci said:

Anyways, @IgorZ, perhaps directly turning off the collides before instantiating the parts may help .. Take a look at the reloadable missile rail I put into BDAc, I had to do something funky with the colliders to keep missiles from going off during reload if I remember correctly

The root of the problem is actually well known. It's about how the the vessels positioning works. The "surface" is a dynamic thing in KSP. What was at the game save is not what will be at the load of this saved state. When game loads the state, it repositions all the vessels in the scene to put them on surface. If vessel is rigidly attached to a fixed point, this process cannot be accomplished. So, now you're gambling: the vessel can end up on the surface (good), below it (kaboom or jump up), or above it (welcome "hanging" objects). The hanging objects have a nasty side effect: they fall thru terrain on time warp since the game assumes they are in "fly" situation. The main output from this: never attach vessels to a fixed position! I loved the static attach feature in the game (used it many times in the old carrier games), but today it simply unsafe. The only reason why I've left this feature in KIS is because I started working on KIS v2, leaving v1 in a maintenance state.

I think there may be some hacks to get it around. In the worst case, the whole repositioning logic can be duplicated to align the attached object on load! Never spent enough time to investigate it though. The inertia hack looks promising and easy to implement, but my guts tell there will be nasty edge cases. Thus, investigation and test are needed.

Link to comment
Share on other sites

20 minutes ago, IgorZ said:

So, now you're gambling: the vessel can end up on the surface (good), below it (kaboom or jump up), or above it (welcome "hanging" objects). The hanging objects have a nasty side effect: they fall thru terrain on time warp since the game assumes they are in "fly" situation. The main output from this: never attach vessels to a fixed position! I loved the static attach feature in the game (used it many times in the old carrier games), but today it simply unsafe.

Could a variant of @whale_2's World Stabilizer fix improve things at all?

 

Link to comment
Share on other sites

1 hour ago, IgorZ said:

This guess is totally wrong. All parts created by KIS are vessels, otherwise the game would not be able to deal with them. Even when you see a lone part (say, pylon) it's a standalone vessel from the game's perspective.

Too bad. I hoped you can give useful information on how we can solve this years-old problem...

 

Yeah, me too. I really thought I had it cornered there. I'm surprised to find that VAB-sourced vessels do explode without warning. I saw Scott Manley lose a rover that way, but it was built entirely of physics-less parts and vibrated wildly for a good 30 seconds before she blew. Quite different.

So it's not possible to simply copy the positioning strategy the main game uses? KIS/KAS is such a major mod, you'd think Squad would be willing to quietly share some advice and maybe even provide some code.

Link to comment
Share on other sites

7 minutes ago, Ron Devu said:

So it's not possible to simply copy the positioning strategy the main game uses?

Copy is never an option (not to mention it's illegal from the game's terms of service). Whatever code Squad team made, they made it for their own use-case. KIS/KAS case is different. So, "duplicating the logic" will be "implementing own solution" anyway. I'm not saying it's completely not feasible, but it would take tremendous amount of efforts. Which at this moment I cannot invest into the mod (and it's not a strong "no" to the idea).

9 minutes ago, Ron Devu said:

KIS/KAS is such a major mod, you'd think Squad would be willing to quietly share some advice and maybe even provide some code.

I don't think Squad team should spend their time on third-party mods, even if those mods are popular. I'm pretty sure Squad team thinks the same, and it's a fair position. They have their vision on the game and this vision seems right (see at the popularity of this game over the years!). If one day they decide to implement own version of KIS/KAS in the core game, it would be my best day :)  Before it happen, we have what we have.

1 hour ago, Jacke said:

Could a variant of @whale_2's World Stabilizer fix improve things at all?

It could. Or it could not :)  I cannot answer without thorough investigation, and my focus is currently on KIS v2 Beta preparation.

Link to comment
Share on other sites

2 minutes ago, IgorZ said:

Copy is never an option (not to mention it's illegal from the game's terms of service). Whatever code Squad team made, they made it for their own use-case. KIS/KAS case is different. So, "duplicating the logic" will be "implementing own solution" anyway. I'm not saying it's completely not feasible, but it would take tremendous amount of efforts. Which at this moment I cannot invest into the mod (and it's not a strong "no" to the idea).

I don't think Squad team should spend their time on third-party mods, even if those mods are popular. I'm pretty sure Squad team thinks the same, and it's a fair position. They have their vision on the game and this vision seems right (see at the popularity of this game over the years!). If one day they decide to implement own version of KIS/KAS in the core game, it would be my best day :)  Before it happen, we have what we have.

Well, I was hoping for "copy with permission" not "steal the code"!

Anyhow one day an attachment and inventory system will have to be part of the core game. I can't see it as anything but inevitable. The idea is just too much fun to ignore. When that happens, it will be time for you to buy that island near Tahiti you've always wanted. :)

Link to comment
Share on other sites

1 hour ago, Trolol29 said:

OK, je vais le faire pour mon jeu. Si nous pouvons modifier le mod pour un usage personnel! :wink:

Translation: "Ok, I will do it for my game.  If we can modify the mod for personal use."

First, I suspect the moderators will ask you to stick to English in this part of the forums.  C'est la vie.

Second, the mod license is on the GitHub page:

Quote

Copyright Overview

  • Models and textures was created by Winn75, who retains the copyright.
  • Config files, source code and compiled binaries are under copyright retained by KospY.

YOU MAY :

  • Distribute your own parts using any part modules included.
  • Distribute fixes in case of a compatibility problem with a new version of KSP (.dll only).
  • Distribute video, screenshots or other media portraying KIS in action.
  • Distribute modified or unmodified versions of the KIS plugin source code on condition that a link to this license is included.
  • Modify KIS in any way for personal use.
  • Request a waiver of any of these terms.

All other rights are reserved.

Accordingly, license allows you to modify KIS for your personal game.  I would add that provided that you don't complain your version of the mod isn't working after you've altered it, or feel entitled to support from IgorZ, have fun.

I may be overruled on this if I've misinterpreted the license.

Link to comment
Share on other sites

5 hours ago, Brigadier said:

Traduction: "Ok, je vais le faire pour mon jeu. Si nous pouvons modifier le mod pour un usage personnel."

Tout d’abord, je pense que les modérateurs vous demanderont de vous en tenir à l’anglais dans cette partie des forums. C'est la vie.

Deuxièmement, la licence du mod est sur la page GitHub:

En conséquence, la licence vous permet de modifier KIS pour votre jeu personnel. J'ajouterais que pourvu que vous ne vous plaigniez pas de votre version du mod ne fonctionne pas après que vous l'ayez modifiée, ou que vous vous sentiez autorisé à supporter IgorZ, amusez-vous.

Je peux être annulé à ce sujet si j'ai mal interprété la licence.

Oh, I forgot to translate...

Link to comment
Share on other sites

I apologize if this bug has been discussed, I couldn't find it in search so posting.  I noticed that if I have a electric screwdriver on a kerbal used to attach parts then pit them inside a hab, and then leave the area (do another launch usually) when I come back to use the kerbal, the electric screwdriver is gone. I though it was a fluke, but tried it a few more times and realized that this happens every time. It doesn't go into their inventory in the module, it just disappears. My solution was to bring 20 electric screwdrivers up to the moon hab to be sure I always had one, but this seems like a bug not a feature???

FYI my only testing has been on buildings or vehicles from USI Kerbalism... but I can test it on other vehicles if no one else is having this problem.

 

Link to comment
Share on other sites

23 minutes ago, Atlas Gaming said:

I apologize if this bug has been discussed, I couldn't find it in search so posting.  I noticed that if I have a electric screwdriver on a kerbal used to attach parts then pit them inside a hab, and then leave the area (do another launch usually) when I come back to use the kerbal, the electric screwdriver is gone. I though it was a fluke, but tried it a few more times and realized that this happens every time. It doesn't go into their inventory in the module, it just disappears. My solution was to bring 20 electric screwdrivers up to the moon hab to be sure I always had one, but this seems like a bug not a feature???

FYI my only testing has been on buildings or vehicles from USI Kerbalism... but I can test it on other vehicles if no one else is having this problem.

Are these USI inflatable parts?  If so, it's a known limitation - since the parts don't have seats at launch, they don't have any seat inventory.  It's best to give them a toolbox someplace have your Kerbals stow their tools.

Link to comment
Share on other sites

2 hours ago, Atlas Gaming said:

apologize if this bug has been discussed, I couldn't find it in search so posting.  I noticed that if I have a electric screwdriver on a kerbal used to attach parts then pit them inside a hab, and then leave the area (do another launch usually) when I come back to use the kerbal, the electric screwdriver is gone. I though it was a fluke, but tried it a few more times and realized that this happens every time. It doesn't go into their inventory in the module, it just disappears

I have noticed since Breaking ground came out, if a kerbal with an equipped KIS tool (screwdriver or wrench) boards a craft, the equipped tool usually disappears.  Not every time, and at least once I've had it show up in the inventory of a different kerbal who was in the same pod.  If I unequip the tool before boarding a craft, it seems to work normally for me.

Edited by Cavscout74
Link to comment
Share on other sites

7 minutes ago, Cavscout74 said:

I have noticed since Breaking ground came out, if a kerbal with an equipped KIS tool (screwdriver or wrench) boards a craft, the equipped tool usually disappears.  Not every time, and at least once I've had it show up in the inventory of a different kerbal who was in the same pod.  If I unequip the tool before boarding a craft, it seems to work normally for me.

Can you reproduce it on the stock parts? I'm not sure, but does Breaking Ground have inflatable parts? I.e. parts with variable number of seats.

Link to comment
Share on other sites

2 minutes ago, IgorZ said:

Can you reproduce it on the stock parts? I'm not sure, but does Breaking Ground have inflatable parts? I.e. parts with variable number of seats.

I honestly can't remember what parts it happened on, although I'm fairly certain some were stock pods.  I don't think BG has any inflatable parts, and I have very few from any of my installed mods - and most were higher tech than what I had unlocked when I found the bug.  Once I figured out what was happening, I chocked it up to BG interfering with KIS and started making sure to unequip tools or put them in storage before boarding craft.  I can try to check specific pods this weekend to see for sure if it's stock or mod parts.

Link to comment
Share on other sites

I haven't noticed disappearing tools in 1.7.x, but I also haven't had time to play much in the last month. I did notice the problem with inflatable parts and just set up patches to set the crew capacity deflated equal to the inflated capacity on the few parts I have that do this. It's on the honor system that I don't load them with Kerbals until the parts are inflated, but it works around the KIS inventory issue. I think I only had 4 or 5 parts total that did this.

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