Splatlogger 1.1.2__tar.gz → 1.2.0__tar.gz

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 (25) hide show
  1. {splatlogger-1.1.2/src/Splatlogger.egg-info → splatlogger-1.2.0}/PKG-INFO +61 -15
  2. {splatlogger-1.1.2 → splatlogger-1.2.0}/README.md +58 -13
  3. {splatlogger-1.1.2 → splatlogger-1.2.0}/pyproject.toml +4 -3
  4. {splatlogger-1.1.2 → splatlogger-1.2.0/src/Splatlogger.egg-info}/PKG-INFO +61 -15
  5. {splatlogger-1.1.2 → splatlogger-1.2.0}/src/Splatlogger.egg-info/requires.txt +1 -0
  6. {splatlogger-1.1.2 → splatlogger-1.2.0}/src/splatlogger/cemu_gecko.py +26 -0
  7. splatlogger-1.2.0/src/splatlogger/cli.py +193 -0
  8. splatlogger-1.2.0/src/splatlogger/enums.py +81 -0
  9. {splatlogger-1.1.2 → splatlogger-1.2.0}/src/splatlogger/match_logger.py +117 -64
  10. {splatlogger-1.1.2 → splatlogger-1.2.0}/src/splatlogger/resources/names.json +22 -0
  11. splatlogger-1.2.0/src/splatlogger/splatlogger.py +453 -0
  12. {splatlogger-1.1.2 → splatlogger-1.2.0}/src/splatlogger/tcpgecko.py +60 -8
  13. {splatlogger-1.1.2 → splatlogger-1.2.0}/src/splatlogger/tuples.py +28 -2
  14. {splatlogger-1.1.2 → splatlogger-1.2.0}/src/splatlogger/utility_functions.py +23 -60
  15. splatlogger-1.1.2/src/splatlogger/cli.py +0 -75
  16. splatlogger-1.1.2/src/splatlogger/enums.py +0 -33
  17. splatlogger-1.1.2/src/splatlogger/splatlogger.py +0 -345
  18. {splatlogger-1.1.2 → splatlogger-1.2.0}/LICENSE +0 -0
  19. {splatlogger-1.1.2 → splatlogger-1.2.0}/setup.cfg +0 -0
  20. {splatlogger-1.1.2 → splatlogger-1.2.0}/src/Splatlogger.egg-info/SOURCES.txt +0 -0
  21. {splatlogger-1.1.2 → splatlogger-1.2.0}/src/Splatlogger.egg-info/dependency_links.txt +0 -0
  22. {splatlogger-1.1.2 → splatlogger-1.2.0}/src/Splatlogger.egg-info/entry_points.txt +0 -0
  23. {splatlogger-1.1.2 → splatlogger-1.2.0}/src/Splatlogger.egg-info/top_level.txt +0 -0
  24. {splatlogger-1.1.2 → splatlogger-1.2.0}/src/splatlogger/__init__.py +0 -0
  25. {splatlogger-1.1.2 → splatlogger-1.2.0}/src/splatlogger/__main__.py +0 -0
@@ -1,7 +1,7 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: Splatlogger
3
- Version: 1.1.2
4
- Summary: PID (Principal ID)/Network ID grabber and match logger for Splatoon
3
+ Version: 1.2.0
4
+ Summary: PID Grabber and player/match information logging tool for Splatoon
5
5
  Author-email: Shadow Doggo <shadowdoggo@protonmail.com>
6
6
  License-Expression: MIT
7
7
  Project-URL: Source Code, https://codeberg.org/ShadowDoggo/Splatlogger
@@ -16,18 +16,20 @@ Requires-Dist: psutil
16
16
  Requires-Dist: pymemoryeditor>=2.0.0
17
17
  Requires-Dist: colorama
18
18
  Requires-Dist: clean-text
19
+ Requires-Dist: prompt_toolkit
19
20
  Dynamic: license-file
20
21
 
21
22
  # Splatlogger
22
- A CLI PID (Principal ID)/Network ID grabber and match logger for Splatoon, written in Python.
23
+ A PID Grabber and player/match information logging tool for Splatoon, supporting Wii U and Cemu*.
23
24
 
