Rebellion (Civil War) Mod

Jon Shafer

Civilization 5 Designer
Joined
Jul 14, 2002
Messages
2,102
Location
Maryland
Surprised nobody started this one sooner. ;)

In my work on the main game scenarios I created some systems which are designed to mimic rebellions and civil wars, spawning barbarian units around cities to stir up trouble.

This code can be modified and applied to the main game with some modification. I already have the spawning of units algorithms completed - what remains is triggers (and something to make sure you don't always get the same type of rebel unit throughout the whole game, but that's easy).

My question for you guys is what should these triggers be? What is balanced? I was thinking there would be essentially two levels - 'rebellion' which spawns barb units around cities rarely to stir up trouble, and full-scale civil war when things get bad enough and would be more difficult to beat off, like fighting a whole other civ.

And before someone brings it up... actually splitting off of cities to other nations, new or otherwise, won't be covered in my first iteration. Sorry. ;) You guys can run with what I've made after I finish it and add whatever you want. For now I just want to get something fairly simple up since I know people would like to see this sort of thing.

Anyways, feedback, questions, suggestions, etc. always welcome. :)

Alpha Version 1 is up:
 

Attachments

  • RebellionMod.zip
    7.7 KB · Views: 788
Trip, this is great stuff... My mod is going to incorporate civil wars and rebellions but the triggers are largely based on contributing factors that are not currently in the game but will be in the mod.

I hope that when you do this, it'll have something of a modular element to it so that I can sort of just insert it into my mod and "plug it in" so to speak to work with the other components of my mod.

I'd love to talk more about my ideas... see what ideas we have that jive and how we can work together to create the mutual game elements we need/want.
 
Trip said:
Surprised nobody started this one sooner. ;)

In my work on the main game scenarios I created some systems which are designed to mimic rebellions and civil wars, spawning barbarian units around cities to stir up trouble.

This code can be modified and applied to the main game with some modification. I already have the spawning of units algorithms completed - what remains is triggers (and something to make sure you don't always get the same type of rebel unit throughout the whole game, but that's easy).

My question for you guys is what should these triggers be? What is balanced? I was thinking there would be essentially two levels - 'rebellion' which spawns barb units around cities rarely to stir up trouble, and full-scale civil war when things get bad enough and would be more difficult to beat off, like fighting a whole other civ.

And before someone brings it up... actually splitting off of cities to other nations, new or otherwise, won't be covered in my first iteration. Sorry. ;) You guys can run with what I've made after I finish it and add whatever you want. For now I just want to get something fairly simple up since I know people would like to see this sort of thing.

Anyways, feedback, questions, suggestions, etc. always welcome. :)

Could spawn some kind of guerilla unit? Triggers for civil wars could be betraying friends, using nukes, or losing the capital (maybe even great wonders?)

some kind of guerilla archer for first era, guerilla crossbowman for middle ages, a guerilla with a bad rifle at the for inudstrial, and then the guerilla from civ3 for modern ages? It should also remove population in cities because the people leave the cities to do their 'guerilla wars'.
 
Armed_Maniac said:
Could spawn some kind of guerilla unit? Triggers for civil wars could be betraying friends, using nukes, or losing the capital (maybe even great wonders?)

some kind of guerilla archer for first era, guerilla crossbowman for middle ages, a guerilla with a bad rifle at the for inudstrial, and then the guerilla from civ3 for modern ages? It should also remove population in cities because the people leave the cities to do their 'guerilla wars'.
I plan on using the units that already exist so that I don't have to change more than Python stuff. Giving the units certain promotions may be possible though (Woodsman I and Guerilla I, for example). Good idea with the cities losing pop though. Maybe be a bit too harsh but we can try it out.

jbfballrb said:
or a spy mission? (not failed, something like: stir unrest)
Sorry, I won't be adding any 'features' that aren't already in the game (aside from the actual rebellion stuff itself), though if people want to do so later it shouldn't be hard to change what I've made to accomodate that. :)
 
I'm all for civil wars, but they shouldn't be something that happen randomly in one turn, but should be influenced by logical factors over a longer period of time before being triggered. Also what cities revolt should not be random, but the tendency for unrest should be factored for each city separately (although unhappiness in one city should increase unhappiness in nearby cities as well).

Things that should influence civil war triggers:

Unhappiness
Obviously the largest factor. When unhappiness increases, chances of the city revolting increase. High unhappiness should cause unrest in nearby cities as well, and vice versa of course.​

Distance to capitol
The longer the distance to capitol, the more likely an unhappy city takes the final step to revolt. The effect of distance should however be very modest.​

Route to capitol
Essentially the same as with distance to capitol, but the effects could be more drastic. Land-connected cities are less likely to revolt than over-seas colonies. Roads/harbors decrease the effect. Cities "behind enemy lines" ie. cut-off by another civ's borders should be much more likely to revolt.​

Population and religion
Cities with high percentage of foreign nationals and/or other-than-state religions are more likely to revolt.​

Original ownership
Cities that have been annexed from other civ's are naturally more likely to revolt against their new masters. This effect should decrease over time.​

Now you just have to create a formula that takes into account all of the above and calculates a revolt-chance for each city every turn. Also, if and when the civ is to be split in a real civil war, the cities that flip should in general neighbour each other so as to create two genuine land masses and not a random patchwork. Cities that should revolt according to the formula but are for example in the middle of content cities, should spawn barbarians instead of flipping to the new civ.
 
Good ideas everyone, I'm compiling a list of things and plan on getting something WORKING at least today.

