RemoveAllTypedItems

From the Fallout3 GECK Wiki
Revision as of 20:48, 26 November 2011 by imported>Yukichigai (Cleanup. Also, I believe the first note is not accurate any longer.)
Jump to navigation Jump to search
< [[::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 not 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.

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

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.

Syntax

Syntax

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

Example

player.RemoveAllTypedItems vGOMPlayerEquipmentContainer 1 0 40 NVImprovedHoldoutWeapons

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.
  • Unlike RemoveAllItems, RemoveAllTypedItems supports the suppression of item received messages when it is used to transfer items from one container or NPC to the player.

See Also