Side 0 / side 1

Moderators: rbodleyscott, Slitherine Core, Gothic Labs

Post Reply
HobbesACW
Staff Sergeant - StuG IIIF
Staff Sergeant - StuG IIIF
Posts: 279
Joined: Thu Jun 27, 2013 9:31 pm

Side 0 / side 1

Post by HobbesACW »

Hi folks, how do you make a scenario for multiplayer? It seems side 0 is always player controlled and side 1 is always AI? Also I setup side 0 expecting I could toggle the AI for either side (or even both sides). Is side 1 always going to be controlled by the AI or another player? I was hoping to play the game against the AI as both sides to see which was most suitable for it.

Thanks,
Chris
Paul59
General - King Tiger
General - King Tiger
Posts: 3800
Joined: Tue Jul 21, 2015 11:26 pm

Re: Side 0 / side 1

Post by Paul59 »

Hi Chris,

You are actually asking for two different things;

1) How to make a scenario multiplayer, and

2) How to make a scenario playable from the other side (ie; Switch sides).

This is how I do it;

Multiplayer;

1) Using the editor create a new basic scenario. For instance, when I made Pavia, I called the MP version MP_PAVIA_1525. It should be named differently to the SP version, but just adding MP to the name will do. Tick the box "Create in Multiplayer folder". Don't bother to make a map or add units, just save a blank scenario.

2) Copy and paste all the files and sub folders from your single player scenario into the new MP scenario folder, overwriting anything that is already there. Then rename every file that has the scenario name to the new scenario name, for instance 1525_Pavia.BAM to MP_PAVIA_1525.BAM. Then open the TEXT1, TEXT9 and SCENUI.TXT files and rename every instance of the old scenario name to the new scenario name.

3) If you have a .BSF file it will have to be amended;

a) Strip out all AI unit scripting, you can leave anything relating to reinforcements, visibility etc.

b) Alter the StandardVictoryConditions code;

StandardVictoryConditions(60, 40, 60, 40, 2, 0);

The last parameter should be 1 instead of 0 for Multiplayer scenarios. To leave it like this;

StandardVictoryConditions(60, 40, 60, 40, 2, 1);

c) Enable the SetMPForceRatio code to set up the MP scenario to use adjusted MP victory conditions;

Take out the back slashes on this line; //SetMPForceRatio();

to leave it like this; SetMPForceRatio();

4) If you do not already have a .BSF file in the scenario you will have to add one. I can send you a template version if you require. Then just change the StandardVictoryConditions and
SetMPForceRatio code as above.

5) Add the Scenario name in the CAMPAIGN.TXT, for instance Pavia has this;

NOSKIRMISH

[MP_Pavia_1525]

6) Add IDS_SIDETYPE0 and IDS_SIDETYPE1 names to Text1.txt

For instance Pavia should have;

IDS_SIDETYPE0,"French",
IDS_SIDETYPE1,"Spanish/Imperial",

Otherwise the sides will show up as Pro-Imperial and Anti-Imperial in the MP challenge lobby, which might not always be want you want.

Hopefully I have not forgotten anything!

I will put in a seperate post how to switch sides.


regards


Paul
Last edited by Paul59 on Sun Feb 26, 2017 6:55 pm, edited 1 time in total.
Field of Glory II Scenario Designer - Age of Belisarius, Rise of Persia, Wolves at the Gate and Swifter than Eagles.

Field of Glory II Medieval Scenario Designer.

FOGII TT Mod Creator

Warhammer 40,000: Sanctus Reach Tournament Scenario Designer.
Paul59
General - King Tiger
General - King Tiger
Posts: 3800
Joined: Tue Jul 21, 2015 11:26 pm

Re: Side 0 / side 1

Post by Paul59 »

Switching Sides;

1) Using the editor create a new basic scenario. For instance, when I made Kalisz, I called the Saxon version 1706_KALISZ_SAXON. It should be named differently to the original version, but be careful here as the name should not be too long. I can't remember the limit, but it is something like 23 characters. Don't bother to make a map or add units, just save a blank scenario.

2) Copy and paste all the files and sub folders from your original scenario into the new switched sides scenario folder, overwriting anything that is already there. Then rename every file that has the scenario name to the new scenario name, for instance Kalisz_1706.BAM to Kalisz_1706_Saxon.BAM. Then open the TEXT1, TEXT9 and SCENUI.TXT files and rename every instance of the old scenario name to the new scenario name.

