shotgunfacelift
Corporal
Posts: 58
Joined: Mon Nov 12, 2012 11:16 am

Modding militias (1.10e)

Sun Dec 08, 2019 8:29 pm

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 :)

User avatar
Bohémond
Posts: 2631
Joined: Wed May 14, 2008 8:47 pm

Re: Modding militias (1.10e)

Sun Dec 08, 2019 9:23 pm

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

shotgunfacelift
Corporal
Posts: 58
Joined: Mon Nov 12, 2012 11:16 am

Re: Modding militias (1.10e)

Sun Dec 08, 2019 10:04 pm

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 :)

User avatar
Bohémond
Posts: 2631
Joined: Wed May 14, 2008 8:47 pm

Re: Modding militias (1.10e)

Sun Dec 08, 2019 10:16 pm

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

shotgunfacelift
Corporal
Posts: 58
Joined: Mon Nov 12, 2012 11:16 am

Re: Modding militias (1.10e)

Sun Dec 08, 2019 10:51 pm

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 ?

User avatar
Bohémond
Posts: 2631
Joined: Wed May 14, 2008 8:47 pm

Re: Modding militias (1.10e)

Mon Dec 09, 2019 1:58 am

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

shotgunfacelift
Corporal
Posts: 58
Joined: Mon Nov 12, 2012 11:16 am

Re: Modding militias (1.10e)

Mon Dec 09, 2019 5:00 pm

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

User avatar
Bohémond
Posts: 2631
Joined: Wed May 14, 2008 8:47 pm

Re: Modding militias (1.10e)

Tue Dec 10, 2019 2:18 am

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

shotgunfacelift
Corporal
Posts: 58
Joined: Mon Nov 12, 2012 11:16 am

Re: Modding militias (1.10e)

Tue Dec 10, 2019 10:45 am

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:

User avatar
Bohémond
Posts: 2631
Joined: Wed May 14, 2008 8:47 pm

Re: Modding militias (1.10e)

Tue Dec 10, 2019 12:42 pm

You are welcome, :cool: enjoy your game,

shotgunfacelift
Corporal
Posts: 58
Joined: Mon Nov 12, 2012 11:16 am

Re: Modding militias (1.10e)

Tue Dec 10, 2019 7:25 pm

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----------------

User avatar
Bohémond
Posts: 2631
Joined: Wed May 14, 2008 8:47 pm

Re: Modding militias (1.10e)

Tue Dec 10, 2019 9:15 pm

I am away from my computer for a few days.
I will look at it upon my return and make some tests.

Regards

shotgunfacelift
Corporal
Posts: 58
Joined: Mon Nov 12, 2012 11:16 am

Re: Modding militias (1.10e)

Tue Dec 10, 2019 11:18 pm

Pretty cool, thanks.
I'm trying to figure it out on my side.

User avatar
Bohémond
Posts: 2631
Joined: Wed May 14, 2008 8:47 pm

Re: Modding militias (1.10e)

Sat Dec 14, 2019 7:58 pm

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

shotgunfacelift
Corporal
Posts: 58
Joined: Mon Nov 12, 2012 11:16 am

Re: Modding militias (1.10e)

Sun Dec 15, 2019 12:26 pm

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.

User avatar
Bohémond
Posts: 2631
Joined: Wed May 14, 2008 8:47 pm

Re: Modding militias (1.10e)

Sun Dec 15, 2019 3:42 pm

ok, I a am going to play a little more turns and check what happens in 1757.

User avatar
Bohémond
Posts: 2631
Joined: Wed May 14, 2008 8:47 pm

Re: Modding militias (1.10e)

Wed Dec 18, 2019 3:41 am

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

shotgunfacelift
Corporal
Posts: 58
Joined: Mon Nov 12, 2012 11:16 am

Re: Modding militias (1.10e)

Wed Dec 18, 2019 6:42 pm

Thanks a lot for your time.
Something is wrong somewhere.
I'll look into it in my next game.

Return to “BoA2: Wars in America”

Who is online

Users browsing this forum: No registered users and 1 guest