PixelCrushers.DialogueSystem.RPGKit.RPGKitBridge Class Reference

This component provides a bridge between RPG Kit and the Dialogue System's Lua environment. More...

Inheritance diagram for PixelCrushers.DialogueSystem.RPGKit.RPGKitBridge:
Collaboration diagram for PixelCrushers.DialogueSystem.RPGKit.RPGKitBridge:

Public Member Functions

virtual void Awake ()
 
virtual void Start ()
 
void OnConversationStart (Transform actor)
 When a conversation starts, freeze the player and sync to Lua. More...
 
void OnConversationEnd (Transform actor)
 When a conversation ends, unfreeze the player and sync to RPG Kit. More...
 
void UpdateTracker ()
 

Static Public Member Functions

static void SetPlayerControl (bool value)
 Sets player control on or off. More...
 
static void SaveDialogueSystemData ()
 Saves the Dialogue System data. More...
 
static void DeleteDialogueSystemData (string characterName)
 Deletes the Dialogue System data associated with a specific character. More...
 
static void SyncToLua ()
 Syncs RPG Kit player name and class to Lua. More...
 
static void SyncFromLua ()
 Syncs from Lua to RPG Kit. More...
 
static GameObject GetPlayer ()
 
static string GetPlayerName ()
 
static string GetPlayerGender ()
 
static string GetPlayerClass ()
 
static double GetPlayerLevel ()
 
static double GetPlayerStatus (string statusName)
 
static double GetEntityStatus (string gameObjectName, string statusName)
 
static double GetGameObjectStatus (GameObject go, string statusName)
 
static void ModifyPlayerStatus (string statusName, double amount)
 
static void ModifyEntityStatus (string gameObjectName, string statusName, double amount)
 
static void ModifyGameObjectStatus (GameObject go, string statusName, double amount)
 
static Unitycoding.StatusSystem.Status FindStatus (GameObject go, string statusName)
 
static bool ItemContainerHasItem (Unitycoding.ItemSystem.ItemContainer container, string itemName, double amount)
 
static void ItemContainerAddItem (Unitycoding.ItemSystem.ItemContainer container, string itemName, double amount)
 
static void ItemContainerRemoveItem (Unitycoding.ItemSystem.ItemContainer container, string itemName, double amount)
 
static bool PlayerHasItem (string itemName, double amount)
 
static void PlayerAddItem (string itemName, double amount)
 
static void PlayerRemoveItem (string itemName, double amount)
 
static bool EntityHasItem (string gameObjectName, string itemName, double amount)
 
static void EntityAddItem (string gameObjectName, string itemName, double amount)
 
static void EntityRemoveItem (string gameObjectName, string itemName, double amount)
 
static Unitycoding.ItemSystem.Item FindItem (string itemName)
 
static string FindItemId (string itemName)
 
static void OpenShop (string gameObjectName)
 
static void SetOverheadIcon (string gameObjectName, string iconName)
 

Public Attributes

string actorName = "Player"
 The name of the player actor in the dialogue database. More...
 
bool freezeInConversations = true
 If true, freeze player controls during conversations. More...
 
bool syncLuaInConversations = true
 If true, RPG Kit data is synchronized with Lua. More...
 
string saveDataKey = "DialogueSystemSaveData"
 The PlayerPrefs key to use for Dialogue System save data. More...
 
string playerInventoryContainerName = "Inventory"
 

Properties

static RPGKitBridge Instance [get]
 
string CharacterSaveDataKey [get]
 

Detailed Description

This component provides a bridge between RPG Kit and the Dialogue System's Lua environment.

It syncs the player name, class, attributes, and equipment count, and also freezes player controls during conversations. Add the RPG Kit Bridge component to the Dialogue Manager.

Member Function Documentation

◆ Awake()

virtual void PixelCrushers.DialogueSystem.RPGKit.RPGKitBridge.Awake ( )
virtual

◆ DeleteDialogueSystemData()

static void PixelCrushers.DialogueSystem.RPGKit.RPGKitBridge.DeleteDialogueSystemData ( string  characterName)
static

