DtlTraders/config: Difference between revisions

From Citizens Wiki
m (dodana nawigacja - lethe)
 
(16 intermediate revisions by the same user not shown)
Line 1: Line 1:
This page contains the default configuration file and a brief description of available options. <br /><br /><b>Note:</b> Any other config nodes appearing in the <i>config</i> are at this moment not used.<br />
To be sure that everyone of you will understand the configuration file I have decided to explain each config option here, I will try to give you examples how it will affect the way you can use this plugin, and how helpful it can be if your using more advanced features.  


== General config ==
== Default config file ==


    trader:  
<pre>
      locale:
debug: critical
        file: locale.eng
#locale settings
      manager-mode-toggle: 280
locale:
      inventory-navigation:  
  #the choosen localization to load
        sell-tab: '35:5'
  load: en
        buy-tab: '35:3'
  #should the locale updated autmaticaly, (not implemented)
        manage-price: '35:15'
  auto-update: false
        manage-buy-limit: '35:12'
#logging settings
        manage-global-limit: '35:11'
logging:
        manage-player-limit: '35:12'
  #should transactions be logged? (false/FILE/SQL/WEB) , (not used at this moment)
        return: 35
  log: false
        amounts-return: '35:14'
  #the foramt how transactions should be logged to FILE, (not used at this moment)
     bank:
  log-format: ''
      tab-size: 3
#statistics
      default-withdraw-fee: 0.0
statistics:  
      default-deposit-fee: 0.0
  #enable or disable statistics (not implemented)
      default-max-tabs: 9
  enabled: false
      tab-prices:  
  #metrics should be enabled? (not implemented)
        tab2: 100.0
  metrics: false
        tab3: 200.0
#trader types related settings
        tab4: 500.0
trader:
        tab5: 1000.0
  #sets if left clicking the Trader should damage him, if set to false the trader wont be damaged and the click will be handled as ManagerMode toogling
        tab6: 2000.0
  #when the player meets the requirements (permissions, and right-click = false)
        tab7: 5000.0
  #it this setting is set to true, manager modes is toggled only when sneaking
        tab8: 10000.0
  allow-damage: false
        tab9: 50000.0
  #item used to toggle between modes (air counts for anything)
      player-accounts:
  #transaction related settings
        file: player_accounts.yml
  transaction:
    money-bank:
    #sets if buying and selling should be done after clicking on a item twice in a row
      exchange-item: 388
    double-click: false
      item-value: 10.0 
  #manager mode related settings
       
  managing:
    #the starting stock when opening a trader (buy/sell)
    start-stock: sell
    #right click toggling (instead of left click, which is default from 3.0+)
    #Attention: When PvP is disabled in the world, and the NPC is Player-Type, left click may not work!
    #if r.click toggling is enabled the item needs to be other than AIR. If not set to an item "stick" item will be used.
    right-click: false
    item: 'air'
     #special blocks used when setting prices and limits, format => 'item_id value'
    special-blocks:
    - dirt 0.01
    - wood 0.1
    - log 10
    - cobblestone 100
    - stone 10000
  #stock related settings
  stock:
    #default starting stock (if this stock is set and not empty!, this does not apply for player traders)
    start-stock: 'sell'
    #default stock size in rows, min 1, max 6 (applied on creation)
    size: 6
    #default stock name format, how should be the traders stock named by default, {npc} tag for npc name
    format: '{npc}^r''s shop'
  #wallet related settings
  wallet:
    #default wallet type for traders (if set to infinite player traders will use "owner" type instead)
    type: 'infinite'
    #initial wallet money on creation (does not apply for player traders)
    money: 0.0
  #pattern related settings
  pattern:
    #default patterns applied to each market and server trader uppon creation (array setting)
    defaults: []
    #the file where patterns are saved
    file: 'patterns.yml'
  #book item related settings
  books:
    #the file where book datas are stored
    file: 'books.yml'
    #how should be books stored? (file)
    store: 'file'
  #player trader related settings
  player:
    #limits of player traders per player
    limit: 1
    #default stock size for player traders, if set overrides the stock.size setting
    size: 2
    #default stock name format, how should be the traders stock named by default, {npc} tag for npc name, and {player} for the traders owner
    #if set overrides the stock.format setting
    format: '{npc}^r''s shop, {player}''s company'
  #ui related settings
  ui:
    #item that will "link" to sell stock
    sell: wool:1
    #item that will "link" to buy stock
    buy: wool:2
    #item that will "link" back to a basic stock
    back: wool:14
    #item that will "link" to price managing
    price: wool:15
    #item that will "link" to limit managing
    limit: wool:3
    #item that will "unlock" the stock for eiding
    lock: wool:4
    #item that will "lock" the stock (saving all changes)
    unlock: wool:5
