Code Monkey home page Code Monkey logo

kriscris / palworld-pal-editor Goto Github PK

View Code? Open in Web Editor NEW
71.0 4.0 9.0 20.93 MB

Palworld Pal Editor, the tool for Adding, Deleting, and Modifying Pals (and unlocking Viewing Cage for multiplayer) for Palworld Game Save, supports running on Docker, GUI, WebUI, and Cli.

Home Page: https://www.nexusmods.com/palworld/mods/995

License: GNU General Public License v3.0

PowerShell 1.81% Python 59.06% Shell 1.61% Dockerfile 0.23% HTML 0.20% Vue 18.46% CSS 1.04% JavaScript 17.59%
docker palworld webui palworld-editor

palworld-pal-editor's Introduction

Palworld Pal Editor

English | 简体中文

GitHub Repo Stars  GitHub Release GitHub Repo Downloads 

Python  PyPI - Version  PyPI - Downloads 

Discord Server 

Star History Chart 

Supported Language

  • English | 日本語 | 简体中文

Note

If the UI isn't in your language, that means the UI I18n is missing. Your contribution is always welcomed!

But don't worry, all Pals and Skills are translated for the supported languages.

At the end of the day, you can always use Chrome translation, if you are running it in web mode. (You don't need to worry about translation messing up the data we write to the save, we are not using plain text.)

What is this?

A Palworld Pal Editor developed by _connlost with ❤️

(yeah i am just too lazy to change github username)

https://youtu.be/v9U60jj5Ugw

Note

Steam Palworld Local Save Dir: %localappdata%\Pal\Saved\SaveGames

Your Game Save Dir: %localappdata%\Pal\Saved\SaveGames\[Your Steam ID]\[Your GameSave ID]

This tool currently only supports the Steam version of Palworld, if you are playing the Xbox Game Pass version, you can look into these two tools for save format conversion:

Meanwhile, you are welcomed to submit a xbox game save, so that I can look into.

Important

Always backup your save in case corruption happens. (The tool does backup files for you.)

LET ME KNOW IF ANY BUG PRESENTS.

Screenshot

What This Tool Can Do

  • Spawn Pal
  • Duplicate Pal
  • Delete Pal
  • Show / Hide pals that are not in player pal containers (e.g. Pals in viewing cage, (or taken away by other players, prior Palworld v0.1.5))
  • Show (so you can delete them) / hide pals that are not displayed in game (Ghost Pals).
  • Unlock Viewing Cage for Selected player (multiplayer server)
  • List Players and Pals
  • Inspect Pal Stats
  • Change Pal Gender
  • Toggle BOSS / Rare / Tower
  • Change Pal NickName
  • Add / Remove Pal Learned Attacks
  • Add / Remove Pal Equipped Attacks
  • Change Pal Level / Exp
  • Change Pal Condenser Level
  • Change Pal Soul Levels
  • Change CharacterID (Pal Species)
  • Change Pal Passive Skills
  • Change Pal IV
  • Calculate MaxHP (MaxHP no longer stored in game save.)
  • Remove Pal Sicks
  • Revive Pals
  • Edit Food Buff Timer (Only if the pal has food buff, and cli only)

Usage

Note

You can always run the editor in a modern web browser, in case the GUI isn't working properly for you.

Alternatively you can find the version that uses Chromium here, which should hopefully fix all the GUI issues.

Option A. Use Pre-Built Binary

Just run the executable, you don't need to install Python.

Option B. Install via pip

  1. Make sure you have Python 3.11+
  2. pip install --upgrade palworld-pal-editor
  3. python -m palworld_pal_editor

Option C. Docker Container

  1. Download the compose file: ./docker/sample-docker-compose.yml.
  2. Rename it to docker-compose.yml, then configure it properly.
  3. Run docker compose up -d.

If you want to manually build it

  1. Clone the code.
  2. Copy ./docker/sample-docker-compose.yml to ./docker/docker-compose.yml, then do necessary modifications.
  3. Run ./build_and_run_docker.sh, or just manually run the commands if you are using Windows.

Option D. Directly Run the Code

  1. Install Python 3.11+ and node.js.
  2. Clone / Download the code
  3. In the project directory, run setup_and_run.ps1 for Windows Powershell, or setup_and_run.sh on Unix-like OS.
  4. In cli mode, You can change language by calling lang($LANG_CODE).

Optional Command-line Args

options:
  -h, --help           show this help message and exit
  --lang LANG          Language for the application. options: en, zh-CN, ja
  --path PATH          Path to the save folder.
  --mode MODE          Running Mode, options: cli, gui, web
  --port PORT          Port used for WebUI mode.
  --password PASSWORD  Password for WebUI.

Config File

Note

  1. There is no need for you to manually modify the config file.
  2. Command line arguments override config, and will be saved.

Default:

// config.json
{
    "i18n": "en",
    "mode": "web",
    "port": 58080,
    "path": null,
    "password": null,
    "JWT_SECRET_KEY": "X2Nvbm5sb3N0"
}

Custom:

// config.json
{
    "i18n": "zh-CN",
    "mode": "gui",
    "port": 12345,
    "path": "/path/to/save/folder",
    "password": "YOUR PASSWORD FOR WEBUI AUTH",
    "JWT_SECRET_KEY": "JUST SOME RANDOM TEXTS"
}

Videos

Important

These videos show you how to run the code. If you are using the pre-built executable, you can skip these part.

  • DOCKER
2024-03-03.13-29-42.mp4
  • GUI / WEB
Screen.Recording.2024-03-03.at.2.57.13.AM.mp4
  • CLI: (old, but you get the idea)
2024-02-25.14-49-22.mp4

Possible Roadmap? (NO ETA)

  • Improve WebUI (I am bad at frontend dev, sorry! Contribution appreciated.)
  • Real GUI, or maybe just a Terminal GUI using Textual.
  • Move Pal to Different Slots? Change owner? IDK...
  • More Stuff...

Contribution

  1. If you found a bug, or are looking for a feature, please check Issues first.
  2. If you want to contribute code, please check out the latest branch.
  3. Open a PR so everyone knows what you are working on.

Sponsor

ko-fi ❤️

Thanks


Why?

  1. I made the tool for my friends who spent time playing this game with me ❤.
  2. For practicing my 2-year untouched Python skills.
  3. Fun, I am just too boring these days.
  4. This guy had a really bad time fixing both his corrupted game save, and bugs of a similar tool.

palworld-pal-editor's People

Contributors

dependabot[bot] avatar kriscris avatar take-me1010 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

palworld-pal-editor's Issues

Docker image (docker.io/library/palworld-pal-editor) not being found, I'm using Portainer

Describe the bug
Portainer, for some reason, can't find the image and docker image pull docker.io/library/palworld-pal-editor also not working. I believe I posted all the screenshots needed.

Thank you for your time coding this project :)

