Results 1 to 9 of 9

Thread: trouble with command "and not hidden_resource X"

  1. #1
    Pompeius Magnus's Avatar primus inter pares
    Join Date
    Aug 2006
    Location
    Frankfurt Main/Germany
    Posts
    5,364

    Default trouble with command "and not hidden_resource X"

    Gents,
    I have another problem with a command in the EDB
    "and not hidden_resource"

    I want remove the string of barracks ouf of my capital. All other cities can build build the normal barrackls, but not the capital.
    The reason is because I want introduce another kind of building to the capital. So far, the background.

    Now I coded this:
    Code:
    building barracks
    {
        levels muster_field militia_barracks city_barracks
        {
            muster_field requires factions { barbarian, carthaginian, eastern, hun, nomad, roman, } and not hidden_resource newrome
            {
                capability
    I also included the hidden resource into the regions-file and I put the word newrome also in the first line of the EDB. So the hidden_resource itself is working (not CTD!)
    I also deleted the map.rwm.

    When I start the game now the barracks are removed in ALL cities. I can't find it anymore in the building-tree (the general overview).

    The question is: why?

  2. #2

    Default Re: trouble with command "and not hidden_resource X"

    Have you double checked in descr_regions to see if only one region has the newrome hidden resource?

  3. #3
    Pompeius Magnus's Avatar primus inter pares
    Join Date
    Aug 2006
    Location
    Frankfurt Main/Germany
    Posts
    5,364

    Default Re: trouble with command "and not hidden_resource X"

    yes, only Thrake (Constantinople) has the hidden_resource newrome

    Is the code correct when I use "and not" or should it be simply "not"

  4. #4
    MasterOfNone's Avatar RTW Modder 2004-2015
    Join Date
    May 2005
    Location
    England
    Posts
    16,707

    Default Re: trouble with command "and not hidden_resource X"

    It's because you are using the "not" in a building conditional. Building conditionals should, as a rule of thumb, be positives. For more information on this please consult the discussion thread of the Complete EDB Guide.
    "One of the most sophisticated Total War mods ever developed..."
    The Fourth Age: Total War - The Dominion of Men

  5. #5
    Pompeius Magnus's Avatar primus inter pares
    Join Date
    Aug 2006
    Location
    Frankfurt Main/Germany
    Posts
    5,364

    Default Re: trouble with command "and not hidden_resource X"

    I will check that again.

    edit: acc. this discussion it's obviously not possible
    http://forums.totalwar.org/vb/showth...t=39925&page=2
    Last edited by Pompeius Magnus; August 18, 2009 at 07:31 AM.

  6. #6

    Default Re: trouble with command "and not hidden_resource X"

    But I am here to save you in your plight.
    I too have run up against this, and I have found the solution. Assuming you have a hidden resource that appears in no region, a null hidden resource, use this coding.

    Code:
    barracks requires factions { whatever, } and hidden_resource never or not hidden resource newrome
    This tricks the game by making the primary condition positive, but unfulfillable. The real condition then can work without interrupting the games mechanics. Alternately, give newrome to every province except the one you want and require new rome to be present, but of course you'll still run into this problem with your new building then.

    Expand your borders, a mod based on XGM 5.

  7. #7
    Pompeius Magnus's Avatar primus inter pares
    Join Date
    Aug 2006
    Location
    Frankfurt Main/Germany
    Posts
    5,364

    Default Re: trouble with command "and not hidden_resource X"

    Quote Originally Posted by CaesarVincens View Post
    But I am here to save you in your plight.
    I too have run up against this, and I have found the solution. Assuming you have a hidden resource that appears in no region, a null hidden resource, use this coding.
    incredible, I will check that immediately
    +rep for that solution


    Quote Originally Posted by CaesarVincens View Post
    Alternately, give newrome to every province except the one you want and require new rome to be present, but of course you'll still run into this problem with your new building then.
    Holy shi_.....no
    I know this way, but that's not possible.
    I need the other hidden_resources for the AOR
    Last edited by Pompeius Magnus; August 18, 2009 at 12:28 PM.

  8. #8
    Pompeius Magnus's Avatar primus inter pares
    Join Date
    Aug 2006
    Location
    Frankfurt Main/Germany
    Posts
    5,364

    Default Re: trouble with command "and not hidden_resource X"

    great, it works (there was a stripe "_" missing in your coding between hidden and ressource).
    This kind of code is very good for my mod as well as for other mod-projects.

    Well done, CaesarVincens

  9. #9

    Default Re: trouble with command "and not hidden_resource X"

    Quote Originally Posted by Pompeius Magnus View Post
    great, it works (there was a stripe "_" missing in your coding between hidden and ressource).
    This kind of code is very good for my mod as well as for other mod-projects.

    Well done, CaesarVincens
    You're welcome. I'm glad it helps.

    If you want to see some more neat tricks with EDB. I suggest you look at what I've been discussing with a forumer called lim_lucky at the Guild. His first post is #198. Link to page

    Expand your borders, a mod based on XGM 5.

Posting Permissions

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