User avatar
loki100
AGEod Guard of Honor
Posts: 2399
Joined: Sun Aug 14, 2011 4:15 pm
Location: Caithness
Contact: Website Twitter

cleaning up Italy

Sun Jan 19, 2014 12:18 pm

The idea of this thread is to put together some short events that will help the AI complete the alternative unification chain. Its clear from the recent round of AARs (and this is one reason why we need more - it confirms these patterns) is that S-P on its own is not using the unification cards effectively.

For those who haven't played Italy, you have a regional decision card and if this is played steadily on the Italian minors will mean that come 1865 Italy south of the Po unifies. Its clear from reports that Sardinia-Piedmont (S-P) is only doing this consistently in Rome, meaning the other minors (Parma, Tuscany and the Two Sicilies) stay independent. The key issue here is that decision that rounds up all these sub-steps relies on all to have happened as:

SelectFaction = $ITA
SelectRegion = $Lazzio
StartEvent = evt_nam_PIE_ItalianUnity1870|1|2|evt_txt_ITA_RomeCapital1867|Event-img_ITA_RomeCapital1867|$Lazzio|NULL

Conditions
MinDate = 1866/01/01
MaxDate = 1875/03/10
Probability = 50
EvalEvent = evt_nam_ITA_Unification1871;=;0
EvalEvent = evt_nam_ITA_Parma_UnificationOK;=;1
EvalEvent = evt_nam_ITA_Toscana_UnificationOK;=;1
EvalEvent = evt_nam_ITA_PapalStates_UnificationOK;=;1
EvalEvent = evt_nam_ITA_TwoSicilies_UnificationOK;=;1


So these events are designed to make it likely that the chain will end up working as intended.

There are some assumptions I've made.

The AI must somehow take in Rome - from all reports it tends to do this. My logic is that there was a small trend in Piedmontese politics that rejected unification with the south and saw a future for S-P as a 'Sparta of the nineteenth century' with a small well trained army and a powerful industrial base. So this allows the very unlikely, but possible, outcome that S-P turns its back on unification post-Cavour.

Should stress that here I am only interested in revising this chain up to 1870 - so this is not an attempt to model a non-unification decision into a later iteration.

If Rome is S-P held, then a set of agitations will occur in Parma and Tuscany that will, almost certainly, bring them into the new state.

If Rome is S-P held, this will set off tensions with the Two Sicilies. This tension will either end in unification (as set up by the alternative chain) or a full war between the two states. Full War is important as it will force the campaign to a conclusion - one or the other will end up ruling all of Italy, there is no lesser peace available (this of course models the American Civil War).

I think S-P will win, but it will then be hampered by unrest etc.
AJE The Hero, The Traitor and The Barbarian
PoN Manufacturing Italy; A clear bright sun
RoP The Mightiest Empires Fall
WIA Burning down the Houses; Wars in America; The Tea Wars

User avatar
loki100
AGEod Guard of Honor
Posts: 2399
Joined: Sun Aug 14, 2011 4:15 pm
Location: Caithness
Contact: Website Twitter

Bringing in Parma and Tuscany

Sun Jan 19, 2014 12:48 pm

My assumption here is I want to model something close to what would happen if the alternative chain worked. The timescale is set as a sort of one-off and that fits with when the alternative is meant to work (1866) and has a 40% chance per turn over 12 turns. So there is a small chance of it not working but in most games it will happen. Note that if this does fire, the alternative chain will be broken - no problem as we get to the same point - and it will allow the capital to Rome events etc to work as intended.

Three key conditions, the alternative chain has failed, the minor states are not absorbed in a different way and S-P holds Rome, which gives us:

SelectFaction = $ITA
SelectRegion = $Toscana
StartEvent = evt_nam_ITA_Toscana_secondary unification|1|1|NULL|NULL|$Toscana|NULL

Conditions
SelectFaction = $ITA

CheckAILevel = 1
MinDate = 1867/01/01
MaxDate = 1867/06/01
EvalEvent = evt_nam_PIE_ItalianUnity1870;=;0
EvalRgnOwned = $Lazzio
EvalRgnOwned = $Toscana;NOT
Probability = 40

Actions
SelectFaction = $ITA
SelectRegion = $Toscana
ChangeRgnOwner= TOS
ChangeLoyaltyFac = 40
AbsorbFaction = TOS;100;100;100;100;100;100;100
ChgFacDisplayTag = ITA

