Metadata-Version: 2.4
Name: pymodcs
Version: 0.19.0
Summary: PyMod SDK for Counter-Strike 1.6: typed Python plugins and Russian/English API documentation
License-Expression: GPL-2.0-or-later
Keywords: pymod,counter-strike,cs16,rehlds,plugins,sdk
Classifier: Development Status :: 4 - Beta
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Operating System :: OS Independent
Classifier: Topic :: Games/Entertainment :: First Person Shooters
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Typing :: Typed
Classifier: Natural Language :: English
Classifier: Natural Language :: Russian
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: LINKING_EXCEPTION.txt
Dynamic: license-file

# pymodcs — PyMod SDK / SDK для PyMod

Write Python plugins for **Counter-Strike 1.6 / ReHLDS / ReGameDLL**.
The distribution is named **pymodcs**, the Python import is **pymod**.

```sh
python -m pip install pymodcs
```

```python
from pymod import Plugin, Player, command, Color, Position

class Welcome(Plugin):
    @command("hello")
    def hello(self, player: Player):
        player.message("Hello!", color=Color.Green())
        player.hud("Welcome!", position=Position.Top, color=Color.HEX("#6EE7C2"))
```

`from pymod import *` is supported too. PyCharm and other type-aware editors
can read bundled `.pyi` files and `py.typed`; no IDE extension is required.
Annotate callback arguments with `Player`, `DamageEvent`, etc. for reliable
completion in ordinary editors. No PyMod IDE plugin is needed.

## Русский

Пакет для **разработки** плагинов: API текущего ядра, подсказки параметров,
типы игроков и 155 хуков, документация методов на русском и английском.
Выберите в IDE тот интерпретатор, куда установили `pymodcs`.

Встроенная документация доступна через Ctrl+Q в PyCharm, `help()` и команду:

```sh
python -m pymod docs Player.hud --lang ru
python -m pymod docs hook_events.DamageEvent --lang en
python -m pymod new Welcome --output welcome.py --lang ru
```

Цвета, координаты, описания конфигов и ресурсов можно использовать в обычном
Python. Игровые действия (чат, игроки, оружие, SQLite плагина, хуки) требуют
**сервер с нативным ядром PyMod**. Вне сервера такие вызовы явно завершаются
`ServerRequiredError`, а не имитируют успешное выполнение.

Скопируйте созданный `.py` в `cstrike/addons/pymod/plugins/` своего сервера.
Пакет SDK не содержит сервер CS, DLL/SO, личные плагины, базы и ключи.
Не копируйте SDK поверх серверного ядра и не устанавливайте его через серверную
команду `pip install`: ядро уже предоставляет модуль `pymod`.
На сервере используется API 0.19.0 и встроенный Python 3.14 x86;
на рабочем компьютере SDK поддерживает Python 3.11+.

Для `import pymod` используйте отдельное виртуальное окружение: пакет с именем
`pymod` на PyPI принадлежит другому проекту и не должен стоять рядом с `pymodcs`.

## English

This is a **development SDK**, not a game server or an engine emulator.
It includes the current Python API, type information, all 155 hook classes,
RU/EN docstrings, and public teaching examples. Use the same interpreter in
your editor that you used for installation.

Colors, vectors, configuration descriptors and resource declarations work in
regular Python. Engine operations and plugin-owned storage require the native
PyMod server runtime. They raise `ServerRequiredError` outside the server.

```python
from pymod import Color, Position
print(Color.RGB(70, 220, 235).hex)  # #46DCEB
print(Position.percent(x=50, y=10))
help(Color.HEX)  # Russian and English documentation
```

Create a plugin with `python -m pymod new Welcome --output welcome.py --lang en`,
then copy it to `cstrike/addons/pymod/plugins/` on a PyMod server. Match the SDK
API version to your server. Do not install this SDK into the server's managed
dependencies or overwrite its Python package. Use an isolated virtual
environment without the unrelated PyPI distribution named `pymod`.

Full method signatures remain available in source and stubs. Docstrings show
both languages; the command-line reference can select `--lang ru` or `--lang en`.
Public guides and examples are included as `pymod/docs` and `pymod/examples`.

The source is GPL-2.0-or-later with the bundled HL Engine linking exception.
