RidersPyTools 0.0.2__py3-none-any.whl → 0.0.4__py3-none-any.whl

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.
@@ -68,7 +68,26 @@ class PlayerState(IntEnum):
68
68
  Unk1 = 0x18,
69
69
  Run = 0x19,
70
70
  StartLineShock = 0x1A,
71
- Unknown2 = 0x1B,
71
+ Unknown2 = 0x1B
72
+
73
+ class PlayerFlags(IntFlag):
74
+ none = 0,
75
+ WallGrind = 1 << 0,
76
+ Unknown = 1 << 2,
77
+ WallBonk = 1 << 5,
78
+ Unknown2 = 1 << 8,
79
+ OnTurbulence = 1 << 11,
80
+ TurbulenceLRExit = 1 << 14,
81
+ RaceWin = 1 << 19,
82
+ ItemBoxCooldown = 1 << 21,
83
+ InAPit = 1 << 25,
84
+
85
+ class PlayerStatus(IntFlag):
86
+ NoStatus = 0,
87
+ BallAndChainStatus = 1 << 0,
88
+ MagnetStatus = 1 << 2,
89
+ InvincibilityStatus = 1 << 4
90
+
72
91
 
73
92
  class Player:
74
93
  def __getattr__(self, name):
@@ -193,6 +212,7 @@ class Player:
193
212
  self.dreamTrail_timer = GenericData(ptr_start_addr + 0x113, u8)
194
213
  self.exhaustTrailColor = GenericData(ptr_start_addr + 0x114, u32) # Uses RGBA class
195
214
  self.berserkerCooldown = GenericData(ptr_start_addr + 0x118, u8) # Uses RGBA class
215
+ self.gearActionByte = GenericData(ptr_start_addr + 0x119, u8) # Uses RGBA class
196
216
 
197
217
  # State unions (same addresses, different names)
198
218
  self.coverF_archetype = GenericData(ptr_start_addr + 0x11A, u8)
@@ -239,6 +259,9 @@ class Player:
239
259
  self.hyperSonic_totalLinkTimer = GenericData(ptr_start_addr + 0x87C, u32)
240
260
  self.SuperMetalFrameCounter = GenericData(ptr_start_addr + 0x87C, u32)
241
261
 
262
+ # ptr
263
+ self.boostEnd = GenericData(ptr_start_addr + 0x898, u32)
264
+
242
265
  self.boostDuration = GenericData(ptr_start_addr + 0x8AC, s32)
243
266
  self.lightBoard_flag = GenericData(ptr_start_addr + 0x8C0, u32)
244
267
 
@@ -280,6 +303,15 @@ class Player:
280
303
 
281
304
  self.speedAsInt = GenericData(ptr_start_addr + 0xABC, u32)
282
305
 
306
+ self.stageRotation = GenericData(ptr_start_addr + 0xAD0, f32)
307
+
308
+ # Flags for what a player can/cannot do.
309
+ self.abilityFlags = GenericData(ptr_start_addr + 0xB08, u32)
310
+
311
+ self.unkB24 = GenericData(ptr_start_addr + 0xB24, f32)
312
+ self.unkB28 = GenericData(ptr_start_addr + 0xB28, f32)
313
+ self.unkB2C = GenericData(ptr_start_addr + 0xB2C, f32)
314
+
283
315
  self.driftDirection = GenericData(ptr_start_addr + 0xB4C, f32)
284
316
  self.driftDashFrames = GenericData(ptr_start_addr + 0xB54, s32)
285
317
  self.boostingAnimationID = GenericData(ptr_start_addr + 0xB7C, u32)
@@ -292,7 +324,7 @@ class Player:
292
324
  # Add flags for this class
293
325
  self.playerDisplayFlags = GenericData(ptr_start_addr + 0xBA8, u32)
294
326
 
295
- self.statusEffectFlags = GenericData(ptr_start_addr + 0xBA8, u32)
327
+ self.statusEffectFlags = GenericData(ptr_start_addr + 0xBB0, u32)
296
328
 
297
329
  self.stageProgress = GenericData(ptr_start_addr + 0xBC4, f32)
298
330
 
@@ -306,9 +338,9 @@ class Player:
306
338
 
307
339
  # Ptrs to attacking/who's attacked.
308
340
  # Needs their own structs.
309
- # self.attackedPlayer = GenericData(ptr_start_addr + 0xF38, u32)
310
- # self.attackingPlayer = GenericData(ptr_start_addr + 0xF3C, u32)
311
- # self.attackProperties = GenericData(ptr_start_addr + 0xF40, u32)
341
+ self.attackedPlayer = GenericData(ptr_start_addr + 0xF38, u32)
342
+ self.attackingPlayer = GenericData(ptr_start_addr + 0xF3C, u32)
343
+ self.attackProperties = GenericData(ptr_start_addr + 0xF40, u32)
312
344
 
