Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The Lost Episodes of 2022 #45

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/events/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# PangYa Event Index
Many packets occur not because of a response or consequence of another packet,
but by a change in game state.

These pages exist primarily to organize the responses to these events together
and adding context and a timeline to often disparate packets.

## Events
[Tournament / Match Ending](/events/match_end.md)
24 changes: 24 additions & 0 deletions src/events/match_end.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Tournament / Match End

This event is triggered when all players in tournament/match have holed out or forfeit, and the tournament/match ends.

All matches and tournaments trigger the following packets:
* [GameService Client 0x0006 Match Statistics Submit](/packets/gameservice/client/0006.ksy),
* (unless this event has been triggered by [GameService Client 0x00aa Match Statistics Submit (Tiki Report)](/packets/gameservice/client/00aa.ksy))
* [GameService Server 0x0133 Treasure Point Result](/packets/gameservice/server/0133.ksy),
* (unless there are no items to give)
* [GameService Server 0x0134 Treasure Point Winnings](/packets/gameservice/server/0134.ksy),
* [GameService Server 0x0216 User Status Update](/packets/gameservice/server/0216.ksy),
* [GameService Server 0x022E Achievement Unlocked](/packets/gameservice/server/022e.ksy),
* [GameService Server 0x0220 Achievement Update](/packets/gameservice/server/0220.ksy),
* GameService Server 0x0244 Undocumented, and
* [GameService Server 0x00C8 Pang Balance](/packets/gameservice/server/00c8.ksy).

A match, but not a tournament, also triggers:
* [GameService Server 0x00FA Room Bonus Collectables Result](/packets/gameservice/server/00fa.ksy).

A tournament, but not a match, also triggers:
* [GameService Server 0x00CE Tournament Item Winnings](/packets/gameservice/server/00ce.ksy).

A match or tournament ending also triggers rejoining the waiting area for the room, thus:
* [GameService Server 0x004A Room Settings Announce](/packets/gameservice/server/004a.ksy).
43 changes: 43 additions & 0 deletions src/packets/common/user_caddie_data.ksy
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
meta:
id: user_caddie_data
title: User Caddie Data
encoding: ASCII
endian: le
imports:
- id_bank

doc: |
Oft-recurring format for communicating a user's in-game statistics to clients, including:
* [GameService Server 0x004B User Equipment Change Announce](/packets/gameservice/server/004b.ksy)
* [GameService Server 0x0071 User Caddie Roster](/packets/gameservice/server/0071.ksy)

If no caddie is specified (`roster_slot_caddie` and `item_id_caddie` are both 0), the remaining fields may contain garbage data.

**See Also**:
* [User Caddie Data](/packets/common/user_caddie_data.ksy)
* [User Character Data](/packets/common/user_character_data.ksy)
* [User Course Record Data](/packets/common/user_course_record_data.ksy)
* [User Course Result Data](/packets/common/user_course_result_data.ksy)
* [User Equipment Data](/packets/common/user_equipment_data.ksy)
* [User Name Data](/packets/common/user_name_data.ksy)
* [User Statistic Data](/packets/common/user_statistic_data.ksy)

seq:
- id: roster_slot_caddie
type: u4
doc: User-specific roster slot of the relevant caddie.
- id: item_id_caddie
type: u4
doc: From pangya_xx.iff/Caddie.iff. Item ID of the relevant caddie.
enum: id_bank::item_id_caddie
- id: unknown_user_caddie_data_a
size: 4
- id: caddie_level
type: u1
doc: Caddie's achieved level. Can be checked by right clicking on them in My Room.
- id: caddie_xp_amount
type: u4
doc: Caddie's earnt XP. Can be checked by right clicking on them in My Room.
- id: unknown_user_caddie_data_d
size: 8
7 changes: 6 additions & 1 deletion src/packets/common/user_character_data.ksy
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,18 @@ doc: |
Oft-recurring format for communicating a user's character data to clients, including:
* [Gameservice Server 0x0048 Room Census](/packets/gameservice/server/0048.ksy)
* [Gameservice Server 0x004B User Equipment Announce](/packets/gameservice/server/004b.ksy)
* [Gameservice Server 0x006B Equipment Response](/packets/gameservice/server/006b.ksy)
* [Gameservice Server 0x006B Equipment Update Response](/packets/gameservice/server/006b.ksy)
* [Gameservice Server 0x0070 User Character Roster](/packets/gameservice/server/0070.ksy)
* [Gameservice Server 0x015E User Information Equipment](/packets/gameservice/server/015e.ksy)
* [Gameservice Server 0x0168 User Information](/packets/gameservice/server/0168.ksy)

