SMAPI - Stardew Modding API

SMAPI - Stardew Modding API

971k Downloads

A meadowlands farm cannot be created

Chris82111 opened this issue ยท 1 comments

commented

Description
A meadowlands farm cannot be created. The problem is the function menu.createdNewCharacter(true); or one that follows. An exception is thrown when a new meadowlands farm is created.
I think this is a general problem, but I am using a multiplayer mod. For example, if I create a new farm with Game1.whichFarm = 6; for beach and call the function, a new world is created. This means that all the necessary settings have been made correctly.

To Reproduce
If a new farm is created with Game1.whichFarm = 7; for meadowlands and the function menu.createdNewCharacter(true); is called, an exception is thrown.

Log file
SMAPI-latest.txt

Error

System.NullReferenceException
  HResult=0x80004003
  Message=Object reference not set to an instance of an object.
  Source=Stardew Valley
  StackTrace:
   at StardewValley.Farm.onNewGame()
   at StardewValley.Game1.loadForNewGame(Boolean loadedGame)
   at StardewModdingAPI.Framework.SGame.loadForNewGame(Boolean loadedGame)
   at StardewValley.Menus.TitleMenu.createdNewCharacter(Boolean skipIntro)
   at DedicatedServer.HostAutomatorStages.StartFarmStage.Execute(Object sender, UpdateTickedEventArgs e) in C:\Users\Chris82111\Desktop\ded\SMAPIDedicatedServerMod\DedicatedServer\HostAutomatorStages\StartFarmStage.cs:line 301
commented

Hi! The meadowlands farm is implemented as a custom farm type. Farm type 7 is mod, which requires the Game1.whichModFarm field to be set.

If you need help updating the mod to support it, you can come ask in #making-mods-general on the Stardew Valley Discord. Most people who can help don't watch the SMAPI issues, since they're only for SMAPI development tasks. Feel free to ping me there if you don't get an answer!