Jump to content

PSA: bulkheadProfiles and you, and a request for comments/requests: what cross-sections do you want?


Recommended Posts

I've pushed my icons and configs to Crzyrndm, but there's always room for more! (As long as he'll accept my pull requests, anyway.)

So, 1.0 brings us a new feature in the editor: the ability to sort by cross-section, using fields defined in the "bulkheadProfiles" variable (it takes a comma-separated list, e.g. "bulkheadProfiles = size0, srf" -- handy for adapters). Some intelligence is possible for automatically sorting parts, but for custom sorting (e.g. Filter Extensions), we basically have to take a part at its word, so please set these fields to ensure that your parts get sorted properly!

Stock values for bulkheadProfiles are size0, size1, size2, size3, mk2, mk3, and srf (for "surface attach"), but we can also use our own. A few that I have seen (and one that I've made myself): size1p5 for 1.875m parts, size4 for 5m parts, and size00 for 0.35m parts (that's the one I've made up -- "Size -1" doesn't fit very well into an alphanumeric-only naming convention, so I took a tip from the clothing, model railway, and shotgun ammunition industries and called it 00). You can put anything you like in bulkheadProfiles and the stock system will happily show it as a separate subcategory under the "Filter by Cross-Section Profile" tab, but you need something like Filter Extensions to give it a proper icon and description, like this:

FQtgXiJ.png

That's Mk2, Mk3, J (from OPT Space Plane), Mk 4 (from Nertea's Mark IV Spaceplane System), K (from OPT), size 00 (from Sounding Rockets, MicroSat, and a few parts from stock and RLA Stockalike), 0, Universal Storage wedge, 1, Mk1x0.5 and 1x1 BoxBase from Rovers and Roadsters, 1.5 (from HGR and Socke's 1.875m parts), 2 (which also includes the type I cockpits from OPT), Hex Truss (from Speedy's Hex Truss System), Octo-Girder (from Near Future Construction), Size 3, Size 3 Octagonal (from Freight Transportation Technologies, if RoverDude chooses to sort his parts under it), Exploration Rover System (if alexustas chooses to sort ERS parts under it), Size 4 (from SpaceY and FTT), HX from B9 Aerospace, and finally Surface Attach.

