Trialoge
This package allows you to create conversations with any number of NPCs and control the camera during the dialog.
Dependencies
Initialization
Initialize with LeGo_Trialoge
flag.
Implementation
Functions
EquipWeapon
Sektenspinner's function. Makes NPC equip a weapon.
var C_NPC slf
NPC to have a weapon equippedvar int ItemInstance
Weapon instance ID to be equipped
Configuration
const int EquipWeapon_TogglesEquip = 1
Above constant configures the behaviour of the function when trying to equip an already equipped weapon:
0
-EquipWeapon
will do nothing1
-EquipWeapon
will unequip this weapon
Npc_GetArmor
Returns NPC's equipped armor.
var C_NPC slf
NPC to get the armor from
Return value
The function returns instance of armor worn by the NPC.
Npc_GetMeleeWeapon
Returns NPC's equipped melee weapon.
var C_NPC slf
NPC to get the weapon from
Return value
The function returns instance ID of melee weapon equipped by the NPC.
Npc_GetRangedWeapon
Returns NPC's equipped ranged weapon.
var C_NPC slf
NPC to get the weapon from
Return value
The function returns instance ID of ranged weapon equipped by the NPC.
Npc_TradeItem
Swaps NPCs equipped weapon.
var C_NPC slf
NPC to perform operation onvar int itm0
instance ID of item to removevar int itm1
instance ID of item to create and equip
DiaCAM_Update
Sektenspinner's function that updates the dialogue camera. (Used internally.)
DiaCAM_Disable
Completely disable the dialogue cameras.
DiaCAM_Enable
Resets the dialogue cameras to the default settings.
TRIA_Wait
Makes self
and other
wait for each other, e.g. for AI_GotoWP
actions for synchronization.
TRIA_Invite
Invites an NPC into a conversation. Must be called before TRIA_Start
.
var C_NPC slf
The invited NPC
TRIA_Start
Starts trialogues. Before that, all NPCs should be invited by TRIA_Invite
.
TRIA_Barrier
Similar to TRIA_Wait
but applies to all participating NPCs.
TRIA_Next
Sets the called npc to self
.
var C_NPC n0
NPC to set toself
TRIA_Cam
Starts a tracking shot.
var string evt
The name of the tracking shot in Spacer. If""
is passed, the running trace shot will be aborted.
TRIA_Finish
Ends an ongoing trialogue. Must always be called at the end, otherwise no further trialogues can be started.
Examples
A Simple Trialogue
The following conversation is resolved via the trialogues:
- Arto: I'm sorry Hero, but you can't pass here.
- Hero: Why not?
- Horka: The city has been closed.
- Hero: I have some gold with me, can we trade?
- Squelto: No. We are not open to bribery.
- Hero: Sure?
- Arto: I have to ask you to leave now.
- Hero: Well...
Note
In addition, here are still Dialoggestures used.