2010-03-08, 02:58 PM
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.
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:
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.
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 = versionCode:
C:\Nexon\Maplestory> NXPatcher 00080to00081.patchFirst 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.
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.
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.
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.
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
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:
00083to00084.patch
ManualPatch00296to00297.exe
Etc.wz
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"
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:
00083to00084.patch
ManualPatch00296to00297.exe
Etc.wz
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"
