DtlTraders/patterns: Difference between revisions

From Citizens Wiki
No edit summary
No edit summary
Line 1: Line 1:
What are those patterns, I bet many of you are just confused abut it how does it work, what does it add and how you can use it. You could hear some things when I talked about it, here I'm going to explain what does it add.
== Overview ==
All patterns basically should be saved in the ''patterns.yml'', in the main plugin folder. (plugins/DtlCitizensTrader)<br /> You may change the directory in the ''config.yml''.
There are 3 types of patterns, even when each type is just a simple part of a whole pattern. We got ''Pricing patterns'', where you just set item prices and pricing tiers. Another pattern type is ''Items pattern'' so this pattern will add items to the traders stock, but here you can also set 2 items under the same slot which can be used in different ways, going to show one here. Third type is a special pattern construction used by ''Market traders'', so you need to set them properly.
== Basics ==
Here you got a example basic ''pricing pattern'':
<div style="border: solid 1px black;padding:10px;padding-top:0px"><span style="white-space: pre;color:darkgreen;">
default:
<span>  prices: </span>
<span>    all: </span>
<span>      multiplier: <tt style="color:black;background-color: #F8F8E0;border: solid 1px black;padding:0px 1px">1.0</tt></span>
<span>      35: <tt style="color:black;background-color: #F8F8E0;border: solid 1px black;padding:0px 1px">1.5</tt></span>
<span>      '35:2': <tt style="color:black;background-color: #F8F8E0;border: solid 1px black;padding:0px 1px">2.0</tt></span>
<span>    sell: </span>
<span>      1: <tt style="color:black;background-color: #F8F8E0;border: solid 1px black;padding:0px 1px">0.33</tt></span>
<span>      2: <tt style="color:black;background-color: #F8F8E0;border: solid 1px black;padding:0px 1px">0.66</tt></span>
<span>      3: <tt style="color:black;background-color: #F8F8E0;border: solid 1px black;padding:0px 1px">0.99</tt></span>
<span>    buy: </span>
<span>      multiplier: <tt style="color:black;background-color: #F8F8E0;border: solid 1px black;padding:0px 1px">0.9</tt></span>
<span>      1: <tt style="color:black;background-color: #F8F8E0;border: solid 1px black;padding:0px 1px">0.33</tt></span>
<span>      2: <tt style="color:black;background-color: #F8F8E0;border: solid 1px black;padding:0px 1px">0.66</tt></span>
<span>      3: <tt style="color:black;background-color: #F8F8E0;border: solid 1px black;padding:0px 1px">0.99</tt></span>
</span></div>
This shows how to set a ''pricing pattern'', it isn't really hard to understand, the '''all''' section will set prices for both tabs, where '''sell''' sets prices for sell tab and '''buy''' for buy tab, the multiplier is used to fast change prices, like all prices on server where to high, so lets lesser them by 10% = 0.9, if no multiplier is set it's just 1.0 so you could remove that multiplier in the all section if set any multiplier in ''sell'' or ''buy'' overrides the ''all'' multiplier, so in this example 0.9 overrides 1.0 so sell got not 1.0 and buy got prices of 0.9 basic price.
Also if you got items with additional data like ''wool'', you can set the price for each wool by just using the id 35: <price>, but if you add '35:0': it will only apply to ''white wool'', if both are set the more specific version will override the general price for that id so 35: <price> will be overridden by '35:0': <another price> just for while wool, all other wool colors will have <price>.
But how does tiering works?
A tier is like a pattern within a pattern, so tiers override the patterns prices, except multipliers, because those are calculated from the highest tier down to the general pattern.
so settings two tiers ''tier1'' with multipliers 0.9 and ''tier2'' with multiplier 0.8, will cause each Player with tier1 to have prices multiplied by 0.9*1.0 default multiplier for general pattern, but each player with both tiers will cause to have the price multiplied by 0.8*0.9*1.0, this allows to easily change prices for groups of VIPS, lets say we got VIP and VIP+ but we want both groups to lesser prices, so we just need to lesser them in ''tier1'' if VIP2 got both tiers.
where do we put tiers? A tiered pricing pattern looks like this
<div style="border: solid 1px black;padding:10px;padding-top:0px"><span style="white-space: pre;color:darkgreen;">
default:
<span>  prices: </span>
<span>    all: </span>
<span>      multiplier: <tt style="color:black;background-color: #F8F8E0;border: solid 1px black;padding:0px 1px">1.0</tt></span>
<span>      35: <tt style="color:black;background-color: #F8F8E0;border: solid 1px black;padding:0px 1px">1.5</tt></span>
<span>      '35:2': <tt style="color:black;background-color: #F8F8E0;border: solid 1px black;padding:0px 1px">2.0</tt></span>
<span>    sell: </span>
<span>      1: <tt style="color:black;background-color: #F8F8E0;border: solid 1px black;padding:0px 1px">0.33</tt></span>
<span>      2: <tt style="color:black;background-color: #F8F8E0;border: solid 1px black;padding:0px 1px">0.66</tt></span>
<span>      3: <tt style="color:black;background-color: #F8F8E0;border: solid 1px black;padding:0px 1px">0.99</tt></span>
<span>    buy: </span>
<span>      multiplier: <tt style="color:black;background-color: #F8F8E0;border: solid 1px black;padding:0px 1px">0.9</tt></span>
<span>      1: <tt style="color:black;background-color: #F8F8E0;border: solid 1px black;padding:0px 1px">0.33</tt></span>
<span>      2: <tt style="color:black;background-color: #F8F8E0;border: solid 1px black;padding:0px 1px">0.66</tt></span>
<span>      3: <tt style="color:black;background-color: #F8F8E0;border: solid 1px black;padding:0px 1px">0.99</tt></span>
<span>    tier1: </span>
<span>      all: </span>
<span>        multiplier: <tt style="color:black;background-color: #F8F8E0;border: solid 1px black;padding:0px 1px">0.9</tt></span>
<span>      sell: </span>
<span>        2: <tt style="color:black;background-color: #F8F8E0;border: solid 1px black;padding:0px 1px">0.11</tt></span>
<span>      buy: </span>
<span>        multiplier: <tt style="color:black;background-color: #F8F8E0;border: solid 1px black;padding:0px 1px">1.1</tt></span>
</span></div>
so with that pattern grass would be cost 0.11*0.9*1.0 for a player with the tier1 permission 
<!--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.


Line 114: Line 184:
<br />
<br />
The first entry will be the one shown in the trader window. But even though there are 16 different assignments packed in a single slot the plugin still treats them as separate and players will be able to sell the items as normal.
The first entry will be the one shown in the trader window. But even though there are 16 different assignments packed in a single slot the plugin still treats them as separate and players will be able to sell the items as normal.
-->
== Navigation ==
== Navigation ==
{| class="wikitable" style="text-align: center; width: 500px"
{| class="wikitable" style="text-align: center; width: 500px"
|-
|-
! style="width: 100%; background-color:#ADD8E6" colspan="2" | '''DtlTraders'''
! style="width: 100%; background-color:#ADD8E6" colspan="2" | '''DtlTraders'''
|-
|-
| Usage || | [http://wiki.citizensnpcs.com/DtlTraders/managing Managing] | [http://wiki.citizensnpcs.com/DtlTraders/trading Trading] <!--| [http://wiki.citizensnpcs.com/DtlTraders/banking Banking] -->| [http://wiki.citizensnpcs.com/DtlTraders/patterns Patterns]
| Configuration || | <!--[http://wiki.citizensnpcs.com/DtlTraders/config Configuration] |--> [http://wiki.citizensnpcs.com/DtlTraders/Commands Commands] | [http://wiki.citizensnpcs.com/DtlTraders/permissions Permissions] <!--| [http://wiki.citizensnpcs.com/DtlTraders/locale Locale] -->
|-
|-
| Configuration || | [http://wiki.citizensnpcs.com/DtlTraders/config Configuration] | [http://wiki.citizensnpcs.com/DtlTraders/Commands Commands] | [http://wiki.citizensnpcs.com/DtlTraders/permissions Permissions] | [http://wiki.citizensnpcs.com/DtlTraders/locale Locale]
| Usage || | <!--[http://wiki.citizensnpcs.com/DtlTraders/managing Managing] | [http://wiki.citizensnpcs.com/DtlTraders/trading Trading] | [http://wiki.citizensnpcs.com/DtlTraders/banking Banking] | [http://wiki.citizensnpcs.com/DtlTraders/patterns Patterns-->
|-
|-
| Types || | [http://wiki.citizensnpcs.com/DtlTraders/traders Traders] | [http://wiki.citizensnpcs.com/DtlTraders/bankers Bankers] <!--| [http://wiki.citizensnpcs.com/DtlTraders/auctionhouse Auction House] | [http://wiki.citizensnpcs.com/DtlTraders/wallets Wallets]-->
| Types || | <!--[http://wiki.citizensnpcs.com/DtlTraders/traders Traders] | [http://wiki.citizensnpcs.com/DtlTraders/bankers Bankers] | [http://wiki.citizensnpcs.com/DtlTraders/auctionhouse Auction House] | [http://wiki.citizensnpcs.com/DtlTraders/wallets Wallets]-->
|}
|}
-->

Revision as of 19:31, 27 December 2012

What are those patterns, I bet many of you are just confused abut it how does it work, what does it add and how you can use it. You could hear some things when I talked about it, here I'm going to explain what does it add.

Overview

All patterns basically should be saved in the patterns.yml, in the main plugin folder. (plugins/DtlCitizensTrader)
You may change the directory in the config.yml.


There are 3 types of patterns, even when each type is just a simple part of a whole pattern. We got Pricing patterns, where you just set item prices and pricing tiers. Another pattern type is Items pattern so this pattern will add items to the traders stock, but here you can also set 2 items under the same slot which can be used in different ways, going to show one here. Third type is a special pattern construction used by Market traders, so you need to set them properly.


Basics

Here you got a example 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

This shows how to set a pricing pattern, it isn't really hard to understand, the all section will set prices for both tabs, where sell sets prices for sell tab and buy for buy tab, the multiplier is used to fast change prices, like all prices on server where to high, so lets lesser them by 10% = 0.9, if no multiplier is set it's just 1.0 so you could remove that multiplier in the all section if set any multiplier in sell or buy overrides the all multiplier, so in this example 0.9 overrides 1.0 so sell got not 1.0 and buy got prices of 0.9 basic price.

Also if you got items with additional data like wool, you can set the price for each wool by just using the id 35: <price>, but if you add '35:0': it will only apply to white wool, if both are set the more specific version will override the general price for that id so 35: <price> will be overridden by '35:0': <another price> just for while wool, all other wool colors will have <price>.


But how does tiering works?

A tier is like a pattern within a pattern, so tiers override the patterns prices, except multipliers, because those are calculated from the highest tier down to the general pattern.

so settings two tiers tier1 with multipliers 0.9 and tier2 with multiplier 0.8, will cause each Player with tier1 to have prices multiplied by 0.9*1.0 default multiplier for general pattern, but each player with both tiers will cause to have the price multiplied by 0.8*0.9*1.0, this allows to easily change prices for groups of VIPS, lets say we got VIP and VIP+ but we want both groups to lesser prices, so we just need to lesser them in tier1 if VIP2 got both tiers.

where do we put tiers? A tiered pricing pattern looks like this

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

so with that pattern grass would be cost 0.11*0.9*1.0 for a player with the tier1 permission


Navigation

DtlTraders
Configuration Commands | Permissions
Usage
Types