313
345
  # This is an array of bytes:
314
346
  # 1st byte = ms, 2nd byte = sec, 3rd byte = min
@@ -318,6 +350,7 @@ class Player:
318
350
 
319
351
  self.reciproExtendTimer = GenericData(ptr_start_addr + 0x101A, u16)
320
352
  self.death_spawnPoint = GenericData(ptr_start_addr + 0x101E, u16)
353
+ self.index = GenericData(ptr_start_addr + 0x1029, u8)
321
354
  self.currentLap = GenericData(ptr_start_addr + 0x102A, u8)
322
355
  self.previousLap = GenericData(ptr_start_addr + 0x102B, u8)
323
356
  self.placement_counter = GenericData(ptr_start_addr + 0x102C, u8)
@@ -4,7 +4,7 @@ Contains all memory addresses from map/vanilla addresses fallback
4
4
 
5
5
  import dolphin_memory_engine as DME
6
6
  from .include.GenericData import GenericData
7
- from .include.GearStats import GearStats
7
+ # from .include.GearStats import GearStats
8
8
  from .include.Constants import *
9
9
  from .GameState import GAME_VERSION, RACESTATE_ID_TO_NAME, ALL_RACESTATES, RaceState
10
10
  from .Player import Player
@@ -88,15 +88,12 @@ class RidersObject:
88
88
  # Find a way to define literally EVERY SYMBOL here.
89
89
  # Not easy, but most are defined. Some are custom with pointers and structs. Good luck.
90
90
 
91
- # This is a hack that allows me to change where the addresses are.
92
- # This makes it easier to find while we're testing TE.
93
- # If no address found, use vanilla.
94
- # If you want this for TE, send in stageTimerAddr 0x8053C480
95
- # TE 2.4.6.1 currentStageAddr 0x8053C2E8
91
+ # This allows users to change where the addresses used for this class are.
92
+ # This makes it easier to find data while we're testing new TE changes due to the relocation of symbols.
93
+ # Use replacement values if they exist, else use default vanilla addresses.
94
+ addresses_to_use = default_general_addresses | replacement_values if replacement_values is not None else default_general_addresses
96
95
 
97
- addresses_to_use = default_general_addresses | replacement_values
98
-
99
- # This is 6 bytes long.
96
+ # This is 6 bytes long, due to it being a string of a specific length.
100
97
  self.gameID = GenericData(addresses_to_use["gameID"], 0x6)
101
98
 
102
99
  self.currentMode = GenericData(addresses_to_use["CurrentGameMode"], vu32)
@@ -107,8 +104,8 @@ class RidersObject:
107
104
  GenericData(addresses_to_use["StageTimer"] + 0x1, u8),
108
105
  GenericData(addresses_to_use["StageTimer"] + 0x2, u8)]
109
106
 
110
- # List of all players 1-4
111
- self.players = [Player(0 + idx) for idx in range(0,3)]
107
+ # List of all players 1-8
108
+ self.players = [Player(0 + idx) for idx in range(0,8)]
112
109
 
113
110
  INIT_STATE = False
114
111
  pass
@@ -10,8 +10,9 @@ BASE_ID: int = 8770000
10
10
  VANILLA_PLAYER_PTR: int = 0x80609440
11
11
 
12
12
  # NOTE: init player ptr for TE if detected using map file/map file passed in
13
- TE_PLAYER_PTR: int = 0x80532d80 # change to match the current ptr at time of release. Read main.map using map parser and change in config.py.
13
+ TE_PLAYER_PTR: int = 0x8054d160 # change to match the current version at time of release. Read main.map using map parser and change in config.py.
14
14
  # 2.4.6 fix 1 0x80532d80
15
+ # 3.0 0x8054d160
15
16
 
16
17
  ZG_PLAYER_PTR: int = 0x804970CC # Player 1, other players may not be sequential. Do more research for this.
17
18
 
@@ -79,6 +79,9 @@ class GenericData(OffsetAttr):
79
79
  other = getattr(other, "READ_FROM_DME")
80
80
  return getattr(self, "READ_FROM_DME") >= other
81
81
 
82
+ def __hex__(self):
83
+ return hex(getattr(self, "READ_FROM_DME"))
84
+
82
85
  def __int__(self):
83
86
  return int(getattr(self, "READ_FROM_DME"))
84
87
 
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.4
1
+ Metadata-Version: 2.5
2
2
  Name: RidersPyTools
3
- Version: 0.0.2
3
+ Version: 0.0.4
4
4
  Summary: Tools to read/write data and scripts for Sonic Riders (GC) & mods on dolphin
5
5
  Project-URL: Homepage, https://github.com/KidWizardOfTheWeb/RidersPyTools
