What is Wolvenkit File Validation? How do I use it?
File validation was added in Wolvenkit 8.9.1. When you save a file, it will try to validate the internal structure and — based on your settings — dependent files.
The log will yell at you if your files have issues now
You just need to open
hook_settings.wscriptand change line 4 from
If you're here because of a link in the Wolvenkit console, there's nothing to worry about, your file saved fine! However, you've managed to run into something that the program isn't equipped to handle yet.
Please attach a minimal version of your project's source folder (we only need
archive, but all involved files have to be present, or we won't be able to reproduce your exact error).
You need to change the settings in
hook_settings.wscript. This is how you open it:
That will open the script editor panel, which looks like this:
You can toggle features on and off by switching values between
false. Be careful that you don't delete any commas!
In an ideal world, this wiki is always up-to-date with the existing source code. However, that doesn't happen automatically (and can't easily be made that way), and the Wolvenkit team focuses on fixing bugs and developing new features.
The most up-to-date documentation will always be in the source code. Read the comment blocks (green in the screenshot above) for a description of what a flag does.
Here, you will see a list of settings, which are documented in the next section.
File Validation will check if any given depot path exists, and warn you if the file could not be found.
This will give false positives if you're on the mod browser!
Enabledin line 4 will enable/disable file validation globally.
Each entry in the list has an individual
Enabledflag that lets you turn off validation for this particular type of file.
File validation can automatically correct certain errors for you. There are certain advanced use cases where you'd want to turn this off — if you don't know about them, then you'll probably want this.
Right now, this is set to
falseby default and affects the following toggles:
This is the reason behind the micro freeze each time you save a file. If it is enabled, then Wolvenkit will also look at included files — for example, if you save an .app file, it will collect all included meshes (via components or via root entity) and warn you about missing appearances.
You can disable this to save performance, but that will reduce file validation to a glorified typo checker for your file paths. Its developer strongly advises against it, as the feature has saved her hours of frustration already, and at the point of writing it hasn't even been released.
Checks if all animation names are unique. Since animations are targeted by name, this is the #1 reason why your mod will show the wrong animation.
Will warn you about duplicate animation names (e.g. animations 2 and 31 are both named "facepalm")
Checks all appearances and their associated
Will warn you about duplicate component names. Components are targeted by name, so they should be unique for each appearance or mesh entity.
inplaceResources can crash your game (it's complicated and has something to do with timing and async loading). This flag will toggle the check.
Will warn you if components with the same name are pointing to different meshes.
Will print a warning if you have cookedOverrides set in the root or in individual appearances. These things are the reason why mods such as cookedAppsNulled exist.
Assumes that entries are file paths. Will print a warning if the files can't be found.
Prints warnings for everything that doesn't look like it's a file path (by regular expression checking, there should be at least one slash)
Similar to the .app file, this will validate nested files, basically checking the entire ArchiveXL chain of dependencies.
This is really performant and will only look into each file once. That being said, the more files you pull in, the longer it takes, and you might want to disable this feature. On the other hand, saving the root entity is a great way to find out what exactly is broken about your ArchiveXL project.
Same as in the app file: will warn you about duplicate component names. Components are targeted by name, so they should be unique for each appearance or mesh entity.
Will print a warning that you might have forgotten to add a DynamicAppearances tag to your root entity if either of the following conditions is true:
- There are empty appearance names in your root entity
- Your .app partsOverrides appearance names or your mesh entity use dynamic string substitution
… since ArchiveXL won't work its magic if you haven't set the tag.
Will try to warn you about issues that will cause empty or incorrect strings to be displayed
This will warn you if any entries will overwrite each other due to shared key data.
Will check your mesh's internal material assignment. Will warn you about missing files, unresolved dependencies or errors with definitions and file types (some of which might potentially crash your game).
Will also check .mi files and their material setup, if you are using any.
Will warn you if two different multilayered materials are using the same .mlsetup file.
Will check the material setup.
Will check nested .mi files and their material setup, if you are using any.
Convenience: Will automatically set indices of defined animations for you. There are advanced use cases where you might not want this. If you don't know what they are, you might want to turn on autoReopenFile in addition to this.
More convenience: Automatically close and re-open the file after using
fixIndexOrder(instead of bothering you about it). Default is
Will warn you about animations in the included .anim files that aren't used by the workspot, in case you want to delete them.
Shows animations that you include in your workspot, but which aren't defined in any of the included .anims files.
Will warn you if the idle anim name deviates from the appearance anim name. This isn't strictly necessary, but since the idle anim name is displayed in the list, you will never find the right appearance otherwise.
Only triggers if you aren't using
fixIndexOrder: this will warn you about duplicate numeric ID assignments. These will cause the game to mix up your animations.
Checks the files included via
finalAnimSets, warning you about any loading errors (invalid file paths, invalid extensions, you forgot to add the entry to loadingHandles)