Jump to content

[CK2] Static Portrait Replacer ver. 4.00 [CKII 2.7.1+ Compatible]


Recommended Posts

 

How would I go about adding an additional portrait swapping bar to the existing 4?

 

I managed to figure out how to add additional portraits possible for Dark World to randomly choose from. So I have 20 portraits with a 5% chance to occur for female werewolves and 10 with 10% chance for male werewolves...(the male werewolves required a long time looking through furry websites :mellow: which I am not really into) I then realized that the 84 possible portraits are going to be less than I needed for what i'm hoping to do. Now i'm stuck wondering how to create a new bar.

 

Edit: Ah, it appears reading the thread answered my question unfortunately. Though i'm still a little confused

 

 

# CULTURE_INDEX: 0 = clothes behind, 1 = headgear behind, 2 = clothes, 3 = headgear mid, 4 = clothes infront, 5 = headgear

 

# african Male

portraitType = {

name = "PORTRAIT_africangfx_male"

effectFile = "gfx/FX/portrait.lua"

layer = { # GFX_TYPE:[d|p]INDEX:COLOR_LINK

"GFX_character_background:p0"

"GFX_african_male_clothes_behind:p3:c0"

"GFX_african_male_headgear_behind:p5:c1"

"GFX_african_male_hair_behind:p1:h:y"

"GFX_african_male_beard_behind:p4:h:y"

"GFX_african_male_base:p2"

"GFX_african_male_neck:d0"

"GFX_african_male_chin:d1"

"GFX_african_male_cheeks:d4"

"GFX_african_male_mouth:d2"

"GFX_african_male_nose:d3"

"GFX_african_male_eyes:d6"

"GFX_african_male_eyes2:d6:e"

"GFX_character_scars:p7:y"

"GFX_character_reddots:p8"

"GFX_character_boils:p9"

"GFX_character_blinded_eyes:p10"

"GFX_african_male_clothes:p3:c2"

"GFX_african_male_headgear_mid:p5:c3"

"GFX_african_male_ear:d7"

"GFX_african_male_beard:p4:h:y"

"GFX_african_male_hair:p1:h:y"

"GFX_empty:p3:c4"

"GFX_african_male_headgear:p5:c5"

"GFX_character_imprisoned:p6"

"GFX_player_overlay:p11"

"GFX_character_remedy_portrait_swapping:p8"

"GFX_character_remedy_portrait_swapping2:p9"

"GFX_character_remedy_portrait_swapping3:p10"

"GFX_character_remedy_portrait_swapping4:p11"

}

 

What would happen if I added the line "GFX_character_remedy_portrait_swapping5:p12" in there and created the relevant portrait.dds as well as adding an appropriate p12 section in portrait_properties.txt?
Do you only need one more bar? If so, I was going to edit out the scars gfx, since I don't really care for it. That would up the portrait count to 105, and then I still need to test the possibility of adding over 21 portraits to each bar, but in my initial tests on this, CKII wouldn't recognize anything over frame 22 (portrait 21 in each .dds file). Perhaps I overlooked something.

 

In regards to adding a p12 line, there's more to it than that, but I can almost guarantee you can't simply add new property slots, as CKII seems to have that hard-coded. I'll give it a shot though, just to confirm what happens.

Then you are in for great news! 2.6.1 added a new define line to set the number of properties of portrait srts:

 

NDefines.NGraphics.NUMBER_OF_PROPERTIES = 15

 

would mean, for example, that the envine is to expect 15 properties. So you should be able to increase the number of properties arbitrarily now (this features seems undocumented but Romulien in paradozplaza says he's been able to get portraits with 15 properties).

 

Hope it helps you!

Link to comment

 

Then you are in for great news! 2.6.1 added a new define line to set the number of properties of portrait srts:

 

NDefines.NGraphics.NUMBER_OF_PROPERTIES = 15

 

would mean, for example, that the envine is to expect 15 properties. So you should be able to increase the number of properties arbitrarily now (this features seems undocumented but Romulien in paradozplaza says he's been able to get portraits with 15 properties).

 

Hope it helps you!

 

 

I wonder, if I increase the property slots then, I should be able to move all my portraits off the scars, blinded, and other slots so that now those gfx's aren't disabled. Furthermore, if there's no cap, I may as well set the properties to as high as 25 and see what happens.

 

I'll test it.

Link to comment

 

Then you are in for great news! 2.6.1 added a new define line to set the number of properties of portrait srts:

 

NDefines.NGraphics.NUMBER_OF_PROPERTIES = 15

 

would mean, for example, that the envine is to expect 15 properties. So you should be able to increase the number of properties arbitrarily now (this features seems undocumented but Romulien in paradozplaza says he's been able to get portraits with 15 properties).

 

Hope it helps you!

 

 

I'm personally not having any luck adding this. It crashes on start-up, even though everything looks correct on my end. The portrait_properties.txt is having a hard time recognizing the new property slots. I'll contact Romulien to learn more, although I browsed through his posts on the Paradox forum and it doesn't say he mentioned anything about this.

 

--------

Edit: Ahaha! I figured it out. I noticed someone edited the Wiki with this new information. In my defines, I needed to put +1 higher than the number of property slots I'm using, so in my case, even though I'm using up to p15 property slots, I needed to use:

 

NDefines.NGraphics.NUMBER_OF_PROPERTIES = 16

 

Wow, so this basically changes the landscape of everything then! I can now reenable all the disabled visual gfx's and add presumably an unlimited number of portraits. This means I only need to provide one template pack download option, since there's now no disadvantages to using my mod. I've got my work cut out for me. I'll try to have something out by the end of Sunday night.

Link to comment

Okay, the updated mod is live. Topic title is updated. Massive changes this go around!:

 

ver 3.01:

  • Added support for the new CKII 2.6.1 defines code, NDefines.NGraphics.NUMBER_OF_PROPERTIES = x. This allows an unlimited number of portraits through the creation of additional custom-made property slots. I have it set to 34 (33 property slots) for a total of 520 portraits, but feel free to raise it if you need more.
  • Moved my portrait code off of the scars, blinded_eyes, boils, red_dots, and multiplayer property slots. This means all the visual gfx are now re-enabled.
  • Fixed a layering issue with the Finnish Ugric culture (thanks booya1991).
  • Cleaned up the common/traits.txt file by condensing the code. With so many portraits now, it needed condensing!
  • Deleted several irrelevant files in the template pack with the advent of "hidden = yes" traits. This includes the localisation, trait icons, and the code linking the trait icons into the game. If you want to utilize trait icons, reference my anime pack instead, otherwise it's kind of pointless if the icons are hidden.
Link to comment
  • 2 weeks later...

 

Okay, the updated mod is live. Topic title is updated. Massive changes this go around!:

 

ver 3.01:

  • Added support for the new CKII 2.6.1 defines code, NDefines.NGraphics.NUMBER_OF_PROPERTIES = x. This allows an unlimited number of portraits through the creation of additional custom-made property slots. I have it set to 34 (33 property slots) for a total of 520 portraits, but feel free to raise it if you need more.
  • Moved my portrait code off of the scars, blinded_eyes, boils, red_dots, and multiplayer property slots. This means all the visual gfx are now re-enabled.
  • Fixed a layering issue with the Finnish Ugric culture (thanks booya1991).
  • Cleaned up the common/traits.txt file by condensing the code. With so many portraits now, it needed condensing!
  • Deleted several irrelevant files in the template pack with the advent of "hidden = yes" traits. This includes the localisation, trait icons, and the code linking the trait icons into the game. If you want to utilize trait icons, reference my anime pack instead, otherwise it's kind of pointless if the icons are hidden.

 

 

holy crap i think they actually read my suggestion, if i understand correctly for the first bulletin, portraits are now unlimited?

Link to comment

Sry if I'm beeing stupid but I can't get it to work. When I use your templet and add one someone else posted then it's fine but when I try to get your anime package to work it just doesnt. It seems to me that both links in the first post are the same mediafire download and the anime package is missing. Can someone pls tell me if it's my fault or something else?

Link to comment

 

holy crap i think they actually read my suggestion, if i understand correctly for the first bulletin, portraits are now unlimited?

 

 

Correct. My template and anime packs now support up to 520 portraits, although my anime pack only has 130 of those portraits filled in. Having 520 portraits should be plenty of space, but modders can increase the cap by increasing the number of my mod's property slots. Before, I was locked into the number of property slots Paradox gave me, and what's worse, some of those slots I had to disable to make my mod work (ex. scars, blinded_eyes, boils, etc.) Now, modders can create their own, and I was able to avoid disabling scars, blinded_eyes, etc. so now my mod has no side effects.

 

Sry if I'm beeing stupid but I can't get it to work. When I use your templet and add one someone else posted then it's fine but when I try to get your anime package to work it just doesnt. It seems to me that both links in the first post are the same mediafire download and the anime package is missing. Can someone pls tell me if it's my fault or something else?

 

Just to make sure, did you download the right links? I had a second link under each section that were only resource files to help you add your own portraits, and indeed, both links were the same, but that was intentional. To avoid confusion, I'm going to move these links to the art resource section. They're not required for my mod anyways.

 

I'm still a little unsure what isn't working on your end, but to be safe, try downloading only my anime pack, enable it with no other mods, don't add your own portraits (yet) just to make sure you're not breaking something, and call up one of my anime portraits in the console and it should work. Make sure you also have all of the portrait pack DLC, otherwise you'll have to delete the corresponding portrait cultural gfx files in the interface folder for the DLC you're missing.

http://www.ckiiwiki.com/Graphical_DLC#Portraits

 

Has anyone received this error before? All files and mods up to date.

 

http://www.turboimagehost.com/p/29900456/CK2error.png.html

 

I am using it with HIP (Historical Immersion Project)

 

Does HIP have a portrait_properties.txt file in the interface folder? If so, it's not compatible, but as Creampie eluded to, you can tweak them to make them play along. It should work if you:

1.) Turn my mod into a sub-mod that's dependent on HIP.

2.) Copy over the HIP's portrait_properties.txt code from p1 to p13, but leave my custom code in (everything from p14 on down).

3.) Start a new HIP save.

 

Also make sure my common/traits file doesn't match the same file name as the HIP traits file, if it has one. Furthermore, make sure you have all of the the portrait gfx DLC. I notice that's a Byzantine ruler, so make sure you have the Early Eastern Clothing pack and the Late Byzantine Clothing Pack. If you don't have them, delete the corresponding portrait gfx files belonging to the DLC from my mod's interface folder.

Link to comment

Sry if I'm beeing stupid but I can't get it to work. When I use your templet and add one someone else posted then it's fine but when I try to get your anime package to work it just doesnt. It seems to me that both links in the first post are the same mediafire download and the anime package is missing. Can someone pls tell me if it's my fault or something else?

 

Just to make sure, did you download the right links? I had a second link under each section that were only resource files to help you add your own portraits, and indeed, both links were the same, but that was intentional. To avoid confusion, I'm going to move these links to the art resource section. They're not required for my mod anyways.

 

I'm still a little unsure what isn't working on your end, but to be safe, try downloading only my anime pack, enable it with no other mods, don't add your own portraits (yet) just to make sure you're not breaking something, and call up one of my anime portraits in the console and it should work. Make sure you also have all of the portrait pack DLC, otherwise you'll have to delete the corresponding portrait cultural gfx files in the interface folder for the DLC you're missing.

http://www.ckiiwiki.com/Graphical_DLC#Portraits

 

Well I guess I didn't explain it enough so I thought the template link under the anime section was the one I need for the portraits because I can not find another link in your first post that contains a package beside the user submitted ones which work for me. I even tried the older version you posted a few pages back but that one doesnt really work for me because the pictures are overlapping probably because of the older game version. Could you pls simply post the link to the working anime package in your reply?

 

Link to comment

 

 

I am using it with HIP (Historical Immersion Project)

 

Does HIP have a portrait_properties.txt file in the interface folder? If so, it's not compatible, but as Creampie eluded to, you can tweak them to make them play along. It should work if you:

1.) Turn my mod into a sub-mod that's dependent on HIP.

