Civ Traits for every 'Core' Nation

Contribute, display and discuss rulesets and modpacks for use in Freeciv here.
User avatar
vodot
Veteran
Posts: 81
Joined: Thu May 17, 2018 4:54 pm

Civ Traits for every 'Core' Nation

Post by vodot »

Starting this topic for discussion on a mod that would add Civ Traits with bonuses to the entire 'Core' set of nations. See redmine issue# 765533 for what is almost a prerequisite feature request prior to wider implementation. I've done this in 2.6 already by manually cloning the nation files and tweaking every single one... but a ruleset file would be ever so much easier.

Status:
- I have implemented this in 2.6 (using init_techs that are self-requiring root_reqs) as part of a greater expansion mod (Resplendent) that also adds unique buildings and unique units for each trait, and also expands the tech tree and doubles the unit count. I am currently in the progress of splitting Civ Traits off from that mod to get something (much) more deliverable. The version that runs as part of Resplendent has 13 traits and a civilization for every combination (78!) but unintentionally missed a handful of core nations in the process. For this standalone mod I am going to reduce the number of traits to 11 (for 55 combinations), meaning I'll still have to leave out 5 trait combinations as I fill out the roster of 50 Core nations.

todo for "Civ Traits" standalone mod:
  • Develop new Civ Trait list based off Core nations and 11 Traits - DONE
  • Start new Mod (based on what ruleset)
  • update effects.ruleset (eliminate removed traits)
  • update nationslist.ruleset (eliminate non-core nations)
  • update nations.ruleset (eliminate non-core nations)
  • update changed nationX.rulesets (revise trait combinations as necessary)
Civ Trait list update:
Potential new (reduced) Trait List for splitting off the Civ Trait mod from Resplendent:
- Unique units and buildings removed
- "Philosophical" and "Protective" traits removed
- "Scientific" trait renamed to "Inquisitive" to capture some of the joy of the old 'philosophical'

Agricultural
- +1 food from all Irrigated tiles
- +1 food and +1 luxury from all farmland tiles
- Agricultural Civs:
  • babylonian: Agricultural, Mercantile
  • cherokee: Agricultural, Naturalistic
  • chinese: Agricultural, Spiritual
  • indian: Agricultural, Industrious
  • persian: Agricultural, Imperialistic
  • polish: Agricultural, Diplomatic
  • sumerian: Agricultural, Inquisitive
  • thai: Agricultural, Maritime
  • tupi: Agricultural, Nomadic
Diplomatic
- +10% chance of espionage success
- Free AI Love each turn
- +1 MP all diplomat-type units
- All Diplomatic units built with +2 EXP
- Diplomatic Nations:
  • american: Diplomatic, Imperialistic
  • austrian: Diplomatic, Industrious
  • ethiopian: Diplomatic, Nomadic
  • frisian: Diplomatic, Spiritual
  • italian: Diplomatic, Mercantile
  • korean: Diplomatic, Inquisitive
  • polish: Agricultural, Diplomatic
  • portuguese: Diplomatic, Maritime
Imperialistic
- Halved waste and corruption in all cities
Imperialistic Nations:
  • american: Diplomatic, Imperialistic
  • arab: Imperialistic, Nomadic
  • english: Imperialistic, Maritime
  • greek : Imperialistic, Inquisitive
  • iroquoi: Imperialistic, Naturalistic
  • persian: Agricultural, Imperialistic
  • roman: Imperialistic, Militaristic
  • russian: Imperialistic, Industrious
  • sioux: Imperialistic, Spiritual
  • spanish: Imperialistic, Mercantile
Industrious
- +20% Production in all cities
- +1 Luxury from Iron, Coal, and Gold
- All worker units built with +1 EXP
Industrious Nations:
  • austrian: Diplomatic, Industrious
  • carthaginian: Industrious, Maritime
  • celtic: Industrious, Naturalistic
  • egyptian: Industrious, Spiritual
  • french: Industrious, Mercantile
  • german: Industrious, Inquisitive
  • indian: Agricultural, Industrious
  • khmer: Industrious, Militaristic
  • russian: Imperialistic, Industrious
  • turk: Industrious, Nomadic
Inquisitive
- +25% Science in all cities
Inquisitive Nations:
  • brazilian: Inquisitive, Naturalistic
  • danish: Inquisitive, Mercantile
  • dutch: Inquisitive, Maritime
  • german: Industrious, Inquisitive
  • greek : Imperialistic, Inquisitive
  • japanese: Inquisitive, Militaristic
  • korean: Diplomatic, Inquisitive
  • mayan: Inquisitive, Spiritual
  • sumerian: Agricultural, Inquisitive
  • swedish: Inquisitive, Nomadic
Maritime
- +1 Food all Ocean tiles
- All Naval units built with +1 EXP
- +1 MP all ships
Maritime Nations:
  • byzantium: Maritime, Spiritual
  • carthaginian: Industrious, Maritime
  • dutch: Inquisitive, Maritime
  • english: Imperialistic, Maritime
  • polynesian: Maritime, Nomadic
  • portuguese: Diplomatic, Maritime
  • taino: Maritime, Naturalistic
  • thai: Agricultural, Maritime
  • viking: Maritime, Militaristic
Mercantile
- +25% gold and luxuries in all cities
Mercantile Nations
  • babylonian: Agricultural, Mercantile
  • danish: Inquisitive, Mercantile
  • french: Industrious, Mercantile
  • hittite: Mercantile, Militaristic
  • inca: Mercantile, Spiritual
  • italian: Diplomatic, Mercantile
  • mali: Mercantile, Naturalistic
  • spanish: Imperialistic, Mercantile
Militaristic
- Mounted and Siege-type land units gain +1 MP
- Mounted and Siege-type land units built with +2 EXP
Militaristic Nations
  • aztec: Militaristic, Spiritual
  • hittite: Mercantile, Militaristic
  • hunnic: Militaristic, Nomadic
  • japanese: Inquisitive, Militaristic
  • khmer: Industrious, Militaristic
  • mongol: Militaristic, Nomadic
  • roman: Imperialistic, Militaristic
  • viking: Maritime, Militaristic
  • zulu: Militaristic, Naturalistic
Naturalistic
- +25% defense in hills, desert, jungle, and forest
- All terrains cost 1 MP
- +1 food and +1 trade in forests, jungle, swamp, tundra, and hills
Naturalistic Nations
  • apache: Naturalistic, Nomadic
  • brazilian: Inquisitive, Naturalistic
  • celtic: Industrious, Naturalistic
  • cherokee: Agricultural, Naturalistic
  • iroquoi: Imperialistic, Naturalistic
  • mali: Mercantile, Naturalistic
  • songhai: Naturalistic, Spiritual
  • taino: Maritime, Naturalistic
  • zulu: Militaristic, Naturalistic
Nomadic
- Foot units heal an extra +10% HP every turn.
- +1 food, +1 trade, and +1 production for Desert and Arctic tiles
Nomadic Nations
  • apache: Naturalistic, Nomadic
  • arab: Imperialistic, Nomadic
  • ethiopian: Diplomatic, Nomadic
  • hunnic: Militaristic, Nomadic
  • mongol: Militaristic, Nomadic
  • polynesian: Maritime, Nomadic
  • swedish: Inquisitive, Nomadic
  • tupi: Agricultural, Nomadic
  • turk: Industrious, Nomadic
