This page describes how to set up the Dialogue System with the ORK 3 Framework and how to use them together. (ORK 3 Framework is required.)
ORK Framework copyright © Gaming is Love.
Follow these steps to set up the Dialogue System with ORK Framework.
Add a Dialogue Manager to your main menu scene.
The MakinomEventSystem doesn't implement joystick or keyboard navigation. If you want to be able to navigate general Unity UI menus such as the Dialogue System's menus, there are settings to manage if Makinom adds an event system or not in ‘UI > UI System’ when the Unity UI system type is selected. You can either use Makinom’s default event system, not create one or spawn one using a prefab.
If you want to be able to navigate non-ORK menus with a joystick or keyboard, use a standard event system, not Makinom's event system. Makinom's event system sets itself up to use Makinom's Accept/Cancel keys. But you can accomplish the same thing by using a standard event system and assigning the same Accept/Cancel inputs to it.
The Dialogue System ORK Bridge component hooks into ORK Framework's save and load system. It automatically saves and loads Dialogue System data in your ORK saved games.
Set up barking NPCs the usual way in the Dialogue System. See Barks.
Set up conversations through the Makinom schematic system, using the Dialogue System → Start Conversation node.
The Dialogue System ORK Bridge component registers several functions with the Lua environment. These functions provide an interface into ORK. You can use them in your dialogue entry Scripts and Conditions to control ORK during conversations. You can enter them manually or select them through the "..." dropdown wizards in the section Custom > ORK.
Function | Returns | Description | Example |
---|---|---|---|
Status | - | - | - |
orkGetStatus(combatant, value) | Number | Gets a combatant's status value | Variable["hp"] = orkGetStatus("Player", "HP") |
orkSetStatus(combatant, value) | (nothing) | Gets a combatant's status value | orkSetStatus("Player", "HP", Variable["hp"] - 10) |
Faction | - | - | - |
orkChangeFaction(combatant, faction) | (nothing) | Changes a combatant's faction | orkChangeFaction("NPC_green", "Enemies") |
orkGetFactionSympathy(combatant, faction) | Number | Gets a combatant's sympathy to a faction | s = orkGetFactionSympathy("NPC_blue", "Orcs") |
orkSetFactionSympathy(combatant, faction, value) | (nothing) | Sets a combatant's sympathy to a faction | orkSetFactionSympathy("NPC_blue", "Orcs", -100) |
orkAddFactionSympathy(combatant, faction, value) | (nothing) | Adds to a combatant's sympathy | orkAddFactionSympathy("NPC_blue", "Elves", 10) |
orkSubFactionSympathy(combatant, faction, value) | (nothing) | Subtracts from a combatant's sympathy | orkSubFactionSympathy("NPC_blue", "Orcs", 10) |
Quests | - | - | - |
orkHasQuest(quest) | Boolean | Returns true if the player has a quest | b = orkHasQuest("Kill Evil Pants") |
orkAddQuest(quest) | (nothing) | Adds a quest to the player | orkAddQuest("Find the Underpants") |
orkRemoveQuest(quest) | (nothing) | Removes a quest from the player | orkRemoveQuest("Find the Underpants") |
orkGetQuestStatus(quest) | String | Returns the current status of a quest | orkGetQuestStatus("Find the Underpants") |
orkChangeQuestStatus(quest, status) | (nothing) | Changes the status of a quest | orkChangeQuestStatus("Find the Underpants", "failed") |
orkGetQuestTaskStatus(task) | String | Returns the current status of a quest task | orkGetQuestTaskStatus("Open the Pants Drawer") |
orkChangeQuestTaskStatus(task, status) | (nothing) | Changes the status of a quest task | orkChangeQuestStatus("Open the Pants Drawer", "finished") |
Inventory | - | - | - |
orkHasItem(combatant, item) | Boolean | Returns true if a combatant has an item | b = orkHasItem("Player", "Underpants") |
orkAddItem(combatant, item) | (nothing) | Adds an item to a combatant | orkAddItem("Player", "Magic Potion") |
orkRemoveItem(combatant, item) | (nothing) | Removes an item from a combatant | orkRemoveItem("Player", "Underpants") |
orkGetItemQuantity(combatant, item) | Number | Returns true if a combatant has N items | n = orkGetItemQuantity("Player", "Wolfskins") |
orkAddItemQuantity(combatant, item, quantity) | (nothing) | Adds N items to a combatant | orkAddItemQuantity("Player", "Magic Potion", 3) |
orkRemoveItemQuantity(combatant, item, quantity) | (nothing) | Removes N items from a combatant | orkRemoveItemQuantity("Player", "Wolfskins", 5) |
orkGetCurrency(combatant, currency) | Number | Gets the amount of currency | gold = orkGetCurrency("Player", "Gold") |
orkSetCurrency(combatant, currency, quantity) | (nothing) | Sets the amount of currency | orkSetCurrency("Player", "Gold", 500) |
Events | - | - | - |
orkStart(machine, startingObject) | (nothing) | Starts an Auto Machine on a GameObject* | orkStart("bigCutsceneObject", "Player") |
Notes:
orkStart("Rock", "")
to start the Auto Machine on the GameObject named "Rock" and involve the player.