Jump to content

GRF: GRF Editor


Tokei

Recommended Posts


  • Group:  Members
  • Topic Count:  42
  • Topics Per Day:  0.01
  • Content Count:  1096
  • Reputation:   344
  • Joined:  02/26/12
  • Last Seen:  

4 hours ago, Radian said:

Did you try to decrypt others GRF?

I know several guys which removed several times GRF Editor encryption. So the guy above is correct. I don't know details, but i saw encrypted, then unencrypted grf after some time (I guess somehow extracted keys from exe / cps dll or I dunno).

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  10
  • Reputation:   1
  • Joined:  07/27/12
  • Last Seen:  

On 03/03/2018 at 10:35 PM, Radian said:

Did you try to decrypt others GRF?

I didn't try to decrypt .

But I know someone sells the decrypted GRF resources

 

On 04/03/2018 at 2:39 AM, Anacondaqq said:

I know several guys which removed several times GRF Editor encryption. So the guy above is correct. I don't know details, but i saw encrypted, then unencrypted grf after some time (I guess somehow extracted keys from exe / cps dll or I dunno).

GRF encryption only encrypts the files header.

GE modifies exe only to handle the part of the cps.dll name, and does not modify the other content

 

 

I use GrfTool open the GE encrypted grf files ..See one file name is __encryption.info, maybe this is the decipher's entry point

and I have a better idea, is the secret key stored in a file, let the encryption which file to choose to hide in

Ex : xxxx.pal Dyed file....Ah..There are tens of thousands or hundreds of thousands of documents

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  657
  • Reputation:   662
  • Joined:  11/12/12
  • Last Seen:  

Heya,

Here is the issue with any GRF encryption. No matter how strong it is, no matter how complex it gets, If someone is really willing to decrypt a GRF (and has enough knowledge), they'll be able to. The problem is that the protection is client-sided and your client needs to be able to decrypt the content to be able to access your files. So the deciphering code is in 'plain sight' on your computer. And no, __encryption.info doesn't do anything, it's simply a file to let GRF Editor know the GRF is encrypted and that it should scan the files when you open it. Deleting it wouldn't change anything and hiding it wouldn't achieve much either.

And another no, GRF Editor encrypts the files you select entirely, not just the file header. Your client needs to be able to access the filename table to know where it is in your GRF. It's possible to encrypt the table, but then it makes it impossible to patch these GRFs (Thor Patcher needs to know your file positions in the GRF). Not that it would change much either way, it's simply more convenient to not encrypt the file table.

Link to comment
Share on other sites

  • 1 month later...

  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  65
  • Reputation:   7
  • Joined:  06/06/12
  • Last Seen:  

@Tokei Hi, i have a suggestion for the GRF editor, could be very helpful mainly for those servers with a lot of updates. Have the possibility to run a python script inside the program with some functions, giving the option to make patches, compress grfs via those functions.

Thanks!

Link to comment
Share on other sites

  • 3 weeks later...

  • Group:  Developer
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  141
  • Reputation:   45
  • Joined:  08/14/12
  • Last Seen:  

GrfCL seems broken, I can't run any of the example BAT scripts.

9ee415826a.png

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  99
  • Topics Per Day:  0.02
  • Content Count:  623
  • Reputation:   94
  • Joined:  05/11/12
  • Last Seen:  

@Tokei

 

unfortunately it is not working with client 2018.

You apply encryption, but the client does not read the folders correctly.

Link to comment
Share on other sites

  • 3 months later...

  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  3
  • Reputation:   0
  • Joined:  03/19/13
  • Last Seen:  

great tool!

can you sharing this  source?

I want to know how this program opens the current GRF file.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  53
  • Topics Per Day:  0.01
  • Content Count:  411
  • Reputation:   260
  • Joined:  04/25/12
  • Last Seen:  

17 hours ago, ine0706 said:

great tool!

can you sharing this  source?

