Results 1 to 9 of 9

Thread: city names in scripts

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default city names in scripts

    Hello guys, I have this doubt in scripting...

    A city has two names: what I call the "system name" (example: {Kydonia} in campaing_regions_and_settlement_names, which is the name that appears also in descr_regions) and what I call the "campaign name" (Gortyna in the same file).

    So, something like this:
    {Kydonia} Gortyna

    Now, it looks like that in the Campaign scripts both names work. I mean, both these two entries seem to work and have the same effect
    console_command create_unit Kydonia "greek argyraspid"
    console_command create_unit Gortyna "greek argyraspid"


    I'm sure that for cities that have a two-words name, the "system name" is required. I mean, in the campaign script you can't write
    console_command create_unit Alexandria Ariana "greek argyraspid" (campaign name)

    but
    console_command create_unit Alexandria_Ariana "greek argyraspid" (system name)

    This is for the Campaign scripts.
    My question is: is it better and safer to use the "system" or the "campaign" name in scripting?


  2. #2

    Default Re: city names in scripts

    Code:
    console_command create_unit "Alexandria Ariana" "greek argyraspid" x x x x
    Probably this.

  3. #3

    Default Re: city names in scripts

    Yeah I forgot the x x x x values...

    Anyway, you can't do that, because there is a missing underscore between the two words, it wouldn't work. In that case, you must use the system name, unless the campaign name has a character between the two words, too.


  4. #4

    Default Re: city names in scripts

    By putting the external (campaign) name into quotes, it should work. That's what Aradan is saying. I've done that with the process_cq command from the console when I couldn't remember the internal (system) name of a city.

    Expand your borders, a mod based on XGM 5.

  5. #5

    Default Re: city names in scripts

    Oh sorry I didn't see the quotes, my bad...

    Thanks Caesar, now I know how to add two-words names in scripts.

    Anyway my question remains, I'd just like to know which is better (external or internal name) for game stability...or it is just the same, no differences?


  6. #6
    Product Designer
    Join Date
    Jan 2008
    Location
    the Netherlands
    Posts
    3,005

    Default Re: city names in scripts

    you can change the displayed city names during a campaign, so I'd probably be better to use the 'system' name.
    DESARC92 / Product Design
    Once known as MarcelP | Product Designer | Under the Patronage of Legio
    Marcel's Modder's Resources | Tutorials | The Graphics Workshop

  7. #7

    Default Re: city names in scripts

    you're right, I didn't think of that...but the name in campaing_regions_and_settlement_names does not get changed. Anyway your point is interesting, I think system name is safer, too...


  8. #8
    RedFox's Avatar When it's done.™
    Join Date
    Nov 2006
    Location
    Estonia
    Posts
    3,027

    Default Re: city names in scripts

    Spartan, I think he meant if EDIT_SETTLEMENT_NAMES is TRUE, you can change a settlement name when you are playing the campaign. In DTW it is set to FALSE by default, but you might never know how much the users mod.

    The scripting system is quite smart, as it checks for the closest match - either the internal name or the external one.

    It should be much safer to use internal names though, since there is no fear of messing up. Even better would be to just fix the internal names altogether, to reduce the confusion.
    Last edited by RedFox; August 27, 2009 at 08:11 AM.

  9. #9
    HouseOfHam's Avatar Primicerius
    Join Date
    Apr 2007
    Location
    Minnesota, USA
    Posts
    3,030

    Default Re: city names in scripts

    Does anyone know if it checks the internal or the external name first?
    RTR website/SVN admin

    - Settlement coordinate locator -for RTW/M2TW
    - EDB Validator v1.2.8 (Oct 16, 2012) - for RTW/M2TW
    - RTW scripting tutorials
    - n-turns per year script generator

Posting Permissions

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