Welcome to Revolution!

jdog5000

Revolutionary
Joined
Nov 25, 2003
Messages
2,601
Location
California


Since January of 2009, Revolution is being developed as a part of the RevolutionDCM modpack by glider1, jdog5000, and phungus420. The core of RevolutionDCM consists of Revolution, Dale's Combat Mod, Influence Driven War, and a few other carefully selected mods.

The information below explains the idea behind and some of the workings of the Revolution mod.


Revolution Mod Pack
By jdog5000
Coders: jdog5000, glider1, phungus420, Dom Pedro II, ocitalis
Multiplayer? Working on it

Included Components:
Revolution
Better BTS AI
BarbarianCiv
DynamicCivNames
StartAsMinors
AIAutoPlay
TechDiffusion
ChangePlayer

The goal

The goal of this modpack is to make Civ4 more dynamic. New empires will rise in the middle of the game, over-extended empires may crumble, or colonies break away from oppressive rulers.

Gameplay Components

The primary components of this mod are BarbarianCiv and Revolution. Briefly, BarbarianCiv allows Barbarian cities to "settle down" and spawn new full-fledged civs. Revolution allows colonies or groups of cities to demand changes to your empire or independence through several different types of revolts. Revolution has essentially absorbed the concepts from the Rebellion component that was in some very old versions (and originally based on Trip's idea). With the SDK changes in this mod pack, these components can spawn completely new civs that were not in the game before. Both of these components are also highly configurable and enabled by default.

Tech diffusion is essentially a tech welfare program to keep civs from being eras behind by the end of the game. If a civ falls behind by several techs, they will start to accumulate free research towards some of the techs they can research based on how many civs they know with that tech and what their relationships are. Unless the civ is extremely far behind, they will never get a completely free tech, instead they'll get a free percent or two of the research points per turn. Once a certain fraction (which increases as the eras go by) has diffused, the free beakers stop and the civ most do the rest of the research themselves.

DynamicCivNames renames civs over the course of the game based on their civics and status. Civs spawned in rebellions will temporarily be named something like Japanese Rebels before they establish themselves. Similarly mechanisms exist for civs spawned by BarbarianCiv. A civ running Hereditary Rule and Theocracy might be named Holy Kingdom of Japan. There are quite a few variations for different civic combos as well as some flavor names for civs from different parts of the world.

Tools

The next couple components do not directly change game play but instead can be used for fun or debugging using keyboard commands. AIAutoPlay allows the player to turn over the reigns of their civ to the AI for some number of turns. Uses for this include watching the AI, "fast-forwarding" the game if you're bored or want to see the effects of mods you've made. This component is enabled by default, but makes no gameplay difference if you don't use it. ChangePlayer allows the player to switch which civ they control and the leader or civ type of any civ in the game. There are some issues with changing the civ type of living civs, but all the other pieces are working well. This component is enabled by default and makes no gameplay difference if not used.

What's in development?

Working on creating better visibility for a cities revolution state, improving the Revolution Watch screen, creating a better separation between local and national revolts, and adding XML specifications for units.

Configurability

Many options and tweaks are available in Revolution.ini, including enabling and disabling each individual component. For specifics on what can be changed, check out the ini file. Note that yes, you can enable or disable a component, or change one of the other features, and continue with an in progress game. However, you will probably need to save, exit, and reload to make the change stick in game.

Gotta give my props

Special thanks to glider1 and phungus420 for all of their involvement and coding in Revolution through RevolutionDCM! Also thanks to Dom Pedro for helping make support for civic mods a reality.

Thanks to Caesium for sharing his adaptation of this mod (his mod pack has not yet been released on CFC) from which I have borrowed several pieces, and for translating text into German.

Thanks to Dom Pedro II, Twisted_Stixx, Goobernatorial, suspendinlight, TheGreatApple, Quijote, Cincinnatus3, GenocideBringer, Seven05, AnarhCassius, Colin, b3virq3b, Peuri, Caesium, Mrdie, Beastfeast, medwarth100, cbmclean, t3bing, glider1 and Dnomal for their ideas, bug reporting and testing.

Thanks to DrElmerGiggles for his custom event manager, config parser, and the Civ4lerts mod. Thanks to the BTS Unaltered Gameplay mod team for the raw commerce/production mod and Civ4lerts rewrite. Thanks to Almightix for the improved Espionage screen. Thanks to Stone-D and Teg Navanis for their work on saving mod data in compatible ways. Thanks to TheLopez for the Dead Civ Scoreboard mod component. Thanks to johny for his CvMainInterface fix. Thanks to Lord Olleus for idea on how to call functions at the end of a players turn. Also, thanks to DrElmerGiggles, TheLopez, Kael, Rhye, eotnib, and others for their answers to questions and code I browsed for implementation ideas. Thanks to Fabrysse for translating the mod into French. Awesome Revolution logo by skylined!
 
BarbarianCiv Description
Enabled by default


The goal:

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

How it works:

Barb cities will settle down probabilistically, with several factor determining the odds. Starting with version 2.0, barb cities first become single city minor civs. These city states can't conduct diplomacy, so they're at war with everyone. When the new civ accomplishes something notable, a leader emerges and the civ settles down into a full civ. These accomplishments can include conquest, reaching a high population, reaching a high level of culture, building wonders, etc.

More details:
Spoiler :

The decision to have a barbarian city form a minor civ is based on the population & culture of the city, whether there are nearby civs, and whether the city was captured. When a minor civ forms, they take control of this single city and are given some units and techs to get started. Since they are a minor civ they're at war with everyone else and cannot conduct diplomacy, so you won't see them on the scoreboard.

Each turn the minor civs are checked to see if they deserve to be upgraded to full civ status. When settling down into a full civ, these minor civs will take on one of two types: militaristic and builder. If they have conquered a city, they will immediately settle into a full, militaristic civ and continue the war against whomever they took a city from. If they have reached a high level of culture or built a wonder, they will settle as builders. If they settle due to high population or founding a religion, they have a probabilistic chance of being one or the other.

The civs get several bonuses depending on whether they're militaristic or builder. Both types get a base set of defensive units and workers, plus some free 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. Their capital 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 exciting in my view. It's intended to mimic the effect of Genghis Khan or the Vikings. There are four different flavors of militaristic settling, Viking, Chariot, Horse, and balanced. Vikings get boats and mostly melee units, Chariot style is for earlier barb settling and they get chariots and some axes, Horse style is mostly Horse archers or Knights if late enough, while balanced gets an assortment of units. The strength of the military is fairly random, and increases as the eras go by. 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. Militaristic barbs have a good chance of getting a Great General when spawned.

Builder consolidation is intended to mimic the rise of a new civ that isn't particularly militaristic. This type of civ gets additional techs, one or two of which they may be the first to research. They are given a Great Person and may build a wonder or discover a new tech. It's not uncommon for them to found a new religion. 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).


