Giter Site home page Giter Site logo

stardew-valley-mods's Introduction

when you get a dumb idea and halfway through building it you realize you've spend way more time than it deserves but you're in too deep to quit

stardew-valley-mods's People

Contributors

axellslade avatar boleanly avatar bouhm avatar d0n-a avatar danielletlumach avatar dutlist avatar ellipszist avatar enaium avatar esca-mmc avatar hacktix avatar hawkfalcon avatar joachimbrasier avatar juliowh avatar makinday avatar margotbean avatar martin66789 avatar mizzion avatar niubilityxino avatar pathoschild avatar patrxgt avatar rushedlogic avatar salihnayc avatar timur13240 avatar twosoup avatar zangorr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

stardew-valley-mods's Issues

How to run Function CustomNpcMarkerOffsets through another DLL?

How to run Function CustomNpcMarkerOffsets Without modifying globals.json file, can you suggest me the code? I'm looking for a way to run a different function from another mod through my mod.

-Excuse me if sometimes I don't know anything about it. I'm not good at languages.

black screen

every time I open the map on sdv 1.1 the screen goes black

PrimaryText/SecondaryText not shown on map

Hi,

I tried adding support for the Ridgeside Village mod through contentpatcher with version 2.6.0 and it seems like PrimaryText/SecondaryText getting ignored when using MapTooltip. It always shows the assigned [LocationName] on the map itself.
I attached my test content pack down below just in case.

Thanks for looking into it.

[CP} Ridge Worldmap.zip

[NPC Location Compass] Icons in Wrong Position

The icons are in the wrong positions if the Zoom level and UI Scale don't match.

To reproduce, just set the Zoom Level and UI Scale to different percentages (e.g. 75% Zoom Level and 100% UI Scale), then press Alt to show the mod.

New paradigm for long-term maintainability + compatibility with mods that modfiy locations/map

This is a new paradigm to consider in the future, for maintainability of the mod that does not require any kind of manual work every time there is a content update. From a development standpoint, this is a better solution. Note that this model solves both maintainability of the mod and the inaccuracy of the map page.

The general idea would be to provide tool-tips of where NPCs are in a location on the map page. The player would then click on the location to get a render of the tilemap (in its current state in the game) of that location, which would also show where the NPCs are in that location.

map-gif

Currently I do not plan to work on this and it appears that the game developer for Stardew Valley does not have more content updates planned after 1.3 in the near future. I also spent like fifty hours on modifying the map so it'd be a shame to not use it...

Translations for Turkish

https://www.nexusmods.com/stardewvalley/articles/101

Text to be translated:
Minimap
Enabled
Minimap width
Minimap height
Settings
Always show villagers
Show villagers player has talked to
Hide villagers player has talked to
Only show villagers in player's location
Only show villagers within heart level
Minimum heart level
Maximum heart level
Show quests or birthdays
Show hidden villagers
Show traveling merchant
Include/Exclude villagers

Get mod up to date with game updates

New Locations

  • Forest Farm
  • Hilltop Farm
  • Riverland Farm
  • Wilderness Farm
  • Bug Land
  • Witch Hut
  • Witch Swamp
  • Witch Warp Cave

Localization

  • Change any hard-coded string renders so they are translated for localization

Update check crashes on Mac

The update check uses HttpClient, which crashes on Mac:

System.BadImageFormatException: Could not resolve field token 0x0400007e
File name: 'NPCMapLocations'
  at NPCMapLocations.MapModVersionChecker+<getLatestVersion>c__async2.MoveNext () <0x16b6a8340 + 0x0007b> in <filename unknown>:0 
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () <0x16b6aa0b0 + 0x00038> in <filename unknown>:0 
  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) <0x16b6a9b90 + 0x00118> in <filename unknown>:0 
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) <0x16a08bd60 + 0x000b7> in <filename unknown>:0 
  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) <0x15a2232d0 + 0x00042> in <filename unknown>:0 
  at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () <0x15a223230 + 0x0001f> in <filename unknown>:0 
  at NPCMapLocations.MapModVersionChecker+<getNotification>c__async0.MoveNext () <0x15a4e4c30 + 0x0014d> in <filename unknown>:0 
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () <0x16b6aa0b0 + 0x00038> in <filename unknown>:0 
  at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<ThrowAsync>m__1 (System.Object state) <0x16b6aa590 + 0x00044> in <filename unknown>:0 
  at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context (System.Object state) <0x1585a1300 + 0x00050> in <filename unknown>:0 
  at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, Boolean preserveSyncCtx) <0x10cee02b0 + 0x0023f> in <filename unknown>:0 
  at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, Boolean preserveSyncCtx) <0x10cee0270 + 0x00028> in <filename unknown>:0 
  at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem () <0x1585a1290 + 0x00057> in <filename unknown>:0 
  at System.Threading.ThreadPoolWorkQueue.Dispatch () <0x15859f710 + 0x00222> in <filename unknown>:0 
  at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback () <0x15859f5e0 + 0x00010> in <filename unknown>:0 
