Page 3 of 3 FirstFirst 123
Results 41 to 47 of 47

Thread: TW Script Editor

  1. #41
    Gigantus's Avatar The trouble with having an open mind, of course, is that people will insist on coming along and trying to put things in it
    Patrician Moderator Emeritus Administrator Emeritus Modding Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    46,608
    Blog Entries
    24

    Default Re: TW Script Editor

    The program needs that txt file for reference. If you do not have that file in your mod, then you will need the base file from the original game.



  2. #42

    Default Re: TW Script Editor

    Quote Originally Posted by Gigantus View Post
    The program needs that txt file for reference. If you do not have that file in your mod, then you will need the base file from the original game.
    Will try that, thank you.

  3. #43
    Squid's Avatar Opifex
    Patrician Artifex Technical Staff

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

    Default Re: TW Script Editor

    Version 0.6.0

    Changes/Fixes from v0.5.9:

    • For M2TW fixed settlement names using external names (required for RTW) to using internal names (required for M2TW)
    • Date line in add_events blocks is now optional
    • Fixed bug in factions line in add_event blocks
    • Changed to having one error for a non-existant settings path instead of displaying all files as missing
    • File data/descr_names.txt is now required
    • Added partial processing of the character line in spawn_army blocks
    • Fixed indentation not properly handling tabs when indenting partial blocks of text
    • Fixed indentation not indenting the last line when indenting a block or when indenting from the keyboard shortcut
    • Fixed empty lines not being excluded from indentation
    • Added set_faction_banner to list of folding code sections
    • Changed icon to a new icon (courtesy of Ishan)
    • Added UIElements to syntax highlighting
    • Added simple autocompletion of all (or at least most) hardcoded elements


    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

  4. #44
    Gigantus's Avatar The trouble with having an open mind, of course, is that people will insist on coming along and trying to put things in it
    Patrician Moderator Emeritus Administrator Emeritus Modding Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    46,608
    Blog Entries
    24

    Default Re: TW Script Editor

    Yu ma man!!!

    Edit: it doesn't like the use of 'random_name' - "undefined name for faction f_pergamon: random_name":
    Code:
            spawn_army
                faction f_pergamon
                character random_name, general, age 25, x 218, y 152, direction N
                unit    eastern cavalry mada asabara        exp 1 armour 0 weapon_lvl 0
                unit    hellenistic infantry phalangitai    exp 0 armour 0 weapon_lvl 0
                unit    hellenistic infantry phalangitai    exp 0 armour 0 weapon_lvl 0
            end
    And I am not sure if it is the negative number or what might be wrong with this - "undefined console_command: date"
    Code:
            if I_TurnNumber = 0
                console_command date -273
            end_if
    And a question about names: the names for slave spawns - aren't they taken from the slave section in descr_names and not from the sub faction section? This name is in the slave section but not in the f_hayasdan section:
    Code:
                spawn_army
                    faction slave, sub_faction f_hayasdan
                    character    Hasan, named character, age 35, x 271, y 170
                    unit        eastern cavalry nizakahar ayrudzi    exp 4 armour 0 weapon_lvl 0
                    unit        eastern infantry kavakaza sparabara    exp 1 armour 0 weapon_lvl 0
                    unit        eastern infantry kavakaza sparabara    exp 1 armour 0 weapon_lvl 0
                    unit        eastern infantry thanvare kavakaza    exp 1 armour 0 weapon_lvl 0
                    unit        eastern infantry skirmisher        exp 1 armour 0 weapon_lvl 0
                    unit        eastern infantry slinger        exp 1 armour 0 weapon_lvl 0
                    unit        eastern infantry cappadoccian tribesmen        exp 1 armour 0 weapon_lvl 0
                end
    This appears to be a false positive "hellenistic_infantry_hoplitai is not valid unit type" - apparently with this condition the dictionary (not type) entry is used:
    Code:
    and I_NumberUnitsInSettlement sett_096 hellenistic_infantry_hoplitai < 3
    Last not least - surnames in spawns "Expected a comma, found ofcarthago", first name exists in faction's section, surname is entered in 'surnames' section of the faction:
    Code:
            spawn_army
                faction f_carthage
                character    Xanthippos ofcarthago, named character, age 40, x 117, y 126, label xanthippos
                traits XanthipposBiography 1, NaturalIntelligence 4, NaturalCharisma 2, NaturalEnergy 4, Selflessness 2, Temperament 2, LoyaltyLevel 4, CommandExperience 3, GoodTactician 1, GoodAttacker 1, Disciplinarian 1, Stoic 1
                unit hellenistic infantry hoplitai    exp 2 armour 1 weapon_lvl 1
            end
    Last edited by Gigantus; July 08, 2015 at 01:09 AM.



  5. #45
    Squid's Avatar Opifex
    Patrician Artifex Technical Staff

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

    Default Re: TW Script Editor

    Version 0.6.1

    Changes/Fixes from v0.6.0:

    • Fixed FactionNamesReader not correctly reading surnames/womens names
    • Fixed FactionNamesReader not correctly handling multiple factions per faction block
    • Fixed bug in checks for names with both a first and last name
    • Fixed random_name not being valid for m2tw character spawns
    • Fixed date not being recognized as a console command

    Go to the first post to get the new version.
    Last edited by Squid; July 08, 2015 at 11:10 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

  6. #46
    Squid's Avatar Opifex
    Patrician Artifex Technical Staff

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

    Default Re: TW Script Editor

    Quote Originally Posted by Gigantus View Post
    Yu ma man!!!

    Edit: it doesn't like the use of 'random_name' - "undefined name for faction f_pergamon: random_name":
    Code:
            spawn_army
                faction f_pergamon
                character random_name, general, age 25, x 218, y 152, direction N
                unit    eastern cavalry mada asabara        exp 1 armour 0 weapon_lvl 0
                unit    hellenistic infantry phalangitai    exp 0 armour 0 weapon_lvl 0
                unit    hellenistic infantry phalangitai    exp 0 armour 0 weapon_lvl 0
            end
    Fixed.

    And I am not sure if it is the negative number or what might be wrong with this - "undefined console_command: date"
    Code:
            if I_TurnNumber = 0
                console_command date -273
            end_if
    Fixed, I was attempting to fix another bug and reintroduced this one. :facepalm:

    And a question about names: the names for slave spawns - aren't they taken from the slave section in descr_names and not from the sub faction section? This name is in the slave section but not in the f_hayasdan section:
    Code:
                spawn_army
                    faction slave, sub_faction f_hayasdan
                    character    Hasan, named character, age 35, x 271, y 170
                    unit        eastern cavalry nizakahar ayrudzi    exp 4 armour 0 weapon_lvl 0
                    unit        eastern infantry kavakaza sparabara    exp 1 armour 0 weapon_lvl 0
                    unit        eastern infantry kavakaza sparabara    exp 1 armour 0 weapon_lvl 0
                    unit        eastern infantry thanvare kavakaza    exp 1 armour 0 weapon_lvl 0
                    unit        eastern infantry skirmisher        exp 1 armour 0 weapon_lvl 0
                    unit        eastern infantry slinger        exp 1 armour 0 weapon_lvl 0
                    unit        eastern infantry cappadoccian tribesmen        exp 1 armour 0 weapon_lvl 0
                end
    Textures and stuff are all based on the sub_faction, so I assumed that names were as well.

    This appears to be a false positive "hellenistic_infantry_hoplitai is not valid unit type" - apparently with this condition the dictionary (not type) entry is used:
    Code:
    and I_NumberUnitsInSettlement sett_096 hellenistic_infantry_hoplitai < 3
    The docudemons says type, but also note something about the dictionary.id. I'd assume it's type, and mostly people use the same type/dictionary names, but mutliple units can share a dictionary entry, but only one of each type can exist.

    Last not least - surnames in spawns "Expected a comma, found ofcarthago", first name exists in faction's section, surname is entered in 'surnames' section of the faction:
    Code:
            spawn_army
                faction f_carthage
                character    Xanthippos ofcarthago, named character, age 40, x 117, y 126, label xanthippos
                traits XanthipposBiography 1, NaturalIntelligence 4, NaturalCharisma 2, NaturalEnergy 4, Selflessness 2, Temperament 2, LoyaltyLevel 4, CommandExperience 3, GoodTactician 1, GoodAttacker 1, Disciplinarian 1, Stoic 1
                unit hellenistic infantry hoplitai    exp 2 armour 1 weapon_lvl 1
            end
    Fixed, a couple of bugs that led me to believe I had the code correct, but were actually masking each other, irritating.
    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

  7. #47
    Gigantus's Avatar The trouble with having an open mind, of course, is that people will insist on coming along and trying to put things in it
    Patrician Moderator Emeritus Administrator Emeritus Modding Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    46,608
    Blog Entries
    24

    Default Re: TW Script Editor

    'Regular' name issues are solved, only these two remain:
    The docudemons says type, but also note something about the dictionary.id. I'd assume it's type, and mostly people use the same type/dictionary names, but mutliple units can share a dictionary entry, but only one of each type can exist.
    I had assumed the same, but it has to be dictionary to work. Only CA knows why...

    Textures and stuff are all based on the sub_faction, so I assumed that names were as well.
    I can confirm that names for sub factions are taken from the slave section of descr_names, not from the sub faction section.
    Last edited by Gigantus; July 08, 2015 at 08:46 PM.



Page 3 of 3 FirstFirst 123

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
  •