Top-Down RPG Starter Kit Support

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.

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 Third Party Support ► Topdown Kit Support. This will unpack files into the folder Assets ► Pixel Crushers ► Dialogue System ► Third Party Support ► Topdown Kit Support.
  2. For each of your player prefabs:
    • Select the prefab.
    • Select menu item Component → Pixel Crushers → 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 ► Pixel Crushers ► 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:

<pre>GetPlayerStatus("lv") > 5</pre>

GiveXPToPlayer(amount)

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

Example: To give 150 XP:

<pre>GiveXPToPlayer(150)</pre>

GiveItemToPlayer(itemID, amount)

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

Example: To give 50 gold:

<pre>GiveItemToPlayer(4001,50)</pre>

<< Third Party Integration