Notes on use:

To make this component more exciting, the amount of Barbarian activity has generally been increased. Particularly, barbarian cities will form both earlier and more often to help this component fill in empty space in the game map with new players. With this change, a full standard map game will probably see a handful of barb civs emerge.

One fun way to play is start a large world with only a handful of civs, then let the barbarians fill in the gaps. Be prepared for a potential invasion from a rising power! BarbarianCiv also works quite well with the Revolution component that can spawn barbarian rebels.

On Terra maps, the "new" world will probably not be as "empty" as before. A new config variable, NewWorldPolicy, can be used to define how barb cities on their own continent behave so that you can customize how the new world will appear when the first explorers land. Options range from having it mostly full of civs to keeping barb cities as barbarian until someone starts colonizing.

There are many other settings in the .ini config file, including MilitaryStrength which can be used to create massive military invasions and modifiers for controlling the odds of civ formation.


Revolution Description
Enabled by default

The goal:

This component allows sections of disgruntled empires to rise up together and demand changes or attempt to break away from the motherland. No matter what the source of the complaint, you will be given an option to either ignore the complaint or accept the cities demands. If their demands go unmet and situations deteriorate, the cities may give you an ultimatum and take up arms if you do not comply!

How it works:

This component is intended to add realistic dynamics to the game, making keeping your cities and regions happy more important and challenging. Each city in your empire will have factors that make it want to stay and factors that make it want to rebel. If you cannot find a balance that keeps each of your cities happy, you will face revolts! Revolts come in many different styles, including requests to change civics, requests to change state religion, and demands for independence. No matter what the scenario, you will always be given choices when confronted with a rebellious city.

