. rage-lint - Validate RAGE metafiles

rage-lint (Lint RAGE .meta and .xml files)

Tired of invalid .meta files? Fear not, rage-lint will help you find the problem!

What it does:

This is a tool for developers to validate RAGE (GTA5’s game engine) .meta files against the game code. It is capable of:

  • Validating metafile structure
  • Identifying missing or invalid fields
  • Validating numeric and hex values for correctness
  • Automatic validation updates

What it supports:

  • Vehicle metafiles
  • Weapon metafiles
  • Literally everything else… to some degree

GitHub Repo

GitHub Action

Downloads / Releases


Latest Version - 0.0.4

  • Added a version checker, so you will be notified if a new version is available
  • Simplified the results output
Full Changelog

0.0.3

  • Support for ambiguous types in <Item type="CChildElement"> elements, you should see better validation results now
  • More formatting improvements
  • Added a -u / --update argument to force re-downloading the schema

0.0.2

  • Fixed a fatal error when running rage-lint.exe across different Windows drives

0.0.1

  • Initial release!

Usage

Run with GitHub Actions

If you have a public (or private) GitHub repository, you can easily run rage-lint to check your files on every commit, for free!

rage-lint-action · GitHub Marketplace

Running locally (easy way)

A prebuilt .exe is made available here:

rage-lint · GitHub Releases

Running locally (hard way)

To run the script directly, you will need Python 3.x installed on your local computer – then you can also clone the repository and follow the instructions in the README to install the Python dependencies.


Running rage-lint

rage-lint accepts a list of globs to process. So if you wanted to lint ALL .meta files, you would run it like so:

rage-lint.exe **/*.meta

To run both .meta and .xml files:

rage-lint.exe **/*.meta **/*.xml

This is experimental!

This is powered by GTA5.xsd, which is a really big generated XML schema so we can check metafiles against the game logic!

There may be issues with validation, please report any issues here so the validation can be fixed! If you have questions about the errors reported, feel free to also leave a comment here so it can be explained for others.

26 Likes

amazing work!

Very useful! I love it!

1 Like

This will make my work easier. Nice release!

3 Likes

You should verify your exe against the antivirus. VirusTotal

It’s a Python script made into an .exe, of course it will be flagged. If you don’t want to run it then don’t. :man_shrugging: You can always do it the hard way too, and run the script yourself.

1 Like

With the exe is it just the case of putting it into the GTA5 game folder and running, or can you have it run in any folder?

Do we need to install anything else to get it working as it just closes down when trying to run for me.

Apologies for being a noob.

Lucky for me. I have already python installed :grinning:

hi i got an issue where it says this
Traceback (most recent call last):
File “rage-lint.py”, line 33, in
File “ntpath.py”, line 703, in relpath
ValueError: path is on mount ‘C:’, start on mount ‘D:’
[27888] Failed to execute script rage-lint
do you know what the issue is and yes i have python installed.

You can place it anywhere, but it is a terminal application, so you will have to run it from the console (like cmd.exe or Powershell). If you want it to be available, you will have to place it in a directory that is in your Windows %PATH%.

For example, if you want to lint your resources:

  • cd to your resources/ directory
  • Run it like so:
C:\Path\To\rage-lint.exe **/*.meta
1 Like

This is a bug that will be fixed in the next update, all you should need to do is move the .exe to the same drive that your resources are on.

1 Like

i have it still doesn’t work.

Go ahead and try v0.0.2 which I just built, this should fix the issue.

1 Like

Good work, Goat! Thanks for this, gonna use it a lot!!!

1 Like

image
Works now looks like i got some stuff to fix.

2 Likes

Aw yes, goat. Here. have a heart :heart:

2 Likes

Finally I don’t have to smash my head anymore :relieved: Thanks for such a great tool :heart:

1 Like

Wow thank you!
smart and very useful

Excellent work, a very useful tool that will help greatly to fix countless hidden errors in meta files.

Edit : Not sure what’s on your plate in the future or if it even interests you, but do you believe some sort of tool that scrapes vehicle modkit IDs and lists duplicates is feasible ? Would be a godsend for people who made the big mistake of merging their meta files using broken tools (like myself hahah).

1 Like

Stop reading my mind. :wink:

I had plans for implementing this, but it would likely come after RDR2 support and some other fixes I need to do.

1 Like