Version 7, last updated by Pilus at 05 Feb 23:51 UTC

The attributes are information attached to each instance of an item. A stack of items normally consists of just one instance of items, with a given amount. When two stacks of items are merged, they might not merge all item instances into one, if the attributes does not allow it. Due to this there can be more than one instance in each stack. Each item has a defined list of attributes for the given item. This includes information about the type of attribute and default value.

Attribute Types

The following attribute types is available. Note that some of them are similar to the types available to dynamic actions. This also include possible merge rules for each type.

Type Description Default Value GHM Info For default Merge Rules
string A normal string "" An editibox No merge
Put text together
number A normal number 0 An editbox No merge
Average values
Sum of values
Minimum value
Maximum value
boolean True or False true A dropdown with "true" and "false" No merge
Logical AND
Logical OR
Logical NOR
tableOfStrings A list of different strings to select from. The first string A multiline edtibox for specifying the different inputs and a  No merge
Select most used






Attribute scripts and functions


Usage stories

The following are examples of what the attribute system could be used for. It is described how they can be made in order to prove that the system can be used for them all in the current state.


Temperature

The purpose is to create a temperature attribute describing the current temperature of an item. This temperature could be influenced by the temperature of the bag the item is in or the zone the player is currently in. If the item is a bag, then it would also be influenced by the temperature of the items in that bag.The influence by other items causing temperature change are following the thermodynamic laws, and are thus depending on a constant K for each item.


Procedure:

- Add a new attribute to the item named "temperature" with the type number and default value 20. The attribute can be only changeable by the item itself

- Add a new attribute with the name "heatConstant" and the type number. This constant describes how fast the given item can change heat.

- Add an attribute with the name "temperatureWithUnits" with the type "string". Default value is "20 degrees".

- Add a script to run each second to calculate the new temperature. The script can be parted into three parts. 1. Calculate the temperature influence by the container the item is in. 2. Calculate the temperature influence by the items contained by the item, if the item is a container. 3. Calculate the new temperature of the item, depending on the influences and the items own heatConsant.

- Add a script to run each tooltip update. Updates the temperatureWithUnits from the temperature. E.g. if temperature is 40, then the temperature with units is set to "40 degrees"

- A tooltip is added showing the text "@temperatureWithUnits", which displays the string as tooltip.


*Weight*


*Item size or category*


*Coins with a special detail one some of them*


*Guild contacts where each of them contains a unique signature*