To Reproduce
All I did was add the composer information to the container creation form. If I try to pull the image using the terminal, it's also not working.

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
image
image
image
image
image

Headless Linux server:

  • OS: Ubuntu 22.04.4 LTS (GNU/Linux 5.15.0-105-generic x86_64)
  • Portainer: Community Edition v2.19.4
  • Docker Engine - Community
    Engine:
    Version: 25.0.4
    API version: 1.44 (minimum version 1.24)
    Go version: go1.21.8
    Git commit: 061aa95
    Built: Wed Mar 6 16:32:12 2024
    OS/Arch: linux/amd64
    Experimental: false
  • containerd:
    Version: 1.6.28
    GitCommit: ae07eda36dd25f8a1b98dfbf587313b99c0190bb
  • runc:
    Version: 1.1.12
    GitCommit: v1.1.12-0-g51d5e94
  • docker-init:
    Version: 0.19.0
    GitCommit: de40ad0

Additional context

#sudo docker image pull docker.io/library/palworld-pal-editor
Using default tag: latest
Error response from daemon: pull access denied for palworld-pal-editor, repository does not exist or may require 'docker login': denied: requested access to the resource is denied

Add Search for Pal Selection

Is your feature request related to a problem? Please describe.
更改帕鲁种类时下拉框找帕鲁的方法实在不太友好,应该是按帕鲁序号排序的,我觉得可以按名称排序,最人性化设计应该是搜索框快速匹配选择

