Author Topic: Custom Portraits  (Read 153556 times)

Khornet

  • Probably not a Spambot
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Custom Portraits
« Reply #45 on: September 11, 2019, 10:08:25 pm »
Is there a way to import a custom portrait without creating a new character ?

Greetings, people of the past. It is I, Reinhark, The great cheater. I have came here bearing the news.
It is possible to do this, but this is pretty difficult. Please proceed if you have what it takes.
Programs you need are the following:
Cheat engine
XNBextract


1. Find out what portrait you are using, and what you want to use.
Every underrail has portrait folder where the profile pics are stored.
What you want to do, is find which profile picture you are using, and what you want to replace it with.
Use program named XNBextract or something. I think this file is used for stardew valley. follow it to download.

Let's say I want to replace my current picture, which is named "scavle2" ("_l" and "_s" do not count, as they stand for small and large. )


...To the faceless stealth specialist located in "genderless" folder, named "flst"


Here are some actions you need to do.
THE IMAGE MUST BE IN THE SAME GENDER FOLDER AS YOUR CHARACTER. Therefore I copy "flst" XNB files to "Male".
THE IMAGE NAME MUST BE THE SAME LENGTH AS ORIGINAL. Therefore I must extend my image name to 7 characters, "flst" to "flstest".

The easy part is done. Now let's move on to hardest part. Start the Underrail and load your character.
Use the cheat engine, target underrail as your process, and find your character's name.
Here are the instructions:
Use this chart and convert your character name to hex.

My character is named "Reinhark" so it should be...
52 65 69 6E 68 61 72 6B

Now insert 00 for every single characters. so it should look like:
52 00 65 00 69 00 6E 00 68 00 61 00 72 00 6B 00

Run cheat engine and:
Change "Value type" to "array of byte".
Click checkbox named "Hex" at the left side of input box.
Input above hex(In this case, [52 00 65 00 69 00 6E 00 68 00 61 00 72 00 6B 00]) and run it.
You should get 2 to 20 results.
If, for some reason memory disappears conduct the search again.

Right click each one and pick "Browse this memory region".
Find the location of memory location where your name and your picture name is near each other. if picture name cannot be found in one memory just go to another memory.

NOW CHANGE THAT PICTURE NAME FROM THE ORIGINAL (scavle2) TO THE NEW ONE (fltest)
It should take effect, immediately.
(alternatively, you can try to scan the file name, [73 00 63 00 61 00 76 00 6C 00 65 00 32 00] which stands for "scavle2". But this game has long pre-loading sequence so it is not recommended.)

I REALLY wish I knew changing portraits during a playthrough is going to be nigh-impossible, because I would've downloaded the custom pack before I actually started playing for the first time.

It now INFURIATES me that I cannot change it - believe it or not I followed every step in this guide (I've used CE before though I'm no code wizard) - and I CANNOT find the hex value for my character's portrait next to its name. It probably doesn't help that I used the armored helmeted male portrat (mt_l.png and mt_s.png) which has a primitive two-character file name.
And yes I actually did convert a custom portrait's .png file to .xnb and put it in the game files, though I did not get far enough to test if it would work.

Is there SERIOUSLY no other way to change your character's portrait on an existing save file? I think I'm roughly halfway through the game so I've got days of gameplay left and I'd like to not be bothered by the unfitting portrait. Immersion is a huge deal-breaker for me.
« Last Edit: September 11, 2019, 10:18:36 pm by Khornet »

BDR

  • Noob
  • *
  • Posts: 1
  • Karma: +4/-0
    • View Profile
Re: Custom Portraits
« Reply #46 on: September 12, 2019, 07:25:55 am »

I REALLY wish I knew changing portraits during a playthrough is going to be nigh-impossible, because I would've downloaded the custom pack before I actually started playing for the first time.

It now INFURIATES me that I cannot change it - believe it or not I followed every step in this guide (I've used CE before though I'm no code wizard) - and I CANNOT find the hex value for my character's portrait next to its name. It probably doesn't help that I used the armored helmeted male portrat (mt_l.png and mt_s.png) which has a primitive two-character file name.
And yes I actually did convert a custom portrait's .png file to .xnb and put it in the game files, though I did not get far enough to test if it would work.