**See Also**:
* [User Caddie Data](/packets/common/user_caddie_data.ksy)
* [User Character Data](/packets/common/user_character_data.ksy)
* [User Course Record Data](/packets/common/user_course_record_data.ksy)
* [User Course Result Data](/packets/common/user_course_result_data.ksy)
* [User Equipment Data](/packets/common/user_equipment_data.ksy)
* [User Name Data](/packets/common/user_name_data.ksy)
* [User Statistic Data](/packets/common/user_statistic_data.ksy)

seq:
Expand Down
63 changes: 63 additions & 0 deletions src/packets/common/user_course_record_data.ksy
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
---
meta:
id: user_course_record_data
title: User Course Record Data
encoding: ASCII
endian: le
imports:
- id_bank

doc: |
Oft-recurring format for communicating a user's course records to clients, including:
* [GameService Server 0x0045 User Statistics](/packets/gameservice/server/0045.ksy)
* [GameService Server 0x015C User Course Records Response](/packets/gameservice/server/015c.ksy)

Its client-side counterpart is [User Course Result Data](/packets/common/user_course_result_data.ksy).

**See Also**:
* [User Caddie Data](/packets/common/user_caddie_data.ksy)
* [User Character Data](/packets/common/user_character_data.ksy)
* [User Course Record Data](/packets/common/user_course_record_data.ksy)
* [User Course Result Data](/packets/common/user_course_result_data.ksy)
* [User Equipment Data](/packets/common/user_equipment_data.ksy)
* [User Name Data](/packets/common/user_name_data.ksy)
* [User Statistic Data](/packets/common/user_statistic_data.ksy)

seq:
- id: course_id
type: s1
doc: ID of relevant course
enum: id_bank::course_id
- id: course_record_total_strokes
type: u4
doc: User's total strokes on this course, across all matches.
- id: course_record_total_putts
type: u4
doc: User's total putts on this course, across all matches.
- id: match_stat_holes
type: u4
doc: The number of holes played this match.
- id: unknown_user_course_record_d
type: u4
- id: unknown_user_course_record_e
type: u4
- id: unknown_user_course_record_f
type: u4
- id: match_stat_total_score
type: s4
doc: User's total score in this match.
- id: course_record_best_score
type: s1
doc: User's best score on this course for a 18-hole match. 0x7F (127) if not set.
- id: course_record_best_pang
type: u4
doc: User's best pang earnt on this course for a 18-hole match.
- id: unknown_user_course_record_j
size: 4
doc: Always 0x00?
- id: course_record_item_id_character
enum: id_bank::item_id_character
type: u4
doc: From pangya_xx.iff/Character.iff. User's best character on this course for an 18-hole match. 0 if not set.
- id: unknown_user_course_record_k
type: s1
79 changes: 79 additions & 0 deletions src/packets/common/user_course_result_data.ksy
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
---
meta:
id: user_course_result_data
title: User Course Result Data
encoding: ASCII
endian: le
imports:
- id_bank

doc: |
Oft-recurring format for reporting a user's hole or match statistics to the server, including:
* [GameService Client 0x0006 Match Statistics Submit](/packets/gameservice/client/0006.ksy)
* [GameService Client 0x0031 Hole Statistics Submit](/packets/gameservice/client/0031.ksy)
* [GameService Client 0x00AA Match Statistics Submit (Tiki Report)](/packets/gameservice/client/00aa.ksy)

Its server-side counterpart is [User Course Record Data](/packets/common/user_course_record_data.ksy).

**See Also**:
* [User Caddie Data](/packets/common/user_caddie_data.ksy)
* [User Character Data](/packets/common/user_character_data.ksy)
* [User Course Record Data](/packets/common/user_course_record_data.ksy)
* [User Course Result Data](/packets/common/user_course_result_data.ksy)
* [User Equipment Data](/packets/common/user_equipment_data.ksy)
* [User Name Data](/packets/common/user_name_data.ksy)
* [User Statistic Data](/packets/common/user_statistic_data.ksy)

seq:
- id: user_stat_strokes
type: u4
doc: Number of strokes (excluding putts) made during the match.
- id: user_stat_putts
type: u4
doc: Number of putts made during the match.
- id: unknown_user_course_result_data_c
size: 4
doc: Always 0?
- id: unknown_user_course_result_data_d_delta
type: u4
doc: Changes unknown_userdata_d in GSS-0045.
- id: user_stat_longest_drive
type: f4
doc: User's longest drive of the match.
- id: unknown_user_course_result_data_f
type: u4
- id: unknown_user_course_result_data_g
size: 8
- id: user_stat_distance
type: u4
doc: User's total distance travelled in the match. Calculated as the sum of floors of the straight-line distance between initial and final resting positions of the comet.
- id: user_stat_holes_played
type: u4
doc: Unconfirmed. Increments by 1 per hole played.
- id: unknown_user_course_result_data_j
size: 8
doc: Always 0?
- id: unknown_user_course_result_data_s
type: u2
- id: unknown_user_course_result_data_k
type: u4
- id: unknown_user_course_result_data_l
type: u4
- id: user_stat_holes_completed
type: u4
doc: Unconfirmed. Increments by 1 per hole completed. Battle matches can result in failing to hole out, for example, resulting in this number not incrementing.
- id: user_stat_holes_completed_by_putting
type: u4
doc: Unconfirmed. Increments by 1 per hole completed by putting. Chip-ins result in this number not incrementing.
- id: user_stat_longest_putt
type: f4
doc: User's longest successful putt of the match. 0 if no successful putts.
- id: user_stat_longest_chip
type: f4
doc: User's longest successful chip-in of the match. 0 if no successful chip-ins.
- id: unknown_user_course_result_data_q
type: s4
doc: 0xFFFFFFFF (-1) in VS matches and per-hole in tournaments, small positive values at end of tournaments.
- id: unknown_user_course_result_data_r
size: 161
doc: Always 0?
37 changes: 29 additions & 8 deletions src/packets/common/user_equipment_data.ksy
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,15 @@ doc: |
Oft-recurring format for communicating a user's equipment data to clients, including:
* [GameService Server 0x0044 Unknown](/packets/gameservice/server/0044.ksy)
* [GameService Server 0x0072 User Equipment](/packets/gameservice/server/0072.ksy)
* [GameService Server 0x0156 User Equipment Response](/packets/gameservice/server/0156.ksy)

**See Also**:
* [User Caddie Data](/packets/common/user_caddie_data.ksy)
* [User Character Data](/packets/common/user_character_data.ksy)
* [User Course Record Data](/packets/common/user_course_record_data.ksy)
* [User Course Result Data](/packets/common/user_course_result_data.ksy)
* [User Equipment Data](/packets/common/user_equipment_data.ksy)
* [User Name Data](/packets/common/user_name_data.ksy)
* [User Statistic Data](/packets/common/user_statistic_data.ksy)

