User avatar
HerrDak
Private
Posts: 23
Joined: Mon May 13, 2013 9:24 am

Laws and reforms for minor nations

Wed Oct 04, 2023 7:50 am

Greetings.

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?

Thanks.

User avatar
andrzej
Major
Posts: 213
Joined: Thu Jan 17, 2013 11:57 am
Location: Russia.Saint Peterburg

Re: Laws and reforms for minor nations

Mon Oct 30, 2023 11:08 pm

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
Image
- 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
Image
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
Image
Notice of the adoption of the law
Image
Notice of law rejection
Image

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.

User avatar
andrzej
Major
Posts: 213
Joined: Thu Jan 17, 2013 11:57 am
Location: Russia.Saint Peterburg

Re: Laws and reforms for minor nations

Tue Oct 31, 2023 7:57 am

You can also correct the conditions and effects of laws. And also generally try to create your own laws.

User avatar
HerrDak
Private
Posts: 23
Joined: Mon May 13, 2013 9:24 am

Re: Laws and reforms for minor nations

Fri Nov 10, 2023 9:59 pm

¡Thanks! Im learning many things about modding PON.

I already Made a México Mod:

1) All land units for the mexican army based on the models and units of France (new mexican models, units and graphics for each new model).
2) All naval units for the mexican navy based on the models and units of Austria (new mexican models and units).
3) All mexican Rulers with new graphics for each one (no more generic ones) and all the Rulers now have the historical national attributes.
4) All colonial options for México.
5) Laws and Reforms for México.

Im playing a testing game and so far everything is good.

User avatar
andrzej
Major
Posts: 213
Joined: Thu Jan 17, 2013 11:57 am
Location: Russia.Saint Peterburg

Re: Laws and reforms for minor nations

Sat Nov 11, 2023 11:08 am

HerrDak wrote:¡Thanks! Im learning many things about modding PON.

I already Made a México Mod:

1) All land units for the mexican army based on the models and units of France (new mexican models, units and graphics for each new model).
2) All naval units for the mexican navy based on the models and units of Austria (new mexican models and units).
3) All mexican Rulers with new graphics for each one (no more generic ones) and all the Rulers now have the historical national attributes.
4) All colonial options for México.
5) Laws and Reforms for México.

Im playing a testing game and so far everything is good.


Can you share your mod? It would be interesting to see it.

User avatar
HerrDak
Private
Posts: 23
Joined: Mon May 13, 2013 9:24 am

Re: Laws and reforms for minor nations

Wed Nov 15, 2023 12:36 am

andrzej wrote: Can you share your mod? It would be interesting to see it.


Sure, here is my Mexico Mod:

https://file.io/GIunET6vO4r0

User avatar
andrzej
Major
Posts: 213
Joined: Thu Jan 17, 2013 11:57 am
Location: Russia.Saint Peterburg

Re: Laws and reforms for minor nations

Wed Nov 15, 2023 10:44 am

HerrDak wrote:Sure, here is my Mexico Mod:
https://file.io/GIunET6vO4r0


Link does not work :non:

User avatar
HerrDak
Private
Posts: 23
Joined: Mon May 13, 2013 9:24 am

Re: Laws and reforms for minor nations

Thu Nov 16, 2023 8:20 am

I dont know what happened. I will upload it again:

https://fastupload.io/3cSJH9BLkmUyI9R/file

gurebaiyesar
Civilian
Posts: 1
Joined: Wed Dec 27, 2023 9:17 pm

Re: Laws and reforms for minor nations

Wed Dec 27, 2023 9:23 pm

it seems mod deleted again. can u upload again. l was trying to mod mexico. after l add ability to build merchant ships game crashes after 2 turn. l dont understand why because l did it same way before for persia and play till 1861 without a crash.

User avatar
HerrDak
Private
Posts: 23
Joined: Mon May 13, 2013 9:24 am

Re: Laws and reforms for minor nations

Fri Dec 29, 2023 8:01 pm

Hello.

Im working in a much better version of the mod. I will upload It soon.

User avatar
HerrDak
Private
Posts: 23
Joined: Mon May 13, 2013 9:24 am

Re: Laws and reforms for minor nations

Tue Jan 02, 2024 4:11 am

Here is my first version of the mod:

https://www.mediafire.com/file/68o842x1 ... a.rar/file

Enjoy and report any bugs please.

Return to “PON Mods”

Who is online

Users browsing this forum: No registered users and 34 guests