Jump to content

[1.8.x - 1.12.x] SimpleRepaint: Universal, simple and lightweight parts recoloring


Judicator81

Recommended Posts

SimpleRepaint [0.4.2]

Universal, simple and lightweight parts recoloring.

7Xtn7zg.png

This is development thread of the mod. Release thread is here:

 

Changelog:

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.

 

 

Edited by Judicator81
0.4.2
Link to comment
Share on other sites

Very nice work!

It seems to work quite well on all parts that I've tested it on. (Windows are colored as well, but it isn't a big problem at all)
But for some reason it removes BDarmory guns essentially breaking any crafts that had those missing parts, no idea why.
any clues/potential fixes?

Link to comment
Share on other sites

15 hours ago, SovPenguin said:

But for some reason it removes BDarmory guns essentially breaking any crafts that had those missing parts, no idea why.
any clues/potential fixes?

BDArmory was not tested with SimpleRepaint. Thanks for reporting a problem, I'll look into it.

In the meantime, can you provide a KSP.log file? That would be of help.

Link to comment
Share on other sites

17 hours ago, SovPenguin said:

fixes

Open IgnoreParts.cfg with Notepad or other text editor and paste in the following:

@PART[*]:HAS[@MODULE[ModuleWeapon]:HAS[#weaponType[ballistic]]]:BEFORE[zzz_SimpleRepaint]
{
    %SR_Ignore = true
}

It's a temporary fix, you'll get your guns back, but without repaintability on them. Rocket pods and other stuff is OK. I reproduced the problem and investigation is happening.

Link to comment
Share on other sites

10 hours ago, Judicator81 said:

In the meantime, can you provide a KSP.log file? That would be of help.

Sure:
https://drive.google.com/file/d/1OECR51Ox2eDuWIpuxzcud9lze72JNEX9/view?usp=sharing

 

8 hours ago, Hohmannson said:

Open IgnoreParts.cfg with Notepad or other text editor and paste in the following:

@PART[*]:HAS[@MODULE[ModuleWeapon]:HAS[#weaponType[ballistic]]]:BEFORE[zzz_SimpleRepaint]
{
    %SR_Ignore = true
}

It's a temporary fix, you'll get your guns back, but without repaintability on them. Rocket pods and other stuff is OK. I reproduced the problem and investigation is happening.

Alright thanks, will try that! :)

Link to comment
Share on other sites

On 8/10/2021 at 7:39 AM, Hohmannson said:

Open IgnoreParts.cfg with Notepad or other text editor and paste in the following:

@PART[*]:HAS[@MODULE[ModuleWeapon]:HAS[#weaponType[ballistic]]]:BEFORE[zzz_SimpleRepaint]
{
    %SR_Ignore = true
}

It's a temporary fix, you'll get your guns back, but without repaintability on them. Rocket pods and other stuff is OK. I reproduced the problem and investigation is happening.

Okay so, this worked, but I noticed some other parts were still missing (specifically the HE-KV-1 missile), so I wrote this:

@PART[*]:HAS[@MODULE[MissileLauncher]:HAS[#missileType[missile]]]:BEFORE[zzz_SimpleRepaint]
{
    %SR_Ignore = true
}

 

Link to comment
Share on other sites

SimpleRepaint is updated to version 0.3.0.
Changelog:

  • 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).
Link to comment
Share on other sites

6 hours ago, Kerbals Gallery said:

Much easier and better than Texture Unlimited for me.

Well, Textures Unlimited is superior in practically every aspect. However, not all mods are supported by TU, and it has some RAM demands.

And some free RAM is definitely a thing you want with KSP: game consumes it like there is no tomorrow.

Link to comment
Share on other sites

  • 2 weeks later...
3 hours ago, HyperDraco said:

Hey, just a bug I wanted to inform you all of.

When using this mod with Aviator's Arsenal, this mod doesn't let any guns from AA load into the game. Everything else from the mod does.

 

Thanks for reporting this!
It turns out, BDA ballistic weapons are really not compatible with B9PartSwitch for some reason. So, thanks @Hohmannsonfor universal patch, fixing this.

B9PS-incompatible parts from Aviator Arsenal mod will get recoloring ability with the help of stock part variants. It provides the same functionality, but (in my opinion), is not as comfy as B9PartSwitch GUI is.

B9PS-based color variant picker on the left, stock variant picker on the right.

76R0dCG.png

 

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.
Edited by Judicator81
Link to comment
Share on other sites

2 hours ago, Judicator81 said:

Thanks for reporting this!
It turns out, BDA ballistic weapons are really not compatible with B9PartSwitch for some reason. So, thanks @Hohmannsonfor universal patch, fixing this.

B9PS-incompatible parts from Aviator Arsenal mod will get recoloring ability with the help of stock part variants. It provides the same functionality, but (in my opinion), is not as comfy as B9PartSwitch GUI is.

B9PS-based color variant picker on the left, stock variant picker on the right.

76R0dCG.png

 

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.

That's great, thank you.

Link to comment
Share on other sites

  • 5 weeks later...

Really sweet mod ! I was wondering, is there anyway to get textures a bit more shiny ? The base game offers a "metal" texture/variant that looks really neat with your mod, but most parts doesnt have it.

1632962245-untitled.jpg

I hope I'm not asking too much implementing a similar option (could be a simple on/off), because imo it's the only thing the mod is missing as of now. :P

(Also a tiny bug? If you switch from a white variant to an orange one (example), the paint will be gone and you'll have to select the previous paint/next one before reverting to the one you were using).

 

Other than that great job ! :cool:

Edited by TT213
Link to comment
Share on other sites

5 hours ago, TT213 said:

Really sweet mod ! I was wondering, is there anyway to get textures a bit more shiny ?

Unfortunately, it's not so easy (if possible at all) to implement within current approach. Shiny parts (or parts variants) use special "specular" textures.
And SimpleRepaint just changes color property for any textures of part, but contains no additional textures on it's own.
 

5 hours ago, TT213 said:

(Also a tiny bug? If you switch from a white variant to an orange one (example), the paint will be gone and you'll have to select the previous paint/next one before reverting to the one you were using).

Yes, it's a known issue.
Stock PartsVariants partmodule is not fully compatible with B9PartSwitch, and I can't really fix that.

Link to comment
Share on other sites

6 hours ago, Judicator81 said:

Unfortunately, it's not so easy (if possible at all) to implement within current approach. Shiny parts (or parts variants) use special "specular" textures.
And SimpleRepaint just changes color property for any textures of part, but contains no additional textures on it's own.

Okay ! No worries then :P

6 hours ago, Judicator81 said:

Yes, it's a known issue.
Stock PartsVariants partmodule is not fully compatible with B9PartSwitch, and I can't really fix that.

Hopefully they will then :D

Anyway as I said great mod, also thanks for answering I wasn't expecting an answer that quickly :)

Link to comment
Share on other sites

10 hours ago, SPEKTRE said:

Hi @Judicator81, thanks for the great mod! I was wondering if some sort of "paint all parts" command is doable? Cheers :)

Interesting idea!

It's impossible without some coding: SimpleRepaint is nothing more than just few Module Manager configs, and relies on power of B9PartSwitch and stock PartVariants.
I'll do some coding experiments, but no promises yet.

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