Repository navigation
API Raw game access
| Import | from proleak import advanced |
Raw access to the game, for what the event API does not cover.
| Class | |
|---|---|
Patch |
A Harmony patch owned by the plugin. |
| Returns | Function | |
|---|---|---|
Patch |
patch(target: str, pre: Callable | None = None, post: Callable | None = None) |
Patch "Namespace.Type:Method" with a Python prefix and/or postfix. |
object |
type(name: str) |
The .NET class name (for example "Assets.Api.UnitApi"), to call game APIs directly. |
patch needs the actions capability, so it works on local servers only, and refuses the
types of ProLeak and its mod loader. type hands out raw game classes and also works on local
servers only.
Names follow the game and change between game versions.
patch(target: str, pre: Callable | None = None, post: Callable | None = None) -> Patch
Patch "Namespace.Type:Method" with a Python prefix and/or postfix.
pre(instance, args) may return False to skip the original; post(instance, args, result) sees the return value.
type(name: str) -> object
The .NET class name (for example "Assets.Api.UnitApi"), to call game APIs directly.
Local servers only; raises NotAllowedHere elsewhere.
A Harmony patch owned by the plugin. Removed on unload or with remove.
| Returns | Method | |
|---|---|---|
None |
remove() |
Remove the patch now. |
remove() -> None
Remove the patch now.
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
- Cosmetics
- Game modes
- Game updates
- Publishing plugins
Reference