DeMONS/2 Reference Guide, v0.0.2.8

NOTE: All references to N4 were changed to Nascar Racing because Papyrus has released the next version of the sim, and DeMONS/2 can support both N4 and NR2K2. If you are still using Nascar Racing 3 or Nascar Legends, please be aware that DeMONS/2 does not support that version of the sim. Please refer to this web page for a version of DeMONS that *does* support NR3 and NL.

If you're looking for something less technical, check out the User's Guide.

Contents
Before We Begin
Contact Info
What The Software Does
Installation
Starting For The First Time
For Windows 9x/ME Users
Common Problems
D2Config.EXE
      D2 Configuration Dialog
      Host Configuration Dialog
      Schedule Setup Dialog
      Race Configuration Dialog
D2Launcher.EXE
D2RemoteAdmin.EXE
D2RemoteConfig.EXE
D2PublicSetup.EXE
D2League.EXE
      Configuration Dialog
      Main Dialog
      The POINTS.INI File
      Results Template Files
      Delimited Text Template Files
      Data Words
D2Scrub.EXE


Before We Begin
  • This software is not endorsed or supported by Papyrus. Please do not bother their programmers or tech support guys about issues you have with this software.
  • None of the individual DeMONS components will run unless Nascar Racing has been installed (at least once) from the retail CD. I don't pirate software, and I won't support others that do. This issue is not negotiable.
  • Thanks for testing this software. I, and all future users, appreciate your help in this area.
  • I accept no responsibility if your system gets trashed. This is (pre-) beta software and while it seems to work fine for me, I won't guarantee that you won't do something stupid. So, caveat emptor, you're on your own, and remember, nobody likes a whiney bitch.
  • If you feel like something went completely wrong between releases of DeMONS, please use the "Start Fresh button on the main D2Config dialog box to zap all your current DeMONS data.
  • Items below that are shown in red are not implemented beyond showing up on the dialog boxes and being saved in the appropriate data files.
  • DeMONS/2 (from hereon, referred to as D2) does NOT patch any executable files, or any of the .DAT files that are supplied with Nascar Racing.
  • Please report all problems to the D2 mailing list. When posting a message describing a problem, I want as much detail about what you were doing and what happened as possible. If I can't duplicate your problem, I can't fix it.
  • Please do not offer to pay me in any way for this software. I appreciate the sentiment, but that's not why I'm doing this.
  • If you think something is missing, or if there's something that doesn't apply to Nascar Racing, let me know through the mailing list.
  • If Papyrus changes something that affects dedicated servers in a future patch, you should expect a new version of D2 will soon follow.


Contact Info
You can reach me through the D2 Mailing List. That's right, if you feel the need to complain, you gotta join the mailing list. Mailing list info is on the web page at this URL..

What This Software Does
The Nascar Racing Host Components are intended for use by people that have the equipment and mental fortitude to administer one or more Nascar Racing hosts for the enjoyment of the wholly unappreciative throngs of would-be stockcar drivers. D2 allows multiple hosts on a single machine, and for every machine on which you wish to run a Nascar Racing host, you MUST install Nascar Racing (from the CD) and D2.

IF YOU ARE NOT A SERVER ADMIN, DO NOT BOTHER WITH THIS PART OF D2. Clients will be getting their own programs to use.

Features include the following items, each of which may or may not be working during the development/testing phase of the application. Unimplemented features are marked with and asterisk:

  • DeMONS/2 supports BOTH NR4 servers *and* NR2K2 servers running simultaneously (as of v0.0.2.0).
  • An unlimited number of independent hosts can be configured for each machine (done).
  • An unlimited number of races can be scheduled for each host (done).
  • Each race can be run up to 99 times before moving to the next race in the schedule (done).
  • * Results generated by Nascar Racing can be imported, massaged, and saved in a number of formats.
  • * Remote administration of program settings, including race schedules
  • * Allow the public to remotely setup single races
  • * Communicate race results to a nanny server.
  • * Allow the launcher and port monitor components to run as a service (on WinNT and Win2K only). [tentative feature]
  • * Put icons in system tray for all host components. [tentative feature]


Installation
Simply copy the files to the folder of your choice, and create some shortcuts on your desktop. That's all there is to it.

Windows 9x users should check out the special section I've written just for them (a couple sections below this one).

Starting For The First Time
When you run D2 for the first time, the program will attempt to find Nascar Racing through registry settings. All components will check to make sure that Nascar Racing has been legally installed from the retail CD. If it does not find a legal installation, NONE of the D2 components will run. There is NO reason why you shouldn't be able to install Nascar Racing as intended.

During the testing phase for D2, the program may delete existing D2 program-specific INI files if the file version does not match the program version. This will (hopefully) solve the problem of not deleting all of the program's old INI files.

Assumptions

  • You have already installed either Nascar Racing from the retail CD onto your system.
  • You have created a unique player on SIERRA for each host you intend to set up. You will need both the user ID and password if you want your server to show up on SIERRA.
  • You have un-ZIPed the D2 files in a folder of your choice.
  • You know what your server port assignments are (one server for each host you intend to set up). See the field description for more details on this requirement.
  • You are sufficiently familiar with hosting games over the internet in general, and are familiar with running a Nascar Racing server in particular. This includes being familiar with the installed game's directory structure and file placement.
  • You can read and comprehend the English language.

