Jump to content

Alphathon

Members
  • Posts

    61
  • Joined

  • Last visited

Everything posted by Alphathon

  1. 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.
  2. 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.
  3. It's on my to do list. I had planned to do it anyway to get it to work with the surface science parts but the 1.11 update makes it more important. Unfortunately I haven't had much time to work on it since the end of November. Note that I don't plan to convert it from KIS to stock, but to have it compatible with both. EDIT: This may depend on the direction KIS takes post-1.11 though. I had a quick look at the KIS thread and it seems it may be transitioning to an enhancement/expansion and UI overhaul of the stock system, so if this happens then presumably switching it to this KIS-stock hybrid would be necessary. This would however probably not be backwards compatible with 1.10 and earlier. MM patches can only change configs AFAIK, not plugins. You can presumably use MM to make a part compatible with the stock inventory (I haven't checked) but for the workshop to use it requires changing the behaviour of the plugin. I suspect that programmatically it shouldn't be that hard (or at least no harder than doing it with KIS), but as linuxgurugamer alluded to having the mod use both systems is itself a problem in terms of UI etc. If only one part could be produced at a time (no queue) you could just have two separate buttons: "add to KIS container" and "add to Stock container". Before 1.11 this wasn't a problem as only the surface science parts could go in the stock inventory and they were barred from being added to KIS inventories. Having standard parts able to be carried makes this more complicated.
  4. This is how they are "supposed" to be. I'm not sure why or what the design philosophy behind it was but I would guess the low mass is to balance out the cost and mass of the resources. When the workshop creates an item it creates it based on an equal mass of resources, so you need a lot of them to make anything but the smallest of items. FWIW when I'm done with my version the resources will work quite differently so this will be less of an issue and the containers will definitely have more mass. I suspect the strange physics is purely down to the low mass. If you want to give them some mass even when empty all you need to do is change the mass value in the configs. They are currently set to 0 (which KSP rounds up to 0.0001). The correct files to change are B9-ose3000.cfg and B9-ose6000.cfg, which are located in Workshop/Parts/OSE_Containers. While they have a .cfg extension they are just plain text files so can be edited in something like Notepad. The values are in tonnes, so to make them, for example, 1.5 t change the value 1.5. Judging by the screenshot you don't have B9 part switch installed, which is required. This isn't listed as required in either the OP of this thread or CKAN for some reason so it makes sense that you wouldn't.
  5. I've not had any issues with it. As long as you have current versions of all the dependencies it should work fine. The only part I'm not sure about is the "unpacking" feature which I have never gotten working (and which seems to be on by default). Be aware that some parts will not show up in the Fuel Tanks category (Mk2 fuel tanks, two of the small foiled tanks, a few of the large tanks etc) and some modded parts may not show up there or in the Engines category (there is an explanation of why below.) These can be found using the search box however, as can the stock robotic and surface science parts. Since I'm here I might as well update you all. I have begun work on my update/fork of the mod and so far have the following sorted out: Most of the UI re-arrangement and formatting changes, including new button graphics etc, are done or close-to done The extra stock categories have been added CCK categories are now supported. Other categories which are added by mods seem to be harder to do automatically so may have to be manually coded for. Search-as-you-type is mostly working, and now searches within the category selected (will be an option to switch between modes) A bug/oversight whereby some parts, including most of the Mk2 fuel tanks, did not show up in the engines/fuel tanks categories has been fixed (they use the old deprecated "Propulsion" category in their configs which the mod did not account for before) Stock variants are now selectable and mostly working I have no idea how long it will be until it is in a releasable state but I'll keep you all posted. By the way @linuxgurugamer, I have a few questions which you may be able to answer. Is there any way to change the control lock type in ClickThruBlocker? My version of this mod uses scroll bars but these are impractical when using the default lock type ("ALLBUTCAMERAS" if memory serves), as scrolling the mouse wheel both moves the scroll bar and the zooms the camera. I have come up with a hacky workaround to set it to "All", and while it does work it does not work all the time. Also is there a way to block interactions with part right-click menus underneath the window? Do you know if there's a way to load the stock PartCategorizer class outside of the editors? When I try to access it in flight there doesn't seem to be an instance, and I cannot create one. I wouldn't be surprised if it requires something else to be present before it will create an instance (e.g. graphics which aren't loaded in the flight scene or data from another class) but I can't find what and the logs aren't helpful. While on the subject of graphics which aren't loaded in the flight scene, do you know how to load assets from the stock asset bundles? I'd ideally like to use the stock category icons rather than those bundled with the mod but I can't seem to get the bundles to load no matter what I try. The path I'm using seems to be valid* but when I use it the load immediately aborts. Unfortunately the logs dpon't specify why it aborts. I have tried loading them synchronously and asynchronously, and treating them as web assets using "file://(/)", all using the built-in Unity functions; if there's a stock method for doing this I haven't found it. *If I use a path to a non-existent file it fails with a different error (something about a header being unreadable which I suppose is because there is no header to read). For the last two, if you cannot answer them do you know of anyone else who might be able to help? (If not I'll probably ask on the add-on dev subforum.) Thanks
  6. I had a feeling that was the case and totally get it. (I can't imagine how much time it would take to actively develop all the mods you maintain.) I suppose I'll have a look into plugin development.
  7. Hello again @linuxgurugamer, I have done a little more thinking about this and had a few more ideas about how I feel the mod should look and work. I've made a mockup of how I propose it should be laid out etc. I have overlaid this onto an in-game screenshot (mostly to show the transparent bits) but this was otherwise made from scratch in Photoshop (so may differ slightly from how it would actually look in-game). I realise that this may be more work than you can justify putting in. However, I have some programming experience so might give it a go myself. I've never dabbled with KSP plugin creation (or C# generally), but I don't see that as a hurdle. (It'll probably just take a bit of time to get used to it.) In fact, I have some other ideas for the broader mod (new workshop types, new models etc), so might make a separate fork. Being new to this though I may find it harder to integrate the other mods (Janitor's Closet, B9 etc) and stock part variants. That said, if you are up for it it is probably better to retain a single mod, and then I could make my new models/types etc as a sub-mod. I would also appreciate other users' input on these proposals. Proposed new/changed features: I've re-arranged the UI to be more like that in the editors (VAB/SPH) and have created stock-like category buttons. The categories are now in a strip down the side of the part list rather than along the top. (The icons used are those distributed with the mod, except the Robotics and Cargo icons which I created myself. The buttons are designed to resemble those in the stock editor interface.) The mockup includes several blank category buttons underneath the stock ones. These would not show up normally, but with CCK compatibility would house custom categories. The up/down buttons at the bottom would only show up if necessary (similar to the next/previous page buttons). The scale of the category/part buttons and search box are approx. 75% of those in the editors. The space between the part buttons has been reduced to 2px (the space in the editors is about 4px; the mod currently uses spaces of about 5-6px despite the smaller buttons). The part buttons themselves are 50px, similar to those currently used by the mod. The category buttons are 24px and are also 2px apart, so they line up with the part buttons exactly. The part previews are at the same relative size to their button as shown in the editors (i.e. they're larger than in the current version of the mod.) The part previews are not lit/shaded (as is the case in the editors but not in the current version of the mod; this may be a limitation of the game) The part list would be sortable by name, mass and size as in the editors. Cost would obviously be rather pointless, but other sorting values such as Material Kits required or production time would be useful instead. Filters such as end profile (e.g. Mk3 or 1.5m) might also be helpful but are not shown on the mockup. This might also be useful for Janitor's Closet integration/functionality. Instead of clicking on a part to add it to the queue as is currently the case, clicking on it now brings up the part's information. It is added to the queue using the "add to queue" button. This allows things like stock variants and B9 switching to be done in the main window. A new quantity value has been added. This allows the player to quickly choose how many of a part they want and add them all at once rather than repeatedly clicking until the desired number is added. This seems like an obvious addition to the "add to queue" functionality. The number is a text box so the player can type in it. The +/- buttons could be replaced with up/down arrows. The part description is designed to be as close as possible to the editors' part "tooltip", with the following differences: The manufacturer is on one line rather than two (to save space). However, since it is being manufactured in situ this may be renamed (something like "designer" or "original manufacturer"). The description box is shorter to make room for the recipe The part name has the mod folder appended in brackets/parentheses (Janitor's Closet integration) (I intended to add the scale indicator to the mockup but forgot) The panel to the right (I don't know what you'd call it; "modules" maybe) is placed further to the right. In between it and the rest of the panel is placed the list of variant/B9 switchers, which use the same UI style as the stock variant switchers in the editor right-click menu (which is also used by newer B9 versions). A series of dropdown lists is a possible alternative (user preference?) The afore-mentioned recipe is placed underneath the part description. This also includes the required volume, listed after resources required. Both the volume and the resources also list the total of what is available. For volume this would have to be limited by the max volume of the largest KIS container, not just the total. The current queue (and the queues of any other workshops on the craft) would also be taken into account for available resources. Currently, the mod does not show any parts which are too large to fit in any of the attached containers. This behaviour would be changed to it being visible but not being able to be added to the queue (possibly a greyed-out "add to queue" button with a tooltip explaining why. The afore mentioned volume listing could also be changed to red if this is the case.) As seen for the RSC thruster block, parts of the same type can be stacked. These stacks could then be split by right-clicking and selecting a stack-size to split off; this would be to enable players to move around items in the queue without cancelling the whole stack. Parts with different values (e.g. different B9 subtypes) would not stack. Items in the queue could be moved around, either by dragging them or by right-clicking and selecting an option to move it up or down in the queue. There is a new production speed mechanic shown at the bottom right. In the mockup this uses buttons; I think a slider would probably be better but couldn't think of a way to do this while also making higher speeds obviously locked/unavailable (possibly something similar to the Breaking Ground robotic parts' range limits would work). 1.0x would be "normal" speed. Slower speeds could be used to reduce energy consumption. (Useful if for example you are using a life support mod and are low on power and so need to build a new solar panel, but running at normal speed would drain the power too quickly.) Faster speeds would have some combination of: Higher energy use overall (e.g. at 1.0x the total cost would be 1200 Ec but at 1.5x the total cost would be 1800 Ec). This would of course be spread out over the course of the production. More expensive in terms of materials (i.e. it's faster but less efficient/more wasteful) Higher level engineers More engineers (the current Workshop only has space for two Kerbals, but that doesn't need to be the case; the K&K Workshop has space for three) More advanced/upgraded Workshops Multiple workshops working together on the same craft. Faster speeds may be unavailable if the craft is in motion on a body's surface, experiencing high g-forces etc. Buttons for settings and the Janitor's Closet have been placed in the bottom right The item progress bar is the same as those used in stock for fuel, electric charge etc. (and so is much smaller) Underneath the progress bar is a listing of the total time required to produce the whole queue. There are four buttons next to the progress bar: Cancel item, Cancel all, Pause item and Pause all. These replace the existing play/pause and trash can buttons. If the pause item button is pressed it will be moved back into the queue with a pause icon (probably in the upper left corner) and a progress bar underneath it. The next item in the queue will then begin to be produced. Items of the same type and configuration would also be paused. All fonts are the same anti-aliased font (regular, bold and black Arial I believe) and the colours correspond with those used in the editors (rather than the less subtle bright green used at the moment). On the backend the basic hard-coded category list would be moved to an config file. Various workshop types could then be defined which use a separate config rather than simply defining it on a per-part basis. These configs could have their own part blacklist. I would also add the ability to define the by exclusion of categories as well as explicit inclusion inclusion (so, for example you could define a type which lists all of the categories except robotic and science parts). This might be complicated by CCK though. Obviously this is not shown on the mockup. I happens to the best of us . To be fair, it isn't exactly made clear that command is required, and it would probably be better if the button didn't just vanish on non-controlled vessels. I think being able to access the workbench but being unable to actually use it would be preferable (probably with an error popup if you try to add to the queue or, if my suggestions above are implemented, a greyed-out "add to queue" button with a tooltip). That said, it does match the behaviour of the Mobile Processing Lab.
  8. For what it's worth it works for me, and I don't think I had to do anything special to get it to work (I don't remember). If the base workshop works then I see no reason why the K&K one wouldn't. My only suggestion would be that maybe a Module Manager patch is messing with it somehow (either one you've written or one from another mod). It's also worth noting that the buttons don't show up if you're time warping.
  9. You may be aware of this already but I couldn't find any mention of it in the thread. There appears to be a subtle typo in the configs for the Hadar Airlock Compartments A and B (parts/PIRS/_hadar_crew_s1_1.cfg and _hadar_crew_s1_2.cfg). The Minimum Crew to Operate is specified using "minimumcrew = 1" rather than "minimumCrew = 1". Apparently this value is case-sensitive, as both parts show up in-game as unmanned rather than requiring a pilot. Capitalising the "c" fixes the issue.
  10. Hi @linuxgurugamer I have come across a few issues (I wouldn't call them bugs exactly) with the mod. Both of the stock categories added in Breaking Ground (Robotics and "Cargo" (i.e. deployable surface science and their containers)) are missing from the Workshop UI. They can be added by manually coding them in the OseModuleWorkshop module in the part definition but that shouldn't really be necessary. Those which are hard coded are also not in the same order as in the VAB/SPH (presumably a holdover from an earlier version of KSP). It might be worth considering moving the default list to an external file rather than hard coding it in the plugin. That way users can more easily change it and the associated icons if desired across all Workshop parts. (For example, in my own (temporary?) patch I used the icons which were bundled with the mod rather than those which are hard coded, as they correspond much better with those in the VAB/SPH; at the moment they don't seem to be used so I'm not sure why they're even there.) The mod doesn't seem to pay attention to hidden techs. Some stock parts such as the probe cores and the Mk1 Command Pod and Lander Can were changed in various patches, but for compatibility with older save games the old versions of the parts were retained but hidden so they could not be built. This was done by adding "TechHidden = True" and "category = none" to the config files; I believe "TechHidden" is used to hide it from the tech tree while "category = none" is a sort of hacky way to make it not show up in the VAB/SPH. (I suspect some mods also do this but I don't know for sure. Certainly I have done this in some custom versions of mods.) However, when using the search function in the workshop they still show up (so, for example, you get two versions of the Stayputnik). Unfortunately it may not be as simple as just hiding anything with "category = none" as some mods use that in conjunction with the Community Category Kit (CCK) or similar to make parts only show up in a non-standard category (I know Infernal Robotics does this using its own custom category plugin and I have done this in my personal mods using CCK). I don't know if there is a good solution to this problem other than adding them to a parts blacklist manually (I assume that's what the OSE_Blacklist in _OSE_Filters.cfg does). I also have a few minor nitpicks with the UI There is a bit of an oddity with the UI: search results do not show up until you click on a category, which is rather odd behaviour. (Presumably clicking on the category forces it to refresh the list.) I think either displaying them upon pressing enter/return or adding a search/go button to display the results would be a better solution. Alternatively you could have it refresh when text is entered/changed. The icons/models for the parts are (in my opinion) a bit too small for their buttons. I have compared some screenshots of the VAB menu and the Workshop menu and it looks like those in the Workshop should be about 25% larger relative to the button to match those in the VAB. Given how small they are it can be quite difficult to distinguish some parts so a slight scale up (if possible) would be welcome. If this is simply due to how KSP handles button generation then it's not a big deal. There are some other even less significant ones but this post is long enough as it is so I won't go into them here. I also have a few feature/compatibility requests. I understand if these are too much work. Would it be possible to add compatibility for mods which add their own categories, such as CCK and Infernal Robotics? I don't know if there's an elegant way to get a list of categories from the game (other than the ones explicitly listed in the part files), but it might be worth manually adding support for some of the more popular ones. Unfortunately, as far as I can tell there's no way to reference them using the existing system to add them via module manager like you can with the stock categories. (Either they aren't counted as categories internally or have non-obvious identifiers.) If it is possible to add compatibility it may also be necessary to change how the buttons are drawn, as currently they simply stretch or compress to fill the window, and if too many more are added they will quickly become overly squashed. (I would suggest adding another line of buttons once the number gets high enough, although something like a scroll bar or "pages" of categories could also work.) Still, the lack of compatibility isn't game-breaking due to the search function, so if it isn't possible (or is too much work) it's not really a problem. Probably the most significant incompatibility is that there doesn't seem to be any way to change the configuration/version of the parts produced (perhaps I'm missing something), so you're stuck using the defaults. For stock parts that generally isn't a big deal, although it does mean you cannot produce any parts with stock alternative skins (which I think were added in Making History), the various longer versions of the stock structural tube, or reversed Breaking Ground propeller/rotor blades. More problematic though is the lack of support for B9 part switch variants and other part-switching mods (Firespitter?), which closes off a lot of modded parts (including the materials containers included in this mod). Presumably these would require explicit support to be added for each type of part switching, and possibly an overhaul of the interface, so I recognise it probably isn't as straightforward as it sounds. As for how to treat it in the UI, my suggestion would be to have a context menu appear when you right click instead of that adding the part to the queue. Once all the values have been set in this menu you'd press an "add to queue" button. This is just a suggestion though and there's probably a better/more elegant way to do it, especially if you're willing to change the UI more significantly. If it can be done fairly easily integration with the Janitor's Closet mod would very useful, but I suspect that would take a lot of work for relatively little gain so may not be worth the effort. P.S. Thank you for maintaining this and so many other mods. This may be my first post here but I have used several of your mods for quite a while and greatly appreciate all your hard work. P.P.S. Sorry for the wall of text. Concision is not one of my strong points.
×
×
  • Create New...