Difference between revisions of "RemoveAllTypedItems"
imported>HunterZ (remove horribly confusing "not", and add some new vegas type codes) |
imported>Yukichigai |
||
Line 3: | Line 3: | ||
|summary = Removes all typed items (except those 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. | ||
|returnType = void | |||
|referenceType = container | |||
|arguments = | |||
{{FunctionArgument | |||
|Name = TargetContainerID | |||
|Type = ref | |||
|Optional = optional | |||
}}{{FunctionArgument | |||
|Name = RetainOwnershipFlag | |||
|Type = int | |||
|Optional = optional | |||
}}{{FunctionArgument | |||
|Name = Suppress Messages | |||
|Type = int | |||
|Optional = optional | |||
}}{{FunctionArgument | |||
|Name = TypeCode | |||
|Type = int | |||
|Optional = optional | |||
}}{{FunctionArgument | |||
|Name = FormListID | |||
|Type = ref | |||
|Optional = optional | |||
}} | |||
|example = player.RemoveAllTypedItems vGOMPlayerEquipmentContainer 1 0 40 NVImprovedHoldoutWeapons | |||
}} | |||
==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 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]]. | ||
Line 33: | Line 61: | ||
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. | 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== | ==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. | * 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. |
Revision as of 15:22, 7 July 2012
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
container.RemoveAllTypedItems TargetContainerID:ref RetainOwnershipFlag:int Suppress Messages:int TypeCode:int FormListID:ref
Example
player.RemoveAllTypedItems vGOMPlayerEquipmentContainer 1 0 40 NVImprovedHoldoutWeapons
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
- 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.
- Unlike RemoveAllItems, RemoveAllTypedItems supports the suppression of item received messages when it is used to transfer items from a container or NPC to the player.
- For Base IDs in the exemption FormList, all items with that Base ID will be exempted.