Changeset View
Changeset View
Standalone View
Standalone View
source/tools/entity/readme.md
# Checkrefs.pl | # Checkrefs.py | ||||
## Description | ## Description | ||||
This script checks the game files for missing dependencies, unused files, and for file integrity. If mods are specified, all their dependencies are also checked recursively. This script is particularly useful to detect broken actors or templates. | This script checks the game files for missing dependencies, unused files, and for file integrity. If mods are specified, all their dependencies are also checked recursively. This script is particularly useful to detect broken actors or templates. | ||||
## Requirements | ## Requirements | ||||
- Perl interpreter installed | - Python 3.6+ interpreter installed | ||||
- Dependencies: | - dot (graphviz), for creationgraph.py | ||||
- XML::Parser | |||||
- XML::Simple | |||||
- Getopt::Long | |||||
- File::Find | |||||
- Data::Dumper | |||||
- JSON | |||||
## Usage | ## Usage | ||||
- cd in source/tools/entity and run the script. | - cd in `source/tools/entity` and run the script. | ||||
``` | ``` | ||||
Usage: perl checkrefs.pl [OPTION]... | usage: checkrefs.py [-h] [-u] [-x] [-t] [-m MOD [MOD ...]] | ||||
Checks the game files for missing dependencies, unused files, and for file integrity. | |||||
--check-unused check for all the unused files in the given mods and their dependencies. Implies --check-map-xml. Currently yields a lot of false positives. | Checks the game files for missing dependencies, unused files, and for file | ||||
--check-map-xml check maps for missing actor and templates. | integrity. | ||||
--validate-templates run the validate.pl script to check if the xml files match their (.rng) grammar file. This currently only works for the public mod. | |||||
--mod-to-check=mods specify which mods to check. 'mods' should be a list of mods separated by '|'. Default value: 'public|mod'. | optional arguments: | ||||
-h, --help show this help message and exit | |||||
-u, --check-unused check for all the unused files in the given mods and | |||||
their dependencies. Implies --check-map-xml. Currently | |||||
yields a lot of false positives. | |||||
-x, --check-map-xml check maps for missing actor and templates. | |||||
-t, --validate-templates | |||||
run the validator.py script to check if the xml files | |||||
match their (.rng) grammar file. This currently only | |||||
works for the public mod. | |||||
-m MOD [MOD ...], --mod-to-check MOD [MOD ...] | |||||
specify which mods to check. Default to public. | |||||
``` | ``` |
Wildfire Games · Phabricator