2.) Copy over the HIP's portrait_properties.txt code from p1 to p13, but leave my custom code in (everything from p14 on down).

3.) Start a new HIP save.

 

Also make sure my common/traits file doesn't match the same file name as the HIP traits file, if it has one. Furthermore, make sure you have all of the the portrait gfx DLC. I notice that's a Byzantine ruler, so make sure you have the Early Eastern Clothing pack and the Late Byzantine Clothing Pack. If you don't have them, delete the corresponding portrait gfx files belonging to the DLC from my mod's interface folder.

 

 

Thanks for being so prompt with you response. I really appreciate it.

 

1. I did everything you said: Made your mod dependant on HIP:

 

dependencies = {"HIP - Historical Immersion Project""Dark World Core v1.41"}

 

2. I input the potrait_properties.txt changes (see attached)

 

3. And your trait files doesn't match the name of HIP (Since in DWCore yours is named dw_remedy...)

 

So it turns out it didn't work. It still looks the same and it looks the same for all cultures, not just greeks and I got all the DLCs (& south indian)

 

Let say again I appreciate your response. I usually don't expect a response at all when troubleshooting mods.

portrait_properties.txt

Link to comment

 

Well I guess I didn't explain it enough so I thought the template link under the anime section was the one I need for the portraits because I can not find another link in your first post that contains a package beside the user submitted ones which work for me. I even tried the older version you posted a few pages back but that one doesnt really work for me because the pictures are overlapping probably because of the older game version. Could you pls simply post the link to the working anime package in your reply?

 

 

