#making-mods-general
1 messages · Page 125 of 1
now look in cursors :3
💀
I need some help im stuck on a coding error that i can not figure out
Actually, unless the patch that switches out the board removes those tiles from the whole map, it doesn't make sense that during spring a random broken board shows back up every year lmao
hmm
No, it's simply that the sprite doesn't need to be added to any other map because it can't show up in those other seasons. It doesn't magically reappear in spring 2.
To the right of the bookseller
It's outside of the accessible area but it's just out there in the weeds
anyone available for possibly some help?
wait
you havent posted any error. just post it and if someone is free and able to help theyll help
the special ordres board doesn't appear until fall
ok let me see cause im not sure how to copy errors stuff entirely from the visual studio
Argument 1: cannot convert from 'bool' to 'byte'
Argument 1: cannot convert from 'bool' to 'byte'
'new' expression can be simplified
So just during Summer the broken board disappears lmao
And the extra one near the bookseller just comes back every Spring
tbh coders can be trusted most of the time to know how to use pastbin or git
You say that, but...
tbh I never noticed
maybe they removed it to make room for the new one in the fall
Me either lmao
the lumber was on backorder
😭 ngl i was just so confused since i noticed it
well i cant seem to get all the code into the screenshot hmm
just take a picture of the part thats giving the error and a handful of the surrounding lines
or just put it on pastebin and tell us what line is erroring
i beleive this is the culprit
those functions do not do what you think they do
they do not take bools as parameters
then byte?
that;s fucking amazing, CA
your IDE should tell you that they take bytes, or the decompile
anyways, like
mystery of the special order board... solved?
for what purpose do you need to use these functions
apparently what you want is Game1.player.setMoving(64)
or something like that
(or more sanely, do Game1.player.Halt()) lol
that's amazing, CA
well the problem in fact is i have tried now both byte and bool with booltobyte
Im making an ai bot to play the game
if ((command & 0x40) == 64)
{
this.Halt();
this.running = false;
}
you want whatever makes this happen
i guess
booltobyte, what? Is that some AI-generated thing?
alternatively just call player.Halt
you should read your decompile. the error message is telling you your argument is the wrong type, but you are more seriously not comprehending what the function does
(also, having read this function for the first time... what.)
that's exactly how I program for work but in my defense I'm an EE so
i've written protocol code that does stuff like this but not in this context
i am not a super expert im sorry 😦 https://pastebin.com/0PHLwm2h
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
I mean, yes, and if I was Actually Doing This for some reason in C# I would use a bitflag enum to make it readable, lol
making a bot to play the game is going to be rather difficult
ive had it pretty much do everything i want it to except for the fact of the player floating off screen and then walking through the wall borders but now this stupid little issue wont let me build
So I did not do custom skill buffs, but Dr birb did custom skill buffs.
You can check out YACS. I have custom skill buffs for food items for cross-mod stuff
well you just need to look at the decompile to see how the function you're trying to call works
Like cheesey cauliflower buffing binning from YACS
and figure out what byte to send
ok let me see if i can find a syntax snippet and see what it says brb
not syntax grr been working on this for 12 hours plus lol
This sounds like exactly normal AI behavior for playing a game
Definitely possible, though; it's been done already.
so i just asked chatgpt said this,
The errors you are seeing stem from the fact that setMoving() and setRunning() methods are expecting byte values, not bool. The other errors around ambiguity and the readonly field are secondary at this stage.
Goal:
We need to:
Fix the byte vs bool confusion.
Ensure that only one definition of methods and classes exists.
Resolve any remaining issues in order to have a working mod for testing the AI.
please do not ask chatgpt
is it not good one?
if you ever feel like you need to ask chatgpt anything abouit stardew, do literally anything else instead
about stardew
Or about anything else.
hmm could i infer with claude sonnet perhaps?
AI is just not good lmao
no
im just trying to keep anonimity because i want to get this done do a series on it then release it for everyone to enjoy im sorry i may be a bit stubborn but since i have no friends and such i just do this on my own just trying to find a fix
!chatgptcode
Please stop trying to get ChatGPT to write your C# mods for you, especially if you don't know how to write C#. It won't work without heavy editing, and it wastes everyone's time.
Large language models fundamentally are reguritating something from their input—which is roughly speaking, the written output of humanity up until 2021 or so, for ChatGPT. For specific, niche topics like "is this framework going to do what I want" or "which things does Game1.cs have access to", it probably has no idea! But it's good at detecting that people in the past have....said things about frameworks and written things in C#, so it does its best to assemble words and symbols into a nice order for you. Sometimes it tells you true things, and sometimes it tells you false things, and if you can't detect when, you're in trouble. When you're writing code, this usually produces garbage, because you can't be "sort of similar", you have to be exactly correct or it won't work.
I literally just asked gpt if it knew what was going on :/
(also, I strongly suspect you're trying to re-implement the PathFindController class in game)
except, well, very weirdly
you will not really get any support for using chatgpt here nor will you get help fixing chatgpt generated code
I don't think anyone has a problem with anonymity - none of us are using our real names. We do have a problem with LLM junk being posted here.
we are merely letting you know this so you don't waste your time
Ok. Anyways thanks for the help then i will see what other things i can use in the modding wiki
you will genuinely have much better results figuring out how to code it without chatgpt. and that is when taking into account any amount of knowledge you have of C# or sdv
!decompile
If you want to make SMAPI mods with C#, one important resource is decompiling the game to read the game code. Here's how to do it: https://stardewvalleywiki.com/Modding:Modder_Guide/Get_Started#How_do_I_decompile_the_game_code.3F
i recommend following these instructions and taking a look at the games code to see how it works
OK sounds good! Thanks for not being to harsh on me!
hey y'all, any chance someone could help me out with my modding attempt?
i'm trying to just reskin krobus as another character but i'm encountering a weirdly specific issue where concernedape uses krobus's sprite for the magnifying glass event
at a glance it seems like the only way to fix this is to edit the town.cs code but that would involve harmony i believe and... i truly have no idea how i would even begin to start such a small edit through harmony
is that scene not using just the normal monster texture?
😔 i would think
haha
so if anyone knows how to just replace "Krobus" in this code with a new character i've added (that just has krobus' sprites) named "ShadowPerson" i would owe you my life
and why doesnt patching krobus's texture work?
Okay hold on. Are you changing how krobus looks with this reskin or are you adding a new NPC that looks like krobus called ShadowPerson?
initially the mod is just a fancy reskin of krobus, but i added an additional NPC to play the role of the magnifying glass thief
(which is just original krobus assets)
changing krobus, but the problem is that the magnifying glass event is hardcoded to use krobus's sprite
but why do you need to make ShadowPerson the NPC in the cutscene if they look the same?
i think what you should do is edit Krobus's entry in Data/Characters to use a new TextureName
I think they want their NPC to be Not Krobus and Shadow Guy to be a shadow guy?
then replace that one with your edit. then put your new thief guy graphics in Characters/Krobus
Yeah do that
it was confusing but i got there in the end
i will try this, thank you ichortower!! 🙏
good luck! i hope it works
is there a transpiling for dummies somewhere because i have no idea what i'm doing
with transpilers, it's helpful to remember that it's a totally different kind of code writing than prefix/postfix
instead of writing C# code as it will run alongside the patched functions, you are writing a function that takes a list of CIL instructions (the original method) and returns a new list (the method as you want it to be)
(please forgive me using function and method interchangeably, for i am an old)
thank you! i will look into it
I'm trying to understand how to get the amount of times something has been crafted by a certain player. I found the timesCrafted variable in the CraftingRecipe class. I'm currently just having issues getting the CraftingRecipe object I want to check. The code below shows the various booleans I'm checking. Is there a way to get the CraftingRecipe object based on the name, or do I need to load it through CraftingRecipes.xnb?
string craftName = "Chest";
CraftingRecipe chestRecipieObj = /*unsure what to put here*/;
//does the player know the chest recipipe
Log($"Player knows {craftName} recipe: {Game1.player.knowsRecipe(craftName)}");
//Has the player crafted the chest at least once
Log($"Player has crafted a {craftName} at least once: {chestRecipieObj.timesCrafted > 0}");
//Does player have the items to create the item in their inventory
Item wood = ItemLocator.GetItem("388");
Log($"Player has the items to create the {craftName} in their inventory: {ItemLocator.PlayerItemCount("388") >= 50}");
i want to say that Game1.player.craftingRecipes is a dict<string, int> where the int value is the number of times crafted?
just going off memory though
it's a NetStringDictionary<int, NetInt>. I'm unsure exactly what the value data type is and how it's different from an int or Integer
oh, that's all fluff to say it's a net-synced dict<string, int>
net-synced?
you should be good to use Game1.player.craftingRecipes.TryGetValue(recipeName, out int timesCrafted), which will return false if the player doesn't know the recipe
net-synced data types will have their values updated for all players in multiplayer
which is to say when you learn or craft a recipe, the host and farmhands will all be given the same dict state as soon as possible
I'll try it. Though having the CraftingRecipe obj would've made the last two checks easier and less hardcoded
thanks
you can quite easily get a list of all crafting recipes, i just don't remember exactly how. try DataLoader.CraftingRecipes or Game1.craftingRecipes or CraftingPage.craftingRecipes or something like that
hooray!
My "that's good enough, we can move on" has a one year max limit of working on things. Looking at my older work makes me sad...
i also wonder if i have too many weird random configs but like XD
well the ai i made is uhm, well at least working but there's a few screws loose i believe!
don't know what type of AI you're making, but if it's a learning one, at least it learnt to moonwalk, which isn't nothing
also fazes through Furniture. Probably managed to slit between tiles somehow
honestly for an ai, uhh it's a start XD i've seen them do weirder things
really wants to investigate that wall though
Hi loves! A question! I have made a farm, adding by CP. I was wanting to add a mermaid to it, much like the mermaid on the beach in the Island. I Figured to make a custom Location C# class. It is not applying to the location. I have a staunch feeling that C# editing a custom farm map rolls much differently than a typical location. So, if I might ask, has anyone done this before? Any reccomendations on how this would best be done, (so I don't flop about like a beached mermaid for a few hours confused as to how to do anything!)
Dude wants to phaze so bad but hes at least learning lol, anyways animation stuff will be worked out later after i get his head straight right now hes had a little to many bubbly hops
ooh now he's dancing XD
Getting down XD
ill update in a little while after i throw some words at him again
Oh yeah, it's all coming together...
Hell yeah!!! I love this so much!!! I need to finish my repuation framework mod, this would go perfectly with it! (reputation affected by things u do or don
😭 pierre is in jail
He deserves it. He definitely commits crimes. Boring crimes.
Hi! How can I edit assets? When I do it a white background appears... What photo editor could I use? Thanks
Here's a list of software for pixel art and JSON text editors we recommend: https://gist.github.com/ishanjalan/c8efb21afa21f74a052293176db107f7
For making SMAPI (C#) mods, see the Requirements section here for which IDE to install https://stardewvalleywiki.com/Modding:Modder_Guide/Get_Started#Get_started.
I’ve never quite understood the process of making custom npcs. If someone can give a basic rundown of it, i would appreciate it a lot. Thanks.
!npc
Keep in mind that making NPCs is a complex process that requires learning many different aspects of Stardew modding.
Here are a few links that can help get you started on all that you need to know:
-
Tiakall has a great tutorial on making a custom NPC for 1.6.
-
NPCs no longer use dispositions, check the wiki page for the new NPC data.
-
Aviroen has put together a template that will allow you to easily create a romanceable NPC.
-
Feel free to jump into the https://discord.com/channels/137344473976799233/1277457201077813280 thread for more interactive feedback and help!
-
Fireredlily has a WIP NPC Builder Please do report any errors you get with it into the NPC thread!
Thanks.
Thanks
Going to make some patches to GameLocation, based on if the patient's current location is the custom farm I am making.
if (Game1.GetFarmTypeID().Equals("ApryllForever.MermaidFarm"))
This is how I make sure it is that farm, right?
Finally published the mod I've been working on... but finishing the night before vacation was maybe a tad too close for comfort, but we big chillin now

Congrats! I can publish it to the showcase for you if you'd like, just post the link here and let me know if there's anything in particular you'd like me to mention in the showcase post :)
The link is here: https://www.nexusmods.com/stardewvalley/mods/29834
And I don't really have anything to say :p
Maybe you could mention the original creators are Holychurros and Stanloona420, and that I'm just maintaining the mod
Posting on behalf of @subtle saffron, who has updated and is now maintaining this mod which was originally created by Holychurros and Stanloona420:
"Are you tired of the rude and often shady Pierre? Would you like someone who is kinder and more well rounded?! Well look no further! Piper is the replacement you are looking for!"
Posted to the showcase!
And I'll work on compat for my mods adventurer abigail and morris redeemed (I think the former will be fine as is for now, but I'm planning to bring her parents in more for the next arc so I'll make sure its still compatible when I'm writing those events)
I severely underestimated how much work would go into adding support/compat for other mods
😭
I was asked to add compat for the childhood sweetheart caroline mod, and that mod alone will take me sometime rewriting.. cause uh.... Piper and Caroline have a good relationship, so I think dynamic wise the best way to go about it would be a poly relationship, or else I gotta go kinda crazy with it and lean into some crazy drama that'd split the two up
It's definitely also okay to just not add compatibility if doing so would go against the narrative written into your mod to such a degree you need to change too much.
Normalize saying no 
But I really should start saying no
💀
😔
I would honestly say no to that
yeah
To put on my judgemental hat..
CWC does a fw things that really should be the author's problem: it does narration to dictate the farmer's thoughts, ||Abigail is adopted but they think she's theirs via uh.. magical memory modification.||, and the author doesn't know how to handle marriage events + scheduling.
o h
A couple of my mods have run into story compat issues with other mods that I just didn't have it in me to figure out, so I just mention the situation on the modpage and let the users decide what they want to do based on that. It's worked out pretty well :)
This is fine. But it's one of those where it's like "it should try to make itself compatible. with others."
😔 im thinking about my mod that i have in the works thats probably gonna end up being incompatible with sve for like 20 reasons
(Or I make funny and slightly fourth-wall-breaking in-game references about the situation. See the morris redeemed + marry morris easter egg 🤣 )
Okay yeah.. I'll probably drop that then cause yikes 😭
with lore/worldbuilding being one of them...
yeah. I'd be willing to agree you should maybe do minor changes but I'd wait until CWC is actually feature complete with..
you know, a married schedule. c.c
oof
(CWC also, tangentially, forces you to be the same age or within 3 as Caroline for half the dialogue to make sense.)
but taking off judgemental hat
I think that dialogues that change married couples should at some level be up to that author because well, a lot of assumptions on the part of other modders is that these mods aren't being used for.. well, a lot of reasons
That said, thanks for linking the Piper mod, I'll probably grab it for a fun run after I 100% this one
compatibility is hard...
Rewriting dialogue can take a bit, and then comes the implementation of the dialogue, which is the most tedious process ever 😭
sigh, and seasonal outfits too
Oh yeah
😭
Buildings as well
got 32 different images for the general store
But speaking of seasonal outfits, I'm planning to create some outfits for modded events/new 1.6 events, surly it'll be a fun time that I won't burn myself out over
i found one misplaced pixel in my npc portraits
compatibility is easy. just ask the other sucker to do it 
modmaking hard
Compat in two easy steps:
- Make mod open source
- Tell users they can do it themselves
oh perfect, free open-source suckers
hey can someone explain to me on how to add my new area to the world map?
Yeh, sometimes things just need to be incompatible.
I also really dont like it when mods add "farmer" dialogue via message. Give me options, or even just one basic option to click.
(My brain cant cope with it and it takes too long to figure out "im saying that? But i wouldn't say that!")
just have every dialogue be a trolley problem instead
only bad options but you have to actively pick them
like ive read up on the wiki section of the topic but ngl im not sure i get it fully
Heya! Do you mind if I shoot you a DM about some compat stuff? 😄
Sure thing!
(Sorry for the ping the first time )
😭 so i tried following the wiki to add the custom world map by testing it with just a black square but i loaded the game up and nothing happened
not even an error
so im not sure what im not getting at
Did your mod load?
I cant help with this area but if you share the code someone can
!json
JSON is a standard format for machine-readable text files that's used by Stardew Valley mods.
If you need help with a JSON file, you can upload it to smapi.io/json to see automatic validation and share the link here.
When making mods, it's recommended to edit your files in a text editor with JSON support, such as VS Code, Notepad++, or Sublime Text. These programs will check for syntax errors.
it did everything else did properly
i think its just me being a little stupid since ive never done this before
Does anyone know an example of a mod which modifies the character creator screen?
i want to try my hand at adding a new <= option => kind of thing, but it seems very daunting, especially since im new to modding
mods that add or change UI are notoriously difficult in this game because so much of the UI is directly in code and inconsistently implemented
i don't mean to discourage you, but it's a tough first mod to choose
ohhh
what option were you thinking of adding? maybe there's a different way to accomplish the goal
i kind of wanted to add an 'origin' kind of stuff which would give buffs/nerfs/passives based on the job the player had at joja corp. Something like an accountant starting with extra 250g or a Warehouse manager starting with a chest in inventory etc
i assume i could ask this as a dialog on the morning of the first day
but itd been cooler if i couldve asked this in character creator
ah yeah, i see what you mean
It's not impossible; it's a bit of a faff but like
have you done programming before?
I would get it working first with dialogue options on day 1
Then retrofit to a box in character customization
Or maybe hijack into the intro cutscene
you mean me? I am a developer irl, tho C# is new to me, not a major problem with that
yeah, i did. you're probably fine in that case
ill try to implement the day 1 dialog option for now, will try more complex path once i get used to modding.
thanks for the help
Hello! I am currently making my first mod, no coding background whatsoever, I am learning on the fly. I got my custom item into the game but it will not load the texture. SMAPI is saying the asset doesn't exist but the file is there, and it even displays the picture when I hover over it in the code. any ideas?
!json post your code
JSON is a standard format for machine-readable text files that's used by Stardew Valley mods.
If you need help with a JSON file, you can upload it to smapi.io/json to see automatic validation and share the link here.
When making mods, it's recommended to edit your files in a text editor with JSON support, such as VS Code, Notepad++, or Sublime Text. These programs will check for syntax errors.
!log and your log
Important note: Your computer username may appear in the log. If your username is your full name, please be aware of this before uploading it.
Please share your SMAPI log file. To do so:
- Open this page: smapi.io/log.
- Follow the instructions at the top of the page to upload the log file. (Don't copy & paste from the console window!)
- After uploading, it will show a green box with a URL to share. Post that URL here.
Please do it even if you don't see any errors. This has useful info like what mods and versions you have, what the mods are doing, etc. If the issue didn’t occur in your last session, please load the game to the point where the issue occurs, then upload the log.
What custom item are you trying to make? If it's something that fits into the base game categories, you can most likely create that with Content Patcher and have a much easier time of things
It is a decore piece, and everything else works except for the texture, the description is there and everything
i have a few questions, but the first one is did you copy this code from a tutorial or something?
(what on earth are you doing with a using directive for X509Certificates)
yes everything is from tutorials, as I said I have no coding experience at all (only R lol)
ok that content.json is for content patcher. so just throw out your C# code, you won't be using it
oh! ok got it
here's some more info on content patcher https://stardewvalleywiki.com/Modding:Content_Patcher
someone will tell you the texture issue but I recommend changing your item ID to StarJewMod_Khannukia as I dont know what will happen if you try to use the slash there in some sitations
6480 is right, your problem is you are referencing your file assets/Khannukia.png but you need to reference an asset instead
the quickest fix is to use the InternalAssetKey token instead, which will do the work for you:
"Texture": "{{InternalAssetKey: assets/Khannukia.png}}",
To be fair VS does that
I will try this! thank you so much
I keep having to remove random unhelpful usings
oh, so it's AI slop after all (what i was driving at)
Nah, you'll just be typing
omg it worked!!! thank you
Yeah I've definitely had VS just add that exact using before on a whim, what am I supposed to be using x509 certificates for VS
And VS will be like, hey, you want AbortedThreadException right?
(the work that this does for you is to load your image to an asset and then use that asset's key. i typically prefer to do this myself, but i am told InternalAssetKey is more performant. you likely won't notice the difference except at scale)
yeah the dimentiones are off lol
one more question lol, can i change the dimentions?
not without specific other mods that alter the game code to allow it. for objects you are stuck with 16x16 by default
ok so i can just edit my image
yup
thank you so so much for the help ♥
What would be the approach to code a 'take 25% more damage from a specific kind of enemy' permanent hidden nerf?
i could not find any taking damage specific Event in SMAPIs Event lists
my approach would probably be a harmony postfix on whichever take damage function is closest
spacecore might have an event for it (spacecore has a lot of jobs)
oh thanks. Ill check it out.
Hope it’s okay to ask in here -
I’ve made a basic recolour of Abigail’s hair, following a YouTube tutorial- I have manifest.json and content.json files, but SMAPI says that none of the files are manifest.json
I am very new to this and I’m just kinda practicing I guess - can anyone gimme a hand to figure out why it’s not reading properly??
Are you swapping out the spritesheet with your mod?
If so - can you take a screenshot of the folder structure/files for your mod real fast?
Gimme 2 seconds
With file extensions, if possible.
just to be sure, do you have visible filename extensions turned on? (i forget the steps. View menu?)
your file might be named manifest.json.json if not
no, you're not. windows's default setting is the problem
Thank u very much for letting me know that it’s even a thing to be seen!!
You’re very much appreciated 🫶🏼
And for what it's worth - I didn't catch it right away - Was trying to think of ideas why it wouldn't be happy with what you posted, didn't occur to me that you had the extension doubled. So no calling yourself a dumbass over that one.
Thank u thank u! 🫶🏼
SMAPI is now telling me its dependencies have a circular reference 😭
Gosh I’m terrible at this. Only up from here though. Gotta remind myself that I’m just practicing and I’m not gonna be amazing at it straight away
That's easy enough to fix. What dependencies do you have listed in the manifest.json?
None at all
Can you upload a log then?
Sure thing
I’ll pop it in support once it’s parsed
Unless it’s okay for me to drop it here - I don’t mind 🫶🏼
Just toss it in here
Awesome will do
It's related to making a mod (And we'd just bounce it back here anyways)
Just waiting for the full log to load up and then I’ll grab it - thanks for helping me btw, I really appreciate it 
Log Info: SMAPI 4.1.8 with SDV 1.6.14 build 24317 on Microsoft Windows 10 Home, with 90 C# mods and 177 content packs.
Suggested fixes: One or more mods are out of date, consider updating them
Ok - Can you open the manifest.json and post it here
(Can't say I've ever seen a mod circular reference itself)
Ah that makes sense I shall move it and see what happens!
Thank u
"UniqueID": "Pathoschild.ContentPatcher"
},```
Since you're telling SMAPI what mod to use to parse the Content Pack
That makes a lot of sense
It loaded!!
Thank you so much!
Time to see how bad my recolour job is 😂
Anyone have experience creating mods for Custom Companions?
Can't seem to stop the error "Command Failed"
I've been trying to get one of the example companions to work and every time I use "cc_spawn" to make it appear, it says "Command Failed" in the cmd window
I began with a custom sprite, but encountered the issue, so I went through the guide using the example companion instead and it was the same result
That was short lived
Her hair is still purple 😂
Are you using any other mods that retexture her?
hello, guys! is there a chance to combine ContentPatcher with specific code in .dll files within 1 mod? if i relate to both .dll and ContentPatcher, the mod won't load because like the error says these 2 parameters exclude each others
Oh gosh of course 😭
I have seasonal cute characters, i completely forgot about that
A mod cannot be both a standalone mod and framework content pack. You will either need to create two mods and package them together, OR port your cp stuff to c#.
I can help you with the second option if you like
would be awesome
So the heart of it would be using the Helper.Events.Content.AssetRequested event. You'd create an event handler for that event which checks the name of the asset being requested and either loads or edits the asset if needed.
What is your CP component doing?
my CP component is creating a new item with unique id, loads my own assets into the general objects sheet and uses this sprite for my new object. + item's recipe object i can buy from the shop
okay, that's all pretty easy
do you want to write your object/shop entries in c#, or write them in json and just copy them in with c#?
both are pretty easy to do
the first option is good, i think
honestly, i'd like to see how both options would work, but don't want to waste too much of your time
https://github.com/tlitookilakin/HappyHomeDesigner/blob/master/Framework/AssetManager.cs
this has examples of both, but is also a little more advanced than it strictly needs to be
tackle this after you solve your main problem, but it is a good idea to use your own spritesheet instead of adding your item sprites to springobjects
Anyone knows if this button from Spacecore is editable by CP?
I can't really find anything obvious in the log
so i should write my spritesheet into the game files, or can it be read right from the mod's assets folder?
i did like that because i'm creating a bomb, so i've searched some existing bomb mods to peek, and it was done like that
probably need to check the code to know. if it goes through the asset pipeline, then yes; otherwise i expect not
does a postfix harmony patch need to have the same function arguments as the original function? even tho lets say the logic doesnt need any of those values
no, you can omit any parameters you don't need. but if it's an overload, you might need to use them to match the correct method (when reflecting. the postfix itself won't need them)
I guess.. it does? 
yup, there you go! "Target": "spacechase0.SpaceCore/ExtraEquipmentIcon"
And then you just need to make sure you're loading after Spacecore, yeah
Weird it didn't show up in the log like with GMCM, but at least it's doable
any EditImage will come after spacecore's Load. and even a Load is safe; casey used a priority
I missed the Priority, my bad
Was just doing a quick glance while I try not to freeze over here, LOL
Ugh Abigail is still purple
adding via c#:
private void HandleAssets(object sender, AssetRequestedEventArgs ev) {
if (ev.NameWithoutLocale.IsEquivalentTo("Data/Shops"))
ev.Edit(d => {
if (d.Data is Dictionary<string, ShopData> shops && shops.TryGetValue("ShopToAddTo", out var shop))
shop.Items.Add(new(){
... shop entry info goes here ...
});
}, AssetEditPriority.Normal);
}
``` adding from json:
```cs
private void HandleAssets(object sender, AssetRequestedEventArgs ev) {
if (ev.NameWithoutLocale.IsEquivalentTo("Data/Shops"))
ev.Edit(d => {
if (d.Data is Dictionary<string, ShopData> shops && shops.TryGetValue("ShopToAddTo", out var shop))
shop.Items.Add(Helper.ModContent.Load<ShopItemData>("assets/shopEntry.json"));
}, AssetEditPriority.Normal);
}
Oh no... I lost all my modding snippets for VSC after reinstalling the OS 
Really confused as to why Abigail’s hair is still purple when the assets in my file have been recoloured, and SMAPI & CP are reading it and loading it fine
I’ve only loaded up CP, my recolour, and CJB so there’s no other mods recolouring her 🤔🤔🤔
im getting AmbiguousMatchException trying to postfix patch a takeDamage method in StardewValley.Mosters/bug.cs
I checked some older messages with same error and the cause is overloaded original method
but when i look at Bug.cs in decompiled code, i only see one takeDamage method
there is probably another overload on a superclass
Does base have multiple or something?
you can add the DeclaredOnly flag to filter those out
oh yes that makes sense
Monster.cs would probably be base
I recommend BindingFlags.DeclaredOnly | BindingFlags.Instance | BingingFlags.Public for GetMethod in this case
So CP has decided that two of my recoloured assets just don’t exist 😂
They definitely do exist, and they’re both written correctly in my content.json file so I am v confused
maybe you can upload & link your content.json again and we can take a look?
this one is because you used Characters/Abigail instead of Portraits/Abigail for her portrait asset
Yeah i figured that one out pretty quick
This is the content.json - which should be correct but this is what my SMAPI log is saying > https://smapi.io/log/740ecf9aee454b0b8d85eb32c5ee2b7f
Log Info: SMAPI 4.1.8 with SDV 1.6.14 build 24317 on Microsoft Windows 10 Home, with 4 C# mods and 1 content packs.
hmm. as you say, nothing seems obviously wrong
i guess make sure the content.json and assets folder in your actual Mods folder are up to date? (if you are working on the files elsewhere, as is my practice)
they’re all in the actual mods folder - so they should be fine, not sure what’s happened at all
They should be up to date too
CP's warning about missing assets usually matches exactly what is in the FromFile line, in my experience, so since it's missing the ".png" i have to wonder
so i am calling this method here? if yes, what arguments should i put inside?
I did it with the .png and without, still the same error
no, you would add it as an event handler like this
helper.Events.Content.AssetRequested += HandleAssets;
Wait it’s fixed itself?????
Hey, I'd like to make a custom garbage can-type object (without the "NPCs get grossed out" behavior) that spawns multiple debris items for the player to pick up. Is this possible to do with ContentPatcher or do I have to write C# code? Basically, it's a fixed object on the map that the player right-clicks and causes, say, multiple pieces of wood to fall out.
ok phew i was about to ask you to make sure your images aren't called Abigailred.png.png 😅
I am bewildered, tired, my brain is burning, but it WORKS
I’ve got the file extensions on so definitely not 😂😂
definitely c#
you would need a custom tile action, which requires scripting
Thanks!
Thank you so much for all your help Ichor 🫶🏼
it would be a great first c# mod though if you want to give it a try!
very easy
so i've seen that data/shops is changing in the console, but i don't see the recipe appear in the game. is something here wrong? (it worked with CP)
so you'll notice that I called it "shopEntry.json". the json file you're loading should just be the shop entry itself, without all the other json faff around it from CP
IE. this part json { "Id": "(O)Arteesian.ExplosiveKegs_ExplosiveKeg (Recipe)", "ItemId": "(O)Arteesian.ExplosiveKegs_ExplosiveKeg", "IsRecipe": true, "Price": 5000 }
hey if i added a piece of furniture how can I make it so players can get it without item spawner?
by default it will appear in the catalogue and randomyl for sale, you don't need to do anything
I didn't see it in the catalogue :\
if you want to exclude if from both, you can use one of the optional furniture data fields to exclude it
can you paste the entry?
also !log
!log
Important note: Your computer username may appear in the log. If your username is your full name, please be aware of this before uploading it.
Please share your SMAPI log file. To do so:
- Open this page: smapi.io/log.
- Follow the instructions at the top of the page to upload the log file. (Don't copy & paste from the console window!)
- After uploading, it will show a green box with a URL to share. Post that URL here.
Please do it even if you don't see any errors. This has useful info like what mods and versions you have, what the mods are doing, etc. If the issue didn’t occur in your last session, please load the game to the point where the issue occurs, then upload the log.
You can use cp's patch export Data/Shops to validate what you did
oh, that's not furniture, that's just a regular item
It'll get stuff added by C# too
so i'm not specifying the shop here?
you need to edit Data/Furniture to add furniture, and the format is different
no, that's in the c#
see "ShopToAddTo"
so how do I make it furniture?
[[Modding:Furniture]]
bah I'll just link it myself, one sec
apparently doesn't have it's own page
edit Data/Furniture following the format here https://stardewvalleywiki.com/Modding:Items#Furniture
Hello gurus. I'm attempting to load NPC's birthdays and favorite gifts at the beginning of the day with a C# mod. So far I've had good success loading birthdays! The gifts are a bigger beast. I can get the gift IDs after some work. Now I'm trying to load object data for name lookups with issues. Skipping most of the cruft, this works:
// Load the NPC gift tastes using SMAPI's Content API
var giftTastes = this.Helper.GameContent.Load<Dictionary<string, string>>("Data/NPCGiftTastes");
This does not work:
// Load the "Data/Objects" asset as a dictionary
var objectInfo = this.Helper.GameContent.Load<Dictionary<string, string>>("Data/Objects");
SMAPI output:
[My Mod] Error loading Data/Objects: My Mod failed loading content asset 'Data/Objects' from the game content.
I see Objects.xnb in the Data folder. Is that not what I think I need?
🕰️ No urgency to respond. I realize I need to run an errand super fast. I'll be back in 30 minutes. Thanks for your awesome knowledge in advance! 
that line is technically correct, but it's possible you're either calling it before mods are ready or you have another mod that's broken.
that said, the BETTER way to do it would be to use DataLoader instead
You could also just use Game1.objectData. I'm 99% sure it should be automatically kept up to date with content changes? Might be more of a hassle to keep your cache up to date, though.
Though thinking about it...
It should be Dictionary<string, ObjectData>, yeah.
Not string, string.
good catch, I missed that
So did I until I looked at the type here! 
the 1.5 brainrot is forever isn't it 💀
Usually u only need to maintain ur custom assets
For vanilla stuff there's DataLoader
Tho ofc u should cache anything u want to access every tick
great, so it worked, tysm, but i need to create the recipe and item themselves somewhere. how do i define the recipe itself (what it contains of) and the item itself? i mean how do i do the stuff that was in the contex.json file
just make more json files and do the same sort of thing
like have one for your object, and another for your recipe
for loading your custom sprite you can just do a ev.LoadFrom and point it at your image
this is not working :\
Is it possible and how simple/difficult is it to use ContentPatcher to change NPC characters' names? And if not ContentPatcher, which mod is the best to do that?
Just pointing me in the right direction would be a big help. Thank you. 🙏
It's possible to use only content patcher, but difficult for compatibility
I you just mean their display name, that should be one of the simpler things to do, I think?
There is no magic global token to edit for all dialog
Yeah. I thought it might be difficult. Since you can't change the name in one place without affecting something else. x\
mentions in dialogue etc. are the tricky part
New topical mod 
however, i made a shitpost mod that changes everyone's name and it's pretty thorough. you could look at that one for help https://www.nexusmods.com/stardewvalley/mods/28276
I believe this one just brute force edit all mentions of pierre
And yea if you want something fancier u will need C#
This is truly a Spenny vibe mod.
i aim to please
I see. Thanks everyone. I'll look more into it. x]
This is jeautiful.
Names are easy, genders are harder 
did you use the format the wiki shows? it's different from regular items
yeah, but I am unsure how to implement it...
I put in what was in the wiki (with my item's name and texture) and it just gave me a chair lol
can you paste what you have?
this may or may not help: https://docs.google.com/spreadsheets/d/1nE9-qRqVA1LouhsVIMiu1b8QmJ7vGyToAksgcLztBnQ/edit?usp=sharing
Ignore the name there, it's primarily a Data/Furniture spreadsheet meant for use with CP
I feel like I am going to facepalm when I see the solution, but I have tried many things and can't figure this out, as I am a C# newbie. I have a texture at
string iconRelativePath = $"assets/Generated/{farmName}_{horseName}.png";
That I want to set to horse.Sprite.textureName.Value
Everything I do, it sets it as an xnb, and i am honestly just stumped
"{{ModId}}_Khannukia": "{{ModId}}_Khannukia/decor/1 1/1 1/1/1000/2/Khannukia/0/{{InternalAssetKey:assets/Khannukia.png}}"
your entry should look like this
don't do it with any file extension
assets don't have those
ok, so it will match name first, and if it doesn't find it, it assumes xnb
only filepaths use extensions, right?
so that is why I am getting the .png.xnb
Well, direct file paths
files use extensions, assets do not. asset paths look like filepaths but they aren't really
gotcha
it's more like a lookup key
I really only fiddle with CP, so I'm used to referring to asset paths as Targets
gotta assimilate the new vocab 🙂
yay
Congrats! I just hit 6k this past weekend
wow nice!!
So would I do something like this once I remove the png - horse.Sprite.textureName.Set(iconRelativePath);
if I wanted to have my crop mod's carrots also be able to be fed to the horse to increase its movement speed (like vanilla carrots can), would that require C#, or can I do that in CP?
That makes me wonder if carrots have a native context tag or if that's hardcoded
have you checked if there is a context tag
I haven't seen a context tag for it, but I am also liable to miss things
it works! but now it won't load the texture again :(((((((((
frankly i would be shocked if feeding carrots to the horse were not hardcoded
Fairly hardcoded
Also the only context tags for carrot are: "color_orange", "dye_medium", "season_spring"
Well it's probably a ez transpiler
awww, darn. that means it needs C#, doesn't it?
As long as you don't want some alt animation for it
horse.Sprite.textureName = Helper.ModContent.Load<Texture2D>(iconRelativePath);
I... didn't know you could combine is conditions like that. that's gotta be some v12 syntax
Thanks, I will try that
Seeing as how it doesn't appear that you're loading it into the content pipeline
isn't textureName a string?
I am flying by the seat of my pants when it comes to is and similar things lmao
His relative path was a string wasn't it?
Also it would need the .png if you use ModContent.Load
yeah but you're loading a texture2d and setting a netstring to it
Oh, uhhh
Are you sure you have the spriteindex exact?
Also I think Texture might prefer an asset path instead of an internal asset key, but I am not sure that having an internal asset key would prevent it from working. It's not very hard to load your furniture PNG as a Target path to use in the Texture field, if you need to.
I did this once but I switched to loading to content pipeline so I'm winging it lmao
I fought so hard with furniture sprite indexes.
tlitookilakin, are you the same Wren that made the Wren's Greenhouse mod?
internal asset key is an asset path, CP just makes an invisible Load patch for you automatically
yes I am!
Yeah, I'm more thinking it's the spriteindex being a butt
I love your mod, I use it for my greenhouse every time :D
I don't see why InternalAsseyKey wouldn't work
Oh textureName is readonly anyways
it worked before with the same index
mind if I pm you a question about it?
sure!
computers hate me lol
@fervent horizon so what you need to do is set textureName.value to a string that is an asset path, then you need to use AssetRequested to provide your local image for that asset path
assets and files are different things, and the game cannot directly read your mod files
ok, I will try some things out
You shouldn't have to reverse the /'s if it's enclosed in the InternalAssetKey brackets, right?
I know for normal Textures you have to reverse and escape the / to become \\ for delimited lists
so i'm trying to write code to make a monster move towards another monster and it's just... not working. i tried copying the structure of the code that makes monsters move towards the player but no dice
NikiMouse, if you look at the link I sent before, there's a "Furniture Code Examples for CP" tab that includes what you'd need if you wanted to load the Texture directly rather than though the InternalAssetKey
yeah because that's resolved before it hits the game
Yep, just trying to spitball ideas as to why it's not working right for NikiMouse
nope still not working with \ \ :((
are there any errors in your SMAPI log with the initial code tlitookilakin gave you?
no it works perfectly and the item is in the catalogue and everything, just no texture
can you post a screenshot of the folder your image is in?
does your log say anything?
it said the asset didn't exist
can you enable file extensions and make sure it's actually a png?
i chevked its properties and it says png
can you enable the file extensions anyways?
and it worked before when it was just an object
And your content.json is directly in the folder above this?
yes
well, you can always load it separately
Also I can't believe nobody fussed at me for having EditData instead of Load in the Code Example for Loading a Texture in that sheet. xD
It's fixed now.
I blame cold medicine brain
Hi, i have question about Facade
how can i write field from "private Item hoverItem" into public?
var objectInfo = Game1.objectData;
This met my basic needs today. Thanks!
"Changes": [
{
"LogName": "Add Furniture",
"Target": "Data/Furniture",
"Action": "EditData",
"Entries": {
"{{ModId}}_Khannukia": "{{ModId}}_Khannukia/decor/1 1/1 1/1/1000/2/Khannukia/0/Mods\\{{ModId}}\\Furniture"
}
},
{
"LogName": "Load furniture sprites",
"Target": "Mods/{{ModId}}/Furniture",
"Action": "Load",
"FromFile": "assets/Kannukia.png"
}
]
@cold summit try this
will do
sorry I made a typo, just fixed it
yeah, change the typo in the PNG to remove the h
you're my heros
welp, removing the png didn't work, the game still assumed it was looking for an xnb file An error occurred in the base update loop: Microsoft.Xna.Framework.Content.ContentLoadException: The content file was not found. ---> FileNotFoundException: Content\assets/Generated/Pumpkin Acres_Daximus.xnb ---> DirectoryNotFoundException: Could not find a part of the path 'C:\Program Files (x86)\Steam\steamapps\common\Stardew Valley\Content\assets\Generated\Pumpkin Acres_Daximus.xnb'.
That’s the way the errors always look
The game always displays errors by XNB even when what it needs is png
You're still trying to feed a string into an asset spot
do you have your full code on the web anywhere? (ie. github/gitlab)
I can throw it up real quick
okay, yeah. so you're currently trying to use file paths as asset paths.
assets and files are two completely different things. The game can only "see" assets, not your files. You have to turn your files into assets to make them available to the game
you can do that using the AssetRequested content event
Why can't I just make a mod, why do I always have to have ideas
Are u scope creep agen
Yeeep
You can stop creep if release mod now then update later
Lol, delayed creep
Long Term Support
The problem is, I generate scope creep before I've even finished the base of the mod
If it helps, when I've got a big project with lots of creep, I delineate between "needed for initial release" and "good in a future update". Like specifically ask yourself what is strictly desired for an initial release.
People love updates for more content!
congrats
Yes, learn to love the MVP.
could you guys please tell where can i find so called "tall" sprites like casks, mayo and cheese machines, etc.?
tilesheets/craftables
fortunately, MVP can just as easily stand for Maximum Viable Product
which pairs well with my plans for Long-Term Suffering
boy i hope pathos appears by chance today so i can casually send a sly message about making EditData MoveEntries optionally not send a warning if the BeforeID/AfterID is not found in the list
or like, have a fallback operation
I am good with Maximum Viable Products.
What's that? This feature is something like only 2 people ever would even use and definitely not worth delaying a release? But it sounds neat
Knitting is just multithreading.
i also think it would be great if this was a trace or something. I have no control over other mods deleting the vanilla entries i use as reference
just attempted to write baby's first harmony patch and my mod immediately crashed 🫠
Depending on what you tried to write, this is probably normal
I would say postfixing a monitor log would be the most "baby's first" you could do with the least likelihood of dying
tried to use a prefix to prevent specific debuffs from applying
i have no idea what i've done wrong, just that it's clearly something
you can always post your code if you're stuck
we have no idea too 😌 a log could help that
here's the relevant code, i'm sure i've made some kind of obvious mistake
hint: log with $"Failed in buffing prefix:\n{e}" so you actually know why it failed
And what is monsterController, where is it populated?
it's a custom class, it's populated in the mod entry
You also haven't matched the class to the method.
Game1.player.applyBuff is obviously a method on Farmer, not Game1.
with that fixed it's finally giving me a useful error
System.Reflection.AmbiguousMatchException: Ambiguous match in Harmony patch for StardewValley.Farmer:applyBuff
that means there are multiple applyBuff overloads on Farmer and the game doesnt know which one to patch
you need a 3rd parameter to AccessTools.Method that is an array of Types corresponding to the parameter type of the overload you want to patch
I thought you specifically wanted to ban the ghost from doing the debuff
Rather than prevent player from getting debuffed by nausea
i want to specifically ban the ghost and the strong skeleton from doing debuffs
You need patch those subclasses of Monster
The nuance is just whether other sources like say modded monsters should be able to apply them
right. doing it this way just seemed easier at the time but maybe i'm wrong
yeah that happens a lot hahah
yeah it is easier, patching the monsters need a transpiler
to switch out their debuffing projectiles
The monster classes are a bit monstrous sometimes
This way they'll still try to debuff won't they?
The debuff just won't do anything when it hits the player
What about postfixing the methods and immediately removing the debuff?
if you're going down the route of patching Farmer.applyBuff, perhaps patch BuffManager.Apply instead (which both applyBuff overloads are calling)
You could also do a prefix to record the farmer state before getting hit
This is less elegant but you’d avoid a transpiler
You can also add in conditions like the monster name matching what the vanilla monsters do if that helps any with modded monsters
RSV might be a good mod to test on, as they have tons of those nasty ghosts
You can either decide you do want to affect those monsters, or that you don’t, but I think they’re spawned via FTM like most mods adding monsters
man i'll be honest, i'm pretty sure my mod is not at all compatible with modded monsters either way whoops
As long as it doesn’t crash the game, eh, sometimes that’s the way it goes. I know I personally don’t spend much time adding compat unless someone asks. And even then I sometimes put it off.
(And I doubt it would crash the game, Stardew modding is pretty chill)
for me, compatibility is a "would be nice" kind of feature. not something for the minimum viable product
I have successfully crashed the game before. But it's not common.
runtime engine execution error my beloved
fond memories of trying to harmony patch a specific switch statement function in communitycenter.cs that would crash the game only when debugging
I've crashed the game, but I was doing stupid stuff
fond memories (i may have cried)
I had a brief time when I was causing AVEs using relatively normal harmony patches
I was mostly perplexed at how I managed it, iirc
Trying to use a struct like a class in IL is an almost guaranteed AVE.
Apparently it can also generate an execution engine error as happened to Pintail a couple weeks back.
I wasn't touching IL
That was the weird part
I forget what stupid mistake I was making, but I never do transpilers
Oh, I see, you meant postfixes etc.
So it was a prefix or a postfix
That does seem hard to do. Maybe marking (or forgetting to mark) some argument as ref, or using the wrong modifier? Or a version incompatibility, SMAPI's rewriter isn't perfect.
Is there any way I could create a mod that changes the frog egg sprite to match its color? There is a framework mod called TrinketTinker so maybe I could use that.
There's always silly AVE stuff
TrinketTinker doesn't and likely will not support that, unless I finally make the hungry frog ability
the dumbest and most straightforward solution i have for this is to make a mod that lets you pick the frog color and just patch BOTH the item AND the frog sprites to be whatever color is chosen
Yes its dumb, and yes its easy
It has features for matching the icon to the variant (see the bat example) but it has no power over vanilla trinkets
Yeah 
I assign you, get to work
I think u can also reproduce the particular impl for variant icons, but for the froge
Which works by changing the parentsheetindex
No harmony required
To summarize u would
- Change frog egg to different item icon texture, make colored variants on same sheet
- Make custom machine output method based on the anvil one, change parentsheetindex here
- Make a new machine rule on anvil that accept only frog egg and produces using the custom output method
i fear i have done something else obviously wrong this time
System.Exception: Parameter "id" not found in method System.Void StardewValley.Buffs.BuffManager::Apply(StardewValley.Buff buff)
that seems fine to me
did you save
did i 🤔
if it didn't work because i forgot to build i'm going to flip a table
i can't believe it.... it's working
tested it and the patch actually works too, the debuffs aren't applying
@dusky sigil You leveled up to Cowpoke. You can now speak in our voice channels and share images in all channels!
Hey, my google skills are kind of failing me: Is there a good tutorial for GenericModConfigMenu? Or maybe is there a simple mod that has a small example I can look at? My mod will literally have one boolean checkbox for "Enabled" for the mod I want to create. (I'm experienced at coding, new to SDV modding.)
are you making a CP or C# mod
I don't think you need a config like that
If people don't want your mod to take effect it's simple to uninstall
I've put a enabled bool in for when I have a mod that you can disable to finish up a day without issues
Yeah, having a master kill switch is generally Not Done, mods can be added or removed at will anyway.
But if you're trying to do this from C#, you probably want to start here: https://stardewvalleywiki.com/Modding:Modder_Guide/APIs/Integrations#Using_an_API
GMCM itself has a guide here: https://github.com/spacechase0/StardewValleyMods/tree/develop/GenericModConfigMenu#for-c-mod-authors
Curious about the particular situation here 
Betting it's one of those "unreleased" mods.
Nah, it's Custom Locks Updated, just in case there's some issue where my patches are making doors fully inoperable
Because I've had some conflict issues that literally cause that
....temporarily? That's bizarre.
And just disabling my mod makes them work properly and the issue can be reported to me
Oh the whole dtz business
It only happened during one of my updates so far, can't remember what I did wrong lmao
sounds similar in idea to my debug book that just removes all the book powers you got and refunds you, in case i fuck up again and cause issues from a broken power
doesnt hurt sometimes to have a "in case i fucked up, heres an easy out" button
Yeah ig these r more like "safely uninstall" buttons
I only add it in mods where it makes sense because I hate when I'm using a mod and a problem causes me to lose a whole day
Thanks. I'm doing it in C# since I have to have custom code anyway, and GMCM from CP seems easy enough to understand.
How the f** can this throw an NRE?
if (debris?.itemId is not null && debris.itemId.Value.StartsWith("(O)") &&
Game1.random.NextBool())
debris.itemId.Value is null or Game1.random is null
itemId was null, so it shouldn't have gotten to Value
and Value shouldn't be null if itemId is not null, right?
Game1.random definitely is never null
A non null netclass can hold a null value
is this better?
if (debris?.itemId?.Value is { } id && id.StartsWith("(O)") &&
Game1.random.NextBool())
NetString, which I assume that is? Can absolutely hold a null value
yeah its NetString, but when VS broke it said itemId was null, so it should have stopped there
maybe it was refering to the Value
and I didn't pay attention
Did STF get a 1.6.14 update?
Mmm let me see what version I have. I did all the updates I had in Stardrop.
I'll go grab the Nexus version when I get home at least
Okay, I have ~20240227 while the newest is ~20241107 or so. I guess Stardrop didn't register it as an update because the difference is all after the alpha part.
This evening's C# SMAPI mod puzzle: I know that a festival is today via Game1.isFestival. How would I go about getting today's festival name? Is there a good lookup chart for these variables? Maybe something to open up the .xnb files to take a look around?
... and now I need to run an errand. Ask and run! (back in 1 hour, no rush to respond and THANK YOU!)
Aren't festivals tracked by something dumb like checking the literal date?
!unpack lol
Follow this guide to unpack the game's content files in order to see and explore how the game data is structured.
It's helpful when making your own mods, or just to learn about how the game works!
it seems like 184 is as big as i could go with only a Chest.GetActualCapacity postfix
i get index out of range if its bigger than that 
Chue chest framework???
ehh 184 is big enough, anything to remove Better Chest
(no offense to BC, it's just beeg fridge is literally its only feature that I use lol)
oh yea fridge needs a separate transpiler lol
no this is me dodging better chests bc the config menu of that is the necronomicon
but i do wonder why it caps out at 184 
i believe it's something to do with the gamepad neighbour id business
@brittle pasture i dont feel like making this a proper mod so pls just yoink it
https://github.com/Mushymato/StardewMods/blob/main/MatoTweaks/Tweak/ChestSize.cs
(nice, thanks. I'll also probably just build that for myself lol, I don't feel like dealing with the possible torrent of reported compat issues from BC/other inventory mods)
indeed 
😔 better chests necronomicon config...
that's a weirdly specific number
my solution to "chest not big enough" was a custom slice-base IList implementation
How do I go about using Spacecore in a project. I have it imported and i want to try the spacechase0.SpaceCore_TriggerSpawnGroup spawnGroupId location includeRegions excludeRegion call
i couldnt find it in the Apis methods after initializing like this
SpaceCore.IApi SpaceCoreAPI = new Api();
InventoryMenu does just use IList<Item> for its inventory, and doesn't cache state, so you can just do a list that maps back to a specific slice of a larger list and it works great
thats just a trigger action action. you dont need to reference SpaceCore's API or dll at all for this
that is also not the way you'd want to get an API from another mod anyway. theres a wiki page that explains how somewhere but i dont remember off the top of my head
but regardless you dont need it here anyway
im dumb, i think ill skip using frameworks till im more experienced
Assume my goal is to spawn a monster in the farm programmatically, what is the best way to do it?
im psure spacecore's spawning stuff is meant for usage with content editing, usually content patcher
nvm figured it out
Hmm, I'm trying to add a new piece of mail on winter day 14, that doesn't overwrite the travelling merchant mail, but using Id "winter_14" does. I'm just using ContentPatcher, if that helps.
I tried a When statement for Season winter day 14, but that didn't seem to work?
Keys have to be unique, you can control when a letter shows up with trigger actions.
Hm, okay, thanks I'll try that route.
question, for gift tastes for npcs do you have to use the notation that says if it's an object, big craftible, clothing, etc?
only objects can typically be gifted, so no
nope, there's Maki Roll too
there should be a mod that adds ceviche
Well idk if I could allow for modded items in a modded npc's gift tastes...
not sure how you draw ceviche in 16x16 without it looking like confetti
Like wouldn't I need a conditional?
it just compares names, you can add whatever items you like
it won't explode if it can't find Blueberry.EveryFlavourBeans.EggJam in the item registry, but if you give an npc that item and it's in their gift tastes, it'll use that taste
yea it doesnt care if it has a non existent id
u could use string operations to conditionally append if u want but not important
you can also use context tags for gift tastes (context tags my beloved). for example, Maru likes edible_mushrooms
Bonus if you can use a standardized context tag for a taste, yep
Is there a context tag for sushi? XD
that's true, you can give them food_sushi for sushi items
how do I find the context tags???
they'll take anything from Maki Roll to Roe Roll to Snail Sashimi
use help ingame, there's a console command for it somewhere
It will be in the object/item data for them
so I did list_items....
TIME TO SEARCH CONSOLE COMMANDS
i believe you want list_contexttags
which is also a great way to increase your log by 5mb
but like, less 5mb
LOL
on a mission to draw the stupidest & floppiest cats for ur home
There is also debug iq ITEM_CONTEXT_TAG food_sushi probably if you just want to check if that one is a valid tag. It should open a shop menu with all those items that match in it
If I read the wiki right
floppy cats you say 👀
is jumping around days/seasons with world_setday something that can fairly easily mess up your save file? I've had a couple files now go south while testing my mod, while new ones seem to work fine. I'm hoping it's all the debug commands and not something I'm mis-coding.
that didn't work, however, doing a patch export on Data/Objects did
now I have all the items...and their context tags
oh, i was thinking of https://stardewvalleywiki.com/Modding:Console_commands#listtags
debug listtags
that didn't work
well it does work, it just only lists the tags for the held item
[Console Commands] Sent debug command to the game, but there was no output.
Oh...I have to HOLD the item...
😐
Remind me in 10 hours to check charity box compat, ponder dewb multiplayer
grumbles, mutters some vulgarities about humans...13midnight in particular... fiiiine. (#6396262) (10h | <t:1733234637>)
The latter is really big ponder... I don't know
incredibly annoyed i didn't make a dewbug for my bug collection given how many times i've typed it in the console while trying to send commands
dewbug would be so cute
what does the tag dye_strong mean???
Brb adding a dobug command that introduces a bug to random mod on your machine, permanently
it affects how much the color changes when you dye something
with the dye pots or sewing machine
ah
question - I have a few assets from the base game "furniture.png" that I use in my custom location, and unlike some other base files the game will not find it automatically. Is it like a no-no to include the furniture.png in my location directory for it to use? Should I copy out the pieces I need onto my mod-specific sprite sheet?
theres also a full dump on this page under a dropdown https://stardewvalleywiki.com/Modding:Context_tags
furniture isnt under Maps/*, you need to load it again somehow yes
blah of course the one sprite I want to use for Jodi isn't present on her winter outfit, now I have to make it and patch it in, in case my event happens in winter
I don't even know what the sprite is used for in vanilla?
I'm getting a curious warning that I've never seen before, does anyone know what it is?
0>CSC: Warning CS8785 : Generator 'JsonSourceGenerator' failed to generate source. It will not contribute to the output and compilation errors may occur as a result. Exception was of type 'InvalidOperationException' with message 'Unreachable'.
It seems to have something to do with the ModBuildConfig, but hell if I can figure out what.
It was the only way to really go about it 
what happened??? XD
It doesn't really seem to be affecting the build, but I'm worried that something's not getting updated and maybe there's something stale in the zip.
(Actually, it could also be in the ModTranslationClassBuilder - but like the mod itself, it seems to be updating despite the warning)
means it's not a valid context tag most likely. 😛
So this is what happens though when I do this, debug iq ITEM_CONTEXT_TAG food_sushi
It seems that ITEM_CONTEXT_TAG just doesn't work
weird.
ITEM_CONTEXT_TAG isnt an item query is it? its just a GSQ
that can be put in the PerItemCondition field, but isnt an item query itself
even tried with edible_mushroom
I just wanna find all the food_sushi items 😭
doesn't seem like the debug command supports PerItemCondition unfortunately
you can patch export Data/Objects and get all items in-game, and search for food_sushi
Has to do with the way the fish pond item requests are worded
if it doesnt look to be used, then maybe it's not in the game at all? i know some characters ( like penny) have weird leftover sprites that go unused
You could set the event to not fire in winter, if you want
Wow okay way to not pay attention to where the timeline ends, discord
I'll do that if my patch attempt doesn't go smoothly the first time
aaaannd it didn't work 😛 why am i so bad at this { "Action": "EditImage", "Target": "Characters/Jodi", "FromFile": "assets/NPCs/Sprites/Jodi_Winter_Kneel.png", "ToArea": { "X": 16, "Y": 192, "Width": 16, "Height": 32 }, },
JSON is a standard format for machine-readable text files that's used by Stardew Valley mods.
If you need help with a JSON file, you can upload it to smapi.io/json to see automatic validation and share the link here.
When making mods, it's recommended to edit your files in a text editor with JSON support, such as VS Code, Notepad++, or Sublime Text. These programs will check for syntax errors.
and, what exactly isn't working?
Wouldn't this be her 'helping Evelyn garden' sprite, if it was used?
(There's also the fact that sprite mods are not going to have your sprite and may not support it)
There is dialogue that mentions that she helps out sometimes and that would track for not being in use during winter.
Though I have never seen her actually help, she just says she does sometimes
that makes sense
that's a good point, I guess I'll just make it not trigger in winter after all
and yeah it looks like gardening, i was using it to have her kneel by the mine ladder after Kent goes down to look for her son
that should do it, right? "239790008/t 1700 2400/f Shannon 2000/z winter":
or does winter need to be capitalized? the wiki doesn't say
it doesnt
See, I am absolutely the type of person that would use the fact that PerItemCondition works to just add them all to a Shop entry and find them that way xD
Is it necessary? Absolutely not. Does it save me reading through a text document? Yes.
yeah imma just do the text document....would like some more sushi mods tho XD
Haha
Just to point out, you don't have to make your event ID a number anymore 🙂 You can make it descriptive, like {{ModId}}.JodyEvent1.
Yeah I saw someone mention that the other day, its too late now though if I changed it somewhere I'd miss a reference to it somewhere else
Remind me in 5 days and I can make a mini-mod specifically to add a shop entry that you can change the item queries on for what should probably be standard food tags.
for a moment there I was gonna say no, absolutely not. but fireredlily? yeah, yeah i will. (#6396408) (5d | <t:1733636294>)
I had the same issue because I started my current WIP NPC in 1.5, but with the number of events she has it's SO much easier keeping track
Lol Uber
But the old events in Jorts and Jean stayed on numbers just in case there's a mod tied to them somewhere
So, fun fact. Did you know that the sushi project mod has references to Jorts and Jean?
Hm is there legit no debug command for this
Ik there's debug iq but I forgor if it takes per item
I'm just going through a list of items really
What does fish_upright do? XD
Also love that brown eggs still give white color
looking at the code it seems to change how the fish swims inside a fish tank pond
i mean if you grind up eggshells, they're all gonna look egg
my brain is too mushed for math rn to really say what it does though, though you can reference the fish that has that tag and compare it against the fish that doesn't
correction: not fish tank, fish pond
potentially it's like squids?
question. is there a limit to how many items can be in a loved gift pool for gift tastes?
I don't think so
blah I'm getting my code I'll cleaned up to publish and now I see a note to myself to create a night market schedule for my NPCs. Do I care any more? hmmmmm
Honestly there is a good chance that I will end up making that mini mod tomorrow if I keep thinking about it
Only thing stopping me right now is that it's cold and I don't want to get out of bed when I need to go to sleep soon
I seem to recall discussing that with Bea, yeah! 
could you enlighten me on if there is a limit on how many items can be in a pool for each category for gift tastes?
Also, say I put food_seafood as a context tag for liked gifts, but have food_sushi in loved but have eel foods in hated...will the food_seafood have priority?
I think there's something to check for priority on the wiki, but can't remember where it was....
Or what it was for.
Which i realize is unhelpful
I just want to make sure that if I put spicy eel in hated gifts, it won't conflict with food_seafood in liked/loved gifts for gift tastes
that does not help me at all as I do not understand if it would work for personal gift tastes
Like it says it will override universal tastes
but idk if it will do for my specific problem
What’s your specific problem? All I’m seeing is a theoretical question, and I’m not sure where it came from
So I want to have a liked gift taste list that includes items with the context tag of food_seafood but any food made with or of eels needs to be in the hated gift taste list. If I put the context tag of food_seafood into liked, will that then override having spicy eel in the hated list?
then the page above does list how that would conflict and what would happen then
in a pseudocode format though
then I either don't see it, or don't understand where it is mentioning that
it's just generally complicated
its the big block of pseudocode at the bottom of the page
under "How a gift taste is determined"
thats the order in which it figures out the final gift taste result
This method is long lmao, it checks each list so many times
Yeaahhh it's long
but generally it looks like loved items > hated items > liked items > disliked items > neutral items
universal tastes > personal tastes
so it first does the love>hate>like>dislike>neutral for universal tastes, then again for personal
stops on the first it finds
so if food_seafood was put into loved items then the spicy eel would be considered as loved...
pretty much
😐
Universal doesn't seem to return first found, but personal does?
So if you set personal preferences it should choose the individual item taste before context tag
well....poop
But if you rely only on universal, it'll choose context tag because that's checked last
This makes my gift tastes thing much more difficult to do.....
Probably a reason as to why vanilla gift tastes are so boring
because I can't use the context tag if the person I am making this NPC for wants seafood in the loved category
so I will have to MANUALLY put each id in for the seafood that match the criteria that being no eel.
This definitely seems like a "gonna have to test" moment, but I'm pretty sure if you put the context tag and then a personal preference for the specific items you want to deviate then it should work
Though I guess that would require the context tag in the universal for everyone?
I mean I'll try that first...still trying to get all the context tags.
Which would be a different problem lmao
Actually context tag in personal should still choose item first
Since it returns as soon as it matches and it checks each category for specific items before checking for context tags
Love that the wiki says there's a context tag of category_gem but when I search it in Data/objects there's no item with that tag.
could be implicit
Not all context tags are in Data/Objects
Many are added by the context tag adder script thing
Totally spaced the name of it lmao
Yeah but I also need for some modded items, so I am still needing to go through the patch export of data/objects
i'm just saying where the category_gem comes from
oh...sorry. am the dumb
it's also like 11pm...and I work tomorrow...I should get sleep
Hey you made the Shiko mod? Well I mtrying to activate her 6 heart event and it refuses to work.
That was in 2019, pretty sure nobody has been able to get ahold of Papaya in years
I imagine not very well, seen at least a couple people trying to update without permission so I had assumed not at all
is it possible to add a single extra inventory slot? or is it only possible in multiples of 12.
Will the UI handle such an odd number of slots
Any tricks to quickly making animations in Tiled? As in, any way to do it quicker than making a million clicks and praying to all the Goddesses that I don't get the count wrong and create a horrifying monster?
Check out Bigger Backpack, it's possible but it's a ton of Harmony patching, the UI won't auto handle anything for you, you have to do everything to add those extra slots
@calm nebula: do a wiki edit (36h ago)
hey! so I tried to add a recipe as well as an item of furniture and it wouldn't let me put both in the same "content" json file. what should i do?
!json
JSON is a standard format for machine-readable text files that's used by Stardew Valley mods.
If you need help with a JSON file, you can upload it to smapi.io/json to see automatic validation and share the link here.
When making mods, it's recommended to edit your files in a text editor with JSON support, such as VS Code, Notepad++, or Sublime Text. These programs will check for syntax errors.
Data/Recipes isn't where u want to load the png, methinks
I have done a recipe, but it has been a while, lemme look into the wiki...
U might want to review this. Are u in 1.6?
yes\
i copy a map with an already-working waterfalls tilesheet, then animate everything else, THEN i use that .tmx as a template and copy it every time i want to make a new map.
huh, TIL
i used to try and follow the "export animated tilesheet as .tsx" trick outlined in the wiki, but i keep running into issues that got tedious to fix, so i'm sticking to that template method
Your brackets are incorrect i think
Missing a closing one for the first patch.
upload your json here, or use a program with a built-in validator
https://smapi.io/json
missing a closing bracket and the second patch has an extra bracket too
Wait, no, the indentation is just very weird.
nah youre right, the EditData one is missing a closing bracket. and the Load action has an extra closing bracket after FromFile.
Okay, first thought was right after all. I’ll leave this to your capable hands. 
Thanks! I disovered the predominance of my error was my mermaids weren't quite lined up! I also simplified my count out method! Mermaid Farm now has mermaids dancing, singing, and waving! (I was gonna make TAS's, but I cannot figure out for the life of me how to successfully edit the Farm in C#).
I don't see it 😦
use the json validator linked for you.
no idea how to fix that
you are missing brackets, if you retype them in the program you use (what do you use?) to make the .json, there will usually be both brackets added automatically
if you look at the thing the validator is yelling about, you can get an idea for what the issue is
if you want to add them manually, you need another closing bracket after the Entries in the Edit Recipe part
and an opening bracket before the "Load recipe sprites" part
Watch out with how your opening brackets pair with your closing brackets.
ok thank you lol
i think i got it!
the recipe is not showing up in the game 😦
do i also need to add it as an object?
it works!!
yeah i really cant figure out how to add a custom map overlay 😭
Mrrp
Remind me in 12 hours to edit the wiki
I love meanies, so for you atravita? absolutely (#6396871) (12h | <t:1733271664>)
as i fight with my events again

