> For the complete documentation index, see [llms.txt](https://cardstock-studio.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cardstock-studio.gitbook.io/docs/design/global-values.md).

# Global Values

**Global Values** are variables that are set in the Cardstock Studio project, but can be applied in any Template or Book. When used, it means you can change the value in one place, and have it updated in all places where it is used.

## Variable Type

This helps the AI agents understand what this Global Variable means in the game. If the Global Variable has no game logic effect, leave it as "Cosmetic". Otherwise, set it to "Gameplay" and describe what it means.

The AI prefers clear, descriptive language to understand the logic around the variabl

## Using Global Values in Deck Spreadsheets

When setting card values in the Deck spreadsheet, you can choose to use Global Values instead. For example, a color variable can be populated with a color value which you can select in the Deck spreadsheet or set via text value such as `#a92d2d` or `rgba(36,211,23,1)`.

To use a Global Variable, simply type in the variable name.

<figure><img src="https://2449056524-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK6BdQXak9wiY4BdSf9Rq%2Fuploads%2FCGJjdh9OzJZJLUsRJyqp%2FScreenshot%202026-05-03%20at%2010.57.29%E2%80%AFPM.png?alt=media&amp;token=c5bea750-ed0f-4424-ab8d-38894de576b6" alt="" width="563"><figcaption></figcaption></figure>

This is `cardBackBlue`.  Typing this into a color Variable in your Deck spreadsheet will ensure the card uses whatever color is set to this Global Value. This means if you change the color, all places which reference the Global Value will get the updated color.

{% hint style="info" %}
"cardBackBlue", "Card Back Blue", and "CaRd bAcK bLUe" will all resolve to the same Global Value.
{% endhint %}

Color and Number values automatically search for a Global Value if the cell value is not a valid type. In any cell you can directly reference a Global Value with the `name.value` syntax.&#x20;

For strings, using *"name.value"* in the cell will replace the full string with the Global Value string. You can replace parts of strings using the in-line variant:

*"My name is \<bartenderName>, and I live in \<townName>. Nice to meet you!"*

In this example, both the `bartenderName` and `townName` Global Values will replace only those portions of the text, using the in-line variable syntax: `<>`


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://cardstock-studio.gitbook.io/docs/design/global-values.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
