# Lookup Table

Lookup Tables convert an input value to an output value, and can be used in the Stat effects of objects which affect stats, such as `ItemObjects`.

To create a Lookup Table, right click in the Project view, and select `Create/Game Modules/Create/Lookup Table`

<figure><img src="/files/j2eNo374AiMWgLJLXkdb" alt=""><figcaption></figcaption></figure>

Add input and output values, as you'd like. You can have as many lookup tables as you need for your project.

## Get the output value from a Lookup Table

```csharp
var lookupTable = SomeLookupTable;
var outputValue = lookupTable.ResultFrom(inputValue);
```


---

# 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://infinitypbr.gitbook.io/magic-pig-games/game-modules-4/module-documentation/lookup-table.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.