I want to know how this program opens the current GRF file.

You can get some idea by looking in SDE, too by Tokei.

https://github.com/Tokeiburu/RagnarokSDE/tree/master/SDE

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  10
  • Reputation:   0
  • Joined:  03/01/13
  • Last Seen:  

Hey, had to stop by to say thank you for this great work, very much thanks.

And ask if by any change would u release the grf editor source or at least the encrypt/decrypt function.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  25
  • Reputation:   0
  • Joined:  04/18/13
  • Last Seen:  

There used to be a source code link, but it's gone now.

The original source code mediafire link does not work last time I checked.

The source code is probably somewhere on my HDD.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  1
  • Reputation:   0
  • Joined:  03/02/12
  • Last Seen:  

The version provided on the "Download this file" button is outdated compared to the version available on MediaFire.

Please update them.

Link to comment
Share on other sites

  • 4 weeks later...

  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  657
  • Reputation:   662
  • Joined:  11/12/12
  • Last Seen:  

On 8/30/2018 at 8:29 PM, KrasH said:

The version provided on the "Download this file" button is outdated compared to the version available on MediaFire.

Please update them.

The latest version is always provided with the latest mediafire link.

Updated to 1.8.2.7:

  • Fixed a bug when adding a large number of files that ended up ignoring some of the added files.
  • Updated GRF Editor Decompiler to fix some annoying issues with the LUB files.
    • The "Use GRF Editor Decompiler" can no longer be unchecked.
    • Removed the third-party luadec decompilers.
  • Esc now works in the Text encoding window.
  • The Image converter tool now works in batches and automatically set purple (and its variants) as transparent.
  • Added more default paths when making thor files.
  • Extracting broken directory links will no longer stop the file extraction.

Brought back the software's sources for those interested:

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  45
  • Topics Per Day:  0.01
  • Content Count:  715
  • Reputation:   83
  • Joined:  01/05/12
  • Last Seen:  

@Tokei What client range does the grf encryption supported? because i tryed using 2018-03-21 but the client didnt open but when i tryed removing the encryption the client works fine perfectly.

Link to comment
Share on other sites

  • 1 month later...

  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  5
  • Reputation:   0
  • Joined:  11/18/18
  • Last Seen:  

Hi Tokei,

Can you open source GRF Editor? I am looking to build a new client using kRO data files. I will need to read and write the data files. Now GRF Editor can do those.

 

I found the sources. Thank you Tokei.

Edited by AAABBB
Stick to topic
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  6
  • Reputation:   0
  • Joined:  04/13/18
  • Last Seen:  

I'm trying to edit status curse. here's what I have https://goo.gl/T26aVo
but whenever I try to put it in grf editor, this error shows up. help?

--------------          Message          --------------
Offset and length were out of bounds for the array or count is greater than the number of elements from index to the end of the source collection.
--------------        Stack trace        --------------
   at GrfToWpfBridge.Application.DefaultErrorHandler._reportAnyManagedExceptions(String message, Exception exception, ErrorLevel errorLevel)
   at GrfToWpfBridge.Application.DefaultErrorHandler.Handle(Exception exception, ErrorLevel errorLevel)
   at GRFEditor.WPF.PreviewTabs.FilePreviewTab._baseLoad(FileEntry entry)
   at GRFEditor.WPF.PreviewTabs.FilePreviewTab.<Update>b__2()
   at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart()

--------------         Exception         --------------
System.ArgumentException: Offset and length were out of bounds for the array or count is greater than the number of elements from index to the end of the source collection.
   at System.Buffer.BlockCopy(Array src, Int32 srcOffset, Array dst, Int32 dstOffset, Int32 count)
   at GRF.IO.ByteReader.Bytes(Int32 count)
   at GRF.FileFormats.SprFormat.SprAbstract._readAsBgra32(List`1 rleImages, IBinaryReader reader)
   at GRF.FileFormats.SprFormat.SprAbstract._getImages(Spr spr, IBinaryReader reader, Boolean loadFirstImageOnly)
   at GRF.FileFormats.SprFormat.SprAbstract.GetImages(Spr spr, IBinaryReader reader, Boolean loadFirstImageOnly)
   at GRF.FileFormats.SprFormat.Spr..ctor(Byte[] dataDecompressed, Boolean loadFirstImageOnly)
   at GRF.FileFormats.SprFormat.Spr..ctor(MultiType sprData)
   at GRFEditor.WPF.PreviewTabs.PreviewAct._load(FileEntry entry)
   at GRFEditor.WPF.PreviewTabs.FilePreviewTab._baseLoad(FileEntry entry)

 

Edited by lushisop
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  5
  • Reputation:   0
  • Joined:  11/18/18
  • Last Seen:  

Hi Tokei,

I enjoy using GRF Editor, to play and to use it in new project.

I found a bug in ".gnd" preview with objects loaded. In prontera ".gnd" preview, for example the lamps at the center of the map have wrong transparency. There is no transparency bug when I play in game.

Thank you Tokei.

Hi Tokei,

In game Prontera has WOE flags at the center of the map. The "gnd" preview in GRF Editor does not show the flags. Can you include them?

Link to comment
Share on other sites

  • 1 month later...

  • Group:  Members
  • Topic Count:  27
  • Topics Per Day:  0.01
  • Content Count:  107
  • Reputation:   5
  • Joined:  07/01/14
  • Last Seen:  

On 11/22/2018 at 2:04 PM, AAABBB said:

In game Prontera has WOE flags at the center of the map. The "gnd" preview in GRF Editor does not show the flags. Can you include them?

>_> , the flags are sprites "not related to the mapfiles" , so its not an objects

Link to comment
Share on other sites

  • 2 weeks later...

  • Group:  Developer
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  141
  • Reputation:   45
  • Joined:  08/14/12
  • Last Seen:  

GrfCL.exe is still a little finicky, I can't run the scripts with user input:

D:\RO\GRF Editor v1.8.2.7\GrfCL>.\"New empty GRF.bat"
Name of your GRF : data
#Log : Batch file detected an invalid encoding, changing command line arguments encoding to 1252
#Log : Breaking on general exceptions = True
#Log : Created a new GRF with the name new.grf
Progress : 0.0 %   //
//  GRF Error Handler has thrown an exception :
//  Error level : Warning
//  Message :
        Couldn't save the container file.
//______________________________________________________________________________________________________________________
#Finished
#Log : Saved the GRF to data
#BREAK -- Press any key to continue...

If I replace the input with a hard-coded string (set GRFPath=new32.grf), I get:

#Log : Batch file detected an invalid encoding, changing command line arguments encoding to 1252
#Log : Breaking on general exceptions = True
#Log : Created a new GRF with the name new.grf
#Finished
#Log : Saved the GRF to new32.grf
#BREAK -- Press any key to continue...

I get the same results if i run it through cmd or ps.

 

Any ideas?

I realize I might be one of the few that use this tool, but it's so nice.

PS: Any thoughts on how to generate thor patches?

Edited by nitrous
Link to comment
Share on other sites

  • 1 month later...

  • Group:  Members
  • Topic Count:  107
  • Topics Per Day:  0.02
  • Content Count:  770
  • Reputation:   69
  • Joined:  02/10/12
  • Last Seen:  


--------------          Message          --------------
The wave header is corrupt.
--------------        Stack trace        --------------
   at GrfToWpfBridge.Application.DefaultErrorHandler._reportAnyManagedExceptions(String message, Exception exception, ErrorLevel errorLevel)
   at GrfToWpfBridge.Application.DefaultErrorHandler.Handle(Exception exception, ErrorLevel errorLevel)
   at GRFEditor.WPF.PreviewTabs.FilePreviewTab._baseLoad(FileEntry entry)
   at GRFEditor.WPF.PreviewTabs.FilePreviewTab.<Update>b__2()
   at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart()

--------------         Exception         --------------
System.InvalidOperationException: The wave header is corrupt.
   at System.Media.SoundPlayer.ValidateSoundData(Byte[] data)
   at System.Media.SoundPlayer.LoadAndPlay(Int32 flags)
   at System.Media.SoundPlayer.Play()
   at GRFEditor.WPF.PreviewTabs.PreviewWav._load(FileEntry entry)
   at GRFEditor.WPF.PreviewTabs.FilePreviewTab._baseLoad(FileEntry entry)

@Tokei what the meaning error of this bro?

 

hi, @Tokei i don't its bug or not 
but when i encrypt my grf someplayer still can use merge grf with my encrypt grf
So everybody still can edit my grf, Although I've encrypt my grf. its should need input key before take any action in grf tools?
My english is not good i hope you understand

Link to comment
Share on other sites

  • 1 month later...

  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  657
  • Reputation:   662
  • Joined:  11/12/12
  • Last Seen:  

On 4/3/2019 at 6:30 AM, melv0 said:

hi, @Tokei i don't its bug or not 
but when i encrypt my grf someplayer still can use merge grf with my encrypt grf
So everybody still can edit my grf, Although I've encrypt my grf. its should need input key before take any action in grf tools?
My english is not good i hope you understand

Heya,

Your files are encrypted and they cannot be read/extracted from the GRF. That is the purpose of an encryption tool.

Your GRF is not locked in any way. It can be merged, it can be patched, it can be modified, etc. It's meant to protect your work, sprites, custom maps, etc. What you're looking for is an anti-cheat software and this is not one...!

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  107
  • Topics Per Day:  0.02
  • Content Count:  770
  • Reputation:   69
  • Joined:  02/10/12
  • Last Seen:  

9 hours ago, Tokei said:

Heya,

Your files are encrypted and they cannot be read/extracted from the GRF. That is the purpose of an encryption tool.

Your GRF is not locked in any way. It can be merged, it can be patched, it can be modified, etc. It's meant to protect your work, sprites, custom maps, etc. What you're looking for is an anti-cheat software and this is not one...!

okay sorry for my missunderstanding about encrypt GRF ?
Thanks tokei for your explained
I hope you can update your tools 
when grf already encrypt and use merge tools must input the password encrypt ?
its just sugestion ?

Link to comment
Share on other sites

  • 1 month later...

  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  10
  • Reputation:   1
  • Joined:  07/27/12
  • Last Seen:  

@Tokei...grfcl sEncrypt don't work?

Edited by 86991101
Link to comment
Share on other sites

  • 1 month later...

  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.00
  • Content Count:  88
  • Reputation:   23
  • Joined:  01/30/12
  • Last Seen:  

Hello @Tokei

I don't know the exact reason, but the GRF encryption feature is not working on Wine versions after 2.7, I was using it to protect my palettes.
After the above wine version, the client shows a black palette for head and body, the same effect as if the file was missing.
Tested on older client (2016) and a new one (2018).

618765512_CapturadeTela2019-07-24s13_16_02.png.4e1844662b4468682f121aa436e342d2.png

Can you to help me on this issue? Thank you!

 

Link to comment
Share on other sites

  • 1 month later...

  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  657
  • Reputation:   662
  • Joined:  11/12/12
  • Last Seen:  

Heya,

As of 1.8.3.3, GRF Editor now has a Dark Theme available. You can choose the theme from Tools > Settings > General > Theme.

WMWN3wd.png

  • Upvote 2
  • Love 3
  • MVP 1
Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  153
  • Topics Per Day:  0.04
  • Content Count:  2285
  • Reputation:   745
  • Joined:  06/16/12
  • Last Seen:  

is there documentation page for GrfCL?

using -help in command line, the help lines are too much, can't fit in cli window ?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...