(Also, for kicks, I removed Filter Extensions to see what stock would do. The categories were made in alphabetical order, which put 00 after 0 and put I, J, and K before Mk2, everything but the stock categories have question marks for logos... it works, but it doesn't look pretty at all.)

I've pushed this to Filter Extensions, but it's never too late to make more configs and icons. If your mod (or a mod you love) has a new cross-section that you want to live on its own, let me know and I'm happy to give it an icon and a place in the list!

Edited by Kerbas_ad_astra
Update with "final" result. Now with links!
Link to comment
Share on other sites

How did you get that to work?

Most of the credit should go to Crzyrndm for Filter Extensions. I made a config (based on the filter-by-function and filter-by-resource configs that Crzyrndm made before) that redefines the subcategories to include custom categories amidst the stock ones (with icons and all). You can see an early revision in the spoiler in this post, though some changes have already been made on my "dev copy", and it may change a little more before it goes to the repo.

Crzyrndm had to fix a bug before my config would work, though -- his cross-section filter checks the bulkheadProfile of the part, which choked on a nullref when parts don't define bulkheadProfile. To resolve that, we assume that such parts belong in the surface-attach subcategory.

Some part packs already have bulkheadProfiles defined, but some don't, and I want to bring this to part makers' attention and give them time to resolve this before I push my changes to Filter Extensions, so that Filter Extension users don't wake up one morning and find all of their mod parts stuffed into the surface-attach folder. RoverDude's USI parts in particular did not have bulkheadProfiles defined, so I spent a few yours yesterday making pull requests to define the cross-sections for all of his parts (and fix a few nodes which were still mis-oriented). It's doubly important that USI gets sorted properly, since Sounding Rockets is the reason I made size 00 in the first place, and FTT has lots of 5m parts.

(Incidentally, you might want to designate your universal docking ports as belonging to the smaller bulkhead profiles as well, since they're "adapters" of a sort.

Link to comment
Share on other sites

Near Future Construction's Octo-Girders have their own bulkhead profile (octotruss). It may therefore be worth giving them their own category.

So they do. (I'll have to see what USI parts are compatible with them and add it to their profiles as well.) Thanks!

EDIT: Turns out that USI doesn't (at this time) have any octotruss-shaped parts (though some of its FTT modules and such have octagonal cross-sections -- I'll ask if he wants a size 3 octagonal cross-section, maybe call it "ftt3"?), but I was reminded of Speedy's Hex Trusses, so I've asked his thoughts on defining a hextruss bulkhead profile.

Edited by Kerbas_ad_astra
Link to comment
Share on other sites

Gentlemen, behold!

2AG9R4I.png

That's Mk2, Mk3, J (from OPT), Mk 4 (from Nertea), K (from OPT), size 00 (from Sounding Rockets, MicroSat, and a few parts from stock and RLA Stockalike), 0, 1, 1.5 (from HGR), 2 (which also includes the type I cockpits from OPT), Hex Truss (from Speedy's Hex Truss System), Octo-Girder (from Near Future Construction), Size 3, Size 3 Octagonal (from USI), Size 4 (from SpaceY and USI), and finally Surface Attach. Phew!

I'm going to wait to hear back from a few modders regarding custom cross-sections before I push these changes to Crzyrndm, but unless I hear about any other cross-sections, this is the most that there will be.

(Also, for kicks, I removed Filter Extensions to see what stock would do. The categories were made in alphabetical order, which put 00 after 0 and put I, J, and K before Mk2, everything but the stock categories have question marks for logos... it works, but it doesn't look pretty at all.)

Edited by Kerbas_ad_astra
Link to comment
Share on other sites

Size 3 Octagonal

At first glance the icon used for this is quite difficult to tell apart from the one above it. (rounded vs. straight lines). The difference may be more obvious if it was rotated 45 degrees so the nodules don't align?

Link to comment
Share on other sites

At first glance the icon used for this is quite difficult to tell apart from the one above it. (rounded vs. straight lines). The difference may be more obvious if it was rotated 45 degrees so the nodules don't align?

I see what you're saying and tried rotating the symbol, but I'm not quite sold on it:

GfoEWcl.png

Something that occurs to me: all of the octagonal USI stuff has a round hatch in the middle. Kind of like how I drew the central reinforcing pieces of the hextruss and octotruss icons, I'll see if a circle-in-an-octagon looks more distinct.

EDIT: Here we go:

K3drgVO.png

It looks more distinct, I think, but unfortunately the regular octagon's just a roundish sort of shape. It's probably for the best that SpeedyB and Nertea picked more triangular and squarish shapes for their hexagonal and octagonal trusses (respectively).

Edited by Kerbas_ad_astra
Testing the third iteration.
Link to comment
Share on other sites

If you want an alphabetical order, maybe changing size00 by size.25 is possible?

I don't know if the '.' can cause some bugs.

It's maybe too late, also.

Edited by Merill
Link to comment
Share on other sites

The period probably won't cause bugs (it doesn't seem to cause them in e.g. part names), but I'd rather avoid it, since there's always going to be that one time that it isn't harmless. Also, calling the size smaller than size 0 ".5" doesn't seem right to me.

size.00 would also come before size0, but I'm still not wild about periods in "code"-facing elements.

Something that has occurred to me is to leave size 00 parts in size 0, and use a Module Manager patch to put them in size 00 only when Filter Extensions is installed.

Link to comment
Share on other sites

I have a suggestion for the icons for standard round cross sections which might allow you to easily differentiate the tabs for different sizes.

Could you add a number to the icon, inside for size 2,3 or 4 or below the icon for size 1 or smaller?

You might need to just keep 3 different sized icons for the Standard 1.25, 2.5, and 3.75 then have either a large icon with a number in the middle or a small icon with a number under it for everything else.

Link to comment
Share on other sites

I have a suggestion for the icons for standard round cross sections which might allow you to easily differentiate the tabs for different sizes.

Could you add a number to the icon, inside for size 2,3 or 4 or below the icon for size 1 or smaller?

You might need to just keep 3 different sized icons for the Standard 1.25, 2.5, and 3.75 then have either a large icon with a number in the middle or a small icon with a number under it for everything else.

Are you having trouble distinguishing the sizes? (Also bear in mind that the second image in the post at the top of this page is the one I'm going with for now. FYI, the size0 icon is also stock -- I based the 00 icon off of it, with a smaller circle and doubled arrows.) When I had all of the sizeX icons in a row, they did start to blend together, but with the hex and octo trusses breaking them up, I think they're alright.

Anyway, since you asked, I tried squeezing numbers into the center or corner, and here's how it looks:

iuqbROg.png

The 4 looks alright, but I don't think that one really causes confusion. Meanwhile, the 1.5 and 00 have to be so small that they're difficult to notice.

What do you think?

Link to comment
Share on other sites

@Kerbas_ad_astra I am just in the process of updating B9 Aerospace for compatability together with my project lead blowfish. We need a profile Icon for the HX parts if you would. :) And something strange happens on my end. I have been updating the B9 parts with profiles and on my system not one part where I included "srf" in the config shows up under surface attach, any idea why that might be?

Link to comment
Share on other sites

My config and icons aren't live in the main Filter Extensions repo yet, so the filter-by-bulkhead tab is still entirely stock, but I may be able to help if you could give an example "bulkheadProfiles = whatever" line from one of the affected parts.

I don't use B9 myself, but I can grab a part and trace it if you give me a name. HX is the zig-zag one that Scott Manley used for the Draco, right?

Link to comment
Share on other sites

@Kerbas_ad_astra No the HX parts are gigantic space station / mothership parts. They are so big it is basically impossible to launch them from Kerbin's surface. All the HX parts are in the folder Structure_HX in Parts in B9. You can get the latest version here https://bitbucket.org/blowfishpro/b9-aerospace/downloads

As for the example line

bulkheadProfiles = size1, srf

thx for your assistance.

Edited by Flashblade
Link to comment
Share on other sites

That looks like it should be OK. (I guarantee that a line like that will work fine once my config joins Filter Extensions, because I use plenty like it and they work.) One idea that occurs to me: try taking the space out. I know Crzyrndm had to add some extra logic to trim spaces (i.e. so that "size1, srf" doesn't get treated as "size1" and " srf", that is "[space]srf"), so that might be the issue.

I'll also work on the HX icon. (If there are any other icons that this pack needs, let me know and I'll be happy to add them.)

Link to comment
Share on other sites

And here we go, with the HX symbol! It strains the boundaries of the 32x32 pixel limit, but I think it turned out pretty well, if I may say so myself. (Note, I have "bulkheadProfile = hx" in my test set of parts, let me know what name you plan to use for the real thing.)

7No2a4R.png

Link to comment
Share on other sites

Thank you very much, I used "HX" as a profile that is the only difference. =) As for your suggestion I am going to try that although Squads configs with multiple profiles have a space between the comma and the next profile. Actually first thing I am going to try is probably a re-install on my part. Maybe something is just weird for no reason, if that doesn't fix it I am going to try your suggestion.

