Library for loading Ragnarok Online GRF Files.
- Version 0x102
- Version 0x103
- Version 0x200
- Lazy loading of GRF Files
- Eager loading of 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() );
// 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() );