Jump to content

Updated BG2 Dialog Tokens


Smoketest

Recommended Posts

I compiled this list years ago and forgot about it. It was gathered from scan of bgmain.exe's data areas, and is probably more accurate than the source given in IESDP's token page, as most of those 'unknown' tokens aren't in the EXE's list.

 

Here's the list, more or less in the same format as IESDP's list but with more info.

<BROTHERSISTER> - returns "brother" or "sister" depending on the gender of the person being spoken to.
<CHARNAME> - returns the name of the main character.
<DAY> - returns the current day of the month as a number.
<DAYANDMONTH> - returns the current day and month. (for example "24 Mirtul")
<DAYNIGHT> - returns "day" or "night" depending on if it's daytime or nighttime in the game world.
<DAYNIGHTALL> - returns "morning" from 6am (6) to 11:59am, "afternoon" from Noon (12) to 5:59pm, "evening" from 6pm (18) to 9:59pm. and "night" from 10pm (22) to 5:59am (game world times).
<DURATION> - returns the elapsed game time in days and hours since the start of the game. (for example "23 days and 13 hours")
<DURATIONNOAND> - returns the information in <DURATION> without "and." (for example "23 days 13 hours")
<GABBER> - returns the name of the party character who initiated dialog.
<GAMEDAY> - returns the current game day. (Starts at 1 for a new game.)
<GAMEDAYS> - returns the number of game days that have elapsed since the start of the game. (Starts at 0 for a new game.)
<GIRLBOY> - returns "girl" or "boy" depending on the gender of the person being spoken to.
<HESHE> - returns "he" or "she" depending on the gender of the person being spoken to.
<HIMHER> - returns "him" or "her" depending on the gender of the person being spoken to.
<HISHER> - returns "his" or "her" depending on the gender of the person being spoken to.
<HOUR> - returns the current game hour as a number from 0 to 23.
<LADYLORD> - returns "Lady" or "Lord" depending on the gender of the person being spoken to.
<LEVEL> - returns the experience level of the person being spoken to.
<MALEFEMALE> - returns "male" or "female" depending on the gender of the person being spoken to.
<MANWOMAN> - returns "man" or "woman" depending on the gender of the person being spoken to.
<MINUTE> - returns the current number of real-time minutes (0-59) that have passed in the last hour.
<MONTH> - returns the current game month as a number.
<MONTHNAME> - returns the current game month's name. (for example "Mirtul")
<PLAYER1-6> - returns the name of the party character in the specified internal party slot. (The main character is always PLAYER1.)
<PRO_BROTHERSISTER> - returns "brother" or "sister" depending on the main character's gender.
<PRO_GIRLBOY> - returns "girl" or "boy" depending on the main character's gender.
<PRO_HESHE> - returns "he" or "she" depending on the main character's gender.
<PRO_HIMHER> - returns "him" or "her" depending on the main character's gender.
<PRO_HISHER> - returns "his" or "her" depending on the main character's gender.
<PRO_LADYLORD> - returns "Lady" or "Lord" depending on the main character's gender.
<PRO_MALEFEMALE> - returns "male" or "female" depending on the main character's gender.
<PRO_MANWOMAN> - returns "man" or "woman" depending on the main character's gender.
<PRO_RACE> - returns the main character's race.
<PRO_SIRMAAM> - returns "sir" or "ma'am" depending on the main character's gender.
<PRO_SONDAUGHTER> - returns "son" or "daughter" depending on the main character's gender.
<RACE> - returns the race of the person currently being spoken to.
<SIRMAAM> - returns "sir" or "ma'am" depending on the gender of the person being spoken to.
<SONDAUGHTER> - returns "son" or "daughter" depending on the gender of the person being spoken to.
<YEAR> - returns the current year as a number.

The new tokens (for IESDP) are <DAYNIGHTALL>, <GAMEDAY>, <HIMHER>, <HISHER>, <MINUTE>, <MONTH>, <PLAYER1>, <PRO_MALEFEMALE>, <PRO_SONDAUGHTER>, and <SONDAUGHTER>.

 

