8 Variation Keys
Joe H edited this page 2025-11-02 22:45:11 +00:00

Overview

Variation Keys are values which are determined upon level load that allow you to manipulate objects in many ways, all depending on the current state of the game. One of the most common uses for this is to manipulate an object's texture through the source and rect parameters.

Some important things to list about variation keys:

  • Variation keys are only loaded when a level loads, or if your resource packs get refreshed. As such, every value here is static, and cannot track dynamic changes such as the player's power-up state, their coin count, and other such values which are prone to changing during a level.
  • Some variation keys support the link parameter. This parameter allows you to easily lead back to other variation keys you define in your JSON file, making it easier to manage multiple areas which use duplicate assets or parameters.

List of Variation Keys

Here is a comprehensive list of each variation key available, all its possible values and its default values which the game will fallback on, if the matching value is not present.

Level Keys

These keys are all focused around the level the player is in.

Level Theme

Chooses a key, based on the current level theme (Overworld, Underground, Desert, etc)

  • Default Value - "default"

  • Possible Values - "default", "Overworld", "Underground", "Desert", "Snow", "Jungle", "Beach", "Garden", "Mountain", "Skyland", "Autumn", "Pipeland", "Space", "Underwater", "Volcano", "GhostHouse", "Castle", "CastleWater", "Airship", "Bonus"

  • Example - "variations": {"Overworld": {"source": "Goomba.png"}, "Underwater": {"source": "SnorkelGoomba.png"}}

  • Allows links - true

Theme Time

Chooses a key, based on the time of day, the level uses ("Day" or "Night")

  • Default Value - "Day"

  • Possible Values - "Day", "Night"

  • Example - "variations": {"Day: {"source": "GoombaDay.png"}, "Night: {"source": "GoombaNight.png"}}

  • Allows links - true

Campaign

Chooses a key, based on the current campaign ("SMB1", "SMBLL", etc)

  • Default Value - "SMB1"

  • Possible Values - "SMB1", "SMBLL", "SMBS", "SMBANN"

  • Example - "variations": {"SMB1": {"source": "Goomba.png"}, "SMBANN": {"source": "DiscoGoomba.png"}}

  • Allows links - true

Game Mode

Chooses a key, based on the current game mode (Story mode, Challenge Mode, You VS Boo, etc)

  • Default Value - "GameMode:Default"

  • Possible Values - "GameMode:Default", "GameMode:Campaign", "GameMode:BooRace", "GameMode:Challenge", "GameMode:Marathon", "GameMode:MarathonPractice", "GameMode:LevelEditor", "GameMode:CustomLevel", "GameMode:Disco"

  • Example - "variations": {"GameMode:Default": {"source": "Something.png"}, "GameMode:BooRace": {"source": "SomethingThatsForYouVsBooSpecificallyNothingIsComingToMindForAnExample.png"}}

  • Allows links - true

World Number

Chooses a key, based on the current number of the world sequentially. (Worlds A-D are treated numerically, as well, starting with World A using World10, World B using World11, and so forth.)

  • Default Value - "World1"

  • Possible Values - "World1" all the way up to "World13", along with "World-1" for SMB1

  • Example - "variations": {"World1": {"source": "GoombaButForWorld1.png"}, "World2": {"source": "GoombaButForWorld2.png"}}

  • Allows links - true

Level Number

Chooses a key, based on the current Level number (Level 1, Level 2, etc)

NOTE: This is INDEPENDENT of World Number, so will count for ALL numbers with the specific level number ("Level1" = 1-1, 2-1, 3-1, 4-1, etc), if you want it to be for a specific level, combine World Number & Level Number together!

  • Default Value - "Level1"

  • Possible Values - "Level1" all the way up to "Level4"

  • Example - "variations": {"Level1": {"source": "KoopaButForLevel1.png"}, "Level2": {"source": "KoopaButForLevel2.png"}}

  • Allows links - true

Room Type

Chooses a key, based on the current type of room the player is occupying in a level. (Sub-levels, Bonus Rooms, etc.)

  • Default Value - "MainRoom"

  • Possible Values - "MainRoom", "BonusRoom", "CoinHeaven", "PipeCutscene", "TitleScreen"

  • Example - "variations": {"MainRoom": {"source": "Overworld.png"}, "BonusRoom": {"source": "Bonus.png"}}

  • Allows links - true

Object Specific Keys

These are keys focused around specific objects which are determined by player choice.

Character

Chooses a key, based on the current character being used (Supports Custom Characters)

  • Default Value - "Character:Mario" (Snapshot only - "Character:default")

  • Possible Values - "Character:Mario", "Character:Luigi", "Character:Toad", "Character:Toadette" + (The folder name of any custom characters installed.)

  • Example - "variations": {"Character:Mario": {"source": "Goomba.png"}, "Character:Luigi": {"source": "GoombaButForLuigi.png"}}

  • Allows links - true

Race Boo

Chooses a key, based on the color of Boo you are racing against in You VS. Boo. (0 = White, 1 = Green, 2 = Red, 3 = Black, 4 = Gold)

  • Default Value - "RaceBoo:0"

  • Possible Values - "RaceBoo:0" all the way up to "RaceBoo:4"

  • Example - "variations": {"RaceBoo:0": {"source": "WhiteBoo.png"}, "RaceBoo:1": {"source": "GreenBoo.png"}}

  • Allows links - true

Misc.

Config

Reads the configuration used by a resource pack to determine what to choose. (All configuration keys start with config: and end with whatever you name your configuration option.)

IMPORTANT: Can only be used in resource packs with a config file. For more info, read here.

  • Example - "variations": {"config:DoYouLikeConfig": {"Yes": {"source:"ThatsMyGOATRightThere.png"}, "No": {"source:"ManWhateverIDidntCareAnyways.png"}}}

  • Allows links - false

Random

Chooses one of the defined keys listed in an array at random.

IMPORTANT: Each value must be defined in a choices array.

  • Example - "variations": {"choices": [ { "source": "Goomba1.png" }, { "source": "Goomba2.png" } ]

  • Allows links - false