Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

sPCK - simple PCK utility

Status
Not open for further replies.
Joined
Jan 6, 2010
Messages
744
Reaction score
1,051
In preparation of a new sPATCH (replacing pwpack.exe with an command line arguments compatible application that can handle adding files to existing pck packages), sPCK.exe goes alpha test stage




Take care and work with backups!

Focus Testing:
  • Please Report if the application stop working, this can be caused by errors in the memory heap (hopefully i've fixed all memory errors)
  • extracting: if possible extract the file also with pwpack.exe and compare the extracted files of sPCK.exe with the extracted files of pwpack.exe using WinMerge Portable, report if the files are different
  • compress: after compressing extract the compressed files again and compare if these extracted files are equal to the original files, using WinMerge Portable again
  • recompress: extract a file and compress these files again, check if the new created pck is running without any problems in your client
  • replace: add edit or replace some files (maybe the gfx of a flight mount) check ingame if the modified files work correctly
  • feel free to play around like hell, your aim is to show me that sPCK.exe is a bad application because it's not working correctly... :rolleyes:
 
Last edited:
Joined
Apr 11, 2010
Messages
931
Reaction score
407
Yay thanks Ronny :)

This is just what I needed. Now all that time is not lost while repacking.

:thumbup1:

----Edit----

Ronny I run the following command and get the following error
Code:
sPCK.exe -e models.pck
I tried with and without "" and other various things but its the same error.

Error
Code:
First argument is not a valid instruction
Press Enter to exit

Ronny you need to change your documentation. It says -e is the command to extract while -x is actually the command to extract.

Im extracting now Ill let you know if I find anything else.
 
Last edited:
Joined
Jan 6, 2010
Messages
744
Reaction score
1,051
Me too xD...

big thx to gouranga and Anubis who shared their knowledge about pck structure with me

---------- Post added at 11:36 PM ---------- Previous post was at 11:14 PM ----------

Example batch file for extracting all pck files

extract.bat
Code:
set path=E:\- GAMES -\Perfect World International\element

sPCK.exe -x "%path%\building.pck"
sPCK.exe -x "%path%\configs.pck"
sPCK.exe -x "%path%\facedata.pck"
sPCK.exe -x "%path%\fonts.pck"
sPCK.exe -x "%path%\gfx.pck"
sPCK.exe -x "%path%\grasses.pck"
sPCK.exe -x "%path%\interfaces.pck"
sPCK.exe -x "%path%\litmodels.pck"
sPCK.exe -x "%path%\loddata.pck"
sPCK.exe -x "%path%\models.pck"
sPCK.exe -x "%path%\sfx.pck"
sPCK.exe -x "%path%\shaders.pck"
sPCK.exe -x "%path%\surfaces.pck"
sPCK.exe -x "%path%\textures.pck"
sPCK.exe -x "%path%\trees.pck"

Example batch file for compressing all directories

compress.bat
Code:
set path=E:\- GAMES -\Perfect World International\element

sPCK.exe -c "%path%\building.pck.files"
sPCK.exe -c "%path%\configs.pck.files"
sPCK.exe -c "%path%\facedata.pck.files"
sPCK.exe -c "%path%\fonts.pck.files"
sPCK.exe -c "%path%\gfx.pck.files"
sPCK.exe -c "%path%\grasses.pck.files"
sPCK.exe -c "%path%\interfaces.pck.files"
sPCK.exe -c "%path%\litmodels.pck.files"
sPCK.exe -c "%path%\loddata.pck.files"
sPCK.exe -c "%path%\models.pck.files"
sPCK.exe -c "%path%\sfx.pck.files"
sPCK.exe -c "%path%\shaders.pck.files"
sPCK.exe -c "%path%\surfaces.pck.files"
sPCK.exe -c "%path%\textures.pck.files"
sPCK.exe -c "%path%\trees.pck.files"
 
Joined
Apr 11, 2010
Messages
931
Reaction score
407
Extracting went perfectly.

Here are my batch scripts. I only have to press a number instead of typing out the name. These are the same as my old ones. I just changed the commands to fit.

