Page 1 of 1

Modding militias (1.10e)

Posted: Sun Dec 08, 2019 8:29 pm
by shotgunfacelift
Hi
I want to stop militias disbanding for FRA.
Found the Units I want to mod in UNIT files.
But the line to edit doesn't seem to be in UNITS.
I think the rule could be in EVENTS or somewhere else.
If someone knows please tell me.
Thanks :)

Re: Modding militias (1.10e)

Posted: Sun Dec 08, 2019 9:23 pm
by Bohémond
What are the units you want to mod.

uni_CAN_Can1, uni_CAN_Can2, uni_CAN_Can3, uni_CAN_Can4, uni_CAN_Cou1 are managed by Autoraise rules and you cannot prevent them from disbanding without altering these rules.

Regards

Re: Modding militias (1.10e)

Posted: Sun Dec 08, 2019 10:04 pm
by shotgunfacelift
Yes these #222 to #227 units are the ones I want to mod.
Looked around but I haven't found in the game files Autoraise for FRA 1755.

I'm ok with altering Autoraise if it's possible. Or any other solution that you'd kindly suggest :)

Re: Modding militias (1.10e)

Posted: Sun Dec 08, 2019 10:16 pm
by Bohémond
The autoraise declaration is located in the script file (Script55COL.ini), see line below

SelectFaction = $FRA
AutoRaise = $uni_INF_Bra3|1|0
AutoRaise = $uni_CAN_Can1|3|60
AutoRaise = $uni_CAN_Can2|3|60
AutoRaise = $uni_CAN_Can3|3|60
AutoRaise = $uni_CAN_Can4|4|60
AutoRaise = $uni_CAN_Cou1|8|5


If you create an event with the following ;

SelectFaction = $FRA

ChgAutoRaise = $uni_CAN_Can1|0|-60
ChgAutoRaise = $uni_CAN_Can2|0|-60
ChgAutoRaise = $uni_CAN_Can3|0|-60
ChgAutoRaise = $uni_CAN_Can4|0|-60
ChgAutoRaise = $uni_CAN_Cou1|0|-5

It should prevent these units from disbanding.

Regards

Re: Modding militias (1.10e)

Posted: Sun Dec 08, 2019 10:51 pm
by shotgunfacelift
Thanks Bohémond.

On a fresh game, no save, just editing the script file wouldn't work ?
Or do I really have to go with an event ?

Re: Modding militias (1.10e)

Posted: Mon Dec 09, 2019 1:58 am
by Bohémond
The script file is used to generate the scenario, editing it will not work.

You need to go with an event.

Let me know if you need guidance for it.

Regards

Re: Modding militias (1.10e)

Posted: Mon Dec 09, 2019 5:00 pm
by shotgunfacelift
Ok yes I do need assistance please.

The event needs to be at the end of 1755 Campaign.sct in Events file ?

How is that :confused:

Code: Select all

SelectFaction = $FRA

  ChgAutoRaise = $uni_CAN_Can1|0|-60
  ChgAutoRaise = $uni_CAN_Can2|0|-60
  ChgAutoRaise = $uni_CAN_Can3|0|-60
  ChgAutoRaise = $uni_CAN_Can4|0|-60
  ChgAutoRaise = $uni_CAN_Cou1|0|-5

EndEvent

Re: Modding militias (1.10e)

Posted: Tue Dec 10, 2019 2:18 am
by Bohémond
You are right , it has to be added at the end of 1755 Campaign.sct file but the COL one.

The event should look like below ;

Code: Select all

StartEvent = evt_FRA_MilitiaDisbandOff|1|0|NULL|NULL|NULL|NULL

Conditions


Actions
SelectFaction = FRA
  ChgAutoRaise = $uni_CAN_Can1|0|-60
  ChgAutoRaise = $uni_CAN_Can2|0|-60
  ChgAutoRaise = $uni_CAN_Can3|0|-60
  ChgAutoRaise = $uni_CAN_Can4|0|-60
  ChgAutoRaise = $uni_CAN_Cou1|0|-5


EndEvent


It will fire after the first turn resolution.

Take a look to the scriptreports to check for good appliance.

Regards

Re: Modding militias (1.10e)