Spiritual
- Halved war weariness
- force_happy=1 in all cities
Spiritual Nations
  • aztec: Militaristic, Spiritual
  • byzantium: Maritime, Spiritual
  • chinese: Agricultural, Spiritual
  • egyptian: Industrious, Spiritual
  • frisian: Diplomatic, Spiritual
  • inca: Mercantile, Spiritual
  • mayan: Inquisitive, Spiritual
  • sioux: Imperialistic, Spiritual
  • songhai: Naturalistic, Spiritual
[/list]

New Trait List:
Traits_CORE.PNG
All 50 Core Civs (sorted alphabetically) with their traits:
  • american: Diplomatic, Imperialistic
  • apache: Naturalistic, Nomadic
  • arab: Imperialistic, Nomadic
  • austrian: Diplomatic, Industrious
  • aztec: Militaristic, Spiritual
  • babylonian: Agricultural, Mercantile
  • brazilian: Inquisitive, Naturalistic
  • byzantium: Maritime, Spiritual
  • carthaginian: Industrious, Maritime
  • celtic: Industrious, Naturalistic
  • cherokee: Agricultural, Naturalistic
  • chinese: Agricultural, Spiritual
  • danish: Inquisitive, Mercantile
  • dutch: Inquisitive, Maritime
  • egyptian: Industrious, Spiritual
  • english: Imperialistic, Maritime
  • ethiopian: Diplomatic, Nomadic
  • french: Industrious, Mercantile
  • frisian: Diplomatic, Spiritual
  • german: Industrious, Inquisitive
  • greek : Imperialistic, Inquisitive
  • hittite: Mercantile, Militaristic
  • hunnic: Militaristic, Nomadic
  • inca: Mercantile, Spiritual
  • indian: Agricultural, Industrious
  • iroquoi: Imperialistic, Naturalistic
  • italian: Diplomatic, Mercantile
  • japanese: Inquisitive, Militaristic
  • khmer: Industrious, Militaristic
  • korean: Diplomatic, Inquisitive
  • mali: Mercantile, Naturalistic
  • mayan: Inquisitive, Spiritual
  • mongol: Militaristic, Nomadic
  • persian: Agricultural, Imperialistic
  • polish: Agricultural, Diplomatic
  • polynesian: Maritime, Nomadic
  • portuguese: Diplomatic, Maritime
  • roman: Imperialistic, Militaristic
  • russian: Imperialistic, Industrious
  • sioux: Imperialistic, Spiritual
  • songhai: Naturalistic, Spiritual
  • spanish: Imperialistic, Mercantile
  • sumerian: Agricultural, Inquisitive
  • swedish: Inquisitive, Nomadic
  • taino: Maritime, Naturalistic
  • thai: Agricultural, Maritime
  • tupi: Agricultural, Nomadic
  • turk: Industrious, Nomadic
  • viking: Maritime, Militaristic
  • zulu: Militaristic, Naturalistic
Old outdated list also attached below.
Attachments
civs5.png
Last edited by vodot on Tue Jul 24, 2018 10:08 pm, edited 36 times in total.
User avatar
vodot
Veteran
Posts: 81
Joined: Thu May 17, 2018 4:54 pm

Re: Civ traits and trait-specific units

Post by vodot »

The flavor text never quite lined up 100% with the actual machinery in effects/units/buildings.ruleset(s), as there were some things I wanted to do but couldn't figure out, and others I was just testing or was tweaking on the fly without doubling back to update the flavor text.

from techs.ruleset:

Code: Select all

[advance_agricultural]
name     = _("Agricultural")
req1     = "None"
req2     = "None"
root_req = "Agricultural"
flags    = ""
graphic     = "a.refrigeration"
graphic_alt = "a.pottery"
helptext      = _("\
Agricultural civilizations easily master field and fen.\
They gain the following bonuses:\
o	+25% food from all tiles\
o	Peons: They may build Peons (Much cheaper workers)\
o	Silos: They may build Silos (Cheaper Granaries)\
")

[advance_aggressive]
name     = _("Aggressive")
req1     = "None"
req2     = "None"
root_req = "Aggressive"
flags    = ""
graphic     = "a.warrior_code"
graphic_alt = "-"
helptext      = _("\
Aggressive civilizations preferentially use force to accomplish\
thier goals. They gain the following bonuses:\
o	+1 exp all land and air units\
o	+1 movement for mounted, tracked, and air units\
o	All land and air units regen 10% HP/turn, even when moving\
")

[advance_diplomatic]
name     = _("Diplomatic")
req1     = "None"
req2     = "None"
root_req = "Diplomatic"
flags    = ""
graphic     = "a.democracy"
graphic_alt = "a.writing"
helptext      = _("\
Diplomatic civilizations are masters of coalitions, espionage\
and politics. They gain the following bonuses:\
o	+2 exp diplomat units\
o	+2 movement diplomat units\
o	Improved relationships with AI civs each turn\
o	Envoys: They may build Envoys (fast, better diplomat)\
")

