scenario of escorting supply cars: problems to introduce it in the campaign

Moderator: rbodleyscott

Post Reply
toska
Master Sergeant - Bf 109E
Master Sergeant - Bf 109E
Posts: 481
Joined: Mon Jan 25, 2016 12:07 pm

scenario of escorting supply cars: problems to introduce it in the campaign

Post by toska »

I am modding a campaign about the crusades (the part that was missing from the DLC) and for the battle of Hattin I have decided to use the "escort the supply wagons" battle type. The problem is that when I introduce the number that corresponds to the type of desert map in the code, the program ignores it and selects another map for me. If I try another map it works. It is as if the code is made so that this type of battle is not played in desert. Any idea how to fix it?
rbodleyscott
Field of Glory 2
Field of Glory 2
Posts: 28188
Joined: Sun Dec 04, 2005 6:25 pm

Re: scenario of escorting supply cars: problems to introduce it in the campaign

Post by rbodleyscott »

toska wrote: Tue Jun 28, 2022 8:14 pm I am modding a campaign about the crusades (the part that was missing from the DLC) and for the battle of Hattin I have decided to use the "escort the supply wagons" battle type. The problem is that when I introduce the number that corresponds to the type of desert map in the code, the program ignores it and selects another map for me. If I try another map it works. It is as if the code is made so that this type of battle is not played in desert. Any idea how to fix it?
Hi Miguel,

I presume you are setting the map type as 13?

What type of map do you actually get?

I am guessing it is a wooded Middle-Eastern map. This is because the baggage ambush scenario type is intended to be played on wooded maps, so the vanilla campaign setup scripts over-ride the custom terrain setting (but not the region).
Richard Bodley Scott

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

Re: scenario of escorting supply cars: problems to introduce it in the campaign

Post by rbodleyscott »

Hi Miguel,

To over-ride this, you will need to add a modded script to your campaign.

Download the attached file, unzip it, and copy the contents into your custom campaign folder.


DATA.zip
(47.34 KiB) Downloaded 38 times

If you copy the whole contents, you will have

/scripts/MoreScenarioTools.BSF in your campaign's /Data sub-folder


I have tested this, and it will allow your baggage escort scenario to be played on a desert map.
Richard Bodley Scott

Image
toska
Master Sergeant - Bf 109E
Master Sergeant - Bf 109E
Posts: 481
Joined: Mon Jan 25, 2016 12:07 pm

Re: scenario of escorting supply cars: problems to introduce it in the campaign

Post by toska »

Thanks a lot! This works
toska
Master Sergeant - Bf 109E
Master Sergeant - Bf 109E
Posts: 481
Joined: Mon Jan 25, 2016 12:07 pm

Re: scenario of escorting supply cars: problems to introduce it in the campaign

Post by toska »

Greetings

Mysteriously this has stopped working.

It's like the latest updates have changed something

I think the key is in these lines but even putting them in the original game file doesn't work:

// Hacky over-ride for wooded/mountain battles in custom campaigns
if (gCampGame == 2)
{
if (gMPSCustom == 1)
{
// if (gMPSDecisionTree[gMPSCurrentBattle][gMPSDecision] == 3) // Defend baggage in woody terrain.
// {
// terrain = 2;
// }
if (gMPSDecisionTree[gMPSCurrentBattle][gMPSDecision] == 4) // Advance through mountains, enemy have mountain allies.
{
terrain = 3;
}
}
}


I also take this opportunity to ask the following: is it possible to assign a certain set of equipment textures (A or B) to a list in a similar way to what happens with the Romans in FOG II ancients?
rbodleyscott
Field of Glory 2
Field of Glory 2
Posts: 28188
Joined: Sun Dec 04, 2005 6:25 pm

Re: scenario of escorting supply cars: problems to introduce it in the campaign

Post by rbodleyscott »

I will look at the first issue when I am back in the office next week.

There is specific code to reverse the normal texture allocation for side B Romans (and Spartans) if the battle isn't a civil war. There is no general way to do it for other nations in Custom Battles, without modding scripts. (It can easily be done in the scenario script for Editor Created scenarios).

May I ask the circumstances that make you want to do this for another nation?
Richard Bodley Scott

Image
toska
Master Sergeant - Bf 109E
Master Sergeant - Bf 109E
Posts: 481
Joined: Mon Jan 25, 2016 12:07 pm

Re: scenario of escorting supply cars: problems to introduce it in the campaign

Post by toska »

Thanks Richard!

I'm polishing a campaign based on the crusades from the Christian side after the capture of Jerusalem (basically the content that I think the Swords And Scimitars DLC was missing a bit).

In fact the problem with the supply train scenario is to represent Hattin.

As for the color reversal, it is to represent the French in the Egyptian crusade.
rbodleyscott
Field of Glory 2
Field of Glory 2
Posts: 28188
Joined: Sun Dec 04, 2005 6:25 pm

Re: scenario of escorting supply cars: problems to introduce it in the campaign

Post by rbodleyscott »

Hi Miguel,

I am struggling to see why the previous mod would not work after the last update.

I think you had better send me the whole campaign folder including the mod, so I can take a look.

Cheers,

Richard
Richard Bodley Scott

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

Re: scenario of escorting supply cars: problems to introduce it in the campaign

Post by rbodleyscott »

Hi Miguel,

I don’t think there is anything wrong with your code. As far as I can see it is generating a desert map. I ran the stage three times without a single area of woods.

It is only the string that says

IDS_MPS_CHOICE_3, "Advance through wooded territory. You will need to protect your baggage from attack.",

I think you just need to need to put a modded version of this in your Text1.txt, to say something more appropriate.
Richard Bodley Scott

Image
toska
Master Sergeant - Bf 109E
Master Sergeant - Bf 109E
Posts: 481
Joined: Mon Jan 25, 2016 12:07 pm

Re: scenario of escorting supply cars: problems to introduce it in the campaign

Post by toska »

Indeed, problem was being caused due to a mod that I have installed. I tried to deactivate it but it was necessary to restart the game again. I'm sorry to have wasted your time.

Now I think everything is fine and I would like the community to download it. Shall I send it to you again?
rbodleyscott
Field of Glory 2
Field of Glory 2
Posts: 28188
Joined: Sun Dec 04, 2005 6:25 pm

Re: scenario of escorting supply cars: problems to introduce it in the campaign

Post by rbodleyscott »

toska wrote: Thu Feb 16, 2023 4:10 pm Indeed, problem was being caused due to a mod that I have installed. I tried to deactivate it but it was necessary to restart the game again. I'm sorry to have wasted your time.

Now I think everything is fine and I would like the community to download it. Shall I send it to you again?
Yes please.
Richard Bodley Scott

Image
Post Reply

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