#making-mods-general
1 messages · Page 454 of 1
oh yeah!! stats exist
you wont be able to use the stat in When conditions (again though, Esca's Modding Plugins can allow that) but if you're only using it in dialogue and not conditional patching thats no matter
huh, okay, little confused but I'll look into that
(if it's for rough checking (like stat is more than x, trigger action to set a flag is doable too)
then you're back to hardcoded checking for every year
..very confused rn one sec
if you increment a stat called MarriedToSpouse every year then you can put [FarmerStat MarriedToSpouse] in dialogue and it'll be replaced with what the stat is
oh you can make custom stats?
hmmm interestingggg
my brain has most unfortunately been turned into a blob of tapioca, but I will save that for when i regain the ability to think!
thanks so much buttons!
this stuff then?
yup 
perfect!
!2020
That was five years ago, mate.
I think I have the power to make commands at my level and such. I just refuse to acknowledge and confirm that power because I know me
Hi everyone. I've a short question about Priority and Dependencies. Let's say I want to change the value of the apple object. Mod A now has a priority of Default+2. Mod B has a priority of Default+1, but also a dependency on mod A. Which change wins? (I'm assuming a higher priority means later in the load sequence, please correct me if that is wrong)
The Priority change will win.
sorry to keep asking dumb questions lol, but how can i trigger mail to send when a convo topic expires?
(very off-topic and random but I love your username)
for now you'll need to also set another mail flag at the same time you start the original CT, like startedMarriageCT or something, that way when it expires, you can check that the player does not have the CT and has the startedMarriageCT flag
if you just set it to fire when the player did not have the CT, then it'd fire immediately because they dont have the marriage CT at the start of the game, ofc. you also need to know that they did at least get married
hey, quick question, can I force a fishing minigame with a legendary fish speciifcally?
Isn't there a debug command
if you dont want to support divorce you can also just check that they have a spouse, too, if you want
in 1.6.16 you'll be able to check a players previous CTs specifically though which can replace the need for that tracker mail flag, but thats obviously not released yet
gonna send my code here eventually!
that's normal, go back to your game
do you have the fishing rod
yeah it starts fishing a random fish
it probably wants the item id, which for the Legend is definitely not Legend
aw shucks
163
That's interesting
. So a patch could not have any effect if you miss the priority field or it is introduced later with an update. Thanks.
Cat tax??
cat...
(am on phone, thanks forsy for the quick answer)
alright so I can't input that if the image it's being replaced with is 19x19 instead of 19x20 right
"ToArea": { "X": 615, "Y": 1841, "Width": 19, "Height": 20}
do you mean the source image
can you post the full code for context
Tbh
ALR I FUCKING DID ITTT
the dialog code thing:
{ //CS FILES
"Action": "EditData",
"Target": "Strings/StringsFromCSFiles",
"Entries": {
"Krobus_AfterWedding": "{{i18n:i18n_Dialog.Krobus.Special.MovedIn}}$t {{ModId}}.Topic.NewYearRoommated_Krobus 112#$t {{ModId}}.Topic.KrobusMovesIn 5#$action AddMail current {{ModId}}.Letter_FLAG.KrobusMovesIn received",
}
}
my trigger action code:
{ //YEARS ROOMMATED
"Action": "EditData",
"Target": "Data/TriggerActions",
"Entries": {
"{{ModId}}.Trigger.YearsRoommated_Krobus": {
"Id": "{{ModId}}.Trigger.YearsRoommated_Krobus",
"Trigger": "DayStarted",
"Condition": "PLAYER_NPC_RELATIONSHIP current Krobus Roommate, !PLAYER_HAS_CONVERSATION_TOPIC current {{ModId}}.Topic.NewYearRoommated_Krobus, PLAYER_HAS_MAIL current {{ModId}}.Letter_FLAG.KrobusMovesIn Received",
"Actions": [
"IncrementStat {{ModId}}.Stat.YearsRoommated_Krobus 1",
"AddConversationTopic {{ModId}}.Topic.NewYearRoommated_Krobus"
]
},
}
},```
aww :)
And not an item id
they're helping you code
they're helping casey code
You wouldn't qualify for a discord mod, you're literally kittenless
ye that's the first criteria
you are not kissing the shadow creature
aroace quing
NO ROMANCING THE SHADOW CREATURE!!
..what were you gonna do to the shadow creature /lh
how could you /j
i take this as a personal offence /j
lol yeah i lurk in this chat and happened to see someone who needed an item id
👀
I'm a prude yknow
but i am making krobus pretty physically affectionate lol
Thats cute
you're doing a fish mod right?
I mean I just wanted to replace the fishing bar fish so that it doesn't look so traumatized
And unfortunately the fishing bar fish is like 19x19 pixels, and all the other fish sprites are 16x16 and don't even take all the space they're given
So yeah some fishes look really smol
eughh
And also the legendary fish sprite is 19x20 for some reason
huh
oh are you making the game fish sprite match the one you catch?
Nah, just the one you pick in config menu
idk how the fishing game works lol
There's already a mod that changes the fishing fish to whatever you're catching
huh
But I like the intrigue
innnntersting
the mystery
Anyway what's that bot command to remind me to do things
i think it's just remind me
remind me in 10 hours to be an example
okay but only if the mariners get at least 1 playoff win in 2025 (#6927229) (10h | <t:1761641324>)
idk ive never done it
Remind me in 12 hours to fix my fish sprites and upload the mod
yeah whatever. leave the request on my desk. i'll get to it. maybe.
(#6927230) (12h | <t:1761648544>)
huhh
Yeah it's convenient
I like that this command doesn't require any special symbols
It's immersive lol
sssshshsssfhsfs (#6927232) (200d | <t:1778885457>)
just wanted to put this back down here lol
hmmmm is there a way to add a suffix to a stat in a dialog? i wanna make it show up as like '2nd' '3rd' '4th' etc.
my dialog line btw
"Reminder_Krobus": "Hello, @! It's only more one week until the [FarmerStat {{ModId}}.Stat.YearsRoommated_Krobus] 'anniversary' of my moving in with you!$1#$b#It's very sweet how humans celebrate such things.$7",
the line's for Kantrip's Wedding Anniversaries mod btw!
Hmmm not sure if there's a token for number plurals
There is not, at least not in vanilla
That said I'm not sure if you can use tokens with dialogue anyways?
what if you wrote it as " x year anniversary"
that way it wont need a suffix or anything
and works with any number
2 year anniversary, 53 year anniversary, 99999 year anniversary....
yeah, was just wondering if that's an option lol, thanks @gaunt orbit!
0 year anniversary, e year anniversary, ⅓ year anniversary, √-1 year anniversary,
yes
then the answer is: it isnt
hardcoded
noooo
i had a bad feeling it mightve been
it's ok i'll just... squint at the sprites and pretend i know which one is which
or i can just look at the wiki.
what do you reckon the "rare fruit" is
guessing hardcoded means the description/display name is too?
no, any user-visible text is always going to be localizable and thus stored in the content folder now
in this case Strings/1_6_Strings
look for Cook_ stuff
im not sure what you mean
the names are there, but there is no description
so if i want to make an item i'll have to write my own, it seems
oh. yeah, there is no description because you can never see it anyway
sweet gem berry?
but the displayname is not hardcoded
thats what i figured too. the seed you grow them from is a rare seed
(but since you can never see the description from the chef g uy anyway, it doesnt matter if you make up anything, since the player wont be able to see an "original" one anyway)
(i know, i'm going to make them real objects, so they need a description)
(so they're going to not even be the ones from the chef guy at festival, rather their own separate "bootleg" items)
thats what i figured, im just sayin it doesnt matter that the description (or lackthereof) is hardcoded, which is nice in this case
Oh, making a vendor like your concession vendor? 
yep
oooh cool!
oh btw is this coded right?
are you sure the player is guaranteed to see the AfterWedding dialogue?
uh hopefully? if they talk to krobus on the day they move in
but they dont have to
no reason to settle for most when you can go for all
just set up a different trigger action for the first DayStarted where they have krobus as a roommate
and change the second trigger action to DayEnding, mostly because i dont know the exact timing for when Krobus is considered your roommate
if the change is made overnight, then when the DayStarts Krobus might be your roommate before the wedding is over and you dont have the CT
so it'd fire too early if that happened
huh, alr
there's no wedding for krobus tho, they just break in
no cutscene at least lol
the relationship change happens in either the overnight stuff or the start of day stuff, i just dont know which
same deal i believe
@next plaza: try the above (22h ago)
alr! I'll screenshot that to do
so axtually i would also change the CT giving trigger action to be DayEnding too
but BEFORE the second one in your content.json
@next plaza: think about this too (22h ago)
Data/TriggerActions is a list so they will be checked in the same order they are written in your json
so you need to make sure the CT is given first ofc
oh i didn't know that
they should basically have the exact same condition i think just the second one checks for Not having the CT
engagement and roommate status is set immediately on proposal, but marriage (and by extension actually rooming) is only set immediately before the wedding event itself
thank you so much for all your help 
in that case then the DayEnding on both should indeed be the safest. i will file that detail away in my memory banks
thank you booberry aka blueberry aka bluebs aka blbry
(formerly rhubarb)
aka (formerly rhubarb)
oh dear, something went wrong with hot reload. For some reason it now says one of my types doesn't exist now
oh vs's cache is just broken
oh phew
probably because I killed all of the dangling devenv processes bc they were eating up like 3gb collectively
seriously why does it not shut off when you close it like half the time
(vs' orphaned processes are really irritating, especially with the build error from them holding a lock on the dll)
uhh having an issue with nexus, tryna upload a mod and I keep getting this message? attached my mod name too, idk why it's rejecting it??
it says brackets, but it means parentheses
"brackets" is british for ()
ohhh okay
see https://en.wikipedia.org/wiki/Bracket for more fun facts /lh
god i love wikipedia-
I also did not know that Nexus only accepts parentheses and not square brackets. I was extremely cross when I found out.
ok modded stardew is chaos so im gonna ask here as a mod author XD
🤔 shld i have recipes for my items be an optional file or should i make it part of the main file, but as a config option instead?
Might have something to do with square brackets being used for BBCode? (for why Nexus won't take them in the name)
i would check the behavior re: perfection requirements before deciding. if changing the setting mid-game makes something fucky, i would do an optional file instead
oh... hm yeah ok
other than that, if i were doing it i'd probably do a config. anecdotally, users prefer fewer downloads
does the decompile repo on github include the android version of the game, or desktop only?
you could also bundle it as a separate file in the main zip, i guess, but then you need more readmes and so on and it's probably not worth it
although I suppose the source is not very useful without the il anyways
YALL I FUCKING DID IT!!!! https://www.nexusmods.com/stardewvalley/mods/38898
i think its only the PC build? dont 100% quote me on that though. do you need something from the android decompile in particular?
It says it's only the Windows one, yeah
well I want to port the item combination code from MUS and Happy Home Designer to android, which involves figuring out how android handles equipping bait to fishing rods. The code for the method is different than on desktop, but more importantly, I'm not sure if the method is even called on the android version
that is, InventoryMenu.rightClick on desktop
😅 i forgot how to math... so the "Duration" for buffs on objects is measured in in-game minutes, but like... how. will putting a duration of 1 mean it last for one in game minute?
if (slot is Tool tool && (toAddTo == null || toAddTo is Object) && tool.canThisBeAttached((Object)toAddTo))
{
return tool.attach((Object)toAddTo);
}
this the part in question?
(from the PC decompile)
I'm adding my own check but yeah, that bit
just before that if
this, roughly
if (TryCombine(ref slot, ref toAddTo))
return toAddTo;
if (slot is Tool tool ...)
hm main difference in android seems to be that it never creates that slot local and just keeps calling this.actualInventory[num] (where num in android is slotNumber on PC)
do both MUS and Happy Home Designer use the same transpiler for this
pretty much
HHD doesnt have source linked smh /lh
IT IS LINKED in information for modders
the article? i dont see any link there
(also ill admit i dont know what MUS stands for)
huh? let me double check
oh you're right, I thought for sure it was on there
I'll have to add that
(You can ask Pathos for access to an android decompile)
so I have done that, based on NRT's fixes, but NRT's fixes also include some nonsensical code that shouldn't work at all, but apparently it runs fine, so I suspect that the code is never actually called
that or people have just never tried using the feature and thus have never broken it
ILSpy is telling me that it is
InventoryMenu.receiveRightClick calls it
which is called from various update functions
is your transpiler failing to match or just spitting errors when a user tries to attach
or just. doing nothing
(also MUS is Machine Upgrade System, the drop-in upgrade thing used by Nach's mods)
previously it was failing to match, now I'm not sure. I haven't been able to get people to actually test it
NRT ghosted me when I asked if it worked
if its the version on nexus and i dont need to compile anything myself i could test it rq
I have a zip just gimme a sec
in theory all of the patches applied on this should work
ill report back soon after i figure out my mess of cables
thank you very much
I'm back reading a bit, but this is for Android modded sdv? I play the on my phone modded, I can test it for you if you need help
please do! the more the merrier
Ok give me sec
oh i cant even launch with it cuz the manifest needs a higher SMAPI version than exists for android lol
(i know i can change that myself rq but figured you'd wanna know that, too)
what do i need to do to test it? just attach anything to a fishing rod?
try to "attach" a catalogue to a furniture catalogue
if it works it should combine them into a new item
(though even if that doesn't work, I'd be happy with "runs at all on android")
Log Info: SMAPI v4.1.10.3 - 1735840167 with SDV 1.6.15 build 24354 on Android Unix 34.0.0.0, with 6 C# mods and 12 content packs.
It said it failed to load
i can attach a bobber to a fishing rod but trying to attach the Joja Furniture Catalogue to the Furniture Catalogue does nothing but swap inventory places
oh i do see an error in the log actually one sec
Log Info: SMAPI v4.1.10.3 - 1735840167 with SDV 1.6.15 build 24354 on Android Unix 36.0.0.0, with 4 C# mods and 0 content packs.
No specifically the wallpaper catalogue and the furniture catalogue
Hmmmm
MOD number 2 reworked and back to working state with 1.6. Only a few more to go. 😄
tried combining the other catalogues anyway and yeah, nothin
@uncut viper @livid kite
not sure why it thought the opcode was invalid but I swapped the stloc_s for a stloc
and fixed the manifest
I made a check in my IUCT fork checking if any child's name is any out of a list of names set in the ConfigSchema - But instead of checking for children with those specific names, the loops checks for ANY children regardless of name!
(The check is intended to have the Wizard's children using a different set of dialogue (to check for who is the Wizard's children, there is a list of config-able names in CMCM (that I set up via the ConfigSchema)
How to fix?
Log Info: SMAPI v4.1.10.3 - 1735840167 with SDV 1.6.15 build 24354 on Android Unix 36.0.0.0, with 4 C# mods and 0 content packs.
The condition is:
"ChildNames": "{{WizardChild2}}, {{WizardChild4}}, (...), {{WizardChild12}}"
(In my case with the config-able names, even-numbered names (e.g. "WizardChild2") are meant to be the names of MALE children with the Wizard, and odd-numbered names suggest otherwise)
if you push your most recent changes to your repo i might be able to take a look if i have some time before you get to it, if you'd like
Is this condition check correct so it would check for children with names set in the config menu?
It's working so far for me. Need to download some mods to really see
Any errors in the log?
Log Info: SMAPI v4.1.10.3 - 1735840167 with SDV 1.6.15 build 24354 on Android Unix 34.0.0.0, with 7 C# mods and 12 content packs.
I'll download some mods that require happy home and see what else pops up
if you send the full json in the json parser I can have a look, but like button told you yesterday, content patcher doesn’t do loops like that
How can I use the JSON parser?
!json
JSON is a standard format for machine-readable text files that's used by Stardew Valley mods.
If you need help with a JSON file, you can upload it to smapi.io/json to see automatic validation and share the link here.
When making mods, it's recommended to edit your files in a text editor with JSON support, such as VS Code, Notepad++, or Sublime Text. These programs will check for syntax errors.
(forgot to reply)
Can someone help?
with?
Its doing this when I open my sprites to edit on my tablet
what is “it”? what app are you trying to use?
@gaunt orbit can i ask what you're intending to match on here? whats ret supposed to be in the PC decompile?
// find return point
il.End()
.MatchStartBackwards(new CodeMatch(OpCodes.Ret))
.MatchStartBackwards(new CodeMatch(i => i.operand is LocalBuilder));
ret = (LocalBuilder)il.Operand;
il.Start();
does it require to create a whole mod to execute smapi commands in a starting file? or can this be done within an already existing mod, like a built in feature? for instance, a custom farm and have the player start with a custom amount of hp/stamina ?
Pixel studio t.t
And it's the sprites
For any of them
Iro was asking what was happening
It looks like they're duplicating
Try downloading another app
that doesn’t look like pixel studio tbh
关于 NPC Map Locations 这个模组 我下载了N网源码 然后尝试打包发布 控制台老是弹出跳过模组信息 , 而且也是最新版本3.4.4 ,所以请教各位专家帮忙看看到底是什么原因 谢谢!!!
I have both medibang and pixel studio and it's doing it to both
Tablet cursed...
The issue might be in how you're transferring it to the tablet, maybe? Do you have a computer you can open the files on?
This server is English-only, sorry! Can you access the mod here on Nexus to download it? https://www.nexusmods.com/stardewvalley/mods/239
Yup but I rarely have access to as my husband 😅 bless his heart hogs it
You could upload one of the files here and one of us could try it to see what happens for us?
@hard fern this is what the desert festival food guy uses:
600 * Game1.realMilliSecondsPerGameMinute, i.e. 600 * 700
I can try when he goes to work on Wednesday
pretty sure that's in milliseconds though and i'm not sure what units your thing is in
Hmmm
General question 🤔 do i have to code what a new furniture piece does? Or say i wanted to do pet clothes that u can change on pets or would I just use the mechanical structures of what hats do
The wiki doesn't say anything about what units "duration" is even in
For buffs
It just says "in in-game minutes"
But that's really confusing
Why not just try setting a buff duration of 1 and see what happens?
15-17 mins is about a day in stardew I think
Don't know if that helps?
(In-game minutes is the unit. If you get a 10-minute buff at 6am in-game, it'll expire at 6:10am.)
If you want your new furniture item to function the same way that a vanilla one does, you just make it using Content Patcher with the type that you want (like table or decor). I'm not sure about the pet clothes - I don't see anything on the wiki about being able to edit pet hats without C#.
ok so you want 600 for 7 irl minutes (matches desert festival food guy buffs)
关于 NPC Map Locations这个模组 我是将源码打包发布 最新版本号是3.4.4 但是老是跳过模组 就是不知道什么原因 请大佬解决下 谢谢
im never making food with buffs again
(You will get told off by the moderators if you don't switch to English!)
there might be a misunderstanding here, so just to be sure: furniture has nothing to do with clothes or hats
Having discussed it a few days ago, I don't think any frameworks offer CP access to console commands. But:
- There are frameworks that can spawn buildings, though I forget which one(s) do that offhand
(Edit: Spacecore can add new farm buildings at creation: example) - BETAS adds trigger actions here that set current health and stamina, though I'm not sure if any frameworks let you directly set maximums
(PS Sorry if I misread; if your question was just doing it without any separate mods, then no, I don't think anything offers that)
Why are you doing anything with the source code anyway?
but there's a custom for custom pet hats (or custom pets with configurable hats? Can't remember), that should be usable to make clothes for pet in general
Regarding the NPC Map Locations mod, I have released the source code in a packaged format. The latest version number is 3.4.4. However, the mod keeps getting skipped all the time. I have no idea what the reason is. Could some experts help solve this issue? Thank you.
Like I said, why are you touching the source code? Can't you download the latest version of the mod from Nexus or Github?
I think you need to make a thread in https://discord.com/channels/137344473976799233/1272025932932055121 if you want help using a mod. Go there and make a post with your log. Maybe your SMAPI is not up to date.
This problem has been bothering me for a long time. Mainly, I re-packaged the source code and tried to release it to see if the console kept showing the message "Skipping module", but I still couldn't figure out the reason. The SMAPI is the latest version.
Are you playing on Android?
No, it's the client side.
client side, as in you’re a farmhand in multiplayer?
I wonder if u could add it like player clothes but to animals 🤔
?
What i wanna do is use player clothes and add them to animals
that’s definitely c# territory
You could make new hats, but I don't think you could control where on the animal they would go
there's a framework for that for sure.
Omg 😲 thank u! I just basically use that frame work and give credit
It's not the multiplayer game issue. The latest version number on the official website is 3.4.4, but it still skips the mods. I have no idea what the reason is.
You don't really have to give credit because that mod will be a required dependency for yours so players would have to download it
@gaunt orbit update on this: the reason i asked is because on Android, the instruction you were taking the operand from was an ldloca.s 0 which seemed incorrect to me, and it was the reason Harmony was yelling at you since thats not a valid thing to Stloc to. on PC, it takes the operand from the 2nd to last instruction, an ldloc.s 4. on android however that second to last instruction is ldloc.3, hence there is no LocalBuilder operand to grab because its not using the .s version, so your MatchStartBackwards was going back to the ldloca in the finally block of the enumerator. I did make changes to fix this so the transpiler is properly patched on both PC and Android accounting for this, and I could submit a PR for that for you if you wanted, however the issue now is that the fusing still doesnt work and it beats me as to why 🤷♀️ the TryCombine function aint being called
but also all that said... are you sure this even needs to be a transpiler? since you're returning if TryCombine is true anyway, surely this could just be a prefix?
what do you mean by client side then?
What do u mean?
I think this will be easier if you can send us a log. Can you go to this website: https://smapi.io/log and follow the instructions to upload your log and send us the link?
If you want to make clothing for animals, you have to download that Pet Clothes mod and make a content pack for it. In your manifest, you would list Pet Clothes as a required dependency. Then when you upload your mod to Nexus, people download your content pack and Pet Clothes.
Let's have a meal first. Then we'll discuss the bug issue of this module later.
So you certainly can give credit to Erinthe (aedenthorn) for Pet Clothes, but your mod page would also link directly to the Pet Clothes page in the pop up that lists the required mods when people tried to download your mod.
So I would use the listed json for cp and use them in conjunction?
Anyway, it's not the Android version. Friend
I don't know what that means, sorry
Cp= content patcher .json is the file that use to indicate what sprite to use etc
Or the manifest
I know what those things are, I just don't know what you meant with your sentence. Do you know how to write Content Patcher mods of any kind?
Kinda ? I've done one and half? So I understand there is a manifesto for each sprite. Or u could in theroy combine them. I know u throw it all into a folder with the sprites themselves and upload it.
No, there is not a manifest for each sprite. There is a manifest for each mod, even mods that have no sprites.
Uh then im confused then?
Yup me too
Have you read the beginner's cp guide
Try having a look at this page. It explains what manifests are and what each of the fields in them do: https://stardewvalleywiki.com/Modding:Modder_Guide/APIs/Manifest
(But don't click on any of the links in the box on the right hand side of the page - they're all for C# mods and will further confuse you)
Each content pack has one manifest.json file (which describes the whole mod) and a content.json file (which specifies the changes you want to make, like custom sprites). The Modding:Content Patcher page has an intro to the general concepts specific to Content Patcher.
Yes. Doesn't mean I understand any of it other then me my brain going ah I can reverse engineer this thingy to get this output
Brain worky backwards.
i mean, i guess you could study other mods that do similar things to what you want and have the wiki pages aba and pathos linked to cross reference
Unfortunately there aren't any mods on Nexus using Pet Clothes yet lol
But Erinthe made an example content pack so you can just download that
And change the values to what you want them to be
(Hi Pau!!!!)
do local tokens work with data that's in strings? Like recipes/furniture
im not really sure what you mean but the only major difference between local tokens and any other token is that local tokens only work in the patch you put them in
but otherwise theyre literally just tokens like any other
All of them use the latest version 4.3.3.
I'm wondering if the source code can no longer be used for packaging and testing purposes.
Why are you using the source code?
There are no restrictions on the source code; the released version is just a compiled version of the public source code.
If you upload your SMAPI log file to https://smapi.io/log and post the link here, we can see why it's marked incompatible.
I just downloaded the source code from here and compiled it and it worked with no errors. (My SMAPI version is different but it's based on 4.3.2)
This is probably a silly question but it's been a while, but is changing festival dates something that can be done with just content patcher? I know there's a data file that holds them I'm just wondering if that's actually alterable in a meaningful way or if it has to be harmony all the way down.
Trying to make a mod that adjusts festival dates to better match settings from the longer seasons mod though I guess month settings in there wouldn't really be accessible with only content patcher.
Kind of. You can change festival dates with just Content Patcher, but the festival date is also the festival ID (e.g. spring13); so that'll break all the hardcoded logic for the festival that's not strictly in the festival/map files.
hell

So it's a mess of harmony not matter what... Oh joy.
I was hoping this would be easier than it's turning out to be.
Whatever more important that I get it figured out. Festivals are the biggest issue of the longer seasons mod the choice of Moonlight Jellies twice, or before the actual end of summer is just kinda sad, and let's hope passive festivals don't end up requiring altering everyone's schedules if moving the date.
I guess maybe I can settle for something less configurable than I would like.
dont forget dialogue that references vanilla dates
We suffer for the asthetic of a fall start with extended seasons and thusly shifted festival dates.
, dialog...
Add it to the pile.
I'm going to make this work, but I also understand why nobody has yet ^^
I simply re-downloaded the source code and performed a test packaging. However, VS reported this error. "Skip module" was the issue.
Can you please do what Pathoschild asked here #making-mods-general message and share your log with us?
im assuming also you dont care about compatibility with many other mods
Ideally the onus is on festival adding mods to integrate with longer seasons.
not festival adding mods. mods that check the dates of vanilla festivals
oh yeah.
Odds are I'll hit the big name expansions (SVE, East Scarp, Sword and Sorcery) and probably not individual NPC mods.
Though I'll probably try and make it easy for other devs to supply me the info to integrate such properly I'm just not willing to the digging
its not just NPC mods, i just singled those out bc those are quite important. any number of C# mods can do things based on whether its for example specifically spring 13 or not
The source code itself has no issues. However, as a junior developer, I need to test the source code. When debugging the game, it prompts to skip the module. Regarding this problem, I have no idea why it occurs. Moreover, I can't view the logs either.
im not saying you have to care about compat either, i dont think many people care about compat for longer seasons, i just was assuming you did not care either 
(by that i mean i think if you install that mod you kinda probably know what you're getting into. though admittedly, your mod would be changing more things about it)
Can you take a screenshot of the error VS gives you?
(The screenshot won't show much. The log file's TRACE messages will show exactly why SMAPI considers it incompatible.)
The version numbers are all the latest 4.3.3.
That is not a screenshot of Visual Studio. You said Visual Studio shows an error when you're trying to debug.
(Yeah but we have asked them for a log four times now so I don't think it's ever coming!)
Goal of the mod is to polish the play flow with longer seasons so it plays more like normal just on an extended time scale, extra NPCs are sorta out of scope, but considering I usually play with East Scarp and Sword and Sorcery, and some others. So I'll probably intergrate the stuff I'm using myself which makes it hard to excuse not handling the occasional specific request.
Basically compat isn't a big priority but I'd like to avoid breaking stuff with big names if I can. (This is rapidly turning out to not be the quick cute cozy fall start project I was trying for.)
During the debugging of the vs project, the console displayed this. It skipped the module, which means no detection was performed. We don't know exactly what caused this.
Please send us the log file. We need that file. You can upload it here if you can't upload it to smapi.io/log.
I just can't find where the log file is. Help, guys!
That screenshot I sent shows you where the log file is
Found it! How do I upload this log file? Expert!
https://smapi.io/log Follow the instructions on this page
Log Info: SMAPI 4.3.2 with SDV 1.6.15 build 24354 on Microsoft Windows NT 10.0.22621.0, with 5 C# mods and 0 content packs.
"Broken code in NPCMapLocations.dll: reference to System.Runtime.InteropServices.CollectionsMarshal.SetCount (no such method)."
Also interesting that the assembly version is 1.0.0 instead of 3.4.4. Looks like you recreated the project, possibly with a different .NET version?
Would seeing their csproj help, Pathos?
Well, you shouldn't need to edit the project to build it. So I'd be curious to know why they needed to, or if that was a mistake?
How can we solve this problem, sir? I want to test the successful packaging to see the situation.
I had to edit mine because of my non-standard game and mods paths, so maybe they did the same given that they have a very weird install path?
You should be asking Pathoschild. He's the owner of the mod haha
Wait the method that it's attempting to use that's not compatible is only in .net8+, how did NPC map locations which should be .net6 use it
Yeah, I suspect they recreated the project with a newer .NET version. We do need to use .NET 6, since that's what the game and SMAPI use.
Did you change anything in the project before building the mod?
I just downloaded it, opened the csproj to add my game and mod paths, and then pressed this button to build it and run the game.
Might be worth adding some logic in modbuildconfig to guard against the target framework having a mismatch
(I did, in fact, forget that you can build a mod without running the game from VS lol)
Particularly as .net6 sinks deeper into end of life, more people will try to use newer versions to get warnings to disappear just for problems to show up
The upgrade from .NET 6.0 to .NET 8.0 has been completed. The C# syntax also needs to be updated to version 12.0. 10.0 is the syntax of .NET 6.0. Otherwise, the project will encounter errors.
You can't upgrade to .NET 8.0. Stardew must use .NET 6.0.
You can use newer language versions (12) without the target framework bump
Not all of the shiny stuff will be available, but most is
Although I am a little hazy on what part you can change. Is it this part in the project setup that has to be net 6 but then you can put a line in your csproj to let you use language version 12?
I've never tried because I don't know enough C# to understand the differences in framework version or language.
Does C# 12.0 also support the syntax of .NET 6.0? friend
Framework version is all about the libraries that are available, and some runtime behaviour available.
Language version is about governing the language syntax that the compiler understands
the other way around
C# is the syntax
but yes, you can use C# 12 with .NET 6
it does suck that Stardew/SMAPI is stuck with .NET 6, especially with .NET 10 on the horizon
Those guys, simply changing the framework from .net 8.0 to 6.0 should solve this problem, right? I wonder if there will be any grammar errors.
it should be fine
I do have on my to-do list to revisit my old poc of smapi running on a newer .net build than what stardew ships on.
I had it mostly working ages ago back in the early 1.6 modding alpha which was running on .net 7, and mostly everything worked except audio
(I still have no clue why they are even trying to build NPC Map Locations from source instead of downloading the already built mod. Maybe they want to edit it?)
Want to expand the mod and add some other functions
Why isn't .NET 9.0 compatible yet? Guys, isn't it supposed to be the latest version?
Because games old and physically cannot be made compatible
.NET 6 is what Stardew Valley is built with
SMAPI uses that same .NET, it does not bring its own
(this is the thing SinZ was talking about - it could potentially bring its own, newer version)
.NET 7+ removes support for some older versions of Windows, and ConcernedApe wants to keep it
I can't really imagine why it would feels like it risks causing a whole lot of other problems plus the problem of not being compatible with all vanilla installations feels like a mistake for modding
most notably SMAPI download would get huge, or need to be split on a per-platform basis
actually i'm having a hard time understanding your message Silver lol
interpunction would do wonders for it
The main SMAPI should not be updated too frequently. Otherwise, constantly having to go to the official website to download the latest version would lead to various incompatibility issues and errors.
.net major updates that bump the framework version are released annually in November, with every even version (and by extension every odd year) being the LTS version
It would yes however brain is half asleep I shouldn't be talking techicals anyway
Microsoft has abandoned it.
For the most part the game moving to a newer version isn't that hard, it's just that .net6 is the last build that had support for windows 7, and bumping the version loses it (even if none of the store fronts support win7 anymore already)
It was because I saw this that I upgraded to version 8.0.
you can still have a newer .NET installed for mod creation purposes
but your project has to "target" the old version
With .net versioning, the executable assembly sets the upper limit of version and everything needs to match it or be a lower version.
Ie vanilla is .net6 so libraries like xtile could be .net5 or .net6 but can't be .net8
In modded stardew, smapi is the executable and currently for simplicity it's .net6 which is loading stardew and it's dependencies.
But also loading the various mods, so the mods must also be .net6 or lower to function
So for executable projects, you ideally want to be the largest version possible that you are comfortable with to have the highest performance and best support available.
While library projects want to be on the oldest version they can get away with to maximise compatibility
(Mods are in the library case)
This means installing two SDKs, one with the lower version 6.0 to maintain compatibility, and the other with the higher version 8.0 for later expansion and maintenance purposes.
You only need the newer SDK, the newer SDK knows how to compile to older target frameworks
Same with the .net runtime itself, the newest runtime knows how to run older code expecting the older version
However, many current mods use C# 12.0 syntax. So, we would have to upgrade to .NET 8.0. Otherwise, the C# syntax in 6.0 would cause various errors.
No
C# Language version, and the and the .net target framework are independent variables
you:
- install .NET 8
- set your csproj to .NET 6
- set your csproj to C# 12
and that works
<TargetFramework>net6.0</TargetFramework>
<LangVersion>12.0</LangVersion>
and your installed .NET 8 can compile that just fine
OK, I understand. Thank you all for your opinions and suggestions. Thank you very much. I'll be testing now.
🤔 is it possible to nest local tokens? Like i want to have {{BASE}} and {{SAUCE}} and then say {{BASE}} is {{BEANS}} that'll then turn into the actual value i want... or
should i just skip the first set of local tokens and go straight to {{BEANS}}
I think you can, but I don't think you can nest them if they are defined at the same scope
hm...
You can have a local token that's a config or dynamic token though
If that's helpful
oh, that might work
i can have my {{BASE}} local token that then i can put {{BEANS}} which is a dynamic token
Successfully solved the problem. Thank you all, esteemed colleagues.
Yeah
!json
JSON is a standard format for machine-readable text files that's used by Stardew Valley mods.
If you need help with a JSON file, you can upload it to smapi.io/json to see automatic validation and share the link here.
When making mods, it's recommended to edit your files in a text editor with JSON support, such as VS Code, Notepad++, or Sublime Text. These programs will check for syntax errors.
hi there! i'm trying to create a hat content pack, and i currently created a ribbon (it's still a wip so for now the only finished part is the front part) but whenever i try to test it in-game, it looks extremely misaligned, it's not even on top of the farmer's head. could someone please help me? i'll leave the json file here.
https://smapi.io/json/none/fb0924dc50ad43af82df77595b5c7f04
in case more files are needed, feel free to tell ^_^
https://smapi.io/json/content-patcher/8c7759b43f6b457c8eefd5989a76c1a0 Here's the config.json file of my IUCT fork and the child name check event of said file
And the config schema
Is there anything wrong with the child name checks?
are there any vanilla sounds that might make for a good sizzle / fizzle sound effect?
looking for a good "this spell failed to cast" sfx basically

Where is the folder for the background music of this game located? I haven't found it yet. I want to replace the background music through the script test.
You shouldn't need to touch the folder with the music to replace it. You can edit the AudioChanges asset instead. https://stardewvalleywiki.com/Modding:Audio
The audio doesn't get unpacked by default. If you want to unpack it for some reason, there are instructions on the page I linked.
Have you tried adjusting values like the starting position and head position?
Thanks
i would but sadly i don't really know how the X and Y thingies work (what i mean is that i'm not sure about which letter is which direction, like, if X means lower or Y means higher, i don't know if you get what i mean)
You don't need to already know how something works to experiment with it. That's what trial and error is. Try just changing one number (by a fairly big amount so you can definitely see it change) and then see what happens.
X = left and right. Positive numbers move things right, negative move them left.
Y = up and down. Positive moves down, negative moves up.
alright! thank you for the advice, i'll try to test that out
also, sorry if this sounds silly but does this seem somewhat correct?
i'll test it in-game, and see if it works
I don't know. I don't know what your sprite looks like or what its dimensions are so I have no clue if changing those values would help.
Also do you remember how I said change one number? But you've just changed two?
It's going to be hard for you to identify what each field is doing in game if you're changing more than one of them at a time.
...yeah these values didn't help at all, the ribbon isn't even visible anymore
okay, i'm sorry, i'll try to change only one number
also, if it helps, the sprite is a 64x64 image..
i hear oversized clothing is in fashion now
to be honest i think you should try and find someone elses hat mod and like copy the exact same positioning they have on their image and code
you can tweak from that
If the issue is getting even in the ballpark in the first place
(Also I think I've told you this before, but it's going to be much easier if you use a proper text editor like N++ or VSC instead of Notepad)
I'm gonna answer every modding help I get like this now
no no i don't mean like the sprite itself, i mean the PNG, like, the image, not the sprite itself. the sprite is 22 pixels wide, and 12 pixels tall
man i don't know how to type
💔
that's what i did!
i'll try with some other hat content pack, because the one i used seems like it didn't work with me
Did you use the same size canvas?
If your image isn't the same size, then you will get different results from the mod you're copying from
hmm, maybe that is the issue because i didn't change anything about that
also, that goes in HatSize, right?
Either way, to get the hat where you want it, you'll need to keep experimenting with the positions until you understand what each field is doing and can move it into place
...okay
I can't tell from the FS docs if HatSize is meant to be the frame/image size or the sprite size inside the frame/image. You might be able to work it out by comparing the HatSize value in other mods to the frame sizes of their spritesheets.
it was meant like a thoughtful sentence, sorry if it sounded weird lol
Ah okay. I interpreted it as hesitation, sorry
I've never made a Fashion Sense mod by the way, which is why I'm not able to give more specific answers to any of your questions and am instead guiding you to find the answers yourself
Please?
I've considered trying, given how many people I try to help with FS, but I can never think of anything to make lol. I am not inspired by tiny, hard-to-see-properly clothing
it's totally okay, but for now, i'll be taking a break because this is stressing me out a little bit lol
Hey one question can i simply delete The Love of Cooking mod or would this be an issue?
@iron ridge: be an example (10h ago)
is writing out grammatical rules for a language a necessary part of modding i wonder
That would be a question better asked in #modded-stardew, as here is for making mods, but there are no issues in deleting mods
You'll just need to delete items directly added by the mods (it's alright if you forgot some items, you'll just have a generic "error item" that you can trash or sell without any issues)
Ah sry
Ok thx 🙂
To clarify a bit, there are some mods that you can't really uninstall without long lasting problem, but this shouldn't be an issue for most of them.
Not for any of the mods I've made so far lol
Hello! Sometime ago I received advice here to not conditionally load assets, can someone elaborate why that is preferred and if there are any exceptions to that rule?
me, waking up :"why is my gsq RANDOM 0.{{tokenchance}} isn't working 100% of the time when my token value is 100?"
me : "wait..."
lmao
Realistically all i need is enough of the language to write several sentences... And not like... Extensive lore
I think numbers are posing a problem though lol
numbers 
Because if that asset ever gets called when the conditions for loading it haven't been met there will be an error. It's better to have an unconditional load of some default form of the asset and then have conditional loads (or non-load edits) after that.
I don't know of any exceptions to that.
even if you manage the conditions to ensure it is ready when it asset is requested? are there any drawbacks to loading assets that are not needed? e.g. i have a config setting to enable certain assets
What's the asset you want to load?
in my case its a portrait and spritesheet
You can never be certain that your conditions will be ready in time, because different mod combinations change the timing of when things happen
Wow that was speedy
I've never seen maincord get hit before
-# yikes
So the greatest advantage is compatibility. Say that there's another modder who wants to make a portrait mod for your mod. If you conditionally load your portraits through config, Now they'd need to have their own config too to match yours.
Your NPC should have a base portrait and sprites even if you have multiple. For instance if they have different portraits for all seasons, they should still use one of those season's portraits as their default, non-seasonal portrait.
Then user would need to set the config for both mods.
i see, thanks for the explanation guys! you got any more compatibility tips? i haven't found any docs in regards to that subject
wdym by compatibility tips?
if you're making an npc, make sure to use a unique internal name to avoid conflicts, for one ig
I don't know of any collated information about compatibility, but that would be a good resource on the modding wiki 
ensuring a mod is compatible with others, in my case i'm doing Appearances so using the defaults when a certain asset is disabled like @vernal crest said
actually when making a new anything, unique names is a good way to avoid conflicts
There's an old page on the modding wiki but its info is much more general
What you're after is kind of a modding best practices cheatsheet
And right now I can't think of anything even though I know a bunch xD
all i know is {{ModId}}
Hmmm try not to use OnTimeChange update rates for patches ever, try to minimise your use of OnLocationChange, don't make a million tiny edits to Cursor or springobjects
i read somewhere to use that token for appearance names but i cant remember where exactly
Don't use InternalAssetKey for anything you want any mod to be able to edit
I can list three things that I often wish other mods do when I'm trying to do compatibility with them: 1. Use appearance system for NPC. 2. Load their custom tilesheet as asset. 3. Use loaded strings for their event dialogues.
(stares at my appearance code)
Anywhere that you have any sort of ID in your mod, prefix it with the ModId token. It's not strictly necessary in some lists because the IDs are specific to the list but it's just a better practice imo
Oh yes, definitely loading tilesheets instead of keeping them in the map folder with maps
have this one default appearance thingy
id's should usually have {{ModId}} to avoid conflict. ignore my other tokens
what i do, since mine are seasonal, is have spring as default
i have been actively removing those OnTimeChange and OnLocationChange update rates, the appearance system already works out which appearance should be used when the npc changes locations
Never use an exclusive Load patch for anything vanilla
(Unless it's intended to break if any other mod Loads that same asset, in which case it might be more useful to keep it exclusive so the user gets an error in their console rather than someone else's mod silently overriding yours)
i'd also say put every dialogue in i18n from the start but i mean that's not required
None of this is required Bea lol
But yes, i18n (or LocalizedText) every player-visible text. And like Dolphin said, ideally you'd Load your event strings so other mods can edit them more easily.
you can add "LogName": to your code blocks for better troubleshooting, i find that useful
Hmm I should add something about local tokens to my local token patch lognames so they're easier to identify
say I have a custom beach asset for Abigail, what would be the correct way to do it? should you create a new appearance that overrides the vanilla island attire or just create an EditImage patch that edits the existing Abigail_Beach.xnb?
i find it easier to just edit the existing asset but i'm not using the appearance system then right?
omg ur a genuis, idea yoinked
EditImage
does... vanilla use the appearance system
i really like this for debugging!
It does, but only for winter and Jojamart
when it comes to assets that already exist, editimage is the best option
I dispute that claim
actually yeah this isn't true
Depends what you want to achieve
if ur just replacing sprites, editimage is the best option?
appearance is very flexible, supported by vanilla and used by a bunch of mods like DSV
eh im being too general
Honestly, I view Abigail_Beach as already inherently using the Appearance system. So you'd just be editing an already loaded asset. Unless you want to do stuff like having multiple alternate beach outfit.
I also recommend it personally
you mean this?
{
"Action": "Load",
"Target": "Portraits/Abigail",
"FromFile": "assets/Portraits/Abigail/Abigail.png"
}
that's a regular load
If you want to make a change to vanilla that you want to be exclusive (like swapping Sebastian with Barney the Dinosaur) then you're not likely to have any issues if you Load a new portrait for Seb
(Which is, by default, exclusive)
(ah, inchresting)
i believe its exclusive by default
so using load would make it so this is portrait that loads for abigail all the time?
even when there's other mods
See my next message after the one you replied to. If your mod is intended to be mutually exclusive with any other mod that wants to Load a portrait for Abby, it's going to break one way or another if a user has both, so you might as well use Load.
but that can't be exclusive, Barney loves sharing 😌
Nope because a user might have another mod that also tries to exclusively Load a portrait for Abby - result: error message in SMAPI and neither mod loads the portrait
Or a user might have a mod that replaces Abby's portrait using EditImage - result: ALP's portrait loads and then is immediately replaced with the Abby from the other mod
Or the user might have a mod that uses a non-exclusive Load and so does ALP - result: whichever has the higher priority will load
Sometimes your only option is to bop a user over the head 🤷 /j
i was so shocked the notifs are spooky
yeah that makes sense. best option is to just yell at the top of your lungs 
IMO the first step in compatibility is figuring out what sort of compat you want. Sometimes the answer is "this should not be compatible with other mods of the same type".
Also imagining what kind of user would download your mod.
(Modmakers. Only cheetos may download my mods 😌 )
yeah
and sometimes it's "user needs to use the config if they want to use two mods so therefor i might suffer"
I imagine anybody who downloads bald Elliott mod would appreaciate if their Elliott suddenly has hair from another mod, so use EditImage with late priority for that.
he should stay bald >:(
i was thinking about some config settings to enable the seasonal assets you want, so if the user wants to install a separate portrait mod for Abby it would set the config option to SpritesOnly for that NPC
when it comes to editing portraits/sprites in a certain way i'd like to think most users understand the basic truth of "two mods that edit the same thing will conflict" but perhaps i am simply, living in denial
but this is just theory, i still have to test it
it's possible, just more troublesome
Sounds very feasible
I love config settings. I love making them and I love using them.
Im afraid you might be living in denial

it is :(
code definitely is more complex but i hope its worth the effort
i see a lot of requests in SCO to have sprite only options and it's like,,, weh
"Condition": "{{CT_Portrait}}, DAY_OF_WEEK Sunday" etc
how does that work? 
Sometimes they think two mods that have nothing to do with one another have conflict.
The config token will resolve to true or false, which is what a GSQ resolves to as well. That's all the Condition field looks for. So if CT_Portrait is ticked (true) and it's Sunday (true), the condition will be true and that appearance entry will apply.
And if you have a config token that doesn't have true/false as its options, you can do {{CT_PortraitStyle |contains=funky}}
problem is that both portraits and sprites need to be specified, if the user disables portraits i still need to apply the sprite of that appearance
what i'm trying is setting the portrait to the default asset instead and manually setting it with my custom asset if the config allows it
But then you're not using Appearances?
For that, personally I'd try doing tokens on the the Portrait and Sprite fields, between the asset name and null
Well, if it was Sunday it'd be "Condition": "TRUE, TRUE" actually. Or "Condition": "TRUE, FALSE" if not Sunday
so true true would load it and true false won't? cool
null defaults to the textureName?
wait do u need to specify both portrait and sprite??
Yup.
I'd just do more Appearance field entries
i'll prepare an example brb
~~i am now confused about Appearances
~~
@jaunty moat: fix your fish sprites and upload the mod (12h ago)
Yeah yeah I am
if i don't specify both a sprite and portrait, will something break? wiki says that is they aren't there is just uses default
Doesn't that give you the answer?
yes but Dolphin said u need both 
Ah right I missed that. Well, either the wiki or Dolphin is wrong.
I didn't say you need both?
Aaa, I see how that might be misleading. Sorry.😅
ah yes, reloading my 210 mod SMAPI because I misspelled "Lava Eel"
can't do a patch reload?
Are you aware you can use the patch reload <mod id> command to reload your mod without restarting the game?
...well, since I am not testing that anymore I guess I will just tidy my random test mod instead lol
with have this appearance entry:
"{{ModId}}.AbigailSpring": {
"Id": "{{ModId}}.AbigailSpring",
"Portrait": "Portraits/Abigail",
"Sprite": "Portraits/Abigail",
"Season": "spring"
},
the user sets Abby's config to SpriteOnly. then you write the patches:
{
"Action": "EditData",
"Target": "Data/Characters",
"TargetField": ["Abigail", "Appearance", "{{ModId}}.AbigailSpring"],
"Entries": {
"Portrait": "Portraits/Abigail_Spring"
},
"When": {"SlightlyCuterAbigail |contains=PortraitsOnly, PortraitsAndSprites": true}
}
{
"Action": "EditData",
"Target": "Data/Characters",
"TargetField": ["Abigail", "Appearance", "{{ModId}}.AbigailSpring"],
"Entries": {
"Sprite": "Characters/Abigail_Spring"
},
"When": {"SlightlyCuterAbigail |contains=SpritesOnly, PortraitsAndSprites": true}
}
the portrait remains the default "Portraits/Abigail" since the config option disables portraits
So is Portraits/Abigail vanilla?
sorry could you elaborate? i don't get what you're trying to say
The image that's at Portraits/Abigail in your AbigailSpring appearance entry. Is that vanilla or is that your portrait?
thats vanilla
I see
My approach is similar to yours, it's just using those tokens inside one single patch instead of separate ones
another mod could edit that and be compatible with my spring sprites in theory
I should say hypothetical approach since I have no mods with configurable appearances lol
do you mind sharing an example of how you do it?
Sure, hold on
so do u add that appearance block to data/characters 
at the very beginning before i load my custom assets
{
"Action": "EditData",
"Target": "Data/Characters",
"TargetField": [
"Abigail",
"Appearance"
],
"Entries": {
"{{ModId}}.AbigailSpring": {
"Id": "{{ModId}}.AbigailSpring",
"Portrait": "Portraits/Abigail",
"Sprite": "Portraits/Abigail",
"Season": "spring"
}
}
}
then apply the edits to "Portrait" and "Sprite" as needed
can't u just use that block for everything instead of editing it later?
also remember one of the entires should be non conditional
{
"Action": "EditData",
"Target": "Data/Characters",
"TargetField": ["Abigail", "Appearance"],
"Entries": {
"{{ModId}}.AbigailSpringPortrait": {
"Id": "{{ModId}}.AbigailSpringPortrait",
"Portrait": "Portraits/Abigail_Spring",
"Sprite": "Characters/Abigail",
"Season": "spring",
"Condition": "{{SlightlyCuterAbigail |contains=PortraitsOnly}}"
},
"{{ModId}}.AbigailSpringSprite": {
"Id": "{{ModId}}.AbigailSpringSprite",
"Portrait": "Portraits/Abigail",
"Sprite": "Characters/Abigail_Spring",
"Season": "spring",
"Condition": "{{SlightlyCuterAbigail |contains=SpritesOnly}}"
},
"{{ModId}}.AbigailSpringBoth": {
"Id": "{{ModId}}.AbigailSpringPortrait",
"Portrait": "Portraits/Abigail_Spring",
"Sprite": "Characters/Abigail_Spring",
"Season": "spring",
"Condition": "{{SlightlyCuterAbigail |contains=PortraitsAndSprites}}"
}
},
}
v cool
mm what do you mean use it for everything?
see what aba sent ^
They're not Loading any assets as part of their appearance edits so no, none of them need to be unconditional
ooh i see
Their Abigail_Spring load (which, by the way, should really have your Mod ID in it) needs to be unconditional
I think that ultimately there's probably not much difference in the two approaches so I'd go with whatever makes more sense for you
where exactly? in the action load patch you mean?
It's not evaluating a condition that's going to change frequently
Yeah, I would make them "Portraits/{{ModId}}_Abigail_Spring" instead. Even if there's no compat issues, it helps future troubleshooters if they can see the mod id the asset is associated with.
This is how I'd do it. ```{
"Action": "EditData",
"Target": "Data/Characters",
"TargetField": ["Abigail", "Appearance"],
"Fields": {
"{{ModId}}.AbigailSpring": {
"Portrait": null
},
},
"When": {"SlightlyCuterAbigailPortrait": false}
}
{
"Action": "EditData",
"Target": "Data/Characters",
"TargetField": ["Abigail", "Appearance"],
"Fields": {
"{{ModId}}.AbigailSpring": {
"Sprite": null
},
},
"When": {"SlightlyCuterAbigailSprite": false}
}```
i see, its like the inverse of "{{ModId}}.AbigailSpring": {"Sprite": "Characters/Abigail_Spring"}
Yar, personally I just find it neater when the base patch is the one that contains all the custom assets
(Would take less space too.)
how would that be? theres still another patch you need to write for the base appearance with the custom assets no?
does anyone know if there is a flag or anything I can check for whether the player has repaired the wooden bridge to the beach tidepools?
Yes....I think so...hold on
Yar, the difference between
"Sprite": "Characters/Abigail",
"Portrait": "Portraits/Abigail_Spring",
"Sprite": "Characters/Abigail_Spring",```
and
``` "Portrait":"Portraits/Abigail_Spring",
"Sprite": "Characters/Abigail_Spring",
"Portrait": null,
"Sprite": null,```😆
I think it's a world state flag
I have a memory of roku and I finding it...but this was shortly after I joined so trying to find where it is...
wiki doesn't have much info about flags tho :( https://stardewvalleywiki.com/Modding:Mail_data#List
maybe take a new save and repair the bridge, then check the save file for the flag manually?
Nah, it's the modding wiki you want for all of this
wait there's a separate wiki?
tysm!
Thanks bluebs
thanks button aka spiderbuttons
I did finally find myself saying it back in June last year
Thanks buttons aka spiderbuttons
Why isn't that on the mail flag list >:(
SMH get her name right /lh
because it's not a mail flag ☀️
I know it isn't but we don't have a net world state page and even if we did, there are only 7 of them that I can see so that's pretty small to have to have their own page
And you can check it with the HasFlag token
But I am tired so I make no decisions at this time
For instance, this is the dialogue if (and ONLY if) a female child has one of the names that are assigned as "WizardChildrenx" (where x can be an even number (for male children's names) or an odd number (for female children's names))
But in this situation, a child born of a previous relationship (and DOESN'T have a name listed in that list) still say the line!!
Can you please help troubleshooting how I code this logic? (logic in second image):
you never sent the json I asked you to send yesterday
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.
(Please use #governors-mansion if you need to do bot commands for your own use)
https://smapi.io/json/content-patcher/eca5a53e29fe493bafd0ee3719920789 But anyways, I (re-send) the link to the JSON parser of my IUCT fork's content.json
You didn't reply to iro's message when you shared it last time and since it was 5 hours after they'd asked, they didn't see it.
as for why it isn't working, like you've been told, all you're checking is that there is a child with that name, not that that's the child currently speaking.
So can we fix that?
when we brought it up previously, you seemed to say that your IUCT fork has some way around that, so I recommend using whatever that is
Yeah, although IDK how the "ChildNames" token work exactly
I know adding config token value support to certain actions is a thing - But not sure if it works for a token like "ChildNames"
your config works fine
the issue is what we told you all along, that it's only checking if you have ANY child with that name
I do have a female child called "Yukina" - But they haven't grown to Stage 4 yet
what does that have to do with what I just said?
I think this is it:
- The mod checks for any child with that name, but does not check if that child is specifically speaking - so the dialogue would apply to EVEN previously-born and all-grown children.
Based on some back reading, this is what irocendar and Abagaianye, having been saying to you, over and over.
I forgor that by far there is no super-specific child checks in Content Patcher
There's only a check for children's name and gender
Wow, twice in one day
Spammers are on the clock 
Iirc, you can add your own "checks" through CP
How can I do that?
I'm pretty sure it's by adding dynamic tokens. But I highly recommend looking at the wiki's to get a better understanding of coding
Not really, no way to tell through CP which child it is you are currently talking to
Not evening with DTs? I thought you could 
dynamic tokens check for the same conditions that any CP patch checks for
its not possible
This is what I get for not having my code cheat sheet next to me 
no, CP doesn't update its tokens with enough fidelity to check the current dialogue box speaker (plus there's no token for it)
has anyone made a custom base NPC that people can use???
I think there's one in the game files?
Like a blank pc for people to use
hmmm, trying to inject more flavor but I think the School description at the bottom of the page (left half) is just crowding up the UI.
Maybe make the next line of text go down one so it lines up? Or make a note that you can read?
How should I add Green Algae and River Jelly to the water? I followed the tutorial at https://stardewmodding.wiki.gg/wiki/Tutorial:_Adding_a_New_Fish to add fish to the map, but I don't see Green Algae and River Jelly appearing in the water with the Visible Fish mod.
Last edited by AtlasVBot on 2025-09-13 18:56:18
Adding a new fish to the game has never been easier than in 1.6; nowadays, fish are a simple set of patches via Content Patcher. There are four required steps: you need to load sprite images, define the fish (as an item, and as a fish) and add it to locations. Optionally, you can add aquarium spri...
No, there isn't
Do you mean sprites?
No i mean like a whole NPC base in general
Huh...
Something that people can work off of
I mean I can grab something but I dont recommend it?
as someone who doesn't know much about JSON coding I'd rather try and find a base first
No there isn't but there are tutorials, a spreadsheet that you put your desired values into and it forms the json for you, and your choice of any NPC out there to copy from (though there are better ones and worse ones).
So that i actually know what to do
!npc
Keep in mind that making NPCs is a complex process that requires learning many different aspects of Stardew modding.
Here are a few links that can help get you started on all that you need to know:
-
Tiakall has a great tutorial on making a custom NPC for 1.6.
-
NPCs no longer use dispositions, check the wiki page for the new NPC data.
-
Feel free to jump into the https://discord.com/channels/137344473976799233/1277457201077813280 thread for more interactive feedback and help!
-
Fireredlily has a WIP NPC Builder Please do report any errors you get with it into the NPC thread!
Hmmm
I recommend looking at Hat Mouse Lacey because I trust ichor to use best practice
won't i be needing a lot of stuff like creating a house, a place for the NPC to live and whatnot?
You can use Lily's apartment mod or the saloon upper floor mod for a house
You don't have to technically, it's only if you want
This what I thought they ment
hmmm yeah.
for now decided to move it to the tooltip of the school icon
Like, your NPC can come to the valley every morning and leave every night, like Claire in SVE who's a JojaMart clerk
She doesn't have a house, just schedules
That looks awesome 👌
I thought that might have been what you were thinking, but the answer is still "no, there isn't" lol
Welp when there is a need looks like im making someone before my mod. And it's just a sprite sheet.
I should be sleeping... but... that's what coffee and migraine meds are for.
There are naked NPC spritesheets around. They're just made by modmakers rather than being in the game files.
Huh, what happened to the link to the NPC template
So what exactly would I need to make to help for sprites like this?
An NPC spritesheet...?
honestly my advice remains to start from an existing vanilla NPC as a template
obviously it's best if, by the end, it's not obvious which NPC it's based on, but there's a wide variety of character heights/sizes to choose from, and they're already laid out in the correct format
Whoops I forgot that Avi made a template: https://stardewmodding.wiki.gg/wiki/Npc_template
I was about to disagree because of the lack of CP patches until I realised you mean for the sprites lol
For sprites, I totally agree to use vanilla NPCs as bases (you can frankensprite them too!)
oh sorry lol, yeah i was literally just talking about the sprites 😅
i don't always backread /lh
So I dont need to make a sprite sheet?
If you had, you would've seen that once again Lacey was my suggestion for a mod to copy xD
It's the local used to hold the return value. It's invisible in syntax but it's there in the il
In the android cil, where's the ret getting the value from? Is it pushed directly instead of being loaded from a local?
Well you can if you want to but like I said, some already exist and we also usually recommend that people start from a vanilla NPC
Log Info: SMAPI 4.3.2 with SDV 1.6.15 build 24354 on Microsoft Windows NT 10.0.22621.0, with 5 C# mods and 1 content packs.
How should I add Green Algae and River Jelly to the water? I followed the tutorial at https://stardewmodding.wiki.gg/wiki/Tutorial:_Adding_a_New_Fish to add fish to the map, but I don't see Green Algae and River Jelly appearing in the water with the Visible Fish mod.
Last edited by AtlasVBot on 2025-09-13 18:56:18
Adding a new fish to the game has never been easier than in 1.6; nowadays, fish are a simple set of patches via Content Patcher. There are four required steps: you need to load sprite images, define the fish (as an item, and as a fish) and add it to locations. Optionally, you can add aquarium spri...
Understood! This what it technically ment in the game files.
You have a manifest.json that says your mod is a content pack for Content Patcher (or another framework mod) but there's no content.json which is required for content pack mods.
Thank you for being so helpful and patient with me :3
Try doing a patch export of data/locations to see if your edit worked
That website doesn't seem to have tutorials about adding Green Algae and River Jelly. How should I add them? Should I use the same method as adding fish in the tutorial? I don't even know River Jelly's ID.
Just add it to the location fish list
Make sure to qualify it with (O)
I feel little perplexed,just like this image?
Yeah, either add it to the RandomItemIds, or add a new entry with ItemId set to it
You can look at the vanilla location data for examples
!decompile
If you want to make SMAPI mods with C#, one important resource is decompiling the game to read the game code. Here's how to do it: https://stardewvalleywiki.com/Modding:Modder_Guide/Get_Started#How_do_I_decompile_the_game_code.3F
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!
Use the second one
Okay,I will check it
i know this sounds batshit insane but can ai tools like chatgpt make jsons for you to work off of?
!chatgptcode no
We don't recommend using generative AI (such as ChatGPT, Copilot, Claude, Grok, etc.) to write mods for Stardew Valley. There are a few reasons.
- AI-generated content is not allowed to be posted in the server. If you need help with your code, you won't be able to post it.
- Large Language Models aren't trained on enough Stardew-specific information to give reliable, accurate output. They also have no concept of what they don't know, and so cannot tell if they're incorrect. In short, they don't know if they're hallucinating a solution that simply feels like it makes sense or not.
This holds true for both SMAPI/C# mods, and mods for frameworks such as Content Patcher.
There's no shame in being new to Stardew modding, and you won't be talked down to for not knowing what you're doing. We strongly recommend consulting with other mod authors in the appropriate channels as a first step if you're completely stuck at step one.
Got it
Hi @ornate drift . Would you mind if I DM you?
Jsons are very... templatic..? Is that a word?
You can make templates in something like VS Code and quickly add the needed stuff, there's literally no reason to use ai for it. And it'd spout bs whenever actual sdv data is needed
currently reading the wiki right now
i think I'm getting an understanding of most of the stuff in it 
Does anyone know better how using temporary change map works in event? how... Do I change back to the original one, if youre even able to?
You could try using changeLocation to switch back to the original map?
If you do that, do you just continue on the same string or do you have to make a new event? Cus the plan was to have like a flash to another location and see what happens there, then come back to the original location
continue on same string
I have an event that switches location twice but both commands are still a bit of a mystery to me tbh. I just fiddled around with them until I got what I wanted to happen, so I think I use changeToTemporaryMap for one and changeLocation for the other.
Amazing, that makes my life a lot easier!
the game does scary things to shift the current event to a new location but script-wise it's seemless
new spell WIP. make a healing zone that heals you and allies inside it yeah not so useful solo
Okok I'll play around with it then :) I was hoping (and happily confirmed) that ya'll might have played around with it before so before i go in and break my event a couple times, i'd just ask and see if someone knew something lolol
Yup I do use both commands in the same event and I can't tell the difference between them lol
Phenomenal PFFFT
And they do definitely continue with the same script that's in the file for the original location
Thats so cool dude!! I'm super impressed by the whole mod in general
I think if you do a switchEvent after using changeLocation you have to put the new event into the new location but not if you do changeToTemporaryMap? But don't quote me on that.
Hmm.. sounds like theres some logic to it, but it should be a simple one line script
Noooo use multi lining
(Still one event, just has each command on its own line. Much easier to read and write imo)
Hello. I'm looking inside the crops template for json assets. Is there a way to make the crops drop multiple items (Not like blueberries, more like sunflower where when harvested it drop both flower and seeds)
My VSC Gets mad when i do that though, i've wanted to but i've just been accepting my fate lolol
I was proud when i managed to change so it wouldnt get mad at the comments
If you switch the language to jsonl while you're doing your events it will stop. But it won't tell you about errors either so it's a compromise lol
aaaah, okay i'll keeo that in mind! Thank you!
But there's a lot of errors you can make while doing events that VSC wouldn't pick up anyway
Seriously 
Don't use json assets, it's deprecated. Use Content Patcher (and spacecore to add additional item drops)
Thanks. I'll look into it
Yeah, same with any part of modmaking. There's lots of errors you can make that aren't json syntax errors.
Yeah, it just catches the most basic which was very useful when I didnt know wtf I was doing but now i can usually figure out the basic formatting by myself
Yup exactly. The only error checking I ever need from vsc now is adding commas between patches because if I move them around and grab one from the bottom of my file and move it higher I always forget the comma lol
Y e s, always the commas dude
So I will happily forgo the error checking in order to have events I can actually read lol
Yeah, it's been getting more and more confusing so im thankful I finally learnt why it wasnt working lolol
Which eye should I use?
using a json schema will catch a lot of error when makin content packs, it will tell you errors about the structure of your json
I could make a tutorial for this 
I do use it but don't find it picks up any more errors than VSC's error checking. Not of the sort I make, anyway. I should test to see if it picks up on blocks being put on the wrong level though because that's something VSC and the validator don't pick up.
I like bottom right the most, followed by top left
I guess there's not an insane amount of structure in CP, but it helps a lot for FF
I always just yeet the FF people to you rather than trying to help them xDD
lmao, not a bad idea
I know you're very hands on and that you like to see what's happening with modmakers who use FF
But if you ever get sick of it please do let me know!
ty~
did some tweaks. the effect no longer has animation over blocked tiles / respects objects in tiles. Also set effect depth so it only ever covers up the bottom half of taller sprites, so it's like dust on the floor.
don't worry, helping people with FF helps me see what I can improve about it, especially the documentation, so that it's easier for future users
Its not done and the "blue chicken" here is the only one that's gonna look like this xD
Hehe it has big surprised eyes
it looks so confused and i can relate so much it's fantastic
Im doing this eye for the perfection chicken
literally looks like me all the time-
Im also collating with someone to make pet clothing
So I have a user thats getting a game crash after entering the farmhouse after purchasing my pets.
anyone have any idea what this error means
Log Info: SMAPI 4.3.2 with SDV 1.6.15 build 24356 on Microsoft Windows NT 10.0.26100.0, with 77 C# mods and 143 content packs.
Suggested fixes: One or more mods are out of date, consider updating them
I think it means that the texture field for a pet is invalid. The game doesn't have a fallback for that the way it does for most other textures so it explodes.
So maybe either you've accidentally got an incorrect texture field for one of the pets or you've got some kind of conditional texture (config options maybe?) where the condition wasn't met for some reason so the texture didn't load.
I should've pinged since a bit of time passed before I replied
Hi guys, I got a silly little mod idea, and was wondering what would be the easiest way to follow through with it? I had this idea of giving shorts
to pets and once I gave it to them, they'd equip it themselves and be able to wear it, like a hat, but as pants instead lol
The simplest way is to use this framework, I think. https://www.nexusmods.com/stardewvalley/mods/36122
You'd of course need to draw the sprites overlay for every pet type.
This answers my question
So do we just draw the clothes on the sprite or just the clothes?
just clothes
use the pet sprite for reference
Well damn i did this
Luckily I remembered layers!
So I can just delete the reference
hellooo im back again lol, do mail flags have to be defined with data/mail entries?
no
if they are defined in data/mail then they will be added visibly to the player collections
awesome! less work for me then lol
EAC still not clicking for me, anything obviously not correct here?
the error the validator is giving is because it's a code snippet i think
the animals are digging up cactus but i was hoping they would change to the alt texture and have the cactus sheared from there
jade and topaz are correct, but the cactus should be doing other things
the ldloc.3 i mentioned. on PC, these are the last two instructions in the entire IL:
IL_029b: ldloc.s 4
IL_029d: ret
on Android, these are the last two instructions:
IL_03d9: ldloc.3
IL_03da: ret
this means on PC the second to last instruction has a LocalBuilder operand, which you're matching on, but Android does not
i just fixed it but now the user is getting a interesting error
"I can't load it in, the log says that it's an empty folder despite what's in it"
(i couldnt tell you why it was stopping on an ldloca.s 0 instead but thats what logging the current instruction at the time of getting your ret variable showed)
ok guess part of it was that my texture changes were using a qualified ID when they shouldn't, so skins happen now, that's a start
aaaah right I forgot about the numbered opcodes. that would do it.
thanks, that should be enough to fix it
you may be interested in knowing that you can just do i => i.IsLdloc() for your predicate match
yes, I'm going to use that and change how the local is saved
in my fix i changed ret to the entire instruction, not just the operand, and then did this in the // return held part at the bottom:
new(OpCodes.Ldloc, held),
new(ret.opcode switch
{
var op when op == OpCodes.Ldloc_0 => OpCodes.Stloc_0,
var op when op == OpCodes.Ldloc_1 => OpCodes.Stloc_1,
var op when op == OpCodes.Ldloc_2 => OpCodes.Stloc_2,
var op when op == OpCodes.Ldloc_3 => OpCodes.Stloc_3,
_ => OpCodes.Stloc_S
}, ret.operand),
new(OpCodes.Leave, leaveTarget)
since ret.operand will either be the localbuilder if it was the .s form or null which is what you'd want for the numbered form anyway
but like i said though this doesnt actually fix the fusing. it still doesnt work. it just stops the transpiler from failing to patch
actually does harmony have a helper method to get a stloc corresponding to a ldloc or will I just have to hardcode the index
that is why i made that switch statement lol
it does not
that switch statement IS the helper method
tbf thats just doing what a helper method on its own would be doing anyway
no other way to identify it unless you want to .toString() the opcode which seems even jankier
so the texture data needs unqual item IDs, the produce spawn needs unqual, and the harvest tool bit needs qual
actually I think I'm going to match against Value so I can use constants
and just grab them from the opcode table on wikipedia
lot of my animals seem to be digging up twice a day, odd
maybe it's leftovers from previous EAC days
🤔 hm.
at this point it seems to be just one guy digging maybe endlessly so shrug
if i want to make a shop sell only recipes with x context tag, i'll need an item query with a condition that all the items have x context tag?
typing that out makes my question sound a little stupid now
If it follows the vanilla pigs, high friendship gives extra chances to dig stuff up
Yep
You can use peritemcondition and ITEM_CONTEXT_TAG Target contexttagnamehere

