The reason I ask is some of the things mentioned aren't quite working. For example, the campaign folder isn't showing up in-game.

Any clarification would be helpful.

Quote Originally Posted by Myrddraal
I know there is the research post, but the info there is a bit muddled, and I missed some stuff first time round, so I though I'd start this thread, feel free to add to it if you like. Very little of this is my work, its just a gathering of information.

Here we go:

Step one:- Making your Campaign folder.

Make a new folder in \data\world\maps\campaign\ called my_campaign and copy the entire contents of the Imperial campaign into it. Also copy the contents of \data\world\maps\base\ into it.

Now go to \data\text\ and copy the file imperial_campaign_regions_and_settlement_names.txt and rename it my_ campaign_regions_and_settlement_names.txt Note: This file goes in data\text folder, NOT the campaign folder

Now when you run Rome, you should see the option to play a Provincial Campaign in the Single Player menu. Your campaign should appear and it should be a playable copy of the Imperial Campaign.


Step two:- know the files

In your new folder you should find the following files:

descr_disasters.txt
descr_events.txt
descr_mercenaries.txt
descr_regions.txt
descr_regions_and_settlement_name_lookup.txt
descr_strat.txt
descr_terrain.txt
description.txt
description_brutii.txt
description_julii.txt
description_scipii.txt
disasters.tga
leader_pic_brutii.tga
leader_pic_julii.tga
leader_pic_scipii.tga
map.rwm
map_britons.tga
map_brutii.tga
map_carthage.tga
map_climates.tga
map_egypt.tga
map_FE.tga
map_features.tga
map_gaul.tga
map_german.tga
map_ground_types.tga
map_heights.hgt
map_heights.tga
map_illyria.tga
map_julii.tga
map_parthia.tga
map_regions.tga
map_roughness.tga
map_scipii.tga
map_seleucid.tga
map_trade_routes.tga
radar_map1.tga
radar_map2.tga
water_surface.tga


You should now delete:

map.rwm
map_heights.hgt

(you don’t need to backup as they are just copies from the Imperial Campaign)

These are files don’t do anything and can be deleted (as far as I know):

description.txt
description_brutii.txt
description_julii.txt
description_scipii.txt


Text files:

descr_disasters.txt
- contains a list of the possible disasters e.g. earthquakes and floods. We don’t need to edit this.

descr_events.txt
- this contains a list of pre-defined events that happen in game.

descr_mercenaries.txt
- This is where the availability of mercs in certain regions is determined. The pool is the overall area, the regions are the regions in this area, and the units are the units availiabe in the pool. We will need to edit this later.

descr_regions.txt
- This is one of the most important files. When we later edit the file map_regions.txt, we will define the areas of the provinces using certain RGB values. In this text file, there is a list of all the provinces on the map. This list also contains info like the name of the region (no spaces but you can use _), the name of the settlement, the default cultures, the RGB value used to define this region in map_regions.tga, the resources available in that province, the triumph point value and the basic farm level. We will be editing this a lot.

descr_regions_and_settlement_name_lookup.txt
- This should contain a list of all the names of provinces and towns as they are called in descr_regions.txt These aren’t the actual names as they will appear on the map, these are just references for the program.

descr_strat.txt
- This is also one of the most important files. In this file, we choose the factions, set the start/end dates, position 3D models on the campmap (e.g. wonders and resources), allocate settlements to factions, set the buildings and place armies and family members. I go into the format of this a bit later.

descr_terrain.txt
- This contains the info about the dimensions of the map.


Tga files:

disasters.tga
- Contains the locations on the map for the different disasters. This should be the same size as map_regions.tga, which should have the dimensions stated in terrain.txt

leader_pic_FACTION.tga
- Where FACTION is the faction name. This is the portrait for the first leader of that faction.

Map_FACTION.tga
- Where FACTION is the faction name. This is the image that appears when you select a faction to show what sections of the world it owns.

