Modding Resource HeaderTitle: How to limit recruitment & construction by area (hidden resources) (formerly How to...add hidden resources and use them)
Posted by: Nero
Modding area: Units (recruitment) / Buildings (construction)
Required programmes: Notepad (or other text editor)
Optional tools: Excel macro for recruit lines in edb
Hardcoded limits: There can be a maximum of 64 hidden resources, this must include the Rome resource (and Italy for the Marian Reforms).
Summary: Hidden resources are used to limit the areas in which units are recruited and buildings can be constructed. They differ from normal (trade) resources in that they do not appear on the map and provide no income. This tutorial shows you how to add and use these hidden resources.
__________________________________________________
How to...add hidden resources
I haven't found a tutorial to add hidden resources, so I decided to make one myself.
Throughout this tutorial I will explain how hidden resources can be added and how you can make them have effect.
Adding hidden resources to the game
1 - Add the hidden resource to the region in descr_regions
Open up your ...RTW\data\world\maps\base map and open descr_regions.txt when you want to mod the imperial campaign resources.
For any other campaign, open the "...RTW\data\world\maps\campaign\anyothercampaign" map and look for descr_regions.txt there.
Now add any hidden resources you want to any city you want by just typing them in the resources section.
Britannia_Inferior
Eburacum
britons
Brigantes
232 41 198
stone, coastal_forest, lead, dogs, pigs, guineapigs
5
5
In this region, I've added guineapigs as a hidden resource.
2 - Delete map.rwm
Changes to map or regions file will only appear if you delete map.rwm before you relauch the game. You should delete the file in the same folder as the descr_regions file.
3 - Define the hidden resource to export_descr_buildings
Now open the export_descr_buildings.txt file in the ...RTW\data folder.
Almost at the top, there is a line starting with hidden_resources.
Now add the names of the hidden resources you've added to the descr_regions.txt file to this line:
hidden_resources rome, sparta, guineapigs
How to use the hidden resources
Now the hidden resources are present, you can make them have effect on things.
Therefore, use the export_descr_buildings.txt file and just choose anything you want to edit. I've chosen the example of "guineapigrider" as a cavalry unit, and the roman light cavalry will get an experience bonus when the guineapigs resource is present.
building equestrian_roman
{
levels stables
{
stables requires factions { greek_cities, roman, slave, }
{
capability
{
; greeks
recruit "greek cavalry" 0 requires factions { greek_cities, }
; roman
recruit "roman light cavalry" 0 requires factions { roman, } and marian_reforms
recruit "roman light cavalry" 0 requires factions { roman, } and not marian_reforms and not hidden_resource guineapigs
recruit "guineapigrider" 0 requires factions { roman, } and hidden_resource guineapigs
recruit "roman light cavalry" 1 requires factions { roman, } and not marian_reforms and hidden_resource guineapigs
}
construction 4
cost 1200
settlement_min large_town
upgrades
{
}
}
}
}
plugins
{
}
}
In the highlighted lines I have used the hidden resource in various ways and I think this pretty clearly explains how to use them.
Note, hidden resources can also be used in a similar manner to restrict the provinces where buildings can be built.
Have Fun!!!
Bookmarks