-
Re: ATV-TW: a trait (and future ancillary) validator for RTW/M2TW
hi all,
I received a PM today letting me know about the new posts in this thread. Let me dig around a bit to check on that source code. I certainly hope it has survived the changes of job and location in the past year :scared:
Will post up again once I know something...
-
Re: ATV-TW: a trait (and future ancillary) validator for RTW/M2TW
Well that was easy...
ATVTW-source.zip (370K)
This includes bin and obj folders from the last build (a long while back). Feel free to nuke them.
And don't expect anything fancy. I did comment fairly well as I was writing it, hopefully that's helpful. The main parser is just a gigantic set of conditionals so it's fairly easy to sift through once you've found the right spot.
Let me know if there are confusing parts, and good luck!
-
Re: ATV-TW: a trait (and future ancillary) validator for RTW/M2TW
Quote:
Originally Posted by Tamur
Well that was easy...
This includes bin and obj folders from the last build (a long while back). Feel free to nuke them.
And don't expect anything fancy. I did comment fairly well as I was writing it, hopefully that's helpful. The main parser is just a gigantic set of conditionals so it's fairly easy to sift through once you've found the right spot.
Let me know if there are confusing parts, and good luck!
Thanks,
Once I had a look around the code, it's not very difficult to follow what you were doing, your commenting really helped.
Here's a new version of ATV-TW
<<Removed link as this is an outdated version, see this post for the current version>>
This version has the following fixes and improvements:
Fixes:
- Fixed Subterfuge not being recognized as a valid attribute
- Fixed Bribery not being recognized as a valid attribute
- Fixed crash with Condition I_BattleSettlementFortificationLevel
- Fixed last trigger in export_description_ancillaries.txt not being checked or displayed on the Ancillary Trigger tab
- Fixed last trigger in export_description_character_traits not being checked or displayed on the Trait Triggers tab
- Fixed incorrect error message if an ancillary has an invalid attribute in an effects line
Improvements:
- Triggers that assign traits in export_description_ancillaries, now appear in the trait trigger tab
- Changed the icon the vanilla icon
The next release will have improved condition checking included in it.
If you find any errors, please PM me or post here so I can include a fix in the next release.
-
Re: ATV-TW: a trait (and future ancillary) validator for RTW/M2TW
hiya Squid, thanks for taking the reins on this! Glad to hear it wasn't too much fo a nightmare to dig through. I'll be interested to watch the progress.
I'm having some strange non-existent object errors when browsing ancillary triggers, but that may simply be me using an old file I had lying about.
-
Re: ATV-TW: a trait (and future ancillary) validator for RTW/M2TW
Thanks both for getting this moving again.
New version is working for me - old one gave up on my rather extensively mangled file, though I admit to not re-trying it since working more on file.
For triggers its throwing this out
Quote:
Trigger trigger_slayer4
WhenToTest PostBattle
Condition BattleGeneralKilled
and not GeneralFoughtFaction slave
Affects slayergeneral 1 Chance 100
as wrong though I thought it was working in practice - did check it at one stage and think it triggers even if 'general' is actually a captain not family member but I think it works. It also doesn't like WithdrawsBeforeBattle on End Turn check but have noticed that vanilla uses I_WithdrawsBeforeBattle on "WhenToTest PreBattleWithdrawal"
so might switch to that arrangement instead anyway.
Other thing I put in deliberately to see if it would check is a duplicated trigger name, it doesn't seem to catch that...
-
Re: ATV-TW: a trait (and future ancillary) validator for RTW/M2TW
Quote:
Originally Posted by Makanyane
Thanks both for getting this moving again.
New version is working for me - old one gave up on my rather extensively mangled file, though I admit to not re-trying it since working more on file.
For triggers its throwing this out
Quote:
Trigger trigger_slayer4
WhenToTest PostBattle
Condition BattleGeneralKilled
and not GeneralFoughtFaction slave
Affects slayergeneral 1 Chance 100
as wrong though I thought it was working in practice - did check it at one stage and think it triggers even if 'general' is actually a captain not family member but I think it works. It also doesn't like
WithdrawsBeforeBattle
which again I'm fairly sure is working :dizzy2:
Some method of skipping past trigger conditions it doesn't like might help, can't seem to get it to scan past them without altering them at moment.
Neither of those conditions is in the docudemon files. For the WithdrawsBeforeBattle, there is an I_WithdrawsBeforeBattle condition though, is that the one you're looking for?
If you, or someone else, can confirm that those condition are actually accepted by the engine and work in game I'll include them in the next patch.
EDIT: There is one bug I just found, if traits have not been parsed and you try to parse the ancillaries and you have traits assigned in export_descr_ancillaries.txt it will cause the program to crash. I'm going to fix the bug and release a new version.
-
Re: ATV-TW: a trait (and future ancillary) validator for RTW/M2TW
Thank you for this new version. It was a bit annoying when I needed to quote out all the entries with subterfuge or bribery...
I'll be looking forward the next release.
-
Re: ATV-TW: a trait (and future ancillary) validator for RTW/M2TW
Re: the conditions I posted, I'd edited while you were replying to say I was switching to using I_WithdrawsBeforeBattle, both other conditions were triggering, eg they were only source of trait and it was appearing, but I think after doing more testing that they might have been returning false positives, so don't add them.
Thanks again, Mak.
-
Re: ATV-TW: a trait (and future ancillary) validator for RTW/M2TW
Version 0.92 is now available for download:
<<Removed link as this is an outdated version, see this post for the current version>>
There are various changes:
Fixes:
- Fixed the crash when parsing ancillaries without having already processed traits and having traits assigned in export_descr_ancillaries.txt
- Fixed a couple of other rare crashes
- Fixed finding the next trigger which bestows a given trait/ancillary if the given trait/ancillary was either the bestowed in the first or last trigger
- Fixed the program not releasing export_ancillaries.txt and export_VnVs.txt, changes to these files no longer require you to close the program and re-run it, you can just reparse now
Changes:
- The parser no longer stops on non-parsing errors (misspelt attributes are now reported when you click "Find Next Problem" not on parsing)
- Improved the trait search function so it will search all traits no matter where you start from, ending with the currently selected trait.
- Added an ancillary search function, it functions as the trait search function now works
- Updated various text messages to the user
- Events are now error checked (only those events which export a character record of some sort are currently checked)
- Minor UI update so that Alt-F4 now closes the program (having to click the X was starting to irritate me)
- The UI update also added menu item which will eventually remove the last two tabs from the main screen.
If you find any problems with the current version either post it here, or PM me.
-
Re: ATV-TW: a trait (and future ancillary) validator for RTW/M2TW
Can you put it on rapidshare or something? Filefront hates me, or my firefox extensions.
-
Re: ATV-TW: a trait (and future ancillary) validator for RTW/M2TW
I updated my last post it now has a download link for RapidShare as well as FileFront.
-
Re: ATV-TW: a trait (and future ancillary) validator for RTW/M2TW
Here's version 0.93.
Just has two minor fixes:
- Fixed the crash that would occur if you had a non-integer value for an Effects line's point value
- Fixed the double minus sign(--) that you'd see for any effect that provided a negative bonus to an attribute.
<<Removed link as this is an outdated version, see this post for the current version>>
-
Re: ATV-TW: a trait (and future ancillary) validator for RTW/M2TW
Finally, at long last ATVTW version 1.0. This release has been "ready" to go for over a month but I keep finding things to fix and improve. In fact after I started writing this up (for the 3rd or 4th time) I'm still making changes to the program (the first time I thought 1.0 was done was december 17th).
Fixes:- Fixed some events not being included in the list of events
- Fixed event errors not being reported
- Fixed some conditions not being listed correctly
- Fixed religions being considered an attribute (they are seperate now)
- Fixed religions not being checked
Improvements:- UI Improvements
- One set of buttons for all tabs
- Expandable elements for conditions/effects/antitriats/etc that could be more than the space provided
- Functional menu bar
- Seperate area for religious beliefs on the traits/ancillaries tabs
- Seperated trait/ancillaries on the Ancillary Triggers tab
- The drop down menu for Path to files allows to to browse to the directory of the files (it adds the location to the drop down menu)
- Trigger tabs are now listing items by trigger, instead of by trait/ancillary
- Double clicking on a trait/ancillary on the trigger tab will bring up the corresponding trait/ancillary
- Parsing Improvements
- Checks for lines being in the correct order
- Checks for correct number of tokens on each line
- Outputs line number of lines with errors
- Only need to parse once to parse both traits/ancillaries
- Searching Implemented for both sets of triggers (works as for traits/ancillaries)
- Error Checking Improvements
- For Trait/Ancillaries tab, more detailed messages for any errors
- For Trait tab, if there is an error on one level, the "Next Problem" button will continue from the next level instead of the next trait
- All errors/warnings that are visible have an error/warning message displayed
- Added warnings for antitraits/excludedancillaries that don't work both ways and for having more than one character type for a trait, as they won't cause errors but will impair correct functionality of the files (warnings are displayed in blue)
- Condition checking
- Most conditions are checked against hardcoded values
- CultureType/FactionType are checked against vanilla & BI values
- Settlement Names/Building Names/Unit Names are not checked
- Numeric Values are split into three groupings, non-negative integers, all integers, non-integers depending on the allowed values for the parameter
- ATVTW Options
- Added an option to stop on warnings when checking for errors
Features to come:- Options to use faction/culture/building/unit/settlement names from custom files and check them
- SplitButton for the ParseFiles button to be able select which file you want to be able to parse (may or may not be feasible due to traits being assigned in the ancillaries triggers)
- Check to see if comma seperated lists are actually comma seperated
- Parser will list all parsing errors at once instead of just the first it finds
- Any other suggestions that are made that I can figure out how to implement :D
<<Removed link as this is an outdated version, see this post for the current version>>
If you find any bugs or have any suggestions for improvements please post them here or PM them to them.
Special thanks go to Tamur for releasing his code so I could work on it, and to EB for their gigantic traits/ancillaries files, which were so big and varied that everytime I thought I'd caught every bug possible that could be in the files or in my code their traits/ancillaries proved me wrong.
-
Re: ATV-TW: a trait (and future ancillary) validator for RTW/M2TW
That's great Squid!:2thumbsup:
-
Re: ATV-TW: a trait (and future ancillary) validator for RTW/M2TW
Yay! You wouldn't be willing to work on a version for M2TW, would you?
-
Re: ATV-TW: a trait (and future ancillary) validator for RTW/M2TW
Eventually, but first I've got to go do the work on Roma Surrectum traits/ancillaries I've put off while working on the RTW version, and I still want to make those modifications to make the RTW version more customizable. There's also the problem that I don't own either M2TW or Kingdoms, so I have no way of getting a feel for the ins and outs of the files. I thought that M2TW files were almost identical to RTW, so does my current version work?
A couple of other improvements with the new version:
UI Improvements
- Trigger tabs are now listing items by trigger, instead of by trait/ancillary
- Double clicking on a trait/ancillary on the trigger tab will bring up the corresponding trait/ancillary
I'm sure there are other goodies included that I've forgotten I added.
-
Re: ATV-TW: a trait (and future ancillary) validator for RTW/M2TW
EDCT is pretty much identical, there are just a few different conditions and attributes. EDA changed the most.
What I'd really like is for the program to have a button that generated the enums files automatically. Unlike RTW, M2TW requires that it be updated for some reason.
-
Re: ATV-TW: a trait (and future ancillary) validator for RTW/M2TW
Quote:
Originally Posted by BozosLiveHere
EDCT is pretty much identical, there are just a few different conditions and attributes. EDA changed the most.
What I'd really like is for the program to have a button that generated the enums files automatically. Unlike RTW, M2TW requires that it be updated for some reason.
erm, what happens if you don't? Am slightly confused by that as we have some additions to traits and ancs, for a Kingdoms mod that seem to work fine without touching the enums....
Malrubius's older version of a validator produced an enums type list, have you tried that on M2 ?
-
Re: ATV-TW: a trait (and future ancillary) validator for RTW/M2TW
I've also created an enum generator that I use with any trait changes I make for completeness, not because its really necessary. It should work for any file that has entries {randomstuff} in it, I've tried it with buildings as well as traits/ancillaries and not had any issues. If you'd like I can upload as well. I may toss in the ability to create the enum files as on option on the next release.
-
Re: ATV-TW: a trait (and future ancillary) validator for RTW/M2TW
Quote:
Originally Posted by Makanyane
erm, what happens if you don't? Am slightly confused by that as we have some additions to traits and ancs, for a Kingdoms mod that seem to work fine without touching the enums....
Malrubius's older version of a validator produced an enums type list, have you tried that on M2 ?
Hmm. That's good to know. I relied on what I heard in the forums about the enums and didn't even try leaving them out. I had forgotten about this feature of Malrubius' tool as well, thanks.
-
Re: ATV-TW: a trait (and future ancillary) validator for RTW/M2TW
If all goes according to plan the next version of the ATVTW will work for both RTW and M2TW. I'm also working on allowing customization so that mod specific stuff (like settlements/buildings/etc) can be checked.
-
Re: ATV-TW: a trait (and future ancillary) validator for RTW/M2TW
off topic but hopeful question...
if you can make a mod specific version where you input buildings/settlements etc, would it be possible to do similar thing to typo check scripts?
-
Re: ATV-TW: a trait (and future ancillary) validator for RTW/M2TW
Possible yes, would I be able to do . . . I'm not sure. Part of what makes me able to successfully expand on what Tamur did is that I'm very familiar with the quirks of traits/ancillaries; however, I don't know a whole lot about scripting so it would make it quite a bit more difficult to do.
And in case I wasn't clear in my last, and when I re-read my post after seeing yours I don't think I was, the custom buildings/settlements/etc that I'm talking about are just the condition and excludedcultures checking. The current version either checks against a hardcoded list (cultures/factions) or doesn't check at all (settlements/buildings/units/etc) because it makes no sense to check against vanilla values.
-
Re: ATV-TW: a trait (and future ancillary) validator for RTW/M2TW
Could you make a similar thing fo descr_strat? That's where all of my bugs are
-
Re: ATV-TW: a trait (and future ancillary) validator for RTW/M2TW
Version 1.1 release - This is a minor bug-fix version of the validator while I complete the big 2.0 release of the validator.
Fixes:
- fixed faction name alemanni not being recognized as a valid faction
- fixed incorrect tokens for I_AgentType condition
- fixed religious_order not being recognized as a valid effect
- various and sundry other minor fixes I can no longer remember
UI Improvements:
- added Religious Order label to the interface for the trait and ancillary tabs
Downloads:
<<Removed links as this is an outdated version, see this post for the current version>>
-
Re: ATV-TW: a trait (and future ancillary) validator for RTW/M2TW
-
Re: ATV-TW: a trait (and future ancillary) validator for RTW/M2TW
Version 1.2 - I swore that 1.1 was the last update to 1.0 series of ATVTW but RedFox pointed to the XGM XC submod which had issues with a previous version, it led me to the first error. Dealing with that I found all the other errors, so here's another update, again bug fixes.
Bugs Fixed:
- Minimized the occurance of false positives (i.e. a reported error that isn't an error) if brackets are used in the name of an entry. This can't be totally fixed without a major rewrite, so I wasn't going to do that with version 2 on the way which already deals with the problem.
- Mismatched background colour of the lists to the background color of the program in most windows environemnts
- Duplicate ancillaries reporting the enum entry for the ancillary name is not defined in export_ancillaries.txt when the entry is defined (1st occurrence works as expected)
- Duplicate ancillaries not reporting they are duplicates if the entry for the ancillary name is not defined in export_ancillaries.txt (1st occurrence works as expected)
- Find Orphans only checking the second ancillary
- Find Orphans reporting duplicate traits/ancillaries as being orphaned (1st occurrence is treated correctly)
Improvements:
- Too many AntiTraits is no longer a parsing error
- Too many ExcludedAncillaries is no longer a parsing error
- Catches error in EDCT if you have more than 11 affects lines in a trigger
- Checks descr_strat for the existence of all assigned traits/ancillaries
- Catches error in a trait if you have an antitrait line with no traits listed
- Catches error in an ancillary if you have an excludedancillaries line with no ancillaries listed.
<<Removed links as this is an outdated version, see this post for the current version>>
-
Re: ATV-TW: a trait (and future ancillary) validator for RTW/M2TW
Thank you for the update Squid.
I still use it to check all the changes to ancillaries and traits in our AlexanderTW mod. Very useful tool. :)
-
Re: ATV-TW: a trait (and future ancillary) validator for RTW/M2TW
Version 1.3.1
Bugs Fixed:
- ATVTW would crash if either enum file had a { but no } on a line, ATVTW now reports the line as a parsing error
- Small typo in a message for missing description enum for ancillaries
Improvements:
- The descr_strat checker now checks to see if the trait is followed by a positive integer
- The descr_strat checker now checks if the level assigned is greater than the number of levels the trait has
Downloads:
Download from RapidShare
Download from FileFront
-
Re: ATV-TW: a trait (and future ancillary) validator for RTW/M2TW
Version 2.0.7
Requires: .Net Framework 3.5 or better
Changes from 1.x Versions:
This version of ATVTW is an almost total code rewrite from the previous version. I have pretty much gutted everything and redone it. The changes allow the code to be more reusable and easier to read, and will allow me to more easily add features to the program. A list of changes, hopefully complete, is:
- M2TW compatible, including all attributes, conditions, character types, common events, etc.
- Removed all instances of false positives for errors from the program
- Added checking for all building, units, religions, missions, paybacks, factions, cultures
- Checks settlement names against those found in the imperial_campaign/descr_strat.txt or barbarian_invasions/descr_strat.txt (if present)
- Fixed error where all character type is not reported as an error with the AgentType condition
- Changed UI to a toolstripbar UI instead of buttons (all functionality maintained)
- Added ability to generate export_descr_VnV_enums.txt and export_descr_ancillary_enums.txt
- Checks that the requirements of conditions are exported by the events in the trigger
- Form components will resize if the window is resized
- Will now report one parsing error per trait, ancillary or trigger as opposed to just the first parsing error found
- Added checks for more warnings, including duplicate cultures, excludedancillaries and antitraits
- Check for ancillary images has been added, this requires the file (export_descr_ancillary_images_enums.txt) to be in the data folder. The file export_descr_ancillary_images_enums.txt should contain one ancillary image (including file extension) per line. This can be generated by unpacking the ui folder and doing a directory listing on the data\ui\ancillaries directory and redirecting the output to a file.
- Settings are remembered between sessions
- Improved and more specific error messages for when there are an incorrect number of items/tokens on a line
- Checks that comma seperated lists are actually comma seperated (i.e. antitraits/excludedancillaries)
- Various other minor bug fixes and corrections
Until the download section is available again on the site get the current release from: http://www.twcenter.net/forums/downl...o=file&id=2657.
OK, this vesion has been out for a while over at TWCenter, but I've kept forgetting to post it here.