Skip to content
Source 2 SDK Generator
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
GeneratedExample Updated examples to the latest game version, added x64 examples Jul 19, 2016
GeneratedExample_x64 Updated examples to the latest game version, added x64 examples Jul 19, 2016
Source2Gen Better handling of threads Nov 16, 2017
.gitignore unordered_set in favor of vector for s_knownTypes Nov 16, 2017
CMakeLists.txt
LICENSE.md Update LICENSE.md Jul 9, 2015
README.md Added 64-bit support (class validity untested) Feb 24, 2016

README.md

Source2Gen

Source2Gen is an SDK generator for the Source 2 engine. It will generate C++ headers for many exposed classes and enumerators.

Thanks to the new Schema system within Source 2, many classes and enums are fully laid out. The Schema system exposes virtually every attribute about them. Due to this, the generated headers have an amazing amount of detail.

The 32-bit and 64-bit Windows versions of Dota 2 are supported.

Requirements

A DLL injector is required to use Source2Gen. This is not included.

CMake.

At least Visual Studio 2013 (or any compiler with C++11 support, only tested with VS2013 though)

Usage

Just inject Source2Gen.dll into dota2.exe (the only Source 2 game out right now) and it will generate headers in Source2Gen/bin.

Using the Generated Headers

The headers will work out of the box as long as everything in Source2Gen/shared is included and used in the project that uses the generated headers. This is because a few of the classes have function wrappers for static members. These functions need to use the Schema system to find the static member pointers at runtime.

Examples

The entirety of what Source2Gen will generate can be found in GeneratedExample.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.