Skip to content

Commit

Permalink
Update patterns for 7.1.2 (#256)
Browse files Browse the repository at this point in the history
  • Loading branch information
xshobux authored Aug 7, 2024
1 parent 51b9001 commit 5f56be4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
6 changes: 3 additions & 3 deletions app/clarity.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,11 +192,11 @@ def scan_for_npc_names(monsters: dict, npcs: dict):
if npc_list := writer.pattern_scan(pattern=npc_monster_pattern, return_multiple=True, data_only=True):
for address in npc_list:
npc_type = writer.read_bytes(address + 36, 2)
if npc_type == b"\x78\x75":
if npc_type == b"\xEC\x74":
data = "NPC"
elif npc_type == b"\xB0\x62":
elif npc_type == b"\x14\x62":
data = "MONSTER"
elif npc_type == b"\x28\x65":
elif npc_type == b"\x88\x52":
data = "AI_NAME"
else:
continue
Expand Down
17 changes: 9 additions & 8 deletions app/common/signatures.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,18 +176,19 @@
# - Monster names appearing in the battle menu
# - Party nameplates (don't confuse with party names on the right side of the screen)
# - Does not do the player's nameplate
# npc: 64 2C 57 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 3F 00 00 00 00 00 00 00 00 00 00 00 00 78 75 38 01 80 B3 07 50 E8 5A 38 01 E3
# monster: 64 2C 57 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 42 51 00 00 00 00 00 00 00 00 00 00 00 00 B0 62 38 01 20 31 C2 33 E8 5A 38 01 E3
# party: 64 2C 57 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 28 65 38 01 D0 B1 9C 2E E8 5A 38 01 E3
npc_monster_pattern = rb"\x64\x2C..\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00....\x00.......\x00\x00\x00\x00.\x00\x00\x00[\x78\xB0\x28][\x75\x62\x65]..........[\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEF]"

# npc: 9C DE ?? ?? 00 00 00 00 00 00 00 00 00 00 00 00 ?? ?? ?? ?? 00 ?? ?? ?? ?? ?? ?? ?? 00 00 00 00 ?? 00 00 00 EC 74 ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? E?
# monster: 9C DE ?? ?? 00 00 00 00 00 00 00 00 00 00 00 00 ?? ?? ?? ?? 00 ?? ?? ?? ?? ?? ?? ?? 00 00 00 00 ?? 00 00 00 14 62 ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? E?
# party: 9C DE ?? ?? 00 00 00 00 00 00 00 00 00 00 00 00 ?? ?? ?? ?? 00 ?? ?? ?? ?? ?? ?? ?? 00 00 00 00 ?? 00 00 00 88 52 ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? E?
npc_monster_pattern = rb"\x9C\xDE..\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00....\x00.......\x00\x00\x00\x00.\x00\x00\x00[\xEC\x14\x88][\x74\x62\x52]..........[\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEF]"

# pattern for concierge names (13 bytes)
# AC 5A ?? ?? ?? ?? ?? ?? E8 5A ?? ?? E?
concierge_name_pattern = rb"\xAC\x5A......\xE8\x5A..[\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEF]"
# CC 5A ?? ?? ?? ?? ?? ?? C8 64 ?? ?? E?
concierge_name_pattern = rb"\xCC\x5A......\xC8\x64..[\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEF]"

# pattern for player names to rename. (49 bytes)
# 64 2C ?? ?? 00 00 00 00 00 00 00 00 00 00 00 00 ?? ?? ?? ?? 00 ?? ?? ?? 00 00 00 00 00 00 00 00 00 00 00 00 50 52 ?? 0? ?? ?? ?? ?? ?? ?? ?? 0? E?
player_name_pattern = rb"\x64\x2C..\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00....\x00...\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x50\x52.[\x01\x02].......[\x01\x02][\xE3\xEF]"
# 9C DE ?? ?? 00 00 00 00 00 00 00 00 00 00 00 00 ?? ?? ?? ?? 00 ?? ?? ?? 00 00 00 00 00 00 00 00 00 00 00 00 88 52 ?? 0? ?? ?? ?? ?? ?? ?? ?? 0? E?
player_name_pattern = rb"\x9C\xDE..\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00....\x00...\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x88\x52.[\x01\x02].......[\x01\x02][\xE3\xEF]"
# pattern for sibling names to rename. (52 bytes)
# 0? ?? 00 ?? 00 00 00 ?? ?? 00 02 ?? 00 ?? 00 ?? 00 00 00 00 00 ?? 00 ?? ?? 00 00 ?? ?? ?? 00 ?? 00 ?? ?? ?? 00 ?? 00 ?? ?? 00 00 00 00 ?? ?? 00 00 00 00 E?
sibling_name_pattern = rb"[\x01\x02].\x00.\x00\x00\x00..\x00\x02.\x00.\x00.\x00\x00\x00\x00\x00.\x00..\x00\x00...\x00.\x00...\x00.\x00..\x00\x00\x00\x00..\x00\x00\x00\x00[\xE3\xEF]"
Expand Down

0 comments on commit 5f56be4

Please sign in to comment.