Difference between revisions of "DuplicateAllItems"

From the Fallout3 GECK Wiki
Jump to navigation Jump to search
imported>Geckbot
m (Robot: Automated text replacement (-\[\[Category:(.*?)Functions\]\] +Category:\1Functions\nCategory:\1Functions (GECK 1.0)))
imported>Ez0n3
m
 
(4 intermediate revisions by 3 users not shown)
Line 1: Line 1:
'''Syntax:'''
{{Function
  [''ActorID''|''ContainerID''.]DuplicateAllItems ''TargetContainerID''
  |CSWikiPage = DuplicateAllItems
'''Example:'''
|origin = GECK1
  DuplicateAllItems DanielLittlehornREF
  |summary = Duplicates all items into the target container. Any scripted item will be duplicated almost identically:
 
Duplicates all items into the target container. Any scripted item will be duplicated almost identically:
*Any script variables will be set to 0 on the duplicate
*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
*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 ArmorLeather)''''' will never be true if the player has the duplicate.
**More importantly, meaning if any script referenced the original the duplicate will not work. For instance '''''if (player.GetItemCount ArmorLeather)''''' will never be true if the player has the duplicate.
|name = DuplicateAllItems
|returnType = void
|referenceType = <nowiki>[ActorRefID|ContainerRefID]</nowiki>
|arguments =
  {{FunctionArgument
  |Name = TargetContainerRefID
  |Type = ref
  }}
|example = DuplicateAllItems DanielLittlehornREF
}}


==Notes==
==Notes==
*The Fallout 3 implementation of this command suffers from a bug. The game generates a new base object for each scripted item in the inventory to be copied. However, the new base objects are not saved in the savegame, so when the user reloads that game the duplicated items will have vanished from the inventory of the object on which this command was called. In other words, '''any scripted items copied using DuplicateAllItems will vanish on reload'''.
*The Fallout 3 implementation of this command suffers from a bug. The game generates a new base object for each scripted item in the inventory to be copied. However, the new base objects are not saved in the savegame, so when the user reloads that game the duplicated items will have vanished from the inventory of the object on which this command was called. In other words, '''any scripted items copied using DuplicateAllItems will vanish on reload'''.
*The default game does not make use of this function; likely because of the above bug
*The default game does not make use of this function; likely because of the above bug
 
*As an alternative you can use the [[RemoveAllItems]] command


[[Category:Functions]]
[[Category:Functions]]
[[Category:Functions (GECK 1.0)]]
[[Category:Functions (GECK 1.1)]]
[[Category:Actor Functions]]
[[Category:Actor Functions]]
[[Category:Actor Functions (GECK 1.0)]]
[[Category:Actor Functions (GECK 1.1)]]

Latest revision as of 04:52, 15 January 2011

< [[::Category:Functions|Category:Functions]]

Link to TES4 Construction Set Wiki: DuplicateAllItems.

A function included in the GECK version 1.1.0.36.

Description

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

  • 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 ArmorLeather) will never be true if the player has the duplicate.

Syntax

[help]
[ActorRefID|ContainerRefID].DuplicateAllItems TargetContainerRefID:ref

Example

DuplicateAllItems DanielLittlehornREF

Notes

  • The Fallout 3 implementation of this command suffers from a bug. The game generates a new base object for each scripted item in the inventory to be copied. However, the new base objects are not saved in the savegame, so when the user reloads that game the duplicated items will have vanished from the inventory of the object on which this command was called. In other words, any scripted items copied using DuplicateAllItems will vanish on reload.
  • The default game does not make use of this function; likely because of the above bug
  • As an alternative you can use the RemoveAllItems command