This page describes how to set up the Dialogue System with Top-Down RPG Starter Kit. (Top-Down RPG Starter Kit is required.)
Top-Down RPG Starter Kit copyright © Dreamdev Studios.
The Dialogue System's Top-Down RPG Starter Kit Support package adds these features:
NOTE: While the support scripts are compatible with Unity 4.6.5+, the example prefabs and scenes were built in Unity 5.5.0.
Follow these steps to set up the Dialogue System with Top-Down RPG Starter Kit.
Assets / Dialogue System / Third Party Support / Topdown Kit Support
. This will unpack files into the folder Third Party Support/Topdown Kit Support
.Assets / Topdown Kit / Script / SaveData / CharacterData.cs
.PixelCrushers.DialogueSystem.TopdownKitSupport.DialogueSystemSaveData.SaveData();
PixelCrushers.DialogueSystem.TopdownKitSupport.DialogueSystemSaveData.LoadData();
To run the example, open your Build Settings and replace the Dreamdev Village scene with the special version in Assets / Dialogue System / Third Party Support / Topdown Kit Support / Example
.
In the example, you can talk to a Dialogue System quest giver to get a quest.
To set up an NPC to play a Dialogue System conversation, add these components:
In the example scene, examine the GameObject "Dialogue System NPC" for an example.
To set up a quest target for kill quests or collection quests, select the GameObject or prefab. Then add an Increment On Destroy component. Configure it to increment your quest variable.
Examine the prefab "BabyWolf DS" for an example.
The special Dialogue Manager prefab adds Lua functions that you can use in conversations and trigger conditions.
Description: Gets the value of one of the attributes defined in PlayerStatus.cs, even ones that you've manually added to the Attribute class. The built-in attributes are:
Attribute | Description |
---|---|
lv | Level |
hp | Hit points |
mp | Mana points |
atk | Attack |
def | Defense |
spd | Speed |
hit | To-hit value |
criticalRate | Critical hit value |
atkSpd | Attack speed |
atkRange | Attack range |
movespd | Move speed |
exp | Experience points |
The attribute names must match exactly, including capitalization.
Example: To check if a player is over level 5:
Description: Gives experience points (XP) to the player.
Example: To give 150 XP:
Description: Gives items or money to the player. Specify the item ID, or 4001 for money.
Example: To give 50 gold: