Skip to content

Commit

Permalink
Fix/useless data docs (#42)
Browse files Browse the repository at this point in the history
* docs: upload mobile screenshot&&pst-agent link

* docs: update agent deployment
  • Loading branch information
zaigie authored Feb 1, 2024
1 parent 0465dc7 commit 7974209
Show file tree
Hide file tree
Showing 13 changed files with 250 additions and 24 deletions.
97 changes: 97 additions & 0 deletions README.agent.en.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
<h1 align='center'>pst-agent deployment</h1>

<p align="center">
<a href="/README.agent.md">简体中文</a> | <strong>English</strong>
</p>

### Linux

This refers to the scenario where your game server is a Linux version, and you want to deploy the pst main body elsewhere. For the deployment of the pst main body, refer to the previous [Installation and Deployment](./README.md#installation-and-deployment). The impact of pst-agent is only on the modification of the configuration file.

#### Download

Download the pst-agent tool, rename it, and ensure it's executable

```bash
# Download and rename
mv pst-agent_v0.5.0_linux_amd64 pst-agent
chmod +x pst-agent
```

#### Run

```bash
# ./pst-agent --port 8081 -f {Absolute path of the Level.sav save file}
# For example:
./pst-agent --port 8081 -f /home/lighthouse/game/Saved/0/S12ASNDDSAIF813412EERGH1EF134/Level.sav
```

After confirming it's running normally, run it in the background (it will continue to run after closing the ssh window)

```bash
# Run in the background and save logs in agent.log
nohup ./pst-agent --port 8081 -f ...{manually omitted}.../Level.sav > agent.log 2>&1 &
# View the log
tail -f agent.log
```

#### Open Firewall/Security Group

If pst-agent and pst main body are not in the same network group, you need to open the corresponding public network port of the game server (such as 8081, or other custom ports)

#### Configuration

Find the `config.yaml` file of **the pst main body (note, not the pst-agent!!!)** and modify it.

**You only need to modify `save: path`**

```yaml
...
save: # Configuration related to save file parsing
path: "http://{Public IP of the game server}:{port}/sync" # pst-agent service interface
...
...
```

Restart the pst main body to apply changes

#### Close Background Operation

```bash
kill $(ps aux | grep 'pst-agent' | awk '{print $2}') | head -n 1
```

### Windows

#### Download

Download the pst-agent tool and rename it, e.g., rename `pst-agent_v0.5.0_windows_x86.exe` to `pst-agent.exe`

#### Run

Press `Win + R`, type `powershell` to open Powershell, use the `cd` command to navigate to the directory of the downloaded executable

```powershell
# .\pst-agent.exe --port Access Port -f Save file Level.sav location
.\pst-agent.exe --port 8081 -f C:\Users\ZaiGie\...\Level.sav
```

![](./docs/img/windows_agent.png)

After successful operation, please keep the window open

#### Configuration

Find the `config.yaml` file of **the pst main body (note, not the pst-agent!!!)** and modify it.

**You only need to modify `save: path`**

```yaml
...
save: # Configuration related to save file parsing
path: "{http://Public IP of the game server}:{port}/sync" # pst-agent service interface
...
...
```

Restart the pst main body to apply changes
97 changes: 97 additions & 0 deletions README.agent.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
<h1 align='center'>pst-agent 部署</h1>

<p align="center">
<strong>简体中文</strong> | <a href="/README.agent.en.md">English</a>
</p>

### Linux

这里指的是,你的游戏服务器是 Linux 版本的,而你想在其它任何地方部署的 pst 本体依然参考前面的 [安装部署](./README.md#安装部署),pst-agent 对其的影响只是配置文件的修改。

#### 下载

下载 pst-agent 工具并重命名、确保其可执行

```bash
# 下载并重命名
mv pst-agent_v0.5.0_linux_amd64 pst-agent
chmod +x pst-agent
```

#### 运行

```bash
# ./pst-agent --port 8081 -f {Level.sav 存档所在绝对路径}
# 例如:
./pst-agent --port 8081 -f /home/lighthouse/game/Saved/0/S12ASNDDSAIF813412EERGH1EF134/Level.sav
```

检查正常运行后,让其后台运行(关闭 ssh 窗口后仍运行)

```bash
# 后台运行并将日志保存在 agent.log
nohup ./pst-agent --port 8081 -f ...{手动省略}.../Level.sav > agent.log 2>&1 &
# 查看日志
tail -f agent.log
```

#### 开放防火墙/安全组

如果 pst-agent 和 pst 本体完全没在同一组网内,需要放开游戏服务器的相应公网端口(如 8081,也可以是自定义的其它端口)

#### 配置

找到 **pst 本体(注意,不是 pst-agent!!!)**`config.yaml` 文件并修改。

**只需要修改其中的 `save: path`**

```yaml
...
save: # 存档文件解析相关配置
path: "http://游戏服务器公网IP:端口/sync" # pst-agent 服务接口
...
...
```

重启 pst 本体即可

#### 关闭后台运行

```bash
kill $(ps aux | grep 'pst-agent' | awk '{print $2}') | head -n 1
```

### Windows

#### 下载

下载 pst-agent 工具并重命名,如将 `pst-agent_v0.5.0_windows_x86.exe` 重命名为 `pst-agent.exe`

#### 运行

按下 `Win + R`,输入 `powershell` 打开 Powershell,通过 `cd` 命令到下载的可执行文件目录

```powershell
# .\pst-agent.exe --port 访问端口 -f 存档文件 Level.sav 所在位置
.\pst-agent.exe --port 8081 -f C:\Users\ZaiGie\...\Level.sav
```

![](./docs/img/windows_agent.png)

成功运行后请保持窗口打开

#### 配置

找到 **pst 本体(注意,不是 pst-agent!!!)**`config.yaml` 文件并修改。

**只需要修改其中的 `save: path`**

```yaml
...
save: # 存档文件解析相关配置
path: "http://游戏服务器公网IP:端口/sync" # pst-agent 服务接口
...
...
```

重启 pst 本体即可
48 changes: 30 additions & 18 deletions README.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,15 @@
</p>

<p align='center'>
<a href="#">
<img alt="GitHub Repo stars" src="https://img.shields.io/github/stars/zaigie/palworld-server-tool?style=for-the-badge">
</a>&nbsp;&nbsp;
<a href="#">
<img alt="Go" src="https://img.shields.io/badge/Go-00ADD8?style=for-the-badge&logo=go&logoColor=white">
</a>&nbsp;&nbsp;
<a href="#">
<img alt="Python" src="https://img.shields.io/badge/Python-FFD43B?style=for-the-badge&logo=python&logoColor=blue">
</a>&nbsp;&nbsp;
<a href="#">
<img alt="Vue" src="https://img.shields.io/badge/Vue%20js-35495E?style=for-the-badge&logo=vuedotjs&logoColor=4FC08D">
</a>&nbsp;&nbsp;
<img alt="GitHub Repo stars" src="https://img.shields.io/github/stars/zaigie/palworld-server-tool?style=for-the-badge">&nbsp;&nbsp;
<img alt="Go" src="https://img.shields.io/badge/Go-00ADD8?style=for-the-badge&logo=go&logoColor=white">&nbsp;&nbsp;
<img alt="Python" src="https://img.shields.io/badge/Python-FFD43B?style=for-the-badge&logo=python&logoColor=blue">&nbsp;&nbsp;
<img alt="Vue" src="https://img.shields.io/badge/Vue%20js-35495E?style=for-the-badge&logo=vuedotjs&logoColor=4FC08D">
</p>

![PC](./docs/img/pst-en-1.png)

The mobile interface is adapting
> The current mobile adaptation is good, you can view [Function Screenshot](#function-screenshot)
Features and roadmap based on parsing of `Level.sav` save files:

Expand All @@ -50,7 +42,11 @@ Due to limited maintenance and development staff, we welcome front-end, back-end
## Download

> [!CAUTION]
> The task of parsing `Level.sav` requires **significant system memory (often 4GB-6GB) in a short period (about 1-3min)** , this portion of memory is released after the parsing task is completed. Ensure your server has enough memory! If not, consider syncing the save files to your personal computer via [rsync](https://github.com/WayneD/rsync) for running.**The file synchronization Agent tool between the tool and the host will be develop later to achieve deployment separation.**
> The task of parsing `Level.sav` requires **significant system memory (often 4GB-6GB) in a short period (about 1-3min)** , this portion of memory is released after the parsing task is completed. Ensure your server has enough memory!
>
> If the conditions are not met and still needed, the `pst-agent` is deployed on the game server, and the `pst` is deployed on a PC or other server with enough memory to perform the parsing task.
>
> ==> [pst-agent deployment tutorial](./README.agent.en.md)
Download the latest executable files at:

Expand All @@ -60,11 +56,19 @@ Download the latest executable files at:

https://github.com/zaigie/palworld-server-tool/assets/17232619/42d4c5db-8799-4962-b762-ae22eebbfeb9

![](./docs/img/pst-en-2.png)
### Desktop

| | |
| :--------------------------: | :--------------------------: |
| ![](./docs/img/pst-en-2.png) | ![](./docs/img/pst-en-4.png) |

![](./docs/img/pst-en-3.png)

![](./docs/img/pst-en-4.png)
### Mobile

<p align="center">
<img src="./docs/img/pst-en-m-1.png" width="30%" /><img src="./docs/img/pst-en-m-2.png" width="30%" /><img src="./docs/img/pst-en-m-3.png" width="30%" />
</p>

## How to Enable RCON for Private Servers

Expand All @@ -82,13 +86,21 @@ Please **shut down the server before making modifications**. Set an AdminPasswor

## Installation and Deployment

Rimer believes that by **putting the pst tool and the game server on the same physical machine**, there are some situations where you might not want to deploy them on the same machine:

- Must be deployed separately on another server
- Only need to deploy on a local PC
- The game server performance is weak and not satisfied, using one of the above two schemes

Please refer to [pst-agent deployment tutorial](./README.agent.en.md)

### Linux

#### Download and Extract

```bash
# Download pst_{version}_{platform}_{arch}.tar.gz and extract to the pst directory
mkdir -p pst && tar -xzf pst_v0.4.2_linux_amd64.tar.gz -C pst
mkdir -p pst && tar -xzf pst_v0.5.0_linux_amd64.tar.gz -C pst
```

#### Configuration
Expand Down Expand Up @@ -162,7 +174,7 @@ Access at http://{Server IP}:8080 after opening firewall and security group in c

#### Download and Extract

Extract `pst_v0.4.2_windows_x86.zip` to any directory (recommend naming the folder `pst`).
Extract `pst_v0.5.0_windows_x86.zip` to any directory (recommend naming the folder `pst`).

#### Configuration

Expand Down
32 changes: 26 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

![PC](./docs/img/pst-zh-1.png)

移动端界面适配中
> 目前移动端适配良好,可查看下面 [功能截图](#功能截图)
基于 `Level.sav` 存档文件解析实现的功能及路线图:

Expand All @@ -42,7 +42,11 @@
## 下载

> [!CAUTION]
> 解析 `Level.sav` 存档的任务需要在**短时间(1-3 分钟)耗费较大的系统内存**(常常是 4GB~6GB),这部分内存会在执行完解析任务后释放,因此你至少需要确保你的服务器有充足的内存!若不满足条件仍需使用,你可以考虑在个人电脑上通过配置 [rsync](https://github.com/WayneD/rsync) 自动同步存档文件来运行。**后面会开发工具和主机之间的文件同步 Agent 工具,实现部署分离**
> 解析 `Level.sav` 存档的任务需要在**短时间(1-3 分钟)耗费较大的系统内存**(常常是 4GB~6GB),这部分内存会在执行完解析任务后释放,因此你至少需要确保你的服务器有充足的内存!
>
> 若不满足条件仍需使用,提供了 `pst-agent` 部署在游戏服务器,而将 `pst` 部署在 PC 或者其它有足够内存执行解析任务的服务器。
>
> ==> [pst-agent 部署教程](./README.agent.md)
请在以下地址下载最新版可执行文件

Expand All @@ -53,11 +57,19 @@

https://github.com/zaigie/palworld-server-tool/assets/17232619/7a861091-94ee-4efe-8274-15df261d50b4

![](./docs/img/pst-zh-2.png)
### 桌面端

| | |
| :--------------------------: | :--------------------------: |
| ![](./docs/img/pst-zh-2.png) | ![](./docs/img/pst-zh-4.png) |

![](./docs/img/pst-zh-3.png)

![](./docs/img/pst-zh-4.png)
### 移动端

<p align="center">
<img src="./docs/img/pst-zh-m-1.png" width="30%" /><img src="./docs/img/pst-zh-m-2.png" width="30%" /><img src="./docs/img/pst-zh-m-3.png" width="30%" />
</p>

## 如何开启私服 RCON

Expand All @@ -75,13 +87,21 @@ AdminPassword=...,...,RCONEnabled=true,RCONPort=25575

## 安装部署

这里**默认为将 pst 工具和游戏服务器放在同一台物理机上**,在一些情况下你可能不想要它们部署在同一机器上:

- 需要单独部署在其它服务器
- 只需要部署在本地个人电脑
- 游戏服务器性能较弱不满足,采用上述两种方案之一

**请参考 [pst-agent 部署教程](./README.agent.md)**

### Linux

#### 下载解压

```bash
# 下载 pst_{version}_{platform}_{arch}.tar.gz 文件并解压到 pst 目录
mkdir -p pst && tar -xzf pst_v0.4.2_linux_amd64.tar.gz -C pst
mkdir -p pst && tar -xzf pst_v0.5.0_linux_amd64.tar.gz -C pst
```

#### 配置
Expand Down Expand Up @@ -155,7 +175,7 @@ kill $(ps aux | grep 'pst' | awk '{print $2}') | head -n 1

#### 下载解压

解压 `pst_v0.4.2_windows_x86.zip` 到任意目录(推荐命名文件夹目录名称为 `pst`
解压 `pst_v0.5.0_windows_x86.zip` 到任意目录(推荐命名文件夹目录名称为 `pst`

#### 配置

Expand Down
Binary file added docs/img/pst-en-m-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/pst-en-m-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/pst-en-m-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/pst-zh-m-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/pst-zh-m-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/pst-zh-m-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/windows_agent.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
File renamed without changes.

0 comments on commit 7974209

Please sign in to comment.