RimWorld

RimWorld

Color Coded Traits
35 Comments
Stellar Harbour 7 Dec, 2022 @ 3:23am 
Still no update? Anyone?
waxbirb 17 Jul, 2022 @ 3:18pm 
[h1] Workaround for use on 1.3 [/h1]
When you enable it, RimWorld will show you an error like this one:


[Color Coded Traits] Patch operation Verse.PatchOperationReplace(/Defs/TraitDef[defName="Transhumanist"]/degreeDatas/li[label="transhumanist"]/label) failed
file: ~/.steam/steam/steamapps/workshop/content/294100/2035956625/Patches/TraitColorPatches.xml



The problem is that the mod looks for a trait labeled "transhumanist" but in 1.3 the label is "body modder" so the mod cannot find the right trait. To fix this, open up the mod file (I bolded it above) in a text editor. Look for the following section and replace the strikethrough text with the underline text:

<xpath>/Defs/TraitDef[defName="Transhumanist"]/degreeDatas/li[label="[strike]transhumanist[/strike] body modder "]/label</xpath>
<value>
<label>&lt;color=#808000&gt; Transhumanist Body Modder &lt;/color&gt;</label>
</value>
Flaggschiff 4 May, 2022 @ 11:48am 
A new Version for 1.3 would be great, i miss this mod in my actual game!
Mr. Anonymous 27 Apr, 2022 @ 10:52am 
Working fine with 1.2. No I don't want to 'downgrade' to the latest version.
Livesee 28 Dec, 2021 @ 9:06am 
1,3!
star 27 Sep, 2021 @ 7:37am 
Actually that is not an alternative, because rarity is not the same as benefit.
Btw, thanks for the link, anyway it's useful.
Timou 2 Aug, 2021 @ 1:57am 
1.3 !
nhatanh0475 22 Jul, 2021 @ 2:31am 
Not compatible with v.13, show error log without Dev mode.
Copper Boltwire 28 May, 2021 @ 3:17am 
For anyone wondering: Works fine in 1.2
kezza596 7 Apr, 2021 @ 2:58pm 
On the drugs screen if someone is teetotal it shows as "&lt;color=#00FF00&gt;Teetotal&lt;/color&gt;" instead of a coloured teetotal word. Could this be resolved? Makes it hard to see what drug policy they're on
Pagsy 24 Mar, 2021 @ 5:08pm 
Ah i understand, so you patch first and then the translation comes... after you did the change and then the translation cant find the right word..? Can you make your code not just work after its translated...?
Pagsy 24 Mar, 2021 @ 5:07pm 
@lordravenx im no programmer, but cant you just CUT OUT what it is called (translation) and put your colors around it...?
Naggert 21 Mar, 2021 @ 10:44am 
Is it possible to change the colours if one disagrees? Like, I don't think night owl is top tier and I generally try to avoid it.
Anarky 8 Feb, 2021 @ 11:50pm 
I'm not sure if its this mod being out of date, but it doesnt change the colours of traits from mods such as vanilla traits expanded and so on.

Not a game breaker, but it'd be great if this mod could be updated to include those other trait mods that have been added since this mod was updated.
Zoink 16 Dec, 2020 @ 11:45am 
?
lordravenx  [author] 16 Nov, 2020 @ 12:15pm 
About the translation thing:
This mod patches the XML file definition of traits. So "Beautiful" is replaced by "&lt;color=#00FF00&gt;Beautiful&lt;/color&gt;". All the extra stuff is the color definition.
The translation however looks for "Beautiful" (without anything else) to replace it with the translated string. You can imagine working like this:
If Name == "Beautiful" Then
Name = <YOUR LANGUAGE TRANSLATION HERE>
But since the name is NOT "Beautiful" any more, the translation doesn't take.
Not much I can do about it.
ZeoVII 22 Oct, 2020 @ 7:16pm 
Does it work for 1.2?
Pagsy 19 Sep, 2020 @ 7:09am 
WHY would you disable the translation? Now its in color, but english... ???
ululu 19 Aug, 2020 @ 4:16pm 
This appears to work fine in 1.2
Tommy Gray x Land Raider 10 Aug, 2020 @ 7:01pm 
update for 1.2 plz
Alchemyst 5 May, 2020 @ 8:53am 
I have read that this mod change the translation. As i don't know how to make a mod i will not protest. But when i read the description of the mod i was thinking it was changing colors. Not text. Is there something doable to change only color and not text?
Lurmey 2 Apr, 2020 @ 7:16am 
Is the way the traits are positioned in the screenshots vanilla now? I haven't played 1.1 yet, been waiting for mods to update.
lordravenx  [author] 28 Mar, 2020 @ 5:28am 
@Sopel: I just need to have the mods so I can extract the trait labels.
So if you could give me some names... :)
lordravenx  [author] 28 Mar, 2020 @ 5:22am 
@Black★Rock Shooter: I'm currently using XML patches to set the colors. This is a quick and safe way to change something.
It has some downsides however:
- XML patches are processed at load time so you cannot change the colors later
- Since trait captions are actually replaced, the traits are no longer translated

What you suggest is certainly possible but it requires C# code and a different approach. I might look into it if I can find the time.
lordravenx  [author] 28 Mar, 2020 @ 5:13am 
@Ɲơɴɑɱɛ ت: Yes that is exactly it. It's colored by how 'useful' a trait is. This is debatable for some traits though.
@Fenerium: Indeed. Back in 1.0 this wasn't the case, but with 1.1 psi powers... I might have to revise it.
Black★Rock Shooter 26 Mar, 2020 @ 10:46am 
Is it possible to add a mod-settings menu to add traits by name to a colored list? If so and you do add that could you provide a base example so others can look to add their own rather than pester you constantly like this? :D Thanks for the mod!
Ɲơɴɑɱɛ ت 26 Mar, 2020 @ 10:45am 
@Fenerium, yup, thats why I stick to the other mod where its colored by rarity. Because everyone decide for himself what is useful and whats not :P
Blue North Star 26 Mar, 2020 @ 9:56am 
Psychically Hypersensitive can be both good and bad, just like Psychically Deaf.
Sopel 26 Mar, 2020 @ 8:59am 
Will there be support for other trait mods?
Splashngo 26 Mar, 2020 @ 8:51am 
love it, positive and negative traits
Ɲơɴɑɱɛ ت 26 Mar, 2020 @ 8:27am 
This one is for their usefulness and the other for the rarity? Is this the only difference?
Ɲơɴɑɱɛ ت 26 Mar, 2020 @ 8:26am 
Kyrox 26 Mar, 2020 @ 7:26am 
Planning on using this with Bad Can Be Good. That's another mod you may like, if you're into traits.
Kyrox 26 Mar, 2020 @ 7:25am 
Thank you. ♥