Link to comment
Share on other sites

Thank you very much, I used "HX" as a profile that is the only difference. =) As for your suggestion I am going to try that although Squads configs with multiple profiles have a space between the comma and the next profile. Actually first thing I am going to try is probably a re-install on my part. Maybe something is just weird for no reason, if that doesn't fix it I am going to try your suggestion.

It's easy enough to sort "HX" instead of "hx" into the category, although every other category is all lowercase FYI.

Link to comment
Share on other sites

is squads system case sensitive or do HX and hx end up in the same place? (I ask because FE should match Squad in this behaviour and it's trivial to change)

Edited by Crzyrndm
Link to comment
Share on other sites

is squads system case sensitive or do HX and hx end up in the same place? (I ask because FE should match Squad in this behaviour and it's trivial to change)

Testing just now, Squad's system is case sensitive. "mK2" ends up in a different place from "mk2", and only the latter gets the icon. (Interestingly, mK2 gets displayed as "m K2".)

For anyone creating new cross-sections, it's probably best to stick to lowercase for ease of remembering.

Link to comment
Share on other sites

Okay I changed the hx profile to lower case on my end as well. As for your suggestion to remove the space between the coma and the second profile. I tried this on a fresh install with nothing but B9 as a mod. It didn't help and I really can't see the error at all.

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