
Originally Posted by
Stylix
@Squid
This is a quote from a quide I was going by to help me with the EDB. I was thinking, using this as an example, that by only putting the hidden resource in the regions of the new world, recruitment would be limited to a certain geographic region. I may be totally wrong, I am new at this level of coding, but if I am then how do I limit a unit to being recruited in just one (or a limited number) of regions?

There are two capability sections for each building, though I don't think the second is used in vanilla, and hence likely not in any or at least many mods.
Code:
wooden_wall city requires factions { northern_european, mesoamerican, middle_eastern, eastern_european, greek, southern_european, }
{
convert_to 2
capability
{
recruit_pool "Conquistadores" 1 0.4 3 0 requires factions { spain, portugal, } and hidden_resource america
}
faction_capability
{
recruit_pool "Dismounted Conquistadores" 1 0.4 3 0 requires factions { spain, portugal, } and hidden_resource america
}
material wooden
construction 2
cost 1200
settlement_min town
upgrades
{
stone_wall
}
}
The blue part corresponds to what the tutorial you're referring to says, any recruitment lines in there are limited to the settlement in which the hidden resource occurs. The red part is what I am talking about. In the case of the recruitment line you see in my example, conquistadors would only be recruitable in a settlement with the america hidden_resource, but dismounted_conquistadors would be recruitable in all Spanish and Portuguese settlement as long as the Spain and Portugal controlled any settlement with the america hidden_resource.