seq:
Expand All @@ -34,19 +40,22 @@ seq:
doc: From pangya_xx.iff/Item.iff. Corresponds with the 10 slots available to the user. 0 if unused.
- id: inventory_slot_portrait_background
type: u4
doc: From GameService Server 0x0073 User Inventory. Equipped Portrait Background. 0 if unused.
doc: Inventory slot of equipped Portrait Background. 0 if unused.
- id: inventory_slot_portrait_frame
type: u4
doc: Unconfirmed. From GameService Server 0x0073 User Inventory. Equipped Portrait Frame. 0 if unused.
doc: Unconfirmed. Inventory slot of equipped Portrait Frame. 0 if unused.
- id: inventory_slot_portrait_sticker
type: u4
doc: From GameService Server 0x0073 User Inventory. Equipped Portrait Sticker. 0 if unused.
doc: Inventory slot of equipped Portrait Sticker. 0 if unused.
- id: inventory_slot_portrait_slot
type: u4
doc: From GameService Server 0x0073 User Inventory. Equipped Portrait Slot. 0 if unused.
- id: unknown_user_equipment_data_a
size: 8
doc: All 0?
doc: Inventory slot of equipped Portrait Slot. 0 if unused.
- id: inventory_slot_cut_in
type: u4
doc: Unconfirmed. Inventory slot of equipped Power Shot Cut-In. 0 if unused.
- id: inventory_slot_rank_banner
type: u4
doc: Unconfirmed. Inventory slot of equipped Rank Banner. 0 if unused.
- id: item_id_portrait_background
type: u4
doc: From pangya_xx.iff/Skin.iff. 0 if unused.
Expand All @@ -59,6 +68,18 @@ seq:
- id: item_id_portrait_slot
type: u4
doc: From pangya_xx.iff/Skin.iff. 0 if unused.
- id: item_id_cut_in
type: u4
doc: Unconfirmed. From pangya_xx.iff/Skin.iff. 0 if unused.
- id: item_id_rank_banner
type: u4
doc: Unconfirmed. From pangya_xx.iff/Skin.iff. 0 if unused. Banner displayed instead of rank.
- id: unknown_user_equipment_data_b
size: 20
size: 4
doc: All 0?
- id: item_id_furniture
type: u4
repeat: expr
repeat-expr: 2
doc: From pangya_xx.iff/Furniture.iff. 2 IDs in series. Appears to be posters. No idea why this is here.

71 changes: 71 additions & 0 deletions src/packets/common/user_name_data.ksy
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
---
meta:
id: user_name_data
title: User Name Data
encoding: ASCII
endian: le
imports:
- id_bank

doc: |
Oft-recurring format for communicating a user's display name and guild to clients, including:
* [Gameservice Server 0x0044 Unknown](/packets/gameservice/server/0044.ksy)
* [Gameservice Server 0x0157 User Name Response](/packets/gameservice/server/0157.ksy)

**See Also**:
* [User Caddie Data](/packets/common/user_caddie_data.ksy)
* [User Character Data](/packets/common/user_character_data.ksy)
* [User Course Record Data](/packets/common/user_course_record_data.ksy)
* [User Course Result Data](/packets/common/user_course_result_data.ksy)
* [User Equipment Data](/packets/common/user_equipment_data.ksy)
* [User Name Data](/packets/common/user_name_data.ksy)
* [User Statistic Data](/packets/common/user_statistic_data.ksy)

seq:
- id: room_id
type: u2
doc: Unconfirmed. 0xFFFF (-1) when not in room.
- id: username
type: strz
size: 22
doc: User's account name.
- id: user_nickname
type: strz
size: 22
doc: User's display name.
- id: guild_name
type: strz
size: 21
- id: guild_emblem_id
type: strz
size: 24
doc: Local user's guild's emblem ID. If present, for instance "13579ace", PNG image is downloaded over HTTP from (PangyaTH) 203.107.140.35:50008/_Files/GuildEmblem/13579ace.png
- id: connection_id
type: u4
doc: Unused in GSS-0157.
- id: unknown_user_name_data_a
size: 12
doc: All 0x00?
- id: unknown_user_name_data_b
type: u4
- id: unknown_user_name_data_c
size: 4
doc: All 0x00?
- id: unknown_user_name_data_d
type: u2
- id: unknown_user_name_data_e
size: 6
doc: All 0xFF?
- id: unknown_user_name_data_f
size: 16
- id: username_atnt
type: strz
size: 128
doc: |
Typically the local player's username, appended with "@NT".
Possibly some sort of email or messaging integration?
Occasionally this field is empty.
"faceb###############@NT" also witnessed, suggesting a link to Login-via-Facebook functionality.
- id: user_id
type: u4
doc: Unique ID representing the user.
Loading