Port

Buildings
A Port when it's built, from upclose.

This building spawns trade ships and allows you to build Warships.

The first port built costs 125,000, then the cost doubles for each one you buy until the price reaches 1,000,000.

Trade ships sent out make more gold the farther they have traveled from their ports.

Trade Ship Spawning

Ports check every 10 ticks if they should spawn a trade ship

Spawn chance is calculated based on number of owned ports, number of owned trade ships, and number of all trade ships

spawnChance = 1 25 baseChance portMultiplier {\displaystyle {\displaystyle {\text{spawnChance}}={\frac {1}{\left\lfloor {\frac {25}{\sqrt {{\text{baseChance}}*{\text{portMultiplier}}}}}\right\rfloor }}}}

Where $\text{baseChance}$ is equal to 1 when you own less than 3 trade ships (exclusive), otherwise it is:

baseChance = 1 1 1 + e ( ln ( 2 ) 10 ( numOfShips 55 ) ) {\displaystyle {\displaystyle {\text{baseChance}}=1-{\frac {1}{1+e^{\left(-{\frac {\ln(2)}{10}}*({\text{numOfShips}}-55)\right)}}}}}

A graph
The relationship between the total number of ships and baseChance

In short, this means that the more ships there are on the map, the less likely more ships are to spawn, with a small number having only a very small effect. At 25 ships, the chance is 88%, at 55 it's 50%, at 100, it's just 4%.

portMultiplier = 1 1 + portsOwned 10 {\displaystyle {\displaystyle {\text{portMultiplier}}={\frac {1}{1+{\frac {\text{portsOwned}}{10}}}}}}

More ports = lower spawn rate **per port**. Gradual decay prevents scenario where more ports => fewer ships **overall**.

There is no spawn cap.

Trade Route Selection

Ports will only trade with other players (not their own ports). Trade partners are prioritized in this order:

  • Closer ports get double chance of being selected (proximity bonus)
  • Allied ports get double chance of being selected

Trade ships are free to build and don't count against unit limits.

Gold Generation

Gold earned is based on Manhattan distance (which means the sum of the absolute differences in x and y coordinates) between ports and the number of ports you own:

gold = ( 100000 + 100 distance ) bonus {\displaystyle {\displaystyle {\text{gold}}=(100000+100*{\text{distance}})*{\text{bonus}}}}

Bonus is a value which is dependent on the number of ports you own. The more ports you own, the smaller the increase, the medium point is at 4 ports with a bonus of approx. 1.9. The bonus is an example of hyperbolic decay.

bonus = 1 + 2 portsOwned 1 portsOwned + 4 {\displaystyle {\displaystyle {\text{bonus}}=1+2*{\frac {{\text{portsOwned}}-1}{{\text{portsOwned}}+4}}}}

Both the source and destination port owners receive the full amount.

Longer trade routes are more profitable (linear scaling with distance).

See also

Content from the OpenFront community wiki, available under CC BY-SA 4.0.