Jump to content

[1.8-1.12] Custom Bulkhead Profiles 0.2.0


taniwha

Recommended Posts

Custom Bulkhead Profiles is a Kerbal Space Program mod to set icons and tooltips for custom bulkhead profiles.

KSP has provided part filters for some time now, including the ability to filter parts based on their "bulkhead profiles": essentially their size and shape. However, KSP determines a part's profiles simply by tags defined in the part's configuration, with minimal support for custom profiles: the part would be sorted correctly, but the filter buttons would have a question mark icon and no tooltip, leaving it up to modders to find a way to set the icon and tooltip. Custom Bulkhead Profiles is a mod that makes it easy for non-programmers to configure custom profiles and also eliminates the need for every mod to provide its own customization code.


Defining a custom bulkhead profile is very simple: create a KSP config file with a BulkheadProfileDefinition that gives the profile name, display name (used for the tooltip) and the normal and selected icon texture paths. eg

BulkheadProfileDefinition {
    name = dgsize1
    displayName = DG 1 [1.875m]
    normalIcon = DiamondGrid/Textures/size1
    selectedIcon = DiamondGrid/Textures/size1
}

During KSP loading, Custom Bulkhead Profiles will read every BulkheadProfileDefinition it finds and then use those definitions to set up the profile filter buttons in the editor (VAB/SPH). Each definition applies to only one profile.

Download: CustomBulkheadProfiles 0.2.0

Source code (GPLv3):: github

Edited by taniwha
Link to comment
Share on other sites

  • 2 months later...

Love this!  I know this is a question a lot of mod makers dislike, but, any chance of adding to CKAN? And/or (if you're not interested in doing it yourself), any concerns about someone else providing the relevant metadata?

Reason: I'd like to make it a dependency for NEOS.

Link to comment
Share on other sites

On 4/12/2019 at 10:28 PM, taniwha said:

I don't deal with CKAN myself, but I have no objection's to people putting my stuff in ckan so long as they do a good job of it :) (CBP does have a .version file, so it should go well enough).

Nice mod, have you tested it with Filter Extensions?

Also, give me a holler if you ever need/want CKAN help

On 4/11/2019 at 10:09 AM, micha said:

Love this!  I know this is a question a lot of mod makers dislike, but, any chance of adding to CKAN? And/or (if you're not interested in doing it yourself), any concerns about someone else providing the relevant metadata?

Reason: I'd like to make it a dependency for NEOS.

@micha That might be a problem for FilterExtensions.  I would suggest that rather than make it a dependency, you make it "recommends".  Also,  let me know what the bulkheadProfile is in NEOS and an icon if possible, I'll see if I can get it added to FilterExtensions

Link to comment
Share on other sites

34 minutes ago, linuxgurugamer said:

Also, give me a holler if you ever need/want CKAN help

@linuxgurugamer  I've already added it to CKAN with @taniwha's permission :)

 

 

34 minutes ago, linuxgurugamer said:

@micha That might be a problem for FilterExtensions.  I would suggest that rather than make it a dependency, you make it "recommends".  Also,  let me know what the bulkheadProfile is in NEOS and an icon if possible, I'll see if I can get it added to FilterExtensions

A lot of "parts" in NEOS are never seen either in the Editor nor in Flight, they are only there to show up in the Tech Tree. So they never had a bulkheadProfile, causing problems in recent versions of KSP.  I've given them "internal" as a bhp (will take suggestions for a more appropriate one name), and just referenced the "Miniaturisation" icon from the Tech Tree for CustomBulkheadProfiles (if any skilled icon designer wants to provide a more suitable one, I'll be more than happy).

Slowly working my way towards the next release, hopefully before the end of the month, which will include these changes.

And yes, I was thinking "recommends" rather than "requires".
I'll have a play with FilterExtensions as well to make sure it plays nicely; thanks for the heads-up.

Link to comment
Share on other sites

1 minute ago, micha said:

@linuxgurugamer  I've already added it to CKAN with @taniwha's permission :)

 

I know, I was just letting him know in general for the future.

1 minute ago, micha said:

A lot of "parts" in NEOS are never seen either in the Editor nor in Flight, they are only there to show up in the Tech Tree. So they never had a bulkheadProfile, causing problems in recent versions of KSP.  I've given them "internal" as a bhp (will take suggestions for a more appropriate one name), and just referenced the "Miniaturisation" icon from the Tech Tree for CustomBulkheadProfiles (if any skilled icon designer wants to provide a more suitable one, I'll be more than happy).

"internal" is fine.  

I have the following local patch to cover all mods with issues like this:


// This is to work around unpatched mods. It's not as good as having the 
//correct profiles defined, but it avoids locking up the VAB.

@PART[*]:HAS[~bulkheadProfiles[]]
{
	bulkheadProfiles = srf,missingBulkheadProfile
}

This serves two purposes.  First, it solves the issues with parts and no bulkheadProfiles statement.  Second, I can search in the ModuleManager.ConfigCache file for all lines with "missingBulkheadProfile" and then know what needs fixing.

Link to comment
Share on other sites

  • 1 month later...
  • 6 months later...
  • 3 months later...
  • 1 year 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...