EDIT: This post was copied and pasted from previous forum, it was originally created by tony@pixelcrushers.com.
A Rog user asked for an integration package for the Dialogue System for Unity. It will be in the next release of the Dialogue System. If anyone would like an advance copy, you can download it from the Dialogue System Extras page.
If anyone has questions, feature requests, or bug reports, please let me know on the Pixel Crushers forum, Unity forum, or email me at tony@pixelcrushers.com. (If you reply here on Fred Vasquez's forum, please email me so I know to check it.)
Since the Rog integration isn't in the current Dialogue System's documentation, I'll paste the Rog integration documentation here:
Rog Setup
Import the package Third Party Support/Rog Support. This will unpack files into the folder Third Party Support/Rog. Then follow the steps below to set up your scene.
Play the example scene in the Example subfolder to familiarize yourself with the integration. The skeleton to the player's right demonstrates barks. The skeleton to the player's left offers a quest through a conversation.
To your own scene, add the Dialogue Manager prefab located in the Rog Support/Prefabs folder. This prefab is set up to work with Rog. You can customize its appearance. The quest log window is bound to the L key; to change this, inspect the Rog Quest Log Window's Pause Rog On Quest Log Window script.
Add the Pause Rog On Conversation script to your player prefab. For an example, see the Example/Resources/Actors/Actor_PlayerDS prefab.
To set up an actor to bark when the player steps next to it:
Set the actor's Map Object > Script Object to DialogueActorScript.
Add a Bark Trigger script. Set the trigger to OnUse and select your bark conversation.
Optional: Add an Override Actor Name script if you want to show the actor's name in the bark UI but don't want to use its GameObject name.
For an example, see the Example/Resources/Actors/Actor_SkeltonJohn prefab.
To set up an actor to play a conversation when the player steps next to it:
Set the actor's Map Object > Script Object to DialogueActorScript.
Add a Conversation Trigger script. Set the trigger to OnUse and select your conversation.
Optional: Add an Override Actor Name script if you want to show the actor's name in the but don't want to use its GameObject name.
For an example, see the Example/Resources/Actors/Actor_Skeldon prefab.
To set up a kill target, add an Increment On Destroy script to the actor. Assuming you've already created a variable to track kills in your dialogue database, specify the variable. The example scene uses a variable "batsKilled".
To set up a pickup target, add an Increment On Destroy script to the actor, and set Increment On to Disable. Assuming you've already created a variable to track the amount picked up in your dialogue database, specify the variable. The example uses a variable "bonesFound".
Rog Lua Functions
You can use the Lua functions below in your dialogue entry Scripts and Conditions (or anywhere you use Lua). Note the exact number and type of parameters required for each function.
RogMessage( message:string )
Description: Prints a message to Rog's message box.
Example: RogMessage("Quest Completed: Sheldon's Bones")
RogHasItem( itemName:string )
Returns: (Boolean) True if the player has the named item.
Example: RogHasItem("Bone")
RogTakeItem( itemName:string )
Description: Removes an item from the player's inventory.
Example: RogTakeItem("Bone")
RogGiveItem( prefabName:string )
Description: Gives the player an item specified by its prefab name.
Example: RogGiveItem("Health Potion")
RogHasItems( itemName:string, amount:number )
Returns: (Boolean) True if the player has a minimum amount of the named item.
Example: RogHasItems("Bone", 3)
RogTakeItems( itemName:string, amount:number )
Description: Removes amount items from the player's inventory.
Example: RogTakeItems("Bone", 3)
RogGiveItems( prefabName:string, amount:number )
Description: Gives the player amount items specified by its prefab name.
Example: RogGiveItems("Health Potion", 2)
Saving and Loading
The Rog developer recommends using Easy Save with Rog.
Easy Save is also easy to use with the Dialogue System: How do I save and load using Moodkie's Easy Save 2?