Tokeiburu 229 Posted June 20, 2014 File Name: GRF Editor File Submitter: Tokeiburu File Submitted: 20 Jun 2014 File Category: Client Resources ** This program has been orignally uploaded on rAthena; it's been uploaded on Hercules due to multiple requests. If you have suggestions or feedback and you want a quick response, please contact me via rAthena. I will respond on Hercules' forum as well, but it'll take a bit longer . Hey everyone, This is a GRF tool I started to develop for my own personnal use, but I thought I'd share it since I've upgraded the UI. Its primary goal is to be easy to use while offering a wide variety of options and customizations. The software is quite stable and can handle large operations easily. How to install Download the zip archive provided from the download link at the bottom of this description or directly from there : http://www.mediafire.com/?aflylbhblrzpz0h Install the application with GRF Editor Installer.exe; if you are missing a .NET Framework you will be prompted to download it. Once you are done, you can start the program from the link on your desktop. Key features Overall speed is faster (or at least equal) than any GRF tool. Common operations : add, delete, merge, extract, preview, save. Undo and redo for any operation. It can open any GRF file. Clean and very interactive interface. Saving formats supported : 0x200, 0x103 and 0x102 (through the Settings page). Instant filter and search options (example : "map .gat"). File association and context menus integration for .grf, .gpf and .rgz (through the Settings page). Can rebuild separated images into one file easily. Lub decompilation (in beta, but it can decompile almost any lub file so far). Drag and drop (with the ALT key, can be modified in the Settings page). This is a big part of the software; most of the items can be moved around within the application itself or from/to Windows Explorer. Tools Sprite editor : a simple sprite editor with powerful features. Semi-transparent images can be added, you can easily change the order or replace images, etc. This tool can convert images in the wrong type by showing you multiple solutions (merging a new palette, dithering the image by using current palette, using the closest color, and a few more). Grf validation : allows you to validate a GRF with multiple settings. It can detect corrupted GRF entries, invalid sprites, empty files, non-GRF files, duplicate files and a lot more. Flat maps maker : generates flat maps from .gat and .rsw files. Useful to generate WoE maps or to fasten up the loading time. Patch maker : generates a GRF patch based on two different GRFs. Hash viewer : shows the hash code (both CRC32 and MD5) for files. Image converter : converts an image to any format requested (BMP, PNG, JPG, TGA). GrfCL : used to create batch files (.bat) which can automate tasks on GRF files. See the content in GrfCL.rar in the download for more information. This tool can be customized from the sources as well. Palette recolorer : creates new sprites by changing their colors (this tool is now deprecated). Client database editor : allows modifications of the database client files (txt and lua) with easy and simple tools. Work in progress. Grf encryption The encryption feature has been enabled again. It's similar to what it used to be and it has been tested on client versions ranging from 2012-08-01 to 2014-02-05. Some error messages will be displayed if necessary. If you have an issue, copy the error message (with the code, if there's one) and send me the client executable with the cps.dll file generated by GRF Editor. There shouldn't be compatibility issues anymore though! Technical stuff Requires .Net Framework 3.5 (SP1) Client Profile to run (3.5 or more will work as well). Automatically converts file name encoding to their proper values (you can change the encoding). Data virtualization is used as much as possible to preview files, meaning the files aren't completely loaded. Right-clicking an item will bring up the available options with that file. Preview file formats : txt, log, xml, lua, lub, bmp, png, tga, jpp, db, ebm, pal, gnd, rsw, gat, rsm, str, spr, act, imf, fna and wav. Services are "crash ready", meaning that you will be warned about a failed operation and no work will be lost (the application won't close and crash). It tries to continue operating even if it meets unsual conditions. Operations can be cancelled by clicking on the button near the progress bar. The warning level can be changed to avoid messages like "Please select a folder first." When prompted with an error, use Ctrl-C to copy the current dialog's content. Some screenshots! 1) Previewing an act file, while showing the search feature 2) Preview of a model file (rsm) 3) Preview of GrfCL with the MakeGrf command 4) Preview of the Client Database Editor 5) Preview of Grf validation 6) Search feature (press Ctrl-F or Ctrl-H to bring up within a text editor) Sources : http://www.mediafire.com/download.php?7z6hkdag4ayj8rs Got a feedback? I'd gladly hear you out and fix issues you have with the program. If you want new features to be added, don't hesitate to ask! Click here to download this file 16 MaminhA, cJei, Bruno Nogueira and 13 others reacted to this Quote Share this post Link to post Share on other sites
Bruno Nogueira 15 Posted June 20, 2014 oh, excellent... GREAT JOB!! Quote Share this post Link to post Share on other sites
Brynner 34 Posted June 20, 2014 wow nice tools. thank you for sharing Quote Share this post Link to post Share on other sites
MaminhA 0 Posted June 21, 2014 Amazing, Tokeiburu! Do you plan to release the newer source? Thanks! Quote Share this post Link to post Share on other sites
Tokeiburu 229 Posted June 22, 2014 Thank you everyone! Amazing, Tokeiburu! Do you plan to release the newer source? Thanks! Yep, I just updated the code to the latest version. Some projects have been removed from the original solution though. Quote Share this post Link to post Share on other sites
Darkpurple 1 Posted June 29, 2014 (edited) Grf encryption This feature has been disabled, only decryption is possible. Why disabled Grf encryption This is very functional which many user want it. And can let this tool to support other language like big5?. (change to utf-8 code should be better) Edited June 29, 2014 by Darkpurple Quote Share this post Link to post Share on other sites
Tokeiburu 229 Posted July 1, 2014 (edited) Grf encryption This feature has been disabled, only decryption is possible. Why disabled Grf encryption This is very functional which many user want it. And can let this tool to support other language like big5?. (change to utf-8 code should be better) You can change the encoding to anything you want. You just need to know the codepage associated with it! In your case, Big5 is 950, so go in Tools > Settings > General > Display encoding > Other... > 950. As for UTF-8, the fontstyle doesn't support it. You'll want to use UTF-7 instead, which has the codepage 65000 (edit : don't use, it will break your GRF when saving, you can use it for extracting though). A fair warning though : if the encoding isn't supported or if you see many "???", reload the GRF immediatly. It will break your GRF when saving otherwise (because the GRFs save the paths in ANSI - codepage 1252). You should be more than fine with just ANSI and Korean codepages though. As for the encryption feature, it's still disabled because of some incompatibility with newer clients. I would like to reenable it, but testing every single client takes a long time. Edited July 1, 2014 by Tokeiburu Quote Share this post Link to post Share on other sites
MaminhA 0 Posted July 22, 2014 (edited) Hey, Tokeiburu; Do you plan to make the Client Database Editor compatible with the newer syntax of Hercules' item_db? Thanks a lot! @Edit Also, the exported Lua file from the Client Database Editor is making a broken file: when the description of an item has a quotation mark, the Lua needs a backslash before the quotation mark, but the exported Lua doesn't have it and the file itself is broken. Edited July 22, 2014 by MaminhA Quote Share this post Link to post Share on other sites
Tokeiburu 229 Posted August 1, 2014 (edited) Hey, Tokeiburu; Do you plan to make the Client Database Editor compatible with the newer syntax of Hercules' item_db? Thanks a lot! @Edit Also, the exported Lua file from the Client Database Editor is making a broken file: when the description of an item has a quotation mark, the Lua needs a backslash before the quotation mark, but the exported Lua doesn't have it and the file itself is broken. Heya, Sorry for the delay, CDE is already compatible with the newer syntax of Hercules (unless it has been changed again). The extension of the item_db must end with .conf though, otherwise it will use the default parser. The exported lua/txt files won't be broken anymore either, thanks for the bug report! (The file is pending validation, the link should be up soon enough.) I remade CDE from scratch pretty much and it's now much easier to manage/modify. If you have specific requests about it, please let me know. Edited August 1, 2014 by Tokeiburu Quote Share this post Link to post Share on other sites
Samuel 83 Posted September 30, 2014 So how does the grf encryption works? Thanks in advance! Quote Share this post Link to post Share on other sites
Tokeiburu 229 Posted September 30, 2014 So how does the grf encryption works? Thanks in advance! You will need the latest version from the mediafire link (1.6.7.5) : http://www.mediafire.com/download/aflylbhblrzpz0h There are two ways to encrypt files, but first, you'll want to setup your client. Go in Tools > GRF Encryption Put your encryption password in the first box (you can save the credentials to a .grfkey format if you plan on using the encryption often, but make sure this file is not shared with anyone else). Select your client executable (the name of the executable cannot be changed afterwards). Put your new cps.dll name. This cannot exceed 7 characters. You can simply leave it as "cps.dll", which won't require an edited client. Click on Generate files. If everything went well, a window should show up with your new cps.dll file selected (and the client, if it needed modifications). Screenshot below after you generate your client files. Copy the new generated files to your client folder. That's it for the client configuration. As for the GRF actual encryption now... Open your GRF in GRF Editor. If you want to encrypt your entire GRF, go in Tools > GRF Encryption, click on Encrypt GRF (might ask you for your password). The process should be rather quick, the output GRF is your new encrypted GRF. You can also encrypt specific files if you want : right-click the items you want to encrypt and use Encryption > Encrypt. Save your GRF. Encrypted files will show in orange. When opening up an encrypted GRF, GRF Editor will prompt you for your credentials (hence why it's useful to save your password somewhere, then you can quickly load it with Key... > Load recent > your key.grfkey) : To make encrypted Thor patches, create a new Thor file from File > New > New Thor. Add a data folder and add your files in there. This is the same process as above : right-click, Encryption > Encrypt. Make sure you use the same password/key. Go in the Container options tab and set your target GRF (as shown below). Once saving, you will no longer be able to modify your encrypted Thor patch though (the files will become unreadable). Also, always test your Thor patches to make sure everything is working fine. That should cover most of it xD! If you have further questions, go ahead. 6 Samuel, evilpuncker, Angelmelody and 3 others reacted to this Quote Share this post Link to post Share on other sites
Samuel 83 Posted October 17, 2014 So how does the grf encryption works? Thanks in advance! You will need the latest version from the mediafire link (1.6.7.5) : http://www.mediafire.com/download/aflylbhblrzpz0h There are two ways to encrypt files, but first, you'll want to setup your client. Go in Tools > GRF Encryption Put your encryption password in the first box (you can save the credentials to a .grfkey format if you plan on using the encryption often, but make sure this file is not shared with anyone else). Select your client executable (the name of the executable cannot be changed afterwards). Put your new cps.dll name. This cannot exceed 7 characters. You can simply leave it as "cps.dll", which won't require an edited client. Click on Generate files. If everything went well, a window should show up with your new cps.dll file selected (and the client, if it needed modifications). Screenshot below after you generate your client files. Copy the new generated files to your client folder. That's it for the client configuration. As for the GRF actual encryption now... Open your GRF in GRF Editor. If you want to encrypt your entire GRF, go in Tools > GRF Encryption, click on Encrypt GRF (might ask you for your password). The process should be rather quick, the output GRF is your new encrypted GRF. You can also encrypt specific files if you want : right-click the items you want to encrypt and use Encryption > Encrypt. Save your GRF. Encrypted files will show in orange. When opening up an encrypted GRF, GRF Editor will prompt you for your credentials (hence why it's useful to save your password somewhere, then you can quickly load it with Key... > Load recent > your key.grfkey) : To make encrypted Thor patches, create a new Thor file from File > New > New Thor. Add a data folder and add your files in there. This is the same process as above : right-click, Encryption > Encrypt. Make sure you use the same password/key. Go in the Container options tab and set your target GRF (as shown below). Once saving, you will no longer be able to modify your encrypted Thor patch though (the files will become unreadable). Also, always test your Thor patches to make sure everything is working fine. That should cover most of it xD! If you have further questions, go ahead. Sorry for the very late reply.. Hmm, once I used an encrypted grf, should all my thor patch be encrypted as well? Thanks! Quote Share this post Link to post Share on other sites
Litro 45 Posted November 11, 2014 is there is specific thor patcher version to use or it can be used in all version ? Quote Share this post Link to post Share on other sites
Tokeiburu 229 Posted November 17, 2014 is there is specific thor patcher version to use or it can be used in all version ? It should, in theory, work with all recent versions of Thor Patcher. Although that cannot be guaranteed forever as I do not have control over the thor format. I doubt it'll change anytime soon and if it ever does, I'll simply update the software to support it anyway ;]. Quote Share this post Link to post Share on other sites
Angelmelody 221 Posted December 1, 2014 (edited) Hi~Tokeiburu, I'd like to suggest that adding word's copy feature on search result window so that we can easily obtain the full file pathes without retyping again. Edited December 1, 2014 by Angelmelody Quote Share this post Link to post Share on other sites
Tokeiburu 229 Posted December 3, 2014 Hi~Tokeiburu, I'd like to suggest that adding word's copy feature on search result window so that we can easily obtain the full file pathes without retyping again. Heya, You can use Ctrl-C after selecting an item in the search results. The same goes for the tree view and the other folder list view. In the next release, you'll be able to copy multiple items at once though, which will be more handy than one by one. 1 Angelmelody reacted to this Quote Share this post Link to post Share on other sites
evilpuncker 503 Posted December 4, 2014 Hi~Tokeiburu, I'd like to suggest that adding word's copy feature on search result window so that we can easily obtain the full file pathes without retyping again. Heya, You can use Ctrl-C after selecting an item in the search results. The same goes for the tree view and the other folder list view. In the next release, you'll be able to copy multiple items at once though, which will be more handy than one by one. this tool is so awesome =D do you have any plan on doing some tool to create/edit palette (.pal) files? that would be awesome since we don't have any tool for it anymore =/ (I'm talking about hair and dye colors) Quote Share this post Link to post Share on other sites
Tokeiburu 229 Posted December 5, 2014 this tool is so awesome =D do you have any plan on doing some tool to create/edit palette (.pal) files? that would be awesome since we don't have any tool for it anymore =/ (I'm talking about hair and dye colors) Well I already made a palette editor utility, which has undergone many changes over time. The last supported one has been implemented inside Act Editor and can be accessed via Edit > Palette editor... That being said, this tool may not do what you're looking (it's targeted to edit the palette of sprite files). So... what exactly are the features you're looking for? Automatic palette generation? Just a basic palette editor? Do you want the tool to be embedded within GRF Editor (with a preview tab for instance? or simply via the Tools menu?) or as a standalone application? If you have something specific in mind, that would be greatly helpful. Quote Share this post Link to post Share on other sites
evilpuncker 503 Posted December 6, 2014 this tool is so awesome =D do you have any plan on doing some tool to create/edit palette (.pal) files? that would be awesome since we don't have any tool for it anymore =/ (I'm talking about hair and dye colors) Well I already made a palette editor utility, which has undergone many changes over time. The last supported one has been implemented inside Act Editor and can be accessed via Edit > Palette editor... That being said, this tool may not do what you're looking (it's targeted to edit the palette of sprite files). So... what exactly are the features you're looking for? Automatic palette generation? Just a basic palette editor? Do you want the tool to be embedded within GRF Editor (with a preview tab for instance? or simply via the Tools menu?) or as a standalone application? If you have something specific in mind, that would be greatly helpful. standalone or tools menu is fine, (maybe tool menu is faster and easier for you tho xD) features I'd like - generate random palette - edit palette - save palette with different patterns for names, I mean, the original RO client uses bunches of files for palette names, but actually we can use the NEMO format with SharedBodyPalettes and SharedHeadPalettes diffs so we have only 1 .pal file for all classes - preview of character with selectable job and possibility to rotate or animate him can't think of anything more Quote Share this post Link to post Share on other sites
mrlongshen 22 Posted February 16, 2015 I have try to secure a folder. But its will prompt error in game The folder is texture / À¯ÀúÀÎÅÍÆäÀ̽º I try to secure the pallete, but its not working too. Quote Share this post Link to post Share on other sites
Tokeiburu 229 Posted February 16, 2015 I have try to secure a folder. But its will prompt error in game The folder is texture / À¯ÀúÀÎÅÍÆäÀ̽º I try to secure the pallete, but its not working too. Could you be more specific? The encryption's working fine over here. Have you updated your client files (cps.dll and client) to enable the encryption? Quote Share this post Link to post Share on other sites
mrlongshen 22 Posted February 17, 2015 I have try to secure a folder. But its will prompt error in game The folder is texture / À¯ÀúÀÎÅÍÆäÀ̽º I try to secure the pallete, but its not working too. Could you be more specific? The encryption's working fine over here. Have you updated your client files (cps.dll and client) to enable the encryption? How? can you make a tutorial with a picture ? Quote Share this post Link to post Share on other sites
Tokeiburu 229 Posted February 17, 2015 How? can you make a tutorial with a picture ? You can simply check the previous page ( http://herc.ws/board/topic/6047-grf-editor/?p=44463 ). This should contain enough information for your needs! Quote Share this post Link to post Share on other sites
mrlongshen 22 Posted February 17, 2015 How? can you make a tutorial with a picture ? You can simply check the previous page ( http://herc.ws/board/topic/6047-grf-editor/?p=44463 ). This should contain enough information for your needs! Yes my client are up to dated and I have follow your instruction. But after encryption, I try to login, and there was an error. All file in grf can be encrypt right? Quote Share this post Link to post Share on other sites