PDA

View Full Version : My overview of 2.0 API/features.



joshuha
August 29th, 2006, 18:09
I am going to do a quick overview of the new 2.0 functions as I understand them (and I might be wrong on some of them). Most of this I will try to just explain on how a non-programmer would benefit but will of course have to resort to technical explanations for some. I won't go over each interface or each object but will try to touch on the ones that basically cover new features for 2.0 or provide neat functions not currently available.

Packages
Input:
Essentially this allows for the ability to detect mouse states and keyboard presses. This could be used to map your own hotkeys as well as fire off events when certain things are dragged/clicked.

Objects
Bitmap/Bitmapwidget:
Basically allows for some basic information on the images. The widget allows you to modulate a bitmap by a color. You know those lighting effects that you can do (green, night, fire/sunset) you could basically make your own lighting effects by applying this to the background image (or even individual maps).

Databasenode:
A structured set of commands to get at all the nodes in the db.xml file. Will be easy to navigate character "trees" and get values in the database. Will be used alot in scripting to get values of stats/skills/etc.

Dragdata:
A broad set of interfaces to represent how data dragged from one object interacts with another. Some powerful customization could happen here. You could define when a stringfield gets dragged to a token to rename it but when a numberfield does to subtract HP or drag a die to make a roll using that tokens skill as defined by a databasenode. Doesn't apply to just tokens just using it as an example.

tokeninstance:
Allows the manipulation of tokens through scripting. Basically can set attributes like if the token is hidden, move the token, etc. Something else neat is the ability for PCs to declare targets (and a token knows all things targettting it). How this is shown on the client is unknown at this point. Most likely visible arrow/line or available via a right-click menu option. Will be used alot.

widget/widgetcontainer:
Basically a base class other widgets inherit (like bitmap widget). Nothing really special just gives common functions to manage these.

Elements
chatentry/chatwindow:
Chatentry defines the data processing of the chatwindow. The chatentry has events that can detect when something was typed and what was typed. In that respect you can register your own slash commmands, things like /sit, /movemytoken, or whatever. As you can see these could be used for way more than just social commands.

Chatwindow defines the interfaces that directly affect the chatwindow. This is how you can manually send messages to everyone, whisper, etc. There is also a local only command that will help DMs be able to debug scripts.

diecontrol:
Diecontrol is your virtual dice cup. This allows multiple types of dice to be input into the container. You could then define drag actions or whatever to roll these dice. Custom dice can be put in the containter.

diefield:
New to 2.0 this allows a database node to be defined as a die field. Basically means you can have fields that represent dice on your sheet. Thus systems like Serenity that use dice on the sheet can now just be dragged to the chat to roll a dice based on that field. Will also allow for things like initiative roll to be placed on the sheet.

imagecontrol:
Contains interfaces dealing with images(maps). You can do things like addtokens (think about being able to popup encounters on a map by hitting a button!) and change the grid and PC viewpoint. Also has way to process events like when a token is added or intercept the measuring tool (and put in your own ranges/scales). Will be used alot in scripting. Also since the ability to addtokens programatically we have to assume we can save the variables associated with the image and thus can save the state of the images with the tokens on them.

numbercontrol/stringcontrol:
Pretty much the same as now but with some added functionality to fire off events when it has focus/loses focus, when the value is changed (very nice), and can do things like set readonly via scripts.

script:
Allows definition of when the script is processed (on load or on close).

tokencontrol:
These allow you to define master tokens that other "spawned" tokens could inherit. Useful for setting up Orcs 1-10 and have all the right stats (like HPs for combat tracker) without having to do all that by hand.

windowXXXX:
Deals with the interfaces for displaying information/subwindows/etc. Will mostly be used for ruleset data.

Note that the windowCONTROL deals with creating contextual menus (the radial menus when you right click). This will also allow for a lot of customization with implementations of a ruleset.

richvalle
August 29th, 2006, 18:44
Ok, first thanks VERY much for doing that. That was a fair chunk of work.

Second... man oh man, reading all that makes me want 2.0 NOW! :)

It truely sounds like its going to be 3 to 4 times the program it is now.

rv

Snikle
August 29th, 2006, 19:34
Wow, nice work Joshua, that really helped explain things to an old guy that hates even the smell of code.

WolfStar76
September 1st, 2006, 19:37
I still don't know that I really "get it" - but this helps a lot, and looks pretty exciting. :)

Thanks for the breakdown.