Posted: Tue Dec 10, 2019 10:45 am
by shotgunfacelift
Added a $ to SelectFaction = FRA

Code: Select all

Line 11155:  ------------------------------
Line 11157:  Started processing event: evt_FRA_MilitiaDisbandOff
Line 11157:  This event is not yet referenced, base number of allowed occurences 1
Line 11162:  Entering triggered actions for event evt_FRA_MilitiaDisbandOff
Line 11163:  SelectFaction, selected: France
Line 11164:  SetAutoRaise France Unit type: 222 Max Number: 0 Dismiss perc: -60
Line 11165:  SetAutoRaise France Unit type: 223 Max Number: 0 Dismiss perc: -60
Line 11166:  SetAutoRaise France Unit type: 224 Max Number: 0 Dismiss perc: -60
Line 11167:  SetAutoRaise France Unit type: 225 Max Number: 0 Dismiss perc: -60
Line 11168:  SetAutoRaise France Unit type: 227 Max Number: 0 Dismiss perc: -5
Line 11171:  Finished processing event: evt_FRA_MilitiaDisbandOff
Line 11171:  ------------------------------
------------------------------
Error(s) found: 0
Warning(s) found: 1
--------------END OF SCRIPT----------------


Looking good, thanks again Bohémond :thumbsup:

Re: Modding militias (1.10e)

Posted: Tue Dec 10, 2019 12:42 pm
by Bohémond
You are welcome, :cool: enjoy your game,

Re: Modding militias (1.10e)

Posted: Tue Dec 10, 2019 7:25 pm
by shotgunfacelift
Militias still disbanding, here's what script says, looks like event can only fire once ?

Code: Select all

Line 11155:  ------------------------------
Line 11157:  Started processing event: evt_FRA_MilitiaDisbandOff
Line 11157:  Event already referenced, current occurences 1 Max allowed: 1   >>Sleeping<<
Line 11159:  Too many occurences for event evt_FRA_MilitiaDisbandOff further processing aborted.
Line 11163:  SelectFaction, selected: France
Line 11171:  Finished processing event: evt_FRA_MilitiaDisbandOff
Line 11171:  ------------------------------
------------------------------
Error(s) found: 0
Warning(s) found: 0
--------------END OF SCRIPT----------------

Re: Modding militias (1.10e)

Posted: Tue Dec 10, 2019 9:15 pm
by Bohémond
I am away from my computer for a few days.
I will look at it upon my return and make some tests.

Regards

Re: Modding militias (1.10e)

Posted: Tue Dec 10, 2019 11:18 pm
by shotgunfacelift
Pretty cool, thanks.
I'm trying to figure it out on my side.

Re: Modding militias (1.10e)

Posted: Sat Dec 14, 2019 7:58 pm
by Bohémond
I have run a test with the provided event.

Militia units ( in Montréal, Québec and Trois rivières) are not disbanding at the end of the year 1755 and additional militia units do raise in April 1756 in Québec and Montréal.

Is is still not working on your side ?

Regards

Re: Modding militias (1.10e)

Posted: Sun Dec 15, 2019 12:26 pm
by shotgunfacelift
Same here. No disbanding in January 1756, and new militias raised normally.
Disbanding started in January 1757 and then regularly and randomly in January of other years.

I'm now in 1777.
Courreurs de bois never disbanded.
Small garrison militias never disbanded. (I've seen them disband in previous games)
Only militia left is the one at Louisbourg.

Re: Modding militias (1.10e)

Posted: Sun Dec 15, 2019 3:42 pm
by Bohémond
ok, I a am going to play a little more turns and check what happens in 1757.

Re: Modding militias (1.10e)

Posted: Wed Dec 18, 2019 3:41 am
by Bohémond
Run a few turns more (April 1758). No militia has disbanded.
It should have some sort of probabilty somewhere.
The wiki article may clarify it: https://www.leqg.org/doc/age/www.ageod.net/agewiki/AutoRaise.html

Regards

Re: Modding militias (1.10e)

Posted: Wed Dec 18, 2019 6:42 pm
by shotgunfacelift
Thanks a lot for your time.
Something is wrong somewhere.
I'll look into it in my next game.