FR

Réalités Parallèles

Ergonomie et conception de jeu vidéo

Shadowrun level editor basic interactions - using the name of the player in dialogs and other cool stuff

  1. How text expansions work
  2. Different text expansions to use the player’s name, gender and race
    1. Calling the player
  3. Refering to a character’s race
  4. Refering to a character’s gender
    1. Example
  5. Using prefixes and modifiers
    1. Prefixes determine who characters are talking about
    2. Modifiers allow to adjust capitalisation
  6. Conclusion

In this tutorial, I’ll explain how to use text expansions. Text expansions are simple bits of code that make conversations much more natural. You can use it to call the player by their name or use the right gender and race when talking to them. It’s very simple to use and makes the dialogs a lot more immersive.

Text expansions are small bits of code you can add to your dialogs. In game, they will dynamically be replaced by the appropriate word. The first you’ll want to use it $+(l.name).

Whenever you write $+(l.name) in the dialog content of an npc, it will call the player by their name.

How text expansions work

Text expansions always have the same structure $+(prefix.token) and are composed of different parts:

Different text expansions to use the player’s name, gender and race

Calling the player

In Shadowrun, you can call the player by his handle using $(l.name). In Hong Kong, you can also use their first $(l.firstname) and last name $(l.lastname).

Example :

Don’t forget that $(l.firstname) $(l.lastname) is dead. You’re $(l.name) now.

If the player decided he’s called Brian Warner and his handle is Marylin Manson, then the actual dialog in game will display :

Don’t forget that Brian Warner is dead. You’re Marilyn Manson now.

Refering to a character’s race

Race can be used to call of comment using the text expansion $(l.race). You may also want to use the code plural for $(l.races).

Example :

Let’s say there’s a human only club, and the bouncer won’t let the player in. The bouncer could say :

This place is for humans only. Get out of my sight.

That gets the message clearly across, and there’s nothing wrong with that. However, calling the player by their race will make the bouncer feel more real. The player will also feel their character creation choices matter. It would overall feel more natural if the bouncer said :

You’re not welcome here, $(l.race). Get out of my sight.

If the player decided to be an ork, then the actual dialog in game will display :

You’re not welcome here, ork. Get out of my sight.

The bouncer could also have said :

Hey, you ! $(l.races) are not welcome here. Get out of my sight.

Which would read :

Hey you ! orks are not welcome here. Get out of my sight.

There’s two issues with this. First, orks should have a capital letter. This is a good time to use the optional modifier and add a + to the code so it displays Orks instead of orks. Another issue is that it wouldn’t work for all races : If the player decided to be an elf, it would say elfs instead of elves. This is what the plural is for. To get everything right in that example, you’d need to write

Hey, you ! $(l.races) are not welcome here. Get out of my sight.

Which would display :

Hey you ! Elves are not welcome here. Get out of my sight.

Refering to a character’s gender

In real life, people tend to use gender-dependent words when talking to or about someone more often than you realise. From honorific titles to mentioning that dude, it’s very hard not to refer to gender and in Shadowrun, trying to do so makes conversations very unnatural. Unless you’re trying to make a dialog with someone who awkwardly tries not to refer to the player because they try to hide the fact they have no clue about them, of course.

Lucky us, Shadowrun devs have thought of a variety of options to make dialogs feel more natural and allow different types of familiarity and personalities.

Example

Let’s say the player just saved Jayne and he’s making his report, introducing the player to their boss, Malc. He might say :

This $(l.guy) here saved my life, boss. $(l.him) aim’s pretty good too. $+(l.he) took out twelve gangers with that team of $(l.his).

If the player character is a woman, she’ll be introduced like this :

This lady here saved my life, boss. Her aim’s pretty good too. She took out twelve gangers with that team of hers.

In a more formal environment, a player might be introduced to the president.

Let me introduce you, $(l.sir).

$+(l.honorific) $(l.name) here saved my life today. This fine $(l.man) is looking for some work. I believe $+(l.he) would meet our standards.

Let me introduce you, madam. Ms Inara here saved my life today. This fine woman is looking for some work. I believe she would meet our standards.

Using prefixes and modifiers

Prefixes determine who characters are talking about

There are multiple prefixes you can use to refer to different things. Based on who’s talking in the conversation, it can apply to the player character or other characters.

l refers to the listener. (That’s a lowercase L, not a capital i, in case you’re wondering, I know I have.)

s refers to the speaker. You can use it for example to make a character say their own name.

You can also use scene. and story. as prefixes to refer to scene and global variables.

Modifiers allow to adjust capitalisation

$+(l.race) : a + will make the first letter of the word a capital : Ork

$++(l.race) : a ++ will make the whole word written in capitals : ORK

$-(l.race) : a will make the whole text lowercase : ork

Conclusion

As you can see, adding bits of code is no rocket science. It will instantly make your dialogs a lot better, more natural and make the characters feel more real.

Players enjoy it when they character choices are taken in account. The first time, they’ll feel happy about it, but they’re likely to have played through the game before any mod, so they’ll expect dialogs to use at least this level of quality !

Drop a name here and there, a race, and use the gender specific options when it makes sense just to get some variety. Players will love it.

Posted by on 2017-01-18. Last updated on 2024-06-07

Articles on similar topics

Shadowrun level editor - creating a new project

Game development tutorial, Shadowrun Dragonfall level editing, Shadowrun Hong Kong Level editor tutorials,

Shadowrun level editor - editing the path to the content packs

Game development tutorial, Shadowrun Dragonfall level editing, Shadowrun Hong Kong Level editor tutorials,

Shadowrun level editor - troubleshooting (mac)

Game development tutorial, Shadowrun Dragonfall level editing, Shadowrun Hong Kong Level editor tutorials,

Shadowrun level editor - creating a map

Game development tutorial, Shadowrun Dragonfall level editing, Shadowrun Hong Kong Level editor tutorials,

Shadowrun level editor - efficient wall placement and using height

Game development tutorial, Shadowrun Dragonfall level editing, Shadowrun Hong Kong Level editor tutorials,

Shadowrun level editor - picking up an item

Game development tutorial, Shadowrun Dragonfall level editing, Shadowrun Hong Kong Level editor tutorials,