This component has been updated to support Vassal states and other new features of Warlords. It also now incorporates most of the ideas from the prior Rebellion component. The AI logic appears bug free, but it's difficult to test all the human popup handling. However, it has undergone extensive testing and is in a good working state. If you do encounter a revolution popup whose results don't follow from what you selected, please let me know!

More Details
Spoiler :

Each city has a Revolution Index, and when that index gets up towards 1000 they start to get restless. You will be warned whenever a city passes over 900 and every ~15 turns while it's in the danger zone, and once over 1000 it may instigate a revolution. Other nearby cities with rev indices over 600 can join in a revolution. If a city is unhappy, things are very similar but the minimum threshold for a revolution drops quickly with the number of unhappy citizens.
There are several different Revolution styles and the situation in the Revolution instigating city determines the style. Many styles have peaceful and violent variants: denying a request will just agitate the city further, but denying a demand will lead to civil war! In order of precedence:

- Return to or reform dominant culture: Cities in which you don't have a majority culture will become increasing aggitated and may attempt to break away for cultural reasons. The instigator and nearby, similarly cultured cities will ask (peaceful) or demand (violent) to join or reform a dead rival. Denying this request will cause your relations with the rival to deteriorate, and they may choose to declare war!

- Religious differences: Cities may ask for a change away from Theocracy or to Freedom of Religion, or to switch your state religion. They can also ask or demand independence for religious reasons.

- Homeland revolutions: Ask for various different civics. May ask for you to go on a crusade to capture your religion's holy city.

- Colonial revolutions: Ask for change to representative government. (Independence handled below)

- Capital or majority of cities revolting: Cities will ask for changes in away from repressive civics, or for some form of a say in the government. They can also ask or demand a change in ruler! If you're running a representative government, accepting their requests will mean facing election. If you are replaced, the game will automate some number of turns and then return control to you (this feature can be disabled).

- Independence: If none of these particular conditions apply, the cities will ask for or demand independence. They may request full independence or assume Vassal status.

If you face civil war, the situation may become quite dire. Strong garrisons may be able to maintain some semblance of control in some of the revolting cities, but weaker garrisons may be run out of town and the revolutionaries will take the city. Your homeland will not be the same for generations if you face multiple revolting cities on the battlefield! In addition, rebellious cities that the rebels have not yet taken may turn out rebel reinforcements.


The Revolution Watch

Clicking on the red fist button below the normal info buttons or pressing Ctrl-Shift-W in the game will open the Revolution Watch popup. This popup displays which of your cities is in danger of rebelling, thinking about rebelling, or happy with your empire. In each category, the cities are ordered with the most rebellious towards the top. In addition, cities whose local situation is deteriorating are shown in orange. For specific information on how your civ-wide policies or the local city situation are effecting the rebelliousness of the city, scroll down and click the details button. This will open a new popup containing a lot of important information about the rebelliousness of your cities.

At the top of this detail popup is an analysis of your national policies and situation. The effect of your civics, anarchy, golden age, empire size and fiscal situation are shown here. These affect all of your cities equally. Next is a city-by-city listing of local effects. The location of the city, the religions and cultures in the city, the happiness and healthiness of the people, the size of the city, the size of the city's garrison, and culture rate are all important factors you may see here. For both positive and negative effects the specific causes are ordered with the strongest first and grayscale indicating the intensity with whiter being more intense.

