Balkanization/Break-away Civs?

GeorgeLiquor

Chieftain
Joined
Feb 14, 2010
Messages
59
Location
United States
Is it possible to create a mod in which, when certain conditions are met, one or more of your cities can "break-away" as a new Civilization?

Say I have a German Empire with three cities (Berlin, Hamburg, Munich)

Would it be possible to program it so that, if the unhappiness in Munich reaches a certain point, a new Bavarian Civilization will spawn, with Munich transferred to them as the capitol?
 
Yes it is possible. Create a new player as the breakaway city and then it's a matter of changing owner in a number of units and the city. Add the palace and you have what you asked for.

A more interesting question is how to do it. The DLL can do it and maybe python (not sure). Either way you have to start programming. A good start would be to investigate if anybody have tried to implement such a feature already. It's not like it's a unique idea and you aren't the first one to mention it either.
 
A good place to look is probably the History Rewritten mod, where your civilization can descend into civil war against a break away civ. HR is also completely Python so no DLL modding required if you like!
 
I will do further research, thank you both for the replies.

Before I proceed, I want to clearly lay out what I'm trying to do, to gauge if it is theoretically possible. Sorry if it's redundant.

(I'm currently working on an Eastern Europe scenario, so I'll be using that as reference.)

Say I'm at war with the Austrian Empire, which consists of two cities: Vienna and Budapest. These are three different situations I'm trying to program:

1) I capture Vienna. Budapest then automatically becomes the capital of a new "Hungarian Empire" which was previously "inactive" and didn't have any cities or units on the map.

2) Instead of Vienna, I capture Budapest. I am then given the option to liberate the city to the Hungarian Empire.

3) During my war with Austria, unhappiness in Budapest gets too high, and it suddenly "breaks away" and becomes capital of the Hungarian Empire.

In each case, the Hungarian Empire would basically be a dormant Civilization that would only be spawned in Budapest if one of these three situations occurs.

EDIT: It looks like HR features something resembling #3 a great deal, so I'm primarily curious about #1 and #2.

Also, to clarify, I'd like to have those events happen regardless of who owns Budapest.

So say you're playing as Russia.
AI Germany conquers Vienna. The Hungarian Empire is spawned in Budapest, but Germany conquers that too.
You then go to war with AI Germany, and capture all of their original cities.
Budapest then breaks off into the Hungarian Empire again.

So what I'm saying is, I'd like the #1 event will occur whenever the Civilization that owns Budapest is conquered, regardless of who it is.
 
Well in programming, generally speaking there is nothing keeping you from combining cause and effect in whatever way you like.

Triggering something based on city conquest in Python is trivial, and so is adding additional conditions in case of such a situation. So yes, your other scenarios are possible as well.

By the way, you don't even need to have the Hungarian civilization dormant in particular. It's also possible to have a generic player dormant that you can associate with a civilization as needed. So you are not locked into a set number of civilizations to create for your scenario.
 
Back
Top Bottom