-
Notifications
You must be signed in to change notification settings - Fork 8
items_config
This page is about the main config file to configure, groupe and pack all the available items, categories and packages of the store. The items.txt config file are to be seen as examples and preview. It should show you all configuration, mix and scructuring possibilities. Server operators should modify it before using on productive/public server.
Here we explain
- small example from structure of à KeyTree
- example of different structure posibilities
- all default Keys and values, valid for all items
Example of a KeyValue Tree
"Tree"
{
"Title"
{
"Key" "Value"
}
}
Example of a single item with all default keys given from core valid for all items.
"Store" // Root name of the KeyValue tree - no influence, not used
{
"Single item - title"
{
"description" "text to descrip the item"
"shortcut" "command"
"preview" "0"
"trade" "1"
"steam" ""
"flag" "abc"
"secret" "z" // only admin with "z" can see item.
"price" "5000"
"type" "<type>"
"unique_id" "uid_uniqueID"
}
...
Example of a single item with Abo plans but the minimum of default keys.
...
"Single item with Aboplans - title" // A single item with Abo plans but the minium of default keys.
{
"type" "<type>"
"Plans"
{
"First Period - title"
{
"price" "1"
"time" "86400" // 86400 = one day
}
"First Period - title"
{
"price" "10"
"time" "604800" // 604800 = one week
}
"Third Period - title"
{
"price" "100"
"time" "2678400" // 2678400 = one month
}
"Permament - title"
{
"price" "1000"
}
}
}
...
Example of a Category with two single items with all keys working for categories.
...
"Category with two items - title"
{
"description" "text to descrip the Category"
"shortcut" "category"
"flag" ""
"steam" ""
"secret" ""
"Item 1.1 - title"
{
"description" "text to descrip the item"
"type" "<type>"
"price" "1000"
}
"Item 1.2 - title"
{
"type" "<type>"
"price" "1000"
}
}
...
Example of Sub-Categories with two items bundled to a package.
...
"Another Category - title"
{
"With sub-Category - title"
{
"And sub-sub-Category - title"
{
"Two items in one package - title"
{
"price" "1000"
"description" "text to descrip the package"
"shortcut" "package"
"flag" ""
"steam" ""
"secret" ""
"trade" "1"
"Item 2.1"
{
"type" "<type>"
}
"Item 2.2"
{
"type" "<type>"
}
}
}
}
}
}
The order of the KeyValue titles represent the order of the items in ingame menu. The order of the Keys of an item, package or category is unimportant. The spacelines & indented tabs are for readability and not nessacary for functinality (if you paste/send a config within an issue, please pay attention to readability!).
**All the here listed Keys are handled by the core plugin. All other Keys are plugin specific.
Type of the module the item use. All types are listed within their modules wiki pages.
Required key! - no default value.
"type" "link" - Link item module - item is a link to a command
"type"" "playermodel" - Playermodel item module - item is a playermodel.
"type" "trail" - Trail item module - item is a player trail.
If there is no "type"-Key and no other subcategory the item or package in config will be skipped.
The price of the item or package. No "price"-Key or a value less then 1 makes the item or package for free.
Optional attribute - Default value "0" - free.
"price" "100" - The item or package costs 100 credits.
"price" "" - The item or package is for free.
"price" "0" - The item or package is for free.
"price" "-50" - The item or package is for free.
When the price will be changed later and player already bought the item to a different price, this different first price will be used for selling.
Flag needed to get access to the item, package or categories, no flag = everyone. Also combinations of flags could be used.
Optional attribute - Default value "" - everyone.
"flags" "" - All players has access to the item, package or categorie.
"flags" "a" - Only player with a flag has access to the item, package or categorie.
"flags" "abc" - Only player with minimum all three flags abc has access to the item, package or categorie.
Only user with this steamid has access to the item, package or categories. The 3 common types of steam IDs are supported: SteamID, SteamID3 and SteamID64
Optional attribute - Default value "" - everyone.
"steam" "STEAM_1:0:11101" - Only the player with this steamid has access to the item, package or categorie.
"steam" "[U:1:22202]" - Only the player with this steamid has access to the item, package or categorie.
"steam" "76561197960287930" - Only the player with this steamid has access to the item, package or categorie.
"steam" "STEAM_1:0:11101,STEAM_1:1:53209067,STEAM_0:0:940252" - All players with one of this steamids has access to the item, package or categorie.
"steam" "STEAM_1:0:11101,[U:1:106418135],76561197962146232" - Also a mix of steam id types is possible.
The descripting of an item, package or category. Shown in menu page under item name and in item page in title.
Optional attribute - Default value "" - no description.
Position where the description will be shown can be changed with Convar mystore_description in core.cfg.
A chat shortcut to the item, package or category. It uses the public trigger (default: "!") and the silent trigger (default: "/") from sourcemods core config file. Optional attribute - Default value "" - no shortcut.
"shortcut" "lootbox" - Listen for silent or public chat trigger /lootbox & !lootbox.
"shortcut" "emotes" - Listen for silent or public chat trigger /emotes & !emotes.
With this Key you can make an item, package or category invisible for player how don't already own the item. Also player with given flag can see and buy the item. This is mainly thought for admin to have secret items "at the back of the shop", which they can give out manually. Or for secret items only available through vouchers or lootboxes or manually enabled for a period in item.txt Optional attribute - Default value "" - visible for all.
"secret" "z" - Only owner of the item or player with z flag has access to the item.
With the "trade"-Key you can define if an item, package or category invisible can be traded in any way. With the default misc modules you are able to sell, gift, drop or voucher an item.
To combine these trade types in all way they became a value: Sell only = 1 Gift only = 2 Drop only = 4 Voucher only = 8 You can add this numbers to combine types: Sell & Drop only = 1 + 4 = 8 Gift & Voucher only = 2 + 8 = 10 Sell & Gift only = 1 + 2 = 3
Optional attribute - Default value "" - all types of trade available.
"trade" "2" - Gift only.
"trade" "13" - Sell, Drop and Voucher only.
"trade" "5" - Sell & Drop only.
"trade" "7" - Sell, Gift & Drop only.
"trade" "" - All types of trades = Sell, Gift, Drop & Voucher available.
Even when this Key is handled by the core module, its full functionslity depends on their modules.
When the item module support the preview feature, you can define wheneter or not the preview is given for this item. 1 - enabled, 0 - disabled Optional attribute - Default value "0" - disabled.
Even when this Key is handled by the core module, its depends on the item modules if the item has the feature.
When the item module support the preview feature, you can define wheneter or not the preview is given for this item. 1 - enabled, 0 - disabled Optional attribute - Default value "0" - disabled.
With the Convar mystore_generate_uids in core.cfg you can automaticly generate uniqueIDs for all your items on next plugin start.
BEWARE
You can really easy fuck up your whole config file when generating uniqueIDs if you have an KeyValue synatx error like a missing {, }, ".
**Backup your .txt file before toggle ConVar to "1"!
The uniqueID must be, like the name says, unique. Beware of copy paste errors!
After a item was sold for the first time the uniqueID should never be changed!
Don't forget to Backup your .txt file before toggle mystore_generate_uids to "1"!
Even when this Key is optional, recommend to set it for all items. The uniqueID it is needed for modules like drop, lootbox and discount.