Berisan / SpawnMonsters

A SMAPI mod for spawning monsters in Stardew Valley
https://www.nexusmods.com/stardewvalley/mods/3201
0 stars 3 forks source link

Spawned Duggy on Player Farm, got System.ArgumentOutOfRangeException #1

Closed smb64 closed 5 years ago

smb64 commented 5 years ago

I was gonna do some testing with monsters and when I spawned a Duggy, the tile it spawned on got f-ed up when it dug underground. I wasn't able to kill it fast enough so it caused more f-ed up tiles. the tiles aren't able to be changed from what I can tell either and can't be built on... luckily they're not in an area I needed. I'm not sure where the SMAPI log file is located so here's what I got from the console:

[SMAPI] SMAPI 2.11.2 with Stardew Valley 1.3.36 on Microsoft Windows 10 Pro
[SMAPI] Mods go here: C:\Program Files (x86)\Steam\steamapps\common\Stardew Valley\Mods
[SMAPI] Starting game...
Setting breakpad minidump AppID = 413150
Steam_SetMinidumpSteamID:  Caching Steam ID:  76561198056961055 [API loaded no]
[SMAPI] Loaded 16 mods:
[SMAPI]    Advanced Location Loader 1.4.7 by Entoarox | Get your content into stardew without replacing any xnb files.
[SMAPI]    Automate 1.12 by Pathoschild | Lets you automate crafting machines, fruit trees, and more by connecting them to chests.
[SMAPI]    Become Ethereal 1.0 by Coll1234567 | Lets you pass through various objects, can be configured.
[SMAPI]    CJB Cheats Menu 1.19 by CJ Bok | Simple in-game cheats menu!
[SMAPI]    CJB Item Spawner 1.11.3 by CJ Bok | Simple in-game item spawner!
[SMAPI]    Console Commands 2.11.2 by SMAPI | Adds SMAPI console commands that let you manipulate the game.
[SMAPI]    Content Patcher 1.6.5 by Pathoschild | Loads content packs which edit game data and images without changing the game files.
[SMAPI]    Data Layers 1.6.1 by Pathoschild | Overlays the world with visual data like accessibility, bee/Junimo/scarecrow/sprinkler coverage, etc.
[SMAPI]    Entoarox Framework 2.4.2 by Entoarox | A collection of APIs to make modding easier.
[SMAPI]    Farm Type Manager 1.3.2 by Esca | Allows custom spawning of content from each farm type, such as ore and forage
[SMAPI]    NPC Map Locations 2.3.3 by Bouhm | Shows NPCs and farmers on the map. Uses a modified map page for accurate tracking.
[SMAPI]    PyTK 1.6.3 by Platonymous | Platonymous Toolkit
[SMAPI]    Save Backup 2.11.2 by SMAPI | Automatically backs up all your saves once per day into its folder.
[SMAPI]    Spawn Monsters 2.2 by Berisan | Spawn any monster you want, anywhere you want!
[SMAPI]    Summit Reborn [Combined] 1.4 by KoihimeNakamura and Emissary of Infinity | Enables the summit, fixes rain on the summit map, and adds a neat cloud visual
[SMAPI]    WinterGrass 1.3 by Cat | Grass will stay around in winter.

[SMAPI] Loaded 3 content packs:
[SMAPI]    Karmylla's Immersive Maps 2.5.61 by Karmylla | for Content Patcher | Enjoy a more immersive SDV with more detailed maps and Dusty!
[SMAPI]    Stardew Valley Expanded 1.0.11 by FlashShifter | for Advanced Location Loader | This mod adds several new maps to the game with unique shops and activities.
[SMAPI]    Stardew Valley Expanded 1.0.11 by FlashShifter | for Content Patcher | Remasters all maps, adds ten new maps, adds over 400 location messages, adds 38 new events, and more!

[SMAPI] Found 6 mods with warnings:
[SMAPI]    Skipped mods
[SMAPI]    --------------------------------------------------
[SMAPI]       These mods could not be added to your game.

[SMAPI]       - DeluxeGrabber 2.5.1 because it's no longer compatible. Please check for a new version at https://mods.smapi.io

[SMAPI]    Changed save serialiser
[SMAPI]    --------------------------------------------------
[SMAPI]       These mods change the save serialiser. They may corrupt your save files, or make them unusable if
[SMAPI]       you uninstall these mods.

[SMAPI]       - Entoarox Framework

[SMAPI]    Patched game code
[SMAPI]    --------------------------------------------------
[SMAPI]       These mods directly change the game code. They're more likely to cause errors or bugs in-game; if
[SMAPI]       your game has issues, try removing these first. Otherwise you can ignore this warning.

[SMAPI]       - Become Ethereal
[SMAPI]       - PyTK

[SMAPI]    Bypassed safety checks
[SMAPI]    --------------------------------------------------
[SMAPI]       These mods bypass SMAPI's normal safety checks, so they're more likely to cause errors or save
[SMAPI]       corruption. If your game has issues, try removing these first.

[SMAPI]       - Advanced Location Loader

[SMAPI]    No update keys
[SMAPI]    --------------------------------------------------
[SMAPI]       These mods have no update keys in their manifest. SMAPI may not notify you about updates for these
[SMAPI]       mods. Consider notifying the mod authors about this problem.

[SMAPI]       - Stardew Valley Expanded

[Advanced Location Loader] Loading content pack 'Stardew Valley Expanded'...
[SMAPI] Type 'help' for help, or 'help <cmd>' for a command's usage

[SMAPI] You can update 1 mod:
[SMAPI]    DeluxeGrabber 2.5.2-unofficial.2-pathoschild: https://mods.smapi.io/#Deluxe_Auto-Grabber
[Advanced Location Loader] Applying Stardew Valley Expanded...
[Advanced Location Loader] Patches applied!
[Advanced Location Loader] Dynamic content detected, preparing dynamic update logic...
[NPC Map Locations] Detected modded location Desert. Adjusting map tracking to scale.
[PyTK] Rebuilding Custom Objects from Save
[game] An error occured in the base update loop: System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
   at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
   at StardewValley.GameLocation.updateCharacters(GameTime time) in C:\Users\gitlab-runner\gitlab-runner\builds\5c0f9387\0\chucklefish\stardewvalley\Farmer\Farmer\Locations\GameLocation.cs:line 2055
   at StardewValley.GameLocation.updateEvenIfFarmerIsntHere(GameTime time, Boolean ignoreWasUpdatedFlush) in C:\Users\gitlab-runner\gitlab-runner\builds\5c0f9387\0\chucklefish\stardewvalley\Farmer\Farmer\Locations\GameLocation.cs:line 2084
   at StardewValley.Locations.BuildableGameLocation.updateEvenIfFarmerIsntHere(GameTime time, Boolean skipWasUpdatedFlush) in C:\Users\gitlab-runner\gitlab-runner\builds\5c0f9387\0\chucklefish\stardewvalley\Farmer\Farmer\Locations\BuildableGameLocation.cs:line 186
   at StardewValley.Farm.updateEvenIfFarmerIsntHere(GameTime time, Boolean skipWasUpdatedFlush) in C:\Users\gitlab-runner\gitlab-runner\builds\5c0f9387\0\chucklefish\stardewvalley\Farmer\Farmer\Locations\Farm.cs:line 1386
   at StardewValley.Game1.UpdateLocations(GameTime time) in C:\Users\gitlab-runner\gitlab-runner\builds\5c0f9387\0\chucklefish\stardewvalley\Farmer\Farmer\Game1.cs:line 3568
   at StardewValley.Game1._update(GameTime gameTime) in C:\Users\gitlab-runner\gitlab-runner\builds\5c0f9387\0\chucklefish\stardewvalley\Farmer\Farmer\Game1.cs:line 2414
   at Update_Patch1(Object gameTime, GameTime )
[PyTK] Replacing Custom Objects
[PyTK] Rebuilding Custom Objects
[NPC Map Locations] Unknown location: BlueMoonVineyard.
[PyTK] Replacing Custom Objects
[PyTK] Rebuilding Custom Objects
Berisan commented 5 years ago

Hi, thanks for reporting this. I was able to identify the bug. This bug happens because after a Duggy digs back into the ground, the game updates the tile's sprite with a dug hole. But the Spritesheet used in the overworld seems to be different than in the caves, so what the game thinks is the cave's dug hole sprite is actually... something else. The game also makes these tiles untillable like in the caves. I am currently working on a solution.

Sorry for answering this late, but I don't check my GitHub frequently and for some reason, GitHub didn't notify me when you posted this.

Berisan commented 5 years ago

Implemented a fix in version 2.3.