Skip to content

vstumpf/GRF

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

78 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GRF

Library for loading Ragnarok Online GRF Files.

CodeFactor Build status Build Status license NuGet

Supported GRF File Versions

  • Version 0x102
  • Version 0x103
  • Version 0x200

Supported Features

  • Lazy loading of GRF Files
  • Eager loading of GRF Files

Usage Example

Loading single GRF Files

  // Use the static FromFile method to load the GRF file
  var grf = Grf.FromFile( @"RO\test.grf" );

  // Get the GRF entry from the file
  var entryWasFound = grf.Find( "data\\idnum2itemdisplaynametable.txt", out GrfEntry entry );

  // Write the data from the entry to a file
  File.WriteAllBytes( @"directory\file.txt", entry.GetUncompressedData() );

Loading multiple GRF Files

  // Use the static FromFile method and pass ini file path into the method to load the collection
  var collection = GrfCollection.FromFile( @"RO\data.ini" );

  // Find the correct entry from all loaded GRF files.
  // This method behaves just like the game, entries from grf files with a higher 
  // priority hide entries with the same name in grf files with lower priorities
  var entryWasFound = collection.Find( "data\\idnum2itemdisplaynametable.txt", out GrfEntry entry );

  // Write the data from the entry to a file
  File.WriteAllBytes( @"directory\file.txt", entry.GetUncompressedData() );

About

Simple library for loading Ragnarok Online GRF Files.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 100.0%