Is there SERIOUSLY no other way to change your character's portrait on an existing save file? I think I'm roughly halfway through the game so I've got days of gameplay left and I'd like to not be bothered by the unfitting portrait. Immersion is a huge deal-breaker for me.

Hey guy,
I made an account on this forum to tell you everything is easy. The user that provided the original guide, Reinhark, went WAYYYYYYYY into detail when he may not have needed to / the game was older then and maybe that was necessary? From what it seems like, he meant if you were literally in the middle of a run and didn't feel like closing the game and reopening.
At least thats what I'm assuming.

Anyway made the account to tell you that you CAN change your portrait at any point in the game on a saved file / character.
All you need to do is use XNBCLI  https://github.com/LeonBlade/xnbcli/releases

Download and extract that. Next, navigate to where your specific portrait is. It is okay if you do not know the file name yet, Just so long as you remember your gender.
For example, My char is a girl, so her portrait was here :  \steamapps\common\Underrail\data\portraits\female



For whichever gender you are locked to, go ahead and copy (NOT CUT, MAKE SURE TO BACK UP THESE FILES IN CASE YOU GOOF) all the files into the XNBCLI folder called "Packed"
Should then look like this :

Then, in the main XNBCLI folder, run the unpack.bat file.
This will unpack each XNB file you had in that folder previously.
You'll need to click through the images and see which one is your current icon to determine what its name was. At least, that's what I did. Its not too many so its easy to confirm.
Once you do so, delete the rest of the unpacked files as you won't need them for the rest of this. Or leave them there, I don't care, I'm not a cop.
You'll get something that looks like this:

Once isolated, you can now just import whatever image file you want and save it as whatever the files name was.png
If you have custom portraits already prepared, Great! If not, You can easily make whatever you want in paint.
Just open it up in there and set the pixels to 100x100 for the _l and 50x50 for the _s

Paint tut  (right click and hit resize with these options filled in / unchecked) :

Finished work :


Simply save this 100x100 monstrosity as whatever your characters portrait was so for mine the file name now must be xpbl_pm_f_s.png and xpbl_pm_f_l.png

When you have finished this, and have made sure you made a backup of the original portraits somewhere,  Go back to the XNBCLI main folder and click the pack.bat
This will pack the new png up into an XNB file.

Now just shove that xnb file which should have the original portraits name back into the steam underrail folder for the respective gender and restart your game.

When finished, Saved character or not, your new profile picture will be displayed.

Shown here on one of my saved characters :

And ya done. AS OF CURRENT PATCH, YOU CAN SWITCH YOUR PORTRAIT ANYTIME USING THIS METHOD.

Shoutouts to Reinhark as they did most of the legwork in figuring this out. I'm just bumping with the knowledge of changing it whenever.
GL and have fun, this game seems pretty good.

Khornet

  • Probably not a Spambot
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Custom Portraits
« Reply #47 on: September 12, 2019, 09:30:32 pm »
My God, so it really was as simple as replacing the contents of the file containing the portrait. I do not know why I did not come up with that myself. Thank you.

I do have a problem though - the portrait I have assigned to my character is also sometimes used by NPCs. Changing it to a different file under the same filename will also change it for every single NPC that uses it. So while it's a solution - it's not a perfect one, since my special snowflake character stops being unique.
Ideally, I'd like to be able to simply re-choose my portrait to a similar manner while during character creation.

« Last Edit: September 12, 2019, 09:45:07 pm by Khornet »

recombinantOctagon

  • Probably not a Spambot
  • *
  • Posts: 3
  • Karma: +7/-0
    • View Profile
Re: Custom Portraits
« Reply #48 on: October 16, 2019, 06:10:49 am »
I made some portraits. They're all cropped out pieces of concept artwork (aside one). I'm planning do some edits based on ingame portraits for the people who want their PC to fit in with the game's aesthetic.

https://mega.nz/#!HhdjGQoL!oeafFWWKqG4Ca9vgFv-SugtsJKPEO7JFUkjDZtsLpRo

Hope you guys enjoy.

Examples:

recombinantOctagon

  • Probably not a Spambot
  • *
  • Posts: 3
  • Karma: +7/-0
    • View Profile
Re: Custom Portraits
« Reply #49 on: October 22, 2019, 07:19:17 am »
More portraits, this time in the game's artstyle. All of the 48 portraits in the link are edits of existing ingame portraits/assets smashed together.

