BarbarianCiv - Barbarian cities settle down into full civs

strategyonly

C2C Supreme Commander
Joined
Mar 13, 2006
Messages
20,994
Location
MN
BarbarianCiv Description Python Only
Original Version 0.85
By jdog5000

updated by strategyonly (also check credits)
This is the Python only version


The goal

In this mod, barbarian cities, if left to their own devices, will eventually "settle down" into full blown civs!

Note on this version

BarbarianCiv is a component of my modpack, Next War Advanced Mod(next version v005), and has been released as a stand-alone component primarily to allow it to be added to other mods that may not want the rest of the NWA functionality. This component comes in two flavors which work slightly differently: Python only and SDK enabled. The Python only version is provided mainly for modders who would like to avoid changes to the SDK for whatever reason. The differences between the two versions are:

In Python only:
- Must set DoGameStartKill = True to see any effect
- A few AI civs will be killed off before the first turn of the game. These can then take over barb cities later.

In SDK version:
See below for thread.

The Basic Idea

Barb cities will settle down probabilisticly, with several factor determining the odds. When a civ takes control of some barb cities, they're given a bunch of freebies to make them competitive. How the new civ is chosen depends on whether you're doing Python only (random from list of killed off civs) or SDK enabled (random from never alive).

More details
Spoiler :
The decision to have barbarian cities "settle down" into a full-fledged civ is based on the properties of the barb cities. At the end of every turn, all barbarian cities are examined for two things: total population of neighboring barb cities, and culture. The city with the highest population (including neighboring barb cities) and the city with the highest (non-zero) culture have a chance of organizing. The higher the total barb population around a city, the higher the odds it and its neighbors turn into a civ. Once a barb city starts to get some culture, it has pretty good odds of spawning a civ.

Once the cities for the new civ are selected. There are two types of barbarian consolidation, militaristic and builder. Both get a base set of defensive units and workers in every city, plus all techs known to a majority of the world. The new civ also gets a great person (to symbolize the leader who organized the horde), with the GP type depending on the type of consolidation. The populations of all the cities are increased. Their captial is given walls and a granary. If the cities have some culture, the new civ gets half of the total. These general effects for both types of "rise of the barbs" are intended to partly catch them up with the rest of the world.

