Denizen/0.7: Difference between revisions

From Citizens Wiki
No edit summary
m (Reverted edits by Aufdemrand (talk) to last revision by Jrbudda)
Line 36: Line 36:
</div>
</div>


<div style="padding:10px; font-family:camingodos-web; font-size:110%;">
<div style="margin-right:2.0em; padding:10px; font-family:camingodos-web; font-size:110%;">
[[image:Denizen-Logo-Large.png|center]]
 
{{#ev:youtube|oKTe8-joBUI|305|right|A small glimpse of Denizen.}}
 
 
<span style="font-size:110%">{{color|red|yellow|While Denizen is in BETA, consider this page under construction! If you run into any inaccuracies, or you have any questions not provided by this document, please let us know in #DENIZEN-DEV on EsperNET.}}</span>
<span style="font-size:110%">{{color|red|yellow|While Denizen is in BETA, consider this page under construction! If you run into any inaccuracies, or you have any questions not provided by this document, please let us know in #DENIZEN-DEV on EsperNET.}}</span>
<br><br><br>
<br><br><br>
Line 47: Line 42:


Denizen grants Citizens NPCs 2 major abilities: Interactions and Activities. Interactions occur when the player interacts with the NPC in some way, clicking, attacking, walking near, etc. These interactions trigger scripts based on conditions called 'Requirements'. Each interact script will run a series of commands to make the Denizen do or say something. Very complex gameplay can be created using these scripts. The other half of Denizen is activities. These scripts give the NPC continuous tasks to do that make them feel alive and provide useful functions. Wandering around, mining blocks, collecting items are all assignable activities. Denizens can perform multiple activities at one time, such as wandering and collecting garbage.
Denizen grants Citizens NPCs 2 major abilities: Interactions and Activities. Interactions occur when the player interacts with the NPC in some way, clicking, attacking, walking near, etc. These interactions trigger scripts based on conditions called 'Requirements'. Each interact script will run a series of commands to make the Denizen do or say something. Very complex gameplay can be created using these scripts. The other half of Denizen is activities. These scripts give the NPC continuous tasks to do that make them feel alive and provide useful functions. Wandering around, mining blocks, collecting items are all assignable activities. Denizens can perform multiple activities at one time, such as wandering and collecting garbage.
{{#ev:youtube|oKTe8-joBUI|570}}


<br><br>
<br><br>
<div style="padding:20px; font-family:camingodos-web; font-size:110%; background-color:#EEDDEE; border-style:dotted; border-width:1px; width:55%; font-weight:500;">If you are coming from Denizen 0.6, we've attempted to compile a [[Denizen/0.7/Migration|list for helping with migration]] for users upgrading who need a brief on what needs to be changed to become compatible.
<div style="padding:20px; font-family:camingodos-web; font-size:110%; background-color:#EEDDEE; border-style:dotted; border-width:1px; width:60%; font-weight:500;">'''To current users upgrading from 0.6 to 0.7'''
First, thanks for being patient, I know there has been a lot of anxious people waiting for the new release. This took a lot longer to do than I thought, but it's worth it! Updating code and adding content is easier than ever, so keep those feature requests coming in! I also want to put out there that I took OUT the PLAYERTASK command, so please be patient with me as I know a lot of you were looking for more 'quest types'. I am instead placing this in another plugin that will extend Denizen called the Adventurer. This will have similar functionality to the 1.2 Quester, but use Denizen as the core so it can be more flexible and powerful than ever! Please note that you can get very similar functionality with a Location Trigger if you require this functionality in the mean time.
 
Second, a huge sorry to current faithful users. I have made a promise to myself and you to try my best to maintain compatibility throughout the evolution of Denizen. I take that seriously and try to think things out before implementing them, but that being said, I had to change some syntax around in regards to new commands to make way for cleaner code and the ability to have greater flexibility. The upside to this is there are more options and modifiers for commands than ever before! The downside is there are a few commands/etc. that you will have to check and fix syntax for if trying to run a 0.6 Denizen Script with the new builds. I've attempted to compile a [[Denizen/0.7/Migration|list for helping with migration]] for users upgrading who need a brief on what needs to be changed to become compatible.
</div>
</div>
</div>
</div>




<div style="margin-right:2.0em; padding:10px; font-family:camingodos-web; font-size:110%; font-weight:500;width:85%;border-width:0px;">
==Table of Contents==
===Denizen===
 
Just starting out? Check out [[Denizen/Before Using Denizen|Getting Started]] and [[Denizen/Before Using Denizen|Getting Down and Dirty]]
If you are having problems getting a script working please see [[Denizen/Troubleshooting|Denizen/Troubleshooting]].
If you are just starting out, check out [[Denizen/Before Using Denizen|Getting Started]].
If you're hooked, we recommend you read all the sections in order!
</div>
{|class="wikitable" style="text-align: left; width:800px; vertical-align: text-top;"
|- style="vertical-align:top;"
| style="width: 60%;" |
<div style="margin-right:2.0em; vertical-align: text-top; padding:16px; font-family:camingodos-web; font-size:110%; font-weight:500;width:85%;border-width:0px;">
===Table of Contents===


<div style="margin-right:2.0em; padding:10px; font-family:camingodos-web; font-size:110%; font-weight:500;width:33%;border-width:1px; border-style:solid; background-color:whitesmoke;">
*If you are having problems getting a script working please see [[Denizen/Troubleshooting|Denizen/Troubleshooting]].
*If you are just starting out, check out [[Denizen/Before Using Denizen|Getting Started]].
*If you're hooked, I recommend you read all the sections in order!
<br>
# [[Denizen/Before Using Denizen|Getting Started]]
# [[Denizen/Before Using Denizen|Getting Started]]
#* [[Denizen/Start-up kit|Start-up Kit]]
#* [[Denizen/Start-up kit|Start-up Kit]]
Line 95: Line 88:
#* [[Denizen/Bonus Content/Pictures|Denizen Bonus Pictures]]
#* [[Denizen/Bonus Content/Pictures|Denizen Bonus Pictures]]
</div>
</div>
| style="width: 40%;" |


<div style="margin-right:2.0em; padding:16px; vertical-align: text-top; font-family:camingodos-web; font-size:110%; font-weight:500;width:95%;border-width:0px;">
== Change Log ==
===Sample Scripts===
 
* [[Denizen/Example_Scripts/Beginner_Scripts#A_small_random_conversation|A small random conversation]]
* [[Denizen/Example_Scripts/Beginner_Scripts#Notchs_Cookies|Notch's Cookies]]
* [[Denizen/Example_Scripts/Beginner_Scripts#Joe_The_Builder|Joe the Builder]]
* [[Denizen/Example_Scripts/Beginner_Scripts#Code_Executer|Code Executer]]
* [[Denizen/Example_Scripts/Beginner_Scripts#Denizen_Man|Denizen Man]]
* [[Denizen/Example_Scripts/Beginner_Scripts#Multiple_choice|Multiple Choice]]
* [[Denizen/Example_Scripts/Beginner_Scripts#The_server_rules|The Server Rules]]
* [[Denizen/Example_Scripts/Beginner_Scripts#Simple_Bank_teller|Simple Bank Teller]]
* [[Denizen/Example_Scripts/Beginner_Scripts#Advanced_Bank_teller|Advanced Bank Teller]]
 
</div>
| style="width: 20%;" |
 
<div style="margin-right:2.0em; padding:16px; vertical-align: text-top; font-family:camingodos-web; font-size:110%; font-weight:500;width:95%;border-width:0px;">
===Index===
 
If you are having problems getting a script working please see [[Denizen/Troubleshooting|Denizen/Troubleshooting]].
</div>
|}
 
 
=== Change Log ===
<div style="margin-right:2.0em; padding:10px; font-family:camingodos-web; font-size:110%;">
<div style="margin-right:2.0em; padding:10px; font-family:camingodos-web; font-size:110%;">
Here's what's changed!
Here's what's changed!
'''0.7.5 BETA build #455'''
* {{color|red|white|'''New!'''}} OWNER requirement will require ownership of the NPC interacting. Could be used for 'command interfaces' that only the owner can access.
* {{color|red|white|'''New!'''}} SNEAKING requirement requires the player be crouched when clicking. Careful on conflict with info-click for ops! Info-click can be disabled in the config.
* {{color|red|white|'''New!'''}} Queue-time flag replacement can let you dynamically use flag data in a script entry. For example: - GIVE <FLAG:ExampleItemFlag> QTY:<FLAG:ExampleQtyFlag>
* {{color|red|white|'''Experimental!'''}} Denizen NPCs now have their own Command Queue, and a TASK activity. This allows NPC's to use the activity scheduler to do tasks at certain times of the day.
* {{color|red|white|'''Experimental!'''}} LISTEN command implemented, KILL type implemented. Return of the 'Quester'. More types coming soon. Example usage: - LISTEN KILL ID:UniqueId TYPE:ENTITY NAME:ZOMBIE QTY:5 SCRIPT:FinishIt would require the player to kill 5 zombies. When completed, it will run the task script 'FinishIt'.
* {{color|red|white|'''New!'''}} Use <*> to use Chat Trigger text in EXECUTE or talk commands.
* {{color|red|white|'''New!'''}} Use <*> in FLAG command to remember player input. Example usage: - FLAG PLAYER_RESPONSE:<*>
'''0.7.5 BETA build #440:'''
* {{color|red|white|'''New!'''}} API Events make extending Denizen more powerful than ever!
* {{color|red|white|'''New!'''}} RUNTASK/CANCELTASK allows delayed tasks to be set, and cancelled.
* {{color|red|white|'''New!'''}} HOLD command can change what a Denizen NPC is wielding.
* {{color|red|white|'''New!'''}} Replaceable data for dynamically putting flags into texts!
* {{color|red|white|'''New!'''}} ISLIQUID requirement can sense if a block bookmark is solid, or liquid.
* {{color|red|white|'''New!'''}} IF command can evaluate a FLAG and run a TASK script.





Revision as of 05:08, 13 September 2012

Denizen.png

Denizen is an extension for Citizens that allows scripting of NPCs to handle tasks, quests, player interaction and more!

Current Version: 0.75 Pre-release BETA

Developers: aufdemrand

Source: Github

Development Builds: Jenkins

Latest Developmental Build: 2.0.2

Support tickets: Tickets on Github, but please read the entirety of this document first.

Donate: A lot of man hours has been put into Denizen. Your donations add a lot to the project and are always welcome! Your donations will probably help remodel my house and feed my kids. :) Donate to aufdemrand Don't forget to donate to the Citizens2 project as well, as none of this would be possible without that!

Thank You: A lot of people have stepped forward to help out with Denizen, and that's awesome! Special thanks to everyone who has beta tested, and a huge to these people: fullwall, AgentKid, aPunch, NeonMaster, Instinx, tenowg, groggluebutt, Wreyth, jrbudda, spidi, the list could go on!

CitizensUI: For a GUI interface, check out CitizensUI by jrbudda which provides an interface for Citizens NPCs as well as managing scripts and other NPC types.

While Denizen is in BETA, consider this page under construction! If you run into any inaccuracies, or you have any questions not provided by this document, please let us know in #DENIZEN-DEV on EsperNET.


Denizens are a great way to add MUD-style RPG Citizens to your server. Denizen NPCs use mini scripts with steps and events to interact with the player and world. Imagine interactive gate-keepers, magical wizards, experience trainers, bankers, talking townspeople and more! They can be used in thousands of different ways, from tutorials, to questing, to administrating.. your imagination is just about the limit! Though Denizen uses Scripting, it is not to be confused with Citizens2 Core Scripting which utilizes JavaScript and other major scripting languages to implement Goals. Instead, Denizen uses its own YML 'scripting language' which is designed to be easily read and edited by hand.

Denizen grants Citizens NPCs 2 major abilities: Interactions and Activities. Interactions occur when the player interacts with the NPC in some way, clicking, attacking, walking near, etc. These interactions trigger scripts based on conditions called 'Requirements'. Each interact script will run a series of commands to make the Denizen do or say something. Very complex gameplay can be created using these scripts. The other half of Denizen is activities. These scripts give the NPC continuous tasks to do that make them feel alive and provide useful functions. Wandering around, mining blocks, collecting items are all assignable activities. Denizens can perform multiple activities at one time, such as wandering and collecting garbage.



To current users upgrading from 0.6 to 0.7

First, thanks for being patient, I know there has been a lot of anxious people waiting for the new release. This took a lot longer to do than I thought, but it's worth it! Updating code and adding content is easier than ever, so keep those feature requests coming in! I also want to put out there that I took OUT the PLAYERTASK command, so please be patient with me as I know a lot of you were looking for more 'quest types'. I am instead placing this in another plugin that will extend Denizen called the Adventurer. This will have similar functionality to the 1.2 Quester, but use Denizen as the core so it can be more flexible and powerful than ever! Please note that you can get very similar functionality with a Location Trigger if you require this functionality in the mean time.

Second, a huge sorry to current faithful users. I have made a promise to myself and you to try my best to maintain compatibility throughout the evolution of Denizen. I take that seriously and try to think things out before implementing them, but that being said, I had to change some syntax around in regards to new commands to make way for cleaner code and the ability to have greater flexibility. The upside to this is there are more options and modifiers for commands than ever before! The downside is there are a few commands/etc. that you will have to check and fix syntax for if trying to run a 0.6 Denizen Script with the new builds. I've attempted to compile a list for helping with migration for users upgrading who need a brief on what needs to be changed to become compatible.


Table of Contents

Change Log

Here's what's changed!


0.7 BETA builds #125 - #280:

  • Updated! Less bugs! We're still in beta, but there has been some major code cleanup!
  • New! Debug Mode will let you see the logic of interaction and script execution to help you find problems in scripts faster than ever. I'm striving to make this as informational and clean as possible to help you test your scripts and get good feedback on behavior.
  • New! Info-Click lets you see Denizen stats and specifics, such as script assignments, trigger status, activity schedule and associated bookmarks with just a crouch and a click. Requires OP.. use this!
  • New! Proximity Triggers can trigger a script when a Player comes near. The most requested trigger type I got during the previous betas.
  • New! Location Triggers can trigger a script when a Player walks over a Location Bookmark. This is kind of like a PLAYERTASK LOCATION, but better! :)
  • New! Damage Triggers separate the left and right clicks for more control over interaction. Look forward to a whole new set of commands to go along with this!
  • New! Script Overlay mode is a whole new way to assign a script. Less copying/pasting when working with multiple scripts, not to mention more control! If you're an advanced script-user, this is for you!
  • New! RANDOM command will leave command execution to chance. Duck-duck-goose.
  • New! HINT command will hint to the Player acceptable Chat Triggers for the current step and script. Language support coming soon!
  • New! FLAG command lets you set 'flags', on players to store progress, important information, or other variables that can be used with the FLAG requirement. This is HUGE!
  • New! FLAG requirement can require special flags and values to be set in order to be eligible for a script. Again, this is HUGE!
  • New! POWERED requirement can check if a block bookmark has redstone power. Great idea, instinx!
  • New! The activity engine has been implemented which will allow your Denizens to do things on their own. There's a whole lot more to this concept, but you can try out the new WANDER activity in all its glory. This thing is cool, and customizable!
  • New! In-game commands now let you easily manage triggers, bookmarks, and debug info.
  • Updated! Extended/unified command syntax for almost every existing command. Once you get over the pain of upgrading, you will drop a jaw at the new capabilities!


You can see more at the full Denizen changelog.