Difference between revisions of "RemoveAllTypedItems"

From the Fallout3 GECK Wiki
Jump to navigation Jump to search
imported>Cipscis
m (Fixed text in link to list of type codes)
imported>Jazzisparis
 
(9 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{{Function
{{Function
  |origin = VEGAS1
  |origin = VEGAS1
  |summary = Removes all typed items (except those not listed in the exemption [[FormList]]) from the calling reference's inventory.
  |summary = Removes all typed items (except those listed in the exemption [[FormList]]) from the calling reference's inventory.


If a target container is specified, the typed items are moved to the target container with all equipment items retaining their current health; otherwise the items are destroyed as they would be via [[RemoveItem]].
If the ''retain ownership'' flag is set to a non-zero value, the items' original ownership is retained; otherwise the ownership is cleared.
'''Short list of type codes:'''
*24: Armor
*25: Book
*26: Clothing
*29: Ingredient
*31: Misc
*40: Weapon
*41: Ammo
*46: Key
*47: AlchemyItem
*49: Note
*50: ConstructibleObject
''Note that not all items are in the obvious category. For example, ingestibles are under AlchemyItem and include magazines. Many of the items necessary for crafting at the workbench and reloader are listed under Misc alongside junk items.''
  |returnType = void
  |returnType = void
  |referenceType = container
  |referenceType = container
Line 33: Line 15:
   |Optional = optional
   |Optional = optional
   }}{{FunctionArgument
   }}{{FunctionArgument
   |Name = UnknownFlag
   |Name = Suppress Messages
   |Type = int
   |Type = int
   |Optional = optional
   |Optional = optional
Line 46: Line 28:
   }}
   }}
  |example = player.RemoveAllTypedItems vGOMPlayerEquipmentContainer 1 0 40 NVImprovedHoldoutWeapons
  |example = player.RemoveAllTypedItems vGOMPlayerEquipmentContainer 1 0 40 NVImprovedHoldoutWeapons
TopsCompanionLocker2REF.RemoveAllTypedItems player 1 0
Items are removed from the Tops Locker and given to the player, with messages hidden (Second Int = 0).
}}
}}
==Usage==
If a target container is specified, the typed items are moved to the target container with all equipment items retaining their current health; otherwise the items are destroyed as they would be via [[RemoveItem]].
If the ''retain ownership'' flag is set to a non-zero value, the items' original ownership is retained; otherwise the ownership is cleared. This is especially notable in the case of retaining ownership on items owned by someone else when transferring them to the player, as this may be counted as stealing.
If the ''suppress messages'' flag is set to 1, the standard "Item Added" pop-up will not be displayed when this command is used to transfer items to the player.
===List of type codes===
''Note: Type codes exist for all record types found in the GECK, including those which are not items that can be taken into inventory, e.g. Static Collections.  The following list only includes type codes for record types which can be used as inventory.''
*24: Armor
*25: Book
*26: Clothing
*29: Ingredient
*31: Misc
*40: Weapon
*41: Ammo
*46: Key
*47: AlchemyItem
*49: Note
*50: ConstructibleObject
*103: IMOD (weapon mods)
*108: CHIP (casino chip)
*115: CCRD (caravan card)
*116: CMNY (faction currency)
Note that not all items are in the obvious category. For example, Ingestibles and other Aid items are under ''AlchemyItem'' and include magazines, while skill books such as The Wasteland Survival Guide are under the ''Book'' category, despite appearing in the Aid category when viewed in the Pip-boy.
The ''Ingredient'' and ''ConstructibleObject'' types are legacy content from Oblivion and generally will not be used, as the creation of new items of these types cannot be done within the GECK and requires the use of third-party tools.
Some of the new item types added in Fallout: New Vegas are not associated with ''any'' of the Pip-boy item categories, and can only be seen in-game when viewing the list of all items in a container.
==Notes==
* Failing to specify a type code or specifying 0 for type code ''may'' result in the function removing all items from the specified actor's inventory, but may also result in the function doing nothing. 
* For Base IDs in the exemption FormList, all items with that Base ID will be exempted.
==See Also==
==See Also==
*[http://fose.silverlock.org/fose_command_doc.html#Type_Codes Complete list of type codes]
*[http://fose.silverlock.org/fose_command_doc.html#Type_Codes Complete list of type codes]
*[[RemoveItem]]
*[[RemoveItem]]
*[[RemoveItemTarget]]
*[[RemoveAllItems]]
*[[RemoveAllItems]]



Latest revision as of 13:34, 28 March 2015

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

A function included in the GECK Version 1.1.0.262 for Fallout: New Vegas.

Description

Removes all typed items (except those listed in the exemption FormList) from the calling reference's inventory.

Syntax

[help]
container.RemoveAllTypedItems TargetContainerID:ref RetainOwnershipFlag:int Suppress Messages:int TypeCode:int FormListID:ref

Example

player.RemoveAllTypedItems vGOMPlayerEquipmentContainer 1 0 40 NVImprovedHoldoutWeapons
TopsCompanionLocker2REF.RemoveAllTypedItems player 1 0

Items are removed from the Tops Locker and given to the player, with messages hidden (Second Int = 0).

Usage

If a target container is specified, the typed items are moved to the target container with all equipment items retaining their current health; otherwise the items are destroyed as they would be via RemoveItem.

If the retain ownership flag is set to a non-zero value, the items' original ownership is retained; otherwise the ownership is cleared. This is especially notable in the case of retaining ownership on items owned by someone else when transferring them to the player, as this may be counted as stealing.

If the suppress messages flag is set to 1, the standard "Item Added" pop-up will not be displayed when this command is used to transfer items to the player.

List of type codes

Note: Type codes exist for all record types found in the GECK, including those which are not items that can be taken into inventory, e.g. Static Collections. The following list only includes type codes for record types which can be used as inventory.

  • 24: Armor
  • 25: Book
  • 26: Clothing
  • 29: Ingredient
  • 31: Misc
  • 40: Weapon
  • 41: Ammo
  • 46: Key
  • 47: AlchemyItem
  • 49: Note
  • 50: ConstructibleObject
  • 103: IMOD (weapon mods)
  • 108: CHIP (casino chip)
  • 115: CCRD (caravan card)
  • 116: CMNY (faction currency)

Note that not all items are in the obvious category. For example, Ingestibles and other Aid items are under AlchemyItem and include magazines, while skill books such as The Wasteland Survival Guide are under the Book category, despite appearing in the Aid category when viewed in the Pip-boy.

The Ingredient and ConstructibleObject types are legacy content from Oblivion and generally will not be used, as the creation of new items of these types cannot be done within the GECK and requires the use of third-party tools.

Some of the new item types added in Fallout: New Vegas are not associated with any of the Pip-boy item categories, and can only be seen in-game when viewing the list of all items in a container.

Notes

  • Failing to specify a type code or specifying 0 for type code may result in the function removing all items from the specified actor's inventory, but may also result in the function doing nothing.
  • For Base IDs in the exemption FormList, all items with that Base ID will be exempted.

See Also