Page 1 of 2 12 LastLast
Results 1 to 30 of 37

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

  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

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

    Are you putting guineapigs at the top of export_descr_buildings as well, alongside rome italy sparta?
    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

  8. #8

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

    Damn you guys are fast!

    No, I must have skipped that part of the guide!

    Thanks a lot Richard!

  9. #9

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

    I've been trying to verify whether this actually works and so far I've had no luck at all. Will this really allow me to restict recruiting a unit to one city exactly like the Sparta resource.
    PatWest the 'Intermediate Level Modder'

  10. #10

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

    I'm really looking for some here please. What is missing in this tutorial. Will it only work for 1.0 . I've tried this a dozen different ways and it just won't recognize the new resources. This could open up a lot of new recruiting potential.

    Epistolary Richard, Myrddraal, you people implied by your posts that this works, well sort of, as you put it. Please try it again and let me know if you were sucessful. It's only takes a couple minutes of experimentation to prove.
    PatWest the 'Intermediate Level Modder'

  11. #11

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

    Yes, it works, it works for 1.0, it works for 1.2. It has been used many times (not least in my own Rome Total ZOR mod which had a hidden resource for each faction). If you're following the instructions then it should work. You need to put the hidden resource in three locations, in the descr_regions file, in the recruit line for the unit in export_descr_buildings and also at the top of export_descr_buildings. Are you sure you're doing all these?
    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

  12. #12

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

    Yes, I tried it on Vanilla 1.2 and Mundus Magnus 1.0. All it ever accomplished was to remove the ability to recruit that unit at all. What I've been trying to do for starters is limit 'Uber' units to their respective capitals. I tried it with Macedon, Pontus, Julii it doesn't recognize the new resource. I had already figured out how to write all the entries short of the Regions txt file. The tutorial pointed that out. I'll try again. when I tried it on Vanilla 1.2 . I tried it with the original maps rwm and I tried deleting it. It would never fire up when I deleted the rwm file but it did write a new dat file in the data folder. M/M 1.0 doesn't have a rwm file. I so want this to work, it would be the last, for now, of my personal modding and would make the game much more interesting. Like the Patrician and NTW mod for MTW.
    PatWest the 'Intermediate Level Modder'

  13. #13

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

    The map.rwm file is automatically generated by the game when you launch a campaign, no mod should come with a map.rwm file.

    As you're changing the resources in descr_regions you should delete the map.rwm file (from the base folder if you're modding the imperial campaign and the individual campaign folder for provincial campaigns) before launching the game.
    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

  14. #14

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

    Epistolary Richard, Myrddraal, Nero

    You were right and I was wrong. I tender my humblest apology.

    Now for some further questions. Epistolary Richard, did you always get it to work the first time, or did it balk on you occasionally? I got it to work on 1.2 , but I did it the same way as before, I think, and it worked this time. Now I'm trying to accomplish the same thing with Mundus Magnus 1.0 , I already have a lot of time invested in modding this one, and would really prefer to keep it and not go back to ground zero. It turns out that M/M does have a maps rwm file but so far I'm getting the CTD's after I delete it. This was the same problem I had at first with 1.2 so I have hope now that it may be doable. Do you have any other clues that might be of assistance?

    P.S. I have one other question indirectly related to this subject. If I make Merc units recruitable by factions will they already come with the correct unit card? Its a lazy question that I can figure out soon enough but if you already know it's only a one word answer.
    PatWest the 'Intermediate Level Modder'

  15. #15

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

    The hidden resources have always appeared to be pretty robust to me, they've never had patchy functionality to me. If you're have trouble with the MM map, then you're best of talking to the modder himself Dead Moroz (ngr on TWC).

    As for merc unit cards, to be honest, I don't know. I've never tried it. I'm interested in the answer though, so if you find out let us know.
    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

  16. #16

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

    Thanks for the reply. I'll check with Dead Moroz, I have to ask him what that moniker means. I do think its related to the Mod. I kept trying and got nowhere with it. If I get anymore concrete information I'll post it here and at my other posts on this subject.
    PatWest the 'Intermediate Level Modder'

  17. #17

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

    I have an update, not that anyone is listening. I was able to add all my hidden resources. I added 31, one for each and every region and a some doubled up. It only liked to accept them in small batches around 20 at a time and not much more.

    I now have my own ZOR's running on my M/M 1.0 Mod. I used mercs as my generic troops recruitable outside of a factions own zone. Along with capital resources so each faction can only produce their Uber units there. I added Warspites de-greened merc skins 2.1 now it looks and plays just like I wanted.

    Now I need to learn how toadd a few more units to the Merc pool. I'll get there.
    PatWest the 'Intermediate Level Modder'

  18. #18

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

    Hmmm... I've never had any trouble adding large numbers of hidden resources. Anyway, you want a file called descr_mercenaries in your imperial_campaign folder.
    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

  19. #19

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

    Quote Originally Posted by Epistolary Richard
    Hmmm... I've never had any trouble adding large numbers of hidden resources. Anyway, you want a file called descr_mercenaries in your imperial_campaign folder.
    It got worse when I started using Time 5.0 to redo my accelerated startup. The first time I did that I don't remember having so many crashes. This time out though after all the resource adding I was getting to the point where I had to save after every province or it would crash. It was getting a little tedious.

    If you know the ideal tutorial for adding units to the merc pool could you point me in that direction. I assume it's a little more than just knowing a file called descr_mercenaries.
    PatWest the 'Intermediate Level Modder'

  20. #20
    CeltiberoRamiroI Member Monkwarrior's Avatar
    Join Date
    Apr 2004
    Location
    Salduie/Caesaraugusta/ Sarakusta/Saragossa
    Posts
    828

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

    Quote Originally Posted by PatWest
    If you know the ideal tutorial for adding units to the merc pool could you point me in that direction. I assume it's a little more than just knowing a file called descr_mercenaries.
    ER wrote a nice tutorial for new units addition:
    https://forums.totalwar.org/vb/showthread.php?t=51750

    For a merc unit you must follow the tutorial with some differences:
    - Put mercenary_unit as an attribute in export_descr_unit
    - Put the unit card and the info pic in folders Data\ui\units\mercs and Data\ui\unit_info\merc
    - Instead of making them recruitable in export_descr_building, you must put them in descr_mercenaries

    I hope I didn't forget anything.

  21. #21

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

    Quote Originally Posted by Monkwarrior
    ER wrote a nice tutorial for new units addition:
    https://forums.totalwar.org/vb/showthread.php?t=51750

    For a merc unit you must follow the tutorial with some differences:
    - Put mercenary_unit as an attribute in export_descr_unit
    - Put the unit card and the info pic in folders Data\ui\units\mercs and Data\ui\unit_info\merc
    - Instead of making them recruitable in export_descr_building, you must put them in descr_mercenaries

    I hope I didn't forget anything.
    If I want to use them as recruitable generic troops wouldn't I want to put them in the export_descr_building txt file? I'm sure I already know that answer.

    Thanks for the info on the Unit cards, Monkwarrior.
    PatWest the 'Intermediate Level Modder'

  22. #22

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

    Well, if you want to make them recruitable in settlements then you put them in edb, if you want to make them recruitable as mercs then you put them in descr_mercenaries...
    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

  23. #23

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

    Epistolary Richard, I've been doing all my posts from work, so sometimes I sound like a bigger Moron than I actually am. I didn't have high speed at home and I didn't bother with a dial up modem in my new computer. This will be cured in 10 days.

    After I got home I looked at the file you mentioned and realized that I didn't word the question correctly. I wanted to make a few more existing units into mercs so I could then use them as recruitable troops without having to add the unit cards to each faction. That was something you were curious about in one of the earlier posts. I know the easy way to make a unit recruitable for any faction. I just havn't gotten around to learning how to change the faction color or move the unit card to the right place. Making them mercs as we have found out eliminates the need to add the unit card to each faction, if that was necessary in the first place.
    PatWest the 'Intermediate Level Modder'

  24. #24

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

    It does, my only concern is whether giving the units the mercenary_unit attribute has any other side effects. I know that mercs and normal units handle disbanding slightly differently, maybe there are other effects I don't know about...
    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

  25. #25

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

    Quote Originally Posted by Epistolary Richard
    It does, my only concern is whether giving the units the mercenary_unit attribute has any other side effects. I know that mercs and normal units handle disbanding slightly differently, maybe there are other effects I don't know about...
    I finally started playing my newest version of 'My TW' as the Julii for a start. I've nerfed the Romans considerably so it's actually quite hard. So far I havn't seen anything unusual with the merc units, and Warspites de-greened skins makes it more visually appealing. As I recall since 1.2 the mercs disband into your general population. I don't know what other differences their are other than cost.

    P.S. I downloaded your tutorial for adding units and will probably add some this week. I am so ready for High Speed, this Friday Woo Hoo!
    PatWest the 'Intermediate Level Modder'

  26. #26

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

    Ah, maybe I am remembering the old v1.1 days...

    Thanks and enjoy.
    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

  27. #27

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

    Something along this line. I added resource horses and camels in desc_region because I just want to make the game dificult to myself where's I can train cavalry if got horses and archers in region that there is wood.

    Just a question , should I put it under hidden_resource ? My only 'workable' slf mod before was adding " and resource timber " in export_description_building for oly ports/shipwright/dockyard with timber in the province can produce any sort of ships. I enjoy it though because now I see less ships around.

    Back to the question , if I want to apply to cavalry & archers ? Is it the same way ?

    1. Add 'resouce' in desc_region

    2. Add " and resource horses / woods " in edb ?

    OR

    3. Add " and hidden_resource .... " in edb ?

    I tried option 2 but it CTD right after start. Maybe because some mistakes / typo error because I tried to re-do the whole lot. This time I'll try one faction first and see how it goes. As for my 'timber' mod it works with save game so I can try it in my mid roman campaign. Maybe try not all cavalry but 'elite' cavalry first.

    Or maybe add a "min_level_barrack " stuff so have to need a forge before I can train sacred band cav or noble heavy cav or somethin ? Any advice / ideas ?

    Cheers.
    Say: O unbelievers, I serve not what you serve, nor do you serve what I serve, nor shall I serve what you are serving, nor shall you be serving what I serve.
    To you your religion, and to me my religion.

  28. #28

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

    I tried option 2 but it CTD right after start. Maybe because some mistakes / typo error because I tried to re-do the whole lot. This time I'll try one faction first and see how it goes. As for my 'timber' mod it works with save game so I can try it in my mid roman campaign.
    Option 3 is the correct one. This is an example of M/M 2.0's EDB file resource line and the regions txt using the kind of resources your doing.

    hidden_resources sparta rome italy desert road highway farm2 farm3 farm4 farm5

    Tribus_Brigantes
    Isurium
    britons
    Brigantes
    232 41 198
    furs, lead, road, highway, farm2, farm3
    5
    4

    Cimbrica
    Hafnia
    germans
    Cimbri
    232 41 55
    timber, amber, road, farm2, farm3
    5
    4

    Locus_Aestii
    Vicus_Aestii
    germans
    Aestii
    58 177 95
    dogs, amber, road, farm2, farm3

    You would have to delete MAP.RWM after you write in your resources and it would only be effective for future campaigns. Timber was already present, I believe, so it worked in-campaign.
    PatWest the 'Intermediate Level Modder'

  29. #29
    The Philosopher Duke Member Suraknar's Avatar
    Join Date
    Dec 2002
    Location
    Navigating the realm of Ideas
    Posts
    707

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

    Hello,

    Is there a limit of how many Conditionals, Positive or Negative we can put? is there a specific Order the conditionals can be made or it does not mater...?

    ex: and...and not...and...and not...

    Or

    and...and...and...and not...and not...and not...

    Thank you
    Duke Surak'nar
    "Η ΤΑΝ Η ΕΠΙ ΤΑΣ"
    From: Residing:
    Traveled to: Over 70 Countries, most recent: and

    ~ Ask not what modding can do for you, rather ask what you can do for modding ~
    ~ Everyone dies, not everyone really fights ~

  30. #30

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

    Well I can confirm that there are something buggy about hidden_resources. As I get it you should first add the hidden_resource in region.text and at the top of descr.buildings.txt then delete the rmw.map, then launch the game. First when this is done you should start adding the resource to the actual unit or building.

    I have had a lot of problems when doing everything at once and then deleting the rmw.map. Basically the game don´t load or you get weird results like not being able to recruit a unit.

Page 1 of 2 12 LastLast

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