EndEvent

SelectFaction = $ITA
SelectRegion = $Parma
StartEvent = evt_nam_ITA_Parma_secondary unification|1|1|NULL|NULL|$Toscana|NULL

Conditions
SelectFaction = $ITA

CheckAILevel = 1
MinDate = 1867/01/01
MaxDate = 1867/06/01
EvalEvent = evt_nam_PIE_ItalianUnity1870;=;0
EvalRgnOwned = $Lazzio
EvalRgnOwned = $Parma;NOT
Probability = 40

Actions
SelectFaction = $ITA
SelectRegion = $Parma
ChangeRgnOwner= PAR
ChangeLoyaltyFac = 40
AbsorbFaction = PAR;100;100;100;100;100;100;100
ChgFacDisplayTag = ITA

EndEvent
AJE The Hero, The Traitor and The Barbarian
PoN Manufacturing Italy; A clear bright sun
RoP The Mightiest Empires Fall
WIA Burning down the Houses; Wars in America; The Tea Wars

User avatar
loki100
AGEod Guard of Honor
Posts: 2399
Joined: Sun Aug 14, 2011 4:15 pm
Location: Caithness
Contact: Website Twitter

Two Sicilies ... as above

Sun Jan 19, 2014 12:57 pm

This is very similar to the above but with 2 key differences. A unified Italy is going to have problems in the south - remember this assumes Garibaldi has failed (so the South has seen massive repression) and lets assume the Bourbon's are not happy. Second the possibility is lower, this should happen 12*10% but feasibly it may not (there is around a 25% of it failing - I'll spare you the maths). In that case, we'll jump to the next post:

SelectFaction = $ITA
SelectRegion = $Napoli
StartEvent = evt_nam_ITA_Two Sicilies_secondary unification|1|1|NULL|NULL|$Napoli|NULL

Conditions
SelectFaction = $ITA

CheckAILevel = 1
MinDate = 1867/01/01
MaxDate = 1867/06/01
EvalEvent = evt_nam_PIE_ItalianUnity1870;=;0
EvalRgnOwned = $Lazzio
EvalRgnOwned = $Napoli;NOT
Probability = 10

Actions
SelectFaction = $ITA
SelectRegion = $Napoli
ChangeRgnOwner= SIC
ChangeLoyaltyFac = -10
AbsorbFaction = SIC;100;100;100;100;100;100;100
ChgFacDisplayTag = ITA

EndEvent
AJE The Hero, The Traitor and The Barbarian
PoN Manufacturing Italy; A clear bright sun
RoP The Mightiest Empires Fall
WIA Burning down the Houses; Wars in America; The Tea Wars

User avatar
loki100
AGEod Guard of Honor
Posts: 2399
Joined: Sun Aug 14, 2011 4:15 pm
Location: Caithness
Contact: Website Twitter

Two Sicilies - it all goes wrong

Sun Jan 19, 2014 1:05 pm

This assumes the above fails, the result is a civil war as tensions between the Two Sicilies and Piedmont explode into a struggle to the death for control of Italy:

SelectFaction = $ITA
SelectRegion = $Napoli
StartEvent = evt_nam_ITA_Two Sicilies_war|1|1|NULL|NULL|$Napoli|NULL

Conditions
SelectFaction = $ITA

CheckAILevel = 1
MinDate = 1867/07/01
MaxDate = 1867/08/01
EvalEvent = evt_nam_PIE_ItalianUnity1870;=;0
EvalEvent = evt_nam_ITA_Two Sicilies_secondary unification;=;0
EvalRgnOwned = $Lazzio
EvalRgnOwned = $Napoli;NOT

Actions
SelectFaction = $ITA
AddDiploItem = SIC;$diFullWar;CURRENT

EndEvent
AJE The Hero, The Traitor and The Barbarian
PoN Manufacturing Italy; A clear bright sun
RoP The Mightiest Empires Fall
WIA Burning down the Houses; Wars in America; The Tea Wars

User avatar
Crixdaz
Sergeant
Posts: 92
Joined: Sun Sep 23, 2012 10:45 am
Location: Granada, Spain

Sun Jan 19, 2014 1:12 pm

