How to create new Hidden_Resource
Good day, I am playing with the EDB and an aspect that gives plenty of opportunity of customization that hasn't been included in the tutorial section is the Hidden_Resource.
What is an Hidden_Resource (HR)?
An Hidden_Resource is a coding that gives restriction. The HR is linked to a region, part of the map or any other restriction you apply. Let's write an example on what I want to mean.
We will start with a HR, let's create one called "England"
Then here's the coding line in the EDB.
Now what it means is you can recruit a longbowmen unit only in regions with the HR England tag(London, York, Nottingham for example are the regions with the hidden_resource England, so you can recruit longbowmen only in these regions).
What it means, is regions that do not have the HR England tag will have a decreased availability of Longbowmen (see, the unit refill rate has decreased andthe unit pool size is much lower).
Note: The "not" is not necessary, it only makes another condition but if you want to limit a recruitment of building to one region only, just add the "and hidden_resource xxx" only.
How to create a new Hidden_Resource
You need to play with three files (Important, do back-up files in case you do something wrong!!)
- Export_Descr_Buildings.txt file (EDB) (Located in the your mod/data folder)
- Descr_Region.txt file (Located in your mod/data/world/maps/base)
- map.rwm (Located in your mod/data/world/maps/base)
Step 1
Open your EDB, see the first line of the file? It's the list of HR.
Step 2
Now, you have to write a hidden_resource, let's say a random name "polycarpe". Now you will have to paste this HR name at the end of the HR list like this:
Step3
Now choose your units, buildings, bonus, etc. that you want to restrict with a HR, let's take the Longbowmen unit
Now save your file.
Step 4
Open your descr_regions.txt. file. This is the whole list of regions of the mod. Now let's take an example of Dublin.
Now add "polycarpe" in this entry
Save the file.
Step 5
Now, after these steps, the game won't recognize the changes. You will need to delete the map.rwm file. (Don't worry, the game will generate a new map.rwm file with you new changes).
Here you go, you just create a new hidden_resource. Enjoy the modding.:thumbsup2
I want to thanks Ishan for explaining me how to create a hidden_resource.
Important note: The Hardcoded limit of total number of hidden_resource is 64.
Re: How to create new Hidden_Resource
Re: How to create new Hidden_Resource
Glad it helps you. :duffer:
Re: How to create new Hidden_Resource
could you tell me what do these hidden_resources do??
sparta - leftover from rome??
rome - leftover from rome??
italy - leftover from rome??
america - from medieval: for training conquistadores
atlantic - from medieval??
arguin - from medieval??
can i delete them, if i don't need them??
thanks!!
Re: How to create new Hidden_Resource
Quote:
Originally Posted by
SpyrosM91
could you tell me what do these hidden_resources do??
sparta - leftover from rome??
rome - leftover from rome??
italy - leftover from rome??
america - from medieval: for training conquistadores
atlantic - from medieval??
arguin - from medieval??
can i delete them, if i don't need them??
thanks!!
Yes you can delete them but you must remove them as well in descr_regions.txt(if is there also) and deleting the map.rwm. The game will generate a new map.rwm without these HR.:thumbsup2
Re: How to create new Hidden_Resource
yes, but what do the last 3 do??
Re: How to create new Hidden_Resource
Quote:
Originally Posted by
SpyrosM91
yes, but what do the last 3 do??
- "america" was for the Conquistadors in Vanilla, these units were only recruited in America only.
- "sparta","rome" and "italy" are leftover from RTW and AFAIK these HR are no longer used.
- "atlantic" and"argiun" are leftover of either RTW or M2TW but never saw them used but just to be sure, check in the descr_region.txt file in case they are still there and delete them. After the delete, remember to delete the map.rwm otherwise it will either crashes or simply not changing.
Also, remember the hardoced limit is 64, you can simply add new ones and if you reach the limit, just remove the above HR.:)
Re: How to create new Hidden_Resource
Quote:
Originally Posted by
St. Polycarpe
- "atlantic" and"argiun" are leftover of either RTW or M2TW but never saw them used but just to be sure, check in the descr_region.txt file in case they are still there and delete them. After the delete, remember to delete the map.rwm otherwise it will either crashes or simply not changing.
arguin is the name of a region, a city and of a HR in western africa...
and atlantic is present in all the coastal regions of skadinavia, denmark, enlgand, spain, portugal and (paradoxically) Constantinople....
Quote:
Originally Posted by
St. Polycarpe
Also, remember the hardoced limit is 64, you can simply add new ones and if you reach the limit, just remove the above HR.:)
yes, i know that...that's why i want to delete the first ones, in order to make space for new ones...
anyway, thanks!
Re: How to create new Hidden_Resource
You should never need all 64 hidden resources. You can uniquely identify all 199 regions on a full map with no more than 30 hidden resources.
Re: How to create new Hidden_Resource
What if I don't want to give it a faction?
(I mean, to ANY faction, all factions)
Re: How to create new Hidden_Resource
Then comment out whatever it is you don't want any faction to have access to.
Re: How to create new Hidden_Resource
Re: How to create new Hidden_Resource
Quote:
Originally Posted by
Squid
You should never need all 64 hidden resources. You can uniquely identify all 199 regions on a full map with no more than 30 hidden resources.
How can you do that with only 30 HR?
Re: How to create new Hidden_Resource
Quote:
Originally Posted by
lzs
How can you do that with only 30 HR?
It depends on the kind of mod and map you have. Just take the vanilla map for example. You can do a HR for each game's faction so already you have around 20. Then you can add other HR to important settlements (let's say constantinople).:)
Re: How to create new Hidden_Resource
Nice tutorial, + Rep given :yes:
Is HR a target ? Like if I add "crusade" HR to a region that means Pope will call Crusade to that region ? I think the answer is yes. :hmm:
Re: How to create new Hidden_Resource
Quote:
Originally Posted by
Aura
Nice tutorial, + Rep given :yes:
Is HR a target ? Like if I add "crusade" HR to a region that means Pope will call Crusade to that region ? I think the answer is yes. :hmm:
yes but I think the "crusade" or another HR is specificed for crusades and Jihads already ;). Check at the first line and you should see them.
Re: How to create new Hidden_Resource
I mean adding crusade command to a region, not to HR list :)
Thanks. I'm sure that it is!
Re: How to create new Hidden_Resource
Quote:
Originally Posted by
lzs
How can you do that with only 30 HR?
Simple, every region will have two hidden resources. Create two sets of hidden resources area1, .. , area15 and region1, .. , region14. First you take your map and split into 15 areas each with no more than 14 regions in it and assign each area one of the area hidden resources. Every region in an area gets the the corresponding area hidden resource. Now in each area number all the regions from 1 to 14 and each region gets the corresponding regionX hidden resource. So to identify a particular region you need to list its area hidden resource and its region hidden resource.
Quote:
Originally Posted by
St. Polycarpe
It depends on the kind of mod and map you have. Just take the vanilla map for example. You can do a HR for each game's faction so already you have around 20. Then you can add other HR to important settlements (let's say constantinople).:)
That still won't uniquely identify all regions on a map.
Re: How to create new Hidden_Resource
Quote:
Originally Posted by
Squid
Simple, every region will have two hidden resources. Create two sets of hidden resources area1, .. , area15 and region1, .. , region14. First you take your map and split into 15 areas each with no more than 14 regions in it and assign each area one of the area hidden resources. Every region in an area gets the the corresponding area hidden resource. Now in each area number all the regions from 1 to 14 and each region gets the corresponding regionX hidden resource. So to identify a particular region you need to list its area hidden resource and its region hidden resource.
That still won't uniquely identify all regions on a map.
So if I want to make a unit recruitable in region 4 of area 10, I have to add in the EDB a line like this:
recruit_pool "unit" 1 1 2 0 requires factions { sicily, } and hidden_resource area_10 and hidden_resource region_4
Is this correct?
Re: How to create new Hidden_Resource
Quote:
Originally Posted by
lzs
So if I want to make a unit recruitable in region 4 of area 10, I have to add in the EDB a line like this:
recruit_pool "unit" 1 1 2 0 requires factions { sicily, } and hidden_resource area_10 and hidden_resource region_4
Is this correct?
Correct, that unit will be recruited in the region 4 and 10 only.:yes: