Deployments modification

Moderator: rbodleyscott

Post Reply
toska
Staff Sergeant - Kavallerie
Staff Sergeant - Kavallerie
Posts: 322
Joined: Mon Jan 25, 2016 12:07 pm

Deployments modification

Post by toska » Fri Jun 04, 2021 9:41 am

Soon I will do tests for the modification of the deployments.

Can someone tell me which files configure its operation?

rbodleyscott
Field of Glory 2
Field of Glory 2
Posts: 25487
Joined: Sun Dec 04, 2005 6:25 pm

Re: Deployments modification

Post by rbodleyscott » Mon Jun 07, 2021 5:58 am

The main function is Autodeploy() in /Data/scripts/MoreScenarioTools.bsf

However, bear in mind that if you mod the AI's deployment significantly you will probably also need to mod their AI. - AI_Masterplan() in /Data/scripts/AITools.bsf.
Richard Bodley Scott

Image

toska
Staff Sergeant - Kavallerie
Staff Sergeant - Kavallerie
Posts: 322
Joined: Mon Jan 25, 2016 12:07 pm

Re: Deployments modification

Post by toska » Sat Jun 12, 2021 2:03 pm

rbodleyscott wrote:
Mon Jun 07, 2021 5:58 am
The main function is Autodeploy() in /Data/scripts/MoreScenarioTools.bsf

However, bear in mind that if you mod the AI's deployment significantly you will probably also need to mod their AI. - AI_Masterplan() in /Data/scripts/AITools.bsf.
Thanks for the reply!

I'm going to explain it in case anyone is interested. It is quite a complicated code but I think I have managed to locate what I wanted. The goal was to increase the cavalry margin on the wings of the medieval deployment without eliminating the possibility of a strong cavalry reserve.

I have modified the following percentages:

if ((deployment_type == 3) && (IsFortifiedSide(side) == 0) && (IsFortifiedSide(enemy_side) == 0)) // "Medieval" and neither side fortified
{
centre = Rand(35,45);
}

if (deployment_type == 5) // "Hussite"
{
centre = 100;
}
}
else
{
centre = Rand(25,35); // Default

I have modified both for 10/30. I don't know the difference between one or the other, but by modifying the two I have achieved the desired result.

On the other hand, I would like to modify the percentage of cavalry necessary to activate the cavalry display (cavalry_army?). But I can't find anything similar in the More EscenarioTools file. :?:

rbodleyscott
Field of Glory 2
Field of Glory 2
Posts: 25487
Joined: Sun Dec 04, 2005 6:25 pm

Re: Deployments modification

Post by rbodleyscott » Sat Jun 12, 2021 4:07 pm

toska wrote:
Sat Jun 12, 2021 2:03 pm
On the other hand, I would like to modify the percentage of cavalry necessary to activate the cavalry display (cavalry_army?). But I can't find anything similar in the More EscenarioTools file. :?:
FUNCTION IsCavalryArmy(side) in MoreScenarioTools.bsf

However, the sticking point may not always be the percentage but the maximum number of foot units permitted to qualify for cavalry deployment. This was because there is no room for a second line of infantry in the non-Medieval cavalry deployment. However, in the Medieval cavalry deployment the infantry are further forward, so there would be room for a second line - but you would probably need to script it.

Well try fiddling with it and see what happens. But also check that your modded version works correctly with real cavalry armies.
Richard Bodley Scott

Image

toska
Staff Sergeant - Kavallerie
Staff Sergeant - Kavallerie
Posts: 322
Joined: Mon Jan 25, 2016 12:07 pm

Re: Deployments modification

Post by toska » Wed Jun 16, 2021 6:33 pm

Thank you very much, in the end I have managed the cavalry deployment to be a little more common in lists such as France, Castile or Normandy.

rbodleyscott
Field of Glory 2
Field of Glory 2
Posts: 25487
Joined: Sun Dec 04, 2005 6:25 pm

Re: Deployments modification

Post by rbodleyscott » Thu Jun 17, 2021 6:19 am

toska wrote:
Wed Jun 16, 2021 6:33 pm
Thank you very much, in the end I have managed the cavalry deployment to be a little more common in lists such as France, Castile or Normandy.
Hi Miguel,

I would be interested in seeing the mod if you could send it to me.

Cheers,

Richard
Richard Bodley Scott

Image

toska
Staff Sergeant - Kavallerie
Staff Sergeant - Kavallerie
Posts: 322
Joined: Mon Jan 25, 2016 12:07 pm

Re: Deployments modification

Post by toska » Fri Jun 18, 2021 4:35 pm

I put the complete change here in case anyone is interested:

"if ((deployment_type == 3) && (IsFortifiedSide (side) == 0) && (IsFortifiedSide (enemy_side) == 0)) // "Medieval" and neither side fortified
{
center = Rand (10.30);"

and

"if ((percent <= 45) && (battleFootUnits <= 12))"

the numbers in bold are already modified. replace the original numbers with these or others.

The first change modifies the minimum and maximum margins of the knights who are located in the rear. In this case, both a good reserve and a strong spread on the wings are allowed.

The second change makes cavalry deployment easier. The objective is that the AI ​​that uses French, Castilian, Norman, etc. have more frequent access (not always) to the cavalry deployment at the front.

Image
Image

Post Reply

Return to “Field of Glory II: Medieval - Modding”