Creating Named Items
Creating Named Items
What Are Named Items
The named item system is an easy way to produce customized items with craft parameters and special names. These items are stored in a file callednamed_items.txt which is stored in the EGS service's data_shard folder. It is a PDR of CGameItem objects. Any private member of a game item object is available to you for specialization. This data is then stored in a manager within the EGS and uses the PhraseID as a key. This is important - the phrase ID used must be unique.
Admin Tools
In EGS:
- reloadNamedItems - reloads the contents of the named_items.txt file.
- createNamedItemInBag <eId> <item> [<quantity>] - spawns an instance of the named item in the target EIDs bag. The item is the phrase ID used to name the item.
Note: You can execute createNamedItemInBag using the same syntax minus the entity ID and it will spawn an instance in your own inventory.
These commands, when executed in-game, require DEV or SGM privileges.
Named Item File Structure
As mentioned above the Named Items folder is an array of inventory and as such each Items entry is a a raw text dump of an instantiated object. Look at the CGameItem class for more information on what parameters can be adjusted here.
_Items#0 _Items#0._SheetId=icrm2ms.sitem _Items#0._ClientInventoryPosition= -1 _Items#0._Recommended=12 _Items#0._Dropable=0 _Items#0._LocSlot= 0 _Items#0._PhraseId=TEST_NAMED_ITEM _Items#0._CraftParameters _Items#0._CraftParameters.Durability=1.000000 _Items#0._CraftParameters.SapLoad=0.100000 _Items#0._CraftParameters.Weight=0.500000 _Items#0._CraftParameters.StatEnergy=0.350000 _Items#0._CraftParameters.Dmg=0.500000 _Items#0._CraftParameters.Speed=0.920000 _Items#0._CraftParameters.Range=1.000000 _Items#0._CraftParameters.HpBuff=15