-
Notifications
You must be signed in to change notification settings - Fork 19
5. Stores
The information for all shops are contained in /fiddle/stores.toml.
Always available stores:
-
general: General Store -
carpenter: Carpenter’s Shop (run by Landen and Ryis) -
terithia: Tackle Shop (Terithia’s store) -
blacksmith: Blacksmith (March & Olric) -
hayden: Hayden’s Shop (Animal supplies) -
inn: Sleeping Dragon Inn -
balor: Balor’s Wagon -
valens_clinic: Valen’s Clinic
Saturday Market:
-
darcy,louis,vera,merri,wheedle,zorel: Their respective stalls
Festival stores (special):
-
nora_souvenir_stall: Souvenir Stall (available generally for festivals with stores) -
maple_spring_festival: Food Stall (only used in Spring, sells food) -
elsie_spring_festival: Clothing Stall (only used in Spring, sells clothes)
Here is an example of a store table:
[valens_clinic]
name = "Valen's Clinic"
[[valens_clinic.categories]]
icon = "spr_illegal_16"
constant_stock = [
"heal_syrup",
"stamina_syrup",
"fairy_syrup",
"speedy_syrup",
"restorative_syrup",
]This is the name of the store. You know this one!
Categories is an array of TOML tables, where each table represents a page of the store. Each table has at least an icon and stock.
The icon is of course the icon that’s at the top that represents the category, but it’s also how you know which category you’re looking at in the TOML file. The icon is very important because of this, since if you need to use MOMIidentify, it’s probably the key you’ll use.
Another possible key within a category table is target_selections, which determines the maximum number of items that are given per day from the list of randomized stock provided.
The actual stock of the store are represented by one or more of these arrays:
-
seasonal: contains 4 arrays, each named for the season (spring, summer, fall, winter) -
constant_stock: this stock, as the name implies, is always available -
random_stock: often paired with target_selections, which states how many of the given stock to show every day. The stock in this list is randomized.
If you wish to have randomized stock that is also seasonal, you can use the requirements option (discussed below) with is_season, like so:
random_stock = [
{ cosmetic = "head_bunny_ears", requirements = { is_season = "spring" } },
{ cosmetic = "head_strawberry_beret", requirements = { is_season = "spring" } }
]The contents of the stock arrays are assumed to be items unless stated otherwise. If you wish to add other options to the categories entry, you’ll have to use the full syntax:
{ item = "seed_carrot", requirements = { repaired_general_store = true } }
Individual entries can be one of the following:
-
item: default, includes dishes, furniture, consumables, seeds, pet treats, etc. -
cosmetic: An unlockable cosmetic item -
recipe_scroll: A cooking recipe -
crafting_scroll: A crafting recipe for an item to be used at a crafting bench -
animal_cosmetic: An unlockable cosmetic item for a farm animal or pet, accompanied by the animal it’s for.
Here’s an example of an animal cosmetic entry:
{ requirements = { unlocked_animal = "duck" }, animal = "duck", animal_cosmetic = "pink_bow" }
Requirements are typically used for items that are locked behind a certain amount of relevant game progression. Some common ones are repaired_general_store = true, has_perk = "name_of_perk", reached_skill_level = { <skill> = <level_number> }, For those curious about the possible requirements, the full list is located in /gml/scripts/Requirements.gml.
As a time saving measure, to add both the item itself to the stock as well as the recipe for it, organized under a recipes category, you can use include_recipe = true:
{ item = "cup_of_tea", include_recipe = true }
The store must have a category with accepts_recipes = true for this to work. For example, this is the entry for Darcy’s stall:
[[darcy.categories]]
icon = "spr_ui_store_category_icon_cooking_recipes"
accept_recipes = true
target_selections = 15Festival stores, since some have different systems in place for stock that are dependent on challenges, are placed in /fiddle/festivals.toml along with other festival related data. While the names and icons are established in the stores.toml file, the stock is given as a stocks subtable for the relevant festival. For example, here’s the definition in stores.toml for Nora’s Souvenirs stall:
[nora_souvenir_stall]
name = "Souvenir Stall"
[[nora_souvenir_stall.categories]]
icon = "spr_illegal_16"and here’s where it gets populated for one of the festivals in festivals.toml.
[harvest.stocks]
nora_souvenir_stall = [
{ item = "candied_queen_berries", tier_required = 0 },
{ item = "queen_berry_pie", tier_required = 0 },
{ recipe_scroll = "pumpkin_pie", tier_required = 0 },
{ recipe_scroll = "apple_honey_curry", tier_required = 0 },
{ recipe_scroll = "harvest_plate", tier_required = 0 },
{ item = "autumn_scarecrow", tier_required = 0 },
{ item = "cornucopia", tier_required = 0 },
{ cosmetic = "head_berry_crown", tier_required = 0 },
{ cosmetic = "head_berry_hat", tier_required = 0 },
{ cosmetic = "dress_berry", tier_required = 0 },
{ cosmetic = "suit_berry", tier_required = 0 },
]It seems that for festivals without challenges, all stock is given tier_required = 0.
To safely mod stores without disrupting other mods or existing stock, MOMI Operations are often needed. This is because categories are organized as arrays of tables, so their headers are not unique. MOMI Operations like MOMIidentify let MOMI understand which specific table in the array of tables you wish to make your changes to.
When MOMI Operations are involved, its also best to make sure you brush up on TOML terms, either in the MOMI Operations terms or their official documentation since the wording here will have to be precise to make sure it's accurate and understandable.
For your ease and convenience, some common use cases are provided below:
MOMI Operations are not needed for this, as you are adding an entirely new category to the array of categories. The following example creates a new category in Valen's Clinic with the icon spr_ui_store_category_icon_moddedcosmetic with the custom cosmetic face_gear_browline_glasses always in stock.
[[valens_clinic.categories]]
icon = "spr_ui_store_category_icon_moddedcosmetic"
constant_stock = [
{ cosmetic = "face_gear_browline_glasses" }
]As mentioned before, you will need MOMIidentify here to understand which category you wish to edit. The default behavior of MOMI when using MOMIidentify is to replace any key/value pair, you also need to specify that you want this information merged using MOMIaction = "merge".
# Finds the category by icon and adds your item to its existing constant_stock, leaving what was already there in place.
[[general.categories]]
MOMIidentify = { icon = "spr_ui_store_category_icon_seeds" }
constant_stock = [
"seed_new_modded_example"
]
MOMIaction = "merge"In some cases, you might want to remove all vanilla stock and replace it with your own. One way to do this is to use MOMIaction = "replace" as shown here, but if you want your mod to be compatible with other mods that do this, you'll want to specifically remove all vanilla items. So, for example, if Mod A wants to replace a category's vanilla stock with Stock A, and Mod B wants to replace a category's vanilla stock with Stock B, this is what you would do if you want the game's final stock to contain no vanilla items, but contain both Stock A and Stock B.
# Finds the category and removes only those two specific items from
# constant_stock, leaving everything else in the list untouched.
[[general.categories]]
MOMIidentify = { icon = "spr_ui_store_category_icon_seeds" }
MOMIremove = { constant_stock = ["seed_old_vanilla_example_v1", "seed_old_vanilla_example_v2"] }For additional examples with MOMI Operations, please see its wiki page.