24
- Both the Wii U and Cemu (Windows & Linux, macOS not tested) are supported.
25
+ <sub>*Cemu support has only been tested on Windows and Linux, though macOS should work as well.</sub>
25
26
 
26
27
  - [Prerequisites (Wii U)](#prerequisites-wii-u)
27
28
  - [Usage](#usage)
28
29
  - [Running the executable](#running-the-executable)
29
30
  - [Running with Python](#running-with-python)
30
31
  - [Options](#options)
32
+ - [Configuration file](#configuration-file)
31
33
  - [Troubleshooting](#troubleshooting)
32
34
  - [Important notes](#important-notes)
33
35
  - [Building the executable with PyInstaller](#building-the-executable-with-pyinstaller)
@@ -82,23 +84,27 @@ python -m splatlogger --ip IP [options]
82
84
 
83
85
  ### Options
84
86
  - `-c [PID]`, `--cemu [PID]` - Switch to Cemu mode. The `--ip` argument is not required.
85
- - `PID` - PID of the Cemu process (optional).
87
+ - `PID` - Process ID of the Cemu process (optional).
86
88
 
87
89
  - `--log-level option` - Set how much data should be logged.
88
90
  - `none` - Don't create a log file.
89
91
  - `standard` - Log only basic player information, the same as what's printed to the console (default).
90
92
  - `extended` - Log all player information and additional match information.
91
- - `stats` - Same as above with the addition of player stats (points, K/D). Requires the match to end to finish logging; if it ends abruptly, the stats won't be logged.
93
+ - `stats` - Same as above with the addition of player stats (points, K/D, win/lose) and disconnect detection.
94
+ Requires the match to end to finish logging; if it ends abruptly, the stats won't be logged.
92
95
 
93
96
  - `--service` - Choose which network service you're using.
94
97
  - `none` - Disable fetching account info.
95
98
  - `pretendo` - Pretendo Network (default).
96
99
  - `spfn` - Splatfestival Network.
97
100
 
98
- - `-a [option]`, `--auto [option]` - Enable auto logging. When enabled will automatically log every match you play. The log level must be at least `standard`.
101
+ - `-a [option]`, `--auto [option]` - Enable auto logging. When enabled will automatically log every match you play.
102
+ Also allows you to view information about the lobby/gathering while on the matching screen.
99
103
  - `all` - Save a log of all matches you play (default).
100
104
  - `latest` - Save a log of only the latest match.
101
105
 
106
+ (These options don't affect anything if log level is set to `none`)
107
+
102
108
  - `--stack Address (in hex)` - (Cemu only, optional) Beginning address of the stack space for Default Core 1 (Debug > View PPC threads).
103
109
  Only required for logging stats. If the default values don't work, you'll need to specify this manually.
104
110
 
@@ -109,14 +115,51 @@ instead of creating a new one for each logging session (default behavior for `--
109
115
 
110
116
  - `-s`, `--silent` - Disable printing logs to the console.
111
117
 
112
- For example, `splatlogger --ip 192.168.1.100 --log-level extended --auto latest` will save an extended log of the latest match you play
113
- (replace `192.168.1.100` with your actual IP address).
118
+ For example, `splatlogger --ip 192.168.1.50 --log-level extended -a latest` will save an extended log of the latest match you play
119
+ (replace `192.168.1.50` with your actual IP address).
120
+
121
+ Logs are saved in your Documents folder in `Splatlogger/logs/`.
122
+
123
+ ### Configuration file
124
+ To avoid typing the same options every time, Splatlogger automatically creates a `config.toml` file in `Documents/Splatlogger/` on first launch.
125
+
126
+ You can edit this file to configure your default settings. Any command-line arguments you pass will override the settings in the config.
127
+
128
+ Example `config.toml`:
129
+ ```toml
130
+ # Splatlogger Configuration
131
+ # Uncomment and modify settings as needed. Command-line arguments will override these values.
132
+ # See the README for additional information.
133
+
134
+ # Target Wii U LAN IP address (omit if using Cemu)
135
+ ip = "192.168.1.50"
136
+
137
+ # Target network service: "pretendo", "spfn", or "none"
138
+ service = "pretendo"
139
+
140
+ # Log level: "standard", "extended", "stats", or "none"
141
+ log_level = "extended"
114
142
 
115
- Logs are saved in your documents folder in `Splatlogger/logs/`.
143
+ # Auto logging: "all", "latest" (omit for manual logging)
144
+ auto = "all"
116
145
 
117
- To always run with the same IP and options without having to type them in manually, create a `options.txt` file in
118
- `(User)/Documents/Splatlogger/` and put them in there.
119
- Afterward, run `splatlogger` without any arguments.
146
+ # Flags (true / false)
147
+
148
+ # Enable single log file mode
149
+ single_log = true
150
+
151
+ # Disable printing logs to the console
152
+ # silent = false
153
+
154
+ # Cemu mode settings
155
+
156
+ # Cemu process ID (set to -1 to find automatically)
157
+ # Uncomment this option to enable Cemu mode
158
+ # cemu = -1
159
+
160
+ # Beginning address of the stack space for Default Core 1 (set only if stat logging doesn't work by default)
161
+ # stack = "0xE101440"
162
+ ```
120
163
 
121
164
  ### Troubleshooting
122
165
  Only one program can be connected to TCPGecko at a time. If you have something else connected, disconnect it beforehand.
@@ -126,11 +169,14 @@ If it keeps failing to connect, make sure that:
126
169
  - Port 7331 isn't blocked by the firewall.
127
170
  - TCPGecko is running.
128
171
 
172
+ There's an issue with TCPGecko where opening an applet such as the Friend List and going back into the game causes memory
173
+ reads to fail. If auto-logging is enabled, you'll need to restart Splatlogger after returning to the game.
174
+
129
175
  For Cemu users on Linux, if you have ptrace protection enabled, you'll need to run Python as root.
130
176
  In that case, it's best to run the package from source or use the executable instead.
131
177
 
132
178
  ## Important notes
133
- - The data collected by Splatlogger is public player info shared by the game with every user you encounter in online matches.
179
+ - The data collected by Splatlogger is public player info shared by the game with every user you play with in online matches.
134
180
 
135
181
  - Network IDs and Mii names are fetched from the Pretendo or SPFN account server; this can be disabled with `--service none`.
136
182
 
@@ -162,7 +208,7 @@ replacing the placeholder paths with the actual ones.
162
208
  You can omit `--upx-dir` if you're not using UPX to compress the executable and `--optimize "2"` to disable
163
209
  bytecode optimization.
164
210
 
165
- On Linux, add `--bootloader-ignore-signals`
211
+ On Linux, add `--bootloader-ignore-signals` and remove `--upx-dir` and `--icon` as they are not supported.
166
212
 
167
213
  ## Acknowledgments
168
214
  - NWPlayer123 for the reference implementation of a TCPGecko library.
@@ -1,13 +1,14 @@
1
1
  # Splatlogger
2
- A CLI PID (Principal ID)/Network ID grabber and match logger for Splatoon, written in Python.
2
+ A PID Grabber and player/match information logging tool for Splatoon, supporting Wii U and Cemu*.
3
3
 
4
- Both the Wii U and Cemu (Windows & Linux, macOS not tested) are supported.
4
+ <sub>*Cemu support has only been tested on Windows and Linux, though macOS should work as well.</sub>
5
5
 
6
6
  - [Prerequisites (Wii U)](#prerequisites-wii-u)
7
7
  - [Usage](#usage)
8
8
  - [Running the executable](#running-the-executable)
9
9
  - [Running with Python](#running-with-python)
10
10
  - [Options](#options)
11
+ - [Configuration file](#configuration-file)
11
12
  - [Troubleshooting](#troubleshooting)
12
13
  - [Important notes](#important-notes)
13
14
  - [Building the executable with PyInstaller](#building-the-executable-with-pyinstaller)
@@ -62,23 +63,27 @@ python -m splatlogger --ip IP [options]
62
63
 
63
64
  ### Options
64
65
  - `-c [PID]`, `--cemu [PID]` - Switch to Cemu mode. The `--ip` argument is not required.
65
- - `PID` - PID of the Cemu process (optional).
66
+ - `PID` - Process ID of the Cemu process (optional).
66
67
 
67
68
  - `--log-level option` - Set how much data should be logged.
68
69
  - `none` - Don't create a log file.
69
70
  - `standard` - Log only basic player information, the same as what's printed to the console (default).
70
71
  - `extended` - Log all player information and additional match information.
71
- - `stats` - Same as above with the addition of player stats (points, K/D). Requires the match to end to finish logging; if it ends abruptly, the stats won't be logged.
72
+ - `stats` - Same as above with the addition of player stats (points, K/D, win/lose) and disconnect detection.
73
+ Requires the match to end to finish logging; if it ends abruptly, the stats won't be logged.
72
74
 
73
75
  - `--service` - Choose which network service you're using.
74
76
  - `none` - Disable fetching account info.
75
77
  - `pretendo` - Pretendo Network (default).
76
78
  - `spfn` - Splatfestival Network.
77
79
 
78
- - `-a [option]`, `--auto [option]` - Enable auto logging. When enabled will automatically log every match you play. The log level must be at least `standard`.
80
+ - `-a [option]`, `--auto [option]` - Enable auto logging. When enabled will automatically log every match you play.
81
+ Also allows you to view information about the lobby/gathering while on the matching screen.
79
82
  - `all` - Save a log of all matches you play (default).
80
83
  - `latest` - Save a log of only the latest match.
81
84
 
85
+ (These options don't affect anything if log level is set to `none`)
86
+
82
87
  - `--stack Address (in hex)` - (Cemu only, optional) Beginning address of the stack space for Default Core 1 (Debug > View PPC threads).
83
88
  Only required for logging stats. If the default values don't work, you'll need to specify this manually.
84
89
 
@@ -89,14 +94,51 @@ instead of creating a new one for each logging session (default behavior for `--
89
94
 
90
95
  - `-s`, `--silent` - Disable printing logs to the console.
91
96
 
92
- For example, `splatlogger --ip 192.168.1.100 --log-level extended --auto latest` will save an extended log of the latest match you play
93
- (replace `192.168.1.100` with your actual IP address).
97
+ For example, `splatlogger --ip 192.168.1.50 --log-level extended -a latest` will save an extended log of the latest match you play
98
+ (replace `192.168.1.50` with your actual IP address).
99
+
100
+ Logs are saved in your Documents folder in `Splatlogger/logs/`.
101
+
102
+ ### Configuration file
103
+ To avoid typing the same options every time, Splatlogger automatically creates a `config.toml` file in `Documents/Splatlogger/` on first launch.
104
+
105
+ You can edit this file to configure your default settings. Any command-line arguments you pass will override the settings in the config.
106
+
107
+ Example `config.toml`:
108
+ ```toml
109
+ # Splatlogger Configuration
110
+ # Uncomment and modify settings as needed. Command-line arguments will override these values.
111
+ # See the README for additional information.
112
+
113
+ # Target Wii U LAN IP address (omit if using Cemu)
114
+ ip = "192.168.1.50"
115
+
116
+ # Target network service: "pretendo", "spfn", or "none"
117
+ service = "pretendo"
118
+
119
+ # Log level: "standard", "extended", "stats", or "none"
120
+ log_level = "extended"
94
121
 
95
- Logs are saved in your documents folder in `Splatlogger/logs/`.
122
+ # Auto logging: "all", "latest" (omit for manual logging)
123
+ auto = "all"
96
124
 
97
- To always run with the same IP and options without having to type them in manually, create a `options.txt` file in
98
- `(User)/Documents/Splatlogger/` and put them in there.
99
- Afterward, run `splatlogger` without any arguments.
125
+ # Flags (true / false)
126
+
127
+ # Enable single log file mode
128
+ single_log = true
129
+
130
+ # Disable printing logs to the console
131
+ # silent = false
132
+
133
+ # Cemu mode settings
134
+
135
+ # Cemu process ID (set to -1 to find automatically)
136
+ # Uncomment this option to enable Cemu mode
137
+ # cemu = -1
138
+
139
+ # Beginning address of the stack space for Default Core 1 (set only if stat logging doesn't work by default)
140
+ # stack = "0xE101440"
141
+ ```
100
142
 
101
143
  ### Troubleshooting
102
144
  Only one program can be connected to TCPGecko at a time. If you have something else connected, disconnect it beforehand.
@@ -106,11 +148,14 @@ If it keeps failing to connect, make sure that:
106
148
  - Port 7331 isn't blocked by the firewall.
107
149
  - TCPGecko is running.
108
150
 
151
+ There's an issue with TCPGecko where opening an applet such as the Friend List and going back into the game causes memory
152
+ reads to fail. If auto-logging is enabled, you'll need to restart Splatlogger after returning to the game.
153
+
109
154
  For Cemu users on Linux, if you have ptrace protection enabled, you'll need to run Python as root.
110
155
  In that case, it's best to run the package from source or use the executable instead.
111
156
 
112
157
  ## Important notes
113
- - The data collected by Splatlogger is public player info shared by the game with every user you encounter in online matches.
158
+ - The data collected by Splatlogger is public player info shared by the game with every user you play with in online matches.
114
159
 
115
160
  - Network IDs and Mii names are fetched from the Pretendo or SPFN account server; this can be disabled with `--service none`.
116
161
 
@@ -142,7 +187,7 @@ replacing the placeholder paths with the actual ones.
142
187
  You can omit `--upx-dir` if you're not using UPX to compress the executable and `--optimize "2"` to disable
143
188
  bytecode optimization.
144
189
 
145
- On Linux, add `--bootloader-ignore-signals`
190
+ On Linux, add `--bootloader-ignore-signals` and remove `--upx-dir` and `--icon` as they are not supported.
146
191
 
147
192
  ## Acknowledgments
148
193
  - NWPlayer123 for the reference implementation of a TCPGecko library.
@@ -4,11 +4,11 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "Splatlogger"
7
- version = "1.1.2"
7
+ version = "1.2.0"
8
8
  authors = [
9
9
  { name="Shadow Doggo", email="shadowdoggo@protonmail.com" }
10
10
  ]
11
- description = "PID (Principal ID)/Network ID grabber and match logger for Splatoon"
11
+ description = "PID Grabber and player/match information logging tool for Splatoon"
12
12
  readme = "README.md"
13
13
  requires-python = ">=3.11"
14
14
  dependencies = [
@@ -17,7 +17,8 @@ dependencies = [
17
17
  "psutil",
18
18
  "pymemoryeditor>=2.0.0",
19
19
  "colorama",
20
- "clean-text"
20
+ "clean-text",
21
+ "prompt_toolkit"
21
22
  ]
22
23
  classifiers = [
23
24
  "Programming Language :: Python :: 3",
@@ -1,7 +1,7 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: Splatlogger
3
- Version: 1.1.2
4
- Summary: PID (Principal ID)/Network ID grabber and match logger for Splatoon
3
+ Version: 1.2.0
4
+ Summary: PID Grabber and player/match information logging tool for Splatoon
5
5
  Author-email: Shadow Doggo <shadowdoggo@protonmail.com>
6
6
  License-Expression: MIT
7
7
  Project-URL: Source Code, https://codeberg.org/ShadowDoggo/Splatlogger
@@ -16,18 +16,20 @@ Requires-Dist: psutil
16
16
  Requires-Dist: pymemoryeditor>=2.0.0
17
17
  Requires-Dist: colorama
18
18
  Requires-Dist: clean-text
19
+ Requires-Dist: prompt_toolkit
19
20
  Dynamic: license-file
20
21
 
21
22
  # Splatlogger
22
- A CLI PID (Principal ID)/Network ID grabber and match logger for Splatoon, written in Python.
23
+ A PID Grabber and player/match information logging tool for Splatoon, supporting Wii U and Cemu*.
23
24
 
24
- Both the Wii U and Cemu (Windows & Linux, macOS not tested) are supported.
25
+ <sub>*Cemu support has only been tested on Windows and Linux, though macOS should work as well.</sub>
25
26
 
26
27
  - [Prerequisites (Wii U)](#prerequisites-wii-u)
27
28
  - [Usage](#usage)
28
29
  - [Running the executable](#running-the-executable)
29
30
  - [Running with Python](#running-with-python)
30
31
  - [Options](#options)
32
+ - [Configuration file](#configuration-file)
31
33
  - [Troubleshooting](#troubleshooting)
32
34
  - [Important notes](#important-notes)
33
35
  - [Building the executable with PyInstaller](#building-the-executable-with-pyinstaller)
@@ -82,23 +84,27 @@ python -m splatlogger --ip IP [options]
82
84
 
83
85
  ### Options
84
86
  - `-c [PID]`, `--cemu [PID]` - Switch to Cemu mode. The `--ip` argument is not required.
85
- - `PID` - PID of the Cemu process (optional).
87
+ - `PID` - Process ID of the Cemu process (optional).
86
88
 
87
89
  - `--log-level option` - Set how much data should be logged.
88
90
  - `none` - Don't create a log file.
89
91
  - `standard` - Log only basic player information, the same as what's printed to the console (default).
90
92
  - `extended` - Log all player information and additional match information.
91
- - `stats` - Same as above with the addition of player stats (points, K/D). Requires the match to end to finish logging; if it ends abruptly, the stats won't be logged.
93
+ - `stats` - Same as above with the addition of player stats (points, K/D, win/lose) and disconnect detection.
94
+ Requires the match to end to finish logging; if it ends abruptly, the stats won't be logged.
92
95
 
93
96
  - `--service` - Choose which network service you're using.
94
97
  - `none` - Disable fetching account info.
95
98
  - `pretendo` - Pretendo Network (default).
96
99
  - `spfn` - Splatfestival Network.
97
100
 
98
- - `-a [option]`, `--auto [option]` - Enable auto logging. When enabled will automatically log every match you play. The log level must be at least `standard`.
101
+ - `-a [option]`, `--auto [option]` - Enable auto logging. When enabled will automatically log every match you play.
102
+ Also allows you to view information about the lobby/gathering while on the matching screen.
99
103
  - `all` - Save a log of all matches you play (default).
100
104
  - `latest` - Save a log of only the latest match.
101
105
 
106
+ (These options don't affect anything if log level is set to `none`)
107
+
102
108
  - `--stack Address (in hex)` - (Cemu only, optional) Beginning address of the stack space for Default Core 1 (Debug > View PPC threads).
103
109
  Only required for logging stats. If the default values don't work, you'll need to specify this manually.
104
110
 
@@ -109,14 +115,51 @@ instead of creating a new one for each logging session (default behavior for `--
109
115
 
110
116
  - `-s`, `--silent` - Disable printing logs to the console.
111
117
 
112
- For example, `splatlogger --ip 192.168.1.100 --log-level extended --auto latest` will save an extended log of the latest match you play
113
- (replace `192.168.1.100` with your actual IP address).
118
+ For example, `splatlogger --ip 192.168.1.50 --log-level extended -a latest` will save an extended log of the latest match you play
119
+ (replace `192.168.1.50` with your actual IP address).
120
+
121
+ Logs are saved in your Documents folder in `Splatlogger/logs/`.
122
+
123
+ ### Configuration file
124
+ To avoid typing the same options every time, Splatlogger automatically creates a `config.toml` file in `Documents/Splatlogger/` on first launch.
125
+
126
+ You can edit this file to configure your default settings. Any command-line arguments you pass will override the settings in the config.
127
+
128
+ Example `config.toml`:
129
+ ```toml
130
+ # Splatlogger Configuration
131
+ # Uncomment and modify settings as needed. Command-line arguments will override these values.
132
+ # See the README for additional information.
133
+
134
+ # Target Wii U LAN IP address (omit if using Cemu)
135
+ ip = "192.168.1.50"
136
+
137
+ # Target network service: "pretendo", "spfn", or "none"
138
+ service = "pretendo"
139
+
140
+ # Log level: "standard", "extended", "stats", or "none"
141
+ log_level = "extended"
114
142
 
115
- Logs are saved in your documents folder in `Splatlogger/logs/`.
143
+ # Auto logging: "all", "latest" (omit for manual logging)
144
+ auto = "all"
116
145
 
117
- To always run with the same IP and options without having to type them in manually, create a `options.txt` file in
118
- `(User)/Documents/Splatlogger/` and put them in there.
119
- Afterward, run `splatlogger` without any arguments.
146
+ # Flags (true / false)
147
+
148
+ # Enable single log file mode
149
+ single_log = true
150
+
151
+ # Disable printing logs to the console
152
+ # silent = false
153
+
154
+ # Cemu mode settings
155
+
156
+ # Cemu process ID (set to -1 to find automatically)
157
+ # Uncomment this option to enable Cemu mode
158
+ # cemu = -1
159
+
160
+ # Beginning address of the stack space for Default Core 1 (set only if stat logging doesn't work by default)
161
+ # stack = "0xE101440"
162
+ ```
120
163
 
121
164
  ### Troubleshooting
122
165
  Only one program can be connected to TCPGecko at a time. If you have something else connected, disconnect it beforehand.
@@ -126,11 +169,14 @@ If it keeps failing to connect, make sure that:
126
169
  - Port 7331 isn't blocked by the firewall.
127
170
  - TCPGecko is running.
128
171
 
172
+ There's an issue with TCPGecko where opening an applet such as the Friend List and going back into the game causes memory
173
+ reads to fail. If auto-logging is enabled, you'll need to restart Splatlogger after returning to the game.
174
+
129
175
  For Cemu users on Linux, if you have ptrace protection enabled, you'll need to run Python as root.
130
176
  In that case, it's best to run the package from source or use the executable instead.
131
177
 
132
178
  ## Important notes
133
- - The data collected by Splatlogger is public player info shared by the game with every user you encounter in online matches.
179
+ - The data collected by Splatlogger is public player info shared by the game with every user you play with in online matches.
134
180
 
135
181
  - Network IDs and Mii names are fetched from the Pretendo or SPFN account server; this can be disabled with `--service none`.
136
182
 
@@ -162,7 +208,7 @@ replacing the placeholder paths with the actual ones.
162
208
  You can omit `--upx-dir` if you're not using UPX to compress the executable and `--optimize "2"` to disable
163
209
  bytecode optimization.
164
210
 
165
- On Linux, add `--bootloader-ignore-signals`
211
+ On Linux, add `--bootloader-ignore-signals` and remove `--upx-dir` and `--icon` as they are not supported.
166
212
 
167
213
  ## Acknowledgments
168
214
  - NWPlayer123 for the reference implementation of a TCPGecko library.
@@ -4,3 +4,4 @@ psutil
4
4
  pymemoryeditor>=2.0.0
5
5
  colorama
6
6
  clean-text
7
+ prompt_toolkit
@@ -1,6 +1,10 @@
1
1
  # Splatlogger (c) 2025 Shadow Doggo.
2
2
 
3
+ from __future__ import annotations
4
+
3
5
  import struct
6
+ from types import TracebackType
7
+ from typing import Type
4
8
 
5
9
  import psutil
6
10
  from PyMemoryEditor import OpenProcess, ProcessIDNotExistsError # type: ignore[import-untyped]
@@ -25,6 +29,13 @@ class CemuGecko:
25
29
  if self._base_address == 0:
26
30
  raise CemuGeckoError("Could not find Cemu's Wii U memory space.")
27
31
 
32
+ def __enter__(self) -> CemuGecko:
33
+ return self
34
+
35
+ def __exit__(self, exc_type: Type[BaseException] | None, exc_val: BaseException | None,
36
+ exc_tb: TracebackType | None) -> None:
37
+ self.close()
38
+
28
39
  def close(self):
29
40
  """Close the process handle."""
30
41
  self._process.close()
@@ -57,6 +68,21 @@ class CemuGecko:
57
68
  def read_string(self, address: int, length: int = 1, encoding: str = "utf-8") -> str:
58
69
  return self.peek_raw(address, length).decode(encoding)
59
70
 
71
+ def resolve_pointer_chain(self, base_address: int, offsets: list[int]) -> int:
72
+ """Follow a pointer chain to its destination address starting from base_address and applying offsets."""
73
+ current_address = self.peek32(base_address)
74
+
75
+ for offset in offsets[:-1]:
76
+ if current_address == 0:
77
+ return 0
78
+
79
+ current_address = self.peek32(current_address + offset)
80
+
81
+ if current_address != 0 and offsets:
82
+ current_address += offsets[-1]
83
+
84
+ return current_address
85
+
60
86
  def _get_base_address(self) -> int:
61
87
  # Find Cemu's Wii U memory space and verify the pattern of bytes at the start of the game's memory.
62
88
  base_address = 0