Militaristic consolidation is the most interesting in my view. It's intended to mimic the affect of Ghengis Khan or the Vikings. The new civ is given a crap load of offensive units and will declare war on a random opponent in the area. If there are no other civs in the area, the new civ is given some boats to go raiding! Odds of a militaristic buildup increase if the new leader is Aggressive or Expansionist. Militaristic new civs will be behind in economic or social technology. They also get free barracks. Gameplay spoilers: This aggressive new civ will have a very tough first wave, and often succeed in taking a couple cities and pillaging large areas. However, they don't have the infrastructure to maintain the drive and will usually stall or lose their gains (unless you're really unprepared).

Builder consolidation is intended to mimic the rise of a new civ that isn't particularly militaristic. This type of civ gets additional techs from the list of known techs. They are not explicitly given any new techs, but may use their GL to discover something new. They are also given a bunch of extra infrastructure: extra worker, free settler, and some buildings like libraries, lighthouses, and forges (if they have the tech). Gameplay spoiler: While not as exciting as the Military buildup, this type is the more dangerous in the long run. If they start up in a big empty area (like on a Terra map), they can grow into the upper echelon of the game. However, if attacked early, they will crumble.


Notes on use

If you want to see some barbarian cities settle down, make sure there's enough space for them on the map. A full standard map game will probably only see a couple of barb civs emerge.

One fun experiment is start a large world with only a handful of civs, then let the barbarians fill in the gaps. (To do this with the Python only version, you would need to set KillFraction to something high)

On Terra maps, the "new" world will not be as empty as before.

Compatibility

This mod should be quite compatible with any mod that adds units, civs, or technologies. When giving the former barbs units, I search for the best buildable ones by UnitClass or AI type. The main potential source of compatibility problems would come from not using the custom event manager convention, you then have to be sure events are passed to all the appropriate functions.

The Files

Download here: http://forums.civfanatics.com/downloads.php?do=file&id=12917

SDK enabled version: http://forums.civfanatics.com/showthread.php?t=170243

CREDITS:

Spoiler :

EmperorFool - for without him this project would have never happened
jojoweb,
The_J,
God-Emperor,
and finally but not least
jdog5000 - for the original BarbarianCiv and helping out here also. I hope he put the FINAL touch on this project (now isn't that fitting?)
 
Looks great, I was hoping this would be back for 3.19! I may be placing this in WoL if I have enough room. :)

A question, though - is there any way through python or SDK to ensure that if a new civ is founded, the city-names are the names of that actual civilization, instead of barbarian tribe names? (i.e., like in the screenshot above, instead of Justinian's new capital being Khoisan, it is Constantinople?)
 
I'm so glad you did this. Also I would like source code for the SDK version.
 
I'm so glad you did this. Also I would like source code for the SDK version.

You will have to contact jdog5000 in the SDK secton listed in post # 1 for that, sorry. But thx for trying and the nice words.
 
Will there be an option to enable or disable this in the custom game?
 
Will there be an option to enable or disable this in the custom game?

There is NO ingame part for that, but in the first post, if you dont want it to work just change True to False.
 
I don’t know if I’m doing something wrong, but, in my games, there are always only two barbarian civilizations. Even when there are more barbarian cities with culture. I’m using that ini configuration (in python only version):
Spoiler :
; ------------------------------------------------------
[BarbarianCiv]

Enable = True

; Turn on Debug output
DebugMode = False

; Enable popup when Barbarian cities settle down
BarbSettlePopup = True

; Kill off some civs at the start of a game (needed for Python only version)
DoGameStartKill = True

; Fraction of civs to kill at game start if DoGameStartKill (needed for Python only version)
KillFraction = 1

; Radius inside which is considered a cities neighbor
CityRadius = 10

; Change odds of barb settling down
Modifier = 1.00

; Base odds of Military buildup
BaseMilitaryOdds = 0.5

; Former barbarians get all techs known by this fraction
BarbTechFrac = 0.60

; Increase techs that builder type barbs get
BuilderTechModifier = 1.00

; Allow barbs to settle as a minor civ
AllowMinor = True

; If a city has culture, spawn a new civ with same art style as highest culture player
BarbCivsByStyle = True

; A militaristic barb civ on its own island will declare war on the first civ it meets within this window of turns
MaxVikingStyleWindow = 30

; Enable barb civ settling do to culture in city
DoCultureCheck = True
 
I don’t know if I’m doing something wrong, but, in my games, there are always only two barbarian civilizations. Even when there are more barbarian cities with culture. I’m using that ini configuration (in python only version):
Spoiler :
; ------------------------------------------------------
[BarbarianCiv]

Enable = True

; Turn on Debug output
DebugMode = False

; Enable popup when Barbarian cities settle down
BarbSettlePopup = True

; Kill off some civs at the start of a game (needed for Python only version)
DoGameStartKill = True

; Fraction of civs to kill at game start if DoGameStartKill (needed for Python only version)
KillFraction = 1

; Radius inside which is considered a cities neighbor
CityRadius = 10

; Change odds of barb settling down
Modifier = 1.00

; Base odds of Military buildup
BaseMilitaryOdds = 0.5

; Former barbarians get all techs known by this fraction
BarbTechFrac = 0.60

; Increase techs that builder type barbs get
BuilderTechModifier = 1.00

; Allow barbs to settle as a minor civ
AllowMinor = True

; If a city has culture, spawn a new civ with same art style as highest culture player
BarbCivsByStyle = True

; A militaristic barb civ on its own island will declare war on the first civ it meets within this window of turns
MaxVikingStyleWindow = 30

; Enable barb civ settling do to culture in city
DoCultureCheck = True

How long of a game have you gotten into, you must make room for the Barbarian civ to settle down, ie: If you play a 17 civ game only one or two will show up, but if you play like 15 it should have room for three spaces then and they settle anyplace on the map also, usually close to YOUR civ, so be careful. You can do alot of things also to make changes.

I have played and i have gotten up to four so far. On a 14-17 civ map. Its usually a well known civ that settles down with the barbarians.:mischief:
 
Sorry to bother you again, but I guess you missed my question in my previous post. :)

Anyhow, my question was, is there any way to program this to ensure that "new" civilizations will have actual city names, instead of barbarian civ names? For example, in the screenshot above, Justinian's capital was Khoisan. Is there any way to code it so that when Justinian had appeared, the capital name would have changed to Constantinople?
 
Sorry to bother you again, but I guess you missed my question in my previous post. :)

Anyhow, my question was, is there any way to program this to ensure that "new" civilizations will have actual city names, instead of barbarian civ names? For example, in the screenshot above, Justinian's capital was Khoisan. Is there any way to code it so that when Justinian had appeared, the capital name would have changed to Constantinople?

Your right i did not see it, sorry. I have a habit of going to the home page and hitting "read all."

For the actual coding, you'd have to talk to jdog5000, in the first post. Then if he could do it, i might be able to adapt it.
 
If i use BarbarianCiv, the only python version, on a map with already 18 Civs, new civs will appear ? If have barbarians cities on the map ?

Or will be obligatedto use a map with less than 18 civs ?
 
You cannot have more than 18 civs on a map with a Python-only mod. You have to run a custom DLL created with the SDK to get more than 18 civs.

If you expect to use a Mac, you cannot use a custom DLL, and so you cannot have more than 18 civs on a single map.
 
It occurs to me that it could be amazing to have this combined with Gaius Octavius' new code that enables you to designate civs not only as colony-enabled. If this could be integrated and similarly tagged, then modders could mark out each civ for normal start, colony start, or barbarian start, which I think would be pretty comprehensive historically.
 
It occurs to me that it could be amazing to have this combined with Gaius Octavius' new code that enables you to designate civs not only as colony-enabled. If this could be integrated and similarly tagged, then modders could mark out each civ for normal start, colony start, or barbarian start, which I think would be pretty comprehensive historically.

Sounds ok, but only "if" yours was only python.:(
 
Is there a chance to see this for Warlords too? I cant seem to get a version of BTS no matter how long i try, and that kind's of bother me.
 
Maybe you could make a Python only version of Revolution, something very simple: every turn each city has a small chance of seceding depending on how many unhappy citizens it has, maybe one in 100 per unhappy citizen. When it does, an unused civ is brought to life (chosen randomly from all those not yet alive), it declares war on all civs and all units in the city convert to it (causing the city to be captured).
 
Top Bottom