map_climates.tga
- This is where you set the different climates for the world. There are 12 different climates some of which will become snowed during winter.

The 12 different climates are:
Sub-Arctic - Dark Green RGB(0, 166, 81)
Alpine - Green RGB(57, 181, 74)
Highland - Light Green RGB(141, 198, 63)
Swamp - Yellow RGB(255, 242, 0)
Deep Temperate Forest - Light Orange RGB(247, 148, 29)
Light Temperate Forest - Orange RGB(242, 101, 34)
Infertile Temperate Grassland - Red RGB(237, 28, 36)
Fertile Temperate Grassland - Dark Pink RGB(237, 20, 91)
Mediterranean - Pink RGB(236, 0, 140)
Semi-Arid - Blue RGB(0, 114, 188)
Sandy Desert - Dark Purple RGB(102, 45, 145)
Rocky Desert - Mauve RGB(146, 39, 143)

The dimensions of this file should be twice the size of map_regions.tga + 1 pixel

map_FE.tga
- I’m not sure what this does, it appears to be a map of the world, but it doesn’t look like any of the radar screens.

map_features.tga
- This is where you give the position of rivers volcanoes and cliffs. For rivers you define the source, the river and the crossings using different RGB values. Cliffs are just lines you cannot cross. This should be the same size as map_regions.tga, which should have the dimensions stated in terrain.txt

Here are the RGB values:
River - Blue (0,0,255)
Volcano - Red (255,0,0)
Cliff - Yellow (255,255,0)
River Crossing - Light Blue (0,255,255)
River Source - White (255,255,255)

Rivers cannot go diagonally (i.e. from one pixel to the pixel down and to the right). They must go in steps (i.e. from one pixel, down one pixel, across one pixel). You cannot have a square of river (i.e. 2 by 2 pixels) and a river must have a source. You can have a river that splits, but it cannot re-join itself.

map_ground_types.tga
- This is where you set the textures for your campaign map (i.e. Fertile, desert etc). There are 14 different ground types defined using different RGB values. The dimensions of this file should be twice the size of map_regions.tga + 1 pixel

The RGB values are:
Fertile Low - Grey-Blue (0, 128, 128)
Fertile Medium - Light Green (96, 160, 64)
Fertile High - Olive (101, 124, 0)
Wilderness - Black (0, 0, 0)
Mountains High - Light Brown (196, 128, 128)
Mountains Low - Brown (98, 65, 65)
Hills - Olive-Brown (128, 128, 64)
Forest Dense - Dark Green (0, 64, 0)
Forest Sparse - Green (0, 128, 0)
Swamp - Bright Green (0, 255, 128)
Ocean - Dark Maroon (64, 0, 0)
Sea Deep - Dark Red (128, 0, 0)
Sea Shallow - Red (196, 0, 0)
Beach - White (0, 0, 0)

map_heights.tga
- This is where the 3D aspect of the campmap is determined.

Ground must be shades of gray (Red = Green = Blue i.e. RGB(100 100 100)). The lighter the shade of gray, the higher the point on the campmap.

Sea must be shades of blue (Blue = anything, Green = Red = 0). I think it is possible to use any shade of blue, but the existing campaign maps use RGB(0 0 253) so that’s a safe bet.

map_regions.tga
- Probably the most important file. It should be the size shown in desr_terrain.txt

This is where the regions are defined. Each region has a different RGB value which is then stated in descry_regions.txt as I said earlier. Each province must have a town shown by a single black pixel RGB(0 0 0). This pixel must not touch another province. Ports are shows as a single white pixel RGB(255 255 255). These must be in contact with the sea. Ports are not necessary for the game to run.

Each province must at least a city. This pixel may not touch or corner a different province.
single pixel with R:0 G:0 B:0

Ports are not necessary, even for coast provinces.
single pixel with R:255 G:255 B:255

When making your map, remember these requirements.

