npatch
npatch, a patcher for ragnarok online made with nodejs.
Installation
- Download the repository as zip.
- Extract that zip file.
- Make sure you have nodejs and a text editor for .js files.
- Open up cmd and go to the main directory of the project.
- Run
npm installto install dependencies. - Run
npm install pkg -gso you can create the .exe client (cmd only) for the patcher.
Patch Server
This is required so that the patcher can download the files from the web.
- Edit config.yml on the main directory, and change the patchKey to the desired patch key you want and the port you want.
- Run
node patchServeron your cmd
DO NOT CLOSE THE PATCH SERVER OR YOU WON'T BE ABLE TO DOWNLOAD THE PATCH FILES
Encoder
- Go to the
/src/encoderfolder and place all your files that you want to patch inside thecontentfolder. - Once done, open up
data.ymland change thePatchFileNameto the desired file name of the patch that you want. - Then, add the file names that you would want to be included in that patch. For example,
patches:
# this would be the name of the output file
- PatchFileName1:
# an array of the files to add to the patch
- FileToPatch1.txt
- FileToPatch2.txt
# Second patch
- Patch2:
# an array of files to add to this patch
- File1.txt
- File2.lua
- You could add any kind of file that you want on the array.
- After doing all that, go back to the main directory and run
node encode. - Once that is done, go to the
src/encoder/outputfolder and place all the.npatchfiles to thesrc/server/patchesfolder. - Open up
patchList.ymlfile inside thesrc/serverfolder and add the names of the patch files. Example
- PatchFileName1
- Patch2- After that, close the patch server and open it up again for the new patch file changes.
Client
- Make sure you have
pkginstalled, if not simply runnpm install -g pkgon cmd. - Open up
config.jsand place the patchKey and port of the one that you placed on theconfig.ymlfile on the main directory. - The host is the ip of where the patch server is being run on.
- After all that, go back to
src/clientfolder and runpkg index.js --target=all --output=patcher.exe