allista

[1.9-1.10] Configurable Containers

Recommended Posts

@KIMCHI so... maybe you just point me to the mod in question and I'll see what I can do?

Share this post


Link to post
Share on other sites
4 hours ago, allista said:

@KIMCHI so... maybe you just point me to the mod in question and I'll see what I can do?

Here you go! There is about 6 people I am currently PM'd with and we've been trying with limited success so this would be amazing if you get it to work.

Share this post


Link to post
Share on other sites
On 6/18/2020 at 7:54 PM, KIMCHI said:

Here you go! There is about 6 people I am currently PM'd with and we've been trying with limited success so this would be amazing if you get it to work.

My natural impulse is to make a patch that restricts the containers for HyperPlutonium to only allow Radioactives tank type. Would that be convenient?

Share this post


Link to post
Share on other sites

Version 2.5.0 for Kerbal Space Program 1.9.1

Released on 2020-07-05

  • Moved CC configs to AT_Utils GameData and removed CC-Core
  • Added resource max amount and max mass display
  • Added new patches
    • Dodo Labs - Stockalike Electron
    • Mk2 Hypersonic Systems
    • Mk-X
    • Hyper Propulsion
  • Updated patches
    • BDB
    • Mk2 Expansion
    • ReStock+
  • Only filter parts with B9 Part Switch if it has SUBTYPE with a tankType defined. This allowed to add CC to several parts that only had mesh/node variants, not the resource switching. Affects
    • Bluedog Design Bureau
    • Mk2 Expansion
    • Mk3 Expansion
  • Moved hangar resource tanks to FuelTank category
  • Removed the OPT patch since OPT Reconfig provides its own now
  • Minor fixes and improvements
  • Updated the list of supported mods in netkan

 Download (267.50 KiB) 

Share this post


Link to post
Share on other sites
Posted (edited)

I'm reimplementing the UI with uGUI, but the result seems a bit too visually complex.

Any comments or suggestions?

RNQTL12.png

Edited by allista

Share this post


Link to post
Share on other sites

For me, the current layout where all the info is in 1 line/row is ok.

The layout above splits that 1 line into 2 - 1st for type and the 2nd for the resource.

The 3rd resource in the example, Material Kits, shows the "Edit Tank Volume" function which took me some tries to figure out how to complete. Didn't realize that I had to press ENTER to exit it. So adding a Done button in the UI is helpful.

You can get rid of the fill percentage. At least with me, when I edit the tank, I have the PAW up, so I can see the fill percentage there. I assume the other numbers in the 2nd line are the fill units and mass. Those don't matter to me when I'm deciding to partition a tank. But they may be useful for others who demand precision. So maybe making some of the numbers optional even via a config file that can be edited offline, would be nice, so that I have the option to get rid of some of the numbers and end up with things being displayed in 1 line.

As a note, one of the reasons I use CC is to spead out batteries and the mass associated with them.  Since the batteries count towards dry mass, CC allows me to spread them out and fix the CoM of the ship when dry, without resorting to using separate parts for ballast. The current UI lets me do that without being cluttered.

Maybe make the Type dropdown in the middle section, where the resource details are, compact.  For example, instead of showing the whole "Liquid Chemicals", just show an abbreviation "LqC".  Then when clicked to display the dropdown, show the abbreviation and description "LqC - Liquid Chemicals" - same goes for other types.  That way, you have more room to play with in the 1st line of the details. We're more interested in the actual resource anyway. That's assuming you can have a dropdown list that is wider than the field being populated. It does mean that preset names have to be limited.

Separate ask... Can you make it such that tanks can also be configurable in flight when empty?  Give a cost to the conversion, similar to how Asteroid hatches can be reconfigured given resources are available.

But with CC tanks, make it such that it can only be reconfigured when (docked) with a Workshop and some qualified engineers.

Share this post


Link to post
Share on other sites
7 hours ago, bcqJC said:

Separate ask... Can you make it such that tanks can also be configurable in flight when empty?  Give a cost to the conversion, similar to how Asteroid hatches can be reconfigured given resources are available.

But with CC tanks, make it such that it can only be reconfigured when (docked) with a Workshop and some qualified engineers

That's an interesting suggestion. The limit to edit tank types of existing partitions and to add/remove partitions in flight is a role-playing limitation, so to speak. The idea is that a partition is built - lining, cooling, radioactive shielding, struts for components and all that. So I can't imagine how it would be possible to re-partition a tank without a dry dock, engineers and materials.

Sure, we have GC for the latter and Hangar for the former, but I'm not sure right now if how to integrate them with CC.

