This page describes how to set up the Dialogue System with Deftly by Cleverous. (Deftly is required.)
Deftly copyright © Cleverous.
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.
GetLevel( subject:string )
Description: Returns a subject's level. If the subject string is blank, use the current conversation's actor; if no conversation is active, use the player.
Example: GetLevel("")
GetXp( subject:string )
Description: Returns a subject's XP. If the subject string is blank, use the current conversation's actor; if no conversation is active, use the player.
Example: GetXp("")
GiveXp( subject:string, amount:number )
Description: Gives XP to a subject. If the subject string is blank, use the current conversation's actor; if no conversation is active, use the player.
Example: GiveXp("", 50)
GetHealth( subject:string )
Description: Returns a subject's health. If the subject string is blank, use the current conversation's actor; if no conversation is active, use the player.
Example: GetHealth("")
AddHealth( subject:string, amount:number )
Description: Adds heatlh to a subject. If the subject string is blank, use the current conversation's actor; if no conversation is active, use the player.
Example: AddHealth("", 50)
RemoveHealth( subject:string, amount:number )
Description: Removes health from a subject. If the subject string is blank, use the current conversation's actor; if no conversation is active, use the player.
Example: RemoveHealth("", 50)
GetArmor( subject:string )
Description: Returns a subject's armor. If the subject string is blank, use the current conversation's actor; if no conversation is active, use the player.
Example: GetArmor("")
AddArmor( subject:string, amount:number )
Description: Adds heatlh to a subject. If the subject string is blank, use the current conversation's actor; if no conversation is active, use the player.
Example: AddArmor("", 50)
RemoveArmor( subject:string, amount:number )
Description: Removes armor from a subject. If the subject string is blank, use the current conversation's actor; if no conversation is active, use the player.
Example: RemoveArmor("", 50)
GetStrength( subject:string )
Description: Returns a subject's strength. If the subject string is blank, use the current conversation's actor; if no conversation is active, use the player.
Example: GetStrength("")
SetStrength( subject:string, amount:number )
Description: Sets a subject's strength. If the subject string is blank, use the current conversation's actor; if no conversation is active, use the player.
Example: SetStrength("", 10)
GetAgility( subject:string )
Description: Returns a subject's agility. If the subject string is blank, use the current conversation's actor; if no conversation is active, use the player.
Example: GetAgility("")
SetAgility( subject:string, amount:number )
Description: Sets a subject's agility. If the subject string is blank, use the current conversation's actor; if no conversation is active, use the player.
Example: SetAgility("", 10)
GetDexterity( subject:string )
Description: Returns a subject's dexterity. If the subject string is blank, use the current conversation's actor; if no conversation is active, use the player.
Example: GetDexterity("")
SetDexterity( subject:string, amount:number )
Description: Sets a subject's dexterity. If the subject string is blank, use the current conversation's actor; if no conversation is active, use the player.
Example: SetDexterity("", 10)
GetEndurance( subject:string )
Description: Returns a subject's endurance. If the subject string is blank, use the current conversation's actor; if no conversation is active, use the player.
Example: GetEndurance("")
SetEndurance( subject:string, amount:number )
Description: Sets a subject's endurance. If the subject string is blank, use the current conversation's actor; if no conversation is active, use the player.
Example: SetEndurance("", 10)
GetKills( subject:string )
Description: Returns a subject's kill count. If the subject string is blank, use the current conversation's actor; if no conversation is active, use the player.
Example: GetKills("")
GetDeaths( subject:string )
Description: Returns how many times a subject has died. If the subject string is blank, use the current conversation's actor; if no conversation is active, use the player.
Example: GetDeaths("")
GetCoin( subject:string )
Description: Returns a subject's coin amount. If the subject string is blank, use the current conversation's actor; if no conversation is active, use the player.
Example: GetCoin("")
AddCoin( subject:string, amount:number )
Description: Gives coin to a subject. If the subject string is blank, use the current conversation's actor; if no conversation is active, use the player.
Example: AddCoin("", 10)
RemoveCoin( subject:string, amount:number )
Description: Removes coin from a subject. If the subject string is blank, use the current conversation's actor; if no conversation is active, use the player.
Example: RemoveCoin("", 10)
GetScore( subject:string )
Description: Returns a subject's score. If the subject string is blank, use the current conversation's actor; if no conversation is active, use the player.
Example: GetScore("")
AddScore( subject:string, amount:number )
Description: Adds to a subject's score. If the subject string is blank, use the current conversation's actor; if no conversation is active, use the player.
Example: AddScore("", 50)
GetGodMode( subject:string )
Description: Returns a subject's God Mode setting. If the subject string is blank, use the current conversation's actor; if no conversation is active, use the player.
Example: GetGodMode("")
SetGodMode( subject:string, value:Boolean )
Description: Sets a subject's God Mode setting. If the subject string is blank, use the current conversation's actor; if no conversation is active, use the player.
Example: SetGodMode("", true)
GetUnlimitedMags( subject:string )
Description: Returns a subject's Unlimited Mags setting. If the subject string is blank, use the current conversation's actor; if no conversation is active, use the player.
Example: GetUnlimitedMags("")
SetUnlimitedMags( subject:string, value:Boolean )
Description: Sets a subject's Unlimited Mags setting. If the subject string is blank, use the current conversation's actor; if no conversation is active, use the player.
Example: SetUnlimitedMags("", true)
HasWeapon( subject:string, weapon:string )
Description: Returns true if the subject has a weapon whose Title (not GameObject name) matches the specified name. If the subject string is blank, use the current conversation's actor; if no conversation is active, use the player.
Example: HasWeapon("", "Railgun")
AddWeapon( subject:string, weapon:string )
Description: Gives the subject a weapon whose Title (not GameObject name) matches the specified name. The weapon must be listed in the Deftly Lua Function component's Weapon Database list. If the subject string is blank, use the current conversation's actor; if no conversation is active, use the player.
Example: GiveWeapon("", "Melody Cannon")