PHost - Experience

PHost 4.1h


Index

Overview

A new feature of PHost 4 is that ships (and planets) have experience. Every unit gains experience while operating on your command, and experienced units are better in various aspects than inexperienced ones.

Units have a particular amount of experience points (EP) which is normally kept secret. From that, PHost derives the unit's rank or experience level which determines the actual bonuses. You know the level of your units, so you can estimate how many points it has. PHost can be configured to support between zero and ten levels which ships can reach. It comes with sensible defaults for 4 experience levels.

In every turn, units gain new experience points. When they have accumulated a particular score, they reach the next experience level. Every unit can advance by at most one level each turn; if you have enough points to advance two levels, the excess points will be discarded.

Unlike the simple experience system in HOST, PHost's system affects the most important part of the game: combat.

Note that ship experience is not a substitute for player experience.

Back to top


Details

Most parts of the experience system can be configured. We believe that the default values are sensible and balanced, but their practical value still has to be proven. The following sections describe all tunable knobs and their effects.

If you just want to try out the system, use our defaults. All you need to do to enable experience is to set NumExperienceLevels = 4 in your pconfig.src.

Overall Options

NumExperienceLevels  = 4
ExperienceLevelNames = Recruit,Soldier,Experienced,Elite,Ultra Elite
ExperienceLevels     = 750,1500,3000,6000
ExperienceLimit      = 1000000

These parameters define the experience levels which are available. In every case, there is the basic level, or level zero, which is the one all ships and planets start with. The NumExperienceLevels setting defines the number of additional levels available, the ExperienceLevels option specifies the number of experience points you need to reach that level.

For example, a ship with 1500 EP will be awarded level two while a ship with 600 will be level zero. You can define up to ten levels.

The ExperienceLevelNames parameter specifies the names of these ranks. A level-zero ship will be called "Recruit", a level-three ship will be "Elite". PHost currently doesn't use this parameter, but client programs can use it to name your units.

The default value of NumExperienceLevels is zero which effectively disables the experience system. To enable it with our default values, just say NumExperienceLevels = 4 in your pconfig.src. If you want more or fewer levels, you probably have to change all of the other parameters, too.

Note that the default limits for the experience levels were 1500,4000,10000,20000 in PHost versions up to 4.0e.

The upper limit for experience points is configured with the ExperienceLimit option, which defaults to 1000000 (one million). Even if your ship has already reached the highest experience level, you can train it further until ExperienceLimit is reached. This can be useful if you intend to use this ship to re-crew or board another ship.

Gaining Experience

EPShipAging   = 15
EPPlanetAging = 25

Every ship or planet receives this amount of experience points each turn, for just being there and doing nothing. With these settings, a ship will reach level 1 after 50 turns for just sitting there - not necessarily an effective tactic.

EPShipMovement100LY = 40
EPShipHyperjump     = 30
EPShipChunnel       = 30

Ships get EPShipMovement100LY experience for moving 100 ly. Here, a ship moving 81 ly will receive 32 points. Gravitonic ships get half the rate, a Buccaneer moving 162 ly will also get only 32 points. Ships only gain experience for moving themselves, ships being towed don't get points.

Ships who initiate a chunnel or hyperjump get points, too.

EPCombatKillScaling   = 800
EPCombatDamageScaling = 200

Combat gets you most experience. When you destroy a ship or planet, you'll be awarded

Rate * (Mass_of_Loser * EPCombatKillScaling) / (Mass_of_Winner * 100)

EPs. When you damage a ship, you get

Rate * (Their_Mass * EPCombatDamageScaling * Damage) / (Your_Mass * 10000)

points. Destroying a unit includes damaging it, hence you get about 1000 EPs for destroying an equally heavy ship with these settings. The mass used here is the same which is also used for PAL computations (see PALIncludesESB).

No points are awarded when you fight an ally.

The Rate is defined with the next two options.

EPCombatBoostLevel = 0
EPCombatBoostRate  = 100

(v4.0f:) With these optional settings, you can scale up (or down) combat experience again. If a ship takes much damage in a fight, it was probably a very risky fight which should be worth more than average. Conversely, if the ship didn't even get a scratch, it was an easy fight, so it probably should not get any experience.

EPCombatBoostLevel defines a damage level. EPCombatBoostRate defines the corresponding scale level in percent. For example, with EPCombatBoostLevel = 50 and EPCombatBoostRate = 200, ships which got 50% damage or more in one fight get twice the normal experience. You can specify up to 10 levels; with EPCombatBoostLevel = 50,90 and EPCombatBoostRate = 200,400, ships which got 90% damage get a further bonus.

