Introducing a new version of NXPatcher - NXPatcher Lite!
This version of the original NXPatcher does one thing and one thing only - creates pre-patchers. It does not have any advanced features such as patch hijacking, direct patch reading, pre-patcher splitting, or version checking. For more information, please see the "NXPatcher Lite" spoiler on the first page.
2010-02-18, 04:19 AM
Kalovale
Thank you Fiel. I tested the Lite version with v079to080 patch and it took something like 5 seconds to make the prepatcher.exe, amazing indeed.
I'm just wondering, which is faster in overall? Making a prepatcher with NXPatcherLite AND patching with that prepatcher or reading the patch file directly with NXPatcher?
2010-02-18, 05:22 PM
Fiel
Quote:
Originally Posted by Kalovale
Thank you Fiel. I tested the Lite version with v079to080 patch and it took something like 5 seconds to make the prepatcher.exe, amazing indeed.
I'm just wondering, which is faster in overall? Making a prepatcher with NXPatcherLite AND patching with that prepatcher or reading the patch file directly with NXPatcher?
Reading the patch file directly is always faster, but it's also a little more complicated to do (though not much more).
2010-02-22, 03:46 AM
Fiel
I just finished running a patching benchmark on my computer. The next iteration of NXPatcher, version 1.7, is MUCH faster than Nexon's patcher.
How big is patch 0.83 and how long will the patch take to download on a 64kbs connection?
We just reached our DL limit for the month and thats what the speed has been reduced to...
2010-02-22, 06:16 AM
Kalovale
Quote:
Originally Posted by chameleonic
how big is patch 0.83 and how long will the patch take to download on a 64kbs connection?
We just reached our dl limit for the month and thats what the speed has been reduced to...
151 mb.
My DSL Router says my downstream line rate is 6143 Kbps, and it's taking over an hour to download.
EDIT: Thanks Fiel. Any idea when the v1.7 is coming out? It would be helpful for a patch like this. :(
2010-02-22, 06:22 AM
Chameleonic
151 Mb...so I'm guessing it will take a while.
So the pre-patcher isnt working yet? I wanted to try and get a start downloading the patch since it is going to take me something like 7 hours...
2010-02-22, 12:40 PM
Fiel
Quote:
Originally Posted by Chameleonic
So the pre-patcher isnt working yet? I wanted to try and get a start downloading the patch since it is going to take me something like 7 hours...
I'll get it back up and running.
EDIT: Downloads are working now.
2010-03-06, 02:36 PM
Fiel
Just thought I'd post this here about version 1.7:
Q: What's so special about version 1.7 of NXPatcher? A: It's focusing a lot on usability and customization for the user. BAT files are completely done away with in favor of using INI files instead.
Q: What's an INI file? A: An INI file is a textual document that can be edited with Notepad. It contains a list of variables that, once edited, affects how NXPatcher interacts with nearly every aspect of its environment. It also uses referential variables.
Q: What's a... A: A referential variable is an easy way to save time and create consistency. Have a look at this example INI file:
Code:
[frank]
pet = chinchilla;
[john]
pet = {frank:pet};
In this example, "{frank:pet}" is a referential variable because it points to whatever Frank's pet happens to be. When John's pet is read, it will return "chinchilla". If Frank's pet changes to "rabbit" and John's pet is then accessed, it will return "rabbit". John will always have the same pet as Frank.
So how is this useful? In NXPatcher, there are functions that are being performed which are extremely similar to each other - such as the "read" and "hijack" command. They both read patch files - one just happens to be inside an exe file. By using referential variables, you can change how the "read" and "hijack" commands work at the same time like in the following:
Another feature possible due to this is a dynamic referential variable. This variable is defined while the program is running. One of the easiest to understand is like in the following:
Code:
[read]
backupfolder: v{nxpatcher:version};
Here, {nxpatcher:version} refers to a dynamic variable because the value is not known until the program is run. In this case, NXPatcher determines the current version of Maplestory you are attempting to patch. So if you're patching from version 82 to 83, the name of "backupfolder" would be "v82". If you were patching from version 78 to 82, the name of "backupfolder" would be "v78". This allows for a lot of flexibility.
Q: Any bug fixes or performance enhancements? A: Yes on both accounts. One of the bug fixes I've mentioned would be fixed in this version is the error in the "version" function because it does not work on Item.wz. This bug is fixed. For performance enhancements, users are now able to choose between the normal method of patching found in version 1.6 or the fast version of patching in 1.7. This is configurable within the INI file with the variable "ifusefastpatch" which affects the "hijack" and "read" commands.
If ifusefastpatch is set to 0, the entire file is read two times from the disk. The first time, the file is read in chunks from the hard drive to determine if the checksum matches the correct checksum found in the patch file. Then the file is again accessed from the disk as the patch file requests while rebuilding the file. So many fetch requests from the hard drive causes a massive slowdown in speed.
If ifusefastpatch is set to 1, the entire file is read into memory before any rebuilding procedure is performed. So in all, the file is only read one time from the hard drive. This also means that the checksum procedure is performed in memory (Very fast - compare 300MB/sec in memory vs. 30 - 50 MB/sec from the hard drive). Also, during the rebuilding procedure, the patch file reassembles the entire file from memory. The result is a lot more speed (it runs nearly 50% faster), but it also consumes a lot more memory. Map.wz is more than 500MB in most versions of Maplestory which is entirely read into memory. I recommend at least 2 GB of memory to turn ifusefastpatch on.
Another performance enhancement, regardless if "ifusefastpatch" is turned on or off, is buffered writing. NXPatcher keeps a 5 MB buffer managed internally. This means fewer hard drive accesses and also increases speed.
Q: But I like how version 1.6 runs! Do I have to change to the new one? A: Version 1.7 is entirely backward compatible with version 1.6. You can continue to use version 1.7 with batch files just as you used with version 1.6. I do recommend you upgrade to the new version for the above mentioned bug fix.
Q: When is version 1.7 coming out? A: When it's ready. I will be releasing 1.7 as a beta (1.7b) first, then I will release gold (1.7g) afterwards.
Q: What will be happening to NXPatcher Lite? Will you be upgrading that to 1.7, and any new features with NXPatcher Lite? A: No. The main purpose of the Lite version is for people to make Nexon pre-patchers, which is a very simple process anyway. The purpose of that version is to be simple, and I believe it has accomplished that goal. In short, there is nothing to upgrade because there's nothing that needs upgrading.
2010-03-08, 12:58 PM
Fiel
The INI file documentation is complete. Although it's located on the first page, I will post it here as well:
INI File Documentation
The INI file is split up into six different sections - one section for each of the five commands and a file associations section. There are a few basic guidelines that the NXPatcher INI file follows:
1. All variables which begin with the word if (ifbackupdir, ifusefastpatch, ifoutputbase) is a boolean variable - the value of it must be 0 or 1 - 0 for off and 1 for on.
2. All other variables are strings.
[fileassociations]
There are three default file associations with this section. This section is only used if the user is dragging & dropping a file on NXPatcher or if the user associated a file type with NXPatcher. When a file is executed with NXPatcher in these manners, the program checks the file suffix ("00080to00081.patch", "ManualPatch.exe") and searches for the file suffix in the fileassociations block. The command associated with the file suffix is then executed with that file.
As an example:
Code:
[fileassociations]
patch = write
exe = split
wz = version
Code:
C:\Nexon\Maplestory> NXPatcher 00080to00081.patch
First NXPatcher looks for the file suffix ("patch"), then NXPatcher looks up the file suffix in the fileassociations block which returns "write". The "write" command is then executed on the patch file.
For patch files, the write or read command must be used.
For exe files, the hijack or split command must be used.
For wz files, the version command must be used.
[read]
ifusefastpatch (Default value - 0)
If set to 0:
-- While calculating the checksum of a rebuilt file, it is read in chunks from the hard drive.
-- While rebuilding the file, random accesses requested by the patch file are read from the hard drive
-- Uses fewer resources at the expense of slower execution
If set to 1:
-- The entire file is read into memory before calculating the checksum or performing any file rebuilding
-- The checksum is calculated while the file is in memory
-- The file is rebuilt in memory
-- Faster execution at the expense of higher resources
outputfolder (Default value - Patcher)
This is the default folder which NXPatcher outputs all of the patch files. This can be an absolute or a relative reference. Never include a trailing slash. This folder is created automatically and does not have to exist prior to running NXPatcher.
ifbackup (Default value - 0)
If set to 0:
No backing up of current files to {read:backupdir} is performed.
If set to 1:
After the patch file is fully done with the patching procedure, NXPatcher creates a list of all of the new files being created with the new patch. It then takes all of the files in the current maplestory directory and moves them to wherever {read:backupdir} is. The backup procedure always occurs before {read:ifautoapply} happens.
backupdir (Default value - v{nxpatcher:version})
This is the directory in which all of the backup files are stored. This can be an absolute or a relative reference. Never include a trailing slash. This folder is created automatically and does not have to exist prior to running NXPatcher.
ifdeltxt (Default value - 1)
If set to 0:
The file {read:deltxt} is not created.
If set to 1:
During the patching procedure, the patch file will request that certain files will be deleted. For the sake of not corrupting perfectly good Maplestory files, these files are never deleted. Instead, a listing of all files requested by the patch file for deletion are placed in {read:deltxt} which is located in the {read:outputfolder} directory.
deltxt (Default value - delfiles.txt)
This file contains all of the files requested for deletion by the patch file. It is always located in the {read:outputfolder} directory.
ifautoapply (Default value - 0)
If set to 0:
The patch files are not automatically applied. They remain in the {read:outputfolder} directory.
If set to 1:
After the backup procedure is performed (see {read:ifbackup}), NXPatcher creates a list of files in the {read:outputfolder} directory and moves all of the files to the current working directory. The empty folders found in {read:outputfolder} are then deleted.
[hijack]
All of the variables for the hijack section are exactly the same as those for the read section and perform in exactly the same manner.
[split]
ifoutputbase (Default value - 1)
If set to 0:
The base file is not output during the split procedure
If set to 1:
The base file is output during the split procedure
outputbase (Default value - {nxpatcher:inputfileprefix}.base)
This is the place where the base file is written. This file is only written if {split:ifoutputbase} is set to 1. This can be an absolute or a relative reference.
ifoutputnotice (Default value - 1)
If set to 0:
The notice file is not output during the split procedure
If set to 1:
The notice file is output during the split procedure
outputnotice (Default value - {nxpatcher:inputfileprefix}.txt)
This is the place where the notice file is written. This file is only written if {split:ifoutputnotice} is set to 1. This can be an absolute or a relative reference.
ifoutputpatch (Default value - 1)
If set to 0:
The patch file is not output during the split procedure
If set to 1:
The patch file is output during the split procedure
outputpatch (Default value - {nxpatcher:inputfileprefix}.patch)
This is the place where the patch file is written. This file is only written if {split:ifoutputpatch} is set to 1. This can be an absolute or a relative reference.
[write]
ifinputbase (Default value - 0)
If set to 0:
The default base file is used.
If set to 1:
NXPatcher looks for the base file listed in {write:inputbase} to use instead of the default base file. This file must exist or NXPatcher will throw an exception.
inputbase (Default value - ManualPatch.base)
If the user does not want to use the default base file that NXPatcher provides, set {write:ifinputbase} to 1 and include the location of the base file in {write:inputbase}. NXPatcher will then use this alternate base file instead of its own.
ifinputnotice (Default value - 0)
If set to 0:
The default notice is used. The default notice is "Written by Fiel - http://www.southperry.net/"
If set to 1:
NXPatcher looks for the notice file listed in {write:inputnotice} to use instead of the default base file. This file must exist or NXPatcher will throw an exception.
inputbase (Default value - ManualPatch.base)
If the user does not want to use the default notice that NXPatcher provides, set {write:ifinputnotice} to 1 and include the location of the notice file in {write:inputnotice}. NXPatcher will then use this alternate notice instead of its own. Note that the only way the notice is shown during the patching is if the pre-patcher cannot access the internet during the patching procedure.
outputexe (Default value - {nxpatcher:inputfileprefix}.exe)
This is the location where the pre-patcher is written.
ifautorun (Default value - 0)
If set to 0:
The pre-patcher is not automatically started after its creation. It's a good idea to set this to 0 if multiple pre-patchers are being made for redistribution.
If set to 1:
The pre-patcher is autmatically started after it's created. It's a good idea to set this to 1 for personal use.
[version]
ifallwzfiles (Default value - 0)
If set to 0:
The version is only determined for the wz file given to NXPatcher
If set to 1:
The version is determined for all of the standard wz files in the same directory as the wz file given to NXPatcher. The "standard files" is a list of the following wz files:
-- Base.wz
-- Character.wz
-- Effect.wz
-- Etc.wz
-- Item.wz
-- Map.wz
-- Mob.wz
-- Npc.wz
-- Quest.wz
-- Reactor.wz
-- Skill.wz
-- Sound.wz
-- String.wz
-- Tamingmob.wz
-- UI.wz
Dynamic variables
Dynamic variables are determined at runtime. Each dynamic variable looks like the following:
{nxpatcher:VAR_NAME}
where VAR_NAME is one of the variables listed below:
version
Determines the version of base.wz in the current directory. Base.wz is used because it is always the most up-to-date wz file.
version_to
Calculates the version of base.wz and adds 1 to it. So if the version of base.wz is 80, version_to will return 81. If 93, then 94.
inputfileprefix
The prefix of a file name is considered to be anything that is not the suffix - such as in the following:
The prefix is taken from the file name currently being operated on by NXPatcher. As an example, if the write command is being used on "00100to00105.patch" and the {write:outputexe} variable is set to "{nxpatcher:inputfileprefix}.exe", the exe file will be written to "00100to00105.exe"
2010-03-09, 01:42 AM
Fiel
NXPatcher version 1.7 will be released on Saturday. I just finished coding it yesterday. I'm now doing some preliminary testing on it to make sure that all features and functionality are present and working.
2010-03-13, 05:54 AM
Fiel
NXPatcher 1.7b is now available. You can download it here. The 1.7b source can be downloaded here
Warning: This is beta software and is not fully tested! This software is suitable for testing purposes only and should not be used in a production environment. Please report any and all bugs that you find with the software in this topic.
Known bugs:
-- When "ifautoapply" is turned on for [read] or [hijack], the "outputfolder" folder is not fully removed
-- Sometimes with the autoapply feature the files are not moved from the outputfolder to the current maplestory directory
-- Some instances when files are output to the hard drive (such as in the [write] command), if the file is supposed to be written to a folder that isn't yet created NXPatcher will crash
2010-05-17, 08:47 AM
Fiel
NXPatcher 1.7g is now available. This is a gold release meaning it's suitable for a production environment. All previous bugs in the prior post were fixed.
You can download the Windows 32-bit precompiled binaries here
You can download the source code here
2010-06-16, 03:49 AM
thinbear
Thank you very much. Now I can play immediately when I back home from work.
2010-06-21, 07:24 PM
Illam
Fiel, do you think you can make it such that the patch files don't check the pre-patch checksum? Thanks in advance.
2010-06-21, 09:58 PM
Fiel
Quote:
Originally Posted by Illam
Fiel, do you think you can make it such that the patch files don't check the pre-patch checksum? Thanks in advance.
I could, but I don't want to. The checksum procedure takes all of two to three seconds at max to perform and it 100% ensures that you are patching with correctly downloaded data. I wouldn't want anyone to have messed up data because the checksum was not checked. It's a necessary part of the program I'm not willing to let anyone bypass. If you want to fork NXPatcher for any other use you may have for it, the source is available and I encourage you to alter it.
2010-06-23, 05:25 PM
shakar96
Wow you are amazing Fiel. Thanks!
2011-01-03, 10:38 PM
maplefreak26
Is GMS's patch site forbidden to view, or down?
2011-01-03, 10:47 PM
Fiel
Forbidden to view. You have to use direct links.
2011-01-03, 10:59 PM
maplefreak26
Darn, cause I was hoping to make loads of patchers for the Basil community, yes, I am a wannabe, that dude who created patchers but suddenly dissappeared.
Now I can't find out how many patchers there are for 1 version. F3