rocketleaguesdk 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/README.md +152 -0
  2. package/classes/AkAudio.ts +577 -0
  3. package/classes/Core.ts +1559 -0
  4. package/classes/Engine.ts +23515 -0
  5. package/classes/GFxUI.ts +425 -0
  6. package/classes/IpDrv.ts +1902 -0
  7. package/classes/OnlineSubsystemEOS.ts +800 -0
  8. package/classes/ProjectX.ts +13294 -0
  9. package/classes/TAGame.ts +49959 -0
  10. package/classes/WinDrv.ts +110 -0
  11. package/classes/XAudio2.ts +15 -0
  12. package/classes/index.ts +19 -0
  13. package/constants/Core.ts +27 -0
  14. package/constants/Engine.ts +109 -0
  15. package/constants/IpDrv.ts +13 -0
  16. package/constants/ProjectX.ts +19 -0
  17. package/constants/TAGame.ts +78 -0
  18. package/constants/index.ts +14 -0
  19. package/enums/AkAudio.ts +121 -0
  20. package/enums/Core.ts +1528 -0
  21. package/enums/Engine.ts +3761 -0
  22. package/enums/GFxUI.ts +111 -0
  23. package/enums/IpDrv.ts +321 -0
  24. package/enums/OnlineSubsystemEOS.ts +25 -0
  25. package/enums/ProjectX.ts +593 -0
  26. package/enums/TAGame.ts +2586 -0
  27. package/enums/index.ts +17 -0
  28. package/examples/basic.ts +236 -0
  29. package/index.ts +33 -0
  30. package/package.json +100 -0
  31. package/parameters/AkAudio.ts +598 -0
  32. package/parameters/Core.ts +4062 -0
  33. package/parameters/Engine.ts +30205 -0
  34. package/parameters/GFxUI.ts +1282 -0
  35. package/parameters/IpDrv.ts +6486 -0
  36. package/parameters/OnlineSubsystemEOS.ts +3733 -0
  37. package/parameters/ProjectX.ts +23169 -0
  38. package/parameters/TAGame.ts +92073 -0
  39. package/parameters/WinDrv.ts +237 -0
  40. package/parameters/index.ts +18 -0
  41. package/structs/AkAudio.ts +115 -0
  42. package/structs/Core.ts +666 -0
  43. package/structs/Engine.ts +5185 -0
  44. package/structs/GFxUI.ts +117 -0
  45. package/structs/IpDrv.ts +601 -0
  46. package/structs/OnlineSubsystemEOS.ts +20 -0
  47. package/structs/ProjectX.ts +2110 -0
  48. package/structs/TAGame.ts +6273 -0
  49. package/structs/index.ts +17 -0
  50. package/tsconfig.json +28 -0
  51. package/types/core.ts +16 -0
  52. package/types/index.ts +8 -0
  53. package/types/offsets.ts +29 -0
