Stunts Forum

Stunts - the Game => Stunts Related Programs => Topic started by: Duplode on January 28, 2024, 04:51:32 PM

Title: diffcar - compare CAR*.RES files
Post by: Duplode on January 28, 2024, 04:51:32 PM
I'm happy to announce the release of diffcar, a command line tool for comparing and detecting changes in CAR*.RES files. diffcar currently offers two commands. The first one is diffcar single, which takes a pair of CAR*.RES files and prints a nicely formatted, Stunts-aware diff of them:

(https://i.imgur.com/ko46GdV.png)

The second one is diffcar report which takes two directories and prints diffs of files with matching names (case insensitively) that exist in both of them. The output is printed to the terminal by default; you can specify a destination file instead with the -o option.

You can download Windows and Linux binaries from GitHub: https://github.com/duplode/diffcar/releases/tag/v0.1.0.0 . As ever, feedback is most welcome!
Title: Re: diffcar - compare CAR*.RES files
Post by: Cas on January 28, 2024, 08:23:19 PM
This is really good!  So the report would separate the list of differences by car ID, in the same format, right?  Very useful for somebody who's working on a car and needs to check without going back and forth between existing cars.

I still have to release a car of my own!
Title: Re: diffcar - compare CAR*.RES files
Post by: Duplode on January 28, 2024, 08:39:58 PM
Quote from: Cas on January 28, 2024, 08:23:19 PMSo the report would separate the list of differences by car ID, in the same format, right?

Yup: it prints the diffs in that format, separated by headers with the pair of file paths. Here's a sample:

------------------------------------------------------------------------
scr/CARSHML.RES
ryo/CARSHML.RES
------------------------------------------------------------------------

Car {gsna = "Shamal\NUL" /= "Sha\NUL", simd = Simd {carMass = 29 /= 34}}
------------------------------------------------------------------------
scr/CARSTOC.RES
ryo/CARSTOC.RES
------------------------------------------------------------------------

_
------------------------------------------------------------------------
scr/CART832.RES
ryo/CART832.RES
------------------------------------------------------------------------

Car
  { gsna = "Thema\NUL" /= "T832\NUL"
  , simd = Simd {carMass = 28 /= 30, brakingEff = 256 /= 285}
  }


Lately I've been using the tool to detect performance changes between different releases of cars, and it's been very helpful for that purpose.
Title: Re: diffcar - compare CAR*.RES files
Post by: Cas on January 29, 2024, 06:02:30 PM
Really convenient!  The only thing I had done in that regard was when Daniel3D asks me to auto-generate a spreadsheet with the car specs. Not sure where I left the program that generates that. But it's a lot better to be able to just select which cars and characteristics you want to compare, like you do here