But I'll think about this. I like the idea.

Share this post


Link to post
Share on other sites
Posted (edited)

@bcqJC as for the UI, I have similar suggestions from @fatcargo (on my discord server; why don't you join us there? :D), so I'll be working along those lines.

Note, by the way, that the buttons on the first row that list volume, max amount and max mass - are all allow to edit the tank volume in respective units.

Edited by allista

Share this post


Link to post
Share on other sites

Version 2.6.0 for Kerbal Space Program 1.10.0

Released on 2020-07-22

New UI

  • Reimplemented tank manager UI from scratch with uGUI framework
  • Fixed counterparts rescaling with TweakScale
  • Improved tank types/configs tooltips by emphasizing with bold font
  • Minor performance improvements

 Download (341.86 KiB) 

Share this post


Link to post
Share on other sites
Posted (edited)

Same issue here: clicking on the "Edit Tank"button has no effect.

Fresh KSP 1.9.1 with all DLCs and

  • Module Manager 4.1.4,
  • AT Utils 19.5
  • Configurable Containers 2.6.0

Same issue if installed if CKAN or manually.

 Interesting entries in the logs:

[ERR 07:43:15.481] The AssetBundle 'file://C:\UserData\Vincent\Documents\My Games\KSP-1.9.1-Kerbalism\GameData\000_AT_Utils\at_utils_ui.ksp' can't be loaded because another AssetBundle with the same files is already loaded.

[ERR 07:43:15.481] Error while getting Asset Bundle: The AssetBundle 'file://C:\UserData\Vincent\Documents\My Games\KSP-1.9.1-Kerbalism\GameData\000_AT_Utils\at_utils_ui.ksp' can't be loaded because another AssetBundle with the same files is already loaded.

[ERR 07:43:15.481] AssetLoader: Bundle is null

and

[EXC 07:44:39.831] ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
Actual value was 0.
	System.Collections.Generic.SortedList`2[TKey,TValue].GetKey (System.Int32 index) (at <376e8c39bbab4f1193a569c8dbe4305c>:0)
	System.Collections.Generic.SortedList`2+KeyList[TKey,TValue].get_Item (System.Int32 index) (at <376e8c39bbab4f1193a569c8dbe4305c>:0)
	CC.UI.TankConfigsControl.updateConfigsDropdownTooltip (System.Int32 index) (at <765007bdf7e74f409794393c67b5df08>:0)
	CC.UI.TankConfigsControl.updateConfigsDropdown () (at <765007bdf7e74f409794393c67b5df08>:0)
	CC.UI.TankConfigsControl.SetTankManager (CC.UI.ITankManager manager) (at <765007bdf7e74f409794393c67b5df08>:0)
	CC.UI.TankManagerUI.SetTankManager (CC.UI.ITankManager newTankManager) (at <765007bdf7e74f409794393c67b5df08>:0)
	AT_Utils.SwitchableTankManagerUI.init_controller () (at <324244d7a45147de909b23df5034a14d>:0)
	AT_Utils.UIWindowBase`1+<Show>d__22[T].MoveNext () (at <035d89da618a4ef3851a6436fc3029c5>:0)
	UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at <5aeafee3fea24f37abd1315553f2cfa6>:0)
	UnityEngine.DebugLogHandler:LogException(Exception, Object)
	ModuleManager.UnityLogHandle.InterceptLogHandler:LogException(Exception, Object)
	UnityEngine.Debug:CallOverridenDebugHandler(Exception, Object)
[LOG 07:44:52.419] [UIApp] OnDestroy: 

Reverting to AT Utils 19.4 and CC 2.5.0.1 fixes the issue.

I hope it helps :) Thanks for your amazing mods!

Edited by Brimarx

Share this post


Link to post
Share on other sites
42 minutes ago, Brimarx said:

Same issue here: clicking on the "Edit Tank"button has no effect.

Fresh KSP 1.9.1 with all DLCs and

  • Module Manager 4.1.4,
  • AT Utils 19.5
  • Configurable Containers 2.6.0

Same issue if installed if CKAN or manually.

 Interesting entries in the logs:

 

 

I hope it helps :) Thanks for your amazing mods!

You should always provide the complete log file even when providing the snippets.  There is a lot of other information there which can sometimes be useful

Share this post


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

Same issue here: clicking on the "Edit Tank"button has no effect.

Fresh KSP 1.9.1 with all DLCs and

  • Module Manager 4.1.4,
  • AT Utils 19.5
  • Configurable Containers 2.6.0

Same issue if installed if CKAN or manually. Interesting entries in the logs:

Spoiler




[ERR 07:43:15.481] The AssetBundle 'file://C:\UserData\Vincent\Documents\My Games\KSP-1.9.1-Kerbalism\GameData\000_AT_Utils\at_utils_ui.ksp' can't be loaded because another AssetBundle with the same files is already loaded.

[ERR 07:43:15.481] Error while getting Asset Bundle: The AssetBundle 'file://C:\UserData\Vincent\Documents\My Games\KSP-1.9.1-Kerbalism\GameData\000_AT_Utils\at_utils_ui.ksp' can't be loaded because another AssetBundle with the same files is already loaded.

[ERR 07:43:15.481] AssetLoader: Bundle is null

and



[EXC 07:44:39.831] ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
Actual value was 0.
	System.Collections.Generic.SortedList`2[TKey,TValue].GetKey (System.Int32 index) (at <376e8c39bbab4f1193a569c8dbe4305c>:0)
	System.Collections.Generic.SortedList`2+KeyList[TKey,TValue].get_Item (System.Int32 index) (at <376e8c39bbab4f1193a569c8dbe4305c>:0)
	CC.UI.TankConfigsControl.updateConfigsDropdownTooltip (System.Int32 index) (at <765007bdf7e74f409794393c67b5df08>:0)
	CC.UI.TankConfigsControl.updateConfigsDropdown () (at <765007bdf7e74f409794393c67b5df08>:0)
	CC.UI.TankConfigsControl.SetTankManager (CC.UI.ITankManager manager) (at <765007bdf7e74f409794393c67b5df08>:0)
	CC.UI.TankManagerUI.SetTankManager (CC.UI.ITankManager newTankManager) (at <765007bdf7e74f409794393c67b5df08>:0)
	AT_Utils.SwitchableTankManagerUI.init_controller () (at <324244d7a45147de909b23df5034a14d>:0)
	AT_Utils.UIWindowBase`1+<Show>d__22[T].MoveNext () (at <035d89da618a4ef3851a6436fc3029c5>:0)
	UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at <5aeafee3fea24f37abd1315553f2cfa6>:0)
	UnityEngine.DebugLogHandler:LogException(Exception, Object)
	ModuleManager.UnityLogHandle.InterceptLogHandler:LogException(Exception, Object)
	UnityEngine.Debug:CallOverridenDebugHandler(Exception, Object)
