Difference between revisions of "Osiris/Shared/DB HasItemTemplateScriptFlag"

From Divinity Engine Wiki
Jump to: navigation, search
m
m (Description)
 
Line 4: Line 4:
 
===== Description =====
 
===== Description =====
 
This functionality can be used in dialogs to check whether a participant has a certain number of items of a particular template in their inventory:
 
This functionality can be used in dialogs to check whether a participant has a certain number of items of a particular template in their inventory:
* '''_TemplateVarIndex''': can only be 1 at this time. Determines which which of the '''GEN_CheckHasItemTemplate''' script flags you can use to check whether a dialog participant (see '''_SpeakerIndex''') has items of the specified item template in their inventory.
+
* '''_TemplateVarIndex''': can be 1 - 5 at this time. Determines which which of the '''GEN_CheckHasItemTemplate/_2/_3/...''' script flags you can use to check whether a dialog participant (see '''_SpeakerIndex''') has items of the specified item template in their inventory.
 
* '''_Dialog''': the name of the dialog that this DB should influence.
 
* '''_Dialog''': the name of the dialog that this DB should influence.
 
* '''_ItemTemplate''': the item template to check for. Format: name_UUID (no '''ITEMGUID_''' prefix!)
 
* '''_ItemTemplate''': the item template to check for. Format: name_UUID (no '''ITEMGUID_''' prefix!)
 
* '''_SpeakerIndex''': This sets the speaker dialog variable used by '''GEN_CheckHasItemTemplate'''/'''..''' and hence must refer to a speaker index in the dialog. It determines which speaker will be checked for having a sufficient number of items of the specified template.
 
* '''_SpeakerIndex''': This sets the speaker dialog variable used by '''GEN_CheckHasItemTemplate'''/'''..''' and hence must refer to a speaker index in the dialog. It determines which speaker will be checked for having a sufficient number of items of the specified template.
 
* '''_Amount''': the number of items to check for. If unspecified, defaults to 1.
 
* '''_Amount''': the number of items to check for. If unspecified, defaults to 1.
 +
 
===== Notes =====
 
===== Notes =====
 
* Unlike [[Osiris/Shared/DB_HasTemplateItem|DB_HasTemplateItem]], this works for both players and NPCs.
 
* Unlike [[Osiris/Shared/DB_HasTemplateItem|DB_HasTemplateItem]], this works for both players and NPCs.

Latest revision as of 13:03, 6 March 2018

Full Definition(s)
  • DB_HasItemTemplateScriptFlag((INTEGER)_TemplateVarIndex, (STRING)_Dialog, (STRING)_ItemTemplate, (INTEGER)_SpeakerIndex);
  • DB_HasItemTemplateScriptFlag((INTEGER)_TemplateVarIndex, (STRING)_Dialog, (STRING)_ItemTemplate, (INTEGER)_SpeakerIndex, (INTEGER)_Amount);
Description

This functionality can be used in dialogs to check whether a participant has a certain number of items of a particular template in their inventory:

  • _TemplateVarIndex: can be 1 - 5 at this time. Determines which which of the GEN_CheckHasItemTemplate/_2/_3/... script flags you can use to check whether a dialog participant (see _SpeakerIndex) has items of the specified item template in their inventory.
  • _Dialog: the name of the dialog that this DB should influence.
  • _ItemTemplate: the item template to check for. Format: name_UUID (no ITEMGUID_ prefix!)
  • _SpeakerIndex: This sets the speaker dialog variable used by GEN_CheckHasItemTemplate/.. and hence must refer to a speaker index in the dialog. It determines which speaker will be checked for having a sufficient number of items of the specified template.
  • _Amount: the number of items to check for. If unspecified, defaults to 1.
Notes
  • Unlike DB_HasTemplateItem, this works for both players and NPCs.
  • This functionality is not yet available in currently released versions of the game.
See Also