[Release] PK2 Tools 1.0

Here you can post guides and tutorials you have written for Silkroad Online. If submitting a guide from another forum, please post credit to the author.
Post Reply
User avatar
Drew_Benton
Active Member
Posts: 639
Joined: Mon Oct 16, 2006 8:46 pm
Quick Reply: Yes
Location: Texas

[Release] PK2 Tools 1.0

Post by Drew_Benton »

2 weeks ago I posted this thread: http://www.silkroadforums.com/viewtopic.php?t=71213 It was a video showing the experimental use of a tool I had made to make a new Music.pk2 file. It turned out well as I had hoped, but my main goal was to make a tool that would make editing any pk2 easier. After spending some time on a new approach, I have finally accomplished all of my original goals on this topic. What I have to share now are two new tools, PK2Extractor and PK2Editor.

Sorry for the length of this post, but it's best to explain it so everyone understands what is here and does not get any wrong ideas. People go around to various forums and try to post my work or claim it's "me" and as a result sometimes people think it's me, but it's not. Then people get confused as to what I do in general and continue on with an inaccurate perspective. It happens all the time :( Anyways -

PK2 Extractor

This is a PK2 file extractor. It allows you to open up the PK2s and extract the files. Unlike the existing PK2 Extractor, this one has a few extra features. There are two modes: Explore mode and Search mode.

Explore mode allows you to navigate through the PK2 structure and selectively extract folders or files. A simple tree view control is used so when you click on entries you can see details on the file name, file path, and file size.

Search mode allows you to perform searches on the PK2 entries to find the files you wish to extract. You can search by a string found in the path or title of an entry, the file size, and entry type (file or folder). In addition to being able to just search, you can Filter results. This means you can search for all ".ddj" files of a size less than 1kb that have the phrase "skill" in them for example.

Explore Mode
Image

Search Mode
Image

PK2 Editor

This is a fully functional PK2 Editor. With this tool, you can import in modified PK2 files as well as import your own new files into the PK2 archive. The files you import can be larger or smaller than the original, the functions used will take care of everything. However, it is important to remember that the PK2s expect files in certain formats, so trying to import a dds in place of a ddj will result in a Silkroad crash.

The main functionally implemented for the PK2 editor is: automatic single file import, automatic multiple file import, and single file manual import. The automatic imports work by searching the PK2 for the file you are importing, if only one entry exists, it can update that entry. If more than one entry exists, it will fail and you will have to use the manual import.

Main GUI
Image

Download

URL: http://rapidshare.com/files/79703126/PK2Tools.zip (uploaded here for a permanent link)
Scan: http://www.virustotal.com/resultado.htm ... 24d3b779b7
MD5: d4a75703404458337898edf544216114

Source Code: http://rapidshare.com/files/80870969/Pk2Tools_src.zip (added 1/02/08 )

If you just want to look at the main tutorial: http://volatiledev.net/pk2tools/PK2%20E ... torial.doc

Conclusion:

Included in the package are a few ReadMe's, so please take a look at those before getting too involved in using the tools. I tested them pretty well, but there may be bugs, so please report any errors and keep an eye out on the Status Log.

Addendum:
* Please BACKUP all your PK2 files before using the tools.
* Watch the Status Log for any errors.
* You cannot use both programs at the same time due to read / write conflicts.
* "New Search" will perform a new search and erase any previous searches.
* "Filter Results" will continue a search and uses the previous search results.
* "Extract" will extract the selected item in the current mode.
* "Extract All" will extract all listed items in the current mode.
* To search for file types, simply use ".ext" as the search string for Title only. (".ddj", ".ogg", etc...)
* You do not have to use "Select File" or "Select Folder", you can just paste in the path to the file.
* Read the document on how to perform a Manual Single File Import before you try it!

How to use with SRF Guides

With the numerous guides on SRF, you can make the most use of these tools right away. What you'll do is for each guide:
- Extract the required files as stated in the guide
- Modify the files themselves, not the pk2 directly
- Use the modifier to import your modified files back into the PK2

* Please note my caution on file formats, if you want to edit something like the files in server_dep, do not resave the file in Excel, use a Hex Editor instead. Otherwise you will lose a lot of data and your game will crash. I have tested modifying those files and many more with out any issues.

* If you modify sound or texture files, you must keep the same format as well. If you get any Silkroad errors, you can count on a file being imported that is not in the right format.

If there are any avid PK2 editors here I'd love to hear your experience from you on using these tools. If you have any tips on making things easier to use or any other feedback, it'd be valuable for the future. Enjoy!
Last edited by Drew_Benton on Thu Jan 03, 2008 7:05 am, edited 2 times in total.

User avatar
LovEShiT
New Member
Posts: 30
Joined: Wed May 16, 2007 12:51 pm
Quick Reply: Yes
Location: Troy

:)