You can also specify negative values for the levels to scale shields. "-100" means no shield loss, "-30" means 70% shield loss in one fight. For a final example, EPCombatBoostLevel = -100,-80,50,90 and EPCombatBoostRate = 0,100,200,400 gives no experience at all to ships which lost less than 20% shields, normal experience for everyone who lost more and got up to 49% damage, twice normal experience for ships with 50% or more damage, and 4x normal experience for ships who got 90% damage or more.

EPShipAlchemy100KT = 5

Alchemy ships get this amount of experience for producing 100 kt output.

EPShipBuild10Fighters = 0
EPShipBuild1000TorpUnits = 0

Ships can receive experience for building ammunition. The first option defines experience received for building 10 fighters, whereas the second one defines experience received for building 1000 torpedo units. Similar to mine units, each torpedo is worth its type-squared in torpedo units.

Experience = Trunc(Fighters_built * EPShipBuild10Fighters / 10)
Experience = Trunc(Torps_built * Torp_type^2 * EPShipBuild1000TorpUnits / 1000)

That is, making a Mark 6 Photon torpedo (type 8) will give 64x as many experience as making a Mark 1 Photon (type 1), and building a Mark 8 Photon (type 10) will give 100x as many experience as a Mark 1. Ten Mark 8's will give the full value configured in EPShipBuild1000TorpUnits, likewise ten fighters will give the full value EPShipBuild10Fighters.

This experience is given for torpedoes built on a starship using the Gather-build Torpedoes or Build Torpedoes mission or the mkt friendly code, and for fighters built using Gather-build Fighters or Build Fighters mission, the Rebel racial ability, or the lfm friendly code.

EPShipIonStorm100MEV = 80

Ships get this experience for surviving a dangerous ion storm. Experience is proportional to the ion storm's voltage.

Experience = EPShipIonStorm100MEV * (Storm_Voltage - 100) / 100

Points are given for storms of 150 MeV and more only (i.e. dangerous storms).

EPPlanetGovernment = 0

(v4.0k:) This is a "dynamic" version of EPPlanetAging. Planets get this experience each turn they have an effective happiness at 100%. If happiness is lower, the amount is reduced accordingly, e.g. with EPPlanetGovernment = 10, a planet with happiness at 70% would receive 7 points.

The effective happiness used in this computation is the minimum of colonist experience and native experience. That is, even if the planet colonists are healthy, you'll not get points if your natives are not. Planets with negative effective happiness do not receive points, but they do not get penalty either.

==> Note that all values are truncated (fractional digits removed) after computation. Alchemizing 115 kt gets you the same amount as making 100 kt due to this rounding. The same goes for experience through movement and combat.

Crew Changes

EPRecrewScaling = 30

When crew members are killed in combat, the average experience of the remaining crew doesn't change.

When new crew members are added to a ship, the experience of the new and old crewmen is mixed proportionally.

Crew_experience =
      ((Old_crew * Old_experience) + (New_crew * New_experience))
       / (Old_crew + New_crew)

In particular, when you capture a ship by killing off its crew, it will start out with the experience level of the capturing ship (Old_crew will be zero in that case).

Since experience isn't only a matter of brains, but also a matter of technology - fine-tuned engines, weapons, computer archives -, you also keep parts of the experience which is in the ship's technology:

Tech_experience = Old_experience

These two components form the new experience:

New_experience =
       (Tech_experience * EPRecrewScaling
        + Crew_experience * (100 - EPRecrewScaling))
       / 100

That is, at the default configuration, technology affects experience to 30%, and crew affects it to 70%.

