Hey all,
This tool will help you when you're working on a script for RTW (maybe I'll do an M2 version later). It checks your script for any errors. And if it found some error(s), it will tell you where to find them, so you can easily fix it.
Of course the tool doesn't know what you intend to do with your script, so even if you didn't make any syntax errors, it can still be that the script doesn't work as you had in mind it should be working.
here's how it looks:
The tool is still a work in progress, which I will update every now and then. So this means it doesn't fully support all possible script combinations yet. However it does check the basics of a script already including:
- Version 1.0:
- Spelling of commands
- Spelling/presence of events
- Spelling/presence of conditions
- If a counter has been declared before use
- The syntax of inc_counter and set_counter commands
- Console commands
- Syntax of monitors
- Syntax of Ifs
- Syntax of Whiles
- Syntax of Ands
- Syntax of the spawn_army section
- Version 1.1:
- Allows to check for factions names in most circumstances:
- Names are loaded from descr_sm_factions.txt
- Console_commands not yet supported
- You can not yet manually edit the factions. So the list with factions you get to see is just for your own reference...
- Even though the slave faction is not listed amongst the other factions, it won't be forgotten in the check
- Now properly checks the spawn_army section so it allows multiple units in one army
- It now properly remembers your previously loaded script
(and descr_sm_factions.txt as well of course)- Version 1.2:
- Now properly recognizes every comparison token (eg ">=" is now allowed as well)
- You now can change the factions by editing them in the textboxes
- Some more minor fixes
- Version 1.3:
- You can now check for region name errors by loading descr_regions.txt. (Thanks to HouseOfHam and his Settlement Coordinate Locator)
(only for the conditions: I_SettlementExists and I_SettlementOwner)- Fixed a bug with the "Script continues for x lines after being ended" while there were no lines after the "end_script" command anymore.
I hope to add a lot lot lot more in future... But I have the basics ready now (like the full lists of possible commands, events, conditions and console commands) so it's just about adding very minor things like a function to check the syntax of a command like "engage_armies" or checking the syntax of the add_money console command etc.
As you can see on the screen above, there are three bullets which you can select: "Check entire script", "Check script from line X to line Y" and the last one "Check an entire monitor starting at line X".
The first two are fully working already, so you can savely use those. However about the last one I'm not entirely sure yet if it does what it's supposed to do. The purpose of that one was so you can quickly check one monitor which you are working on without having to check the entire script. But better not use this one yet.
The check is pretty fast anyway, so while you're at it, I think it's just as easy to run a full scan
Oh, I almost forgot... With the button in the top-right ("...") you can select the script you want to check and with the button next to it ("->") you can reload it after you made changes to it so you can continually check your script while you're working on it.
The bar/drop-down menu next to it doesn't fully work yet unfortunately... I hope to be able to fix that soon
DOWNLOAD (v1.3)
Have fun