MCPcopy Index your code
hub / github.com/ZyphrZero/palworld-python-script

github.com/ZyphrZero/palworld-python-script @v0.1.7

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.1.7 ↗ · + Follow
32 symbols 109 edges 9 files 7 documented · 22%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

palworld-python-script

✨ Suitable for palworld windows polling auto-restart server and auto-send shutdown notifications ✨

简体中文 / English

Special Thanks

https://github.com/VeroFess/PalWorld-Server-Unoffical-Api
This project uses the DLL injection provided by VeroFess, which allows us to send Chinese messages via RCON. We appreciate VeroFess's selfless sharing.

Main Features

  1. Polling task to restart the server
  2. Send shutdown countdown via RCON commands before server restart
  3. Customize the backup time of the archive
  4. Custom Polling for Sending Chinese RCON Announcements

Development Plan

  • [x] Added custom startup parameters
  • [x] Customized shutdown countdown notification content
  • [x] Added daemon process
  • [x] Switched rcon-cli client to third-party rcon library
  • [x] Memory usage percentage detection
  • [x] Countdown notification for restart when memory reaches threshold

Instructions for Use

  1. Download the latest installation package from Releases
    https://github.com/Cassianvale/palworld-python-script/releases
  2. There are two exe programs, one is task_scheduler.exe for polling, restarting daemon processes, etc., and the other is backup.exe for independent timed backup of archives. Both must be run in the same directory as the config.ini configuration file.
  3. Modify the config.ini configuration file. Detailed instructions are provided in the configuration file.
    img-01.png

Usage

  1. Ensure that you have Python environment version 3.10 or higher installed.
  2. Run the command pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple to install the dependencies.
  3. Run the Python script from the console python pyinstaller.py to package backup.exe, task_scheduler.exe, and config.ini.
  4. Configure config.ini and run it in the same directory as the exe program.
    For specific usage, please refer to the Feishu document
    https://cxqzok4p36.feishu.cn/docx/YxPtdYoqCo5PdfxSyNgcDfIwnwe

Thanks

rcon
https://github.com/conqp/rcon

Core symbols most depended-on inside this repo

start_program
called by 4
src/task_scheduler.py
send_rcon_command
called by 3
src/task_scheduler.py
close_process
called by 3
src/task_scheduler.py
add_symbol
called by 3
src/utils/log_control.py
is_palserver_running
called by 2
src/task_scheduler.py
send_shutdown_notice
called by 2
src/task_scheduler.py
remove_ds_store
called by 1
src/pyinstaller.py
package_scripts
called by 1
src/pyinstaller.py

Shape

Method 23
Function 5
Class 4

Languages

Python100%

Modules by API surface

src/task_scheduler.py17 symbols
tests/test_rcon.py4 symbols
src/utils/log_control.py4 symbols
src/backup.py4 symbols
src/pyinstaller.py2 symbols
src/read_conf.py1 symbols

For agents

$ claude mcp add palworld-python-script \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact