Author Topic: Setting dialog tokens adjacently  (Read 3735 times)

Offline cliffette

  • Timmins Tragic
  • Planewalker
  • *****
  • Posts: 547
  • Gender: Female
  • I still like Neighbours
Setting dialog tokens adjacently
« on: July 14, 2004, 06:02:54 AM »
If I do <HESHE><SIRMAAM>, it displays as 'she<SIRMAAM>', instead of 'shemaam'. Is there any brilliant way around this (ie some sort of no-space character), or are we stuck with this?

Also, is there some way to get the capitalisation correct on <HESHE> so that when you begin a sentence, it will begin with a capital?

And finally, is there a <HIMHER> equivalent for a non-player-character?

If these questions are too bothersome, you may point me the way of the token list from the game and I would be very grateful. I'd prefer the actual file, as I've already seen the one from IESDP. I have NI for viewing and haven't seen bg2_dialog_text.h (as mentioned in the tokens section in IESDP) among the files (but then again, I haven't really looked out for it). :)

Aristothenes

  • Guest
Re: Setting dialog tokens adjacently
« Reply #1 on: July 14, 2004, 07:19:19 AM »
I think you missed the underscore <HE_SHE> <SIR_MAAM>...

Offline cliffette

  • Timmins Tragic
  • Planewalker
  • *****
  • Posts: 547
  • Gender: Female
  • I still like Neighbours
Re: Setting dialog tokens adjacently
« Reply #2 on: July 14, 2004, 07:18:14 PM »
There isn't an underscore in those, although there are the <PRO_HESHE>, <PRO_SIRMAAM> versions. :)

At any rate, the ones I have are working, but just not really appearing next to each other- it's not really an issue, but I'm interested if there's a solution.
« Last Edit: July 14, 2004, 07:21:18 PM by cliffette »

Offline jcompton

  • Niche Exploiter
  • Administrator
  • Planewalker
  • *****
  • Posts: 7246
Re: Setting dialog tokens adjacently
« Reply #3 on: July 14, 2004, 09:08:41 PM »
I don't have an authoritative answer for you. You could try experimenting with breaking things up with a control character that the game might opt not to display... but don't ask me which one or how to get it in your .d file because I don't know. :)
Cespenar says, "Kelsey and friends be at the Pocket Plane? Ohhh yesssss!" http://www.pocketplane.net

Offline icelus

  • Global Moderator
  • Planewalker
  • *****
  • Posts: 3173
  • Gender: Male
Re: Setting dialog tokens adjacently
« Reply #4 on: July 14, 2004, 09:19:02 PM »
Try firing up Windows' CharMap and finding some obscure ASCII character.  Hopefully WeiDU won't choke on it, and the engine will ignore it...
<Moongaze> Luckily BWL has a very understanding and friendly admin.

Offline jcompton

  • Niche Exploiter
  • Administrator
  • Planewalker
  • *****
  • Posts: 7246
Re: Setting dialog tokens adjacently
« Reply #5 on: July 14, 2004, 10:23:36 PM »
Oooh!
Wait!
The Infinity Engine will ignore anything in [] brackets.

Try <token1>[blahblah]<token2>
Cespenar says, "Kelsey and friends be at the Pocket Plane? Ohhh yesssss!" http://www.pocketplane.net

Offline Smoketest

  • Planewalker
  • *****
  • Posts: 59
  • Gender: Male
Re: Setting dialog tokens adjacently
« Reply #6 on: July 14, 2004, 11:47:12 PM »
If I do <HESHE><SIRMAAM>, it displays as 'she<SIRMAAM>', instead of 'shemaam'. Is there any brilliant way around this (ie some sort of no-space character), or are we stuck with this?
Why you'd want to do this is beyond me, and Bioware obviously never intended it or you wouldn't be having any trouble with it. Still, if one of the ideas already given works, more power to you.

Quote
Also, is there some way to get the capitalisation correct on <HESHE> so that when you begin a sentence, it will begin with a capital?
Probably not. Try to word the dialog so that the token doesn't start the sentence. The only tokens that return capitalized text are those that specify titles or proper names.

Quote
And finally, is there a <HIMHER> equivalent for a non-player-character?
Not according to the list I have from Japheth, which makes sense. Bioware coded the dialogs knowing the genders of all the NPCs, but allowing for the possibility of two different PC genders depending on the player's choice. Since the Girdle of Masculinity/Femininity doesn't normally appear in BG2, they could get away with this shortcut. Also notice that Edwin, the only NPC who can experience a sex change, when being talked to by other NPCs, is referred to by seperate gender-based dialogs, with the gender being checked in a trigger, rather than a single dialog with a token.

Quote
If these questions are too bothersome, you may point me the way of the token list from the game and I would be very grateful. I'd prefer the actual file, as I've already seen the one from IESDP. I have NI for viewing and haven't seen bg2_dialog_text.h (as mentioned in the tokens section in IESDP) among the files (but then again, I haven't really looked out for it). :)
I'll provide the list I copied from Japheth's post on the old FWP tutorial forum. It's in his words, though I changed the highlighted yellow to italics for the example text.

Quote
Dialogue Tokens

I've been toying around with the various dialogue tokens out there and have
compiled a decent list with some explanations. Might be of some use to some
people out there. Here we go.

Note: All text appearing in italics is exactly how it appears in
the dialogue window. So, using <SIRMAAM>, produces sir or ma'am in lowercase.

<BROTHERSISTER> - returns brother or sister depending on the gender of the person being spoken to.
<CHARNAME> - returns the name of the PC.
<DAY> - returns the current numerical day.
<DAYANDMONTH> - returns the current numerical day as well as the month. (Example: It is <DAYANDMONTH>, would produce: It is 24 Mirtul...or whatever the current day and month happens to be.)
<DAYNIGHT> - returns day or night depending whether it's nighttime or daytime.
<DURATION> - returns the elapsed time from the start of the game in days and hours. (Example: We've been around for <DURATION>, would produce: We've been around for 23 days and 13 hours...or whatever the elapsed time happens to be.)
<DURATIONNOAND> - returns the same thing as <DURATION> except it omits the 'and'. So it would be 23 days 13 hours rather than 23 days and 13 hours.
<GABBER> - returns the name of the current speaker. (Example: If I use Jaheira and click-talk her on a creature rather than using the PC, this would return Jaheira if used in a dialogue.)
<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.
<HOUR> - returns the current hour of the day in numerical 24 hour format.
<LADYLORD> - returns Lady or Lord depending on the gender of the person being spoken to.
<LEVEL> - returns the 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.
<MONTHNAME> - returns the current month's name. (Example: It is <MONTHNAME>, would produce: It is Mirtul...or whatever the current month is in your game.)
<PLAYER2-6> - this will return the name of the NPC depending on which number they are in the party order. (Example: If Jaheira is the last in the party order then, Hey, <PLAYER6>! would produce: Hey Jaheira!)
<PRO_BROTHERSISTER> - returns brother or sister depending on the PC's gender.
<PRO_GIRLBOY> - returns girl or boy depending on the PC's gender.
<PRO_HESHE> - returns he or she depending on the PC's gender.
<PRO_HIMHER> - returns him or her depending on the PC's gender.
<PRO_HISHER> - returns his or her depending on the PC's gender.
<PRO_LADYLORD> - returns Lady or Lord depending on the PC's gender.
<PRO_MANWOMAN> - returns man or woman depending on the PC's gender.
<PRO_RACE> - returns the PC's race. (Example: If the PC was a half-elf then, I know you're a <PRO_RACE>! would produce: I know you're a half-elf!
<PRO_SIRMAAM> - returns sir or ma'am depending on the PC's gender.
<RACE> - returns the race of the current person being spoken to.
<SIRMAAM> - returns sir or ma'am depending on the gender of the person being spoken to.
<YEAR> - returns the current year in numerical format. (Example: It is <YEAR> currently, would produce: It is 1369 currently...or whatever year it is in your game.

Hope this is helpful to you.

Offline jcompton

  • Niche Exploiter
  • Administrator
  • Planewalker
  • *****
  • Posts: 7246
Re: Setting dialog tokens adjacently
« Reply #7 on: July 14, 2004, 11:54:41 PM »
At this juncture perhaps it's worth reminding that you can always just tough it out, have two dialogue branches keying off gender, and write it exactly how you want it. :)
Cespenar says, "Kelsey and friends be at the Pocket Plane? Ohhh yesssss!" http://www.pocketplane.net

Offline Smoketest

  • Planewalker
  • *****
  • Posts: 59
  • Gender: Male
Re: Setting dialog tokens adjacently
« Reply #8 on: July 15, 2004, 12:13:44 AM »
Oooh!
Wait!
The Infinity Engine will ignore anything in [] brackets.

Try <token1>[blahblah]<token2>
According to my tests, this is only true if the [] brackets appear at the start of a string. If placed anywhere else, both the [] brackets and whatever text is inside them will be displayed in the game. If [] brackets appear both at the beginning of a string and somewhere else in the string, the set at the beginning will not be displayed, but the other set will be displayed.

~[Test]Hello <Charname>[Spacer]<BrotherSister>.~

displays

"Hello Charname[Spacer]brother." if charname is male or
"Hello Charname[Spacer]sister." if charname is female.

Offline jcompton

  • Niche Exploiter
  • Administrator
  • Planewalker
  • *****
  • Posts: 7246
Re: Setting dialog tokens adjacently
« Reply #9 on: July 15, 2004, 12:18:43 AM »
Huh. I thought there were IWD2 strings that had them all over. Maybe I'm misremembering, or IWD2 is different.
Cespenar says, "Kelsey and friends be at the Pocket Plane? Ohhh yesssss!" http://www.pocketplane.net

Offline Smoketest

  • Planewalker
  • *****
  • Posts: 59
  • Gender: Male
Re: Setting dialog tokens adjacently
« Reply #10 on: July 15, 2004, 12:24:37 AM »
It probably is. Black Isle did tweak the BG2 engine quite a bit. My test was only with BG2.

Offline cliffette

  • Timmins Tragic
  • Planewalker
  • *****
  • Posts: 547
  • Gender: Female
  • I still like Neighbours
Re: Setting dialog tokens adjacently
« Reply #11 on: July 15, 2004, 02:42:25 AM »
Why you'd want to do this is beyond me, and Bioware obviously never intended it or you wouldn't be having any trouble with it. Still, if one of the ideas already given works, more power to you.

I like to push what BG2 can do. :)

And thanks everyone.. I haven't tried the weird character trick yet, but I'll give it a go and report back. :)

 

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Name: Email:
Verification:
Type the letters shown in the picture
Listen to the letters / Request another image
Type the letters shown in the picture:
What color is grass?:
What is the seventh word in this sentence?:
What is five minus two (use the full word)?: