PHost - Friendly CodesPHost 4.1h |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Docs v4.x
|
IndexIntroductionFriendly codes are three-letter codes serving as a password for a planet's or starship's computer systems. Two objects having the same friendly code appear friendly to each other. Some friendly codes activate special missions for the planet or the starship. PHost aims to move away from using friendly code for these cases, towards extended missions and commands, but the friendly codes are still supported. Friendly codes can contain any printable character from the ASCII set. This includes all latin letters in upper and lower case, numbers, and many punctuation characters, but disallows control characters and high-ASCII characters such as umlauts, cyrillic letters, etc. Who has which Friendly CodeStarships and planets have their own Friendly Code. Starbases always use the same friendly code as the planet they orbit. Mine fields are controlled by the planet belonging to the owner of the mine field and being located nearest to the mine field center. Universal Minefield Friendly Code
Each minefield has an own, "local" friendly code (as above). In addition, you can define a "universal" minefield friendly code. For this, set a planet to mfX, where X can be any character. Ships can then also use this code to achieve a friendly code match with your minefields, for example to safely pass through them. This is useful when you want to grant a (not-yet-)ally free flight through your minefields without granting him access to your planets. mfX is not considered a special friendly code that is exempt from Friendly Code Matching (because it is actually intended for matching). When several planets owned by one player have an mfX friendly code, the planet with the highest Id number specifies the universal minefield friendly code. When Bird Men try to change a planet's friendly code to mfX using Super Spy Deluxe, that will trigger an Ionic Pulse to decloak ships orbiting that planet (if possible, see mission description). (v4.1g/3.5g:) The AllowUniversalMinefieldFCode option can be used to disable all special treatment of the mfX friendly codes. When this option is off, using a mfX will neither work as a Universal Minefield Friendly Code, nor automatically trigger an Ionic Pulse. Friendly Code MatchingWhat happens when friendly codes match? (This list is expected to be complete.)
Now when are two friendly codes are considered matching? When they are identical, character by character, of course. Friendly codes are case-sensitive, a lower-case 'a' doesn't match an upper-case 'A'. However, in PHost, there's one big exception: Special Friendly Codes Never Match! If a ship has a special friendly code (either registered friendly codes or the unregistered ones) then it will never match the friendly code of another ship, planet, or minefield. For example, if a ship has a friendly code of mkt then it will fight an enemy ship even if the enemy ship also has a friendly code of mkt. This holds true even for unregistered games, and does not distinguish between planet and ship codes (a ship with bum will not match another ship with bum, although bum has a special effect only on planets). All the special friendly codes defined by PHost are listed below. Add-ons may define their own special friendly codes. At host-side, these codes are listed in a file xtrfcode.txt. Players can use the send fcodes command to request a copy of that file. The file format is described below. Special Friendly CodesAll special friendly codes are case-sensitive in PHost, that is, you must match the spelling exactly to trigger the special action. In HOST, some friendly codes are case-insensitive. Starships
When used on a Merlin Class Alchemy ship, tells it to produce only one mineral (3 supplies -> 1 Duranium, Tritanium or Molybdenum). The last letter of the friendly code is the mineral to produce. (v4.0k/3.4m:) When used on a Refinery or Advanced Refinery ship, tells it to consume only one mineral. The other minerals are not converted into fuel. The last letter is the mineral to consume. Precondition: These codes only have an effect on ships having an appropriate alchemy function. These friendly codes only work for registered players. The ship does not need fuel. Relevant PControl Stage: Alchemy Relevant Configuration Option: AllowAlchemy See also: naX etc.
("Beam down money") The ship will beam all its money down to the planet it is orbiting. You can also use the Beam Down Credits mission or the unload command instead of this friendly code. If you do not own the planet, the planet owner will receive a message that you donated him money. Precondition:
Relevant PControl Stage: CargoDump
("Beam Transfer") The starship will transfer cargo to enemy (foreign) ships at the same location in space. If there are several ships, the cargo is split in equal portions.
You can also use the Transfer Torpedoes, Transfer Fighters and Transfer Fighters missions instead of these friendly codes. (v4.0h:) Alternatively, you can use the command transfer to transfer fighters, money and torpedoes like with a normal ship-to-foreign-ship transfer. These friendly codes will transfer stuff to all foreign ships, including cloaked ones. Preconditions:
Relevant PControl Stage: BeamTransfers
("Clone") Clones the ship. The ship must be in orbit around a planet with starbase. Cloning overrides a pending normal build order. Cloning costs the normal mineral amounts, but twice as much money (for details, see the ShipCloneCostRate config option). Preconditions for cloning:
Normally, the Crystals and Privateers can not clone. PHost does not explicitly forbid it, but with the default configuration, cloning is far too expensive for them. When a ship is cloned, build points are deduced from the starbase owner. This may not be the same player as the owner of the ship being cloned (and thus, the owner of the new ship) if the ship is using a planet-level alliance. Relevant PControl Stage: ShipBuildOrders (ship must fulfill most preconditions in this stage to be added to the build queue), ShipBuilding_1, ShipBuilding_2 (ship will be cloned, and minerals/cash must be available in these stages). Relevant Configuration Option: AllowShipCloning
("Give Ship") Gives a ship away to another race. The receiving race is encoded in the third letter of the friendly code:
Ship givings are simultaneous, that is you can exchange a ship with a friend by setting the appropriate gsX codes on both ships. This command is perfectly identical to the give ship command; see there for more details. Note that, unlike that command, this friendly code cannot be disabled by the host in PHost up to version 4.0i (in 4.0j and later, CPEnableGive affects gsX as well). Precondition:
Relevant PControl Stage: TransferOwner Relevant Configuration Option: CPEnableGive
Engages the hyperdrive, on ships that have one. See there for details.
("Load Fighter Minerals") Automatically loads minerals for building fighters, and build these fighters. This code replaces the Build Fighters mission, which requires you to manually load the minerals. Unlike that mission, it can also works for other races. Generally, lfm is considered a special ability of Rebels, Robots and Colonies, but PHost 4.0e and later allow hosts to enable it to everyone. Actually, this action has two parts:
You can also use the Gather-build fighters mission instead of this friendly code. Preconditions:
Relevant PControl Stage: BuildFighters Relevant Configuration Option: AllowBuildFighters
("Mine Drop") These codes modify the Lay Mines and Lay Web Mines missions; see there for more information. They specify how many torpedoes to convert into mines:
mdq and mdh will truncate the fractional result of their computation, i.e. mdq on a ship with 15 torps will lay 3 torpedoes. You can also use the Lay Minefield or Lay Web Minefield extended mission instead of this friendly code. These missions allow you to directly specify the number of mines to lay.
("Minefield Identity") These codes modify the Lay Mines and Lay Web Mines missions. You may lay a mine field belonging to another player. The third letter of the friendly code is the race in whose identity to lay the mines (mi1=Federation, mi2=Lizards etc. to mia=Rebels, mib=Colonies (lower case!)). Unless you have a mine-level alliance, the laying ship will be an enemy after the mine laying, and be in danger of a mine hit. Availability of this friendly code is configured using the AllowMinefieldIdentity or MineIdNeedsPermission configuration options, which allow disabling the code altogether or restricting it to alliances. You can also use the Lay Minefield or Lay Web Minefield extended mission instead of this friendly code. These missions allow you to specify the intended owner of the new minefield. Note that some front-ends have problems displaying non-crystal web mines and show them as normal mines. Look at the mine sweep messages in this case. Programs that read util.dat should show them correctly. Relevant Configuration Options: AllowMinefieldIdentity, MineIdNeedsPermission
("Make Torpedoes") Builds torpedoes. This codes builds as many torpedoes as possible, it requires the same amounts of money and minerals as on the starbase. However, using this code, your ships get independent from high-tech bases to resupply their arms. You can also use the Gather-build Torpedoes or Build Torpedoes mission instead of this friendly code. Preconditions:
("Mine Scoop") This modifies the Mine Sweep mission. When the ship is inside an own minefield, the mines are gathered back into cargo hold and turned into torpedoes again. It does not matter what torpedo type was originally used to lay the mine field. The ship needs torpedo launchers and beams for this. You can also use the Scoop Torpedoes mission instead of this friendly code. Preconditions:
Relevant PControl Stage: MineSweeping Relevant Formulas: Mine Sweeping.
("No Alchemy") When used on an alchemy, refinery or advanced refinery ship, tells it not to do alchemy. Thus the ship can be used as a normal freighter. In HOST, this friendly code is reported not to work on advanced refinery ships.
When used on a Merlin Class Alchemy Ship, tells it to produce only two minerals (6 supplies -> 2 Minerals). The last letter of the friendly code is the mineral not to produce. (v4.0k/3.4m:) When used on a Refinery or Advanced Refinery ship, tells it to consume only two minerals. The last letter of the friendly code is the mineral not converted into fuel. Precondition: These codes only have an effect on ships having an appropriate alchemy function. These friendly codes only work for registered players. The ship does not need fuel. Relevant PControl Stage: Alchemy Relevant Configuration Option: AllowAlchemy See also: alX etc.
Ships that have the Boarding ability (by default, all Privateer and Crystal ships) usually board a ship when they try to tow it while it has no fuel. This friendly code on the towing ship prevents that. This way, Privateers and Crystals can tow friendly fuel-less ships without boarding them.
Prevents use of torpedoes or fighters in battle. The ship will only use its beam weapons. This is useful when fighting a weak ship you wish to capture. For the battle, the ship will appear to have the correct number of torpedo launchers/bays but no ammo in PHost. In HOST, NTP reports the correct amount and type of ammo, but no torpedo launchers/fighter bays.
Sets off the Glory Device at the end of the turn (after movement, before combat). Precondition:
Relevant Formulas: Glory Device.
Triggers the Glory Device when a cloaked ship belonging to the primary enemy is found at the same location. With the Kill mission, any cloaked enemy ship triggers the device. Precondition:
Relevant Formulas: Glory Device.
The ship will scan for wormholes. You'll receive the scanner report sub space messages next turn. You do not need fuel to scan for wormholes. With ExtendedSensorSweep enabled, Sensor Sweep will also find wormholes, so you do not need this friendly code. Relevant Configuration Option: WrmScanRange Relevant PControl Stage: WormholeScan Relevant Formulas: Scanning for Wormholes.
If the ship reaches a wormhole entry after normal movement, it will attempt to travel through the wormhole. To move through the wormhole, the ship needs about as much fuel as it needs to travel 1/100 of the distance traveled (configurable, WrmTravelDistDivisor). If this fuel is not available, the ship will move unpredictably and get heavily damaged. Precondition:
If WrmVoluntaryTravel is disabled, wormhole travel is mandatory and the ship just needs to be in range of the wormhole (inside entry radius) to be sucked through the wormhole. Relevant PControl Stage: Movement Relevant Formulas: Wormhole Travel. Planets and Bases
("Attack") Directs the planet to attack ships (similar to the Kill mission on starships). The Super Star Destroyer is immune against this friendly code, as are the Klingons and Rebels. Relevant Configuration Options: AllowPlanetAttacks, PlanetsAttackKlingons, PlanetsAttackRebels.
("Beam Up Money") The planet will beam up all money to alien ships in orbit (including cloaked ones). If there are multiple ships, it will split the money into equal portions. Precondition:
Relevant PControl Stage: BeamUpCredits
("Configuration") Tells PHost to send you the pconfig.src file within your utilx.dat next turn. You can also use the send config command instead of this friendly code. A number of add-ons will react on this friendly code (by sending configuration messages), too. In HOST, this friendly code causes HOST to send you the configuration as a set of sub-space messages. PHost's configuration is too large to fit in sub-space messages.
("Dump") When the planet has a starbase, recycles all starship parts (hulls, beams, torpedo launchers, engines) in starbase storage. This returns the minerals used to build these parts, as per RecycleRate, but not the money. Parts required by the current build order are not affected. Precondition: this code only works for registered players Relevant PControl Stage: DumpOldBaseParts
("Mine Field", the third character can be anything) Universal Minefield Friendly Code.
("Nuke") Like ATT, but also attacks fuel-less ships. Fuel-less capital ships owned by the Bird Men can not be attacked, though.
("Priority Build") Tell PHost which build orders you want to have executed first. X is a digit between 1 and 9. You can use each of these 9 friendly codes to designate up to 9 priority builds, PB1 being the most important (first). This friendly code is enabled with the AllowPriorityBuild config option. The exact interpretation depends on the build queue mode (BuildQueue).
Full details are on the Build Queue page. Relevant Configuration Option: AllowPriorityBuild Relevant PControl Stage: ShipBuildOrders Unimplemented Friendly CodesThe following HOST friendly codes are not implemented in PHost. In addition, HOST processes some friendly codes case-insensitive and some not; in PHost, all codes are case-sensitive.
("Locking Alliance Friendly Codes") These friendly codes are not implemented in PHost. Alliances work completely different in PHost. PHost's alliance feature predates that of HOST by about two years. For details, see Alliances.
This undocumented HOST friendly code is not implemented in PHost. It causes the ship to build fighters but not beam up stuff. (Actually, any variation of lfm containing a capital letter has that effect.)
("No Config") In HOST, this friendly code tells HOST not to send the host configuration messages. PHost never sends its configuration file when not asked to. See con. The XTRFCODE.TXT fileAdd-on or external programs sometimes introduce new special friendly codes to implement new behavior. PHost's handling of special friendly codes with respect to matching (i.e., special friendly codes never match) is a simple and consistent rule for players to follow. PHost implements a mechanism that allows it to recognize an add-on's new friendly codes as being special for the purposes of matching. The friendly codes are listed in a file xtrfcode.txt which must reside in the game or root directory. It contains a list of all the special codes. Hosts should update it according to the add-ons they use. Since version 3.4, PHost automatically updates the file to include the PHost special codes (before, it would include them only in copies sent to players). The file consists of a list of tokens with up to three characters, separated by whitespace and/or newlines. A three-character token defines just that friendly code special, shorter tokens declare special everything that starts with these characters. Matching is case-sensitive. For example, if the xtrfcode.txt file contains
then friendly codes of BJG, AJG, RJG as well as any friendly code that begins with J are considered special and will never match another friendly code. The above example may be suitable for use with the "Jumpgate" add-on (although the J code is overly broad: only codes consisting of J followed by a number are considered special by "Jumpgate", but there's no shorter way to describe that exactly than listing them all). Here is another example xtrfcode.txt file that may be used with the RacePlus add-on (a bit broader than needed, too):
Finally, another example xtrfcode.txt file that may be used with the FHost add-on:
Last updated 31 May 2015. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
support@phost.de for support, ideas, bug reports, questions. Contact Details | Mail