Osiris/Shared/DB HasItemTemplateScriptFlag

From Divinity Engine Wiki
Revision as of 13:03, 6 March 2018 by Tinkerer (talk | contribs) (Description)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
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