Jump to content

[1.9.x] OSE Workshop Reworked - KIS Addon


linuxgurugamer

Recommended Posts

On 12/27/2020 at 4:25 PM, linuxgurugamer said:

If you do work on this, please touch base with me so we don’t duplicate each other’s work

Hi again @linuxgurugamer, I had some spare time so I've started working on it.

It's actually pretty trivial to make it use stock inventories as well as/instead of KIS ones. I've thrown together a crude but working version already (in the sense that you can produce an item and it is added to the inventory; it's far from robust, ignores a lot of things and doesn't have its own recipes or anything yet, but works as a proof of concept). Unfortunately the mod relies on KIS for more than just a place to put the finished items, so to remove it entirely as a dependency would take more work.

Link to comment
Share on other sites

1 hour ago, Alphathon said:

Hi again @linuxgurugamer, I had some spare time so I've started working on it.

It's actually pretty trivial to make it use stock inventories as well as/instead of KIS ones. I've thrown together a crude but working version already (in the sense that you can produce an item and it is added to the inventory; it's far from robust, ignores a lot of things and doesn't have its own recipes or anything yet, but works as a proof of concept). Unfortunately the mod relies on KIS for more than just a place to put the finished items, so to remove it entirely as a dependency would take more work.

Thanks in advance for looking into it.  Given some of my other favorite mods are working towards stock inventory and removing KIS as a dependency, it would be amazing to have this also utilize stock inventory.

Link to comment
Share on other sites

1 hour ago, Alphathon said:

Hi again @linuxgurugamer, I had some spare time so I've started working on it.

It's actually pretty trivial to make it use stock inventories as well as/instead of KIS ones. I've thrown together a crude but working version already (in the sense that you can produce an item and it is added to the inventory; it's far from robust, ignores a lot of things and doesn't have its own recipes or anything yet, but works as a proof of concept). Unfortunately the mod relies on KIS for more than just a place to put the finished items, so to remove it entirely as a dependency would take more work.

If you have a github account, throw it up there, I’d like to see what you did.

I was going to look at this tomorrow night, and I want to see why it is dependent on KIS beyond the inventory

Edited by linuxgurugamer
Link to comment
Share on other sites

2 hours ago, linuxgurugamer said:

If you have a github account, throw it up there, I’d like to see what you did.

I was going to look at this tomorrow night, and I want to see why it is dependent on KIS beyond the inventory

I don't unfortunately. (I'll make one at some point once I'm closer to releasing my version.)

It's not really in a fully working state yet anyway. At the moment it basically checks if the part being produced has one of the cargo modules (ModuleCargoPart, ModuleGroundExperiment etc; I can list them all if you want). If it does it checks all parts in the vessel for the module ModuleInventoryPart, and adds any it finds to a list (it does not currently check for Kerbal inventories; I'm not sure how to do that yet). From there it loops over the list items and when it finds one with enough space* and at least one empty slot adds the part to it using ModuleInventoryPart.StoreCargoPartAtSlot(part, ModuleInventoryPart.inventoryModule.FirstEmptySlot()). (*The volume check is not currently working[nvm, I fixed it]. Interestingly it just adds the part anyway and goes over the max volume.) It does not yet take item stacking into account. It may be better to just skip the "adding to list" part and do it as it finds the inventory modules, but this way mirrors what the mod already does with KIS's inventories (so that some can be favoured I think).

As for why else it is dependent, the workshop also uses KIS's volume calculator in the part recipes (which would obviously no longer be used in a stock-only version) and KIS's part thumbnail renderer. There may be other things it uses that I'm not thinking of/haven't come across. The recycler is much more dependent on it though as it is basically designed to manipulate the existing contents of inventories so at the very least the UI would have to be rewritten.

Edited by Alphathon
Link to comment
Share on other sites

6 hours ago, Alphathon said:

I don't unfortunately. (I'll make one at some point once I'm closer to releasing my version.)