Required landmass
The engine requires a certain amount of landmass that is relative to the size of the campaign map. If that amount is not present than the campaign will crash before loading.

Jerome posted:

A few other caveats about regions:
- they should be 'convex' (one landmass, no inaccessible areas)*
- they should have only one settlement and only one port
- all land tiles should be part of a known region
- each non-sea region should contain at least some fertile tiles
- continuous sea surfaces should form one region
- the maximum number of regions supported is 200
- the distance between the centres of any two adjacent regions should not exceed 50 tiles*

*: not doing these things shouldn't cause a crash, but it may cause the AI to mess up.

map_roughness
- When it comes to this file, I am ignorant as to what it does, someone could help me out to finish this guide? I know that it has to be twice the size as map_regions.tga.

map_trade_routes.tga
- Again, not sure what this does. It should be the same size as map_regions.tga

radar_map1.tga
- This is the minimap for the campaign. It should be the same size as map_regions.tga

radar_map2.tga
- This is the map shown during faction selection. It should be twice the size as regions.tga

water_surface.tga
- This is a texture for the surface of the water, you won’t need to edit this.


_________________________________________________________________



Step 3:- Editing and adding new provinces (in detail)

This post seems very long, but reading it once is enough. Once you get the hang of it its easy.

This section of the guide can be a bit hard to follow as at some points you will have to do separate things if you are editing provinces or if you are adding a new province. The bits of this guide which are unique to editing provinces are in blue, and the bits which are unique to adding a new province are in red. Anything in black applies to both. Hope you can follow it:

Editing the size/shape of existing provinces / adding the shape of a new province to the map:

If all you want to do is edit the shape/size of a province, this section is enough.
To add a new province completely you will have to do this section and the next sections.

There couldn’t be anything easier than editing existing provinces. Adding new provinces is a bit more complicated but the principles are the same. Open up map_regions.tga in a picture editor.

As you can see, the image consists of a different RGB value representing each province. Each province has a black dot in it. This is where the town in that province will appear. There is sometimes a white dot where ports will appear. Sea is represented by light blue RGB(41 140 233)

To edit a province simply use the colour of the province you want to edit and change the size and shape of the province.

Make sure you use the same RGB value as for the rest of the province, make sure you have at least one and no more than one black pixel RGB(0 0 0) where the town will be. Remember that this pixel cannot touch another province (it must be surrounded by pixels of the colour of the province). Be wary about changing the position of the town. If you place it in an invalid place (i.e. up a mountain) you will get an error. Ports are not strictly necessary even for coastal provinces. They must touch the sea.


To add a new region just choose a colour (make sure it’s a colour that hasn’’t been used yet) and draw in your province. Remember, each province need one and no more than one town (single black pixel), and remember the recommendations Jerome posted:

A few other caveats about regions:
- they should be 'convex' (one landmass, no inaccessible areas)*
- they should have only one settlement and only one port
- all land tiles should be part of a known region
- each non-sea region should contain at least some fertile tiles
- continuous sea surfaces should form one region
- the maximum number of regions supported is 200
- the distance between the centres of any two adjacent regions should not exceed 50 tiles*

*: not doing these things shouldn't cause a crash, but it may cause the AI to mess up.

If all you’ve done is edit an existing province, make sure you have deleted map.rwm and run the game. The province should be edited.

To add a new region carry on to Editing/Adding the culture and resources and stats of provinces step

Nothing new so far, and that should be fairly easy.
Now for some extra info:

Editing / Adding the culture resources and stats of provinces:

To edit / add resources and cultures open up descr_regions.txt.

Here there should be a list of all the provinces on the map. The format for this list goes something like this:

Province_Name
--------- Town_Name
---------Culture (Faction)
---------Culture (Rebels)
---------Red Green Blue values separated by spaces
---------Resources separated by commas
---------Triumph point value
---------Basic farm level

Now I’ll go through what each one does:

