Key to the Town

The Stardew Valley Wiki says that the Key to the Town that you can Purchase from Mr. Qi for 20 Qi Gems does not work for Leah's Cottage. However, I remember taking an Iridium Truffle and dashing to her house on my horse to give her a birthday present at no later than 7AM in the morning. (Leah opens her doors at 10AM)

Is this an error in the wiki or are some of the mods that are required for Stardew Valley Expanded (v1.14.12) (i.e. Content Patcher, Space Core, Custom NPC Exclusions, etc.) causing the Key to work here too?
 

Elenna101

Farmer
The Stardew Valley Wiki says that the Key to the Town that you can Purchase from Mr. Qi for 20 Qi Gems does not work for Leah's Cottage. However, I remember taking an Iridium Truffle and dashing to her house on my horse to give her a birthday present at no later than 7AM in the morning. (Leah opens her doors at 10AM)

Is this an error in the wiki or are some of the mods that are required for Stardew Valley Expanded (v1.14.12) (i.e. Content Patcher, Space Core, Custom NPC Exclusions, etc.) causing the Key to work here too?
My guess would be that this is an error in the wiki. The "need at least 2 hearts to enter a bedroom" rule supersedes the Key to the Town, meaning that even with it, you cannot enter an NPC's bedroom before you have 2 hearts with them. Because Leah and Elliott's houses only have one room, that means you can't enter their houses at all before you have 2 hearts with them.

So I'm pretty sure the rule is that the Key to the Town can override the normal opening hours, but it can't override the 2-heart requirement - so you can use the Key to the Town to get into Leah and Elliott's houses outside normal hours, but only if you have more than 2 hearts with them.

My guess would be that whoever wrote that on the wiki tried to enter when they had less than 2 hearts, found that they couldn't, and thought the Key to the Town didn't work, when in fact it did work and they were only being blocked by the 2-heart requirement.

EDIT: Did some testing without any mods and confirmed the following:
a) with neither 2 hearts nor Key to the Town, I can't enter either house, not even after 10am when they're supposed to be open (and I get the message "It's locked... Only [Leah's/Elliott's] friends can enter uninvited" which confirms that the issue is lack of friendship, not opening hours)
b) with >2 hearts and no Key to the Town, I can enter their houses only after 10 am. Before 10am I simply get the message "It's locked..." without the part about friends.
c) with >2 hearts and with Key to the Town, I can enter their houses before 10 am
Unfortunately I can't test the case of having <2 hearts and having Key to the Town, since I don't have a save file that fits those requirements. If anyone has a save file like that, could you check that you can't enter Leah and Elliott's houses? In any case, the testing I could do seems to agree with what I said above.
 
Last edited:

imnvs

Local Legend
I can confirm that it doesn't work for Leah's cottage in the forest or Elliot's shack on the beach... if you don't have 2 hearts with them. Their entire house is their bedroom and you can not enter someone's bedroom without being at 2 hearts. The key to the town doesn't change this requirement.
 

Elenna101

Farmer
I can confirm that it doesn't work for Leah's cottage in the forest or Elliot's shack on the beach... if you don't have 2 hearts with them. Their entire house is their bedroom and you can not enter someone's bedroom without being at 2 hearts. The key to the town doesn't change this requirement.
Hang on. So you checked that with Key to the Town, but without 2 hearts, you can't enter Leah's house at any time, even after 10 am?

I'm asking because I was just watching Haboo stream perfection and he was able to enter Leah's house after 10am with Key to the Town, even though he had never talked to her before. So apparently the 2-heart barrier is only on Elliott's cabin? Strange.
(FWIW it was Leah's birthday, I guess that could be an exception but it doesn't seem likely.)
 

imnvs

Local Legend
I'm asking because I was just watching Haboo stream perfection and he was able to enter Leah's house after 10am with Key to the Town, even though he had never talked to her before. So apparently the 2-heart barrier is only on Elliott's cabin? Strange.
(FWIW it was Leah's birthday, I guess that could be an exception but it doesn't seem likely.)
Really? That's weird. I'll be honest, too, I haven't actually tested it... by the time I get the key to town, I'm always everyone's best friend.

