Accomplice: Your Partner in Crime


This document last updated: 11/28/2001
Table of Contents:
1. Introduction
        -History
        -Purpose
        -Team

2. Options Dialog information

3. The Scripts
        -Files
        -Formats
            -Global Tags
            -Tab
            -Button
            -Label
            -Frame
            -List Box
            -*.lst
            -*.dlg

            -Batch Commands

4. Known Issues
5. Revision History
6. Other Information


1. Introduction
^Top^

Welcome to Accomplice v2.0 "Your Partner in Crime."  Accomplice is a fully feature, fully scriptable Game Master tool for Ultima Online Emulators.  While originally designed for UOX3, Accomplice's unique scripting flexibility allows scripts to be created and tailored to the needs of any emulator.


Accomplice 1.0 was first created in July, 2000 as a UOX only GM tool.  This tool premered a format similar to that of the UOX classic "CGMT."  Accomplice only had one original version, consisting of most commands for UOX.  Despite positive encouragment, the tool was never updated for lack of Developer interest (I get bored easily).


Accomplice 2.0 was created to follow the same general verticle tab layout of Accomplice 1, this however is where the similarities end.  Accomplice 2.0 possess an extreme flexible (yet at times complex) script engine.  This engine impliments a grid system to allow the "scripter" to easily create buttons that align correctly with each other to allow for a smooth interface through the script.  The system allows users to create a (basically) unlimited number of tabs, buttons, labels, frames, and even listboxes to provide extend functionality.


The Accomplice Team currently consists of:
"Zippy"  : Lead (Only) Developer
"Sephiroth"  : Scripter
"Alkiser" : Webmaster


2. Options Dialog Information
^Top^

These values are stored in accomplice.ini along with other user specific information.

Command Prefix: The SINGLE character to be placed in front of all commands entered into the  client.  Do not include this in script files.

Always On Top: HIGHLY recommended.  Places Accomplice as the top most window,  always visible in front of the UO client.  Makes the tool very easy to access.

Link to UO: Also Recommended; This links Accomplice to your UO Client window,  automatically minimizing and maximizing Accomplice with the client, keeping it out of the  way when you minimize your client to do other things (like chat, or update your  Accomplice Script)

Prefix Hex: This prefixes hex numbers in commands with "0x".  This is provided for compliance  with UOX version 0.95 and up, and is REQUIRED for those users.  (NOTE: Some  *.lst files require hex values to be "hardcoded\" into them.  This is because multipul  parameters in an lst if are treated as STRINGS and are not modified before being sent  to the client.)


3. The Scripts
^Top^

Files:
^Top^

Accomplice.exe : Accomplice program file.
UtilLib.dll  : The Accomplice Utility Library.
Accomplice.ini  : Accomplice options file.  Contains information saved by accomplice     (Such as information from the options dialog) Do not include     this file with your script, it is automatically created by      accomplice.)
Accomplice.cfg  : The script file.  Contains all Tab, Button, Label, and Frame info. This     is the heart of your script.
*.lst   : Listbox list file. Contains extended data use to create listbox menus.


^Top^


Accomplice.cfg File Format:
tag=parameter1,parameter2,optional
(All strings require quotations unless otherwise specified, all numbers are decimal.)


Global Tags:
^Top^

rows=X Grid definition; size of each row on the dialog. 
columns=Y Grid definition; size of each column
hspace=X Grid definition; padding around controls 
vspace=Y Grid definition; padding around controls 
xsize=X Width of Accomplice Dialog (156 default)
ysize=Y Height of Accomplice Dialog (439 default) 
FontFace=S Font to use for controls; (MS Sans Serif default) (String - NO QUOTATIONS) This does NOT effect the Help Tab.
FontSize=X Size of Font (8 Default) 
name=S Name of script file (String - NO QUOTATIONS)
creator=S Name of creator(s) of this script file (String - NO QUOTATIONS)
version=S Version Number of this scriptfile (String - NO QUOTATIONS) 
desc=S Short script description (String - NO QUOTATIONS)


Tabs:
^Top^

[Tab Name] : [] indcates the begining of a tab, and the name to be displayed. (NO QUOTATIONS)
The help tab is hard coded, and will not be modified by anything in the script files (other than the script information tags.)
The help tab will always apear as the last tab.


Buttons:
^Top^

Button=x1,y1,xsize,ysize,"Text label","Command or DLG File",PARAMETERFORMAT,"LINK","Prompt Message"

PARAMETERFORMAT:
(Any number of the following values)
N - No parameters for this command
M - Open the Map Navigator
D - Decimal Parameter
H - Hex parameter
W - Open Dialog file. MUST BE ONLY PARAMETER
B - Execute the Batch File pointer to by command S - String parameter (String must be the LAST parameter, and can have no more than 4 number parameters before it)

LINK:
PROMPT - Indicates Accomplice should prompt the user for the value(s)
"LinkName" - indicates the button's value is linked to Listbox "LinkName"

Example:
Button=1,1,30,1,"Who's Online?","who",N
Button=1,1,30,1,"Goto Character","gochar",HHHH,PROMPT,"Enter 4 part serial number:"
Button=1,1,30,1,"Execute Command List","commandlist.batch",B Button=1,1,30,1,"Add this item","additem",D,"ItemList"
Button=1,1,30,1,"Open Charater Dialog Box","chars.dlg",W

Map Navigator: The map navigator works like this: Button=1,1,30,1,"Open MapNav","go",M,"1000 1000" That line will open the Map Navigator and center the map on 1000,1000. When the user selects "send to client" a 'go command will be sent. Button=1,1,30,1,"MoreXYZ MapNav","setmorexyz",M That line will open the Map Navigator and center the map on 0,0 or the last place it was centered. When the user selects "send to client" a 'setmorexyz command will be sent.


Labels:
^Top^

Label=x1,y1,xsize,ysize,"Text to display"

Example:
Label=1,1,25,1,"Welcome to Accomplice"


Frames:
^Top^

Frame=x1,y1,xsize,ysize,"Text to display"

Example:
Frame=1,1,40,40,"Add Items"


Listboxes:
^Top^

Listbox=x1,y1,xsize,ysize,"InternalName","filename.lst"

A listbox is "linked" to a Button, and reads values from an *.lst file.

Internal Name is used to link this listbox to a Button.  File name is a listbox menu file (*.lst)

Example:
Listbox=1,1,33,20,"ItemList","items.lst"


*.lst Files:
^Top^

Lst files are used to store menu data for listboxes.
These files are RARELY created by you, instead use a program like dfn2lst, or scp2lst. (Made by Zippy; Source code avalible)

Optional Format Tag:
format=FORMATPARAMETERS,Prompt
Use this tag if you wish to prompt users for other values in addition to the value obtained from the listbox.  This is useful for such things as a UOX 'set command.  The listbox would contain a list of skills, and then prompt the user for the value to set.  You may prompt for upto 8 values, or upto 4 values and a string value.  The string value must be LAST, and the listbox value will always be FIRST.  This format tag and prompt is IDENTICAL to the one used with Buttons.  If no format tag is supplied, the format will be taken from the one supplied with the button, and the user will not be prompted for any additional values.

Example:
format=SD,"Enter other DECIMAL value:"
In this exmaple, the value from the listbox is treated as a string, and the user is prompted for an additional value.

