User:TheFrz/Item filter
Item filter is an optional feature for players to customize item apperance of the ground by filtering items into groups and setting new styles to them. Item filter script language provides a wide and deep item searching (conditions) and styling (colors, sizes, sounds, etc.).
There is no in-game system for item filters, they have to be written by end user in a text file and then enabled in the game.
Setup
- Step 2
- Put a text file with
.filter
extension there: - If you cannot see your file extension, Show/Hide File extensions in Windows
- Step 3
- Go to the in-game Options menu and click on the UI tab. You should see this new option, located at the very bottom of the list:
- If your filter file has not a
.filter
extension, or it is not located in the same folder as yourproduction_Config.ini
file, you won't see this option.
- Step 4
- Clicking 'Reload' will display this message if the filter is working correctly:
- Unless there will be an error messege with line number and error text itself.
Syntax
The syntax of item filters is a simple set of rules that define a correctly structured and valid script. The item filter don't load if it has invalid syntax.
Structure
The basic structure of a script is a collection of Show
and Hide
blocks that each specify certain options. Anything matched by a Show
block will be shown and anything matched by a Hide
block will be hidden. If there are multiple conditions in a block then all of them must be matched for the block to match an item.
In the example above you can see a basic example of a script that displays Empower gem with a green border, all gems with 15% quality or higher have bigger text size and all other gems become hidden.
The blocks are matched in the order they come in the file which means items can be matched only once. In this example an Empower gem with 15% quality has a border but hasn't increased text size. This happens because Empower matches conditions in the first block and search for another matching stops. This behaviour makes block ordering very important.
An empty block matches all items, which means that the Hide
at the end of the file effectively hides everything that wasn't specifically shown.
Comments
Only inline comments are supported. They begin with #
symbol and use newline character to indicate the end of the comment. Comments can be placed everywhere except the end of conditions. The example below shows valid and invalid positions for comments:
# valid Show # valid Class "Gem" # invalid, unable to pass parameter BaseType "Empower" # invalid, unable to pass parameter # valid SetBorderColor 27 162 155 # valid
Case sensivity
Item filter is case sensitive. For example using show
instead of Show
leads to invalid code.
Whitespace
Spaces, tabs and newlines used outside of string constants are called whitespace. Item filter is whitespace insensitive.
Show Class "Gem" BaseType "Empower" SetBorderColor 27 162 155 Hide Class "Gem" # this works
Although it is possible to write down the whole script in 1 line this makes your code unreadable for users.
Conditions
Conditions are options that describe what items will be matched with a block they are inside of. Some conditions allow to use comparision operators such as >
, >=
, <
or <=
.
Option | Type | Valid values | Description |
---|---|---|---|
ItemLevel [operator ] level
|
Number | any, usually 0 –100
|
The item level the item was generated at. |
DropLevel [operator ] level
|
Number | any, usually 0 –100
|
The level that the item starts dropping at. |
Quality [operator ] quality
|
Number | any, usually 0 –20
|
The amount of quality on the item. |
Rarity [operator ] rarity
|
String | Normal , Magic , Rare or Unique
|
Rarity of the item. |
Class classes
|
String | string of full or partial class names | The item class. Specifying part of a class name is allowed and will match any classes with that text in the name. |
BaseType basetypes
|
String | string of full or partial base types | The base type of the item. Specifying a part of a base type name is allowed and will match any of the base types with that text in the name. |
Sockets [operator ] sockets
|
Number | any, usually 0 –6
|
Total number of sockets that the item has. |
LinkedSockets [operator ] links
|
Number | any, usually 0 –6
|
The size of the largest group of linked sockets that the item has. |
SocketGroup group
|
String | combination of R , G , B and W
|
A group of linked sockets that contains the specified combination. |
Height [operator ] height
|
Number | any, usually 1 –4
|
The number of slots the item takes on the Y-axis (verical axis), i.e. the height of the item. |
Width [operator ] width
|
Number | any, usually 1 –2
|
The number of slots the item takes on the X-axis (horizontal axis), i.e. the width of the item. |
Styling
Certain items have their own look (i.e. gems have green text color, maps have borders etc.). Item filter system allow users to override default values with another.
Option | Type | Valid values | Description |
---|---|---|---|
SetBackgroundColor color
|
RGB or RGBA | 0 –255 0 –255 0 –255 [0 –255 ]
|
Background color of item box |
SetBorderColor color
|
RGB or RGBA | 0 –255 0 –255 0 –255 [0 –255 ]
|
Border color of item box |
SetTextColor color
|
RGB or RGBA | 0 –255 0 –255 0 –255 [0 –255 ]
|
Text color |
SetFontSize size
|
Number | 18 –45
|
Size of the text (default: 32 )
|
PlayAlertSound sound [volume ]
|
Number | 1 –9 [0 –100 ]
|
Sound on item drop |
Guidelines
Item classes
Base types
Colours
Development tools
Troubleshooting
Version history
Version | Changes |
---|---|
2.0.0 |
|