Denizen/Introduction: Difference between revisions

From Citizens Wiki
(Created page with "= Introduction = Denizen, powered by Citizens2 and Bukkit, is an extensive add-on pack that allows for a scriptable Minecraft experience, including enhanced NPCs, custom com...")
 
No edit summary
Line 1: Line 1:
= Introduction =
Denizen, powered by Citizens2 and Bukkit, is an extensive add-on pack that allows for a scriptable Minecraft experience, including enhanced  NPCs, custom commands, items, world events and many other features. Inspired by MUDs, features and NPCs powered by Denizen have a unique RPG feel unmatched by any other Bukkit-only solution. Imagine interactive gate-keepers, magic spells, magical wizards, experience trainers, experience and player-stat systems, bankers that have bankers’ hours, talking townspeople, magical quests, and more! Denizen can be used in thousands of different ways, from tutorials, to gameplay, to administering --- your imagination is the limit!
Denizen, powered by Citizens2 and Bukkit, is an extensive add-on pack that allows for a scriptable Minecraft experience, including enhanced  NPCs, custom commands, items, world events and many other features. Inspired by MUDs, features and NPCs powered by Denizen have a unique RPG feel unmatched by any other Bukkit-only solution. Imagine interactive gate-keepers, magic spells, magical wizards, experience trainers, experience and player-stat systems, bankers that have bankers’ hours, talking townspeople, magical quests, and more! Denizen can be used in thousands of different ways, from tutorials, to gameplay, to administering --- your imagination is the limit!


Line 6: Line 4:


