> For the complete documentation index, see [llms.txt](https://infinitypbr.gitbook.io/magic-pig-games/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://infinitypbr.gitbook.io/magic-pig-games/juicy-actions/action-validator.md).

# Action Validator

{% hint style="info" %}
The <mark style="color:yellow;">Action Validator</mark> is especially useful when writing your own actions, either by yourself or with your friendly AI. It will help guide best practices and catch potential mistakes.
{% endhint %}

Open the <mark style="color:yellow;">Action Validator</mark> window with *Tools/Juicy Actions/Action Validation*. The window will take a few moments to load as it gathers and analyses all of the Actions in the project.

<figure><img src="/files/jWDQN3D6806PlgKVHvTW" alt=""><figcaption><p>Don't worry, these warnings will be fixed before <mark style="color:yellow;">Juicy Actions</mark> is shipped!</p></figcaption></figure>

All <mark style="color:yellow;">Actions</mark> will be displayed, and you can choose how they are ordered, and filter with a `string`.

Warnings will be dispalyed in yellow. Hover over the *Lifecycle* and *Validation* warnings to learn more with a tooltip.

<figure><img src="/files/POhbuPx9mCdx6mgAT3uX" alt="" width="375"><figcaption></figcaption></figure>

After loading the window, the console will produce a report. This report can be very useful to your favorite AI overlord who may be helping you fix up your scripts — just copy/paste the report and ask your minion to help out. You may wish to remind your AI companion that the `Action.cs` class has many helpful comments on how to properly set up new <mark style="color:yellow;">Actions</mark>.

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

## Suppressing Warnings

There may be cases where an action has a valid reason to break the guidelines. If thats the case, you can add these comments to your script and the <mark style="color:yellow;">Action Validator</mark> will ignore any issues.

| Comment                                      | Effect                                                                                                         |
| -------------------------------------------- | -------------------------------------------------------------------------------------------------------------- |
| `// VALIDATION_IGNORE: Random`               | Suppress all <mark style="color:yellow;">Random</mark>-related warnings                                        |
| `// VALIDATION_IGNORE: Time`                 | Suppress all <mark style="color:yellow;">Time</mark>/<mark style="color:yellow;">Clock</mark>-related warnings |
| `// VALIDATION_IGNORE: Blackboard`           | Suppress <mark style="color:yellow;">Blackboard</mark> warnings                                                |
| `// VALIDATION_IGNORE: TimeBeforeNextAction` | Suppress `timeBeforeNextAction` constructor check                                                              |
| `// VALIDATION_IGNORE: HasDuration`          | Suppress warnings about `HasDuration()` not being exactly `true` or `false`                                    |
| `// VALIDATION_IGNORE: DurationZero`         | Supress warnings when the `transitionDuration` defaults to `0`                                                 |
| `// VALIDATION_IGNORE: Logging`              | Suppress warnings about not using the logging methods on the `Action.cs` parent class                          |
| `// VALIDATION_IGNORE: SimpleMode`           | Suppress warnings about not having a "Simple Mode".                                                            |
| `// VALIDATION_IGNORE: Lifecycle`            | Suppress warnings about end of lifecycle methods missing                                                       |
| `// VALIDATION_IGNORE: BaseValue`            | Suppress warnings about `HasBaseValue()` and related required method overrides                                 |
| `// VALIDATION_IGNORE: Executor`             | Suppress ALL <mark style="color:yellow;">Executor</mark> usage warnings                                        |
| `// VALIDATION_IGNORE_ALL`                   | Suppress ALL validation warnings for the file                                                                  |