These portraits are all of existing in game armor sets. Currently, I've done one for all of the leather armors added in Expedition (plus regular Siphoner leather), and the four types of metal armor. The metal armors are primarily recolors, with the helmets altered to reflect the inventory sprite for each. I tried my best to include skin and gender variations for every set, as well as regular visor and shaded visor variations for the metal armors. There's a bonus one in there too.

https://mega.nz/#!Skk3mIjD!TClq085xDQ9mzm8z6DtklImY4HSQLRzN2qeYE31R0fI

Examples:

« Last Edit: October 22, 2019, 11:18:18 am by recombinantOctagon »

Hazard

  • Oculite
  • Scavenger
  • **
  • Posts: 129
  • Karma: +20/-0
    • View Profile
Re: Custom Portraits
« Reply #50 on: October 28, 2019, 09:36:11 pm »
Hey, good job with the UR-style portraits. The metal armor variations are especially nice.  ;)

gamebaidoithuong

  • Noob
  • *
  • Posts: 2
  • Karma: +0/-0
  • gamebaidoithuong
    • View Profile
    • Doithuong.vn
Re: Custom Portraits
« Reply #51 on: March 21, 2020, 07:21:22 am »
It's a good tutorial, but I think this is simple and everyone knows how to do it, but thank you for guiding those who don't know.
Doithuong.vn la mot cong game doi thuong truc tuyen uy tin Tong hop thong tin chi tiet ve Go88 Vin win May Club V8 Club Macao Club Nhat vip Zo Win Sun Win

Tanxxx

  • Probably not a Spambot
  • *
  • Posts: 3
  • Karma: +2/-1
    • View Profile
Re: Custom Portraits
« Reply #52 on: April 19, 2020, 10:58:56 am »
Made a redhead version if anyone wants to use:









A great game my Serbian neighbours, poz iz Slovenije.  :)

DunderFail

  • Probably not a Spambot
  • *
  • Posts: 25
  • Karma: +2/-1
    • View Profile
Re: Custom Portraits
« Reply #53 on: May 05, 2020, 09:50:57 am »
I wonder how difficult it would be to have dynamic portraits that changed whenever you wore different armor.

Vokial

  • Scavenger
  • ***
  • Posts: 126
  • Karma: +28/-13
    • View Profile
Re: Custom Portraits
« Reply #54 on: May 05, 2020, 06:31:17 pm »
I wonder how difficult it would be to have dynamic portraits that changed whenever you wore different armor.

I think it's fine. I understand where the request comes from though. You probably found a nice portrait that you see as a possible manifestation of your character, but on the picture, the armor looks different than what you plan to wear through the whole game.

I'm happy that the background and lighting conditions change - thats a very much needed touch as the portraits would stand out too much otherwise. Great feature. What I don't really like is that far too many portraits are wearing respirators while not many models have them. Still, you can find some good ones in the packs online or make your own if you find a nice picture somewhere and crop it, even with MsPaint (for the background to be non-filled).

I just don't seem to find good ones for various character archetypes on the base game.
Where's the older, battle hardened sniper visibly having his glory days behind him? A hobo with a shotgun? Or the rogueish swaschbuckler trickster guy? Maybe the Judge Dredd kinda enforcer? Or the Riddick close combat specialist? Oh maybe the afro guy in tank-top qualifies for that I guess - if we could choose the skin of the model. Right now it's a total white guy with an afro portrait.
But tha main problem is that most of the male portraits are about total zoners that would easily fit as random burned-out Foundry mineworkers or zombie-like junkies from the slums of Core City. They look like crack-addicts not soldiers.

I reall look forward to see a new pack posted here by some generous person, or even a 1$ extra portrait DLC by the original artist so it'll fit with the rest.
« Last Edit: May 05, 2020, 06:37:38 pm by Vokial »

DunderFail

  • Probably not a Spambot
  • *
  • Posts: 25
  • Karma: +2/-1
    • View Profile
Re: Custom Portraits
« Reply #55 on: May 05, 2020, 06:40:55 pm »
I wonder how difficult it would be to have dynamic portraits that changed whenever you wore different armor.

I think it's fine. I understand where the request comes from though. You probably found a nice portrait that you see as a possible manifestation of your character, but on the picture, the armor looks different than what you plan to wear through the whole game.