Congrats for this work, would be awesome if this problems could be fixed and added to the official patch.

Good job ;)
Excuse my bad english, don't doubt to correct me ;)

User avatar
loki100
AGEod Guard of Honor
Posts: 2399
Joined: Sun Aug 14, 2011 4:15 pm
Location: Caithness
Contact: Website Twitter

to wrap this up

Sun Jan 19, 2014 1:20 pm

Here's two alternative ways to end all this. The first assumes, war or no war, Italy goes forward as it should - it has Rome as its capital and a limited colonial options. It is now unified south of the Po. The second assumes that Sicily has won the war - remember as it is a full war the AI can't opt out. Here I've essentially defined 'win' as occupy Piedmont. In that case, Italy remains fragmented - I've assumed the Bourbons want to be left alone rather than actually conquer S-P, so:

SelectFaction = $ITA
SelectRegion = $Piedmont
StartEvent = evt_nam_back to where we started_Italy wins|1|1|evt_txt_ITA_RomeCapital1867|Event-img_ITA_RomeCapital1867|$Lazzio|NULL

Conditions
SelectFaction = $ITA
CheckAILevel = 1
MinDate = 1868/01/01
MaxDate = 1880/06/01

EvalRgnOwned = $Lazzio
EvalRgnOwned = $Napoli
EvalRgnOwned = $Puglia
EvalRgnOwned = $Sicilia

Actions
SelectFaction = $ITA
SettleWhitePeace = ALL

DescEvent = evt_desc_PIE_ItalianUnity1870
SetEvtOccurs = evt_nam_ITA_GaribaldiSicily1860;MaxOccurs;0
SetEvtOccurs = evt_nam_ITA_GaribaldiPalermo1860;MaxOccurs;0
SetEvtOccurs = evt_nam_ITA_GaribaldiCalabria1860;MaxOccurs;0
SetEvtOccurs = evt_nam_ITA_GaribaldiNaples1860;MaxOccurs;0
SetEvtOccurs = evt_nam_ITA_FirstParliament1861;MaxOccurs;0
SetEvtOccurs = evt_nam_PIE_ItalianUnity1870;MaxOccurs;0
SelectRegion = $Lazzio
ChgPopContent = 20
SetCapital = $Lazzio;10
ChgVPCount = 1000
ChangeLoyaltyFac = $Area_Northern_Italy;10
ChangeLoyaltyFac = $Area_Southern_Italy;25
ChangeLoyaltyFac = $Area_Central_Italy;35
ChangeStrucPool = $ITA_Accademia_Militare;1
ChangeStrucPool = $ITA_Naval_Academy;1
ChgRgnDecisionFP = $rgdExploreParty;1
ChgRgnDecisionFP = $rgdNatExpedition;1
ChgRgnDecisionFP = $rgdGeoExpedition;1
ChgRgnDecisionFP = $rgdAnthroExpedition;1
ChgRgnDecisionFP = $rgdProspection;1
ChgRgnDecisionFP = $rgdProsecute;2
ChgRgnDecisionFP = $rgdPacify;3
ChgRgnDecisionFP = $rgdRetaliate;3
ChgRgnDecisionFP = $rgdOutpost;5
ChgRgnDecisionFP = $rgdGunboatDiplomacy;1
ChgRgnDecisionFP = $rgdNavalDemo;1
ChgRgnDecisionFP = $rgdChiefBribing;3
ChgRgnDecisionFP = $rgdChiefTreaty;2
ChgRgnDecisionFP = $rgdChiefTerritory;1
ChgRgnDecisionFP = $rgdMissionary;2
ChgRgnDecisionFP = $rgdMerchants;5
ChgRgnDecisionFP = $rgdTradepost;10
ChgRgnDecisionFP = $rgdRoad;5
ChgRgnDecisionFP = $rgdTelegraph;1
ChgRgnDecisionFP = $rgdSchool;3
ChgRgnDecisionFP = $rgdVaccination;0
ChgRgnDecisionFP = $rgdSanitation;0
ChgRgnDecisionFP = $rgdImmigrants;1
ChgRgnDecisionFP = $rgdSociety;1
ChgRgnDecisionFP = $rgdProtectorate;1
ChgRgnDecisionFP = $rgdColony;1
ChgRgnDecisionFP = $rgdStake;3
SetEvtOccurs = evt_nam_ITA_Unification1871;MaxOccurs;0

