DtlTraders/patterns: Difference between revisions
No edit summary |
(lethezord) |
||
Line 1: | Line 1: | ||
== Overview == | |||
Every pattern is saved in the ''patterns.yml'' file located in the plugin's main folder. (plugins/DtlCitizensTrader)<br /> You can change the directory in the configuration file. | |||
There are 3 types of patterns: | |||
- ''Pricing patterns''<br> | |||
Sets item prices and pricing tiers. | |||
- ''Item patterns''<br> | |||
Will add certain items to the trader's stock. | |||
By using item patterns you can also set two items in the same slot and each can have a different function. An example of this can be found below. | |||
- ''Market traders''<br> | |||
A special pattern used by market traders. It has a different construction so care has to be taken to set it up properly. | |||
== Basics == | == Basics == | ||
An example of a basic ''pricing pattern'': | |||
<div style="border: solid 1px black;padding:10px;padding-top:0px"><span style="white-space: pre;color:darkgreen;"> | <div style="border: solid 1px black;padding:10px;padding-top:0px"><span style="white-space: pre;color:darkgreen;"> | ||
default: | default: | ||
Line 30: | Line 39: | ||
</span></div> | </span></div> | ||
In the '''all''' section you can set item price for both buying and selling. To change the item's value depending on the transaction type you can use the '''sell''' and '''buy''' sections.<br> | |||
<br> | |||
The multiplier is used to quickly change prices. By using this setting you can adjust prices on the server scale just by setting a single number. You could for example lower the value of any offered item by setting multiplier to 0.9 - every price would then be reduced by 10%. When no multiplier is set the value defaults to 1.0.<br> | |||
<br> | |||
Multipliers set in the ''sell'' or ''buy'' sections have higher priority than those set in the ''all'' section. In the above example '''0.9''' set in the '''buy''' block overrides '''1.0''' set in the '''all''' section.<br> | |||
<br> | |||
When dealing with blocks that use additional data value such as colored wool keep in mind that you can, for example, set the price of any wool by using 35: <price>. Changing that line to '35:0': <price> would only apply to ''white wool''. Moreover if you set the general price for wool '''(35: <price1>)''' and then assign a different price to the white wool '''('35:0': <price2>)''' then the more specific assignment has priority. In this case every wool block would cost <price1> with the exception of white wool which would be set to <price2>. | |||
== Tiers == | |||
Tiers allow you to define multiple patterns and apply them automatically depending on the user's permissions. Each tier can have a different multiplier and/or item prices. | |||
For example creating two tiers - ''tier1'' with multiplier set to 0.9, and ''tier2'' with multiplier set to 0.8 will have the following effect: | |||
[the author isn't sure what will happen. this bit will be updated soon] | |||
Tiers are defined after the pattern and have exactly the same structure. | |||
<div style="border: solid 1px black;padding:10px;padding-top:0px"><span style="white-space: pre;color:darkgreen;"> | <div style="border: solid 1px black;padding:10px;padding-top:0px"><span style="white-space: pre;color:darkgreen;"> | ||
default: | default: | ||
Line 67: | Line 81: | ||
</span></div> | </span></div> | ||
[the author isn't sure what will happen. this bit will be updated soon] | |||
<!--This page shows how to use the price patterns. Below is a sample pattern along with an explanation of how it works and what changes when using it together with manager mode. | <!--This page shows how to use the price patterns. Below is a sample pattern along with an explanation of how it works and what changes when using it together with manager mode. |
Revision as of 22:13, 27 December 2012
Overview
Every pattern is saved in the patterns.yml file located in the plugin's main folder. (plugins/DtlCitizensTrader)
You can change the directory in the configuration file.
There are 3 types of patterns:
- Pricing patterns
Sets item prices and pricing tiers.
- Item patterns
Will add certain items to the trader's stock.
By using item patterns you can also set two items in the same slot and each can have a different function. An example of this can be found below.
- Market traders
A special pattern used by market traders. It has a different construction so care has to be taken to set it up properly.
Basics
An example of a basic pricing pattern:
default: prices: all: multiplier: 1.0 35: 1.5 '35:2': 2.0 sell: 1: 0.33 2: 0.66 3: 0.99 buy: multiplier: 0.9 1: 0.33 2: 0.66 3: 0.99
In the all section you can set item price for both buying and selling. To change the item's value depending on the transaction type you can use the sell and buy sections.
The multiplier is used to quickly change prices. By using this setting you can adjust prices on the server scale just by setting a single number. You could for example lower the value of any offered item by setting multiplier to 0.9 - every price would then be reduced by 10%. When no multiplier is set the value defaults to 1.0.
Multipliers set in the sell or buy sections have higher priority than those set in the all section. In the above example 0.9 set in the buy block overrides 1.0 set in the all section.
When dealing with blocks that use additional data value such as colored wool keep in mind that you can, for example, set the price of any wool by using 35: <price>. Changing that line to '35:0': <price> would only apply to white wool. Moreover if you set the general price for wool (35: <price1>) and then assign a different price to the white wool ('35:0': <price2>) then the more specific assignment has priority. In this case every wool block would cost <price1> with the exception of white wool which would be set to <price2>.
Tiers
Tiers allow you to define multiple patterns and apply them automatically depending on the user's permissions. Each tier can have a different multiplier and/or item prices.
For example creating two tiers - tier1 with multiplier set to 0.9, and tier2 with multiplier set to 0.8 will have the following effect:
[the author isn't sure what will happen. this bit will be updated soon]
Tiers are defined after the pattern and have exactly the same structure.
default: prices: all: multiplier: 1.0 35: 1.5 '35:2': 2.0 sell: 1: 0.33 2: 0.66 3: 0.99 buy: multiplier: 0.9 1: 0.33 2: 0.66 3: 0.99 tier1: all: multiplier: 0.9 sell: 2: 0.11 buy: multiplier: 1.1
[the author isn't sure what will happen. this bit will be updated soon]
DtlTraders | |
---|---|
Configuration | Commands | Permissions |
Usage | |
Types |