Silkroad Online Forums

A community forum for the free online game Silkroad Online. Discuss Silkroad Online, read up on guides, and build your character and skills.

Faq Search Members Chat  Register Profile Login

All times are UTC




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: [RELEASE] PK2 Tools 1.0
PostPosted: Fri Dec 28, 2007 8:54 pm 
Active Member
User avatar
Offline

Joined: Oct 2006
Posts: 639
Location: Texas
The following is a guide archive for your browsing pleasure.
Should you wish to post comments, suggestions, or simply a thank you, the following link will take you to the main, unlocked, guide:
- Original Guide -







2 weeks ago I posted this thread: 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.

Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 31, 2007 3:34 am 
Loyal Member
User avatar
Offline

Joined: Apr 2006
Posts: 1999
Location:
Off Topic
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group