A few people have voiced complaints that they can't build First Cohorts, thus making it impossible to replenish a depleted unit after combat losses. Using the example of the Spartan Hoplite which is limited to being built in Sparta and Syracuse (not really sure why the later, but... ) I modded in the ability to build the First Cohorts in Rome.
The first file to mod is descr_regions.txt (found in \Data\world\maps\base), adding in a label for your intended hidden resource...
Latium
Rome
romans_senate
Latins
52 13 198
dogs, pigs
5
8
changes to...
Latium
Rome
romans_senate
Latins
52 13 198
dogs, pigs, rome
5
8
I would guess that the added label has to be unique, so the name of the settlement in the province is a convenient choice. By setting up an appropriately named and unique hidden resource in every province, you can easily produce province-specific units.
Next you need to delete the map.rwm and map_heights.hgt files in the same directory. RTW rebuilds the former file from the various base text and graphic files to give the 3D campaign map; the latter file appears to be unused, but since other mods that change the map say to get rid of it, who am I to quibble? LOL
Now you need to edit the export_descr_buildings.txt file in \Data. At the top you'll see a line like this...
hidden_resources sparta
...which you need to change to this...
hidden_resources rome, sparta
Then you need to add the entries for the First Cohorts under the appropriate buildings:
Under city_barracks...
recruit "roman legionary first cohort i" 0 requires factions { roman, } and marian_reforms and hidden_resource rome
Under army_barracks and royal_barracks...
recruit "roman legionary first cohort i" 0 requires factions { roman, } and marian_reforms and hidden_resource rome
recruit "roman legionary first cohort ii" 0 requires factions { roman, } and marian_reforms and hidden_resource rome
So each First Cohort can be built at the same time as the appropriate Legionary Cohort, but only in Rome itself. If I wanted them to be built in every original Roman province, I could either add the hidden resource of rome to each province in the descr_regions.txt file - but that would lose the ability to have something unique to Rome alone - or have multiple entries of the recruit "roman legionary... lines in export_descr_buildings.txt, with the hidden resource value changed each time to the required province.
The idea could be extended to add provinces to cultural/regional groups, so I could have the hidden resource of roman added to each of the starting Roman provinces - Brutii, Julii, Scipii and Senate - plus perhaps the 3 northern Italian provinces in Gallic and rebel hands and the remainder of Sicilly, in addition to their unique individual hidden resources. I could then alter the Hastati, Princeps, Triarii, Early Legionary Cohorts, Legionary Cohorts, Praetorian Cohorts and Urban Cohorts so that they all require the roman hidden resource and thus can only be built in Italy and Sicilly, meaning that only Auxilia could be recruited in non-Italian provinces once they've been conquered.
Extending the idea further, a province could have more than one cultural group hidden resource, with Cisalpine Gaul (Mediolanium) and Venetia (Patavium) having the resources of both roman and gallic.
There's more that can be done with this in combination with the export_descr_buildings.txt file, allowing certain regions to produce a particular unit type with an experience bonus for example.
EDIT: I should add that existing campiagns don't seem to pick up the changes, so you'll have to start a new one to take benefit of any modding. My guess is that the the savefile includes details of each provinces resources, with them being set when the campaign starts.
Bookmarks