Soon I will do tests for the modification of the deployments.
Can someone tell me which files configure its operation?
Deployments modification
Moderator: rbodleyscott
-
- Field of Glory 2
- Posts: 28014
- Joined: Sun Dec 04, 2005 6:25 pm
Re: Deployments modification
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.
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
Re: Deployments modification
Thanks for the reply!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.
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.
-
- Field of Glory 2
- Posts: 28014
- Joined: Sun Dec 04, 2005 6:25 pm
Re: Deployments modification
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
Re: Deployments modification
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.
-
- Field of Glory 2
- Posts: 28014
- Joined: Sun Dec 04, 2005 6:25 pm
Re: Deployments modification
Hi Miguel,
I would be interested in seeing the mod if you could send it to me.
Cheers,
Richard
Richard Bodley Scott
Re: Deployments modification
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.
"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.