RimWorld
Really Custom Portraits
125 comentarios
Your Resident Fox  [autor] hace 14 horas 
Yeah, you can ignore HAR patch error for now. I'll include a fix for it when I release next update.
Daemonjax 29 SEP a las 14:17 
Yeah, I'm on 1.4. Ok, whatever. Another minor issue: The mod tries to patch AlienRace.ThingDef_AlienRace, which _seems_ to be part of HAR (which I don't have installed). I know I can probably safely ignore these kinds errors, but figure I'd report it anyways.
Your Resident Fox  [autor] 28 SEP a las 13:39 
@Daemonjax In 1.6 build there is an option at the bottom of mod options to toggle filenames logging which should be off by default. Are you playing on another version?
Daemonjax 28 SEP a las 12:58 
I love the mod, but can we get a way to limit the log spam when it loads? I don't need/want it to log each portrait filename it loads at game launch. How about an option so it just outputs the total count that's loaded to the log (so just 1 log line)?
Your Resident Fox  [autor] 13 SEP a las 6:17 
@ZeFear "illegal characters in path" suggests something wrong with the filepath to the portrait itself. Does it have non-latin characters in the filename?
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.
ZeFear 12 SEP a las 21:17 
@YourResidentFox "Exception filling tab to Rimworld.Tab_Pawn_Health:System.ArgumentException: illegal characters in path.
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.
Your Resident Fox  [autor] 12 SEP a las 4:19 
@ZeFear That's peculiar. Is there something special about the pawn? It's race, maybe it's from a mod?
ZeFear 12 SEP a las 0:10 
For some reason this mod doesn't work for one single character. When I press the mod icon to choose a portrait nothing happens. It's working for everyone else. I deleted the folder for portraits for this particular character and it still doesn't work. Dev mod doesn't show any errors or messages
40kTookMyName 11 SEP a las 10:10 
Just a note that Avatar will work alongside this (for the colonist bar, you'll have to either disable the avatars above the inspector or be happy with them overlaying it) if you place Avatar below this mod in the mod order.

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.
Your Resident Fox  [autor] 4 SEP a las 11:55 
@40kTookMyName Glad you enjoy it! I'm thinking about triggers, but so far it's not a trivial problem to solve on how to make it look like.

@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.
Tuxedo Tomcat 3 SEP a las 9:15 
Im also having a hard time getting this to work... I disabled ALL [NL] mods but still no result. Are there any other mods this conflicts with?
40kTookMyName 2 SEP a las 10:03 
Just popping in to say thanks, I've been using this mod for the last week, and it is a permanent part of the mod order now. It gives personality to colonists, and with creative use of the images, you can do some cool stuff.

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.
Your Resident Fox  [autor] 2 SEP a las 1:28 
Figured out HAR races. Should now work with Aya races.
dnlrose 29 AGO a las 14:38 
Invested an hour of my time in this and I failed. The mod is there, there are the options, there is nothing in the Health tab, will uninstall this ASAP
Skeletor 18 AGO a las 9:20 
Anyone manage to figure out how to get this working with Aya races? I edited the save file to add the image to the Aya pawn manually, but it didn't seem to work.
Understood. I’ll post my suggestions as Issues from now on.
Your Resident Fox  [autor] 18 AGO a las 0:00 
@おてとおかわりできます interesting. That indeed looks like a better method for flipping images. I'll leave the current flipping as is for now and include your method, credited, with the next feature update.
That said, I'd appreciate if we kept coding discussions to github as SW comments are more for players and gameplay.
@Your Resident Fox
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?”
Your Resident Fox  [autor] 14 AGO a las 12:40 
Added DDS file handling, no Graphics+ and other dds enabling mods required.
Supports DXT1 (no transparency) and DXT5 (yes transparency) formats.
Only 1.5 and 1.6.
@Your Resident Fox
Understood, thank you.
Your Resident Fox  [autor] 14 AGO a las 10:05 
@おてとおかわりできます I meant in-game GUI.
@Your Resident Fox
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.
Your Resident Fox  [autor] 14 AGO a las 9:22 
@おてとおかわりできます My point about flexible manner is to make it as user-friendly as possible. I wouldn't want players to write JSON by themselves, so I was thinking about some GUI solution. So far I'm thinking something like a condition editor with options for choosing specific hediffs/thoughts/etc
@Your Resident Fox
>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.
However, if your comment was from the perspective of a mod user, there’s nothing more I can really add on my end.
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!
Your Resident Fox  [autor] 14 AGO a las 7:29 
@おてとおかわりできます I don't have issues with japanese, but thank you for using english for everyone else!
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.
I have included a sample video of the extended mod in the ‘sample’ folder of the release.
Hello! Since I'm Japanese, sorry if my English sounds a bit off.
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.
Your Resident Fox  [autor] 5 AGO a las 13:05 
@Antonín Dvořák Tested with Odyssey and at least in my minimal setup I managed to launch just fine. Would you or someone else who has this issue be able to provide more details on the matter? But really, there shouldn't be any connection to this mod.
Your Resident Fox  [autor] 5 AGO a las 1:55 
@KimPanDan I'm happy you enjoy it so much! I don't have much time to play lately :SADFOX:
KimPanDan 4 AGO a las 5:26 
@Your Resident Fox
If you add me as a Steam friend, I can gift you the Odyssey DLC. Thanks to you, I'm back playing RimWorld.:steamhappy:
Your Resident Fox  [autor] 28 JUL a las 9:51 
@feed2k ah, so like varying custom location individual to a pawn? Like, one pawn has portrait on the top left while another has it in the center of the screen? Sorry, that's not implemented. The modes and positions are global, only images are individual.
But... I guess that would be in line with the really custom philosophy of the mod huh...
サードアイや 28 JUL a las 4:37 
@Your Resident Fox Yeah I know about the pawn portrait dialog, but the settings inside don't work, I can only select a picture, but I can't customize where it will be located for each colonist individually, only global location settings
Your Resident Fox  [autor] 28 JUL a las 2:31 
@Antonín Dvořák Can't test that unfortunately - I don't have the Odyssey...
Your Resident Fox  [autor] 28 JUL a las 2:30 
@feed2k You can open the pawn portrait dialog, then choose a mode and then choose a file, if I understood you correctly.
Antonín Dvořák 26 JUL a las 10:46 
Installing this on my existing run made me unable to launch the ship. However when I started a new gravship scenario it worked fine. Not sure what is going on here.
サードアイや 24 JUL a las 21:08 
Why can't I change the mode for each colonist separately? Only in the mod settings I can change modes, but all at once.
Your Resident Fox  [autor] 17 JUL a las 3:15 
@lenankamp That is a bizarre bug. I never considered something like that cropping up, but I guess it's because of how RimWorld deserializes save files, replacing special sequences with special characters. A rare platform-dependant issue. I'll see to it when I get time.
lenankamp 15 JUL a las 17:50 
Year later I finally found my issue. Using subdirectory in windows for portrait organization, first character of portrait name had an n, so the subdir\n triggers a newline and then it can't open the portrait customization menu due to error processing the string.

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.
ReMeDy 7 JUL a las 15:44 
Has anyone tested this in a multiplayer mod? I assume it wouldn't work if the portraits are getting read from a user's local folder, but maybe it would somehow be visible from the other player's perspective somehow?
Azara 22 JUN a las 23:47 
okay, thanks! :steamhappy:
Your Resident Fox  [autor] 22 JUN a las 13:12 
@Azara Yes. It's an unpublished mod of mine. The tab only contains a text area where I can write whatever. It doesn't generate biography.
Azara 22 JUN a las 5:37 
Nice mod but what is that biography menu in your screen at the bottom left? I've never seen that before, Is it a mod?
kyrambox 8 JUN a las 9:31 
Excuse for my poor english, please. Amd for my impudent asking ) Is it difficult to make as default setting: just a pawn pointed to the sourh? It would be simple and great. Something like this https://ibb.co/YT33Wy3K
Zike 22 ENE a las 16:27 
Nice mod but just a heads up, it's not compatible with Aya's races. Unable to select an image when using it despite other race mods having no issues.
Sempai 11 SEP 2024 a las 13:29 
Nice, it works well. and moving the button to the health tab was a good call btw
lenankamp 10 SEP 2024 a las 21:24 
Follow up, no issue with newborn baby, so something just off about the pawn, likely weird corner case of some mod interaction and not worth investigating unless others report similar.
lenankamp 10 SEP 2024 a las 19:18 
Appreciate the update, can now set portrait for my blood pet prisoner. Minor issue that no prompt opens for a 4 year old child when clicking on the magnify glass. Does open for the 10 year old that had portrait defined in previous version. Imagine it could be issue with actual age being one and accelerated growth...or some other mod conflict.
Your Resident Fox  [autor] 9 SEP 2024 a las 3:45 
@Sempai With the last update I've moved the button that opens portrait dialog to a "Health" tab that is available for mechanoids as well as other pawns. See if it works for you!
Sempai 8 SEP 2024 a las 13:30 
Take the time you need. Thank you.