Post by LovEShiT »

Really nice programs ! I just need to figure out how to use them :D
I'm to lazy to read the .txt files xD
My mad char :(
Image

User avatar
vindicated01
Frequent Member
Posts: 1094
Joined: Thu May 31, 2007 2:07 pm
Quick Reply: Yes
Location: XE
Contact:

Post by vindicated01 »

is this tools help me log in :?
Image

User avatar
ranger4life
Addicted Member
Posts: 2526
Joined: Thu Mar 16, 2006 11:05 pm
Quick Reply: Yes
Location: Off Topic

Post by ranger4life »

vindicated01 wrote:is this tools help me log in :?

omfg, rerad the post "PK2 TOOLS"
and tools to helpu log in are illegal hacks
Image

User avatar
[SD]Kratos
Senior Member
Posts: 4785
Joined: Mon Apr 24, 2006 9:48 am
Quick Reply: Yes
Location: Venus

Post by [SD]Kratos »

nice work as always! :D
Image

User avatar
Cruor
Loyal Member
Posts: 1999
Joined: Wed Apr 12, 2006 1:22 am
Quick Reply: Yes
Location: Off topic

Post by Cruor »

Awesome work!

I haven't had time to truly test them out, but here are my initial observations/suggestions:

Pk2Extractor
  • Consider adding an "Extract To..." dialog. It's nice to keep the directory structure, but I find myself often just throwing everything on my desktop or in one folder since I know my way around the files. Also consider adding "Extract Directory" and "Extract Directory To..." dialogs. I think both of these are useful, especially working with directories full of textures.
  • The "Entry Details", while useful, could be placed better. The name field feels a bit redundant to me, although I could understand why you placed it above the extract button. My suggestion is to combine name and path, and put them into a status bar at the bottom, ala Regedit, along with the file size on the right.
  • Extract and Extract All should be put into the File menu, and Search Mode put into a view menu, (along with possibly an option to use your original layout), to better fit Windows' paradigm. Double clicking an item should extract it, while right clicking it should bring up a context menu offering Extract and Extract To, or Extract Directory and Extract Directory To if you have a directory selected.
  • Accelerator keys would be nice as well, especially for keyboard junkies like me. Definitely consider adding Shift+Click and Ctrl+Click for extracting multiple files at once.
  • The log is fine, but if you put Entry Details in a status bar and move Commands to menus, it will be sitting there on its own. Consider moving it beneath the file tree and decreasing its size. It might be useful to include where things were extracted to in the log, in case people don't know or forgot. Also, consider moving the credits into a Help->About menu and adding contact information for bug reports and updates.
  • Consider adding extraction progress in percentage form to the log. Extract All takes a while to finish, so it's nice to know how far it's gotten.
  • Consider adding some indication of the path and filename of the PK2 file that is currently open to the title of the window and in the log. I maintain three installations of Silkroad: iSRO, kSRO and a backup of iSRO, so it's definitely important for me to avoid mixing up installations. A full path would be redundant in most cases, so I suggest a path cut down the the PK2 file itself and the directory it's contained in.
  • A grep-style search would be awesome for cross referencing files, with or without regex. Also consider adding adding a wildcard to the search function.
  • Not a huge issue, but any file named in Korean will have its name show up (and be extracted as) mojibake. This is just a code page issue, so it may be a good idea to note that using AppLocale will fix it in your documentation.
Pk2Editor
  • First and foremost, a potential bug: I was unable to open files in Pk2Editor on a Guest (limited) account, because it couldn't access GFXFileManager.dll, even though you redistributed it.
  • The interface seems pretty solid, but I suggest changing the Multiple File Update to use a normal dialog and Shift+Click and Ctrl+Click for selective updating, or just remove it altogether and add this capability into the Single File Update dialog.
  • I'm pretty sure that your idea was for the Multiple File Update to be used for batch patching, so why not add a new patching dialog that uses ZIP files or similar instead, and the directory structure of the archive to determine where files go? Less steps for the user is always good, and forcing a format such as ZIP keeps things simple. It may be a but clunky, but you could reserve readme.txt in the root directory and include a reader to make extraction unnecessary.

Finally, think about integrating DDJ_Viewer somehow. Not sure if there are any versions newer than 1.0.2449.24802, but it seems to have a habit of not working on some machines, (including both of mine), due to an instant exception, so I've been using a recursive batch converter I threw together to convert my DDJs. Because your extractor and injector are separate, I'm not exactly sure where you should include it, but it definitely is of value.
Image

User avatar
[SD]Kratos
Senior Member
Posts: 4785
Joined: Mon Apr 24, 2006 9:48 am
Quick Reply: Yes
Location: Venus

Post by [SD]Kratos »

lol that was so geek o_o
Image

User avatar
SCArchon
Regular Member
Posts: 233
Joined: Mon Apr 09, 2007 2:25 pm
Quick Reply: Yes
Location: Aege
Contact:

Post by SCArchon »

and why didn't you make this a year ago WHYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY
it looks super duper useful :O.
Image
PK2 lover
Thank you HyorunmarouZ for signature =)