[15:33:15 TRACE SMAPI] TimeSpeed Mod (unofficial) used the Log class, which is deprecated since SMAPI 1.1. This will break in a future version of SMAPI.
[15:33:15 INFO  TimeSpeed Mod (unofficial)] [TimeSpeed] Time is frozen globally.
[15:33:16 INFO  TimeSpeed Mod (unofficial)] [TimeSpeed] Time is temporarily unfrozen at "FarmHouse".

I'm not really sure why that happens, but SMAPI had to use WebRequest instead to support Mac.

(Originally reported to the SMAPI forum thread.)

LOOKING FOR CONTRIBUTORS

As I'm no longer maintaining this project, I am looking for contributor(s) who can co-maintain this project (primarily NPC Map Locations) here and on NexusMods. Pathoschild is listed as a co-maintainer but not available for work other than major bugs due to involvement in dozens of other projects. Please reply here if interested, thank you!

Possible rewrite for Content Patcher?

Hi bouhm,
Thanks for the mod! I'm wondering would it be possible to make the data for "CustomNpcMarkerOffsets" targetable with Content Patcher instead of having it as part of Config?
This will make it easier for the custom NPCs modders to ensure the NPC marker will be correct (add the data for the marker themselves with CP) while simplifying the installation for the user (Removing the need to edit the config manually).

The same perhaps could be done with the CustomMapLocations in customlocations.json

I imagine NPC map location will function as it is for the vanilla game while Custom NPC marker and the information for the custom map will all be handled through CP by the respective modder.

I imagine it'll be some work to do, but perhaps u might be interested.

Is anyone try to fix the immersive farm2 map?

I add some codes for the mapvectors of the farm, but it doesn't change anything. It works for custom npc, but it doesn't work for immersive farm. I want to know why the map vectors won't work?

"Farm":{ "MapVectors":[ { "TileX": 0, "TileY": 0, "MapX": 311, "MapY": 242 }, { "TileX": 24, "TileY": 78, "MapX": 352, "MapY": 378 }, { "TileX": 25, "TileY": 0, "MapX": 380, "MapY": 241 }, { "TileX": 162, "TileY": 78, "MapX": 606, "MapY": 380 }, { "TileX": 24, "TileY": 78, "MapX": 318, "MapY": 380 }, { "TileX": 163, "TileY": 156, "MapX": 607, "MapY": 403 } ] }

Content Patcher Map location data appears to be ignored.

Using NPCMapLocations_2.6.3-alpha.20210307.zip as supplied to Ridgeside Village, and the Ridgeside Village 1.2.8 Beta 4.

The Custom_Ridgeside_LogCabinHotel3rdFloor location definition located here appears to be ignored.

NPCs and the player that are here instead appear in the top left corner of the Custom_Ridgeside_RidgesideVillage location instead.

The Custom_Ridgeside_LogCabinHotelLobby and Custom_Ridgeside_LogCabinHotel2ndFloor location definitions with identical MapVectors works correctly.

Failed to show all npcs when playing in multiplayer

Exception:

