Page 1 of 1

Editing Name Labels in History Screen

Posted: Tue Mar 01, 2022 12:26 pm
by parttimestorier
I have a character in my game who gets referred to as "Mysterious Woman" until the player eventually learns her real name, and that phrase is a bit too long to fit in the name label style the way that I have it set up for all the other characters. So for the name label in the dialogue box, I've edited the way that her name appears by adding some code to the namebox window underneath the following:

Code: Select all

if _last_say_who == "mw":
That works perfectly so far. So I tried to edit the history screen in the same way, with the following code:

Code: Select all

if h.who:
    if _last_say_who == "mw":
        text "{color=#efc9de}Mysterious\n   Woman{/color}" xalign 0.2 yalign 0
At first I thought I had totally figured it out, because I got it looking like this:
screenshot0002.png
Exactly what I want! But then I realized that if I try looking at the history screen again once some other character has had dialogue after her, that text I added in place of her default namebox has disappeared. I hadn't considered that since the variable is called "_last_say_who", it will only show up if she was the last character to talk. Does anyone know if there's a different variable I can put in its place to change it for every time her name shows up in the history screen, or another way to handle editing names on that screen specifically? Thanks!

Re: Editing Name Labels in History Screen

Posted: Tue Mar 01, 2022 2:31 pm
by Ocelot
Why don't you use h.who directly?

Also note that you can override styles for names in character definition. In your case you could set it to be centered and turn on linebreaking

Re: Editing Name Labels in History Screen

Posted: Wed Mar 02, 2022 12:16 pm
by parttimestorier
Ocelot wrote: Tue Mar 01, 2022 2:31 pm Why don't you use h.who directly?

Also note that you can override styles for names in character definition. In your case you could set it to be centered and turn on linebreaking
Just replacing "if _last_say_who" in my code with "if h.who" doesn't seem to do anything - it just shows the default name label on the history screen as if the code wasn't there. Am I doing it wrong? Or alternatively, how would you set the name to be centered and turn on linebreaking in the definition? Thanks!

Re: Editing Name Labels in History Screen

Posted: Sat Apr 15, 2023 4:46 pm
by parttimestorier
Bumping up this old thread again as I'm getting back into working on this project and still a little unclear on how to handle this problem. Does anyone have any ideas? Thanks :)