Items Ownership, Metadata and Stealing

From RPG Creation Kit
Revision as of 16:00, 26 August 2023 by Silvematt (talk | contribs) (Created page with "thumb|An Item In World owned by ''Adelinde Venturia'' The Update '''1.6''' of the RPG Creation Kit brought a new essential component for the '''Items''' System that is '''metadata''', this component allows for items ownership, stealing and pickpocketing. The metadata, regarding the Items, allows us to store unique information about a single '''instance''' of an Item, for example, who's the owner of that item, what are the conditions of the i...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
An Item In World owned by Adelinde Venturia

The Update 1.6 of the RPG Creation Kit brought a new essential component for the Items System that is metadata, this component allows for items ownership, stealing and pickpocketing.

The metadata, regarding the Items, allows us to store unique information about a single instance of an Item, for example, who's the owner of that item, what are the conditions of the item and which enchants are applied to that item.

Items Ownership

As for v1.6, the metadata only stores information about Ownership of an item, which allows us to track which items are owned by NPCs and which are free for the Player to take. In every Item In Inventory and Item In World reference you will find a Metadata section:

Item In World:

Itemsmeta 2.png

A bottle of wine placed in the "CityKingPalace" cell, owned by The King


Item In Inventory:

Itemsmeta 3.png

An Armor Equipment item placed in the Inventory of the NPC "Lanius"


The flag Is Owned is true when someone else that is not the Player owns that item, and Owner ID states the ID of the owner. When Is Owned is false, the Item doesn't belong to anyone, and the Player is free to take it.

On the other hand, when the Player takes an owned item this is considered stealing.

Stealing

When looking at an Item the interface will clearly show if someone owns it.

When a player steals an item, this will be represented in a special way in the Inventory:

Itemsmeta 5.png


The red hand icon shows that the Item was stolen, and it may not be sold to merchants unless they are set to also buy stolen items.

By default, when the Player steals an Item the owner of the Item is the only one that can do something about it, if the owner sees the player stealing one of his items, he will attack him.

This behavior can be changed in the function CheckPlayerStealsItem(...) in the RCKFunctions.cs script, for example, you may want to trigger a special dialogue and make that the NPC takes the item back, or you may want to have guards to also look for other people's items.