Host Interface Screen

The host interface was designed to look like the master program interface and the planets4.exe`s files interface . It also provides for easy hosting of games by any player. For people that want to host many games there is the third party PHCc interface which does a better job with hosting games on a much larger scale. The host interface as the option of using the v4mail.dll to send RST files to the players. The v4mail.dll sends mail using the SMTP mail protocol. The host interface needs to know your email address and the SMTP mail server that you want to connect to. .My email address is and the mail server that I use to send mail is Your email account and server should follow the same pattern.

The host interface can use a mailgrab.exe plugin program to interface with your machine`s mail reader. The mailgrab.exe that comes with host was designed to work with Microsoft Outlook 2000. It should work with Outlook 97 and 98 as well. This version of mail grab will NOT work with Outlook Express. If you are not running the Microsoft Outlook mail reader it would be best to simply delete mailgrab.exe.

The reason the mailgrab.exe plugin exists is because the popular mail client Microsoft Outlook 2000 stores attached files in a database and not as files in a download directory like most mail readers have done in the past. I hope 3rd party programmers will write new mailgrab.exe plugins for other popular mail readers that also store attachments in a data base and as files in a download directory. If your mail read has a download directory that it stores attachments in you can simple delete the mailgrab.exe program and set the path to the game`s trinary TRN directory to the mail reader`s download directory.

Mailgrab.exe does the following:

Copies all TRN files from the mail reader that are attached to incoming email from the last seven days and stores them in the UNIV sub directory

If there are more than one incoming TRN files from one player, from the same game and current turn, the oldest TRN files are deleted.

The program renames the incoming TRN file to a new name when placing it into the UNIV directory. Making sure to never overwrite any TRN files in the UNIV directory.

The name of the TRN file does not matter.

If the command switch /a is given to the mailgrab.exe program it will automatically run and exit

The source code to mailgrab.exe is available at the Planets 4 web site


The above interface shows that slot 12 is active and locked to the yig file d:\vbasic\version4\p4\univ\game12\g12.yig

There are 12 players in the game.

The 4 red lights indicate that players 1, 2, 3 and 4 have all finished their turns and have turned in their TRN files. Red means: finished, all done, stopped. A copy of their TRN files are now sitting in the univ\game12\ directory.

The blue/green light marking player 5, 9, 10, 11 and 12 indicate that the players have not yet turned in their TRN file yet and that the host interface did not send these files out using its own email system. The RST files might be ones that are being played with locally on this machine or the RST files have been transferred to the players by some other method, such as another mail program or file transfer method. Host is waiting for these player to turn in their TRN files.

The small green light next to player 6 shows that the RST file has been Emailed by the host interface.

Players 7 and 8 have RST files that are suppose to be Emailed to them, the files have not yet been sent. When the send button is clicked the RST files will be sent to the email address set in the players screen. In this example, the email will be sent from my account at using the SMTP mail server. If the attempt to Email the RST files are successful the lights will turn to small green lights like the one that player 6 currently has.

Players 8 and 10 have had the BOZO Bypass switch turned on. These are players that have a nasty habit of not turning in their files in a timely manor or have to skip a few turns for some reason. When host is running in automatic timer mode it has permission to process the turn even if these two players have not turned in their TRN files yet.

The Buttons / Screens:

Players: This screen allows you to enter a short label for each player. If you will be emailing the RST file to the player you can set the player`s email address and what the subject of the subject line will be. Checking the Email box activates the email address. If the BOZO bypass is checked and host is running in automatic timer mode it has permission to process the turn even if these two players have not turned in their TRN files yet.

Preferences: This screen displays the directory paths that host will look into to find the incoming TRN files from the players. The primary is the directory with your universe file (YIG file). This is the directory that planets4.exe normally places its TRN files after it is produced. The secondary directory is the univ sub directory. This is the directory that mailgrab program drops incoming TRN files. The Trinary TRN directory can be any directory on your system. This might be a special download directory that that TRN files are being placed in by other programs.

The screen lists how many hours it has been since the last host run. You can set the desired number of hours between host runs. When the hours since last run becomes greater than the hours between host runs host is allowed to go into automatic mode You have 5 different check boxes that controls the automatic timer functions. If one or more of the first 3 check boxes are checked host will attempt to run in automatic mode. (See automatic mode below)

Last Log: Loads and shows you the log file from the last host run.

Planets 4: Starts Planets4.exe

Master: Starts the Master.exe program, so that new games universes can be made.

Mail Grab: Runs the Mailgrab.exe program that searches for incoming TRN files. The one that comes with host works only with Microsoft Outlook 2000. (See above)

Host EMail: Allows you to tell host what your email address and SMTP mail server are. This address and server will be used for sending RST files to the players. It will not be used to receive email.

Scan TRN: Searches the trinary directories for incoming TRN files and sorts them into the correct game directories. HOST is always checking the primary and secondary for new incoming TRN files every few seconds. The trianry is ONLY checked before a host run, when this button is clicked or when an automatic event is triggered.

Send: Sends out RST files by email if any are pending to be sent.

YIG Scan: Searches the univ\game?\ directory for any YIG file. If one is found the host program will lock onto the YIG file and make it the active universe file.

To import a YIG file from an already running game place the YIG file and all other files that goes with it in one of the empty univ\game??\ directories and use the yig scan button on it. For example: if you want to place an existing YIG file into slot 3; place the yig file into the univ\game3\ directory; select slot 3 on the host interface and then click the scan button.

Run Host: Starts a 20 second countdown and runs host. It does not matter if all the TRN files have been turned in or not. Host will run no matter what. Host will run the Scan TRN function just before the host run starts. After the host run an attempt to send the RST files out by email will be made if the check box to do so is checked on the preference screen.

Automatic Mode Rules:

If the host.exe interface is running all 12 game slots will be checked every 20 seconds if any of the automatic timer checkboxes are checked for any game.

If the automatically run host after set number of hours no matter what check box is checked and the proper number of hours has passed the host will go into pre-start mode.

If the automatically run host after set number of hours if all TRN files are in check box is checked and the proper number of hours has passed and all the TRN files have been turned in the host will go into pre-start mode.

If the automatically run host as soon as all TRN files are in check box is checked and all the TRN files have been turned in the host will go into pre-start mode.

When host is in pre-start mode it will check if the automatically run mail grab before running host check box is checked. If it is and mailgrab.exe has not been run in the last 5 minutes mailgrab.exe will start and host will wait 20 seconds for mailgrab.exe to finish.

When host is in pre-start mode and the mailgrab.exe check has been completed host will:

1. Scan the trinary TRN directory for any incoming TRN files and place them in then univ directory

2. Sorts the TRN files into the univ\game?? sub directories

3. Selects the slot on the main host interface that is about to start its host run

4. A 20 second countdown starts.

5. When the countdown reaches 0 the host run starts

6. The host interface is hidden and the log display is shown

7. After the host run an attempt to email the RST files to the players is made if the automatically email the RST files to the players after the host run check box is checked.

Jan 28th, 2004