I have noticed that not all basic characters are color coded, see attachment.
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
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
.
@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:I think such instances might be reported as warnings - this way the tool will contribute to better scripting consistency.Code:I_SettlementOwner Venice venice I_TurnNumber 10 I_BattleSettlementFortificationLevel 1 BattleDirectionOfAttack front BattlePlayerUnitCategory infantry BattleEnemyUnitCategory cavalry
@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 05:21 AM.
I have no memory of this place.
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.
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.
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
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
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
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
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
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
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
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
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 08: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