#denizen support related settings
denizen: []
</pre>
 
== Debug ==
Plugins sometimes got a debug logger, this feature allows you and me easier bug tracking, if a bug shows up, changing this node to a lower priority value, will show more information about the plugin actions and behavior. The dtlTraders debugger got '''six''' logging levels, <span style="color:red">'''critical'''</span>, <span style="color:orange">'''high'''</span>, <span style="color:gold">'''normal'''</span>, '''low''', '''info''', '''none'''.
 
 
Setting the level to '''none''' will totally mute the logger, so no error will be shown when anything goes wrong (unless its really serious).
 
The <span style="color:red">'''critical'''</span> level setting shows only errors that totally break the plugin actions, so they are really rare and should be reported to the plugin dev.  
 
The <span style="color:orange">'''high'''</span> level setting show errors that disturbed an action the plugin was performing, but did not changed the actions result.  
 
The <span style="color:gold">'''normal'''</span> level setting shows all things that can cause more serious problems.  
 
The '''low''' and '''info''' levels shows almost any information under the hood, these levels should not be used by server admins, nless you need information about the plugin behavior, the amount of data that will be sent by the logger will make the console unreadable.
 
 
Additionally there are custom logging levels, but are used only for specific cases.
 
=== Level relations ===
{| class="wikitable" style="" border="1"
|-
! Level
! Shows
|-
| None, [false, disabled]
| Nothing
|-
| <span style="color:red">Critical</span>
| <span style="color:red">Critical</span>
|-
| <span style="color:orange">High</span>
| <span style="color:orange">High</span>, <span style="color:red">Critical</span>
|-
| <span style="color:gold">Normal</span>
| <span style="color:gold">Normal</span>, <span style="color:orange">High</span>, <span style="color:red">Critical</span>
|-
| Low
| Low, <span style="color:gold">Normal</span>, <span style="color:orange">High</span>, <span style="color:red">Critical</span>
|-
| Info
| Info, Low, <span style="color:gold">Normal</span>, <span style="color:orange">High</span>, <span style="color:red">Critical</span>
|-
| Custom
| Custom
|}
 
== Locale section ==


=== Locale configuration (same for bankers and traders) ===
This section allows you to choose what language you want to use for this plugin and if it should auto update it if a new version was found.


This will be moved out of the <code style="padding:2px">trader</code> section.
    load: en


changes the file name and path for the locale file.
This node is used to choose the language you want to use, it first looks for a file with the name '''locale.<target>.yml''' in the '''locales''' folder, where the '''<target>''' part is the value you set in the '''load''' node, so for this example it would be '''locale.en.yml'''


<pre> trader.locale.file: locale.eng
trader.locale.path </pre>


It it is not present, it will try to look for that locale file in the plugins resources, if it fails to find it a second time a '''critical''' error is thrown, and the plugin will not work as it should.


=== Trader configuration ===
Configuration used by <b>player</b>, <b>server</b> and <b>enchant</b> traders.


==== Wand item ====
<pre> manager-mode-toggle: 280 </pre>


Config node will be renamed to <b>manager-wand</b> and moved out of the <code style="padding:2px">trader</code> section.
    auto-update: false


Allows to change the item that is used to toggle the <i>manager-mode</i>. Manager-mode allows you to edit offered goods or in the case of the player banker change the appearence of the inventory tabs.
<span style="color:darkcyan;font-weight:bold">Info:</span> This node is not used!


Default: _**stick**_
Setting the '''auto-update''' to '''true''' allows to manage locale updates, if a update is found ''(the locale version is higher)'' for the locale you are using, it will automatically replace all lines to the newest version.
==== Navigation settings ====
<pre>
sell-tab: '35:5'
buy-tab: '35:3'
</pre>


Defines the items used to switch between the <i>sell</i> and <i>buy</i> tabs, in both trader modes.
== Trader section ==
Default: different _**wool colors**_.


<pre> manage-price: '35:15'</pre>
All settings in this section affects the behavior of all traders on the server, so changing any setting here will affect every trader in game, however some settings will only affect new created traders.  
Defines the item used to toggle on the <i>price management</i>.


<pre> manage-buy-limit: '35:12'</pre>
Defines the item used to toggle the <i>buy</i> limit management. <i>(<b>player trader</b>)</i>


