Skip to content

Commit

Permalink
Update patterns for 7.2 patch (#265)
Browse files Browse the repository at this point in the history
  • Loading branch information
xshobux authored Oct 23, 2024
1 parent 6d5240a commit 12673dc
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 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"\x6C\x73":
if npc_type == b"\x34\xD4":
data = "NPC"
elif npc_type == b"\xA4\x60":
elif npc_type == b"\x14\xC1":
data = "MONSTER"
elif npc_type == b"\x1C\x63":
elif npc_type == b"\xA4\xC3":
data = "AI_NAME"
else:
continue
Expand Down
22 changes: 11 additions & 11 deletions app/common/signatures.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,25 +177,24 @@
# - Party nameplates (don't confuse with party names on the right side of the screen)
# - Does not do the player's nameplate

# npc: 9C EB ?? ?? 00 00 00 00 00 00 00 00 00 00 00 00 ?? ?? ?? ?? 00 ?? ?? ?? ?? ?? ?? ?? 00 00 00 00 ?? 00 00 00 6C 73 ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? E?
# monster: 9C EB ?? ?? 00 00 00 00 00 00 00 00 00 00 00 00 ?? ?? ?? ?? 00 ?? ?? ?? ?? ?? ?? ?? 00 00 00 00 ?? 00 00 00 A4 60 ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? E?
# party: 9C EB ?? ?? 00 00 00 00 00 00 00 00 00 00 00 00 ?? ?? ?? ?? 00 ?? ?? ?? ?? ?? ?? ?? 00 00 00 00 ?? 00 00 00 1C 63 ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? E?
npc_monster_pattern = rb"\x9C\xEB..\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00....\x00.......\x00\x00\x00\x00.\x00\x00\x00[\x6C\xA4\x1C][\x73\x60\x63]..........[\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEF]"
# npc: 18 34 ?? ?? 00 00 00 00 00 00 00 00 00 00 00 00 ?? ?? ?? ?? 00 ?? ?? ?? ?? ?? ?? ?? 00 00 00 00 ?? 00 00 00 34 D4 ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? E?
# monster: 18 34 ?? ?? 00 00 00 00 00 00 00 00 00 00 00 00 ?? ?? ?? ?? 00 ?? ?? ?? ?? ?? ?? ?? 00 00 00 00 ?? 00 00 00 14 C1 ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? E?
# party: 18 34 ?? ?? 00 00 00 00 00 00 00 00 00 00 00 00 ?? ?? ?? ?? 00 ?? ?? ?? ?? ?? ?? ?? 00 00 00 00 ?? 00 00 00 A4 C3 ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? E?
npc_monster_pattern = rb"\x18\x34..\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00....\x00.......\x00\x00\x00\x00.\x00\x00\x00[\x34\x14\xA4][\xD4\xC1\xC3]..........[\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEF]"

# pattern for concierge names (13 bytes)
# 9C 58 ?? ?? ?? ?? ?? ?? 14 59 ?? ?? E?
concierge_name_pattern = rb"\x9C\x58......\x14\x59..[\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEF]"
# C0 B9 ?? ?? ?? ?? ?? ?? 50 C1 ?? ?? E?
concierge_name_pattern = rb"\xC0\xB9......\x50\xC1..[\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEF]"

# pattern for player names to rename. (49 bytes)
# 9C EB ?? ?? 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 E8 51 ?? 0? ?? ?? ?? ?? ?? ?? ?? 0? E?
player_name_pattern = rb"\x9C\xEB..\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\xE8\x51.[\x01\x02].......[\x01\x02][\xE3\xEF]"
# pattern for sibling names to rename. (52 bytes)
# 18 34 ?? ?? 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 B9 ?? 0? ?? ?? ?? ?? ?? ?? ?? 0? E?
player_name_pattern = rb"\x18\x34..\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\x28\xB9.[\x01\x02].......[\x01\x02][\xE3\xEF]"
# pattern for sibling names to rename. (52 bytes) (can't find a reliable one right now, will need to test more.)
# 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]"

# pattern for menu ai to rename. (58 bytes)
# 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? 00 ?? ?? 00 00 ?? ?? ?? ?? ?? 00 00 00 ?? 1? ?? ?? ?? ?? ?? 00 ?? ?? ?? ?? ?? 00 ?? ?? E?
# 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 00 00 00 00 00 00 00 00 58 1B 4F 01 00 00 00 00 00 00 00 00 00 00 01 00 E3
menu_ai_name_pattern = rb"\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00...........\x00..\x00\x00.....\x00\x00\x00.[\x1B\x1C].....\x00.....\x00..[\xE3\xEF]"

# pattern for comm_names.
Expand All @@ -207,7 +206,8 @@
# Main walkthrough text that loads on login. I can't figure out what function loads this on login,
# so scanning for this for now. AC is also preventing this from just being accessible via hooks. (17 bytes)
# 50 ?? ?? ?? 00 00 00 00 04 02 00 00 10 00 00 00 E?
walkthrough_pattern = rb"\x50...\x00\x00\x00\x00\x04\x02\x00\x00\x10\x00\x00\x00[\xE3\xE4\xE5\xE6\xE7\xE8\xE9]"
# 20 ?? ?? ?? 00 00 00 00 04 02 00 00 10 00 00 00 E?
walkthrough_pattern = rb"\x20...\x00\x00\x00\x00\x04\x02\x00\x00\x10\x00\x00\x00[\xE3\xE4\xE5\xE6\xE7\xE8\xE9]"

# player name in cutscenes. not used at the moment, but holding onto it for now.
# EF ?? 01 ?? ?? ?? ?? 3C EF ?? 01
Expand Down

0 comments on commit 12673dc

Please sign in to comment.