User avatar
Babo
New Member
Posts: 29
Joined: Mon Jun 04, 2007 8:51 pm
Quick Reply: Yes
Location: Odin

Post by Babo »

Doesnt look that usefull , there easier way to do this

User avatar
Cruor
Loyal Member
Posts: 1999
Joined: Wed Apr 12, 2006 1:22 am
Quick Reply: Yes
Location: Off topic

Post by Cruor »

Babo wrote:Doesnt look that usefull , there easier way to do this

You are either ignorant, or blind.
Image

User avatar
SCArchon
Regular Member
Posts: 233
Joined: Mon Apr 09, 2007 2:25 pm
Quick Reply: Yes
Location: Aege
Contact:

Post by SCArchon »

Babo wrote:Doesnt look that usefull , there easier way to do this

all right, have fun extracting things, searching for strings, looking up other entries, copying and pasting them, changing the values, injecting it back in, going back on silkroad and watching it crash, cutting your wrist, swearing in.. i'll shut up now.
Image
PK2 lover
Thank you HyorunmarouZ for signature =)

User avatar
Babo
New Member
Posts: 29
Joined: Mon Jun 04, 2007 8:51 pm
Quick Reply: Yes
Location: Odin

Post by Babo »

SCArchon wrote:
Babo wrote:Doesnt look that usefull , there easier way to do this

all right, have fun extracting things, searching for strings, looking up other entries, copying and pasting them, changing the values, injecting it back in, going back on silkroad and watching it crash, cutting your wrist, swearing in.. i'll shut up now.


Funny , but i have easier ways than what you just said.It only takes me 1 mins to take something out and put something in .

cin

Post by cin »

Babo wrote:
SCArchon wrote:
Babo wrote:Doesnt look that usefull , there easier way to do this

all right, have fun extracting things, searching for strings, looking up other entries, copying and pasting them, changing the values, injecting it back in, going back on silkroad and watching it crash, cutting your wrist, swearing in.. i'll shut up now.


Funny , but i have easier ways than what you just said.It only takes me 1 mins to take something out and put something in .

make us a guide. if pk2 newbies like me can do this stuff within a minute, i
migh add your guide to the sticky. if you do not provide us with such a guide,
then please, stop talking shit in this topic. drew did an awesome job writing
this, even cruor (yes. even cruor) tells us so.

next time you tell everyone there is an easier way, after they took the time
to make it easy for newbies, then make sure you can easily back it up with
1 or 2 steps to do it.

this one will be stickied in the main sticky soon.

User avatar
ranger4life
Addicted Member
Posts: 2526
Joined: Thu Mar 16, 2006 11:05 pm
Quick Reply: Yes
Location: Off Topic

