Horizon's Gate

Horizon's Gate

View Stats:
Magiktako Aug 20, 2021 @ 5:42pm
Error: The given key was not present in the dictionary
Hi,

So I was working on making a custom zone, jumping around between different zones for references. Wasn't having any issues switching to my custom zone through the console until suddenly I started getting a crash with the following error:

Error: The given key was not present in the dictionary.
**** Click this window, then press Ctrl+C to copy this entire
message! ***
at System.ThrowHelper.ThrowKeyNotFoundException()
at System.Collections.Generic.Dictionary`2.get_Item(Tkey key)
at Location.updateLocationForTimeSinceLastVisit(Single
timeSinceLastVisit)
at ZoneManager.handleWorldTimeChangesOnEnteringZone(String
newZone)
at ZoneManager.setupZone2()
at ZoneManager.beginSetupZone(String zoneName, TileCoord
newPlayerPos)
at ZoneManager.Update(Single elapsedTime, Vector2 updatingAt)
at ZoneManager.Update(Single elapsedTime, String actorName)
at Game1.Update(GameTime gameTime)
Mods active: 33 (1 local, 32 workshop)

------

Note that the local mod doesn't do anything, and I was not using any custom resources that I was aware of (only base game assets). I'm still figuring out modding for this game, does anyone with a bit more knowledge have any ideas as to what's going on?
< >
Showing 1-6 of 6 comments
Rad Codex  [developer] Aug 21, 2021 @ 2:47pm 
Interesting. It looks to be a crash when the game tries to update the Location - is your zone linked to a Location? Does it have port unlockables, or maybe cafe hires, that refer to item or creatures that don't exist? "The given key was not present in the dictionary." generally means the game is looking for something that doesn't exist.

If the crash keeps persisting, you can email me mod files at radcodex at gmail and I can take a look.
Magiktako Aug 21, 2021 @ 8:01pm 
Originally posted by Rad Codex:
Interesting. It looks to be a crash when the game tries to update the Location - is your zone linked to a Location? Does it have port unlockables, or maybe cafe hires, that refer to item or creatures that don't exist? "The given key was not present in the dictionary." generally means the game is looking for something that doesn't exist.

If the crash keeps persisting, you can email me mod files at radcodex at gmail and I can take a look.

I had a feeling that's what it was trying to say, it's strange considering I was working with base game assets.

I haven't linked it to any location on the map yet, and I haven't even added any NPCs yet. I'm not going to be at my computer for a while but when I get back I'm going to try and make a new zone the same size as my previous one and then paste all of the object data over just to see whether or not it's because of an object/terrain. I haven't gotten my hands into modding for a while now so it could be something dumb I'm not seeing.

Thanks for responding, really love the game! I'll update with my results when I get back to messing with it.
Magiktako Aug 23, 2021 @ 1:31pm 
So I had some extra time to mess around with it and do what I said in my previous post, and all the object data copied over into the new zone fine, so it wasn't that. I believe it could have been an issue with terrain possibly? Because the new zone just has the default dirt terrain and nothing else. Either way, I will probably just redo the terrain quickly rather than try to get the original zone working again.
Rad Codex  [developer] Aug 25, 2021 @ 8:47am 
Thanks, glad you like the game!

Very strange... good to know the object data works though. I don't expect terrain will be the culprit, it's probably some complicated thing involving revisiting the zone under certain circumstances. Let me know if it recurs or you run into any other issues!
SacreAcred Dec 24, 2024 @ 11:26am 
Help, plz. I have an error that's description is below:

Error: The given key was not present in the dictionary.

*~*~* Click this window, then press Ctrl+C to copy this entire message! *~*~*

в System.ThrowHelper.ThrowKeyNotFoundException()

в System.Collections.Generic.Dictionary`2.get_Item(TKey key)

в drawOrderTexture.set_texture(String value)

в drawOrderTexture..ctor(String texture, Vector2 position, Color color, Single scale, Single depth, String pR, String pG, String pB, Boolean highlight)

в Actor.DrawStatusEffects(Vector2 drawPt, Single scale, Single depth, Boolean actorIgnoreDarkness)

в Actor.Draw(Vector2 drawPt, Color color, Single scale, Single depth, Single facingOverride, Boolean allowOffset, Boolean ignoreDarkness, Boolean showStatus)

в Camera.Draw(Rectangle onscreenRectangle, Vector2 cameraOffset, Zone& zone, Single depthOffset, Single zoneScaleMult, Boolean canDrawFog, Boolean canDrawLights, Boolean canDrawHidden, Boolean drawUIElements)

в Game1.draw1(GameTime gameTime)

в Game1.Draw(GameTime gameTime)

в Game.
Mods active: 88
Rad Codex  [developer] Dec 29, 2024 @ 8:07am 
@SacreAcred It looks like a character has a status effect with a missing icon texture. If you're creating a mod, check if any ActorValues you created have a typo in the 'bubbleIcon' name.
< >
Showing 1-6 of 6 comments
Per page: 1530 50