It's not really in a fully working state yet anyway. At the moment it basically checks if the part being produced has one of the cargo modules (ModuleCargoPart, ModuleGroundExperiment etc; I can list them all if you want). If it does it checks all parts in the vessel for the module ModuleInventoryPart, and adds any it finds to a list (it does not currently check for Kerbal inventories; I'm not sure how to do that yet). From there it loops over the list items and when it finds one with enough space* and at least one empty slot adds the part to it using ModuleInventoryPart.StoreCargoPartAtSlot(part, ModuleInventoryPart.inventoryModule.FirstEmptySlot()). (*The volume check is not currently working[nvm, I fixed it]. Interestingly it just adds the part anyway and goes over the max volume.) It does not yet take item stacking into account. It may be better to just skip the "adding to list" part and do it as it finds the inventory modules, but this way mirrors what the mod already does with KIS's inventories (so that some can be favoured I think).

As for why else it is dependent, the workshop also uses KIS's volume calculator in the part recipes (which would obviously no longer be used in a stock-only version) and KIS's part thumbnail renderer. There may be other things it uses that I'm not thinking of/haven't come across. The recycler is much more dependent on it though as it is basically designed to manipulate the existing contents of inventories so at the very least the UI would have to be rewritten.

Ok, I'll leave you to it.  Not that I don't have enough else to do, DangIt for example

Link to comment
Share on other sites

18 hours ago, Alphathon said:

Hi again @linuxgurugamer, I had some spare time so I've started working on it.

It's actually pretty trivial to make it use stock inventories as well as/instead of KIS ones. I've thrown together a crude but working version already (in the sense that you can produce an item and it is added to the inventory; it's far from robust, ignores a lot of things and doesn't have its own recipes or anything yet, but works as a proof of concept). Unfortunately the mod relies on KIS for more than just a place to put the finished items, so to remove it entirely as a dependency would take more work.

Very cool! Hey check to see if you can build station modules and landed modules (USI MKS) in it. Apparently there are some of those modules which are simply not fitting into inventories even if enough space. I'll be looking at this issue in my KIFA mod as well. 

Link to comment
Share on other sites

1 hour ago, Atlas Gaming said:

Very cool! Hey check to see if you can build station modules and landed modules (USI MKS) in it. Apparently there are some of those modules which are simply not fitting into inventories even if enough space. I'll be looking at this issue in my KIFA mod as well. 

I'll DL MKS and take a look (I don't use it myself). I assume you mean using KIFA to generate the cargo modules (or does MKS already have its own?)

Link to comment
Share on other sites

5 minutes ago, Alphathon said:

I'll DL MKS and take a look (I don't use it myself). I assume you mean using KIFA to generate the cargo modules (or does MKS already have its own?)

KIFA both adds cargo modules if none are on craft and makes mod parts be able to fit into stock containers. But I think there is some built in limits from Squad on types of things (bases) which can fit into stock containers. I'll play with it some more this afternoon.

Link to comment
Share on other sites

1 hour ago, Atlas Gaming said:

Very cool! Hey check to see if you can build station modules and landed modules (USI MKS) in it. Apparently there are some of those modules which are simply not fitting into inventories even if enough space.

Do you have any particular parts in mind? It would help a great deal to know which parts aren't working but are expected to.

Link to comment
Share on other sites

11 minutes ago, Atlas Gaming said:

I've not had time to look yet... guy on KIFA forum mentioned USI Pioneer modules (bases really)

The only "Pioneer module" I can find is the "MKS 'Duna' Pioneer Module" and it doesn't have a cargo part module, so cannot be placed in a stock inventory. Since none of the stock containers can be put in other containers I would assume the cargo part module and the inventory module are mutually exclusive, so KSP either just ignores the cargo part module or the order they're defined in determines which one "sticks". Since your mod adds an inventory to all crewed parts, no crewed part will ever be able to be put in an inventory. I tested this by only using AllowModPartsInStock.cfg (i.e. I removed InventoryforAll.cfg) and all the parts can now be put in containers (at least theoretically).

It's also worth noting that the inflatable MKS habitats have an inventory module with 0 slots, presumably because they have 0 crew capacity. (As such, they also cannot be stored.) You might want to take that into account in your patches.

Link to comment
Share on other sites

  • 1 month later...