Oh shit, you're right! They were the same file. The text of the link was right, but it hyperlinked to the wrong file!

 

If you want my anime pack, use this:

http://www.mediafire.com/file/k1a1wrjpq1lbbgh/ReMeDy_Portrait_Replacer_AnimePack+ver+3.01.zip

 

Only use either the template pack or the anime pack. It just depends if you prefer working from a blank canvas or not. If you want blank portraits with nondescript names, use my template pack. If you want a pack I've done using portrait examples, custom trait names, example trait icons, and localisation code examples, then use my above anime pack.

Link to comment

 

Thanks for being so prompt with you response. I really appreciate it.

1. I did everything you said: Made your mod dependant on HIP:

 

dependencies = {"HIP - Historical Immersion Project""Dark World Core v1.41"}

 

2. I input the potrait_properties.txt changes (see attached)

 

3. And your trait files doesn't match the name of HIP (Since in DWCore yours is named dw_remedy...)

 

So it turns out it didn't work. It still looks the same and it looks the same for all cultures, not just greeks and I got all the DLCs (& south indian)

 

Let say again I appreciate your response. I usually don't expect a response at all when troubleshooting mods.

 

 

I see one problem: You're also trying to make my mod dependent on Dark World. The irony is Dark World already uses my mod, so you're basically installing my mod twice!

 