[advance_expansionistic]
name     = _("Expansionistic")
req1     = "None"
req2     = "None"
root_req = "Expansionistic"
flags    = ""
graphic     = "a.railroad"
graphic_alt = "a.magnetism"
helptext      = _("\
Expansionistic civilizations are great empire builders.\
They gain the following bonuses:\
o	Halved waste/corruption in all cities\
o	Halved unhappiness due to empire size.\
o	Expeditions: They may build Expeditions (Powerful Settlers)\ 
")

[advance_industrious]
name     = _("Industrious")
req1     = "None"
req2     = "None"
root_req = "Industrious"
flags    = ""
graphic     = "a.industialization"
graphic_alt = "a.robotics"
helptext      = _("\
Industrious civilizations are titans of production.\
They recieve the following bonuses:\
o	+15% production in all cities\
o	Forges: They may build Forges (+25% city production)\
o	Great Industrialists: They may build 1 Great Industrialist,\
	which grants the city he occupies an additional +35% production\
")

[advance_protective]
name     = _("Protective")
req1     = "None"
req2     = "None"
root_req = "Protective"
flags    = ""
graphic     = "a.industialization"
graphic_alt = "a.robotics"
helptext      = _("\
Protective civilizations avoid concourse with other peoples.\
They recieve the following bonuses:\
o	+25% defense for all foot soldiers\
o	All civs default to peace on contact\
o	All units have increased +exp chance\
o	Communes: They may build Communes (cheaper early courthouses)\
")

[advance_maritime]
name     = _("Maritime")
req1     = "None"
req2     = "None"
root_req = "Maritime"
flags    = ""
graphic     = "a.seafaring"
graphic_alt = "-"
helptext      = _("\
Maritime civilizations are excellent mariners and ship-builders.\
They gain the following bonuses:\
o	+2 exp all ships\
o	+2 movement for sailing ships; +1 movement for steel ships\
o	All ships cross oceans safely\
o	All ships regen 10% HP/turn while moving\
o	Carracks: They may build Carracks (Cheap early Triremes)\
")

[advance_mercantile]
name     = _("Mercantile")
req1     = "None"
req2     = "None"
root_req = "Mercantile"
flags    = ""
graphic     = "a.currency"
graphic_alt = "a.trade"
helptext      = _("\
Mercantile civilizations master corporations, guilds, and trade.\
They gain the following bonuses:\
o	+15% trade in all cities\
o	Bazaars: They may build Bazaars (+25% trade)\
o	Merchants: They may build Merchants (Fast, cheaper caravans)\	
")

[advance_naturalistic]
name     = _("Naturalistic")
req1     = "None"
req2     = "None"
root_req = "Naturalistic"
flags    = ""
graphic     = "a.theory_of_gravity"
graphic_alt = "a.bronze_working"
helptext      = _("\
Naturalistic civilizations live in harmony with their environments.\
They recieve the following bonuses:\
o	Jungle/swamp/tundra terrain produce +1 food, trade, and production\ 
o	Non-tracked units do not suffer terrain movement penalties\
o	Non-tracked units gain +50% defense from all terrain types that\
	already provide a defense bonus\
")

[advance_nomadic]
name     = _("Nomadic")
req1     = "None"
req2     = "None"
root_req = "Nomadic"
flags    = ""
graphic     = "a.alphabet"
graphic_alt = "a."
helptext      = _("\
Nomadic civilizations roam the land rather than settling permanently.\
They recieve the following bonuses:\
o   Desert terrain produces +1 food, trade, and production
o	+1 movement for all 1-movement units\
o	+2 exp for all worker/settler units\
o	Nomads: They may build Nomads (support-free settler/caravan hybrid)\
")

[advance_philosophical]
name     = _("Philosophical")
req1     = "None"
req2     = "None"
root_req = "Philosophical"
flags    = ""
graphic     = "a.philosophy"
graphic_alt = "a."
helptext      = _("\
Philosophical civilizations are logical inquisitors of the world around\
them.  They recieve the following bonuses:\
o	-1 unhappy and +1 content citizen in each city\
o	Forums: They may build Forums (-1 unhappy and +1 happy, +15%\
	trade,+ 15% science)\
o	Great Philosophers: They may build 1 Great Philosopher that\
	provides an additional +25% science, +10% trade, and +10%\
	production to the city he occupies\
")

[advance_scientific]
name     = _("Scientific")
req1     = "None"
req2     = "None"
root_req = "Scientific"
flags    = ""
graphic     = "a.university"
graphic_alt = "-"
helptext      = _("\
Scientific civilizations are masters of research and progress.\
They gain the following bonuses:\
o	+25% science in all cities\
o	Archives: They may build Archives (+25% science)\
o	Great Scientists: They may build 1 Great Scientist, who\
	provides an additional +35% science to the city he occupies\ 
")

[advance_spiritual]
name     = _("Spiritual")
req1     = "None"
req2     = "None"
root_req = "Spiritual"
flags    = ""
graphic     = "a.mysticism"
graphic_alt = "a.ceremonial_burial"
helptext      = _("\
Spiritual civilizations place emphasis on the supernatural.\
They gain the following bonuses:\
o	-2 unhappy and +2 content citizens in each city\
o	Halved War weariness\
o	No Anarchy when changing Governments\
o	Altars: They may build Altars (-1 unhappy and +1 happy)\
o	Prophets: They may build 1 Prophet that provides an additional\
	(-1 unhappy and +1 happy citizen, and has great vision\
\
NOTE: Spiritual civilizations lose -10% of all scientific output.\
")

;
;     ******* ACTUAL TECHNOLOGIES BELOW *******************

sample national ruleset (roman.ruleset):

Code: Select all

[nation_roman]

name=_("Roman (Agg/Ind)")
plural=_("?plural:Romans")
groups="Ancient", "European"
legend=_("Rome was, in legend, founded by Romulus in 753 BC.  At its\
 height, Rome controlled nearly all of Europe, northern Africa and\
 Mesopotamia.")
leader=
 ; Full name/s in comment
 "Caesar",		; full name "Gaius Julius Caesar"
 "Augustus",		; born "Gaius Octavius Thurinus",
                        ; name as despot "Gaius Julius Caesar Augustus"
 "Vespasianus",		; born "Titus Flavius Vespasianus",
			; name as emperor "Caesar Vespasianus Augustus"
			; known in English as "Vespasian"
 "Nero",		; born "Lucius Domitius Ahenobarbus",
			; name as emperor
			; "Nero Claudius Caesar Augustus Germanicus"
 "Traianus",		; full name "Marcus Ulpius Nerva Traianus",
			; known in English as "Trajan"
 "Marcus Aurelius",	; born "Marcus Annius Catilius Severus",
			; name as emperor "Marcus Aurelius Antonius"
 "Tiberius",		; born "Tiberius Claudius Nero",
			; name as emperor "Tiberius Caesar Augustus"
 "Constantinus I",	; full name 
			; "Gaius Flavius Valerius Aurelius Constantinus"
			; also known in English as "Constantine the Great"
 "Livia",		; also known as "Livia Drusilla"
			; as empress "Julia Augusta" or "Livia Drusa Augusta"
 "Messalina"		; full name "Valeria Messalina"
leader_sex="Male", "Male", "Male", "Male", "Male", "Male", "Male", "Male",
           "Female", "Female"
flag = "rome"
flag_alt = "italy"
city_style = "Classical"

ruler_titles = { "government",      "male_title",      "female_title"
                 "Despotism",       _("Dictator"),     _("Dictatrix")
                 "Monarchy",        _("Imperator"),    _("Imperatrix")
}

init_techs="Aggressive", "Industrious"
init_buildings=""
init_government="Despotism"
init_units=""
civilwar_nations = "italian", "spanish", "french"

cities =
  "Roma", "Capua", "Veii", "Beneventum", "Corfinium", "Ancona",
  "Tarentum", "Brundisium", "Ravenna", "Pisa", "Genova", "Mediolanum",
  "Aquileia", "Florentia", "Bononia", "Verona", "Ostia", "Agrigentum",
  "Syracusae", "Neapolis", "Pompeii", "Salernum", "Tarraco",
  "Carthago", "Barcino", "Bracara", "Carthago Nova", "Baiae",
  "Noviomagus", "Vindobona", "Atuatuca", "Caesarea", "Ierusalem",
  "Trapezus", "Durocortorum", "Lutetia", "Burdigala", "Portus Namnetum",
  "Utica", "Lugdunum", "Londinium", "Aquae Sulis", "Camulodunum", "Dubris",
  "Eburacum", "Coriovallum", "Perusia", "Leptis Magna", "Corduba", "Edessa",
  "Ariminum", "Narbo Martius", "Pergamum", "Vienna", "Hispalis",
  "Salonae", "Cyrenae", "Dyrrachium", "Luni", "Noreia", "Ephesus",
  "Panoramus", "Ancyra", "Caralis", "Patavium", "Petra", "Tolosa",
  "Pisae", "Palmyra", "Tyrus", "Cortona", "Arenate", "Brigantium",
  "Lix", "Sala", "Berytus", "Naissus", "Nicomedia", "Berenice",
  "Sabrata", "Attalea", "Sinope", "Hippo Regius", "Gesoriacum",
  "Velia", "Segesta", "Gaza", "Aleria", "Colonia Agrippina",
  "Agentoracum", "Moguntiacum", "Arretium", "Thapsus", "Altinum", "Tarsus"
Here's the business bit of my old effects.ruleset:

Code: Select all

;   CIV TRAIT EFFECTS:
;
;
;
;
;
;
;  AGGRESSIVE *****************
;
;
;
;
;
;
;
;
;

;Aggression
[effect_trait.aggressive1]
name    = "Veteran_Build"
value   = 1
reqs	=
    { "type",       "name",      "range"
      "Tech", "Aggressive", "Player"
    }

; Blitz(Land)
[effect_trait.aggressive2]
name	= "Move_Bonus"
value	= 1
reqs	=
    { "type", "name", "range"
      "Tech", "Aggressive", "Player"
      "UnitClass", "Land", "Local"
    }
nreqs =
    { "type", "name", "range"
      "UnitFlag", "Foot", "Local"
    }

; Blitz(Air)
[effect_trait.aggressive3]
name	= "Move_Bonus"
value	= 1
reqs	=
    { "type", "name", "range"
      "Tech", "Aggressive", "Player"
      "UnitClass", "Air", "Local"
    }

; Blitz(Helicopters)
[effect_trait.aggressive4]
name	= "Move_Bonus"
value	= 1
reqs	=
    { "type", "name", "range"
      "Tech", "Aggressive", "Player"
      "UnitClass", "Helicopter", "Local"
    }

; Blitz(Missiles)
[effect_trait.aggressive5]
name	= "Move_Bonus"
value	= 1
reqs	=
    { "type", "name", "range"
      "Tech", "Aggressive", "Player"
      "UnitClass", "Missile", "Local"
    }

; Grit (Land)
[effect_trait.aggressive6]
name	= "HP_Regen"
value	= 15
reqs	=
    { "type", "name", "range"
      "Tech", "Aggressive", "Player"
      "UnitClass", "Land", "Local"
    }

; Grit (Air)
[effect_trait.aggressive7]
name	= "HP_Regen"
value	= 15
reqs	=
    { "type", "name", "range"
      "Tech", "Aggressive", "Player"
      "UnitClass", "Land", "Local"
    }

; Grit (Helicopters)
[effect_trait.aggressive8]
name	= "HP_Regen"
value	= 15
reqs	=
    { "type", "name", "range"
      "Tech", "Aggressive", "Player"
      "UnitClass", "Helicopter", "Local"
    }

; Grit (Missiles)
[effect_trait.aggressive9]
name	= "HP_Regen"
value	= 15
reqs	=
    { "type", "name", "range"
      "Tech", "Aggressive", "Player"
      "UnitClass", "Missile", "Local"
    }

;
;
;
;
;
;
;
; AGRICULTURAL
;
;
;
;
;
;

[effect_trait.agricultural]
name	= "Output_Bonus"
value	= 25
reqs	=
    { "type", "name", "range"
      "Tech", "Agricultural", "Player"
      "OutputType", "Food", "Local"
    }

; DIPLOMATIC

;Scheming
[effect_trait.diplomatic1]
name	= "Gain_AI_Love"
value	= 10
reqs	=
    { "type", "name", "range"
      "Tech", "Diplomatic", "Player"
    }

; Written Word
[effect_trait.diplomatic2]
name	= "Move_Bonus"
value	= 2
reqs	=
    { "type", "name", "range"
      "Tech", "Diplomatic", "Player"
      "UnitFlag", "Diplomat", "Local"
    }

; Crafty
[effect_trait.diplomatic3]
name    = "Veteran_Build"
value   = 1
reqs	=
    { "type",       "name",      "range"
      "Tech", "Diplomatic", "Player"
      "UnitFlag", "Diplomat", "Local"
    }
;
;
;
;
;
;
;
; EXPANSIONISTIC
;
;
;
;
;
;

; Organized (Corruption)
[effect_trait.expansionist1]
name	= "Output_Waste_Pct"
value	= 50
reqs	=
    { "type", "name", "range"
      "Tech", "Expansionistic", "Player"
      "OutputType", "Trade", "Local"
    }
nreqs	=
    { "type", "name", "range"
      "Building", "Palace", "City"
    }

; Organized (Waste)
[effect_trait.expansionist2]
name	= "Output_Waste_Pct"
value	= 50
reqs	=
    { "type", "name", "range"
      "Tech", "Expansionistic", "Player"
      "OutputType", "Shield", "Local"
    }
nreqs	=
    { "type", "name", "range"
      "Building", "Palace", "City"
    }

; Suppression (Base)
[effect_trait.expansionist3]
name    = "Empire_Size_Base"
value   = 18
reqs	=
    { "type",       "name",      "range"
      "Gov", "Anarchy",   "Player"
      "Tech", "Expansionistic", "Player"
    }

; Suppression (Base)
[effect_trait.expansionist4]
name    = "Empire_Size_Base"
value   = 20
reqs	=
    { "type",       "name",      "range"
      "Gov", "Despotism", "Player"
      "Tech", "Expansionistic", "Player"
    }

; Suppression (Base)
[effect_trait.expansionist5]
name    = "Empire_Size_Base"
value   = 22
reqs	=
    { "type",       "name",      "range"
      "Gov", "Monarchy",  "Player"
      "Tech", "Expansionistic", "Player"
    }

; Suppression (Base)
[effect_trait.expansionist6]
name    = "Empire_Size_Base"
value   = 24
reqs	=
    { "type",       "name",      "range"
      "Gov", "Communism", "Player"
      "Tech", "Expansionistic", "Player"
    }

; Suppression (Base)
[effect_trait.expansionist7]
name    = "Empire_Size_Base"
value   = 26
reqs	=
    { "type",       "name",      "range"
      "Gov", "Republic",  "Player"
      "Tech", "Expansionistic", "Player"
    }

; Suppression (Step)
[effect_trait.expasionist8]
name    = "Empire_Size_Step"
value   = 12
reqs	=
    { "type",       "name",      "range"
      "Gov", "Anarchy", "Player"
      "Tech", "Expansionistic", "Player"
    }

; Suppression (Step)
[effect_trait.expasionist9]
name    = "Empire_Size_Step"
value   = 20
reqs	=
    { "type",       "name",      "range"
      "Gov", "Despotism", "Player"
      "Tech", "Expansionistic", "Player"
    }

; Suppression (Step)
[effect_trait.expasionist10]
name    = "Empire_Size_Step"
value   = 24
reqs	=
    { "type",       "name",      "range"
      "Gov", "Monarchy", "Player"
      "Tech", "Expansionistic", "Player"
    }

; Suppression (Step)
[effect_trait.expasionist11]
name    = "Empire_Size_Step"
value   = 28
reqs	=
    { "type",       "name",      "range"
      "Gov", "Republic",  "Player"
      "Tech", "Expansionistic", "Player"
    }

; Suppression (Step)
[effect_trait.expasionist12]
name    = "Empire_Size_Step"
value   = 32
reqs	=
    { "type",       "name",      "range"
      "Gov", "Democracy", "Player"
      "Tech", "Expansionistic", "Player"
    }

; Suppression (Base)
[effect_trait.expansionist13]
name    = "Empire_Size_Base"
value   = 28
reqs	=
    { "type",       "name",      "range"
      "Gov", "Democracy",  "Player"
      "Tech", "Expansionistic", "Player"
    }

; INDUSTRIOUS ++++++++++++++++++

; Industrious
[effect_trait.industrious1]
name	= "Output_Bonus"
value	= 25
reqs	=
    { "type", "name", "range"
      "Tech", "Industrious", "Player"
      "OutputType", "Shield", "Local"
    }
;
;
;
;
;
;
;
; PROTECTIVE +++++++++++++++++++++
;
;
;
;
;
; Isolated (Land)
[effect_trait.protective1]
name	= "Defend_Bonus"
value	= 25
reqs	=
    { "type", "name", "range"
      "Tech", "Protective", "Player"
      "UnitFlag", "Foot", "Local"
    }

; Isolated (Air)
[effect_trait.protective2]
name	= "Defend_Bonus"
value	= 25
reqs	=
    { "type", "name", "range"
      "Tech", "Protective", "Player"
      "UnitClass", "Air", "Local"
    }

; Isolated (Helicopter)
[effect_trait.protective3]
name	= "Defend_Bonus"
value	= 25
reqs	=
    { "type", "name", "range"
      "Tech", "Protective", "Player"
      "UnitClass", "Helicopter", "Local"
    }

; Focused
[effect_trait.protective4]
name	= "Veteran_Combat"
value	= 25
reqs	=
    { "type", "name", "range"
      "Tech", "Protective", "Player"
    }

; Devoted (Incite)
[effect_trait.protective5]
name	= "Incite_Cost_Pct"
value	= 200
reqs	=
    { "type", "name", "range"
      "Tech", "Protective", "Player"
    }

; Devoted (Un-Bribeable)
[effect_trait.protective6]
name    = "Unbribable_Units"
value   = 1
reqs	=
    { "type",       "name",      "range"
      "Tech", "Protective", "Player"
    }
;
;
;
;
;
;
;
;
;  MARITIME +++++++++++++++++++++
;
;
;
;
;
;
;
;
; Mariners
[effect_trait.maritime2]
name	= "Veteran_Build"
value	= 1
reqs	=
    { "type", "name", "range"
      "Tech", "Maritime", "Player"
      "UnitClass", "Sea", "Local"
    }

; Mariners (Triremes)
[effect_trait.maritime3]
name	= "Veteran_Build"
value	= 1
reqs	=
    { "type", "name", "range"
      "Tech", "Maritime", "Player"
      "UnitClass", "Trireme", "Local"
    }

; Technique (Steel)
[effect_trait.maritime4]
name	= "Move_Bonus"
value	= 1
reqs	=
    { "type", "name", "range"
      "Tech", "Maritime", "Player"
      "UnitClass", "Sea", "Local"
    }
nreqs	=
    { "type", "name", "range"
      "UnitFlag", "Sail", "Local"
    }

; Technique (Sailing)
[effect_trait.maritime14]
name	= "Move_Bonus"
value	= 1
reqs	=
    { "type", "name", "range"
      "Tech", "Maritime", "Player"
      "UnitFlag", "Sail", "Local"
    }

; Sea-Repair (Steel)
[effect_trait.maritime5]
name	= "Unit_Recover"
value	= 6
reqs	=
    { "type", "name", "range"
      "Tech", "Maritime", "Player"
      "UnitClass", "Sea", "Local"
    }
nreqs	=
    { "type", "name", "range"
      "UnitFlag", "Sail", "Local"
    }

; Sea-Repair (Trireme)
[effect_trait.maritime6]
name	= "Unit_Recover"
value	= 2
reqs	=
    { "type", "name", "range"
      "Tech", "Maritime", "Player"
      "UnitClass", "Trireme", "Local"
    }

; Sea-Repair (Sail)
[effect_trait.maritime7]
name	= "Unit_Recover"
value	= 4
reqs	=
    { "type", "name", "range"
      "Tech", "Maritime", "Player"
      "UnitFlag", "Sail", "Local"
    }
nreqs	=
    { "type", "name", "range"
      "UnitClass", "Trireme", "Local"
    }
;
;
;
;
;
;
; 
; MERCANTILE +++++++++++++++++++++++++++++++++++
;
;
;
;
;
;
;

; Financial (Gold)
[effect_trait.mercantile1]
name	= "Output_Bonus"
value	= 25
reqs	=
    { "type", "name", "range"
      "Tech", "Mercantile", "Player"
      "OutputType", "Gold", "Local"
    }

; Financial (Luxury)
[effect_trait.mercantile2]
name	= "Output_Bonus"
value	= 25
reqs	=
    { "type", "name", "range"
      "Tech", "Mercantile", "Player"
      "OutputType", "Luxury", "Local"
    }
;
;
;
;
;
;
;
;
;
; NATURALISTIC  ++++++++++++++++++++++++++++++++++
;
;
;
;
;
;
;
;
;
;

; Pathfinder Forest
[effect_trait.naturalistic1]
name	= "Move_Bonus"
value	= 1
reqs	=
    { "type", "name", "range"
      "Tech", "Naturalistic", "Player"
      "Terrain", "Forest", "Local"
      "UnitFlag", "Foot", "Local"
    }

; Pathfinder Jungle
[effect_trait.naturalistic2]
name	= "Move_Bonus"
value	= 1
reqs	=
    { "type", "name", "range"
      "Tech", "Naturalistic", "Player"
      "Terrain", "Jungle", "Local"
      "UnitFlag", "Foot", "Local"
    }

; Pathfinder Swamp
[effect_trait.naturalistic3]
name	= "Move_Bonus"
value	= 1
reqs	=
    { "type", "name", "range"
      "Tech", "Naturalistic", "Player"
      "Terrain", "Swamp", "Local"
      "UnitFlag", "Foot", "Local"
    }

; Pathfinder Desert
[effect_trait.naturalistic4]
name	= "Move_Bonus"
value	= 1
reqs	=
    { "type", "name", "range"
      "Tech", "Naturalistic", "Player"
      "Terrain", "Desert", "Local"
      "UnitFlag", "Foot", "Local"
    }

; Pathfinder Glacier
[effect_trait.naturalistic5]
name	= "Move_Bonus"
value	= 1
reqs	=
    { "type", "name", "range"
      "Tech", "Naturalistic", "Player"
      "Terrain", "Glacier", "Local"
      "UnitFlag", "Foot", "Local"
    }

; Camouflage Forest
[effect_trait.naturalistic6]
name	= "Defend_Bonus"
value	= 25
reqs	=
    { "type", "name", "range"
      "Tech", "Naturalistic", "Player"
      "Terrain", "Forest", "Local"
      "UnitFlag", "Foot", "Local"
    }

; Camouflage Jungle
[effect_trait.naturalistic7]
name	= "Defend_Bonus"
value	= 25
reqs	=
    { "type", "name", "range"
      "Tech", "Naturalistic", "Player"
      "Terrain", "Forest", "Local"
      "UnitFlag", "Foot", "Local"
    }

; Camouflage Desert
[effect_trait.naturalistic8]
name	= "Defend_Bonus"
value	= 25
reqs	=
    { "type", "name", "range"
      "Tech", "Naturalistic", "Player"
      "Terrain", "Forest", "Local"
      "UnitFlag", "Foot", "Local"
    }

; Camouflage Hills
[effect_trait.naturalistic9]
name	= "Defend_Bonus"
value	= 25
reqs	=
    { "type", "name", "range"
      "Tech", "Naturalistic", "Player"
      "Terrain", "Forest", "Local"
      "UnitFlag", "Foot", "Local"
    }

; Camouflage Glacier
[effect_trait.naturalistic10]
name	= "Defend_Bonus"
value	= 25
reqs	=
    { "type", "name", "range"
      "Tech", "Naturalistic", "Player"
      "Terrain", "Glacier", "Local"
      "UnitFlag", "Foot", "Local"
    }

; Camouflage Swamp
[effect_trait.naturalistic11]
name	= "Defend_Bonus"
value	= 25
reqs	=
    { "type", "name", "range"
      "Tech", "Naturalistic", "Player"
      "Terrain", "Swamp", "Local"
      "UnitFlag", "Foot", "Local"
    }

; Indigenous Jungle Food
[effect_trait.naturalistic12]
name	= "Output_Add_Tile"
value	= 1
reqs	=
    { "type", "name", "range"
      "Tech", "Naturalistic", "Player"
      "OutputType", "Food", "Local"
      "Terrain", "Jungle", "Local"
    }

; Indigenous Jungle Production
[effect_trait.naturalistic13]
name	= "Output_Add_Tile"
value	= 1
reqs	=
    { "type", "name", "range"
      "Tech", "Naturalistic", "Player"
      "OutputType", "Shield", "Local"
      "Terrain", "Jungle", "Local"
    }

; Indigenous Swamp Food
[effect_trait.naturalistic14]
name	= "Output_Add_Tile"
value	= 1
reqs	=
    { "type", "name", "range"
      "Tech", "Naturalistic", "Player"
      "OutputType", "Food", "Local"
      "Terrain", "Swamp", "Local"
    }

; Indigenous Swamp Production
[effect_trait.naturalistic15]
name	= "Output_Add_Tile"
value	= 1
reqs	=
    { "type", "name", "range"
      "Tech", "Naturalistic", "Player"
      "OutputType", "Shield", "Local"
      "Terrain", "Swamp", "Local"
    }

; Indigenous Desert Food
[effect_trait.naturalistic16]
name	= "Output_Add_Tile"
value	= 1
reqs	=
    { "type", "name", "range"
      "Tech", "Naturalistic", "Player"
      "OutputType", "Food", "Local"
      "Terrain", "Desert", "Local"
    }

; Indigenous Desert Production
[effect_trait.naturalistic17]
name	= "Output_Add_Tile"
value	= 1
reqs	=
    { "type", "name", "range"
      "Tech", "Naturalistic", "Player"
      "OutputType", "Shield", "Local"
      "Terrain", "Desert", "Local"
    }

; Indigenous Tundra Food
[effect_trait.naturalistic18]
name	= "Output_Add_Tile"
value	= 1
reqs	=
    { "type", "name", "range"
      "Tech", "Naturalistic", "Player"
      "OutputType", "Food", "Local"
      "Terrain", "Tundra", "Local"
    }

; Indigenous Tundra Production
[effect_trait.naturalistic19]
name	= "Output_Add_Tile"
value	= 1
reqs	=
    { "type", "name", "range"
      "Tech", "Naturalistic", "Player"
      "OutputType", "Shield", "Local"
      "Terrain", "Tundra", "Local"
    }
;
;
;
;
;
;
;
;
;
;
;
;    NOMADIC ++++++++++++++++++++++++
;
;
;
;
;
;
;
;

; Restlessness 
[effect_trait.nomadic1]
name	= "Move_Bonus"
value	= 1
reqs	=
    { "type", "name", "range"
      "Tech", "Nomadic", "Player"
      "UnitFlag", "Foot", "Local"
    }

; Improvisation 
[effect_trait.nomadic2]
name	= "Unit_Recover"
value	= 2
reqs	=
    { "type", "name", "range"
      "Tech", "Nomadic", "Player"
      "UnitClass", "Land", "Local"
    }
	
; Dousing (Desert Food)
[effect_trait.nomadic3]
name	= "Output_Add_Tile"
value	= 1
reqs	=
    { "type", "name", "range"
      "Tech", "Nomadic", "Player"
      "OutputType", "Food", "Local"
      "Terrain", "Desert", "Local"
    }

; Resourceful (Desert Production)
[effect_trait.nomadic4]
name	= "Output_Add_Tile"
value	= 1
reqs	=
    { "type", "name", "range"
      "Tech", "Nomadic", "Player"
      "OutputType", "Shield", "Local"
      "Terrain", "Desert", "Local"
    }
;
;
;
;
;
;
;
;
;
;   PHILOSOPHICAL
;
;
;
;
;
;
;
;
;
;

[effect_trait.philosophical1]
name	= "Output_Bonus"
value	= 15
reqs	=
    { "type", "name", "range"
      "Tech", "Philosophical", "Player"
      "OutputType", "Science", "Local"
    }

[effect_trait.philosophical2]
name	= "Force_Content"
value	= 1
reqs	=
    { "type", "name", "range"
      "Tech", "Philosophical", "Player"
    }

;
;
;
;
;
;
;
;
;   SCIENTIFIC ++++++++++++++++++++++++++++++
;
;
;
;
;
;
;
;
;

[effect_trait.scientific1]
name	= "Output_Bonus"
value	= 25
reqs	=
    { "type", "name", "range"
      "Tech", "Scientific", "Player"
      "OutputType", "Science", "Local"
    }
;
;
;
;
;
;
;
;
;
;
;
;   SPIRITUAL +++++++++++++++++++++++++++++++
;
;
;
;
;
;
;
;
;
;

[effect_trait.spiritual1]
name	= "Force_Content"
value	= 1
reqs	=
    { "type", "name", "range"
      "Tech", "Spiritual", "Player"
    }

[effect_trait.spiritual2]
name	= "Make_Happy"
value	= 1
reqs	=
    { "type", "name", "range"
      "Tech", "Spiritual", "Player"
    }

[effect_trait.spiritual3]
name	= "No_Anarchy"
value	= 1
reqs	=
    { "type", "name", "range"
      "Tech", "Spiritual", "Player"
    }

[effect_trait.spiritual4]
name	= "Make_Content_Mil_Per"
value	= 1
reqs	=
    { "type", "name", "range"
	"Gov", "Republic", "Player"
      "Tech", "Spiritual", "Player"
    }

[effect_trait.spiritual5]
name	= "Make_Content_Mil_Per"
value	= 1
reqs	=
    { "type", "name", "range"
	"Gov", "Democracy", "Player"
      "Tech", "Spiritual", "Player"
    }

[effect_trait.spiritual6]
name	= "Output_Bonus"
value	= -10
reqs	=
    { "type", "name", "range"
      "Tech", "Spiritual", "Player"
      "OutputType", "Science", "Local"
    }

;
;
;
;
;
;
;
;
;   888888888888888888888888888888888888888888888888888888888888
;   888888888888888888888888888888888888888888888888888888888888
;
;   UNIQUE BUILDINGS 
;
;   888888888888888888888888888888888888888888888888888888888888
;   888888888888888888888888888888888888888888888888888888888888
;
;
;

; Silos
[effect_silos]
name	= "Growth_Food"
value	= 50
reqs	=
    { "type", "name", "range"
      "Building", "Silos", "City"
    }

; Forge
[effect_forge]
name	= "Output_Bonus"
value	= 50
reqs	=
    { "type", "name", "range"
      "Building", "Forge", "City"
      "OutputType", "Shield", "Local"
    }


; Commune
[effect_commune1]
name	= "Output_Waste_Pct"
value	= 50
reqs	=
    { "type", "name", "range"
      "Building", "Commune", "City"
      "OutputType", "Trade", "Local"
    }
nreqs	=
    { "type", "name", "range"
      "Building", "Palace", "City"
    }

;[effect_commune2]
;name	= "Waste_Pct"
;value	= 50
;reqs	=
;    { "type", "name", "range"
;      "Building", "Commune", "City"
;    }
;nreqs	=
;    { "type", "name", "range"
;      "Building", "Palace", "City"
;    }

[effect_commune3]
name	= "Make_Content"
value	= 1
reqs	=
    { "type", "name", "range"
      "Gov", "Democracy", "Player"
      "Building", "Commune", "City"
    }

[effect_commune4]
name	= "Incite_Cost_Pct"
value	= 200
reqs	=
    { "type", "name", "range"
      "Building", "Commune", "City"
    }

; Bazaar
[effect_bazaar1]
name	= "Output_Bonus"
value	= 50
reqs	=
    { "type", "name", "range"
      "Building", "Bazaar", "City"
      "OutputType", "Gold", "Local"
    }

[effect_bazaar2]
name	= "Output_Bonus"
value	= 50
reqs	=
    { "type", "name", "range"
      "Building", "Bazaar", "City"
      "OutputType", "Luxury", "Local"
    }

; Forum
[effect_forum1]
name	= "Output_Bonus"
value	= 35
reqs	=
    { "type", "name", "range"
      "Building", "Forum", "City"
      "OutputType", "Science", "Local"
    }

[effect_forum2]
name	= "Make_Content"
value	= 1
reqs	=
    { "type", "name", "range"
      "Building", "Forum", "City"
    }

[effect_forum3]
name	= "Output_Bonus"
value	= 35
reqs	=
    { "type", "name", "range"
      "Building", "Forum", "City"
      "OutputType", "Gold", "Local"
    }

[effect_forum4]
name	= "Output_Bonus"
value	= 35
reqs	=
    { "type", "name", "range"
      "Building", "Forum", "City"
      "OutputType", "Luxury", "Local"
    }


; Archives
[effect_archives]
name	= "Output_Bonus"
value	= 50
reqs	=
    { "type", "name", "range"
      "Building", "Archives", "City"
      "OutputType", "Science", "Local"
    }

; Altar
[effect_altar]
name	= "Make_Content"
value	= 1
reqs	=
    { "type", "name", "range"
      "Building", "Altar", "City"
    }
;
;
;
;
;
;
;
;   888888888888888888888888888888888888888888888888888888888888
;   888888888888888888888888888888888888888888888888888888888888
;
;   GREAT PEOPLE 
;
;   888888888888888888888888888888888888888888888888888888888888
;   888888888888888888888888888888888888888888888888888888888888
;
;
;
;
;
;
;
;
;
;
;
;
; Great Industrialist
[effect_people.industrialist]
name	= "Output_Bonus"
value	= 50
reqs	=
    { "type", "name", "range"
      "Building", "Great Industrialist", "City"
      "OutputType", "Shield", "Local"
    }

; Great Philosopher
[effect_people.philosopher1]
name	= "Output_Bonus"
value	= 25
reqs	=
    { "type", "name", "range"
      "Building", "Great Philosopher", "City"
      "OutputType", "Shield", "Local"
    }

[effect_people.philosopher2]
name	= "Output_Bonus"
value	= 25
reqs	=
    { "type", "name", "range"
      "Building", "Great Philosopher", "City"
      "OutputType", "Science", "Local"
    }

[effect_people.philosopher3]
name	= "Make_Content"
value	= 1
reqs	=
    { "type", "name", "range"
      "Building", "Great Philosopher", "City"
    }

[effect_people.philosopher4]
name	= "Output_Bonus"
value	= 25
reqs	=
    { "type", "name", "range"
      "Building", "Great Philosopher", "City"
      "OutputType", "Gold", "Local"
    }

[effect_people.philosopher5]
name	= "Output_Bonus"
value	= 25
reqs	=
    { "type", "name", "range"
      "Building", "Great Philosopher", "City"
      "OutputType", "Luxury", "Local"
    }

; Great Prophet
[effect_people.prophet]
name	= "Make_Content"
value	= 2
reqs	=
    { "type", "name", "range"
      "Building", "Great Prophet", "City"
    }

; Great Prophet Vision benefit
[effect_people.prophet2]
name    = "City_Vision_Radius_Sq"
value   = 25
reqs    =
    { "type", "name", "range"
      "Building", "Great Prophet", "City"
    }

; Great Scientist
[effect_people.scientist]
name	= "Output_Bonus"
value	= 50
reqs	=
    { "type", "name", "range"
      "Building", "Great Scientist", "City"
      "OutputType", "Science", "Local"
    }

;
;
;
;
;
;
;
;
;
;
The Unit table and image file that was attached to this post has been moved to the Resplendent thread.
Attachments
units.spec.txt
(5.03 KiB) Downloaded 281 times
units.ruleset.txt
(108.78 KiB) Downloaded 286 times
Last edited by vodot on Wed Jul 18, 2018 1:38 pm, edited 12 times in total.
User avatar
Alien Valkyrie
Elite
Posts: 513
Joined: Sun Feb 10, 2013 10:21 pm
Location: Stuttgart, Germany

Re: Civ traits and trait-specific units

Post by Alien Valkyrie »

In 2.6, there are three hard-coded traits, Expanionist, Trader and Aggressive, though these aren't just present or absent, but have a numeric value that represents how strong they are in an AI. They can be tied to a specific nation (though they aren't, currently), but they're usually randomly selected at game start. Take a look at this excerpt from /data/classic/nations.ruleset:

Code: Select all

[default_traits]
; Default values for the AI traits. These are used if nation specific
; value for some trait has not been used. If these default too are
; not defined, the ultimate default is 50.
; <trait>_min and <trait>_max give the range from which the trait value
; is randomly chosen for a given AI player unless 'traitdistribution'
; server setting is 'FIXED'
; <trait>_default is the exaxt trait value used when 'traitdistribution'
; is 'FIXED'. If <trait>_default has not been given, it's set to the
; midpoint between <trait>_min and <trait>_max.

; Value of trait "expansionist" defines how much AI wants to settle new territory.
expansionist_min = 30
expansionist_max = 90
expansionist_default = 50

; Value of trait "trader" defines how much AI wants to establish trade routes.
trader_min = 30
trader_max = 90
trader_default = 50

; Value of trait "aggressive" defines how easily AI declares war.
aggressive_min = 30
aggressive_max = 90
aggressive_default = 50
I'm not sure what the AI code looks like under the hood, so I don't know how easy it would be to add more of these, but those are the ones we have.

As for special buildings, I believe it's possible to just have a nation as building requirement. Special units still need technology voodoo-coding.
~ AVL
User avatar
GriffonSpade
Elite
Posts: 578
Joined: Mon Apr 29, 2013 4:41 pm

Re: Civ traits and trait-specific units

Post by GriffonSpade »

vodot wrote:(this post will evolve as I copy-paste information here)

Hi all, I've never really posted anything here but years ago I created a private mod back in 2.2/3 that added (in addition to gobs of additional techs, buildings, and units) civ-specific traits and trait-specific units, buildings, and bonuses. I'm not sure how many others have attempted something like this, or how much progress has been made in 2.6/3.0+ towards making this easier than my kludgey method (which used new starting "technologies" as stand-ins for traits, then gave the techs the bonuses directly and called them as prereqs for units and buildings), but after reading a 2016 thread on the subject I decided to post the work that I've done in hopes of getting some feedback.

I hardcoded 57 nations to have unique combinations of two traits each (this drives some of the combinations which might seem odd or historically sub-optimal). I did not quite reach my goal of having every possible combination (78 of them) represented by a nation (see screenshot below).

I'm currently trying to pull my work forward into the 2.6 era and I don't see anything yet about native traits and so was by default planning to just update my old "technologies" method for 2.6+.

Please, before I get too far, someone let me know if there is an easier way to do traits/unique units/buildings in 2.6!
AFAIK, it's gotten /worse/ since then, as you can no longer use unresearchable advances. However, if you want to use a custom, static, limited list, you can probably do most of it with nation groups. You can add ones that are not used with matching, and then use them with them with NationGroup effect requirement type at Player range.

So in nationlist.ruleset you'll need to add things like this with the others:
[ngroup_aggressive]
name=_("?nationgroup:Aggressive")
match=0

In individual nation files, you'll need to edit the line like this, and you can do it quite easily for many, many nations:
groups="Asian", "European", "Medieval", "Early Modern", "Modern"
->
groups="Asian", "European", "Medieval", "Early Modern", "Modern", "Aggressive"

Then in various Effect ruleset files, you need to add things like this:
[effect_aggressive]
type = "No_Diplomacy"
value = 1
reqs =
{ "type", "name", "range"
"NationGroup", "Aggressive", "Player"
}

This can be done similarly in buildings.ruleset files as well. If you want unique units, they have to be done through a building proxy.

Also note the expansionist, trader, and aggressive random multipliers in nations.ruleset. I think these values can be overridden in individual nation files?
vodot wrote:I'd like to post my custom unit gfx files, but I hesitate due to them being mostly old CivFanatics/Apolyton fanmade sprites of... uncertain copyright status. I'm sure if that was an approved method for sourcing sprites, then freeciv would already be full of those awesome gfx files today. But I can at least post my rulesets and everything else I was working on, while the search for explicitly open-source sprites goes on in parallel.
I think it's generally fine to post them, just point out that they're not your work and source is dubious. And probably avoid the ones directly from commercial games, as well.
cazfi
Elite
Posts: 3077
Joined: Tue Jan 29, 2013 6:54 pm

Re: Civ traits and trait-specific units

Post by cazfi »

GriffonSpade wrote:you can no longer use unresearchable advances.
Could you elaborate? Root reqs work just fine for me.
User avatar
Corbeau
Elite
Posts: 1291
Joined: Mon Jan 13, 2014 11:13 pm

Re: Civ traits and trait-specific units

Post by Corbeau »

Root reqs are not "unresearchable".
--
* Freeciv LongTurn, a community of one-turn-per-day players and developers
* LongTurn Blog - information nexus with stuff and stuff and stuff
* Longturn Discord server; real-time chatting, discussing, quarrelling, trolling, gaslighting...
cazfi
Elite
Posts: 3077
Joined: Tue Jan 29, 2013 6:54 pm

Re: Civ traits and trait-specific units

Post by cazfi »

Corbeau wrote:Root reqs are not "unresearchable".
Self-requiring ones are.
User avatar
GriffonSpade
Elite
Posts: 578
Joined: Mon Apr 29, 2013 4:41 pm

Re: Civ traits and trait-specific units

Post by GriffonSpade »

cazfi wrote:
GriffonSpade wrote:you can no longer use unresearchable advances.
Could you elaborate? Root reqs work just fine for me.
Root reqs can still be researched. Things that can Never be researched. The only useful purpose of which would have been to use as 'fake' advances, to give nations distinct units, buildings, and effects. Though, my memories of planning to use like that are rather fuzzy and indistinct. IIRC, there were some problems with it being buggy and support was dropped? (Was that finally nixed in 2.5 or 2.6?)

While we now have AI variable traits, there are no Flag traits that can be used in effects, buildings, and units.
And units have only buildings and advances.

i.e. there's no way to say give every nation two of this list of traits randomly (Or one trait randomly, as in a pinch one can just use single traits that represent pairs). And doing it non-randomly requires editing each and every nation.
Last edited by GriffonSpade on Sun May 27, 2018 2:34 am, edited 1 time in total.
cazfi
Elite
Posts: 3077
Joined: Tue Jan 29, 2013 6:54 pm

Re: Civ traits and trait-specific units

Post by cazfi »

GriffonSpade wrote:
cazfi wrote:
GriffonSpade wrote:you can no longer use unresearchable advances.
Could you elaborate? Root reqs work just fine for me.
Root reqs can still be researched. Things that can Never be researched. The only useful purpose of which would have been to use as 'fake' advances, to give nations distinct units, buildings, and effects. Though, my memories of planning to use like that are rather fuzzy and indistinct. IIRC, there were some problems with it being buggy and support was dropped? (Was that finally nixed in 2.5 or 2.6?)
The mechanism to do that has always been self-requiring root reqs, and they have not been dropped.
User avatar
GriffonSpade
Elite
Posts: 578
Joined: Mon Apr 29, 2013 4:41 pm

Re: Civ traits and trait-specific units

Post by GriffonSpade »

cazfi wrote:
GriffonSpade wrote:
cazfi wrote:Could you elaborate? Root reqs work just fine for me.
Root reqs can still be researched. Things that can Never be researched. The only useful purpose of which would have been to use as 'fake' advances, to give nations distinct units, buildings, and effects. Though, my memories of planning to use like that are rather fuzzy and indistinct. IIRC, there were some problems with it being buggy and support was dropped? (Was that finally nixed in 2.5 or 2.6?)
The mechanism to do that has always been self-requiring root reqs, and they have not been dropped.
...Is this noted anywhere? Because this seems like something that I would assume would spit out an error.
Edit: Apparently it is, in the Root Reqs in the techs.ruleset comments. I can only wonder how many times I've seen that mentioned in part or in whole in posts and misunderstood it.
Post Reply