Not sure about bug reporting etiquette: are reports welcome when running this mod on 1.11.1, or should I wait for the mod to be explicitly released for that version first? It seems to be working mostly fine but there's some weirdness going on when calculating the time to build a part when the workshops have engineers (3.5 hours for an EAS-1 seat) versus non-engineers (8 minutes for same part) in them. If it's okay I'll post the proper full report.

Link to comment
Share on other sites

24 minutes ago, Qyst said:

Not sure about bug reporting etiquette: are reports welcome when running this mod on 1.11.1, or should I wait for the mod to be explicitly released for that version first? It seems to be working mostly fine but there's some weirdness going on when calculating the time to build a part when the workshops have engineers (3.5 hours for an EAS-1 seat) versus non-engineers (8 minutes for same part) in them. If it's okay I'll post the proper full report.

Not compatible with 1.11, do not run or report any 1.11 bugs since it 's not compatible. 

Link to comment
Share on other sites

  • 1 month later...
1 hour ago, xlmt4567 said:

i have a problem, when i  access the ose workbench nothing show up, not even a part list or anything, still couldn't figure out y, i have install every dependency mod, , plz tell me what going on. Thks :)

Would help to know what you are doing.  A log file would be helpful

Link to comment
Share on other sites

1 hour ago, linuxgurugamer said:

Would help to know what you are doing.  A log file would be helpful

sorry for taking so long, but here is the ksp log file :

https://www.dropbox.com/s/cweh1nb44jyxvsi/KSP.log?dl=0

 

while here is the picture, still clickin it and nothing show up:

 

https://www.dropbox.com/s/50eykhyfn2cwpro/Capture.PNG?dl=0

 

 

 

 

Link to comment
Share on other sites

  • 2 weeks later...

Hi all. I know it's been a while since I posted an update, and I thought I should probably fill you all in on how it's going.

Rest assured I am still working on this. I have set up a dev thread detailing my progress so far, planned features and what I plan to do with regard to release. The simple version is that I am approaching a releasable version of some form. I would consider this to be a pre-release of some description (which I'd probably call an alpha rather than a beta as it probably won't be feature-complete and will undoubtedly be buggy) rather than a fully-fledged release, as many of the changes made will require more testing than I can do alone, especially given the vast number of mod and version combinations likely to be in use which may interact with it in unforeseen ways.

https://forum.kerbalspaceprogram.com/index.php?/topic/201718-wip19x–111x-ose-workshop-continuation-name-tbd/&do=findComment&comment=3954489

On 2/13/2021 at 3:48 AM, Qyst said:

Not sure about bug reporting etiquette: are reports welcome when running this mod on 1.11.1, or should I wait for the mod to be explicitly released for that version first? It seems to be working mostly fine but there's some weirdness going on when calculating the time to build a part when the workshops have engineers (3.5 hours for an EAS-1 seat) versus non-engineers (8 minutes for same part) in them. If it's okay I'll post the proper full report.

If you want to post more information in the dev thread you are more than welcome to. I cannot guarantee support as such but it would be helpful to know the details so I can potentially fix the issue as part of development. I did have a quick look and couldn't replicate the problem in my test game (when crewed with two 5-star engineers in a sandbox game the build time was 6m, 56s). It's possible that whatever was causing the problem has already been fixed as a result of other changes I have made. However, I didn't do much in the way of thorough testing in different game types etc.

Edited by Alphathon
Link to comment
Share on other sites

  • 1 year later...

I recently tried using this mod in a heavily modded install, though it was failing with error:

"NullReferenceException: Object reference not set to an instance of an object"

I uninstalled and reinstalled mods to track down the incompatibility and found out a conflict between the following two mods:

KSP: 1.8.1
OSEWorkShopReworked: 1.2.14.2
Konstruction: 112.0.1

Posting this for the sake of documentation. Maybe it can help somebody.

Link to comment
Share on other sites

While trying to build a ship in orbit with Extraplanetary Launchpads, I ran into another situation.

For the building resources, the dialog box shows duct tape as a requirement to build the craft.

Though I have duct tape in a KIS container,  it is not picked up by the mod.

Since duct tape is an item from OSE workshop, I assume EL is being patched by OSE to make duct tape a requirement?

How can I disable this? It would make life easier, especially with the 2 different inventory systems.

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