Repository navigation
Game updates
When the game updates before ProLeak does, ProLeak checks what it uses in the game against what it was built for. Anything that changed is off, and the rest runs as usual.
| Using something that is off | Raises |
|---|---|
| Subscribing to an event | EventUnavailable |
| Calling an action | ActionUnavailable |
Calling a feature (world, camera, chat...) |
FeatureUnavailable |
Each names what changed. The player can run a changed item anyway from
Mods > Advanced > Game version (see Troubleshooting).
ProLeak reads each plugin's source (outside vendor/) as the game starts, for what it uses from
proleak and for the event names it writes out, as in on("unit.died").
On a changed game, a plugin that uses something off is unavailable, and the Mods menu names the
use and what changed:
proleak.actions.hire needs actions.hire, which changed in game 26.10b
After the player runs the changed part anyway, reloading the plugin loads it.
A use counts for what it reaches; an import that is never used needs nothing:
| Code | Needs |
|---|---|
proleak.chat.say("hi") |
chat |
from proleak.actions import hire and hire(...)
|
actions.hire |
from proleak.game import version and version()
|
nothing |
getattr(actions, name), or actions passed or stored |
every action |
proleak passed or stored |
everything the package reaches |
When ProLeak cannot follow a use, it counts the whole module or package it came from.
An event name built at run time is not read. Subscribing to it fails on its own when the event is off, so a plugin can check first and do without:
from proleak import game, log, on
def show(ev):
log.info(ev.fields())
def watch(message):
name = f"net.in.{message}"
if game.available(name) is True:
on(name)(show)game.available(name) takes an event, an action (actions.hire) or a feature (world), and
returns True or the reason it is off.
Using ProLeak
Features
Tutorial
- Your first plugin
- Plugin basics
- Handling events
- Plugin settings
- User interface
- Players, units and game data
- Purchases, signals and pings
- Chat, camera, input and more
- Game assets
- Game modes
- Game updates
- Publishing plugins
Reference