模组:配方数据

来自Stardew Valley Wiki
跳到导航 跳到搜索

目录

此页面解释游戏如何存储和解析用于烹饪和打造的配方数据。(裁缝配方使用不同的格式。)这是面向模组开发者的高级教程。

原始数据

烹饪菜谱

菜谱数据存储在Content\Data\CookingRecipes.xnb。可以解包此文件以便编辑。此处是1.6.5的原始数据以供参考:

数据 
{
  "Fried Egg": "-5 1/10 10/194/default/",
  "Omelet": "-5 1 -6 1/1 10/195/l 10/",
  "Salad": "20 1 22 1 419 1/25 5/196/f Emily 3/",
  "Cheese Cauli.": "190 1 424 1/5 5/197/f Pam 3/",
  "Baked Fish": "145 1 132 1 246 1/6 5/198/l 12/",
  "Parsnip Soup": "24 1 -6 1 419 1/1 8/199/f Caroline 3/",
  "Vegetable Stew": "256 1 284 1/1 8/200/f Caroline 7/",
  "Complete Breakfast": "194 1 -6 1 210 1 211 1/2 2/201/l 26/",
  "Fried Calamari": "151 1 246 1 247 1/3 3/202/f Jodi 3/",
  "Strange Bun": "246 1 722 1 308 1/1 1/203/f Shane 7/",
  "Lucky Lunch": "154 1 229 1 597 1/20 1/204/s Luck 8/",
  "Fried Mushroom": "404 1 257 1 247 1/22 3/205/f Demetrius 3/",
  "Pizza": "246 1 256 1 424 1/6 4/206/l 20/",
  "Bean Hotpot": "188 2/1 8/207/f Clint 7/",
  "Glazed Yams": "280 1 245 1/1 10/208/l 22/",
  "Carp Surprise": "142 4/1 6/209/l 16/",
  "Hashbrowns": "192 1 247 1/1 9/210/l 14/",
  "Pancakes": "246 1 -5 1/5 5/211/l 18/",
  "Salmon Dinner": "139 1 300 1 250 1/3 3/212/f Gus 3/",
  "Fish Taco": "130 1 229 1 266 1 306 1/1 4/213/f Linus 7/",
  "Crispy Bass": "136 1 246 1 247 1/1 5/214/f Kent 3/",
  "Pepper Poppers": "260 1 424 1/10 3/215/f Shane 3/",
  "Bread": "246 1/50 2/216/l 11/",
  "Tom Kha Soup": "88 1 720 1 404 1/15 2/218/f Sandy 7/",
  "Trout Soup": "138 1 153 1/5 4/219/l 19/",
  "Chocolate Cake": "246 1 245 1 -5 1/5 5/220/l 23/",
  "Pink Cake": "254 1 246 1 245 1 -5 1/6 5/221/l 25/",
  "Rhubarb Pie": "252 1 246 1 245 1/2 4/222/f Marnie 7/",
  "Cookies": "246 1 245 1 -5 1/3 7/223/null/",
  "Spaghetti": "246 1 256 1/5 5/224/f Lewis 3/",
  "Fried Eel": "148 1 247 1/3 4/225/f George 3/",
  "Spicy Eel": "148 1 260 1/10 3/226/f George 7/",
  "Sashimi": "-4 1/20 1/227/f Linus 3/",
  "Maki Roll": "-4 1 152 1 423 1/10 3/228/l 15/",
  "Tortilla": "270 1/5 4/229/l 13/",
  "Red Plate": "266 1 264 1/15 3/230/f Emily 7/",
  "Eggplant Parm.": "272 1 256 1/30 2/231/f Lewis 7/",
  "Rice Pudding": "-6 1 245 1 423 1/9 3/232/f Evelyn 7/",
  "Ice Cream": "-6 1 245 1/2 4/233/f Jodi 7/",
  "Blueberry Tart": "258 1 246 1 245 1 -5 1/10 3/234/f Pierre 3/",
  "Autumn's Bounty": "280 1 276 1/50 1/235/f Demetrius 7/",
  "Pumpkin Soup": "276 1 -6 1/2 4/236/f Robin 7/",
  "Super Meal": "278 1 282 1 274 1/1 7/237/f Kent 7/",
  "Cran. Sauce": "282 1 245 1/9 3/238/f Gus 7/",
  "Stuffing": "216 1 282 1 408 1/2 4/239/f Pam 7/",
  "Farmer's Lunch": "195 1 24 1/60 1/240/s Farming 3/",
  "Survival Burger": "216 1 78 1 272 1/70 1/241/s Foraging 8/",
  "Dish o' The Sea": "131 2 210 1/38 2/242/s Fishing 3/",
  "Miner's Treat": "78 2 245 1 -6 1/60 1/243/s Mining 3/",
  "Roots Platter": "78 1 412 1/1 10/244/s Combat 3/",
  "Algae Soup": "153 4/1 5/456/f Clint 3/",
  "Pale Broth": "157 2/1 4/457/f Marnie 3/",
  "Plum Pudding": "406 2 246 1 245 1/1 10/604/l 100/",
  "Artichoke Dip": "274 1 -6 1/1 10/605/l 100/",
  "Stir Fry": "78 1 404 1 250 1 247 1/1 10/606/l 100/",
  "Roasted Hazelnuts": "408 3/1 10/607/l 100/",
  "Pumpkin Pie": "276 1 246 1 -6 1 245 1/1 10/608/l 100/",
  "Radish Salad": "247 1 419 1 264 1/1 10/609/l 100/",
  "Fruit Salad": "258 1 254 1 634 1/1 10/610/l 100/",
  "Blackberry Cobbler": "410 2 245 1 246 1/1 10/611/l 100/",
  "Cranberry Candy": "282 1 613 1 245 1/1 10/612/l 100/",
  "Bruschetta": "216 1 247 1 256 1/1 10/618/l 100/",
  "Coleslaw": "266 1 419 1 306 1/1 10/648/l 100/",
  "Fiddlehead Risotto": "247 1 259 1 248 1/1 10/649/l 100/",
  "Poppyseed Muffin": "376 1 246 1 245 1/1 10/651/l 100/",
  "Chowder": "372 1 -6 1/1 10/727/f Willy 3/",
  "Lobster Bisque": "715 1 -6 1/1 10/730/f Willy 9/",
  "Fish Stew": "716 1 719 1 722 1 256 1/1 10/728/f Willy 7/",
  "Escargot": "721 1 248 1/1 10/729/f Willy 5/",
  "Maple Bar": "724 1 245 1 246 1/1 10/731/l 100/",
  "Crab Cakes": "717 1 246 1 -5 1 247 1/1 10/732/l 100/",
  "Triple Shot Espresso": "395 3/1 10/253/l 100/",
  "Shrimp Cocktail": "720 1 256 1 16 1/1 10/733/l 100/",
  "Seafoam Pudding": "267 1 269 1 814 1/1 10/265/s Fishing 9/",
  "Ginger Ale": "829 3 245 1/1 10/903/l 100/",
  "Banana Pudding": "91 1 -6 1 245 1/1 10/904/l 100/",
  "Mango Sticky Rice": "834 1 88 1 423 1/1 10/905/f Leo 7/",
  "Poi": "830 4/1 10/906/f Leo 3/",
  "Tropical Curry": "88 1 832 1 260 1/1 10/907/l 100/",
  "Squid Ink Ravioli": "814 1 246 1 256 1/1 10/921/s Combat 9/",
  "Moss Soup": "Moss 20/1 10/MossSoup/s Foraging 3/"
}