Instead of downloading my mod in this topic, instead, add portraits into Dark World's ReMeDy Custom Portraits mod and just get Dark World to behave with HIP. Inside the Dark World portraits mod, you'll notice I left a ton of empty portrait space you can use. Add your own portraits into any of the empty slots. To avoid conflicting with future Dark World updates, add your portraits to any of the last portrait files, such as remedy_portrait_swapping15.dds, 16.dds, etc, otherwise, if Dewguru updates with more portraits, the two of you could be conflicting if you're both trying to use the same portrait slots, so let Dew use the early slots.

 

I'll have to download HIP, because I've never played it, so I can't walk you through all the steps.

 

Edit: I just downloaded HIP. Yikes, it's a nightmare to sort through. It adds custom cultures, so my mod won't work on any of those, so even if you make Dark World compatible, it doesn't change the fact I don't have the files in it to read in those custom HIP cultures. When I get the time, I'll play with it and see what happens.

Link to comment

 

 

Well I guess I didn't explain it enough so I thought the template link under the anime section was the one I need for the portraits because I can not find another link in your first post that contains a package beside the user submitted ones which work for me. I even tried the older version you posted a few pages back but that one doesnt really work for me because the pictures are overlapping probably because of the older game version. Could you pls simply post the link to the working anime package in your reply?

 

 

Oh shit, you're right! They were the same file. The text of the link was right, but it hyperlinked to the wrong file!

 

If you want my anime pack, use this:

http://www.mediafire.com/file/k1a1wrjpq1lbbgh/ReMeDy_Portrait_Replacer_AnimePack+ver+3.01.zip

 

