Installing xStats

From ThroneWorld

(Difference between revisions)
Jump to: navigation, search
m (Update Instructions)
(Disc Contents)
Line 68: Line 68:
| '''\MAPS''' || CorelDraw, BIF and BMP versions of the maps, plus thumbnails.
| '''\MAPS''' || CorelDraw, BIF and BMP versions of the maps, plus thumbnails.
|- style="background:silver"
|- style="background:silver"
| '''\PROGRAMS''' || The STATS and CONVERT programs, plus an example STATS.INI file.
| '''\PROGRAMS''' || The xSTATS program, plus an example STATS.INI file.
| '''\RULEBOOKS''' || Copies of the GM's, Base and Modern Age rulebooks in Acrobat PDF format.
| '''\RULEBOOKS''' || Copies of the GM's, Base and Modern Age rulebooks in Acrobat PDF format.

Revision as of 01:38, 14 December 2009




The setup package a new GM receives consists of a CD and three important documents:

  • GMSetupInfo.
  • The Readme file that comes with the GM's disc and includes basic setup instructions, duplicated in CD Set Up Information.
  • The Fixlist that accompanies each revision of the program. This includes key upgrading/updating information, as well as notes about new xSTATS capabilities and fixed bugs.

Computer Equipment Specification Required

  • A Windows-compatible computer with at least a Pentium III CPU, 256MB of RAM, 20 MB of free HD space and a VGA color monitor.
  • Windows 2000 or better (Windows XP is the designer's OS, so that works pretty well!).
  • Either a good InkJet or a Laser printer.

Lords of the Earth Stats Program

The Stats program is written in xHarbour 0.99

The source code may not be redistributed without the written permission of the author, Thomas Harlan. The databases are in industry standard DBF format and the indexes used are FoxPro IDX type indexes.

Computing Acronym List

The following acronyms are pertinent.

  • ASCII: Character set and code described by the American Standard Code for Information Interchange.
  • BAT: Batch file (DOS).
  • BIF: Binary Image Format black & white graphics.
  • BMP: Bit map graphics.
  • DBF: Database.
  • DOS: Disk Operating System, often used as shorthand for MS-DOS (Microsoft disk operating system).
  • EXE: Directly executable program (DOS).
  • FTP: File Transfer Protocol.
  • IMAP: Internet Message Access Protocol, gradually replacing POP3 as the main email protocol.
  • INI: Initialization file.
  • LNK: Linker response file.
  • PDF: Adobe Portable Document Format.
  • POP3: Post Office Protocol, used to retrieve email from a remote server over an Internet connection.
  • RMK: Makefile (Clipper RMake).
  • SMTP: Simple Mail Transfer Protocol used to send and receive email.
  • TXT: Text file.
  • UI: User Interface.
  • XML: Extensible Markup Language file.

Lords Acronym List

The following Lords of the Earth acronyms are pertinent.

  • APC: Action Points from Capital
  • CID: Campaign Information Database.
  • ITV: International Trade Value.
  • MSP: Merchant Shipping Points.
  • NFP: National Force Points
  • NMV: National Market Value.

CD Set Up Information

Disc Contents

  • readme.txt - This file, with setup instructions.
  • fixlist.txt - Change log for the STATS program. Check this for latest updates.

\CAMPAIGNKITS Contains database file sets for specific historical startups and for the "Base" start
\UTILITIES Shareware or freeware software of use to the GM.
\MAPS CorelDraw, BIF and BMP versions of the maps, plus thumbnails.
\PROGRAMS The xSTATS program, plus an example STATS.INI file.
\RULEBOOKS Copies of the GM's, Base and Modern Age rulebooks in Acrobat PDF format.
\SOURCE The xHarbour programs, lnk, rmk and bat files necessary to recompile the programs (if you have xHarbour and the Funcky COM object installed).

Installing a New Campaign from Scratch

  1. Make a new directory on your hard-drive: C:\LORDS.
  2. Run the xstats_setup_x_x_x_full.exe and chose that C:\LORDS directory as your installation target.
  3. When the setup finishes, it will also run a secondary installation of the Funcky and Microsoft XML libraries. Both of these components are necessary for the system to run!
  4. In Explorer, right-click on the XSTATS.EXE file and then choose SEND TO..., then choose the DESKTOP. This will make a shortcut from the desktop to the XSTATS program.
  5. In Explorer, double-click on the XSTATS.INI file. This will open the file in NOTEPAD. Change the entry for CAMPAIGNNAME from a question mark "?", to the Name (number) of your campaign, like:


    Make any other changes you desire, then save the file, and close NOTEPAD.
  6. Copy in a starting set of data from \BaseData, or one of the Campaign Kits.
  7. Startup the XSTATS.EXE program.
  8. Log-in as SUPERVISOR with the password VORTEX. Go to the SYSTEM menu and run the REBUILD ALL INDEXES option. When the list of files comes up, press <*> to mark all of the options. Then press <F3> to start the rebuild. When this is done, you're ready to start building a new campaign!

Update Instructions


  1. Make a backup of your entire previous \LORDS directory, either onto floppy disk or to another directory on your hard-drive (like \LORDS\BACKUP).
  2. Run xstats_x_x_x_update.exe against your \LORDS directory.
  3. To complete the update you will have to select the mode:
    1. STATSP v3.x.x to xSTATS v.4.2.17
    2. xSTATS v4.1.x to xSTATS v4.2.17

      Select the mode you require.
  4. In Explorer (or its equivalent) check to make sure that none of the .DBF or .FPT files have an ATTRIBUTE (the "Attr" column in the explorer display) of "R" (for Read Only). If they do, right-click on the file and clear the "Read Only" checkbox at the bottom of the dialog, then click [Ok].
  5. Double-click (run) the XCONVERT utility in the \LORDS directory. This program will add any fields or tables that are not currently present in your version of the database. At the same time, it will make a backup copy of all of your data-files with .BAK (for .DBF) and .BFP (for .FPT files) extensions, just in case.
  6. After XCONVERT has completed, run xSTATS (login as SUPERVISOR with the password VORTEX) and go into the System menu and choose the "Rebuild All Indexes" option.
  7. Any new changes to the Units, Validate, Builds and CrossInx tables will be provided in a series of .XML files (called units.xml, validate.xml, etc.) which will have been copied into the \LORDS directory.
  8. To load up these changes, go to System | Update from XML and pick each file in turn to update your Units, Validate, Builds, etc. tables.
  9. Whew! Ok, now you're done.

Configuring Your Display on Windows XP

  1. First, you need to be starting xSTATS from a desktop shortcut. (see Installing a New Campaign from Scratch Step 4).
  2. Right click on the desktop shortcut. Then choose Properties.
  3. Click the FONT tab and pick a fontsize that makes the Window preview look okay. Thomas is currently running his at 10x20 font size (on a display running at 1600x1200 pixels).
  4. Click the Layout tab, and make sure that SCREEN BUFFER SIZE and WINDOW SIZE match for height and width. Thomas has his set to 150x50. The default for DOS was 80x25.
  5. Click [Apply] and then [Ok].
  6. Double-click the shortcut to start up xSTATS. It will resize itself to fill the Window Size you've set. You'll want to play around with the FONT and LAYOUT settings to get something that looks good for you.
xSTATS Window



Common Problems Solution
xSTATS Error Report: Printers.dbf file missing. Copy Printers.dbf from \BaseData and attempt to run XSTATS.EXE again.
When Lords of the Earth xSTATS icon is selected, user name is requested and SUPERVISOR is rejected. When xSTATS is installed it creates a blank Users.dbf file. Copy Users.dbf from \BaseData and delete all files with the .idx suffix in the \LORDS directory so that the database engine will rebuild them to match the new Users.dbf file.
When the Lords of the Earth xSTATS icon is left clicked the Lords of the Earth xSTATS window opens stating
That User Name Does Not Exist. Try Another?
When setting up the shortcut you have accidentally specified the target as \LORDS\xStats\xstats.exe parameters.

Right click on the desktop shortcut. Chose Shortcut. Edit the Target to be \LORDS\xStats\xstats.exe, click [Apply] and then [Ok].

When running xSTATS the window is too deep so the command codes are not visible. Reconfigure the Display to suit your screen. See Configuring Your Display on Windows XP.

Getting Started

All campaign specific data is stored in the .FPT and .DBF files, plus xSTATS.INI. Once you have edited a file and copied the backup files to the /Lords directory you need to go into xSTATS and run the Rebuild All Indexes routine.

The Campaign Kit folder holds database files for Lords historical startups set in 1000AD, 1400AD and for the "Base" start. If you wish to run a campaign in another period, then editing the .INI and .DBF files will provide the framework you require. You should have copied one of these sets into /Lords as part of the initial set-up. See Installing a New Campaign from Scratch

Anytime anything strange happens to your data, do System | Rebuild All Indexes. Remember to use the Send Turn Archive option each turn to make a backup of your data!

Campaign Settings - the xSTATS.INI file

In the same directory as your STATS.EXE there is a plain ASCII file called xSTATS.INI. This file contains a number of settings that control how the program calculates and acts when you’re doing a turn.

Each setting goes on a line by itself. If you want to add comments, start each comment line with a semi-colon (;).

Once you have copied the backup files to the /Lords directory you need to go into xStats and run the Rebuild All Indexes routine to use the changed xSTATS.INI file.

Example xSTATS.INI Campaign Settings

Example xstats configuration settings file:-

; XSTATS.INI file.

EmailFromName=Thomas Harlan
; End of XSTATS.INI.


Options Any
Effect This is picked up by the Stat Sheet printouts for the header of each page.


Options Any number
Effect None at this time. Someday a payment module will be added and then it will have an effect.


Options A number, from 1.00 to 5.00
Effect This entry is very important. It is used in a ton of calculations, like the Tax Rate. You must have this setting and it has to be a number equal to or less than the BaseYearsPerTurn setting.


Options Really, just one: 5.00
Effect This is also critical and is used in conjunction with YearsPerTurn to figure the current base Tax Rate and supports and investment modifiers and… a ton of stuff.


Options ON | OFF
Effect The number of system file handles that the program has available is very important. Not having enough will produce system crashes and the DOS ERROR 4 message. Turning on this option lets you see the current number of file handles in brackets (like [x]) in the upper right corner of the screen. Very useful for troubleshooting.


Options ON | OFF
Effect Since the STATS program is a DOS real-mode program, it can run out of memory if your system DOS (not Windows!) memory configuration is too low. Turning this on lets you see your current free RAM in the upper right corner of the screen.


Options ON | OFF
Effect This is a very old debugging setting. Ignore it, unless you’re actually running STATS inside OS/2. In which case it needs to be set to ON.


Options ON | OFF
Effect If you set this to ON, then a ton of extra messages will be produced by the program when calculating Nation stats. This is a good one to leave OFF, unless you’re trying to figure out why something funky is happening with a specific Nation. Then turn it ON, run a Calc just for that Nation, then turn it OFF again.


Options ON | OFF
Effect This option has been superceded (in version 3.3a and later) by an option check-box in the Stat Sheet dialog. You can ignore this setting.


Options ON | OFF
Effect This option is no longer used (in version 3.3a and later). You can ignore this setting.


Options YES | NO
Effect If this is set to YES, then Kings do not have to Rule to get the benefit of their Admin rating for Infrastructure/Tax Rate calculation(s). Instead, their rating is added automatically.


Options A number from 0 to 100.
Effect This number controls the percentage chance that a given Nation will experience a Random Event during Random Event processing. Set it to 0 to turn off Random Events.


Options YES | NO
Effect If this is set to NO (the default) then the current trade system is used and in place. If it set to YES, then the regular trade system is ignored (though Internal Trade and Fishing fleets are still in use and calculated). Instead, each Nation gets trade revenue each turn equal to NMV × Base Revenue.


Options YES | NO
Effect BackSlide controls whether Nations can get negative Tech Points. If set to YES, then they can get negative TP and can lose Tech Levels! If set to NO, it’s only one way… Note that when setting up a Nation’s Tech Level the GM must also set the correct number of Tech Points, otherwise the TL will slip back regardless of this setting.


Options A web-site address.
Effect Provides a default for the Campaign URL entry in the Print Stat Sheet dialog box.


Options YES | NO
Effect If this is set to YES, then the ITV of the Merchant House will be added to the cartel partner's ITV for calculating International Trade. Otherwise, it will not be added.


Options Number from 0 to n (defaults to zero (0))
Effect This number, if greater than zero, is added to each Nation’s effective Infrastructure during each calculation. This allows a GM to help out nations during the startup phase of the campaign.


Options Number from 0 to n (defaults to zero (0))
Effect If TradeCap is set to a non-zero number, then the base revenue (regional + city + ict + pwb) will be multiplied by that number to form the maximum trade income. This provides a helpful limit on the maximum trade income for those out-of-control nations. You may use decimals.


Options Number from 0 to n (defaults to zero (0))
Effect If TechRateCap is set to a non-zero number, that number is the maximum number of tech points any nation can get in a turn. Decimals will have no effect.


Options Number from 0 to n (defaults to No Effect)
Effect If there is no MaxTax setting, then nations sharing a region or city each tax at their full rate. However, if MaxTax is set to a number, then that number (1 to whatever) is used as the maximum amount of tax extraction which can be gotten from a region or city by the usual coalition of Open Nations, Religious Primacies, Religious Orders, Merchant Houses, etc. (Note: Secret Empires are not affected by this setting).

A setting of one (1) is pretty fierce (everyone is forced to share), while a two (2) will let a fair amount of cohabitation occur. Three (3) is very liberal, and four or above is pretty much the same as leaving the setting out.


Options Number from 1 to n (defaults to one (1))
Effect Multiplies the Agro Consumption of Cavalry units for non-Nomadic nations by the designated amount (1 = no effect, 1.5 = multiply by 1.5, etc.)


Options On | Off (defaults to Off)
Effect Added a HANDSFREETRADE setting to the STATS.INI file. If this is set to "ON", then when a new trade route is created, those partners on the route who can assign MSP to the route (as per the new Add MSP question) will get a block of "native" MSP assigned to the route, as per this formula:

New MSP = National NMV x Route Total TV

This "native" MSP only applies to non-Merchant House nations, however.

Also, when HANDSFREETRADE is set "ON", non-Merchant House players are not allowed to shuffle MSP, add new MSP or remove MSP from routes (save by the Intervene in Mercantile Affaires action). Instead, a capacity check is made to ensure ports are not over capacity, and routes which are closed or blockaded or pirated have their MSP reduced.


Options Number from 0.00 to 1.00 (defaults to one (1))
Effect This number (usually < 1) is applied as an exponent to the Internation Trade Value of each nation when calculating the revenue gained from trade.

This serves to reduce the ITV of the nation by the appropriate root.

Example: If ItvExponent is set to 0.85, then each ITV is raised to the power of 0.85, like so: ITV of 100, would become 100^0.85 = 50.1. ITV 10 ^ 0.85 = 7, etc.


Options Yes or No (Defaults to No)
Effect If this is set to YES and the current YearsPerTurn < BaseYearsPerTurn, then each Nation’s (Tech Level /100) is used as a multiple for the nation’s base tax rate.


Options Yes or No (Defaults to No)
Effect If this is set to YES, then Validate table entry, modifier #3, for CULTURE for this nation is used to modify base/friendly population and NFP production.


Options Yes or No (Defaults to No)
Effect If this is set to No, then Sorcery Leader ratings will not be generated, used or displayed for the players unless you set this to Yes. When this is set, newly generated Leaders start with a Sorcery rating of 1d6-3, bounded 0 to 3. The GM will now always see this fourth stat.


Options YES | NO (Defaults to NO)
Effect If set to YES, then when a Family Member is promoted (via F8) from the Royal Family Members screen (Alt-H from the main Nation screen), they remain on the family list. Otherwise they are removed, which is the default behavior.


Common Problems Solution
E-mail problems. If you want to send the stat sheets from your ISP (non-ThroneWorld) address make sure these xSTATS.INI settings match what you've got in your normal email client:

The default SMTP port used by ISPs is 25 unless they tell you otherwise.

If you want to use your ThroneWorld account, it needs to be set like this:

If your system changes the drive holding your Lords campaign data. To re-label the there are two methods:
  1. Right click ‘my computer’ and hit manage.
  2. Control Panel, Administrative Tools, Computer Management

From there in the left section, there is a group called storage; under that is Disk Management In the bottom half of the right side, right click the drive you want to update the letter and select "Change Drive Letter and Paths". In the dialog that appears, click the drive you wish to alter and hit change, then select the drive you want from the drop down of all letters.

Campaign Settings - the UI.INI file

Included as part of the GM Disk in the Campaign Kits folder is the UI.INI plain ASCII file called xSTATS.INI. This file contains a number of settings that control the QRs to be used in the campaign. The UI.INI file overrides the built-in names in the xSTATS validation table.

Each setting goes on a line by itself. If you want to add comments, start each comment line with a semi-colon (;).

Example UI.INI Campaign Settings

Example file:-

; UI.INI - sample file. Edit to make changes to the labels.
UI_SPC_QR_NAME=War Machine
; End of file

Modifying the UI.INI File

To customize the UI.INI file to use alternate campaign QRs edit the UI.INI file. After you have copied the backup files to the /Lords directory you need to go into xStats and run the Rebuild All Indexes routine to use the changed UI.INI file.


Common Problems Solution
The QRs that appear on the turnsheets are not correct. Edit your UI.INI file, or create one if you don't have one already. It overrides the built-in names.
The additional QRs are not displayed. A QR has to have a MAXIMUM set in the Validation table for the appropriate National Tech Level, for it to appear on the stat sheet.

Campaign Settings - the DBF files

The DBF files contain the definition of the world for the campaign. These can be edited (with care) to customize the setting.

Depending on what you used to edit the DBF files directly, a header tag indicating the dBase engine version might get reset, and then you will not be able to open the tables in xSTATS. Any time that you edit a file outside of xSTATS, you must do a Rebuild All Indexes afterwards or they will be trashed.

BUILDS This file defines the cost of all build actions in terms of GP, NFP and time (in years)
CITIES This file holds the following data on each city: City Name, GPv, PWB, City Type, Walls, Religion, Region, Language, Geocode, Region Geo Code, Notes, Port Capacity, Industry.
CONTROL This file identifies control and control status for every Region: Nation Name, Region Name, Region Status, Regional Garrison, City, City Garrison, Regional Notes, City Notes and Years from Conquest.
NATIONS This file holds data on every position in the game, including: Name, ISI Name, Identity Number, Culture, Society, Economy, Census flag, Total Population, Friendly Population, Government Type, Size, BL, BL Investment, Infra, Infra Investment, HBZ, NMV, Religion, Religious Strength, Religious Operations, Religious Operations Investment, Religious Operations Bonus, Religious Operations Bonus Investment, MSI, ESI, Regional Income, City Income, Internal Trade Income, PWB Income, International Trade Income, Trade Value, NFP Replacement, NFP Saved, Tax Status, Event Flag, Tax Rate, Cavalry QR, Cavalry QR Investment, Infantry QR, Infantry QR Investment, Gun QR, Gun QR Investment, Warship QR, Warship Investment, Siege QR, Siege QR Investment, Air QR, Air QR Investment, Mechanized QR, Mechanized QR Investment, Nuclear QR, Nuclear QR Investment, Space QR, Space QR Investment, Troop Support, Government Support, Project Support, Intel Support, Religious Support, Intel Ops, Intel Ops Investment, Assassin Ops, Assassin Ops Investment, Agro Production, Agro Consumed, Agro Reserve, Harvest Conditions, University, University Time In Operation, Geo Zone, Tech Points, Size Multiplier, Saved GP, Tech Level, Training Support, Navigation, Navigation Investment, Conduit, Conduit Investment, Trade Range, Trade Range Investment, Language, Homeland Build Zone Origin, Nation Type, University Rating, Tech Points, Player Note, GM Notes, Tax Rate Adjustment, Harvest Adjustment, National Abbreviation, NFP Support, Harvest Multiplier.
Note: the QR names listed above are overridden by the UI.INI definition.
PROJPLAN This identifies every Project: Identity, description, Effects, GP, NFP, Yard requirement, Time, Level etc.
REGIONS For every Region the Name, GPv, PWB, Region Type, Revolt, Revolt Modifier, Terrain, Religion, Megaliths, Percentage Cultivated, Trade Center flag, Fortress, Port Area, Language, Geocode and Notes.
ROUTES All trade routes in the game, recording the positions the route is between, Route Type, Status, Duration, Between GP, And GP, Between Trade Value, And Trade Value, Between MSP, And MSP.
UNITS For every Unit the Society, Code, GPc, NFP, MSI Value, Full Name, Base Action, Cargo, Build At, AQR Type, Support Cost, Combat Strength, Siege Strength, Scouting (Reconnaissance), Yard Cost .

Campaign Creation

When creating a campaign that does not use the ‘Base’ information it is critical to print out a validation table summary to see what all the modifiers are for. This allows any campaign specific adjustments to be made.

Creating New Races

For different terrain types for each race, you will need to:

  1. Add each new Race as a Culture type to the Validation table.
  2. Add each additional Terrain type to the Validation table.
  3. Add a set of entries for Tax Multiples and Terrain/Troop Support Multiples to the Cross-Index table.
  4. Add each Race (Culture)'s Unit types to the Units table.
  5. Update your rules supplement to include all of this...

To provide a new race with different abilities and limitations (such as agro production and city sizes) add new sets of tax rates to the Cross-Index Table (where the interaction of Culture and Terrain is stored). The city costs go into the Common Builds table.

Creating New Units

When defining new units they must be allocated a UNITCLASS.

Key Value Description
XX Very Light
X Light
M Medium
H Heavy
HH Super-Heavy

Creating New Intel Actions

You add new Intel operations to the INTELOPS section of the Validation table, and the three modifiers are:

Modifier 1 = Base Operations Value Modifier 2 = SE divisor (to produce banded results) Modifier 3 = SE modifier, after the initial SE is divided by modifier 2

Final SE = ( Initial SE / Modifier 2 ) + Modifier 3

Personal tools