blowfish Posted May 26, 2016 Share Posted May 26, 2016 (edited) B9 Part Switch About B9 Part Switch is a plugin that allows mods to make parts switchable, similar to Firespitter and Interstallar fuel switchers. This mod doesn't do anything by itself, but provides a way for other mods to enable switching. Features Parts can switch their resources, models, stack nodes, textures, heat tolerance, surface attach position, crash tolerance, and many other fields Mass and cost can be modified Tanks used to switch resources are defined centrally to allow easy modification and minimal setup Easy to read, easy to write configs Configs are designed for easy patching by ModuleManager Unlimited switchers can be defined on the same part, provided that they do not conflict Download Download Latest Version from Github Also available on CKAN Latest development builds can be found here. Please only download if you have a specific reason. Development builds are not guaranteed to work. Troubleshooting If you are experiencing an issue, please read this topic, if you have not already, on how to get proper support. Incomplete support requests will not be processed. Most importantly, include logs. Source On Github Requirements Each release of B9PartSwitch is intended to be run with a particular version of KSP. Please only use that version. If you have an earlier version of KSP, find the correct download for that version. All previous releases are listed here. B9PartSwitch requires ModuleManager to work. Documentation Wiki in progress. Feel free to contribute. Changelog On the wiki License B9PartSwitch is licensed under the GNU Lesser General Public License Version 3.0 Authors @blowfish Main developer @bac9 author of Part Subtype Switcher, upon which this is heavily based And all others who have submitted fixes and enhancements Edited March 18, 2021 by blowfish Quote Link to comment Share on other sites More sharing options...
KocLobster Posted May 26, 2016 Share Posted May 26, 2016 (edited) Thank you for making a separate thread for just the part switcher. When I first saw mods that I use start to switch to B9 (quite recently), I really enjoyed it. I think it looks cleaner and is better than the IFS/Firespitter, although I like all three. Thanks. Edited May 26, 2016 by KocLobster Quote Link to comment Share on other sites More sharing options...
Gordon Dry Posted May 27, 2016 Share Posted May 27, 2016 (edited) After I updated to 1.3.0 my loaded craft with many procedural tanks, thrust plates and fairings is ripped apart with huge gaps and I can't reattach because the nodes are in the middle of the parts or nonexistant ... Log:https://www.dropbox.com/s/zcwaqcxeq7m52yf/2016-05-27-1%20B9PartSwitch%20update%20broke%20procedural%20parts%20craft.7z?dl=0 Edited May 27, 2016 by Gordon Dry Quote Link to comment Share on other sites More sharing options...
blowfish Posted May 27, 2016 Author Share Posted May 27, 2016 11 minutes ago, Gordon Dry said: After I updated my loaded craft with many procedural tanks, thrust plates and fairings it is ripped apart with huge gaps and I can't reattach because the nodes are in the middle of the parts or nonexistant ... Log:https://www.dropbox.com/s/zcwaqcxeq7m52yf/2016-05-27-1%20B9PartSwitch%20update%20broke%20procedural%20parts%20craft.7z?dl=0 And are any of the parts in question actually using B9PartSwitch? It has nothing to do with procedural parts. Looking at your logs (good that you provided them regardless), I don't see you ever placing a part that uses B9PartSwitch. Quote Link to comment Share on other sites More sharing options...
Gordon Dry Posted May 27, 2016 Share Posted May 27, 2016 Darn. It's so hard to find a culprit, yesterday I saved the craft, launched it and now it's like that. Okay, I will check further.... Quote Link to comment Share on other sites More sharing options...
kananesgi Posted May 27, 2016 Share Posted May 27, 2016 Just curious, has anyone heard of this mod causing problems with the EAS-1 External Command Seat (stock part)? I've spent the last week trying to track down which of my 120+ mods was causing my kerbals to stand in the place of the seat when I tried to board them to it. They would be standing there instead of sitting, and would walk in place when I tried to move them, stuck to the seat, with no way (short of editing the persistence file) to get them back out. I tried uninstalling mods which made sense, like Take Command and a few others that were obvious choices, but had no luck. I finally decided to start installing the mods one at a time in a clean KSP installation to find the culprit. B9PartSwitch passed that test. After going through every mod and not finding one that caused the issue, I tried the modded install again. Again, the problem was there. I loaded CKAN, and it showed an update for this mod. I downloaded it, then went back to work on a design I was working on before this problem was noticed. On a wild hair, I decided to test the EAS-1 again, and now it is working correctly. The only thing that changed between my last failed test and the working one was B9PartSwitch updating. I didn't think this did anything with the EAS-1, but as I said, this was the only change that occurred before the problem was corrected. Quote Link to comment Share on other sites More sharing options...
blowfish Posted May 27, 2016 Author Share Posted May 27, 2016 @kananesgi Shouldn't be. This mod will only affect parts that have ModuleB9PartSwitch (which is none if you don't install another mod that actually uses it). Quote Link to comment Share on other sites More sharing options...
kananesgi Posted May 27, 2016 Share Posted May 27, 2016 Hmm, that is interesting then. I wonder if some other mod that uses B9PartSwitch was somehow causing a conflict and the update for this resolved it. A mystery... Quote Link to comment Share on other sites More sharing options...
blowfish Posted May 27, 2016 Author Share Posted May 27, 2016 1 hour ago, kananesgi said: Hmm, that is interesting then. I wonder if some other mod that uses B9PartSwitch was somehow causing a conflict and the update for this resolved it. A mystery... Possible, but unlikely. There are only a few mods using B9PartSwitch right now, and to my knowledge none of them modify the command seat (and why would they?). If you want to determine the responsible mod, you probably have to do a binary search through your mods - disable half of them, see if that fixes it, if not it's in the other half, keep narrowing down by half until you isolate the mod responsible. Quote Link to comment Share on other sites More sharing options...
KocLobster Posted May 27, 2016 Share Posted May 27, 2016 1 hour ago, blowfish said: Possible, but unlikely. There are only a few mods using B9PartSwitch right now, and to my knowledge none of them modify the command seat (and why would they?). If you want to determine the responsible mod, you probably have to do a binary search through your mods - disable half of them, see if that fixes it, if not it's in the other half, keep narrowing down by half until you isolate the mod responsible. I like this, this technique works well for me. Quote Link to comment Share on other sites More sharing options...
Deimos Rast Posted May 30, 2016 Share Posted May 30, 2016 @blowfish quick question for you: is the moduleID always "fuelSwitch" when ModuleB9PartSwitch is in the role of switching fuel? I ask because I'm making a patch that applies GPO Speed Fuel Pump to parts with B9 fuel switching capability. Previously, I just blanket targeted the module itself, but I'm interested in making it a little more precise (since I'm assuming, like other Switchers, it isn't exclusive to fuel). Just wondering if that's a hard and fast rule I can work from (looking at B9 and CryoTanks seems to suggest as much). Cheers. Quote Link to comment Share on other sites More sharing options...
blowfish Posted May 30, 2016 Author Share Posted May 30, 2016 31 minutes ago, Deimos Rast said: @blowfish quick question for you: is the moduleID always "fuelSwitch" when ModuleB9PartSwitch is in the role of switching fuel? I ask because I'm making a patch that applies GPO Speed Fuel Pump to parts with B9 fuel switching capability. Previously, I just blanket targeted the module itself, but I'm interested in making it a little more precise (since I'm assuming, like other Switchers, it isn't exclusive to fuel). Just wondering if that's a hard and fast rule I can work from (looking at B9 and CryoTanks seems to suggest as much). Cheers. The only requirement on moduleID is that each ModuleB9PartSwitch has a unique value. It can be blank if there's only one module. I have definitely tried to use conventions throughout B9. If you're trying to identify parts with fuel switching capability, I would recommend :HAS[#baseVolume[>0]] - that's what I use in B9's own RF/MFT patches. Quote Link to comment Share on other sites More sharing options...
Deimos Rast Posted May 30, 2016 Share Posted May 30, 2016 40 minutes ago, blowfish said: The only requirement on moduleID is that each ModuleB9PartSwitch has a unique value. It can be blank if there's only one module. I have definitely tried to use conventions throughout B9. If you're trying to identify parts with fuel switching capability, I would recommend :HAS[#baseVolume[>0]] - that's what I use in B9's own RF/MFT patches. yeah, I thought that was the case, but I couldn't think of a better way and I was hoping it wouldn't bite me. I like your suggestion better, and I found the patch you mentioned; thanks. Quote Link to comment Share on other sites More sharing options...
Malich Posted June 3, 2016 Share Posted June 3, 2016 I'm having an issue with this mod interacting with, I think, Fuel Tanks Plus by @NecroBones or NFE by @Nertea. Recently I've been launching ships and when i switch back to them later they end up just showing a single part floating in space. This can be as fast as a quick hop to the space centre and back.Without B9PartSwitch installed the ship sites happy in orbit. As soon as I install it however the ship fails. This ship Link here Sites happily in orbit and consists of a clamp-o-tron, and FTP X200 - 08 Adaptor, an MRS 2.5m reaction wheel, and X200-48 fuel tank, and a NFE kerbopower reactor. Once PartSwitch is installed This happens and I am left with this tank floating in space. This tank was the root part of the vessel. I've tagged Nertea and NeroBones both as I'm not sure exactly where the fault is sitting. I'm not sure FTP has anything to do with PartSwitcher but I have another ship in orbit built with stock tanks and a Kerbopower reactor that has not been affected by this error suggesting its the tanks, not the reactor. Likewise the other vessel had a NFShips orbital command pod and has not been touched. Is there anything any of you fine gentlemen can think might be causing this? This is my current AVC list (yes I know CC is out of date, while troubleshooting I appear to have installed an out of date version) This is my Output Log. If there is any more info you need let me know, this is somewhat game breaking atm and if it can be resolved I'd be grateful! Thanks Mal Quote Link to comment Share on other sites More sharing options...
blowfish Posted June 3, 2016 Author Share Posted June 3, 2016 @Malich I'm away from home for a few days but feel free to remind me on Tuesday or so if I don't get back by then. Quote Link to comment Share on other sites More sharing options...
blowfish Posted June 4, 2016 Author Share Posted June 4, 2016 @Malich I found a bit of time to look for your log. I'm not quite sure what's causing that weird thing in the background but I did find a couple of errors on the FTP parts ( pinging @NecroBones ) Spoiler Warning on PartSubtype Delta on module ModuleB9PartSwitch (moduleID='meshSwitch') on part TPtank2mL00469: No transforms named TPtank2m-Orange2 found Warning on PartSubtype Titan on module ModuleB9PartSwitch (moduleID='meshSwitch') on part TPdecoupler3m: No transforms named TPtank3m-Silver found Warning on PartSubtype STS on module ModuleB9PartSwitch (moduleID='meshSwitch') on part TPdecoupler3m: No transforms named TPtank3m-Orange found Warning on PartSubtype STS on module ModuleB9PartSwitch (moduleID='meshSwitch') on part TPdome3m: No transforms named TPtank3m-Orange found Warning on PartSubtype Titan on module ModuleB9PartSwitch (moduleID='meshSwitch') on part TPtank3mL00938: No transforms named TPtank3m-Silver found Warning on PartSubtype STS on module ModuleB9PartSwitch (moduleID='meshSwitch') on part TPtank3mL00938: No transforms named TPtank3m-Orange found I also see a couple of exceptions related to Kerbal Alarm Clock. Quote Link to comment Share on other sites More sharing options...
Malich Posted June 4, 2016 Share Posted June 4, 2016 @blowfish, The weird thing in the background is Kerbin believe it or not. Thanks for taking a look at this, appreciated. I'll wait to see if NecroBones chimes in but for now I'll probably drop FTP from my mods and work it back in when there's a solution. Quote Link to comment Share on other sites More sharing options...
NecroBones Posted June 4, 2016 Share Posted June 4, 2016 No idea why it wouldn't find those transforms. I did just release an update to FTP to make the fuel and mesh switcher rules prioritize the switcher mods the same as each other. It's possible that a mixed-switcher thing was goofing things up. Quote Link to comment Share on other sites More sharing options...
blowfish Posted June 7, 2016 Author Share Posted June 7, 2016 B9PartSwitch v1.3.1 is now Available Fixes a bug where having info module on a root part would cause physics to break due to an exception (really a stock issue but no sense waiting for a fix) Quote Link to comment Share on other sites More sharing options...
Technologicat Posted June 7, 2016 Share Posted June 7, 2016 17 hours ago, blowfish said: B9PartSwitch v1.3.1 is now Available Fixes a bug where having info module on a root part would cause physics to break due to an exception (really a stock issue but no sense waiting for a fix) Here I was thinking the Kraken had compressed my space probe into a space tuna can, but it turns out I had set a switchable fuel tank as the root part and this update fixed it - in flight. Thanks! Quote Link to comment Share on other sites More sharing options...
gilbr0ther Posted June 10, 2016 Share Posted June 10, 2016 This mod can used to change only de textures on a model? and how I do that? I made 3 reskins to procedural fairing and want to use a mod to change the textures sry my english and thanks in advance Quote Link to comment Share on other sites More sharing options...
blowfish Posted June 10, 2016 Author Share Posted June 10, 2016 1 hour ago, gilbr0ther said: This mod can used to change only de textures on a model? and how I do that? I made 3 reskins to procedural fairing and want to use a mod to change the textures sry my english and thanks in advance Texture swapping isn't currently supported, sorry. At least not directly. I know there are other mods that add reskinned procedural fairings, but they display as separate parts. You might want to have a look at some of those. Quote Link to comment Share on other sites More sharing options...
gilbr0ther Posted June 10, 2016 Share Posted June 10, 2016 3 hours ago, blowfish said: Texture swapping isn't currently supported, sorry. At least not directly. I know there are other mods that add reskinned procedural fairings, but they display as separate parts. You might want to have a look at some of those. thanks Quote Link to comment Share on other sites More sharing options...
blowfish Posted June 11, 2016 Author Share Posted June 11, 2016 B9PartSwitch v1.4.0 is now Available The main change in this update is that the subtype is now inferred intelligently. Previously only the index was used, which could lead to a bunch of craft breaking scenarios. Here are some of the benefits: For Players When moving from a non-switching setup to a switching setup, or when using a switching setup from a different author, craft will generally not break because the subtype can be inferred based on the part's resources For Modders You can now reorder subtypes without breaking craft files, since the subtype name is the primary way of identifying the subtype. The full details of how this works are in the changelog. Quote Link to comment Share on other sites More sharing options...
Skystorm Posted June 12, 2016 Share Posted June 12, 2016 @blowfish I believe I have tracked down a nasty little bug in v1.4.0. I've had some problems with parts exploding instantly the moment I placed them on the launchpad. It seems there was a bug introduced in the following commit related to managing crash tolerance, except that you are accidentally setting maxTemp instead. Additionally, it appears that the same problem may exist for skinMaxTemp just above it. Github Commit: https://github.com/blowfishpro/B9PartSwitch/commit/717d81dcf48c66559adf2aa96816535ae97af85a Look at lines 492 - 495 (shown below) in method UpdatePartParams() of file ModuleB9PartSwitch.cs: if (CrashToleranceManaged) { part.maxTemp = (CurrentSubtype.crashTolerance > 0f) ? CurrentSubtype.crashTolerance : part.GetPrefab().crashTolerance; } I'm figuring this should say "part.crashTolerance = " instead of "part.maxTemp = ". Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.