<pre>
<hr/>
manage-global-limit: '35:11
manage-player-limit: '35:12
</pre>
Defines the items used to toggle <i>global</i> and <i>player</i> limits. (<b>server trader</b>).


Chang<pre>
    allow-damage: false
return: 35
</pre>


Defines the item used to go back from <i>specific management</i> to the <i>stock management</i>. Like from <i>price management</i> to the general trader window.
Allows you to change the behavior when '''left-clicking''' ''(damaging)'' a trader. When set to '''false''' it will disable any damage done to the trader, moreover it will check the player if he has permissions to toggle '''manager mode''', unless the '''right-click''' setting is set to '''true'''.  


<pre>
If you set this setting to '''true''' you can damage a trader ''(if other citizen settings allow this too)'' and toggling '''manager mode''' is only possible when '''sneaking'''.
amounts-return: '35:14'
</pre>
Defines the item used to return from amount selection window.




=== Transactions ===


=== Banker configuration ===
    double-click: false
Configuration used by <b>player</b> and <b>guild</b> banks.


==== Tab size ====
Changes the click behavior when buying or selling, by default if set to '''false''' you sell and buy items clicking once on them, if set to '''true''' you will need to '''double-click''' the item to perform any action.
<pre> bank.tab-size: 3 </pre>
Allows to change the <i>"inventory size"</i> of the bank tab. Accepted values start at <b>1</b> and go up to <b>5</b>.  


==== Available tabs ====
<pre> default-max-tabs: 9</pre>
Defines how many tabs a user may buy. This is a global setting, so you can change this amount for each player in the <b>player_accounts.yml</b> file. Commands will be added in future.


==== Fees ====
=== More coming soon! ===
<pre>
default-withdraw-fee: 0.0
default-deposit-fee: 0.0
</pre>
You can set fees for <i>withdrawing</i> or <i>depositing</i> items in a bank tab.
<div><div style="color:red;display:table-cell">Note:</div> Fees are counted separately for each item - putting two stacks of 10 dirt into the bank will incur twice the fee of putting just one stack of 20 dirt.</div>


==== Tab prices ====
== denizen section ==
<pre>
tab-prices:
  tab1: 0.0
  tab2: 100.0
  tab3: 200.0
  tab4: 500.0
  tab5: 1000.0
  tab6: 2000.0
  tab7: 5000.0
  tab8: 10000.0
  tab9: 50000.0
</pre>
Allows to set prices tu unlock each tab in the <b>player banker</b>. Setting any amount other than 0 under <i>tab1</i> requires a player to have this much money before opening an account.
==== Bank accounts files ====
<pre>
player-accounts:
  file: player_accounts.yml
  path: ''
guild-accounts:
  file: guild_accounts.yml
  path: ''
</pre>
Player's accounts will be saved in <b>player_accounts.yml</b> file by default, guilds/factions/etc. accounts in the <b>guild_accounts.yml</b> file. You can change the file names and path for both of these files.
=== Money bankers ===
<pre>
    money-bank:
      exchange-item: 388
      item-value: 10.0
</pre>
Defines the item and it's value when using the money-bank type trader to convert between money and items.
== Navigation ==
{| class="wikitable" style="text-align: center; width: 500px"
|-
! 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]
|-
| 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]-->
|}

Latest revision as of 01:36, 6 February 2014

To be sure that everyone of you will understand the configuration file I have decided to explain each config option here, I will try to give you examples how it will affect the way you can use this plugin, and how helpful it can be if your using more advanced features.

Default config file

debug: critical
#locale settings
locale:
  #the choosen localization to load
  load: en
  #should the locale updated autmaticaly, (not implemented)
  auto-update: false
#logging settings
logging:
  #should transactions be logged? (false/FILE/SQL/WEB) , (not used at this moment)
  log: false
  #the foramt how transactions should be logged to FILE, (not used at this moment)
  log-format: ''
#statistics
statistics: 
  #enable or disable statistics (not implemented)
  enabled: false
  #metrics should be enabled? (not implemented)
  metrics: false
