Callatian
11-01-2004, 00:46
How To Make a New Province In RTW
We're going to modify four files here:
/data/world/maps/base/map_regions.tga
/data/world/maps/base/descr_regions.txt
/data/world/maps/campaign/YOURCAMPAIGNNAMEGOESHERE/descr_strat.txt
/data/text/YOURCAMPAIGNNAMEGOESHERE_regions_and_settlement_names.txt
You'll need an image editing program like Photoshop to edit the tga file. Since Photoshop is my preferred program, that's what I'll be using for this guide.
Step 1:
Open map_regions.tga in an image editor.
You'll see each province has its own color as well as a single black pixel, which designates where the city goes. Some cities have a white pixel on a coastal piece of land which shows where the port will go. Not all cities need ports. We're going to make a province to split Armenia and Pontus a little, so we'll go to that section of the map. I've taken the liberty of zooming in quite a bit so we can see what we're doing here:
http://vaticanspecialforces.org/rome/province1.png
Now, select an RGB color that isn't being used already. I just picked a random color of 163, 120, 8.
http://vaticanspecialforces.org/rome/province2.jpg
Go ahead and pencil in your new province--zoom in so you get a good view. I supose this goes without saying, but make sure you're using the pencil tool and not the brush tool in Photoshop. Right click the brush tool and switch it to pencil. We're not going to change the land formation, just change borders and add a new city and port:
http://vaticanspecialforces.org/rome/province3.png
I set the city in what I hope is a valid location by simply looking at the Rome map that came with the game, and sort of figuring out where the mountains won't be. This is a very difficult region to add to since there are mountains EVERYWHERE, and we have to place the city almost exactly, unless we want to edit the map's terrain (not in this guide, muchacho!). If you place a city on an invalid piece of terrain, say a river or mountain, the game won't load.
Save your map_regions.tga file now, and open descr_regions.txt.
We're going back to map_regions.tga a little later, so you may want to just leave the file open for simplicity.
Now we need to come up with a name for this region and city. Google away. I reliaze this isn't the right location for it, but I'm going to call this "Armenia Inferior" anyway. We'll call the city Yerevan because I'm trying to write a Rome modding guide, not history.
So in the descr_regions.txt file, we're going to make a new entry that looks like this:
Armenia_Inferior
Yerevan
armenia
Cappadocians
163 120 8
iron, wild_animals, hides
5
6
The settings are, in order:
Region_Name (underscore if two words)
City_Name (underscore if two words)
city culture
RGB value (remember how we had to set a unique value when making the province? That value goes here)
resource1, resource2, resource3 (I don't think there's a limit to the number of resources you can have)
Triumph Value (does not appear to be used in the game, just set it to 5 like almost every other province for simplicity)
Farm level (5-6 is about average, while some very fertile provinces have over 10)
Now we open up the descr_strat file and insert our province. If you want to give it to rebels, put it below the "slave" city list, and if you want to give it to a particular faction, put it in their city list. We're going to give this to Armenia. So go their section, and add a new settlement. I suggest just copying a previous one and editing it as necessary. I decided to make Armenia Inferior a large down with few military buildings:
settlement
{
level large_town
region Armenia_Inferior
year_founded 0
population 4500
settlement_tax 51
plan_set default_set
faction_creator parthia
building
{
type core_building governors_villa
}
building
{
type hinterland_farms farms
}
building
{
type port_buildings port
}
}And we need to add a garrison that is placed directly on the city here so they don't rebel against us in the first turn. We need to know the X, Y coordinates of our city, so we look them up using in Photoshop:
http://vaticanspecialforces.org/rome/province4.png.
I'm going to make this garrison NOT have a family member, because that's a whole different bag of worms and will unnecessarily complicate this guide. So we'll just stock them with regular units, but you HAVE to put a general in there (he'll appear with one of the units).
So I add this value here:
character Kudurmabug, general, command 0, influence 0, management 0, subterfuge 0, age 20, , x 208, y 71
army
unit east horse archer exp 0 armour 0 weapon_lvl 0
unit east horse archer exp 0 armour 0 weapon_lvl 0
unit east peltast exp 0 armour 0 weapon_lvl 0
Note two things about this:
First, my general has a valid Armenian name that isn't already taken. You can find these names in the /data/descr_names.txt file, in the appropriate faction list. Make sure the name is not already taken.
Second, my X, Y values are different that what Photoshop says. Photoshop's grid starts at the top left, whereas the game's grid starts at the bottom left. This means that your X value will be the same, but your Y value will be 155 - (whatever photoshop's y is). In my case, Photoshop gave me an X, Y of 208, 84. This is because the map is 155 pixels in height. Make sense?
Now, go into the /text folder and open the regions and settlement names text file associated with your campaign, and add a string value for your new province and city. Ours will look like this:
{Armenia_Inferior} Armenia Inferior
{Yerevan} Yerevan Now that we have all that added, we're going into the /data/world/maps/base/ folder and deleting these two files:
map.rwm
map_heights.hgt
Let's fire up the game now and see if it works. I'd recommend making your shortcut command line look like this: "E:\RTW\RomeTW.exe -show_err", without the quotations, and change the path to wherevery you've installed your game. This will usually give you an error message saying why the game crashes, if it does.
http://vaticanspecialforces.org/rome/province5.jpg
And in this case, it seems to load just fine. I placed this a little close to the river (passing unfriendly armies can't get through, (because it blocks it), so I may move the city a little by adjusting the black pixel in map_regions.tga. But you know how to do that now.
Troubleshooting - If your game is giving you errors, here are some likely problems:
1) The color used for the province is invalid. Either it's already in use or it's simply a color the game doesn't recognize (there appear to be several, and I don't think anyone knows which ones are or aren't). Simply change the color in an image editor.
2) The city is placed on an invalid location
3) The city list in descr_strat.txt is invalid, either it has an improper level (putting buildings in a "village" for example), or there is
an error in the code (as if you left out a line or a bracket).
4) The map.rwm and heights.hgt files have not been deleted and a change has been made that would require them to be (adding a resource, for example)
5) The regions.txt file has spaces in the city/province names. Remember, underscores.
6) The entry has not been added properly into the /text/CAMPAIGN_NAME_regions_and_settlement_names.txt file (if you get some kind of "string" error, this is likely the cause)
Well, that's all there is to it!
**********************************************************
Made By Burebista[Callatian] and Vorbis with RDB II support on www.twcenter.net (http://www.twcenter.net/)
This Tutorials will be enlarged in the future with new stuff. If we are missing some info pls. see the tutorials on this site [forums.totalwar.org] they are the best so far from what I've seen.
**********************************************************
We're going to modify four files here:
/data/world/maps/base/map_regions.tga
/data/world/maps/base/descr_regions.txt
/data/world/maps/campaign/YOURCAMPAIGNNAMEGOESHERE/descr_strat.txt
/data/text/YOURCAMPAIGNNAMEGOESHERE_regions_and_settlement_names.txt
You'll need an image editing program like Photoshop to edit the tga file. Since Photoshop is my preferred program, that's what I'll be using for this guide.
Step 1:
Open map_regions.tga in an image editor.
You'll see each province has its own color as well as a single black pixel, which designates where the city goes. Some cities have a white pixel on a coastal piece of land which shows where the port will go. Not all cities need ports. We're going to make a province to split Armenia and Pontus a little, so we'll go to that section of the map. I've taken the liberty of zooming in quite a bit so we can see what we're doing here:
http://vaticanspecialforces.org/rome/province1.png
Now, select an RGB color that isn't being used already. I just picked a random color of 163, 120, 8.
http://vaticanspecialforces.org/rome/province2.jpg
Go ahead and pencil in your new province--zoom in so you get a good view. I supose this goes without saying, but make sure you're using the pencil tool and not the brush tool in Photoshop. Right click the brush tool and switch it to pencil. We're not going to change the land formation, just change borders and add a new city and port:
http://vaticanspecialforces.org/rome/province3.png
I set the city in what I hope is a valid location by simply looking at the Rome map that came with the game, and sort of figuring out where the mountains won't be. This is a very difficult region to add to since there are mountains EVERYWHERE, and we have to place the city almost exactly, unless we want to edit the map's terrain (not in this guide, muchacho!). If you place a city on an invalid piece of terrain, say a river or mountain, the game won't load.
Save your map_regions.tga file now, and open descr_regions.txt.
We're going back to map_regions.tga a little later, so you may want to just leave the file open for simplicity.
Now we need to come up with a name for this region and city. Google away. I reliaze this isn't the right location for it, but I'm going to call this "Armenia Inferior" anyway. We'll call the city Yerevan because I'm trying to write a Rome modding guide, not history.
So in the descr_regions.txt file, we're going to make a new entry that looks like this:
Armenia_Inferior
Yerevan
armenia
Cappadocians
163 120 8
iron, wild_animals, hides
5
6
The settings are, in order:
Region_Name (underscore if two words)
City_Name (underscore if two words)
city culture
RGB value (remember how we had to set a unique value when making the province? That value goes here)
resource1, resource2, resource3 (I don't think there's a limit to the number of resources you can have)
Triumph Value (does not appear to be used in the game, just set it to 5 like almost every other province for simplicity)
Farm level (5-6 is about average, while some very fertile provinces have over 10)
Now we open up the descr_strat file and insert our province. If you want to give it to rebels, put it below the "slave" city list, and if you want to give it to a particular faction, put it in their city list. We're going to give this to Armenia. So go their section, and add a new settlement. I suggest just copying a previous one and editing it as necessary. I decided to make Armenia Inferior a large down with few military buildings:
settlement
{
level large_town
region Armenia_Inferior
year_founded 0
population 4500
settlement_tax 51
plan_set default_set
faction_creator parthia
building
{
type core_building governors_villa
}
building
{
type hinterland_farms farms
}
building
{
type port_buildings port
}
}And we need to add a garrison that is placed directly on the city here so they don't rebel against us in the first turn. We need to know the X, Y coordinates of our city, so we look them up using in Photoshop:
http://vaticanspecialforces.org/rome/province4.png.
I'm going to make this garrison NOT have a family member, because that's a whole different bag of worms and will unnecessarily complicate this guide. So we'll just stock them with regular units, but you HAVE to put a general in there (he'll appear with one of the units).
So I add this value here:
character Kudurmabug, general, command 0, influence 0, management 0, subterfuge 0, age 20, , x 208, y 71
army
unit east horse archer exp 0 armour 0 weapon_lvl 0
unit east horse archer exp 0 armour 0 weapon_lvl 0
unit east peltast exp 0 armour 0 weapon_lvl 0
Note two things about this:
First, my general has a valid Armenian name that isn't already taken. You can find these names in the /data/descr_names.txt file, in the appropriate faction list. Make sure the name is not already taken.
Second, my X, Y values are different that what Photoshop says. Photoshop's grid starts at the top left, whereas the game's grid starts at the bottom left. This means that your X value will be the same, but your Y value will be 155 - (whatever photoshop's y is). In my case, Photoshop gave me an X, Y of 208, 84. This is because the map is 155 pixels in height. Make sense?
Now, go into the /text folder and open the regions and settlement names text file associated with your campaign, and add a string value for your new province and city. Ours will look like this:
{Armenia_Inferior} Armenia Inferior
{Yerevan} Yerevan Now that we have all that added, we're going into the /data/world/maps/base/ folder and deleting these two files:
map.rwm
map_heights.hgt
Let's fire up the game now and see if it works. I'd recommend making your shortcut command line look like this: "E:\RTW\RomeTW.exe -show_err", without the quotations, and change the path to wherevery you've installed your game. This will usually give you an error message saying why the game crashes, if it does.
http://vaticanspecialforces.org/rome/province5.jpg
And in this case, it seems to load just fine. I placed this a little close to the river (passing unfriendly armies can't get through, (because it blocks it), so I may move the city a little by adjusting the black pixel in map_regions.tga. But you know how to do that now.
Troubleshooting - If your game is giving you errors, here are some likely problems:
1) The color used for the province is invalid. Either it's already in use or it's simply a color the game doesn't recognize (there appear to be several, and I don't think anyone knows which ones are or aren't). Simply change the color in an image editor.
2) The city is placed on an invalid location
3) The city list in descr_strat.txt is invalid, either it has an improper level (putting buildings in a "village" for example), or there is
an error in the code (as if you left out a line or a bracket).
4) The map.rwm and heights.hgt files have not been deleted and a change has been made that would require them to be (adding a resource, for example)
5) The regions.txt file has spaces in the city/province names. Remember, underscores.
6) The entry has not been added properly into the /text/CAMPAIGN_NAME_regions_and_settlement_names.txt file (if you get some kind of "string" error, this is likely the cause)
Well, that's all there is to it!
**********************************************************
Made By Burebista[Callatian] and Vorbis with RDB II support on www.twcenter.net (http://www.twcenter.net/)
This Tutorials will be enlarged in the future with new stuff. If we are missing some info pls. see the tutorials on this site [forums.totalwar.org] they are the best so far from what I've seen.
**********************************************************