EndEvent

SelectFaction = $SIC
SelectRegion = $Piedmont
StartEvent = evt_nam_back to where we started_Sicily wins|1|1|evt_txt_ITA_RomeCapital1867|Event-img_ITA_RomeCapital1867|$Lazzio|NULL

Conditions
SelectFaction = $SIC
CheckAILevel = 1
MinDate = 1868/01/01
MaxDate = 1880/06/01

EvalRgnOwned = $Lazzio
EvalRgnOwned = $Napoli
EvalRgnOwned = $Puglia
EvalRgnOwned = $Sicilia
EvalRgnOwned = $Toscana
EvalRgnOwned = $Piedmont

Actions
SelectFaction = $ITA
SettleWhitePeace = ALL

DescEvent = evt_desc_PIE_ItalianUnity1870
SetEvtOccurs = evt_nam_ITA_GaribaldiSicily1860;MaxOccurs;0
SetEvtOccurs = evt_nam_ITA_GaribaldiPalermo1860;MaxOccurs;0
SetEvtOccurs = evt_nam_ITA_GaribaldiCalabria1860;MaxOccurs;0
SetEvtOccurs = evt_nam_ITA_GaribaldiNaples1860;MaxOccurs;0
SetEvtOccurs = evt_nam_ITA_FirstParliament1861;MaxOccurs;0
SetEvtOccurs = evt_nam_PIE_ItalianUnity1870;MaxOccurs;0

ChgVPCount = -1000

EndEvent


Odds on this set of events should make the alternative chain work as intended but its clear the AI is not playing its unification cards as intended. I've added a small sting in the tail -we don't want deteminism - which you can remove if you wish - simply set the base probablity for the Two Sicilies to 40% and don't use the Civil War event.
AJE The Hero, The Traitor and The Barbarian
PoN Manufacturing Italy; A clear bright sun
RoP The Mightiest Empires Fall
WIA Burning down the Houses; Wars in America; The Tea Wars

User avatar
loki100
AGEod Guard of Honor
Posts: 2399
Joined: Sun Aug 14, 2011 4:15 pm
Location: Caithness
Contact: Website Twitter

Sun Jan 19, 2014 1:21 pm

Crixdaz wrote:Congrats for this work, would be awesome if this problems could be fixed and added to the official patch.

Good job ;)


thank you - its really just a case of breaking down the in-game event and generating a safety net (for the AI).
AJE The Hero, The Traitor and The Barbarian
PoN Manufacturing Italy; A clear bright sun
RoP The Mightiest Empires Fall
WIA Burning down the Houses; Wars in America; The Tea Wars

User avatar
Christophe.Barot
Posts: 1138
Joined: Fri Jan 26, 2007 10:55 pm
Location: Paris (France)

Sun Jan 19, 2014 1:31 pm

Excellent work, Loki