[LOG 07:44:52.419] [UIApp] OnDestroy: 


 

Reverting to AT Utils 19.4 and CC 2.5.0.1 fixes the issue.

I hope it helps :) Thanks for your amazing mods!

The first is irrelevant, it's just the stock AssetLoader tries to load this bundle after it is already loaded by Unity. I will rename it so that it won't be recognised by the AssetLoader.

The second is the real thing. I admit, I didn't test it on KSP-1.9.1; with KSP-1.10 everything works. I'll check things out, thanks.

Share this post


Link to post
Share on other sites

@Brimarx no, cannot confirm you bug: loaded 1.9.1 and everything works as expected. Need full Player.log file to know more...

Share this post


Link to post
Share on other sites

Same here on 1.10, clicking on "edit tank" and nothing happens. Tried it on a bunch if different tanks and the "edit tank" button had no effect on any of them. I am admittedly running a bunch of mods that don't officially support 1.10,  so I wouldn't be surprised if it's a mod conflict causing the problems, but it worked before the last mod update, so something seems to have changed with this update.

Here is a copy of my player.log.

 

Share this post


Link to post
Share on other sites

I'm also seeing the same 'edit tanks' button doing nothing, on KSP 1.9.1 (still missing some critical to me mods preventing me from moving to 1.10) after installing the latest version.

Share this post


Link to post
Share on other sites
59 minutes ago, Michel Bartolone said:

I'm also seeing the same 'edit tanks' button doing nothing, on KSP 1.9.1 (still missing some critical to me mods preventing me from moving to 1.10) after installing the latest version.

Check if the GameData/ConfigurableContainers contains cc_ui.bundle file. If not, copy it over from 000_AT_Utils

And, anyone, Player.log, please :rolleyes:

1 hour ago, TJen said:

Here is a copy of my player.log.

Didn't see this. Thanks!

Share this post


Link to post
Share on other sites

I have reverted back to 25.01 as the new UI is obviously not fit for purpose at least not when it comes to working with other mods installed.

To be honest I don't like the new interface (From the pictures) it is messy and needlessly complicated I much prefer the old one, I made pretty much the same points with TCA when you changed that.

 

Share this post


Link to post
Share on other sites
18 minutes ago, Dave-Daring said:

I have reverted back to 25.01 as the new UI is obviously not fit for purpose at least not when it comes to working with other mods installed.

To be honest I don't like the new interface (From the pictures) it is messy and needlessly complicated I much prefer the old one, I made pretty much the same points with TCA when you changed that.

If you would be so kind as to explain what exactly in the new UI doesn't allow you to work with other mods? :rolleyes:

The main difference (aside the fact that it has much less impact on game performance) is that it places the controls in two rows, making the window not as wide as it used to be, but taller. Not a very drastic change, if I may say so myself.

All the controls remain where they were and act as before.

There are some new features, though: the ability to define tank volume in units or tonnage, for one; or the confirmation dialogs; or the tank part highlighting...

But that is not the final version of the UI; the main work for this version was to reimplement everything with uGUI.

Now I have much more freedom to make it look and feel different.

Share this post


Link to post
Share on other sites
Posted (edited)
12 hours ago, Michel Bartolone said:

Just FYI, I do have the cc_ui.bindle file in GameData/ConfigurableContainers

Found the problem.

@TJen, thanks again for the log!

@Brimarx and everyone else affected

While I'll be fixing it and releasing the fix, there's a simple workaround:

Add the GameData/ConfigurableContainers/VolumeConfigs.user file with at least one valid tank config, like this:

Spoiler

TANKCONF
{
    name = LFO-2
    TANK
    {
        TankType = LiquidChemicals
        CurrentResource = LiquidFuel
        InitialAmount = 1
        Volume = 45
    }
    TANK
    {
        TankType = LiquidChemicals
        CurrentResource = Oxidizer
        InitialAmount = 1
        Volume = 55
    }
}

 

UPD: issue to track

https://github.com/allista/ConfigurableContainers/issues/38

Edited by allista

Share this post


Link to post
Share on other sites
Posted (edited)
5 hours ago, allista said:

Found the problem.

While I'll be fixing it and releasing the fix, there's a simple workaround:

 

 

Thank you very much! I just tried this and it didn't help :(

Here is what I put in GamaData/ConfigurableContainers/VolumeConfigs.user:

------------
TANKCONF
{
    name = LFO-2
    TANK
    {
        TankType = LiquidChemicals
        CurrentResource = LiquidFuel
        InitialAmount = 1
        Volume = 45
    }
    TANK
    {
        TankType = LiquidChemicals
        CurrentResource = Oxidizer
        InitialAmount = 1
        Volume = 55
    }
}

------------------------

Permissions issue? Or maybe ab absolute path some place? (just completely wild speculation on my part) I'd post a log, but I can't find anything that ends in .log in my KSP installation!

 

Edited by Michel Bartolone
additional info

Share this post


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

Thank you very much! I just tried this and it didn't help :(

Here is what I put in GamaData/ConfigurableContainers/VolumeConfigs.user:

------------
TANKCONF
{
    name = LFO-2
    TANK
    {
        TankType = LiquidChemicals
        CurrentResource = LiquidFuel
        InitialAmount = 1
        Volume = 45
    }
    TANK
    {
        TankType = LiquidChemicals
        CurrentResource = Oxidizer
        InitialAmount = 1
        Volume = 55
    }
}

------------------------

Permissions issue? Or maybe ab absolute path some place? (just completely wild speculation on my part) I'd post a log, but I can't find anything that ends in .log in my KSP installation!

Hm... Maybe there are several issues involved?

Look for the log for Player.log according to this:

https://docs.unity3d.com/Manual/LogFiles.html

Share this post


Link to post
Share on other sites
Posted (edited)
7 hours ago, allista said:

Hm... Maybe there are several issues involved?

Look for the log for Player.log according to this:

https://docs.unity3d.com/Manual/LogFiles.html

I found this in the player log:


File 'H:/KSP_1.9.1_w_BG1.4.1 W_all_mods/KSP_x64_Data/../GameData\ConfigurableContainers\VolumeConfigs.user' does not exist

and also of note, I didn't even get that message when I don't have that file!

Notice the KSP_x64_Data/../GameData? and the change from the unix/linux forward slash to the windows backslash?

I know that I've experienced issues in the past, when someone would do a copy and paste from a document (usually 'word') into some code especially when pasting into a unix/linux code file. That was a long time ago (pre Win10), and _may_ be irrelevant, but it's always best to check. I am looking into getting you the full player.log (I had to do some searching to find it...it was not at the path specified in that article) but need to find a site to host it.

Here is the player.log  https://www.dropbox.com/s/s70q5l9flr53nwa/Player.log?dl=0

Edited by Michel Bartolone

Share this post


Link to post
Share on other sites

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.