saul / demofile-net

Blazing fast cross-platform demo parser library for Counter-Strike 2 and Valve's Deadlock, written in C#.
MIT License
111 stars 10 forks source link

How to generate updates to schema(s)? #101

Closed johnpyp closed 1 month ago

johnpyp commented 1 month ago

Research

Description

With the most recent Deadlock update, a new entity type (CAbility_Mirage_Teleport) has shown up which breaks demo parsing of the newest matches. As this repo hasn't quite been updated yet, I cloned locally and reran SchemaGen against an updated .dem. However, it looks like it first needs !GlobalTypes.json to be updated to work.

How can this file be generated? It would be great to document these steps too to help other users unblock themselves when there's breaking updates. I don't expect instant updates from you of course, but it'd be great to be able to fix it once I've hit it myself.

Code to reproduce

N/A

Affected demos

N/A

saul commented 1 month ago

The setup I have is a bit of a kludge, but I've documented it here at least: https://github.com/saul/demofile-net/blob/c999cd78346fd8d45b2161ea9944bbcca8cfafc0/UPDATING_SCHEMA.md

Note that the requisite CS2SchemaGen may not be the easiest to setup - unfortunately I'm not a C++ developer (and it's a fork of https://github.com/neverlosecc/source2gen). In an ideal world CS2SchemaGen would work on Linux, and then I could have new schemas be regenerated on a daily basis with Continuous Delivery.