Help with understanding smapi errors

Discussion in 'Mods' started by zeusmoltar9, Dec 29, 2018.

  1. zeusmoltar9

    zeusmoltar9 Void-Bound Voyager

    Hello,

    I have been trying to make a custom "Winecellar" on a farm map i made. I followed the tutorials as best I could but I have hit a error wall that i can't find any info on. I'm somewhat new to this so i'm sorry if this has already been answered (I couldn't find an answer here after searching).

    I made a map that replaces the foraging farm, all i did was extract the xnb, mod it with the Tiled program. Added a new area, the "Winecellar". I added a door and made a warp to the inside at "3 15 Winecellar". I packed all the files back up with the xnbcli program.

    I made I smapi mod following the instructions on the moddingwiki, This is what my visual Studio looks like, I also have the manifest.json there as well.

    using System;
    using Microsoft.Xna.Framework;
    using StardewModdingAPI;
    using StardewModdingAPI.Events;
    using StardewModdingAPI.Utilities;
    using StardewValley;

    namespace Winecellarproject
    {
    public class Modentry : Mod
    {

    public override void Entry(IModHelper helper)
    {
    // the game clears locations when loading the save, so do it after the save loads
    helper.Events.GameLoop.SaveLoaded += this.OnSaveLoaded;
    }

    private void OnSaveLoaded(object sender, SaveLoadedEventArgs args)
    {
    // create a map asset key for an 'assets/map.tbin' file in your mod folder
    string mapAssetKey = this.Helper.Content.GetActualAssetKey("Winecellar.tbin", ContentSource.ModFolder);

    // add the new location
    GameLocation location = new GameLocation(mapAssetKey, "Winecellar") { IsOutdoors = false, IsFarm = false };
    Game1.locations.Add(location);
    }

    }
    }

    After I build the mod is gives no errors in the error list.

    Here is my log from the debugger in smapi when I try to run the game: https://log.smapi.io/LurzHXvu

    I know there is problems, But I can't where the obvious mistake is. I do have the new complied .xnb in my mod folder.

    thanks for taking a look,

    Moltar
     

    Share This Page