Author Topic: Reactive Dialogues

HobGoblin42

  • Administrator
  • Wildland Warrior
  • 5
  • Joined
    Aug 03, 2016
    Posts
    318
    Location
    Munich
#1616 June 04, 2019, Tuesday, 03:31 pm

In the weeks since the last update, we've been hard at work designing quests and locations. And to make sure that our quests are as good as they can be and offer the highest possible degree of reactivity towards the player character, we've also improved our dialogue system and added a handful of new features to it.


In this update, we've going to show you the new features of the dialogue system, as well as screenshots of some beautiful new locations we've added to the world of Argea. The section of the update that shows off the dialogue tool will contain minor spoilers for early content in the game, as well as a side quest later in the game. If you wish to avoid such spoilers, please take note of the warnings and skip ahead.


In an RPG, it is important that the game recognizes the player's character build. And since Realms Beyond allows the player to create (or to recruit) a party of six characters, a diverse party should mean that NPCs react differently to each of them. Different characters should also be able to react differently to NPC statements. While most characters might agree with the assessment that orcs are savage barbarians, a half-orc character might object to such a statement.


Dialogue Half-OrcClick to enlarge

Dialogue options can depend on many things: the player character's sex, race, class, ability scores, skills, equipment, current status effects, faction reputation, and more. If you want to find a peaceful solution with the orcs, letting your half-orc do the talking might be a good idea. Similarly, in a village where everyone is prejudiced towards elves because of an old grudge that has never been forgotten, an elven or half-elven character will have a harder time winning the sympathies of the populace.


Warning: minor spoilers for early content ahead!
To skip any spoiler, please jump to the screenshot section at the end.




In the following example, the player is attempting to escape from prison and spotted by a group of card-playing guards. In the ensuing dialogue, the player can choose to surrender and allow them to drag him into the dungeon cells, ready his weapon and fight, or convince them to play a game of cards with his freedom as the wager.


Dialogue Guards Click to enlarge

Each yellow dialogue option is associated with a certain precondition. If the player has recruited a certain companion into the party, he or she can offer the companion's knowledge of secret hallways in the fortress to the guards. If the player is a wizard, he can offer to cast a spell of their choosing for them. If he's a priest, he can offer them a blessing. And if the player's character is female and has sufficiently high charisma, she can flirt with the guards.


You may also notice that some of the dialogue options, and the dialogue spoken by the NPCs, contain some conditions in themselves. Things like the player's gender, race and class will be referenced by NPCs when appropriate, and rather than writing the entire sentence anew, the scripting capabilities of Realms Beyond allow us to just set a condition around certain words of the sentence.


Dialogue conditions
A simple greeting text with conditional parts


We shall look at a side quest the player will encounter later in the game to see how these conditions can be used in practice.


Warning: spoilers for a mid-game side quest ahead!


During your travels through Argea, you will come upon several wizards living in solitary towers, dedicated to their research. One of these wizards, a man named Obalor, tells you about his rivalry with a fellow sorceress named Jeralis. Many years ago, she lost her eyes in an accident, and went on to craft a pair of enchanted emeralds to return her sight. Wizards all across the realm have wondered how she fashioned that enchantment, and Obalor is determined to find it out. He hires the player party to take Jeralis' emerald eyes and bring them to him, so he can examine the enchantment and learn his rival's technique.


If the player accepts the quest, he must travel to Jeralis' tower and get his hands on her emerald eyes. One way to do this is to engage her in dialogue and convince her that he himself is an arcane researcher and interested in studying the enchantment. Jeralis isn't opposed to borrowing her eyes to someone interested in the workings of their enchantment, but the player's character doesn't quite strike her as a magical researcher.


This is where more complex conditions come in. If the player's character is a highly intelligent wizard, he (or she) can easily convince her of being a researcher himself. If the player's character is a wizard, but has only average rather than exceptional intelligence for his class, he'll have to bluff a little to make her believe him. And if the player's character is not a wizard, he'll have to bluff a lot.


Click to enlarge

As you can see, rather than adding several different conditions to the dialogue choice (our editor allows for up to two conditions to be attached to a dialogue choice at once, so adding three or more individual conditions would be logistically impossible, anyway), we have created a new local condition simply named MAG_RESEARCH, which checks whether the player's character can successfully convince Jeralis of being a researcher of the arcane or not. The custom condition looks like this:



As you can see from these lines of code, the character will succeed the check if he has a bluff skill of 6; if he is a wizard, he will succeed with a bluff skill of 3; if he is a wizard with INT greater than 18, he will succeed automatically.

Our scripting system allows us to make dialogue checks as complex as we need them to be for any given quest situation. We can check the player character's gender, race and class. We can check the player character's attributes and skills. We can check the player's equipment, and whether she's wearing something on an equipment slot at all: a guard might demand your character take her helmet off before she enters the throne room, as it would be rude to enter the royal chambers with a covered head. It is as simple as checking for the condition of BAREHEADED being false.


We can even add dialogue choices based on temporary conditions the player is effected by. When Obalor offers the player the quest to fetch Jeralis' eyes for him, maybe an insane and hungry character might react like this?



This powerful scripting system allows us to recognize any state a player character may be in, and have NPCs acknowledge everything that is appropriate for them to comment on (like a dwarf reacting favorably toward a fellow dwarf and skeptically toward an elf, a priestess mentioning you should take your boots off before you enter the inner sanctum, a merchant greeting you as a colleague because your character is a member of the merchants' guild, etc). It also allows for creative quest solutions. Let's imagine a magic mirror that guards a magically locked door. You can interact with it, but looking into it doesn't do anything. In another chamber of the dungeon you find out that the door only opens for those who stare into the mirror with blinded eyes – you can cast a spell of blinding upon your character, interact with the mirror while the BLIND condition is true, and the door will open!


As for the quest to get Jeralis' emerald eyes there are approaches other than asking her and bluffing, such as intimidation, combat and stealth, but how exactly those can be pulled off is up to you to find out when you play the game! Our quests generally offer at least two possible solutions, usually more. Every player will have a different party and follow a different playstyle, so we try to add multiple solutions and decisions to each quest to offer a large amount of choice to the player – and, of course, a high degree of replayability.




Quest spoilers over. You may continue reading from here if you wanted to avoid them.


Finally, we're going to show you some screenshots of a cozy village on the remote island in the Northern sea. Enjoy the scenes of tranquil village life!


Northern Island - Town
Northern Island - Physician The local physician's house. He cares for the sick and also serves as the local coroner. His cat is doing its best at keeping the village rat-free.

Northern Island - Tavern The chopping block, where prisoners condemned to death meet their end. You can sit down in the  tavern next door and watch the execution through the windows, comfortably seated with a mug of ale in your hands. The pinnacle of entertainment in a sleepy little village like this.

Northern Island - Passage

Northern Island - Prison Fortress He's not drinking on duty! He's merely sampling the ale to make sure it is of high enough quality. A diligent guard would never let his officers taste sub-par ale. He's just doing his duty. Besides, it's not like these prisoners need much guarding. They're locked behind bars, tight and secure, with no way to escape.

And that's it for today! We've given you a more thorough look into how our dialogue system works, along with a glimpse of one of the game's many side quests – and keep in mind, this is the very same dialogue tool you will be able to use to create new modules for Realms Beyond, so all the power of setting custom conditions for dialogue checks and writing quests with multiple solutions and outcomes will be in your hands!


Goto Blog Post

Claudius33

  • Town Guard
  • Marsh Goblin
  • 2
  • Joined
    Nov 16, 2018
    Posts
    13
#1617 June 04, 2019, Tuesday, 05:54 pm
Thanks for the update. Sounds promising. :D

From you first example I assume that it's up to the player to figure out that a half orc in the party may get a different answer, therefore should lead the conversation.

However from a modding point of view,  am I correct assuming that a script could scan the party composition, check for a half orc presence, thus providing the player with the half orc answer?
Last edited: June 04, 2019, Tuesday, 08:38 pm by Claudius33

HobGoblin42

  • Administrator
  • Wildland Warrior
  • 5
  • Joined
    Aug 03, 2016
    Posts
    318
    Location
    Munich
#1618 June 04, 2019, Tuesday, 06:16 pm
However from a modding point of view,  am I correct assuming that a script could scan the party composition, check for an half orc presence, thus providing the player with the half orc answer?

Yes, every condition comes as script, the related script for the condition HALF_ORC is quite simple:

Code
return _Player.isRace("Half-Orc");

By accessing the party object, you can also access every other member of the group:

Code
for (uint i=0; i<_Party.getNumberOfMembers(); ++i)
{
const CharacterRef@ MemberRef = _Party.getMemberByIndex(i);
if (MemberRef.isRace("Dwarf"))
return true;
}
return false;
Last edited: June 04, 2019, Tuesday, 06:18 pm by HobGoblin42

Archmage

  • Citizen
  • Marsh Goblin
  • 2
  • Joined
    Nov 16, 2018
    Posts
    13
#1619 June 04, 2019, Tuesday, 08:04 pm
Reactive dialogues. Very nice!

Claudius33

  • Town Guard
  • Marsh Goblin
  • 2
  • Joined
    Nov 16, 2018
    Posts
    13
#1620 June 04, 2019, Tuesday, 08:37 pm
Excellent!

Endarire

  • Town Guard
  • Gelatinous Cube
  • 3
  • Joined
    Jan 16, 2019
    Posts
    78
#1621 June 05, 2019, Wednesday, 03:12 am
Does this mean that all party members should max Diplomacy?

Messier-31

  • Town Guard
  • Marsh Goblin
  • 2
  • Joined
    Oct 17, 2018
    Posts
    19
    Location
    Łódź, Poland
#1622 June 05, 2019, Wednesday, 08:15 am
Great update!
One question tho: why would these guards wager with a prisoner?
"You have something of value, then we will beat you to a pulp lest you give it to us freely!"
Best regards!
It would be of small avail to talk of magic in the air...

HobGoblin42

  • Administrator
  • Wildland Warrior
  • 5
  • Joined
    Aug 03, 2016
    Posts
    318
    Location
    Munich
#1623 June 05, 2019, Wednesday, 02:22 pm
Does this mean that all party members should max Diplomacy?
No, but with some NPCs, you  should choose the one with the highest diplomacy/bluff/intimidate skill to speak (varies from NPC to NPC).

One question tho: why would these guards wager with a prisoner?
Those are kindly guards  :hug:

Braveheart

  • Member
  • Marsh Goblin
  • 2
  • Joined
    Jan 17, 2019
    Posts
    25
#1625 June 06, 2019, Thursday, 03:12 pm
Can an NPC or creature become hostile and attack us if we give them the wrong anwser or rub them the wrong way in a convesation? Or, if were missing a quest item and couldn't return it on time, the NPC decides to eliminate us? Especially if an NPC is an evil alignment?

HobGoblin42

  • Administrator
  • Wildland Warrior
  • 5
  • Joined
    Aug 03, 2016
    Posts
    318
    Location
    Munich
#1626 June 06, 2019, Thursday, 03:17 pm
Can an NPC or creature become hostile and attack us if we give them the wrong anwser or rub them the wrong way in a convesation? Or, if were missing a quest item and couldn't return it on time, the NPC decides to eliminate us? Especially if an NPC is an evil alignment?
Yes, of course. Since dialogues can access almost any element of the world via script, there are no limits. You can even load a map via script call out of the dialogue.

Claudius33

  • Town Guard
  • Marsh Goblin
  • 2
  • Joined
    Nov 16, 2018
    Posts
    13
#1632 June 12, 2019, Wednesday, 09:22 pm
NWN2 has an interesting feature regarding conversations. A link.
Coming back to the half orc example, the two player's final answers are the same whether the PC was a half orc or not. Looks like a copy/paste. With the NWN2 toolset you can have :

NPC (character is not half orc)
It was either ...
All right ...
Sorry ...

NPC (character is half  orc)
No offense ...
Link to All right
Link to Sorry ...
avoiding any copy/paste and related mistake.

As a Link could send anywhere in the conversation and be used from multiple different lines, it is quite a powerful feature.

Of course do not change your tool if you haven't planned or implemented such a feature yet.  Just a nice to have one  :|

rjshae

  • Town Guard
  • Gelatinous Cube
  • 3
  • Joined
    Jan 14, 2019
    Posts
    57
#1633 June 13, 2019, Thursday, 02:36 am
It's a bit of a trade-off since the NWN2 links can also add a lot of complication, making it more difficult to follow possible conversation paths in a sprawling dialogue tree.

Sapistas

  • Member
  • Marsh Goblin
  • 2
  • Joined
    Jun 26, 2019
    Posts
    21
    Location
    Athens, Greece
#1647 June 26, 2019, Wednesday, 07:01 pm
Hope I have some free time to design my own adventure once this great tool is out.

Now, the screenshots... The attention to detail on each one is really admirable! The aesthetics and style give me a cozy feel and take me back to my early to mid 90s adventuring days :) 
We really need more of those. It can't be hard, right? Post a few each week, huh? :)

S-man

  • Member
  • Beach Crab
  • 1
  • Joined
    Nov 04, 2019
    Posts
    2
#1984 Today at 05:28 am
Options for very low int and/or charisma? 

daveyd

  • Citizen
  • Gelatinous Cube
  • 3
  • Joined
    May 09, 2018
    Posts
    73
#1985 Today at 03:53 pm
Options for very low int and/or charisma?

It is quite a bit of fun to play around with low intelligence characters in the handful of CRPGs that had special "dumb" dialogue for them with options like "Me no like you!" Off the top of my head I can only think of Fallout, Arcanum, and NWN having this feature.   However, as amusing as it would be, something like that would require a a lot of extra work for Ceres writers to implement (especially since they're planning on eventually translating the game in German, French, Spanish, and Chinese! ).   And int. is not really a dump stat in 3.5 since it effects how many skill points you get and also access to certain fighting feats so this would probably be something that relatively few players would ever see.  Also if it's actually a hinderance, the player could just have a higher intelligence party member do the talking.

But having the occasional extremely rude or socially inept response available to low charisma characters could be a fun addition. 

Anyway, my guess is it would probably be too much work for them to implement in the main campaign but surely it is something mod builders could play around with.