Results 1 to 20 of 25

Thread: How to create new Hidden_Resource

Threaded View

Previous Post Previous Post   Next Post Next Post
  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.

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
  •