format=DDHDS,"Enter a decimal, hex, decimal and string:"
This exmaple will prompt the user for 3 numbers and a string in addition to the listbox value.  The middle value is hex.
The ID tags are optional, and will display the specified entry from the user's art.mul file
For a list entry the script would be
Add the first item=1=003A
This will display a wall in the background when a user highlights "add the first item"
Menus can also have an ID specified. To do this add "ID=003A" to the { on the menu.

Menu Name
{[ID=0000]
Sub menu 1
{
name tag=VALUE
Sub Menu
{
name tag=VALUE[=0000]
}
}
}
name tag=VALUE

Sub Menus:
are defined by simply placing a name followed by a { } pair.  There is no physical limit to number of submenus, but let's keep it realistic.

name tags:
NO QUOTATIONS
May be as long as you like (be realistic) followed by = and then a SINGLE value.  If you wish to have more than one value, it must be linked to a string parameter in it's button.

Menus are displayed in the listbox with a > in front of them showing they are menus and NOT values.  This > is added for you, and you should not include it in the lst file.

Sub menus all have a < Back as their first entry so the user my return to the previous menu selection.


*.dlg Files:
^Top^

*.dlg files contain information used to build a second popup dialog box over top of Accomplice.  This box is usually used for a "Wizard" type of interface for creating something that uses multipul steps.  For example, a spawner dialog could be created, which requires the user to add a spawn item, set it's type, and set it's morexyz values. (In UOX that is...)

A dlg files is used in conjunction with a Button.  Supply the FORMATPARAMETER W in the button's format parameter list, and supply the dlg file name instead of a command.
 
 

title=S Title to be displayed in title bar of this Dialog. (NO QUOTATIONS)
rows=X Grid definition; size of each row on the dialog. 
columns=Y Grid definition; size of each column
hspace=X Grid definition; padding around controls 
vspace=Y Grid definition; padding around controls 
xsize=X Width of Dialog (200 default)
ysize=Y Height of Dialog (100 default) 

Controls on a dialog box work exactly the same as controls on a Tab.  The only difference is you may NOT open a dialog box from within a dialog box.
 
 


Batch Files:
^Top^

Batch files execute a group of commands in sequence. Batch commands work the same as Buttons (they do not need a name or position) except they cannot open dialogs or the Map Navigator. Note that a batch file can even reference listboxes on the same tab of dialog as the button the batch is linked to.

"command_to_send",PARAMETERLIST,"LINK","Prompt Message"
WAIT="Optional message to show to use" This option asks the user to press yes to continue executing the batch, or No to stop, and displays additional messages if they are supplied in the script. THis is useful when a batch needs to wait for a user to target soemthing before continuing.


4. Known Issues
^Top^

Multipul UO Windows:  Some programs (such as UOGateway) modify the client so it can run more  than one copy at once.  This may confuse Accomplice, and commands may appear in  the wrong window, or not at all.  FOR DEVELOPERS: Accomplice sends the  command to the top msot window that has the window class "Ultima Online".  If your  program modifies the window class, Accomplice will not be able to send it commands.

Script Reloading: Might occationally crash Accomplice.  This is provided mainly for script  testing purposes, and users should avoid using this command.

Link2UO: May OCCATIONALLY cause problems, such as not reactivating the Accomplice window properly.  This should be completely fixed as of 2.0b6


5. Revision History
^Top^

Version Date Description
1.0 July, 2000 Initial Accomplice Version. The one that started it all....
2.0b1 Sept 19, 2001 Complete rewrite.  Buttons and Labels added.
2.0b2 Sept 20, 2001 Frames and Listboxes Added
2.0b3 Sept 21, 2001 Listboxes extended. Help Tab added.
2.0b4 Sept 23, 2001 Options dialog added.
2.0b5 Sept 24, 2001 String can now be preceeded by up to 4 numbers, other general fixes
2.0b6 Sept 25, 2001 Many many crash fixes.  Many warnings added for in correct values in script files. 
2.0b7 Sept 27, 2001 Dialog boxes added through use of *.dlg files.  Link2UO option greatly improved and expanded.  Accomplice will only act "Always on Top" when the UO window has focus, otherwise Accomplice will act as any other window, going to the background or minimizing when UO does.  It's reocmmended that you not turn off always on top when using Link2UO.
2.0b8 Sept 28, 2001 General Bugfixes. Listbox functionality improved.  Listboxes now have an (optional) format parameter in their file allowing the script prompt the user for values that will FOLLOW the value obtained from the list file.  See the *.lst format for more information.
2.0b9 Sept 30, 2001 General fixes. Help tab no longer uses custom font. Dialogs not center themselves on the Accomplice window, near the cursor. Corrected MINOR problems with Link2UO.
2.00.01 October 1, 2001 Initial public release.
2.00.02 October 3, 2001 General bug fixes.
2.00.03 October 8, 2001 Prefix support for 2 characters added for UO3D people. HORIZONTAL=TRUE now at the top of Accomplice.cfg will make the tab control Horizontal. it's up to you to script everything else. THERE IS NO HELP TAB ON HORIZONTAL ACCOMPLICE (because i'm lazy).
2.00.04 October 16, 2001 Source released under GNU.
*Small* script fixes and a MAJOR fix for lst files where the last item on sub menus was no avalible. I'm ashamed of all of you for waiting so long to tell me. Really.
2.1.00 November 8, 2001 Added Item Preview to listboxes and *.lst files. Added mapX.mul Navigator. Despite this small entry, these are in fact big changes. So this is version 2.1.00 instead of 2.0.05
2.1.01 November 27, 2001 Fixed crash and display problems with WinXP/2k.
Added a few try/catches to track other possible crashes (although none have been reported).
Added progress bar to splash screen.
2.1.02 December XX, 2001 Added support for batch files. Works basically like a list of command buttons. See the new Batch section and additions to the button section.


6. Other Information
^Top^

Check for Accomplice updates, scripts, and forums at http://accomplice.uoxdev.com/

The Accomplice Source Code has been released under the GNU public licence, and is avalible at the Accomplice Website.

Accomplice Program, Libraries, File formats Copyright 2001 Bryan "Zippy" Pass. All rights reserved.
Accomplice web page, Icons, Bitmaps Copyright 2001 Casey "Alkiser" McAdams. All rights reserved.

"Ultima Online" is a copyright of Origin Systems, Inc. and Electrionic Arts.

Much of the art associated with Accomplice was originally taken from screen shots of Ultima Online.  These images are Copyright Origin Systems, Inc/Electronic Arts.

This program may be freely distributed, please include this file.