Dynamically Changing Dialogue

Post » Mon Jul 20, 2015 2:56 pm

Hi everybody,

I was wondering if it is possible to have characters deliver dialogue responses to the player depending on actions s/he has made?

I'm trying to have a character give feedback to the player on the finer points in a quest. I'll give an example:

The player is asked by an argonian to get them a piece of bread, and is informed that a nearby orc has the piece of bread.

The player approaches the orc to do so and commences conversation through the dialogue line "Hey there, filthy orc".

The player returns to the argonian with the piece of bread. The argonian congratulates the player on using their charm to acquire the piece of bread, but in addition advises that in future it would be unwise to comment on the personal hygiene of orcs.

If the player had chosen a less abrupt way of capturing the orc's attention than "Hey there, filthy orc", the additional comment from the argonian might be omitted or a more enthusiastic congratulations might be given.

EDIT: In other words I'm looking for an accessible dialogue condition, values that can be easily set throughout a quest and then referenced in a concluding dialogue view.

If anyone has any suggestions as to how this might be implemented it would be immensely helpful :smile:

Much appreciated,

Allan

User avatar
kevin ball
 
Posts: 3399
Joined: Fri Jun 08, 2007 10:02 pm

Post » Mon Jul 20, 2015 6:37 pm

There are (at least) two ways of doing this:

1. Branch the stage you set the quest to; I.e. "Filthy orc" = quest stage 20, "Hello fine good gentlesire" = 21. Then detect what stage it is via condition.

2. Use a Global Variable. Make your own, set a default value of 0, then set that value to something other than 0 (Script fragment with "SetValue" used on the declared global variable property). Then check it's value in dialogue condition, I believe it's called "GetGlobalValue" or "GetValue"?

- AV

User avatar
Umpyre Records
 
Posts: 3436
Joined: Tue Nov 13, 2007 4:19 pm

Post » Mon Jul 20, 2015 2:04 pm

Thanks for the reply Alexander,

I'd like to provide feedback on more than one of the players actions at once, so I think the quest stage solution might be a bit tricky in this instance.

I've just had a quick look in the CK and it is there is a GetGlobalValue function, so I'll investigate how I might be able to use global variables.

I'm thinking at the moment it will just be global boolean flags that can be set to true if the player performs an action I want to give feedback for.

Cheers,

Allan

User avatar
Tiff Clark
 
Posts: 3297
Joined: Wed Aug 09, 2006 2:23 am

Post » Mon Jul 20, 2015 7:30 pm

Yup, just set them up as non-constant short value globals. The game already has thousands of them so a few more shouldn't cause any issues. Just default them to 0, and set them to 1, 2, 3 etc. when the player makes their choice.

User avatar
Sakura Haruno
 
Posts: 3446
Joined: Sat Aug 26, 2006 7:23 pm

Post » Mon Jul 20, 2015 5:38 pm

You can also use Quest Properties with the quest script and properties marked as conditional, and then use GetVMQuestVariable.I recommend using a global though. I used one for a quest of mine where the global differed on how the PC appeared to react to certain situations. Worked quite well.
User avatar
sharon
 
Posts: 3449
Joined: Wed Nov 22, 2006 4:59 am


Return to V - Skyrim