HerrDak wrote:Im currently playing with Mexico and I noted that it hasnt any kind of laws and reforms. ¿Someone knows how I can mod the game to give laws and reforms to that nation?.
I figured out how to create decrees for minors in PON
- First, you need to create a MEX Laws and Reforms.sct file in the Events folder
- Then enter the name of the new event file in the 1850 GC.sct file
- then start adding new event texts for Mexico to the MEX Laws and Reforms.sct file
Here is a group of events for the decree “On the ban on children working” :
Code: Select all
SelectFaction = $MEX
SelectRegion = $Mexico
StartEvent = evt_nam_MEX_NoChildrenWork_AIActivate|999|0|NULL|NULL|$Mexico|NULL
Conditions
MinDate = 1850/01/01
CheckAILevel = 1
ActorEnabled = $gmaOptionSoc;MEX_NoChildrenWork
EvalContentment = <=;50;ALL
EvalResource = $merMoney;>=;750
Probability = 50
Actions
ChangeOption = $gmaOptionSoc;MEX_NoChildrenWork;1
EndEvent
SelectFaction = $MEX
SelectRegion = $Mexico
StartEvent = evt_nam_MEX_NoChildrenWorkTracker|0|0|NULL|NULL|$Mexico|NULL
Conditions
MinDate = 1850/01/01
Actions
EndEvent
SelectFaction = $MEX
SelectRegion = $Mexico
StartEvent = evt_nam_MEX_NoChildrenWork_ON|1|0|NULL|NULL|$Mexico|NULL
Conditions
MinDate = 1850/01/01
EvalResource = $merMoney;>=;200
Actions
GenTextMsg = opt_notify_NewSocialDecree2;1;NULL;NULL;NULL
DescEvent = evt_desc_NewSocialDecree
ChangeActorPool = $gmaOptionSoc;MaxUse;1;ResetFreq;0;ImageID;State_Control_Eco_ON.png;Title;opt_title_CMN_NoChildrenWork;MsgString;opt_desc_CMN_NoChildrenWork;ToolString;opt_hint_CMN_NoChildrenWork;SubType;MEX_NoChildrenWork;SParam1;MEX
EndEvent
SelectFaction = $MEX
SelectRegion = $Mexico
StartEvent = evt_nam_MEX_NoChildrenWork_VoteRejected|999|0|NULL|NULL|$Mexico|NULL
Conditions
CheckOption = $gmaOptionSoc;MEX_NoChildrenWork;=;1
EvalContentment = DICE;75;ALL;NOT
Probability = 30
Actions
SelectFaction = $CMN
GenTextMsg = The Parliament United Mexican States has rejected the government proposal concerning forbiddance of Children Work.;1;NULL;NULL;NULL
SelectFaction = $MEX
ChgVPCount = -20
ChangeFacMorale = -1
ChangeLoyaltyFac = $Theater_Mexico;-2
ChangeOption = $gmaOptionSoc;MEX_NoChildrenWork;-1
EndEvent
SelectFaction = $MEX
SelectRegion = $Mexico
StartEvent = evt_nam_MEX_NoChildrenWork_VoteAccepted|999|0|NULL|NULL|$Mexico|NULL
Conditions
CheckOption = $gmaOptionSoc;MEX_NoChildrenWork;=;1
Actions
SelectFaction = $CMN
GenTextMsg = United Mexican States has banned Children Work;1;NULL;NULL;NULL
SelectFaction = $MEX
ChgPopMilitancyEx = 0;-4;-2;0;0;0;ALL
ChgPopContentEx = 0;10;10;5;-5;0;ALL
ChangeResStock = $merMoney;-200
ChangeActorPool = $gmaOptionSoc;MaxUse;0;SubType;MEX_NoChildrenWork
SetEvtOccurs = evt_nam_MEX_NoChildrenWorkTracker;CuOccurs;1
EndEvent
In this version of events, I inserted the text of the news about the adoption (or rejection) of this law directly into the event code. Thanks to this, there is no need to make changes to the LocalString localization files. This option is suitable for your own single-player game in English. But if you plan to make a mod for other players from around the world, then you need to insert the news text (and its translation into other languages) into the LocalString_VGN file
And then the event code in the MEX Laws and Reforms.sct file should be written like this:
Code: Select all
SelectFaction = $MEX
SelectRegion = $Mexico
StartEvent = evt_nam_MEX_NoChildrenWork_AIActivate|999|0|NULL|NULL|$Mexico|NULL
Conditions
MinDate = 1850/01/01
CheckAILevel = 1
ActorEnabled = $gmaOptionSoc;MEX_NoChildrenWork
EvalContentment = <=;50;ALL
EvalResource = $merMoney;>=;750
Probability = 50
Actions
ChangeOption = $gmaOptionSoc;MEX_NoChildrenWork;1
EndEvent
SelectFaction = $MEX
SelectRegion = $Mexico
StartEvent = evt_nam_MEX_NoChildrenWorkTracker|0|0|NULL|NULL|$Mexico|NULL
Conditions
MinDate = 1850/01/01
Actions
EndEvent
SelectFaction = $MEX
SelectRegion = $Mexico
StartEvent = evt_nam_MEX_NoChildrenWork_ON|1|0|NULL|NULL|$Mexico|NULL
Conditions
MinDate = 1850/01/01
EvalResource = $merMoney;>=;200
Actions
GenTextMsg = opt_notify_NewSocialDecree2;1;NULL;NULL;NULL
DescEvent = evt_desc_NewSocialDecree
ChangeActorPool = $gmaOptionSoc;MaxUse;1;ResetFreq;0;ImageID;State_Control_Eco_ON.png;Title;opt_title_CMN_NoChildrenWork;MsgString;opt_desc_CMN_NoChildrenWork;ToolString;opt_hint_CMN_NoChildrenWork;SubType;MEX_NoChildrenWork;SParam1;MEX
EndEvent
SelectFaction = $MEX
SelectRegion = $Mexico
StartEvent = evt_nam_MEX_NoChildrenWork_VoteRejected|999|0|NULL|NULL|$Mexico|NULL
Conditions
CheckOption = $gmaOptionSoc;MEX_NoChildrenWork;=;1
EvalContentment = DICE;75;ALL;NOT
Probability = 30
Actions
SelectFaction = $CMN
GenTextMsg = opt_notify_MEX_NoChildrenWork_Rejected;1;NULL;NULL;NULL
SelectFaction = $MEX
ChgVPCount = -20
ChangeFacMorale = -1
ChangeLoyaltyFac = $Theater_Mexico;-2
ChangeOption = $gmaOptionSoc;MEX_NoChildrenWork;-1
EndEvent
SelectFaction = $MEX
SelectRegion = $Mexico
StartEvent = evt_nam_MEX_NoChildrenWork_VoteAccepted|999|0|NULL|NULL|$Mexico|NULL
Conditions
CheckOption = $gmaOptionSoc;MEX_NoChildrenWork;=;1
Actions
SelectFaction = $CMN
GenTextMsg = opt_notify_MEX_NoChildrenWork;1;NULL;NULL;NULL
SelectFaction = $MEX
ChgPopMilitancyEx = 0;-4;-2;0;0;0;ALL
ChgPopContentEx = 0;10;10;5;-5;0;ALL
ChangeResStock = $merMoney;-200
ChangeActorPool = $gmaOptionSoc;MaxUse;0;SubType;MEX_NoChildrenWork
SetEvtOccurs = evt_nam_MEX_NoChildrenWorkTracker;CuOccurs;1
EndEvent
ChgPopMilitancyEx = 0;-4;-2;0;0;0;ALL // Change the percentage of Militancy of different classes of the population (slaves/peasants/workers/middle/upper/aristocracy). The value ALL means that the change is for all regions of the country.
ChgPopContentEx = 0;10;10;5;-5;0;ALL //changes in the percentage of satisfaction of different classes of the population.
ChangeResStock = $merMoney;-200 // Expenditure of 200 from the state money
I added from the same law for Russia the negative effects of its deviation:
ChgVPCount = -20 //Mexico loses 20 Prestige points
ChangeFacMorale = -1 //decrease in national morale by 1
ChangeLoyaltyFac = $Theater_Mexico;-2 //decrease in loyalty of the population in the entire region of Mexico by 2 points
Report on the possibility of passing a law banning child labor
Notice of the adoption of the law
Notice of law rejection
I have not yet corrected other events or tested them - but this is no longer a problem. If you want to do this, I'm ready to help.