Page 2 of 3 FirstFirst 123 LastLast
Results 21 to 40 of 47

Thread: TW Script Editor

  1. #21
    Squid's Avatar Opifex
    Patrician Artifex Technical Staff

    Join Date
    Feb 2007
    Location
    Frozen waste lands of the north
    Posts
    17,760
    Blog Entries
    3

    Default Re: TW Script Editor

    Quote Originally Posted by HouseOfHam View Post
    This is a must-have fix. Pretty hard to figure out what's going on when you have a 70k-line script and get 6k+ settlement name errors.
    Its not as easy to code as might be imagined, mainly due to the fact that settlement names can have multiple words in them, and various other issues that crop up. It is in fact harder to deal with than unit names was and that was a royal pain in the ass.

    Pre-select the previous search string when the popup comes up. I want to be able to start typing without having to hit Ctrl-A del every time I search for a new string.
    Added that feature.
    Under the patronage of Roman_Man#3, Patron of Ishan
    Click for my tools and tutorials
    "Two things are infinite: the universe and human stupidity; and I'm not sure about the universe." -----Albert Einstein

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

    Default Re: TW Script Editor

    I don't think the scripting engine allows multi-word settlement names, so if you don't find it as a single word, you can just report it as an error.
    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

  3. #23

    Default Re: TW Script Editor

    Yeah, pretty sure we had some errors with that.

  4. #24
    Squid's Avatar Opifex
    Patrician Artifex Technical Staff

    Join Date
    Feb 2007
    Location
    Frozen waste lands of the north
    Posts
    17,760
    Blog Entries
    3

    Default Re: TW Script Editor

    I'm referring to external names, not internal ones, and external ones have always been able to have multiple words in them as far as I know.
    Under the patronage of Roman_Man#3, Patron of Ishan
    Click for my tools and tutorials
    "Two things are infinite: the universe and human stupidity; and I'm not sure about the universe." -----Albert Einstein

  5. #25

    Default Re: TW Script Editor

    Yeah, but there could be errors (with the external name) when you have two cities called "Herakleia" and "Heracleia Thingy". As in some cases the script/traits would recognize that as the same thing, namely: "Herakleia". I forgot the details on it though.

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

    Default Re: TW Script Editor

    The scripting engine expects a settlement name to be a single token with no white space characters. Any extra tokens are ignored. If you have more tokens than you would expect based on command's syntax, it should be flagged as an error.
    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

  7. #27
    Squid's Avatar Opifex
    Patrician Artifex Technical Staff

    Join Date
    Feb 2007
    Location
    Frozen waste lands of the north
    Posts
    17,760
    Blog Entries
    3

    Default Re: TW Script Editor

    Version 0.5.8

    Changes/Fixes from v0.5.7:

    • Fixed a bug in searching in reverse where it wouldn't find a search term if it was at the end of the file
    • Added ability to replace all instances within the selected text
    • Added ability to count instances of a search term
    • Fixed the search term not being selected in the Find/Replace box
    • Find/Replace now notifies if no matches were found
    • Replace All notifies the total number of replacements made
    • Title of the Find/Replace dialog now changes depending on the active tab
    • Fixed the error log not always clearing when a new script started
    • Removed the ability to validate when the editing windows is not active
    • Added default accept/cancel buttons to the Choose Setting and New Setting forms
    • Added hotkeys to all buttons on the Choose Setting form
    • Changed save dialog not pointing to the correct save path
    • Removed end_while from the list of script commands
    • Files that aren't needed to validate scripts are no longer read
    • text/historic_events is now required but isn't yet used (M2TW)
    • settlements names are now checked against external names instead of internal ones
    • settlement related files are now required and not optional

    Go to the first post to get the new version.
    Last edited by Squid; March 09, 2012 at 10:11 PM.
    Under the patronage of Roman_Man#3, Patron of Ishan
    Click for my tools and tutorials
    "Two things are infinite: the universe and human stupidity; and I'm not sure about the universe." -----Albert Einstein

  8. #28
    Quinn Inuit's Avatar Artifex
    Join Date
    Sep 2006
    Location
    Virginia, USA
    Posts
    4,968

    Default Re: TW Script Editor

    For some reason, it's telling me that Rome (inter alia) isn't a valid settlement name. However, Rome is the name in descr_regions and regions&settlementnames. Any ideas?
    RTR Platinum Team Apprentice, RTR VII Team Member, and Extended Realism Mod Team Coordinator. Proud member of House Wilpuri under the patronage of Pannonian

    The ExRM forum: come for the mod, stay for the Classical History discussions. Or vice versa.

    My writing-related Twitter feed.

  9. #29
    Squid's Avatar Opifex
    Patrician Artifex Technical Staff

    Join Date
    Feb 2007
    Location
    Frozen waste lands of the north
    Posts
    17,760
    Blog Entries
    3

    Default Re: TW Script Editor

    Is there more than one {Rome} entry in the region and settlement names file?
    Under the patronage of Roman_Man#3, Patron of Ishan
    Click for my tools and tutorials
    "Two things are infinite: the universe and human stupidity; and I'm not sure about the universe." -----Albert Einstein

  10. #30
    Quinn Inuit's Avatar Artifex
    Join Date
    Sep 2006
    Location
    Virginia, USA
    Posts
    4,968

    Default Re: TW Script Editor

    Nope. The text string rome only occurs in this line:
    {Rome} Rome

    Edit: that's weird. The problem's gone away, but I don't remember fixing it. Hmmm...I think it was pointing at the imperial_campaign names file, which is weird because it's a BI mod. I updated that file and the problem vanished.

    Edit 2: Um...is there any possible way your script editor could delete half of my regions names file? I just did a diff with the previous version and half the file is gone. I found out because I happen to have had it open in N++ and pulled up the script editor. When I alt-tabbed to N++ and it told me that the regions names file had been altered. Whatever it's doing is causing a campaign selection screen errorless CTD. Reverting to my previous names file fixed it.
    Last edited by Quinn Inuit; March 18, 2012 at 12:50 PM.
    RTR Platinum Team Apprentice, RTR VII Team Member, and Extended Realism Mod Team Coordinator. Proud member of House Wilpuri under the patronage of Pannonian

    The ExRM forum: come for the mod, stay for the Classical History discussions. Or vice versa.

    My writing-related Twitter feed.

  11. #31
    Squid's Avatar Opifex
    Patrician Artifex Technical Staff

    Join Date
    Feb 2007
    Location
    Frozen waste lands of the north
    Posts
    17,760
    Blog Entries
    3

    Default Re: TW Script Editor

    , yes it might be able to do that. I had some testing code to generate settlement name portion of the settlements and regions file for mods that I test against that I don't have the file for. If I forgot to remove that code, which I can't check until tomorrow, then that is a distinct possibility.
    Under the patronage of Roman_Man#3, Patron of Ishan
    Click for my tools and tutorials
    "Two things are infinite: the universe and human stupidity; and I'm not sure about the universe." -----Albert Einstein

  12. #32
    Squid's Avatar Opifex
    Patrician Artifex Technical Staff

    Join Date
    Feb 2007
    Location
    Frozen waste lands of the north
    Posts
    17,760
    Blog Entries
    3

    Default Re: TW Script Editor

    Version 0.5.9

    Changes/Fixes from v0.5.8:

    • Fixed the program overwriting/creating a data/text/barbrian_invasion_regions_and_settlements_names.txt file

    Go to the first post to get the new version.
    Under the patronage of Roman_Man#3, Patron of Ishan
    Click for my tools and tutorials
    "Two things are infinite: the universe and human stupidity; and I'm not sure about the universe." -----Albert Einstein

  13. #33
    Quinn Inuit's Avatar Artifex
    Join Date
    Sep 2006
    Location
    Virginia, USA
    Posts
    4,968

    Default Re: TW Script Editor

    That problem is definitely solved!

    It's still not recognizing most of my city names as valid, though, and I'm not sure why. The game definitely runs.

    For instance, it returns the error
    Comata is not a valid 'settlement name'.

    for this script:
    if I_SettlementOwner Comata = romans_julii
    inc_counter PolybianCondition 1
    end_if

    However, the city is identified as Comata (identical capitalization) in descr_regions, the left column of regions_and_names, and the right column of that file. Is there anywhere else the program could be looking for the city name? It only finds that error with city names I've changed in the last couple of months, but I can't figure out where else I need to change the name of the city.
    RTR Platinum Team Apprentice, RTR VII Team Member, and Extended Realism Mod Team Coordinator. Proud member of House Wilpuri under the patronage of Pannonian

    The ExRM forum: come for the mod, stay for the Classical History discussions. Or vice versa.

    My writing-related Twitter feed.

  14. #34
    Squid's Avatar Opifex
    Patrician Artifex Technical Staff

    Join Date
    Feb 2007
    Location
    Frozen waste lands of the north
    Posts
    17,760
    Blog Entries
    3

    Default Re: TW Script Editor

    Send me the files you're using so I can check them out and see what my program isn't doing that it should be, or is that it shouldn't be.
    Under the patronage of Roman_Man#3, Patron of Ishan
    Click for my tools and tutorials
    "Two things are infinite: the universe and human stupidity; and I'm not sure about the universe." -----Albert Einstein

  15. #35
    Quinn Inuit's Avatar Artifex
    Join Date
    Sep 2006
    Location
    Virginia, USA
    Posts
    4,968

    Default Re: TW Script Editor

    Done.
    RTR Platinum Team Apprentice, RTR VII Team Member, and Extended Realism Mod Team Coordinator. Proud member of House Wilpuri under the patronage of Pannonian

    The ExRM forum: come for the mod, stay for the Classical History discussions. Or vice versa.

    My writing-related Twitter feed.

  16. #36
    Squid's Avatar Opifex
    Patrician Artifex Technical Staff

    Join Date
    Feb 2007
    Location
    Frozen waste lands of the north
    Posts
    17,760
    Blog Entries
    3

    Default Re: TW Script Editor

    Quote Originally Posted by Quinn Inuit View Post
    Done.
    I was looking for the entire set of required (and optional if used) files from the OP.
    Under the patronage of Roman_Man#3, Patron of Ishan
    Click for my tools and tutorials
    "Two things are infinite: the universe and human stupidity; and I'm not sure about the universe." -----Albert Einstein

  17. #37
    Quinn Inuit's Avatar Artifex
    Join Date
    Sep 2006
    Location
    Virginia, USA
    Posts
    4,968

    Default Re: TW Script Editor

    Oh, sorry. I'm afraid I'm not sure what you mean by the whole set. Would you just like a beta copy of the mod?
    RTR Platinum Team Apprentice, RTR VII Team Member, and Extended Realism Mod Team Coordinator. Proud member of House Wilpuri under the patronage of Pannonian

    The ExRM forum: come for the mod, stay for the Classical History discussions. Or vice versa.

    My writing-related Twitter feed.

  18. #38
    Squid's Avatar Opifex
    Patrician Artifex Technical Staff

    Join Date
    Feb 2007
    Location
    Frozen waste lands of the north
    Posts
    17,760
    Blog Entries
    3

    Default Re: TW Script Editor

    How big is it? The files I need from the OP should be no more than a meg or two, especially if compressed.
    Under the patronage of Roman_Man#3, Patron of Ishan
    Click for my tools and tutorials
    "Two things are infinite: the universe and human stupidity; and I'm not sure about the universe." -----Albert Einstein

  19. #39
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,068
    Blog Entries
    35

    Default Re: TW Script Editor

    I am having the same problem with my 1648 mod, posted here.

    Edit: just another test - this is my entry in imperial_campaign.. for a settlement: {Hessen_Town}Kassel
    If I use Hessen_Town the tool gives an error, if I use Kassel it's fine. (Version 5.9). I am a M2TW guy, never used external settlement names in scripting, didn't even know it's possible.
    Last edited by Gigantus; March 30, 2012 at 01:01 PM.










  20. #40

    Default Re: TW Script Editor

    Hello,
    this is a great tool, but for some reason I don't get it to work now. I've upgraded to Version: 0.5.9 (Mar 20 2012). I select the setting first and I presume it needs to be the data folder of a mod. When I open the setting, I get the following message: File: '...[path removed]...\text\imperial_campaign_regions_and_settlement_names.txt' is missing. I cannot open any scripts after that. I'm not playing imperial campaign, and I guess I don't need the file. But does it halt the whole program?

Page 2 of 3 FirstFirst 123 LastLast

Tags for this Thread

Posting Permissions

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