Aller au contenu

Photo

Possible to make a new string ref for dialogue like <boy/girl>?


  • Veuillez vous connecter pour répondre
10 réponses à ce sujet

#1
andysks

andysks
  • Members
  • 1 650 messages

I'm curious, and if yes, how? Would be nice to have some pre-set colours and the bold and italic letters so that I don't have to type the <i> etc all the time.

 

I'm thinking, custom tlk? Which I already have, but how do the commands get associated with the conversation editor?



#2
Tchos

Tchos
  • Members
  • 5 054 messages

I'd like to know this too, not only to add slang or playful terms, but especially because of the annoying use of the "<mister/missus>" token being used in dialogue such as "Thank ye kindly, <mister/missus>!"  Using "missus" there sounds very odd, and probably should be "ma'am".



#3
4760

4760
  • Members
  • 1 207 messages

It's even worse in French, when some obvious errors show up...

For instance, "hide" in English doesn't always mean "take cover, conceal", it's also a name for "pelt, skin". Well, the French tlk apparently only uses the first meaning, so the _HD_ cloth type is not for thieves and spies, as the toolset in French first led me to believe when I found "discreet armor type"!

But it also appears in game (and that I find more annoying for a commercial game), where <class> has no gender, or <his/her> is linked to the player, and not to the object he owns (yes, you can say French is complicated). To give an example, it's as if you used <he/she> instead of <him/her> in a few lines of dialog.

 

I finally ended in forgetting about the language selection (below the conversion, there's a dropdown list where you can choose English, French, Italian, etc...) and write everything in the English textbox, adding some lines where necessary with gc_is_female() conditions



#4
andysks

andysks
  • Members
  • 1 650 messages

Probably easier than it sounds. There is the tlk entry of course. One line per word. For example boy is one line, girl another. And then there is a 2da probably no one ever looked into :). stringtokens.2da. Here's how it looks.

 

2015-03-17%2021_13_30-TlkEdit%20-%20C__U

 

From what I understand, alignment, which is something that's the same for male and female, uses the default column. While boy/girl etc use two, or day/night 4.

One thing that's not clear to me is the Action Code column. Really, I have no clue what that means :).

 

Edit. Also, the category column. It seems to me that 0 is for anything related to the player (except level, who knows why), while game time and weather is 1. So... the colour would be... 1?


  • rjshae aime ceci

#5
Dann-J

Dann-J
  • Members
  • 3 161 messages

Base on some deductive reasoning, it would seem the Action Codes are as follows:

 

  • 1: The sex of the speaker
  • 2: First + Last name of the speaker
  • 3: First name of the speaker
  • 4: Last name of the speaker
  • 8/9: Uppercase and Lowercase string for the speaker's class (probably their first class)
  • 10: The hit dice of the speaker
  • 11/12: Uppercase and Lowercase string for the speaker's alignment category (lawful evil, chaotic neutral, etc)
  • 13: Law/Chaos axis of the speaker's alignment
  • 14: Good/Evil axis of the speaker's alignment
  • 15-18: Time/Date related information (independent of the speaker)
  • 24: Deity the speaker worships

So if you wanted to create new tokens like "dude/chick", the new line would use Action Code 1.

 

I wonder if you can enter strings directly into the 2DA, rather than use StrRefs?


  • rjshae aime ceci

#6
Tchos

Tchos
  • Members
  • 5 054 messages

For instance, "hide" in English doesn't always mean "take cover, conceal", it's also a name for "pelt, skin". Well, the French tlk apparently only uses the first meaning, so the _HD_ cloth type is not for thieves and spies, as the toolset in French first led me to believe when I found "discreet armor type"!

 

Ha, my hide-wearing barbarian character would be insulted if someone said he was trying to be discreet!

 

Another error that happens in the English tokens is when using the token <quarterday>.  Usually people use it when they want the NPC to give an appropriate greeting for the time of day, like "Good <quarterday> to you, sir."  Unfortunately, while that works fine for "morning", "afternoon", and "evening", if it's night time, then the character says "good night" (something you say when someone is going to sleep, and not a typical greeting).

 

As for the genders, I suppose it's unfortunate that the game had English as its base language, given that most English nouns don't have a gender.  Must be a nightmare trying to dynamically substitute words in a translation to a language where that's the standard.  If it were built around a gendered language, then it would be simple enough to just plug the same word in for both English genders.

 

I'd definitely try adding new strings directly into the 2DA like we can in placeables.2da before resorting to string refs in a TLK file.



#7
Dann-J

Dann-J
  • Members
  • 3 161 messages

<Racenoun> can have amusing results when both conversation members are the same race. You can end up with a human NPC saying something like 'Stop where you are, Human' to the PC. It makes them sound like lunatics.



#8
Tchos

Tchos
  • Members
  • 5 054 messages

That's been a long-amusing problem in other games that address the PC by race, too.

 

At least here, you can make two different nodes with a gc_check_race_pc check and say something different if you're the same race.



#9
andysks

andysks
  • Members
  • 1 650 messages

Seems to be working. Adding a line to the 2da that's named as the string we want, seems to be all we need. For example, adding a single "i", and then placing the 2da to the campaign folder makes it work. Same with a c=DodgerBlue. On the name of the line we don't need the <> since the engine will add it automatically. So at the conversation editor I will only see a /i, but when I insert it it becomes a </i>.


  • PJ156 et rjshae aiment ceci

#10
PJ156

PJ156
  • Members
  • 2 983 messages

I could only like your response once. That does not cover how much I am pleased you did this little bit of digging :)

 

PJ



#11
andysks

andysks
  • Members
  • 1 650 messages

PJ, I know, right? This saves me so much time, if I stop to think how many times I use these tokens. Something I forgot to add. All these columns of actions and categories in the 2da, can be left default ****, since the conversation doesn't need to check for anything, and pick one out of two when we use colours or bold letters. If you need to make more of boy/girl etc, then you need them, yes.