Jump to content

Planescape ee - how to change the font color in dialog box?


szef

Recommended Posts

I think they are hardcoded. You could probably use a brute force approach by applying coloring to individual dialog strings (as described here). But that's not something I would recommend, since it requires your mod to be installed last (to catch all dialog strings) and may have undesired side effects.

Link to comment

The color is embedded in the string that the engine build before sending it to the UI.

For example:

^0xff75a1b8Morte^-

You can't change the way this string is built. But you could post-process it.

In the UI.menu file, there is this function:

    function getDialogEntryText(row)
        local text = dialogTable[row].text
        if (row == worldPlayerDialogSelection) then
            --Color the text white when selected
            text = string.gsub(text, "%^0xff212eff", "^0xFFFFFFFF")
        end
        return text
    end

There is already a post-process that change the red color to white for the selected answer.

Link to comment

Thanks for the replies!!

Hm, I've understood the very basic of this magic, but not enough. It is quite difficult(?).
Maybe I will do some research on this, since my knowledge is near 0 (or I'll let it go, since there are might be consequences, sooo).

Either way, I know where to look now!

Edited by szef
Link to comment
19 hours ago, lefreut said:

The color is embedded in the string that the engine build before sending it to the UI.

For example:

^0xff75a1b8Morte^-

 

Question, where can I find this string (or the like this)?

:D

Edited by szef
Link to comment
11 hours ago, szef said:

 

Question, where can I find this string (or the like this)?

:D

You can only see them while running the game. The game files only store the raw texts and the engine dynamically adds the color code.

If you add a print_r(text); in the function getDialogEntryText and launch the game from a console, you can see this kind of text.

Link to comment

Ok, this i get. Thanks.

But how i.e. this:  
 

^0xff75a1b8Dak'kon^- - ^0xff7da58cDak'kon obraca w twym kierunku swe czarne niczym węgiel oczy.^-

^0xffd5c885Bezimienny^- - ^0xffd7c8a0W tej chwili nic, Dak'konie. Kontynuujmy.”^-

correspond to i.e.

 "%^0xff212eff"

(red color in the  post-process above)?

So I must change color for each character separatly?

Hm, 100% no, but you know, still no clue how to do it ;). 

Edit:

^0xffd5c885Bezimienny^- - ^0xffd7c8a0

First is for charname color, second it's the line already said by The Nameless One, and:

^0xff7da58c

is the lines, the greenish dialog font color (AABBGGRR ?).

?  

 

Edited by szef
Link to comment

In the BG (EE) series, the character name's font color in the dialog box comes from the character's outfit colors. I'm pretty sure it's just their "major color". That's not something you set in a UI mod, it's something that's in the creature files. PSTEE may be different, but I expect this point to be the same.

Colors for the actual dialogue strings ... that's something else.

Link to comment
4 hours ago, jmerry said:

In the BG (EE) series, the character name's font color in the dialog box comes from the character's outfit colors. I'm pretty sure it's just their "major color". That's not something you set in a UI mod, it's something that's in the creature files. PSTEE may be different, but I expect this point to be the same.

Ok.


I'm made (for myself 😛) quick comparison, the lines that was just said by TNO (after reverse first and last color symbols AABBGGRR > RGB). 

1.jpg

Edited by szef
Link to comment
36 minutes ago, lynx said:

Weren't most of the GUI colors externalized to some lua file? Maybe that was not the case in pst:ee, but I definitely remember it for bgee.

You mean in the file: bgee.lua, right?

 

Spoiler
fontcolors = {}
-- AABBGGRR
fontcolors['1'] = 'FFCAE2E9' -- title
fontcolors['2'] = 'FFCAE2E9' -- title highlight
fontcolors['3'] = 'FFCAE2E9' -- subtitle
fontcolors['4'] = 'FFEEFFFF' -- subtitle highlight
fontcolors['5'] = 'FF000000' -- parchment
fontcolors['6'] = 'FFEEFFFF' -- parchment highlight
fontcolors['7'] = 'FF000000' -- alternate parchment
fontcolors['8'] = 'FF102526' -- alternate parchment highlight
fontcolors['9'] = 'FFCDD6D9' -- semitrans dark background
fontcolors['A'] = 'FFFDE6E9' -- semitrans dark background highlight
fontcolors['B'] = 'FFdef6f8'
fontcolors['C'] = 'FFC8F0C8' -- Minty update color
fontcolors['D'] = 'FF96C8FF' -- orangy subtitle color
fontcolors['R'] = 'FF000080' -- red
fontcolors['G'] = 'FF00FF00' -- green
fontcolors['M'] = 'FF000080' -- parchment red
fontcolors['N'] = 'FFFDFBFD' -- NOTE: white text
fontcolors['Y'] = 'FF01cde5' -- PST yellow
fontcolors['$'] = 'FF82E6FF' -- gold yellow/orange
fontcolors['P'] = 'FFa67da7' -- purple highlight

characters = {}

tempStats = {}

styles =
{
	normal =
	{
		color = 'Y',
		font = 'bookmani',
		point = 14,
		valign = 'top',
		halign = 'left',
		useFontZoom = 1,
	},
  
  ...

 

 

I tried change that file (styles, colors) - sadly for pstee, doing that, has no affect on the game dialog box (exept the font type, AND colors in i.e. "Quit game" etc.).

Edited by szef
Link to comment
1 hour ago, lynx said:

Weren't most of the GUI colors externalized to some lua file? Maybe that was not the case in pst:ee, but I definitely remember it for bgee.

The colors used in other part of the UI are externalized. But for the dialog as this use the color from your character it is dynamically added by the engine.

Link to comment

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...