Now I'm not even sure how I could test this one. I'd have to start a new save and complete the CC without making friends with Leah and Elliot? (*shiver*) I mean... how do I even do that?
 

LRangerR

Local Legend
Unfortunately I can't test the case of having <2 hearts and having Key to the Town, since I don't have a save file that fits those requirements. If anyone has a save file like that, could you check that you can't enter Leah and Elliott's houses? In any case, the testing I could do seems to agree with what I said above.
Now I'm not even sure how I could test this one. I'd have to start a new save and complete the CC without making friends with Leah and Elliot? (*shiver*) I mean... how do I even do that?
*hands you a slingshot*
 

imnvs

Local Legend
*hands you a slingshot*
Ugh... this pains me... like... I feel dirty spending hours beating the crap out of my friends, but...

So, loaded up my old 4-Corner farm which has the key to the town, went straight to Leahs... I was inside before well 9am. By 9:30am I had gone from 10 hearts to 1. At that point I left and tried to re-enter...

At 9:50am: "It's locked..."

At 10:10am: "It's locked... Only Leah's friends can enter uninvited."

Again, to be clear, I do have the key to the town.

I repeated the experiment with Elliot. Same result.
Hang on. So you checked that with Key to the Town, but without 2 hearts, you can't enter Leah's house at any time, even after 10 am?
So, yes, Elenna, playing vanilla, with key to the town and less than 2 hearts I can not enter either Leah's or Elliot's no matter the time of day.
 
Last edited:

Elenna101

Farmer
Oh, right, the slingshot works for this. Thanks @LRangerR and @imnvs !

So, yes, Elenna, playing vanilla, with key to the town and less than 2 hearts I can not enter either Leah's or Elliot's no matter the time of day.
This is weird though, because at timestamp 4:13:50 in this Twitch vod, you can clearly see Haboo can enter Leah's house (with Key to the Town, after 10 am). I double-checked with him later and he did indeed have 0 hearts with her before giving that gift. Maybe there really is a birthday exception?? I might try testing that out later.
 

imnvs

Local Legend
This is weird though, because at timestamp 4:13:50 in this Twitch vod, you can clearly see Haboo can enter Leah's house (with Key to the Town, after 10 am). I double-checked with him later and he did indeed have 0 hearts with her before giving that gift. Maybe there really is a birthday exception?? I might try testing that out later.
I have no other guess, though I would caution to test for that. Try on and off her birthday.
 

FilthyGorilla

Local Legend
The Stardew Valley Wiki says that the Key to the Town that you can Purchase from Mr. Qi for 20 Qi Gems does not work for Leah's Cottage. However, I remember taking an Iridium Truffle and dashing to her house on my horse to give her a birthday present at no later than 7AM in the morning. (Leah opens her doors at 10AM)

Is this an error in the wiki or are some of the mods that are required for Stardew Valley Expanded (v1.14.12) (i.e. Content Patcher, Space Core, Custom NPC Exclusions, etc.) causing the Key to work here too?
It works for "in town" locations, some buildings are what the game classifies as "outside of town" I think leah is usually in town but SDVE might be making the location out of town and rendering the key useless.
 

Elenna101

Farmer
It works for "in town" locations, some buildings are what the game classifies as "outside of town" I think leah is usually in town but SDVE might be making the location out of town and rendering the key useless.
But as I said above, I checked and confirmed it works for both Leah and Elliott when you have more than 2 hearts, so the wiki is definitely wrong.

I have no other guess, though I would caution to test for that. Try on and off her birthday.
I'm so confused...

As mentioned above, I tested on a file with <2 hearts and no key to the town and I could not enter Leah or Elliott's houses at any time of the day. Specifically, I checked on a new file that I'd made, on Spring 1 year 1, and I couldn't enter their houses.

But I figured I'd try again, to check if maybe there was an exception for their birthdays. So I slept to Elliott's birthday, Fall 5, and wasn't able to enter even after 10 am. Okay, normal.
And then I slept to Winter 23, Leah's birthday, and was able to enter her house after 10 am. So I figured it was a weird thing where only she has an exception for her birthday, okay. Except then I slept till Winter 24 and tried again to be sure, and I was still able to enter her house after 10 on Winter 24.

