Skip to content

Commit

Permalink
add notes for readme
Browse files Browse the repository at this point in the history
  • Loading branch information
magicbear committed Feb 13, 2024
1 parent fa0c8c6 commit e8b1da1
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 2 deletions.
4 changes: 3 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
graft palworld_server_toolkit/PalEdit/resources
graft palworld_server_toolkit/resources
prune palworld_server_toolkit/resources/items
prune palworld_server_toolkit/resources/pal_category
prune palworld_server_toolkit/resources/pal_inventory
11 changes: 11 additions & 0 deletions README.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ This tools is for cleanup the unreference item, rename the player name, migrate
- `CopyPlayer(old_uid,new_uid, backup_wsd)` - Copy the player from old PlayerUId to new PlayerUId `backup_wsd` is the OpenBackup file, `wsd` is current file
- `BatchDeleteUnreferencedItemContainers()` - Delete Unreference Item Containers
- `FixBrokenDamageRefItemContainer()` - Delete Damage Instance
- `FindInactivePlayer(day)` - Find player that <days> not active
- `Save()` - Save the file and exit


Expand Down Expand Up @@ -202,6 +203,16 @@ This tools is for cleanup the unreference item, rename the player name, migrate
Save()
```

- Clean the player that 7 days not online

1. Use interactive mode `python -i -m palworld_server_toolkit.editor Level.sav`
1. Execute following command
```
for player_uid in FindInactivePlayer(7): DeletePlayer(player_uid)
Save()
```



---

Expand Down
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ QQ群 139107098
- `CopyPlayer(old_uid,new_uid, backup_wsd)` - 复制玩家数据 `backup_wsd` 为OpenBackup备份文件 `wsd`为当前主文件
- `BatchDeleteUnreferencedItemContainers()` - 删除未引用的物品库
- `FixBrokenDamageRefItemContainer()` - 删除损坏对象
- `FindInactivePlayer(day)` - 找出<day>天未上线的玩家
- `Save()` - 保存修改并退出

### 操作示例
Expand Down Expand Up @@ -193,6 +194,15 @@ QQ群 139107098
Save()
```

- 清理7天未上线玩家

1. 使用编辑模式运行 `python -i -m palworld_server_toolkit.editor Level.sav`
2. 使用以下命令
```
for player_uid in FindInactivePlayer(7): DeletePlayer(player_uid)
Save()
```


---
## palworld-player-list
Expand Down
2 changes: 1 addition & 1 deletion palworld_server_toolkit/editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -2238,7 +2238,7 @@ def GetPlayerGvas(player_uid):
"-",
"") + ".sav"
if not os.path.exists(player_sav_file):
return player_sav_file, None, None, None
return player_sav_file, None, player_sav_file, None

with open(player_sav_file, "rb") as f:
raw_gvas, _ = decompress_sav_to_gvas(f.read())
Expand Down

0 comments on commit e8b1da1

Please sign in to comment.