Skip to content

Commit

Permalink
changed colony buildings to use ShortestPath rather than JumpsBetween…
Browse files Browse the repository at this point in the history
…, using a ship speed of 80 as reference, and with a slight exponential reduction meant to roughly account for very large empires being likely to have faster ships
  • Loading branch information
Dilvish-fo committed Apr 24, 2015
1 parent 9b812e9 commit 521116d
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 44 deletions.
5 changes: 3 additions & 2 deletions default/col_bld_gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@
Happiness low = 5
]''')

t_buildtime = string.Template('''max(5, 1 +
min value = JumpsBetween object = Target.SystemID object = LocalCandidate.SystemID
t_buildtime = string.Template('''max(5.0, 1.0 +
(min value = ShortestPath object = Target.SystemID object = LocalCandidate.SystemID
condition = And [
Planet
OwnedBy empire = Source.Owner
Expand All @@ -119,6 +119,7 @@
Happiness low = 5
ResourceSupplyConnected empire = Source.Owner condition = Target
]
)^0.985 / 80
)''')


Expand Down

1 comment on commit 521116d

@Morlic-fo
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How are non-integers handled by FOCS in the context of build time? Floor/Round/Ceil?

It seems to me your exponent does not exactly account for improvement in ship speed. Taking into account normalized distance x = ShortestPath/80:

The effect of the exponent could be described by ceil(x)-ceil(x^0.985) (assuming a ceiling behaviour). The result can decently be approximated by ceil(x) - floor(x/15) for x < 60. So basically we reduce build time by one turn each 15 turns build time or an average improvement of 6%. Unless you aim for larger scales I do not agree this describes ingame behaviour well.

Considering organic hulls already has a speed of 90 (100 with first engine), this would be an improvement of 12.5% or 25% respectively. Static Multicellular defaults to 100 with option to improve to 120 easily. So up to 50% speed up not to late into the game.

I instead suggest to modify the formula to
ShortestParth/(80+someTurnDependentNumber), the latter one around the lines of min(cap, 70 + currentTurn/3) and add a cap of 120 or whatever seems reasonable.

Please sign in to comment.