Changing the names of existing provinces as they appear on the campaign map is not done in this file. The names given here are just references for the program and as you can see contain no spaces (Though they may contain underscores). I’ll come back to editing names further on.

The cultures define how loyal the people will be to nations that govern them and how they will rebel.
Culture (Faction) is the faction to which the people of this province will be most loyal too, i.e. romans_julii.
Culture (Rebels) determines which rebel faction the people of the province will join if they rebel. A list of all the rebel factions can be found in rebel_factions_descr_enums.txt in the ‘data’ folder.

The RGB value is, as I have already said, the RGB value of that province in map_regions.tga. For editing existing provinces you shouldn’t edit this if you are editing an existing province.

The resources are separated by commas and spaces.. Here is a list of existing resources:

Normal resources:
iron
wine
marble
timber
glass
gold
grain
lead
amber
camels
silver
textiles
pottery
hides
olive_oil
elephants
camels
copper
purple_dye
incense
silk
tin
wild_animals
slaves
dogs
pigs

Hidden resources
Sparta

If you don’t want the province you are editing to have any resources, simply type ‘none’ here.

I don’t know what the triumph point value is.

The basic farm level is how good at farming this province is. The higher the basic farm level, the more money you will get from building farming buildings.

Here is an example province. Yours should look something like this:

Tribus_Alanni
---------Campus_Alanni
---------scythia
---------Alans
---------177 170 58
---------silver, dogs, pigs
---------5
---------3

To edit the cultures or resources just change the stats and save

To add a new province go to the bottom of the list, and add a new province. Remember:

Province_Name
---------Town_Name
---------Culture (Faction)
---------Culture (Rebels)
---------Red Green Blue values separated by spaces
---------Resources separated by commas
---------Triumph point value
---------Basic farm level



Changing/adding the ownership, town level and buildings in a settlement,

This part of the guide contains a lot of ‘I think’ could someone please confirm what I’m saying, it will put my mind at rest.

Open up descr_strat.txt

As I said in the ‘Knowing the Files’ section, in this file it is possible to change the start/end dates, the playable/unplayable/unlockable factions. It is also possible to move around the 3D objects on the map such as the resources and the wonders of the world. It is also possible to change the armies, family members, agents and family tree of a faction. Most of these things will be self evident, but I’m going to skip them to get on to modding provinces.

Some of this will be self evident also, but I want to make this guide as simple to follow as possible so I’m going into detail:

Scroll down or search for:

;>>>> start of factions section

Here you should see a list of all the factions, within each faction area, there is a list of all the settlements, and then a list of all the family members and their armies, then a list of their agents, then a list of their ships and finally the info about their family tree. As I said, I’m going to concentrate on the settlements.

