Coder Social home page Coder Social logo

palworld-server-unoffical-api's Introduction

PalWorld-Server-Unofficial-Api

Discord

PalWorld-Server-Unofficial-Api is a third-party PalWorld API with the goal of becoming a server-side development API similar to Minecraft Bukkit. The aim is to ensure that plugins do not require updates when the game version is upgraded.

The project is currently in very early development, and its code may undergo significant rewrites.

Currently, I am eager to hear everyone's opinions to decide on what features need to be added. Please share your ideas in the Issues section!

How to build

Windows

Step 1 - Download Visual Studio

Click the following link to go to the Visual Studio download page

Step 2 - Install Visual Studio and choose workload

At least, you should choose Desktop development with C++ and Universal Windows Platform development, If you don't know what the other options do, leave them as default.

Please wait for the installation process to complete before proceeding to the next step.

Step 3 - Install Rust

Click the following link to go to the Rust download page

Step 4 - Install xmake

Click the following link to go to the xmake release page, you should download the file which named xmake-master.win64.exe

Step 3 - Install Git for Windows

Click the following link to go to the Git download page

Step 5 - Clone this project

Choose an appropriate directory, such as D:\Codes

Open this directory in explorer

Hold Shift and right-click empty space in this folder and select "Open PowerShell Window Here" to open a PowerShell window.

Please execute the following commands step by step:

git clone https://github.com/VeroFess/PalWorld-Server-Unoffical-Api.git
cd PalWorld-Server-Unoffical-Api
git submodule update --init --recursive

There shouldn't be any errors in the above steps, the correct output should look like this:

