Hey Everyone!
Current status: Good
I am back with another Dev Diary. Overall things are going well, the shift to FT has really increased my overal productivity and is quite enjoyable.
The focus this time was recreating + improving our ability to interact/ converse with actors using dialogue boxes, and it was quite a doozy. But the result, is something I am quite pleased with.
CONCEPT
I wanted to enable players to approach objects of interest and interact with them using the Interact Button. Originally this seemed to have been a pretty basic task, but as I delved deeper in began to increase in difficulty.
DESIGN
From a design perspective I organized the types of interactions into tiers of increasing complexity.
Tier 0 - Objects that when interacted with, immediately execute actions. Ex. Doors
Tier 1 - Objects that when interacted with, provide a brief amount of information. Ex. Signs or posters
Tier 2 - Same as above but, provide a length amount of informatin requiring multiple dialogue pages. Ex. Books or letters.
Tier 3 - Adds for the ability to ask questions and change actions based on player choice. Ex. Vending Machines.
T3 essentially allows for us to have conversations except for 1 last feature.
Tier 4 - For upon interactivity the ability to face the direction of the player, which we would only want for NPCs or living actors.
In a nut shell this is accomplished by passing information across 3 blueprints (4 if the dialogue uses questions)
To make all the interactions happen we use Blueprint interface, which I named Interaction BPI_Interact. In total 5 functions were made to across the 5 tiers of interactivity.
STEP 1 - ENABLE SIGNIFIER ON OVERLAP
The first step was to create a Signifier widget. Then set it as a 3D Widget and attach it to Vance. And then set it to only be visible inside proximity of an interactible actor.
The text on the signifier is set to a variable so we can define what it says based on the actor in question.
STEP 2 - LOCK CHARACTER FUNCTIONS
The second step is locking all character functions during the interactions. Essentially we are taking control away from Vance and shifting control over to the HUD/Dialogue box. Immediately we are brought to step 3.
STEP 3 - DIALOGUE LAUNCH
Here we set the text and instruct it to work to display in typewriter fashion, rather than all at once.
Additionally you can see that after each string of dialogue we check to see if it has been flagged as a question, and if so we launch the question widget. If not we use the Advance Dialogue function to 'click through' all of the dialogue.
STEP 4 - DIALOGUE END
Eventually the player will work their way through the dialogue and it will close and fire off the required functions.
SUMMARY
In conclusion the there is a ton of work that goes into interactions. At first I thought it would have been far simpler than combat, but it turned out to be just as daunting. To showcase the flow of instructions to make this work I have inserted a screen grab below of the Actor.
RESULT
And there we have it. I hope you guys enjoyed a look into the crafting of the dialogue system for Project Grand Vault