Describe the solution you'd like
image
在下拉框处添加输入框快速匹配帕鲁

Describe alternatives you've considered

Additional context

Blank Screen

I've installed the latest python, my save file is correctly entered in the config, I've tried running the .exe as administrator, I've tried running the port it was set to in Chrome, tried setting a password, tried forwarding the port it was set to. Just a blank screen.

I'm using Windows 10, latest version of the editor, latest python 3.12.2

Palworld-Pal-Editor 0.4.1.post2 on PyPi missing WebUI assets

Hi Thank you for the application.

However the pip and the latest main branch version doesnt work. it shows error 404 page.
image

how to reproduce

    pip install palworld-pal-editor
    python -m palworld_pal_editor

i notice the the assets are placed in this folder frontend/palworld-pal-editor-webui ?
but that folder is not the one pointed by the static_folder_path = Path(app.static_folder) in webui.py

running the docker version also fails, got "The connection was reset" on the browser
image

docker/docker-compose.yml file:

    version: '3.8'
    services:
      palworld-pal-editor:
        image: docker.io/library/palworld-pal-editor
        container_name: palworld-pal-editor
        # network_mode: host
        ports:
          - 12345:12345
        environment:
          - TZ=UTC
          - PUID=1000
          - PGID=1000
          - APP_PORT=12345 # make sure this matches the port you are going to map
          - APP_LANG=en-US
          - MODE=web # [cli, web, gui] You are not going to run gui in docker though... ;)
          - SAVE_PATH=/mnt/gamesave
          - PASSWORD=password # remove this env unless you want a password, but password is strongly recommended (for web mode).
        volumes:
          - "/tmp:/mnt/gamesave"

Help: WebUI and Remote Access

Screenshot
and the log file is here if needed
[Ubuntu Server 22.04 LTS 64bit]

I'm using the pre build artifact for ubuntu from the release page, and i installed pywebview things by following this guide but nothing changed, i can't 100% sure my installation is correct and complete because to be honest (and pretty obvious) i'm just officially so suck at this, maybe all i really need is just a working installation step, but i did try everything i could, please help!!

Best regards

MIME Type Error

Thank you for the application.

When I uses Palworld-Pal-Editor on pypi with web mode, it has an error "Failed to load module script..." in browser

To Reproduce
Steps to reproduce the behavior:

conda create -m testenv python==3.11
conda activate testenv
conda install pip
pip install palworld-pal-editor
python -m palworld_pal_editor --mode web

Expected behavior
it shows error in edge browser or chrome browser

Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/plain". Strict MIME type checking is enforced for module scripts per HTML spec.

Screenshots
Snipaste_2024-04-05_12-32-50.

Desktop (please complete the following information):

  • OS: win11
  • edge(123.0.2420.65,64-bit),chrome(123.0.6312.106 (Official Build) (64-bit))

Not working in Linux dedicated headless environment

Using docker-compose method in linux headless environment