6
6
  Project-URL: Issues, https://github.com/KidWizardOfTheWeb/RidersPyTools/issues
@@ -4,19 +4,19 @@ RidersPyTools_KC/DolphinProc.py,sha256=2ZNrUrZ-C0YxBlxkKU-_CUrIuDebGOrKitDPKdK1b
4
4
  RidersPyTools_KC/GameState.py,sha256=QBuBGZFVUU122_Xg7UDtne7N94WoEguUNKTW4lKxjfo,2504
5
5
  RidersPyTools_KC/Gears.py,sha256=SO4hROalYvmR3Qg_lJcHwJionk-8CnIFY9-2IlOf6FE,3463
6
6
  RidersPyTools_KC/MapParser.py,sha256=GZgq3Wlhpe4QFAFO9vnrMsupMc5Cbs4d5QMv-Zy0A8c,4613
7
- RidersPyTools_KC/Player.py,sha256=QhMrwlJKh9ybP1WcYVITfCsWG7bjpS_yc9r9Fg8KqDk,17602
8
- RidersPyTools_KC/RidersObject.py,sha256=5bLvjd8VlOl3AuR0nEFVQH_31LG2dnaKruQXoANUqt0,5632
7
+ RidersPyTools_KC/Player.py,sha256=gK-huBguyQRa6ImyJ26bC6vdPO7Eda6yNwHg0p3tmx0,18658
8
+ RidersPyTools_KC/RidersObject.py,sha256=4o0jXoFm1lLL2TKRpcNdVgTQM-cl4BRTNmC7GBBWd1Q,5725
9
9
  RidersPyTools_KC/Stages.py,sha256=vpMjvIpXXcKkpjMdXwgIqZ6eYO5HeqsLvNL5J0nWqoM,1199
10
10
  RidersPyTools_KC/__init__.py,sha256=URyRklqydZy7qXFhylgQS0la9vSn15UsUV888q8Uun4,22
11
11
  RidersPyTools_KC/config.py,sha256=n3gO4n7V_QLRmGXlYsVYN-XBBPmQFI4p6wwDz404NZs,1471
12
- RidersPyTools_KC/include/Constants.py,sha256=u4nzYt2pj_SUNEA5m01sbKmin52FPARK_rMXybRMh-Y,2642
12
+ RidersPyTools_KC/include/Constants.py,sha256=yiMxbmKAbXDK_bB7eO7V-w_PWFcxrehhHjtL_hU3Qio,2663
13
13
  RidersPyTools_KC/include/Controller.py,sha256=RZ8VfcqXEY4JdAHKxd_l-YoitVmO7AExRPxEFwhRGGc,4066
14
14
  RidersPyTools_KC/include/GearStats.py,sha256=7lRt9FUJgtCtBSDJ2Pt3h2_6hglL7W5HtxpDZpRdrhM,3763
15
- RidersPyTools_KC/include/GenericData.py,sha256=uPRamiEIYXOZuxZz5bBD37mKuY-MV6DK1XPQr2wfT5s,6746
15
+ RidersPyTools_KC/include/GenericData.py,sha256=90WvKdqrfxPimw-HkXWsC2b7q-RslcQNnTknDvcJTNk,6821
16
16
  RidersPyTools_KC/include/OffsetAttr.py,sha256=9lF262_1s1JFZc8cmRDz34Pwi1CDx3thVBQF0jKb0PU,921
17
17
  RidersPyTools_KC/include/Structs.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
18
18
  RidersPyTools_KC/include/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
19
- riderspytools-0.0.2.dist-info/METADATA,sha256=oKhZYEqSFhPA5I5R82NaChJo9bA8_4kZ-J8hqYfOcMY,2374
20
- riderspytools-0.0.2.dist-info/WHEEL,sha256=lCkmxWfQsSc9CfIClYeavTdQeEX2toPqufh9gI35EQA,87
21
- riderspytools-0.0.2.dist-info/licenses/LICENSE,sha256=2bm9uFabQZ3Ykb_SaSU_uUbAj2-htc6WJQmS_65qD00,1073
22
- riderspytools-0.0.2.dist-info/RECORD,,
19
+ riderspytools-0.0.4.dist-info/METADATA,sha256=fR7leaBT_QJrYX4Kn15nRXlIgYqmSvObjFXtKlGOSEY,2374
20
+ riderspytools-0.0.4.dist-info/WHEEL,sha256=2iZrJkDIkeDh0k9SikKMqFuRP-ua6mb4Ir1AsER4BEw,87
21
+ riderspytools-0.0.4.dist-info/licenses/LICENSE,sha256=2bm9uFabQZ3Ykb_SaSU_uUbAj2-htc6WJQmS_65qD00,1073
22
+ riderspytools-0.0.4.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: hatchling 1.31.0
2
+ Generator: hatchling 1.33.0
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any