View Full Version : Hidden Resources
dutchfubar
12-17-2006, 17:53
I have two questions:
1. Maybe I missed it but what does hidden_resource mean exactly?
2. Is it possible to have a condition which checks if the building is in a certain region? For example it should only be possible to make longbowmen in wales.
Moved to modding questions
Your second question bears the answer to your first one. Hidden resources can be set in data/world/maps/base/descr_regions.txt, but aren't shown in-game.
If a region has a hidden_resource that is declared in export_descr_buildings.txt you can check it as a requirement in export_descr_buildings
dutchfubar
12-18-2006, 12:27
Tnx for the reply. So I tested the hidden_resource thing and this is how I understand it works: So for example London and Nottingham both have in the descr_regions file the hidden_resource England_Wales. And in the export_descr_buildings file I have a certain unit which has the condition hidden_resource England_Wales. Now when I play the campaign I have to capture both London and Nottingham to be able to recruit that certain unit, but when I capture the settlements I can recruit the unit in every settlement I have.
That's nice, but is it also possible to have a condition which checks in which settlement the building is. So that a unit can only be recruited in that certain settlement. What I mean is, is there a condition which can be used in the export_descr_building file that does something like this: IsBuildingInRegion London.
Ohw and another question, I haven't checked it but is it possible to use the 'or' operator in the export_descr_building file?
No, you got that wrong.
If you control a settlement with the hidden resource, and you have a unit with this hidden resource as a requirement, you can only recruit that unit in this settlement.
dutchfubar
12-18-2006, 20:35
Ok, so clearly I am doing something wrong then. I tested it with the english faction, I picked a hidden resource (from the descr_regions file) which the london province had, and another province of england didn't had (in this case tin). I put it in the row with the other hidden_resources in the export_descr_building file and picked out a english unit and have this as a condition. requires factions { england, } and hidden_resource tin. Also to make things more transparent I made the unit recruitable in every level of castle and city (So I don't have to make a barracks).
What happens is that every settlement is able to build the unit.
That's because tin is no hidden resource but a resource... Use resource in your requires clause and it should work
dutchfubar
12-19-2006, 14:10
I tested it with the condition: resource tin and that works perfect. But if I use a hidden resource for some reason it won't work. I used an already excisting hidden resource which is in the list and I still get the unit in every settlement. Apart from the stuff which i have to put in the export_descr_building and descr_regions file is there something else I should do?
Is there a limit for total number of hidden resources or hidden resources per region.or is there a limit for normal resources+hidden ones?
There's a limit for hidden resources of 64
thanks for info.but the otherones are unlimited.normal resources (for trade) and resources per region.
thanks for info.but the otherones are unlimited.normal resources (for trade) and resources per region.
You can't add trade resources at all, and I don't know if there's a limit on resources per region.
vBulletin® v3.7.1, Copyright ©2000-2024, Jelsoft Enterprises Ltd.