3) Then open the new .BAM file in a text editor, I use WordPad but I think Richard recommends Notepad++.

Then follow these steps in order:

1 - Swap the values of SIDEID0 and SIDEID1. So originally in Kalisz SIDEID0 was 6 and SIDEID1 was 52. Change it so it is the other way around, ie SIDEID0 52 and SIDEID0 6.
2 - Search for "_0_" replace with "_2_"
3 - Search for "_1_" replace with "_0_"
4 - Search for "_2_" replace with "_1_"
5 - Change UNITCOUNT_0 to UNITCOUNT_1
6 - Change UNITCOUNT_1 to UNITCOUNT_0

When you load the file in the editor, Side0 will have become Side 1 and vice versa. The map will remain the same.

4) If you have reinforcement code in the .BSF file, you are probably better off redoing it all in the editor. Although it is possible to change the code manually, I have not worked that out fully myself yet.

5) You will have to recode the AI in the editor. Be careful with this, as I have experienced some strange affects with AI behaviour when switching sides. I'm not exactly sure why, but it might be because the original AI is still in affect. It is probably safer to use different AI team numbers for the switched side scenario, although we are a bit limited as there are only teams 0 to 7 available.

Please correct me if I am wrong with any of this, or if I have left anything out. But what I have written here seems to work for me, and I have done this many times with MP and switched sides scenarios.

regards


Paul
Field of Glory II Scenario Designer - Age of Belisarius, Rise of Persia, Wolves at the Gate and Swifter than Eagles.

Field of Glory II Medieval Scenario Designer.

FOGII TT Mod Creator

Warhammer 40,000: Sanctus Reach Tournament Scenario Designer.
HobbesACW
Staff Sergeant - StuG IIIF
Staff Sergeant - StuG IIIF
Posts: 279
Joined: Thu Jun 27, 2013 9:31 pm

Re: Side 0 / side 1

Post by HobbesACW »

Wow! They made a good editor but they didn't make this easy did they! Thanks very much Paul I'll take it all in next week.

Cheers,
Chris
jomni
Sengoku Jidai
Sengoku Jidai
Posts: 1394
Joined: Thu Dec 03, 2009 1:20 am

Re: Side 0 / side 1

Post by jomni »

Last two lines are not correct(?)
Just as the ones above, 0 becomes 2 before becoming 1. Else everything will become 0.
5. Unitcount_0 to Unitcount_2.
6. Unitcount_1 to Unitcount_0.
7. Unitcount_2 to Unitcount_1.
Paul59
General - King Tiger
General - King Tiger
Posts: 3800
Joined: Tue Jul 21, 2015 11:26 pm

Re: Side 0 / side 1

Post by Paul59 »

jomni wrote:Last two lines are not correct(?)
Just as the ones above, 0 becomes 2 before becoming 1. Else everything will become 0.
5. Unitcount_0 to Unitcount_2.
6. Unitcount_1 to Unitcount_0.
7. Unitcount_2 to Unitcount_1.
I was implying that you just need to search for the Unitcount lines and change them manually, there is no need to use the replace function as there are only two instances of the Unitcount line in the .BAM file.
Field of Glory II Scenario Designer - Age of Belisarius, Rise of Persia, Wolves at the Gate and Swifter than Eagles.

Field of Glory II Medieval Scenario Designer.

FOGII TT Mod Creator

Warhammer 40,000: Sanctus Reach Tournament Scenario Designer.
jomni
Sengoku Jidai
Sengoku Jidai
Posts: 1394
Joined: Thu Dec 03, 2009 1:20 am

Re: Side 0 / side 1

Post by jomni »

Paul59 wrote:
jomni wrote:Last two lines are not correct(?)
Just as the ones above, 0 becomes 2 before becoming 1. Else everything will become 0.
5. Unitcount_0 to Unitcount_2.
6. Unitcount_1 to Unitcount_0.
7. Unitcount_2 to Unitcount_1.
I was implying that you just need to search for the Unitcount lines and change them manually, there is no need to use the replace function as there are only two instances of the Unitcount line in the .BAM file.
Ah yes because what I always do is find and replace. :lol:
Post Reply

Return to “Scenario Design”