SmartReconnect is an experimental World of Tanks client mod intended to shorten recovery from a dead battle connection.
v0.1 is diagnostic-only. It does not disconnect or reconnect automatically.
The first build validates the same lag signal used by WoT's battle debug panel before any connection-changing action is enabled.
It polls:
BigWorld.statLagDetected()BigWorld.statPing()
Default behavior:
- Normal connection -> monitor remains idle.
- Lag indicator becomes red -> start a timer.
- Three consecutive valid healthy samples -> reset the timer. Unreadable samples break the healthy streak.
- Indicator remains red for 3 seconds -> write
WOULD RECONNECTtopython.log. - No network action is performed in diagnostic mode.
Ctrl+K is also detected as a manual reconnect request, but in diagnostic mode it only logs WOULD RECONNECT.
RED -> grace period -> goToLoginByDisconnectRQ() -> LOGIN state -> WGC login -> ongoing battle
The reconnect controller will use WoT's own gameplay and login services rather than terminating the process or manipulating sockets directly.
SmartReconnect/
├── README.md
├── .gitignore
├── meta.xml
├── build.sh
├── docs/
│ └── ARCHITECTURE.md
└── res/scripts/client/gui/mods/
├── mod_smartReconnect.py
└── smartReconnect/
├── __init__.py
├── Config.py
├── ConnectionMonitor.py
├── ReconnectController.py
└── SmartReconnect.py
Requires a Python 2 environment compatible with the WoT client mod pipeline plus zip and a POSIX shell.
./build.sh -v 0.1.0The result is written to the repository root as:
mewt0.smartReconnect_0.1.0.wotmod
Copy it into:
World_of_Tanks/mods/<current-game-version>/
Then inspect python.log for lines beginning with [SmartReconnect].
A successful first test should look roughly like this:
[SmartReconnect] battle monitor started
[SmartReconnect] RED started ping=...
[SmartReconnect] RED elapsed=1.0s ping=...
[SmartReconnect] RED elapsed=2.0s ping=...
[SmartReconnect] RED threshold reached elapsed=3.0s
[SmartReconnect] WOULD RECONNECT reason=auto-lag
Three consecutive healthy samples with a valid ping and a connected client reset the lag episode. A shorter GREEN blip does not rearm the detector. Diagnostic mode blocks both manual and automatic network actions.
Run python -B -m unittest discover -s tests -v with Python 2.7 (the payload runtime); Python 3 is also supported for offline tests. Tests validate callback deadlines, avatar lifecycle integration, diagnostic guards, recovery, and timeout cleanup. They do not replace validation against actual WoT gameplay/login interfaces.
The optional real reconnect path requires DIAGNOSTIC_MODE = False. Automatic requests additionally require AUTO_RECONNECT_ENABLED = True. Expected avatar teardown during a reconnect preserves the login watchdog; a failed return is bounded by timeouts.