Due to a sudden burst in spammer activity, account creation has been temporarily disabled. Sorry for the inconvenience to any new potential contributors.
Revolts - Advanced Mode
From AGEWiki
As of 2010-10-21 a new set of code and variables has been done to handle several types of revolts.
As a reminder, the previous commands and concepts to handles revolts were:
- RevolterInfos: Done for BOA1/WIA, they represent the uprising of a single unit in a region with a town, with high loyalty for you, and unoccupied by the enemy. Think ‘minutemen’.
- Autoraise: Also done for BOA1/WIA, this is a method to raise twice per year units in some areas, if some conditions are met. Can still be useful for partisans, but it needs to add a force pool (allowance) of units directly into the Units DB, plus the areas must be determined in the DB too. AACW partisans used this method also.
- Uprising Infos: Was done for VGN to represent Social uprising. Is now deprecated.
- Tribal Infos: Was done for VGN to represent … tribal revolts. Has been improved and upgraded into ‘Advanced Revolts’, the object of this document.
Contents |
Advanced Revolts
A set of advanced revolt info must be defined for each faction that can generate revolts. The types of revolts that can be handled by the system are:
- a) Tribal Revolts
- b) Irredentist/Nationalist revolts
- c) Partisans generation
- d) Social uprising
Categories a,b,c are really the same in the end for the code. A revolt will be qualified as a tribal revolt if it occurs in a colonial territory (rulColonialMode must be active to have colonies). A nationalist/irredentist revolt will occur in non colonial territory and is strongly tied to the loyalty (aka Nationality) presents in the region (from the revolted point of view). A partisan generation is as case (b) but will not cease even if the capital is liberated, contrary to (b). Last, a social uprising is a special revolt where the population revolts against his own state, so the owner of the region is not different from the nationality of the revolted. This revolt is also discreet (see below).
Concepts
There can be three types of revolts strength and behavior: Primary, Secondary, Tertiary.
A primary revolt occurs when there is no ongoing revolt for the nation, and the revolt risk dice tells the code that a revolt should happen. This is the strongest revolt, and it will use the InitStrength data of the revolt to check how many units are created. The revolt happens in several regions at once.
A secondary revolt occurs when there is already a revolt underway, and the revolt risk dice indicates there is a new revolt. Here, a new revolt appears, but with the strength indicated with RegenAmount. The revolt happens in several regions at once.
A tertiary revolt is a special case, and is only used in case of social uprising. This revolt only happens in one region and is not considered to put in ‘active mode’ the revolt info (so the ’discreet’ qualification). It means that if a full scale revolt has to trigger, then it will be a primary one, not a secondary. This revolt also only happens because of discontent population, in national territory and if the region is still owned by the faction. The Discontent value is a variable only used in rulSocialMode advanced, and only present in national regions.
- A note of importance: Social uprising will give units to the REB faction. This special faction has to be defined so to have any social uprising on the map. Correlatively, all social uprising happening on the map will produce units that will be given to the REB faction. Social uprising uses a special force pool (from the data fields CityUp & CountryUp)
When a revolt is active, it can be reinforced (so if only social uprising are happening, no reinforcement can happen). A reinforcement has a 10% chance per turn to trigger, and will make use of RegenAmount and MaxRegenHits variables. You can see that as if the revolt is tapping into a pool of soldiers, when it is done, it is done … but this hits pool get regenerated when a new (full scale) revolt is triggered because of the revolt risk (secondary revolt). So theoretically, a revolt can grow bigger and bigger, until it depletes all its force pool.
Addition to version 2 of the code: If the faction of the revolting units would not be at war with the nation owning the region, the units are now given to the REB faction, which is at war with everybody all the time.
To summarize:
- Tribal, Nationalist and Partisans revolts can be either Primary or Secondary Revolts.
- Social Uprising are Tertiary revolts.
Scripting
These variables are set with SetAdvRevolt:
SetAdvRevolt = FacTag; RevoltStrength; RegenAmount; MaxRegenHits ; LosePerc; WinPerc; CityUp; CountryUp
OR
SetAdvRevolt = RevoltStrength; RegenAmount; MaxRegenHits ; LosePerc; WinPerc; CityUp; CountryUp
In the second case, the faction currently in selection will be the one used.
These data are mandatory to define a revolt for all sub-types of advanced revolts.
- RevoltStrength: initial strength when a new revolt appears
- RegenAmount : Amount of Hits of units added to the hits pool per regen trigger OR hits received by a tertiary (social uprising) revolt
- MaxRegenHits : Max hits that the revolt receive with RegenAmount OR hits received by a 2nd revolt
- LosePerc : If % of regions held is <= to this number, then revolt has lost
- WinPerc : If % of regions held is >= to this number AND primary capital owned, then revolt has won
- CityUp: UID of the unit to use in case of social uprising, if there is a city.
- CountryUp: Same, but if there is no city.
Revolt Force Pool
The second concept is Force Pool. It is mandatory to specify a force pool for a revolting nation, whatever the type of revolt, even in case of social uprising. If there is no force pool, no revolt can even happen. Also, as a convenience, if InitStrength equals 0, then no revolt can happen, even social uprising (tertiary type) and even if this type of revolt doesn’t make use of this variable. This is done so that if you need to disable for some turns by script revolt possibilities, then you don’t have to delete all the info (Force Pool and list of regions), you just have to set to 0 InitStrength for a while.
Ideally, if the game spans tens of years, you’ll want at some points to change the force pool with more modern units (or under some conditions, like arming the Braves, etc.)
SetAdvRevoltFP = FacTag;Unit1;Nb1;Unit2;Nb2..
OR
SetAdvRevoltFP = Unit1;Nb1;Unit2;Nb2..
In the second case, the faction currently in selection will be the one used.
These data are mandatory to define a revolt for all sub-types of advanced revolts. Note that Social uprising tap into a different force pool, and there is no limitation on number.
The force pool is used in a ‘standard’ way for primary and secondary revolts, meaning that it can be depleted, so no more forces can be raised. For Tertiary revolt there is no force pool limitation: the REB faction will receive these units, not the faction owning the region! (It is also possible under some cases to have others revolts types give the units to the REB). If the unit to pick has an Area defined and the revolting region is not in that area, it won’t be picked. Beware to not put too many constraints here. You can always have some local units for each area plus some without area, as a fall back solution.
Regions list & Base revolt chance
A primary or secondary revolt will occurs at several places at once, according to a region list. This region list can be either scripted, or left empty. If the regions list is left empty, then the code will determines itself what are the regions where the revolt occur. There will be a revolt center, which is the region that has failed (or succeeded, depending on the side you are) the revolt risk dice roll. From this spot, all regions at a distance of 6 regions (on average, there is an approximation calculation) that have at least 1% nationality (aka Loyalty) in favor of the revolted can be part of the revolt.
If the revolt is a social uprising, then only the region where the dice failed will be the region in revolt (so it is also discreet in the sense that it involves only one region).
In both case, the % of loyalty (nationality) in favor of the revolted will be an important variable, either to determine the revolt risk, and when a revolt occurs where the units are placed.
Also note that once a revolt triggers, the quantity of units raised is not tied to the loyalty % and number of regions included in the list of revolting regions. The variable was used before hand.
To set the list of regions, this script command is used:
SetAdvRevoltLoc = FacTag;Region1;Coeff1;Region2;Coeff2..
OR
SetAdvRevoltLoc = Region1;Coeff1;Region2;Coeff2.. and we use current faction
Now, one can wonder why script a list of regions, if the code can work without. There is one big advantage to the method. The advantage is that each region has a coefficient associated that will alter further the revolt risk with 100 being no change. The main determinant of revolt risk, without this coefficient, will be the loyalty (nationality) of the revolting region.
For example if a Greek region is under Ottoman rule, and that the Greeks have 60% nationality, then the chance to revolt will be:
(50 + Loyalty)/100 * (100 + FM)/100
FM is a Faction Modifier, initially at 0 that can increase all revolt risk (or reduce it): $fmdRevoltRiskMod
With a 60% loyalty, this gives (with FM not set):
110/100 * 100/100 = 1.1% chance per turn
This is what is called the base chance, without taking into account local factors (more on that below). As you see, without scripting, loyalty is all what matters.
With scripting, and the usage of a coefficient, you can alter (refine) revolt risks, to lower them in some regions and increase them in others. For example you decide that South Sahara was very troublesome, or that some mountainous regions in Afghanistan were the most rebellious. On the contrary, you decide that even if Oran has a very high % of non-French national, it should never rebel. So here, you need to alter revolt risk, despite what the loyalty would tell. That’s the reason why you can want to script a list of regions, with associated parameters.
In the first version of the code, regions that did not have a scripted coefficient could not have their revolt risk modified, so it prevented the usage of Regions Decisions to ‘play’ with that. Now, it is possible. If an unscripted region has its RR modified, then we add the entry with a base of 100.
For simplification sake, only one nation per region can revolt, and this nation will be the one with the highest base % chance.
Final Revolt Chance
Once the base revolt chance is determined for each region on the map (with at most one nation able to rebel in the region), the values are refined with the local conditions.
The base of the final revolt chance (!) is popAdvRevoltBaseChanceH = 200, i.e 2%. This base is to be understood has an overall coefficient to all revolt risks. Lower it, you reduce all revolt risks in the game, increase it for the reverse effect.
At the end of calculation this BaseLocalRR (currently at 200) will be multiplied by the Revolt Risk we calculated above to get the Final RR, or simply RevoltRisk.
This BaseLocalRR will be altered, for non tertiary revolts, with the relationship the revolted have with the owner of the region.
This hundredth of % as a modifier to RR per pt of rel > 0, with -5, a rel of +20 reduces by 1% RR:
popAdvRevoltModRelPosH = -5
This hundredth of % as a modifier to RR per pt of rel < 0
popAdvRevoltModRelNegH = 10
Hostile combat power in the region lowers revolt risk:
Each cbt power point in region changes by this amount the RR (in hundredth), so -10 is -1/10 of % to revolt:
popAdvRevoltModCbtSupprH = -10
If the revolt is a social uprising, but of category ‘light uprising’, then chance is divided by two (Social uprising is a result of population behavior. In advanced social mode, each population of each of your national region is under one of 10 behaviors, ranging from enthusiastic to severe uprising).
Last, many buildings can lower revolt risks, in colonial regions but elsewhere too (outpost, forts, etc.). This value can be set in the Structures files using colRRChange
So in the end, this BaseLocalRR (starting at 200) will generally be lower. It will then be multiplied by the initial Revolt Risk to get the final revolt risk.
Example with the Greeks.
We determined that the Base RR was 1.1%. Lets alter reality and say that the Greek would-be nation has a parameterized Faction Modifier for revolt risk of 100 ($fmdRevoltRiskMod = 100), so the Base RR is now 2.2 %. We calculate the Local revolt risk coefficient:
BaseLocalRR = 200 (this is a constant) Relationships between Greeks and Ottoman Empire is -75, so 200 + 75*10 = 950 There is a significant garrison of Turks in the region, a militia garrison worth 70 points, so we lose 700 points, down to 250. A level 1 fort is in the region, with a colRRChange = -100, so we are down to 150. The final revolt risks will be 2.2% x 150/100 = 3.3% per turn.
Not bad for a heavily garrisoned region! But remember, we gave a generous 100 in the FM dealing with revolt risks. If the region was scripted with a coefficient, the chance would have been altered further (below 3.3% if the coefficient was under 100, above it if the coefficient was above 100).
Won & Lost revolts
A revolt will have won when it is holding its capital region (so you need to define a capital region for the faction) and if it possesses at least WinPerc % of regions within the list of regions around the capital (at an approximate distance of 6 regions).
For partisans style revolts, where the capital can be in control from the start (and the country is fighting off an invader) then just set WinPerc to 101. Revolt will never “cease” but remember that a revolt can really only occurs in regions not controlled by the revolted (except in the case of social uprising), so in the end, there is no unwanted side effect. The rebels count the capital as owned (and others regions as owned) if a friendly nation also control them. In the case of a capital owned by a friendly nation, in case of win, all the control and structures in this region is transferred automatically to the revolted.
A revolt is lost when the rebels control less than LosePerc regions in the region list, in this case all remaining units are removed and the revolt is considered stopped. A stopped rebellion can restart, of course (but an ongoing revolt increase the chance of secondary revolts…)
Miscellaneous
A social uprising will reduce by 1% (PopBhv_MilitModRevoltH) the militancy of the region where the revolt appears. The number of hits that such a revolt receives is increasing for each 1000 pop points above 1000.
In some cases, the revolt risk is reduced to zero, if:
- In case of a tribal nation, the relationship with the owner is positive.
- In case of a non tribal nation, there is no state of war between the owner and the would-be rebel.
It’s possible to remove all possibilities of revolt if the loyalty (nationality) of the revolted is not at least a certain value, using popAdvRevoltMinLoyalty. Don’t use this value if there is possibility of social uprising (leave it to 0), as Social Uprising happens in region with high Nationality/loyalty %.
Once Rebels units appear for any reason, there is a small chance that they will eventually give back the region to a nearby friendly nation. For that, the region where they are must have at least 50 in Population Contentment (meaning that if they were generated because of social uprising, they will not disappear spontaneously!).
Summary of variables used
- popAdvRevoltBaseChanceH = 200 // this hundredth of % per turn to revolt
- popAdvRevoltModRelPosH = -5 // this hundredth of % as a modifier to RR per pt of rel > 0, with -5, a rel of +20 reduces by 1% RR - not for social uprising
- popAdvRevoltModRelNegH = 10 // this hundredth of % as a modifier to RR per pt of rel < 0
- popAdvRevoltModCbtSupprH = -10 // each cbt power point in region change by this amount the RR (in hundredth), so -10 is -1/10 of % to revolt
- popAdvRevoltReinforcePerc = 10 // chance that a primary/secundary revolt get reinforced every turn
- popAdvRevoltCoeffActive = 150 // if a revolt is active, x1.5 chance to get a secondary revolt
- popAdvRevoltMinLoyalty = 0 // if this loyalty (for the revolter!) not reached, no revolt can happen (only in non adv social mode )
- popAdvRevoltMaxDistanceHeur = 6 // max distance between center of revolt and any revolting region - is using sysAvgLandRegionSize_ and sysAvgNavRegionSize_ to get an approximate (heuristic) result
- popAdvRevoltCoeffForCenter = 4 // Center of revolt has x4 chances to be picked when adding units
- popAdvRevoltCoeffAdjCenter = 2 // Adj to Center of revolt has x2 chances to be picked when adding units
How to
Social Uprising
The rule rulSocialMode must be activated. A REB faction must exist. A force pool must be set.
Tribal revolts
All data must be entered (general parameters, Force Pool and strongly advised, Region list, so that RR can be fine tuned). A capital must be indicated and the relationship must be < 0 between the tribal and the occupiers.
National /irredentist revolts
Same as tribal revolts, although region list is not strictly mandatory it can be useful. The relationship between revolted and occupier should be negative. If there is no State of War, then a REB faction must exists.
Partisans/ generic revolts
Same as tribal revolts, although region list is not strictly mandatory it can be useful. The relationship between revolted and occupier should be negative plus a state of war must exist unless you plan for a REB faction (if rulDiplomacyMode is simple, then negative relationship and state of war is the same, if rule is advanced a DiploItem must have been set ). Also, the WinPerc must be 101 in the case that the partisans continue fighting after the recapture of the capital (or if the capital is held from the start). popAdvRevoltMinLoyalty can be used to filter regions without enough partisans loyalty.
Triggering a revolt by script
TriggerAdvRev = <RevoltTypeUID>
RevoltTypeUID must be one of these:
- $revPrimary = 5
- $revSecondary = 10
- $revTertiary = 15
You can trigger a secondary revolt by script even if no primary is active, it will just give a less powerful revolt. Only use tertiary for social uprising against own nation.
The revolt center will be the currently selected region.
Tips and Hints
- Keep the unit pools small, unless you want a lot of revolts everywhere!
- The revolting unit is best used only fror revolts, as any of them on-map count toward the total available, regardless of whether they spawned by revolt.
- I set RUS Revolt Pools to have little to no chance for 'secondary' revolts, to keep them scattered. May not be best for say, Spartacus.
- The revolting units will only appear in their "HomeArea", so you can define several units for each faction, with one per Area. [See WHI in RUS: Southern, Don, Northern, Northwest rise at 'home'.
Example settings
[from Revolution Under Siege version 1.06a in \Settings\GameLogic.opt]
This creates Partisan Uprisings
// ***** REVOLTS and Loyaty ***** // with the base = 100 and +3% for Relations, we start at 4% per region per turn! // popAdvRevoltBaseChanceH = 100 // this hundredth of % per turn to revolt [120901 changed from 20 to 100] popAdvRevoltModRelPosH = -5 // this hundredth of % as a modifier to RR per pt of rel > 0, with -5, a relationship of +20 reduces by 1% RR - not for social uprising popAdvRevoltModRelNegH = 3 // this hundredth of % as a modifier to RR per pt of rel < 0 // so for -100 relationship, this adds 3% popAdvRevoltModCbtSupprH = -10 // each cbt power point in region change by this amount the RR (in hundredth), so -10 is -1/10 of % to revolt popAdvRevoltReinforcePerc = 1 // chance that a primary/secundary revolt get reinforced every turn popAdvRevoltCoeffActive = 50 // if a revolt is active, x0.50 chance to get a secondary revolt popAdvRevoltMinLoyalty = 51 // if this loyalty (for the revolter!) not reached, no revolt can happen (only in non adv social mode ) popAdvRevoltMaxDistanceHeur = 6 // max distance between center of revolt and any revolting region - is using sysAvgLandRegionSize_ and sysAvgNavRegionSize_ to get an approximate (heuristic) result popAdvRevoltCoeffForCenter = 4 // Center of revolt has x4 chances to be picked when adding units popAdvRevoltCoeffAdjCenter = 2 // Adj to Center of revolt has x2 chances to be picked when adding units