边缘世界 RimWorld

边缘世界 RimWorld

Color Coded Traits
35 条留言
Stellar Harbour 2022 年 12 月 7 日 上午 3:23 
Still no update? Anyone?
waxbirb 2022 年 7 月 17 日 下午 3:18 
[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 2022 年 5 月 4 日 上午 11:48 
A new Version for 1.3 would be great, i miss this mod in my actual game!
Mr. Anonymous 2022 年 4 月 27 日 上午 10:52 
Working fine with 1.2. No I don't want to 'downgrade' to the latest version.
Livesee 2021 年 12 月 28 日 上午 9:06 
1,3!
star 2021 年 9 月 27 日 上午 7:37 
Actually that is not an alternative, because rarity is not the same as benefit.
Btw, thanks for the link, anyway it's useful.
Timou 2021 年 8 月 2 日 上午 1:57 
1.3 !
nhatanh0475 2021 年 7 月 22 日 上午 2:31 
Not compatible with v.13, show error log without Dev mode.
Copper Boltwire 2021 年 5 月 28 日 上午 3:17 
For anyone wondering: Works fine in 1.2
kezza596 2021 年 4 月 7 日 下午 2:58 
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 2021 年 3 月 24 日 下午 5:08 
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 2021 年 3 月 24 日 下午 5:07 
@lordravenx im no programmer, but cant you just CUT OUT what it is called (translation) and put your colors around it...?
Naggert 2021 年 3 月 21 日 上午 10:44 
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 2021 年 2 月 8 日 下午 11:50 
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 2020 年 12 月 16 日 上午 11:45 
?
lordravenx  [作者] 2020 年 11 月 16 日 下午 12:15 
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 2020 年 10 月 22 日 下午 7:16 
Does it work for 1.2?
Pagsy 2020 年 9 月 19 日 上午 7:09 
WHY would you disable the translation? Now its in color, but english... ???
ululu 2020 年 8 月 19 日 下午 4:16 
This appears to work fine in 1.2
Tommy Gray x Land Raider 2020 年 8 月 10 日 下午 7:01 
update for 1.2 plz
Alchemyst 2020 年 5 月 5 日 上午 8:53 
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 2020 年 4 月 2 日 上午 7:16 
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  [作者] 2020 年 3 月 28 日 上午 5:28 
@Sopel: I just need to have the mods so I can extract the trait labels.
So if you could give me some names... :)
lordravenx  [作者] 2020 年 3 月 28 日 上午 5:22 
@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  [作者] 2020 年 3 月 28 日 上午 5:13 
@Ɲơɴɑɱɛ ت: 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 2020 年 3 月 26 日 上午 10:46 
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!
Ɲơɴɑɱɛ ت 2020 年 3 月 26 日 上午 10:45 
@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 2020 年 3 月 26 日 上午 9:56 
Psychically Hypersensitive can be both good and bad, just like Psychically Deaf.
Sopel 2020 年 3 月 26 日 上午 8:59 
Will there be support for other trait mods?
Splashngo 2020 年 3 月 26 日 上午 8:51 
love it, positive and negative traits
Ɲơɴɑɱɛ ت 2020 年 3 月 26 日 上午 8:27 
This one is for their usefulness and the other for the rarity? Is this the only difference?
Ɲơɴɑɱɛ ت 2020 年 3 月 26 日 上午 8:26 
Kyrox 2020 年 3 月 26 日 上午 7:26 
Planning on using this with Bad Can Be Good. That's another mod you may like, if you're into traits.
Kyrox 2020 年 3 月 26 日 上午 7:25 
Thank you. ♥