[NPC Map Locations] This mod failed in the GameLoop.UpdateTicked event. Technical details:
System.NullReferenceException:
In NPCMapLocations.ModMain.LocationToMap(String locationName, Int32 tileX, Int32 tileY, Dictionary2 CustomMapVectors, List1 LocationBlacklist, Boolean isPlayer) Location C:\Users\bbouh\Projects\stardew-valley-mods\NPCMapLocations\ModMain.cs: line 936
In NPCMapLocations.ModMain.UpdateFarmers() Location C:\Users\bbouh\Projects\stardew-valley-mods\NPCMapLocations\ModMain.cs: line 886
In NPCMapLocations.ModMain.UpdateMarkers(Boolean forceUpdate) Location C:\Users\bbouh\Projects\stardew-valley-mods\NPCMapLocations\ModMain.cs: line 684
In NPCMapLocations.ModMain.GameLoop_UpdateTicked(Object sender, UpdateTickedEventArgs e) Location C:\Users\bbouh\Projects\stardew-valley-mods\NPCMapLocations\ModMain.cs: cs 467
In StardewModdingAPI.Framework.Events.ManagedEvent`1.<>c__DisplayClass16_1.b__2() Location C:\source_Stardew\SMAPI\src\SMAPI\Framework\Events\ManagedEvent.cs: line 138
In StardewModdingAPI.Framework.PerformanceMonitoring.PerformanceMonitor.Track(String collectionName, String sourceName, Action action) Location C:\source_Stardew\SMAPI\src\SMAPI\Framework\PerformanceMonitoring\PerformanceMonitor.cs: line 87

1.1 compatability

I've attempted to fix this myself, but haven't had any luck.

[08:37:27.669 PM] An exception occured in XNA UpdateTick: System.MissingFieldException: Field not found: 'StardewValley.Game1.content'. at NPCMapLocations.MapPageTooltips..ctor(String names, Int32 nameTooltipMode) at NPCMapLocations.MapModMain.GameEvents_UpdateTick(Object sender, EventArgs e) at System.EventHandler.Invoke(Object sender, EventArgs e) at StardewModdingAPI.Events.GameEvents.InvokeUpdateTick()

Error when loading a v1.5 saved game

[NPC Map Locations] Using recolored map maps\_default\fall_map.png.
[NPC Map Locations] This mod failed in the GameLoop.SaveLoaded event. Technical details:
System.InvalidOperationException: Nullable object must have a value.
   at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
   at System.Nullable`1.get_Value()
   at StardewValley.Locations.VolcanoDungeon.GenerateEntities() in C:\GitlabRunner\builds\Gq5qA5P4\0\ConcernedApe\stardewvalley\Farmer\Farmer\Locations\VolcanoDungeon.cs:line 1668
   at StardewValley.Locations.VolcanoDungeon.GenerateLevel(Boolean use_level_level_as_layout) in C:\GitlabRunner\builds\Gq5qA5P4\0\ConcernedApe\stardewvalley\Farmer\Farmer\Locations\VolcanoDungeon.cs:line 954
   at StardewValley.Locations.VolcanoDungeon.GenerateContents(Boolean use_level_level_as_layout) in C:\GitlabRunner\builds\Gq5qA5P4\0\ConcernedApe\stardewvalley\Farmer\Farmer\Locations\VolcanoDungeon.cs:line 384
   at StardewValley.Locations.VolcanoDungeon.GetLevel(String name, Boolean use_level_level_as_layout) in C:\GitlabRunner\builds\Gq5qA5P4\0\ConcernedApe\stardewvalley\Farmer\Farmer\Locations\VolcanoDungeon.cs:line 3253
   at StardewValley.Game1.getLocationFromNameInLocationsList(String name, Boolean isStructure) in C:\GitlabRunner\builds\Gq5qA5P4\0\ConcernedApe\stardewvalley\Farmer\Farmer\Game1.cs:line 11670
   at StardewValley.Game1.getLocationFromName(String name, Boolean isStructure) in C:\GitlabRunner\builds\Gq5qA5P4\0\ConcernedApe\stardewvalley\Farmer\Farmer\Game1.cs:line 11643
   at StardewValley.Game1.getLocationFromName(String name) in C:\GitlabRunner\builds\Gq5qA5P4\0\ConcernedApe\stardewvalley\Farmer\Farmer\Game1.cs:line 11620
   at LocationUtil.MapRootLocations(GameLocation location, GameLocation prevLocation, String root, Boolean hasOutdoorWarp, Vector2 warpPosition) in C:\Users\bbouh\Projects\stardew-valley-mods\LocationUtil\LocationUtil.cs:line 104
   at LocationUtil.GetLocationContexts() in C:\Users\bbouh\Projects\stardew-valley-mods\LocationUtil\LocationUtil.cs:line 40
   at NPCMapLocations.ModMain.GameLoop_SaveLoaded(Object sender, SaveLoadedEventArgs e) in C:\Users\bbouh\Projects\stardew-valley-mods\NPCMapLocations\ModMain.cs:line 156
   at StardewModdingAPI.Framework.Events.ManagedEvent`1.Raise(TEventArgs args, Func`2 match) in C:\source\_Stardew\SMAPI\src\SMAPI\Framework\Events\ManagedEvent.cs:line 125