Example: assume you capture a ship, and give it 10 of your crewmen. Your ship has 3000 EP, the captured one had 1000. Since the old crew got completely killed, the new Crew_experience is exactly 3000 (=(0*1000 + 10*3000) / 10); the Tech_experience is 1000 (same as the old ship's experience). This yields a new experience of 2400 (=30%*1000 + 70%*3000) for the captured ship. The captor's experience will not change.

Assume now you add 50 more crewmen at a starbase. Crewmen from starbases start with 0 EP. The new Crew_experience now is 400 (=(10*2400 + 50*0) / 60), the Tech_experience is 2400, so the new ship experience is 1000. The base's experience will not change.

Here is a list of all actions which add crew to a ship:

  • Fix ship or Super Refit at a starbase: these will add crew members which have no experience. Likewise, newly-built ships have no experience no matter what the experience level of the starbase is.
  • Capturing a ship in combat: this adds crewmen from the capturing ship, which have the experience of that capturer. Note that all the original crew has been killed, and thus doesn't contribute Crew_experience here.
  • Boarding a ship: this adds crewmen from the boarding ship. Depending on the boarded ship's race, part of its crew will run traitor which affects the computation: a boarded Privateer ship will remain unchanged, because all the crew runs traitor.
  • The Exchange Crew mission of Academy ships: this adds crewmen from the Academy ship, usually with higher experience. Likewise, the Academy ship receives crew from the ship it is re-supplying.

==> Note that, unlike all other experience changes, these changes apply immediately. While experience gain from movement, training, etc. will not have effect until at the end of the turn, changes through crew interchange will immediately take effect. These changes also exempt the rule that a ship can only advance one level per turn. If a Level-4 battlestar captures a small freighter, that freighter will most likely start with Level-3 crew.

Experience Benefits in Combat

Experienced ships have bonuses. Figuring out these bonuses is a tedious and time-consuming task, and it's not easy to understand.

In a nutshell, it amounts to the following rule: Unexperienced ships behave as they ever did. Experienced ships are better.

Level Battle Power
1 110%
2 120%
3 135%
4 150%

That's the intention of our default configuration, values will differ if you use a different set of experience levels, or a different configuration.

EModBayRechargeRate            = 1,2,3,4
EModBayRechargeBonus           = 0,0,0,0
EModBeamRechargeRate           = 0,0,0,0
EModBeamRechargeBonus          = 0,0,0,0
EModTubeRechargeRate           = 1,2,3,8
EModBeamHitFighterCharge       = 0,0,0,0
EModTorpHitOdds                = 9,18,27,35
EModBeamHitOdds                = 0,0,0,0
EModBeamHitBonus               = 0,0,0,0
EModStrikesPerFighter          = 1,2,3,4
EModFighterBeamExplosive       = 0,0,0,0
EModFighterBeamKill            = 0,0,0,0
EModFighterMovementSpeed       = 0,0,0,0
EModMaxFightersLaunched        = 0,0,0,0
EModTorpHitBonus               = 0,0,0,0
EModTubeRechargeBonus          = 0,0,0,0
EModExtraFighterBays           = 0,0,0,0
EModEngineShieldBonusRate      = 0,0,0,0
EModPlanetaryTorpsPerTube      = 0,0,0,0

Don't run away screaming from this huge amount of numbers (but remember I told you it wasn't easy :-). These are modificators to the combat configuration options. Not all options are covered, but those should suffice for everyone.

These values determine the offensive bonuses of a ship or planet. They are simply added to their normal combat configuration counterpart: a level-one ship adds column one, and so on. For example, a level-two ship has its torp hit odds improved by 18 percent points, and two extra strikes per fighter, because that's what column two of EModTorpHitOdds and EModStrikesPerFighter says.

For all options, positive values mean better. The EModBeamHitFighterCharge option is an exception; to make the ship fire earlier, the bonus must be negative.

EModShieldDamageScaling        = 0,0,0,0
EModShieldKillScaling          = 0,0,0,0
EModHullDamageScaling          = 0,0,0,0
EModCrewKillScaling            = -5,-10,-15,-20

These options are handled exactly like the above set, but these are defensive bonuses. A negative value means that the ship gets less damage when hit by enemy fire.

(v4.0j:) Ships can also receive combat experience bonuses by means of a Commander ship.

EModPlanetaryTorpsPerTube      = 0,0,0,0

This option applies to planets only and gives them additional torpedoes in combat. It is only effective if PlanetsHaveTubes is enabled.

Movement Bonus

EModMineHitOddsBonus = 5,10,15,20

This parameter reduces the risk of hitting a mine. This bonus is not simply added to the normal mine hit odds (like the combat bonuses), it is relative to the normal mine hit odds. For example, the normal mine hit odds are one percent. A level 1 ship has a hit risk of only 0.95% (five percent less than 1%), level 2 has 0.9%, and level 4 has a risk of only 0.8% per light year.

To make a ship immune to minefields, you'd give it the value 100 here.

Experience and Hull Functions

(v4.0i:) Hull functions can be restricted to certain experience levels.

Ships which have the appropriate experience level will behave as if they have the designated device. If they lose experience, they will also lose the ability to use the device. It is also possible to define devices which stop working when a particular level is reached.

==> If a level-restricted Cloaking device is assigned to a ship, and you set mission Cloak on that ship without having the appropriate level, your turn file will receive a yellow status. This is not normally a problem; your level is reported within util.dat, the level reported there will define the devices you have. However, at the time of this writing, no client can handle level-restricted devices and tell you in advance whether your ship can cloak.

Experience and Ion Storms

(v4.0j:) Experience helps ships master dangerous ion storms.

