This wiki is a read-only version of the Stardew Valley Wiki. The official editable wiki maintained by ConcernedApe can be found at stardewvalleywiki.com
Talk:The Queen of Sauce
This talk page is for discussing The Queen of Sauce. | |
---|---|
|
|
Removed rerun bug
I removed this bug entry because I can't reproduce it in 1.3.36:
“ | “At any point during the first 2-year cycle, a new recipe may air on a Wednesday instead of a Sunday. The episode will be labeled "Re-run" even though it is the first time shown. Normally the same recipe will air the following Sunday.” |
I documented the testing process here since it's trickier than most bugs: (a) reruns are chosen randomly, so playing through the game for two years without seeing the bug might just mean you were lucky; and (b) the game internally uses the number of days played, not the date, so changing the date manually won't reflect vanilla behavior.
Instead we need to check the code directly, specifically TV.getWeeklyRecipe. If we strip out the display text logic, the method boils down to this:
stripped-down vanilla code |
---|
protected virtual void getWeeklyRecipe()
{
int id = (int)Game1.stats.DaysPlayed % 224 / 7;
var recipes = Game1.temporaryContent.Load<Dictionary<string, string>>("Data\\TV\\CookingChannel");
if (Game1.shortDayNameFromDayOfSeason(Game1.dayOfMonth) == "Wed")
id = Math.Max(1, 1 + new Random((int)Game1.stats.DaysPlayed + (int)Game1.uniqueIDForThisGame / 2).Next((int)Game1.stats.DaysPlayed % 224) / 7);
try
{
string key = recipes[id.ToString()].Split('/')[0];
if (!Game1.player.cookingRecipes.ContainsKey(key))
Game1.player.cookingRecipes.Add(key, 0);
}
catch
{
string key = recipes["1"].Split('/')[0];
if (!Game1.player.cookingRecipes.ContainsKey(key))
Game1.player.cookingRecipes.Add(key, 0);
}
}
|
Reviewing the code confirms two things:
- A new recipe is never selected on Wednesday, since the exclusive max ID matches the last Sunday's ID.
- The final Shrimp Cocktail recipe is never selected, which confirms the other listed bug. (Y2-winter-28 is daysPlayed 224, which results in ID
224 % 224 / 7 = 0
. Since there's no ID 0, it defaults to 1 which is Stir Fry again.)
To make sure, here's a custom script which shows the first date each recipe can be shown (code copied from the game stripped out for brevity):
test script |
---|
int DaysPerSeason = 28;
string[] Seasons = { "spring", "summer", "fall", "winter" };
int TotalYears = 3;
void Main()
{
var recipes = new Dictionary<string, string> { ... }; // copied from Content/Data/CookingChannel.xnb
var seenRecipes = new HashSet<string>();
foreach (int year in Enumerable.Range(1, this.TotalYears))
{
foreach (string season in this.Seasons)
{
foreach (int day in Enumerable.Range(1, this.DaysPerSeason))
{
var date = new WorldDate(year, season, day);
int daysPlayed = date.TotalDays + 1; // date uses 0 for spring 1
if (daysPlayed < 7)
continue; // channel not shown yet
foreach (var recipe in getWeeklyRecipe(daysPlayed, date.DayOfMonth, recipes))
{
if (seenRecipes.Add(recipe))
{
string dateStr = $"Y{date.Year}-{date.Season.Substring(0, 4)}-{date.DayOfMonth.ToString().PadLeft(2, '0')} {shortDayNameFromDayOfSeason(date.DayOfMonth)}";
$"{dateStr} [week {daysPlayed / 7}]: {recipe}".Dump();
}
}
}
}
}
}
protected IEnumerable<string> getWeeklyRecipe(int daysPlayed, int dayOfMonth, Dictionary<string, string> recipes)
{
int num = daysPlayed % 224 / 7;
if (shortDayNameFromDayOfSeason(dayOfMonth) == "Wed")
{
foreach (int id in Enumerable.Range(1, (daysPlayed % 224) / 7))
{
if (recipes.ContainsKey(id.ToString()))
yield return recipes[id.ToString()].Split('/')[0];
else
yield return recipes["1"].Split('/')[0];
}
yield break;
}
if (recipes.ContainsKey(num.ToString()))
yield return recipes[num.ToString()].Split('/')[0];
else
yield return recipes["1"].Split('/')[0];
}
public static string shortDayNameFromDayOfSeason(int dayOfSeason) { ... } // copied from Game1.shortDayNameFromDayOfSeason
public class WorldDate { ... } // copied from game code
|
And here's the result, which matches the documented dates:
script result |
---|
Y1-spri-07 Sun [week 1]: Stir Fry Y1-spri-14 Sun [week 2]: Coleslaw Y1-spri-21 Sun [week 3]: Radish Salad Y1-spri-28 Sun [week 4]: Omelet Y1-summ-07 Sun [week 5]: Baked Fish Y1-summ-14 Sun [week 6]: Pancakes Y1-summ-21 Sun [week 7]: Maki Roll Y1-summ-28 Sun [week 8]: Bread Y1-fall-07 Sun [week 9]: Tortilla Y1-fall-14 Sun [week 10]: Trout Soup Y1-fall-21 Sun [week 11]: Glazed Yams Y1-fall-28 Sun [week 12]: Artichoke Dip Y1-wint-07 Sun [week 13]: Plum Pudding Y1-wint-14 Sun [week 14]: Chocolate Cake Y1-wint-21 Sun [week 15]: Pumpkin Pie Y1-wint-28 Sun [week 16]: Cranberry Candy Y2-spri-07 Sun [week 17]: Pizza Y2-spri-14 Sun [week 18]: Hashbrowns Y2-spri-21 Sun [week 19]: Complete Breakfast Y2-spri-28 Sun [week 20]: Lucky Lunch Y2-summ-07 Sun [week 21]: Carp Surprise Y2-summ-14 Sun [week 22]: Maple Bar Y2-summ-21 Sun [week 23]: Pink Cake Y2-summ-28 Sun [week 24]: Roasted Hazelnuts Y2-fall-07 Sun [week 25]: Fruit Salad Y2-fall-14 Sun [week 26]: Blackberry Cobbler Y2-fall-21 Sun [week 27]: Crab Cakes Y2-fall-28 Sun [week 28]: Fiddlehead Risotto Y2-wint-07 Sun [week 29]: Poppyseed Muffin Y2-wint-14 Sun [week 30]: Lobster Bisque Y2-wint-21 Sun [week 31]: Bruschetta |
- The last time I tested the Queen of Sauce was January 2017, based on the spreadsheet I have in the "already done" folder on my hard drive. May I say, kudos on the thorough analysis! Thank you! margotbean (talk) 04:06, 30 September 2019 (UTC)