Jump to content

[WIP][1.9.x?–1.12.x] OSE Workshop continuation (name TBD)


Alphathon

Recommended Posts

On 5/27/2021 at 2:29 PM, Alphathon said:

I would also assume it would respect the stock UI scale setting, as I think that applies automatically to all UI elements. (I haven't tested this though so I may be wrong.)

 

On 6/8/2021 at 3:28 AM, 610yesnolovely said:

Really looking forward to trying this out, even if it's in beta (I don't mind bleeding edges). There's some excellent attention to detail - I did try the original OSE Workshop just to see how it works.

The only downside is I hardly ever get far enough to build things off planet - constantly upgrading KSP and restarting careers as modders bring out even more cool mods.

Definitely would appreciate scaling support, I play at 4K so there's one or two really old mods that don't do this, I may have to buy a physical magnifying glass :lol:

Thanks!

I've just tested it with the UI scaling and it would seem KSP doesn't apply it automatically :/. Looks like I've got something to add to the to-do list. I don't know whether I'll do it before the initial release or not but it will come.

On a more general note I haven't much progress to share. (I've been busy with work so haven't had a great deal of spare time.) I have done some work on the recycler though: the UI now resembles the Workshop's, inventory items are separated by container (rather than all just appearing in one long list) and the recycler lists items in stock inventories as well as KIS ones (although it cannot yet recycle them). I've also been playing around with sound effects when buttons are pressed etc although I'm not sure if they'll remain in the final version.

Edited by Alphathon
Link to comment
Share on other sites

  • 4 weeks later...

Hi all. Sorry for my longer-than-usual absence. Work is still keeping me quite busy so haven't had much time to devote to development. I have however got UI scaling working across both the Workshop and the Recycler, although it needs some refinement here and there. (Scaling a pixel-based layout by a non-round number results in numerous slight misalignments and such which need to be sorted.)

Thankfully 1.12 doesn't seem to have caused any issues with the mod so at least I haven't had anything to deal with on that front.

Edited by Alphathon
typo
Link to comment
Share on other sites

14 hours ago, Alphathon said:

Hi all. Sorry for my longer-than-usual absence. Work is still keeping me quite busy so haven't had much time to devote to development. I have however got UI scaling working across both the Workshop and the Recycler, although it needs some refinement here and there. (Scaling a pixel-based layout by a non-round number results in numerous slight misalignments and such which need to be sorted.)

Thankfully 1.12 doesn't seem to have caused any issues with the mod so at least I haven't had anything to deal with on that front.

Real life is important, but glad to hear about progress. UI scaling is handy for us 4K monitor users (leans in and squints at several mods UI that don't support scaling).

Link to comment
Share on other sites

23 hours ago, Alphathon said:

Hi all. Sorry for my longer-than-usual absence. Work is still keeping me quite busy so haven't had much time to devote to development. I have however got UI scaling working across both the Workshop and the Recycler, although it needs some refinement here and there. (Scaling a pixel-based layout by a non-round number results in numerous slight misalignments and such which need to be sorted.)

Thankfully 1.12 doesn't seem to have caused any issues with the mod so at least I haven't had anything to deal with on that front.

I'm hyped for this mod but be sure to take your time man. Your life takes precedent over funny frog game.

Link to comment
Share on other sites

Really nice! :D

(i dont know what to say after this, i lost all creativity)

 

Edit: I hope everything is going well! Real life takes priority. Specially your well being!

Edited by Davi SDF
Link to comment
Share on other sites

4 hours ago, Davi SDF said:

Edit: I hope everything is going well! Real life takes priority. Specially your well being!

Oh absolutely. Rest assured there's no need to worry about me though. I'm far from overworked or anything; it's more of a time-management issue. (Most things in the mod need to be worked on several hours at a time since you really need to think them through to understand what's going on. The UI scaling is an exception as it is basically just finding all the values which need to be scaled and adding a multiplier.) Still, the concern and understanding are much appreciated :).

Link to comment
Share on other sites

On 7/19/2021 at 8:29 AM, zer0Kerbal said:

name suggestion: workbench or even Bob's Workbench

