Trying to mod a campaign, I wasn't able to give my new armies the proper region names into the campaign.
Does anybody knows which is the file where the pairings of army and region names (present in the TXT6.TXT) is made?
			
			
									
						
							Modding campaign provinces names
Moderators: rbodleyscott, Slitherine Core, Gothic Labs
- 
				Lysimachos
 - Colonel - Fallschirmjäger

 - Posts: 1415
 - Joined: Tue Dec 08, 2009 9:38 am
 - Location: Italy
 
Modding campaign provinces names
"Audentis fortuna iuvat"
- Virgilius
(Good luck favours the brave)
			
						- Virgilius
(Good luck favours the brave)
Re: Modding campaign provinces names
I don't think I have ever tried to mod the province names, and it is several years since I even played a P&S Campaign, so my knowledge of this is a bit shaky. But looking at the game's files I see that there is a CustomCampaignTools.bsf file in the main P&S Campaign folder. If you can open it you will see a section of code that controls what province names are used with each nation:Lysimachos wrote: ↑Tue Dec 24, 2024 9:11 am Trying to mod a campaign, I wasn't able to give my new armies the proper region names into the campaign.
Does anybody knows which is the file where the pairings of army and region names (present in the TXT6.TXT) is made?
Code: Select all
// Print province name - different depending on nation
FUNCTION PrintProvinceName(province)
{
	int offset;
	int sideID;
	sideID = GetCampaignVar("CampSideID", GetProvinceOriginalOwner(province));
	offset = 0;
	if ((sideID == 2) || (sideID == 3) || (sideID == 7) || (sideID == 11) || (sideID == 15) || (sideID == 19))
		{
			offset = 0;
		}
	if ((sideID == 4) || (sideID == 18) || (sideID == 20))
		{
			offset = 23;
		}
	if ((sideID == 13) || (sideID == 14))
		{
			offset = 46;
		}
	if ((sideID == 5) || (sideID == 17) || (sideID == 21) || (sideID == 24))
		{
			offset = 69;
		}
	if ((sideID == 6) || (sideID == 10))
		{
			offset = 92;
		}
	if ((sideID == 8) || (sideID == 22))
		{
			offset = 115;
		}
		
	if ((sideID == 9) || (sideID == 23) || (sideID == 25))
		{
			offset = 138;
		}
	if (sideID == 16)
		{
			offset = 161;
		}
	PrintStringIndexed("IDS_PROVINCE_NAME", province + offset);
}I hope that helps?
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.
			
						Field of Glory II Medieval Scenario Designer.
FOGII TT Mod Creator
Warhammer 40,000: Sanctus Reach Tournament Scenario Designer.
- 
				Lysimachos
 - Colonel - Fallschirmjäger

 - Posts: 1415
 - Joined: Tue Dec 08, 2009 9:38 am
 - Location: Italy
 
Re: Modding campaign provinces names
Thank's a lot Paul (and merry Christmas too)!
I think this really solves the problem.
			
			
									
						
							I think this really solves the problem.
"Audentis fortuna iuvat"
- Virgilius
(Good luck favours the brave)
			
						- Virgilius
(Good luck favours the brave)
Re: Modding campaign provinces names
Lysimachos wrote: ↑Tue Dec 24, 2024 2:50 pm Thank's a lot Paul (and merry Christmas too)!
I think this really solves the problem.
Oh yes, Merry Christmas to you too!
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.
			
						Field of Glory II Medieval Scenario Designer.
FOGII TT Mod Creator
Warhammer 40,000: Sanctus Reach Tournament Scenario Designer.
- 
				Lysimachos
 - Colonel - Fallschirmjäger

 - Posts: 1415
 - Joined: Tue Dec 08, 2009 9:38 am
 - Location: Italy
 
Re: Modding campaign provinces names
Well Paul,
I tried to find the lines you referred to in the CustomCampaignTools.bsf file but wasn't unable to find them.
Do you think that I could try to add them in the file, just in order to verify if it works anyway?
			
			
									
						
							I tried to find the lines you referred to in the CustomCampaignTools.bsf file but wasn't unable to find them.
Do you think that I could try to add them in the file, just in order to verify if it works anyway?
"Audentis fortuna iuvat"
- Virgilius
(Good luck favours the brave)
			
						- Virgilius
(Good luck favours the brave)
Re: Modding campaign provinces names
I was referring to the 5PikeandShotCampaign folder. The lines of code are at the very end of the CustomCampaignTools.bsf file. Maybe you are looking at a different campaign?Lysimachos wrote: ↑Wed Dec 25, 2024 12:00 am Well Paul,
I tried to find the lines you referred to in the CustomCampaignTools.bsf file but wasn't unable to find them.
Do you think that I could try to add them in the file, just in order to verify if it works anyway?
I would assume that if you added this code to your mods CustomCampaignTools.bsf the game would use it for your mod.
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.
			
						Field of Glory II Medieval Scenario Designer.
FOGII TT Mod Creator
Warhammer 40,000: Sanctus Reach Tournament Scenario Designer.
- 
				Lysimachos
 - Colonel - Fallschirmjäger

 - Posts: 1415
 - Joined: Tue Dec 08, 2009 9:38 am
 - Location: Italy
 
Re: Modding campaign provinces names
Ok, I understand now!
In fact I was previously looking into the main game folder ...
			
			
									
						
							In fact I was previously looking into the main game folder ...
"Audentis fortuna iuvat"
- Virgilius
(Good luck favours the brave)
			
						- Virgilius
(Good luck favours the brave)
					
					