Skip to content
Batfoxkid edited this page Sep 30, 2020 · 8 revisions

Store

configs/textstore/store.cfg is another KeyValues based system.
But offers alot more room for designing categories and items in different ways.
Do not have two of the same name for any Category or Item. It will cause side effects with saving/loading.

Store Format

"Item Name"
{
	// Item Settings
}
"Category Name"
{
	"Item Name A"
	{
		// Item Settings
	}
	"Item Name B"
	{
		// Item Settings
	}
}

Item Settings

  • "cost" Is the main price of an item, this is required to be a value more than zero, otherwise the item will be treated as a category instead.

  • "desc" The description of the item shown while viewing the item.

  • "plugin" The subplugin that's called when the item is "used" or "activated".

  • "sell" The sell price of an item, when left omitted, it will be 3/4 of the cost of the item.

  • "admin" The admin flag requirement to buy the item (eg. "abc", "z", etc.)

  • "hidden" If the item is hidden, can be used for giving select people an item via editing text files generated. If omitted, there is a 16% chance per a map that the item will be hidden (gives a sense of an actual store).

  • "slot" If the item has a slot, if a client equips a different item that has the same slot, the previous item with that slot is unequipped. This should only be used with the same plugin and item type as it is not called when the item is unequipped.

  • "stack" If the client can have more than one of the time in his/her inventory.

  • "trade" If the item can be traded with other users (currently trading does not exist and this key has no effect).

Crafting

configs/textstore/crafting.cfg
Crafting allows players to use items to create new ones, this is optionally and the crafting config can be removed to safely disable this feature.
Similar towards the store config but having the same names for categories or recipes is allowed.

Crafting Format

"Recipe Name"
{
	"Item Name A"
	{
		// Recipe Item Settings
	}
	"Item Name B"
	{
		// Recipe Item Settings
	}
}
"Category Name"
{
	"Recipe Name"
	{
		// Recipe Settings
	}
	"Recipe Name"
	{
		// Recipe Settings
	}
}

Recipe Settings

  • "cost" How much credits gained/lost through this recipe, this is required to be defined, otherwise the recipe will be treated as a category instead.

  • "admin" The admin flag requirement to use this recipe (eg. "abc", "z", etc.)

Recipe Item Settings

  • "cost" How much of this item it costs to use this recipe.

  • "consume" If the item is used up when using this recipe depending on "cost" value.

  • "gain" How much of this item is gained through this recipe.