pack.bat
Code:
:MAIN
@ECHO OFF
ECHO What file would you like to pack
ECHO 1. configs.pck
ECHO 2. models.pck
ECHO 3. gfx.pck
ECHO 4. surfaces.pck
ECHO 5. custom
ECHO 6. exit
@choice.exe /C:123456 /N /D 6 /T 60
IF %ERRORLEVEL% == 1 GOTO CONFIGS
IF %ERRORLEVEL% == 2 GOTO MODELS
IF %ERRORLEVEL% == 3 GOTO GFX
IF %ERRORLEVEL% == 4 GOTO SURFACES
IF %ERRORLEVEL% == 5 GOTO CUSTOM
IF %ERRORLEVEL% == 6 GOTO EXIT
:CONFIGS
sPCK -c configs.pck.files
@GOTO EXIT
:MODELS
sPCK -c models.pck.files
@GOTO EXIT
:GFX
sPCK -c gfx.pck.files
@GOTO EXIT
:SURFACES
sPCK -c surfaces.pck.files
@GOTO EXIT
:CUSTOM
ECHO Enter the name of your *.pck file you wish to pack
SET DIR=
set /p dir=
sPCK -c %DIR%.files
:EXIT
pause

unpack.bat
Code:
:MAIN
@ECHO OFF
ECHO What file would you like to unpack
ECHO 1. configs.pck
ECHO 2. models.pck
ECHO 3. gfx.pck
ECHO 4. surfaces.pck
ECHO 5. custom
ECHO 6. exit
@choice.exe /C:123456 /N /D 6 /T 60
IF %ERRORLEVEL% == 1 GOTO CONFIGS
IF %ERRORLEVEL% == 2 GOTO MODELS
IF %ERRORLEVEL% == 3 GOTO GFX
IF %ERRORLEVEL% == 4 GOTO SURFACES
IF %ERRORLEVEL% == 5 GOTO CUSTOM
IF %ERRORLEVEL% == 6 GOTO EXIT
:CONFIGS
sPCK -x configs.pck
@GOTO EXIT
:MODELS
sPCK -x models.pck
@GOTO EXIT
:GFX
sPCK -x gfx.pck
@GOTO EXIT
:SURFACES
sPCK -x surfaces.pck
@GOTO EXIT
:CUSTOM
ECHO Enter the name of your *.pck file you wish to unpack
SET DIR=
set /p dir=
sPCK -x %DIR%
:EXIT
pause
 
Last edited:
Joined
Jan 6, 2010
Messages
744
Reaction score
1,051
after a lot of testing and some (rare) responses it seems that sPCK works fine. The latest release got an speed improvement, now adding hundreds of files to an existing package goes as fast as it was ment to be...

Keep in mind that filename replacing is now case sensitive i.e. "gfx/test.txt" will not be replaced by "GFX/Test.txt"



next week i'll add and test sPCK with sPATCH...
 
Nerd-IO
Loyal Member
Joined
Feb 13, 2009
Messages
3,303
Reaction score
651
Keep the great work!

Maybe it will be better than the official patcher ... xD
 
Joined
Oct 14, 2009
Messages
5,493
Reaction score
2,299
after a lot of testing and some (rare) responses it seems that sPCK works fine. The latest release got an speed improvement, now adding hundreds of files to an existing package goes as fast as it was ment to be...

Keep in mind that filename replacing is now case sensitive i.e. "gfx/test.txt" will not be replaced by "GFX/Test.txt"



next week i'll add and test sPCK with sPATCH...

Awesome! I highly anticipate the new sPatch !

I think it will be better than 'official' :thumbup1:
 
Nerd-IO
Loyal Member
Joined
Feb 13, 2009
Messages
3,303
Reaction score
651
I suggest:

Adding the repack/recompress mode to sPCK like the one from pwpack2008 ...

I mean this function:
pwpack -r models.pck -z 9

It's maybe not usefull for everyone but in some case, i need it...

And maybe some other ppl too...

---------- Post added at 02:34 PM ---------- Previous post was at 02:13 PM ----------

PS:
Btw, +10 for sPCK ! :eek:tt1:
A little more faster than pwpack2008 for extracting and creating PCK folders...
 
Joined
Jan 6, 2010
Messages
744
Reaction score
1,051
sPCK has some major bugs that destroyed files inside an pck package where the compressed size was larger than the uncompressed size.

These files inside a pck archive can still be read by sPCK v1.0b, but elementclient.exe and pwpack.exe can't read these files...

If you don't know what to do, i recommend to extract all your pck packages (which was compressed with sPCK v1.0b) with sPCK v1.0b and then repack those files with sPCK v1.0c

sorry for detecting this issue so late...