While we are currently still in pre-release beta, the YAML-based dScript is becoming a fully featured core-set of features that can control your server in hundreds of ways. If that’s not enough, there’s also many ways to extend the functionality since Denizen is being programmed with a fully featured Java API in mind. With some simple Java, it’s easy to make your own dScript commands, requirements, script containers, tags, triggers, and many more. Many plugin developers are already extending their plugins with custom Denizen content for easy use with scripts, and by the time one point ‘o’ hits, we hope your plugins will take notice as well!
While we are currently still in pre-release beta, the YAML-based dScript is becoming a fully featured core-set of features that can control your server in hundreds of ways. If that’s not enough, there’s also many ways to extend the functionality since Denizen is being programmed with a fully featured Java API in mind. With some simple Java, it’s easy to make your own dScript commands, requirements, script containers, tags, triggers, and many more. Many plugin developers are already extending their plugins with custom Denizen content for easy use with scripts, and by the time one point ‘o’ hits, we hope your plugins will take notice as well!
= Getting Started =
It’s hard to find a good ‘start point’ when using Denizen, since there are many different scopes, but let’s first take a look at the basic functionality and control of Denizen provided by the use of craftbukkit commands. Since Denizen uses the C2 command system, you may already be familiar with the system.
== How to use server commands ==
All commands have a ‘base_command’, a ‘command_name’ and either string values, integer values, value flags (--flag value) or non-value flags (-t). Some commands may use multiple flags at a time. Consider the examples below.
<pre>/base_command command_name string value --flag value -t
/npc trigger damage --cooldown 5 -t</pre>
<pre>Note: Value flags which contain more than one word must be enclosed in quotes.
/base_command command_name --flag “multi word value” --another_flag another_value  -t -f
/npc constant --name ‘Default Greeting Text’ --value ‘Hello, player!’</pre>
<pre>Commands that provide multiple pages of feedback can include an integer number to specify page with some commands. If no number is specified, page 1 is assumed.
/base_command command_name 3
/denizen scripts 3</pre>
== Denizen console commands ==
Denizen commands provide a way to view and configure key components of Denizen, such as version checking and script listings.
<pre>/denizen version
Displays the version and build information about the copy of denizen currently loaded. Will also show currently loaded ‘extensibles’.
Usage:
/denizen version/</pre>
<pre>/denizen save
Saves the contents of the ‘dScript saves’ in memory to disk as saves.yml. Useful for editing the contents while the server is running, using /denizen reload.
When using Denizen on a production server, there are key events that auto-save the saves.yml, so it’s encouraged that saves.yml be edited only while the server is off.  When using on a development server, server action should be brought to a minimum while editing saves.yml.
Usage:
/denizen save</pre>
<pre>/denizen reload
Reloads key disk files into memory, overwriting the copy currently in memory. Must specify which file to reload, or -a for all. Valid values are: scripts, saves, config or the -a flag.
Note: When reloading the config, some values require a server-reboot to take effect.
Usage:
/denizen reload scripts|saves|config|-a
Example Usages:
/denizen reload -a
/denizen reload scripts</pre>
<pre>/denizen debug
Enables or disables the dBugger which can be very useful when writing and troublshooting script flow and any problems that may occur.
Using the -s flag will toggle stacktraces, allowing some nitty-gritty error messages to slip through for when something seriously goes on. If getting help, it’s likely that we’ll ask you to enable this and provide us with the feedback. Using the -c flag will toggle color.
Usage:
/denizen debug (-c) (-s)
Example Usages:
/denizen debug
/denizen debug -c</pre>
<pre>/denizen scripts
Shows a list of scripts currently loaded into Denizen. Used alone, it lists all scripts, identified by type and name. Use an integer to specify which page to view.
Using the type flag will cut down the search results to a specific type.
Using the filter flag will limit results to a specific search string.
Usage:
/denizen scripts (--filter key_word) (--type script_container_type) (#)
Example Usages:
/denizen scripts --filter ‘bob quest’ 2
/denizen scripts --type task</pre>
<pre>/denizen listener
Shows a list of active listeners for a player. Use the player flag to specify a different player. Use an integer to specify a page.
Using the finish flag will force-finish the listener, running the script the was specified in the original listen script command.
Using the cancel flag will cancel the listener, effectively removing it.
Using the report flag will output the status of the listener.
Usage:
/denizen listener (--player player_name) (--finish|report|cancel listener_id)
Example Usages:
/denizen listener --report apple_quest_1
/denizen listener --player aufdemrand 2</pre>

Revision as of 02:38, 14 July 2013

Denizen, powered by Citizens2 and Bukkit, is an extensive add-on pack that allows for a scriptable Minecraft experience, including enhanced NPCs, custom commands, items, world events and many other features. Inspired by MUDs, features and NPCs powered by Denizen have a unique RPG feel unmatched by any other Bukkit-only solution. Imagine interactive gate-keepers, magic spells, magical wizards, experience trainers, experience and player-stat systems, bankers that have bankers’ hours, talking townspeople, magical quests, and more! Denizen can be used in thousands of different ways, from tutorials, to gameplay, to administering --- your imagination is the limit!

By sharing your scripts, you can enable the most exciting feature. Since dScript, the language that powers Denizen, is made to be easily read, users can share and tweak scripts to fit their needs with ease. Many can already be found online in the Citizens Script Repository[1].

While we are currently still in pre-release beta, the YAML-based dScript is becoming a fully featured core-set of features that can control your server in hundreds of ways. If that’s not enough, there’s also many ways to extend the functionality since Denizen is being programmed with a fully featured Java API in mind. With some simple Java, it’s easy to make your own dScript commands, requirements, script containers, tags, triggers, and many more. Many plugin developers are already extending their plugins with custom Denizen content for easy use with scripts, and by the time one point ‘o’ hits, we hope your plugins will take notice as well!

Getting Started

It’s hard to find a good ‘start point’ when using Denizen, since there are many different scopes, but let’s first take a look at the basic functionality and control of Denizen provided by the use of craftbukkit commands. Since Denizen uses the C2 command system, you may already be familiar with the system.

How to use server commands

All commands have a ‘base_command’, a ‘command_name’ and either string values, integer values, value flags (--flag value) or non-value flags (-t). Some commands may use multiple flags at a time. Consider the examples below.

/base_command command_name string value --flag value -t
/npc trigger damage --cooldown 5 -t
Note: Value flags which contain more than one word must be enclosed in quotes. 

/base_command command_name --flag “multi word value” --another_flag another_value  -t -f
/npc constant --name ‘Default Greeting Text’ --value ‘Hello, player!’
Commands that provide multiple pages of feedback can include an integer number to specify page with some commands. If no number is specified, page 1 is assumed.

/base_command command_name 3
/denizen scripts 3

Denizen console commands

Denizen commands provide a way to view and configure key components of Denizen, such as version checking and script listings.

/denizen version

Displays the version and build information about the copy of denizen currently loaded. Will also show currently loaded ‘extensibles’.
Usage: 
/denizen version/
/denizen save

Saves the contents of the ‘dScript saves’ in memory to disk as saves.yml. Useful for editing the contents while the server is running, using /denizen reload. 
When using Denizen on a production server, there are key events that auto-save the saves.yml, so it’s encouraged that saves.yml be edited only while the server is off.  When using on a development server, server action should be brought to a minimum while editing saves.yml.
Usage:
/denizen save
/denizen reload

Reloads key disk files into memory, overwriting the copy currently in memory. Must specify which file to reload, or -a for all. Valid values are: scripts, saves, config or the -a flag.

Note: When reloading the config, some values require a server-reboot to take effect.
Usage: 
/denizen reload scripts|saves|config|-a

Example Usages:
/denizen reload -a
/denizen reload scripts
/denizen debug

Enables or disables the dBugger which can be very useful when writing and troublshooting script flow and any problems that may occur. 
Using the -s flag will toggle stacktraces, allowing some nitty-gritty error messages to slip through for when something seriously goes on. If getting help, it’s likely that we’ll ask you to enable this and provide us with the feedback. Using the -c flag will toggle color.
Usage: 
/denizen debug (-c) (-s)

Example Usages:
/denizen debug
/denizen debug -c
/denizen scripts

Shows a list of scripts currently loaded into Denizen. Used alone, it lists all scripts, identified by type and name. Use an integer to specify which page to view. 

Using the type flag will cut down the search results to a specific type.
Using the filter flag will limit results to a specific search string.
Usage: 
/denizen scripts (--filter key_word) (--type script_container_type) (#)

Example Usages:
/denizen scripts --filter ‘bob quest’ 2
/denizen scripts --type task
/denizen listener

Shows a list of active listeners for a player. Use the player flag to specify a different player. Use an integer to specify a page.

Using the finish flag will force-finish the listener, running the script the was specified in the original listen script command.
Using the cancel flag will cancel the listener, effectively removing it.
Using the report flag will output the status of the listener.
Usage: 
/denizen listener (--player player_name) (--finish|report|cancel listener_id)

Example Usages:
/denizen listener --report apple_quest_1
/denizen listener --player aufdemrand 2