Skip to content

[Question] Custom Portraits resizing vs WeiDU added NPC portrait sizes?

cmorgancmorgan Member Posts: 707
Hey there - I have lots of data telling me what size, bit depth, resolution, etc. to use for distributing on the Enhanced Edition Platform.

I see a patch note that says for Custom Portraits just a large portrait is needed and the game will resize it to the various portrait incarnations.

My question is, does this actually now apply behind the scenes to the NPC assigned portraits, so that for an NPC all I would need now is a large one

c-aranwl 210x330 24bit bmp, 200 p/i

and the game would roll out

M 169x266 24bit bmp, 200 p/i
S 54x84 24bit bmp, 200 p/i

?

Or are we still at the manually create the three sizes and then assign them to .cre?

Comments

  • argent77argent77 Member Posts: 3,431
    Yes, it works. You can safely assign large BMPs for small and large portraits. The game takes care of everything else. Using larger bitmaps results in much crisper portrait images for that character, which is especially noticeable on higher screen resolutions.

    Actually, it looks like portrait images can be as large as 1024x1024 pixels.
    cmorgan
  • cmorgancmorgan Member Posts: 707
    VERY cool - so a new distribution for BG(2):EE can dispense with the line-by-line assignment - wait...

    safely assign large bmps is part of it - but does that mean assigning the .cre

    (original = mypic.bmp)

    COPY ~media/mypic.bmp~ ~override/mypicL.bmp~
    ~override/mypicM.bmp~
    ~override/mypicS.bmp~
    or does it mean

    COPY ~media/mypic.bmp~ ~override/mypicL.bmp~
    and assigning the portraits as

    ACTION_FOR_EACH arancre IN c-aran7 c-aran13 BEGIN
    ACTION_IF FILE_EXISTS_IN_GAME "%arancre%.cre" BEGIN
    COPY_EXISTING "%arancre%.cre" ~override~
    PATCH_IF (SOURCE_SIZE > 0x2d3) BEGIN
    WRITE_ASCII 0x34 ~C-ARANL~ #8 // small portrait
    WRITE_ASCII 0x3c ~C-ARANL~ #8 // medium portrait
    END
    BUT_ONLY_IF_IT_CHANGES
    END
    END
    (sorry - I would test this myself but dealing with a windows 10 "upgrade" oddity with a piece of legacy hardware - I really appreciate the help!)
  • argent77argent77 Member Posts: 3,431
    It should be enough to copy the BMP file once and assign it to all portrait fields of the CRE (and optionally to the NPC's npcnd.2da as well).

    COPY ~media/mypicL.bmp~ ~override~ COPY ~media/mycre.cre~ ~override~ WRITE_ASCII 0x34 ~mypicL~ #8 // small portrait WRITE_ASCII 0x3c ~mypicL~ #8 // large portrait
    cmorgan
  • cmorgancmorgan Member Posts: 707
    Got it - and that should cover both :EE variants, I think - I will be able to do a test install by mid-day, so I will see how this works. I like this. Cleaner, simpler.
  • cmorgancmorgan Member Posts: 707
    Sweeeeet! Thanks for the assist, @argent77.

    Got it rolling on a fresh install, and it works as intended. I have several 704px x 1024px 24-bit 200ppi resolution .bmp and was able to copy them into position, and assign them to both joinable and non-joinable NPC .cres. Testing in-game shows *really* nicely !!

    The only (ignorable) hiccup is that for modders (or players messing about with them) NearInfinity and DLTCEP do not resize the portraits; NearInfinity is in an extendable frame so that is easily fixed by making the frame larger. DLTCEP just shoews the top left corner of the portrait.

    Now I just have to see if "print size" can be reduced without losing anything; 2mb image files are having no problems at all being rendered on my machine, but something tells me the print data is bloating those files.

Sign In or Register to comment.