Click to expand output details
PS D:\Codes> git clone https://github.com/VeroFess/PalWorld-Server-Unoffical-Api.git
Cloning into 'PalWorld-Server-Unoffical-Api'...
remote: Enumerating objects: 1098, done.
remote: Counting objects: 100% (1098/1098), done.
remote: Compressing objects: 100% (214/214), done.
remote: Total 1098 (delta 885), reused 1071 (delta 859), pack-reused 0
Receiving objects: 100% (1098/1098), 4.33 MiB | 4.57 MiB/s, done.
Resolving deltas: 100% (885/885), done.
PS D:\Codes> cd PalWorld-Server-Unoffical-Api
PS D:\Codes\PalWorld-Server-Unoffical-Api> git submodule update --init --recursive
Submodule '3rd/fmt' (https://github.com/fmtlib/fmt.git) registered for path '3rd/fmt'
Submodule '3rd/funchook' (https://github.com/kubo/funchook.git) registered for path '3rd/funchook'
Submodule '3rd/spdlog' (https://github.com/gabime/spdlog.git) registered for path '3rd/spdlog'
Submodule '3rd/wasmtime' (https://github.com/bytecodealliance/wasmtime.git) registered for path '3rd/wasmtime'
Submodule '3rd/zycore' (https://github.com/zyantific/zycore-c.git) registered for path '3rd/zycore'
Submodule '3rd/zydis' (https://github.com/zyantific/zydis.git) registered for path '3rd/zydis'
Cloning into 'D:/Codes/PalWorld-Server-Unoffical-Api/3rd/fmt'...
Cloning into 'D:/Codes/PalWorld-Server-Unoffical-Api/3rd/funchook'...
Cloning into 'D:/Codes/PalWorld-Server-Unoffical-Api/3rd/spdlog'...
Cloning into 'D:/Codes/PalWorld-Server-Unoffical-Api/3rd/wasmtime'...
Cloning into 'D:/Codes/PalWorld-Server-Unoffical-Api/3rd/zycore'...
Cloning into 'D:/Codes/PalWorld-Server-Unoffical-Api/3rd/zydis'...
Submodule path '3rd/fmt': checked out '8e62172ab6742c0e399d906456f54c927ebd4f3a'
Submodule path '3rd/funchook': checked out '0b6fdd10d543c80fbecb61ca515e6cb6622c080b'
Submodule path '3rd/spdlog': checked out '696db97f672e9082e50e50af315d0f4234c82397'
Submodule path '3rd/wasmtime': checked out '7c9547f905c04a2d7ab23fe20f26377997266a7b'
Submodule 'crates/c-api/wasm-c-api' (https://github.com/WebAssembly/wasm-c-api) registered for path '3rd/wasmtime/crates/c-api/wasm-c-api'
Submodule 'crates/wasi-common/WASI' (https://github.com/WebAssembly/WASI) registered for path '3rd/wasmtime/crates/wasi-common/WASI'
Submodule 'crates/wasi-nn/spec' (https://github.com/WebAssembly/wasi-nn) registered for path '3rd/wasmtime/crates/wasi-nn/spec'
Submodule 'tests/spec_testsuite' (https://github.com/WebAssembly/testsuite) registered for path '3rd/wasmtime/tests/spec_testsuite'
Submodule 'tests/wasi_testsuite/wasi-common' (https://github.com/WebAssembly/wasi-testsuite.git) registered for path '3rd/wasmtime/tests/wasi_testsuite/wasi-common'
Submodule 'tests/wasi_testsuite/wasi-threads' (https://github.com/WebAssembly/wasi-threads) registered for path '3rd/wasmtime/tests/wasi_testsuite/wasi-threads'
Cloning into 'D:/Codes/PalWorld-Server-Unoffical-Api/3rd/wasmtime/crates/c-api/wasm-c-api'...
Cloning into 'D:/Codes/PalWorld-Server-Unoffical-Api/3rd/wasmtime/crates/wasi-common/WASI'...
Cloning into 'D:/Codes/PalWorld-Server-Unoffical-Api/3rd/wasmtime/crates/wasi-nn/spec'...
Cloning into 'D:/Codes/PalWorld-Server-Unoffical-Api/3rd/wasmtime/tests/spec_testsuite'...
Cloning into 'D:/Codes/PalWorld-Server-Unoffical-Api/3rd/wasmtime/tests/wasi_testsuite/wasi-common'...
Cloning into 'D:/Codes/PalWorld-Server-Unoffical-Api/3rd/wasmtime/tests/wasi_testsuite/wasi-threads'...
Submodule path '3rd/wasmtime/crates/c-api/wasm-c-api': checked out 'c9d31284651b975f05ac27cee0bab1377560b87e'
Submodule path '3rd/wasmtime/crates/wasi-common/WASI': checked out '0ba0c5e2e37625ca5a6d3e4255a998dfaa3efc52'
Submodule path '3rd/wasmtime/crates/wasi-nn/spec': checked out 'e2310b860db2ff1719c9d69816099b87e85fabdb'
Submodule path '3rd/wasmtime/tests/spec_testsuite': checked out '7ef86ddeed81458f9031a49a40b3a3f99c1c6a8a'
Submodule path '3rd/wasmtime/tests/wasi_testsuite/wasi-common': checked out '09517e50cc47179208f9c681772a6eba617fbddd'
Submodule path '3rd/wasmtime/tests/wasi_testsuite/wasi-threads': checked out 'e1893c00458de3e846f02c9cd2a435992ea8b32c'
Submodule path '3rd/zycore': checked out 'a2fc93e46173e55d9e0596412e68b893228afdf1'
Submodule path '3rd/zydis': checked out '15e38ac36fa4a84dde0fc6ae973d33c22e9521e9'
Submodule 'dependencies/zycore' (https://github.com/zyantific/zycore-c) registered for path '3rd/zydis/dependencies/zycore'
Cloning into 'D:/Codes/PalWorld-Server-Unoffical-Api/3rd/zydis/dependencies/zycore'...
Submodule path '3rd/zydis/dependencies/zycore': checked out 'f98abdfa0d0f4acfdf7994e06ce3aeaf5ae060cd'
PS D:\Codes\PalWorld-Server-Unoffical-Api>

Depending on the version, the output may differ.

Step 6 - Build this project

Locate this project directory in explorer, In our case it is D:\Codes\PalWorld-Server-Unoffical-Api

Hold Shift and right-click empty space in this folder and select "Open PowerShell Window Here" to open a PowerShell window.

Now just run xmake -y, xmake should do it all for you!

Linux

I assume that Linux users generally have more basic knowledge

You need a compiler supports at least C++20, git, rust development environment, and xmake.

please check https://xmake.io/#/guide/installation https://www.rust-lang.org/tools/install

Please remember git submodule update --init --recursive, otherwise the compilation will not be successful.

palworld-server-unoffical-api's People

Contributors

verofess avatar bluefissure avatar nullqwertyuiop avatar liasica avatar piz-ewing avatar

Stargazers

 avatar Istaroth avatar  avatar KakAnicJ avatar  avatar  avatar Gakuen avatar Erika Fernández Moreno avatar Justin Rudio avatar Sean Loper avatar Jake G avatar Guilherme Werner avatar JiexiQing avatar  avatar todayzoo avatar  avatar Dalufishe avatar 药要吃 avatar Lê Anh Tuấn avatar  avatar BrantWang avatar Ashley Lee avatar Zero.Ash avatar  avatar Jozhn avatar  avatar Aly Abdelrahman avatar 张杰宁 avatar Neoxy avatar Dark Litss avatar  avatar 绅士喵 avatar  avatar Diego V avatar Karako avatar Xinyuan Wang avatar Mosti Daniel avatar  avatar RaitoOrange avatar  avatar Elocrypt avatar Hubert avatar e. avatar under. avatar Drew M avatar raveta avatar windowsed avatar  avatar Developer_ken avatar Sparrow He avatar  avatar LunacyZeus avatar Brandon Lopez avatar Seonghyeon Cho avatar Parinya T. avatar Bot Molu avatar Evgeny avatar Suyeol Jeon avatar  avatar  avatar renothing avatar  avatar KevinMatt avatar  avatar  avatar FairyScript avatar  avatar Archean Zhang avatar Babydongdong avatar Jiannan Liu avatar  avatar Valerii Kuznietsov avatar  avatar  avatar  avatar Jingru Shi avatar Sergej Kembel avatar Aw Cat avatar the1Domo avatar Neko Boi Nick avatar 松鼠传媒 avatar Ming-Ying Chung avatar  avatar cs8425 avatar Dev-Foxi avatar T avatar AkaRin avatar LRan avatar 今夜月 avatar Roman Nazarov avatar leinaldo avatar 冰子 avatar M0N7Y5 avatar  avatar Charles avatar  avatar 真のBLACK avatar Ethan Chan avatar fO0bAr avatar  avatar

Watchers

latyas avatar Lê Anh Tuấn avatar Tristan Wiley avatar  avatar Caspar Chou avatar VanishTime733 avatar Mitchell Kager avatar  avatar  avatar Matt avatar the1Domo avatar Nix avatar Wangnov avatar Jingru Shi avatar Dev-Foxi avatar samyyc avatar OriginalSnow avatar Kerminal avatar DevGold avatar

palworld-server-unoffical-api's Issues

Injecting too early

Injecting too early, requires a flag to determine whether the object has been created

[建议]开发OpenAPI

比如GameManager工具,以及玩家数据管理,以及在线踢出等。
我知道这些功能是官方应该做的,但目前官方忙于修复BUG并没有这方面回应。

linux build failed

error: src/hooks/spawn_play_actor.cpp:30:30: error: 'faddress' was not declared in this scope; did you mean 'fs_address'?
   30 |     GetPlayerNetworkAddress(&faddress, controller);
      |                              ^~~~~~~~
      |                              fs_address
  > in src/hooks/spawn_play_actor.cpp

开发建议

希望加入优化版的rcon指令,目前指令有时候info读取会超时,获取玩家,广播中文存在bug
加入解除ban的功能,官方只能ban不能指令解除;

请问这个是什么问题楠

PS D:\palu\PalWorld-Server-Unoffical-Api> xmake -y
checking for platform ... windows
checking for architecture ... x64
checking for Microsoft Visual Studio (x64) version ... 2022
checking for Microsoft C/C++ Compiler (x64) version ... 19.39.33519
=> install vcpkg::folly latest .. failed

vcpkg not found!
if you want to get more verbose errors, please see:
-> D:\palu\PalWorld-Server-Unoffical-Api\build.packages\v\vcpkg_folly\latest\cache\installdir.failed\logs\install.txt
error: install failed!
warning: vcpkg root directory not found, maybe you need set $VCPKG_ROOT!
PS D:\palu\PalWorld-Server-Unoffical-Api>

我分别尝试过

PS D:\palu> xmake -y
xmake.lua not found, scanning files ..
error: project not found!
PS D:\palu>

角色信息编辑、导入、导出

目前联机服务器最大的问题是玩家角色信息表主要被集中在level中,无法顺利协商朋友在一个服务器保持进度游戏
如果可以至少将玩家进度导出然后导入到服务器游戏,那么我觉得可以更好促进服务端多人联机功能的使用
以及可以通过服务器直接给玩家道具什么的,算是方便玩家手动迁移存档建筑
以及希望可以考虑以游戏模式为基础构建api
比如实现pvp空投、地图缩圈、缩圈扣血功能
动态buff设定(湿漉抗性变化)、区域宝可梦伤害加成(比如水边坐标)
饥饿值影响移速耐力消耗速度、0饥饿扣血速度变化等
以及一键清除所有玩家进度、保留建筑什么的
刷出怪物、特定、特殊掉落等

关于 Offsets 自动查找的建议

建议和 UE4SS 一样,通过外部配置文件添加指纹,自动查找偏移量,这样每次服务端更新不需要重新部署 DLL,方便批量操作。

Field bosses spawn issue

Field bosses like the chillet, mammorest, and kinpaca aren't spawning for me. Let me know what additional information i can provide.

联谊申请🤪

我正在开发一款一件部署+web管理的产品 也是要开源的
部署工具采用electron或者wails(为了兼容性大概率选用electron)
web管理部分我选用react+golang
看到你在开发第三方的 如果有存档 解析 修改的部分那就太棒了
如果可以的话 可以一块开发一波(下面是一部分,还没做完 还在努力的爬行~)

plserver__ · 8 53pm · 02-29 (3)

plserver__ · 8 53pm · 02-29

plserver__ · 8 53pm · 02-29 (1)

这个项目还在迭代吗?关于RCON返回被约束每行长度的问题导致的bug

使用RCON管理服务器,返回数据存在一行数据最多50字节的bug,导致数据无法获取,比如“showplayer”返回玩家名字[20字节]、playeruid[10字节]、steamid[17字节],2个逗号 一共49字节是足够的,但是玩家名字采用utf8编码,名字最大20个字符,会变成60字节,直接超过了每行数据50字节的限制,导致pid,steamid被50字节限制截断
获取服务器信息(info)也有同样的问题
不知道增强RCON是否解决这个问题,因为我一直无法编译,不知道能不能提供一个编译好的版本提供下载

Using RCON to manage the server, there is a bug that the return data is up to 50 bytes per line, which makes the data unavailable. For example, "showplayer" returns player name[20 bytes], playeruid[10 bytes], steamid[17 bytes], which is enough for a total of 47 bytes. This is enough, but the player name is encoded in utf8, which is a maximum of 20 characters, and it will become 60 bytes, which directly exceeds the limit of 50 bytes for each line of data, resulting in the pid and steamid being truncated by the 50 byte limit.

Can you give me some examples of how to use this library?

I'm new to this kind of library and tried to load it from python, and encountered below error.
Do you have any example references available, whether they are in C/C++ or Python?
Thanks.

steam@c9860658a0fa:/palworld$ python3
Python 3.9.2 (default, Feb 28 2021, 17:03:44) 
[GCC 10.2.1 20210110] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from ctypes import *
>>> 
>>> psua = cdll.LoadLibrary("./libpal-plugin-loader.so")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3.9/ctypes/__init__.py", line 452, in LoadLibrary
    return self._dlltype(name)
  File "/usr/lib/python3.9/ctypes/__init__.py", line 374, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: ./libpal-plugin-loader.so: undefined symbol: _ZN6google4base21CheckOpMessageBuilderC1EPKc

能否支持linux

如题,因为本身自己有linux的服务器并且比较轻便一些

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.