#making-mods-general
1 messages · Page 150 of 1
**Please take this with a grain of salt since I am still new to modding, **but I might vaguely remember being recommended a method where you define and use custom CP tokens, which I reckon would be done within your C# project. I am not sure if this is accurate either or not, but maybe the defining of said tokens takes place in a json file, and you register them within a C# class?
EDIT: Modding vets, please correct me! I would like to learn more about this method too since it is something I am hoping to try.
CP tokens are nice to use, but that's not what I refer. Thanks anyway.
In short, a mod can't be a C# and a CP mod at the same time (the manifest keys EntryDLL and ContentPackFor can't be in the same manifest or they conflict)
I am doing a C# mod that implements a CP compatibility, and I want to add a CP folder inside my release.
thinking again, I can just check LoC
also happy to see more new faces here 
For this (adding new tokens) I think this is where you'd start: https://github.com/Pathoschild/StardewMods/blob/develop/ContentPatcher/docs/extensibility.md
I found it. thanks everyone for being my interactive rubber duck 
Mind sharing? I was trying to do this the other day and couldn't seem to get visual studio code to cooperate for whatever reason
you just need to include the folder as an item group in the project file:
<Project Sdk="Microsoft.NET.Sdk">
//Standard project block here
<ItemGroup>
<ContentPacks Include="{path/name} [CP]" Version="$(Version)"/>
</ItemGroup>
</Project>
it will wrap the second mod as a subfolder. maybe following BB folder structure will make it more neaty
not sure it is necessary
maybe I just should follow aedenthorn lead though
When I was creating my seasonal mods using Content Patcher, I wanted to use CP's (Content Patcher's) overwrite function to replace my images. The replacements worked fine for summer and autumn, but for some reason, they didn't work for spring. Seasonal overrides are accomplished through the use of the {{Season}} token.Why is that?
This was translated by a machine because my English skills aren't that great.
it could have lots of reasons, depending how you are using the {{Season}} token.
Care to share your content.json through the parser bellow?
The link is here.https://smapi.io/json/content-patcher/f342180f99064bd08827b8e7b4f70146 Personally, I think there might be an issue somewhere between lines 186 and 202, but the same code snippet works fine for modifications in summer and autumn
it is just this part that is not working when {{Season}} is Spring?
{
"Action": "EditImage",
"PatchMode": "Overlay",
"Target": "Mods/SebastiansWardrobe/Sebastian",
"FromFile": "assets/Portraits/{{TargetWithoutPath}}/Outfits/{{TargetWithoutPath}}_{{Season}}_{{Randomizer2}}.png",
"When": {
"Season |contains=winter": "false",
"Weather |contains=rain": "false",
"Query: {{Time}} < 0830 OR {{Time}} >= 2210": false,
"Query: {{Day}} = 13 AND {{Season}} = Spring": false,
"Query: {{Day}} = 24 AND {{Season}} = Spring": false,
"Query: {{Day}} = 11 AND {{Season}} = Summer": false,
"Query: {{Day}} = 28 AND {{Season}} = Summer": false,
"Query: {{Day}} = 16 AND {{Season}} = Fall": false
},
"Update": "OnTimeChange"
}
The others like the rain and pajamas ones are working ok?
if yes, I would check for the SMAPI log through the tests. For some reason CP may not being able to find the correct file to replace when spring.
maybe a type or case sensitive file path
given your neat content.json, I would bet it is a very small thing that you may had overlooked when naming files or paths that is making CP to lose itself
Thank you for teaching me! Sorry I couldn't help X(( One day I'll be a big brain modder like the rest of you (I hope) XD
In my tests, only the spring season is currently causing issues, while the pajamas and raincoats are functioning without any abnormalities. I have also checked the naming conventions of the files, and the file names are consistent with CP's commands.
Thank you for your help!
I found this in Seasonal Cute Characters that may bring some light:
seems like {{Season}} returns Spring instead of spring as all other seasons...
just pointing it because this one is working to me
I probably should... would be nice if I played since 1.6 came out 😅
Good morning Nomori!
Morning 👋
Thank you, I have also referred to the code of Seasonal Cute Characters before, and I am using "Spring" as well. I have tested "spring" before, but none of them can be overlaid. Perhaps I should change my approach and rewrite it in a few days.
XD
well, I tried. sorry not being of more help