Your civics can have a significant effect on how these local factors are felt. For example, running a theocracy will cause cities with non-state religions to be more rebellious, but keep cities with your state religion less rebellious. Representative government civics will greatly decrease the effects of distance on outlying cities or colonies.

If you want to understand a bit more of how all of the revolution factors work, you can enable a debug option in Revolution.ini that will add some numbers to the Revolution Watch popup. While this level of information is unrealistic for the leader of an empire, it may help you understand how the mod reacts to certain decisions you make.


AIAutoPlay Description
Enabled by default

How to use

This component is a tool, you decide when you want to activate it and for how long. Press Ctrl-Shift-X to open the AIAutoPlay Chooser window, select a number of turns to auto play and select Full Automation from the drop down menu (or no automation). There is a new feature to have the AI only move your units. At the start of your turn, change whatever you want or move a couple units, then press Ctrl-Shift-M to have the AI do the rest of that turn. You can also cancel automation by pressing Ctrl-Shift-X again, but only when there are no popups open. To help with that, there is a config option to block some standard game popups.

In addition, there is a config option that will fortify all units fortified by the AI at the end of automation. Without this all units start active, although refortified units will not lose their defense percentage.

Potential uses

Great for debugging or watching the behavior of the AI, as it shows you only what the AI can see. Also, if you want to skip certain sections of the game, or you're so close to winning but not quite there, let the AI play it for you! With many civs in the late game, auto play will still take a while but you won't have to do anything ... it will basically take (# of turns)*(in between turn lag + a little bit) to go through the turns.
 
TechDiffusion Description
Enabled by default

The goal:

With this component, civs who fall behind in tech but have lots of friends will receive some free research.

How it works:

When a civ falls behind by several techs, they qualify for tech "welfare." Each turn that they are significantly behind, they will receive some free beakers towards techs they can research. The amount of free beakers depends on how many civs they know who already have the tech and what there relationships are, although the rate for powerful military techs is lowered since civs try harder to keep them secret. If a civ is behind by a handful of techs, they will get fractions of a percent of the research per turn. If they are behind by a dozen or more, the rate increases.

The diffusion of tech is capped so that civs don't receive techs for free but have to do the final research push themselves. The cap is low in the early eras, and moves up as the eras go on. If a civ is very far behind, the cap is ignored to try and keep them somewhat in the game.


DynamicCivNames Description
Enabled by default

The goal:

This component renames civs based on their civics choices and other status factors. A civs names will change many times over the course of a game. While it has no actual effect on game play, it adds dynamic variety to the game.

How it works:

When a civ is created or changes their civics, they are potentially assigned a new name based on many factors. Civs spawned by either Revolution or BarbarianCiv will get temporary names indicating their status, like Mongolian Horde or Russian Rebels, until they're more firmly established. When a civ switches to Hereditary Rule their name will change to something like Kingdom of America, while under Representation or Universal Suffrage they would be the American Republic. Civs with only one city in the later stages of the game may have the city name included in their title, but their civ type will always be clarified as in the French Kingdom of Paris. Vassals will also get different names. There are many different potential names, and even variations for civs with the same status to provide some flavor.

All of the civics determinations are made using the added Revolution flags in the civics xml file to support variations on the standard civics systems. Having a civic with the isCommunism bool set will cause Communist style names. In addition, some civs have special names like show up in certain circumstances, like the German Reich and Arabian Caliphate. These determinations are made by matching text in the civs adjective (ie German or Arabian).

This component has several features designed to support names of civs created by BarbarianCiv and Revolution, but would provide plenty of fun flavor name changes as a standalone mod or addition for other mods. It requires changes to the DLL to allow name changes to stick, but all name changes are generated in Python.

Feedback and suggestions for how to improve the names and add more variety would be great.


ChangePlayer Description
Enabled by default

How to use

This component is a tool, you decide when you want to activate it using two keyboard commands. Press Ctrl-Shift-L to open a popup allowing you to select which player you want to control. This works quite well and is stable. Press Ctrl-Shift-P to instead select a player and change their civ, leader or team. The leader and civ type do not have to correspond. This is not fully functional as of this writing, with the main issue being that existing unit flags do not update when you change a living player's civ type. Changing leader heads does appear to work without issue, and the traits will change as well.

Potential uses

Using this, you can take control of any other player in the game. One possibility would be to build up a fantastic empire for ~250 turns, then switch to controlling a rival and see if you can take down your own creation! Or, if you take control of a rebellion for fun, but then decide you want to go back to your old empire. You can enable this component in the middle of a game, but you'll probably need to quit and reload to see the change. The popup for changing a player's civ type or leader is mainly meant to demonstrate the possibilities of the SDK changes. However, if you want to see how things would be different if Bismark took over for Fredrick, or have always wanted to have Sid the Barbarian control the American Empire, these things are now possible.
 
This looks absolutely amazing!

I eagerly await the BTS conversion which will add even more functionality to this robust mod.

Congratulations and keep up the great work!
 
Looks amazing!:) may I add that it would be very cool to add a new mission for spies, support a revolt.
 