[NPC Map Locations] This mod failed in the GameLoop.DayStarted event. Technical details:
System.NullReferenceException: Object reference not set to an instance of an object.
   at NPCMapLocations.ModMain.LocationToMap(String locationName, Int32 tileX, Int32 tileY, Dictionary`2 CustomMapVectors, List`1 LocationBlacklist, Boolean isPlayer) in C:\Users\bbouh\Projects\stardew-valley-mods\NPCMapLocations\ModMain.cs:line 936
   at NPCMapLocations.ModMain.UpdateNpcs() in C:\Users\bbouh\Projects\stardew-valley-mods\NPCMapLocations\ModMain.cs:line 793
   at NPCMapLocations.ModMain.UpdateMarkers(Boolean forceUpdate) in C:\Users\bbouh\Projects\stardew-valley-mods\NPCMapLocations\ModMain.cs:line 676
   at NPCMapLocations.ModMain.GameLoop_DayStarted(Object sender, DayStartedEventArgs e) in C:\Users\bbouh\Projects\stardew-valley-mods\NPCMapLocations\ModMain.cs:line 383
   at StardewModdingAPI.Framework.Events.ManagedEvent`1.Raise(TEventArgs args, Func`2 match) in C:\source\_Stardew\SMAPI\src\SMAPI\Framework\Events\ManagedEvent.cs:line 125
[NPC Map Locations] This mod failed in the GameLoop.UpdateTicked event. Technical details:
System.NullReferenceException: Object reference not set to an instance of an object.
   at NPCMapLocations.ModMain.LocationToMap(String locationName, Int32 tileX, Int32 tileY, Dictionary`2 CustomMapVectors, List`1 LocationBlacklist, Boolean isPlayer) in C:\Users\bbouh\Projects\stardew-valley-mods\NPCMapLocations\ModMain.cs:line 936
   at NPCMapLocations.ModMain.UpdateNpcs() in C:\Users\bbouh\Projects\stardew-valley-mods\NPCMapLocations\ModMain.cs:line 793
   at NPCMapLocations.ModMain.UpdateMarkers(Boolean forceUpdate) in C:\Users\bbouh\Projects\stardew-valley-mods\NPCMapLocations\ModMain.cs:line 676
   at NPCMapLocations.ModMain.GameLoop_UpdateTicked(Object sender, UpdateTickedEventArgs e) in C:\Users\bbouh\Projects\stardew-valley-mods\NPCMapLocations\ModMain.cs:line 467
   at StardewModdingAPI.Framework.Events.ManagedEvent`1.Raise(TEventArgs args, Func`2 match) in C:\source\_Stardew\SMAPI\src\SMAPI\Framework\Events\ManagedEvent.cs:line 125

The error in the GameLoop.UpdateTicked event repeats every second or so.

Modify map page

After spending countless hours manually trying to force an accurate mapping of the game world to the inaccurate map page (manually inputting 300+ points, still WIP), I've finally decided this is not a good solution after all. It was like forcefully trying to fit incongruous puzzle pieces together. This method was acceptable when I cared only about NPC paths, but now that I am including the whole map, it's no longer viable.

I will be modifying the map page to make it actually accurate to the game world, and then redo the vectors for the different locations (which will require a lot less points, since the map will be much more accurate). I realize that people may disagree with this decision and may want to keep things vanilla instead of modifying an asset of the game, but I believe spending a little time comparing the vanilla map page to the game world will allow anyone to see the glaring discrepancies that make it very difficult to maintain accuracy of this mod.

Japanese, Chinese, Russian, Spanish, Portuguese, & German Translations

With official Japanese, Chinese, Russian, Spanish, Portuguese, German and possibly Thai translations of Stardew Valley planned this month, I am looking to add translations to this mod. Please let me know if you are know any of these languages and are interested in helping out. Thanks!

The translations do not have to be direct/literal word-for-word translations; feel free to phrase it however you see fit based on what the settings actually do. It just has to be concise and intuitive.

Text: http://pastebin.com/S6urxKQz

Add list of unknown locations to summary command

npc_map_locations_summary is a very useful command. Could it also be enhanced to include a list of "unknown" locations. This would assist greatly in ensure that no maps are forgotten when writing definitions.

