In addition to the General Object record, there's an additional method of making objects, called Ufos, visible to client programs.
This method was introduced by HOST 3.20 and Winplan 3.5. PHost supports it, too.
To make an object visible to clients, you just write it into ufo.hst, and let PHost do the rest.
The ufo.hst consists of 100 or 1000 records of the following format:
word Color (0..15) char[20] Name char[20] Info Text 1 char[20] Info Text 2 word Location X word Location Y word Speed (0..15) word Heading (-1..359) word Planet Scan Range (1..5000) word Ship Scan Range (1..5000) word Radius word Object Type
The Color field is non-zero if the Ufo slot is in use. It determines the color in which the Ufo is to be shown on star charts, using the standard VGA color numbers:
Number | Color | Number | Color |
---|---|---|---|
0 | Black #000000 | 8 | Dark Gray #555555 |
1 | Blue #0000AA | 9 | Light Blue #5555FF |
2 | Green #00AA00 | 10 | Light Green #55FF55 |
3 | Cyan #00AAAA | 11 | Light Cyan #55FFFF |
4 | Red #AA0000 | 12 | Light Red #FF5555 |
5 | Magenta #AA00AA | 13 | Light Magenta #FF55FF |
6 | Brown #AAAA00 | 14 | Yellow #FFFF55 |
7 | Light Gray #AAAAAA | 15 | White #FFFFFF |
The Scan Range fields determine how close a planet or ship must be to see the object. The host does visibility checks and filters the file accordingly when sending it to the players.
The Object Type determines the type of the object. Your programs should only use slots which they own, or which are still available.
PHost will also send wormholes to players in Ufo format, using Id numbers as determined by WormholeUFOsStartAt. Any Ufo object in that range will not be seen by players.
Advantages: Ufos work with both HOST and PHost. Many client programs support Ufos. Programs known to do so include EchoView, PCC, VPA, and of course Winplan. Ufos are easy to use.
Disadvantages: General Objects are more flexible because the add-on author can decide who sees which object, and because they can carry additional information.