Page 1 of 2 12 LastLast
Results 1 to 20 of 25

Thread: How to create new Hidden_Resource

  1. #1
    Polycarpe's Avatar Back into action!
    Join Date
    Feb 2010
    Location
    Quebec, Canada
    Posts
    3,338

    Default 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.

    Spoiler Alert, click show to read: 
    recruit_pool "Longbowmen" 1 0.67 4 0 requires factions { england, } and hidden_resource england

    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).

    Spoiler Alert, click show to read: 
    recruit_pool "Longbowmen" 1 0.2 2 0 requires factions { england, } and not hidden_resource england

    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.
    Spoiler Alert, click show to read: 
    hidden_resources Constable Iqta Constantinople Khassaki river silk_road crusader crusade jihad horde_target no_pirates no_brigands

    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:
    Spoiler Alert, click show to read: 
    hidden_resources Constable Iqta Constantinople Khassaki river silk_road crusader crusade jihad horde_target no_pirates no_brigands polycarpe

    Step3
    Now choose your units, buildings, bonus, etc. that you want to restrict with a HR, let's take the Longbowmen unit
    Spoiler Alert, click show to read: 
    recruit_pool "Longbowmen" 1 0.67 4 0 requires factions { england, } and hidden_resource polycarpe

    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.
    Spoiler Alert, click show to read: 
    Dublin_Province
    Dublin
    england
    Irish_Rebels
    10 232 10
    ireland, no_pirates
    5
    5
    religions { catholic 96 orthodox 0 islam 0 pagan 2 heretic 2 }

    Now add "polycarpe" in this entry
    Spoiler Alert, click show to read: 
    Dublin_Province
    Dublin
    england
    Irish_Rebels
    10 232 10
    ireland, no_pirates, polycarpe
    5
    5
    religions { catholic 96 orthodox 0 islam 0 pagan 2 heretic 2 }
    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.

    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.
    Last edited by Polycarpe; June 14, 2011 at 02:30 PM.

  2. #2

    Default Re: How to create new Hidden_Resource

    Thanks

  3. #3
    Polycarpe's Avatar Back into action!
    Join Date
    Feb 2010
    Location
    Quebec, Canada
    Posts
    3,338

    Default Re: How to create new Hidden_Resource

    Glad it helps you.

  4. #4
    SpyrosM91's Avatar Despotes
    Join Date
    Aug 2010
    Location
    Patras, Greece
    Posts
    3,675

    Default 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!!
    Proud Tsardoms Total War: Historian - Coder - Scripter - Mapper

  5. #5
    Polycarpe's Avatar Back into action!
    Join Date
    Feb 2010
    Location
    Quebec, Canada
    Posts
    3,338

    Default Re: How to create new Hidden_Resource

    Quote Originally Posted by SpyrosM91 View Post
    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.

  6. #6
    SpyrosM91's Avatar Despotes
    Join Date
    Aug 2010
    Location
    Patras, Greece
    Posts
    3,675

    Default Re: How to create new Hidden_Resource

    yes, but what do the last 3 do??
    Proud Tsardoms Total War: Historian - Coder - Scripter - Mapper

  7. #7
    Polycarpe's Avatar Back into action!
    Join Date
    Feb 2010
    Location
    Quebec, Canada
    Posts
    3,338

    Default Re: How to create new Hidden_Resource

    Quote Originally Posted by SpyrosM91 View Post
    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.

  8. #8
    SpyrosM91's Avatar Despotes
    Join Date
    Aug 2010
    Location
    Patras, Greece
    Posts
    3,675

    Default Re: How to create new Hidden_Resource

    Quote Originally Posted by St. Polycarpe View Post
    • "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 View Post
    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!
    Proud Tsardoms Total War: Historian - Coder - Scripter - Mapper

  9. #9
    Squid's Avatar Opifex
    Patrician Artifex Technical Staff

    Join Date
    Feb 2007
    Location
    Frozen waste lands of the north
    Posts
    17,760
    Blog Entries
    3

    Default 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.
    Under the patronage of Roman_Man#3, Patron of Ishan
    Click for my tools and tutorials
    "Two things are infinite: the universe and human stupidity; and I'm not sure about the universe." -----Albert Einstein

  10. #10

    Default 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)
    Last edited by Xoxoman; August 09, 2011 at 11:26 AM.

  11. #11
    Squid's Avatar Opifex
    Patrician Artifex Technical Staff

    Join Date
    Feb 2007
    Location
    Frozen waste lands of the north
    Posts
    17,760
    Blog Entries
    3

    Default Re: How to create new Hidden_Resource

    Then comment out whatever it is you don't want any faction to have access to.
    Under the patronage of Roman_Man#3, Patron of Ishan
    Click for my tools and tutorials
    "Two things are infinite: the universe and human stupidity; and I'm not sure about the universe." -----Albert Einstein

  12. #12

    Default Re: How to create new Hidden_Resource

    Great work mate

    The Orcs of Gundabad Erin go Bragh FROGS

    When I came back to Dublin I was court marshaled in my absence and sentenced to death in my absence, so I said they could shoot me in my absence"
    Brendan Behan
    The Irish won an Empire
    The Scots ran an Empire
    The English lost an Empire

    "When I told the people of Northern Ireland that I was an atheist, a woman in the audience stood up and said, 'Yes, but is it the God of the Catholics or the God of the Protestants in whom you don't believe?"
    - Quentin Crisp

    There is one weapon that the British cannot take away from us: we can ignore them.
    - Michael Collins

    They have nothing in their whole imperial arsenal that can break the spirit of one Irishman who doesn't want to be broken.
    - Bobby Sands

  13. #13
    Foederatus
    Join Date
    May 2007
    Location
    Greece
    Posts
    43

    Default Re: How to create new Hidden_Resource

    Quote Originally Posted by Squid View Post
    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?
    Last edited by lzs; August 26, 2011 at 11:29 AM.

  14. #14
    Polycarpe's Avatar Back into action!
    Join Date
    Feb 2010
    Location
    Quebec, Canada
    Posts
    3,338

    Default Re: How to create new Hidden_Resource

    Quote Originally Posted by lzs View Post
    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).

  15. #15

    Default Re: How to create new Hidden_Resource

    Nice tutorial, + Rep given

    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.

  16. #16
    Polycarpe's Avatar Back into action!
    Join Date
    Feb 2010
    Location
    Quebec, Canada
    Posts
    3,338

    Default Re: How to create new Hidden_Resource

    Quote Originally Posted by Aura View Post
    Nice tutorial, + Rep given

    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.
    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.

  17. #17

    Default 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!
    Last edited by Aura; August 26, 2011 at 11:49 AM.

  18. #18
    Squid's Avatar Opifex
    Patrician Artifex Technical Staff

    Join Date
    Feb 2007
    Location
    Frozen waste lands of the north
    Posts
    17,760
    Blog Entries
    3

    Default Re: How to create new Hidden_Resource

    Quote Originally Posted by lzs View Post
    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 View Post
    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.
    Under the patronage of Roman_Man#3, Patron of Ishan
    Click for my tools and tutorials
    "Two things are infinite: the universe and human stupidity; and I'm not sure about the universe." -----Albert Einstein

  19. #19
    Foederatus
    Join Date
    May 2007
    Location
    Greece
    Posts
    43

    Default Re: How to create new Hidden_Resource

    Quote Originally Posted by Squid View Post
    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?

  20. #20
    Polycarpe's Avatar Back into action!
    Join Date
    Feb 2010
    Location
    Quebec, Canada
    Posts
    3,338

    Default Re: How to create new Hidden_Resource

    Quote Originally Posted by lzs View Post
    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.

Page 1 of 2 12 LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •