#making-mods-general
1 messages Ā· Page 517 of 1
Here's the kicker, your mod works but you should still rewrite the code.
Don't ever "Load" vanilla assets to replace existing vanilla assets,
use "EditMap" and "PatchMode": "Replace" instead.
A mod author of a texture mod told me this. Could someone explian what they mean?
I assume its in rerfernce to my Content.json file, with me using "Action": "Load" in Changes.....
afaik, 'Load' creates a space for an asset to be, and EditMap/EditData/EditImage/(whatever they're called i don't remember) edits/adds said asset
i may be wrong though, i am still new, so take this with a grain of salt LOL
That is my understanding of it
(yayyy i might be right)
I think it kind of depends on the goal of the mod and I don't entire agree with them
Chu knows the code way more than me though, I just content patcher stuff
I defer to the code wizards
The main practical issue with using a Load on a vanilla asset is that if 2 mods do Load to the same asset (vanilla or modded) they both don't get to do the Load
This is because the default priority is Exclusive
yeah as a code criminal chu gets the higher authority here LOL
If you change it to priority Medium or something this is no longer a problem but instead you might unexpectedly "lose" to the hypothetical other mod
But like if your mod says "i replace the farm" and user goes "i used 2 replace the farm mod and it errored :(" i think that's their problem
Well, Im still srugglijng with the Island_W mod replacing causing issues. Vibrant Pastorial Retexture wont touch it, even after I used default tilesheets... AND the "Cant plant here" bug is back....
and as ususal I have no clue what code does or works
-# (also cool user inkubus)
The tilesheet stuff is more likely to do with having any vanilla sheets in the same folder as the tmx
aint that what you supposed to do tho?
nope! maps are.. eugh..
....oh
Never publish your mod with vanilla tilesheet assets packed in, that's technically redistribution also
Ohhhhhhhh
If you use the tilesheetinator tiled plugin u can avoid this entirely
Or you can use ~Tilesheetinator~
It lets u work on maps without copying the sheets very qol
Well, how do I link to the core files tileset?
You can use the Tilesheetinator tiled extension to create Stardew Valley maps that work in-game without having to copy vanilla and modded tilesheets back-and-forth, rename files with a . in front of their name, edit maps only in the unpacked content folder or make symlink workarounds.
See the mod page for full installation and use instructions.
YESSS
But the traditional means is
- work on the map with sheet in same folder
- when release only include the tmx
They will error in tiled but work in the game
You can edit with the files there but you have to remove them before publishing. As long as you don't reopen the map file after moving the tilesheets, it won't break
So follow-up question to the stuff I posted earlier about custom HD portraits. Can I use the condition IS_EVENT when setting up my tokens? Or is that only useable in the appearance system?
how do I tell it to use the tilesets then?
Your tileset would have the right info
You can inspect this by opening the tmx in a text file
The tilesets have a relative path to begin with, as long as you are Loading your map to the same place as the vanilla tilesets (/Maps) then it will pull them just like it was from your mod folder
This is tiled doing the path resolution for you
The MAP just knows which tilesets to use????
What game sees should be you got Maps/inkubusmap and it asks for spring_outdoors let's say
Your source should never have all the extra stuff before it, it should be a relative path to avoid tile sheet climbing
So it goes looking for that in Maps/spring_outdoors
And if that is an asset which exists, it will be set as the tilesheet source image
gimmie a few minutes here. need to clean stuff up rq
take your time! modding can be confusing and it takes a while to learn 
but I guess my main questions are, if I copy the tilesheets into the asset folder just so I can use them quickly without having to fid the originals, then how do I change the image source back?
Just take them out when you publish
Tbh i think u might as well just try it?
It sounds like you did everything right except for the "take them out on publish" part
If you are saving the file while the tile sheet is next to your map file in the folder, then your paths will be relative and work just fine in game without them there as long as you load to /Maps/something
bweh, I don't think this is something I can make this work, huh? I tried to use it like a token but it just does nothing. I'm guessing conditions like IS_EVENT are only useable when you use Appearance?
They are called GSQ so yeah only some fields support them
Which hd portrait thing are u using anyways
Oof, would I be able to set up a dynamic token using that? Or would that run into the same issues I'm running into here?
Do you mean which custom portrait mod, or what HD mods? I'm making my own custom portrait mod, so this is all my attempts at code lol. For the HD portrait mod, I have Portraiture installed. It still accepts tokens using the HDPortraiture framework, which is how I can get seasonal outfits and stuff
Huh interesting
I was slightly confused mainly because i figured if you are in content patcher what if you just edit the appearance entries
I don't think Appearance can use HD portraits without some kind of framework, right?
But I'm guessing portraiture targets are special
The core problem isn't really appearance specific, you need some way to get the game to accept an hd texture
Yeah
Portraiture is funny in that you don't actually need to code anything. You can just drop your HD portraits into a folder and it replaces them for you. But then it doesn't work with most tags like say, seasons and such. So that's why some folks still make their own content packs for Portraiture using HD Portraits' old framework, which Portraiture supports. The issue there is that it can sometimes run into this kind of situation lol
Yeah i guess there's no way to actually check is event atm
I was looking for a cp token and didn't find one
Custom HD portraits are in a really weird state atm with HD Portraits deprecated and Portraiture not really working well with custom tokens
Portraiture+ is one option but I've found it does weird things to custom NPC sprites for some ungodly reason lol
Duruznik how do u feel about just using something else for ur mod?
The 2 options i mentioned previously basically
I'd be happy to if they work haha! But if the spacecore thing you mentioned needs a pull request, I'm not sure what that means š Would it be useable for users downloading my mod?
They'd have to download an alternate version of spacecore until the PR is merged but casey said i can make that
And idk what iro's timeline is, maybe sooner maybe later
Do you know what the timeframe is on the PR being merged? Because my mods are def still WIP lol, it's gonna be a minute
But if it's probably gonna be merged in the coming weeks, that could totes work
I will bug @next plaza harder about it 
Oh def no rush! I was just wondering haha
It does help if u test it now though, in case something needs fixing
So this would mean my portraits mod would need spacecore instead of portraiture?
Yeah
I'll help u with the spaget part dw
I'd be happy to try it tbh!
Ok let me make a build then
This custom Quinn is just for personal use- a quick and messy Talkohlooey-style edit I'm using for my personal save, so I'm not as fussed about it being foolproof. But I'm also working on a proper HD portraits mod for just the vanilla NPCs in my own style with plans to eventually do modded NPCs too, so future-proofing that mod would be kinda great haha
This look correct?
@lucid iron
okay so
Removed the maps, didnt touch the imagesource path.
changed it from Load to EditMap
suppenly Vibrant pastorial Mod no longer conflicts
this is fine though earlier i mentioned that it's honestly fine to just do Load for your usecase
So more than likely, it was cuz I was forcing it to use a specific tileset over the original it was a copy of
What exacly is the different?
difference*
ALSO ALSO
STILL CANT PLANT ANYTHING RAAAAA
The main practical issue with using a Load on a vanilla asset is that if 2 mods do Load to the same asset (vanilla or modded) they both don't get to do the Load
This is because the default priority is Exclusive
If two mods target the same map to load, neither does?
You're not editing the tiles on the tilesheet, you're only changing how the map handles them (the animation is coded in the .tmx file).
This is also good knowledge to have.
I thought the tilesheets themselves saved the animations
just in case u didnt see, i made a thread #1462189744371929293
And what happens if one mod loads the same map that another is replacing?
Or when two try to replace the same map?
There can only be 1 Load, but there can be multiple EditMap
I imagine even more now that people know how to add brand new non-replacer farms
Well that's just loading entirely new map and separate flow than this 
wait, isnt editmap the same software that terraria uses?
Farms are usually one map deals. Usually. There's mods that add small things to farms, but the variability of them means not a lot of mods do that
EditMap is not software
it is a Content Patcher command
ah
Yeah as in the thing u wrote right here
So "Editmap" can both replace the whole map, or just parts of it?
hmmm. I may need this info for another map Im working on, which I want MCM to be able to choose different locations for a pond
Yeah, I add a building to the town map and it just replaces a specific spot
ANYWAY
How do I fix my map now that I cant plant anything
It has the island LocationContext and summer SeasonOverride.... Im not sure why its doing this
Did you sanity check yourself first
Lost that eons ago
Make sure it's actually your mod's fault
Did you set it to be plantable in the location data?
it is my mod.
It's only default-enabled on the farm I think
I thought most dirt type tiles are plantable by default?
That's separate
Dirt is hoeable but there's also CanPlantHere in location data
Or something like that
They are just replacing ginger island west though
Oh, never mind then
So i don't feel like location data is relevant
Yeah that should work
I have both sand and dirt as diggable T
Is the issue that you completely cannot dig or that it loses greenhouseness
I can dig. I cannot plant.
Oh weirx
On either side or just the left?
Both sides
Hmmm
is there a tile property that makes it farmable?
Should just be Diggable
well eff me then xD
Do u want to send over ur wip mod for others to try
yes plz
may I send you the zip?
Well it's probably best to just send here cus i am on me phone
I'll take a look in like an hour if no one else figured out the issue
I appreciate the help, everyone
On my phone but try not including the tilesheet
If does not work then take lookup anything and look up a tile you should be able to plant
Figured it people were looking at the map file, theyd need it
Nah, like the nutcase i am I actually looking at the raw xml files on vscode
You may call me insane now
Alright well I loaded just my map, CP, and SMAPI, and it still couldent plant anywhere, so its not a conflict, I think
well, that would have made things easier ...
Did not know it was allowed here
you can always upload your own works
also dang, Woulda also been good to know you were here too xD
Just wanna fangirl a lil bit, if you dont mind. I absolutely love Vibrant Pastoral, and feel like stardew is unplayable without it
XD
been using it since the first version first went up
oh, and my discord handle is on my nexus page 
So I assume its some issue with the way the mod is loading, or from the map's custom properties
since i fixed the issue with it not pulling the official tilesheet
what are you trying to plant? I have no issue do so
the name is untitled tile sheet2, while your map has untitled tile sheet 2
note the space
Aint no way its that simple
Haaaa??? I tried pinapples, garlic, tubers, starfruit, and wild seeds
Imma lose my s***. It was that simple.
Hey everyone!! So iām looking for help for modding! Okay⦠so Iām making my own NPC. The first dynamically disabled NPC. But I am having trouble getting her to move and talk. I had her follow a schedule at one point but now itās a mess Dx
I followed this tutorial (it was the most recent from November 2025 for 1.6 and the only one that told you step by step what to do!) and for some reason, my character was still not able to talk. I got her schedule figured out but then I tried something else and screwed it upā¦
Running patch summary keeps telling me everythingās and meeting conditions, but nothing is being applied in exception to gifts and dispositions. Dialogue and schedule they want an XNB which I donāt think you need one through content patcherā¦
I only once got it to say āNPC Implementedā or whatever, but they were still not able to talk at allā¦
Help???? (Been working on this for over a week including sprite art!)
https://stardewmodding.wiki.gg/wiki/Tutorial:_Making_a_Custom_NPC
I think Smapi thinks itās a Vanilla NPC which is why it wants an XNB file and doesnāt like the {{ModId}}_Rosalie in some of the targets, but if I remove it or replace it with my actual ID her name becomes my ID name with the underscoreā¦
https://smapi.io/json/content-patcher/7be7f28215bb49fb8b06c3e7c99ce2d5
https://smapi.io/json/content-patcher/7f523aad3e034eb1af538569d363a44f
https://smapi.io/json/content-patcher/7c731d4ef7344558b80ca0784734bdfb
https://smapi.io/json/content-patcher/8c07253d361e4d96ad97b9707f14ef55
imma throw myself in this river
speaking of that river...
do you have a assets/data/gifttastes.json file?
it's unclear through your post
I believe social NPC needs gift tastes for dialogue to work?
I do! I didnāt include it cause it did load and apply! Just those ones didnāt for whatever reason
can you post your log? everything looks fine at a glance
The patch summary from SMAPI?
i swear mod making both feels like something i want to try and one of the scariest things i can attempt. and that goes with making a mod for ANY game
your full log via smapi.io/log pls
Log found, uploaded to: https://smapi.io/log/b84b8d29017a4718b0a182cb7910cce9
strange, your dialogue file is showing that it's trying to load/edit Characters/Dialogue/Rosalie
did you reload and/or verify that you're editing the mod files in the Mods folder
I did DX
and is this after reloading?
im stumped lol
I just realized on the recent Smapi log i just sent, I took out the {{ModId}}_Rosalie that was in the originals for this one. Let me send them all at once hold on...
the target being {{ModID}}_Rosalie shouldn't be the issue
what do you mean by "dynamically disabled", out of curiosity?
I noticed that in both your sprite and portrait patches, the target is <characters or portraits>/Rosalie
(pls dont change your files between posting the logs)
(also i noticed that in the jsons you posted prior, your NPC's id is {{ModId}}_Rosalie but you're loading into just Rosalie for their portraits and sprites)
Didja find any others? I think Ifound some by the boat, as well as a few inconsistant tiles
@vocal knoll can you try the following:
change the target in your portrait and sprite patches to the following
Characters/{{ModID}}_Rosalie and Portraits/{{ModID}}_Rosalie respectively?
(if earlier you saw that your portraits/sprites weren't working and swapped out the NPC ID back to Rosalie but didn't change the other files, that would be the cause)
adding to this that when I started my npc making journey, I learned that you have to refer to your NPCs internal name as stated in your dispos in all instanced except for written text of course
So sorry I only realized after DX I've been on Reddit and a bunch of other places for a while but here's how it is when i run the otiginal!
LOG
https://smapi.io/log/b3f35fc64be747dbb6c93efcdcb5f055
JSON
https://smapi.io/json/content-patcher/e265784047184af6b02f421e168787eb
https://smapi.io/json/content-patcher/7be7f28215bb49fb8b06c3e7c99ce2d5
https://smapi.io/json/content-patcher/7f523aad3e034eb1af538569d363a44f
https://smapi.io/json/content-patcher/7c731d4ef7344558b80ca0784734bdfb
https://smapi.io/json/content-patcher/8c07253d361e4d96ad97b9707f14ef55
Log Info: SMAPI 4.4.0 with SDV 1.6.15 build 24356 on macOS Unix 15.7.1, with 11 C# mods and 1 content packs.
im using the vanilla water tiles, but it looks a little choppy, not sure why
I'll give that a try! The Disposition does say Rosalie on it though! I believe I put it in my logs there too!
you don't have to put the water overlay on your maps, it gets added by the game!
wait let me check againn(I'm on mobile rn so I'm a bit slow haha)
Log Info: SMAPI 4.4.0 with SDV 1.6.15 build 24356 on macOS Unix 15.7.1, with 11 C# mods and 1 content packs.
sorry just saw this!!
Apperently these palms on the islet are official
is there a wiki page that listed all event ids for events?. Also what does "{{FestivalOutfits}}" do? Saw it in another mod when trying to see what all event ids were for festivals. They had all but Night Market and Desert Festival
the thing i clumsily marked with a red circle is her internal name, meaning this is the unique name the game recognizes her as (this is a very amateurish way to explain it, I don't speak tech)
so every time you have to let the game know it's Rosalie doing something or being the target of a patch, you'll have to use that internal name
ingame, it will display as stated under DisplayName
{{FestivalOutfits}} is a token
hope my explanation made sense lol
and idk if theres a whole list but the unpacked files have them all
cool, thanks
void we even have the same pfp frame. we truly are a hivemind
a dynamic disability is a disability that can fluctuate its severity. ADHD is an example of one, but also someone with Chronic Pain. In the case of Chronic Pain, One day they may be able to do something with minimal pain, and the next maybe not and there may not be any cause for it other than their body being like "not today!"
Ah it's a characterization thing
lmao the voids everywhere indeed
I was like "were you going to delete your npc from the world every sunday"
Thank you! I'll give it a try!! hold on!
I think Ramp 2 is gonna be a Problem Ramp
I think it's gonna hit the most compatibility hell
Sunberry does festival stuff over there too
at least it's just for the egg festival
should I take out the {{ModId}}_Rosalie out of the rest of them? I feel like I did that once and it wanted the XNB files thinking she was vanilla and not a mod DX
any errors mentioning xnb not found can be understood as you didn't load that somehow
It says xnb due to monogame
same, that's why I asked lmao
the game doesnt know whether or not a character is vanilla or not
i suggest using {{ModID}} every time you target her for example
ModID + her name of course, not just ModID on its own
okay except in the disposition where you marked it?
No it also need to be done there
except for display name in the dispos
Nono
The circled one needs to have the modID
that was just a demonstration circle
"DisplayName" needs to be Rosalie, the one above it needs to have the ModID
yes, like that
dont worry, i was super confused about it in the beginning as well
so do i remove it from everywhere else other than in the disposition?
That is the opposite of what you want to do
think of it like this...
your discord name is tisnessie
your display name in here is nessie
but for discord to find you as you and not any other nessie, it will use tisnessie

yes they are
nope, was busy doing this one
okay I totally thought I had it everywhere though originally DX
You want everything to match {{ModID}}_Rosalie EXCEPT the Display Name in that one spot in Dispositions.
so for the game to make sure it finds the right rosalie, you have to use {{modID}}_rosalie
in targets, in event commands etc
i dont think you had it in your portrait and sprite patches though
yup, have you changed these already? the other patches seemed fine
Log Info: SMAPI 4.4.0 with SDV 1.6.15 build 24356 on macOS Unix 15.7.1, with 11 C# mods and 1 content packs.
Oh and this one
I did change that one yes!
if the game cant load the portraits and sprites, it will not load the character
Did you change the targets for sprite and portrait?
I did š
Okay cool, just making sure
one sec I'll reupload the data I'm looking at from that smapi log i just sent
Hi everyone... I solved my earlier problem, but I'm wondering now about light sources... why does my light source not seem to take on the colour I assign it? The radius is definitely correct because its smaller than what I assign it but the colour is completely off. To make things more confusing, the colour of the light sources for e.g. fireplace in the game is blue but appears white-ish. Can't grasp what's going on...
Alright, I think with everyones help, The new version of Modest Maps Ginger Farm is ready! Thank you all so much for keeping me humbled! xD
Gonna go post the new version to nexus now
Ah, I see, it's because of the texture? And the colour parameter in the LightSource constructor does nothing?
@ornate locust @merry river
https://smapi.io/log/44502bea79c94d1bbf58c36b5e2e433d
https://smapi.io/json/content-patcher/d93cd16266a24f618d8711a9ee3fbef3
https://smapi.io/json/content-patcher/e5bdbbf9548b40329a863cbafc81f471
https://smapi.io/json/content-patcher/ec5b9da60f3e434495ce15c429458708
https://smapi.io/json/content-patcher/4970ac2a6c4d4a138b194dcbdf824571
https://smapi.io/json/content-patcher/d0cd6c08dc56401c833a68e3a6a6f6ee
Log Info: SMAPI 4.4.0 with SDV 1.6.15 build 24356 on macOS Unix 15.7.1, with 11 C# mods and 1 content packs.
light colours don't work how you'd expect
for example, take a look at Firefly.cs, which uses a light with the colour Color.Purple * 0.8f. clearly this is wrong, since fireflies are green, but given SDV uses subtractive lighting we're actually providing the inverse of green.
It doesn't do nothing, if u look closely at your image the middle is green
likewise, several furniture items can be found using Color.Black, which emits a pure white light, such as with fish tanks
It just does less than what u want if that makes sense?
But the Color I set it to is red - new Color(138, 27, 0 - not green
Hmm
Thanks, this is helpful
if you're confused about radius that's actually misleading as well, since it's a decimal multiplier applied to the size of the light sprite that's otherwise rendered at default size (the size of the source light sprite)
The radius is ok thanks, I only mentioned it as proof to myself that at least something was working(:
Yeah and white subtracted red is like green
@scarlet warren and the vpr map overlay for all seasons
Thanks folks, I'll try setting it to the inverse and report back
so in order to get the colour you want, you'd generally just subtract your individual RGB values from 255
oh nice, there's also a Utility.getOppositeColor() method (which does exactly that (somehow i thought it'd be an extension method on Color but utility holds the world in its hands))
have you launched the game with your mod since changing the name?
Also does your blank JSON have {} in it?
Works perfectly!! Thanks for saving me the headache
@merry river @ornate locust Okay, update! the "apply" is still not on the smapi log, but I decided to check and see if she works anyway. She is walking around and talking (though I need to fix my portraits lol) but now it says I gave her a gift and i didn't??? haha (Thank you again for helping btw omg I've been appreciating all the help so much!!)
no problem! catches everyone once hahah
she also somehow made it onto my farm lol
HUH
she literally stopped walking, i walked away, came back and she decided to just chill here xD
pronbably a coordinates issue
ah you probably have to sleep for a night for her schedule to load properly
i'll give it a try!
funny that she shows up on the farm of all places though
What does that.... mean?
You're a saint
Im so bad with pixel art
Would you allow me to add this to my mod?
okay so she walked, i guess gifts are just infinite now cause I had one rock and it was like "yeah you gave her one" but it's still in my inventory and now she's just frozen in place at the bus stop xD
i'm not exactly sure why Smapi is saying nothing is applied still but at least she's in the game???
Yeah thereās still something wrong, let me skim over your files again real quick
at least sheās at the bus stop haha
maybe I did something wrong because they dont seem to be loading
hmm, do your tiles have the Water property? they should if you started with a copy of the beach map but maybe it got deleted
Stupid question because i currently dont remember, is 0 a category or a specific item?
I lied she's back at the farm xD
I didn't pick anything specific myself i think i copied and pasted it from something else?
Oh wait
I'm gonna change her coordinates to something else for the bus stop so she can stop going to the farm lol
Remove the āloveā, ālikeā etc text from the gift tastes
is there a way to see the properties for the individual tiles? I've only seen the map properties and the layer properties
The formatting doesnt seem correct, let me look at my own mod for reference
if you go into the tileset, you can click on a tile and then view its properties. let me see if i can find a screenshotted guide
yeah that gift taste formatting is wrong
tia has an example on the npc tutorial tho
"{{ModId}}_WrenSong": "You're awesome, @! Is this where I tell you you're a goat or you slap?/444 112 122 167 403 404 440/Thanks, @! I'll put this to good use./248 279 286 287 288 334 335 336 337 338 396 399 787 917 372 428 -12/I appreciate the thought, but uh, this isn't really my thing./196 219 225 202 209 tiakall.bass.seabass/@, I feel like you really had to work to find something I'd dislike this much. This isn't appropriate to give to anyone, you know./747/Thanks for thinking of me, @./446 746 766 -7 -8 -9 -10 -15 -16 item_alcohol/",
that said i always found the way gift taste is set up confusing ngl
same
oh I see tysm!
I'll give that a shot if you don't mind me using the same tastes and everything! I'll change it of course once it's all in order š ā¤ļø any idea still why Smapi is like "yeah we're not applying anything"?
Because the gift tastes are not formatted correctly and a social npc without functioning gift tastes is a lost little lamb
At least thats my guess
could also set the nopc to non sociable for now to see if it otherwise works
Yeah go ahead, I doubt you want you npc to have eggplant and banana as standard gift tastes anyway 
it's so weird cause they actually did apply with the dispositions but everything else didnt' DX
I just realized you use i18n DX I do plan to use it but i was gonna later once I get used to the whole modding thing without bugging kind people on Discord š
yeah dont worry about it, you can replace the entire i18n with an actual line of dialogue (just change all of them to somethjng simple for now)
So, I might have a habit of trying to learn things much too complicated for my pea brain. If I were wanting to start learning and working with content patcher, smapi, and AT, would it be better to start making patches for other peoples work since the code is already established so I can see something already finished that just needs to be updated or tweaked (with author permission)? Or would it be better to get into this by trying to make something from scratch? Either way Iāll be reading the documentation Iām just curious where to start since Iām a baby
"{{ModId}}_Rosalie": "YAS! I love this!$1/155 91 272/ Noice! Coolcoolcoolcool!$0/348 430 445 454 432 64 637 814/ Ex-queez me? What's this?/342/ No./109/ Cool thanks./205"
I'm gonna assume this is the right format? lol
yeah should be correct!
Does Night Market and Desert Festival not count as festivals proper? Looking for unpacked data in the files "festivaldates" and under the folder data/destivals and found nothing for them. Moderately confused now
Doing a Seasonal Outfit mod and had some outfits made for those two. Was trying to see a good way for them to be used. Maybe just use day and location instead of is_event?
A little progress! Still something's wrong DX https://smapi.io/log/0cacdd71ac8d433ca0dd1aabb461050b
She is also no longer going to the farm, but not listening to what position she's supposed to be in (I put 0 but she's doing 8 lol)
Log Info: SMAPI 4.4.0 with SDV 1.6.15 build 24356 on macOS Unix 15.7.1, with 11 C# mods and 1 content packs.
use IS_PASSIVE_FESTIVAL_OPEN and a location query
(or IS_PASSIVE_FESTIVAL_TODAY)
the day can be changed via mods even just with content patcher so better to not rely on it if possible
technically the location can too but very much not as easily and i cant see why someone ever would
(sorry just trying here since it didnt work in the other channel)
ok why isnt leah publishing it
you have to right click>apps
maybe she's down
taking a nap ig
actually why are some of these things being checked twice like the dialogue and scheduleš¤
watch her wake up and it get published five times
nvm i got confused because the formatting is all botched on mobile
oh god i pray that doesn't happen
all good lol i was confused as well!
have you actually slept after testing her again
I have her on day 3 yes and I restart the game after changing her code
(also sleeping irl can be helpful if you've been at it a while LOL)

I also guess I made her pixel art too smooth for the back š¤£
Same š
cough cough... i know your timezone 
Gifts are working fine now though! So progress!!
yay!
i love the animated hair though!
damn claude found me
heyy, i'm trying to figure out how to add sound effects to a schedule animation so i'm looking at the game's decompiled code for reference. i found this for when clint is hammering at the forge, but i'm having trouble figuring out what the line before the break is referring to
case "clint_hammer":
base.extendSourceRect(16, 0);
this.Sprite.SpriteWidth = 32;
this.Sprite.ignoreSourceRectUpdates = false;
this.Sprite.currentFrame = 8;
this.Sprite.CurrentAnimation[14] = new FarmerSprite.AnimationFrame(9, 100, 0, secondaryArm: false, flip: false, clintHammerSound);
break;
same! I wanted to still make her dainty even though she's plus size and disabled ;P
i'm not sure what the 14 is for, and i also don't know why it's looking at Farmer animations
(OHHHH that is such a cool idea!)
aaa love seeing rep in SDV :)
I'm loving you Claude so far xD
aww 
Thank you
nessie can you send me the schedule json again??
i hereby declare claude the modding channel's mascot
I'll send what I have now š since I changed her position and where she stands at the bus stop
i have no real sway over this server i dont even get mod publisher roles, but i do declare that anyway
yay! my life being a comedy of errors has finally paid off 
"my life being a comedy of errors" i'm stealing that
wait what's the "default" key
"spring" is the default for everything you don't define
oh yeah i think you're gonna wanna change that to spring?
thanks! hopefully i'll be to get it work 
heh you won
clint_hammer's frames is defined as 8 8 8 8 8 8 8 8 8 8 8 8 10 11 9 8, with entry 14 (starting from 0), 9, being the hammer down sprite
I'm hoping that people will love Rosalie and her story as much as I do, but also, I'm hoping my ADHD will allow me time with her long enough to will her into existnace... and that Yoba will allow me to let it happen with the Smapi and CP gods xD
so that line of code is "replace Clint's animation frame 14 with the same frame (9), but with the sound added (the last parameter)"
I'll remove that ASAP XD
also relying on my AuDHD to finish this mod for me 
not a very reliable worker but it's fun
(it's a lil bit of hardcoding since animationDescriptions doesn't support sound)
as a fellow adhd haver i can only share my personal experience that is: output on screen -> dopamine rush of doom -> motivation remains
also do delete the default key in your schedule and try reloading the patch
When using the code
"Action": "EditData",
"Target": "",
"Entries": {
you don't need to include everything from the original file right? you only need to include what you changed or added right?
yes (and indeed you shouldn't since that means you're telling CP to also edit those entries)
okay cool thank you
if you're replacing everything in that file what code do you use?
I think Spacecore can be used to do this without having to code
It can do that and bigger schedule images (also like Clint's hammering)
oh yeah SpaceCore supports bigger schedule animations + sounds
god i love frameworks
ohhhh okay, i get it now. i assumed it had something to do with one of his hammering sprites, but i wasn't sure how i was supposed to be counting it
what about the stuff with the Farmer frames? would i need to include that in my code too?
Spacecore is so handy
are you using C# for this 
unfortunately, i had already started playing around with C# and making extended animations myself for my mod before i learned about spacecore
Like the defeated feeling I had when realizing I couldn't just copy Willy for a fishing animation, poof, gone, Spacecore had me
otherwise I'd just use SpaceCore yeah unless you don't want a dependency
I too have AuDHD 𤣠Rosalie does as well š
since i already took the trouble to make the code myself, i figure i might as well stick with it and keep trucking forward the hard way lol
Fair enough
i wish i could make frameworks myself
She did go to the bus stop and did this and know sheās here as scheduled but also š
all hail framework modders āØ
do we have a guide for setting up terrain sets in tiled? i'm hoping to automate drawing one thousand ceiling tiles
did she sink into the ground?!
No no that's how she's designed xD Though on the mod NPC Maps only half her head shows xD
also here's the latest Smapi log https://smapi.io/log/6a48ea53d435444cbfa278184bcff964
Log Info: SMAPI 4.4.0 with SDV 1.6.15 build 24356 on macOS Unix 15.7.1, with 11 C# mods and 1 content packs.
wait whats the issue then
she's not in the right pose (doing pose 8 instead of pose 0) and Smapi is still saying stuff isn't being applied DX
what is pose 8
Pose 0 is her facing us, Post 8 is her turning around on my sprite sheet lol
poses arent a thing like that. did you put 0 for her facing up?
so according to the tutourial i found the format for schedules is "Time MapName Xcoord Ycoord Facing Animation StringDialogue"
0 is her facing down
ohh in the schedule coordinates you use 0,1,2,3 for the directions
yes xD
0 is up
it has nothjng to do with the sprite indexes
so the way you defined it, shes doing the right thing
it has nothing to do with the position of the sprites
when do i use those numbers then xD
a 0 for the facing direction just means she will be facing up. so it will use her facing up sprites
but you're not choosing which sprites to use, the game just knows which ones to use bc it knows which way shes facing
doi the tutoural says it too in the description lol
for animations, except that the first four rows are usually recognized by the game automatically for walking
sorry, ignore that second question, i ACTUALLY get it now lol
blast the audhd DX
okay, last mystery, why the hell does SMAPI not apply my stuff DX
uhh not sure about the dialogue
does she say anything
stuff is not applied unless it needs to be used. did you attempt to talk?
she does! so no idea why it says it's not, i'm too scared to change anything for her dialogue just in case now DX
There, Person, Leah lives and the mod is published
Slow Leah.
slowleah but sureleah
Well, in any case, thank you my fair modders... i MAY also be making a walking animation for Dusty since Rosalie MAY become Dusty's dog walker so i'll probably be back after all this... and she may become a mermaid for the night market... and may have multiple paths for love interests... I'm way over my head 𤣠but thank you again, may Yoba smile upon you this fine day 
(unless someone already made the dusty animations and I need to chat with them xD)
just started making the mod and is already being scope crept
good night it's almost 2 am here and if i dont go to sleep, claude will find me
i will 
Thank you again so much!!!
Hmm, Adopt Dusty mod. 
Tell me more!
oooh-
one sec lemme dig up links
She won't adopt Dusty but she's gonna walk him since Alex is too lazy clearly xD
HMK needing a pet integration
i debated having her related to Alex but i REALLY don't like him š
Ah, I'm considering an Adopt Dusty mod for when the player is marrying Alex. 
There's a mod that lets Dusty move in if you marry Alex IIRC
Don't know if it still works though
I never marry Alex but I would so play it!
ooh that is so fun!
This one's got open permissions and a full walk cycle
Technically you can do it as is. Not going to behave like vanilla pet, but can excise all the stuff about him being a "child".
https://www.nexusmods.com/stardewvalley/mods/13057 this one has Dusty moving in if you marry Alex
I have used them both at points, though I never married Alex, I just used it for the other stuff
Thank you!!! š Now i just gotta figure out how to do i18n and how to replace her as the mermaid for the night market event... and "if/when" stuff...
i havent looked into hmk yet because the kids aspect doesnt really appeal to me but if it can be used to adopt pet npcs i might have to bother chu. maybe
Kinda non ideal because you need to buy a dog house, though and he just becomes a moving map tile.
Yeah, two cakes, of course. Just for now if anyone wants that feature
always love a good option
void i will find you, as per your statement
okay i'm going to sleep for real now 
Basically you can customize all sorts of things. You don't need to formally adopt the kid, or go through bithh event, or need a crib. You can just put a trigger and voila, pet joins your household.
+1 on recommending hmk purely because of how easy it was to write renaming integration for it (which means the code is good and you should use it)
(Update: I have an automatic build workflow for mod repos down to only 48 lines of YAML, once I publish the custom GitHub workflow actions.
That includes automatically...
- setting up reference assemblies;
- setting prerelease version numbers for non-release builds (optional);
- building the mod projects;
- uploading the release zips as build artifacts;
- and creating attestations for them.
See example build run, with downloads at the bottom.)
Nice, outside of attestation (and by extension the remaining permissions) that could also be used for running on PRs to test that it compiles and test passes
(Updated to support PR branches!)
hii, did you ever get to say hi in dms : (
Hey can someone look at my smapi mod and tell me what I did wrongš
https://smapi.io/log/bdd6db04a8234f6bb9309b983415b9d6
Log Info: SMAPI 4.4.0 with SDV 1.6.15 build 24356 on Windows 10 (10.0.19045.0), with 7 C# mods and 2 content packs.
!json uh, I think we'd have to see your .jsons for that!
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.
yeah seems like your json is malformed
---> ContentPatcher.Framework.Lexing.LexTokens.LexFormatException: Reached end of input, expected end of token ('}}').
you have forgotten some closing braces in your tokens i think
also, NSFW mods are not allowed on here, if that's the sorta mod you're making (judging by mod ID lol)
am I missing something? dark romance doesn't sound nsfw to me
(could be yandere though which falls under the server's nsfw rule)
hmm do you think it's because of this
"Action": "Load",
"Target": "Maps/WoodsTemp",
"FromFile": "assets/WoodsTemp.tmx"
also no it's not NSFW you don't have to worry it's pg
you would need to send the entire json uploaded via the link in the governor command
not a json snippet
just post it on the json parser, it'll tell you the errors
okay I'll do that
I validated the JSON but it's still giving me errors https://smapi.io/log/d46dca8132ea4aff952de28207e136f7
Log Info: SMAPI 4.4.0 with SDV 1.6.15 build 24356 on Windows 10 (10.0.19045.0), with 7 C# mods and 2 content packs.
we won't be able to help you more unless you give us the link to the json so we can see it
I might've figured it out but if I didn't I'll send over the json
I fixed it but thank you for your guyses help
How does this look for an ooutfit for the desert festival. Using advice given by Button but want to make sure not missing anything. Json validator didn't throw any errors which makes me nervous
"TargetField": ["Penny", "Appearance"],
"Entries": {"{{ModId}}.Penny.DesertFestival": { "Id": "{{ModId}}.Penny.DesertFestival", "Condition": "IS_PASSIVE_FESTIVAL_OPEN, LOCATION_NAME TARGET Desert", "Sprite": "Characters/Festivals/Penny_Desert_Festival", "Portrait": "Portraits/Festivals/Penny_Desert_Festival", "Precedence": -1100, },
you haven't told the gsq what passive festival you're trying to check
the dialogue stack empty issue continues to haunt me 
but also quickest way to find out if it works is to see if it works
Log Info: SMAPI 4.4.0 with SDV 1.6.15 build 24356 on Windows 10 (10.0.19045.0), with 104 C# mods and 227 content packs.
Suggested fixes: One or more mods are out of date, consider updating them
does this log at least imply you can reliably reproduce it or is this another person's log
in this log i can see that
- the game rolled having kid with Wizard
- HMK loaded a question (in russian) and pushed it to the dialogue stack
- 9s later the actual dialogue draw starts
- HMK sees that Game1.currentSpeaker.CurrentDialogue is empty and tries to push a new Dialogue to the stack to attempt to avoid crash
- it doesn't work and the ThrowForEmptyStack happens anyways
no i had zero luck reproducing it that's part of the hauntedness
my hope was that if it was empty stack i'd at least push something to make it not die but now i have no idea what is even throwing anymore 
do you have a link to the relevant code handy for a mobile-bound lass such as myself
yea which part r u interested in? or i can link all the bits i mentioned thus far
The patch of yours that's highest up in that stack trace
I can probably find my way around from there just too lazy to navigate to Nexus and then the repo and then search from my phone
this wasn't actually there in hmk 1.0.0 (where radical had the problem), i added it in attempt to mitigate and debug the issue
the reason y i hope this would mitigate is cus inside the method there is a currentSpeaker.CurrentDialogue.Peek()
oh and here is the bits supposed to queue up the dialogue https://github.com/Mushymato/HaveMoreKids/blob/main/HaveMoreKids/Framework/NightEvents/HMKGetChildQuestionEvent.cs#L32-L61
ok never mind mobile sucks for this and I don't have the decompile anyway
protected void drawDialogueBox()
{
if (currentSpeaker != null)
{
int val = (int)dialogueFont.MeasureString(currentSpeaker.CurrentDialogue.Peek().getCurrentDialogue()).Y;
val = Math.Max(val, 320);
drawDialogueBox((base.GraphicsDevice.Viewport.GetTitleSafeArea().Width - Math.Min(1280, base.GraphicsDevice.Viewport.GetTitleSafeArea().Width - 128)) / 2, base.GraphicsDevice.Viewport.GetTitleSafeArea().Height - val, Math.Min(1280, base.GraphicsDevice.Viewport.GetTitleSafeArea().Width - 128), val, speaker: true, drawOnlyBox: false, null, objectDialoguePortraitPerson != null && currentSpeaker == null);
}
}
i patched this thing
but yea idk ill move on to force closing the dialogue (which may not help given that pushing new also didn't help
)
So, no spoilers as to what Iām doing yet but Iām commissioning art for my first mod!
try Push() instead of AddItem?
alternatively are you sure that CurrentDialogue itself is not null?
Iāve got a few weeks to think up ideas for the mod and I was wondering: is there any way to make trees kinda function like a paddy crop? As in, grow a bit faster near water or something?
Or even generate water in tilled soil around it
it'd be a NRE in that case 
I only ask because I believe Kaya had a mod like that yeeeeears ago where a scarecrow made paddy crops
im actually not sure it would be
public static IEnumerable<T> AddItem<T>(this IEnumerable<T> sequence, T item)
{
return (sequence ?? Enumerable.Empty<T>()).Concat(new T[1] { item });
}
but mitigations aside, im still unsure why this is even happening in the first place
This may be a dumb question, but I even used a template and my portraits are still either not working or really off DX I made sure they were 64 x 64 and they don't touch each other but it's still doing this... Any tips? (photos are of the faces before I made sure they weren't touching and after and the template i used (I really hope no one steals my OC cause i love her too much DX)
Can someone either explain/tell me the code I put into Content to replace these, or link me somewhere I can learn how?
CurrentDialogue can be null in some cases
@nimble karma so sorry I didn't mean to hit Reply!!
it should become not-null when you try to use it but it may not be
this looks normal to me
due to some other mod interaction perhaps?
yea since i have not been able to reproduce i guess it's gotta be due to some other mod right 
the other portraits are moved in the "or was it months..." photo and some faces don't work
Youāre fine! Iād help but I know nothing about the art side tbh š
and since i think that Harmony AddItem extension method wouldnt NRE if it was null i think thats why your fix just isnt doing anything
i cant think of another reason
all good xD neither do I i learned how to do this like over the last few days !
ah u mean this bit then, i wasnt sure what to look for
Do you have the grid turned on in your art program and set to 64x64px?
(though im also not sure how Concat works necessarily under the hood, i dont know if you're supposed to be doing CurrentDialogue = CurrentDialogue.AddItem(thing)
yea ig that would explain why no fix at least 
since that extension method returns the enumerable itself
but concat'd with the other thing
it do look like game uses Push for this so ill change that
if concat changes the original collection reference itself thatd work regardless but i dont know if it does
i still wonder why it is become null at all since im positive i pushed something to the stack 
there are some times even within vanilla code when it becomes null
its supposed to never be null when you call its getter though, so im unsure
I did when I made it, but i had to arrange it somehow together. I even used Hayley's and other portraits to use in the background to make sure they were in the right spot
I don't understand what you mean. You should have the grid on while it is "arranged together".
yeah sorry I wasn't more specific lol!
but would null CurrentDialogue lead to ThrowForEmptyStack
(i think its probably also worth at least testing chu whether AddItem does actually need you to reassign it to itself, not just call it)
Like this (using Clint as an example) so you use the gridlines to know where each portrait should fit.
maybe if somehow between your code and the games code its make-not-null code stuff ran? idk
When I made the portaits individually it was 64 x 64, but when I put them together onto one full picture, it didn't work
well again this additem bit didnt even exist the first time i encountered this problem
yes!
so while it is indeed not fix anything i dont think it's root cause
im not saying the additem caused the problem i meant for checking why it doesnt fix it
bc if changing it does mitigate it then that would imply currentdialogue is null to me
which would be good info to have for debugging
bc at least then you'd know what to look for
Then you have put them together incorrectly. Have you got your grid still turned on so you can check each portrait? (Inside the single image, because you shouldn't be using individual images per portrait)
its not much but do you have a better lead
hm so do u mean find out like
Stack? something = null;
something.AddItem(...);
// is something null here???
ill go try it 
i just meant like do a quick unrelated test with some random Stack you made yourself just to see if calling stack.AddItem(thing) to it, and then looking inside the original stack, to see if that new thing is there
it is indeed empty
because if you need to reassign it to CurrentDialogue and not just call it as an extension alone, then that means you're just creating a new Stack and leaving it dangling
skem
which means CurrentDialogue is then going to be null after your prefix still
which is when it would then become not-null, but empty
because whatever it loads when its getter makes it no longer null returns an empty stack
if Game1.currentSpeaker.CurrentDialogue is null though
its null at the time of your prefix
shouldn't Game1.currentSpeaker.CurrentDialogue.Count die first
hm
given the set of load/edit beforehand, i do think it made it into the return Game1.npcDialogues[base.Name] = loadCurrentDialogue(); branch
okay then yeah its probably not null then
were you using AddItem elsewhere to do the original adding though
hmmm
no i used game methods
spouse.setNewDialogue(dialogue);
Game1.drawDialogue(spouse);
originally i thought i was determining the dialogue wrong and getting something empty but im fairly sure that is not the case at this moment
i think it is the invalidation actually
cus i seen that in other cases where it die too
well it cant be empty after your drawDialogue
what probably happened is
- HMK has night event, does setNewDialogue which itself does CurrentDialogue.Push
- In the 9s between, CP requested invalidate, which yeets
Game1.npcDialogues, the backing field of CurrentDialogue - dialogue tries to draw, dies
3 is just me doing art, I try to draw and then die :V
if i use TemporaryDialogue it might not die??
why does it take 9 seconds to go from calling Game1.drawDialogue(spouse) to it actually trying to draw
probably bc content patcher wanted to invalidate a bunch of assets
Nine second stutter??? I missed that, jesus
it could also be quirks with farmEvent?
it also only invalidated 10 assets, half of which are just dialogue assets
i do in fact wait 1.5s before doing anything bc thats just how the original night event worked
Oddly, the outfit part for desert festival is not working. Tomorrow I'll try if just doing by day and location works. Unsure what I did wrong with festival, but if finesse fails, that brute force will have to suffice hopefully.
Oddly Smapi didn't throw any errors, so I assume is not a typo or such
https://smapi.io/log/6e0ce446d75a45b38eec2bd94eedd7e2
https://smapi.io/json/none/1e92792ac32a4b1d89712128d94e2352
https://smapi.io/json/none/bb7b008066b2423190fae6e96edc67eb
Log Info: SMAPI 4.4.0 with SDV 1.6.15 build 24356 on Windows 11 (10.0.26200.0), with 39 C# mods and 44 content packs.
Suggested fixes: One or more mods are out of date, consider updating them
meaning here is setUp is called first and then tickUpdate is called at some unknown time later
that much was true just from lookin at the stack, where the error stems from the base draw loop and not your setup function, which also uses peek and so would crash there if it was empty there
(or would throw i mean)
(drawDialogue(NPC) uses peek in it)
yea hm
does the vanilla game use the Spouse for holding the adoption/birth question?
nope this is specific to hmk
how does the vanilla game do it
vanilla doesn't show a portrait
so it uses drawobjectdialogue and none of this is relevant
i thought it would be cute if your spouse asked you 
may i ask why you are using the spouse itself though
and not just creating a dialoguebox that uses their portrait
i think it was just "well i have them" kinda deal
smapi asset propogation: like hell you do
but yea assuming this is what has occured i don't have them and should just make a dummy speaker 
thats ok i suppose
i think the easiest way is a dummy speaker yeah
just use a different drawDialogue() overload
well i can make them and then use TemporaryDialogue without worrying about cleanup right
since i discard them very quickly after
probably
im not familiar with TemporaryDialogue so i wont give it my blessing
but you have my blessing to not need my blessing
how can i reproduce this hrm 
set some kids dialogue entry to {{Day}} or w/e
maybe i just call invalidate asset myself to see what happens
you wanna make sure you reproduce it with the CP timing though
true enough
problem solved! The template I was using from another modder was wrong xD I just put squares that were the correct size behind and boom done! Thank you!!!
yea it'd be ur wife/hubby/spaghettimonster
You should always use vanilla assets as your basis rather than starting from something created by other people. As you just found, you can't be sure they'll be accurate to the game.
that's the weird thing I did originally but I needed to know where it started and ended on each side ... curse my overthinking brain xD
at least you also learned about AddItem chu 
harmonylib skems
yeah ngl as soon as i thought "wait where is AddItem even from" and saw it was Harmony i was a bit dubious
You only need vanilla assets to be able to find that out...by using the grid.
Open a vanilla asset, set your grid so that it evenly encapsulates the entire image with one frame per grid square, and then you will know that's the grid size for you to use as well.
Hello
hrm the reproduce attempt didn't work
as in i didnt get a cp invalidate at this timing
maybe theyre using TimeChanged?
they do have a lot of dialogue related mods
not impossible that one of them invalidated
IIRC NPC appearance data only fires when the NPC changes location. So presumably Penny is already at the Desert when the clock turns 10 AM (when the festival opens). Can you try using IS_PASSIVE_FESTIVAL_TODAY instead?
Ridgeside and mountain ramps done, with appropriate variants and SVE, Paved Valley, and Downhill compatibility. Because those were the easy ones LOL
(Downhill shows the Ridgeside cable car area in an inaccessible area to tie it together, I put the ramp over there too)
Overlay for both files with a HasMod query for vibrant pastoral
https://github.com/Pathoschild/StardewMods/blob/stable/ContentPatcher/docs/author-guide/action-editimage.md
I stare at IL for 8 hours and realize
I can just edit Stardew Valley.dll file manually with hex editor
Thanks for talking to me
I know that there will lot more issue in the future
But it works for now
I use this mod alone anyway
I completely give up on transpiler
Do I need to specify if I claim something on the mod idea list? If so do I just leave a comment or do I ping tiakall?
i think a comment is enough, and then a link if you release something
this way, other people interested are aware, but i don't think there's exclusivity of any sort on the ideas anyway
oh where is the mod idea list? is it the one on the modding wiki? š
!modideas
If you have a mod idea that you aren't planning to make yourself, you can put it in the mod ideas github: https://github.com/StardewModders/mod-ideas
However, this does not mean anyone is guaranteed to work on your ideaāmodders who are looking for ideas sometimes go through and work on what they find interesting off this list. If you want to pay someone to make your mod idea, there are a few people who do commissions (mostly art, sometimes code); you can ask around, search usernames for the word comms, or see !commissions.
iāve got so many mod ideas but iām going away for a week so i canāt do any of them 
https://stardewmodding.wiki.gg/wiki/Tutorial:_Making_a_Custom_NPC Iām trying to follow this tutorial, but I still canāt get it to work ā the order of the steps is confusing. Iāve tried looking at other playersā mods, but thatās even more confusing because they donāt follow the same order either. 
Look at the vanilla game files and try to replicate a patch from that. Thatās what I do at least.
anyone know of other good resources for learning to mod sdv with smapi/c#? the wiki is just not doing it for me. i need more examples, and hopefully less ambiguity between the content patcher and the smapi guides.
i've been able to do a few things but i'm hitting a wall and would prefer not to constantly ask for help
There isn't much to know about SMAPI other than what the API reference lists in the wiki, since it's in C# you can do whatever you want, a guide doesn't make much sense since it won't guide you to make what you want to make
looking at other mods has helped, but it doesn't really teach me why certain things work, and often what i'm actually trying to learn more about is buried under so much other stuff
yeah, looking at other C# mods is not very helpful outside of very specific features
don't hesitate to ask around about stuff btw, asking more question when I started making FF would have saved me hours of useless refactoring
i've seen some of the lists youre talking about, i think, but they don't cover everything and oftentimes i have no idea how i can use them
like currently i'm trying to figure out how to define a new item. the item wiki page tells me how to do that with content patcher, and how to create an instance of an item, and lists a few item categories. i have no idea what to do with this information. i'm assuming i need to add an item to the registry then create an instance of it, but i have absolutely no idea how to do that first step ajasdfkldfhkdlf
is it just becuase i'm inexperienced with c#?
yeah, seen that
ive seen the content api but still dont understand arhgjghk
is there a custom quest board framework?
You will probably need to be more specific about what is not working for you and how for us to be able to help.
to add an item, check the Content part of the API, that's an easy thing to start with
hold on
First victory: my map and my character appear. Now Iām going to try to move forward.
this is the important section: https://stardewvalleywiki.com/Modding:Modder_Guide/APIs/Content#Add_a_new_asset
Basically, adding an item means adding its data to the correct asset, the idea is that when the game needs to load the list of items, SMAPI intercepts the list when it's being read and lets mods (and Content Patcher) edit stuff into it, so that when the game receives it, it has new/modified items in it
but don't item entries have like .. how do i put it .. nested keys? like you have the id as a key, then within that is a series of entries each with a key and value..?
to know what to put in the list of items, that when you need to look at what the item data looks like, so you can look at examples in the game's content files (if you extracted them with stardewXnbHack), and cross-reference that with the wiki page that explains what everything means in the item data
for that you simply need to instance the item data in C# by using the actual class provided by the game
it's true that the wiki doesn't show this properly
can i just
return new Dictionary<string, string>
{
["Key 1"] = {
["Key A"] = "Value A"
["Key B"] = "Value B"
}
};
or is that stupid
it's not stupid, but it's not the way to do
OH ok so create just the item basically as an empty entry, then fill it with information when i make an instance of it?
like .. <StardewValley.Object> or something maybe i dont know
you want to use Dictionary<string, Item> and actually define an Item instance
actually, it's probably not Item directly but its data, and I don't know about that, so lemme check the wiki
They're typically not actually dictionaries
That's just what json did with them
oh yeah, it's ItemRegistry in this case, right?
I'm just used to Furniture and ShopData which are much easier
ive been able to use itemregistry to spawn items
DataLoader is the easy way to find the types for most stuff in the content Pipeline, with Data/Objects being Dictionary<string, ObjectData>
You can...and many do...make all their items in CP and just define the special behavior in c#
and for the most part, when it comes to stuff that you can do via content pipeline, learning how you would do it via content patcher is a good first step towards knowing how to do it in C# anyway directly via the AssetRequested event
aw i rly didnt wanna use content patcher
tbh it's seems that the part rue is struggling with here wouldn't be helped by knowing how to do it with CP
i have also already used cp
i think its a combination of minimal c# experience and not understanding the given documentation
i always do this to myself ughhhhh
oh! didnt see this. i assumed from the structure
There are a million more examples for CP
and a million examples and tutorials that dont specify, then i open them and its cp
Here's how you'd add a generic item with SMAPI, with the wiki's example and what I did for FF as a base:
private void OnAssetRequested(object sender, AssetRequestedEventArgs e)
{
if (e.Name.IsEquivalentTo("Data/Objects"))
{
e.Edit(AddObjects);
}
}
void AddObjects(IAssetData asset)
{
var editor = asset.AsDictionary<string, ObjectData>().Data;
editor[$"{Manifest.UniqueId}_my_item_id"] = new ObjectData() {
// Define your object' fields here
};
}
for nested fields in the object data, you need to use other SV data classes, I find that the best tool to know what to use is intellisense/autocomplete: if you setup your IDE correctly, it knows what the properties of ObjectData are and will tell you what classes to use in the right place
thank you so much, that actually makes sense
happy to help! it's going to be a bit of a trial to get used to how everything works, but once you get it, it's pretty easy to get stuff to work.
Remember to prefix your item
Anyone can edit either wiki
$"{Manifest.UniqueId}_yourthing"
might add a section listing which data asset are which data type, it might help
oh ! i like that
(thank you sm)
sadly, it's how C# is that you have to learn a lot by yourself. It is possible to make guide for CP or other frameworks, but in C# you need knowledge and autonomy more than guides can cover
yeah .. thats okay, i do like learning
yeah, it's a lot of trial and error, but a good code editor will save you a good chunk of the "error" part
FAFO as they say
VSC's "Go to definition" is often enough for me for data tbh
I like having it in a folder to ctrl+p
speaking of which, as someone who has never dabbled in c# before: how complicated would it be to add custom behavior to a custom item that has already been defined in CP? There is one item I added that I wanted to have similar effects as the stardrop tea but I shelved the idea because said effect has been hardcoded into the game
I was wondering if that's a good starting point for learning C#? or am I underestimating this
item extension and spacecore (and probably others) are having custom effects for items, so they may provide some examples/guidance
depending of what you want to do there's a bit that can be emulate in CP and gift reaction, or you may want to look at how the code deals for the unlimited gift part
iirc spacecore didn't have what I needed, haven't checked item extensions yet but this would require me to add another dependency for just one item hmmm
will have a look at it anyway
i'm not suggesting you add them as dependancy but that you learn from their code about how to add feature to items
ohhhh oopsie! I misunderstood, sorry
and... i quoted the wrong message. way to go
What if u just add some custom accept item that give more hearts
It's not gonna be stardrop tea ofc but it is similar idea
Also I think it's getting dehardcoded?
yeah it's what i meant by custom reaction
at least this is the angle i would have since i can't do C# š
that's what the item currently does, I think it's tied to the edibility, no? at least CP wise. so the item currently has a very high edibility stat as workaround
no
Oh nice, is that a .16 or a .7 feature
The thing we r talking about is the accept item dialogue keys
Well that is something C# can help with
You can do data edit asset requested and use foreach as desired
i would be able to make so many more mods if i could simply draw pixel art, the tilesheets are so restrictive
there's some people providing tilesheet resources
and commission of course
doing some basic assets is also not too hard if you use vanilla as a base, depending of the goal
then the plan is to try to implement this for the eventual 1.6.16 drop and acquaintance myself with basic C# in the meantime
but I am kind of confused now because skimming through the wiki, I don't remember what exactly defines how many friendship points you get by gifting an item
was it the price (plus quality)?
it's gift taste (loved/liked/etc)+quality. There's a bit of code considering edibility and price but only for specific cases that aren't covered by usual gift taste
Friendship can be earned with Pelican Town's villagers. As friendships deepen, the villagers' dialogue lines become more friendly, cut-scenes called heart events occur, villagers are more likely to send gifts in the mail, and marriage is possible with one of the datable villagers.
lol forgot to build and was so confused as to why nothing changed
Happens to the best of us XD
oddly that did not work either. Desert festival does happen in the map location "desert" correct?
Running this for desert festival:
"{{ModId}}.Penny.DesertFestival": {
"Id": "{{ModId}}.Penny.DesertFestival",
"Condition": "IS_PASSIVE_FESTIVAL_TODAY DesertFestival, LOCATION_NAME TARGET Desert",
"Sprite": "Characters/Festivals/Penny_Desert_Festival",
"Portrait": "Portraits/Festivals/Penny_Desert_Festival",
"Precedence": -1100,
},
and this for regular outfit
"{{ModId}}.Penny.Spring_Sun": {
"Id": "{{ModId}}Sun_Outfit1",
"Portrait": "Portraits/Penny{{Season}}Sun",
"Sprite": "Characters/Penny{{Season}}_Sun",
"IsIslandAttire": false,
"Precedence": -150,
"Weight": 1
},
I forget to save and then go "why is my mod not working"
I thought the desert festival was a separate map š¤
You might need to double check with Lookup Anything or Debug Mode that it is actually the Desert location, because there's a separate festival map. But it might be patched onto the regular desert location rather than having its own.
Thank you. That is probably the case.
I cant seem to get my dropbox working is the id supposed to be a id for the drop box or a id for the speical order thats active? im a lil confused
the dropbox ID just needs to be unique per dropoff tile, and the Buildings-layer tile property needs to match IDs
e.g. in the first vanilla one here
"Data": {
"DropBox": "WillyBarrel",
"DropBoxGameLocation": "Beach",
"DropBoxIndicatorLocation": "37 32",
"AcceptedContextTags": "item_bug_meat"
}```
(as far as I know, anyway)
doesn't desert have a location context that could be used instead? since festival would likely inherit that
wait where is that drop box info found
Data/SpecialOrders
or this wiki page for an overview, if you mean that, but it's not very explicit about dropboxes
https://stardewvalleywiki.com/Modding:Special_orders
checking documentation on stuff is a great step if you're stuck!
wiki is just one of the steps š
Yee thats why i checked it first
yes i read you the first time
If I want to add an "image" to an event (like the Caroline tea cutscene for example) do I have to load it as a map? Or is there another way?
i usually do a map
its weird its still not working, gonna take a break and come back but can i leave my code here for you to glance at?
you can look at TAS
like temporary animated sprites
however it depends a lot of how CA made the cutscene, and if it has hardcoded elements
Gotcha. Thanks!
but yeah, TAS would be my first attempt, because they are flexible enough to allow a lot of stuff
(however they also have a lot of parameters, so they can be overwhelming at first)
(someone gave me some basic TAS template to use at a point, which helped a lot with figuring the fields)
Oh, I made a TAS generator actually
It's very rough and nobody has given me any feedback but I found it handy lol
yep, go ahead, someone else might know more too
TAS generator (Google Sheets) if anyone wants to try it
I don't see anything wrong at a glance, fwiw
which part of it isn't working? any warnings/errors in the log about it?
Do u have another special order with a Dropbox in that area
it's also hard to say without seeing the map
if the property is written properly (or at all)
i keep getting a cannot load ... asset doesnt exist error .. what steps should i take to figure out the issue?
loading it in the imodhelper entry .. should i .. not be doing that?
Hey! I'm trying to add a custom item to monster drop. By which I mean, when the monster dies, it has a chance to drop my custom item without modifying the monster's normal loot. Anyways, is this code correct?
almost!
two things
1 - I strongly suspect (need to double check) that it's actually 0 indexed, so you would want your target to be "6"
There is no shadow guy monster in the game though
the second is that the value should be a pair that is item and chance
so "{{ModID}}_CannedMeat 1"
oh
Ooooh ok ok ty!
There is shadow guy in the data, but it isn't used anywhere. Unless you have a mod which spawns it.
Wait fr? I found the name on content unpacked
OOOOOOOOOH
got it
(you're really close though!)
Tyyyyyyy <3
(iirc the shadow guy/girl cause errors even if you spawn them with C#
might be thinking of some other types though)
I think a lot of that was cleared out in 1.6
double-checking, yeah, brute/shaman/sniper are the ones that exist/work
morning 
takes the coffeee
we've been frosted over here for a week or two and it's like 9F out
nothing bad enough to shovel/plow at least
it's 20F and I need to run more.
Thank you!
assuming it's C# based on the above, you can post the relevant method/code here with this format (or upload a file)
```cs
your code here
```
and share the error log by uploading it to https://smapi.io/log
i shall :p
but in abstract, you'd usually load an asset when you plan to use the data from it, rather than in Entry
yeah i tried that and many other things, got very frustrated and am now just playing stardew haha
(or draw a texture in w/e game object that uses it through the usual pipeline)
what path are you giving to IModHelper.ModContent.Load<Texture2D>?
sorry iāll get back to u when i can, i am very sick right now
I'm going to bed then, don't hesitate to ping me if you need help and nobody's around, I'll answer when I come back online
So like this for the default?
Hi, I'm trying to make a mod to lock the players' houses, and the host's house, so that only the owner can enter. My code worked for the players' cabins, but I couldn't get the logic right for the host's cabin. Can anyone help me?
harmony.Patch(
original: AccessTools.Method(typeof(Building), nameof(Building.doAction)),
prefix: new HarmonyMethod(typeof(ModEntry), nameof(Before_DoAction))
);
public static bool Before_DoAction(Building __instance, Farmer who)
{
if (__instance.indoors.Value is FarmHouse farmHouse && __instance.indoors.Value is not Cabin)
{
Game1.showRedMessage("Trying to open host's house?");
if (!Context.IsMainPlayer)
{
Game1.showRedMessage("The host cabin is Locked.");
return false;
}
return true;
}
if (__instance.indoors.Value is Cabin cabin)
{
Game1.showRedMessage("Trying to open the player's house?");
if (cabin.owner != null && cabin.owner.UniqueMultiplayerID != who.UniqueMultiplayerID)
{
Game1.showRedMessage("You are not the owner of this cabin.");
return false;
}
return true;
}
return true;
}
Hi, could you look at the code and tell me why it doesnt work?
number is just an example
I want to rename items
It doesn't work because Entries modifies the entire value of the key you enter; to do it that way you should use Fields.
Could you give me an example?
It's the same code you posted, but replace "Entries" with "Fields".
oh okay that simple XD
https://stardewmodding.wiki.gg/wiki/Tutorial:_Your_First_Content_Patcher_Pack i used this tutorial for it
Last edited by AtlasVBot on 2025-09-13 18:58:05
Welcome to creating your first Content Patcher Pack. I wanted a quick and easy way someone could copy, paste, and run their first content patch to prove to themselves everything's working as expected. I always find that creating my first, simple, working code gave me the confidence that I could tin...
does someone knows which flag is set when spouse gives you a stardrop?
@red egret It's in the content patcher documentation:
https://github.com/Pathoschild/StardewMods/blob/stable/ContentPatcher/docs/author-guide/action-editdata.md
There's much more documentation there.
Right. I gotta replace Action with Patchmode!~
Hey do you guys know if theres a content patcher code that will let me add a location only for part of an event? I used this code "Action": "Load",
"Target": "Maps/WoodsTemp",
"FromFile": "assets/WoodsTemp.tmx"
but it didn't work and I'm not sure if theres anything on just content patcher or if i have to use a different template
Im trying to understand it. I think I got it now?
thank you
I think... this is... correct now?
Looks like CF_Spouse
(I'm not familiar with that one in-game, but the farmhouse code seems to check marriage + that flag, then creates a stardrop in a giftbox)
ah, I see, there's also spouse dialogue where they give it to you, the giftbox seems to be for multiplayer marriages*
nvm now I got it I think.
...... I hate code.
well no, that is not the proper ModID and the mod is called Vibrant Pastoral not Pastorial
So I should be good now?
just make sure you target all seasonal maps not just spring "Target": "LooseSprites/map, LooseSprites/map_fall, LooseSprites/map_summer, LooseSprites/map_winter",
oh, i have to mark each season, and it wont just hit any that start with map?
nope
lame
Figured if I type something like "outdoors" it'd hit ALL the outdoors maps
Bummer tho. But this should be good now, right?
yes
You're a saint. Thank you so much for helping me learn this stuff
by that logic map would also target map_island and that'd be bad
Truuuue
theres no errors or anything. is this property written correctly?
that looks correct for your json, assuming it's on the Buildings layer
I'm not sure if special orders have weird caching like quests, but it might help to test on a new save
ill try that
like atra mentioned, having another order active with the same box tile can also be a problem, but I imagine you'd notice that
Aight well I got my mod to run with the updated map overlay.... but it doesnt see your vibrant mod. More than likely, I just grabbed the wrong one, of the two your mod has in keywords.
my error was a extra space in the property oops
now i gotta figure a way to add them to the player without using the order board in pelican town
the comma on line 30 should be on line 31
you can set Condition to FALSE and just give the special order manually
another question, if i use || there is no point in having more than 4 options, right?
trigger actions can add them, either in Data/TriggerActions or through events/etc
EMP can also make custom boards that use a non-default OrderType, though might be overkill for a single one
(incidentally, you might want to set OrderType to keep it from showing up on the board, though idk how people usually do custom SOs)
thanks!
ooo thank you so much!
so setting the flag would prevent someone to obtain the stardrop from the event?
(or dialogue or whatever)
though honestly now that i think of it i think my custom quest board is good enough
well, rather, would prevent it to trigger?
QUESTION THOUGH is there a custom quest board framework
(use case : i want a npc to gift it to player once condition are met, while preventing player to obtain it twice)
I think setting that flag will prevent the stardrop, yeah
the hardcoded spouse dialog check only happens if they don't have the flag yet
if (friendship != null && friendship.Points >= 3125 && who.mailReceived.Add("CF_Spouse"))
{
this.CurrentDialogue.Push(this.TryGetDialogue("SpouseStardrop") ?? new Dialogue(this, "Strings\\StringsFromCSFiles:NPC.cs.4001"));
Object stardrop = ItemRegistry.Create<Object>("(O)434");
stardrop.CanBeSetDown = false;
stardrop.CanBeGrabbed = false;
Game1.player.addItemByMenuIfNecessary(stardrop);
this.shouldSayMarriageDialogue.Value = false;```
("add" is false if they already have it, if I remember right)
Your redrawn mod has two unique IDs, one for the CP folder and another in the other.
grapeponta.VibrantPastoralRecolor and VibrantPastoral.C
Wasen't sure which I should use so i tried them both, but neither worked. Now I assume it's because I hiccuped on something else.
Yes it's a hashset
have you been helped yet? didnāt work how? (@ me on reply pls)
there are at least a few mods that implement unlimited durations (and the alpha does too now, iirc), and there might be others that add new board support like EMP now? but I haven't heard of any that add features beyond that
have you fixed the comma yet? if not, try that first
I just need a board like that vanilla quest board by the seed shop
right now its a anti social npc that gives quest daily
EMP lets you add one of those boards, and just has it look for a different OrderType than "" (or "Qi" like the other vanilla board)
plus a ! notification on a tile you specify
is the mod on nexus too
hmm id ont know if this what i need though my regular quest board is a special order board
isnt*
its just regular quest
yeah, those are two really separate mechanics, you'd probably want a separate tile for an SO board
not sure if there's a clean way to mix them together, barring like a custom UI
Can you explain? I dont think Im seeing what youre seeing.
most all my seperated brackets follow before a comma
i dont want to mix them im just talking about a so board right now
i mean wait
im getting vconfused
like I said before, the comma on line 30 should be on line 31
I feel like outside of Crafting and unlimited duration is there anything quests do that special orders don't do already
this board i wanna make this thing but custom for custom quest
the board next to Pierre's is a quest board. the special order board is the big one by Lewis' house
not a speical order just regular quest
and the UI I guess
yeah, if you've got something that gives out actual "quests" from Data/Quests, that's separate from a Data/SpecialOrders board
i know im asking if i can make a board like the one next to the seed shop
EMP's SO thing is basically just an "open the SO menu" tile action, so you could use it over w/e tile you want
that and you specify which tile has the floating ! while new orders are on it
and i can add regular quest? not speical orders
not with EMP's feature, I'm not sure how you'd implement those personally
IMO I'd just convert them to special orders
It's pretty surprising if there isn't an existing framework option for a regular quest board!

