We're busier than ever this month. While we couldn't significantly progress with our projects, I had a little time to practice UE4 Blueprint scripting, so I created a conversation system using the new String Tables in UE 4.16. It's still in progress, but here are some features:
- Each line of NPC dialogue can have up to four possible replies from the player. The conversation itself is saved into structs that feed off String Tables.
- There are stats. Player replies can add to or subtract from a stat, and replies can also be tied to a stat requirement; for example, if your knowledge is under 5, a reply will be grayed out. I went with one stat this time, and it's "Personal", which is code name for how many times the player talked with an NPC and wasn't a complete ass. More stats can be added as needed.
- I based the camera on Legend of Zelda: Breath of the Wild - the camera can be rotated during conversation, and is locked to the middle point between the player character and the NPC. There's a smooth interpolation when a dialogue begins and ends.
- Greetings above the head - we gave each NPC a random personality out of 4 possible types: Normal, Wise, Upbeat and Lazy. Influenced by Animal Crossing.
The personality type determines the greeting that appears above the NPC's head when walking close to them. We plan to include a system that lets NPCs insert random, personality-specific words into their sentences, or change adjectives to their own most preferred word.
I still need to work on making this a more open system; for example, right now it's not possible to converse with more than one person at a time. I also need to figure out a way to tie the conversations to certain situations that come up in the game. Another feature I'd like to add is an optional animation for each line, for each character involved in the conversation.
If this becomes stable, we plan to use it in some of our projects, when it's appropriate to add such a system.