Difference between revisions of "Osiris/API/ItemSetStoryItem"

From Divinity Engine Wiki
Jump to: navigation, search
m
m (Full Definition(s))
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
===== Full Definition(s) =====
 
===== Full Definition(s) =====
* call '''ItemSetStoryItem'''(''(CHARACTERGUID)'''''_Character''', ''(INTEGER)'''''_Bool''')
+
* call '''ItemSetStoryItem'''(''(ITEMGUID)'''''_Item''', ''(INTEGER)'''''_Bool''')
 +
 
 
===== Description =====
 
===== 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:
 
Sets or clears the ''story item'' flag on an item. When an item is a story item, the following special behaviours apply to it:
Line 8: Line 9:
 
* NPCs will never consume the item (e.g. in combat)
 
* 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.
 
* 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 [[Osiris/API/TransferItemsToCharacter|TransferItemsToCharacter]], [[Osiris/API/TransferItemsToParty|TransferItemsToParty]], and [[Osiris/API/TransferItemsToUser|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 forced alignment change will be removed in future games, but not in DOS2
* 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 =====
 
===== Notes =====
 
* An item can also be marked as a story item in the properties of the item via the editor's sidebar.
 
* An item can also be marked as a story item in the properties of the item via the editor's sidebar.
 +
* The [[Osiris/API/TransferItemsToCharacter|TransferItemsToCharacter]], [[Osiris/API/TransferItemsToParty|TransferItemsToParty]], and [[Osiris/API/TransferItemsToUser|TransferItemsToUser]] APIs will only transfer story items
 
===== See Also =====
 
===== See Also =====
* [[Osiris/API/ItemGetIsStoryItem|ItemGetIsStoryItem]]
+
* [[Osiris/API/ItemIsStoryItem|ItemIsStoryItem]]
 
* [[Osiris/API/TransferItemsToCharacter|TransferItemsToCharacter]]
 
* [[Osiris/API/TransferItemsToCharacter|TransferItemsToCharacter]]
 
* [[Osiris/API/TransferItemsToParty|TransferItemsToParty]]
 
* [[Osiris/API/TransferItemsToParty|TransferItemsToParty]]

Latest revision as of 10:51, 12 July 2021

Full Definition(s)
  • call ItemSetStoryItem((ITEMGUID)_Item, (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 wares, nor can any container that contains it be marked as wares, nor can it be added to the wares 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.
  • It changes the alignment of the item to "Story", which is always forced to be neutral to all other alignments. This forced alignment change will be removed in future games, but not in DOS2
Notes
See Also