#trader types related settings
trader:
  #sets if left clicking the Trader should damage him, if set to false the trader wont be damaged and the click will be handled as ManagerMode toogling
  #when the player meets the requirements (permissions, and right-click = false)
  #it this setting is set to true, manager modes is toggled only when sneaking 
  allow-damage: false
  #item used to toggle between modes (air counts for anything)
  #transaction related settings
  transaction:
    #sets if buying and selling should be done after clicking on a item twice in a row
    double-click: false
  #manager mode related settings
  managing:
    #the starting stock when opening a trader (buy/sell)
    start-stock: sell
    #right click toggling (instead of left click, which is default from 3.0+) 
    #Attention: When PvP is disabled in the world, and the NPC is Player-Type, left click may not work!
    #if r.click toggling is enabled the item needs to be other than AIR. If not set to an item "stick" item will be used.
    right-click: false
    item: 'air'
    #special blocks used when setting prices and limits, format => 'item_id value'
    special-blocks:
    - dirt 0.01
    - wood 0.1
    - log 10
    - cobblestone 100
    - stone 10000
  #stock related settings
  stock:
    #default starting stock (if this stock is set and not empty!, this does not apply for player traders)
    start-stock: 'sell'
    #default stock size in rows, min 1, max 6 (applied on creation)
    size: 6
    #default stock name format, how should be the traders stock named by default, {npc} tag for npc name
    format: '{npc}^r''s shop'
  #wallet related settings
  wallet:
    #default wallet type for traders (if set to infinite player traders will use "owner" type instead)
    type: 'infinite'
    #initial wallet money on creation (does not apply for player traders)
    money: 0.0
  #pattern related settings
  pattern:
    #default patterns applied to each market and server trader uppon creation (array setting)
    defaults: []
    #the file where patterns are saved
    file: 'patterns.yml'
  #book item related settings
  books:
    #the file where book datas are stored
    file: 'books.yml'
    #how should be books stored? (file)
    store: 'file'
  #player trader related settings
  player:
    #limits of player traders per player
    limit: 1
    #default stock size for player traders, if set overrides the stock.size setting
    size: 2
    #default stock name format, how should be the traders stock named by default, {npc} tag for npc name, and {player} for the traders owner
    #if set overrides the stock.format setting
    format: '{npc}^r''s shop, {player}''s company'
  #ui related settings
  ui:
    #item that will "link" to sell stock
    sell: wool:1
    #item that will "link" to buy stock
    buy: wool:2
    #item that will "link" back to a basic stock
    back: wool:14
    #item that will "link" to price managing
    price: wool:15
    #item that will "link" to limit managing
    limit: wool:3
    #item that will "unlock" the stock for eiding
    lock: wool:4
    #item that will "lock" the stock (saving all changes)
    unlock: wool:5
#denizen support related settings
denizen: []

Debug

Plugins sometimes got a debug logger, this feature allows you and me easier bug tracking, if a bug shows up, changing this node to a lower priority value, will show more information about the plugin actions and behavior. The dtlTraders debugger got six logging levels, critical, high, normal, low, info, none.


Setting the level to none will totally mute the logger, so no error will be shown when anything goes wrong (unless its really serious).

The critical level setting shows only errors that totally break the plugin actions, so they are really rare and should be reported to the plugin dev.

The high level setting show errors that disturbed an action the plugin was performing, but did not changed the actions result.

The normal level setting shows all things that can cause more serious problems.

The low and info levels shows almost any information under the hood, these levels should not be used by server admins, nless you need information about the plugin behavior, the amount of data that will be sent by the logger will make the console unreadable.


Additionally there are custom logging levels, but are used only for specific cases.

Level relations

Level Shows
None, [false, disabled] Nothing
Critical Critical
High High, Critical
Normal Normal, High, Critical
Low Low, Normal, High, Critical
Info Info, Low, Normal, High, Critical
Custom Custom

Locale section

This section allows you to choose what language you want to use for this plugin and if it should auto update it if a new version was found.

   load: en

This node is used to choose the language you want to use, it first looks for a file with the name locale.<target>.yml in the locales folder, where the <target> part is the value you set in the load node, so for this example it would be locale.en.yml


It it is not present, it will try to look for that locale file in the plugins resources, if it fails to find it a second time a critical error is thrown, and the plugin will not work as it should.


   auto-update: false

Info: This node is not used!

Setting the auto-update to true allows to manage locale updates, if a update is found (the locale version is higher) for the locale you are using, it will automatically replace all lines to the newest version.

Trader section

All settings in this section affects the behavior of all traders on the server, so changing any setting here will affect every trader in game, however some settings will only affect new created traders.



   allow-damage: false

Allows you to change the behavior when left-clicking (damaging) a trader. When set to false it will disable any damage done to the trader, moreover it will check the player if he has permissions to toggle manager mode, unless the right-click setting is set to true.

If you set this setting to true you can damage a trader (if other citizen settings allow this too) and toggling manager mode is only possible when sneaking.


Transactions

   double-click: false

Changes the click behavior when buying or selling, by default if set to false you sell and buy items clicking once on them, if set to true you will need to double-click the item to perform any action.


More coming soon!

denizen section