打造配方

打造配方数据存储在Content\Data\CraftingRecipes.xnb。可以解包此文件以便编辑。此处是1.6.5的原始数据以供参考:

数据 
{
  "Wood Fence": "388 2/Field/322/false/default/",
  "Stone Fence": "390 2/Field/323/false/Farming 2/",
  "Iron Fence": "335 1/Field/324 10/false/Farming 4/",
  "Hardwood Fence": "709 1/Field/298/false/Farming 6/",
  "Grass Starter": "771 10/Field/297/false/null/",
  "Blue Grass Starter": "771 25 Moss 10 MysticSyrup 1/Field/BlueGrassStarter/false/null/",
  "Gate": "388 10/Home/325/false/default/",
  "Chest": "388 50/Home/130/true/default/",
  "Big Chest": "388 120 334 2/Home/BigChest/true/null/",
  "Stone Chest": "390 50/Home/232/true/null/",
  "Big Stone Chest": "390 250/Home/BigStoneChest/true/null/",
  "Torch": "388 1 92 2/Field/93/false/default/",
  "Scarecrow": "388 50 382 1 771 20/Home/8/true/Farming 1/",
  "Deluxe Scarecrow": "388 50 386 1 771 40/Home/167/true/null/",
  "Bee House": "388 40 382 8 335 1 724 1/Home/10/true/Farming 3/",
  "Keg": "388 30 334 1 335 1 725 1/Home/12/true/Farming 8/",
  "Cask": "388 20 709 1/Home/163/true/null/",
  "Dehydrator": "388 30 330 2 82 1/Home/Dehydrator/true/null/",
  "Furnace": "378 20 390 25/Home/13/true/l 2/",
  "Heavy Furnace": "(BC)13 2 335 3 390 50/Home/HeavyFurnace/true/l 2/",
  "Anvil": "335 50/Home/Anvil/true/l 2/",
  "Mini-Forge": "852 5 335 10 336 10 337 5/Home/MiniForge/true/l 2/",
  "Garden Pot": "330 1 390 10 338 1/Home/62/true/null/",
  "Wood Sign": "388 25/Home/37/true/default/",
  "Stone Sign": "390 25/Home/38/true/default/",
  "Dark Sign": "767 5 881 5/Home/39/true/f Krobus 3/",
  "Text Sign": "388 25/Home/TextSign/true/default/",
  "Cheese Press": "388 45 390 45 709 10 334 1/Home/16/true/Farming 6/",
  "Mayonnaise Machine": "388 15 390 15 86 1 334 1/Home/24/true/Farming 2/",
  "Seed Maker": "388 25 382 10 336 1/Home/25/true/Farming 9/",
  "Loom": "388 60 771 30 726 1/Home/17/true/Farming 7/",
  "Oil Maker": "766 50 709 20 336 1/Home/19/true/Farming 8/",
  "Recycling Machine": "388 25 390 25 335 1/Home/20/true/Fishing 4/",
  "Worm Bin": "709 15 336 1 335 1 771 50/Home/154/true/Fishing 4/",
  "Deluxe Worm Bin": "(BC)154 1 Moss 30/Home/DeluxeWormBin/true/Fishing 8/",
  "Bait Maker": "335 3 393 3 397 1/Home/BaitMaker/true/Fishing 6/",
  "Fish Smoker": "709 10 SeaJelly 1 RiverJelly 1 CaveJelly 1/Home/FishSmoker/true/null/",
  "Preserves Jar": "388 50 390 40 382 8/Home/15/true/Farming 4/",
  "Charcoal Kiln": "388 20 334 2/Home/114/true/Foraging 2/",
  "Tapper": "388 40 334 2/Home/105/true/Foraging 4/",
  "Mushroom Log": "709 10 Moss 10/Home/MushroomLog/true/Foraging 4/",
  "Lightning Rod": "335 1 338 1 767 5/Home/9/true/Foraging 6/",
  "Slime Incubator": "337 2 766 100/Home/156/true/Combat 8/",
  "Slime Egg-Press": "382 25 82 1 787 1/Home/158/true/Combat 6/",
  "Crystalarium": "390 99 336 5 337 2 787 1/Home/21/true/Mining 9/",
  "Mini-Jukebox": "335 2 787 1/Home/209/true/null/",
  "Sprinkler": "334 1 335 1/Home/599/false/Farming 2/",
  "Quality Sprinkler": "335 1 336 1 338 1/Home/621/false/Farming 6/",
  "Iridium Sprinkler": "336 1 337 1 787 1/Home/645/false/Farming 9/",
  "Staircase": "390 99/Field/71/true/Mining 2/",
  "Flute Block": "388 10 378 2 771 20/Home/464/false/null/",
  "Drum Block": "390 10 378 2 771 20/Home/463/false/null/",
  "Basic Fertilizer": "92 2/Field/368/false/s Farming 1/",
  "Tree Fertilizer": "771 5 390 5/Field/805/false/s Foraging 7/",
  "Mystic Tree Seed": "309 5 310 5 311 5 292 5/Field/MysticTreeSeed/false/null/",
  "Quality Fertilizer": "92 4 -4 1/Field/369 2/false/s Farming 9/",
  "Basic Retaining Soil": "390 2/Field/370/false/s Farming 4/",
  "Quality Retaining Soil": "390 3 330 1/Field/371 2/false/s Farming 7/",
  "Speed-Gro": "726 1 Moss 5/Field/465 5/false/s Farming 3/",
  "Deluxe Speed-Gro": "725 1 881 5/Field/466 5/false/s Farming 8/",
  "Hyper Speed-Gro": "909 1 881 3 768 1/Field/918/false/null/",
  "Deluxe Fertilizer": "337 1 92 40/Field/919 5/false/null/",
  "Deluxe Retaining Soil": "390 5 771 3 330 1/Field/920/false/null/",
  "Cherry Bomb": "378 4 382 1/Field/286/false/Mining 1/",
  "Bomb": "380 4 382 1/Field/287/false/Mining 6/",
  "Mega Bomb": "384 4 768 1 769 1/Field/288/false/Mining 8/",
  "Explosive Ammo": "335 1 382 2/Home/441 5/false/Combat 8/",
  "Transmute (Fe)": "334 3/Home/335/false/Mining 4/[LocalizedText Strings\\Objects:CraftingRecipe_IronBar]",
  "Transmute (Au)": "335 2/Home/336/false/Mining 7/[LocalizedText Strings\\Objects:CraftingRecipe_GoldBar]",
  "Ancient Seeds": "114 1/Field/499/false/null/",
  "Wild Seeds (Sp)": "16 1 18 1 20 1 22 1/Field/495 10/false/Foraging 1/[LocalizedText Strings\\Objects:CraftingRecipe_SpringSeeds]",
  "Wild Seeds (Su)": "396 1 398 1 402 1/Field/496 10/false/Foraging 4/[LocalizedText Strings\\Objects:CraftingRecipe_SummerSeeds]",
  "Wild Seeds (Fa)": "404 1 406 1 408 1 410 1/Field/497 10/false/Foraging 6/[LocalizedText Strings\\Objects:CraftingRecipe_FallSeeds]",
  "Wild Seeds (Wi)": "412 1 414 1 416 1 418 1/Field/498 10/false/Foraging 7/[LocalizedText Strings\\Objects:CraftingRecipe_WinterSeeds]",
  "Fiber Seeds": "770 1 92 5 330 1/Home/885 4/false/null/",
  "Tea Sapling": "-777 2 771 5 388 5/Field/251/false/null/",
  "Warp Totem: Farm": "709 1 340 1 771 20/Field/688/false/Foraging 8/",
  "Warp Totem: Mountains": "709 1 335 1 390 25/Field/689/false/Foraging 7/",
  "Warp Totem: Beach": "709 1 393 2 771 10/Field/690/false/Foraging 6/",
  "Warp Totem: Desert": "709 2 88 1 386 4/Field/261/false/null/",
  "Warp Totem: Island": "709 5 852 1 829 1/Field/886/false/null/",
  "Rain Totem": "709 1 432 1 726 5/Field/681/false/Foraging 9/",
  "Treasure Totem": "709 5 MysticSyrup 1 Moss 10/Field/TreasureTotem/false/null/",
  "Cookout Kit": "388 15 771 10 382 3/Field/926/false/Foraging 3/",
  "Tent Kit": "709 10 771 25 428 1/Field/TentKit/false/Foraging 8/",
  "Field Snack": "309 1 310 1 311 1/Home/403/false/Foraging 1/",
  "Statue Of Blessings": "390 999 771 999 92 999 Moss 333/Home/StatueOfBlessings/true/null/",
  "Statue Of The Dwarf King": "337 20/Home/StatueOfTheDwarfKing/true/null/",
  "Jack-O-Lantern": "276 1 93 1/Home/746/false/null/",
  "Wood Floor": "388 1/Field/328/false/l 0/",
  "Straw Floor": "388 1 771 1/Field/401/false/l 0/",
  "Weathered Floor": "388 1/Field/331/false/l 0/",
  "Rustic Plank Floor": "388 1/Field/840/false/l 0/",
  "Crystal Floor": "338 1/Field/333 5/false/l 0/",
  "Stone Floor": "390 1/Field/329/false/l 0/",
  "Stone Walkway Floor": "390 1/Field/841/false/l 0/",
  "Brick Floor": "330 2 390 5/Field/293 5/false/l 0/",
  "Wood Path": "388 1/Field/405/false/default/",
  "Gravel Path": "390 1/Field/407/false/default/",
  "Cobblestone Path": "390 1/Field/411/false/default/",
  "Stepping Stone Path": "390 1/Field/415/false/l 0/",
  "Crystal Path": "338 1/Field/409 5/false/l 0/",
  "Bait": "684 1/Home/685 5/false/Fishing 2/",
  "Deluxe Bait": "685 5 Moss 2/Home/DeluxeBait 5/false/Fishing 4/",
  "Wild Bait": "771 10 684 5 766 5/Home/774 5/false/null/",
  "Challenge Bait": "881 5 Moss 2/Home/ChallengeBait 5/false/null/",
  "Magnet": "335 1/Home/703 3/false/Fishing 9/",
  "Spinner": "335 2/Home/686/false/Fishing 6/",
  "Dressed Spinner": "335 2 428 1/Home/687/false/Fishing 8/",
  "Trap Bobber": "334 1 92 10/Home/694/false/Fishing 6/",
  "Sonar Bobber": "335 1 338 2/Home/SonarBobber/false/Fishing 6/",
  "Cork Bobber": "388 10 709 5 766 10/Home/695/false/Fishing 7/",
  "Treasure Hunter": "336 2/Home/693/false/Fishing 7/",
  "Barbed Hook": "334 1 335 1 336 1/Home/691/false/Fishing 8/",
  "Oil Of Garlic": "248 10 247 1/Home/772 1/false/Combat 6/",
  "Life Elixir": "420 1 422 1 257 1 281 1/Home/773 1/false/Combat 2/",
  "Crab Pot": "388 40 335 3/Home/710/false/Fishing 3/",
  "Iridium Band": "337 5 768 50 769 50/Home/527/false/Combat 9/",
  "Wedding Ring": "337 5 74 1/Home/801/false/null/",
  "Ring of Yoba": "336 5 335 5 72 1/Home/524/false/Combat 7/",
  "Sturdy Ring": "334 2 684 25 766 25/Home/525/false/Combat 1/",
  "Warrior Ring": "335 10 382 25 84 10/Home/521/false/Combat 4/",
  "Tub o' Flowers": "388 15 427 1 429 1 453 1 455 1/Home/108/true/null/",
  "Wooden Brazier": "388 10 382 1 771 5/Home/143/true/null/",
  "Wicked Statue": "382 5 390 25/Home/83/true/null/",
  "Stone Brazier": "390 10 382 1 771 5/Home/144/true/null/",
  "Gold Brazier": "336 1 382 1 771 5/Home/145/true/null/",
  "Campfire": "390 10 388 10 771 10/Home/146/true/default/",
  "Stump Brazier": "709 5 382 1/Home/147/true/null/",
  "Carved Brazier": "709 10 382 1/Home/148/true/null/",
  "Skull Brazier": "881 10/Home/149/true/null/",
  "Barrel Brazier": "388 50 768 1 382 1/Home/150/true/null/",
  "Marble Brazier": "567 1 62 1 390 100/Home/151/true/null/",
  "Wood Lamp-post": "388 50 787 1/Home/152/true/null/",
  "Iron Lamp-post": "335 1 787 1/Home/153/true/null/",
  "Fairy Dust": "72 1 595 1/Home/872/false/null/",
  "Bug Steak": "684 10/Home/874/false/Combat 1/",
  "Quality Bobber": "334 1 92 20 768 5/Home/877/false/null/",
  "Monster Musk": "767 30 766 30/Home/879/false/null/",
  "Mini-Obelisk": "709 30 768 20 336 3/Home/238/true/null/",
  "Farm Computer": "122 1 787 1 338 10/Home/239/true/null/",
  "Ostrich Incubator": "881 50 709 50 848 20/Home/254/true/null/",
  "Geode Crusher": "336 2 390 50 72 1/Home/182/true/null/",
  "Solar Panel": "338 10 335 5 336 5/Home/231/true/null/",
  "Bone Mill": "881 10 330 3 390 20/Home/90/true/null/",
  "Thorns Ring": "881 50 390 50 336 1/Home/839/Ring/Combat 7/",
  "Glowstone Ring": "768 5 335 5/Home/888/Ring/Mining 4/",
  "Heavy Tapper": "709 30 910 1/Home/264/true/null/",
  "Hopper": "709 10 337 1 910 1/Home/275/true/null/",
  "Magic Bait": "909 1 684 3/Home/908 5/false/null/"
}

