> 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/deterministic-random.md).

# Deterministic Random

v1.0

{% embed url="<https://www.youtube.com/watch?v=6rUoqSzPwWY>" %}

The <mark style="color:yellow;">Deterministic Random</mark> feature provides a robust randomization with predicatable results using global and local seeds. Each <mark style="color:yellow;">Action Executor</mark> can set the type of random it will use in the Inspector.

<figure><img src="https://2431624982-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MY3N_li2jPq7az6mYfq%2Fuploads%2FxzypWGuqdGiU5dPxwQNU%2FScreenshot%202026-01-21%20at%206.47.15%E2%80%AFPM.png?alt=media&amp;token=4744a1f8-1aa6-4042-b84c-04037c52183a" alt="" width="563"><figcaption></figcaption></figure>

You can ensure actions result in the same target selections using the *Action Random String* value, detailed below.

## Random Types

### Random Seed

This is essentially the same as the normal "random" value you're used to — results will appear entirely random.

### Deterministic Global

This uses the global seed set in the [Juicy Actions Settings](/magic-pig-games/juicy-actions/juicy-actions-settings.md) file.

{% hint style="warning" %}
You will get the same result every time the `ActionExecutor` is executed!
{% endhint %}

### Deterministic Global Varied

This uses the global seed set in the [Juicy Actions Settings](/magic-pig-games/juicy-actions/juicy-actions-settings.md) file, but changes each time the `ActionExecutor` is executed, so that each execution will have a different result, but the pattern of results will be the same every time, based on the global seed.

### Deterministic Local

This uses the local seed set in the <mark style="color:yellow;">Action Executor</mark> Inspector.

{% hint style="warning" %}
You will get the same result every time the `ActionExecutor` is executed!
{% endhint %}

### Deterministic Local Varied

This uses the local seed set in the <mark style="color:yellow;">Action Executor</mark> Inspector, but changes each time the `ActionExecutor` is executed, so that each execution will have a different result, but the pattern of results will be the same every time, based on the local seed you provide.

## Action Seed Variations

Each <mark style="color:yellow;">Action</mark> in the list will have it's own unique result based on the UID of the <mark style="color:yellow;">Action</mark>. This ensures that two of the same type of <mark style="color:yellow;">Action</mark> will have potentially different results.

You can overwrite this value in the Inspector by providing a unique *Action Random String* value.

<figure><img src="https://2431624982-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MY3N_li2jPq7az6mYfq%2Fuploads%2FlYm2VOUvrx4faNs6GZWd%2FScreenshot%202026-01-21%20at%206.49.43%E2%80%AFPM.png?alt=media&amp;token=b9c73fe9-31b3-4ca4-94da-830e98da351e" alt="" width="563"><figcaption></figcaption></figure>

In this example, the `MoveAction`, `ScaleAction`, and `SpinAction`, all have the same *Action Random String*, so the target(s) selected upon execution will be the same for each, so that the effects will apply to the same target(s) each time it runs.

{% hint style="success" %}
Each <mark style="color:yellow;">Action</mark> with the same *Action Random String* must have the same list of *Targets* in the same order, *Selection Mode*, and *Target Count*.
{% endhint %}