Quick Start

  • If you server is running on a Windows 9x/ME machine, run D2Scrub. This component prepares some of the Nascar Racing INI files for use by D2 (doesn't change content, and no small animals are harmed).
  • Run D2Config to configure the D2 software. This component allows you to set up the D2 server as well as your Nascar Racing hosts (including schedules).
  • Run D2Launcher. This program is responsible for executing the schedule(s) you've set up.


For Windows 9x/ME Users
If you're running a Nascar Racing server on a computer that is running Windows 95, 98, or ME (and maybe even Windows NT 4.0), you will have to run the D2Scrub program. The reason is that Papyrus created the track-related files in a format with which the operating systems listed above are incompatible when using the standard Windows API. I tried several methods for fixing this problem without having to rewrite the files, but since speed of execution is somewhat critical, I chose the most intrusive method. Believe me when I say that in the long run, this is the best method of the half dozen or so that I tried.

If you're not sure that you need to run the D2Scrub program, a good way to check is to run the D2Config component and try to create a schedule. If after adding a track to the schedule, you see no tracks in the track list, you can safely assume that you need to run D2Scrub.

After scrubbing your files, Nascar Racing will continue to work as intended, so there is no incompatibility introduced through the scrubbing process. For the paranoid, I've provided a way for you to create backups of your original files, but it's really not necessary.

NOTE: D2Scrub needs to be done for both NR4 *AND* NR2K2.

Common Problems
  • When I attempt to add a race to the schedule, there are no tracks to select. Why?

    You have to run D2Scrub.EXE to massage the track INI files. Refer to the section titled "For Windows 9x/ME Users".

  • In the Launcher, when I hit the START or START ALL button, the schedule goes immediately from a blue flag to a checkered flag. Why?

    There are any number of reasons this could occur. Check the following items:

    • If you're using the specific date/time timing loop, the race's start date/time may have already passed. D2 skips late races.

    • Make sure you ran D2Scrub before runing D2Config.

    • If you're registering your server on WON, make sure you have specified a userID and password for WON for the player.


D2CONFIG.EXE
This component allows you to configure your Nascar Racing client machine, and it's hosts. This component must be used at least once, even if the client machine is going to be administered remotely. The reason is because certain port values and such can only be specified locally. Afterall, you don't want someone that might break into your machine to be able to reconfigure your admin ports or other critical info. A separate remote config tool will be available to allow remote administration.

D2 Configuration Dialog
This dialog gives the user the ability to configure the *client machine* settings. The following is a description of the fields you see on the dialog box.

  • Client Name -- This is the name you want to assign the *machine*. This name will eventually be what everyone sees if your client machine is connected to a nanny server (like RaceServer.net). If you have multiple installations of Nascar Racing, each installation of Nascar Racing needs its own copy of D2 running, and therefore, each copy of D2 should have a different machine name.
  • Path to NR4 -- This field contains the path to NR4. You will notice that there's a button with an ellipse ("...") on it. This button will allow you to browse around your system to find the sim path. If you want to take the easy way out, click the REGISTRY button next to this field. It will attempt to pull the sim path from the registry - NR4 must have been installed from the CD for this to give you the correct path. If after clicking the REGISTRY button, you get the path "C:\\", you must use the browse button to find the sim, because D2 couldn't find the required registry key.
  • Path to NR2K2 -- Same as the path to NR4, except pertaiuning to NR2K2 (new feature in v0.0.1.5).
  • Current Hosts -- This is a list box that contains all of the hosts currently configured for this client machine. Up to ten hosts can be supported by a given client machine (D2 installation).
  • ADD button -- Adds a new host to this machine. This buttons displays the Host Configuration dialog box and populates it with default data. As of v0.0.1.2, the previous limitation of 10 hosts has been removed.
  • DELETE button -- Deletes the selected host from this machine
  • Favored checkbox -- This checkbox is checked if the currently selected host is a favored host. Refer to the Host Availablility tab for more info on this setting.
  • CONFIGURE button -- Configures the selected host. This buttons displays the Host Configuration dialog box and populates it with previously entered data for the host.
  • SCHEDULE button -- Creates a schedule for the selected host. This button displays the Host Scheduler dialog box.
  • Default Sim -- This radio button group allows you to specify whcih sim will be the default sim for all newly created hosts. Once you've begun configuring your new host, you will be given an opportunity to pick the sim whenever you choose to do so (new feature in v0.0.1.5).
  • Allow Remote Admin -- Allows the server admin to remotely configure this machine (not yet implemented).
  • Admin password -- The password is needed to be able to admin the machine remotely
  • Admin port -- This is a base port value. To admin the *machine* the port value entered here is used for communications. To administer individual hosts, this value is incremented by 1-10.
  • Allow public setup -- Permit "the public at large" to setup hosts remotely. One one race at a time will be permitted if a host is configured this way.
  • Public setup password -- The password is needed to be able to setup a race (or schedule) on the host remotely.
  • Public setup port -- This is a base port value. When setting up hosts, this value is incremented by 1-10.
  • Connect To Nanny Server -- Connects to a nanny server (like RaceServer.net). A nanny server is a server that receives results and statistics, as well as managing the race list that public users see.
  • IP Address -- IP address of the nanny server
  • Port -- Port used to communicate with the nanny server
  • Processor -- If you're running D2 on a multi-processor machine, you can choose which processor all of the D2 components will run on. If you change this value, you may have to shutdown and restart D2 for it to take effect. To see if it works, use Task Manager to see what CPU the D2Config.exe process is running on.
  • CORE.INI SETTINGS button -- I may allow the server admin to change some CORE.INI settings. At this time, this may not be available remotely.
  • FRESH START button -- This button allows you to manually delete all D2 ini files.

Other stuff on this dialog

  • There's a static text field that displays the estimated bandwidth required to support the configured hosts. Remember, I said ESTIMATED bandwidth. With version 0.0.2.1, it was rendered pretty much useless due to the more liberal scheduling capabilities that were added.
  • The checkbox labelled "Favored Host" is a static field that changes depending on whether the currently selected host is marked as favored.
  • There is a static text field immediately below the "Favord host" checkbox which changes to indicate the sim that is being used by the currently selected host.


Host Configuration Dialog
This dialog box allows the server admin to configure the associated host. This functionality will eventually be available remotely.


Server Settings tab

This tab contains administrative settings for the host. The available fields are as follows:

  • Host Name -- This is the host name that appears in the D2 Configuration dialog box, as well as on remote drivers' machines in their race list. This is a required field. It defaults to "New Host" if this is a new host being added to the client machine. This field can be up to 15 characters long.
  • Server Location -- This field contains the server location info (example: "San Antonio, TX"). There is no default value.
  • Connection Type -- This field is used to describe the type of connection this host is using on the internet (example: "Cable modem/256k up"). This is not a required field, and there is not default value. Maybe this field should be moved to the first dialog box (since it can be assumed that the same connection is used for all hosts on this client machine).
  • Boss Password -- This field allows you to specify a password that can be used to send commands during a race. Beginning with NR2K2, boss passwords allow less comprehensive control over the server. This was done to curb the tendancy for some butt-holes to perform a hostile takeover of a server. See the NR2K2 README.TXT file and/or SERVER.TXT file for more information on the new capabilities of bosses and admins.
  • WON User ID -- This field allows the server to log into WON. I *think* this user ID also determines the player folder name. Anyone know for sure? At this time, I think this will only need to be entered if you want the host to shjow up on WON.
  • WON Password -- This field is part of the WON logon. At this time, I think this will only need to be entered if you want the host to shjow up on SIERRA.
  • Admin Password -- This field allows the server admin to specify an admin password. Beginning with NR2K2, boss passwords allow less comprehensive control over the server. This was done to curb the tendancy for some butt-holes to perform a hostile takeover of a server. See the NR2K2 README.TXT file and/or SERVER.TXT file for more information on the new capabilities of bosses and admins.
  • Processor -- This field allows you select a processor on which to run this host's instance of Nascar Racing. This field is only available if you're running on a multi-processor machine under Windows NT or Windows 2000.
  • Nascar Racing runs in normal priority mode -- This option causes Nascar Racing to run with the "-kh0" parameter, and forces the sim to run with normal system priority. You should use this option with caution as it could degrade your ability to support a higeher number of drivers. If more than one host is displayed in the D2Launcher window, this setting will be automatically overriden to be ON for each host. This will allow each host an equal share of CPU cycles, and is necessary when running multiple hosts.
  • Run minimized -- This checkbox will allow you to start Nascar Racing in a minimized state.
  • Selected Sim -- This radio button group allows you to select the sim with which to run this host. If you select a different sim, you MUST re-specify your player folder. If D2Config detects that only one sim is installed, it will automatically select that sim and this radio group will be grayed out. (new feature in v0.0.1.5). If you change sims in a host that has a schedule already built, the schedule will be cleared out and you'll have to start the schedule from scratch. You will be given an opportunity to change your mind before D2 cleans the schedule. You are also forced to re-select a player folder.
  • Player Folder -- This is the player folder that is associated with this host. Each host should have its own player folder unless you’re going to be testing the Host Availability feature. See "Selected Sim" item above. This is a required field.
  • Create Alternative Results File -- This checkbox will make DeMONS import the Nascar Racing-generated results file and convert it to a format of your choice (based on a template file that you provide).
  • TEST button -- This button allows you to test your template file against a file I created by exporting results after an Nascar Racing race. This makes it much easier to make sure your template file is going to result in correct output.
  • Additional Commandline Parameters -- This field allows you to add commandline parameters that might come up in future revisions of the sim. This gives you the opportunity to work around new features that D2 does not yet support until I can update D2.
  • Invite Lists -- I plan on giving the admin the opportunity to choose a source for invite lists. This is all tentative.

                 Host-specific - a list contained in the player folder for this host.

                 Local master - the list contained in the Nascar Racing folder.

                 Remote Nanny - allows the nanny server to control the invite list.

                 The same options are available for the muzzle list.

  • Weekly Host Schedules -- On the right side of this tab, you will find this button. Clicking it will cause D2Config to display a dialog box that presents a graphical representation of the weeks usage by all currently configured hosts. This is done so that you can detect possible overlaps of usage by the same host on the same day.

Connections tab

This tab contains connection information for the current host. The following fields are available:

  • Server Port -- This is the port that this host uses allowing remote connections by drivers. Make sure you read the info on the dialog box concerning this setting. All hosts are keyed off the assigned player folder. If you create multiple hosts that use the same user ID, each of these hosts can use the same net server port value as long as each host uses the player folder on DIFFERENT DAYS. DeMONS makes no attempt to ensure that you haven't screwed up your scheduling somehow, so tread carefully.
  • Connect To Nanny Server -- This allows you to omit/include this host in the Nanny server race lists. If unchcekd, you have essentially elected to create a private host that people must know the IP address of the port.
  • Log Sim Communications Errors -- Logs sim communications errors (connection problems for drivers)
  • Log Sim Connection Errors -- Logs TCP/IP errors
  • Log DeMONS Errors -- Logs D2 functional errors
  • Max connections -- Maximum number of connections allowed (includes AI cars if allowed)
  • Max latency -- If checked, the latency is restricted
  • Latency ms -- Max acceptable latency millisecs
  • Allow IPX -- Allows IPX connections
  • IPX Cars -- Number of connections allowed through IPX.
  • Allow TCP/IP -- Allows TCP/IP (non-WON) connections
  • TCP/IP cars -- Number of connections allowed through TCP/IP.
  • Use WON Servers -- Registers the server on SIERRA - may disallow other connections (IPX and TCP/IP), but I'm not sure.
  • Allow AI Cars -- Checking this box allows you to specify opponent strength and how many AI cars to allow in all races on this host. If you specify AI cars, the maximum number of connections may need to be adjusted so that the number of connections realized does not exceed your bandwidth limits. Nascar Racing doesn't automatically reduce the number of AI cars as more people join the race (I consider this to be a deficiency within Nascar Racing).

Lists tab

This tab allows you to build this host's invite and muzzle lists. there are two parts to this tab, the invite side (on the left), and the muzzle side (on the right). Both sides work identically to each other.

  • Invite List (or Muzzle List) -- Shows a list of people that are currently in your invite (or muzzle) list for this host.
  • ADD button -- Adds the name that is currently typed in the edit field above the button.
  • DELETE Button -- Deletes the name that is currently selected in the list box.
  • Use Invite List checkbox -- Currently disabled because I don't know if I'm even going to make use of it.
  • Use Muzzle List checkbox -- Currently disabled because I don't know if I'm even going to make use of it.

Host Availability Tab

This tab allows you to specify what day(s) of the week that the host will run. The settings on this tab have NO EFFECT of hosts that run with the specific date/time timing style. The default value is "Every Day". To select specific days, de-select "Every Day" and select the desired day(s). In order to completely turn on a day, you MUST specify a remote admin password. I assume that if you use this feature, it’s for the benefit of specific leagues or groups.

The addition of this feature eliminated the restriction on using the same player folder for more than one host. It is COMPLETELY UP TO YOU to make sure that the same player folder is not in use at the same time on the same day. With that in mind, I added a method for you to identify possible conflicts.

  • Favored Host -- A "favored host" is a host that will cause all other currently running hosts to stop running so that the Nascar Racing session associated with the favored host can use all available bandwidth. If any other Nascar Racing sessions are running, they will be terminated by the launcher. If any hosts are runnning (waiting for their next race to start), they will be paused. All of this happens one minute prior to the favored host running, and happens with NO WARNING to the people that might be driving in the races that are terminated. Once the favored host's race is over, all hosts that were paused are restarted. Any hosts that were not running at the time the favored host kicked in will not automatically be started. Checking this checlbox makes a host "favored" by the launcher.

Timing tab

This tab allows you to set schedule timing information for the current host.

  • Continuous Loop -- Runs the next event x minutes after the previous event ends.
  • Daily Time -- Runs the next race at the time specified on the next calendar day. Consecutive runs are not available with this timing, and the field will be disabled on any data entry tab in which it appears.
  • Specific Date/Time -- Runs races at specific dates/times. The date and time must be specified for EVERY race. Consecutive runs are not available with this timing style, and the field will be disabled on any data entry tab in which it appears.
  • Limit Schedule -- This section allows you to specify the time frame in which to run races, and is only available when "Continuous Loop" is selected as your timing style.
  • Stop At End -- Terminates the schedule after the last event has been run.
  • Shutdown At End -- Shuts down D2 at the end of the schedule (this will probably be deleted).
  • Start Schedule At Startup -- Automatically starts all host schedules when the launcher is started up.
  • Remember Last Race -- Remembers the last race run in this schedule (this might be deleted in the future).

Notes About Timing

If you select the specific date/time timing style, D2 will NOT sort races in a schedule according to the dates/times you've specified. D2 assumes you had the mental capability to put the races in the correct order, and will try to run each race in the order you specified them. If the specified start date/time for a given race occurs in the past, D2 will not run that race at all.


Default Race tab

This tab allows you to set default race settings for this host. Default settings used to populate this tab are the way *I* would configure a league race (more realism than you see in pickup races on Sierra).

I'm not going to go into specifics on this tab right now, because I'm assuming most of you know what these settings do. Some specific issues are as follows:

  • There is currently no "CTS" add-on, but I'm assuming it will be coming sometime in the future. This assumption is not based on fact or even rumor that Papyrus will be producing a CTS add-on. I'm simply assuming they will, and I'm preparing for it, so please don't ask me for the status of it.
  • According to Papyrus, the "Mechanical Failures" settings has not been implemented in Nascar Racing, so even though I allow you to toggle this on/off (and the setting is transferred to the player.ini file), it won't have any effect in the game. I kept it in case Papy implemented it at a later date.
  • The "Skill Ratings" are only be in effect when connecting through Sierra to a server registered on Sierra. I'm going to try to implement a way for D2 to handle this functionality itself, but D2 and Sierra won't be able to share their ranking values.
  • Fixed Setups -- If you specify that an event uses a fixed setup, you MUST select a setup file when you add a new event to your schedule.

Read Me tab

This tab explains some theories I have about bandwidth and hardware requirements when running an Nascar Racing host. No data is requested here.


Other Host Info

At first, the program created a file called D2SCHEDULE.INI in each player folder (this file contained schedule info for the host). However, the implementation of the Host Availability feature forced a re-design. The problem is that each player can now be used by multiple D2 hosts, and having a single schedule file would cause conflicts. The obvious solution was to provide a different schedule file for each host. This obviously forced me to consider ways to come up with file names that were guaranteed to be unique.

Beginning with DeMONS/2 version 0.0.1.2, each schedule filename is made up of a "universally unique identifier". Called UUID's in programmer speak, these objects are programatically determined through a single function call to the Windows API. Enough people complained about this that I changed the file naming beginning with v0.0.1.5, so that the date and time the file was created would be used for the name.



Schedule Setup Dialog

This dialog allows you to setup a schedule for a given host. It's divided into two primary sections - the list of races already scheduled with buttons to control what's in the list, and a static display of settings for the host.

  • ADD button -- This button allows you to add one or more races to the schedule. All newly added races start out with the track as Atlanta, and with whatever default settngs you specified for the current host. When you click the Add button, you will automatically be taken to the Race Setup dialog box.
  • Quick Schedule button -- This button allows you to add tracks in specific groups. A new dialog is displayed allowing you to select either All tracks, specific types of tracks (speedways, road courses, etc). If you selected a type of track to install, when you click the OK button in that dialog, D2Config will automagically add all of the selected tracks to the current schedule without you having to lift a finger. Of course, all tracks added this way assume the default race settings, so you'll have to edit each race that doesnn't meet your requirements. (new in v0.0.2.3)
  • Configure/View button -- This button allows you to configure (or view the settings for) the currently selected race.
  • Move Up button -- This button allows you to move the selected race up in the list box. (new in v0.0.2.3)
  • Configure/View button -- This button allows you to move the selected race down in the list box. (new in v0.0.2.3)
  • Delete button -- Allows you to delete the currently selected race from the schedule.
  • Delete All button -- Allows you to delete the all of the existing races from the schedule.


Race Configuration Dialog

This dialog box allows you to specify all aspects of setting up a race.


General tab

This tab allows you to configure settings that are not directly related to "racing". At the top of this dialog box, you'll notice several static fields which show information about the selected track. Beyond that, the following fields are provided:

  • Track List -- This is a list of tracks that are currently recognized by Nascar Racing. If you add a track to Nascar Racing, it will automatically show up in this list. If this list is empty, read the section entitled Windows 9x/ME Users.
  • Vehicle Type -- This setting allows you to select what type of vehicle to use in the race. If/when papyrus releases a CTS expansion pack, I will enable this setting.
  • Skill Ranking -- This setting allows you to restrict entry according to a driver's current rank. This setting is applied to ALL track types, regardless of what track type is selected. To disable rankings, make both values 0.

    In addition to the ranking requirements, NR2K2 allows the server admin to restrict acces to the server according to the driver's LPI (laps per incident). I haven't seen anything regarding the valid upper range for this field, so I set an arbitrary limit of 100 as the maximum possible value. If anyone knows the true maximum, I'll be happy to make the necessary adjustments to the code.

  • Timing -- If you elected "specific timing" during host configuration, these fields will be enabled, and you are required to specify a date and time to run the race. Caution should be used because D2 does not verify that events won't overlap. However, D2 will ignore late events and wait for the next one. Further, D2 expects races to occur (in time) consecutively, but doesn't ensure that you specified correct dates and times in relation to existing events. In other words, it's up to you to keep the dates and times straight in your head.
  • Weather -- If you check the "Realistic Weather" box, the four fields in this group will be disabled (and the settings in those will be ignored by Nascar Racing). If the "Realistic Weather" box is not checked, you will be able to specify each setting.
  • Consecutive runs -- You can tell D2 to run a given event over again up to 99 times. This field is disabled when you have selected the "daily" or "specific time" timing styles.

Environment tab

  • Race Settings / Race length -- Enter the desired race length (percentage). I was considering calculating the number of laps as well. Comments?
  • Race Settings / Race password -- This is the password everyone will need to know in order to enter the race.
  • Race Settings / Run practice session only -- This checkbox allows you to specify that this event does not progress beyond the practice session. The way this is determined is by the duration entered in Session Duration / Practice Time field. One minute before the practice session time has expired, the Launcher will send chat messages warning the drivers that the session is about to end. These warnings come 1 minute, 30 seconds,and 10 seconds before the sim is forced to shutdown.
  • Session Durations / Practice time -- This is the number of minutes to allow for practice.
  • Session Durations / Warmup time -- This is the number of minutes to allow for the warmup session.
  • Session Durations / Post-race time -- This is the number of minutes to wait before shutting down the sim after a race is over.
  • Damage -- Select one of the three settings for the damage model.
  • Realism -- This section contains numerous settings that affect the realism of the race. I think they're all self-explanatory, so I won't go into detail on each setting.
  • Administrative / Save race results -- Tells Nascar Racing to save race results. As of the latest patch, Nascar Racing has problems with saved results (times not saved correctly and double saving of information.
  • Administrative / Save replay -- Tells Nascar Racing to save the replay. Make sure you have adjusted your replay settings in the CORE.INI file to allow for longer replays.
  • Administrative / Save chat log -- Tells Nascar Racing to save the chat log from the race.
  • Administrative / Use invite list -- Tells Nascar Racing to use your invite list.
  • Administrative / Use muzzle list -- Tells Nascar Racing to use your muzzle list.
  • Fixed Setups -- If you specify that an event uses a fixed setup, you will be allowed (and in fact are REQUIRED) to select a setup file. The combo box will contain all setups (in alphabetical order) that exist in the Nascar Racing\tracks\track_name folder, as well as all the setup files found in the players\player_name\setups\track_name folder. The tracks found in the Nascar Racing tracks directory are displayed between the "<>" brackets like so:

        <fast.cup.sim>

    Setups found in the player setup track folder will appear without the brackets as shown in the sample below:

        My Special Setup.cup.sim

    If this is the first time you've specified a fixed setup file name for this race, D2 will try to default to one of the three default race setups in the following order:

        <fast.cup.sim>

        <intermediate.cup.sim>

        <easy.cup.sim>

        <qualifying.cup.sim>

    If none of those files are found in the combo box, it selects the first file listed. If no setup files are found, D2 will not allow you to used fixed setups for that track on that host (the checkbox and combo box will/should be disabled).


Experimental tab

This tab contains settings that are of an experimental nature. As of v0.0.0.16, these settings don't do anything, but they might in a later release.



D2LAUNCHER.EXE

This component actually runs the schedule for each host. The top section of the dialog box shows settngs that apply to the client machine as a whole (while the program is under development, some of these settings won't make any sense or don't indicate a real-world status). The bottom section is comprised of a single list control, which shows all of the hosts that have been configured for the client machine.

The list control contains host status for every configured host, beginning with the host name, the sim that's using it, the next/current track, when it will run (or it's current running status), and whether or not public setup is permitted (not currently meaningful).

Beneath the list control is a series of buttons:

  • EDIT HOST button -- Allows you to re-configure a host while the launcher is running. You can only edit one host at a time, and while that host is being edited, it's schedule is shut-down (if it was previously running). It's schedule will be re-started automatically after you have finished edit it (if it's schedule was running previously). (new feature in v0.0.1.5)
  • START button -- Starts the select schedule.
  • STOP button -- Stops the selected schedule. You will be asked if you also want to stop the sim session (if running) associated with the host.
  • START ALL button -- Starts all of the listed schedules.
  • STOP ALL button -- Stops all of the listed schedules. You will be asked if you also want to stop all currently running the sim sessions associated with the hosts.
  • CLOSE button -- Closes the launcher. You will be asked if you also want to stop all currently running the sim sessions associated with the hosts.

After a race is finished, the Launcher will optionally run a batch file that can be used to update databases, or any other such thing as you might want to have happen.


The Flags in the Host Schedule List

The launcher dialog shows all hosts in a list. Each host has a flag icon next to the host name to signify its current state. Here's what they mean:

  • Blue Flag -- Indicates that the host's schedule is not currently running.
  • Yellow Flag -- Indicates that the host's schedule is running, and that it's waiting for the time at which it should start the next race in the schedule. The 3rd column indicates the approximate time at which the race will start.
  • Black Flag -- The host doesn't have a schedule to run. In this case, the track and start time columns will reflect appropriate info.
  • Red Flag -- There was an error in the launcher associated with the host.
  • Green Flag -- A race is currently running for the host.
  • Checkered Flag -- The schedule has completed and there are no more races to run. This flag also appears when you manually stop a schedule using one of the buttons.
  • Blue Flag with Yellow Stripe -- Indicates that the host/schedule was shutdown in order to allow a favored host to run a race. (new in v0.0.1.4)


D2REMOTEADMIN.EXE

This component monitors the admin port for connections, and is responsible for accepting new admin configurations and letting the launcher know when it's got new data.

This component is not yet available.



D2REMOTECONFIG.EXE

This component allows the server owner to administer his server machine remotely. It is almost an exact duplicate of the local version of this component and the difference is that the fields that can't be changed remotely are not visible on the dialogs.

This component is not yet available.



D2PUBLICSETUP.EXE

This component monitors the public setup ports for each host that allows races to be setup by a remote user.

This component is not yet available.



D2LEAGUE.EXE

This component imports results files and creates an alternative results HTML file, and/or a raw delimited text file. It was first introduced with DeMONS/2 v0.0.2.7.

A results file will always be an HTML file since it's assumed you're doing this for the web, but D2League will replace recognized data words in ANY file you specify.

A delimited text file contains all of the driver info for the event, and each driver will have his own line of text in the file. Each piece of data is separated by a "^" character by default. This type of file is especially useful if you want to import the race data into a database.

IMPORTANT NOTE: Even if you're using this module without using the rest of DeMONS/2, you *MUST* run D2Scrub (if you're running Windows 9x/ME) before using this utility. D2Scrub (and the reason for is existance) is described here (at the next module description section).

As you are probably aware, drivers sometimes have the nasty habit of joining your races with multiple car numbers (they probably forgot to select the correct car), usually changing AFTER they realize they've turned in practice laps with the wrong car. This causes the sim to display their names twice in the practice section of the exported results file. D2League automatically compensates for this, and only shows pratice time for the car number that actually participated in the race.

Another trait of the sim is to only show race results for people that actually raced. D2League automatically adds back people that dropped out before qualifying, or before the race started, and awards points and starting/finishing positions. Their start/finish position is first based on their qualifying position (if any), and then on their practice speed (if any).

Lastly, D2League does not strict you to using the Nascar points system. You can use F1's weird little points schedule, or you can even make up your own. Instructions appear below.

Configuration Dialog
This dialog box provides a means for specifying some default values used by the program.
  • Original Results File Location -- This group of radio buttons allows you to selecte from one of three possible locations that could contain results files exported by NR4 and/or NR2002. The first two selections will probably be used most often and are self-explanatory.

    The third option allows you to manually specify a directory that contains exported results files.

  • Points Schedule -- This option allows you to select what kind of points schedule to use when scoring races. Refer to the section "The Points.INI File (below) for more details.
  • Delimiter Character -- Use caution if specifying a different delimiter characetr. Some of the user ID's I've seen on Sierra contain some off-the-wall characters. I can't remember ever seeing a "^" so unless your database importing utility just absolutely cannot handle it's probably that character as a delimiter, I suggest that you leave this value alone.
  • Delimited File Extension -- This field allows you to specify the file extension for the delimited text file.
  • Delimited Files Destination Folder -- This field allows you to specify a folder in which to place delimited text files created by D2League.
  • Results Files Destination Folder -- This field allows you to specify a folder in which to place new results files created by D2League.
Main Dialog
This is the dialog box that you will almost always see first. The only time this won't be the case is when you're running D2League for the first time. In that case, it will immediately show you the Configuration dialog (discussed above).

At the topof this dialog box, you'll se four static text fields. These fields are merely reflectng the defaults you set earlier. If you wish to change these values, click the Configure button.

  • Original Results File -- This is a drop-down list which shows all currently available exported results files. If this list is empty, you must click the Configure button to specify a path which contains the expected files.
  • TRANSFER TO NEW button -- This button takes the name of the selected exported results file, changes the extension to .txt and .html, and changes the new file names (lower in the dialog to the same name (but with the appropriate extension, of course). This is intended as a time-saving feature in that you don't have to re-type the file name if you don't want to.
  • Create Delimited Text File checkbox -- Check this box if you want to create a delimited text file.
  • File Name (delimited text file) -- Use this field to specify the name of the newly created delimited text file. DO NOT include the path in this field.
  • Template File (delimited text) -- This file allows you to format the delimited text file to include as much (or as little) driver data from the exported file. A sample file (D2Sample.DDT) is provided with the program. While you could go ahead and edit this file yourself, I suggest that you create a whole new file so you can use the sample as a, um..., errr..., sample.

    For details regarding how this file is expected to be used, refer to the appropriate section below.

  • Create New Results File checkbox -- Check this box if you want to create a new (massaged) html results file.
  • -- Use this field to specify the name of the newly created results html file. DO NOT include the path in this field.
  • -- This file allows you to format the html file to include as much (or as little) desired race data from the exported file. A sample file (D2Sample.DRT) is provided with the program. While you could go ahead and edit this file yourself, I suggest that you create a whole new file so you can use the sample as a sample.

    For details regarding how this file is expected to be used, refer to the appropriate section below.

The Points.INI File
D2League comes with a file called D2Points.INI. This file contains ALL of the available points schedules and allows for scoring by position, six possible bonus point values, and five possible penalty point values. Bonus and penalty points are awarded based on data generated by the sim. This file MUST exist in the D2League folder, and at least one points schedule MUST exist in that file. In the file, there's a section at the top that looks like this:
		[SCHEDULES]
		List=NASCAR,FORMULA1,CUSTOM1
		
This section tells D2League that there are three schedules contained in the file. D2League uses the names in this list to find the available points schedule sections. For an example of the appropriate section structure, let's look at the first one in the list - "NASCAR" - and go over each line individually.
		[NASCAR]
		SchedID=0
		Name=NASCAR (Official)
		1-10=175,170,165,160,155,150,146,142,138,134
		11-20=130,127,124,121,118,115,112,109,106,103
		21-30=100,97,94,91,88,85,82,79,76,73
		31-40=70,67,64,61,58,55,52,49,46,43
		41-43=40,37,34
		Bonus=5,5,0,0,0,0
		Penalty=0,0,0,0,0
		
  • [NASCAR] -- This is the "section name", and the text between the "[" and "]" characters MUST match one of the listed schedules. In this case, it's "NASCAR".
  • SchedID -- This ID tells D2League where in the schedule list this schedule is. Notice in the List= line above that "NASCAR" is the first item in the list. Since all lists in programming start with item 0, that's how I do it here. This is referred to as a "zero-based" list. This is CRITICAL to remember when assigning a SchedID to a new schedule section.
  • Name -- This is the english name of the points schedule, and is used in several parts of D2League. Put something meaningful here, but don't go nuts typing some long-ass name.
  • 1-10 -- This line should contain a comma-delimited string of numeric values. These values are used to award points for finishing positions 1 through 10.

    There are four additional (and similar) fields allowing for points awards for finishing positions 11-20, 21-30, 31-40, and finally 41-43. All of these fields must exist for each schedule section.

  • Bonus -- Like the position points discussed above, this is a comma-delimited string of points. The order is important because each position in this string is for a specific bonus item, as described in the order below (from left-to-right):

          Leading a lap
          Leading the most laps
          Pole (fastest qualifier)
          Fstest practice speed/time
          Fastest warmup speed/time
          Most positions gained (hard charger)

    So, if you wanted to have (along with the standard Nascar lap leading bonuses) a 3-point bonus for fast qualifier, and a 5-point bonus for hard charger, your "Bonus=" line would look like this:

    		Bonus=5,5,3,0,0,5
  • Penalty -- This is a comma-delimited list of penalty point deductions. It is similar to the bonus points in that the position of the point value indicates a specific penalty, as illustrated below:

          Passing under yellow
          Speeding on pit entry
          Speeding on pit exit
          Unsafe pit exit
          Reckless driving

    Since the sim is notorius for penalizing people at sometimes bizarre and random times, I would recommend that you be cautious in your use of penalty awards.

Results Template Files
This file is typically, and assumed to be, a valid HTML file, except with a .DRT extension (D2League is provided with a sample file - D2Sample.DRT).

The way the template files work is actually quite simple. You create a HTML file that represents the framework of your desired results page. Intermixed among the thousands of HTML tags are various "data words" that D2League swaps out with the actual data.

When D2League reads a template file, it procedes through that file one line at a time replacing all of the recognized data words along he way. A list of available data words (and their meaning) can be found at the end of this module section.

Note: All template files must reside in the same folder where you've copied D2League.EXE. Further, all Results template files must have a ".DRT" extension.

Delimited Text Template Files
This feature is used to list all of the driver info you might want to include in a delimited text file. (D2League is provided with a sample file - D2Sample.DDT). This template file is super-easy to setup. Simply list the data word associated with the desired driver data like so:
		D_RACE_DRIVERNAME
		D_RACE_CARNUMBER
		D_RACE_STARTPOS
		D_RACE_FINISHPOS
		

etc, etc. You can put any data word you want in this file, but every line of delimited text will contain the associated data for that driver. This means you could potentially include weather data on each line of text. While this wouldn't be very useful, it is possible to do.

Note: All template files must reside in the same folder where you've copied D2League.EXE. Further, all Delimited text template files must have a ".DDT" extension.

Data Words
The following is a list of D2League template data words.


General Event Info
D_EVENT_DATEDate of event
D_TRACK_NAME Name of track
D_RACE_EVENTLAPS Laps attempted
D_RACE_PWEATHERRAW Practice weather*
D_RACE_QWEATHERRAW Qualifying weather*
D_RACE_WWEATHERRAW Warmup weather*
D_RACE_RWEATHERRAW Race weather*
D_RACE_CAUTIONFLAGS Number of cautions
D_RACE_CAUTIONLAPS Number of laps under caution
D_RACE_CAUTIONSRAW Caution info*
D_RACE_LEADCHANGES Lead change info*

Driver Info
D_RACE_FINISHPOS Finishing position
D_RACE_STARTPOS Starting position
D_RACE_CARNUMBER Car number
D_RACE_DRIVERNAME Sierra ID
D_RACE_INTERVAL Interval behind leader at finish
D_RACE_LAPSCOMPLETE Laps completed
D_RACE_LAPSLED Laps led
D_RACE_REASONOUT Reason out
D_RACE_PSPEED Best practice speed or time
D_RACE_QSPEED Qualifying speed or time
D_RACE_WSPEED Best warmup speed or time
D_RACE_FONTCOLOR Use D2League colors
D_RACE_POSCHANGE Number of positions +/- from start
D_RACE_POINTS Position points
D_RACE_TOTALBONUS Total bonus points
D_RACE_TOTALPENALTY Total penalty points
D_RACE_TOTALPOINTS Total points

Penalty Info
D_RACE_LAP Lap where penalty occurred
D_RACE_INFRACTION Infraction (what the sim though the driver did wrong)
D_RACE_PENALTY Penalty assessed (how the driver was punished by the sim)

* - Information is presented in the format originally generated by the sim.





D2SCRUB.EXE

This component is only needed by server admins that are not running Windows 2000. It massages the track-related INI files shipped with the Nascar Racing so that Windows9x/ME can read the files. This program only has to be run once, or immediately after installing Nascar Racing (or a Nascar Racing patch).

But Why Do We Need It?

A little background is probably in order. In order to read INI files, Microsoft was kind enough to provide API functions that can get and set data within these files. When you use these API functions as intended, section names look like this:

		[SectionName]
		

and key values look like this:

		MyNumberValue=123
		

For some reason (and I think it's because the track-related INI files were probably created with an external utility that created these files), these INI files include spaces where they aren't normally expected. The same section and key names look like this in the track-related files:

		[ SectionName ]
		MyNumberValue = 123
		

Notice that there are spaces in this version.

I originally had no reason to suspect that the INI file API functions that read the data would not be able to read the track files that came with N4. Since I develop and test on a Windows 2000 machine, I was really surprised when problems were reported in this area of the program.

Since N4 can read these files in their "natural state", and since both N4 and DeMONS are both Windows programs, why doesn't DeMONS read it, too?

My only guess (and this is purely speculation) is that the program they used to create the track INI files also has a facility (in the form of a linkable static library or DLL) for reading the files it creates. This means that they are probably not using the Windows API functions to read these files inside N4, because they would have had the very same problems I had.

Your next question is why is Windows 2000 different?

Beginning with Windows 2000, I think they changed the GetPrivateProfileString API function so that it (properly?) handles section names and key values that contain spaces. This version of krnl32.dll is only compatible with Win2K, and won't work on win98 or WinNT (I don't think).

How Does D2Scrub work?

It reads the files in as plain ASCII text, parses the data (removing the undesirable space characters), and re-writes the files using the Windows INI API functions. This makes the INI files compatible with Windows 95/98/ME (and all other versions of Windows as well).

It's not at all necessary to run D2Scrub on Windows 2000, but it won't hurt anything to do so. You can even run it repeatedly and it won't hurt anything.

Why didn't I just make it parse the files on the fly and hide this crap from the user?

Well, I was testing this possibility on my 1.2ghz Athlon 512mb ATA100 machine, and it took a little over 90 seconds to parse all of the files. And I would had to have done that EVERY TIME the files had to be accessed (quite often actually). The way I have it figured is that it's much more reasonable to have the user run this utility one time than to force them to endure a larger memory footprint and longer load times when they're doing something much more important (like running a schedule).

Final Comments

I don't know if Papyrus chose to read/write these files like this, or if it was just an unexpected side-effect of their track development tools, but it sure does annoy the hell outa me.



document ends