Jump to content

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


Alphathon

Recommended Posts

I've managed to get Interstellar Fuel Switch (InterstellarFuelSwitch, InterstellarTextureSwitch2 and InterstellarMeshSwitch) working :)

hctFgF0.png

I've also added a time warp button next to the printing/recycling progress bar that lets you warp to the (estimated) time of completion of a part. The time warp cancels if part production/recycling stalls (e.g. due to running out of resources). Of course, if you use KAC that's probably the better choice.

Oh, and since I took those screenshots, I have made all grouped variables/controls (including resources) collapsible, much like those for B9 Procedural Wings in the previous post.

On 11/25/2022 at 4:45 PM, 610yesnolovely said:

From what I understand, for using this, the workflow for parts like procedural wings, RCS or anything with a lot of config sliders are probably built best by selecting an existing craft with them already set up and building those parts. ...

That is always an option of course and in many(/most?) cases it will be the most straight-forward and fool-proof method. It's one of the many reasons the craft/subassembly loader exists. That doesn't mean there'll never be a reason to do it manually though and it wasn't that difficult to implement. (Adding mod support is usually only hard if necessary functions are locked behind a HighLogic.LoadedSceneIsEditor check or rely on something that cannot exist/happen within the workshop/in flight, e.g. some property of the vessel the part is attached to; I'm looking at you WBI switchers.)

Since the module itself generates the mesh for the wings on the fly as the variables are changed I may even be able to preview it directly in a separate window or something (much like with the icon renderer). Whether it'll be worth it will depend on how much work it takes though (so no promises).

I don't think things with lots of sliders are really any easier to do in the editors than the workshop; any difficulty arises when some other form of feedback is required such as CoM or the relative scale/position of parts. (I'm not sure what you mean regarding RCS. All (standard) RCS variables are accessible in flight anyway AFAIK. BTW, while there is a screenshot of options for an RCS thruster further up, they are currently not enabled in the workshop. )

On 11/25/2022 at 4:45 PM, 610yesnolovely said:

Also, no pressure, but have you considered releasing a "Beta" (with lots of No Support if the Kraken eats your install) at some point for those eager to try it out?

Yes. I think I mentioned it earlier in the thread, but in short the first publicly available version will almost certainly be an alpha or beta of some sort (probably an alpha since it will not be "feature complete"). When that will happen I cannot say, but not until I am at least reasonably sure the core functionality is all working properly. What I will say is I really want to make sure it is out before KSP2 renders it effectively obsolete.

On 11/25/2022 at 5:30 PM, Stone Blue said:

hopefully someone could do up B9PartSwitch patches once this is updated, as an option to use, instead of the FS/IFS switching... vOv

Is that a specific mod or just a general description? Either way I assume it/they either convert parts with FS/IFS to B9 or add B9 switchable tanks to normal tanks? If the latter there's a patch included with CryoTanks that does that to a degree.

Link to comment
Share on other sites

@Alphathon

B9PartSwitch is a mod that is very similar to FS & IFS. It can do about 95% of what those two mods can do, plus has other features thos two do not.

FS & IFS are very long in the tooth, and many people prefer to not use them, and use B9 instead, as a lot of newer mods support B9 only.

So its a very viable option to have support for it.

Link to comment
Share on other sites

26 minutes ago, Stone Blue said:

@Alphathon

B9PartSwitch is a mod that is very similar to FS & IFS. It can do about 95% of what those two mods can do, plus has other features thos two do not.

FS & IFS are very long in the tooth, and many people prefer to not use them, and use B9 instead, as a lot of newer mods support B9 only.

So its a very viable option to have support for it.

Oh, I think I misunderstood you. I know what B9PartSwitch is – it is already supported by the workshop; in fact it is a dependency. I thought you were talking about some patch(es) to add B9PartSwitch functionality to other parts.

Link to comment
Share on other sites

On 12/3/2022 at 2:12 PM, Stone Blue said:

