View Full Version : Province specific troops - hidden resources
Hey all, I noticed that in the EDB file you needed to have hidden resource conditions in order to make something province specific. How do you do that? Is it possible without changing the map? I want to make it that celtic and germanic cultures can recruit frisian and batavian units if they hold the province of the modern day Netherlands. Can that be done just through text files? *crosses fingers*
Tellos Athenaios
01-02-2010, 11:55
descr_regions.txt in data/maps/world/base/ is your friend. Simply add your hidden resources to your region of choice.
IIRC in the EDB the appropriate template code is:
recruits "unit name" requires factions { my_faction, } and hidden_resource my_resource
EDIT: This code goes into the capabilities {} section of a given building. Do note that you can chain multiple conditions (e.g. and hidden_resource my_resource and hidden_resource my_other_resource); however AFAIK the <or> operator appears to be buggy/unreliable. Hence code that reads hidden_resource my_resource or hidden_resource my_other_resource should be split into multiple lines.
But I haven't looked at the EDB in a looooong time so double check with your EDB of choice to see how its done.
Makanyane
01-02-2010, 14:41
adding resources does count as a map change (so you'd need to delete map.rwm) :balloon2:
Ibn-Khaldun
01-02-2010, 19:08
Don't forget to add your hidden resource in the beginning of export_descr_buildings.txt file as well.
Sweet, thanks much! I will give it a try later today and tell you how it turns out!
Ok, I tried adding 'Brit' as a hidden resource in the Britannia_Inferior region, and this is what I got:
https://img43.imageshack.us/img43/3178/error2i.jpg
Any ideas as to what I did wrong?
Ok, sorry about that, I found the mistake. I entered Brit into the descr_regions and brit into the EDB. I didn't know it was case sensitive. :P
Also, I have another question, will this make it where they can only be recruited in this region, or where they can be recruited anywhere if you hold the region?
Thanks for all the help!
Vuk
Makanyane
01-02-2010, 22:20
only in that region
you'd need to look into 'faction capabilities' / scripting if you want to try and get it to extend to other areas.... am not sure off hand if it would work except by complex scripting.
Ok, thanks much! I'll have to work with that for now. I just hope I do not exceed the unit limit. :P
Sorry to be such a noob, but I have ran into more problems. :P I succesfully created my own resource (Germ, referring to a place inhabited by German people) and started a campaign up. Everything worked fine. I then made a unit dependent on that and the game will not work. :P This is what I did:
recruit "barb peasant german" 0 requires factions { germans, } and hidden_resource Germ
Until I added the and hidden_resource Germ everything worked fine. I have Germ defined at the beginning of the file. Any ideas? :P
EDIT: NVM, figured out. Sorry to be such a pain. ~;)
vBulletin® v3.7.1, Copyright ©2000-2025, Jelsoft Enterprises Ltd.