maybe someone else will look through it and may be able to throw more useful hints
you are welcome! people here helped me a lot already, so I am glad to pass ahead the little I got so far. And trying to help is always welcome since we may also learn new things even when we are wrong 
now I will be stuck thinking about the Spring/spring thing while I code
In conclusion, thank you very much for your help!!!!!!
let us know if you find the issue, because now it is bugging me lol
Of course, if I can make improvements in a few days.
QwQ
hi guys-
stupid question, but what frame is the last one on the winter spreadsheet? for which occasion is it used?
Maybe……sleeping?
mmh- kinda makes sense-- although idk why they would use a winter hat to sleep 😂
at least i know i will make a pajama instead of giving them clothes for outside 
Nothing else in his sheet looks like it could work for sleeping, so that must be it
Also the clothes usually don't matter too much for sleep sprites because every bed comes with blankets that totally cover their bodies
I rewrote the code for spring and changed the {{season}} in the path to "Spring" to match my file path exactly. Finally, the image was able to be overlaid. It seems like there was an issue with replacing "spring" in {{season}} (?).
The revised code is as follows:{
"Action": "EditImage",
"PatchMode": "Overlay",
"Target": "Mods/SebastiansWardrobe/Sebastian",
"FromFile": "assets/Portraits/{{TargetWithoutPath}}/Outfits/{{TargetWithoutPath}}Spring{{Randomizer2}}.png",
"When": {
"Season": "spring",
},
"Update": "OnTimeChange"
},
it yet bugs me because {{Season}} should be replaced by spring or Spring anyhow
Remind me of this in 6 hours
sssshshsssfhsfs (#6443444) (6h | <t:1735413598>)
alas, I just finished and tested my first C#-CP integration

time to go back to life for a couple of hours
You really should! Treat yourself 
Maybe when SBV comes out 
Hey! How do content patcher packs use folders like "assets/Tilesheets" for their tilesheets? When I try to load a map into the game with a tilesheet path like "assets/Tilesheets/Custom.png" it fails, stating how only relative paths are allowed. Of course just putting the tilesheet files into "assets/Maps" works, but really messes up my folder structure
You'd have to create a map with the same relative pathing as is used in the mod (probably... I always went the easy way so not sure)
you need to load it to a target
i am in the "wip folder with all tilesheets to edit maps in, and copy to actual content patcher folder after im done" gang
some ppl just use the Contents (Unpacked)/Maps folder for the wip folder
It's his sleep sprite in vanilla, but since his feet touch the ground, there's also the chance that mods might use it as a standing closed-eyes sprite
That happens with Lewis (although in vanilla) - his sleep sprite is also used in the special order board event for closed eyes
Eventually I'll have time to make this a thing. I've got a few conveniences in mind like being able to specify a tilesheet root directory that isn't just the directory the map exists in, etc.
Ha, it is!
majestic
Didn't someone JUST make a mod that les you use any Tilesheets in maps without directory climbing?
well that one's different purpose
it's for using vanilla content
and content other mods loaded outside of Maps
u could use it for your own tile sheet but like, u r loading it and deciding where it go...
Gotcha, I just read through the post too quickly and missed the part where they were using a custom asset that they loaded there
i wonder why pathos's scripts seem to fail to pick up my source code links all the time
is there a debug command for clearing all known recipes
even if it resets other stuff that's fine too
Me: I 'm done modding
Also Me: I should try nad fix the bugs on this gold -> titanium replacer
Doesn't look like it! Would take a minute or two to whip a mod up that adds one, though I can't guarantee a lack of side effects without testing. 
Did you want it to not remove default recipes? If not, it's all done!
Either is fine! Wow you're amazing!
We have to extensively test our recipe obtain methods, so this is going to be so helpful
Here we go!
What's a debug command without a bit of spiciness, anyway?
It'll kill default recipes too, because that's going to-
Exactly!
clear_cooking_recipes and clear_crafting_recipes.
Thank you so much!!!
"Debug" is actually a misnomer. They work by replacing the big bugs with several tiny bugs, so as to maintain bug equilibrium and not destabilize the fabric of reality
Hahaha
Conservation of bug: Newtonsoft's second law
Hmmm. I should add a debug command like that to Better Crafting, probably.
Seems like a good place for one to live
Oh, yeah, that sounds like a great place to put it!
My bread is grinning at me
Does anyone know if there's a way to disable all mods other than the one I'm currently testing on vortex?
!modgroups
See this link for how to load different mod groups: https://stardewvalleywiki.com/Modding:Player_Guide/Getting_Started#Can_I_have_different_mod_groups.3F
Vortex isn't recommended for Stardew Valley.
It's hard to troubleshoot and often causes issues like SMAPI/mods not being installed or updated correctly, files mysteriously disappearing, crashes, etc. Volunteers here often can't help with Vortex issues.
Some options:
- Install mods directly (which is easy and safe in Stardew Valley!).
- Or use Stardrop, a mod manager specifically designed for Stardew Valley.
- Or get help with Vortex in the Nexus Discord or Vortex support forums.
(See also the Nexus App feedback thread, if you want to help Nexus avoid the same issues in their upcoming replacement for Vortex.)
Damn, wish i'd known that before adding 200 mods to the game
!stardrop Is the recommended option, I literally had someone yesterday report a problem on my mod and it turned out Vortex ate some files
Stardrop is a mod manager written specifically for Stardew Valley. See the Stardrop wiki for installation and usage.
See this tutorial for connecting Stardrop to Nexus or updating mods in Stardrop.
If you have issues with Stardrop, see the issue report guide.
I'm late, it appears
You think it'd be a quick fix to swap everything over to the different platform or would it take an astronomical amount of time?
sinz.bulk_remove Cooking .*
(also allowed: this entire enum)
also uses a regex to match
Hey, perfect!
there's a matching sinz.bulk_add for crafting, cooking, and events
now for my crimes I'll go cast on a hat
also, can I note that 6480 says something, three of us jump up to make a console command
button might have already started working on the "tilesheets can be grabbed anywhere"
I feel much loved
I think this is for in the game itself, not for within Tiled?
Hm. I'm not familiar enough with context tags. If it has " "AcceptedContextTags": "item_gold_bar" does that mean you can put that tag on a gold bar replacer for it to function as that without having to edit-datat that special quest?
yes
I did shenanigans to make one of my items be accepted that way for compat with one of lyokos mods
It feels evil and wrong but it seems to work
Has anyone edited the mod compatibility list since it moved off the wiki? I was going to update https://smapi.io/mods#underground-secrets with the unofficial update link (https://www.nexusmods.com/stardewvalley/mods/21475 ) but it is too early in the day for me to figure out GIthub.
I have
it works 99% the same way it did before, just (a) without crashing
and (b) with the time delay of pathos approving it
just click this button
and you'll be dropped into a vscode
Atra you're about three steps ahead of me I think
I don't even have a fork of this
does it work?
I'm still in the middle of updating rec lists so if someone who's got a fork wants to add that, that'd be great.

thanks! I'm.. being lazy about fixing this mod because a gold -> titanium replacer seems to me to want compatiblity edits on it's end rather than going through every possible mod combo
Is there a guide anywhere for adding items to a shop?
I'm trying to make a mod for a custom machine and the intent was to have pierre sell it so i've based all of my work on a seperate machine mod that does the same thing to try and understand it but its just not showing up in his stock
thanks! ❤️
Why is the titanium a new item instead of retexturing and renaming gold anyways?
it's not
it's a retexture/rename
The problem is this: " "AcceptedContextTags": "item_gold_bar""
(it's also not my mod, I'm just fixing some compatiblity reports on it for use on a save I'm trying some mods on for fun)
If you didnt change the item data then there should be no issue with the context tags
the item_ tag comes from the internal Name field
you can keep the Name field the same as vanilla and therefore not alter any mechanics
ah-ha.
I think I know what might have happened
The original mod did alter the Name field
and not DisplayName
(well, both, technically, "not just")
fixed
thanks!
Haha np
never seen bread be so happy to be alive
what's he on? yeast? /j
Hello,
I'd like to ask, in which cases is "@" used in dialogue as "←"? I'm asking because I have this testing (i18n) line
(it won't be at this, but it's the first dialogue in the event, so it's the fastest way of triggering it), and for some reason, the game is using ← instead of farmer's name, like on the included picture (BTW, sorry for grammatical issues, I'll fix them after the code is functional). Could anyone help me fix this?
maybe it's the combination of @; - i don't think ive ever seen that before
Yeah, I tried other lines that have only "@" or "@," as well, it is the same.
I18n file here: https://smapi.io/json/i18n/4d1aa149939a4e8f8f5d71a5b060c1f3

This is how it looks on line 390 in default.json file (https://smapi.io/json/i18n/4d1aa149939a4e8f8f5d71a5b060c1f3#L390)
"StrojvedouciDenis.Eleanor_event_Eleanor_14h-p1.13": "I just don't know who I am, @.",
I noticed that Debug Mode (https://www.nexusmods.com/stardewvalley/mods/679) also shows arrow in event script.
... but it also shows an arrow when it does use the farmer's name, like here (SVE version of event 112)
That's because dialogue has extra commands that aren't parsed by other text, ie @ being the player's name. If you want to get the player's name outside of dialogue use the CP token {{PlayerName}}
message does that
Is anyone here good with custom machine coding? I'm trying to make a machine that you put different resources into to have them input and output the same item so it can be placed outside of a shed and based on which item you put into it it will essentially start a timer. The issue im having is that i cant seem to get it to time the days correctly as im not entirely sure what im doing i just wrote the things all out in minutes but i dont think that was correct as i tried placing every item in and only the hardwood finished in a day, the machine also took any item, not just the seven ones i picked out
https://smapi.io/json/content-patcher/fc5804af0cb34c5993ac8af22bf34660
You need one of the speak commands
From other event, also textAboveHead does that too
(Correct)
i feel like this describes my intent better than that rambling does
if all else fails, you could imitate the @ token with i18n tokens and {{PlayerName}} * in the main text
https://github.com/Pathoschild/StardewMods/blob/develop/ContentPatcher/docs/author-guide/translations.md#format
(ah, missed tedi's comment
)
I'll try that
Okay @blissful panther I have a dumb ask that may be way too much. I absolutely adore the closeup interaction image/text features in MEEP. Cornucopia wants to use this for a central feature in our upcoming mod, but instead of map interactions, we want to use interactive held items with Spacecore to hook into trigger actions on item used.
My question is, how difficult is it to make the MEEP closeup interactions accessible via trigger actions, so they can be used with a consumable item? Not necessarily asking you to do anything, since we could also add a C# component on our end if its small
I'll take a look
Thank you so much
Thanks, that worked!
And also thanks for that link
Your main issue is you put all of them into the same machine rule instead of making different rules for each item. You should be comparing to vanilla machine data or a machine mod
Using DaysUntilReady and delete MinutesUntilReady for your purposes
I dont have the ability to write a correvt exanple right now
I see you're using ReadyTimeModifier but I dont know if that will work with counting by days instead of minutes. Minutes progress differently based on if someone is sleeping or not so it falls apart over time
Try switching the readytimemodifiers conditions from checking the Target to Input
(also seconding 6480's suggestion, mainly because I'm not sure how that interacts with the morning time calc- yeah)
Yeah my personal approach would just be to make one rule for each item
So i should remove the minutes -1 line, keep the days line, change all the amounts to 1,2,3,4 etc for days and change all of the target to input?
I dont know how it stacks when you use DaysUntilReady
This is my first time trying to make a thing do something so i have no idea what im doing and im just kinda vibing off of intuition 😅
You should vibe off of an example mod
Yeah i downloaded a custom machine mod and ive been using that as a basis for what to do
But it appears i have based off of a mod that works differently to my intent
Also, one question - can I use {{PlayerName}} instead of @ everywhere? It would be really great to use a uniform format for dialogues. And also, would it be bad if I would give |PlayerName={{PlayerName}} (like {{i18n:{{ModId}}_event_Eleanor_14h-p1.0 |PlayerName={{PlayerName}}}}) to all dialogues, even to those that doesn't include {{PlayerName}}?
@blissful saddle: this (6h ago)
In any Content Patcher "changes" entries, tokens like {{PlayerName}} should work, as far as I know. There might be a couple edge cases, and it won't work if you put them directly in a map's properties or some such, for example (CP doesn't check the map contents like that). And as far as I know, yes, you can include i18n tokens like that even if the final text doesn't use it. It'd be a problem otherwise, since some translated languages might not use a name or pronoun tokens while others do.
Glad to hear that! Thanks so much for your help!
I think the only way I can help is to type a corrected example for you, so I dont think I can help that much more rn
My advice--when modding anything--try making a rule that works for one input item, test and make sure it works correctly. Then copy the entire rule (dont add new inputs to the same rule), duplicate it, and edit it to work for a second item. Test and make sure it works. Then add third, fourth, etc rules
(you can also use tokens like PlayerName in dynamic tokens)
ReadyTimeModifiers are not benefiting you at all in this case since you dont need to stack them or do any fancy math; its better to copy the rule and edit DaysUntilReady
In all honesty you've been a great help already and your input has been incredibly valuable so with any luck ill get it working soonm i get what you're saying and it's gonna require a big ole rewrite but hopefully ill get it going
im just so proud it came out looking right in game
Good luck with it!
like look how pretty my clocks are 😄
i deleted a majority of the code and changed it to just be stone for now with just the daysuntilready but it still accepts other items apart from stone
is there a modifier i need to add in to check that only certain items can be used
Ideally i'd like to release a barebones version using the items listed and then work on adding custom items into the game that can be crafted with little green tick icons so you get an actual tick outside your shed when your kegs are done for example
I feel like it'll messs with the vibes if it takes mixed seeds too 
post your code again? your original code's triggers look fine to limit to only that list of items
Bare with, changed something and started getting red smapi so i gotta fix that real quick
Here it be
Has anyone done Desert Festival compat with a custom NPC? My NPC shows up but my dialogue patch is not working and I have no idea why. As far as I can tell it's identical to the vanilla format.
Ah got it: you're missing the Trigger field in the first entry of Triggers
you only have Id
patch in question: { "Action": "EditData", "Target": "Strings/1_6_Strings", "Entries": { "DesertFestival_WrenSong": "{{i18n:tiakall.wren.desertfestival.{{Random: {{Range: 1,3}} }} }}", //"DesertFestival_WrenSong_marriage": "", } },
I did, with the Satoru Gojo update for 1.6
Ouh. Id have to look at what I did to Marlon cause I think i brute forced a location dialogue instead
Does his dialogue work? If so, could you share your patch?
His dialogue worked when I tested it, but I did recently get a bug report about some dialogue being broken in the latest SDV/SMAPI update, so I may need to recheck it later to be sure it is still working.
do i use ItemPlacedInMachine for the trigger
anyone know how to find out where specific overworld sprites are used in game? looking at character sprite sheets there are a ton of sprites I don't recognize... making a sprite mod atm and it would be helpful to see some of them in context
No, OutputCollected
so
the fact that it's in Strings/1_6_Strings is irrelevant
that's a normal ass schedule string
see Pam: "DesertFestival_2": "610 Trailer 15 4 2 pam_sit_down/900 Desert 16 42 0 \"Strings\\1_6_Strings:DesertFestival_Pam\"/2430 bed",
you should give them a DesertFestival_X schedule, and you can use whatever schedule string you want
( @brittle ledge cuz I forgot about ping)
"DesertFestival": "610 Custom_SBV_WrenHouse 22 9 0/730 Desert 42 7 1 \"Strings\\1_6_Strings:DesertFestival_WrenSong\"/",
is it the final slash because I don't have a next step?
possibly!
Okay, I'll put that in and see what it does. Thanks!
(ah
found the problematic bit from yesterday)
Parallel.ForEach(Game1.game1.EnumerateAllCrabPots(), crabPot => //...call DayUpdate etc
Has anyone here renamed a mod? I'm wondering if it's worth the effort, or if it's liable to cause so many problems that it's better to just start over with a new mod release.
i feel like that depends on the situation for each mod wanting to be renamed
Well I'm asking about real-world experience, not theoretically. Thus the experience would be whatever people... experienced.
the best I could manage with FTM was tacking the acronym onto the nexus title and using it constantly 
switching actual IDs would cause havoc, and I didn't want to risk people getting lost if I changed the public-facing title
I think a few people did switch titles entirely and include things like "(formerly old_name)" wherever they could
Yeah, it's easy to see what could happen; even if I kept the ID, and only changed the mod name, or kept the mod name and only changed the assembly name, users could end up with two copies of the DLL and not know how to fix it.
Just wondering if there's anyone out there who can say "meh, I did it and it wasn't a big deal, users managed OK"
Has anyone ever jsut made like a completly different game by modding stardew
Like when you look at it its completly unrecognizable from stardew
I think that's going to depend on whether "different game" means "looks different" or "plays different".
eh... if you mean visually, yeah, but gameplay is still good ol stardew. i dont play with very many "gameplay" mods
Like someone just makes the entirety of a link to the past using whatever stardew has
Not visually
But actually also visually
Even with a ton of gameplay mods, it is going to be pretty unmistakably Stardew. You can't make ALTTP in Stardew Valley, it just doesn't have the combat mechanics and modding them in would be more difficult than just making a new game.
You could make it look a lot like a different game, such that you wouldn't realize it's Stardew until 5 minutes in, but eventually it would hit you.
well someone made the game launch Pong instead of Stardew Valley if you count that
The closest mod i know thats like this is the roguelike mod and without the stardew assets i wouldve never guessed it was a stardew valley mod
Hah, I guess if you made it literally launch a different game instead of Stardew then that would qualify.
Replace the game loader with a shell command to open Dark Souls 3
It's technically still a mod!
Wait why can button do hyperlinks
-# Yippee!
So for a lost item quest - if I want to make it compatible with other mods (Cough SVE cough) is there a way to add a 'when' condition for each version of it?
i just ran the last test! It works! Thank you so much 6480 and Selph! i have a customizable clock that times days!
enabling only one Data/Quests entry with the same quest key at any given time should do it; I imagine dynamic tokens would help keep only one entry active at a time
but I think quests are saved into the players' data as soon as they're accepted, so once they take it, it won't self-update to a different location if they install SVE or something
Would I have to make two different quests and then pull each one based on which mod was being used? i.e. 'lostitemquest1' gets triggered by one mail when- I was going in the right direction then :]
having them be separate but mutually exclusive quests would work too, and probably be more consistent 
e.g. only send them one version of the quest, but have all of them loaded
Wait, when did they change the rules for those markdown features? 🤔
dont know when exactly but maybe just yesterday when we noticed someone didnt get bonked by automod for it
or maybe a few days earlier. shrugs
if there was an announcement about it somewhere i missed it entirely
... are you sure it's a rule change then and not just automod being broken? I'd probably ask a junimo about it before spreading it around, lol
the automod being broken was the original assumption and so the junimos/bouncer were asked
did you think i just got "Farmers+" out of thin air? 😛
Ah, good then. Though they say right under that that small text is still bad
And, well, maybe?
zoe chimed in a bit later to say tiny text is also good
Ah.
Excellent then.
that's cool
Did Discord change how it delivers messages or have we just embraced chaos?
im not sure what you mean
not a discord change, a mod team change
oh you mean the markdown
you can always do these things, it's just that previously doing so would get you bonked
what if I want to get bonked?
﹫Bouncer
ww
if you'll settle with getting bonked by Discord's global anti spam, you can do what I did a couple weeks ago and try showcasing Fresh Farm Produce. turns out it's nearly impossible to write a blurb for it that doesn't sound like scams
I was thinking how could be fixed the fact that trees are useless everywhere except decent inside a greenhouse (As they keep producing fruit every day all the months). How could I balance this. Only with numbers Is not possible. Maybe It could be possibile to make trees produce fruit only for 2 season a year inside Greenhouse? Would be something doable?
Oh thats good
Greenhouses specifically ignore seasons, but you can add something like "not in Greenhouse"
to the condition fields
Didnt understand your solution but Ill try looking into It good in a few minutes
Since I'm not capable of doing all these stuff myself I'm trying to download a mod and understan how he did that and then start from there. But I didn't find your solution of making a status "Not in greenhouse"
LOCATION_NAME Target Greenhouse for "if in greenhouse"
or !LOCATION_NAME Target Greenhouse for "not in greenhouse"
you put this in the Condition field
Now I understand what you mean. But I can't find any premade code like "This is the tree, these are the edits, copy paste 8 times and put your modifications". I tried to download the tree tweak but he did that in .dll, and that is even more complicated. Can I maybe ask you to make an example with one tree that spawn fruit only one month inside the green house? Then I will complete it
have you unpacked the game files for the vanilla fruit tree data
then you only need to modify those
!unpack
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!
I have unpacked everything, which file? As far as I know everybody told me to not modify the actual game files, but to create a mod apart to modify that
Found the fruit tree data. I copy that in a new file apart to create a mod?
Unpacking the game files help you see which files your mod needs to modify
Making a mod indirectly modify the files by overriding things
Yeah I understand that. So I just copy from the fruit tree file and put that in another file creating a new mod?
I tried to read the file but wouldn't know how to edit it to make it do what I need
It's like I have to add stuff
well when you get down to it there's really that says you have to do anything in SDV other than playing Journey of the Prairie King every day
maybe to someone out there that's what stardew valley is, and the farming game is something completely different
do you want to make your own fruit trees, or edit existing ones? either way how familiar are you with CP
if you want to edit the vanilla ones you'd use TargetField to selectively edit the data instead of overwriting everything
!cp
Content Patcher (https://www.nexusmods.com/stardewvalley/mods/1915) is a mod which loads content packs to change the game's images and data without replacing XNB files. If you want to make mods using Content Patcher, start at https://stardewvalleywiki.com/Modding:Content_Patcher.
(I'll be AFK and on mobile for the next few hours so I can't help much more, but others here can)
I want to edit only the vanilla ones. And I just want to change the seasons they bear fruit in, inside and outside the greenhouse. I'm using CP to create my mod and other people already helped me with the code to implement the modded map in game, as well as the mod to put meteorite inside the farm. But I personally can't do the code myself. I would need something like a sample to copy and edit.
No problem have a nice evening!
I'm trying to upload some seperator images i made for my mod page to look pretty and its just coming up with 'The Entered Data is invalid' anyone have this issue before?
ope scratch that, figured it out
you can send clothing in the mail right 🤔 would it just work the same as other objects? I know that big craftables have to have a specific one but clothes you would just put the item type in front right ? like (H)#
use the new %item id mail command, and yeah include the item type
https://stardewvalleywiki.com/Modding:Migrate_to_Stardew_Valley_1.6#Mail_changes
very nice thank you :D
Other question - I don't see it on the wiki after searching but is there a Game state query for having completed a specific quest?
I don't think so
if this is your own quest you're adding you need a workaround like setting a mail flag in the character's dialogue
completed quests add a conversation topic you can check for and set a flag
questComplete_[questId]
Hey again all, when creating machine animations in content patcher, how can you get the frames to loop? I don't see a loop field outside of TemporarySprite fields.
I've just got a simple 2-frame animation I'd like to play for the duration the machine is working, and I can only get the frames to play once.
how do i showcase a mod? im very proud of it 
Without the requisite rank you'll need to ask an existing author to make the showcase post for you
I've never written any myself, but from what I can see in the code, WorkingEffects should automatically loop while their "Condition" field is true, while LoadEffects don't. If you're using a working effect, maybe its condition is only true for a moment when it first starts? 
I'm using loadeffects and from what I understand it looks like WorkingEffects only checks at the start of every in-game hour
Which would solve a bit of my problem, which is needing to write enough intergers to loop the animation for the whole duration
But it would still make the list of intergers quite long if I'm not mistaken
I will give workingeffects a try and see if I can wrangle an easier solution out of it
the wiki says it should apply working effects every time change, though "WorkingEffectChance" defaults to 0.33, so maybe it just doesn't happen enough
Oh you know what you're absolutely right
this mod says it's working on the SMAPI mod compat page, but it hasn't been updated since 2019 and looks like it broke in 1.5? https://www.nexusmods.com/stardewvalley/mods/3270
There's a couple other hunger mods pointing at it too
Huh, it loads
huh
@calm nebula Did you say that cooking recipes menu sorts by parent spritesheet name and THEN index? Because I renamed our spritesheet as MCornucopia/Objects so it would sort after Maps/springobjects alphabetically, but they're still sorting in front of all the vanilla recipes
Also on second glance it's not even sorting our recipes by sprite index
mod that uses only smapi events (and this one can definitely be implemented with just events) has a good chance of continuing to work indefinitely
the compat list im pretty sure just checks if it loads and not whether it functions as intended
and pathos literally loads like every single mod ever
for the check
I think that was like the
mumble page thingie.
(I know, super clear, atra)
the collections page
okay, looks like only one feature broke in 1.5 and it was the stamina (arguably the most important part, the consequence)
just checked and I woke up with full stamina (and I don't have infinite stamina enabled in CJB), so womp womp
this is the code
you're shit out of luck for changing sorting unless you (a) use int ids (plz don't)
Oh you're right, the collections menu does in fact sort properly
or (b) you ask a C#
moss soup
hey, selph is typing. selph is a c#
how does one replace a certain sprite with content patcher? i wanted users to be able to disable some of my sprites (working on a weapon resprite)
dammit
So it returns all the string ids first, then the number ids, then moss soup?
oui
Well.
non
(do you want a C#)
selph was denying being voluntold i think
I just want to know how much I can tell users that we can't do anything when they complain
it's like, not hard C#, other than not having a good way to like, model this shit
if you have a C# component then you can technically do it. but a user probably wont know what that even means to have a C# component so you could just say its not feasible
If we end up with a small C# component for other reasons then I'll consider it; otherwise I'm going to act like it's completely impossible and would require rewriting the entire game and therefore it's "not possible for us to move the items at all, thank you for your comment"
but like, the second I'm like. "Maybe it needs better sorting" but also like then like "but better crafting does it better"
At least the collections menu is correct
(selph, I was kidding about volunteering you!)
how did the user want them to be sorted, anyway. just yours at the end?
(I know lol)
(feels good to touch grass once in a while)
how do i know the toarea coordinates im new to this 
Nonexistent user. I've seen complaints about modded recipes coming first on the list and pushing down vanilla recipes; can't remember if those were complaints on my mods or on other mods, but it was something I wanted to attempt addressing
you'd need to open up the spritesheet in something like gimp or paint.net or whatever you wanna use to find the pixel coordinates of the top left of the sprite you wanna replace
like, it would be Easy TM to rearrange the menu
but also like
at that point, go tell the user to install bettercrafting tbh
touching grass is nice! Are you in a place with plentiful grass (and trees?)
loc also has a search menu
I love the search menu
could still be nice for people who dont like or use better crafting/cooking/loc/whatever else is out there
I mean, I would want some minor sorting on that menu, maybe
something like "bring me X buff to the top" and suddnely it's the loc menu
using aseprite at the moment, how would i see that?
yesss it sorts alphabetical by default
also ngl the two-tile-tall bigcraftables is weird
that people is me i am that user
awesome! user number 1 can make their own mod
i am not sure as i dont use that program!
(tbh, button, I re-wrote chest sorting because I got annoyed at that.)
i could! if i ever felt it important enough. and might, eventually
(so I feel you.)
loc has a default cooking menu order fix included
you can just take that and reupload it if you like
i just like the vanilla menus just fine so i dont use any of the Better suite of menus, besides my own for the powers tab
alphabetical would be nice, says atra. Or some sort of "by amount healed" or "number of buffs" and oh hey bluebs is here
Pixel coordinates in Aseprite are in the bottom left, under the color picker
im not fussed about it i was just saying "install this other mod" wouldnt be a solution to me if i did care about it
probably alphabetical by recipe name if anything
recipe display name specifically
makes sense!
Huh. the LoC alphabetical sort is putting all vanilla recipes at the end
Would the 176 here in aseprite be the row while 48 is the X? since 4 numbers show when i use the marquee tool
48 is X, 176 is Y, I haven't backread to know what the specific desired information is here lol
more likely it's using your 6480 author name in the item id as a sort
but it should be going by display name
It might be using internal Name?
As our internal names have the full item ID, including mod id
oop here is a selection while i was using marquee tool to know the size of the sprite and 4 numbers showed up
🤔 But that would still put vanilla items starting with A-C at the beginning
Those should be the X, Y of the top left and bottom right pixels of the selection
6 > A
Our items start with Cornucopia, not 6480
ill try em out thanks!
Not really important anyways lol
I recall thinking the sort order is messed up
Like more than that messed up
Quick question, I can use HasMod as a condition without needing to set the mod in question as an optional dependency, right?
yeah
Thank ya 
well this is the search method, feel free to point out anything wrong
https://github.com/b-b-blueberry/CooksAssistant/blob/master/LoveOfCooking/Menu/SearchPage.cs#L209
did you misspell meow
Log Info: SMAPI 4.1.10 with SDV 1.6.15 build 24356 on Microsoft Windows 11 Pro, with 20 C# mods and 20 content packs.
next time try a domesticated tree
waaait I hit level 50 apparently
do you guys know who to contact about access to the repos?
btw it happened when i tried planting the tree. my UI was suddenly gone and I was like, hm that isnt supposed to happen
pathos who is on vacation
will do when he’s back then, ty
tis my wildtrees.json btw https://smapi.io/json/content-patcher/7498e48c404e463ab1c9156c6987b53e
your texture doesnt match any loaded target
Anyone know how I can make a smaller text box? I tried using the TextBox class but if I make the size any smaller the texture breaks
TextBox box = new TextBox(null, null, Game1.dialogueFont, Game1.textColor)
{
X = (int)marker.Value.X,
Y = (int)marker.Value.Y,
Height = 180,
Width = 128,
Text = marker.Key
};
box.Draw(b, true);```
you can't
textbox breaks if you do anything to it
Use StardewUI to make whatever micro UI you can dream of
I forgot what I named my folder was mymods
oh weird the thing was scrolled way out of order
discord loves to do that sometimes
i'll be honest, i have no idea what you're asking 
I need to put my new mod into my mod folder and I don't know where that is
In general all the vanilla widgets tend to be like that; you either use them exactly as they're used in vanilla or you write your own from scratch.
oh don't be so dramatic, you can always cram new properties in with cecil and butcher the game calls to use your custom mess
what could be simpler
How do I detect if the current tick is one of the ticks from when the player clicks "Return to Stardew Valley" from the bus on the desert side to when the player can start moving again in the bus stop?
I have tried checking Game1.player.CanMove, Game1.eventUp, Game1.fadeToBlack and I have invoked Farmer.localBusMoving but there are still several ticks that those miss. I think the ticks they miss are between the "return to" moment and when the player character is on the bus but I cannot find/think of a bool to check for then and thought someone here may have a better idea.
hm, well I found Game1.freezeControls and that seems potentially helpful since it's set to true in the bus animation sequence, but it's also set to true for a lot of other cases
Writing a new one could be simpler (and is simpler).
Sure it's simpler, if you like simple things and not needlessly complex and incredibly fragile things that break compatibility with everyone else's things
Oh that's amazing, any idea who would be open to helping me out? This is my first real add to the game mod and I'm very pleased with it so I'd be super happy if more people saw it 😊
alright, it looks like Game1.viewportFreeze covers the ticks from the dialogue answer to entering the bus and then this.Helper.Reflection.GetMethod(Game1.player, "localBusMoving").Invoke<bool>() covers the rest. Using that "viewport is frozen" check is not ideal, but it might suffice. I'm all ears if others know something more.
Yes, I know, I'm a philistine. I like it when things work, and when things that don't work can be fixed.
I've noticed when you edit ShopMenu.cs.11488, for some reason it removes the space?
So for example, even if you have it set so ShopMenu.cs.11488 = "Welcome to Pierre's! "
In game, no matter what, it removes the space at the end, causing the menu in game to look like this:
Anyone know how to fix that? I feel like I'm going crazy
Nvm
just had to use an invisible character
💀
glad that works, because otherwise you'd probably need to edit the actual shop entries that reference it with [LocalizedText] 

it's a messy list with things like
"Dialogue": "[LocalizedText Strings\\StringsFromCSFiles:ShopMenu.cs.11488][LocalizedText Strings\\StringsFromCSFiles:ShopMenu.cs.11482]",
I opened that file, and quickly closed out of it

now I just have one line of dialogue from jodi to find, and I'm done with some bug fixes
where that line is? I dunno, hope to find out soon
😭
I don't have the exact line to look for, just something said off memory
I may or may not have found the line, still pushed out an update as I cannot seem to find a line that would match better.. hopefully it was 
Content Patcher is what was trimming the string btw, i18n might get around it, but not sure
question about generic mod config menu - can you "wrap" the name of a config option that has a long name? like use "\r\n" inside it or something?
errmm yes, it appears you can, sorry I shouldn't ask questions I can test for myself in under a minute
question, how do you make a custom dialogue from when an npc receives something for their birthday?
The dialogue keys for it are listed here: https://stardewvalleywiki.com/Modding:Dialogue#Item_dialogue
Hey guys, I’m trying to simply add some modded items to the universal loved gifts list using stardewxnbhack to edit the unpacked content via content patcher. I’m unsure how to do this though. Should I just add the itemID of what I want to the “universal_love” list? I can’t seem to find information on how specifically to get the changes I want to make to actually apply in game so my special items can become functional universal loved gifts. Can someone help me out?
Editing the files inside the Content (Unpacked) folder will not change anything about your game. They're just copies of the game files in a format you can easily access (.json) so you can see the data and know how it's set up. To make your changes you will need to create a Content Patcher content pack mod that edits the NPCgifttastes asset in the game itself. I'd recommend finding a mod that adds items to the universal love list (a lot of food mods or other item mods do this) and have a look through what they are doing.
If you're already familiar with how a CP pack works but are unsure about the specific changes for gifts, this page will help as well: https://stardewvalleywiki.com/Modding:Gift_taste_data
!startmodding
If you're unsure how modding works at all, look at the non-C# parts from the following message from Governor.
Making mods can be broadly divided into two categories:
- Content packs are formatted text files, and don't need any programming knowledge. They can add/edit NPCs, maps, new items, shops, and more. To get started, see the list of framework mods, the wiki tutorial for Content Patcher, and there might be relevant guides on the tutorial wiki.
- C# mods use programming code to change fundamental game mechanics. See getting started with C# modding.
Usually it’s easier to start with making content packs, since you don't need to learn programming.
Thank you so much 🙏🏽 I thought I would have to do this but I wanted to make sure before I pulled the trigger on fully making my own mod out of this process. I appreciate you 🥰
No problem! If you're doing it for personal use then I suggest finding one of those mods that already does it, copy it over to a new folder and rename it (including in the manifest.json) and then rip out everything that isn't just the gift taste data. Then edit the gift taste data to what you need.
There is a mod on nexus that simply adds diamonds to the universal loves list - it is completely for personal use, so I think I can tweak this mod to just add something of mine as well and see what it does then work from there
Yeah that sounds ideal for your purpose ^_^
Thank you thank you ☺️ I’ve been on this for hours and couldn’t think outside the box anymore 😅
so it;s been a hot minute since I played a modded stardew
made a seperate instance of it compared to the regular game but idk how to go selectively picking mods to play stardew- downloaded a mod that would do that
any advice how? ^^;;'
im not entirely sure what you mean, do you mean like mod recs or a mod manager? either way that seems like itd be a #modded-stardew question, since this channel is for making the mods
@ivory plume any way to make CP load mod files before the game needs them to draw a map?
'Cause it only happens with those floor tiles already applied to the farmhouse loading the save file
Edit: SinZ pointed out where I messed up, fixing my mistake fixed the issue I caused
there is no concept of loading before the game needs them
quick peek at your mod on nexus, its because you have the data/flooring.json load gated behind VibrantPastorial.C/Interiers token, which you have configured to only be populated whenContext.IsWorldReady || SaveGame.loaded != null
Hello just wondering if it's possible to make a dialogue triggered at a specific time? Tried copying the format and stuff but it didn't seem to work
not entirely sure why you have a bunch of seemingly config tokens gated behind a loaded save, but that would cause your problems
dialogue only pops up when you talk to a character. you cant manually make dialogue pop up. also, When conditions only control when Content Patcher adds your patch to the game, and a time-based one wont work without an updaterate to match
need to configure UpdateRate if you want the patch to be reevaluated
(also i dont know if re-evaluating dialogue patches after dialogue has already been chosen for the day even works? it mightve already parsed the pre-existing string and stored it for the day)
oh yea thats what I meant like when I talk to em at a specified time
you can use the game state query dialogue command in the dialogue itself to check the time and display different things based on that
tbh the way you can get around the dialogue popping up at specific times is knowing where they stand at their schedule, and setting the appropriate <Location>_x_y dialogue
Look at $query here if that's what you want to do
no when patches needed, no queries
until an object or player obstructs them and changes their timing (or routes via a completely different map or a different mod makes the warps further apart, etc)
or a funny expansion patches over the map and screws your positioning
@stable grotto fyi
oh sinz since you're here i am curious about the inner workings of cp 
we were talking about the way {{Random}} is determined
afaik it had to do something to do with the hash of a save and then jumbled around based on Maths™️ ?
@rancid temple i can't describe it in better terms help
nope, that's not it, I tested it with the load action in the content.json and it's the same result totally that 🤣
Query 
Like so "summer_11": "$query TIME 1700#It's after 5pm!|It's before 5pm!",
The specific question was about nested Random tokens
That wasn't what we were going to ask Avi
unless...
Iirc Immersive Family makes use of that for their dialogue yeah
ah see i have no context
this is what i get for not retaining information
It was about whether nesting one Random inside another would evaluate the outer random before evaluating the inner one.
inner would be evaluated first
oooh thank you!
you can only evaluate the outer most token once all the input parameters are resolved
though multiple randoms in the same patch in theory would have the identical seeds unless you altered the seed using the key parameter, so the order of operation shouldn't matter
ahaha, you were totally right... 😅
So if you have {{Random: choice1, {{Random: choice 2, choice 3, choice 4}}}}, each choice would have an equal chance of being chosen instead of choice1 having a 50% chance?
it would still matter if the inner random itself resolved to a list, wouldn't it?
a comma separated one
So the random generates a number from 0 to maxint-1, and then does rand % args.length
so the outer random is a 50% chance of being odd or even, but if its the identical seed as the inner random, the numbers that are % 2 == 0 and % 3 === 0,1,2 vs numbers that are % 2 === 1 are not equal
if you did {{Random: choice 1, choice 2, {{Random: choice a, choice b, choice c}} }} I don't think it can ever say choice a or choice b, but its been awhile since I've looked at the internals enough to know if input.TokenString.Path will be different between the outer and inner or not, thus changing the "default" seed
Thanks SinZ
I am not sure I actually follow the maths part of it but I get enough to know that it's definitely not working the way I expected it to lol
{{Random: choice1, choice2, {{Random: one, two @@ three, four |inputSeparator=@@}}}}
(this is what i meant with this, but i dont actually know: does this work? or does it treat e.g. "one, two" as a single input after its resolved regardless?)
now that i think about it it might still be the same probability even if it didnt. maybe. i dont know. Stats was... never my strongest subject
let alone stats at 6am
assuming the set aggregation works correctly, it would be 25% choice1, 25% choice2, 12.5% one, two, three, four.
if it is independent seeds.
if it is identical seed, then I think the probability turns into 25% choice1, 25% choice2, 25% one, 25% four
what about the probabilities of two and three in the identical seed case
what does this mean
the inner random is odd or even probability, the outer random is mod 4 = 0, mod4 = 1, mod4 = 2, mod4 = 3.
So the one or three case needs mod4 = 2 which would be even., and the two or four case needs mod4 = 3 which is odd.
so I think I got it the other way around, and would be three, two
your i18n token is pointing to an incorrect or missing key
i think this random stuff is mostly just telling me i should probably not try any of this funny stuff if i need such precise control over probabilities
because i might still be a bit lost on it
get ready for my next mod which will nest random tokens 7 layers deep
atra already made the xoshiro random didn't they
i dunno. thatd be for the games random and not content patcher though
and i dont think itd matter if content patcher is passing in a seed
another question, what's the error on dialogue and how to fix it? It said like characters/dialogue/firstlittlenpc: resort something I forgot to screenshot
well, cant answer without the error
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.
(also before i forget to say before i go sleep for a bit, thank you SinZ for humouring my silly CP probability question too
)
yeah! thank you for explaining the random out of a burst of curiosity 
all the random is doing is making some integer between 0 and positive infinity*, and then taking the remainder based on the amount of options available.
if its identical seed, then even if they are different lengths, they are still rolling the same number and so if the modulo factors don't match then its impossible.
Take the xkcd case and the number rolls 4, like any good random number should.
For the inner random, it would be 4 % 2, as there are two options to pick, and so the number is 0, and so one, two gets selected and moves on to the outer random.
For the outer random (assuming the set aggregation works), it now has 4 input parameters, choice1, choice2, one, two and will now do 4 % 4, which is also 0, and so will select choice1.
If the random number was 0, 8, or 12, or 16, etc you will always get choice1.
if the random number was 1, 5, 9, 13, 17, etc you would get the odd version of the world, and three, four gets selected, but choice2 wins anyway.
if the random number was 2, 6, 10, 14, 18, etc you would get even world, and it would win, so one.
if the random number was 3, 7, 11, 15, 19, etc its the odd version of the world, and it wins so four.
Just simple clarification, in terms of dialogue, how significant is setting up Priority? I'm essentially writing marriage dialogue in "Characters/Dialogue bc the dialogue keys are there (thanks Avi) and just wanted to understand the nuances.
for dialogue patches priority determines which mod gets their dialogue to show if they use the same keys
if its a custom NPC you likely dont need to worry about it
tbh i was trying to think of a way to tack on any expansion dialogues so that it wouldn't clash 
If it states Priority: Late thennn
Imma try to wait for this little guy to go to ginger island
i think the only real feasible way is BETAS
In ContentPatcher, Priority should only be used if you are needing to beat or lose to other content packs in a way that the dependency tree isn't going to do for free.
Or its a lazy load, and you dont want an exclusive load
(i appreciate the "like any good random number should" it sounds very cute when put that way)
Thank you all 
(i should really get to watching freiren, i have free time now)
im familiar with it!! it was your specific wording i liked
and everytime I lurk here and see Button, I get extra an reminder to pick it up xD
Am I interpreting correctly that in this example two can never be chosen?
(Freiren
)
frieren good go watch frieren instead of modding. let frieren consume your life. no im not being a bad influence
if it is identical seed due to the token path matching, then yes. I just am going back and forth as to if its just one, four reality that wins vs three, two reality
as all the timelines where one, two would be available, the random number wouldn't have picked the third option, it would have picked choice2 or three, four
but zero index vs one index brain is getting confusing as to which world wins
This is wild. I have never thought about "randomness" like this before.
this world of the identical seed being used in multiple places is the foundation of all the craziness that BlaDe relies on
where in many ways you dont even need to know the number itself, just that it will repeat in key places
There's a hurry_all console command to get all NPCs to progress in their schedule. Or if you just need them there, debug wctm NAME warps a character to you. There's also a fast forward mod if you need to watch them move
Also if you are checking dialogue you don't need them to go to GI or anything, you can just use the debug loaddialogue command to make a dialogue box with the line you choose. You don't even need to be anywhere near the NPC.
(though if you are doing query or CP schenanigans you would still need to match the conditions at the point in time)
(add in another tidbit about ginger island picking 5 random npcs as long as they're not krobus or married and have the bool set)
Loaddialogue does get funky if you are trying to test things like randomisation though because it won't change no matter how many times you run the command (as I am aware from experience before I knew about the result being set in advance based on save and day or whatever)
Oh I wonder if you could do a debug dayupdate and then load it again
tried this exact debug loaddialogue and concernedape popped up lolol
You have to do it in the console
Oh that was not the full command you would need sorry.
Slash commands don't work in game if you don't have that enabled
ooh
If you don't have a C# mod that enables it, you have to do it manually every time you launch the game from the console
I think someone had released on that does that
I am so lost about what you are saying roku
I ended up just putting it in my personal mod lol
Are you talking about chat commands or something?
When you try to type a slash command in game, CA pops up in chat and says Nice try
That's what I assumed they meant since I don't know where else CA would pop up on a failed command
I just do everything in the console
For that yeah. This is why we have a SMAPI console
It took me way too long to figure out how I was supposed to format loaddialogue
there is a flag in the save file to turn it on/off in 1.6 (cant remember if base 1.6 had it or if it was 1.6.9)
The exact command is debug loaddialogue NPCINTERNALNAME Characters/Dialogue/NPCINTERNALNAME:DIALOGUEKEY and it goes in the console as mentioned. Example with my NPC is debug loaddialogue Aba.Hiria Characters/Dialogue/Aba.Hiria:summer_2
I'd rather avoid looking at the save xml if I can help it
Okay I did that completely from memory after 2+ months of not using it. I hope it is correct.
NPC name is a fuzzy match so you just need to type enough of it
Though if you have a bunch of similar named NPC's you'll want to be more exact
I always just do it exactly since I am copying and pasting it mostly anyway
Shoot really? 
But yes it is apparently fuzzy
man…
I'll try the dayupdate thing when I finish this day
Yeah you have to change day if you want your random to resolve to a different option
ah I tried the specific time command, how do u put a range on it? or u cant?
Hmm I have it with double backslashes in my dialogue file but I don't know if that's necessary
Pinned this on my thread I swear this was my holy grail when I was scouring through the channel looking for the correct debug command, thanks Aba 
Yes you can have a min and a max
(it's also mentioned on the Tips & Tricks from ES page of the modding wiki if you forget)
Loaddialogue is also on the console commands page of the wiki
How to do the range: "summer_11": "$query TIME 1700 2000#It's after 5pm but before 8pm!|It's before 5pm OR after 8pm!",
ah tysm!
Hey i wanted to ask if my mod could be posted in featured mods 🙂 started as a wip it has grown and been well recieved
https://www.nexusmods.com/stardewvalley/mods/19423
Sure, I can showcase it for you 😄
Do you have a message or write-up to go with it?
🤔 hooray im finally getting around to the question i initially had.... how would I go about making it so that an npc won't date you if the player is [x] gender?
@velvet narwhal You're up
You just patch Data/Characters to change the CanBeRomanced field to false with a When condition for PlayerGender
You can reference the code in my Don't Date Relatives if you like, you'd just need to change the When condition
"LogName": "Begone",
"Action": "EditData",
"When": {
"PlayerGender": "Male"
},
"Target": "Data/Characters",
"Fields": {
"NPCINTERNALHERE": {
"CanBeRomanced": false
}
}
},```
how would that work in multiplayer?
spacecore has the thing
I was also wondering about MP which is why I didn't suggest changing the CanBeRomanced field
Although to be fair I don't intend to do Hiria's romanceable change in a way that works in multiplayer either
Sorry Button
"spacechase0.SpaceCore/NpcExtensionData"
SeparateDatability
CP docs say "current or specified player", so I assume if it's unspecified, then it defaults to the current player
"HasSeenEvent: anyPlayer": "{{ModId}}.8heartevent.2",
"PlayerGender": "Male"
}```
 this works right
Presumably if the current player is [blocked gender] but other players are [unblocked gender], then the character won't be datable for the current player but will be for the others
Alternatively, just give the character reject dialogue for the bouquet/mermaid pendant if the player is [blocked gender]
i'll see about that if doing this doesn't work
Posting on behalf of @granite bluff:
✨ Prettier Interiors ✨
An immersive and lore-friendly overhaul of town interior maps that adds more clutter and atmospheric decoration! Now updated for SDV 1.6!
i wonder how ass backwards a query i could do for the bouquet/pendant thing
Yay great thank you^^ no i've got nothing special in mind
(Airyn doesn't like to be pinged)
oh i'm sorry!
hey hey! just as a matter of curiosity, how hard would it be to make a mod (for a complete beginner like me) to add more prizes to, say, the trout derby? i'm surprised I haven't found anything like that, tbh, but i love the fishing festivals. playing them would be more fun in later years if there was more than just crab pot available. any tips appreciated (i have the wiki page on modding open!). thank you!
It's hardcoded to hell and back again
Yeah I just went to check that, you'd need a framework (kinda like how someone made one for the prize ticket machine) or some sort of C# component... or to make it into its own shop or something similar
So, essentially, for a beginner, relatively difficult
If the trout stickers are objects like qigems then it's not too hard
You'd have to do conditional map patches
🤔 I mean they are
Well not... they're like actual objects
not a currency
but with shops you could just use em as a currency
Yikes, I was hoping it would be a relatively simple project to start with, but I’ll take your words for it
Do the tradeotemid for the custom shop to be the trout sfickers
Jamore is right you'd have to do some map patches and then make a custom shop and then you could do it to where you could select the item and such yeah
Considering I’ve never done anything for Stardew (did some minor sims modding), I think I’ll start somewhere simpler. Thank you everyone 🧡
Map patch the shop either as an offshoot or overwrite it
If you do end up doing it, I’d be the first to download!
I will add it to my roster of mods to create B)
I gotta at least finish the basic quest section of my Qi mod first, lest I take on ten billion projects
Did you have ideas for what else to add to the shop? Otherwise I'd probably just start with making it a trade shop instead so people can simply select what they want instead of the randomization
not really randomization but cycle that it loops with
I was thinking that it could be mostly fishing/fish related stuff, as to keep within the theme and not make it too overpowered
With the way the new shop would work it would be easy to make more 'op' things cost multiple tickets
At some point, perhaps bait to rare(er) fish, Pearl, those little treasure chest thingy. Stuff that could probably come inside the fishing chests (perhaps even magic bait/challenge bait for higher amounts)
That’s true!! Because then you’d have to save, maybe for multiple years even
Because I think the vanilla tickets do keep from one year to another
They do :]
Oh yeah, the absolutely! Could also be a way to get things that are VERY RNG dependent
Like, I have perfection, played multiple hours and I’ve never, ever seen a bloody fairy trinket
Oh no xD I get so many of them lol
Seriously, I have a full big chest of parrot eggs and I don’t even know how the fairy looks like!!
just as a suggestion you could probably map patch a custom prize ticket machine into the derby maps.
should be fairly simple to do with UB and CP
Can I override the IClickableMenu.drawTooltip method in some condition (e.g. for some type of items) and run my custom method instead of it?
(without content patch)
i dont think you can do that without content patcher
You can do it with C#. You might need C# to do it actually.
im pretty sure you can do everything without CP in c# no?
yeah im trying to do everything in c# and no cp lol
Farmer animation is the worst, I have heard.
sigh
That's... an interesting thing to want to do xD
gotta pick something bad to start with
Most helpful thing I can think of right now is to offer to find you atra's code from when they made the shovel mod.
well im trying to work on my C# skills lol so might as well kill two birds with one stone
alright ill take a look through, thanks!
what about adding a new keybind?
😭
Let me go find it.
You mean adding a new keybind separately from the animation idea? That is easy.
Honestly very impressive, I haven't truly dipped my toes into C# even though I really want to get into it and learn it
I don't know how to add one that you can change in the config but lots of people do so it'd be easy to find out, I would guess.
Frameworks are my saving grace truly, otherwise I would end up imploding
yeah im trying to do like an elden ring roll
I'll eventually commission someone to do a C# thing for the Qi Gem menu so that people don't complain about not being able to see all of their gems ... when I have the money for that anyways
no idea if theres velocity?? how easy is it to force a player to move?
Ok no idea how useful this will be but I can see a bit in there about farmer sprite frames. https://github.com/atravita-mods/StardewMods/blob/243fc0ae39bbec82d0620af76a2c56c569a630de/GrowableGiantCrops/Framework/ShovelTool.cs
So maybe it will tide you over until someone who actually knows what they are doing comes online to help.
This is nearly the most dead time of day for this channel lol
But in about two hours it should pick right up
good luck with what you're doing :D
thank uu
You should be able to check any one of a bunch of mods for the keybind part - check the smapi mod compat page for the source links
You mean just making the farmer move?
I would check the game decompile for that
I can't think of any examples of the sort of movement you'd want for a roll (I assume it's "player presses button and release, farmer moves" so not the same as "player presses button and farmer moves until button is released") but in your shoes I'd start just by looking at how the game handles farmer movement overall.
hmm okay im just going to assume the place to look is when the player swings sword code
Tbh farmer movement is technically easy if...weird
Does that include animation, atra?
I said it was difficult because I thought I remembered you saying that was the part of your shovel mod that sucked but maybe I misremembered.
Oh animations are also fun
hii! i want to start making mods, what's the difference between using cp or ja for adding nwe crops, for example?
Well, the difference is that we don't use JA to add crops now. 
oh rlly? what happened?
1.6!
ohhh has it not updated yet
Oh, no, it's just that 1.6/CP absorbed a lot of functionality.
JA just doesn't need to exist anymore.
I have no idea if you mean fun or "fun /s" lol
I don't know of any direct walkthrough for adding crops personally, but I'm sure someone will be along!
the best option to add crops is look at a small CP crops adding them and learn this way (not copying stuff, but looking at the data/structure)
where to find reference for vanilla portrait sprite?
!unpack
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!
unpacking the game or spriters resource i think
thank you 
Is it possible on mobile?
i don't know
Making a mod is really difficult on mobile, in case that's your plan
...actually uh. if i theoretically wanted to change the music playing in a cutscene. how would i do that.
I just wanted to replace a portrait
I have make some mods, but i havent made a portrait mod
you can do it on pc and it will probably works on mobile too
Well if you're already familiar with the process then you should be fine. A portrait replacer mod is an easy one.
totally isnt looking at my alex is troy bolton mod with a very terrible bet on it midi
Did you get an answer to that question about changing event music?
nop.
I assume it's changing a vanilla event? If you want to change the music for the entire event you just change the first command in the event.
If you want to change it partway through I will have to open Firefox lol
i wanna change the music that plays through the music box
Through the music box?
Probably the juke box
The only music box I can think of is the jukebox in the saloon.
Which I assume would also be easy to change for an event because it's probably set the same way as other event music.
no during alex's cutscene, his little music box with his mom
yeah
if i wanted to get even more in depth id change every instance of gridball to basketball and his name to be troy
Okay yeah it just has a command playMusic tinymusicbox and you'd change the tinymusicbox part to a different track.
Which could be a vanilla one or one you add into the game.
i see.
Have you checked this? https://stardewvalleywiki.com/Modding:Audio
I'm always sarcastic
Iirc theres a mod that changes the game’s music to that of Mineral Town’s and only used CP
where to upload mods?
For what purpose?
Yeah music stuff is really easy
I have custom music in my Apollo's Trick or Treat mod.
for sharing mods
Oh did you create a mod? You can upload it on NexusMods
English speakers mostly use Nexus, though there's also Moddrop (and technically CurseForge though I am only mentioning because someone else might bring it up if I don't). A lot of people use Naver but that's out of my experience.

😔 me when the value is null
ok so if i wanted to change alex's name howd i do that?
i assume changing every instance of one word is as simple as going into his events and replacing the words
I'm actually surprised CP doesn't have checks for it, but I guess it doesn't expect that to happen
😔


Name changes are not fun
Unless there's some easy way I am not remembering, changing a name means editing lots of events and lots of dialogue.
...i must........ for the meme
I don't think so? couldn't you just change his display name and not the internal name
gotta try to upload at nexus then
Ohh oh
You have to change it in all dialogue referring to them, all events where their name is spoken, in Data/Characters, and in Strings/NPCNames to fully change them, but you also have to be careful to avoid changing the "internal name" which looks identical
oh god
Nightmarish
You can do a "find in files" but you can't just do a "replace all" because of the internal name thing.
I am doing this for the Zelda mod, maybe I will go forward with changing all the names to dynamic tokens for the base files and then share those edits later as a public service
I know how irritated I was when I was going through trying to test to see if I could use Mr.Qi as a base NPC instead of erasing him and using my own (aka going through my OWN files and changing everything) let alone THAT
For context, Feminizer does this, and it has to sraight up replace entire tilesheets
(Which means it's actually got compatibility issue with 1.6)
😭
you know what fine. ill just let other people replace his name for immersion.
entire tilesheets?
horrifying
I am doing it for every NPC for zelda mod, pray for me xD
What name stuff is on tilesheets?
( I finished dialogue pre 1.6 already, at least)
That's map related
because when they did it, they also replaced event IDs it seems
since I got a few event IDs again
you know, all these npc replacers now make me think "wouldnt it have been easier to just make a custom one"
pfm still supported on 1.6 right?
technically? but what do you need pfm for
Yes! But you can do most of ehat it did with CP alone
you can use with CP alone now?
yes
gotta check CP notes then
you can largely replace a lot of stuff that JA and STF did straight up
if I was more interested in modding I'd probably be looking at porting some Solid Foundations stuff, for example.
(Is it a framework? I don't know. But it's a great mod that allows for awesome new stuff.)
(read: willing to work out exactly how to change over.)
that is crazy
I wish I was more inclined to patch AT into working properly with a few things myself. <_<
Furniture Framework might handle stuff Solid Foundations used to do? I don't know enough about SF
(like fixing the fact that ducks can't swim with AT installed.)
I did see BETA... some of the trigger actions seem very nice
also at least the new frameworks add some interesting/unique things instead of being like... what you need to add more base game adjacent things to the game
I think one of the really nice things about the 1.6 update is that a lot of frameworks that just did base things were no longer needed
Button also takes requests sometimes so you can get new fun ones too
my mod are actually use pfm and ftm back then
one is for modifying the input output and one is modifying the list of foraging items on map
FTM is still utilized!
Well FTM is still very much in use
ok im trying to understand how changing the events in cp works
do i add the separate event json (aka alex events) and then what do i call in the main json file?
You don't need to have a separate json if you don't want to - includes are just for file organisation.
But if you do want to, then you'd just use an "Action": Include" code block in your content.json
For actually editing the events, you will want to use uh...TextOperations probably so you're only editing the one or two fields in the event that matter rather than replacing the entire event.
I throw ReplaceDelimited out there as well because I saw Button talking about it but I am not familiar enough with it to know how helpful it would be here
so if all im doing is changing one line from the event to play a different song, what do i write in the content json thats what im confused about
Huh. This is weird. The item is present in the files, but for some reason Bundles is throwing a fit. Why does it think it's a prize machine. 🤔
Something like this, I think #making-mods-general message
(starting) music should always be field 0 so it's a pretty durable edit
welp, reported it to CP (Because the null handling is CP) and.. Passerby Cemetary because I think that's probably where that comes from
.. I'm not sure if I should report it toUnlockable Bundles.
The change solo wants to make is to change the music played by Alex's music box so it isn't the first field
yeah im reading into it and i got half of it right, its more about the field im struggling with now
Are you trying to work on a mod of your own or just experiencing this while playing?
What part are you struggling with?
oh no, it's looks like 1.6 is impossible on mobile without xnb?
You want to put the number of the field (to get that, count the number of bits between the forward slashes in the event, starting with 0) to replace the 5 and then inside the quote marks you put playMusic REPLACEWITHDESIREDMUSICID.
Uhh what's the mobile SMAPI command
!mobilesmapi
Not that
!androidsmapi
There is an unofficial port of SMAPI for Stardew 1.6 to Android. Please see the wiki instructions for more information.
IMPORTANT: This is a highly experimental build and may be prone to glitches, bugs, or incompatibilities. We are not able to provide support if you run into trouble or compatibility issues; please use the discord linked on the Android SMAPI github.
Do not harass mod authors to make Android specific compatibility patches.
so bits you mean the text between the backslashes? as in /the text between here/
There we go. See Governor's message.
Yes
Those are forward slashes but yes, that is what I meant.
For the backslashes
ok, and i count from the start yes?
Yes, starting from the word ocean (make sure you count that one as 0)
I got to 33 but I wasn't counting very carefully
When you hop in game you should be able to put patch export data/events/beach into the SMAPI console to export the event json so you can see where your command ended up
Experience. I'm too lazy to mod it, which is why i'm just reporting it
That's fair. Fellowclown is pretty new to using UB but hopefully it will be an easy fix on his side.
yeah, that's what I'm thinking
I kinda want to make a mod but I tried to code in C# yesterday and had to retrain myself from python
I have been finding it really hard to pick up on how C# does things because it's so alien to me compared to R.
ok smapi isnt angry at me anymore so hope i did it right
Did you do the patch export to check?
Honestly I think R is a very weird language, so I don’t think this is terribly surprising
I haven’t written any R in years, but I recall it being pretty single-minded about stats
It is! Which made sense for me because that was my job lol
But I find R lovely
What I have experienced of Python was also enjoyable
C# makes me angry lol
yup and it seems to have gone in the right place!
R seems to me like one of those languages that seems to have be designed for people who don’t work much with other programming languages (which is fine! each job has its tools)
now... to test my masterpiece
Awesome! Just in case you don't already know, you can use debug ebi 288847 to start the event without needing to fulfill any of its conditions
My experience of the context in which I learned it (psych degree) would agree with that lol
I do like python, even if it’s deeply cursed sometimes
hmmm ok
The people who work with R also work with SAS or SPSS - other stats languages
its time
you are my new favourite modder
That's fun. Got a bug report about a menu not loading. Look in the log? Clear evidence of the menu loading twice. No errors. 
this stupid mod is going to evolve until i eventually go so crazy i just straight up turn alex into troy completely
“not working” is used in such a weird variety of ways, to mean anything from “there’s a massive bug” to “I don’t actually know what’s meant to be happening but I thought I’d know it if I saw it” 😭
yeahhh .. yeah
But also "large chunks of it are working as intended but the NPC is in the wrong position by one tile"
Alternatively- it is working as intended but it isn't compatible with [insert any mod here] and that means it's NOT working
the joy of publishing code or tutorials online is deciphering what each person means when they say it… 
had one of those from someone who didn’t even test first, just saw my mod and made a list of mods they assumed wouldn’t be compatible with it that should be added… they were all already compatible
I installed your mod "purple shane" and now shane is purple, fix it now
i accidentally uploaded it twice andn ow nexusmods is mad at me so uh. hopefully this solves itself
I've seen someone going around leaving comments like that
very "helpful"
they are no longer mad at me
Your npc overlaps once with this really niche solo npc mod that hasnt been updated since 2021, this is unplayable
The largemouth bass is missing a pixel
Also plz, the slime eggs are different heights
omg
Lol, modded users can be whiny little shits sometimes
this mod conflicts with another mod that changes the exact same thing in a contradictory way, fix it do I can use them both
when i first got into modding it was minecraft and i was just told if it breaks assume its your fault
ive stuck by that mentality since
this is killing me about the vpp+wol comments
(I've gotten a report that the user couldn't find my mod in the mod manager mod list because they have too many mods.)
so are the chicken/duck eggs
Hey Barley, i have some questions. I'm tagging cornucopia's upcoming recipes for allergies; are there any cornucopia-specific context tags you want me to use? Such as allergen_soy, allergen_peanut, etc. I was going to do them, but I looked at your example content pack for cornucopia and it looks like objects are individually patched into allergen data rather than using a specific context tag ?
let me check, it's been a while haha
Np! Not urgent
Exactly my impression
Which makes sense
To me
If your job is a statistician it's not necessarily very helpful for you to know a bunch of programming languages
someone should make an extension to Automate that on the surface “makes it even more flexible” but is actually designed to add whatever automate is missing for being turing-complete
I think I once tried to make a connector version of hoppers that would probably have helped
i think automate should be able to pass the turing test
I barely pass the turing test
tl;dr: The cornucopia allergy pack adds "peanut", "almond", "cashew", "pecan", "pistachio", "walnut", and "soy" as supported allergens. The mod supports context tags to add an allergen to an object, so allergen_pecan on an item makes it have the pecan allergy. When the recipes are out, I'll take a look and make sure my pack reflects your context tags too.
The mod checks, in this order:
- was it crafted, milled, cooked, machined (etc.) with any allergens?
- for some reason preserves items are a special case so it checks that next
- does it have an
allergen_{id}context tag? e.g.allgergen_glutenorallergen_egg(these work if the allergen with ididalready exists in theBarleyZP.BzpAllergies/AllergyDataasset, otherwise it does nothing. The base mod provides"egg","gluten","fish","shellfish","treenuts"/nut,"dairy", and"mushroom"as allergen ids. The cornucopia allergy pack adds"peanut","almond","cashew","pecan","pistachio","walnut", and"soy".) - Check the asset
BarleyZP.BzpAllergies/AllergyData, where items are explicitly given allergens (which is the asset my Cornucopia allergen pack edits).
My Cornucopia pack works as an actual content pack for BzpAllergies, so it edits the BarleyZP.BzpAllergies/AllergyData asset. I've built more complex features such as providing exceptions to allergy rules which I take advantage of.
Oh that's great. I wasn't sure if the allergen_ tags were respecting your custom tags, so I'm glad to know that those work together and I can just tag the items specifically. I can add the tags to More Crops as well to match.
So the treenuts tag is allergen_treenuts not allergen_treenut?
Yes, allergen_treenuts, plural. At this point i'm stuck with that inconsitency haha
(is mushroom allergy a thing? I didnt realize)
From what I read, it's pretty uncommon. But I wanted another allergy to add to the list, perhaps because of the one time I ate mushrooms and my tummy hurt >:(
😭 im allergic to the weirdest things
Out of curiosity, whats your categorization on bug meat?
I went back and forth as tagging it shellfish, but ended up not making it an allergy
someone that was allergic to grapes commented so there really is an allergy for everything I think




does the trout derby have its own shop entry