Affected projects like sPATCH and PWD will be updated soon with sPCK v1.0c...
 
Last edited:
Joined
Jan 6, 2010
Messages
744
Reaction score
1,051
sPCK v1.1 is out, codeplex is currently down but i'll post the snapshot here...

New Feature:
  • extracting official .cup patches

Quick Guide:
  • open console and enter following command
  • sPCK.exe -xp "path\ec_patch_402-408.cup"
  • two directories will be created
  • *.cup.files contains raw patch data
  • *.cup.decoded contains all decoded/deflated files

i hope this will help you to keep your files up-to-date with latest official releases... :laugh:
 

Attachments

You must be registered for see attachments list
Last edited:
Nerd-IO
Loyal Member
Joined
Feb 13, 2009
Messages
3,303
Reaction score
651
CUP patch made with sPCK are not valid for the pw patcher...

I must use the old pwpack2008 for it.

Just a minor bug...
 
Joined
Jan 6, 2010
Messages
744
Reaction score
1,051
CUP patch made with sPCK are not valid for the pw patcher...

I must use the old pwpack2008 for it.

Just a minor bug...


sPCK can only extract cup patches...
what is the command for creating a cup patch with pwpack?


if you refer to repacking a cup file (extract-compress) this works like a charm with sPCK v1.1, tested with latest pwi patcher...
 
Last edited:
Skilled Illusionist
Joined
Dec 22, 2008
Messages
302
Reaction score
23
Ronny, in his place would be possible to extract and then compress, simply add the file in the package?

Extracted from sPCK documentation:

Code:
Add / Replace
Adding/Replacing all files from directory "example.pck.files" into file "example.pck"

    * command line usage: sPCK.exe -a "example.pck.files"
    * -a is the switch for adding files to an exisiting pck package
    * example.pck.files is the root directory containing the files to be added
    * the root directory must always ends with ".pck.files"
    * the exisiting package must be named "example.pck" without the tailing ".files"
    * the exisitng package must be placed in the same folder as the root directory
    * the existing package must be perfect world angelica file packages v2008 compatible

 
Experienced Elementalist
Joined
Apr 24, 2010
Messages
250
Reaction score
2
This command is new? It exists in spatch? Because it extracts all files to be able to add and close the package.
 
Nerd-IO
Loyal Member
Joined
Feb 13, 2009
Messages
3,303
Reaction score
651
sPCK can only extract cup patches...
what is the command for creating a cup patch with pwpack?

if you refer to repacking a cup file (extract-compress) this works like a charm with sPCK v1.1, tested with latest pwi patcher...

Hmmm... ok i will try again to repack a cup patch with sPCK 1.1 instead of pwpack 2008 ...


sPCK can only extract cup patches...
what is the command for creating a cup patch with pwpack?

oO'

I want to know too. :drool:

Use this release:
--> http://forum.ragezone.com/f452/install-cpw-windows-676492/

And compress cup files into a cup patch with pwpack2008 with the command:
pwpack -c cupfiles ec_pacth1-2.cup -z 9

Or with spck 1.1 or later:
spck -c cupfiles

---------- Post added at 05:06 PM ---------- Previous post was at 05:04 PM ----------

Oh yeah i tested the "spck -xp" command for unpacking cup patch, it's very nice xD

w00t \o/
 
Skilled Illusionist
Joined
Dec 22, 2008
Messages
302
Reaction score
23
Hmmm... ok i will try again to repack a cup patch with sPCK 1.1 instead of pwpack 2008 ...




Use this release:
--> http://forum.ragezone.com/f452/install-cpw-windows-676492/

And compress cup files into a cup patch with pwpack2008 with the command:
pwpack -c cupfiles ec_pacth1-2.cup -z 9

Or with spck 1.1 or later:
spck -c cupfiles

God bless you! :drool:

---------- Post added at 12:07 PM ---------- Previous post was at 12:06 PM ----------

This command is new? It exists in spatch? Because it extracts all files to be able to add and close the package.

I think it's not new, but i never used it. '-'
 
Newbie Spellweaver
Joined
Aug 11, 2010
Messages
34
Reaction score
3
Ok wait, so I'm confused.. xD
Can that CPW link that Romulan posted create actual .cup patches that the original pwi patcher will recognize, and do a 'streamlined' install with? That would be SO much nicer than waiting for pwpack when I do models.pck updates. xD
 
Status
Not open for further replies.
Back
Top