Just to repeat, this is without Key to the Town.

... @BlaDe any chance you could look into the conditions for entering Leah's house? I don't think I'm going to be able to figure this out from testing.
 
Last edited:

Comm

Tiller
Uh I have key to the town. And one time I got into Elliott's house. I don't even have a heart with Elliott. I play vanilla. I DIDN'T GO THROUGH THE WINDOW TRUST ME.
 

BlaDe

Farmer
But as I said above, I checked and confirmed it works for both Leah and Elliott when you have more than 2 hearts, so the wiki is definitely wrong.


I'm so confused...

As mentioned above, I tested on a file with <2 hearts and no key to the town and I could not enter Leah or Elliott's houses at any time of the day. Specifically, I checked on a new file that I'd made, on Spring 1 year 1, and I couldn't enter their houses.

But I figured I'd try again, to check if maybe there was an exception for their birthdays. So I slept to Elliott's birthday, Fall 5, and wasn't able to enter even after 10 am. Okay, normal.
And then I slept to Winter 23, Leah's birthday, and was able to enter her house after 10 am. So I figured it was a weird thing where only she has an exception for her birthday, okay. Except then I slept till Winter 24 and tried again to be sure, and I was still able to enter her house after 10 on Winter 24.

Just to repeat, this is without Key to the Town.

... @BlaDe any chance you could look into the conditions for entering Leah's house? I don't think I'm going to be able to figure this out from testing.
Code:
if ((town_key_applies || (Game1.timeOfDay >= openTime && Game1.timeOfDay < Convert.ToInt32(actionParams[5]))) && (actionParams.Length < 7 || Game1.currentSeason.Equals("winter") || (Game1.player.friendshipData.ContainsKey(actionParams[6]) && Game1.player.friendshipData[actionParams[6]].Points >= Convert.ToInt32(actionParams[7]))))
The relationship requirement to enter Elliot's and Leah's homes are ignored if you are in Winter.

This stacks with the Key to the Town to let you get in at any time.
 

Elenna101

Farmer
Code:
if ((town_key_applies || (Game1.timeOfDay >= openTime && Game1.timeOfDay < Convert.ToInt32(actionParams[5]))) && (actionParams.Length < 7 || Game1.currentSeason.Equals("winter") || (Game1.player.friendshipData.ContainsKey(actionParams[6]) && Game1.player.friendshipData[actionParams[6]].Points >= Convert.ToInt32(actionParams[7]))))
The relationship requirement to enter Elliot's and Leah's homes are ignored if you are in Winter.

This stacks with the Key to the Town to let you get in at any time.
Interesting, thanks! I wonder what the reason behind that was...
 

LRangerR

Local Legend
Code:
if ((town_key_applies || (Game1.timeOfDay >= openTime && Game1.timeOfDay < Convert.ToInt32(actionParams[5]))) && (actionParams.Length < 7 || Game1.currentSeason.Equals("winter") || (Game1.player.friendshipData.ContainsKey(actionParams[6]) && Game1.player.friendshipData[actionParams[6]].Points >= Convert.ToInt32(actionParams[7]))))
The relationship requirement to enter Elliot's and Leah's homes are ignored if you are in Winter.

This stacks with the Key to the Town to let you get in at any time.
VERY interesting. Actually, this isn't anywhere on the wiki at all. Good find team, and super big thanks @BlaDe
 

Lew Zealand

Helper
Code:
if ((town_key_applies || (Game1.timeOfDay >= openTime && Game1.timeOfDay < Convert.ToInt32(actionParams[5]))) && (actionParams.Length < 7 || Game1.currentSeason.Equals("winter") || (Game1.player.friendshipData.ContainsKey(actionParams[6]) && Game1.player.friendshipData[actionParams[6]].Points >= Convert.ToInt32(actionParams[7]))))
The relationship requirement to enter Elliot's and Leah's homes are ignored if you are in Winter.

This stacks with the Key to the Town to let you get in at any time.
Wow, now that's an unpredictable caveat. OK then.

WHY?
 
Top