Judicator81 Posted August 19, 2021 Share Posted August 19, 2021 (edited) SimpleRepaint [0.4.2] Universal, simple and lightweight parts recoloring. More screenshots: Reveal hidden contents Demonstration of parts repainting in flight (yes, it's possible): https://i.imgur.com/Vw18sTk.mp4 How do I repaint parts? Open PAW menu by right-clicking on part (in VAB/Hangar or in flight), and choose desired color variant ("Part simple repaint"). See screenshot below. How does it work? Each part in the game has one or more 3D-models with materials, shaders and textures tied to them. There is "basic" stock shader (KSP/Bumped Specular) that majority of parts use. SimpleRepaint alters color modifier for materials with this shader, changing overall part color as a result. This approach has some advantages: SimpleRepaint is universal. The majority of parts and mods are supported "out of the box" with no additional configs needed. Mod contains no textures at all and has low memory footprint. It does, however, generate tons of MM-patches. Possible colors variants list could be relatively easily edited and supplemented. There are serious drawbacks though: Only white or mostly white parts will be repainted as expected. If part is not white (let's say, orange fuel tank or grey structural beam), repainting it will not give expected results. Parts, using not "basic" shader, will not be repainted. Obvious example are probe cores, covered with silver or golden foil. Another example are mods, which use their own shaders even for generic materials (so far I found only one such mod: WBI Mk-33). Only color can be altered, not shininess, transparency and such. Also, only colors from predefined list could be used. Can Simple Repaint be used together with Textures Unlimited? Yes. Those parts, that have no TU support, will get SimpleRepaint features. What parts/mods are not supported? Various fairings, including stock ones, procedural decoupler shrouds and fairings from SimpleAdjustableFairing mod. Procedural parts from the eponymous mod, and procedural wings. Deployable science parts from Breaking Ground DLC. Deployable work lamps and kerbonauts equipment (EVA Jetpack, EVA Repair Kit, ...). Parts with SSTU Recolor or Textures Unlimited modules, as they already have support for much more powerful repainting mod. Is it compatible with part variants? Yes. However, there is a visual bug: changing part variant resets part color to default. Choosing another color after switching part variant fixes this. Dependencies Module manager B9PartSwitch (2.16.0 or later) Both mods are required and are bundled as part of download. Installation Make a backup copy of Colors.cfg file GameData/SimpleRepaint folder inside your Kerbal Space Program folder. It's only needed if you changed and/or added your own colors. Remove mod folder SimpleRepaint from GameData folder inside your Kerbal Space Program folder before installation. Place the GameData folder from downloaded archive inside your Kerbal Space Program folder. Restore Colors.cfg file from backup to GameData/SimpleRepaint folder (see para. 1). Possible colors You can change possible colors variants in GameData/SimpleRepaint/Colors.cfg file. There are maximum 24 color variants available. Please set name to NOT_USED for all unused colors. Black and grey lists Some parts do not support B9PartSwitch for some reason. These are added to so-called "grey list", and will (or will not, depending on UseStockVariantSwitcherForB9PSIncompatibleParts setting) get repainting via stock PartVariants. It's not as comfortable as B9PS (in my opinion), and also does not support repainting parts in flight. You can find those parts in GameData/SimpleRepaint/GreyList.cfg file. Some parts are not supported at all, and for some others SimpleRepaint recoloring does not have much sense: silver or golden foil covered, metallic or dark parts will not get any value from it. Those parts are added to black lists. You can find them in GameData/SimpleRepaint/IgnoreParts folder. Settings There are three settings in GameData/SimpleRepaint/Settings.cfg config file. Repaint in flight By default you can repaint your vessel parts even in flight scene. If you feel that it's not very realistic, you can disable this feature: just set RepaintInFlight value to false. Using stock part variants switching instead B9PartSwitch Where are some parts which does not seem to be compatible with B9PartSwitch, and they are added to "grey list". Notable examples are stock (not ReStock!) radial ore drills. Those parts still get repaint ability through stock part variants interface. Set UseStockVariantSwitcherForB9PSIncompatibleParts value to false if you don't want repaint ability for any B9PS-incompatible parts. Repainting only whitelisted parts By default, all compatible parts (both stock and from mods) will get repainting ability. If you disable this behavior by setting RepaintWhitelistedPartsOnly value to true, only specified parts will get color switching. Where are examples of whitelists in GameData/SimpleRepaint/Whitelists folder. They should be renamed to .cfg files in order to take effect. Credits Many thanks to: - @Electrocutor for initial Module Manager config file (implementing colors switching via stock PartVariant), which became the basis of this mod. See this topic: https://forum.kerbalspaceprogram.com/index.php?/topic/173208-partvariant-color-tinting/. - @Hohmannson for updating @Electrocutor's initial config and adding ReStock-friendly colors, for lots of suggestions and ideas, and extensive testing of SimpleRepaint. Licensing This mod is distributed under a Creative Commons Attribution 4.0 International License (CC-BY-4.0). You are free to share and adapt the materials for any purpose, when providing appropriate attribution. Bundled mods are distributed under their own licenses: ModuleManager by ialdabaoth, Sarbian and Blowfish is licensed under a "CC share-alike license". More information can be found here. B9PartSwitch by blowfish is distributed under LGPL v3.0. Details and source are here. Changelog Reveal hidden contents 0.4.2 Added three drills from MKS mod to greylist. Added blacklist for Kerbal Atomics, added reactors and RTGs from dev version of Near Future Electrical to blacklist. Moved greylist to separate GreyList.cfg file. Bundled B9PartSwitch updated to last version (2.20.0). Mod is marked as 1.12.5 compatible. 0.4.1 Added some parts from VaporVent mod to greylist. Added blacklist for Bluedog_DB mod (about 600 parts are blacklisted from more than a thousand total in BDB). Mod is marked as 1.12.4 compatible. 0.4.0 Changed MM patch order to get rid of problems, caused by interaction with other mods' patches, updating B9PS switchers (i.e. Kerbalism + SSPX). Black and grey lists are now moved to separate folder (IgnoreParts). List of blacklisted parts is expanded, parts from several mods added. 0.3.3 Added some unsupported parts to blacklist (thanks to @Hohmannson). Marked as KPS 1.12.3 compatible. 0.3.2 Made compability patch for BDArmory guns more universal, which hopefully will improve support for BDA-based parts mods in the future. Several parts from Aviator Arsenal Continued mod added to greylist. 0.3.1 Added setting to use whitelist-only repainting (disabled by default, see readme). 0.3.0 Rearranged colors list, added new colors. Parts incompatible with B9PartSwitch are added to grey list. So far three stock parts and several parts from BDArmory and MiningExpansion are greylisted. Greylisted parts will still get repaint ability with stock Part Variants interface, added setting to disable this behavior (enabled by default). 0.2.1 Added ability to repaint parts in flight and setting to disable this behavior (enabled by default). 0.2.0 Fixed fatal bug: kerbals going on EVA gone missing, some parts of the vessel explode, B9PS error pop ups. Apparently having any B9PartSwitch module on kerbals themselves (KerbalEVA* parts) is a really bad idea. 0.1.0 Initial version with universal patch, using B9PartSwitch to choose part color. Downloads Spacedock GitHub CKAN Edited June 19, 2023 by Judicator81 0.4.2 Quote Link to comment Share on other sites More sharing options...
Judicator81 Posted August 31, 2021 Author Share Posted August 31, 2021 Version 0.3.2 released. Changelog: Made compability patch for BDArmory guns more universal, which hopefully will improve support for BDA-based parts mods in the future. Several parts from Aviator Arsenal Continued mod added to greylist. Quote Link to comment Share on other sites More sharing options...
Wercho Posted September 12, 2021 Share Posted September 12, 2021 I just checked this out, and it really looks fantastic. Thanks so much for this! Quote Link to comment Share on other sites More sharing options...
Sudragon Posted November 12, 2021 Share Posted November 12, 2021 Looks good, Does Not Play Well with SSTU. Messes up the part configuration panel in the VAB. Quote Link to comment Share on other sites More sharing options...
Judicator81 Posted November 12, 2021 Author Share Posted November 12, 2021 On 11/12/2021 at 7:24 AM, Sudragon said: Looks good, Does Not Play Well with SSTU. Messes up the part configuration panel in the VAB. Expand That's strange. All parts, having SSTU modules, should be blacklisted and therefore should not have SimpleRepaint functionality. I'll check this. Quote Link to comment Share on other sites More sharing options...
Galileo chiu Posted January 28, 2022 Share Posted January 28, 2022 will it work with restock? Quote Link to comment Share on other sites More sharing options...
Judicator81 Posted January 28, 2022 Author Share Posted January 28, 2022 On 1/28/2022 at 9:05 AM, Galileo chiu said: will it work with restock? Expand Yes, it works with ReStock, as well as with absolute majority of other mods. Quote Link to comment Share on other sites More sharing options...
chaos113 Posted April 2, 2022 Share Posted April 2, 2022 this mod causes module manager to stop loading and freezes the start up Quote Link to comment Share on other sites More sharing options...
UnanimousCoward Posted April 2, 2022 Share Posted April 2, 2022 On 4/2/2022 at 3:46 AM, chaos113 said: this mod causes module manager to stop loading and freezes the start up Expand For me, this mod causes Module Manager to appear to stop loading at the stage when it's applying the Simple Repaint patches. It applies the patch individually to almost every part in the game. If you have a lot of added mod parts, it might have to apply thousands and thousands of patches. At least for me (with tons of extra part mods) it eventually gets going again and the game finishes loading. An alternative is to change the settings so it applies the patches only to whitelisted parts and then choose which specific parts to apply it to. Your game should load a lot quicker then. Quote Link to comment Share on other sites More sharing options...
Judicator81 Posted April 2, 2022 Author Share Posted April 2, 2022 On 4/2/2022 at 3:46 AM, chaos113 said: this mod causes module manager to stop loading and freezes the start up Expand What Module Manager version are you using? If 3.*, you could upgrade to some 4.* version, for example, last one (4.2.1). Quote Link to comment Share on other sites More sharing options...
chaos113 Posted April 2, 2022 Share Posted April 2, 2022 im using 4.2.1 Quote Link to comment Share on other sites More sharing options...
Guest Posted May 4, 2022 Share Posted May 4, 2022 Just to let you know, SimpleRepaint prevents some drills from showing in the VAB/SHP, like some from KPBS or the asteroid drill of Hangar Quote Link to comment Share on other sites More sharing options...
Judicator81 Posted July 6, 2022 Author Share Posted July 6, 2022 Version 0.3.3 released. Changelog: Added some unsupported parts to blacklist (thanks to @Hohmannson). Marked mod as KPS 1.12.3 compatible. On 5/4/2022 at 8:14 PM, Forked Camphor said: Just to let you know, SimpleRepaint prevents some drills from showing in the VAB/SHP, like some from KPBS or the asteroid drill of Hangar Expand Fixed in 0.3.3. Quote Link to comment Share on other sites More sharing options...
Beetlecat Posted July 6, 2022 Share Posted July 6, 2022 I missed this during my most recent KSP hiatus. Looks spectacular (pun intended). Quote Link to comment Share on other sites More sharing options...
Beetlecat Posted July 6, 2022 Share Posted July 6, 2022 On 7/6/2022 at 2:06 PM, Judicator81 said: Version 0.3.3 released. Changelog: Added some unsupported parts to blacklist (thanks to @Hohmannson). Marked mod as KPS 1.12.3 compatible. Fixed in 0.3.3. Expand Sorry to double-post, but my game is hanging at startup, and it seems to be stalling at adding *all the patches* for way-too-many mods. Since the current method of blacklisting is part-based, is there an MM syntax to ignore an entire mod's / folders worth of parts? Quote Link to comment Share on other sites More sharing options...
Hohmannson Posted July 6, 2022 Share Posted July 6, 2022 On 7/6/2022 at 6:59 PM, Beetlecat said: is there an MM syntax Expand Theoretically, you can write a patch which will look into MODEL{} node, searching for name of the folder, and if it finds one, apply SR_Ignore tag. May or may not try it later. Quote Link to comment Share on other sites More sharing options...
TanoPrime Posted September 19, 2022 Share Posted September 19, 2022 If I install this mod, launch some colorized craft, and uninstall the mod for some reason, will the colorized craft still work in my save? I know that with some mods it breaks the craft if the mod isn't present.. Quote Link to comment Share on other sites More sharing options...
Judicator81 Posted September 25, 2022 Author Share Posted September 25, 2022 On 9/19/2022 at 1:59 PM, TanoPrime said: If I install this mod, launch some colorized craft, and uninstall the mod for some reason, will the colorized craft still work in my save? Expand Yes, your spacecraft will be fine in such situation. Version 0.4.0 released. Changelog: Changed MM patch order to get rid of problems, caused by interaction with other mods' patches, updating B9PS switchers (i.e. Kerbalism + SSPX). Black and grey lists are now moved to separate folder (IgnoreParts). List of blacklisted parts is expanded, parts from several mods added. Quote Link to comment Share on other sites More sharing options...
TanoPrime Posted October 2, 2022 Share Posted October 2, 2022 On 9/25/2022 at 2:40 PM, Judicator81 said: Yes, your spacecraft will be fine in such situation. Expand Yay, thank you! Installing now Quote Link to comment Share on other sites More sharing options...
Motokid600 Posted October 28, 2022 Share Posted October 28, 2022 So this mod ended up being the culprit for my current issue. One being parts from Vapor Vents not showing up and some B9 menu functionality being missing ( Like on some engines have multiple configs that were missing ) KSP.log Player.log Mod List Potential relevant line. PartLoader: Compiling Part 'VaporVent/parts/Vent1/part/vent' (Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 35) PartLoader: Encountered exception during compilation. System.NullReferenceException: Object reference not set to an instance of an object at B9PartSwitch.ColorPropertyModifierInfo+<CreateModifiers>d__4.MoveNext () [0x00050] in <a3c2951fc74e4639820ef37d2d29f386>:0 at B9PartSwitch.MaterialModifierInfo+<CreateModifiers>d__8.MoveNext () [0x001dd] in <a3c2951fc74e4639820ef37d2d29f386>:0 at B9PartSwitch.PartSubtype.Setup (B9PartSwitch.ModuleB9PartSwitch parent, System.Boolean displayWarnings) [0x00383] in <a3c2951fc74e4639820ef37d2d29f386>:0 at B9PartSwitch.ModuleB9PartSwitch.InitializeSubtypes (System.Boolean displayWarnings) [0x0005b] in <a3c2951fc74e4639820ef37d2d29f386>:0 at B9PartSwitch.ModuleB9PartSwitch.OnIconCreate () [0x00006] in <a3c2951fc74e4639820ef37d2d29f386>:0 at PartLoader.CreatePartIcon (UnityEngine.GameObject newPart, System.Single& iconScale) [0x0005c] in <39c0323fb6b449a4aaf3465c00ed3c8d>:0 at PartLoader.ParsePart (UrlDir+UrlConfig urlConfig, ConfigNode node) [0x00ff2] in <39c0323fb6b449a4aaf3465c00ed3c8d>:0 at PartLoader+<CompileParts>d__56.MoveNext () [0x00685] in <39c0323fb6b449a4aaf3465c00ed3c8d>:0 (Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 35) PartCompiler: Cannot compile part (Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 35) Quote Link to comment Share on other sites More sharing options...
Judicator81 Posted November 4, 2022 Author Share Posted November 4, 2022 On 10/28/2022 at 9:54 PM, Motokid600 said: So this mod ended up being the culprit for my current issue. One being parts from Vapor Vents not showing up and some B9 menu functionality being missing ( Like on some engines have multiple configs that were missing ) Expand Yep, it looks like some parts from VaporVents mod are not compatible with B9PartSwitch. Fixed in 0.4.1. Version 0.4.1 released. Changelog: Added some parts from VaporVent mod to greylist. Added blacklist for Bluedog_DB mod (about 600 parts are blacklisted from more than a thousand total in BDB). Mod is marked as 1.12.4 compatible. P.S. It looks like spacedock.info is temporally down now. Get new mod version from github or CKAN, if you are in a hurry. Quote Link to comment Share on other sites More sharing options...
stk2008 Posted November 4, 2022 Share Posted November 4, 2022 this is an awesome mod. I have a huge log spam though from ferram aerospaceFerrum Can post logs if needed Quote Link to comment Share on other sites More sharing options...
Judicator81 Posted November 4, 2022 Author Share Posted November 4, 2022 On 11/4/2022 at 5:08 PM, stk2008 said: this is an awesome mod. I have a huge log spam though from ferram aerospaceFerrum Can post logs if needed Expand Yes, logs would be of help. Quote Link to comment Share on other sites More sharing options...
stk2008 Posted November 4, 2022 Share Posted November 4, 2022 Thanks for getting back to me I hope this is what your after https://www.sendspace.com/file/a2ux6r Quote Link to comment Share on other sites More sharing options...
CaseyJones Posted March 14, 2023 Share Posted March 14, 2023 This works so well! Thank you! I was looking for something like this, and ended up with procedural parts to use the variety of textures.. but this.. This seems to work with almost anything It does bloat the MM patches a bit, I'm up to 60k (though I believe it was already around 35-40k) but I have not noticed a performance decrease. As a side note\related to the above, I do not use FAR. All in all, very satisfied that this does what it does! <3 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.