Campaign creation guide Part 3 (Adding new nation names)

Post Reply
Paul59
General - King Tiger
General - King Tiger
Posts: 3808
Joined: Tue Jul 21, 2015 11:26 pm

Campaign creation guide Part 3 (Adding new nation names)

Post by Paul59 »

In the second part of these guides to Campaign Creation, RBS explained how to create custom Army Lists. One of the things you might want to do when creating a new army list is create a new nation, that is not currently in the game. The important thing to know is that each nation has it’s own unique sidename number, see the Scenario Guide part 11 for a complete list of available sidenames:

http://www.slitherine.com/forum/viewtop ... 91&t=81258

Now, you could just rename an existing sidename. This is possible if there are vanilla nations that are not needed for your campaign. This is the easiest solution, as if you do this right, you do not have to modify any other files.

All you do, is include in your campaign’s Text1.txt file this line:

IDS_SIDENAME_XX, "Your new nation name",

XX is the sidename number that you want to reuse.

I did this in my Antiochus campaigns, for the Aetolian League (and some other nations). I reused the existing sidename 14, which is Greek in the standard game, for the Aetolian League as there were no other Greek armies in the campaign. I wrote in the campaign Text1.txt:

IDS_SIDENAME_14, "Aetolian League",

At the risk of stating the b******g obvious, another very good reason for choosing the sidename 14 to represent the Aetolian League, is because the game is already set up to use Greek banners, “civilized” rally horns, and Greek generals names for it. It’s best to match your new nation to a very similar existing sidename number, otherwise you might get some strange banners and generals names appearing!

However, there might be circumstances where the only option is to create a completely new sidename number. It could be that there are not enough similar existing nations to reuse, or it could be that you are designing a mod that adds nations/armies to the existing set. If that is the case, there are a couple of extra steps that you need to take.

1) Add the line IDS_SIDENAME_XX, "Your new nation name", to your Text1.txt, as described above.

2) You now need to edit the BannerSideIDs.txt, so that your new nation displays the banner that you want. You can find the main BannerSideIDs.txt in C/Program Files/Slitherine/Field of Glory II/Core. Copy and paste it into your main campaign folder.

It is a “read only” file, so once you have copied and pasted it, right click on it, select “Properties” and uncheck the "Read only" box, click "Apply" and then "OK".

When you open the BannerSideIDs.txt it will look like this:

[Banner1]
SIDEID 32

[Banner2]
SIDEID 32

[Banner3]
SIDEID 8 23 35 44 48 50 52 57

[Banner4]
SIDEID 8 23 35 44 48 50 52 57

[Banner5]
SIDEID 3 7 9 10 11 12 28 34 38 41 42 49 58 59 60 61 62 63 64 70

[Banner6]
SIDEID 3 7 9 10 11 12 28 34 38 41 42 49 58 59 60 61 62 63 64 70

[Banner7]
SIDEID 0 1 4 13 14 16 18 19 21 22 26 30 31 37 39 40 43 46 53 54 55 65 66 67 68 69 71 72 255

[Banner8]
SIDEID 0 1 4 13 14 16 18 19 21 22 26 30 31 37 39 40 43 46 53 54 55 65 66 67 68 69 71 72 255

[Banner9]
SIDEID 2 5 6 20 24 25 27 29 33 36 45 47 56

[Banner10]
SIDEID 2 5 6 20 24 25 27 29 33 36 45 47 56

[Banner11]
SIDEID 17 51

[Banner12]
SIDEID 17 51

[Banner13]
SIDEID 15

[Banner14]
SIDEID 15

What this is telling us (and the game) is that there are 14 Banners (numbered 1 to 14), and below each banner is a list of the Sidename IDs that use that particular banner. The banners are grouped in pairs (ie: Banner1 and Banner2 etc). The first banner in the pair (warm colour) is used when the nation is Side0 (players side in a SP battle) in a scenario, and the second banner in the pair (cooler colour) is used when the nation is Side1. This is to ensure that the two banners used in the battle will be easily distinguishable, especially to us old codgers with dodgy eyesight!

You will notice that the same set of Sidename IDs are under both banners in the pair.

The banners broadly represent the following nations:

1 2 Roman
3 4 Carthaginian/Seleucids etc.
5 6 Celts/Gauls/Germans/Spanish etc.
7 8 Greeks/Hellenistic/Italians etc.
9 10 Persians, other Iranians etc.
11 12 Indian
13 14 Hun

So all you need to do is select the pair of banners that you want to use for your new nation, and add your new sidename ID number to the list of numbers underneath the two banners. Save and close.

I’m not going to explain how to edit the graphics of the banners in this guide, it would unnecessarily complicate matters. That might be a story for another day!