This is the basic format of a settlement (Note, the words in square brackets [] are my explanations:

settlement
{
---------level
---------region

---------year_founded
---------population
---------settlement_tax
---------plan_set
---------faction_creator
---------building
---------{
------------------[This is where the list of the buildings go]
---------}
}

The level is the size of the town, i.e. city or large_town. The possible values are:
village
town
large_town
city
large_city
huge_city

The region is simply the province in which the town is.

I don’t know what year_founded does. All the existing towns have 0 as the value here.

Population is the number of people. If you want your towns to be villiages, then they can have a huge population.

I think that with the settlement_tax, the higher the number, the more money you get from taxation (I think, but it seems that every existing town has a value of 51)

The plan_set is the layout of the town in battle.

The faction_creator determines the appearance of the town, i.e. the barbarian towns look different to the roman ones.

The list of buildings takes this format:

---------building
---------{
------------------Type [Type of building] [Name of building e.g. muster_field]
---------}

The type of building is its category as in export_descr_buildings.txt in the ‘data’ folder. This includes:
Core_buildings
defenses (notice that CA can’t spell defences)
barracks
equestrian
missiles
market
smith
port_buildings
health
hinterland_farms
hinterland_roads
hinterland_mines
academic
amphitheatres
theatres
despotic_law
caravans
taverns
temple_of_battle
temple_of_battleforge
temple_of_farming
temple_of_fertility
temple_of_forge
temple_of_fun
temple_of_governors
temple_of_healing
temple_of_horse
temple_of_hunting
temple_of_justice
temple_of_law
temple_of_leadership
temple_of_love
temple_of_naval
temple_of_one_god
temple_of_trade
temple_of_victory
temple_of_violence
temple_of_viking
temple_of_horse2

The name is its name as in export_descr_buildings.txt
To add another building just repeat this format. For example:

---------building
---------{
------------------Type barracks muster_field
---------}
---------building
---------{
------------------Type core_building governors_villa
---------}

To edit a province, just scroll down till you find it, or search for the name of the province it is in (e.g. Latium not Rome), and change the stats. Save the file, make sure you’ve deleted map.rwm and run the game.

To add a new province, find the faction you want to add it to (If you don’t want to give it to a faction add it to slaves) and scroll to the bottom of the list. Add your faction using the formatting I gave above:

settlement
{
---------level
---------region

---------year_founded
---------population
---------settlement_tax
---------plan_set
---------faction_creator
---------building
---------{
------------------[This is where the list of the buildings go]
---------}
}

Now there’s only one more thing to do before you’re province is playable.



Changing/adding the name of a province as it appears on the campmap


Open up my_campaign_regions_and_setlement_names.txt in the data\text folder.

Here you should see a list of all the references used by the comp surrounded by curly brackets {} and then three indents (tab) and the name that appears in game.

e.g.
{Britannia_Inferior}---------------------------Britannia Inferior

To edit the name as it appear on the campmap simply edit the right hand column.

To add your province at the bottom of the list add this (with your own names):

{my_province}---------------------------My Province
{my_town}---------------------------My Town


Save and quit.

You’re new province should now be working. Make sure you’ve deleted map.rwm and run the game.


_________________________________________________________________




Section four: Resizing the campaign map (in detail)

Resizing your campaign map is a fairly easy procces. First, open up map_regions.tga. Resize the canvas to the dimensions you want.
I recommend that you resize from the top right hand corner, as all measurements in descr_strat.txt are measured from the bottom left hand corner. If you want to resize in another direction, you will have to change all the co-ordinates in descr_strat.
I recommend you fill this new area with sea colour. You can always edit it later.

Now take a note of the new dimensions (in pixels) of map_regions.tga.

Open up desc_terrain.txt. Here you should see the x and y dimensions of the map. These are the dimensions of the map_regions.tga. Edit these so that they match the size of your map. Save and Quit.

Now you have to edit these files:
disasters.tga
map_climates.tga
map_features.tga
map_ground_types.tga
map_heights.tga
map_regions.tga
map_roughness.tga
map_trade_routes.tga

You have to resize them to the right proportions. Remember to resize from the top right hand corner (i.e. add canvas to the top and right hand sides).

Remember the dimensions of the files:
disasters.tga - The same size as map_regions.tga
map_climates.tga - Twice the size of map_regions.tga + one pixel
map_features.tga - The same size as map_regions.tga
map_ground_types.tga - Twice the size of map_regions.tga + one pixel
map_heights.tga - Twice the size as map_regions.tga + one pixel
map_roughness - Twice the size as map_regions.tga.
map_trade_routes.tga - The same size as map_regions.tga
radar_map1.tga - The same size as map_regions.tga
radar_map2.tga - Twice the size of regions.tga

As in map_regions, you should make this new area sea colour. This is not the same for every file, and some files do not require a specific colour for the sea. It should be easy enough for you to do.

Delete map.rmw, and run the game.



NB: A new map.rmw will be generated every time you run the campaign, you must delete it EVERY time. If a new one isn't generated, then it is probably an error in the tga's.


Good Luck,
Myrddraal