If a ship is inside a dangerous storm, it can receive damage. If the crew is experienced, that damage is reduced.

Damage_received = Normal_damage * (1 - (Ship_level / NumExperienceLevels))

In a four-level setup, ships at level one receive only 75% of the normal damage, ships at level two receive only 50%, and ships that have reached the top-most level do not receive any damage at all.

See Ion Storm Effects formulas for details.

Ships receive experience for surviving an ion storm, see above under Gaining Experience.

Colonizing

When a ship colonizes a planet using the Colonize mission, the planet will start with the former experience level of that ship.

When you capture a planet in combat, that planet's experience will be reduced according to the effective colonist survival rate, see Planet Combat Effects formulas. With the default configuration, the planet will start out with no experience.

Planets you colonize normally, by dropping clans, ground combat or Imperial Assault, start with zero experience.

Training

EPTrainingScale = 70
EPAcademyScale  = 400

Ship crews can gain experience by learning, training, practicing. Therefore, set your ship's mission to "Training".

A ship which is training can't do anything else:

  • It will have its warp factor reset to zero
  • The primary enemy will be cleared
  • The ship's shields in combat will be zero
  • The ship can not initiate a chunnel
  • The ship can not travel through a wormhole using WRT (note that if WrmVoluntaryTravel is off, ships might be pulled into the wormhole anyway)

Training costs supplies. The ship must be orbiting a friendly planet which provides the supplies. The mission parameter is the number of supplies to consume; you can convert up to 10000 supplies per turn into experience. Supplies aboard the ship are not touched (they can therefore be used for supply-repair or alchemy).

Supplies are converted into experience as follows:

Experience_added = Trunc(Rate * Points / (Sqrt(Hull_Crew) + 1))
    ...where
       Points = Supplies                    if Supplies <= 25
       Points = 25 + Sqrt(8*(Supplies-25))  otherwise

       Rate = Trunc(EPTrainingScale * Academy_bonus / 100)

       Academy_bonus = 100                  for normal ships
       Academy_bonus = EPAcademyScale       for Academy ships

Simplified, this yields the following rules:

  • Up to 25 supplies, we have a linear progression; above that, the ratio drops. To get the equivalent experience for training two turns for 25 supplies each, you'd have to spend about 100 supplies. To double that, you'd have to spend 700 supplies.
  • Small crews can be trained faster than big ones.

The formula uses Hull_Crew, not Ship_crew. The experience you receive is independant from the amount of crew currently on the ship, it only depends on the nominal crew strength for a ship of its type. However, because adding new crew to a ship will reduce its experience, training a fully-crewed ship makes more sense than training one with just an emergency crew.

Here is a small table for the "Points" formula:

Supplies "Points" Ratio
10 10 1.00
25 (linear up to here) 25 1.00
50 39 0.78
100 49 0.49
500 86 0.17
1000 113 0.11
5000 224 0.04
10000 (maximum) 307 0.03

Note that the formula was changed during the PHost 4.0 line. In PHost up to version 4.0g, the formula was:

Experience_added = EPTrainingScale * Points / 100

where Points is the same term as above. In PHost versions up to 4.0e, EPTrainingScale was hardwired to 100.

Experience Reports

PHost will send you a report each turn, containing the experience levels of your ships and planets. You'll also be told the experience levels of the ships of your ship-level allies, and of your planet-level allies' planets.

You will not know the experience level of an enemy ship until you encounter it in combat.

Experience reports look like this:

(-h000)<<< Ship Experience Report >>>

Id        Ship Name        Level
---  --------------------  -----
  1  Endeavour               1
 12  Voyager                 2 (+)
139  Immatrikulationsamt     1 (!)
490  GORBIE CLASS CARRIER    -

The Level column contains the level of the ship; it is - (dash) if the ship is inexperienced. For example, #490 is a new ship which started out with 0 experience points (but has already received points for aging by the end of the turn).

The (+) sign tells you that the ship went up one level this turn.

(!) means the ship got re-crewed and may thus have changed its level. The ship might have gone up or down, or not changed its level at all. All this tells you is that the experience points have changed beyond regular experience gain.

With ExactExperienceReports enabled, the reports will include the exact experience values.

(-h000)<<< Ship Experience Report >>>

Id        Ship Name        Level
---  --------------------  -----
  1  Endeavour               1
       2274 points
 12  Voyager                 2 (+)
       3520 points
139  Immatrikulationsamt     1 (!)
       1701 points
490  GORBIE CLASS CARRIER    -
         25 points

Back to top


Last updated 31 May 2015.


Mail support@phost.de for support, ideas, bug reports, questions. Contact Details