3) Lastly, you need to edit the RandomGeneralName.BSF, this will ensure that your sub generals have appropriate names. You can find the vanilla RandomGeneralName.BSF in C/Program Files/Slitherine/Field of Glory II/Data/scripts. Copy and paste it into your campaign folder’s Data/Scripts sub folder.

Again, it is a “read only” file, so once you have copied and pasted it, right click on it, select “Properties” and uncheck the "Read only" box, click "Apply" and then "OK".

It is highly recommended to use a Text Editor, such as Notepad++, to edit the .BSF file. Notepad++ can be downloaded for free.

When you open the RandomGeneralName.BSF you will see a function called FUNCTIONGetRandomGeneralName. Most new nations can just be added to this function. Roman/Italian names are a bit more complicated, and need to added to the two other two functions in the file as well.

To add a new sidename number to the Function, find the correct language group, and add a side ID bracket, with the new number, to the function.

For instance, the part of the Function that lists the Armenian speaking nations is currently this:

// Armenian (also Colchian/Iberian and Caucasian faute de mieux)
if ((sideID == 5) || (sideID == 47) || (sideID == 57))
{
min = 5000;
max = 5070;
}

If we want to add a new Armenian speaking nation, with Sidename ID 100 to this list, we need to change it to read:

// Armenian (also Colchian/Iberian and Caucasian faute de mieux)
if ((sideID == 5) || (sideID == 47) || (sideID == 57) || (sideID == 100))
{
min = 5000;
max = 5070;
}

Be careful that you get the spacing and the right number of brackets in the right place.

Save and close.

The only other concern is selecting the “civilised” or “barbarian” rally horns for your new nation. Unfortunately, this is too problematic to mod, and the game has been set up to allocate the “civilized” horns for any non vanilla nations. It is something we will have to live with for now, maybe a solution will be found in the future.
Last edited by Paul59 on Wed Jun 05, 2019 12:40 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.
rbodleyscott
Field of Glory 2
Field of Glory 2
Posts: 28052
Joined: Sun Dec 04, 2005 6:25 pm

Re: Campaign creation guide Part 3 (Adding new nation names)

Post by rbodleyscott »

Thanks Paul.
Richard Bodley Scott

Image
Pi-R
Corporal - 5 cm Pak 38
Corporal - 5 cm Pak 38
Posts: 42
Joined: Tue Jun 08, 2010 6:08 pm

Re: Campaign creation guide Part 3 (Adding new nation names)

Post by Pi-R »

I have picked up the epic battles I'm trying to create.

To my surprise the colors and banners for all my battles I had created to play from the opposite side have changed.

My initial battles are Spanish vs Roman i.e CAMPAIGN.txt
SIDE0 38
SIDE1 32

I had only used the default settings of the game and changed the name for side 38 by including IDS_SIDENAME_38 in TEXT1.txt.

Since the latest expansion/update my inital battles have remained the same. Only the general's banner for the reinforcements was gone. But following Paul59's update of his guide part 9 this is solved.
Spanish vs Romans
Spanish vs Romans
38vs32.jpg (278.67 KiB) Viewed 5268 times
However for the ones to play from the opposite side, i.e. Roman vs Spanish
SIDE0 32
SIDE1 38

The banners are no longer the same as they were prior to these expansions/updates. Instead of UnitFlags_00, UnitFlags_01 is now being used for Roman. And instead of UnitFlags_05, UnitFlags_04 is now used for Spanish.
New Roman vs Spanish
New Roman vs Spanish
new32vs38.jpg (624.46 KiB) Viewed 5268 times
Why is this suddenly happening, and more importantly how I can I solve this?
Btw so far I have not yet bought the two expansions. But that should not matter, should it?
rbodleyscott
Field of Glory 2
Field of Glory 2
Posts: 28052
Joined: Sun Dec 04, 2005 6:25 pm

Re: Campaign creation guide Part 3 (Adding new nation names)

Post by rbodleyscott »

Can you post the code from your CustomCampaign.txt please - or PM it to me if it is a secret.
Richard Bodley Scott

Image
Pi-R
Corporal - 5 cm Pak 38
Corporal - 5 cm Pak 38
Posts: 42
Joined: Tue Jun 08, 2010 6:08 pm

Re: Campaign creation guide Part 3 (Adding new nation names)

Post by Pi-R »

Hi Richard

You mean the CAMPAIGN.txt?

This is the first battle once for every side

Code: Select all

[Baetis_River_80BC_S]
SIDE0 38
SIDE1 32
DATE 2920 // All dates start from 3000 BC
MAPX 170 // Pixel x location of battle in EpicMap_Ptolemy.dds
MAPY 695 // Pixel y location of battle in EpicMap_Ptolemy.dds

[Baetis_River_80BC_R]
SIDE0 32
SIDE1 38
DATE 2920 // All dates start from 3000 BC
REVERSEOF Baetis_River_80BC_S
rbodleyscott
Field of Glory 2
Field of Glory 2
Posts: 28052
Joined: Sun Dec 04, 2005 6:25 pm

Re: Campaign creation guide Part 3 (Adding new nation names)

Post by rbodleyscott »

Pi-R wrote:Hi Richard

You mean the CAMPAIGN.txt?

This is the first battle once for every side

Code: Select all

[Baetis_River_80BC_S]
SIDE0 38
SIDE1 32
DATE 2920 // All dates start from 3000 BC
MAPX 170 // Pixel x location of battle in EpicMap_Ptolemy.dds
MAPY 695 // Pixel y location of battle in EpicMap_Ptolemy.dds

[Baetis_River_80BC_R]
SIDE0 32
SIDE1 38
DATE 2920 // All dates start from 3000 BC
REVERSEOF Baetis_River_80BC_S
Ah, I thought you were designing a campaign.

Are you sure you have actually reversed Side0 and Side1 in the .BAM file?

Reversing them in the Campaign.txt file will only affect the display in the Epic Battles selection menu. It won't swap this sides in the actual scenario.

See: http://www.slitherine.com/forum/viewtop ... 91&t=82653
Richard Bodley Scott

Image
Pi-R
Corporal - 5 cm Pak 38
Corporal - 5 cm Pak 38
Posts: 42
Joined: Tue Jun 08, 2010 6:08 pm

Re: Campaign creation guide Part 3 (Adding new nation names)

Post by Pi-R »

Hi Richard, Sorry I should have mentioned.
And now I understand that when trying to find the cause I noticed my CAMPAIGN.txt file always stated SIDE0 38 and SIDE1 32, but the (epic) battles played with me controlling the correct side.
Checked the BAM files and they indeed correctly state the sides
If you want I can send you battles. They are almost finished.
rbodleyscott
Field of Glory 2
Field of Glory 2
Posts: 28052
Joined: Sun Dec 04, 2005 6:25 pm

Re: Campaign creation guide Part 3 (Adding new nation names)

Post by rbodleyscott »

Pi-R wrote:Hi Richard, Sorry I should have mentioned.
And now I understand that when trying to find the cause I noticed my CAMPAIGN.txt file always stated SIDE0 38 and SIDE1 32, but the (epic) battles played with me controlling the correct side.
Checked the BAM files and they indeed correctly state the sides
If you want I can send you battles. They are almost finished.
Sure. I believe you have my email address
Richard Bodley Scott

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

Re: Campaign creation guide Part 3 (Adding new nation names)

Post by rbodleyscott »

Hi Pierre.

It turns out that banners swapping in the reversed scenarios is not a bug in your “campaign”, it is a bug in the logic in the main game, affecting reversed scenarios with Romans (or Spartans) on side 0. It also affects vanilla scenarios such as Bagradas in the same way, for the same reason. I will have to fix it for the next update. Thanks for drawing it to my attention.

----------------------------------------

I also noticed that understrength cohorts on the Sertorian side have their missing men in the front rank instead of the back until they move.

This is fixed by adding

AddVizUnitFormationNoWait(id);

after

CustomiseUnitManCount(id);

in your scenario script CustomiseUnits() function.

This forces the engine to call FORMATION_CALLBACK() which corrects the formations.

Cheers,

Richard
Richard Bodley Scott

Image
Sharonn77
Private First Class - Opel Blitz
Private First Class - Opel Blitz
Posts: 1
Joined: Tue Oct 02, 2018 9:32 pm

Re: Campaign creation guide Part 3 (Adding new nation names)

Post by Sharonn77 »

rbodleyscott wrote: Sat Apr 14, 2018 5:49 pm
Pi-R wrote:Hi Richard

You mean the CAMPAIGN.txt?

This is the first battle once for every side

Code: Select all

[Baetis_River_80BC_S]
SIDE0 38
SIDE1 32
DATE 2920 // All dates start from 3000 BC
MAPX 170 // Pixel x location of battle in EpicMap_Ptolemy.dds
MAPY 695 // Pixel y location of battle in EpicMap_Ptolemy.dds

[Baetis_River_80BC_R]
SIDE0 32
SIDE1 38
DATE 2920 // All dates start from 3000 BC
REVERSEOF Baetis_River_80BC_S
Ah, I thought you were designing a campaign.

Are you sure you have actually reversed Side0 and Side1 in the .BAM file?

Reversing them in the Campaign.txt file will only affect the display in the Epic Battles selection menu. It won't swap this sides in the actual scenario.

See: http://www.slitherine.com/forum/viewtop ... 91&t=82653transfers CDG
Thank you very much
Post Reply

Return to “Field of Glory II: Scenario Design”