I'm happy that the background and lighting conditions change - thats a very much needed touch as the portraits would stand out too much otherwise. Great feature. What I don't really like is that far too many portraits are wearing respirators while not many models have them. Still, you can find some good ones in the packs online or make your own if you find a nice picture somewhere and crop it, even with MsPaint (for the background to be non-filled).

I just don't seem to find good ones for various character archetypes on the base game.
Where's the older, battle hardened sniper visibly having his glory days behind him? A hobo with a shotgun? Or the rogueish swaschbuckler trickster guy? Maybe the Judge Dredd kinda enforcer? Or the Riddick close combat specialist? Oh maybe the afro guy in tank-top qualifies for that I guess - if we could choose the skin of the model. Right now it's a total white guy with an afro portrait.
But tha main problem is that most of the male portraits are about total zoners that would easily fit as random burned-out Foundry mineworkers or zombie-like junkies from the slums of Core City. They look like crack-addicts not soldiers.

I reall look forward to see a new pack posted here by some generous person, or even a 1$ extra portrait DLC by the original artist so it'll fit with the rest.

What really annoys me more than the armor and portrait not matching is how your character is always a white guy with black hair or a white gal with... I forget what color hair.

I wanted to use the portrait with a black guy in a suit but I couldn't stand how it didn't match my character.

Frankly I don't think there should be player avatars at all if you are A) Just going to use stock portraits already in the game and B) your character model isn't going to change depending on which portrait you chose. A very limited character creator like we see in the Shadowrun games would have been appreciated.

DunderFail

  • Probably not a Spambot
  • *
  • Posts: 25
  • Karma: +2/-1
    • View Profile
Re: Custom Portraits
« Reply #56 on: May 05, 2020, 09:22:06 pm »
In addition, I think there needs to be more character models in general. Your head should change depending on what you are wearing, so everyone in a black longcoat isn't wearing NVGs.

DunderFail

  • Probably not a Spambot
  • *
  • Posts: 25
  • Karma: +2/-1
    • View Profile
Re: Custom Portraits
« Reply #57 on: May 05, 2020, 10:25:04 pm »
''Made'' this one last night to fit the player model (unarmored), I hope you guys like it.   :)

I'd love it if someone made this for the female PC as well!

Vokial

  • Scavenger
  • ***
  • Posts: 126
  • Karma: +28/-13
    • View Profile
Re: Custom Portraits
« Reply #58 on: May 06, 2020, 05:14:23 pm »
Yep, there's no reason to choose a bald guy if your character model always have regular short hair. Having a muscular build? Model will still look like you're playing with an anorexic person with the body proportions of a 10 year old.
Some in-game portraits got faithfully modeled through the game as NPC's, and I can only imagine what some players feel when they meet one that has the exact same portrait what they choose, but rendered much better with a model that's actually fitting. One of the main reason why I use portraits found elsewhere.

If there would be some awesome dude who would make, or modify portraits and make several versions, each personalized according to character models wearing different armor, would be greatly appreciated. We don't even need a mechanic that changes between them according to what we equip, a player can decide what he 'll wear as part of pre-crafting his build, so he can choose the fitting portrait that at the start of the game (and hopefully do not change his mind later).



However, this one I'm attaching here, present from one the above posted packs I find really good. It's generic action hero apprearance is fitting to many models with light armor or tac-vest (even has goggles hanging around his neck so it qualifies to my build wearing tac-vest with black cloth). It still shows some possibly shady personality so I like it quite much rolling with a character being invested in subterfuge skills.
Really like how it's carefully checking out his enviroment like the main protagonist in the original wolfeinstein 3d and basically that's what I imagine him doing 99% of the time prowling around dim-lit hallways of abandoned military bases, or moving through the alleyways of Core City slums anyway - so it's close to perfect.
Thanks for whoever made it!
« Last Edit: May 10, 2020, 10:19:43 am by Vokial »

nosaM

  • Guest
Re: Custom Portraits
« Reply #59 on: May 09, 2020, 10:07:49 pm »
I made 6 custom portraits using existing portraits. I used paint3d and gimp.

https://mega.nz/folder/PO42TajL#dg3YJg7vQSnyIWwwkDAO0g