Note that it can take a minute for the token values of <HOUR>, <GAMEDAY> and <GAMEDAYS> to be updated. Due to this fact, if such a token is used very early in the game, such as within the first minutes, you may see <HOUR> return 18, <GAMEDAY> return 59, and <GAMEDAYS> return 58. After the update kicks in, <HOUR> will return 0, <GAMEDAY> will return 1, and <GAMEDAYS> will return 0.

Link to comment
Don't forget <TM>. Very useful, that one.

Hmmm? I must've missed the joke...

 

While I'm posting, here's a list of BG1 Dialog Tokens. Someone else posted most of these in another forum, but this list has three additional tokens they didn't list. These are the only tokens I could find in BG1:TSC's exe.

<CHARNAME> - returns the name of the main character.
<DAY> - returns the current day of the month as a number.
<DAYANDMONTH> - returns the current day and month. (for example "24 Mirtul")
<DURATION> - returns the elapsed time in days and hours since the start of the game. (for example "23 days and 13 hours")
<DURATIONNOAND> - returns the information in <DURATION> without "and." (for example "23 days 13 hours")
<GABBER> - returns the name of the party character who initiated dialog.
<GAMEDAY> - returns the current game day as a number. Starts at 1 in a new game.
<GAMEDAYS> - returns the number of game days that have elapsed since the start of the game.
<HOUR> - returns the current hour of the day as a number from 0 to 23.
<MINUTE> - returns the current number of real-time minutes that have passed.
<MONTH> - returns the current month as a number.
<MONTHNAME> - returns the current month's name. (for example "Mirtul")
<YEAR> - returns the current year as a number.

Similar to the BG2 tokens, <MINUTE>, <HOUR>, <GAMEDAY>, and <GAMEDAYS> tend to take awhile to update properly. However, I found that hovering over the clock in the corner of the screen and activating a tooltip text updates these tokens instantly. (Weird, I know.) In fact, it seems to be the only way to update <MINUTE>, which is probably no big loss.

Link to comment

Thought I'd scan IWD2's exe while I was at it. The usual tokens popped up, minus the <SONDAUGHTER> pair but adding <SURFACE_UNDERDARK>. Also, BG2's PRO_ prefix was extended to PROTAGONIST_ for IWD2.

<BROTHERSISTER> - returns "brother" or "sister" depending on the gender of the person being spoken to.
<CHARNAME> - returns the name of the main character.
<DAY> - returns the current day of the month as a number.
<DAYANDMONTH> - returns the current day and month. (for example "24 Mirtul")
<DAYNIGHT> - returns "day" or "night" depending on if it's daytime or nighttime.
<DAYNIGHTALL> - returns "night" from 10pm (22) to 5:59am, "morning" from 6am (6) to 11:59am, "afternoon" from Noon (12) to 5:59pm, "evening" from 6pm (18) to 9:59pm.
<DURATION> - returns the elapsed time in days and hours since the start of the game. (for example "23 days and 13 hours")
<DURATIONNOAND> - returns the information in <DURATION> without "and." (for example "23 days 13 hours")
<GABBER> - returns the name of the party character who initiated dialog.
<GAMEDAY> - returns the current game day as a number. Starts at 1 in a new game.
<GAMEDAYS> - returns the number of game days that have elapsed since the start of the game.
<GIRLBOY> - returns "girl" or "boy" depending on the gender of the person being spoken to.
<HESHE> - returns "he" or "she" depending on the gender of the person being spoken to.
<HIMHER> - returns "him" or "her" depending on the gender of the person being spoken to.
<HISHER> - returns "his" or "her" depending on the gender of the person being spoken to.
<HOUR> - returns the current hour of the day as a number from 0 to 23.
<LADYLORD> - returns "Lady" or "Lord" depending on the gender of the person being spoken to.
<LEVEL> - returns the experience level of the person being spoken to.
<MALEFEMALE> - returns "male" or "female" depending on the gender of the person being spoken to.
<MANWOMAN> - returns "man" or "woman" depending on the gender of the person being spoken to.
<MINUTE> - returns the current number of real-time minutes that have passed.
<MONTH> - returns the current month as a number.
<MONTHNAME> - returns the current month's name. (for example "Mirtul")
<PLAYER1-6> - returns the name of the party character in the specified internal party slot.
<PROTAGONIST_BROTHERSISTER> - returns "brother" or "sister" depending on the main character's gender.
<PROTAGONIST_GIRLBOY> - returns "girl" or "boy" depending on the main character's gender.
<PROTAGONIST_HESHE> - returns "he" or "she" depending on the main character's gender.
<PROTAGONIST_HIMHER> - returns "him" or "her" depending on the main character's gender.
<PROTAGONIST_HISHER> - returns "his" or "her" depending on the main character's gender.
<PROTAGONIST_LADYLORD> - returns "Lady" or "Lord" depending on the main character's gender.
<PROTAGONIST_MALEFEMALE> - returns "male" or "female" depending on the main character's gender.
<PROTAGONIST_MANWOMAN> - returns "man" or "woman" depending on the main character's gender.
<PROTAGONIST_RACE> - returns the main character's race.
<PROTAGONIST_SIRMAAM> - returns "sir" or "ma'am" depending on the main character's gender.
<RACE> - returns the race of the person currently being spoken to.
<SIRMAAM> - returns "sir" or "ma'am" depending on the gender of the person being spoken to.
<SURFACE_UNDERDARK> - returns "surface" or "underdark" depending on where the party is.
<YEAR> - returns the current year as a number.