Only use either the template pack or the anime pack. It just depends if you prefer working from a blank canvas or not. If you want blank portraits with nondescript names, use my template pack. If you want a pack I've done using portrait examples, custom trait names, example trait icons, and localisation code examples, then use my above anime pack.

 

 

Thank you everything wokrs fine now.

Link to comment

 

The template pack as it's more customizable.

 

 

Okay, I got it to work, but for some reason I couldn't get it to work as a dependency, so I had to merge my template pack with the AnimeMod. I'm not supporting this file with updates, so you'll just need to stay on top of them when the developer does, which thankfully now that Reaper's Due is out, you shouldn't need to update for a while.

 

Do not use my attached mod with any of my portrait mods in this topic, and do not enable the original AnimeMod, otherwise you'll get conflicts. Only use this file. As always, I'm also assuming you own all the portrait DLC and clothing packs, and you're not using this with another mod that shares a portrait_properties.txt file (ex. Dark World).

ReMeDy_TemplatePack_with_AnimePortraits.zip

Link to comment

 

 

Edit: I just downloaded HIP. Yikes, it's a nightmare to sort through. It adds custom cultures, so my mod won't work on any of those, so even if you make Dark World compatible, it doesn't change the fact I don't have the files in it to read in those custom HIP cultures. When I get the time, I'll play with it and see what happens.

 

 

If you ever get a chance to take a look at it that would be a big help. I was able to get the DW to run alongside HIP and get the Harley event to work with the portrait appearing as well. Though in other events such as the joker, the portrait does not appear. Now the only other two issues I am trying to figure out is why the portrait backgrounds are so wonky (such as some western portraits generate the frozen steppe background) and the other is that specifically Nordic and Russian faces, generate multiple mouths and other facial features.

 

I btw have ZERO experience in modding so I wish i had more insight into what the problems are. I think I'm making it work by just dumb luck.

Link to comment

 

If you ever get a chance to take a look at it that would be a big help. I was able to get the DW to run alongside HIP and get the Harley event to work with the portrait appearing as well. Though in other events such as the joker, the portrait does not appear. Now the only other two issues I am trying to figure out is why the portrait backgrounds are so wonky (such as some western portraits generate the frozen steppe background) and the other is that specifically Nordic and Russian faces, generate multiple mouths and other facial features.

 

I btw have ZERO experience in modding so I wish i had more insight into what the problems are. I think I'm making it work by just dumb luck.

 

 

Oh, well if you already got the portraits to somewhat work, you're better off just sending me what you have to save time, unless you think the file is too big.

Link to comment

 

 

 

 

Oh, well if you already got the portraits to somewhat work, you're better off just sending me what you have to save time, unless you think the file is too big.

 

 

Well the current state I am running the portrait mod outside of the DW Core on its own. As I said before the Harley event works without a hitch. But other events and adding potraits do not work. Also Russian, Polish, Wendish, Norwegian and Swedish portrait are all wonky with multiple face parts. Also portrait backgrounds have bugs.

 

Another option is running the mod from DW Core, but then I cannot get any portraits to come up.

 

 

Dark World ReMeDy Custom Portraits (WORKS WITH HARLEY).rar

Link to comment

 

Well the current state I am running the portrait mod outside of the DW Core on its own. As I said before the Harley event works without a hitch. But other events and adding potraits do not work. Also Russian, Polish, Wendish, Norwegian and Swedish portrait are all wonky with multiple face parts. Also portrait backgrounds have bugs.

 

Another option is running the mod from DW Core, but then I cannot get any portraits to come up.

 

 

 

 

I looked at it, and I'm going to say you're on your own for this one. It's hard to make my mod compatible for two simultaneously big mods, such as HIP and Dark World. Maybe given enough time I could fix it, but dewguru updates his mod frequently, as will HIP once Paradox releases their next patch out of beta, and then I have to wonder, how many people are actually going to use a compatibility patch with a HIP+DW combo if I put it out, and even then, how long would it be until my patch no longer works and people ask for another? Another issue I have with HIP is it takes a while to load into CKII because HIP is so big, which makes it harder for me to test changes with it. I often times have to load my changes dozens of times into CKII before I get the results I want. That's a lot of effort for little reward.

 

I'd rather focus my efforts on my other CKII mod I'm working on atm.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use