Whatever I end up naming it I intend to retain the "OSE Workshop" part in some form, if only out of respect to the original author. OSE does stand for ObiVanDamme Space Engineering after all. It also provides continuity with the previous versions of the mod. As such it will probably take the form OSE Workshop <something> (as with the previous continuations OSE Workshop Continued and OSE Workshop Reworked) or similar, although I haven't ruled out other formats (such as <Something>: an OSE Workshop mod/continuation).

(Also, wouldn't "Bill's Workbench" be more appropriate? ;))

Link to comment
Share on other sites

  • 2 weeks later...
On 4/14/2021 at 11:38 PM, Alphathon said:

Compatibility with other non-standard categories. Non-standard categories, including the one used for the workshop parts themselves, can now be added via a config. This currently includes Kerbalism and Infernal Robotics*, but many more can be added as I find them (feel free to suggest any you know of that aren't added by CCK or WBI).

BDArmory uses it's own subcategory system. Hope it will be supported, printing guns and ammo on site is a must-have!

Edited by M443556
Link to comment
Share on other sites

1 hour ago, M443556 said:

BDArmory uses it's own subcategory system. Hope it will be supported, printing guns and ammo on site is a must-have!

I don't use BDArmory but I've had a quick look at how it works.

I'm not sure how to handle their subcategories. I might try to replicate their extra column but that will require some more UI work; otherwise they'll probably just end up in the "main" list like normal categories. (That said, I'll have to do the same sort of thing for the "Advanced Mode" categories (cross-section profile, module, resource etc.) so it may be almost "free" in that respect.)

As far as I can tell ammo is just treated as standard resources so it should work without any further intervention (although I may need to add recipes for them). Depending on how they do it I may have to specifically code support for the universal ammo boxes and possibly for any other pre-launch variables in other parts though.

All of this will probably have to wait until after the initial release though. I'll probably add a temporary config-based category equivalent to the "all" subcategory in the meantime as that should be fairly trivial.

Link to comment
Share on other sites

  • 3 weeks later...
  • 3 weeks later...

Good news everyone!

Over the last few weeks I've had some more time to work on the mod and have made some good progress, especially on the recycler:

  • All parts, from both KIS and stock containers, can now be recycled.
  • Parts are now recycled based on their actual state – formerly they were recycled based on the AvailablePart (for non-modders this is basically the base/source/default version of the part used by all instances of the part), so they would use whatever state that happened to be in at the time, rather than taking into account things like variants or motor mass.
  • The recycler's queue now functions like the workshop's (with dragging, stacking, right-click menu etc).
  • If a part contains resources they are now drained before it is recycled. If they cannot be drained (e.g. there isn't enough space on the vessel to store them) they can be dumped. Otherwise, recycling of the part stalls (the part is paused) until capacity becomes available or they are dumped.
    • At the moment, "dumping" basically just erases the resources from existence, but in future I plan to make this function like a drain valve, i.e. it exerts a force on the part when ejected.
  • Similarly, if a part is finished recycling and there isn't enough space for the resources the player must either dump them or have the recycler wait for space to become available.
  • If a part is in the queue but hasn't yet begun recycling (including if it is stalled due to having (an) undrained resource(s)) it can now be returned to an inventory via an option in the right-click menu. Where possible this will be the inventory it originated from, but if it is full or unavailable it will use other inventories instead. It currently will not try to add it to containers of the other type (i.e. parts from a KIS inventory will not be "returned" to a stock one and vice versa) but I may implement this as a(n optional) fallback in future.
    • As a side note this does not work for Kerbals' inventories. As far as I can tell there is no unique identifier for inventories themselves (or at least one that persists after quitting the game) so I have to use the host-part's PersistentID. Kerbals also do not seem to have a unique identifier, and since they can move from part-to-part and there can be more than one Kerbal per part the part's ID is not a good proxy. That said, all this means is that the part doesn't know where it came from – it can still be restored to a non-specific inventory – so it is hardly game-breaking.
  • Items can be added to the recycler queue paused. This is not the same as the existing functionality of pausing the recycler as it only effects newly added parts – any already queued but non-paused parts remain non-paused, and any individual item can be unpaused at any time. I also plan to add this functionality to the workshop but haven't done so yet.
  • Mass which is not converted to useful resources is now converted to a new Waste Material resource. This prevents mass from just magically disappearing. This acts just like other resources in that it must be transferred out or dumped.
    • Currently this resource has no uses or containers but I intend to develop this further in future. (Possible uses: burn it to produce EC; reprocess it to extract additional useful materials). I may also add other by-products such as CO₂ (which could be vented or used in a greenhouse etc), although I won't go much further that that until I get to the resource overhaul mentioned at the bottom of the OP.
  • Similarly, when a part is cancelled any as-yet unconverted material is also converted to Waste Material.
  • If a part is being produced in the workshop and is cancelled it will now be transferred into a recycler if one is available. Otherwise it now also yields Waste Material equal to the mass of resources already processed.
    • I may in future also implement a similar system in reverse (i.e. allow a partially recycled part to be returned to a workshop to be re-built) but I haven't done this yet.
  • Oh, and I have also added the catch-all BDArmory category.
Link to comment
Share on other sites

  • 2 months later...
6 hours ago, Captain Tak said:

Hi, any updates?

I'm afraid not. I am planning to post some screenshots of the recycler soon though. (In fact I had planned to do so before now but I just haven't had the time. Thankfully it isn't work getting in the way atm, just real life in general.)

TBH I hadn't realised it had been quite so long since my last post. (Time seems to have lost all meaning at the moment.)

Link to comment
Share on other sites

Finally got the screenshots done.

Here's the main recycler menu in its current state. As you can see each inventory is listed separately and can be collapsed/expanded at will using the arrow/triangle on the right. There are icons next to the inventory names indicating whether they are stock or KIS. Kerbals' inventories display the part the Kerbal is in in small brackets/parentheses after the name. (If a KIS inventory has been named it does something similar, although there are no named inventories in the screenshot.) In future I may add a way to show/hide all the Kerbal inventories at once (so that you don't have to scroll through loads of parachutes and jet packs on larger vessels). I may also add a collapse/expand all button.

Stacks are displayed in the same manner as their respective inventory system (i.e. white ×N in the bottom right for KIS; gold N in the top right with a green bar on the far right for stock; where N is the stack size). The stack size is also listed at the top of the part details (above Mass).

To the right of the part info is a list of the resources that will be recovered if the part is recycled, along with the time it will take and its (packed) volume. As you can see this vessel has no free space to deposit Material Kits. The Add paused toggle in the bottom right is functional (if it is "on" any part added to the recycler queue will be paused automatically) but is graphically unfinished (i.e. it won't look like that when I'm done, although I haven't decided yet how exactly it will look). The add to queue button is currently off-centre; this will be fixed before release. The width of the window may also change.

Edu27ru.png

Since I have added Waste Material as a resource I have also updated the Material Extractor to process and store it. I have also updated the labels for the converters/buttons to make it clearer what each one does. (The Hitpoints and Armor Thickness are added by BDArmory and have nothing to do with this mod.)

DFs84lp.png

EDIT:

Here are some more. This is how the right-click menu for the Recycler queue currently looks. The icon for the "return to container" button changes depending on whether the part came from a KIS or stock container.

06rumI1.png

I have also been playing around with how the Workshop shows "insufficient space". I have added an icon in the bottom right which shows the details when hovered over. When there is a large enough container available but which currently hasn't enough free space an orange warning is shown in both the recipe and the icon. A red critical warning is shown if there is no container with a max. capacity large enough to hold it even when empty. (I also notice that currently the Licenced from text is able to extend beyond the container box. This is not supposed to happen – it is supposed to shrink the text if it is too long so I will be looking into that.)

s4QSJfJ.png

Edited by Alphathon
Added more screenshots
Link to comment
Share on other sites

Well, it's been quite a productive week!

  • I have added the standard "supercategories" to the workshop: Filter by Cross-Section Profile, Module, Resource, Manufacturer and Tech Level. Like in the editors the different "supercategories" are accessed using buttons to the left of the main list and each has its own specific button colour. There is still some UI work to do to them but they are all fully functional. I haven't decided yet whether to have them expandable/hideable like in the editors as I don't really see the need to do so. (It's barely useful in the editors and TBH I don't know why they aren't just always visible.)
  • I have developed most of a rudimentary .craft file loader, which is capable of loading an entire .craft file's part list into the queue. Since they use the same file format this also doubles as a subassembly loader. I haven't yet built a browser/interface so at the moment it isn't very functional but it mostly works when tested with hard-coded file paths. It also doesn't do any checks to see if parts are inventory compatible etc yet.
  • I have made a fairly basic but functional app for the App Launcher (sidebar), which lists all craft with either a workshop or recycler (anywhere in the game world), displays their current location and allows the player to switch between them. If a craft is within load range of the current craft (≈ 2-3km radius I think) it also displays the current status (progress, current part etc, basically the same info as shown in the PAW) allows manufacturing/recycling to be paused/resumed and allows the player to open the workshop/recycler menu for any of the appropriate parts. When a part's name is moused-over in the app its model is highlighted. The app's button is positioned alongside the stock apps and behaves in a similar manner, rather than opening a window like most other mods' apps. (The only other mod I know of which does something similar is Kerbalism.) The UI and functionality of the app are still WIP.
  • I have also made some small alterations to the code for the part list which improves performance greatly when dealing with large categories.
Edited by Alphathon
Tech level is now done too
Link to comment
Share on other sites

  • 3 weeks later...

Hi all. Here's what I've been up to over the past few weeks:

  • I have implemented custom categories (the pale brown ones you can add in the editors by clicking the +).
  • I have added custom subcategories to the subassemblies list.
  • I have added a separate craft file loader which is accessed using the button directly underneath the subassemblies button (see screenshots). The list can be filtered by VAB, SPH or both. (The graphics for these toggles are non-final.) At the moment it lists all stock/expansion craft and those in the current active save. In future I plan to add subcategory buttons for other saves and subfolders. Stock craft and the auto-saved ships have [Stock]/[Auto-Saved Ship] appended to their name as they do in the editors' load craft window. Where present, a rendering of the craft is shown in place of the subassembly icon.
  • If a craft or subassembly contains unprintable parts (that is parts which are blacklisted from the workshop for technical reasons or which have not yet been unlocked) a warning icon is now displayed in the corner of the button, much like with parts which won't fit in a container or which are too resource-expensive.
  • I have done a fair amount of work on the craft/subassembly loader which you can see in the screenshots. The icons under the part names currently show the selected inventory type (which can be toggled on a per-part basis) and the part's variant if it has one. In future this will also include B9 subtypes, module variables (motor mass etc), resources etc. Unwanted parts will in future also be disableable, probably via a toggle to the left of the part icon, but this is not yet implemented. Any parts which are added using symmetry are added as a stack (e.g. the batteries in the screenshot below).
  • I have added support for cross-section profile names/icons added by taniwha's Custom Bulkhead Profiles to the Filter by Cross-Section Profile supercategory.
  • I have added variant and B9 subtype icons to the "queued item"* tooltip/hover window and made its box blue (so it matches those in the editors).
  • I have been playing around with the "new" Unity UI system (that is uGUI/Unity UI rather than the older IMGUI system) with some success. Using that system has a number of advantages: it is much easier to do UI scaling and I can use the same font the game uses (Noto Sans rather than Arial). It is supposedly also much better performance-wise as it doesn't redraw/recalculate everything in OnGUI() (which can run several times per frame) but without actually converting the whole UI over I don't know how big of an impact it will actually have. It is however a little trickier to build the UI in code (although not as difficult as some posts I've seen would lead you to believe). At the moment my plan is to convert over the App Launcher app and maybe the tooltip renderer and "queued item"* tooltip/hover window to uGUI as they should be relatively straightforward. The workshop and recycler UIs will probably take longer though (a lot of the logic would have to be changed) so will probably be in a later release.
  • I have also added a few (mostly) workshop-related "hints" to the main loading screen.

*"Queued item" here refers to a specific type of object (a class in coding terms) which is used by the queues of both the workshop and the recycler, but also by the craft/subassembly loader.

Here are some screenshots:

0wsXMx9.png2iLIfD3.pngLXwZXtD.png

NAptiyD.png

These are some craft/subassebly tooltips:

QKHcIPQ.png

This is the "queued item" tooltip/hover window at the moment:

5hYUUvG.png

Link to comment
Share on other sites

This is such an awesome project, deserves much more attention!
It's also exactly what I'm looking for in my current playthrough! Especially since the last OSE Workshop aparently doesn't work on 1.12.
I was looking at the Konfabricator, but I don't want all the extra complexity the USI suit brings with it...

If there is any unpolished version available for testing it would be great, I don't mind the occasional bug or slightly broken UI :D

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