Page 3 of 5 FirstFirst 12345 LastLast
Results 41 to 60 of 93

Thread: TW Script Editor

  1. #41
    Gigantus's Avatar I am thinking more about running away now then I did as a kid, but by the time I put my teeth in, my glasses on and find my car keys I forget why I am going.
    Moderator Emeritus Administrator Emeritus Modding Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    49,150
    Blog Entries
    26

    Default Re: TW Script Editor

    I have noticed that not all basic characters are color coded, see attachment.
    Last edited by Squid; September 26, 2011 at 11:30 AM.




  2. #42
    Squid's Avatar Opifex
    Patrician Artifex Technical Staff

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

    Default Re: TW Script Editor

    Thanks Gig, I'll fix that in the next release.
    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

  3. #43
    Gigantus's Avatar I am thinking more about running away now then I did as a kid, but by the time I put my teeth in, my glasses on and find my car keys I forget why I am going.
    Moderator Emeritus Administrator Emeritus Modding Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    49,150
    Blog Entries
    26

    Default Re: TW Script Editor

    Another one from my collection: the faction entry for 'bayreuth' seems to have a problem. In the 'spawn army' it isn't recognized, but there is no problem with the 'spawn character' section.
    One error not visible is after 'faction' in a 'change banner' section. See Screenshot.


    Attachment 190653

    .




  4. #44
    Germanicu5's Avatar Will buy spare time...
    Join Date
    Feb 2009
    Location
    Not Zee Germany
    Posts
    2,107

    Default Re: TW Script Editor

    @Squid

    Great tool, somehow hates my coding manner though.

    Not only MTW recognises "=" and "==" as logical operators, in many cases (not that I checked all conditions) it also accepts no logical operator at all.
    These examples are parsed correctly:
    Code:
    I_SettlementOwner Venice venice
    I_TurnNumber 10
    I_BattleSettlementFortificationLevel 1
    BattleDirectionOfAttack front
    BattlePlayerUnitCategory infantry
    BattleEnemyUnitCategory cavalry
    I think such instances might be reported as warnings - this way the tool will contribute to better scripting consistency.

    @Gig

    That DLV script is a bit "ancient", if anybody expresses any concerns about some of my scripts, you can point them to my general direction .

    Regards
    Last edited by Germanicu5; November 20, 2011 at 06:21 AM.
    I have no memory of this place.

  5. #45
    Gigantus's Avatar I am thinking more about running away now then I did as a kid, but by the time I put my teeth in, my glasses on and find my car keys I forget why I am going.
    Moderator Emeritus Administrator Emeritus Modding Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    49,150
    Blog Entries
    26

    Default Re: TW Script Editor

    It's actually from my 1648 mod - and I made the inital error of having a settlement wit the same name as a faction (bayreuth - fixed that but the error message persists).




  6. #46
    Germanicu5's Avatar Will buy spare time...
    Join Date
    Feb 2009
    Location
    Not Zee Germany
    Posts
    2,107

    Default Re: TW Script Editor

    I was referring to some posts from previous page (the CoW case and the script for DLV - both mine), just in case someone thought they needed clarification.

    Regards
    I have no memory of this place.

  7. #47
    Gigantus's Avatar I am thinking more about running away now then I did as a kid, but by the time I put my teeth in, my glasses on and find my car keys I forget why I am going.
    Moderator Emeritus Administrator Emeritus Modding Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    49,150
    Blog Entries
    26

    Default Re: TW Script Editor

    No problem, I thought you referred to my post above it as you didn't link.




  8. #48
    Squid's Avatar Opifex
    Patrician Artifex Technical Staff

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

    Default Re: TW Script Editor

    Quote Originally Posted by Gigantus View Post
    Another one from my collection: the faction entry for 'bayreuth' seems to have a problem. In the 'spawn army' it isn't recognized, but there is no problem with the 'spawn character' section.
    One error not visible is after 'faction' in a 'change banner' section. See Screenshot.


    Attachment 190653

    .
    The spawn_character line isn't picking up the error because currently the program does not check the spawn_character line at all beyond that spawn_character is spelled correctly. I am curious as to why the faction entry isn't being recognized and I'd guess there's either an error, probably minor and not enough to stop the game from loading, in your descr_sm_factions.txt or my parsing code for that file is not working as I expect it to. If I were betting I'd put money on the later and not the former.

    If you could attach your descr_sm_factions.txt so I can try and see why it appears not to like that faction entry it would be appreciated.

    Quote Originally Posted by Germanicu5 View Post
    @Squid

    Great tool, somehow hates my coding manner though.

    Not only MTW recognises "=" and "==" as logical operators, in many cases (not that I checked all conditions) it also accepts no logical operator at all.
    These examples are parsed correctly:
    Code:
    I_SettlementOwner Venice venice
    I_TurnNumber 10
    I_BattleSettlementFortificationLevel 1
    BattleDirectionOfAttack front
    BattlePlayerUnitCategory infantry
    BattleEnemyUnitCategory cavalry
    I think such instances might be reported as warnings - this way the tool will contribute to better scripting consistency.
    I know that the = or == can be left out, I've known about that since the early days of ATVTW, which is where the code for condition parsing originated from, because FATW used that notation in their trait/ancillary files.

    There are three reasons that no logic token is reported as an error. First in order to code for the possibility of not having it there raises the complexity of the code and would require fairly major modifications to the code, which right now, nor in the past, have I been interested in pursuing. Second
    for a person who's reasonably new to modding including the = or == makes the code more legible both to them and to anyone they get to help them. This type of thing I know a lot about since I teach programming and even though I know a lot of shortcuts that can be used when defining what is "good practice", and yes I know that's entirely subjective, anything that makes the code easier to read as if it was English is better than brevity. Third, those coders who know enough to know you don't need the logic tokens are also smart enough to ignore the errors that are generated by not using them. Personally I always use the logic tokens in my code.

    Also at some point I'd like to add auto completion to the script editor which will provide a drop down of items at the appropriate time to help complete the code.
    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

  9. #49
    Gigantus's Avatar I am thinking more about running away now then I did as a kid, but by the time I put my teeth in, my glasses on and find my car keys I forget why I am going.
    Moderator Emeritus Administrator Emeritus Modding Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    49,150
    Blog Entries
    26

    Default Re: TW Script Editor





  10. #50
    Squid's Avatar Opifex
    Patrician Artifex Technical Staff

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

    Default Re: TW Script Editor

    Quote Originally Posted by Gigantus View Post
    It's actually from my 1648 mod - and I made the inital error of having a settlement wit the same name as a faction (bayreuth - fixed that but the error message persists).
    The faction isn't being recognized because you also have a building level with the name bayreuth and the lexer is confusing the two. I'm going to need a better system to let the lexer know what it should actually be expecting next. As long as the lexer isn't tokenizing properly the scanner will report incorrect errors.
    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

  11. #51
    Gigantus's Avatar I am thinking more about running away now then I did as a kid, but by the time I put my teeth in, my glasses on and find my car keys I forget why I am going.
    Moderator Emeritus Administrator Emeritus Modding Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    49,150
    Blog Entries
    26

    Default Re: TW Script Editor

    Thanks, I wonder were that name will pop up next....


    Edit: just to confirm - the error disappeared after changing the building's name.
    Last edited by Gigantus; December 10, 2011 at 04:49 AM.




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

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

    Default Re: TW Script Editor

    Version 0.5.6

    Changes/Fixes from v0.5.5:

    • Added inquisitor & priest to syntax highliting for M2TW Scripts
    • Scripts will now indent properly when editing the script (pressing enter will indent appropriately
    • Added an auto-indent function which will properly indent the entire script
    • For conditions that take a variable number of parameters added an error if none are provided
    • Fixed a few parsing errors for descr_sm_faction.txt
    • Fixed a few bugs in the parsing of the faction line in spawn_army blocks
    • Fixed a few instances where an error on a line would cause the next line to be skipped
    • Added code the check the traits line of spawn_army block in M2TW
    • Slightly improved performance by only checking certain items if the next item expected is of that type (on going improvement into the next few updates)
    • Fixed the faction line parsing in the add_events block

    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. #53
    Gigantus's Avatar I am thinking more about running away now then I did as a kid, but by the time I put my teeth in, my glasses on and find my car keys I forget why I am going.
    Moderator Emeritus Administrator Emeritus Modding Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    49,150
    Blog Entries
    26

    Default Re: TW Script Editor

    I am having a problem with adding a movie to the add_events command. The error message says the movie doesn't exist, but seeing that it does the same with the vanilla script I assume that check isn't correctly implemented yet?

    Attachment 194579




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

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

    Default Re: TW Script Editor

    What's the exact path to the events folder starting from data?
    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. #55
    Gigantus's Avatar I am thinking more about running away now then I did as a kid, but by the time I put my teeth in, my glasses on and find my car keys I forget why I am going.
    Moderator Emeritus Administrator Emeritus Modding Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    49,150
    Blog Entries
    26

    Default Re: TW Script Editor

    ...\data\fmv\event\moviename.bik




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

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

    Default Re: TW Script Editor

    Sigh, I was having it look for the events folder inside the data folder. No wonder it wasn't finding anything.
    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. #57
    Gigantus's Avatar I am thinking more about running away now then I did as a kid, but by the time I put my teeth in, my glasses on and find my car keys I forget why I am going.
    Moderator Emeritus Administrator Emeritus Modding Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    49,150
    Blog Entries
    26

    Default Re: TW Script Editor

    How are you going to solve the problem if I use a vanilla movie which is not the mod folder? (Or in my Barebones folder for that matter) Probably adding the list of vanilla (and kingdoms) movies to the database lookup (or whatever it's called) might be a solution.




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

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

    Default Re: TW Script Editor

    I haven't figured that out yet, as unlike RTW its not easy to read the contents of the pak files.
    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. #59
    Gigantus's Avatar I am thinking more about running away now then I did as a kid, but by the time I put my teeth in, my glasses on and find my car keys I forget why I am going.
    Moderator Emeritus Administrator Emeritus Modding Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    49,150
    Blog Entries
    26

    Default Re: TW Script Editor

    Do you just need a list of the movie names? I got all the campaigns and vanilla unpacked, not a problem.

    Edit: in fact the movies are not in the packs - they are in their respective folders.

    Attachment 195145Attachment 195146Attachment 195147Attachment 195148Attachment 195149
    Last edited by Gigantus; December 19, 2011 at 09:30 AM.




  20. #60
    Squid's Avatar Opifex
    Patrician Artifex Technical Staff

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

    Default Re: TW Script Editor

    Really, they come unpacked in the vanilla install? If you could send me a list of vanilla movies that would be appreciated.

    EDIT: nvm I just saw your edit.
    Last edited by Squid; December 19, 2011 at 09:38 AM.
    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

Page 3 of 5 FirstFirst 12345 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
  •