Skip to main content

Overview

In this category, you will find a description of the custom file formats that are used in the Ragnarok Online client.

Target Audience

Due to the technical nature of the subject matter, this specification is written under the assumption that you're a programmer or at least have some programming experience. The information provided here will hopefully be interesting to anyone familiar with the game, but if you're not on good terms with basic programming concepts a bit of a learning curve should be expected.

Objectives

After studying this documentation, you should know the answers to the following questions:

  • What types of files exist in the Ragnarok Online client?
  • What information do they contain and how is it structured?
  • How can the file contents be decoded from their binary format into a raw ("in-memory") representation?

Needless to say, all information is provided for educational purposes only.

Limitations

This section doesn't cover the rather complex topic of rendering the game world. To learn how the decoded information from within the game's resource files can be transformed into a visual representation, matching what players expect when they think about "the game", see Rendering. For information about the relationship between RO and Arcturus, browse this category.

Prerequisites

You might want to read up on some of the fundamentals of binary encodings, computer graphics, and game development to make best use of this resource. Here's some external links that might help you get started if you aren't already familiar:

You absolutely should have a solid grasp of binary types if you wish to learn about the relatively complex formats that RO uses.

Units and Data Types

This specification follows the following conventions:

  • All offsets and field lengths are given in bytes, unless otherwise denoted
  • All numbers are assumed to be stored in "reversed" byte order (little-endian)
  • Boolean values are interpreted as FALSE if zero, and TRUE otherwise

Here's a list of the atomic data types that you may encounter in the layout tables:

TypeSizeDescription
boolean1A single byte that is exclusively used to store a boolean flag (FALSE or TRUE)
byte18-bit unsigned integer that is used to encode numbers rather than characters
ushort216-bit unsigned integer
short216-bit signed integer (in Two's Complement)
float4A 32-bit single-precision floating point number, in IEEE 754 format
int432-bit signed integer (in Two's Complement)
uint432-bit unsigned integer
char1An ASCII-encoded fixed-size character of unit length
stringvariableFixed-size, null-terminated, or counted string (as noted in the field's description)
structvariableBinary structure of arbitrary size, with a unique layout (will generally be listed separately)
blobvariableOpaque binary structure of arbitrary size (processed using third-party libraries)
arrayvariableFixed-size array of structures or values; the exact size depends and may only be implicit

Please note that in many cases the exact type is unknown and can only be guessed, based on examples found "in the wild".