could you test the chain ? perhaps should we put an Italian Unification eventsMod available for players wanting to test it (when you'll have other reactions, more precise and constructive than this present "kudo") for having a feedback ?

what do you think about it ? to try, or too early ?
[color="#FF0000"]- (ordnance) Your Lordship, sorry to awake you, but The french are at our door !

- Alarm, alarm, how did you let this happen and not awake me ! repel them, counterattack at once !

- err, your Lordship, ahem... French are our allies, Marshal de St Arnaud is expected to attend to a conference with you !

- ahem, well, .... very well ..let them in !

(charge of the light brigade movie)
[/color]

User avatar
loki100
AGEod Guard of Honor
Posts: 2399
Joined: Sun Aug 14, 2011 4:15 pm
Location: Caithness
Contact: Website Twitter

Sun Jan 19, 2014 1:36 pm

Christophe.Barot wrote:Excellent work, Loki

could you test the chain ? perhaps should we put an Italian Unification eventsMod available for players wanting to test it (when you'll have other reactions, more precise and constructive than this present "kudo") for having a feedback ?

what do you think about it ? to try, or too early ?


good idea - its pretty simple minded, all you'd need to do is to start an 1850GC, set the game date to Jan 1867 and try one of two options. Given Lazzio to S-P - then it should work, keep Lazzio as part of the Papal states and it should never fire. I'll try a test run sometime today and report/modify as needed.
AJE The Hero, The Traitor and The Barbarian
PoN Manufacturing Italy; A clear bright sun
RoP The Mightiest Empires Fall
WIA Burning down the Houses; Wars in America; The Tea Wars

User avatar
Christophe.Barot
Posts: 1138
Joined: Fri Jan 26, 2007 10:55 pm
Location: Paris (France)

Sun Jan 19, 2014 2:50 pm

how do you set a different date than actual one ?

corollary how do you check date is the right one - under clock up right of course, but are there other places to check ?
[color="#FF0000"]- (ordnance) Your Lordship, sorry to awake you, but The french are at our door !

- Alarm, alarm, how did you let this happen and not awake me ! repel them, counterattack at once !

- err, your Lordship, ahem... French are our allies, Marshal de St Arnaud is expected to attend to a conference with you !

- ahem, well, .... very well ..let them in !

(charge of the light brigade movie)
[/color]

User avatar
loki100
AGEod Guard of Honor
Posts: 2399
Joined: Sun Aug 14, 2011 4:15 pm
Location: Caithness
Contact: Website Twitter

Mon Jan 20, 2014 1:55 pm

Christophe.Barot wrote:how do you set a different date than actual one ?

corollary how do you check date is the right one - under clock up right of course, but are there other places to check ?


Just to report, have tested the chains and the events and all work.

You can set the date by opening the control option (Shift~ on my laptop) and then use the forcedate option - just type in as normal, you don't need the turn codes. So in this I started as Belgium, forced the date to 1867 (& others as needed). I removed the Lazzio line (as I couldn't be bothered to make that happen) - one run all the minors joined. So I did a simple second test just with the war script which worked fine.
AJE The Hero, The Traitor and The Barbarian
PoN Manufacturing Italy; A clear bright sun
RoP The Mightiest Empires Fall
WIA Burning down the Houses; Wars in America; The Tea Wars

User avatar
Pocus
Posts: 25659
Joined: Wed Oct 19, 2005 7:37 am
Location: Lyon (France)

Tue Jan 21, 2014 9:41 am

There is another neat command (use console, type ? to get list of commands!!) to force an event to happens (in fact, it just set to true all its conditions), so you can force a late game event to happen early, without changing date with that.
Image


Hofstadter's Law: "It always takes longer than you expect, even when you take into account Hofstadter's law."

User avatar
Kensai
Posts: 2712
Joined: Mon Sep 19, 2011 4:54 pm
Location: Freiburg, Germany

Tue Jan 21, 2014 11:42 am

loki100, make sure you read my old notes. Of course in that instance, I was trying to simply fix the chain in an online ongoing game, so not the same. The problem I had found (and others confirmed) was that the AI, albeit in theory given enough interest to march to Rome, it did not. There were also some other minor bugs in the event that duplicated the Garibaldi unit, but I think fixed in later versions of the game.
Care to unify Germany as Austria? Recreate the Holy Roman Empire of the 20th Century:
Großdeutschland Mod
Are you tough enough to impersonate the Shogun and defy the Westerners? Prove it:
Shogun Defiance Mod (completed AAR)

User avatar
Christophe.Barot
Posts: 1138
Joined: Fri Jan 26, 2007 10:55 pm
Location: Paris (France)

Tue Jan 21, 2014 2:00 pm

Pocus wrote:There is another neat command (use console, type ? to get list of commands!!) to force an event to happens (in fact, it just set to true all its conditions), so you can force a late game event to happen early, without changing date with that.


thanks Pocus

actually I know this one, but had used it once to reestablish a broken (condition didn't occur for weird set of circumstances) event in one of my game once

didn't think about using it to test events, actually is very handy (could test the texts and image of options for example) - so obvious i forgot about it :blink: - thanks Pocus, both for hint and for your interest - your input and comments are always welcome :winner:
[color="#FF0000"]- (ordnance) Your Lordship, sorry to awake you, but The french are at our door !

- Alarm, alarm, how did you let this happen and not awake me ! repel them, counterattack at once !

- err, your Lordship, ahem... French are our allies, Marshal de St Arnaud is expected to attend to a conference with you !

- ahem, well, .... very well ..let them in !

(charge of the light brigade movie)
[/color]

Return to “Help improve PON”

Who is online

Users browsing this forum: No registered users and 4 guests