TableSmith 45 Manual

download TableSmith 45 Manual

of 36

Transcript of TableSmith 45 Manual

  • 7/25/2019 TableSmith 45 Manual

    1/36

    TableSmith 4.5

    RPG Generation Tool

    Copyright 2005 by Bruce A. Gulke. All rights reserved.

  • 7/25/2019 TableSmith 45 Manual

    2/36

    TableSmith 4.5 Users' Manual

    Page 2 of 36

    TableSmith 4.5

    Welcome to TableSmith! This powerful tool is intended to aid RPG Gamemasters byproviding an easy-to-use system for creating and using tables and charts for theircampaigns.

    This help file is brief, but TableSmith features an intuitive interface, so no more is needed.

    With a small amount of effort, you'll be up and running in no time!

    Legal InformationThe usual legal software information.

    System RequirementsWhat do you need to run TableSmith?

    TableSmith InterfaceInstructions on using the program.

    TableSmith CategoriesHow to categorize your tables.

    Basic File Format

    Explains the basic TableSmith scripting format and includes a short tutorial.

    Advanced TableSmith ScriptingCovers the advanced features of TableSmith's scripting format.

    Quick Reference PageA summary of TableSmith's scripting format for easy reference.

    SupportTableSmith technical support policy.

    Other UtilitiesOther programs from TableSmith's author.

    Revision History

    The history of TableSmith's development.

    Please note: TableSmith is shareware - please register! Read Legal Informationforregistration information.

  • 7/25/2019 TableSmith 45 Manual

    3/36

    TableSmith 4.5 Users' Manual

    Page 3 of 36

    TableSmith Legal Information

    The TableSmith software is owned by Bruce Gulke. Bruce Gulke grants to the user anonexclusive license to use the TableSmith software solely for his or her personal purposes.The user may not commercially distribute, sublicense, resell, or otherwise transfer for anyconsideration, or reproduce for any such purposes, the TableSmith software or any

    modification or derivation thereof, either alone or in conjunction with any other product orprogram. Further, the user may not modify the TableSmith software, other than for his orher own personal use.

    This software and accompanying electronic materials are provided "as is" without warrantyof any kind. Further, Bruce Gulke does not guarantee, warrant, or make any representationsregarding the use, or the results of use, of the software or electronic materials in terms ofcorrectness, reliability, accuracy, or otherwise. All risk as to the results and/or performanceof the software is assumed by you. If the software or electronic material are defective, you,and not Bruce Gulke or his authorized representatives, assume the entire cost of allnecessary service, repair, or other correction.

    The above is the only warranty of any kind, either express or implied, including but notlimited to the implied warranties of merchantability and fitness for a particular purpose, that

    is made by Bruce Gulke on this software. No oral or written information or advice given byBruce Gulke or his authorized representatives shall create a warranty or in any way increasethe scope of this warranty and you may not rely on any such advice or information.

    Neither Bruce Gulke nor anyone else who has been involved in the creation, production,testing, distribution, or delivery of this software shall be liable for any direct, indirect,consequential, or incidental damages, (including damages for business interruption, loss ofbusiness profits, loss of business information, or anything of the like) arising out of the useor inability to use said software even if Bruce Gulke has been advised of the possibility ofsuch damages.

    By using the TableSmith you acknowledge that you have read this statement, understand it,and agree to be bound by its terms and conditions.

    TableSmith is shareware. If you wish to register TableSmith, contact Bruce Gulke([email protected])for current address information (or you can register via PayPal -www.paypal.com). Registration costs $10 (though you can pay more if you wish), and willencourage further development of TableSmith and other helpful utilities.

    TableSmith System Requirements

    TableSmith is a 32-bit Windows application. Any system with Windows 98, Windows ME,Windows NT (4.0+), Windows 2000, or Windows XP should have no problem running theprogram. For optimum performance, a display setting with at least 256 colors should beused.

    Note: TableSmith is not supported on Windows 95.

    mailto:([email protected])http://www.paypal.com%29/http://www.paypal.com%29/mailto:([email protected])
  • 7/25/2019 TableSmith 45 Manual

    4/36

    TableSmith 4.5 Users' Manual

    Page 4 of 36

    TableSmith Interface

    The TableSmith main window consists of five main areas, each explained below.

    Menu and Toolbar

    At the top of the window is the menu and (at the top left side) the toolbar. Each button

    duplicates a commonly-used menu option. Each menu item is explained below:

    File

    o Create New Table - Create a new table in the category you specify.

    o Toggle Generator/Archives - Switches between the generator interface andthe archives interface.

    o Print - Print the results window.

    o Export Results - If you wish to save the current batch of results, click thisbutton. You will be prompted for a filename and location, and a file will begenerated for you. This file will be in the format type you specified under"Preferences" (HTML, XML, or text).

    o Preferences - Displays the Preferences dialog (discussed below).

    o Exit - Exits TableSmith.

    Edit

    o Edit Table - Allows you to edit the selected table (see TableSmith Basic File

    Formatfor more information).

    o Copy Selected to Clipboard - Copies selected text from the results window tothe Windows clipboard.

    o Select All - Selects all text in the results window.

    Table

    o

    Roll - Rolls on the selected table as many times as is displayed in the textboxleft of the Dice button.

    o Reload - If you create a new category folder, copy files into a category folder,or edit a Table file, and wish to use your changes immediately, you must firstclick the 'Reload' button. This tells TableSmith to re-read the Tables folderand update itself accordingly. Note that 'reloading' is done automatically eachtime the program starts up.

    o Display Hidden Categories - Normally you don't see "hidden" categories

    (folders that start with "~"; see TableSmith Categoriesfor more information).Selecting this menu option will allow you to see those categories and selecttables from them.

    o

    Break - Allows you to 'break', or halt, the execution of the current table. Thismay generate error messages from that run if the table is halted in themiddle of a function, though this is not cause for concern.

    Help

    o Help - Displays this help information.

    o Add-Ons... - Displays information about any add-ons you may have installed.

    o About... - Displays information about TableSmith.

  • 7/25/2019 TableSmith 45 Manual

    5/36

    TableSmith 4.5 Users' Manual

    Page 5 of 36

    The buttons in the toolbar are used for "Roll", "Edit Table", and "Reload". They duplicate thefunctionality of the menu items of the same name.

    Category an d Table Lists

    Below the toolbar you will find a drop-down list and a standard listbox, the first forCategories and the other for Tables. The Category list is used to select Table Categories.

    When a Category is selected, all the Tables in that Category will be loaded into the Tablelist. When a Table is selected in that list, it is the one that will be used when the "Roll"button is clicked.

    Archives

    TableSmith has an "Archives" feature, which allows you to easily store generated results foreasy retrieval. To access the Archives, click the "Archives" button, found above theCategory and Table Lists. You'll see a folder/file hierarchy, similar to Windows Explorer. Thehierarchy works as you would expect it to: Folders may be opened or closed, revealing (orhiding) other folders as well as files. To view a file, simply select it. The stored results filewill appear in the Results Window. Above the hierarchy are three buttons: The leftmostbutton may be used to create new folders. To use it, click on an existing folder, click the

    button, then type the new folder's name when prompted. The second button is used to copygenerated results into the Archives. Click the folder where you want to copy the resultwindow contents, click the copy button, and type in a filename when prompted. In thefuture, when you click on that file, it will appear in the Results Window. The rightmostbutton is for deletion. Select the file or folder you want to remove, then click the 'X'. Notethat you will not be asked to confirm the deletion unless you are removing a folder that isnot empty. You cannot delete the topmost "Archives" folder.

    To return to the Category and Table Lists, click the button above the archives that says"Generate".

    Resul ts Window

    The majority of the TableSmith interface is taken up by the Results Window. This is wherethe results from rolling on a Table are displayed. This window is similar to a Web browser,and will display items in HTML format, if specified.

    Parameters

    Some Tables use 'parameters', values that can be passed into them. A Table's parameters,and their current values, will be displayed in the lists in this area, beneath the ResultsWindow (the "Show/Hide" button can be used to shrink this area and give the ResultsWindow more room). To change the parameter values, click the "Change" button, and usethe Parameters dialog to enter the values you wish to use (the Parameters window will startat the first parameter listed, unless you've chosen one in particular, in which case that willbe the first parameter displayed).

    Hyperl ist

    The lower left of the window constitutes the TableSmith's "Hyperlist". The purpose of theHyperlist is to allow you easy access to Tables you use often (similar to how "Favorites" listswork elsewhere in Windows). Whereas the Tables in the Table listbox change based on theCategory selected, the Tables listed in the Hyperlist remain the same.

    To assign a Table to the Hyperlist, simply click 'Add' and the current Table will be appendedto the list. To remove a Table, click the 'Remove' button when a Table is selected. Use'Clear' to completely clear ths list. To run a Table in the list, just click on its name.

  • 7/25/2019 TableSmith 45 Manual

    6/36

    TableSmith 4.5 Users' Manual

    Page 6 of 36

    Preferences

    You may set preferences governing how TableSmith acts in certain situations. Selecting"Preferences" from the "File" menu will display a dialog box listing these preferences. Theyare organized into three categories, and are detailed below:

    Interface

    Use textured backgrounds - Check if you want to use the colorful backgroundsincluded with TableSmith; leave blank if you prefer the standard Windows background(not using textures may increase speed slightly on some machines).

    Recall window position (if not maximized) - Check if you want TableSmith toremember where you last positioned your window on the desktop the next time yourun the program. Otherwise, TableSmith will start up in the center of your screen(regardless of your choice, if you exit TableSmith while it's maximized, it will startback up maximied).

    Re-select/re-run current table on a "reload" - If you leave this unchecked, TableSmithwill reset itself to the state it is in at start-up when you click the "Reload" button ormenu option. If you check this, it will reset itself as described, but then immediately

    select (and therefore run) the table you had selected before clicking Reload.

    Folders

    Table Folder - Clicking the "..." button allows you to select the folder where your tablefiles/categories are located. By default, they are in the "Tables" folder where youinstalled TableSmith (and will be set back to this if you click "Set to defaults"), but youmay have the program look elsewhere if you wish.

    Miscellaneous

    Table Editor - By default, TableSmith uses Windows Notepad for editting table files. Ifyou have a different editor you'd like to use, you may select it here by clicking the"..." button (note: the editor you select must be an EXE file, and must be able to loada file given it as a parameter to function properly). Alternately, you may choose the"TableSmith Graphical Editor". The editor is a new feature being added to TableSmithand currently does not support all of TableSmith's table format features, but it caneasily handle the more basic tables. At the moment, it is undocumented but availablefor anyone who wishes to give it a try.

    Display error message for non-existent group calls - Checking this option will tellTableSmith to display an error message if a group is called that it cannot find.Unchecking this will display, as text, whatever group call was made.

    Remove re-roll/notes links when exporting to HTML - Text that may be re-rolled, orthat was generated with the "Notes" function, will appear as blue or green links in aWeb browser when you open an exported HTML file. However, browsers outside of

    TableSmith won't understand what these links mean when you click on them. If youdon't wish to have the links in your exported HTML files, check this option.

    Output Type - Select the type of output you want TableSmith to generate. By defaultthis is HTML, but you may change to XML or text. Generate files will be displayed withthe appropriate extension, and exported or archived in a like manner.

  • 7/25/2019 TableSmith 45 Manual

    7/36

    TableSmith 4.5 Users' Manual

    Page 7 of 36

    TableSmith Categories

    TableSmith uses "categories" to help you organize your tables. A category is simply a folderyou create in your "Tables" folder. The Category List on the main interface will display thefolders in "Tables", and selecting one will display the table files in that folder.

    Some things to keep in mind:

    Though you can have tables with the same names in different categories/folders, youare encouraged to use unique names for all your tables. At present, TableSmith hasno way of distinguishing two tables with the same name (and thus can generateunexpected results). This may change in the future.

    If a category/folder starts with a "~" character, it will not be displayed in theinterface's drop-down list. Tables in that folder will still be seen by TableSmith. Usethis feature if you have tables that you don't want to see in the interface but whichother tables may use (such as reference tables).

    TableSmith Basic File Format

    Table files are the heart of TableSmith. These are the tables that contain the rules and data

    used to generate names, treasure hoards, village shops, encounters, and anything else youcan think of. The information below covers the basics of TableSmith tables, and is enough tohelp you figure out how to edit existing tables or create new ones of your own. When you'recomfortable with the basic functionality described below, you can move on to the AdvancedFeatures and add even more power and flexibility to your tables. A simple example file isshown below:

    # This is a comment line

    :Start1,You see a [Creature] with a [Treasure.Coins], worth {Dice~1d6*1000}experience.

    :Creature1-2,Orc3,Skeleton4-7,Archdaemon8,[Goblins.Start]9,[Color] Spirit

    # Colors for the various spirits:Color1,Red2-3,White4,Blue

    The example above illustrates the following basic TableSmith concepts: Comments, Groups,

    Group Calls, and Dice-Rolling.

    Comments

    The first line, with the '#' character, is a comment. Comments may be placed anywherewithin your table, generally to explain why something was done in a table in a particularway, to describe the table's purpose, to show who authored the table or where it's originalsource was, etc. Comments are intended for use by a person looking at a table; if a line hasa '#' as its first character, the entire line is ignored by TableSmith.

  • 7/25/2019 TableSmith 45 Manual

    8/36

    TableSmith 4.5 Users' Manual

    Page 8 of 36

    Groups

    The parts of the table above starting with "Start", "Creature", and "Color" are groups. Agroup consists of a name, followed by Entries. A group may have any name you wish,though you should stick to only alphanumerics (i.e.; letters and numbers) and underscores("_"). Group and table names cannot contain the characters "+", "-", or "=" as these havespecial meaning when used in a call. Other characters that may work now might not work in

    the future, so stick to "A-Z", "a-z", "0-9", and "_". Groups are preceded in a table by a colon(":"). Groups can be considered "subtables" within the larger table files. Note: There is one"special" group, known as "Start". Whenever a table is selected from TableSmith, the firstgroup that is rolled on is "Start" (it has to start somewhere).

    Group Entries

    The entries under each group follow a specific format, which is:

    number,text

    Note that the comma is very important. When an entry is read into TableSmith, everythingup to the first comma it reads is used for probability, and everything after is a line of text.Note that if you put a space after the comma, that space is part of your line of text. Also

    note that when it comes to commas, TableSmith only cares about the first one it finds. Youmay put commas in anywhere in your text line that you care to.

    The number before the comma in an entry line is a probability. This is the chance that ifthat line's group is selected, that particular line will be used. For instance, in the "Color"group in the example, the entry "Red" has a number of 1. Since the range of numbers forthat group is 1-4, if the Color group is selected for something, a random number from 1 to4 will be generated, and if it comes up a '1', "Red" will be the text used from the Colorgroup. This number may be either a single value, or a range, in the format of "X-Y", where'X' is the lower limit of the range and 'Y' the upper. The range for a group is determined bythe lower limit (or value if a single number) of the first entry beneath it and the upper limitof its last entry. In the example above, when rolling on the "Creature" group, the range is1-9, and for the "Color" group, it is 1-4. Note: This number cannot be negative, and if a '0'

    is used, that entry will not be used (though '0' won't generate an error).

    Alternate Group Format

    Groups may also follow an additional format. It is similar to the above, but looks like this:

    ;Weapons3,Sword2,Axe5,Dagger2,Pole arm

    This type of group works in a similar manner, but rather than the numbers describingranges, they describe relative probabilities. In the example above, for instance, the 3represents '1-3', the 2 is '4-5', the dagger has a range of '6-10', and the pole arm's 2 is the

    equivalent of '11-12'. Note that groups following this format should start with a semi-colon(";"), rather than a colon (":").

  • 7/25/2019 TableSmith 45 Manual

    9/36

    TableSmith 4.5 Users' Manual

    Page 9 of 36

    Groups that Don't Repeat

    If you include an exclamation point ("!") after a group designator (":" or ";"), this will signalTableSmith that the group should not allow duplicate results. In other words, if an item isselected in the group, and the group is called later, previously selected items will not beselected again. For example, take a group that looks like this:

    ;!Weapons3,Sword2,Axe5,Dagger2,Pole arm

    A roll on the group indicates that, say, "Dagger" is selected and returned to the caller. Laterin the table, this "Weapons" group is called again. On this roll, the result will be anythingbut "Dagger", since that has already been used. Say the result of the second roll is "Axe".Now, if this table is called a third time, the only results to be returned will either be "Sword"or "Pole arm".

    Note: Take care when using this feature. TableSmith will give you an error (appearing inyour table output) if a group is called that is already "maxed-out" (i.e.; it is a non-

    duplicating group that has had all its members used, and another call is made).

    Group Cal ls

    Whenever an entry line contains something in double square brackets ('[' and ']'), ratherthan using that text as part of the selected line, the program will jump to the group with thename that is between the brackets, and insert the generated result from that group into thecurrent line. For instance, in the example, the "Creature" group has an entry that says"9,[Color] Spirit". This means that if that entry is selected, TableSmith will jump to the"Color" group, make a selection, and replace "[Color]" with that selection. Thus, the resultwould be "Red Spirit", "White Spirit", or "Blue Spirit", depending on the value generated forthe "Color" group.

    Calling Groups in Other TablesBesides calling groups in the same table, you may also call group in other tables. If the textbetween the two brackets contains a period, TableSmith treats the text before the period asa table, and the text after it as a group. So while [Treasure] means the program would lookin the current table for a group called "Treasure", [Treasure.Coins] means the programwould load the "Treasure" table and generate a result from that table's "Coins" group.

    If you wish to generate a result from the entire table, reference the "Start" group (forinstance, to generate a result from a table called "Weapons" as if you were selecting itdirectly through the TableSmith interface, the syntax would be [Weapons.Start]).

    Note: Referenced tables must exist in the Tables subdirectory, and must be spelled thesame as the table files (without the ".tab" extension).

    Also note that with both types of Group Calls, it is possible to create endless loops that willfreeze up the program (example: Having a table called "Freeze", with one entry in the"Start" group, being "1,[Start]"). Due to the complexities involved, TableSmith does notcheck for this. You will have to be careful about this sort of thing.

  • 7/25/2019 TableSmith 45 Manual

    10/36

    TableSmith 4.5 Users' Manual

    Page 10 of 36

    Roll Modifiers

    Normally, when a group is called, TableSmith generates a random number within the rangeof the groups limits, and then looks up the corresponding entry for that number. Forexample: In the sample table at the top of this page, when TableSmith rolls on the"Creature" table, it generates a random number from 1 to 9, and selects the correspondingentry. However, you may modify this roll if you wish. When a group call is made, a "roll

    modifier" may be applied: If a group call contains a "+", "-", or "=", the value of whateverfollows is either added, subtracted, or "forced" from the roll made on the referenced group.For example:

    [Potions+3]- This would add 3 to whatever roll was made on the group 'Potions'

    [Castles-5]- This would subtract 5 from whatever roll was made on the group

    'Castles'.

    [Undead=4]- Rather than roll on the group 'Undead', the result generated will be for

    whatever line the value 4 is located.

    The modifier is never required, and is simply used if you wish to modify a group roll.

    Die RollsTableSmith allows for random die rolling in the middle of tables (useful for any number ofthings, from the value of treasure to character generation to monster hits). To generate adie roll, a special syntax is required:

    {Dice~XdY?Z}

    X- Any non-decimal number (1, 5, 100, etc.). May be omitted, in which case it is

    considered to be '1'.

    d- The letter 'd' must be in the declaration (think of it as the 'd' in "2d8" or the like)

    Y- The number of "sides" of the die you are rolling.

    ?- This, and 'Z' can be left out. The ? symbol means you can place a '+', '-', '*', or '/'

    in the formula (so you can generate results such as "3d6+2" or "4d8-5")

    Z- This is the amount you wish to add, subtract, multiply by, or divide by.

    When TableSmith sees curly brackets ('{' and '}') containing the text "Dice~", rather thanprinting these characters directly, it "rolls dice", and substitutes the result in place of thebrackets and their contents. So, for instance, if you have "{Dice~3d6}" in a group entry,the program will "roll" 3d6, take the result, and put it in place of the bracketed text.

  • 7/25/2019 TableSmith 45 Manual

    11/36

    TableSmith 4.5 Users' Manual

    Page 11 of 36

    How does al l th is work?

    When TableSmith generates results for a table, it first goes to that table's "Start" group.Taking the total range of numbers based on the entries, it generates a random number, andmatches it up with the appropriate entry. It then builds a string of text, calling variousgroups, tables, and die rolls as needed. This text is then displayed as the results of the tablegeneration.

    Here's an example using the table shown at the top of this page:

    The program looks at the "Start" group and determines a range of numbers. Sincethere is one entry with a value of '1', this range is 1-1 (pretty simple). A randomnumber is generated in the range of 1 to 1, and strangely enough, '1' is the result.

    Looking at the selected entry in "Start", the program sees that a call is made to thegroup "Creature". A range is again determined, this time being 1 to 9. A randomnumber is generated in this range, and the result, say, is '9'.

    If the result was '2', "Orc" would have been the result of the call to "Creature", andthat would have been passed back to the Start entry. However, with '9', there is a callto another group, "Color".

    TableSmith goes to the "Color" group, determines a range of 1 to 4, and generates arandom value. '4' is the result, so "Blue" is passed back up.

    "Blue" has been generated as a result for the call to the "Color" group, so this issubstituted for "[Color]", meaning the call to the "Creature" group has come up with"Blue Spirit".

    "Blue Spirit" is passed up to the "Start" entry, which uses it to replace "[Creature]".

    So far we have "You see a Blue Spirit". To this we continue to add text, resulting in"You see a Blue Spirit with a " - but now we have another link, this time to anothertable called "Treasure" and one of its groups, "Coins".

    In summary, TableSmith loads the "Treasure" table and generates a result from its"Coins" group. Let's say we got back "pouch of 20 gold"; we continue, so until we hitthat first curly bracket, we have "You see a Blue Spirit with a pouch of 20 gold, worth".

    TableSmith looks at the formula "1d6*1000", and generates a number from 1 to 6,multiplying it by 1000. Let's say the result is "4000".

    The final outcome of this generation is: "You see a Blue Spirit with a pouch of 20 gold,worth 4000 experience."

    This is just an example of what TableSmith does. The best way to learn the potential of thisprogram is to look at the sample tables provided.

    A few other notes:

    Tables are all in standard ASCII text format.

    Table names, like group names, should not contain the following characters: "+", "-",and "=".

    TableSmith is case-sensitive when it comes to group names/calls as well as variablesand functions (which are covered in the "Advanced" section of Help). Thus, the calls[Creature] and [creature] are not the same.

    Any new tables must be added/copied/whatever into the 'Tables' subdirectory, whichis found in the directory that TableSmith was installed into.

  • 7/25/2019 TableSmith 45 Manual

    12/36

    TableSmith 4.5 Users' Manual

    Page 12 of 36

    TableSmith uses an HTML control for display, so you may place HTML tags into yourentry lines for special formatting. For an example of how HTML is used in a table, lookat the "Book Description" table.

    TableSmith Advanced Format Features

    This section details the more advanced features of TableSmith. Included are details on

    variables (which allow you to preserve values or results within a table), parameters (allowyou to solicit input from the user), functions (tools to accomplish things not possible withthe basic TableSmith format), and other miscellaneous features.

    Variables

    TableSmith supports variables, which can be thought of as storage areas for numbers, text,or other information. Variables must be named, and can be called anything you want(though you are advised to just use alphanumeric characters - that is, letters and numbers).A variable name can contain spaces, though not at the beginning or end of the name.

    Variables must be "declared" in a TableSmith file before anything else (includingparameters, which are detailed elsewhere). A variable declaration is a single line formatted

    as follows:%VariableName%,x

    "varname" is whatever name you choose for the variable, and "x" is the default value thatthe variable will have (i.e.; whatever value it possesses until reassigned or modified).Variables can store text or numbers.

    Whenever an entry has something between two percent signs ("%"), TableSmith reads thisas a variable reference. If you have a variable with a name matching whatever is betweenthe % characters, the value that is currently in that variable replaces the reference. Forinstance, say the variable "amount" currently holds the value "12". The following line in aTableSmith file:

    "There are %amount% orcs here."

    will display as:

    "There are 12 orcs here."

  • 7/25/2019 TableSmith 45 Manual

    13/36

    TableSmith 4.5 Users' Manual

    Page 13 of 36

    Variable Assignments

    Whenever a group entry has something in two sets of pipes ("|"), it is recognized byTableSmith as a variable assignment. The format of an assignment is as shown:

    |xxxxx?Y|

    where

    xxxxxis a variable name (without the "%")

    ?is +, -, *, /, \, >, 35|- Assigns 35 to "A", if 35 is greater than A's value

    |A

  • 7/25/2019 TableSmith 45 Manual

    14/36

    TableSmith 4.5 Users' Manual

    Page 14 of 36

    Funct ions

    Functions are a feature of TableSmith that allow you to perform some sort of action that youcouldn't otherwise do with the standard table format or which could be done with greatdifficulty. The "Dice" function has already been detailed in the Basic Format area of Help;TableSmith supports many more. Functions follow the format below:

    {FunctionName~nnnn,nnnn,nnnn,...}

    "FunctionName" is the name of the function. It is followed by a "~", and one or more values(the number and the type depend on the particular function). Some functions return text(replacing the {, }, and everything in-between), some manipulate variables. Each functionis detailed below (note that variables who's values are referenced by functions are notsurrounded by the "%" character as they are normally; these functions are SortAsc,SortDesc, Min, Max, and Split). Examples are shown in italics.

    Abs (Absolute Value)

    {Abs~SomeValue}

    Returns the absolute value of "SomeValue".

    {Abs~-3}returns "3"

    And (Logical AND)

    {And~expression1,expression2}

    Compares expression1 with expression2; if both are true, "And" returns 1. If one or bothare false, returns 0. If there is an error in either, And returns -1.

    {And~%var1%>3,%var2%=2}returns "1" if var1 is greater than 3 and var2 equals 2

    AorAn (A or An)

    {AorAn~String}

    If "String" starts with a vowel, this function appends "an " to the front of it; otherwise, it

    appends "a " to the front.

    {AorAn~ostrich}returns "an ostrich"

    Bold (Boldface Text)

    {Bold~Text}

    "Text" will be displayed in boldface in the results window (HTML-output only).

    The {Bold~dragon} is redwill be displayed as: The dragonis red.

    Calc (Calculate)

    {Calc~Expression}

    This function will return the results of the mathematical expression given to it. The functionwill recognize addition, subtraction, division, division with truncation, and multiplication (+,-,/,\,*). Parentheses can be used as well. Note that if you use variables in the expression,make sure a space divides the "%" of any variable from the division sign ("/").

    {Calc~(3*(5+2))}returns "21"

  • 7/25/2019 TableSmith 45 Manual

    15/36

    TableSmith 4.5 Users' Manual

    Page 15 of 36

    Cap (Capitalize)

    {Cap~String}

    This function will return the string fed to it, with the first character capitalized. Spaces arecounted, so while "arrow" will be capitalized to "Arrow", " arrow" would stay the same, sincethe function looks at the space that precedes the word.

    {Cap~dragons}returns "Dragons"

    CapEachWord (Capitalize Each Word)

    {CapEachWord~String}

    This function will return the string fed to it, with each word in the string capitalized. A"word" is designated by having a space in front of it.

    {CapEachWord~druids and dragons}returns "Druids And Dragons"

    CarRet (Carriage Return)

    {CarRet~} or {CR~}

    Inserts a carriage return (i.e.; terminates the current of text and starts a new line).

    Ceil (Ceiling Integer)

    {Ceil~Number}

    Returns the smallest integer higher than or equal to "Number".

    {Ceil~2}returns 2, {Ceil~1.3}returns 2, {Ceil~-2.3}returns -2

    Count (Count Entries)

    {Count~GroupName}

    Count will return the number of entries in "GroupName". A group with three entries wouldreturn "3", a group with ten entries would return "10", etc.

    Debug (Debug)

    {Debug~Caption}

    Displays various information for debugging purposes (intended for more advanced users).Displays a dialog box with "caption" as its caption, along with a list showing all the variablesand their values for the current table, system resource/memory information, and thenumber of times the main TableSmith routine has been looped through.

    Dice (Roll Dice)

    {Dice~XdY?Z}

    The Dice function (see the Basic Format section for detailed information on how this function

    works).

    {Dice~1d4+1}will return some number from 2 to 5

    DSAdd (Add item to dataset)

    {DSAdd~VarName}

    Adds a new item to the end of the dataset "VarName". Each field in this item will be equal towhatever is defined as the dataset's defaults. DSAdd will return the index of the new item(which will also be equal to the number of items in the dataset).

  • 7/25/2019 TableSmith 45 Manual

    16/36

    TableSmith 4.5 Users' Manual

    Page 16 of 36

    DSCount (Get the number of items)

    {DSCount~VarName}

    Returns the number of items in dataset "VarName".

    DSCreate (Create dataset)

    {DSCreate~VarName,Field1,Default1,Field2,Default2,...Fieldx,Defaultx}

    Creates a dataset and assigns it to the variable "VarName". "Fieldx" defines the name of afield in the dataset, and "Defaultx" is what the default value for each field is. You can haveas many fields as you want, but you must list a field name and a default for each one.Datasets created with this function do not have any items in them.

    DSFind (Find an item)

    {DSFind~VarName,StartingIndex,SearchExpression1,SearchExpression2,...SearchExpressionX}

    Starting at the item with index "StartingIndex", searches through each item until it findsone where the given "SearchExpressions" are true and returns the index of that item (if notmatch is found, "-1" is returned). "SearchExpression" follows the format

    "fieldnameXXXvalue". "XXX" is a comparison operator, similar to what you use for "If/IIf".The following operators are recognized: =, !=, =, >,

  • 7/25/2019 TableSmith 45 Manual

    17/36

    TableSmith 4.5 Users' Manual

    Page 17 of 36

    DSSort (Sort a dataset)

    {DSSort~VarName,Field1,Direction1,Field2,Direction2,...Fieldx,Directionx}

    Sorts the items in dataset "VarName". You can sort on as many fields as you want, but eachfield also needs a direction listed with it (0 is ascending - in alphabetic/numeric order; 1 isdescending - reverse alphabetic/numeric order). If you have multiple fields defined, thedataset will sort based on the first field, then sort on the second field for items where the

    first field is the same, then sort on the next field for items where the previous field was thesame, etc.

    DSWrite (Write dataset to file)

    {DSWrite~VarName,Filename}

    Writes the dataset in "VarName" to a data file. The data file will be named "Filename.tsd"and will reside in TableSmith's "Data" folder.

    Extern (External Call)

    {Extern~Library.Object,StringToPass}

    Calls the "main" function of "Library.Object", feeding it "StringToPass". Intended to be used

    with add-ons for TableSmith; the use of Extern is something that is covered by individualadd-on authors.

    Find (Locate a string in another string)

    {Find~x,String1,String2}

    Starting at character "x", find the location of "String1" within "String2" and return the result(if "String1" cannot be found in "String2", 0 will be returned).

    {Find~1,able,TableSmith}will return "2" ("able" is found in "TableSmith" starting at

    the 2nd character)

    Floor (Floor Integer)

    {Floor~Number}

    Returns the largest integer smaller than or equal to "Number".

    {Floor~2}returns 2, {Floor~1.3}returns 1, {Floor~-2.3}returns -3

    Generate (Generation Link)

    {Generate~0,Text,Table/Group Call}

    The "Generate" function allows you to embed a link into your results that will additionalgeneration in the future. The first parameter must be "0" (other values may be added in thefuture). The "Table/Group Call" is a call to a table or group, similar in syntax to a standardgroup call, but without the square brackets ("[", "]"); it may include parameters and/or

    modifiers as well. "Text" is the linkable text to display in the results window. When this textis clicked, the "Table/Group Call" that's been specified will be made and the resultssubstituted for "Text".

  • 7/25/2019 TableSmith 45 Manual

    18/36

    TableSmith 4.5 Users' Manual

    Page 18 of 36

    If (Conditional function)

    {If~conditional ? Result1/Result2}

    The "If" function works by comparing two items to see if they meet a specified criteria. Ifthe "conditional" statement is true, "Result1" is returned. If it is false, "Result2" is returned("Result2" is optional; if it is not shown and the conditional is false, nothing will bereturned). The options for the conditional are "=" (equals), "!=" (does not equal), "" (greater than), "=" (greater than or equal).

    If the variable "Class" is 1, {If~%Class% = 1 ? warrior / wizard}will return

    "warrior"; otherwise, it will return "wizard"

    IIf (Conditional function)

    {IIf~conditional ? Result1:Result2}

    "IIf" works identically to "If", above. The only difference is that "IIf" separates its resultswith a colon (":") rather than a slash ("/"). Use "IIf" if you need a result that uses a slash(perhaps for HTML), but not a colon (you can still print a colon with the HTML code ":").

    Input (Input a value)

    {Input~VarName,Prompt,Default}

    The "Input" function allows a table to solicit input from the user as the table is running.When this function is encountered, an input box appears on the screen, with the prompt asdefined by "Prompt", with a default value as defined by "Default". Whatever value the userenters is assigned to the variable "VarName" (if the user clicks "Cancel" on the input box,no action is taken, and the current value of "VarName" is unchanged). Note that thevariable name should be used without percent signs ("%").

    {Input~Weapon,Which weapon is favored?,longsword}prompts the user "Which

    weapon is favored?", with the default "longsword", and takes whatever they reply andputs it into the variable "Weapon"

    Italic (Italicize Text){Italic~Text}

    "Text" will be displayed in italics in the results window (HTML-output only).

    The {Italic~dragon} is redwill be displayed as: The dragonis red.

    LastRoll (LastRoll)

    {LastRoll~}

    Returns the group name and the roll made on the most recently called group, in the format"TableName.GroupName:X".

    LCase (Lower Case)

    {LCase~String}

    Returns "String" in all lower case.

    {LCase~TableSmith} will return "tablesmith"

  • 7/25/2019 TableSmith 45 Manual

    19/36

    TableSmith 4.5 Users' Manual

    Page 19 of 36

    Left (Leftmost Characters)

    {Left~x,String}

    Returns the leftmost x characters from "String".

    {Left~3,TableSmith}will return "Tab"

    Length (String Length){Length~String}

    Returns the length of "String".

    {Length~TableSmith} will return "10"

    Line (Line)

    {Line~align, width}

    Inserts a line across the page. Width is a percentage; if omitted, it will be be assumed to be100%. "align" can be left, center, or right.

    Lockout (Lockout Entry)

    {Lockout~Group,Values}

    In a non-repeating table, Lockout flags the entries with the probability values listed asalready selected. "Values" can be a single number, a range of numbers, or a combination.

    {Lockout~Animals,3,7-9}will flag whatever entries encompass 3, 7, 8, and 9 as

    already being used.

    Log (Write to Log)

    {Log~FileName,text}

    Adds "text" to the end of a text file called "FileName"

    {Log~C:\log.txt,Generated line 14}will write "Generated line 14" at the end of

    the file "C:\log.txt"

    Loop (Loop)

    {Loop~n,Value}

    Displays the results of "Value" "n" number of times.

    {Loop~3,Hello!} will return "Hello!Hello!Hello!"

    Max (Maximum Value)

    {Max~Var1,Var2,Var3,...}

    The Max function looks at the values following it, and returns the largest value from the list.

    {Max~5,7,14}returns "14"

  • 7/25/2019 TableSmith 45 Manual

    20/36

    TableSmith 4.5 Users' Manual

    Page 20 of 36

    MaxVal (Maximum Value of Entry)

    {MaxVal~GroupName,X}

    MaxVal looks at the entry on line "X" of group "GroupName", and returns the maximumnumber that could be rolled on GroupName for it to be a result.

    Given group "Weapons", with the first line being "4,dagger" and the second line being

    "3,scimitar", {MaxVal~Weapons,1}would return "4" (since 1-4 would yield "dagger"and 5-7 would yield "scimitar")

    Mid (Middle Characters)

    {Mid~x,y,String}

    Starting with the "y"th character, returns x characters from "String".

    If the variable "Name" contains "Reginald", then {Mid~5,2,%Name%}returns "egina"

    Min (Minimum Value)

    {Min~Var1,Var2,Var3,...}

    The Min function looks at the values of all the variables following it, and returns the smallestvalue from the list.

    {Min~5,7,14} returns "5"

    MinVal (Minimum Value of Entry)

    {MinVal~GroupName,X}

    MinVal looks at the entry on line "X" of group "GroupName", and returns the minimumnumber that would need to be rolled on GroupName for it to be a result.

    Given group "Weapons", with the first line being "4,dagger" and the second line being"3,scimitar", {MinVal~Weapons,2}would return "5" (since 1-4 would yield "dagger"

    and 5-7 would yield "scimitar")

    Mod (Remainder)

    {Mod~Dividend,divisor}

    Divides "dividend" by "divisor" and returns the remainder

    {Mod~5,2}would return "1" (5 divided by 2 is 2, remainder 1)

    Msg (Message Box)

    {Msg~Message}

    Displays "Message" in a message box; table execution is halted until the user clicks "OK".

    {Msg~Generating village} displays a message box which says "Generating village"

    Note (Notation)

    {Note~Text}

    Displays "Text" in the results window in green; the text can be clicked on, and the user canchange what the text says. This editted information replaces what was originally in theresults window.

  • 7/25/2019 TableSmith 45 Manual

    21/36

    TableSmith 4.5 Users' Manual

    Page 21 of 36

    Or (Logical OR)

    {Or~expression1,expression2}

    Compares expression1 with expression2; if either or both are true, returns 1. If both arefalse, returns 0. If there is an error in either, And returns -1.

    {Or~%var1%>3,%var2%=2}returns "1" if var1 is greater than 3 and/or if var2 equals 2

    OrderAsc (Order Ascending)

    {OrderAsc~"x",String}

    OrderAsc takes the String given, divides it up using "x" (must be in quotes) as a delimiter,and returns a string with its elements sorted in ascending order (divided by "x").

    {OrderAsc~",",skeleton,orc,troll}returns "orc,skeleton,troll"

    OrderDesc (Order Descending)

    {OrderDesc~"x",String}

    OrderDesc works as "OrderAsc" above, but sorts in descending order.

    {OrderDesc~",",skeleton,orc,troll}returns "troll,skeleton,orc"

    Ordinal (Ordinal Number)

    {Ordinal~Number}

    Ordinal returns "Number" with the appropriate suffix attached (i.e.; "1st" for 1, "22nd" for22, "458th" for 458, etc.).

    Param (Parameter Item)

    {Param~Variable,Index}

    If "Variable" is used as a list-type parameter, the list item with the given "Index" will bereturned.

    If "Class" is a parameter variable with entries "Warrior,Priest,Wizard,Rogue", then{Param~Class,3}will return "Wizard"

    Picture (Display Picture)

    {Picture~Filename}

    The graphic file "Filename" will be displayed in the results window. This file must be found inthe "Graphics" folder, found in the TableSmith folder, and the extension must be part of"Filename". Any format that Microsoft Internet Explorer supports can be use, such as JPEG(.jpg), GIF (.gif), and PNG (.png).

  • 7/25/2019 TableSmith 45 Manual

    22/36

    TableSmith 4.5 Users' Manual

    Page 22 of 36

    Plural (Make String Plural)

    {Plural~String}

    This function will return the string fed to it in its plural form. The following rules are used:

    Words ending in "ch", "o", "s", "sh", "x", or "z", are returned with "es" added to theend.

    Words ending in "f" or "fe" are returned with "f" or "fe" replaced by "ves".

    Words ending in a consonant and "y" are returned with "y" replaced by "ies".

    All other words are returned with "s" added to the end.

    {Plural~wolf}returns "wolves"

    Power (Raise to a Power)

    {Power~x,y}

    Returns the result of "x" raised to the power of "y".

    {Power~2,3}returns 8

    Replace (Replace Text)

    {Replace~SearchText,ReplaceText,SearchString}

    Replaces each instance of "SearchText" in "SearchString" with "ReplaceText".

    {Replace~e,@,skeleton}returns "sk@l@ton"

    Reset (Reset Group)

    {Reset~GroupName}

    Resets the specified group (if the group is a "non-repeating" group, it clears the "used" flagsfor that group's entries). Similar to the "RS~" group call tag, but does not make a call to thegroup.

    {Reset~Gems}resets the group "Gems"

    Right (Rightmost Characters)

    {Right~x,String}

    Returns the rightmost x characters from "String".

    {Right~5,TableSmith}returns "Smith"

    Round (Rounding)

    {Round~SomeValue,x}

    Rounds the passed-in value to "x" decimal places and returns it.

    If the variable "Coinage" equals 5.32, {Round~%Coinage%,1}returns "5.3"

    Shell (Shell Command)

    {Shell~Command}

    Shell runs the "Command" text outside of TableSmith. This can be used to call externalprograms.

    {Shell~c:\gameprogs\addtonames.exe Zalagor}calls the program

    "c:\gameprogs\addtonames.exe" and feeds it the command-line parameter "Zalagor"

  • 7/25/2019 TableSmith 45 Manual

    23/36

    TableSmith 4.5 Users' Manual

    Page 23 of 36

    SortAsc (Sort Ascending)

    {SortAsc~Var1,Var2,Var3,...}

    SortAsc will look at the values in the list of variables following the "~", sort them in anascending manner, and re-assign them to the variables in the sorted order. SortAsc willdetermine whether the list is numeric or alphabetic. Nothing is returned by this function.

    Given the variables Gem1, Gem2, and Gem3, equal to "Emerald", "Sapphire", and

    "Diamond" respectively, {SortAsc~Gem1,Gem2,Gem3}assigns "Diamond" to Gem1,"Emerald" to Gem2, and "Sapphire" to Gem3

    SortDesc (Sort Descending)

    {SortDesc~Var1,Var2,Var3,...}

    SortDesc works exactly like SortAsc (above), but sorts in a descending manner.

    Given the variables Gem1, Gem2, and Gem3, equal to "Emerald", "Sapphire", and"Diamond" respectively, {SortDesc~Gem1,Gem2,Gem3}assigns "Sapphire" to Gem1,

    "Emerald" to Gem2, and "Diamond" to Gem3

    Split (Split)

    {Split~VarToSplit,"x",Var1,Var2,Var3,...}

    The Split function is somewhat complex. Following the "~", is the name of a variable(without "%"'s), then a delimiter (in quotes), and then a list of variables. What Split does isto take the first variable ("VarToSplit" shown above), divide it up, and copy the results intothe variable list ("Var1", "Var2", etc.). The delimiter character is used to divide the firstvariable. The example below illustrates:

    Given the variable AbilityScores, equal to "78,56,60",{Split~AbilityScores,",",Strength,Intellect,Agility} would assign "78" to the

    variable Strength, "56" to Intellect, and "60" to Agility

    Sqrt (Square Root)

    {Sqrt~SomeValue}

    Returns the square root of the value given.

    {Sqrt~9}returns "3"

    Status (Display Status)

    {Status~Message}

    Displays the text in "Message" in the right panel of the TableSmith status bar. This textremains until changed by another call to Status; {Status~} will clear the panel.

    {Status~Generating village}displays "Generating village" in the status bar's right

    panel

    Stop (Stop Table Generation)

    {Stop~Message}

    Displays "Message" in a message box; table execution is halted once the user clicks "OK".

    {Stop~Generating village}displays a message box which says "Generating village",

    then stops when user clicks "OK"

  • 7/25/2019 TableSmith 45 Manual

    24/36

    TableSmith 4.5 Users' Manual

    Page 24 of 36

    TableExists (Check if Table Exists)

    {TableExists~TableName}

    Checks to see if a table called "TableName" can be found in TableSmith's "Tables" folder (or,rather, in the folders inside of "Tables"). If no such table can be found, returns a "0";otherwise, returns a "1".

    Trim (Trim Spaces){Trim~String}

    Trims the spaces from the beginning and end of "String" (spaces in the middle, surroundedby other characters, are unaffected).

    {Trim~ a castle }returns "a castle"

    Trunc (Truncate)

    {Trunc~SomeValue}

    Returns the result of truncating the given value (drops the fractional portion, if any).

    {Trunc~3.5738472}returns "3"

    UCase (Upper Case)

    {UCase~String}

    Returns "String" in all upper case.

    {UCase~TableSmith} will return "TABLESMITH"

    Unlock (Unlock Entry)

    {Unlock~Group,Values}

    In a non-repeating table, Unlock clears the "already selected" flags of the entries with theprobability values listed. "Values" can be a single number, a range of numbers, or acombination.

    {Unlock~Gems,3,7-9}will clear the flags for whatever entries encompass 3, 7, 8, and

    9 so they can be used.

    Used (Used Already)

    {Used~Group,Entry#}

    The Used function is used to determine if an entry in a non-duplicating group has alreadybeen called. Following the "~" is the name of a group in the current table (or in a differenttable, in the standard "table.group" syntax), and then a number. If the entry that thatnumber corresponds to has already been selected in the specified group, the functionreturns a 1. If the entry hasn't been selected, the function returns a 0. If that entry cannotbe found (ex: the group goes from 1-10 and the number given to the Used function is 12),

    then a -1 is returned. Passing in a "0" as the entry number checks all items in the group,returning a 1 if the group is "used up".

    {Used~Weapons,5}returns "1" if entry 5 has been used previously, 0 if not, and -1 if

    entry 5 does not exist in "Weapons"

    Version (Version)

    {Version~}

    Returns the version of the TableSmith engine.

  • 7/25/2019 TableSmith 45 Manual

    25/36

    TableSmith 4.5 Users' Manual

    Page 25 of 36

    VowelStart (Vowel Starts)

    {VowelStart~Text}

    If "Text" starts with a vowel (A, E, I, O, or U), this function returns a 1; otherwise, it returnsa 0.

    {VowelStart~%var1%}returns "1" if var1 starts with a, e, i, o, or u; if var1 starts with

    a consonant, it returns a "0"

    Xor (Logical Exlcusive OR)

    {Xor~expression1,expression2}

    Compares expression1 with expression2; if either is true, returns 1. If both are false or bothare true, returns 0. If there is an error in either, And returns -1.

    {Xor~%var1%>3,%var2%=2}returns "1" if var1 is greater than 3 or if var2 equals 2,

    but not if both are true

    While (While Loop)

    {While~n,Text}

    Displays the results of "Text" as long as "n" is not equal to 0

    {While~%ctr%,Hello!}will return "Hello!" as long as the variable "ctr" is not 0

    Parameters

    TableSmith supports "parameters." Parameters allow you to pass values from one table toanother, or query a user for input before rolling on a table.

    Parameters take up a single line and follow the format below:

    @x,n,prompt,option1,option2,option3,...

    the "@" symbol tells TableSmith that the line is a parameter. "x" is one of TableSmith'svariables - this is the variable that will receive a value, either from another table or from the

    user. "n" is the default value to use if no input is given. Prompt is the text to display to theuser if the table is called directly from TableSmith (as opposed to being called by anothertable). If nothing else is listed, the parameter is considered "text". If other items are listed(as in "optionx", above), then the parameter is considered to be a "list". If the table is calleddirectly from TableSmith, "text" parameters are entered directly by the user, while "list"parameters present the user with a list (the items shown as "optionx") from which theyselect a single item. The text entered (for "text") or the number of the option selected (for"list") is what is assigned to the variable.

    Here's an example:

    @name,1,Enter a name@gender,1,Select a gender,Male,Female

    When the table containing these lines is run, the first item will be displayed in theParameter dialog box as a text box, with the user prompted to type a name. This name willbe assigned to the variable "name". The second item will be displayed as a list, where theuser can select either "Male" or "Female". If they choose "Male", the variable "gender" willbe assigned the value "1". If "Female" is chosen, the value assigned to "gender" will be "2".

    You can also pass parameters to a table in a table call. You don't have to, nor do you haveto pass a value for each parameter. To pass parameters, you use parentheses after thetable call, like so:

    1,[CharGen.Start(3,4)]

  • 7/25/2019 TableSmith 45 Manual

    26/36

    TableSmith 4.5 Users' Manual

    Page 26 of 36

    In this example, the CharGen table is called, with 3 and 4 being passed in. Before the"Start" group of CharGen is called, the value 3 will be assigned to its first parameter (call it"G") and the value 4 will be assigned to its second parameter (dubbed "C"). Since the tableis being called from another table rather than TableSmith itself, the prompts are not used.

    All the parameters don't need to have a value passed in. The following all work inTableSmith (using the previous example):

    1,[CharGen.Start(3,)](G=3, C=default)

    1,[CharGen.Start(,4)](G=default, C=4)

    1,[CharGen.Start(,)](G and C default)

    1,[CharGen.Start](G and C default)

    Pregenerat ion Direct ives

    You can put "pregeneration directives" in your table to override interface settings. Adirective follows the following format:

    /DirectiveCommand parameter(s)

    Directives only are applied from tables that are called from the interface (i.e.; tables calledfrom within other tables will have their directives ignored). Supported directives are listedbelow.

    Background Color

    /BackColor nnnnn

    If the output is for HTML, the background color will be set to "nnnnn". This color can be anycolor or format that the HTML Body attribute "bgcolor" recognizes.

    /BackColor greenwill display a green background in an HTML results display

    Background Image/Background nnnnn

    If the output is for HTML, the background image will be set to "nnnnn". Remember that thisis relative to where the HTML results file is, so you may want to use an absolute path.

    Override Number of Rolls

    /OverrideRolls x

    Generates results from the table "x" number of times, rather than what is shown on theinterface.

    /OverrideRolls 3will always roll on the selected table three times

    Force Output Type

    /OutputType HTML | XML | Text

    Outputs the generation results in the specified format (HTML, XML, or Text), regardless ofwhat the user has specified in "Preferences".

    /OutputType XMLwill output a table in XML at all times

  • 7/25/2019 TableSmith 45 Manual

    27/36

    TableSmith 4.5 Users' Manual

    Page 27 of 36

    Miscel laneous

    A few other things to note:

    Group entries can be split into multiple lines. Whenever TableSmith reads in a linestarting with an underscore ("_"), it appends that line to the previously read-in entry.Example:

    :Start1,You find [Weapon] and_ [MagicItem]

    in a table file becomes:

    :Start1,You find [Weapon] and [MagicItem]

    internally.

    TableSmith will accept command-line parameters. The syntax is [TableName.Group]:x. "x" is the number of rolls to make, while "Table Name.Group" is astandard group call (tags and modifiers work as normal).

    If you want to print an actual percent sign ("%") or square bracket ("[","]"), precede

    the character with the slash character ("/").

    Parameters can be passed to a table regardless of which group you call in that table.

    If you want tabs or carriage returns in your output, use the characters "^T" and "^M",respectively. This isn't as useful if you are using HTML output, but may be helpful fortext or XML results.

    If you want to clear out a variable, simply assign nothing to it, like so: "|A=|".

  • 7/25/2019 TableSmith 45 Manual

    28/36

    TableSmith 4.5 Users' Manual

    Page 28 of 36

    TableSmith Quick Reference

    Groups

    Group and table names cannot include the characters "+", "-", or "="

    :GroupName1,Entry 12-3,Entry 2

    ':'- group lists entries in ranges

    ;GroupName1,Entry 12,Entry 2

    ';'- group lists entries in probabilities

    ;!GroupName1,Entry 12,Entry 2

    '!'- group entries cannot be repeated in multiple calls

    Group Cal ls

    [xx~Group@mod][xx~Table.Group@mod]

    xx- group call "re-roll tag" (optional)@- "+", "-", or "=" (optional)mod- modifier to add, subtract, or set equal to

    LN~ Returned result may be re-rolled

    Variables

    Must be declared at start of table, with a default value:o %VarName%,5

    May contain numbers or text May be any name; may include spaces When used, name must be surrounded by percent signs ("%"); value in the variable is

    substituted for percent signs and variable name

    When assigning a value to a variable, the percent signs are not used, and theassignment is encapsulated by pipes ("|"); the assignment does not display anything inthe results window

    Variable As signments

    |VarName?x| VarName- variable name?- "+", "-", "*", "/", "\", ">", "

  • 7/25/2019 TableSmith 45 Manual

    29/36

    TableSmith 4.5 Users' Manual

    Page 29 of 36

    Parameters

    Must be declared at start of table, but after variables Either prompts user to enter text or select an items from a list Text format:@x,n,prompt List format:@x,n,prompt, option1,option2,option3... 'x' in each example above is the variable to assign the parameter value to; for text, the

    user-entered text is assigned to the variable; for lists, the number of the selectedchoice is assigned ('1' for the first, '2' for the second, etc.)

    Can be passed into table calls, as in [CharGen.Start(3,4)]; passing parameters in isoptional, and not all parameters need to be accounted for

    Pregenerat ion Direct ives

    OverrideRolls x Rolls "x" times on the table rather than what the interfaceshows

    OutputType HTML |XML | Text

    Outputs results in specified format

    Funct ions

    Abs~Number Absolute value of Number

    And~expr1,expr2 Returns "1" if expr1 and expr2 are bothtrue, otherwise "0"

    AorAn~Text Appends "an " or "a " to "Text", dependingon whether "Text" starts with a vowel

    Bold~Text "Text" will be displayed in boldface

    Calc~Expression Calculates the result of the given expression

    Cap~Text Capitalizes first character of Text

    CapEachWord~Text Capitalize each word of Text

    CarRet~, CR~ Inserts a carriage return

    Ceil~Number Returns the smallest integer higher than orequal to "Number"

    Count~Group Returns the number of entries in 'Group'

    Debug~Caption Displays various information for debuggingpurposes

    Dice~XdY?Z Dice roller

    DSAdd~VarName Adds a new (empty) item to the end of thedataset "VarName"

    DSCount~VarName Returns the number of items in the dataset"VarName"

  • 7/25/2019 TableSmith 45 Manual

    30/36

    TableSmith 4.5 Users' Manual

    Page 30 of 36

    DSCreate~VarName,Field1,Default1,Field2,Default2, ...Fieldx,Defaultx

    Creates a dataset, assigns it to the variable"VarName", and defines the names anddefaults of each field

    DSFind~VarName,StartingIndex,SearchExpression1,SearchExpression2, etc.

    Starting at item at "StartingIndex", using"SearchExpressionX", searches dataset"VarName" and returns index of first

    matching item

    DSGet~VarName,Index,Field Returns the value of "Field" in the item at"Index"

    DSRandomize~VarName Randomly orders the items in the dataset"VarName"

    DSRead~VarName,Filename Reads the file "Data\Filename.tsd" into"VarName"

    DSRemove~VarName,Index Removes the item at "Index"

    DSSet~VarName,Index,Field1,Value1,Field2,Value2, ...Fieldx,Valuex

    In the dataset "VarName", for the item at"Index", sets Field1 to Value1, Field2 toValue2, etc.

    DSSort~VarName,Field1,Direction1,Field2,Direction2,...Fieldx,Directionx

    Sorts the items in "VarName"

    DSWrite~VarName,Filename Writes the dataset "VarName" to a data file.

    Extern~Library.Object,StringToPass Calls an Add-On tool, passing it"StringToPass"

    Find~x,String1,String2 Returns point where String1 is found inString2, starting at point "x"

    Floor~Number Returns the largest integer smaller than orequal to "Number"

    Generate~0,Text,Group Call Imbeds linkable "Text"; when clicked,"Text" is replaced by the results of "GroupCall"

    If~conditional ? Result1/Result2 Returns "Result1" if conditional is true,otherwise nothing or "Result2" (if present)

    IIf~conditional ? Result1:Result2Returns "Result1" if conditional is true,otherwise nothing or "Result2" (if present)

    Input~Variable,Prompt,Default Prompts user for input during execution,which is placed in "Variable"

    Italic~Text "Text" will be displayed in italics

    LastRoll~ Returns the last group called and thenumber rolled on that group

  • 7/25/2019 TableSmith 45 Manual

    31/36

    TableSmith 4.5 Users' Manual

    Page 31 of 36

    LCase~Text Returns "Text" in all lower-case

    Left~x,Text Returns leftmost x characters of Text

    Length~Text Returns the length (number of characters)in "Text"

    Line~alignment, width Inserts a line into the results at "alignment"(left, center, right) of a "width" percentage

    Lockout~Group,Values Locks out (i.e.; flags as used) the entries in"Group" that match the listed "Values"

    Log~FileName,Text Adds "Text" to the end of a file named"FileName"

    Loop~n,Text Evaluates and returns 'n' interations of"Text"

    Max~Var1,Var2,...Varx Returns the largest value from the listed

    variables

    MaxVal~Group,x Returns the maximum roll that will stillselect entry (line) 'x' from group 'Group'

    Mid~x,y,Text Returns middle X characters from Textstarting at y

    Min~Var1,Var2,...Varx Returns the smallest value from the listedvariables

    MinVal~Group,x Returns the minimum value needed to rollentry (line) 'x' from group 'Group'

    Mod~Dividend,divisor Divides "dividend" by "divisor" and returnsthe remainder

    Msg~Message Displays Message in a message box

    Note~Text Displays "Text" as clickable result; user mayclick and change the text

    Or~expr1,expr2 Returns "1" if expr1 and/or expr2 are true,otherwise "0"

    OrderAsc~"x",Text Returns an ordered string (ascending)

    OrderDesc~"x",Text Returns an ordered string (descending)

    Ordinal~Value Returns a number with an ordinal suffixattached

    Param~Variable,n If "Variable" is used as a list parameter,returns the list item with the index 'n'

    Picture~Filename Displays "Filename" from the "Graphics"directory

  • 7/25/2019 TableSmith 45 Manual

    32/36

    TableSmith 4.5 Users' Manual

    Page 32 of 36

    Plural~Text Makes Text plural

    Power~x,y Raise "x" to the power of "y"

    Replace~SearchText,ReplaceText,SearchString

    Goes through "SearchString" and replaces"SearchText" with "ReplaceText"

    Reset~GroupName Resets non-repeating group

    Right~x,Text Returns rightmost x characters of Text

    Round~Number,x Rounds Number to x decimal places

    Shell~Text Shells out, calling "Text"

    SortAsc~Var1,Var2,...Varx Sorts (ascending) and replaces the values inthe variables

    SortDesc~Var1,Var2,...Varx Sorts (descending) and replaces the valuesin the variables

    Split~VarToSplit,"x",Var1,Var2,...Varx

    Splits VarToSplit into Var1, Var2, etc. usingx as delimiter

    Sqrt~Number Square root of Number

    Status~Message Display Message in right panel of status bar

    Stop~Message Displays Message, then halts tableexecution when user clicks 'OK'

    TableExists~TableName Returns "1" if a table exists with name"TableName"; otherwise, "0"

    Trim~Text Trim spaces from Text

    Trunc~Number Truncate Number

    UCase~Text Returns "Text" in all upper-case

    Unlock~Group,Values Unlocks (i.e.; flags as available) the entriesin "Group" that match the listed "Values"

    Used~Group,Entry# See if an entry in a non-repeating group hasbeen used already; use "0" for "Entry#" tocheck the entire group rather than a singleentry

    Version~ Returns the current version of the TSengine

    VowelStart~Text Return "1" if "Text" starts with a vowel,otherwise "0"

    Xor~expr1,expr2 Returns "1" if expr1 or expr2 are true (bothnot both), otherwise "0"

  • 7/25/2019 TableSmith 45 Manual

    33/36

    TableSmith 4.5 Users' Manual

    Page 33 of 36

    While~TextToCheck,Text Calls "Text" for as long as "TextToCheck"does not equal 0

    TableSmith Support

    TableSmith is shipped fully functional. If you have problems or questions, contact the authorvia e-mail at [email protected].

    Technical support for unregistered users will only be provided for problems dealing withdownload or installation. Registered users will receive technical support for the programitself. Please see the Legal Informationpage for information on registering TableSmith.

    There is also a TableSmith mailing list hosted through Yahoo! Groups:(http://games.groups.yahoo.com/group/TableSmith/).

    This is a users-helping-users forum and is comprised of other TableSmith users whoseexperience may assist in answering your questions. In addition to community support, theTableSmith group also provides access to a large number of user-submitted tables, all freelyavailable for download, and links to related websites.

    Other Utilities

    TableSmith is just one of the Campaign Master RPG Utilities. The utilities are tools intendedto assist Gamemasters by automating some of their tasks, as well as making certain thingseasier (mapping, name generation, etc.).

    For more information on other tools, contact Bruce Gulke at [email protected] visit theMythosa Web site at www.mythosa.net.

    mailto:[email protected]://games.groups.yahoo.com/group/TableSmith/)mailto:[email protected]://www.mythosa.net/http://www.mythosa.net/mailto:[email protected]://games.groups.yahoo.com/group/TableSmith/)mailto:[email protected]
  • 7/25/2019 TableSmith 45 Manual

    34/36

    TableSmith 4.5 Users' Manual

    Page 34 of 36

    TableSmith History

    4.5

    Added function: "TableExists"

    DSWrite function now embeds carriage returns for human-readability

    Fixed "Dice" function so dice with more than 32767 sides may be used

    Fixed bug that would crash program if a value in scientific notation was entered for thenumber of rolls

    4.4

    Fixed bug with "Cap" function (didn't work properly if fed an empty string)

    Added functions: "DSCreate", "DSAdd", "DSCount", "DSWrite", "DSRead", "DSSet","DSGet", "DSRemove", "DSFind", "DSSort", "DSRandomize"

    Following functions deprecated: "ArrNew", "ArrItem", "ArrGet", "ArrRemove","ArrExists", "ArrClear", "ArrCount", "Data"

    4.3

    Converted internal data types to support numbers larger than 32767

    Added functions: "CR", "LastRoll", "Log", "Mod"

    Functionality added to allow for accessing variables in other tables

    "Create New Table" menu option added

    "Display Hidden Categories" menu option added

    Added pre-generation directives "BackColor" and "Background"

    4.2

    Added functions: "Bold", "CarRet", "Generate", "IIf", "Italics", "Line", "Picture",

    "Power", "Version", and "VowelStart" Added preliminary graphical editor

    4.1

    Added logical functions "And", "Or", and "Xor"

    Added pre-generation directives to allow tables to override UI settings

    Added pre-generation directives "OverrideRolls" and "OutputType"

    Changed the format of the "Left", "Mid", and "Right" functions to fix potentialproblems if "text" included a comma

    Fixed a bug where parameters with dashes would not function properly

    4.03

    A loaded XML file will refresh with click of "Reload" button, as tables do

    Added "Break" feature

    Added toggle to menu for switching between generator and archives

    Modified "Used" function to check if an entire group has been "used up"

    Made more functions keyboard-accessible

  • 7/25/2019 TableSmith 45 Manual

    35/36

    TableSmith 4.5 Users' Manual

    Page 35 of 36

    Added option to immediately re-roll the table you have currently selected when youclick "Reload"

    Fixed a bug with the "While" function that prevented it from working if not at thebeginning of an entry

    4.0

    Added the following functions: "Ordinal", "Shell", "Extern", "While"

    Allowed display and export to XML and text as well as HTML

    3.96

    Enchanced "Plural" function

    Added functions for associative arrays (ArrNew, ArrItem, ArrGet, ArrRemove,ArrExists, ArrClear, ArrCount)

    3.95

    Added many new functions (Count, MinVal, MaxVal, Ceil, Floor, UCase, LCase, Loop,Unlock, Param)

    Enchanced "If" function

    Removed obsolete group call functionality for conditional calls and looping

    Truncation division ('\') added to Calc function

    Miscellaneous bug fixes

    Allowed for the display of square brackets ('[',']')

    3.9

    Added new functions (Calc, Input, Debug, Cap, and AorAn)

    Allowed for the display of percent signs ('%')

    Parameters may now be passed to groups in tables other than 'Start'

    Printing and copying now available from the menu

    Errors messages display table line numbers

    Added option to turn off 'links' and 'notes' in HTML export

    3.8

    Added "If" and "Find" functions

    Replaced category file with folders in Tables directory

    Allowed user to specify location of Tables directory

    Allowed user to specify editor for editting table files

    Added title/splash screen

    Program now remembers desktop position from previous session

    3.7

    Added "Notes" function to allow user to annotate notes to results files

    Added "Archives" feature to allow easy storage and retrieval of TableSmith results

    Error dialogs now allow the user to cancel out of them

    More new functions

  • 7/25/2019 TableSmith 45 Manual

    36/36

    TableSmith 4.5 Users' Manual

    Fixed bug where parameters didn't work when TableSmith was called from thecommand-line

    Clicking on a "re-roll" link returns user to point of clicking

    3.6

    Merged dice roll functionality into functions feature (function 'Dice')

    Added XML-reading capability via Data function

    Conditional checks now allow checking with strings

    Nesting of functions and group calls now permitted

    Added many new functions

    Improved error-handling

    3.5

    Fixed problem that limited table results to 32768 characters

    Added Functions to TableSmith format

    Re-did parameter entry interface

    Re-arranged main user interface

    Added "re-roll" tag for table/group calls

    3.0

    Unlimited variable support

    Added/modified conditional tags

    New operators added ("")

    2.0

    UI re-design

    Parameter support

    Additional group format

    Added/modified conditional tags

    Added non-duplication feature

    1.6

    Added new tags for user-readability

    1.5

    Changed Web browser control

    Minor enhancements

    1.4

    Minor enchancements

    1.1

    Addition of variables and table modifiers

    1.0