Top-Down RPG Starter Kit

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.


Top-Down RPG Starter Kit Support Features

The Dialogue System's Top-Down RPG Starter Kit Support package adds these features:

  • Use Dialogue System conversations, barks, and quests.
  • Pause the player during conversations.
  • Give the player money and items during conversations (e.g., quest rewards).
  • Add the Dialogue System quest tracker HUD and quest log window (hotkey 'L') to the GUI.
  • Include Dialogue System information in your saved games.

NOTE: While the support scripts are compatible with Unity 4.6.5+, the example prefabs and scenes were built in Unity 5.5.0.


Top-Down RPG Starter Kit Setup

Follow these steps to set up the Dialogue System with Top-Down RPG Starter Kit.

  1. Import the package Assets / Dialogue System / Third Party Support / Topdown Kit Support. This will unpack files into the folder Third Party Support/Topdown Kit Support.
  2. For each of your player prefabs:
    • Select the prefab.
    • Select menu item Component > Dialogue System > Third Party > Top-Down RPG Starter Kit > Tools > Setup Player Prefab.
  3. There is a special Dialogue Manager prefab in Third Party Support / Prefabs. Add this to your Character Creation scene. You can also add an instance to each of your location scenes for easy playtesting. Assign your dialogue database to each instance.
  4. Edit the file Assets / Topdown Kit / Script / SaveData / CharacterData.cs .

Example Scene

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.


How to Set Up NPCs

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.


How to Set Up Quest Targets

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.


Lua Functions

The special Dialogue Manager prefab adds Lua functions that you can use in conversations and trigger conditions.

GetPlayerStatus("attributeName")

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:

GetPlayerStatus("lv") > 5

GiveXPToPlayer(amount)

Description: Gives experience points (XP) to the player.

Example: To give 150 XP:

GiveXPToPlayer(150)

GiveItemToPlayer(itemID, amount)

Description: Gives items or money to the player. Specify the item ID, or 4001 for money.

Example: To give 50 gold:

GiveItemToPlayer(4001,50)

<< Third Party Support