Need a little help with modding portraits

For specific technical issues and questions.

Need a little help with modding portraits

PostPosted by Kripox » Sun Aug 06, 2017 05:57

So, I have a pretty simple issue. I believe strongly that the king on the iron throne should ALWAYS have the Iron Throne as his abckground, while the members of the Night's Watch should ALWAYS have the wall as their background. Really makes the game look a lot better to me. However, I find this difficult to achieve in particular because of the Torturer trait. It seems like if the king is a Torturer then he will never have the iron throne as his background. So, I entered the portrait_properties file and tried to fix this but no luck. I tried bumping the factor on the Iron Throne backgroudn to 100, didn't work. Tried reducing the factor for the Impaler-affected backgrounds to zero, didn't work. Tried listing High Valyrian culture as a factor 0 culture for the backgrouds then tried a high valyrian king, didn't work.

I really don't know what I'm doing wrong here so I could use some help. Ideally I should be able to make the king always show the proper background no matter what, same with the Night's Watch, without breaking any other backgrounds or making them unavailable to other characters. Anyone able to show me where I mess up?
Posts: 55
Joined: Tue Mar 29, 2016 21:56

Re: Need a little help with modding portraits

PostPosted by chosenbyfew » Thu Aug 10, 2017 01:43

In portrait_properties.txt, the comments at the top say "# The choice is made based on a weighted random, but the first factor that evaluates to >= 100 will be automatically chosen" so since the throne room is the second choice for p0 background, all you have to do is set a modifier with a factor of 2 (the base factor is 50, so *2 brings it to the necessary 100) and the conditions "is_feudal = yes" and "has_landed_title = e_iron_throne" (for Westeros specifically. If you want to do for any king, you'd instead do "is_independent = yes" and "higher_tier_than = DUKE")

If you notice, the third choice for p0 background is the dungeon, with a base factor of 100. So if anything above it doesn't resolve to a factor of >= 100, then dungeon will always be chosen. Now there's wide-ranging modifiers with factors of 0 that affect that option, bringing it to 0% chance for most characters, but what is one of those modifier conditions? "NOT = { trait = impaler }"! Which, if NOT impaler means multiply by 0, then impaler means do NOT multiply by 0. Thus, by default your impaler king has a factor 50 for the throne room, and then the game sees factor 100 for dungeon and is all "NOPENOPENOPE ITS DUNGEON TIME GUYS."

EDIT: Note that "higher_tier_than" from the end of the first paragraph is valid either in character scope (which is where you would be calling it from in that example) or in title scope, according to the wiki. However, most of the PDox and AGOT devs call it from title scope as a matter of convention, so you might want to put "primary_title = { higher_tier_than = DUKE }" instead.
Posts: 45
Joined: Sat Jul 22, 2017 05:44

Return to Technical Discussion

Who is online

Users browsing this forum: No registered users and 0 guests