Fandom

Freeciv

Traits

704pages on
this wiki
Add New Page
Talk0 Share

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.

AI traitsEdit

AI personality traits are a new feature in Freeciv 2.5. In default rulesets all the nations are equal in terms of trait values, but custom ruleset author can give each nation distinct trait values to affect how they behave.

Definitions in freeciv 2.5 Edit

Default trait values applicable for all nations are defined in nations.ruleset section default_traits.

[default_traits]
expansionist = 50
trader       = 50
aggressive   = 50

Nation specific section can override these defaults by introducing trait_<trait> values.

[nation_abkhaz]
...
trait_expansionist = 200
trait_trader       = 10
trait_aggressive   = 60

Definitions in freeciv 2.6 and later Edit

In 2.6 traits in rulesets are defined as ranges from which actual trait value is then randomly selected. Where 2.5 had single value, 2.6 has three values with suffices "_min", "_max", and (optionally) "_default".

Players can choose whether to have AI traits randomly chosen between '_min' and '_max', or fixed value '_default', using the 'traitdistribution' server setting (which defaults to 'FIXED'). (Ruleset authors can override or force the default in the usual way.)

By setting both "_min" and "_max" values to same value (having range of just one possible value) you can still force specific value to be used.

"_default" is optional; if not specified, the midpoint of "_min" and "_max" will be used.

Default trait values applicable for all nations are defined in nations.ruleset section default_traits.

[default_traits]
expansionist_min     = 50
expansionist_max     = 50
expansionist_default = 50
trader_min           = 50
trader_max           = 50
trader_default       = 50
aggressive_min       = 50
aggressive_max       = 50
aggressive_default   = 50

Nation specific section can override these defaults by introducing trait_<trait> values.

[nation_abkhaz]
...
trait_expansionist_min = 170
trait_expansionist_max = 230
; trait_expansionist_default will default to midpoint, (170+230)/2 = 200
trait_trader_min       = 10
trait_trader_max       = 10
trait_aggressive_min   = 60
trait_aggressive_max   = 60

Trait typesEdit

ExpansionistEdit

Value of trait expansionist defines how much AI wants to settle new territory.

TraderEdit

Value of trait trader defines how much AI wants to establish trade routes.

AggressiveEdit

Value of trait aggressive defines how easily AI declares war.

Adjusting traits during gameEdit

It's possible to adjust trait values from lua scripts. edit.trait_mod() function increases or decreases given trait value for given player. See Lua reference manual.

Also on Fandom

Random Wiki