Tractor Mod

Tractor Mod

130k Downloads

[Content Patcher] add random token

Pathoschild opened this issue ยท 1 comments

commented

Add support for a Random token which selects from a list of values or integer range once per day:

// choose random value
{
    "Action": "EditImage",
    "Target": "Characters/Abigail",
    "FromFile": "assets/abigail-{{Random:hood, jacket, raincoat}}.png"
}

// choose random number (inclusive)
{
    "Action": "EditImage",
    "Target": "Characters/Abigail",
    "FromFile": "assets/abigail-{{Random:1-3}}.png"
}

Optionally consider a tracking name to coordinate selection:

{
    "Action": "EditImage",
    "Target": "Characters/Abigail",
    "FromFile": "assets/abigail-{{Random:hood, jacket, raincoat | abigail-outdoors}}-sprite.png"
},
{
    "Action": "EditImage",
    "Target": "Portraits/Abigail",
    "FromFile": "assets/abigail-{{Random:hood, jacket, raincoat | abigail-outdoors}}-portrait.png" // doesn't necessarily need to be the same values
}

Discussed on the forums and on Discord.

commented

Done in develop for the upcoming Content Patcher 1.10; see the readme for more info.