Looks amazing!:) may I add that it would be very cool to add a new mission for spies, support a revolt.

This will come with BTS, I think the built in Spy missions may work just fine, but if need be I'll tweak them. Being able to actively cause revolts in other civs will be a great addition :cool:
 
On Civics [last couple paragraphs are the ones concerning the mod.]
Ive noticed that Hereditary Rule is couted as a negative civec.
Hereditary Rule represents stability, not only that but though out most of history [and many would say still today if they look at the european monarchies [but not england]] a hereditary leader is more fit to rule as he is raised into leadership, trained from birth to rule the nation and therefore better suited to rule a nation, especially without the aid of post-industrial education.
on the whole people are happy within a monarchy and for most of history, indeed the last century alone has seen the rule of the republics against a thousand years of monarchs and fuedualism. The fall of the monarchies came about though the arrogance of versaillies, the conflict between the nobles of the sword and of the robe and economic crisis. The current viewpoint of the monarchies is modelled on the liberal popagandas, blame of the first world war and false histories.

Representation and Universal Sufferage suffer the strife of parties where the head of state is subject to the uncaring interparilimentary power struggles and not to the people, it can indeed be argued that democracy works better under a monarchy than a republic but for that one would have to seperate the definiton for democracy from that of republic, but the two words are growing closer together in meaning as american financal liberal politics distort the world.
An incompetent ruler may rise to power with just as much ease within a republic as under a monarchy, but in a monarchy there are more devices implace to prevent the their succession.
But weither or not a ruler is suitable the bulk of the population in a society of hereditary rule, or indeed a republic of post-hereditary rule prefer the rule of a monarch. and that is a much proven historical fact.


As such i would argue that Hereditary rule should be a posistive or neutral civec. And that the people should not call for universal sifferage or representation unless the kingdom is in serious strife [failing economy, mass starvation, high losses in foreign wars etc.]


And secondly, and for this i wont give an explaination for, but it concerns Nationhood.
I think that nationhood ought to increase the chance that a colony will demand independance but decrease it for cities within the home provience.
thank you.
 
@ orinsul:

The tradeoffs between representation and monarchy are many, and you raise some good points. I would argue, however, that representative systems have one source of added stability over monarchies: a defined path to power. While it is perhaps true that a hereditary ruler who keeps the people's interest in mind is less prone to unrest, they are always under threat from others who want power. Whether it is brothers vying for the crown or nobles who want a piece of the action, the threats to stability are great.

While this isn't well represented in the text of the revolution popups, the threats from local leaders and others with a claim to power are one of reasons Hereditary Rule is considered a negative effect. For the record, before Representation is discovered, Hereditary Rule is only a -2 effect (quite small). Nonetheless, if you wish to change this is it simple to do so using just XML, see the FAQ in the download.

There are some effects from nationhood, but I will keep your suggestion in mind for the new system I'm working on for the BTS version of the mod.
 
thanks for that and no worries.
 