package/README.md ADDED
@@ -0,0 +1,152 @@
1
+ # Rocket League TypeScript SDK
2
+
3
+ Auto-generated TypeScript type definitions for Rocket League's Unreal Engine 3 classes, structs, enums, and constants.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ bun add rocketleaguesdk bun-memory
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ This SDK provides type definitions for use with memory reading libraries like `bun-memory`. The types help you understand the structure of game objects in memory.
14
+
15
+ ```typescript
16
+ import Memory from 'bun-memory';
17
+ import type { Classes, Structs } from 'rocketleaguesdk';
18
+
19
+ // Connect to Rocket League
20
+ const rl = new Memory('RocketLeague.exe');
21
+
22
+ // Use the SDK types to understand memory layouts
23
+ // Example: Reading boost amount from a CarComponent_Boost_TA
24
+ // See: classes/TAGame.ts for the full type definition
25
+ ```
26
+
27
+ ## Understanding the Type Comments
28
+
29
+ Each property includes a comment with memory layout information:
30
+
31
+ ```typescript
32
+ export type UCarComponent_Boost_TA = UCarComponent_TA & {
33
+ MaxBoostAmount: number; // 0x032c (0x0004) [float]
34
+ CurrentBoostAmount: number; // 0x0338 (0x0004) [float]
35
+ };
36
+ ```
37
+
38
+ - `0x032c` - Offset from the start of the object in memory
39
+ - `0x0004` - Size of the property in bytes
40
+ - `[float]` - Native C++ type (helps choose the correct memory read method)
41
+
42
+ ### Native Type to Memory Method Mapping
43
+
44
+ | Native Type | Size | Memory Method |
45
+ |-------------|------|---------------|
46
+ | `int32` | 4 | `rl.i32()` |
47
+ | `uint32` | 4 | `rl.u32()` |
48
+ | `uint8` | 1 | `rl.u8()` |
49
+ | `uint64` | 8 | `rl.u64()` |
50
+ | `float` | 4 | `rl.f32()` |
51
+ | `FString` | 16 | Custom (pointer to wide string) |
52
+ | `FName` | 8 | `rl.i32()` for index |
53
+ | `FVector` | 12 | `rl.vector3()` |
54
+ | `TArray<T>` | 16 | Custom (pointer + count + capacity) |
55
+ | `SomeClass*` | 8 | `rl.uPtr()` |
56
+
57
+ ### Boolean Bitfields
58
+
59
+ UE3 packs multiple boolean properties into single `uint32_t` values. When you see multiple bools at the same offset with different bitmasks, they share a bitfield:
60
+
61
+ ```typescript
62
+ export type UGFxData_Nameplate_TA = UGFxDataRow_X & {
63
+ bHideFullNameplate: boolean; // 0x00bc (0x0004) [bool : 0x1]
64
+ bIsTargetLocked: boolean; // 0x00bc (0x0004) [bool : 0x2]
65
+ bInKnockoutGameMode: boolean; // 0x00bc (0x0004) [bool : 0x4]
66
+ bIsDistracted: boolean; // 0x00bc (0x0004) [bool : 0x8]
67
+ };
68
+ ```
69
+
70
+ To read a bitfield bool:
71
+ ```typescript
72
+ const bitfield = rl.u32(objectAddr + 0x00bcn);
73
+ const bHideFullNameplate = (bitfield & 0x1) !== 0;
74
+ const bIsTargetLocked = (bitfield & 0x2) !== 0;
75
+ const bInKnockoutGameMode = (bitfield & 0x4) !== 0;
76
+ ```
77
+
78
+ To write a bitfield bool:
79
+ ```typescript
80
+ let bitfield = rl.u32(objectAddr + 0x00bcn);
81
+ // Set bIsTargetLocked to true
82
+ bitfield |= 0x2;
83
+ // Set bIsTargetLocked to false
84
+ bitfield &= ~0x2;
85
+ rl.writeU32(objectAddr + 0x00bcn, bitfield);
86
+ ```
87
+
88
+ When a bool has `[bool : 0x1]` and is at a unique offset, it's a standalone `uint32_t` bool (not packed).
89
+
90
+ ## SDK Structure
91
+
92
+ ```
93
+ rocketleaguesdk/
94
+ ├── classes/ # UClass definitions (game objects)
95
+ │ ├── Core.ts
96
+ │ ├── Engine.ts
97
+ │ ├── TAGame.ts # Rocket League specific classes
98
+ │ └── ...
99
+ ├── structs/ # UStruct definitions (data structures)
100
+ │ ├── Core.ts
101
+ │ ├── Engine.ts
102
+ │ └── ...
103
+ ├── enums/ # UEnum definitions
104
+ │ ├── Core.ts
105
+ │ ├── Engine.ts
106
+ │ └── ...
107
+ ├── constants/ # UConst definitions
108
+ ├── parameters/ # Function parameter structs
109
+ ├── types/ # Core type definitions
110
+ └── index.ts # Main entry point
111
+ ```
112
+
113
+ ## Key Classes
114
+
115
+ ### TAGame Package (Rocket League)
116
+
117
+ - `UCarComponent_Boost_TA` - Boost component with current/max boost
118
+ - `UCarComponent_Dodge_TA` - Dodge/flip state
119
+ - `UCarComponent_Jump_TA` - Jump state
120
+ - `UBall_TA` - Ball object
121
+ - `UCar_TA` - Car object
122
+ - `UPRI_TA` - Player replication info
123
+ - `UGameEvent_Soccar_TA` - Match state
124
+
125
+ ### Engine Package (Unreal Engine)
126
+
127
+ - `UObject` - Base class for all objects
128
+ - `UActor` - Base class for placed objects
129
+ - `UPawn` - Base class for controllable entities
130
+ - `UPlayerController` - Player input handling
131
+
132
+ ## Finding Objects in Memory
133
+
134
+ The SDK types describe object layouts, but you need GObjects/GNames to find objects:
135
+
136
+ 1. **GObjects** - Global array of all UObject instances
137
+ 2. **GNames** - Global array of FName strings
138
+
139
+ See the `examples/` directory for working code examples.
140
+
141
+ ## Version Compatibility
142
+
143
+ This SDK was generated for a specific version of Rocket League. Game updates may change:
144
+ - Property offsets
145
+ - Class sizes
146
+ - New/removed properties
147
+
148
+ Regenerate the SDK after game updates using the generator tool.
149
+
150
+ ## License
151
+
152
+ MIT