SMAPI - Stardew Modding API

SMAPI - Stardew Modding API

971k Downloads

Festivals don't occur, treated as normal days

mpql opened this issue ยท 5 comments

commented

As title says. In multi-player, loaded up the first festival, the egg festival -- non-host without SMAPI entered egg festival, I (host) entered a non-festival village.

commented
commented

Found the issue. The problem happens in the game's Event.tryToLoadFestival method:

public bool tryToLoadFestival(string festival)
{
    Game1.player.festivalScore = 0;
    try
    {
        this.festivalData = this.festivalContent.Load<Dictionary<string, string>>("Data\\Festivals\\" + festival);
        this.festivalData.Add("file", festival); 
    }
    catch (Exception ex)
    {
        return false;
    }

That method is called each time you enter a new location. Since SMAPI caches the asset, the file key is already set on subsequent loads and the .Add call crashes. The exception gets caught, and tryToLoadFestival always returns false.

I suggested changing that line to this.festivalData["file"] = festival, which will fix the issue with SMAPI and have no impact on the default code.

commented

I saw lots in the 1.3 beta thread, but I didn't know all the circumstances surrounding their issues, and I didn't want to take ownership of them.

commented

what file is it that I would have to edit to make this change to make this fix?

commented

The festival issue is fixed in the latest Stardew Valley 1.3.5 beta, and a more general fix will be done through #488.