Where is it? This sounds like an interesting Mod pack...Haven't played CivIV (Too busy BTS-wise), but i hope it'll be a cool mod... Can't wait for BTS compatible
 
orinsul, about hereditary rule being good or neutral i think it should stay negative becouse well. Having soldiers in town makes happines. What kind of "happiness" do you think it is? "Love our queen or die! hey peasant! do you like our queen?!"

Though the nationhood suggestion should work more this way, cities with your culture and state religion should be safer but cities with another culture and religion should have a higher chance of breaking from your nation.
 
Very similar, but not permanent ... they could fall apart and return back to independent civs. Getting this to work right is a huge task so it's only an idea right now. I had it partly working for Warlords by creating a reverse function to the one that creates a Permanent Alliance, but there were so many details (particularly plot visibility) that I couldn't see how to work out cleanly. I think if I was to start that effort over I'd base it more on the Vassal system (which leaves the players on separate teams) and not the Permanent Alliance system. Other issues include the limitations on modifications to diplomacy since some of it appears to be locked up in the exe for some reason.
 
Couple of questions on rebellious civs:
What happens to diplomacy with a break-away Civ? As in, how does the 'motherland' Civ view a new nation and would there be any factors governing how other foreign civs would react? Would, say, a totalitarian or Nationalist government view the new nation with suspision whilst a foreign Democratic nation have a slightly negative oppinion of the mother Civ (think international outcry over Tibet).

I really love the idea and think this is awesome, I'm just trying to make it sound like I could help it be better :p
 
On Civics [last couple paragraphs are the ones concerning the mod.]
Ive noticed that Hereditary Rule is couted as a negative civec.
Hereditary Rule represents stability, not only that but though out most of history.

[...]

As such i would argue that Hereditary rule should be a posistive or neutral civec. And that the people should not call for universal sifferage or representation unless the kingdom is in serious strife [failing economy, mass starvation, high losses in foreign wars etc.]


And secondly, and for this i wont give an explaination for, but it concerns Nationhood.
I think that nationhood ought to increase the chance that a colony will demand independance but decrease it for cities within the home provience.
thank you.

I totally agree with that !

i also think that slavery and serfdom are less risky than tribal system in concerns of building an empire. it´s rather tribes that would demand idenpendence, than slaves or bondsmen. they had more elementary needs.

you know, i´m saying this because i have difficulties maintaining an empire of seven cities on a huge worldmap (marathon speed). there´s really nothing i can do to prevent my 2 citicen size cities from revolting. i can´t lower the distance, can i? and i´m forced to keep tribal system in order to lower the risk of revolt. i buildt the pyramids to have a counterpoise but even that could not avoid revolt. i could bribe them, but that implements higher taxes for a while, so the effect is close to zero.
in ancient ages people didn´t care so much about who run the country, as long as they didn´t suffer so much. and even if they did, what could they´ve done?
my people defenatly don´t suffer, they don´t starve, they´re happy!!
it´s a 10 :) to 2 :mad: relation

i have to admit that they used to be indian before, but ghandi that petty tyrant declared war on me so i took the chance to wipe´em out and double the size of my empire from 3 to 6 cities. but still i think they somehow harm themselves.

don´t get me wrong. it´s a great mod, but i think it has to be rebalanced.
 
Known Issues

Existing unit flags do not update when you change a living player's civ type. Putting a player on a new team may result in them losing contact with other players they have met, but their new team has not.

Hum, for my mod, i found a solution:

In CvPlayer.cpp file (just after the civ modification):
Spoiler :

EraTypes eEra = getCurrentEra();
bool bAuto = m_bDisableHuman;
m_bDisableHuman = true;
setCurrentEra((EraTypes)0);
setCurrentEra((EraTypes)(GC.getNumEraInfos()-1));

setCurrentEra(eEra);
m_bDisableHuman = bAuto;
gDLL->getInterfaceIFace()->makeInterfaceDirty();


The units' flags are updated by this way, using the eras' graphic updates ;-).
 
Top Bottom