Osiris/API/ItemSetStoryItem

From Divinity Engine Wiki
Revision as of 16:12, 4 April 2019 by Tinkerer (talk | contribs) (Documented ItemSetStoryItem)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Full Definition(s)
  • call ItemSetStoryItem((CHARACTERGUID)_Character, (INTEGER)_Bool)
Description

Sets or clears the story item flag on an item. When an item is a story item, the following special behaviours apply to it:

  • it cannot be marked as junk, nor can any container that contains it be marked as junk, nor can it be added to the junk when picking it up
  • it is marked as a quest item in the UI
  • it cannot be traded to an NPC, and NPCs won't sell it either
  • NPCs will never consume the item (e.g. in combat)
  • When a trader NPC dies, its inventory will normally be culled except for the top five most expensive items. Story items, however, will never be deleted in this process.
  • The TransferItemsToCharacter, TransferItemsToParty, and TransferItemsToUser APIs will only transfer story items
  • It changes the alignment of the item to "Story", which is always forced to be neutral to all other alignments. This will change in future games, not for DOS2
Notes
  • An item can also be marked as a story item in the properties of the item via the editor's sidebar.
See Also