Ahh.. gotcha ;)
didnt realise it was already a dependency... Hopefully *both* FS/IFS & B9 are not dependencies... should be setup that *either* one *or* the other, is a dependency, is what I didnt clearly state :P

Hmm, I'll see if I can explain it a bit better.

B9PartSwitch is used by the resource containers included in the mod. It is also hard coded into the plugin for the workshop (at least for now) and so is a true hard dependency – things will break without it installed.

Neither Firespitter nor InterstellarFuelSwitch are dependencies. They are not used directly by any part in the mod. However, the workshop plugin can interact with them, allowing players to print parts which do use them. The interaction is partly done via reflection and partly by accessing KSP's built-in interfaces (KSPField and KSPEvent variables specifically), which are how mods add controls to the PAW. If either of them is installed the workshop can use the switcher on parts that have it. If they aren't installed nothing bad will happen.

The only dependencies (currently) are B9PartSwitch, KIS, KSPDev_Utils 2.4 (included with KIS), CommunityResourcePack (or any other mod which adds the appropriate resources), ModuleManager, SpaceTuxLibrary and ClickThroughBlocker.

Edited by Alphathon
Link to comment
Share on other sites

I've another update for you all.

I've developed the icon renderer a little more and added some features:

  • Part icons can now be scaled, which is used in a few specific circumstances. The first is stock flag parts, whose icons now scale depending on which orientation and size is selected (previously the scale was based on the largest configuration, so the smallest were tiny, which made previewing the chosen flag difficult). The second is any part which is manually coded to be scaled; at time of writing this only applies to the PT-3A Command Node Module from Benjee10's MMSEV mod, whose icon is quite small for some reason. The third is detailed below.

d65JrvN.png

  • I have also added the ability to show a part's attach nodes on the icon. This is toggled with a button in the upper left of the icon box, similar to the change variant "drop" button. The button only shows up if the part has nodes. The size of a rendered node reflects how large it appears in the editors. On parts with the ModuleDynamicNodes module, (e.g. several of the Breaking Ground motors) the rendered nodes reflect the selected option. If any of a part's nodes lie beyond the bounds of the icon box the icon is scaled to accommodate them (as seen in the second image). In most cases this is a fairly slight scaling, but for some parts it can be quite dramatic, e.g. a few of the expandable/inflatable parts from WBI Pathfinder such as the Ponderosa IHM pictured. I'm not completely happy with the shader used for the nodes (it's not obvious in the screenshots but it is slightly glitchy and doesn't feature backface culling) so I may have to write one especially rather than using a built-in one. (Unfortunately the one actually used in the editors doesn't draw onto transparent backgrounds so only shows up when in front of the part's model.)

YDEQg9c.png    Ni5w42Q.png

In addition to the icon stuff I have also made some changes to the damage repair system, meaning that engineers, especially high-level engineers, need less tape than other Kerbals to repair (roughly 20% less per level). Since tape is used at a fixed rate (without tools), this also makes engineers faster. If a Kerbal has a tool (currently hard coded to the KIS wrench and electric screwdriver) they also repair more quickly and efficiently (again, especially engineers). The total mass of the tape used is now added to the part's mass. Finally, the amount of tape (and so time taken) to repair damage scales with the total amount of damage (e.g. at 1 damage only 10 tape is required per point of damage; at 50 damage it takes about 12 per point; at 90 damage it takes just over 19 per point), making it easier/cheaper and quicker to repair minor damage. The scaling is logarithmic and beyond a certain point (currently 100 damage) it becomes impossible to repair using duct tape.

In future I intend to expand the damage/repair feature to allow repair using spare parts and/or resources, which would not have the limitation on the damage repaired but will probably be engineer-only (and obviously require access to the required parts). I may also add an upper limit to the total lifetime amount of added duct tape mass that can be added to a part, and therefore probably the ability to replace tape-repairs with spare parts/resources or by using stock repair kits (so as to remove the added tape mass). I also have some other ideas for expanding the damage feature but they aren't fully fleshed-out yet.

Edited by Alphathon
typos
Link to comment
Share on other sites

  • 2 months later...
  • 2 months later...
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...