格式

索引 字段 示例值
烹饪 打造 烹饪 打造
Key 名称 Salad Stone Fence
0 原料 20 1 22 1 419 1 390 2
1 (未使用) 25 5 Field
2 产品 196 323
3 是否为大型打造品? false
3 4 解锁条件 f Emily 3 Farming 2
4 5 显示名称
模板字符串。若省略,默认为第一个产品的名称。
Ensalada Valla de piedra

烹饪菜谱和打造配方在字段1中有不同种类的值,但两种值都没有被游戏使用。对于烹饪菜谱,该字段为一对整数。对于打造配方,该字段为HomeField

原料和产出

原料字段是空格分隔的数对列表。每个数对中,第一个数是Objects.xnb中的物品索引(负值指代物品类型,相应文章中有提及)。数对的第二个数是配方所需的物品数量。

产品字段也是空格分隔的数对列表。每个数对中,第一个数是物品或大型打造品ID。数对的第二个数是配方产生的相应物品(或大型打造品)的数量。若只产出一个物品/大型打造品,则数量可以省略,默认为1。

解锁条件

解锁条件字段支持以下条件类型之一,这依赖于配方的类型:

语法 可用于 描述
<NPC> <hearts> 烹饪 当玩家与指定村民达成给定心数的好感度时,一封带有<NPC>Cooking键的信件会在明日送达。此信件会使用%item cookingRecipe %%标记解锁菜谱。
<skill> <level> 烹饪和打造 当玩家达成指定技能的指定等级时,配方会在升级菜单中解锁。有效的技能名称为Farming, Mining, Fishing, Foraging, Luck, 和 Combat (但Luck未实装)。
<default> 烹饪和打造 此配方自动学习。没有被学习的默认配方,会在次日开始时自动学习。例如,宝箱配方是"388 50/Home/130/true/default/"
none
或其他任何数值
烹饪和打造 此配方必须通过其他方式解锁,例如某个事件。(参见下文例外中提及的在游戏一开始就拥有的配方和其他硬编码解锁方式。)

例外

当游戏无法在数据中定位配方键,则会加载火把配方。

“捕猎者”职业以硬编码方式将蟹笼配方的原材料重置为25木材和2铜锭

下列配方是硬编码的,且在游戏一开始时就自动拥有:

木桶配方被硬编码为在升级地下室后自动解锁。

原版游戏的事件解锁的配方被硬编码为,当跳过事件时,该配方会强制解锁。

酱料女皇电视频道解锁的菜谱设置在Content\Data\TV\CookingChannel.xnb文件中。