Storm Watch
Hampton Roads, Virginia Storm Watch - Click to enlarge
Regime
Race Guides
Federation
Lizards
Birdmen
Fascists
Privateers
Cyborg
Crystalline
Evil Empire
Robotic Imperium
Rebels
Colonies of Man

Main Menu
Homepage
Strategy
Downloads
Player List
Games Index
Support
Chat
Developer Profiles
Forums
FTP Site
New Player Signup
Newsletter
Hall of Fame

Site Info
VGA Planets FAQ
Submit an Article
Privacy Policy
Terms of Service
About Us
History
Staff Bio's
Contact


Want to write for the
Official VGA Planets
Newsletter? Click Here

Version: 1.0
Type: Freeware
Author: Andy Dukes
Homepage: N/A

Download Now


Teleport

A modifed version of the Portable Host Development Kit EXAMPLE PROGRAM #5

I've made very few changes, it does not generate the "xyz has been teleported" messages,
has some getch()s in case of problems and displays a bit of what is going on to the screen.

9-Jan-97 Andy Dukes - eMail ADukes@CityScape.Co.UK

This program is meant to demonstrate what an AUXHOST add-in program might look like. It is really no different from an external program except that it calls WriteAUXHOSTMessage() instead of WriteMessageToRST() or WriteExternalMessage() to write player messages.

This example program implements rudimentary transporter technology for starbases. Starbases may send one type of mineral (or colonists, supplies, and money) to another starbase on each turn. The amount of that substance or item to transport is fixed at 20% of the current stock but this can be made configurable or intelligent by some enterprising young programmer.

The planetary friendly code is used to effect transfer. If a planet's friendly code is 'TX_' (where _ is N, T, D, M, C, S, or $) then the starbase in orbit of that planet is a transmitter. The special transmit friendly codes, then, are:

TXN -- Transmit Neutronium
TXT -- Transmit Tritanium
TXD -- Transmit Duranium
TXM -- Transmit Molybdenum
TXC -- Transmit Colonists
TXS -- Transmit Supplies
TX$ -- Transmit Megacredits

The starbase will transmit 20% of the current stock of the item to the receiver starbase. The receiver starbase must have its friendly code set to 'RX_' where '_' is once again the letter code for the item to receive (as above). Multiple transports may be occuring at once on the same turn but they are all done in order of base ID numbers. That is, the lowest numbered base with a transmit friendly code is found, and then the lowest numbered base with a matching receive code is used as the receiver. The next-lowest numbered base is found with a transmit code, etc.

This utility is meant to be run in the AUXHOST1 phase. For example, in a PHOST batch file, you would type:

PHOST -1 gamedir
TELEPORT gamedir
PHOST -2 gamedir
PHOST -3 gamedir

Using HOST 3.2, the AUXHOST1.BAT file should contain:
TELEPORT gamedir

and the AUXHOST2.BAT file may be left blank.

This file is copyrighted by the PDK authors Andrew Sterian, Thomas Voigt and Steffen Pietsch in 1995. You may copy and distribute this file freely as long as you retain this notice and explicitly document any changes you make to this file (along with your name and date) before distributing modified versions.

This is an example program for instructional purposes only. It is not guaranteed to work correctly, or even to necessarily compile on all systems. You use this program at your own risk.

 


Copyright © 1999-2008 Circus-Maximus.com unless otherwise specified. All Rights Reserved.
The Contents of this page may not be used, published or reproduced without the owners written permission.
All other material © of their respectful owners.

This website is not affiliated with VGA Planets or Tim Wisseman.
VGA Planets is Copyright © 1992-2008 Tim Wisseman -
Privacy Statement.
Incorporated radar image is provided by the NWS via government servers
that are in the public domain and are not under copyright protection.