This page describes how to set up the Dialogue System with Rog by Fred Vasquez. (Rog 1.51+ is required.)
Rog copyright © Fred Vasquez.
This integration package requires Rog 1.5+, which requires Unity 5.5+. The example scene is built for Rog 1.5 - 1.51.
The integration scripts also work with Rog 1.52 running in Unity 5.6, but the example actor prefabs will need to be updated to run in Rog 1.52. To update them, inspect the non-player prefabs (QuestBat, Skeldon, and SkeltonJohn) and delete the unused Actions on the Actor component. Then delete Actor_PlayerDS. Copy Rog's original Actor_Player to Actor_PlayerDS and add a Pause Rog On Conversation component.
Third Party Support/Rog Support
. This will unpack files into the folder Third Party Support/Rog
.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. Example/Resources/Actors/Actor_PlayerDS
prefab.DialogueActorScript
.Example/Resources/Actors/Actor_SkeltonJohn
prefab.DialogueActorScript
.Example/Resources/Actors/Actor_Skeldon
prefab.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)
RogGetFaction( actorName:string )
Description: (string) Returns an actor's faction:
Example: RogGetFaction("Skeldon")
RogReplaceActor( actorName:string, prefabName:string )
Description: Description: Replaces all actors matching the specified name with a different prefab. Actually changing an actor's faction involves changing its AI behaviour and map object script(s), which can get quite messy. It's much cleaner to set up two different prefabs, one for each faction type, and use this function to swap one prefab instance for the other.
Example: RogReplaceActor("Skeldon", "Actor_Bat")
RogReplaceSprite( actorName:string, spriteName:string )
Description: Replaces the sprite of all actors matching the specified name. The sprite must be located in a Resources folder. If it's in a subfolder, you can specify the subfolder with the spriteName (e.g., "Monsters/Green Lizard").
Example: RogReplaceSprite("Skeldon", "Golden Skeleton")
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?