# Tag Facts

`TagFacts` is a simple subsystem storing a fact database.

This database is a simple TSet of a gameplay tag and an integer.

{% hint style="info" %}
`TagFacts` is a free plugin available on my [**ModularityPractice github repo**](https://github.com/Variann/ModularityPractice)
{% endhint %}

Fact systems is extremely common in game studios as it provides an extremely simple interface for handling facts and achievements. This can be used to track what quests have been completed, how many times a player has talked to an NPC or any other "fact" you'd like to keep track of.

There are only a handful of functions you'll end up using majority of the time. The highlights are:

* IncrementFact
* DoesFactExist
* GetFactValue

The other functions are very situational. But when it comes to fact databases, the above functions are the most commonly used.

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

It also comes with console commands. `SetFact` will allow you to set the value of a tag during runtime, but it's recommended to use the [Integrations](/varian-docs/tag-facts/integrations.md) debugger instead.


---

# 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://varian.gitbook.io/varian-docs/tag-facts/tag-facts.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.