Post by ranger4life »

its very useful imo, tired of doing the same things by switching xvi to hexedit and shit, i like this a lot
Image

User avatar
Drew_Benton
Active Member
Posts: 639
Joined: Mon Oct 16, 2006 8:46 pm
Quick Reply: Yes
Location: Texas

Post by Drew_Benton »

Thanks a bunch guys for the feedback!

Here is the source code for this project if anyone is interested as this is my last project for Silkroad: http://rapidshare.com/files/80870969/Pk2Tools_src.zip

(I used Visual Studio 2003 for the project, but you can open the .cpp and .h files in any text editor)

User avatar
XMoshe
Ex-Staff
Posts: 17293
Joined: Sun Apr 09, 2006 10:13 am
Location: Ghosting around

Re: [Release] PK2 Tools 1.0

Post by XMoshe »

Damn...Overlooked this thread O_o

*Bookmarked*
Image
Props to chrisorg for the sig <3

User avatar
Nixie
Frequent Member
Posts: 1108
Joined: Fri Aug 03, 2007 7:58 am
Quick Reply: Yes
Location: Off Topic
Contact:

Re: [Release] PK2 Tools 1.0

Post by Nixie »

Is it possible to make a tool, that can delete entries? Would be awesome (I've added some things, but want delete them now). :)
<< banned for proof of botting. -cin >>

User avatar
nosoyeso
New Member
Posts: 35
Joined: Tue Jul 24, 2007 4:00 am
Quick Reply: Yes
Location: front to monitor

Re: [Release] PK2 Tools 1.0

Post by nosoyeso »

FU_CK YEAH SEAKING!

and thanks so much for include the source, open source software FTW!!!

Image

User avatar
JanChlpik
Common Member
Posts: 151
Joined: Sun Mar 23, 2008 11:46 pm
Quick Reply: Yes
Location: Czech
Contact:

Re: [Release] PK2 Tools 1.0

Post by JanChlpik »

Thanks
Does directory name when doing multiple file update matter or can have there any files you want update?
My threads:
CSRO/KSRO fully english(premade) + anySRO fully english
Media.pk2 Revealed [56k Warning]
[Release]DDJ/DDS converter
All europe quest

Inactive.
Send me pm if something is not working. But reply may take longer.

User avatar
piXie_niXie
Active Member
Posts: 666
Joined: Wed Feb 13, 2008 2:23 pm
Quick Reply: Yes
Location: Venice

Re: [Release] PK2 Tools 1.0

Post by piXie_niXie »

these are probably the most useful tools for pk2 editing out there, i suggest you sticky this topic
Avalon = Big-Brother

User avatar
JanChlpik
Common Member
Posts: 151
Joined: Sun Mar 23, 2008 11:46 pm
Quick Reply: Yes
Location: Czech
Contact:

Re: [Release] PK2 Tools 1.0

Post by JanChlpik »

Wonder why avira reports it(PK2 editor) as SPR/HiddenCamera.L, but it is possibly due to code. As some antivirus dont recognize if the program is dangerous or the code is just necessary for program funktion. I can say only thats its possibly false positive, as I had no probs with it and it does not work alone.
My threads:
CSRO/KSRO fully english(premade) + anySRO fully english
Media.pk2 Revealed [56k Warning]
[Release]DDJ/DDS converter
All europe quest

Inactive.
Send me pm if something is not working. But reply may take longer.

User avatar
BeyondLimitz
New Member
Posts: 37
Joined: Fri Aug 08, 2008 6:57 pm
Quick Reply: Yes
Location: Hera

Re: [Release] PK2 Tools 1.0

Post by BeyondLimitz »

My avg scanned this and it says pk2 editor has a Potentially harmful program logger.EFL and the
pk2extractor = Adware Generic3.DDM :? SPYWARE? but i downloaded it from another guide i think
Image

User avatar
[TS]=Hark=[TS]
Loyal Member
Posts: 1596
Joined: Thu Feb 01, 2007 9:16 pm
Quick Reply: Yes
Location: Black Desert Online

Re: [Release] PK2 Tools 1.0

Post by [TS]=Hark=[TS] »

nice but id never able to figure out someting like that. only pk2 editing i ever did was changing gears to look like 8D back when i was 40 at the 80cap xD. i used a guide from this forums tho it was really helpfull. its bookmarkd on my firefox, id link it but firefox is not working :S crashes my computer everytime i try to open it or uninstall it. so i leave it be and use IE lol.
Image
^^ mAd propps to Verfo for the sig:P thankx man!

User avatar
Elysium
Regular Member
Posts: 294
Joined: Tue Apr 25, 2006 2:26 pm
Quick Reply: Yes
Location: Maya

Re: [Release] PK2 Tools 1.0

Post by Elysium »

You can pk2 edit Stealth and Invisible skills to like Bezerk. So you see people stealthed and invisble look like bezerk but walking slowly. Isn't this cheating?

User avatar
Nixie
Frequent Member
Posts: 1108
Joined: Fri Aug 03, 2007 7:58 am
Quick Reply: Yes
Location: Off Topic
Contact:

Re: [Release] PK2 Tools 1.0

Post by Nixie »

Elysium wrote:You can pk2 edit Stealth and Invisible skills to like Bezerk. So you see people stealthed and invisble look like bezerk but walking slowly. Isn't this cheating?

Exactly. That's why I've quit my rogue, you can't even protect a trader with it because nearly everyone uses this (hide near the trader, in case a thief pops up just surprise him with a nice crit ^^).
<< banned for proof of botting. -cin >>

User avatar
penfold1992
Senior Member
Posts: 4059
Joined: Sun Apr 22, 2007 9:48 am
Quick Reply: Yes
Location: Uranus

Re: [Release] PK2 Tools 1.0

Post by penfold1992 »

Nixie wrote:
Elysium wrote:You can pk2 edit Stealth and Invisible skills to like Bezerk. So you see people stealthed and invisble look like bezerk but walking slowly. Isn't this cheating?

Exactly. That's why I've quit my rogue, you can't even protect a trader with it because nearly everyone uses this (hide near the trader, in case a thief pops up just surprise him with a nice crit ^^).


they havnt pk2 edited it... they get it with the bot usually
Image

User avatar
simukis
Hi, I'm New Here
Posts: 2
Joined: Fri Sep 12, 2008 1:48 pm
Quick Reply: Yes
Location: Lithuania

Re: [Release] PK2 Tools 1.0

Post by simukis »


User avatar
XMoshe
Ex-Staff
Posts: 17293
Joined: Sun Apr 09, 2006 10:13 am
Location: Ghosting around

Re: [Release] PK2 Tools 1.0

Post by XMoshe »

simukis wrote:http://www.virustotal.com/analisis/e8a6c494bc5eb47412b964663631dcf0
Virus!


Month later...Good job idiot, and it's safe...It's a virus just like the one in the sro's client.
Image
Props to chrisorg for the sig <3

User avatar
Nixie
Frequent Member
Posts: 1108
Joined: Fri Aug 03, 2007 7:58 am
Quick Reply: Yes
Location: Off Topic
Contact:

Re: [Release] PK2 Tools 1.0

Post by Nixie »

[SW]XMoshe wrote:
simukis wrote:http://www.virustotal.com/analisis/e8a6c494bc5eb47412b964663631dcf0
Virus!


Month later...Good job idiot, and it's safe...It's a virus just like the one in the sro's client.

Plus, he has just 1 post. lol ^^
<< banned for proof of botting. -cin >>

User avatar
penfold1992
Senior Member
Posts: 4059
Joined: Sun Apr 22, 2007 9:48 am
Quick Reply: Yes
Location: Uranus

Re: [Release] PK2 Tools 1.0

Post by penfold1992 »

Nixie wrote:
[SW]XMoshe wrote:
simukis wrote:http://www.virustotal.com/analisis/e8a6c494bc5eb47412b964663631dcf0
Virus!


Month later...Good job idiot, and it's safe...It's a virus just like the one in the sro's client.

Plus, he has just 1 post. lol ^^


lol didnt notice that xD

OH EM GHEE I GOT HACKED GIVE ME MONEY AND PLVL TO 60 PLZ ON XAIN (from some1 with <5 posts xD)

ps. i wasnt begging ^ it was a joke.
Image

Post Reply

Return to “Guides and Tutorials”