Results 1 to 6 of 6

Thread: I_MapName condition: does it work?

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

    Default I_MapName condition: does it work?

    I'm trying to implement different scripts depending on the campaign to be played.
    I found in docudemon_conditions one that could be useful:
    Code:
    Identifier:              I_MapName
    Trigger requirements:    
    Parameters:              map file name
    Sample use:              not I_MapName world\maps\campaign\sons_of_mars\descr_strat.txt
    Description:             The qualified file name of the current map relative to the data directory
    Battle or Strat:         Either
    Class:                   MAP_NAME
    Implemented:             Yes
    Author:                  Guy
    I tried this in this way (export_descr_advice):
    Code:
    ;------------------------------------------ ITW Campaign   
    
    Trigger ITW_Campaign_Thread_Trigger
        WhenToTest SettlementSelected
    
        Condition I_LocalFaction carthage
              and I_MapName world\maps\campaign\Hispania_Cartago\descr_strat.txt
    
        AdviceThread ITW_Carthage_Campaign_Thread  0
    Result: the advice didn't appear and, or course, the script was not launched.

    Then, I tried the negative way:
    Code:
    ;------------------------------------------ ITW Campaign   
    
    Trigger ITW_Campaign_Thread_Trigger
        WhenToTest SettlementSelected
    
        Condition I_LocalFaction carthage
              and not I_MapName world\maps\campaign\imperial_campaign\descr_strat.txt
    
        AdviceThread ITW_Carthage_Campaign_Thread  0
    Result: the advice appeared in all the campaigns, when carthage faction was selected.
    I tried also using the full path (data\world\etc), but the result was the same.

    Did anybody use this condition successfully?
    Any other method to launch scripts selectively depending on the campaign?

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

    Default Re: I_MapName condition: does it work?

    I believe it is used in the export descr advice file for some of the prologue advice (to make sure it doesn't appear in the normal game). Look there for syntax.

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

    Default Re: I_MapName condition: does it work?

    Quote Originally Posted by Myrddraal
    I believe it is used in the export descr advice file for some of the prologue advice (to make sure it doesn't appear in the normal game). Look there for syntax.
    Thanks for the tip, Myrddraal.
    You were right and it is used. The correct syntax is:
    Code:
              and I_MapName data/world/maps/campaign/Hispania_Cartago/descr_strat.txt
    Notice the two differences with docudemon: the need for "data" in the path and the use of / instead of \.
    Now it works in my campaigns.

  4. #4

    Default Re: I_MapName condition: does it work?

    ooooh that's what I was doing wrong...
    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

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

    Default Re: I_MapName condition: does it work?

    Those little things you take for granted when it might actually be useful to other people... If only all modders had psychic (sp?) links

  6. #6

    Default Re: I_MapName condition: does it work?

    If it's a mod-foldered mod, it's supposed to be
    Code:
    I_MapName <modfolder>/data/world/maps/campaign/Hispania_Cartago/descr_strat.txt
    IMPORTANT: The /data/world/maps/campaign/ must be in all lower-case. It's hard-coded that way in the exe and won't work otherwise. You must put it that way even if the actual path is DaTa/WoRlD/MaPs/CamPAign/

    ps: Sorry for topping this ancient thread. :)
    Last edited by HouseOfHam; 04-26-2009 at 11:26.
    RTR VII Developer

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