Results 1 to 13 of 13

Thread: Using "not" in the EDB

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Indefinitely Banned
    Join Date
    Jun 2006
    Location
    Calgary, Canada
    Posts
    13,967

    Default Using "not" in the EDB

    Now BC has been using the OR operator a lot in conjunction with it's hidden resources. But this time I wanted to use the NOT operator for "building_present_min_level" and hidden resources too, but so far it doesn't seem to work.

    Have any of you been able to use NOT in the EDB?
    Last edited by Miraj; July 11, 2008 at 08:37 PM.

  2. #2

    Default Re: Using "not" in the EDU

    EDU...? You mean EDB, do you?

    If so: NOT works with hidden resources for sure, but I have never tried it with "building_present_min_level".

    Cheers,
    D.

    Retired creator of 'Das Heilige Römische Reich' - Get v. 0.7 here.
    -------------------------------------------------------------
    Visit my homepage.
    --------------------------------------------
    Proud son of jimkatalanos, grandson of Garbarsardar and father of DerDiskusWerfer and HannibalExMachina.

  3. #3
    No, that isn't a banana
    Join Date
    Aug 2004
    Location
    Ontario, Canada
    Posts
    5,216

    Default Re: Using "not" in the EDU

    It will work with building_present_min_level.

  4. #4
    GrnEyedDvl's Avatar Liberalism is a Socially Transmitted Disease
    Artifex Technical Staff

    Join Date
    Jan 2007
    Location
    Denver CO
    Posts
    23,851
    Blog Entries
    10

    Default Re: Using "not" in the EDU

    I read some stuff on the .org that it worked in RTW but not in BI...

    Maybe they changed it back for M2 but I have no idea. Best suggestion is to try it on something simple.

  5. #5
    No, that isn't a banana
    Join Date
    Aug 2004
    Location
    Ontario, Canada
    Posts
    5,216

    Default Re: Using "not" in the EDU

    not works AFAIK, but using the the positive will cause CTDs when the player right clicks during the game.

  6. #6
    GrnEyedDvl's Avatar Liberalism is a Socially Transmitted Disease
    Artifex Technical Staff

    Join Date
    Jan 2007
    Location
    Denver CO
    Posts
    23,851
    Blog Entries
    10

    Default Re: Using "not" in the EDU

    Using building_present_min_level is giving you a CTD?

  7. #7
    Indefinitely Banned
    Join Date
    Jun 2006
    Location
    Calgary, Canada
    Posts
    13,967

    Default Re: Using "not" in the EDB

    Woops, yeah I meant EDB not EDU. Fixed that.

    Anyways, I tried using it but it didn't seem to work, but not cause a CTD. Basically, I'm trying to make a building be *unbuildable* if a certain building type is present in the settlement.

  8. #8
    GrnEyedDvl's Avatar Liberalism is a Socially Transmitted Disease
    Artifex Technical Staff

    Join Date
    Jan 2007
    Location
    Denver CO
    Posts
    23,851
    Blog Entries
    10

    Default Re: Using "not" in the EDB

    Does the log show anything?

  9. #9
    Hengest's Avatar It's a joke
    Join Date
    Oct 2005
    Location
    Great Britain
    Posts
    7,523

    Default Re: Using "not" in the EDB

    I'm pretty sure we are using it a lot in our tech tree at Dominion of the Sword. I will get someone to come by and fill you in.

  10. #10
    Indefinitely Banned
    Join Date
    Jun 2006
    Location
    Calgary, Canada
    Posts
    13,967

    Default Re: Using "not" in the EDB

    @GED
    Nah, the log doesn't show anything.

    @Hross
    You guys used it a lot, eh? Well that's good news. I'll fiddle around with it more then.

  11. #11

    Default Re: Using "not" in the EDB

    It works without problems\crashes in DLV:
    hermit_franc city requires factions { northern_european, southern_european, poland, hungary, } and event_counter governor_present 1 and event_counter tokus_franciscan_order 1 and not building_present_min_level ordo_dominicana hermit_dom

    repman

    BareBonesWars 8.1 for RTW 1.5
    Integration Mod which combines unique strategic challenges due to a 4 Season scripted campaign from 280 BC - 180 AD on several big/small maps and with an ruthless AI on the battlefield.
    Deus lo Vult DLV 6.2 for MTW II Kingdoms
    Norway+Ireland+Flanders+Kiev+Lithuania+Teutonic_Order+Armenia+Crusader+Georgia,1y2t script, army field costs, Ultimate AI 1.6, big map, military career, economic system, age simulation, heraldic system, new factions, garrison script, Crowns + Swords, Trait bugfixer, religion dependent recruiting, ancillary enhancements, darth battle mechanics

  12. #12
    Indefinitely Banned
    Join Date
    Jun 2006
    Location
    Calgary, Canada
    Posts
    13,967

    Default Re: Using "not" in the EDB

    Thanks. I'll try it again tommorow.

  13. #13

    Default Re: Using "not" in the EDB

    I've done some testing with the 'not' command and here's what I've found.

    1) The not command does work. 'and not building_present_min_level market market' will prevent you from constructing this building if a market is present.

    Also every upgrade does not require a seperate 'not' command. So if the 'not' command is used to stop a Road being upgraded if a Market is present you cannot circumvent this by upgrading the Market to a Fairground, then constructing a Road and upgrade it.

    2) If the not command is attached to the first level of a building then it becomes impossible to construct that building. For example:

    Code:
    building hinterland_roads
    {
        convert_to hinterland_castle_roads
        levels roads paved_roads highways
        {
            roads city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }  and not building_present_min_level market market 
            {
                convert_to 0
                capability
                {
                    road_level 0
                }
                material wooden
                construction  2 
                cost  2400 
                settlement_min town
                upgrades
                {
                    paved_roads
                }
            }
            paved_roads city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, } 
            {
                convert_to 1
                capability
                {
                    road_level 1
                    trade_base_income_bonus bonus 1
                }
                material wooden
                construction  4 
                cost  4800 
                settlement_min city
                upgrades
                {
                }
            }
        }
        plugins 
        {
        }
    }
    Will prevent the player building roads and may cause the mod to CTD.

    3) Upgrades with the not command do not appear in the tech tree menu but can be constructed. For example:

    Code:
    building hinterland_roads
    {
        convert_to hinterland_castle_roads
        levels roads paved_roads highways
        {
            roads city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }
            {
                convert_to 0
                capability
                {
                    road_level 0
                }
                material wooden
                construction  2 
                cost  2400 
                settlement_min town
                upgrades
                {
                    paved_roads
                }
            }
            paved_roads city requires factions { northern_european, middle_eastern, eastern_european, greek, southern_european, }   and not building_present_min_level market market 
            {
                convert_to 1
                capability
                {
                    road_level 1
                    trade_base_income_bonus bonus 1
                }
                material wooden
                construction  4 
                cost  4800 
                settlement_min city
                upgrades
                {
                }
            }
        }
        plugins 
        {
        }
    }
    The 'roads' can be constructed but 'paved roads' cannot be constructed if there is a market in the settlement. However M2TW does not tell the player in the tech tree menu that you cannot have Paved Roads if a Market is present (though it does tell you if a building is required).

    4) The not command does not prevent you from adding a building to a settlement in the 'descr_strat' file, so if you used the code in 2) a player could start with roads but could not build them.

    5) I haven't tested the not command in conjunction with events but you may want to put a double space between the event and the not building command, so it's:

    and event_counter governor_present 1 and event_counter tokus_franciscan_order 1 and not building_present_min_level ordo_dominicana hermit_dom

    If that doesn't work and it's not attached to a first level building try putting the not command part before the events.

    6) I'm currently testing whether the not command works with religious buildings (ones that promote a religion). M2TW seems to have a problem with mulitple religious buildings, as it kept telling me I had a gap in my tech tree.


    Here's another thread about the not command:
    http://www.twcenter.net/forums/showt...n_level&page=2


    Personally I prefer to use buildings with multiple upgrades, since it's impossible to have two versions of the same building in a settlement at the same time.
    Last edited by uanime5; July 14, 2008 at 06:23 AM. Reason: More research
    Morning Sun (adds Korea and China to the Shogun 2 map)
    http://www.twcenter.net/forums/forum...28-Morning-Sun

    Expanded Japan mod (97 new regions and 101 new factions)
    http://www.twcenter.net/forums/showt...ew-factions%29

    How to split a region in TWS2
    http://www.twcenter.net/forums/showt...split-a-region

    Eras Total Conquest 2.3 (12 campaigns from 970-1547)

Posting Permissions

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