Given that the results of my scans of BG1 and BG2 resulted in functional tokens (comes from two decades of reading hex dumps I guess), I'm going to say this bunch is functional too; I'm not in the mood to fire up the game and verify them at the moment. :)

 

This leaves IWD:HoW to check, which I don't presently have installed.

Link to comment

Okay I tested it and it only seems to work in BG2:ToB. I include it with other tokens not meant for conversational dialogs, such as <MAGESCHOOL> and <FIGHTERTYPE>, which work on the player record screen but don't do much in a dialog. (They return values, but not meaningful ones.)

 

For kicks I tried a few of the so-called dialog tokens the IESDP has in excess of what's in this thread, in BG2:ToB, with the following results. (By "didn't work" I mean the token merely returned whatever the last valid token returned.)

 

<AMOUNT> = didn't work

<CLASS> = didn't work

<CurrentChapter> = didn't work (I even tried variations such as <CURRENTCHAPTER>, <Current_Chapter>, and <CURRENT_CHAPTER>.)

<DAMAGEE> = didn't work. (I also tried <DAMAGE> in case the extra E was a typo.)

<EXPERIENCE> = didn't work.

<FIGHTERTYPE> = (not in IESDP but I know it so I tried it) always returned "fighter" because I was using it in a dialog; I know it works right in the player record screen.

<ITEMCOST> = didn't work (the context alone would suggest such)

<ITEMNAME> = didn't work (the context alone would suggest such)

<MAGESCHOOL> = always returned "transmuter" because I was using it in a dialog; I know it works right in the player record screen.

<NO TEXT> = didn't do anything, didn't prevent the display of text following it. I think it was just a marker/reminder for the developers.

<script> = yeah right. Obviously doesn't belong, so I didn't even check.

<SPECIALABILITYNAME> = didn't work

<SPELLLEVEL> = didn't work

<WEAPONNAME> = didn't work

 

The findings aren't surprising, as these tokens aren't found alongside the dialog tokens. The real dialog tokens are always in one of two or three groups in the EXEs. Usually <CHARNAME> and <GABBER> are in the first group, followed by the rest of the BG1 tokens in another group, followed by the extra tokens used in BG2 & IWD2 in another group.

 

Oh, and <TM> only appears in two strings in BG2:ToB:

 

73245: "Play Shadows of Amn<TM> with the new area of Watcher's Keep Dungeon"

73246: "Play Throne of Bhaal<TM> with all new areas including Watcher's Keep Dungeon"

 

So as devSin said, pretty much useless for the usual conversational dialog, though somehow I could see this token being used in Jan Jansen's item descriptions...

Link to comment

Sorry, but all it did for me was echo the output of a previous (working) token in my test text, which happened to be <TM>, so instead of a legal class, <CLASS> returned a superscripted TM. :)

 

In fact, <TM> was first, so it was rather easy to spot the non-working tokens in my test, since I had all of them coming after <TM>.

 

As I recall, <CLASS> is used in the Player Record screen. In fact, several of the tokens are used in various screens, such as during character creation and so on.

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...