Difference between revisions of "DuplicateAllItems"

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search
imported>QQuix
(Clarifying scripted x unscripted items)
imported>QQuix
(removed Category: Items (does not apply))
 
Line 20: Line 20:
[[Category:Functions (CS)]]
[[Category:Functions (CS)]]
[[Category: Functions (CS 1.0)]]
[[Category: Functions (CS 1.0)]]
[[Category: Items]]
[[Category: Actor Functions]]
[[Category: Actor Functions]]
[[Category: Actor Functions (CS 1.0)]]
[[Category: Actor Functions (CS 1.0)]]

Latest revision as of 17:07, 23 July 2012

Syntax:

[ActorID|ContainerID.]DuplicateAllItems TargetContainerID

Example:

DuplicateAllItems BlackBrugoRef

Duplicates all items into the target container. Any scripted item will be duplicated almost identically:

  • Unscripted items are added to the target container using same Base Record as the original (similar to AddItem)
  • Scripted items:
    • Any script variables will be set to 0 on the duplicate
    • The duplicate will have a new FormID, meaning if (Original == New) will never be true
      • More importantly, meaning if any script referenced the original the duplicate will not work. For instance if (player.GetItemCount AmuletOfKings) will never be true if the player has the duplicate.
    • The Base Record created to hold the new FormID cannot be removed from the game and may cause savegame bloating if this function is used for temporary purposes.

Note that quest items are duplicated as well, so use with care. Many quests assume that a quest item is unique -- creating a second version of it can have undesirable results.

See Also[edit | edit source]

CreateFullActorCopy