Coding Help "season_day" dialogue for custom npc

raydad

Newcomer
hi i hope im doing this thread thingy right. also im not an english native so sorry for possible weird phrasings.

i'm creating a custom npc and i really want to make him able to say one specific line for one specific date every year (it's about another character's bday and he's gonna say something along the lines of "oh it's x's birthday tomorrow i need to prepare a present!"). i know there's a key for a dialogue on a particular day of month like "spring_14" but it works only for the first year. and i need my npc to say this line every year. i've tried literally every method i can possibly think of but none of them seems to work.

so the question is: 1) is it even possible to create a specific date line for all the following years after the first one? 2) if yes - how?

(i'm creating this npc using both miss coriel's npc creator and writing stuff into the .json files directly myself, if it'll help somehow)
 

azurl

Greenhorn
I may be able to help you. but I need to see how you get the current season and day to determine what the NPC says.
I've been poking around in the code myself for as mod I'm making and the Game1 class exposes what you need.
 

raydad

Newcomer
I may be able to help you. but I need to see how you get the current season and day to determine what the NPC says.
I've been poking around in the code myself for as mod I'm making and the Game1 class exposes what you need.
i'm trying to follow author-guide for content patcher on github. smapi doesn't say there are any errors or anything but this dialogue still doesn't work (i'm neither a coder nor a skilled sdv modder so i'm sure it looks silly)
code thingy.png
 

azurl

Greenhorn
i'm trying to follow author-guide for content patcher on github. smapi doesn't say there are any errors or anything but this dialogue still doesn't work (i'm neither a coder nor a skilled sdv modder so i'm sure it looks silly)
View attachment 18978
I will see if I can help you later today or tomorrow if I get some time after work.
I'm quite curious about this myself.
 

azurl

Greenhorn
Try DayOfMonth instead of Day. see if that works at all. I'm working exclusively in backend so I can't test this myself at the moment.
 

azurl

Greenhorn
i'm trying to follow author-guide for content patcher on github. smapi doesn't say there are any errors or anything but this dialogue still doesn't work (i'm neither a coder nor a skilled sdv modder so i'm sure it looks silly)
View attachment 18978
According to the wiki dayOfMonth only works on first year, to work around this you might need to add firstOrLaterYear, setting it to 1 will make it hit on first year, setting it to 2 will make it hit on any year after.
1708979014997.png

1708979037621.png
 

raydad

Newcomer
According to the wiki dayOfMonth only works on first year, to work around this you might need to add firstOrLaterYear, setting it to 1 will make it hit on first year, setting it to 2 will make it hit on any year after.
View attachment 18986
View attachment 18987
GOD BLESS YOUR KIND SOUL ngl i remember about those values for years but i wasn't sure how to put them with what i needed to do. i was just trying to smash it together into one new value i guess. now i've tried to do this (the first pic with code) AND IT SEEMS TO BE WORKING?? no errors or anything neither from smapi nor from content patcher. once again thank you very much:heartrip::heartrip::heartrip: /pos /gen
1709003168266.png
1709003232600.png
 
Top