Deletes the Dialogue System data associated with a specific character.

Parameters
characterNameCharacter name.

◆ EntityAddItem()

static void PixelCrushers.DialogueSystem.RPGKit.RPGKitBridge.EntityAddItem ( string  gameObjectName,
string  itemName,
double  amount 
)
static

◆ EntityHasItem()

static bool PixelCrushers.DialogueSystem.RPGKit.RPGKitBridge.EntityHasItem ( string  gameObjectName,
string  itemName,
double  amount 
)
static

◆ EntityRemoveItem()

static void PixelCrushers.DialogueSystem.RPGKit.RPGKitBridge.EntityRemoveItem ( string  gameObjectName,
string  itemName,
double  amount 
)
static

◆ FindItem()

static Unitycoding.ItemSystem.Item PixelCrushers.DialogueSystem.RPGKit.RPGKitBridge.FindItem ( string  itemName)
static

◆ FindItemId()

static string PixelCrushers.DialogueSystem.RPGKit.RPGKitBridge.FindItemId ( string  itemName)
static

◆ FindStatus()

static Unitycoding.StatusSystem.Status PixelCrushers.DialogueSystem.RPGKit.RPGKitBridge.FindStatus ( GameObject  go,
string  statusName 
)
static

◆ GetEntityStatus()

static double PixelCrushers.DialogueSystem.RPGKit.RPGKitBridge.GetEntityStatus ( string  gameObjectName,
string  statusName 
)
static

◆ GetGameObjectStatus()

static double PixelCrushers.DialogueSystem.RPGKit.RPGKitBridge.GetGameObjectStatus ( GameObject  go,
string  statusName 
)
static

◆ GetPlayer()

static GameObject PixelCrushers.DialogueSystem.RPGKit.RPGKitBridge.GetPlayer ( )
static

◆ GetPlayerClass()

static string PixelCrushers.DialogueSystem.RPGKit.RPGKitBridge.GetPlayerClass ( )
static

◆ GetPlayerGender()

static string PixelCrushers.DialogueSystem.RPGKit.RPGKitBridge.GetPlayerGender ( )
static

◆ GetPlayerLevel()

static double PixelCrushers.DialogueSystem.RPGKit.RPGKitBridge.GetPlayerLevel ( )
static

◆ GetPlayerName()

static string PixelCrushers.DialogueSystem.RPGKit.RPGKitBridge.GetPlayerName ( )
static

◆ GetPlayerStatus()

static double PixelCrushers.DialogueSystem.RPGKit.RPGKitBridge.GetPlayerStatus ( string  statusName)
static

◆ ItemContainerAddItem()

static void PixelCrushers.DialogueSystem.RPGKit.RPGKitBridge.ItemContainerAddItem ( Unitycoding.ItemSystem.ItemContainer  container,
string  itemName,
double  amount 
)
static

◆ ItemContainerHasItem()

static bool PixelCrushers.DialogueSystem.RPGKit.RPGKitBridge.ItemContainerHasItem ( Unitycoding.ItemSystem.ItemContainer  container,
string  itemName,
double  amount 
)
static

◆ ItemContainerRemoveItem()

static void PixelCrushers.DialogueSystem.RPGKit.RPGKitBridge.ItemContainerRemoveItem ( Unitycoding.ItemSystem.ItemContainer  container,
string  itemName,
double  amount 
)
static

◆ ModifyEntityStatus()

static void PixelCrushers.DialogueSystem.RPGKit.RPGKitBridge.ModifyEntityStatus ( string  gameObjectName,
string  statusName,
double  amount 
)
static

◆ ModifyGameObjectStatus()

static void PixelCrushers.DialogueSystem.RPGKit.RPGKitBridge.ModifyGameObjectStatus ( GameObject  go,
string  statusName,
double  amount 
)
static

◆ ModifyPlayerStatus()

static void PixelCrushers.DialogueSystem.RPGKit.RPGKitBridge.ModifyPlayerStatus ( string  statusName,
double  amount 
)
static

