PHost - Advanced Features
This document describes PHost's advanced features, how to set them up and how to play with them. It is intended for players and hosts.
PHost allows any player to play any race in the game. This is accomplished with the PlayerRace config option. This option has 11 entries, with each entry specifying the race that the given player is to play. For example:
This has players 1 through 5 playing The Federation, and players 6 through 11 playing The Borg. Values of 12 and larger are also accepted, meaning that the given player will have no special racial abilities.
(v4.0:) PHost 4 goes even a step further and allows to customize the special missions available to the player separately, using the PlayerSpecialMission option. This is intended for design games with custom races. By default, that is, if the option does not appear in the config file, it has the same value as PlayerRace.
An example for a completely non-standard configuration would be
Here, players 1 and 2 play standard Feds, player 3 to 5 play Feds that can Hiss instead of doing Super Refit, and all the Borg players can Pillage planets instead of Self Repair.
Whereas modern client programs support playing with non-standard race assignments, older client programs do not. In those, the special mission listed for each race will not change, so the player needs to remember that his special mission may be different, depending upon his race assignment. For example, if player 11 selects the special mission on one of his ships then the client program will show the mission as Build Fighters. But if player 11 has been assigned race 6 (or, rather, special mission 6), then the ship will actually perform the Self Repair mission. Using the Special Mission extended mission, players can bypass this confusion.
It is suggested that players edit the mission.ini file to have the Special Mission extended mission reflect their true special mission, and use this extended mission instead of the usual one.
Some client programs may refuse to set your special mission. For example, the Build Fighters is only permitted for fighter ships, so a client program will not allow the Cyborg-playing player 11 to set this mission on a torpedo ship. Using mission 31 instead also avoids this problem.
For example, if a race has PlayerRace=7 and PlayerSpecialMission=7, he plays a "standard" Crystal. Giving him PlayerSpecialMission=6 instead, he'll still be like desert planets and be immune to glory devices, but will no longer be able to lay web mines or board enemy ships. Instead, he'll be able to repair in space.
Not all of the possible combinations make sense. Unless you explicitly want to try out the new possibilities, we strongly recommend anyone to not have a PlayerSpecialMission option in his game, so that only the 11 standard races are used.
Many other racial abilities are configured by array options. When playing with non-standard race abilities, you have to change them manually. Options which fall into that category:
In recent PHost versions, some options only affect the default assignments for hull functions. You can modify or cancel these using your own shiplist.txt.
Each race can build a unique set of ships; this set is defined in a file truehull.dat. When playing with non-standard race assignments, host and clients have to agree upon a consistent (and sensible) interpretation of that file. This is what PHost's MapTruehullByPlayerRace option is for.
Normally, the truehull.dat is indexed by player number (MapTruehullByPlayerRace=No). All client programs can handle this interpretation. However, the host must modify the file accordingly; for the above example, it must contain five Federation ship sets, and six Cyborg ship sets.
You can also freely edit the ship assignments if you wish.
In case all players use client programs which can handle it, you can also set MapTruehullByPlayerRace to Yes. This instructs the client programs to do the above remapping. The advantage is that you can use unmodified standard ship list files; the disadvantage is that it fails when someone uses a different client.
The special ship abilities are sometimes considered racial abilities. However, it only depends on the truehull.dat file who can build which ships; if you allow the Fed player to build MCBRs, the Fed will have a gravitonic cloaker, although that is usually considered a Privateer ability.
Since util.dat contains mostly the same information as the subspace messages, it is somewhat redundant to have both. In addition, player messages can become overwhelming, especially in the later stages of the game, when mine scan messages, sensor sweep messages, dark sense messages, etc. can leave a player with over 200 messages to deal with.
The idea behind message filtering is that the utilities mentioned above will display the information they got from util.dat, and present the information to you visually, so there's no need to read it textually.
Players can turn on message filtering themselves, without host intervention, using the filter command. When filtering is enabled, the following messages will be suppressed:
PHost implements one model of a wraparound universe. In a wraparound universe, ships that fly off the "edge" of the map appear on the other side of the universe. Thus, the universe behaves more like a sphere (or a torus) than a plane. For example, in the original VGA Planets map, you can fly from (1010,2000) due west (heading of 270) and after 20 LY of travel you will appear on the other side, at (2990,2000), where you will continue on your journey flying due west.
A wraparound universe allows players to make more use of all areas on the game map. Depending upon placement of homeworlds, there need not be any more "dead" areas that take a long time to reach and may never even be explored. A wraparound universe also gives each player more neighbors, thus leading to greater interaction between players. Races on opposite sides of the universe that used to be distant unknowns can now be neighbors.
To enable the wraparound universe, set AllowWraparoundMap to Yes. In addition, you have to define the wraparound rectangle using the WraparoundRectangle config option. The wraparound rectangle confines all map objects (ships, planets, minefields, etc.). Any ship, for example, that exits the wraparound region reappears within the wraparound region on the other side.
Note that unlike ships and minefields, planets outside of the wraparound region are not remapped onto the region. If a planet is outside of the wraparound region, then PHost pretends that the planet does not exist. This allows custom maps with fewer than 500 planets to be used. Just place the planets outside the wraparound rectangle. Usual map editing tools place such planets at coordinates like Y=0 or Y=9000 which is just fine.
The WraparoundRectangle config option is an array of 4 values. The first 2 values define the X and Y co-ordinates (respectively) of the lower-left corner of wraparound region. The last 2 values define the X and Y co-ordinates of the upper-right corner of the wraparound region.
Note that, since PHost 3.3c, the extreme top and right co-ordinates are no longer part of the map. In older versions they were, which could lead to the strange situation that a ship that moves from Y=2999 one ly to the north would end up at Y=3000, while one that moves 2 ly to the north and back one ly to the south would land at Y=1000.
defines a universe where possible X co-ordinates range from 1500 to 2499, and possible Y co-ordinates range from 1000 to 2999.
Here is another common setting:
This provides a standard-sized map which is seamlessly wrapped.
No co-ordinate of the wraparound region may be less than 0 or greater than 10000. In fact, it is recommended that the wraparound region be located away from these boundaries (e.g., don't make the lower-left corner closer to the origin than (1000,1000)) for proper operation of many external programs.
Wraparound universes can be a challenge to work with when you have to imagine your ships flying from one edge of the universe to another within a single turn. Landing on planets on the opposite side of the map, for example, requires much planning. Fortunately, some client-side programs are currently available that replicate the map (i.e., they tile the plane with the map) so that cross-boundary motions are much easier to visualize and plan.
Since wraparound maps are rather popular, most other new tools should also support it.
The most important rule about wraparound is: there is no special rule. All processes work seamlessly across the map border. When a ship sits at the left border and moves to the left, it will appear on the right. When a minefield with 100 LY radius is 50 LY from a border, it will reach over the border, 50 LY into the opposite quadrant.
Caveat: There's one caveat to watch out for. When you set a very long waypoint ("1900 ly to the right"), the ship may move in an unexpected direction. PHost will always move ships along the shortest possible path to their waypoint, possibly using a wrap boundary to make the journey shorter.
Caveat 2: External add-on programs may not know about or respect the wraparound settings. Thus, they may move ships outside the wraparound region, and not modify their effects to take wraparound into account. PHost will move all ships outside of the wraparound region back into the region, but there may be other interactions that are not so easy to predict. Check with the documentation of the add-on program for any mention of wraparound support.
Sphere and PWrap: It is not recommended to use Sphere or PWrap with PHost. Although these add-ons also implement a wraparound universe, they can not deliver the full integration as PHost does. For example, minefields near a border will not reach into the opposite quadrant with these add-ons. You should definitely never use Sphere or PWrap when AllowWraparoundMap is enabled.
Remote ship control is a PHost feature which allows players to give commands to allied ships without having to relinquish ownership. This can be useful in many situations. For example, in team games, it can be quite difficult to coordinate a fleet of ships owned by different players. Using remote control, one player can assume control over the others' ships and give orders to them.
Remote control is simple in operation, and hopefully simple to understand as well.
Normally, when you own a ship, you'll see that ship in your RST file, and it will execute your orders. If you're Crystal, your ship will be reported as a Crystalline ship, and you will be able to Lay Web Mines.
When you remote-control a foreign ship, that ship will belong to the original owner for the complete host run. Before RST files are generated, however, the ship is turned over to you, and will be reported in your RST (you can only give commands to ships which are in your RST). In the next turn, after TRN processing, the ship will be given back to its original owner. For example, when you're Crystal and control a Bird ship, that ship will act as a Bird ship all the time. It will be able to Super Spy and not to lay Webs. It will be reported as a Crystal ship in RST files.
All other players will see that ship as belonging to the Crystals, but PHost will tell them that it's actually a Bird ship. It does so by sending a util.dat record as well as by adding a tag to its name.
To summarize, here's what happens with remote control:
Some things to note:
During play, remotely-controlled ships will appear to be owned by the player who controls them, not who owns them. This is an important distinction: if you see a Crystalline-controlled ship approaching which actually belongs to the Bird Men, you have to set primary enemy Birds to attack it.
PHost tries in several ways to tell you that:
You need to know the true owner of a ship in many cases:
When the owner of a ship permits it (see below), you can acquire control of that ship by sending a remote control command. For example, to assume control over ship 37, you send the command "remote control 37". Next turn, the ship will be in your RST so you can control it.
Alternatively, the true ship owner can use remote give to place the ship under your control.
To return control back to the original owner of a ship, send a remote drop command, as in "remote drop 37". You can still give orders for this ship, for the current turn, but next turn, the ship will be given back to its original owner.
As soon as you offer someone the ship level of alliance, they can remote-control all your ships. You can prevent ships from being remotely controlled by sending a remote forbid command. For example, to disable remote control for ship 38, you would send the command "remote forbid 38". If the ship currently is under remote control, it will be forcibly given back to you.
You can choose that all newly-built ships should be forbidden from remote control by sending a remote forbid default command. Note that this will only affect new ships; all ships which you already have are not affected. You must send individual remote forbid commands for each of them.
To allow remote control for some ship again, use the remote allow command, as in "remote allow 38". As above, you can also use "remote allow default" to make all newly-built ships remotely-controllable by default.
When you start a game, you should explicitly send a remote allow default or remote forbid default command to configure the default state. Otherwise, the default state depends on the program which initialized the universe; most programs so far set it to "allow".
Because a remote controlled ship is still owned by its original owner, it will report its actions to that original owner. In particular, if that player has not offered you vision level, you will not see the result of sensor sweep, mine sweep or exploration.
Starting with PHost 4.0d/3.4g, some messages are forwarded to both the real owner and the remote-control owner of a ship:
Remote control currently has bad interaction with AllowShipNames restrictions. To make it short, restrictions between a ship's real owner and the ship's remote control owner are currently not enforced for ships which are under remote control. We believe this is not too serious a problem because setting up remote control needs communication anyway.
There are three types of conflicts which can arise during towing: the towee might break the tow, many ships try to tow a third, or there might be a tow chain or loop.
Tow conflicts are resolved in the order as specified here, after all other preconditions of towing (see mission description) have been fulfilled.
PHost implements two models of conflict resolution. The preferred one, alternative towing, is selected by enabling AllowAlternativeTowing, and is based upon a tow-strength reasoning. In addition, PHost supports HOST-compatible towing, a model which tries to mimic the Wisseman HOST rules. It should yield the expected results in most cases.
If the towee cooperates (TowedShipsCooperate), it will not break the tow.
Alternative Towing: Towing depends on the tow strength of the tower, and the tow resistance of the tow target. The tow succeeds if the tower's strength equals or exceeds the tow resistance. If the towee has a larger tow resistance, he breaks the tow.
(v4.0j:) In case both ships have equal tow strength, the ship with the higher experience wins. If the experience level is the same, the tow breaks.
Tow strength is determined as follows:
Tow_strength = Engine_contribution + Movement_contribution ...if ship has fuel 0 ...if ship does not have fuel Engine_contribution = Engine_tech^2 * Eff_engines * Warp_factor * TowStrengthEngineScale Movement_contribution = Movement_distance * TowStrengthDistanceScale ...where Movement_distance = Min(Waypoint_distance, Max_dist, Max_allowed_by_fuel)
Tow resistance is computed using the same formula, but using only the towee's mass in computing the fuel/distance limit.
These rules can be summed up as follows:
Note that up to version 4.0i, towing behaved slightly different. First, Level2Tow always was an absolute win. Ships with Level2Tow could always tow ships without, the function did not explicitly affect tow strength. Second, in case of equal tow strength, the tow would have succeeded; experience was not considered.
HOST-compatible Towing: HOST-compatible towing is based on an analysis of the behaviour of HOST 3.22.009. The rules can be summarized as follows:
If multiple ships try to tow a single ship, only one can finally be successful.
Alternative Towing: The ship with the highest tow strength wins the conflict. Among equal tow strengths, lowest Id number wins.
HOST-compatible Towing: Ships with Level 2 tractor beam win over those without. Among equal ships, lowest Id-number wins.
Tow chains (A tows B, B tows C, C tows D, D tows E, etc.) are broken up such that the first tow always succeeds. In this example, A will tow B. Since a ship which is being towed cannot tow another ship, B will not tow. C will tow D, and D will not tow.
Loops can also remain in very few cases. In this case, PHost will pick one ship whose tow succeeds, and resolve the rest using the above chain resolution rules.
Note that PHost versions before 3.4h/4.0e did not do loop resolution, so results were close to unpredictable under these versions.
Wormholes are imaginary connections between two points in space. You can travel through wormholes with your ships.
Ships can travel through wormholes. If WrmVoluntaryTravel is enabled, wormhole travel is voluntary: set the friendly code to WRT to travel through a wormhole. As a confirmation for wormhole travel, the friendly code will be changed to WRS in this case. If voluntary travel is disabled, ships will always be moved through wormholes if they end their movement inside a wormhole endpoint, even if they do not want that.
Wormhole travel consumes fuel. If the ship does not have enough fuel for the ride, it will be heavily damaged and thrown to a random place in the universe. Even if you have enough fuel, it is possible that your ship gets damaged. You cannot tow or intercept through a wormhole. After traveling through the wormhole, ships must usually decloak (WrmTravelCloaked).
The ship will not end at the exact center of the wormhole. It will end up up to 10 ly in each direction from the center. Therefore, if you enter a wormhole with many ships at the same position, they will not necessarily end all at the same position again.
Travel through a wormhole will impose stress to the wormhole, which will damage the ship. Wormhole stress depends on the mass of the ship and the wormhole. The following table gives you a rough impression. It assumes a completely stable wormhole (instability 0%); less stable wormholes of course increase the failure odds:
See Wormhole Travel Formulas for details.
Wormholes are only supported if AllowWormholes is enabled in pconfig.src (default). In this case, PHost will look for a text file wormhole.txt which contains wormhole definitions.
A wormhole definition consists of 6 to 10 numbers in one line, separated by whitespace:
You can write comments in this file starting a line with ';' (semicolon) or '#' (hash sign). Blank lines are ignored.
PHost will read and update wormhole.txt. A backup copy of the old file will be written as wormhole.bak.
If a wormhole's two endpoints become coincident (by natural displacement, for example), the wormhole is considered "collapsed" and becomes inactive. It still appears in wormhole.txt to avoid renumbering wormholes and confusing player-side tracking utilities. If you want to add wormholes in mid-game, add them to the end of wormhole.txt for the same reason. Likewise, if you want to delete a wormhole, mark it inactive by setting start and endpoint to identical values.
Last updated 31 May 2015.
Mail email@example.com for support, ideas, bug reports, questions. Contact Details