palworld-editor  | Installing collected packages: darkdetect, customtkinter, palworld-pal-editor
palworld-editor  | Successfully installed customtkinter-5.2.2 darkdetect-0.8.0 palworld-pal-editor-0.2.1
palworld-editor  | Running command: python -i -m palworld_pal_editor --mode "web" --lang "en-US" --port "12345" --path "/mnt/gamesave" --password ""
palworld-editor  | 2024-03-04 14:42:11 [INFO] Logs written to /app/src/palworld_pal_editor/logs
**palworld-editor  | /app/src/palworld_pal_editor/cli.py:113: SyntaxWarning: invalid escape sequence '\g'**
palworld-editor  |   """
palworld-editor  | 2024-03-04 14:42:11 [ERROR] Exception caught on __main__: Object of type property is not JSON serializable
palworld-editor  | >>> 

I guess this happens because inside that logger.info method, the string contains at the last line \g
after removing it, palworld-editor | /app/src/palworld_pal_editor/cli.py:113: SyntaxWarning: invalid escape sequence '\g' disappears.

BUT I still get the
palworld-editor | 2024-03-04 14:42:11 [ERROR] Exception caught on main: Object of type property is not JSON serializable
right after the info message.

Permission Error Running on the Default Port

Describe the bug
Not sure if bug but seems to be a permission error

To Reproduce
Steps to reproduce the behavior:
i have Palworld-Pal-Editor in the same directory as the steam version of the game. Attempting to run the editor results in the following error code with the last line repeating.

2024-04-08 00:05:38 ←[32;20m[INFO]←[0m Logs written to D:\Games\Steam\steamapps\common\Palworld\logs 2024-04-08 00:05:38 ←[32;20m[INFO]←[0m Config file written to D:\Games\Steam\steamapps\common\Palworld\config.json 2024-04-08 00:05:38 ←[32;20m[INFO]←[0m i18n: en, mode: gui, port: 58080, path: None, password: None, JWT_SECRET_KEY: X2Nvbm5sb3N0 2024-04-08 00:05:38 ←[32;20m[INFO]←[0m Running Palworld-Pal-Editor version: 0.5.1 2024-04-08 00:05:38 ←[32;20m[INFO]←[0m Waiting for backend response... 2024-04-08 00:05:38 ←[32;20m[INFO]←[0m LISTENING ON 127.0.0.1:58080. Exception in thread Thread-1 (main): Traceback (most recent call last): File "threading.py", line 1073, in _bootstrap_inner File "threading.py", line 1010, in run File "palworld_pal_editor\webui.py", line 87, in main File "waitress\__init__.py", line 13, in serve File "waitress\server.py", line 78, in create_server File "waitress\server.py", line 243, in __init__ File "waitress\server.py", line 364, in bind_server_socket File "waitress\wasyncore.py", line 395, in bind PermissionError: [WinError 10013] An attempt was made to access a socket in a way forbidden by its access permissions 2024-04-08 00:05:40 ←[32;20m[INFO]←[0m Waiting for backend response...

Expected behavior
For the program to run and show off that beautiful GUI

Desktop (please complete the following information):

  • OS: Windows 10 Pro
  • Browser: Firefox 124.0.2 (I also have chrome installed)
  • Version 22H2, OS Build 19045.4170

Smartphone (please complete the following information): Unsure on relevancy

  • Device: Motorola G Stylus 2020
  • OS: Android 11
  • Browser: Firefox 124.2.0

Player Delete

Good evening,
Can you add a feature that allows us to delete players and their bases?
That would be great.

UI improvement

Is your feature request related to a problem? Please describe.
This is an amazing tool with exactly the features I need, but I was a little confused by the interface when I first used it. For example, the "Apply" button, which appears as a green checkmark surrounded by a light green background, means "checked" to me at first glance. And the selected item in the PLAYER LIST panel on the left appears gray while the unselected ones remain colored, which is counterintuitive and was the opposite of the PAL LIST.

Describe the solution you'd like
Perhaps a more common and consistent interface would improve usability.

Save editing presets

hope to customize some preset skills, registrations, combat power, etc., so that they can be quickly applied to other palu in the future

PW v0.2.0.6 ( Bellanoir + Variant can be added but not edited)

Describe the bug
New Raid Pal "Bellanoir" can be added via "add pal" but can't be edited if already caught.

To Reproduce
Steps to reproduce the behavior:

  1. Open Save '...'
  2. Scroll down to '....'
  3. See error

Expected behavior
Bellanoir to appear in list for BASE PAL or Player Name

Screenshots
Screenshot 2024-04-04 212833
Screenshot 2024-04asd212923

Desktop (please complete the following information):

  • OS: Windows 11
  • Browser: Firefox

Additional context
Add any other context about the problem here.

Path not available when save the change.

Describe the bug
Successfully loaded my saves. I can see all my pals.
But when I changed the skills of my pal, the error occurred.
In the GUI, it says: writeSave - Error occured: Path not available?
In the terminal, it says: [WinError 3] 系统找不到指定的路径。

To Reproduce
Steps to reproduce the behavior:

  1. Change any part of a pal.
  2. Click on 'SAVE CHANGES'
  3. See error

Expected behavior
It should work without error.

Screenshots
1

Desktop (please complete the following information):

  • OS: Windows11 23H2
  • Version 23H2

Additional context
I'm not sure if it's my system's fault. But I've already enabled long path support. I've no idea how to fix that.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.