◆ OnConversationEnd()

void PixelCrushers.DialogueSystem.RPGKit.RPGKitBridge.OnConversationEnd ( Transform  actor)

When a conversation ends, unfreeze the player and sync to RPG Kit.

Parameters
actorActor.

◆ OnConversationStart()

void PixelCrushers.DialogueSystem.RPGKit.RPGKitBridge.OnConversationStart ( Transform  actor)

When a conversation starts, freeze the player and sync to Lua.

Parameters
actorActor.

◆ OpenShop()

static void PixelCrushers.DialogueSystem.RPGKit.RPGKitBridge.OpenShop ( string  gameObjectName)
static

◆ PlayerAddItem()

static void PixelCrushers.DialogueSystem.RPGKit.RPGKitBridge.PlayerAddItem ( string  itemName,
double  amount 
)
static

◆ PlayerHasItem()

static bool PixelCrushers.DialogueSystem.RPGKit.RPGKitBridge.PlayerHasItem ( string  itemName,
double  amount 
)
static

◆ PlayerRemoveItem()

static void PixelCrushers.DialogueSystem.RPGKit.RPGKitBridge.PlayerRemoveItem ( string  itemName,
double  amount 
)
static

◆ SaveDialogueSystemData()

static void PixelCrushers.DialogueSystem.RPGKit.RPGKitBridge.SaveDialogueSystemData ( )
static

Saves the Dialogue System data.

Currently saves to PlayerPrefs.

◆ SetOverheadIcon()

static void PixelCrushers.DialogueSystem.RPGKit.RPGKitBridge.SetOverheadIcon ( string  gameObjectName,
string  iconName 
)
static

◆ SetPlayerControl()

static void PixelCrushers.DialogueSystem.RPGKit.RPGKitBridge.SetPlayerControl ( bool  value)
static

Sets player control on or off.

This method only looks for ThirdPersonController and ThirdPersonCamera. If you use other scripts, you should handle them elsewhere.

Parameters
valueIf set to true, enable control.

◆ Start()

virtual void PixelCrushers.DialogueSystem.RPGKit.RPGKitBridge.Start ( )
virtual

◆ SyncFromLua()

static void PixelCrushers.DialogueSystem.RPGKit.RPGKitBridge.SyncFromLua ( )
static

Syncs from Lua to RPG Kit.

Does nothing currently.

◆ SyncToLua()

static void PixelCrushers.DialogueSystem.RPGKit.RPGKitBridge.SyncToLua ( )
static

Syncs RPG Kit player name and class to Lua.

◆ UpdateTracker()

void PixelCrushers.DialogueSystem.RPGKit.RPGKitBridge.UpdateTracker ( )

Member Data Documentation

◆ actorName

string PixelCrushers.DialogueSystem.RPGKit.RPGKitBridge.actorName = "Player"

The name of the player actor in the dialogue database.

◆ freezeInConversations

bool PixelCrushers.DialogueSystem.RPGKit.RPGKitBridge.freezeInConversations = true

If true, freeze player controls during conversations.

◆ playerInventoryContainerName

string PixelCrushers.DialogueSystem.RPGKit.RPGKitBridge.playerInventoryContainerName = "Inventory"

◆ saveDataKey

string PixelCrushers.DialogueSystem.RPGKit.RPGKitBridge.saveDataKey = "DialogueSystemSaveData"

The PlayerPrefs key to use for Dialogue System save data.

◆ syncLuaInConversations

bool PixelCrushers.DialogueSystem.RPGKit.RPGKitBridge.syncLuaInConversations = true

If true, RPG Kit data is synchronized with Lua.

Property Documentation

◆ CharacterSaveDataKey

string PixelCrushers.DialogueSystem.RPGKit.RPGKitBridge.CharacterSaveDataKey
get

◆ Instance

RPGKitBridge PixelCrushers.DialogueSystem.RPGKit.RPGKitBridge.Instance
staticget

The documentation for this class was generated from the following file: