Coding Help Trying to figure out why my mod does nothing. (New modder) [RESOLVED]

IceTrayFr

Greenhorn
I am brand new to modding Stardew, this is my first project. Due to a close friend's request, I wanted to make a mod that sends the player some money once a week from their parents and I was going to call it the allowance mod. I followed a tutorial to the best of my ability while tweaking things along the way to get my mod to work the way I intended. I can see the mod loading on SMAPI when I boot up the game but when I'm in-game and I test it out I get nothing. The first letter is supposed to appear in the mailbox on the 5th of spring in the first year. From what I understand I set it up to do so. I'm thinking maybe I misunderstood something or put something in the wrong format. Below is the code I have written I'd appreciate any help I can get I'm just trying to get the first letter to send and then after that, I will build on it further.

content.json
JSON:
{
    "Format": "1.29.0",
    "Changes": [

    {
    "Action": "EditData",
    "Target": "data/mail",
        
    "Entries": {
        "allowance_intro_1": "Dear @,^^ I wanted to let you know how proud I am of you for starting a new life on your grandpa's old ^ farm, but I also wanted to offer you some financial support. As your parent, I have been worried^ about you since you made the decision to live on the farm, so enclosed you will find some ^ money that I hope will help ease any financial stress you may be experiencing. Remember that I^ am here for you, and I support you in your new venture.^^ Love always, Mom <3%item money 5000 5001 %%[#]Allowance",
    
        "allowance_intro_2": "Dear @,^^ I am writing to let you know that I am giving you some money, even though your mother recently sent^ you some as well. I want you to know that I care about you deeply, and I refuse to let your mother^ become your favorite parent just because she gave you money. I am here to support you too, and I ^ want you to know that you can always count on me. Please don't hesitate to reach out if you ever need^ anything.^^ Love, your father.%item money 5000 5001 %%[#]Allowance #2",
        
        "allowance_intro_3": "Dear @,^^ We wanted to reach out to you today to let you know that we both care deeply about you and we are^both worried about how you are doing on the farm. We have decided that instead of sending you^money separately, once a week we will pool some money together and send it out to make things a bit^easier for you. We hope that farm life is treating you well, and we want you to know that we love you^and we are proud of you for following your dreams. Please don't hesitate to reach out if you ever need^anything, and know that we are always here to support you.^^Love, mom & dad. <3%item money 10000 10001 %%[#]Allowance #3",
        
        "allowance_4": "Dear @,^^We are sending your weekly allowance, and we wanted to wish good luck to you on your farm. We^can’t express how proud of you we are for changing your life, we know that it can be tough at times^but^we hope that you’ll always remember that we are here for you no matter what. We love you very^much. Take care and have a great week!^^Love, mom and dad. <3%item money 10000 10001 %%[#]Allowance #4",
    },
    },
    

{
    "Action": "EditData",
    "Target": "Data/Events/Farm",

    "Entries": {
        "551555151/y 1/u 5/z summer winter fall/x allowance_intro_1": "null",    
    },
}
]
}

manifest.json
JSON:
{
    "Name": "Allowance",
    "Author": "IceTrayFr",
    "Version": "1.0.0",
    "Description": "With this mod, once a week you will receive a letter with some money in it from your wealthy ol' mom and dad.",
    "UniqueID": "IceTrayFr.Allowance",
    "UpdateKeys": [],
    "ContentPackFor": {
      "UniqueID": "Pathoschild.ContentPatcher"
    }
}
 

IceTrayFr

Greenhorn
I have solved my problem! (For any modding newbies that end up having a similar issue in the future, here's how I fixed mine.) All I really needed to do was unpack the original game files and find out how the letters were sent out. I used this page to understand what all the different checks meant and I used this one to unpack the game and look at the files. After you unpack everything the letters are located in Stardew Valley\Content (unpacked\Data\mail.json) and all of the triggers that actually send out the letters are in Stardew Valley\Content (unpacked)\Data\Events\Farm.json . I'm hoping that somebody out there can benefit from my struggles.

(Also, something to note when you're trying to get the letter to arrive on a specific day: the day that you set the mail to be sent out is NOT the day it will arrive at the player's house. It will arrive the FOLLOWING day so plan accordingly.)
 

teainthesunroom

Greenhorn
@IceTrayFr I just want to say I made this whole account on the forums specifically to reply to you. Thank you for coming back and following up on your own post. It has saved me! I was wracking my brain and the internet for two hours trying to figure out why my letter hadn't arrived on the day I specified... and all I had to do was sleep. :sweat:

THANK YOU!
 
Top