Jump to content

[1.11.2] B9PartSwitch v2.18.0 (March 17)


blowfish

Recommended Posts

5 hours ago, zer0Kerbal said:

Feature Request: way to specify subtype ordering.

Have several patches that add subtype. Is there a way to specify the ordering of the types in the PAW?

If I understand it correctly, defaultSubtypePriority only specifies which subtype is default.

It seems you can change the display order of subtypes, just by changing the order that they are listed in the cfg. It looks like they get displayed from first one listed to last one listed... vOv

And I took it to mean, from what I read in the wiki, that the defaultSubtypePriority specifies not just default, but the order based on where the subtype ends up in the techtree/upgrades? vOv

Edited by Stone Blue
Link to comment
Share on other sites

8 minutes ago, Stone Blue said:

It seems you can change the display order of subtypes, just by changing the order that they are listed in the cfg. It looks like they get displayed from first one listed to last one listed... vOv

And I took it to mean, from what I read in the wiki, that the defaultSubtypePriority specifies not just default, but the order based on where the subtype ends up in the techtree/upgrades? vOv

I was DM'd concerning this. Their order of appearance in-game depends on the order they're listed in the config file or read by MM (across config files) but apparently, special treatment is given to the Structural subtype if it exists. I don't list this first in any of my configs yet every part that I configure will default to this in-game.

Subtype priority will force the highest priority subtype to be pre-selected when the part is picked but does not visibly rearrange anything.

You can force the visual change by deleting all the subtypes and then re-adding them in your order (and likely, not adding the Structural subtype).

 

Link to comment
Share on other sites

Thank you. Knew all that, except about structural.

I am asking for a way to specify order. This is because I have multiple patches adding tank types depending upon what mods are installed.

yes, I can put everything in one patch - and have a :NEEDS[] on the subtypes, but that is inelegant and inflexible; hence why I am asking for a new feature - ability to specify order.

 

8 minutes ago, JadeOfMaar said:

will default to this in-game.

Will be removing this subtype.

Link to comment
Share on other sites

@zer0Kerbal that seems like a reasonable request.  While it's possible to get things in the right order with MM patches, it can prove tricky to get right, and probably pretty brittle (likely to break) when changes happen.  It's going to require some code cleanup first so please open an issue at Github and I'll try to address it when I can.

Link to comment
Share on other sites

4 hours ago, blowfish said:

@zer0Kerbal that seems like a reasonable request.  While it's possible to get things in the right order with MM patches, it can prove tricky to get right, and probably pretty brittle (likely to break) when changes happen.  It's going to require some code cleanup first so please open an issue at Github and I'll try to address it when I can.

thank you @blowfish - appreciate

done.

was this mod that inspired it:

 

Link to comment
Share on other sites

  • 4 weeks later...

@blowfish, is it possible to change the "title" of a part (the display name) when selecting a variant?  I'm working on switching my Eve Optimized Engines mod over to using B9 Part Switch.  The plan is to have the standard engine and the Eve optimized version as switchable variants.  I'd like the Eve variant to have a different model number and name than the standard.  I've got everything working but for one issue.  When I mouse over the part, it always shows the standard stock title.  Is there presently a way to make it show different titles for different variants?  And if not, is this a feature that could be added?  Thanks.

Link to comment
Share on other sites

12 hours ago, OhioBob said:

@blowfish, is it possible to change the "title" of a part (the display name) when selecting a variant?  I'm working on switching my Eve Optimized Engines mod over to using B9 Part Switch.  The plan is to have the standard engine and the Eve optimized version as switchable variants.  I'd like the Eve variant to have a different model number and name than the standard.  I've got everything working but for one issue.  When I mouse over the part, it always shows the standard stock title.  Is there presently a way to make it show different titles for different variants?  And if not, is this a feature that could be added?  Thanks.

Unfortunately it looks like that info comes from a place shared by all instances of a part.  There might be some hacks that would make this work but I don't really like them.

Link to comment
Share on other sites

5 minutes ago, blowfish said:

Unfortunately it looks like that info comes from a place shared by all instances of a part.  There might be some hacks that would make this work but I don't really like them.

I don't want you to do anything that you don't like.  I was just hoping there'd be an easy solution.  Thanks for looking into it.

Link to comment
Share on other sites

@blowfishHi! I found a bug with the cost of fuel tanks. It breaks the economics of the game. For example, take two tanks: mk3FuselageLF_100 (file name in squad/parts folder MK3 LF100) and mk3FuselageLFO_100 (file name in squad/parts folder MK3 LFO100). MK3 LF100 costs 17200 credits. At this time MK3 LFO100 costs 10000 credits when initially filled with oxidizer and liquid fuel, and if you replace its contents (using B9 partswitch mod) with liquid fuel, it will cost 13410 credits. This problem exists with all LF/LFO tank pairs. Can you fix it? For example, to equalize the cost of similar LFO and LF.

Thank you for the mod! I'm sorry about the bad English. That's not my native language. 

Spoiler

-E-5txl-GYo.jpg9A_Yc9o9z2Y.jpg

Edited by Husky777
Link to comment
Share on other sites

8 hours ago, Husky777 said:

@blowfishHi! I found a bug with the cost of fuel tanks. It breaks the economics of the game. For example, take two tanks: mk3FuselageLF_100 (file name in squad/parts folder MK3 LF100) and mk3FuselageLFO_100 (file name in squad/parts folder MK3 LFO100). MK3 LF100 costs 17200 credits. At this time MK3 LFO100 costs 10000 credits when initially filled with oxidizer and liquid fuel, and if you replace its contents (using B9 partswitch mod) with liquid fuel, it will cost 13410 credits. This problem exists with all LF/LFO tank pairs. Can you fix it? For example, to equalize the cost of similar LFO and LF.

Thank you for the mod! I'm sorry about the bad English. That's not my native language. 

  Hide contents

-E-5txl-GYo.jpg9A_Yc9o9z2Y.jpg

B9PartSwitch doesn't configure anything by default, so the particulars of cost etc are coming from a different mod.  CryoTanks is the most common but not the only one.

Link to comment
Share on other sites

4 hours ago, blowfish said:

B9PartSwitch doesn't configure anything by default, so the particulars of cost etc are coming from a different mod.  CryoTanks is the most common but not the only one.

Hello again! I identified the problem by sequentially disabling all the mods.  In stock game MK3-LFO cost is 10000 credits, MK3-LF cost is 17200 credits. So in the original game the cost of liquid fuel is more expensive than oxidizer combined with liquid fuel. You guessed with CryoTanks mod and it's cool, my fault that I didn't attach the list of mods at once.   CryoTanks mod allows you to switch tanks and thus breaks the economy where tanks of equivalent size cost different number of credits. Do you think this problem should be solved? And who is more effective in doing that? 

I see solution:
- By combining the mods b9 part switch and CryoTanks, the cost of a universal tank (Not fuel costs, just the cost of the tank) is higher than that of a special tank for liquid fuels. This solution seems to me the most adequate. It must be difficult from the technical side. 

Edited by Husky777
Link to comment
Share on other sites

12 hours ago, Husky777 said:

Hello again! I identified the problem by sequentially disabling all the mods.  In stock game MK3-LFO cost is 10000 credits, MK3-LF cost is 17200 credits. So in the original game the cost of liquid fuel is more expensive than oxidizer combined with liquid fuel. You guessed with CryoTanks mod and it's cool, my fault that I didn't attach the list of mods at once.   CryoTanks mod allows you to switch tanks and thus breaks the economy where tanks of equivalent size cost different number of credits. Do you think this problem should be solved? And who is more effective in doing that? 

I see solution:
- By combining the mods b9 part switch and CryoTanks, the cost of a universal tank (Not fuel costs, just the cost of the tank) is higher than that of a special tank for liquid fuels. This solution seems to me the most adequate. It must be difficult from the technical side. 

