Updated Configuration (markdown)

mikeprimm 2011-08-07 16:02:08 -07:00
parent 44dc1ccbad
commit 797836ae6f

@ -5,6 +5,7 @@ The configuration in the file `plugins/dynmap/configuration.txt` which is in YAM
Just as a reference, you can view the default configuration here: https://github.com/webbukkit/dynmap/blob/recommended/src/main/resources/configuration.txt.
The configuration consists of 4 parts in the following order: components, global settings, world-templates and worlds. The global settings change behaviour of the rendering and the (internal) webserver of Dynmap. It should be obvious how these work. An example of a global setting is:
```yaml
# How often a tile gets rendered (in seconds).
renderinterval: 1
@ -15,6 +16,7 @@ renderinterval: 1
## Components ##
The components-section looks a like:
```yaml
components:
- class: org.dynmap.ClientConfigurationComponent
@ -25,9 +27,11 @@ components:
webchat-interval: 5
...
```
Each component can be thought of as an separate feature of Dynmap, which can be disabled and enabled individually. Some components depend on others, but we won't get into that. Each component starts in the configuration with a `- class: ...` followed by the properties of that component.
As an example we're going to disable the component that handles chat-balloons. This component looks like this:
```yaml
...
- class: org.dynmap.ClientComponent
@ -35,7 +39,9 @@ As an example we're going to disable the component that handles chat-balloons. T
focuschatballoons: false
...
```
We can disable it by just deleting these lines, but a safer way is to comment them. For this example I've added the lines before and after the component to give a better impression:
```yaml
...
- class: org.dynmap.ClientComponent
@ -49,6 +55,7 @@ We can disable it by just deleting these lines, but a safer way is to comment th
messagettl: 5
...
```
Be sure to have still the correct number of spaces in front of the `#`.
After saving the configuration, reloading Dynmap and refreshing the browser, chat balloons won't pop up anymore.
The same method can be used to enable already disabled components.
@ -58,9 +65,10 @@ The same method can be used to enable already disabled components.
In the configuration you'll also see a worlds section (since 0.20, this is found in the **worlds.txt** file; previously, it was found near the bottom of the **configuration,txt** file). This section can be left empty - Dynmap will automatically find all worlds defined for a server, and provide them with a default map configuration, based on using **templates**, as defined in the _templates:_ section. Since 0.20, the templates definitions have been moved from **configuration.txt** into separate files found in the **templates/** directory, but otherwise function as they have previously.
### Templates
By default there are three templates: normal, nether and skylands. The template that is chosen for a certain world depends on the environment of the world - **normal** for normal worlds, **nether** for nether worlds, **skylands** for skyland worlds. As of 0.20, these definitions are found in files under the **templates/** directory, with filenames corresponding to the template's name: **templates/normal.txt**, **templates/nether.txt**, and **templates/skylands.txt**, respectively.
In 0.20, the names of the templates chosen can be modified by using the _deftemplatesuffix_ setting in configuration.txt. If defined, the name of the template used for a world with a given environment will have a hyphen followed by the value of the _deftemplatesuffix_ setting added: so, setting _deftemplatessuffix_ to **hires** causes the template **normal-hires** to be used for normal worlds, **nether-hires** to be used for nether worlds, and **skylands-hires** to be used for skylands worlds. This allows dynmap (and other users) to supply matched "sets" of templates, with a common suffix, that can be easily selected using the _deftemplatessuffix_ setting. In 0.20, 3 sets of templates are provided:
In 0.20, the names of the templates chosen can be modified by using the _deftemplatesuffix_ setting in configuration.txt. If defined, the name of the template used for a world with a given environment will have a hyphen followed by the value of the _deftemplatesuffix_ setting added: so, setting _deftemplatesuffix_ to **hires** causes the template **normal-hires** to be used for normal worlds, **nether-hires** to be used for nether worlds, and **skylands-hires** to be used for skylands worlds. This allows dynmap (and other users) to supply matched "sets" of templates, with a common suffix, that can be easily selected using the _deftemplatesuffix_ setting. In 0.20, 3 sets of templates are provided:
- the default (**normal**,**nether**,**skylands**)
@ -71,20 +79,24 @@ In 0.20, the names of the templates chosen can be modified by using the _deftemp
In all cases, the template definition can be found in the file under the **templates/** directory with the corresponding name, plus **.txt** (e.g. **normal-hires** is found in **templates/normal-hires.txt**).
### Worlds
Next to the templates we also have a worlds section in the configuration. As of 0.20, the preferred location for this section is the **worlds.txt** file. Here we can specify options for each individual world. We'll describe the uses by examples.
Basically each world has a few default values. `title` is set to the name of the world, `template` is set to the environment of the world and `enabled` is by default true (the meaning of these values are explained below). The template of the world can override these values, but the properties in the world-section can in turn override the values of the template.
Basically each world has a few default values. _title_ is set to the name of the world, _template_ is set to the environment of the world (with a hyphen and the value of the _deftemplatesuffix_ appended, if _deftemplatesuffix_ is defined in **configuration.txt**) and _enabled_ is by default true (the meaning of these values are explained below). The template of the world can override these values, but the properties in the world-section can in turn override the values of the template.
If you have 3 worlds with the names **world**, **nether** and **alternative**, and you want to **show them in a particular order**, you can put the following in your configuration:
If you have 3 worlds with the names `world`, `nether` and `alternative`, and you want to **show them in a particular order**, you can put the following in your configuration:
```yaml
worlds:
- name: world
- name: alternative
- name: nether
```
So that they are ordered like `world`, `alternative`, `nether`.
So that they are ordered like **world**, **alternative**, **nether**.
To **change the title** of a certain world that is shown on the map, you can add a title property for that world:
```yaml
worlds:
- name: world
@ -92,9 +104,11 @@ worlds:
- name: alternative
- name: nether
```
Of course you can do this for all your worlds.
If you want to **disable a certain world**, for example the world `alternative`, you can do so by adding the property `enable: false`:
If you want to **disable a certain world**, for example the world **alternative**, you can do so by adding the property _enable: false_:
```yaml
worlds:
- name: world
@ -103,9 +117,11 @@ worlds:
enabled: false
- name: nether
```
You can also use this property in your templates to (for example) disable all worlds of a certain environment.
If you want to **change some of the properties for one specific world**, you can do so specifying that property. This includes the `maps:` property, so you can specify the maps for a specific world:
If you want to **change some of the properties for one specific world**, you can do so specifying that property. This includes the _maps:_ property, so you can specify the maps for a specific world:
```yaml
- name: world
title: "My Super Awesome World"
@ -120,9 +136,11 @@ If you want to **change some of the properties for one specific world**, you can
prefix: flat
colorscheme: default
```
This will, for this particular world, set the center of the world to (100,64,0) and shows only flatmap in the sidebar.
Finally if you have **multiple worlds that have the same configuration in common**, you can add a template to the `templates:` section (or, better yet, as a custom template file under the **templates** directory) and specify for those worlds in particular the name of that template.
Finally if you have **multiple worlds that have the same configuration in common**, you can add a template to the _templates:_ section (or, better yet, as a custom template file under the **templates/** directory) and specify for those worlds in particular the name of that template.
```yaml
templates:
mycustomtemplate:
@ -141,8 +159,9 @@ worlds:
template: mycustomtemplate
- name: alternative
```
Here `world` and `nether` both use the `mycustomtemplate` template, but `alternative` will still use the `normal` template (since `alternative` has an normal environment in this example).
As you can see above, for each FlatMap or KzedMap map, a certain colorscheme can be set. The colorschemes can be found in `plugins/dynmap/colorschemes/`, as seen here https://github.com/webbukkit/dynmap/tree/recommended/colorschemes. An overview of how these look like can be found here [[Color Schemes]].
Here **world** and **nether** both use the **mycustomtemplate** template, but **alternative** will still use the **normal** template (since **alternative** has an normal environment in this example).
As you can see above, for each FlatMap or KzedMap map, a certain colorscheme can be set. The colorschemes can be found in **plugins/dynmap/colorschemes/**, as seen here https://github.com/webbukkit/dynmap/tree/recommended/colorschemes. An overview of how these look like can be found here [[Color Schemes]].
As of 0.20, a new type of map definition has been provided - the HDMap. This map type, besides supporting higher resolution map rendering and use of texture packs, also supports all existing FlatMap and KzedMap features, but with more flexibility (allowing customized direction of view, angle of view, scale, etc). For details on configuring HDMaps, see [[HD Map Configuration]].