top of page

Damage Tracker Framework

Background:

Damage Tracker Framework is a framework and API for Grand Theft Auto V modifications to receive C# damage events when NPCs take damage.

 

This was done by reverse-engineering the in-game damage tracking system to track values in memory to determine when an NPC has taken damage. This information was then serialized and passed between app domains using shared memory and deserialized into an event.​

Features:

  • Weapon Hash Categorized Lookup Table

  • Bone Regional Lookup Table

  • Complete Weapon Hash Enum

  • Complete Bone Enum

  • Cross-App Domain Events using Shared Memory

  • Easy to use API requiring only 4 lines of boilerplate to implement.

  • In-Game Realtime Damage Events

  • High Performance (0-1fps loss, compared to previous methods which saw a drop of 30-60fps for much lower levels of reliability)

Personal note:

Multiple modifications for Grand Theft Auto V now depend on this system as it is reliable, highly performant, and easy to use, while being lightweight.

This project was an interesting learning experience for me in areas of C# that I'd never heard of before this point, as well as gaining an insight into reverse engineering.

Learned:

  1. Reverse-Engineering basics

  2. Shared Memory

  3. C# unsafe programming (using pointers and memory address management in C#)

Tools Used

file_edited.jpg

IDA

rphlogo.png.bc8d50d2ae94ebe6d8556600ca11a5d7.png

Rage Plugin Hook

©2023 Variapolis

bottom of page