Let me clarify.  CryoTanks configures all the tank costs etc.  B9PartSwitch just provides the interface through which it does that.

Edited by blowfish
Link to comment
Share on other sites

11 hours ago, blowfish said:

Let me clarify.  CryoTanks configures all the tank costs etc.  B9PartSwitch just provides the interface through which it does that.

Thank you for your patience and your time! Then I'll contact the CryoTanks developer.

Edited by Husky777
Link to comment
Share on other sites

  • 3 weeks later...

B9PartSwitch v2.14.0 for KSP 1.8.1

  • Fix non-unique aspects complaining when present on more than one module
  • Generic material modifiers
    • MATERIAL nodes on subtypes
      • transform defines GameObjects on which to use renderers
      • baseTransform defines GameObjects and children on which to use renderers
      • FLOAT - modifies a float property
        • shaderProperty - name of the shader property to modify
        • value - float to set the value to
      • COLOR - modifies a color property
        • shaderProperty - name of the shader property to modify (default _Color)
        • color - color to set the property to, can be specified in any of the regular formats (name, hex, RGB(A) list)
      • TEXTURE modifies a texture property (same functionality as TEXTURE nodes directly on the subtype)
        • currentTexture - name of current texture to match when building (not full path) (optional)
        • texture - path to new texture to switch to
        • isNormalMap - whether to access the texture as a normal map or not (default false)
        • shaderProperty - shader property to modify the color on
          • Default _MainTex if isNormalMap = false
          • Default _BumpMap is isNormalMap = true
  • Listen for OnPartModelChanged event to reinitialize model
  • Send ModuleDataChanged to modules that have had their data changed
    • Include two attributes in the event details, requestNotifyFARToRevoxelize and requestRecalculateDragCubes, which can be used to request FAR/drag cubes updates at the end of the cycle
  • Transform move/rotation/scale now affect drag cubes/FAR
  • Send/listen for DragCubesWereRecalculated and FarWasNotifiedToRevoxelize to make sure actions are only done once per cycle
  • Fix drag cube updates possibly not actually being used
Link to comment
Share on other sites

I'm running this mod through CKAN, and the newest version (v2.15.2) is giving an error:
B9PartSwitch has encountered a fatal error and KSP needs to close.
Fatal exception while loading fields on module ModuleB9PartSwitch on part
Exception while loading field subtypes on type B9PartSwitch.ModuleB9PartSwitch
Exception while loading fields on subtype PartSubtype LH2/O/MP
Exception while loading field tankType on type B9PartSwitch.PartSubtype
No tank type named 'MkIVLH20CryoMP-5' exists

Fatal exception while loading fields on module ModuleB9PartSwitch on part
Exception while loading field subtypes on type B9PartSwitch.ModuleB9PartSwitch
Exception while loading fields on subtype PartSubtype LH2/O/MP
Exception while loading field tankType on type B9PartSwitch.PartSubtype
No tank type named 'MkIVLH2OCryoMP' exists

I'll admit, I'm running a lot of other mods, so idk if this is just an internal issue, but I figured you'd want to know anyway.

Edit: Removing the MkIV Spaceplane System mod got rid of the crash.

Edited by EvilGenius97
Cause of issue was found.
Link to comment
Share on other sites

3 hours ago, EvilGenius97 said:

I'll admit, I'm running a lot of other mods, so idk if this is just an internal issue, but I figured you'd want to know anyway.

Edit: Removing the MkIV Spaceplane System mod got rid of the crash.

Looking at the MkIV system configs, this could happen if you have CryoTanks installed but not CommunityResourcePack (which is a dependency of CryoTanks).  Or some other installation issue related to those two mods.  The full log after this fatal error happened would tell me exactly what's wrong.

Link to comment
Share on other sites

57 minutes ago, blowfish said:

Well you seem to not have ModuleManager installed.  That is a dependency of ... probably most of the other mods you have

Ok, apparently CKAN doesn't install ModuleManager correctly...

I manually installed ModuleManager and it worked like a charm

 

Thanks!!

Link to comment
Share on other sites

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