[{"data":1,"prerenderedAt":138},["ShallowReactive",2],{"class-doc-/reference/2.0/gg_inventory/ggitemdata":3,"navigation":66},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"_id":8,"navigation":6,"addon":5,"version":9,"brief_description":10,"description":11,"tutorials":7,"methods":12,"members":46,"signals":59,"constants":60,"inherits":61,"name":17,"title":17,"_source":62,"_file":63,"_stem":64,"_extension":65},"/reference/2.0/gg_inventory/ggitemdata","gg_inventory",false,"","content:40.reference:2.0:gg_inventory:GGItemData.xml","2.0","Represents an instance of an inventory item and defines unique item properties.","The inventory item is defined by a [member type] and a [member quantity].[br][br]An item provides the [method serialize] and [method unserialize] methods, which may be used by a [GGInventorySerializationStrategy].[br][br]This class should be extended by your game to describe additional properties you may need. For example:\n[codeblock]\nclass_name MyCustomItemData extends GGItemData\n\n# Stores the name of the player that crafted this item\nvar crafted_by: String = \"\"\n\n# The quality of the item is determined by the skill level of the player who crafted the item.\nvar quality: float = 0.0\n[/codeblock]\nA custom item data class should only describe properties that are unique to a particular instanec of that item. Properties shared by all instances of a type should be added to a class that extends the [GGItemType] class instead.",[13,19,24,31,37,42],{"description":14,"name":15,"public":16,"returnType":17,"params":18},"Creates a copy of the current item. This allows inheriting classes to override the method to selectively duplicate additional object properties, since [method duplicate] cannot be overridden.","copy",true,"GGItemData",[],{"description":20,"name":21,"public":16,"returnType":22,"params":23},"Serializes and returns the internal item state. This is used by the [GGInventorySerializationStrategyDynamic] class.","serialize","Dictionary",[],{"description":25,"name":26,"public":16,"returnType":27,"params":28},"Deserializes and restores the internal item state. This is used by the [GGInventorySerializationStrategyDynamic] class.","deserialize","void",[29],{"name":30,"type":22},"data",{"description":7,"name":32,"public":6,"returnType":27,"params":33},"_set_type",[34],{"name":35,"type":36},"value","GGItemType",{"description":7,"name":38,"public":6,"returnType":27,"params":39},"_set_quantity",[40],{"name":35,"type":41},"int",{"description":7,"name":43,"public":6,"returnType":44,"params":45},"_to_string","String",[],[47,50,54],{"name":48,"description":49,"type":36,"setter":7,"getter":7,"public":16},"type","The item type describes common properties for all item instances. While it is typically desirable for all [GGItemData] instances to be unique, the [GGItemType] instances should be shared. This is best accomplished by using a [code].tres[/code] resource to configure the type.",{"name":51,"description":52,"type":41,"setter":38,"getter":7,"default":53,"public":16},"quantity","Specifies the number of items in the stack out of a maximum of [member GGItemType.stack_size].","1",{"name":55,"description":56,"type":57,"setter":7,"getter":7,"default":58,"public":16},"active","Whether the item is active. This property can be used to represent whether the item is active, equipped, enabled, or otherwise in use.","bool","false",[],[],"Resource","content","40.reference/2.0/gg_inventory/GGItemData.xml","40.reference/2.0/gg_inventory/GGItemData","xml",[67,76,103,123],{"title":68,"_path":69,"children":70},"Getting Started","/getting-started",[71,73],{"title":72,"_path":69},"Introduction",{"title":74,"_path":75},"Installation","/getting-started/installation",{"title":77,"_path":78,"children":79},"Concepts","/concepts",[80,82,85,88,91,94,97,100],{"title":81,"_path":78},"Overview",{"title":83,"_path":84},"Inventory","/concepts/inventory",{"title":86,"_path":87},"Interactions","/concepts/interaction",{"title":89,"_path":90},"Permissions","/concepts/permissions",{"title":92,"_path":93},"Multiplayer","/concepts/multiplayer",{"title":95,"_path":96},"User Interface","/concepts/user-interface",{"title":98,"_path":99},"Game Integration","/concepts/game-integration",{"title":101,"_path":102},"Crafting","/concepts/crafting",{"title":104,"_path":105,"children":106},"Demos","/demos",[107,109,112,115,117,120],{"title":108,"_path":105},"Inventory Tour",{"title":110,"_path":111},"Inventory UI Playground","/demos/inventory_ui",{"title":113,"_path":114},"Inventory Game UI","/demos/inventory_game_ui",{"title":101,"_path":116},"/demos/crafting",{"title":118,"_path":119},"Multiplayer Lobby","/demos/mp_lobby",{"title":121,"_path":122},"Sequencer (prototype)","/demos/sequencer",{"title":124,"_path":125,"children":126},"Guide","/guide",[127,129,132,135],{"title":128,"_path":125},"Architecture Deep Dive",{"title":130,"_path":131},"Design Principles","/guide/design-principles",{"title":133,"_path":134},"Changelog v2.x","/guide/changelog-v2",{"title":136,"_path":137},"Changelog v1.x","/guide/changelog",1743268976741]