# RSV

The packet sent from the server upon entering the instance is as follows:

```csharp
// sent for each rsv string
struct RsvPkt {
  UInt32 value_size;    // len(without_nul_char(value))
  char key_str[32];     // null terminated
  char value_str[1024]; // null terminated
}
```

## Pseudocode

```csharp
void OnRsvPktreceived(RsvPkt pkt) {
  // e.g.) "_rsv_29752_-1_1_C0_0Action"
  var key = ReadCString(pkt.key_str);
  // e.g.) "Alternative End"
  var val = ReadCString(pkt.value_str);

  rsvMap[key] = val;
}

string GetActionName(int row) {
  var val = table[row, col];

  if (rsvMap.Contains(val)) {
    var key = val;
    return rsvMap[key];
  } else {
    return val;
  }
}
```

## Links

* <https://github.com/NotAdam/Lumina/blob/0530a97d21/src/Lumina/Excel/RSV/RsvProvider.cs>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://xiv.dev/game-internals/rsv.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
