Results 1 to 30 of 37

Thread: How to limit recruitment & construction by area (hidden resources)

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Member Member Nero's Avatar
    Join Date
    Feb 2005
    Location
    Netherlands
    Posts
    52

    Default How to limit recruitment & construction by area (hidden resources)

    Modding Resource Header
    Title: How to limit recruitment & construction by area (hidden resources) (formerly How to...add hidden resources and use them)
    Posted by: Nero
    Modding area: Units (recruitment) / Buildings (construction)
    Required programmes: Notepad (or other text editor)
    Optional tools: Excel macro for recruit lines in edb
    Hardcoded limits: There can be a maximum of 64 hidden resources, this must include the Rome resource (and Italy for the Marian Reforms).
    Summary: Hidden resources are used to limit the areas in which units are recruited and buildings can be constructed. They differ from normal (trade) resources in that they do not appear on the map and provide no income. This tutorial shows you how to add and use these hidden resources.
    __________________________________________________


    How to...add hidden resources

    I haven't found a tutorial to add hidden resources, so I decided to make one myself.
    Throughout this tutorial I will explain how hidden resources can be added and how you can make them have effect.

    Adding hidden resources to the game

    1 - Add the hidden resource to the region in descr_regions
    Open up your ...RTW\data\world\maps\base map and open descr_regions.txt when you want to mod the imperial campaign resources.
    For any other campaign, open the "...RTW\data\world\maps\campaign\anyothercampaign" map and look for descr_regions.txt there.
    Now add any hidden resources you want to any city you want by just typing them in the resources section.

    Britannia_Inferior
    Eburacum
    britons
    Brigantes
    232 41 198
    stone, coastal_forest, lead, dogs, pigs, guineapigs
    5
    5

    In this region, I've added guineapigs as a hidden resource.

    2 - Delete map.rwm
    Changes to map or regions file will only appear if you delete map.rwm before you relauch the game. You should delete the file in the same folder as the descr_regions file.

    3 - Define the hidden resource to export_descr_buildings
    Now open the export_descr_buildings.txt file in the ...RTW\data folder.
    Almost at the top, there is a line starting with hidden_resources.
    Now add the names of the hidden resources you've added to the descr_regions.txt file to this line:

    hidden_resources rome, sparta, guineapigs

    How to use the hidden resources

    Now the hidden resources are present, you can make them have effect on things.
    Therefore, use the export_descr_buildings.txt file and just choose anything you want to edit. I've chosen the example of "guineapigrider" as a cavalry unit, and the roman light cavalry will get an experience bonus when the guineapigs resource is present.


    building equestrian_roman
    {
    levels stables
    {
    stables requires factions { greek_cities, roman, slave, }
    {
    capability
    {
    ; greeks
    recruit "greek cavalry" 0 requires factions { greek_cities, }

    ; roman
    recruit "roman light cavalry" 0 requires factions { roman, } and marian_reforms
    recruit "roman light cavalry" 0 requires factions { roman, } and not marian_reforms and not hidden_resource guineapigs
    recruit "guineapigrider" 0 requires factions { roman, } and hidden_resource guineapigs
    recruit "roman light cavalry" 1 requires factions { roman, } and not marian_reforms and hidden_resource guineapigs

    }
    construction 4
    cost 1200
    settlement_min large_town
    upgrades
    {
    }
    }
    }
    }
    plugins
    {
    }
    }

    In the highlighted lines I have used the hidden resource in various ways and I think this pretty clearly explains how to use them.

    Note, hidden resources can also be used in a similar manner to restrict the provinces where buildings can be built.

    Have Fun!!!
    Last edited by Myrddraal; 07-26-2005 at 10:18.

  2. #2
    Ricardus Insanusaum Member Bob the Insane's Avatar
    Join Date
    Sep 2002
    Location
    London, UK
    Posts
    1,911

    Default Re: How to...add hidden resources and use them

    Thank you!!!

  3. #3
    Shaidar Haran Senior Member SAM Site Champion Myrddraal's Avatar
    Join Date
    Feb 2004
    Location
    UK
    Posts
    5,752

    Default Re: How to...add hidden resources and use them

    There is already a guide on this in the How To thread:

    https://forums.totalwar.org/vb/showpost.php?p=661155&postcount=2

    Maybe these guides aren't very obvious, grouped as they are into one thread...

    Thanks anyway though Nero, ur guide is probably better.

  4. #4
    Squirrel Watcher Member Sinner's Avatar
    Join Date
    Aug 2004
    Posts
    390

    Default Re: How to...add hidden resources and use them

    Do you still have to delete maps.rwm in the \Data\world\maps\base folder for the new hidden resource to be available in v1.2? I haven't tried adding a new hidden resource since re-patching, so not sure if that has changed.

    I did find pre-v1.2 that there was a limit to the number of hidden resources, I think it was 63 or 64, but that should be ample for most mods.

  5. #5

    Default Re: How to...add hidden resources and use them

    Nope, the hidden resources appear without having to delete maps.rwm.

    Edit: Well, they appeared that time. But since then they haven't appeared unless I've deleted maps.rwm, so it looks like it's still necessary.
    Last edited by Epistolary Richard; 02-26-2005 at 15:33. Reason: Correction
    Epistolary Richard's modding Rules of Cool
    Cool modders make their mods with the :mod command line switch
    If they don't, then Cool mod-users use the Mod Enabler (JSGME)
    Cool modders use show_err
    Cool modders use the tutorials database Cool modders check out the Welcome to the Modding Forums! thread Cool modders keep backups Cool modders help each other out

  6. #6

    Question Re: How to...add hidden resources and use them

    Hey

    I'm having a problem with my new hidden ressources. When I add the 'and hidden_resource guineapigs' (or whatever) to the end of a recruitment option in the 'buildings' file, the game refuse to start and is just returning me to the desktop. It only seems to be a problem with the new ressouces because i can add 'and hidden_resource rome' with no problems.
    Does anybody knows what can be wrong? I'm running 1.2 with no mods except a few homemade scriptchanges.

  7. #7
    It was a trap, after all. Member DukeofSerbia's Avatar
    Join Date
    Feb 2005
    Location
    Sombor, Serbia (one day again Kingdom)
    Posts
    1,001

    Thumbs up map.rwm

    Quote Originally Posted by Nero

    2 - Delete map.rwm
    Changes to map or regions file will only appear if you delete map.rwm before you relauch the game. You should delete the file in the same folder as the descr_regions file.
    Solution for my problems...
    Watching
    EURO 2008 & Mobile Suit Gundam 00

    Waiting for: Wimbledon 2008.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Single Sign On provided by vBSSO