> For the complete documentation index, see [llms.txt](https://juniordark.gitbook.io/rusty-hearts-files-structures/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://juniordark.gitbook.io/rusty-hearts-files-structures/internal-files/rh-file.md).

# RH File

RH are files which contain data about items, skills, resources in table form.

### File Encryption <a href="#file-structure" id="file-structure"></a>

RH files are encrypted with **AES-256**.

AESKey = **gkw3iurpamv;kj20984;asdkfjat1af\0**&#x20;

AESIV = **0xDB0F4940**

AESMode = **ECB**

For the AESKey, that's 31 characters followed by a null terminator. The null terminator is required for the AES cipher to function.

### File structure <a href="#file-structure" id="file-structure"></a>

#### The RH files contain columnName, columnTypes, numRows, numColumns, and rowData. <a href="#the-dnt-files-contain-header-columnsinfo-datainfo-and-endinfo" id="the-dnt-files-contain-header-columnsinfo-datainfo-and-endinfo"></a>

```
rhFile
{
	numRows (int32)
	numColumns (int32)
	columnNames (array of strings)
	columnTypes (array of int32)
	rowData
}
```

### Column Types <a href="#column-type" id="column-type"></a>

```
columnTypes
{
	int32 = 0
	float32 = 1
	string2 = 2
	string = 3
	int64 = 4
}
```

**Value of row cell depends of column type value.**

| Column Type Index | Data Type | Column Name Start                               | Description |
| ----------------- | --------- | ----------------------------------------------- | ----------- |
| 0                 | int32     | `n`: Number (integer).                          | Integer     |
| 1                 | float32   | `f`: Float                                      | Single      |
| 2                 | string2   | `sz`: String (zero-terminated).                 | Text        |
| 3                 | string    | `wsz`: Wide character string (zero-terminated). | Text        |
| 4                 | int64     | i64                                             | Long        |
