Denizen/0.7/File Structure

From Citizens Wiki

< Denizen‎ | 0.7

Revision as of 04:46, 13 September 2012 by Aufdemrand (talk | contribs)

File structure in Denizen is important to understand since it requires the use of a few different YML files to operate properly, so let's first go over the file structure. See below for more details about each file. This section may seem bloated, but please read it to get a good understanding of the file structure since you will be using these a lot!


denizen.jar

We have gotten a few questions about where to place the Denizen JAR file, especially from former users of Citizens 1.2, where Citizens-types went in a special folder. This is not the case for Citizens2 or Denizen. It should be treated like any other bukkit plugin and be placed in your craftbukkit/plugins/ folder. Please note that while a lot of plugins will automatically generate a folder to go along with it, Denizen does not, and this should be either created by hand and populated, or generated by copying the Start-up Kit with sample .yml configuration files and scripts.


config.yml

Denizen File Structure

The Denizen config.yml contains nodes to alter the stock behavior and look of Denizen. You can use the config.yml to override defaults.

This file can be reloaded from disk to Denizen memory at any time by using /denizen reload. Some changes in the config.yml may require a restart of the server. This includes interact_delay_in_ticks, but is not limited to that config node.

See: Denizen/config.yml for a stock copy and explanation of all available options.

assignments.yml

This YML is where you can define all the options and information for your Denizen NPCs. This will be explained further along in this document, but the most common information in this file is [Interact Script Assignments], [Activity Script Schedule], and [Custom Interact Texts].

This file can be reloaded from disk into Denizen memory at any time by using /denizen reload

saves.yml

This file is not meant to be edited by hand, Denizen will create and populate this file automatically as needed. It stores important information such as player progression, flags, Denizen location and block bookmarks, active activity script progression and more. If you absolutely need to make changes by hand, it's best to stop the server, edit, and then restart your server, as this file is constantly being written to by Denizen which will overwrite any changes you make.

To reiterate: This file saves periodically, and automatically, upon progression and a server stop, and should only be edited by hand when the server is off or Denizen is disabled.

read-only-scripts.yml

This is another files that Denizen creates and should not be edited by hand. This is a combination of the files contained in the scripts folder that Denizen reads from.

This file is populated on a server restart, or by using the /denizen reload command.

/scripts/ folder

This folder is where Denizen will read all the script information from. Upon a server load or /denizen reload, the files are combined and put into the read-only-scripts.yml for the Denizen to read from. This allows better organization of scripts to be maintained, since the amount of scripts can easily get into the triple digits.

The files in the plugins/Denizen/scripts/ folder can be named whatever you please, as long as they end in .yml. Be sure not to duplicate script names from file to file as this will cause problems. All scripts in the scripts folder are merged into read-only-scripts.yml, so there will be an issue if two scripts are named the same.

__