I should add this as well - are there people who are willing to test this mod out as it goes through its various iterations? I don't really have time to keep a hawk's eye on the results and make sure that nothing is too imbalanced or unfun, so if people would actually play it and make sure the results are good that would be great. :)

Dom Pedro II said:
Trip, this is great stuff... My mod is going to incorporate civil wars and rebellions but the triggers are largely based on contributing factors that are not currently in the game but will be in the mod.

I hope that when you do this, it'll have something of a modular element to it so that I can sort of just insert it into my mod and "plug it in" so to speak to work with the other components of my mod.

I'd love to talk more about my ideas... see what ideas we have that jive and how we can work together to create the mutual game elements we need/want.
Well, with the way Civ 4 mods work there will always be some work in merging mods together. I typically try to write code that is easy to understand, modify and adapt though so hopefully that will be enough.
 
You might want to have some civics increase or reduce the chance for civil war. Civics like slavery, hereditary rule and the base civics should have a fairly high chance while free speech and free religion a reduced chance.
 
Trip said:
Well, with the way Civ 4 mods work there will always be some work in merging mods together. I typically try to write code that is easy to understand, modify and adapt though so hopefully that will be enough.

Hopefully it will, thanks :)
 
The first version of the mod is finished. It's very rough and needs quite a bit of balancing but it works. To install simply extract the .ZIP file into your Civ 4 root directory (or "My Documents\My Games\Civilization 4\").

To play select it from the Menu through Advanced->Load Mod. Or you can set it in your Civ 4 .INI, but that's only if you want to play with this mod all the time. And since it really isn't finished yet I wouldn't recommend it. ;)

Check out the first post in the thread for new versions.
 
Actually, I should elaborate on the exact changes -

The mod takes into account a civ's state religion vs. each city's (which matters less as the game goes on), a civ's civics, a city's nationality, a civ's total land (larger more likely to get rebels), and a city's happiness and health.

I will later make the nationality difference much greater if you're at war with that civ.

If anyone is interested in the specifics check out the Python file. You can also check out the exact effects during the game by setting LoggingEnabled=0 to 1 in the .INI and then opening up PythonDbg.log in your logs folder. The output shows the factors in how likely a rebellion is for each city and if a rebel is spawned the actual roll (out of a total of 10 000).
 
Perhaps a trigger should be changing from a civic that you have held for a while? Say you take slavery as a civic for about 50 or so turns, but then you decide to switch over to emancipation/serfdom etc., and some of your people, not willing to give up their old ways, revolt. Civil wars are often caused by drastic change in long held policies(The Roman civil wars, the American Civil War, the Russian Civil War, etc.) Maybe the longer you hold on to a certain civic, the larger the rebellion will be?
 
So would it be possible to create another civ in the cities where the civil war takes place at? If this is at all possible it would be beyond cool.
 
how about religious unrest? say you have a state religion and a sizeable minority religion, they might become restless.
 
TheeLord said:
So would it be possible to create another civ in the cities where the civil war takes place at? If this is at all possible it would be beyond cool.

didn't civ 2 have this? i remember that if you took the capital of an enemy civ, sometimes the rest of the civ would split into 2.
 
This is great idea. I would have some sugestions (but don't have much time now, maybe latter, if it'll not be too late:D ) )

I think that sugestions leading in good direction.

First, don't make it as it's only the couse of Religion or just distances from Capitol but mixed reasons like Exel nicely proposed.

Just two short add:
Don't make it too easy to happened it has to be relativlly rare occurrance by my opinnion.
The soldiers that are in rebelion cities in that moment, should be splited (part for reballion - stayed in cities and part for old civ, infront of the city) What percentage of units should be assigned to rebels it also have to be determined somehow /with an advantage for rebels I guess anyway/.

And two /short/ question for trip:
Any idea how the new Civ will function? It's not realistic to became just barbarious and everybody can go to war against them, oposite they can have allies.
And how you would named new civ (like New China or other), what color they'll be, and how the leader will be represented /to nagotiating for condition of peace/? - this all in case that new civ will not be just batbarious.

Sound like hard task to do:D !
 
I've been wanting civil war in a Civ game for YEARS now! It was one of my main strategies back in Civ2 when warring with a larger civ. Just take their capital, (hopefully) a civil war starts and the large empire is split in two, with me aligning with the "rebels". :king:

If this could be done, it would totally rock! I never ever messed with python before, if I knew how I'd make this myself!

Alone said:
And two /short/ question for trip:
Any idea how the new Civ will function? It's not realistic to became just barbarious and everybody can go to war against them, oposite they can have allies.
And how you would named new civ (like New China or other), what color they'll be, and how the leader will be represented /to nagotiating for condition of peace/? - this all in case that new civ will not be just batbarious.

Sound like hard task to do:D !

It would be better to take a Civ that's already in the game and make them the "rebels" in the civil war. Like a Civ that wasn't selected to be in your current game, for example.

Also... if it can be done... the rebel Civ should share the same cultural background as the Civ it's rebelling against. Example: Romans go into civil war, and the Greeks join the game as a rebel faction. Or the Romans go into civil war, and the French are the rebel faction.

It wouldn't seem right to have the Romans enter a civil war with the Azteks as the rebel Civ. :lol:
 
A very good idea, remember me from Europa Universalis, one of my favorite games.
It's possible to the revoltants spawn as a new civ?
 
but suppose there are 18 civs already? maybe there should be something about where the units came from, so like units that came from the cities rebelling have a higher chance of rebelling than those that are stationed there but from elsewhere.
 
Top Bottom