Jump to content

GRF: GRF Editor


Tokei

Recommended Posts


  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  351
  • Reputation:   263
  • Joined:  09/08/13
  • Last Seen:  

@Cydh GrfCL.exe -help > help.txt

  • Upvote 1
Link to comment
Share on other sites

  • 4 weeks later...

  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  43
  • Reputation:   20
  • Joined:  05/05/15
  • Last Seen:  

On 8/28/2019 at 1:59 PM, Tokei said:

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

Dark mode for SDE and ACT editor when? ?

Link to comment
Share on other sites


  • Group:  Content Moderator
  • Topic Count:  22
  • Topics Per Day:  0.00
  • Content Count:  639
  • Reputation:   596
  • Joined:  11/25/11
  • Last Seen:  

First of all, thank you for the software and all the updates through the years.

I would like to report that the Merge between .thor doesn't work at the moment, even in the latest version.
It prompts, but when clicking on Merge it shows the progress bar moving but when it finishes nothing happens.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  51
  • Reputation:   12
  • Joined:  12/07/11
  • Last Seen:  

Gravity added new formats with 17.2 today ?

.rsw Format got version 2.2 adding 1 byte in the header

		// Read header.
		fp      = new BinaryReader(data);
		header  = fp.readBinaryString(4);
		version = fp.readByte() + fp.readByte()/10;
	
		if (header != 'GRSW') {
			throw new Error('RSW::load() - Invalid header "' + header + '", must be "GRSW"');
        }

        if (version >= 2.2) {
            unknown = fp.readByte();
        }

        // Read sub files.
        this.files.ini = fp.readBinaryString(40);
        this.files.gnd = fp.readBinaryString(40);
        this.files.gat = fp.readBinaryString(40);

And it seems like they added a new model format which is used in those maps.

  • waterpond_s_01.rsm2

Hopefully there will be a map converter for this.

Edited by Dia
Link to comment
Share on other sites


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

i cannot seem to use this software, everytime i open it, this message will show up. please help.

Capture.PNG

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:  

Updated GRF Editor to version 1.8.3.4:

  • Added support for RSM2 files and the new RSW format.

 

On 10/2/2019 at 10:11 AM, Enomah said:

i cannot seem to use this software, everytime i open it, this message will show up. please help.

Capture.PNG

You are missing .net 3.5 and 4.0, most likely.

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


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  51
  • Reputation:   12
  • Joined:  12/07/11
  • Last Seen:  

Awesome! Is there any chance to convert rsw 2.2 to rsw 2.1 with rsm1 models so we can load the in old clients?

Edited by Dia
  • Upvote 1
  • Love 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.00
  • Content Count:  69
  • Reputation:   15
  • Joined:  12/06/11
  • Last Seen:  

Hello, it seems that using certain 2018 clients (tested with 20180621 and 0620) the name of the custom DLL at the encripting function is ignored. It always read cps.dll despite of the custom name of the dll.

Thanks for your awesome tool, hope this get fixed.

Edited by Igniz
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:  

3 hours ago, Igniz said:

Hello, it seems that using certain 2018 clients (tested with 20180621 and 0620) the name of the custom DLL at the encripting function is ignored. It always read cps.dll despite of the custom name of the dll.

Thanks for your awesome tool, hope this get fixed.

The "cps.dll" string is there twice in the client executable, the tool only expects one. So you need to change one of them manually before using the tool, or you can just keep cps.dll as the name of the file.

Edited by Tokei
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:  

Actually always get error when try to open rgz file

--------------          Message          --------------
Error GZIP header, first magic byte doesn't match
--------------        Stack trace        --------------
   at GrfToWpfBridge.Application.DefaultErrorHandler._reportAnyManagedExceptions(String message, Exception exception, ErrorLevel errorLevel)
   at GrfToWpfBridge.Application.DefaultErrorHandler.Handle(Exception exception, ErrorLevel errorLevel)
   at GRF.FileFormats.RgzFormat.Rgz._init()
   at GRF.ContainerFormat.ContainerAbstract`1..ctor(ByteReaderStream reader)
   at GRF.Core.GrfContainerProvider.Get(String fileName)
   at GRF.Core.GrfHolder.Open(String fileName, GrfLoadOptions options)
   at GRF.Core.GrfHolder.Open(String fileName)
   at GRFEditor.EditorMainWindow.<>c__DisplayClass129.<Load>b__11d()
   at GRF.Threading.GrfThread.<>c__DisplayClass8.<Start>b__7()
   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         --------------
GRF.Core.GrfCompression.GZip.GZipException: Error GZIP header, first magic byte doesn't match
   at GRF.Core.GrfCompression.GZip.GZipInputStream.ReadHeader()
   at GRF.Core.GrfCompression.GZip.GZipInputStream.Read(Byte[] buffer, Int32 offset, Int32 count)
   at GRF.Core.Compression.GZipDecompress(IProgress container, ByteReaderStream readerB, String decompressedFileName)
   at GRF.FileFormats.RgzFormat.Rgz._init()

 

Link to comment
Share on other sites

  • 2 weeks later...

  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  4
  • Reputation:   1
  • Joined:  03/05/13
  • Last Seen:  

Hey, can help me please

 

I trying execute cli with just one line command, with -enc but don't work

 

works fine:

#Log : Batch file detected an invalid encoding, changing command line arguments encoding to 1252
#Log : Opened GRF C:/patch/example.grf
#Error : An exception has been thrown
#Error : Given command line : .\GrfCL.exe  -open C:/patch/example.grf -extractFiles "" ""
#Error : Command being executed : -extractFiles  <> <>
#Exception : ??? ???????.

 

don't work:

#Log : Batch file detected an invalid encoding, changing command line arguments encoding to 1252
#Error : An exception has been thrown
#Error : Given command line : .\GrfCL.exe  -encode 949 -open C:/patch/example.grf -extractFiles "" ""
#Error : Command being executed : -encode  <949>
#Exception : 'C:\patch\949' ??? ?? ? ????.

 

thx

Edited by Nuck
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:  

11 hours ago, Nuck said:

Hey, can help me please

 

I trying execute cli with just one line command, with -enc but don't work

 

works fine:


#Log : Batch file detected an invalid encoding, changing command line arguments encoding to 1252
#Log : Opened GRF C:/patch/example.grf
#Error : An exception has been thrown
#Error : Given command line : .\GrfCL.exe  -open C:/patch/example.grf -extractFiles "" ""
#Error : Command being executed : -extractFiles  <> <>
#Exception : ??? ???????.

 

don't work:


#Log : Batch file detected an invalid encoding, changing command line arguments encoding to 1252
#Error : An exception has been thrown
#Error : Given command line : .\GrfCL.exe  -encode 949 -open C:/patch/example.grf -extractFiles "" ""
#Error : Command being executed : -encode  <949>
#Exception : 'C:\patch\949' ??? ?? ? ????.

 

thx

The command you're looking for is

-encoding 949

 

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  4
  • Reputation:   1
  • Joined:  03/05/13
  • Last Seen:  

34 minutes ago, Tokei said:

The command you're looking for is


-encoding 949

 

#Log : Batch file detected an invalid encoding, changing command line arguments encoding to 1252
#Error : An exception has been thrown
#Error : Given command line : .\GrfCL.exe  -encoding 949 -open C:/patch/example.grf -extractFiles "" ""
#Error : Command being executed : -encoding  <949>
#Exception : The handle is invalid.

Still don't works

Looks like only the first command is execute

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:  

24 minutes ago, Nuck said:

#Log : Batch file detected an invalid encoding, changing command line arguments encoding to 1252
#Error : An exception has been thrown
#Error : Given command line : .\GrfCL.exe  -encoding 949 -open C:/patch/example.grf -extractFiles "" ""
#Error : Command being executed : -encoding  <949>
#Exception : The handle is invalid.

Still don't works

Looks like only the first command is execute

Hmm, well the following command worked fine on Windows:

GrfCL.exe -encoding 949 -open "C:\Program Files (x86)\GRF Editor\test.grf" -extractFiles "" ""

Perhaps you do not have the 949 codepage on your machine. You could test by opening GrfCL and typing the encoding command directly:

.\GrfCL.exe
Commands> encoding 949
#Log : Extraction and files added will now use this encoding : ks_c_5601-1987

If you get an error with the above, you'll have to use a different encoding or keep it as the default one.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  4
  • Reputation:   1
  • Joined:  03/05/13
  • Last Seen:  

14 minutes ago, Tokei said:

Hmm, well the following command worked fine on Windows:


GrfCL.exe -encoding 949 -open "C:\Program Files (x86)\GRF Editor\test.grf" -extractFiles "" ""

Perhaps you do not have the 949 codepage on your machine. You could test by opening GrfCL and typing the encoding command directly:


.\GrfCL.exe
Commands> encoding 949
#Log : Extraction and files added will now use this encoding : ks_c_5601-1987

If you get an error with the above, you'll have to use a different encoding or keep it as the default one.

 

It's only works in a bat file ?

#Log : Batch file detected an invalid encoding, changing command line arguments encoding to 1252
#Log : Extraction and files added will now use this encoding : ks_c_5601-1987
#Log : Opened GRF C:/patch/example.grf
#Finished
#Log : Extracted 12 file(s)

 

Is there any possibility of changing the default encoding so that you don't need the -encoding command?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  5
  • Reputation:   0
  • Joined:  02/07/19
  • Last Seen:  

hey!
is this open source? im interested to know how you managed to parse all the map/sprite data.

i would understand if it's not. In any case, thank you ?

Link to comment
Share on other sites

  • 4 months later...

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

On 11/4/2017 at 8:33 AM, Tokei said:

These are meant to further customize the flat maps creation.

If you uncheck Remove all objects, you must also uncheck Make the ground flat. This is meant to keep the objects while only changing the textures and it would create the map shown below. Otherwise you would have objects floating in mid-air.

K77iQU8.png

 

Making gat cells stick to the ground will be the difference between the left screenshot and the right screenshot. The gat cells are usually on top of objects so that you can walk over them. Obviously this doesn't apply if Make the ground flat is checked as you'd be walking on air otherwise.

NCNCAb6.png 1Rj7vHn.png

 

As far as the lightmap and shadowmap goes, I'd have to refer you to https://en.wikipedia.org/wiki/Lightmap and https://en.wikipedia.org/wiki/Shadow_mapping . The difference can be seen here I guess, if you keep the lightmaps:

4MuV4Hz.png

As for the global lighting, that's a setting used on some maps to dim the ambient light. Not many maps use this, but it is best to remove it when making flat maps.

Using the default options would be best for a regular usage of course.

Sorry to revive an old reply here. But I've been wondering if there was a way to make the flat maps without changing the textures of the ground itself?

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:  

1 hour ago, Zandriarth said:

Sorry to revive an old reply here. But I've been wondering if there was a way to make the flat maps without changing the textures of the ground itself?

Try unchecking "Change the ground textures for custom ones".

  • 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 I found this after viewing TB_Layer_Priority.lub from kRO data.grf
 

	if 2 == layer then
		-- GRF Editor Decompiler : CodeReconstructor has failed to identify the usage of this goto 3_[24]
	elseif 3 == layer then
		-- GRF Editor Decompiler : CodeReconstructor has failed to identify the usage of this goto 3_[30]
	elseif 4 == layer then
		-- GRF Editor Decompiler : CodeReconstructor has failed to identify the usage of this goto 3_[36]
	elseif 8 == layer then
		-- GRF Editor Decompiler : CodeReconstructor has failed to identify the usage of this goto 3_[42]
	end
	-- GRF Editor Decompiler : CodeReconstructor has failed to identify the usage of this goto 3_[46]

Im using
Product version : 1.8.3.4
Assembly version : 1.5.3.3063

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:  

12 hours ago, Lelouch vi Britannia said:

@Tokei I found this after viewing TB_Layer_Priority.lub from kRO data.grf

Im using
Product version : 1.8.3.4
Assembly version : 1.5.3.3063

Heya,

I'll have a look later; the function itself can be decompiled from the  labels:

-- Function #0
GetLayerPriority = function(direction, layer, acc_id)
	local Items_List = TB_Layer_Priority.Items_List
	if nil ~= Items_List then
		local Item_Tb = Items_List[acc_id]
		if nil ~= Item_Tb then
			if nil ~= Item_Tb.Direction and nil ~= Item_Tb.Direction[direction] then
				return Item_Tb.Direction[direction]
			elseif nil ~= Item_Tb.Default then
				return Item_Tb.Default
			end
		end
	end
	if 2 == layer then
		return TB_Layer_Priority.Default_Bottom
	elseif 3 == layer then
		return TB_Layer_Priority.Default_Top
	elseif 4 == layer then
		return TB_Layer_Priority.Default_Mid
	elseif 8 == layer then
		return TB_Layer_Priority.Default_Robe
	end
	return -1
end

 

  • Like 1
Link to comment
Share on other sites


  • Group:  Content Moderator
  • Topic Count:  22
  • Topics Per Day:  0.00
  • Content Count:  639
  • Reputation:   596
  • Joined:  11/25/11
  • Last Seen:  

On 10/1/2019 at 2:58 PM, Haziel said:

I would like to report that the Merge between .thor doesn't work at the moment, even in the latest version.
It prompts, but when clicking on Merge it shows the progress bar moving but when it finishes nothing happens.

I feel like my comment might have been overlooked. ?

Link to comment
Share on other sites

  • 2 weeks later...

  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.00
  • Content Count:  44
  • Reputation:   1
  • Joined:  09/30/15
  • Last Seen:  

If I encrypt my grf would they be able to change its files and run the game normally?

 

Answered.

Edited by luxus2311
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:  

On 3/30/2020 at 5:50 AM, luxus2311 said:

If I encrypt my grf would they be able to change its files and run the game normally?

 

Answered.

encrypt didn't make other poeople can merge so yess what ever your encrypt player still can modification your grf LOL
encrypt purpose only  for pervent other poeple still your unique sprite ?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  2
  • Reputation:   0
  • Joined:  01/22/20
  • Last Seen:  

i have problem here, only 1 map is error like in pict. And when finished, maps.grf output size is 1kb. any suggest?

im using grf editor 1.8.2.4

error.png

Edited by redv1per
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:  

3 hours ago, redv1per said:

i have problem here, only 1 map is error like in pict. And when finished, maps.grf output size is 1kb. any suggest?

im using grf editor 1.8.2.4

Only one error will be displayed even if there are more; in your case, the maps are simply encrypted so it's skipping all of them. Hence the 1kb maps.grf output file.

Edited by Tokei
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...