Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
The only way of setting the portrait other than the usual one through the button is via save-game editing. Specifically, the <portrait> tag with the portrait filename directly in pawn's root.
Rimworld is in english, so there can be no other languages. I guess the problem is not the mod itself, but the health tab that is required to set up a portrait. Maybe you've encountered something similar? And is there a "techinical" way yo set up a portrait without a health tab using some sort of command or dev mode maybe? I also deleted all "health tab" mods that make them look nicer and the problem still persists. My guess is that the longer the game goes the more chance that the save file will somehow have bugs and this will happen. I loaded an hour back in progress and the problem disappeared. And the problem resurfaces only after loading, It can not appear in the middle of the session.
With that setup, Avatar's portraits will be the default until you use this mod to set a custom one. Figured this out after doing some testing to force them to work together.
@tomstemarie Can't say I know about any other conflicts and even with Nals' Portraits the mod does work (just not the Colonist Bar mode), so I'd be happy to know and solve other conflicts someone may find.
The only wishlist item I would have would be dynamic portrait switching based on triggers we could set. Example: high mood portrait vs. low mood portrait. Or portraits that represent mental breaks. But that's just a wishlist thing. Love the mod as just a static portrait mod if that's all it ever is. Thanks again.
That said, I'd appreciate if we kept coding discussions to github as SW comments are more for players and gameplay.
Thanks for adding DDS support! I took a look at PortraitCache.LoadTextureDDS—so that’s one way to do it… very informative, thanks!
After that, I tried a few things myself and created a method to flip DDS data block-compressed bytes upside down, currently for both DXT1 and DXT5.
Here’s the code:
https://github.com/ccccd333/RW_CustomPortraits_Ex/blob/main/1.5/Source/CustomPortraitsEx/Utility.cs#L60
https://github.com/ccccd333/RW_CustomPortraits_Ex/blob/main/1.5/Source/CustomPortraitsEx/Utility.cs#L110
Reference for this approach:
https://hub.jmonkeyengine.org/t/dds-texture-flip-problem/4448/3
Maybe this can address Your Resident Fox’s concern about “wouldn’t this end up being the same as PNG?”
Supports DXT1 (no transparency) and DXT5 (yes transparency) formats.
Only 1.5 and 1.6.
Understood, thank you.
Ah, I see, that's what you meant. Thank you!
I'll try creating a tool outside the game to see if I can make it work and convert it to JSON.
>Sounds rather involved however if it is to be done in a sufficiently flexible manner, so I'll have to think about ~...
Sorry if I misunderstood — I’m not that smart…
If your comment was directed at the mod creator’s side,
then I’ve already tested it in-game and confirmed it’s resolved.
Just so you know, thoughts can be obtained from the pawn like this:
https://github.com/ccccd333/RW_CustomPortraits_Ex/blob/main/1.5/Source/CustomPortraitsEx/ConditionDrivenPortrait.cs#L386
As for interactions, the results only remain in the PlayLog, so I’m fetching them via PlayLogEntry_Interaction_ctor:
https://github.com/ccccd333/RW_CustomPortraits_Ex/blob/main/1.5/Source/CustomPortraitsEx/PlayLogEntry_Interaction_ctor.cs#L41
The above thoughts + interaction strings can then be matched by the mod user — either by writing a matching entry into a JSON file, or by using a regular expression.
When a match is found, the corresponding image will be displayed.
The reason I focused on thoughts and interactions is because they’re language-agnostic — JSON entries can be written in the user’s own language.
Also, I thought this approach meant I wouldn’t need to handle compatibility with other mods.
If other mods add more thoughts:
(In-game title screen) → Options → Check “Development Mode” →
Click the play-button-like icon at the top of the title screen →
“Output” tab → (Type “Thoughts” in the filter) → Select “Thoughts” → Copy CSV
You can use whatever’s in there.
If other mods add more InteractionDef:
“Output” tab → “Def Label” → interactionDef →
In this case, you can use what’s output in PlayerLog.txt.
>You can suggest a pull request if you want to make changes to the mod.
Got it! If I run into any issues on my side, I’ll try making a proposal — thanks!
So the idea is to assign different images depending on pawn states like thoughts and hediff? That's an interesting idea that would allow you to specify stuff like injured or sad portraits indeed... Sounds rather involved however if it is to be done in a sufficiently flexible manner, so I'll have to think about the solution to that.
Regarding copyright and stuff, there's nothing about that legally, but I'd like to keep the core mod to myself. You can suggest a pull request if you want to make changes to the mod.
As for DDS, I never tested that format, so I'll consider it a suggestion. Fixing the flipped texture is as trivial as checking the extension.
Based on your amazing mod, I made some extensions to change the portrait at the bottom left according to Thoughts (is that the right word in English?) and interactionDef label content, and also added animation support when there are multiple DDS files.
Here’s the link: https://github.com/ccccd333/RW_CustomPortraits_Ex
If there are no copyright issues, I plan to release it only on GitHub. But since I’ve only been modifying mods for about a week myself, I’m not sure how long I’ll be able to keep updating it!
Also, as a known bug, when loading DDS with Unity’s Texture2D.LoadRawTextureData, the image flips vertically and I can’t fix that, so please bear with it. (I think it’s due to the difference between OpenGL and DirectX…)
If there are any problems, I’ll keep the GitHub repo private.
If you add me as a Steam friend, I can gift you the Odyssey DLC. Thanks to you, I'm back playing RimWorld.
But... I guess that would be in line with the really custom philosophy of the mod huh...
Thanks again for great mod, should be an easy fix, but just going to avoid naming portraits with n as the first character within a directory.