Python for VC:MP Server Plugin
Project description
许可证
贡献
如果你有能力,你可以向我们的仓库提交 Pull Request 或 Issue。
开发进度
目前 master 是主分支, , 在修一些小问题,欢迎贡献rwir 分支上正在将进行 rust 重写的工作
lets RWIR!
注:目前
rwir分支合并成master分支,目前处于PreRelease版本(测试版),但目前的Release版本为1.2.10.6处于稳定状态
TODO
- 实现 NPC 插件(habi)的 bindings
- 实现 Exports 出来的 bindings
鸣谢
ysc3839 提供一些 Python 开发思路
shenjack 帮助解决一些很屎的代码,并且提供了一些参考代码
使用
如果你是 Linux 用户 (Docker)
docker run -d --name vcmp-python -v /path/to/your/server:/app -p 8192:8192 tianxiu2b2t/vcmp-python server
如果你是 Windows 用户
- pip 包安装
pip install vcmp-python-plugin
- 下载对应的 python 版本 dll 文件,或在 pip 包中寻找对应的 dll 文件
- 将 dll 文件放入你的 VCMP 服务器 plugins 文件夹中
- 修改 server.cfg 文件,添加以下内容
plugins python04rel64rspyo3py<python version>.dll
# 非必要不要开启……
# python_preloader false
python_script_path main.py
# 虚拟环境,比如 .venv/lib/python3.8/site-packages
# python_virtual_env
# 日志等级,默认 INFO
# python_log_level INFO
# 检查更新,默认为 true
# python check_update true
# 是否记录日志,默认为 false
# python_file_log
- 启动你的服务器
server.exe
示例脚本 (等有缘人提供)
main.py:
Build
- 安装 Python 和 rustc & cargo 依赖
- 进入目录
cargo build --release
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
vcmp_python_plugin-2.0.7.tar.gz
(82.9 MB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vcmp_python_plugin-2.0.7.tar.gz.
File metadata
- Download URL: vcmp_python_plugin-2.0.7.tar.gz
- Upload date:
- Size: 82.9 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
01933f9cab990d346bd52d4e1630c01c6634baab95762427c171fbb7b23ed807
|
|
| MD5 |
2848ee5580da00267583efb67107f9aa
|
|
| BLAKE2b-256 |
1e1a7a4025eee72e7148bb5604beeb97069dd2aa9a1960a8af75c5b401d481f3
|
File details
Details for the file vcmp_python_plugin-2.0.7-py3-none-any.whl.
File metadata
- Download URL: vcmp_python_plugin-2.0.7-py3-none-any.whl
- Upload date:
- Size: 83.6 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9cddf440da12d11affc93441d892e1adffb9af0f967ed2fd70a02f1fdb99e0f6
|
|
| MD5 |
da46f16517a3cd0fdf4fe3cb4d1c4fed
|
|
| BLAKE2b-256 |
a31f25a461af11a19e8ad55abb0b393c5e2347ab996b692653dde53ade142640
|