Scene (dialog)



Interactive Dialogue


1. NPC, with whom we’re planning the dialogue, should have in voicetags (in entity templates) defined both - voicetag and appearance.
2. Let’s choose Arnolt game/npc/arnolt and spawn him on a level.
3. Create scene file in our folder in editor Create/Scenescript.
4. Open it - this will be our dialogue.
5. We have a couple of tabs here:
- scene script - here you write you dialogue. Add Section, dialogue options. Remember to start in input and end in output.
- starting conditions - here you put Voicetag of the player and people we’re going speak to
- actor definitions is a place where we set our actors (characters that take part in dialogue). We choose voicetags and particular templates of the speakers. Additionaly, we add individual tags (Player’s character doesn’t have to be tagged)
- dialogueset settings - here we assign scene waypoint where we plan to have the dialogue
6. After writing a dialogue, set scene waypoint on the level and tag it, e.g. dialoguearnolt.
7. Go back to the dialogueset settings. In position entity give tag of the scene waypoint that we’ve previously created. Choose the slot number from 1 to 8. This defines which way the character will be facing.
8. After creating your scene file, open your quest. Add scenes-interaction dialogue and include your file with dialogue by pressing green arrow in properties of this block. Remember about marking the scene in asset browser. In ActorTags write the tag that you used for the NPC (in this case arnolt and save everything.
9. If everything is completed - we should be able to talk with NPC.
10. In order for the dialogue to be repeated we need to loop it. To do that, in the quest, put pause block with CQuestRealtimeDelayCondition (selected from properties).
11. Connect output of the dialogue to pause’s in and drag the connection line from none to input of the dialogue.

Context Dialogue


Context dialogue is used to include statements that are available only after fulfilling a particular condition. In this case it will be killing monsters.

1. In the main dialogue, click on dialogue choice in which you plan to insert the dialogue.
2. List of properties will appear on the left pannel.
3. Set questChoice from false to true.
4. This is where the dialogue will appear.
5. Open new Scene file. Prepare it as a normal dialoue (define characters, voicetags, etc.)
6. Add section and rightclick in Scene Script tab.
7. Choose add element/Quest choice line.
8. Write the text that will be inserted into the place mentioned in 1. In this case: The monsters were killed. Write the rest of the dialogue.
9. Open the quest and paste the block with context dialogue (scenes/context dialogue)
10. In properties of Scene tab, link previously created context dialogue, in place of targetScene put dialogue, in which it should be pasted.
11. Before the block set the pause that will check a fact - about killing quest monsters.
12. When the fact is added and pause will allow the signal to go further, dialogue will be inserted.

Axii on dialogue and linking cutscenes


1. In the dialogue, previously created, insert script with GameplayOptionAxii (remember about clicking on the side of the script and choose option to update to new version)
2. In its properties we can set the level of difficulty and the target.
3. There are 2 outputs that go out of the block, depending upon success or failure.
4. It would be great to add the cutscene of sign casting.
5. In order to do that, right click in Scene Graph and select Add Cutscene.
6. Its properties should pop up. In point write tag Player and link cutscene with Axii being cast, e.g. characters/templates/interaction/dialog/dialog_axii.w2cutscene
7. In the cutscene, there are two ins and two outs so there is no problem with linking them with axii script.
8. From the cutscene send the signal to the next sections of the dialogue.


Adding facts in dialogue/mini quest


Let’s create mini quest - asking Arnolt about Witcher’s work and after that we’ll show monsters.

1. To previously created dialogue add section in which Geralt will ask about Witcher’s work.
2. Write a short dialogue. Add Dialogue Choice, e.g. Tell me more about the monsters.
3. Click Choice and in properties click green plus CFactsDBChoiceMemo. This way you create fact.
4. In choice window, that will appear below, write a name for this fact in FactID (e.g. monsters) and add Value 1.
5. Open the quest.
6. Add Pause with CQuestFactsDBCondition property.
7. In property add FactID which was the name previously used (monsters) and add Value 1.
8. Place the Pause in quest, linking it to Start. This way the signal will be waiting for the fact that will be acquired in the dialogue.
9. Create new group on the level - monsters.
10. Add new layer in the group, the same name - monsters. Add Encounter to this layer.
11. Add group to our partition and in its properties set option isVisibleonstart to false.
12. In editor add new block GameSystemControl hide layers.
13. In properties, in layers to show highlight previously created group.
14. Link this block with previously set up Pause. After adding the fact the Encounter will be activated.

Note: if you simply want to have a one-time choice, click on this choice's square and set singleUseChoice to True.