Getting my console spammed with errors

My console gets spammed with an exception whenever I pause the game, it mentions NPCMapLocations, not sure if there's some conflict with some other mod but it worked fine until it started doing it

[11:14:33.157 AM] An exception occured in XNA UpdateTick: System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
at NPCMapLocations.MapModMain.GameEvents_UpdateTick(Object sender, EventArgs e)
at System.EventHandler.Invoke(Object sender, EventArgs e)
at StardewModdingAPI.Events.GameEvents.InvokeUpdateTick() in Z:\Projects\SMAPI\src\StardewModdingAPI\Events\Game.cs:line 80

Compatibility with mods that modify locations/map

https://www.nexusmods.com/stardewvalley/mods/1149
https://www.nexusmods.com/stardewvalley/mods/1317
https://www.nexusmods.com/stardewvalley/mods/1531
https://www.nexusmods.com/stardewvalley/mods/130
https://www.nexusmods.com/stardewvalley/mods/1504

For maps, would probably have to work with mod author to come up with a modified map that works for both, although we will have to control Mod loading order with SMAPI (not implemented).

For locations... probably #17

When showing by heart level, toggling off and on allows showing NPCs who don't meet the conditions.

Currently I have the configs set so that only NPCs with whom I have a relationship level of 2 or greater hearts will show up on the map but I found that if I toggle the check mark off then on again of an NPC with whom I don't yet have 2 hearts, the mod then shows me that NPC on the map, ignoring the settings in the config file.

My preferred fix for this would be to grey out the check box for NPCs who don't meet the requirements. (The same way that it's greyed out for NPCs that the player hasn't met yet.)

default settings for all new saves

hello, would be very nice to have this mod load default settings for all new created saves. I playing mostly in coop and I want to be sure that other players don't 'cheating' too much by showing all npc's while they even don't meet them - its ruining experience from game.
I already changed key from TAB to smth else, so they will never found that there is hidden menu on map view heh. Only these default settings are missing :(

by default settings I mean something like that: (tried adding values in globals.json (these marked with gray background), but every new save clears all of these settings :/ )
.
.

notepad++_2020-10-22_02-10-43
.
hope it is possible to change that.. Thanks in advance. cheers

NPC Map Locations 1.43 crashes on launch due to new version format

NPC Map Locations 1.43 crashes the game on launch because its update check can't handle the mod's new version format. (The error doesn't happen in 1.44.) This seems to be affecting a number of players who haven't updated to the latest version.

Error details:

[ERROR SMAPI] Critical app domain exception: System.FormatException: Input string was not in a correct format.
   at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
   at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)
   at NPCMapLocations.MapModVersionChecker.compareVersions(String current, String latest)
   at NPCMapLocations.MapModVersionChecker.<getNotification>c__async0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c.<ThrowAsync>b__6_1(Object state)
   at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(Object state)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()

If you have no objections, I'll mark version 1.43 incompatible. That means SMAPI won't load it, and will instead show an error like this in the console:

[ERROR SMAPI] Skipped NPC Map Locations v1.43 because this version has an update check error which crashes the game. Please check for a newer version of the mod here:
- http://www.nexusmods.com/stardewvalley/mods/239

Let me know if you'd like to change the error text, or if you can fix it on your end somehow. :)

Map marker cropping issues with reskinned NPCs

I'm using Adarins Girl Mod, it replaces certain male NPCs with females. This causes an issue with your mod as their sprites have changed size so on the map screen their marker/face is half cropped off.

Would it be possible to bring markerCrop out into a config file rather than a constant? Or perhaps even just allow for overrides to be specified in the config file. I grabbed your source and tried to build my own, but when I run the mod in the game I get an error regarding a missing asset called map.

If I can help in any other way, just give me a shout

NPC Map Locations ignore redefined vanilla locations Toolips.

NPC Map Locations comes with all vanilla locations hardcoded.

To avoid a conflict with another mod, I moved the location and tooltip of the secret woods.

This moved location tooltip appears to ignored by NPC Map Locations, which continues to display the hardcoded tooltip in the previous location.

You can grab my mod which reproduces this, from the Nexus here.

Thank you for your assistance.

[NPCMapLocations] Doesn't respect dynamic configuration changes.

I'm trying to support several NPCs that need more dynamic support.

Generally this involved disabling their map markers until some event or flag has been set, then enabling them.

According to the patch summary command, it is dynamically changing conditions, however NPCMapLocations only respects the very first match.

For example with NPC Juna ( https://www.nexusmods.com/stardewvalley/mods/8606 ) I have the following snippet

        // NPC Juna - https://www.nexusmods.com/stardewvalley/mods/8606
        // Juna should not be visible before her into event 86060001 and the flag PlayerChoseParents has not been set
        {
            "LogName": "Juna - Before event 86060001",
            "Action": "EditData",
            "Target": "Mods/Bouhm.NPCMapLocations/NPCs",
            "When": {
                "HasMod: |contains=elhrvy.NPCJuna": true,
                "HasFlag |contains=PlayerChoseParents": false,
                "HasSeenEvent |contains=86060001": false,
                "HasSeenEvent |contains=86060043": false

            },
            "Entries": {
                "Juna": {
                    "Exclude": true
                },
            }
        },
        // Juna should be visible after her into event 86060001 and the flag PlayerChoseParents has not been set
        {
            "LogName": "Juna - After event 86060001",
            "Action": "EditData",
            "Target": "Mods/Bouhm.NPCMapLocations/NPCs",
            "When": {
                "HasMod: |contains=elhrvy.NPCJuna": true,
                "HasFlag |contains=PlayerChoseParents": false,
                "HasSeenEvent |contains=86060001": true,
                "HasSeenEvent |contains=86060043": false

            },
            "Entries": {
                "Juna": {
                    "MarkerCropOffset": 1
                },
            }
        },

The initial condition ( Juna - Before event 86060001 ) is the only one that NPCMapLocations respects, and is the one that is written into the log file.

The expected behaviour was that NPCMaplocations would update it's configuration when the conditions changed.

If needed, the full source code is available at -> https://github.com/Yagisan/Stardew_Valley/tree/main/Custom%20NPCs%20for%20NPC%20Map%20Locations

Thank you for your assistance.

Error when player hasn't met all NPCs yet

If the player hasn't met all NPCs, opening the options page throws an error:

[01:45:37 ERROR NPC Map Locations Mod] This mod failed in the InputEvents.ButtonPressed event. Technical details:
System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
   at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
   at NPCMapLocations.MapModMenu..ctor(Int32 x, Int32 y, Int32 width, Int32 height, Boolean[] showSecondaryNPCs, Dictionary`2 customNPCs, Int32 customNpcId, Dictionary`2 markerCrop, Dictionary`2 npcNames) in C:\source\_Stardew\Mods.Bouhm\NPCMapLocations\MapModMenu.cs:line 92
   at NPCMapLocations.MapModMain.HandleInput(GameMenu menu, SButton input) in C:\source\_Stardew\Mods.Bouhm\NPCMapLocations\MapModMain.cs:line 177
   at NPCMapLocations.MapModMain.InputEvents_ButtonPressed(Object sender, EventArgsInput e) in C:\source\_Stardew\Mods.Bouhm\NPCMapLocations\MapModMain.cs:line 167
   at StardewModdingAPI.Framework.Events.ManagedEvent`1.Raise(TEventArgs args) in C:\source\_Stardew\SMAPI\src\SMAPI\Framework\Events\ManagedEvent.cs:line 54

See full SMAPI log.

Handle custom/unmapped locations

[22:28:49 ERROR NPC Map Locations Mod] This mod failed in the GraphicsEvents.OnPostRenderGuiEvent event. Technical details:
System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
at NPCMapLocations.MapModMain.LocationToMap(String location, Int32 tileX, Int32 tileY, Boolean isFarmer) in C:\Users\BPAK\projects\sdv-mods\stardew-valley-mods\NPCMapLocations\MapModMain.cs:line 247
at NPCMapLocations.MapModMain.DrawMapPage(GameMenu menu) in C:\Users\BPAK\projects\sdv-mods\stardew-valley-mods\NPCMapLocations\MapModMain.cs:line 686
at NPCMapLocations.MapModMain.GraphicsEvents_OnPostRenderGuiEvent(Object sender, EventArgs e) in C:\Users\BPAK\projects\sdv-mods\stardew-valley-mods\NPCMapLocations\MapModMain.cs:line 634
at StardewModdingAPI.Framework.Events.ManagedEvent.Raise() in C:\source_Stardew\SMAPI\src\SMAPI\Framework\Events\ManagedEvent.cs:line 110

Minimap stuck on middle of screen

I'm not sure how it happened, I just left pierre's and closed my inventory. I must've pressed something by accident because the minimap moved to the middle of my screen. After searching online for a bit I found that I should be able to drag it by holding ctrl but it isn't moving. I use the minimap often so just leaving it off isn't desirable

[NPCMapLocations] NullReferenceException when trying to draw the map

Running Stardew Valley 1.3.21 with SMAPI 2.6-beta.18, multiplayer with two other players.

Every time I hit 'm' or click the map icon, this is shown in my SMAPI window. The map blinks for a very short period of time.

[SMAPI] The StardewValley.Menus.GameMenu menu crashed while drawing itself. SMAPI will force it to exit to avoid crashing the game.
System.NullReferenceException: Object reference not set to an instance of an object
  at NPCMapLocations.ModMapPage.DrawMarkers (Microsoft.Xna.Framework.Graphics.SpriteBatch b) <0x425191c0 + 0x005a5> in <filename unknown>:0 
  at NPCMapLocations.ModMapPage.draw (Microsoft.Xna.Framework.Graphics.SpriteBatch b) <0x42516910 + 0x00033> in <filename unknown>:0 
  at StardewValley.Menus.GameMenu.draw (Microsoft.Xna.Framework.Graphics.SpriteBatch b) <0x42354af0 + 0x00cfa> in <filename unknown>:0 
  at StardewModdingAPI.Framework.SGame.DrawImpl (Microsoft.Xna.Framework.GameTime gameTime) <0x42015a80 + 0x0b17f> in <filename unknown>:0 

Minimap keeps changing it's position when changing location

Hi. Is it a known bug that the minimap keeps changing it's position when a location change happens?
For example I place the minimap always top-left corner but when I change the location (not by every location change) it jumps to the bottom right or even bottom left sometimes.

Locate indoor locations programmatically

All indoor locations are currently hard-coded in ModConstants/configs. This shouldn't be necessary if we already having tracking for outdoor locations, as we can use the position of the warps to approximate the location of the building. With the exception of a few inconsistencies with warps in the game, this should cover all indoor locations including custom/modded locations.

Location Compass actually already does this to point the markers on the doors of indoor locations: https://github.com/Bouhm/stardew-valley-mods/blob/master/LocationCompass/ModEntry.cs

The key part to implementing this is LocationContexts in ModMain, which goes through every location in the game and establishes type (indoor, outdoor, room), parent location, and root location (the outdoor location). With this we can get the warp position for the indoor location and get the map location for that warp in the root (outdoor) location.

NPC tracking system rework

In the current system, the mod only considers paths that only NPCs take to provide pre-calculated positions on the map. With the multiplayer update coming up, players may want to track themselves and friends on the map, which means the mod should provide accurate positions on the map for wherever the players decide to roam.

This requires a rewrite of the whole system (which was a mess of code) that is more efficient for calculating positions everywhere and not just NPC paths. This is currently WIP in branch mod-rework.

Translations for Korean

https://www.nexusmods.com/stardewvalley/articles/101

Text to be translated:
Minimap
Enabled
Minimap width
Minimap height
Settings
Always show villagers
Show villagers player has talked to
Hide villagers player has talked to
Only show villagers in player's location
Only show villagers within heart level
Minimum heart level
Maximum heart level
Show quests or birthdays
Show hidden villagers
Show traveling merchant
Include/Exclude villagers

Switch NPC Tracking when world map is replaced

Some mods want to replace the entire world map when the player is in a new region. When this occurs, the NPC tracking system should switch over to the tracking system specific to that new map.

The world replacer mod should provide all this information through Content Patcher. NPC Map Locations needs to be able to detect when the world map change occurs and switch over exclusively to the new tracking system such that NPCs in the vanilla world do not show up on the map.

Review documentation on custom location support

https://github.com/Bouhm/stardew-valley-mods/blob/master/NPCMapLocations/README.md

I've included more comprehensive documentation on the features that NPC Map Locations provides on adding support for custom locations. This is something I've been doing myself to add compatibility to mods like Stardew Valley Expanded, and I am trying to extend it to all users so that anyone can make their location mods compatible with NPC Map Locations without requiring me to make specific updates for specific mods.

I would really appreciate some extra pair of eyes as I would like to make sure that the provided instructions are clear and easy enough to follow. Please ask any questions where there is ambiguity or confusion here.

Update check crashes due to 'index out of range' exception

The update check always fails with this error:

[05:29:38 ERROR SMAPI] Critical app domain exception: System.IndexOutOfRangeException: Index was outside the bounds of the array.
at NPCMapLocations.MapModVersionChecker.d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at NPCMapLocations.MapModVersionChecker.d__3.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c.b__6_1(Object state)
at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
at System.Threading.ThreadPoolWorkQueue.Dispatch()
at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()

This seems to happen because of this code:

string tag = (string)json[0]["tag_name"];
return Convert.ToDouble(tag.Split('v')[1]);

The problem is that tag_name is set to 1.42 (no 'v'), so tag.Split('v')[1] crashes with an index-out-of-range error.

(Also, you can make the update check faster by only fetching the latest release instead.)

[NPCMapLocations] Minimap showing NPCs outside it's border

When using the minimap in the new version (2.9.2), NPCs are being shown outside of the Minimap UI window.
I'm using the smallest Minimap size, 75x45. Expanding the size in some cases makes it better, and in some makes it worse.

Picture below. :)

image

Using mutiple files in GitHub release allows multiple mods in one repo

If you would like to continue make GitHub Releases as a mirror to the nexusmod page, you may release mutiple files to match the mods in this repo, or even put releases in another branch so others can download them in one clone command/file via GitHub's button.

This is great for those who don't have a nexusmod account, but it's your choice~

[NPCMapLocations] Mod crashed when loading asset 'LooseSprites/map'.

The first message is in white, so I suspect it's informational.

[NPC Map Locations] Unable to find default_map; loaded default map instead.

This was in red:

[NPC Map Locations] Mod crashed when loading asset 'LooseSprites/map'. SMAPI will use the default asset instead. Error details:
StardewModdingAPI.Framework.Exceptions.SContentLoadException: NPC Map Locations failed loading content asset 'assets\default_map.png' from ModFolder: there's no matching file at path '/home/jmt/.steam/steamapps/common/Stardew Valley/Mods/NPCMapLocations/assets/default_map.png'..
  at NPCMapLocations.ModMain.Load[T] (IAssetInfo asset) <0x40d287f0 + 0x001d6> in <filename unknown>:0 
  at StardewModdingAPI.Framework.ContentManagers.GameContentManager.ApplyLoader[T] (IAssetInfo info) <0x40fdb800 + 0x0046e> in <filename unknown>:0 

Add support for the new beach map

The latest beach map introduced in 1.5 is not compatible with this, choosing the beach map will show the default farm one instead.

Translations for Italian

https://www.nexusmods.com/stardewvalley/articles/101

Text to be translated:
Minimap
Enabled
Minimap width
Minimap height
Settings
Always show villagers
Show villagers player has talked to
Hide villagers player has talked to
Only show villagers in player's location
Only show villagers within heart level
Minimum heart level
Maximum heart level
Show quests or birthdays
Show hidden villagers
Show traveling merchant
Include/Exclude villagers

NPC Map Locations - Failed to handle Update tick when loading a save that used a gamepad and not having the gamepad connected

OS: Windows 10

Repro steps:

  1. Load a save and plugin a gamepad.
  2. Save the game.
  3. Exit the game and disconnect the gamepad.
  4. Load the save.
  5. The inventory screen should be opened immediately and a message should be displayed saying "Gamepad disconnected", and in the error log you should see the error below.

Error:
[14:20:17 TRACE Console.Out] gameMode was 'titleScreenGameMode (0)', set to 'loadingMode (6)'. [14:20:18 TRACE Console.Out] getLoadEnumerator('Tyler_118285454') [14:20:23 TRACE Console.Out] gameMode was 'loadingMode (6)', set to 'playingGameMode (3)'. [14:20:24 ERROR SMAPI] A mod failed handling the GameEvents.UpdateTick event: System.NullReferenceException: Object reference not set to an instance of an object. at NPCMapLocations.MapModMain.GameEvents_UpdateTick(Object sender, EventArgs e) at StardewModdingAPI.Framework.InternalExtensions.SafelyRaisePlainEvent(IMonitor monitor, String name, IEnumerable1 handlers, Object sender, EventArgs args) in D:\source_Stardew\SMAPI\src\StardewModdingAPI\Framework\InternalExtensions.cs:line 40`

Full log:
SMAPI-latest.txt

Save:
Tyler_118285454.zip

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.