#making-mods-general
1 messages · Page 21 of 1
"Kent": "Hello, @.^This item was collecting dust in the tool shed. I figured you might be able to use it. ^ -Kent%item id (O)286 1 (O)287 1 (O)288 1 (O)787 1 %%[#]A Gift From Kent",
3 bombs and battery how nice of him
There's something disturbingly amusing about the idea of unloading a whole stack of bombs into the mailbox addressed to every NPC in town.
It's like ticking names off a Christmas list, but with explosives.
I mailed Keahi a bomb
RSV spoilers: ||There's a quest where he wants a bomb and I am lazy and do all my fetch quests via mailbox||
I have not yet tested if or how well this works for fetch quests. My guess is that it doesn't, since I'm not running any of the stuff in tryToReceiveActiveObject.
Quests are not as important to me as birthday gifts
😭
Why not actually call tryToReceiveActiveObject? Are you trying to avoid the dialogue from it?
Oh, that would be way too messy. Have you looked at that method? It's got a million side effects, no way would I want to run that in a loop overnight.
Ah, makes sense, yeah i've looked at the method and messed around with it myself
Not to mention, there isn't a single "active object", it's many gifts to many NPCs so at best it would involve some kludge of swapping objects in and out of the farmer's inventory.
I did consider using it with the probe parameter to check giftability, but ultimately went in a different direction because of the "next-day" option.
It being overnight instead of at the exact time you'd do it also complicates it so yeah
At least in the short term, it looks like the two mods should be compatible if you just disable MSM's gift service but keep it installed for the quest service and such.
Handy!
If they're not, well... guess I'll find out. Compatibility testing is on the to-do list.
Noooope. I have a veeeeeeeeeery WIP NPC mod lol
Yeah Ik lol
I think everybody should at least try making a very elaborate ONE
just like you're doing
If it's too much work to make one NPC, imagine making many for just one person coding.
It's so cool because someone could download new elaborate individual NPCs as the "new person" in town.
Because NPCs don't get added regularly.
Maybe even a community project to make NPC making easier or even standardize so no conflict or problems?
Well, there are actually quite a lot of NPC mods.
Could be a fun idea.,
Then what did you mean by NPCs don't get added regularly?
I have to answer that with another question, were NPCs ever added in the vanilla game?
Yes, once
Because I'm new to Stardew. Been playing for around 5 months
Oh ok
Yeah, so I meant NPCs getting added in the vanilla game.
It's like everyone has their own story to tell, transferring that to an NPC. A more elaborate NPC is always better than quantity.
there are a few efforts to that end. There's a spreadhseet somewhere for vanilla festival standing positions IIRC, and there's an npc creator tool that Ms. Coriel made, though it's less useful now since NPC stuff changed in 1.6 and the tool is made for 1.5
Anything that can talk
yea they talk
and ||the bookseller||
The thing is the vanilla game isn't made to add whole new friendable NPCs in updates, it's got a pretty solid layout of characters already and the one time a new friendable npc was added it was earned because it also came with a big new area.
the main barrier for npcs though is less that it's hard and more that it's just a shitton of writing and spriting. (well, events are complicated, and it could be useful to have a tool for that.)
That's cool there was a guy that thought about it, I'm going to try working on that fr
(honestly my biggest barrier for my NPC is just finding a place to put her...)
I started playing and he was already there lol
I would like to get to the point where I can offer commissions to do the coding work for NPCs, though I know that some people already do offer that and I don't know if anyone takes them up on it
east scarpe seems to be most people's answer lol
but you do raise a good point
he was only added in the latest update so, i was just going along with chu's ||raccoons|| message
i know East Scarpe is often recommended, either that or the boarding house, but i dont want to put her in someone elses area. i wanna put her in her area. basically, im stubborn
I mean, if he doesn't plan on maintaining it any further, maybe if that person opens it up for us, we can take it?
Idk might be talking crap
no, I totally get that. I've had ideas for NPCs before and I wanted to give them their own spaces
Do you mean Miss Coriel's NPC creator? I have no idea how she made it.
How dare you expose my secret evil plan to infiltrate east scarp with my npcs /j
Nah, you're good lol.
I started playing 5 months ago, I'm fairly new
I read Mr
my bad
Yeah, her
I think she made it with WPF or visual basic but I could be wrong
as far as i know Miss Coriel also still plans on updating her NPC creator. its just not a small amount of work and iirc shes been busy
yeah NPCs changed a lot in 1.6, it's not just a trivial patch
I think if you're willing to put an NPC somewhere "outside" Pelican Town/the immediate surrounding valley there's plenty of options that preserve mod compatibility. Inside the town/immediate valley are it's definitely harder.
all the roads immediately leaving pelican town are taken by the major mods
for a long time I wanted to add a romanceable engineer npc who moved in later on, and add a lighthouse between the town and the beach that she would repair and move into
Thanks!
there's always bus/train
Wren that sounds so cute...
(i'm cheating, i'm putting my expansion in the || golden scythe || map, a warp out to the rest of it)
Yeah, I intend to make use of the bus/train for my "extra compatible" config option.
the secret is to make an NPC that already has a house set aside for them, in this essay i will
i want my NPC to have an actual house you can get to though, and also not rely on either t he train or bus being available (since they are both time gated) and also dont take you half the day just to walk to her house
Im personally making my own map and planning to use the bus mod for it (if its compatible with 1.6 at least cjdnxjs)
Technically also minecart if for whatever reason someone wants to add a location only accessible from minecarts
Lacey is an outlier adn should not have been counted /jk
OK so I've been playing with slingshot stuff for a bit and then I remembered assetrequested to add weapon data but then I remembered I don't think slingshot has a type like the melee weapons to add in that fashion? Am I uninformed?
It is, I use it in my game.
alternatively, do the Mullners really need their house anyway? why c ant they move somewhere only accessible by bus—
YESSS thank u aba this gives me happie happie
Then yes that really narrows down your options lol
there's a few empty spots in the town map, but that assumes someone's not using a mod that changes the town map
(like sve)
thats my point, though! its a big barrier to making an NPC when its also not really something you can control if you want any sort of compatibility. your options are either no compatibility or compromise in a way you might not always enjoy
put your npc in mines floor 120 
make one special hole in the tunnel /j
i did have some thoughts about a npc who lives in the quarry actually
add a new area to the west of the farm. custom map compatibility? nobody uses those. /jk
its free real estate 
yeah, festival positions has the same problem. it's a shared resource and there's only so much space
(hence the spreadsheet)
Wait I had thoughts for that 🫢
(in my case, my compromise is going to be "okay, so theres one mod (that i know of) that already uses this location, im just gonna not worry about compatibility with that one specific mod)
its nice of RSV to like, add their own zone for all their npcs
i told my ideamen they ain't gettin spots for vanilla festivals, especially since they wanna make 3-4 npcs EACH
make it so i can download and endorse pls
technically raffadax does that
And even then no not everybody uses the festival spreadsheet... last i checked at least 😭
speaking of festivals dont forget you better hope no one adds a y3 key or whatever it was
It's my plan for my main expansion ehehe (dunno when that's happening considering I keep getting sidetracked though)
i added lacey to it a while ago (1.5 era), but at that time it barely worked, and soon after that it was reset and all my data was lost
May I ask why button
Im not super deep in the npc making mines yet
cough well, i'd better get going... 
i did have thoughts at one point about a mod that would find NPC collissions on festival maps and move them around as necessary but thered be no way to account for them having dialogue specific to that one spot they were meant for
ichor no, please no more festival years
hey wait I actually just had a really interesting idea, although you'd have to design the npc with it in mind-
you could make a one-time-constructable building that is an npc's house
i have had this exact thought
im not 100% on it but as i understand it if someone added something specific to year 3 (dialogue? location? im not sure) then, no other npc that was missing a y3 key would be loaded for that festival
(using NPCWarps and non-instanced indoors)
and since its not a required key, and the number is arbitrary, then...
(i was seeing myself out, since my mod discovered the problem with the year placement keys)
Omg itd just be an empty festival JFNDNXJS
need like, project year3+ festival
i think the vanilla NPCs would still be there but goodbye modded NPCs
Oh noooo thats so funny im sorry
NPC dialogue is tied to the map position in events?
if they've used the append i think so
no, but some authors write dialogue based on their chosen spot at the festival, so if you move them it might not make sense
i more just meant like, if a mod maker places their NPC next to the punch bowl and has dialogue about the punch bowl, then if you move them, they w ill be talking about the punch bowl while somewhere else
yelling "i love this punch" (50 ft away)
that's some good info
I spent a while with most of my (downloaded, not made by me) custom NPCs not turning up to the year 2 festivals. It was quite peaceful lol
I see. Yeah, I guess it's most common to "script" the entire thing as opposed to have AI behaviors based on their surroundings, which SDV might not even support.
Yo @aba
Yes?
do you mind if I ask u NPC questions from time to time?
(when i first brought up that thought months ago someone also said it'd be a permissions issue too but i... didnt understand why, but i was also very new in here, so i didnt feel like questioning it as a lil green sprout server member)
Hey yknow maybe they just walked away from the table after getting some punch 
Gotcha
Ops forgot to reply to avis message cjdncjd
I wrote a whole thing with Hiria talking to Demetrius before I realised that Demetrius walks around and her dialogue would look really stupid if you talked to her when he was off somewhere else lol
how painful would it be if i just expanded-- /j
(iirc it only checks up to how many year variants the festival has, so if a festival has 2 variants but someone tries adding NPCs to say Set-Up_additionalCharacters_y3 it'd do nothing)
Go for it. You can also join this thread https://discord.com/channels/137344473976799233/1277457201077813280 (I think we're discussing NPCs in there, right?) and this one https://discord.com/channels/137344473976799233/1263202101803352106 (specifically for discussion about the writing aspect).
just realized how this was an NPC question itself 🫵 😂
Thx thx
should we rename that thread lol
i forget, did chu make #1277457201077813280 , do you still have access to change the thread name to "NPC chatter" or something
ill be honest i dont even really know what it means for a festival to have a variant or what the Set-Up stuff is, im just repeating what i learn through lurking in this channel
¯_(ツ)_/¯
for the unfamiliar: in sdv 1.6.4, festival code added year variant keys for the additionalCharacters fields (setup and mainEvent), so you can set positions for modded characters on a year cycle, like with dialogue keys.
the problem is that that field is unique to the festival (instead of to the NPC), and if a year variant is loaded, no other years will be. so if even one mod adds a _y2 variant to modded character placements, any mod that doesn't also use it won't have their characters loaded in.
i knew this change was coming, since i was there when pathos added it, and had Lacey activate the appropriate fields automatically ahead of time, so as soon as people using Lacey updated to 1.6.4, all their other modded NPCs stopped attending festivals (except SVE, since that one rewrites the vanilla setup fields instead of adding their NPCs to the modded characters keys).
I suggested to make the shirk thread to be called "NPC and Tiled Suffering" because they tend to go hand in hand I feel like chsnchsjc
(i didn't know it would break other NPCs. it was an accident, please forgive me)
i feel like it shouldnt be too difficult to make a mod that loads previous years as a fallback but like i said a moment ago i know nothing about festivals. which means thats probably the devil whispering in my ear and its much harder than id expect
You didn't break other NPCs, its literally just the bug fix that made y2 use the _y2 postfix, Im not entirely sure how the idea that an NPC has to use the _y2 postfix for it to activate
if _y2 loads, the key without _y2 won't load. so if it's year 2 and one NPC is using _y2, and the others are not, the others won't be there
(I've checked the code and even confirmed with Casey, it'll use _y2 whether any NPC uses it or not)
oh, maybe it was fixed between 1.6.4 and now. at the time, i had people with my mod to blame for nuking their other NPCs, and they would return when Lacey was removed
Weird
i can only think of the delimiter nuking all other commands after it but i assume it wasn't that
Maybe I should check the code again but I'm pretty sure it shouldn't matter if an NPC uses it or not
my understanding then (and now, unless it has in fact been fixed) is that if _y2 isn't defined (i.e. if no NPC has added to it, since by default it is not), it will load the regular key, like other year variant keys
Damn it I just went to bed but now Im gonna get up again cause I wanna double check the code one second
gotta download the decompile to your phone
well, "fixed". it's not really a bug i don't think, it's just a consequence of shared year variant keys
Once i get to lvl 50 here i'm so gonna be asking to be added to that github repo with the unpacked files and decompile
ender gotta talk about tree framework for ages then
Do you have to be a cheeto to be given repo access?
ive seen you around so often i just assumed you were already level 50
you need to be a cheeto and level 50 yea
it is still just a decompile though and not the actual source code, keep in mind
it's cheeto + lvl 50
i've already got the cheeto part
Next week for me then
just need lvl 50
i also assumed endertedi was over level 50. i'm shocked
i'm apparently but a mere 39 right now
will button and i be left alone to the blues
im omw to purple so the blues dont matter to me sorry avi
(wait how do you ask for access)
i'm much higher level than i thought. i spend too much time on here, huh 😅
you might ask pathos directly i dont remember
its on the github gist that explains the roles
i will soldier on, i want those purple shorts
so you need to be lv50 (shepherd)
im just gonna become a 1.6 developer for a fancy red name. ez
I have decided that the additional role perks of cheeto matter more to me than colour, soz Avi
and then you message bouncer
too late for that button, gotta become haunted chocolatier dev
its not too late they might still need a 1.6.10
i could definitely ask for mod author now but i fight inner demons
Oh, I forgot about the repo access, I think I can get that now.
Gen question for a new mod author like me who’s only doing CP, would having repo access have benefits in understanding how to do mods better? I fear I’ll never touch #C
It says Shepherd is 100 so I guess I reached it a long time ago.
I doubt repo access would help much with CP? Since CP is already open source.
not really you can already get basically the same thing by just decompiling the game yourself
but the repo will have the commit history and everything unpacked and ordered nicely and you can look it up on your phone and stuff
Repo is debuggable too, no? That's what I heard.
what they said. it's convenient and you can see older versions easily
Oh that makes sense, a lot of CP material has been easily accessible to me thru github. Thank you for the clarification 
tbh i dont really know what that means bc cant you alreeady just use VS/Rider's debugger
or convenient access on mobile (which is less useful than it sounds because GitHub won't fking index files larger than an average jpeg)
(Also what do you mean about the orange, does getting repo access make you not-orange?)
i think losing orange means you lose repo access
i had some strange trouble building the repo
you're still orange with repo access
it was refuse to link xTile
and also readable variable names if you're on Linux and the decompile program won't give you them
ill fix it one day maybe 
you can ask for a one time removal of your special role though so if atra asked to be removed as a mod author atra would lose repo access
There've been a few times when Casey posted some comment from the repo that actually explained well what the code was doing, which was not apparent at all from the decompile. Often the decompile is sufficient though.
As someone with almost zero C# knowledge so far, having the decompiled game code has not really helped me understand much for anything CP-related. It's more useful to just ask people in here than try to puzzle it out myself. The only reason I do try to look at it myself is because I actively want to learn C#.
are you sure those times werent casey posting something from the actual source? how would a comment get into a decompile at all?
I've used it to help with some CP related things, but usually not for the actual creation process
Casey has source access
if you do know how to read C# it could still be helpful
I know - was pointing out that there is some valuable stuff in the repo.
(my understanding is that the decompile is not that far off from the actual source. but that's hearsay, you didn't hear it here)
it has been helpful to be like, "oh i see, fertilizers are hardcoded guess i'll throw this into the trash"
Oh, or you mean it's in the real source but not the repo we're talking about?
I don't even need to do that. I just need to leave the server:P
also gen question for the mod authors with a background in programming and the like, how much did your bg/profession aid in your mods?
you'd get it back if you came back to the server tho. your roles are saved
well being programmer helps u learn C# real quick
Oh well, rather than speculate and get things wrong I should just request access and see for myself.
besides that not really, i dont write C# for work
you could leave and never come back but then you cant post your sweaters
I thought you had to request your roles back when you rejoin
the roles channel says otherwise
I could join r/knitting you know
Warm, fuzzy, sometimes tangled. Due to the holiday season, it may take up to 48 hours for (1) a post to be approved/ reviewed (2) response to modmail/from a moderator. Regarding the API/blackout we're open again but also watching, listening, thinking hard. Whatever happens needs to happen thoughtfully. Please keep being excellent to each other.
I have a background in statistical programming which means that I understand how programming languages work but am completely lost with how incredibly different game dev is to statistics lol
Let's put it this way. It took me less than two hours between "never programmed c# before" and "first c# mod"
(are you telling me you're not excited f or my totally-not-kinda-useless "write harmony patches with CP" feature?! /s)
(And I'm not even a real programmer)
being a programmer in almost any language gives you a reasonably transferable skill, so picking up C# to do some stardew modding was not a heavy lift for me. and the ability to do C# in stardew lets you rewrite the world in fun and sometimes-not-advisable ways, which is fun and i find excuses to do it
Understanding code helps some, but writing code for SDV is quite a bit different from programming elsewhere
(i am also similar to atra with that though ive never done programming professionally. but knowing one language helps you know any other for the most part. zero to harmony in 5 seconds flat)
Also, my stats programming background is not very long because I got sick shortly after getting into it from psychology
So other stats programmers might find that they are less stunted with C# than I am.
(is2g if button's header image for that mod isn't 'it's dangerous out there! here's a shotgun')
oh its just being added to Special Power Utilities which already has a header image
oh, pain.jpeg
it is an ugly one but making it centric to this feature wouldnt make sense
so ill need to think of somethin else
centric? specific.
“Sometimes not advisable ways” 😭
(I am an actual electrical engineer though.)
hello, im trying to do tile data in tiled. is there a way to put the data to like 1 version of the tile and it span across all matching tiles?
That is how tile data works, so yes. If you're meaning object properties (the little squares that go on the pink object layers on the map)...not that I know of but I may just be unaware of how to.
Anywho, thank you for all of your work!
you guys make understanding how to make mods simpler and better for mod authors like me and mod authors striving to create their first mod
may all of your pillows be cold (or the ideal temperature for you) on both side 
(duplicate? hold shift and place it over similar tile? suffer /j)
Yeah it's pretty fast to copy and paste but you can also streeeeeetch the object properties over all the tiles (YMMV on if that breaks anything, IDK)
i think it gets yeeted if it's not 16x16
so the water has like 5-6 different textures and i wanted all similar tiles to be not buildable or placeable and indicated as water
just tryina see if there was a easyer way than doin every tile lol
It does not. fireredlily does their bathroom reno that way and I thought it would be a problem but they just all got converted into individual 16x16 objects.
I think if you edit the tileset you can put properties on the tileset itself
Right-click on the tileset name over in the Tilesets box, then click "edit Tileset". Inside there, you can click on the tile you want to be water and add a custom property of "Water". However, most of the water tiles should already have those.
Though, I'm not sure if you should do that if you're editing vanilla sets
i mighta made a edited version of the vanilla tilesets
For the none of you who are interested, I just checked the code, and the answer is.... 🥁
I was wrong lol, yeah adding a _y2 key does make that key active (what the game does is sets a var year = 0 and it checks if a <key>_y(year + 1) key exists, and then increments year++ until it no longer finds the key, and then to get the actual key for the year it essentially does (Game1.Year % year) + 1 ; so technically if you want you can make every npc author ever mad by adding a Set-Up_additionalCharacters_y3 key to a festival so custom npcs suddenly have to go through 3 year rotations)
If you export the vanilla tilesheet it should do water
If you're using vanilla, you shouldn't need to do your own tile properties because almost all the water tiles already have that.
Got it
Atra's Dialogue Expansion is now defining _y3, _y4, etc
For all festivals
Enjoy debugging that one!
so i took the vanilla tilesheet and expanded it, should i have not done that?
joke's on you, dialogue keys are not shared among all NPCs
atra don't even think about it I have 2 npcs how am i ever gonna find enough festival spots for infinite years
this also means that i could define y4 but not y3 and hold whoever decides to make y3 hostage bc if they add y3 then mine will fire and break everything, but it will be their fault
landmine modding
Probably better to just put your own custom stuff onto a separate tilesheet.
(i'mma make a y9000 for all of my ideamen now)
@vernal crest do you know how i could get those to auto update with the seasons, because igot sprites for each season
I mean I would define the setup keys
And event scripts
To five years out
(I'm aware dialogue keys are not shared. I use them in that mod.)
(Which will not see a release.)
If you want to jump into here https://discord.com/channels/137344473976799233/1277457201077813280 we can discuss this without the festival chatter in between
you don't even need to add more event scripts, just add the additionalCharacters key and make vanilla characters just watch the madness of custom npcs shuffling for years upon years until they get on track for 2 years and then repeat the cycle
man, something in the punch this year, everyone's gone!
now i'm terrified, waiting for the landmines of _y#
rn adding _y3 through _y11 so custom npcs will match vanilla npcs on year 1 & 2, and then again on year 12 & 13, and then 25 & 26 etc
_y{{query % even}} wholly incorrect syntax
would using the year token in that not just work to make sure your npc was present in every year actually
not really, unless you know exactly how many year variants there are
if there's 11 year variants you can do _y{{Query: {{Year}} % 11 + 1}} but the moment the number of variants changes you get out of sync
wait if it's {{year}} % {{year}} + 1 in the loop, would that just circumvent it since that's how vanilla is set up?
but it's not year % year + 1
It's (actual year) % (number of year variants found) + 1
since year % year + 1 would always return 1 anyways
welp we're just gonna pray no other expansions add more festival years, i sure won't (because i don't wanna get yelled at)
i will (i won't i have too many npc author friends i'd like to keep as friends)
what function is the one that actually increments the variants?
It's in Event.TryGetFestivalDataForYear
it's too late for a pr, but god i see it now
is it possible to add an input and output item for an existing mod? like when theres this machine but it doesnt have what i need. so i was thinking if i can reference their machine in the code then add said i/o via CP?
yea you can, same as adding new input output to vanilla machine
ooo thank you thank you!
If it's for personal use, you can edit their code, otherwise make your mod dependent on theirs
just make sure your patch loads after their patch that adds the machine
Though, it would still be better to make your own mod if it's for personal use because then if they update you won't have to make the changes again
okii 
but maybe if i add a {{YearVariantsAvailable}} token then it'll be fine right /j
just number it {{Range: 1, 999}}
i wish festival placements were controlled by NPC-specific fields in the festival the way dialogue keys are (maybe i'm missing something, but it seems like this would be straightforwardly doable). then we could have avoided this whole mess. oh well
im trying to make a separate mod (machines) requiring the food mod that im making mainly because i want to have it separately xd or for when i'll think of a new machine not directly relating to the food mod xd KKWKWKWK 
i think that's what the set-up is supposed to be? but uh, y-yeah, year changes
put it on my 1.7 wishlist, i suppose
How would that solve problem of multiple npc on same position
oh, it wouldn't solve that. only the _y2 hostage situation
damn
Let npc authors submit a list
for me I might just not deal with that
Then we have a scheduling algorithm
anyhow:
"MoveEntries": [
{ "ID": "6480.blueegg_BlueEgg", "ToPosition": "Top" },
{ "ID": "6480.blueegg_GoldenEgg", "ToPosition": "Top" }
If you wanted to add that you'd honestly just have to patch Event.LoadActors and do something like
foreach (string npc in Game1.characterData.Keys)
{
if (@event.festivalData != null && @event.TryGetFestivalDataForYear(npc + "whateverKey", out data))
{
//do whatever needs to be done to add the npc in, probably just copy the original method code from the game code
}
}```
Place as many people as possible to their first spot
i just realized, SVE has up to 99
This is a dating algorithm tbh
what even is this, I am so confused
atra, i have considered exactly this
(so has button, or at least something close enough)
MoveEntries lets you reorganize entries in the asset you're editing
oh I see
no yeah that was basically what i considered too
It's basically telling CP to take the entry with those ids and move it to the top of the list, for shops and stuff this lets item be on the top of the shop menu
(So have I. A year ago.)
It's algorithms all the way down
So like shops you can use it to move where something is, I usually use it for testing to move stuff to the top so I don't have to hunt for it
why haven't we all made this yet? (not you, atra, i know why for you
)
i think ichor or tia shot down my suggestion of making a 124x124 festival editmap
Rsv already does that tbh
And doesn't ES have the boat
Yeah it's nice we should do more 
Someone should do something about the shop interface
Casey had better shop menu
(tbh it would probably be not so difficult to just move NPCs if theyre overlapping.... but moving them to a good spot that still guarantees you can walk around and talk to everyone? probably a lil more difficult)
It got a unofficial update but there was some problems with that one using parent sheet index for some reason
to add, for machines rules it makes those trigger rules be considered before other rules. this is because the game defaults to turning all egg items without their own rules into mayo, and the mod maker doesn't want that to happen for their modded eggs, so they put their machine rules on top
I bet you that mod probably still works, eh?
otherwise the default "egg to mayo" rule will fire before the "blue egg to blue mayo" rule
Anyways
I was under impression that it broke with 1.6
What's the specific issue with the shop interface?
An atra had a long day
An atra needs to sleep
Night night! Remind me to do probability tomorrow
(Four meetings smh)
good night, don't let the year festival paranoia bite
Thks so much
Curious about this too. I recall seeing some "better shop UI" mod several weeks back (not Casey's, apparently, I just looked that one up) that seemed, well, the opposite of better. I've never really had issues with vanilla shops? Maybe it's a problem with mods that add like 500 new buyable items?
Yeah, I could see that being an issue, being able to search and have tabs would be nice
will this work the way i think it does?
"Id": "{{ModId}}_SeedReSender",
"Trigger": "LocationChanged",
"Condition": "!PLAYER_HAS_MAIL any {{ModId}}_{{Seeds}}Sender any, PLAYER_HAS_RUN_TRIGGER_ACTION any {{ModId}}_SeedSender",
"Actions": [
"AddMail all {{ModId}}_{{Seeds}}Sender now",
"MarkActionApplied all {{ModId}}_SeedReSender false"
]
}```
`{{Seeds}}` being my dynamic token of all of the trees i've made so far, by name
(i'm testing it now but i'm just throwing it here before i implement)
So the one casey had gave you search bar and a optional grid view of shop
It is nice if u have a bunch of mods all adding seeds to Pierre's
what is the intent with the trigger
(also why not just make the SeedReSender trigger always be not-applied instead of unapplying it with the action (im not even sure if that would work the actions might fire before it gets marked applied))
For other shops it's not as important
Although for some reason the shop menu also counted drawers
intent is just to check if a player hasn't received the initial mail (because i'm doing updates) to ensure that they get the mail that they're missing
Not sure if that was og mod or something from unofficial fix
I guess shop categories are OK as long as there's also an "all" category but it seems kinda meh in Stardew.
you would just wanna check for the mail then, and you can check that on the Current player
I've just never seen a shop menu that long or complicated.
what is the value of {{Seeds}}? i know you said its all the trees, but is that like, a list?
yeah it's a list of the mailnames i've sent out already, i'm trying to circumvent the "mail spam" for whenever i do an update, but i'm honestly thinking i should just bite the bullet, involve spacecore, and make a new map with a shop 
if every mail name is in that list then its going to be looking for a mail with the ID of like, Seed1Seed2Seed3Seed4Seed5 etc
its not gonna make a separate trigger for every seed in the list
ah, i bite the bullet then and open Tiled
i believe you can't use MarkActionApplied to mark the current action not-applied, correct
you can just check if they dont have a mail for an individual seed letter and send it if they dont
or make a letter that contains all the kinds of seeds
but just one letter
yeah i was going to just do the individual letters as per "they don't have this one, better send it", but honestly since i'm going to just be like, "oops here's another mushroom" i might as well get it out of the way now and have a different location entirely
you could also make letters specific to different versions of your mod though if you've already released it it's probably too late for a nice naming convention there
e.g. LetterV1 would have all the seeds present in version 1, LetterV2 would only send the seeds you added in version 2, and so on
and then on a new save you check if they have none of those letters and if not, just send them all (but skip the mailbox) and send one letter with all the seeds instead
(you send them all with the mailbox skip so that the mail flags still get marked)
i'll keep that template for my trigger warning ones, lemme just write that down
the rest of them can get shoved into a custom shop
but also yeah i think doing !PLAYER_HAS_MAIL Any means "if anyone has the mail, dont do this" and not "if anyone doesnt have the mail, do this"
but admittedly im not 100% on that
which might be what you want, if you dont want farmhands to get extra seeds if the host already got them
but then you're sending the seeds to everyone anyway if the host doesnt
considering the drops and a good chunk of them are ~aesthetic~ it doesn't really affect balance imo
i've kept the prices to like, parsnip levels lmao
just as long as you keep in mind then that farmhands wont get mail on updates with that system
unless they join before the host moves from the farmhouse ig
yeah that's why i'll keep it to the less than savory-looking mushrooms, i'll just leave the seeds an unlimited buy as a money sink if people really enjoy the aesthetic
"{{ModId}}_SeedReSender":
Id: "{{ModId}}_SeedReSender"
Trigger: LocationChanged
Condition: >
!PLAYER_HAS_MAIL any {{ModId}}_{{Seeds}}Sender any,
PLAYER_HAS_RUN_TRIGGER_ACTION any {{ModId}}_SeedSender
Actions:
- AddMail all {{ModId}}_{{Seeds}}Sender now
- MarkActionApplied all {{ModId}}_SeedReSender false
(sorry, I've got yaml on the brain)
you're just enjoying that yaml aren't you
do you want me to throw my blank npc template at you?
This is a template?
well it's completely empty minus a few dialogue lines, if you want the actual templates i've uploaded to wiki.gg i'd have to find it
it's effectively a fully functioning npc minus dialogue
https://stardewmodding.wiki.gg/wiki/Npc_template this is more 'template' without the bells and whistles
you should make a stardewxnbhack fork that outputs yaml
That sounds wrong on so many levels.
if you want ppl to use yaml its better if they have yaml unpacked content to look at
but all u gotta change is the json serializer part right 
afaik, most people just use the examples.
I look at unpacked content for how to do stuff a lot
so if u want to just convert the unpacked thats fine too
Oh wait, my mistake, I saw xnbhack and was thinking xnb mods. It's just the unpacker.
Still, it's going to unpack what's actually there, and what's actually there is literal JSON, isn't it?
i figured it was just object like data
just change this part to a yaml converter ig
https://github.com/Pathoschild/StardewXnbHack/blob/51662b52ebd3cb88f5fec43849e9ab97d60299a4/StardewXnbHack/Framework/Writers/BaseAssetWriter.cs#L51
Maybe MonoGame has some special serialization format that is not JSON? But then I wonder how the web-based unpackers are able to unpack them.
not sure, possible that stardewxnbhack is special bc it just reads from loaded game content
It's some freaky BinaryReader stuff on the inside, and the Pathos lib calls it via Read<object> so it has no expected type.
Looks like there's a 7-bit int designating the data type and then a bunch of custom readers. But I don't see a DictionaryReader. I got lost at LoadAssetReaders.
the source format is xml, the compiled format is close enough to it, but the json form we know and love is a translation that xnbhack is generating
xml is natively supported by C#
Does that mean that some of the strange slash/space-delimited formats inside the files are also not the real underlying data format, or is that a Stardew special?
that is still a stardew special
Figures. Had to ask.
interesting, NPCs won't use touchaction warps in path calculations, only those designated on the map properties in Warp properties
but the serialization format is xnb https://github.com/SimonDarksideJ/XNAGameStudio/raw/archive/Samples/XNA_XNB_Format/XNB Format.docx
Right, I had the (apparently false) impression that XNB was some kind of archive/container format for other data as opposed to a unique serialization snowflake.
7bitEncodedIntegers.
From the latest, I'm inferring that it's more like "binary XML"
Gotta love em
can be considered binary xml, with first class support of stuff useful for game engines like textures, 3d models, etc
(like BSON, but... for XML)
xnb is an "XNA Binary"
I think he was kidding.
i was somewhat serious cus this naming convention exists elsewhere
But ASCII is a text encoding, not a file format.
like maya has ma (maya ascii) and mb (maya binary)
And ASCII would be a terrible idea since these files clearly need to contain Unicode strings.
\u escape 
I... guess so. But at that point, aren't they just essentially XML?
in this case yea 
why are they like this
Microsoft XNA (a recursive acronym for XNA's not acronymed)
time honored software tradition
This conversation started in the context of YAML which is exactly the same.
(Which in case you didn't know, stands for "YAML Ain't Markup Language")
So indeed, time-honored software tradition, with a bit of an eyeroll during the "honored" part.
wait i thought it was yet another
it used to
Nope. https://yaml.org/
weh
They changed it
If it used to, it must have been a very long time ago, like more than 10 years.
all the way back in two thousand oh one
More than 20 years, actually.
crumbles to dust
How did you even find the pre-1.0 spec? I could only find it back to 1.0 in 2004.
I found this on the wiki page: https://yaml.org/spec/history/2001-08-01.html
the better name tbh
They changed the pronunciation too, apparently.
only marginally
a language whose purpose is being a superset of json which is just a retconned spec for using javascript syntax deserves the name "yet another markup language"
I was thinking about going with YAM or YAP for a mod name earlier today but came to my senses and decided no, the world does not need Yet Another Yet Another.
I think it's a bit unfair to say its "purpose" had much to do with JSON, even if can accept a lot of valid JSON. It was always its own spec, as far as I know.
chefs kiss
The "flow" constructs that are JSON-compatible came much, much later. 1.0 was not a superset of JSON.
if i never encounter another Yet Another ___ project, it will be too soon. f-tier name category
/whistles/
naming all my projects "The Ultimate ___" to serve as shining examples of hubris and audacity
Why not both? Yet Another Ultimate ___.
Yet Another Ultimate Immersive Overhaul
That would be like... self-aware arrogance. Clearly we know it's not the ultimate, but we're going to call it that anyway because we can.
Immersive really is a hilarious evergreen meme. It's hard to convey to the non-Beth world why it's so funny.
How do you sum up thousands of YouTube videos and hundreds of thousands of mod descriptions in a few sentences?
it escaped into general game design spheres by now
Oh, there's nothing wrong with immersion as a concept. But at some point the Skyrim modders realized that if their mod had the word "immersive" they'd get 10,000x the number of downloads, even if it was the most absurdly lore-unfriendly, game-breaking mod imaginable. And then that became a modder meme and "immersive" became a name for joke/trash mods. And then it morphed into a video meme, and achieved escape velocity.
tfw one of my upcoming mods have 'immersive' in its name 
eh it's 1 mod out of 10 I think I'm allowed to use that word once, as a treat
It's valid if you combine it with something that is obviously and thoroughly un-immersive.
I have my own convention for better or worse
Stardew modding is land of "authorname's thingymajigs"
Like "Immersive mistranslated item descriptions"
and yet the most downloaded mods are "Tractor", "Content Patcher", "Stardew Valley Expanded"
tbf i think "authorname's thingymajigs" is a good convention to follow when the search is as god-awful as nexus search is
"Immersive futuristic dystopian cyberpunk Stardew visual and dialogue overhaul"
ifdcsvdo is a great mod though
unfortunately I'm playing it very straight this time. mainly because the name I wanted was taken 😅
my cat mod has "ichor's" in the name, but it's descriptive. she was my irl cat
I like have shops that barters instead of just using gold but it's hard to decide what can equivalent
/ mod muttering
Yeah I like being able to find one author's stuff plus others following that author's style
You could just click on the author's profile, though.
I think I'll just use items of equivalent sell price
Also the raccoon family is so cute
I do think the author name gets more relevant when it's art, as you might be looking to mod in a particular consistent art style.
If I ever decide that I'm important enough or that modding is serious business enough to put all my mods under a brand umbrella, I want you to shoot me.

(fwiw, sinz gets a pass because of Profiler, which actually is that important, despite the occasional "do this better" comment)
If I wrote mechanic mods instead of NPCs I'd probably give them all the same branding
But for NPCs and random portrait replacers, nope.
.... I stole mycology because no one had it
and yet Profiler doesn't use the branding
No Windows none of the files are open!!! Let me change the folder name!!!! 
Coincidence.
(Or is it?)
Is there something I can do to use my i8n file for the strings I load as "assets/NPCs/Schedules/Strings_Schedules_NPCname.json"? I tried the normal format I'm used to, and the character just says "{". { "Russell.DesertFestival001": "{{i18n:Schedule.Russell.DesertFestival001}}" }
Schedules are different, they need a specialized, lemme dig for it
only EditData does tokenization, Load just loads your file as-is
\"Strings\\schedules\\EdelweissSeung:Spring_Sleepy.1\" schedule "dialogue" then the editdata: "EdelweissSeung:Spring_Sleepy.1": "{{i18n:EdelweissSeung:Spring_Sleepy.1_0}}", sorry I'm on mobile
OK I think I understand, thank you both
so will I have to do a separate editdata statement for every key? (schedule dialogue element)
Is there a way to have my NPC prefer roads when executing the schedule? He is walking behind the community center and Pierre's shop
They already do, a tiny bit
Can anyone make a mod where the farmer can't talk since the day he/she was born.
AFAIK there's not much you can do to affect pathfinding. You could try adding in small stops in the schedule so they have to walk past the shop instead of behind it, but they'd probably look strange unless you could make it look intentional (maybe making them stop to look at the help wanted board briefly or something).
what kind of destination has your NPC going behind both Pierre's and behind the Community Center?
Can't they modify the pathfinding code itself?
Lol sure if they really know what they're doing with C# and like pain.
And know how pathfinding algorithms work and how to improve them.
How would they go around on doing that? Maybe considering the tile properties in the algorithm?
What tile they stepping on
Does stardew use A*?
most likely
I have no idea. I know nothing about pathfinding algorithms.
pathfinding algorithms are easy, maybe one of the easiest hard-looking algorithms to learn
I love them
I know atra hates the pathfinder and that is enough for me to know it's horrible to work with.
When I figure out how it works I'm gonna try making a better interface to work with
I don't know what an interface is within the context of pathfinding.
There is no interface in the context of pathfinding
But I guess functions to make it easier working with them?
Then what were you talking about and why was it as a reply to a message about pathfinding?
because pathfinding itself, whatever algorithm it is, it has some type of interface to work with in stardew valley I suppose
Like many games
But when you said it's a pain to work with it, there is always a way to make it easier
By interface I don't mean struct, class, interface etc
I'm a functional programmer by nature
I mean a general form to work with whatever pathfinding is like right now. Must be something like this out there already
Have you decompiled the game's code so you can have a look?
Yeah, I'm looking at other stuff rn tho
That's what you do when modding, no?
Look at other stuff?
😂😂 no bro
You typically start by reading whatever you can reverse engineer from the game, no? And testing out values?
After looking if there are any APIs out there ofc
...I don't, no.
A lot of people use Content Patcher as a framework here
It opens up modding to a lot of more creative-leaning people
But it's certainly less technically intensive
I can't write C# and can barely read it. I'm definitely not starting anything by diving into reverse engineering game mechanics lol
Stardew is, fortunately, a rather open book when it comes to modding it
I see
I'm also very hazy on what an API is
I'm no master on it either ahaha
Not too late to turn back I say ahaha
Yep, definitely gonna start using it
I read about it
A little-
But now I'm reading even more, looks great
Plus if you want to, you can make a mod with a C# and a Content Patcher component (which is what I'm dabbling in) for more flexibility
Ichor's Hat Mouse Lacey NPC is a really good example
Yeah, I plan on using both interchangeably
I was talking to them earlier
nice to know
I totally forgot about it
One message removed from a suspended account.
Oh it's probably the latter
One message removed from a suspended account.
Question for anyone fluent with custom buildings, is there a way to give them a chimney smoke without giving them an interior map? (without using C# obvs)
Like a particle effect or animated building sprite?
Wait I just realized, if you could make it so that your increased recipe prices correspond to gold quality, and if you can change the cooking to give you the food at gold quality, you'd be able to up the sell price without the Qi seasoning increasing it by too much
Now, the new question becomes whether you can have recipes give the gold quality instead of normal quality... and I dunno that
There's a ChimneyPosition property the vanilla recognizes, but it works only if there's a burning fireplace inside. Is there a way to do the same thing on a custom building that doesn't have an interior? (the wiki page link: https://stardewvalleywiki.com/Modding:Blueprint_data#Advanced)
Not with CP. You'd need some C# coding for that
Or well, do it as a DrawLayers entry
Thanks for looking into it though
Didn't do any modding since 2 years ago. Is JA and DGA still a thing? I have that unfinished project lying around on my GitHub, but never finished or released it.
Both are deprecated as of 1.6. for furniture use CP or furniture framework and use CP instead of JA
Would the Particle Framework work for custom buildings maybe? I couldn't really tell
For content patcher, are vector's seen as strings or objects (e.g. "5, 7" or {"X": 5, "Y": 7})?
Figured, thanks 
I see. Thanks 🙂
Don't think so judging by this list, "location" would be the closest thing
https://github.com/Smoked-Fish/ParticleFramework/blob/main/README.md#type-the-type-of-thing-to-target-one-of-object-furniture-npc-location-hat-shirt-boots-pants-tool-ring
@vernal crest TIL some mail flags are only set in events, so that's an unfortunate amount of extra files to poke through
I'm also wondering if I should make a list of world state ID's, since they're starting to get slightly involved here as well, just came across a second mail flag that's unused in favor of a world state ID that's set with the same name
Much like the beach bridge
am i able to edit dialogue in a mod folder using notes?
notes?
Event.addSpecificTemporarySprite is horrifying
It checks against the specific length of the sprite key and then against a specific character in that key with nested switch statements, the vision board to keep these cases from conflicting feels fever dream-ish
That isn't how the code is written
You're looking at how switching over strings compiles
Oh thank fucking god

I just spent 2 hours on adding some code and it failed to register
And then I deleted the code only to realised my mistake
Can't undo?
!vsc
When creating content mods, it's useful to have a program that will check the validity of your json for you. We tend to recommend either VSCode https://code.visualstudio.com/download or notepad++ https://notepad-plus-plus.org/downloads/
lacking undo in your text editor sounds... not ideal
sounds like a "only red ink" kinda feel
like the notes application
highly suggested to use something with a json verifier, like notepad++ (with an addon) or visual studio code
mainly because 1) it will catch any missing }, ], and ,'s, as well as any syntax that seems out of place
2) it will actually save as a .json rather than something strange that mac does like name.txt.json
VSC is also amazing, as you can install extensions for markdown, useful when working on your readme file.
I'm pretty sure it has some snippet extensions, better linting, etc.
if you're unlucky like roku, it also circumvents the flashbang effect that notepad++ does
Further on that weirdness, it only happens when I'm opening either the unpacked contents or downloaded jsons from others
When I open my older text documents or my own json files, it keeps my theme settings
Classic npp quirkiness.
Btw, VSC has apparently an extension for Stardew Modding for code snippets and syntax highlighting for dialogues and events. Never installed them though.
yeah linkoid has a json highlighter for events
Yeah that's the one I found. Actually good to know. Because I will start a new mod, this weekend
(C#) hey everybody, is there a situation where ItemRegistry is unsafe to use in multiplayer?
in one of Secret Note Framework's patches, i am calling ItemRegistry.GetDataOrErrorItem, and this is ultimately causing concurrent access errors for one user https://smapi.io/log/af013a38a4514bb89db899a7562fc2a2, i think at the point where ItemRegistry updates its cache (ItemRegistry.CachedItems[itemId] = metadata;). this breaks the user's GameMenu
Log Info: SMAPI 4.0.8 with SDV 1.6.8 build 24119 on Microsoft Windows 10 Home, with 118 C# mods and 222 content packs.
Suggested fixes: One or more mods are out of date, consider updating them
at System.Collections.Generic.Dictionary`2.FindValue(TKey key)
at StardewValley.ItemRegistry.GetMetadata(String itemId) in D:\GitlabRunner\builds\Gq5qA5P4\0\ConcernedApe\stardewvalley\Farmer\Farmer\ItemRegistry.cs:line 256
at StardewValley.ItemRegistry.GetDataOrErrorItem(String itemId) in D:\GitlabRunner\builds\Gq5qA5P4\0\ConcernedApe\stardewvalley\Farmer\Farmer\ItemRegistry.cs:line 341
at StardewValley.Menus.CollectionsPage..ctor_PatchedBy<ichortower.SecretNoteFramework>(CollectionsPage this, Int32 x, Int32 y, Int32 width, Int32 height)
...```
seems to only occur after sleeping, so maybe an earlier error is partly responsible?
This person lives a wild life
(walk of life is failing on day end, which makes me suspicious, but it seems totally unrelated)
cursed log
Sorry I turned in for the night : ) The particular pathing was to go to the bus stop from a spot near the community center where my NPC's building is. It was only for the desert festival but I'll look into blocking off a path and/or adding a stop
no i feel like crab pots from wol might be related
Oh yeah that makes sense
This is unbelievable.
Failed in CrabPotDayUpdatePrefix:
System.InvalidOperationException: Operations that change non-concurrent collections must have exclusive access. A concurrent update was performed on this collection and corrupted its state. The collection's state is no longer correct.
at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)
at StardewValley.ItemRegistry.RebuildCache() in D:\GitlabRunner\builds\Gq5qA5P4\0\ConcernedApe\stardewvalley\Farmer\Farmer\ItemRegistry.cs:line 470
it is also explode in item registry
There was a bug, and it was a bug someone like me, who makes a slime-centric mod, would be most impacted by...
oh heck, good eye chu. i missed that! that seems likely
And I was completely oblivious to it because of my own lack of presence.
It's actually hilarious.
(This isn't meant to be mean spirited or anything.)
(I'm actually laughing my ass off r/n because the bug happened and was fixed and I was completely unaware.)
can you make an NPC with a config to swap them male or female, and not have fully separate NPC stuff? Like reuse dialogue and just swap pronouns, have a config for which spriteset to use, etc.
hm kind of?
short answer: yes
long answer: it's pain
need to make your own npc_pronoun token to pass into all the i18n
sprite/portrait is simple by comparison
hmm interesting.
alternatively just never write pronouned dialog with them
my shapeshifter changes based on player gender, and sits on 'undefined' otherwise
also true, you can get away with ${male^female^undefined}$ in dialogue
that one is for the player
oh or just make them kinda enby and the config switches between the two general looks
i dont think its available for the npc
how do we find id numbers for items? i thought it would be on the wiki but i didnt see it
yeah if any other npc refers to them i just say 'them' cause i'm lazy
!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 know there was a genderfluid NPC called Riley but I didn't look at the code, could see what that author did.
ty
thinking down the line for an optional NPC for my mod, getting more thoughts onto paper so I don't have to split attention
https://mateusaquino.github.io/stardewids/
I use this when I'm feeling lazy
the game has some undefined gender npcs
just a word of caution if your nb npc is romanceable: flower dancing sprites is pain
I would make them probably not show up to that.
Give them two left feet
thankfully the game has two separate instances for 'wedding' sprite indexes, so i was able to shove that in with no problem
High level concept is they're a junior druid who hangs out way in the forest somewhere and a marriage requirement would be hitting level 10 in the mod profession (if that's possible too, I know there is a custom NPC that relies on a certain event to become marriage candidate).
yea thats possible, u can make them reject pendent until u have lv10 by changing their dialog
be careful about adding stuff to forest though, its not free real estate there's so much stuff down there
i should honestly look around for all of the expansions at once just to reconfirm the place i want my warp is untouched
yeah I was watching that convo yesterday of like, there's no room for NPCs without a custom map, and then you have to worry about where to put the map.
could have a temporary tent in the secret woods
NPC's can't path there
honestly i'm fine with one "tunnel" doorway in the place that i'm looking at, and it'll go into the rest of my expansion
secret woods is a whole different can of worms actually
oh no
there is a Juliet and Jesse event there (although the sprites were kinda messed up).
events are different from schedules
As long as it's actually an event, it's fine
good to note
what's the issue with secret woods that you can't park someone in a corner? Pathing?
if they never move from that spot, it should be fine?
It's NPC banned, though I'm not entirely sure why
oh that would make sense
i think you can make it happen though
you could still put their house in there and cheat around it with NPCWarps
junimatic has a event with linus in there
Yeah, as long as you didn't want them to do anything else that day it would probably be fine
(you'd have to think about SVE though)
they just won't walk through the secret woods map proper
druids can use the mycelial teleportation network, no problem there
SVE yeets the whole damn map
yeah SVE is so huge that you have to make little carveouts in events for it or people will skip your mod
which is fine, I play with SVE so I would be doing it anyway
As if I needed another reason to avoid making an NPC, dealing with people wanting compat is reason enough
what if u just make a mushroom warp totem
compat with a really huge mod is fine, but if someone asks for compat with one-offs I would probably stop there unless it's trivial to add
that ppl have to build to meet ur npc
that would be very thematic to my mod so yeah I'll make a note of that too
compat for festivals, map edits, etc. is definitely the worst part of making an npc. compat where you do fun tie-ins, that's joyful
oh you reminded me i still have to build my damn mushroom map
and that's easy, druids don't go into town so you can skip festival dialogue or stuff them way in a corner away from any other possible NPCs.
Hello! I've been tackling at this for a while with no success so figured I'd ask cause why not- I'm trying to make a mod I'm working on compatible with generic mod config menu, and while I can follow the Modder's guide I've gotten stuck as I lack any reference to "IManifest", I do have references to StardewModdingAPI. Im not sure what to attach which could help clarify my issue, so yeah haha
it sounds like you are in C#, so you have inherited the Mod class
which has property ModManifest
that is what you give to GMCM
hey so getting this error. what is the change field? how do i add that in?
!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.
❤️ Thanks so much Ill see if I can follow that!
included files have to be
{
"Changes": []
}
``` like a content.json
would that go in this portion?
inside the file
You leave out Format, but Changes is necessary
In Objects.json your file should be something like
{
"Changes": [
//all your patches
]
}
alright. what do i put for 'all ur patches' ? .-. bare with me as im still learning
Whatever you're trying to do in Objects.json, you didn't share it so I have no clue lol
You definitely can't just edit the unpacked files and include them
You have to use CP to patch the base assets
"I want to change X name from Y object so I tried this (insert example of your change)"
then people can give you specific feedback
If I were to make an "expansion" mod, should I make that new village available once the bus is repaired? I think it would reduce the potential conflict with SVE, Ridgeside, etc., right?
Bus seems hardcoded, unless you're going to add a different way to get there?
Though, was there a mod that lets you add locations to the bus?
Hmm I will quickly check. I'm on the phone so I can't look at discord 😅
There is. "Bus Locations unofficial 1.6 fix"
I will use that as a dependency in that case.
Sorry for the followup, Im still having difficulty creating the API interface, where the functions include IManifest - should I put the interface in my entry class? If so - how should I handle the inclusions of IManifest?
This is the interface Im trying to implement btw ||https://github.com/spacechase0/StardewValleyMods/blob/develop/GenericModConfigMenu/IGenericModConfigMenuApi.cs||
Something like this:
{
"Changes": [
{
"Action": "EditData",
"Target": "Strings/Objects",
"Entries": {
"Amethyst_Name": "Purple Rock",
"Anchovy_Name": "Stinky Fish"
}
}
]
}```
Did you create a IGenericModConfigMenuApi.cs for your project? (@acoustic summit)
I didnt, I guess that means its its own thing. When making it as its own class(ish), it still returns errors in regards to the lack of a reference for IManifest.
here's a example of copied api interface
https://github.com/Mushymato/StardewMods/blob/main/SprinklerAttachments/Framework/Integration/IGenericModConfigMenuApi.cs
if you have intellisense the ide should indicate where a particular class name is from
multiline targets is very nice
i do wonder why targets werent like a list though
rather than this comma separated string deal
I can't read it now I'm in a car but I assume it'd be good as an example for npc creators
Managed to figure out I was missing an assembly reference to Core Interfaces - thanks so much for all your help! @lucid iron @rancid temple
If you look at the commit history, you'll see it only took me 40 mins to convert the whole project with my online converter. It would have been faster if I didn't take the time to re-multiline some of the strings (my converter will auto-multiline long strings, but not as a neat "list". It's more like an arbitrary word-wrap.)
I don't think I've ever had to manually reference Core Interfaces
what is meant by Core interfaces
I dont really know, I just know that when I added it as an assembly reference the error for a missing reference finally went away haha
Its in Smapi internal
Yeah, I have no idea, sounds important though
this is just the gmcm api though 
It might be using StardewModdingAPI.Utilities;
I don't even have that lol
My guess is because CP didn't originally support multiple targets at once in 1.0
ah makes sense 
so are you accessing the api via smapi, something like this
var GMCM = Helper.ModRegistry.GetApi<IGenericModConfigMenuApi>("spacechase0.GenericModConfigMenu");
where IGenericModConfigMenuApi is your mod's copy of the api interface
I would also just go back and re-read the instructions on how to set this up, because it's pretty straightforward
There's already a tool that extracts XNB's using yaml
I am yeah! The instructions were quite straight forward, for sure!
To be fair
The instructions are straightforward unless you know c# in which case they make no sense and you just have to follow them 😛
well i believe IManifest should just be StardewModdingAPI.IManifest
but it is prob same class as internal
Just be like me and only know enough about C# to cause problems
Everyone starts that way
i just dont want this to lead to issues where u r like, including all of smapi in your mod 
Three years later you'll be like "yeah, that's just an oddity of how the net 5 string interpolation works."
Knowing my memory it'll be "wait hang on, I vaguely remember atra sent me something about this 3 years ago, lemme find it"
haha, all for a little tickbox next to a single option 🥹
Yeah it's interesting for the ... dictionary??? Based??? Ones still keep their braces
You can keep my stuff as an example, I'm probably gonna yeet my assets folder though since I wanna refer to it when I'm making my npcs
I was reminded that marnie holds a monopoly on the animal shop ui so that's something on my wishlist
Ones still keep their braces
If the original JSON dictionary was defined on one line like"When": {"Spouse": "Abigail"},, then my converter will choose to use YAML's flow syntax to define the dictionary on one line as well -->When: { "Spouse": "Abigail" }
My JSON to YAML converter specifically keeps Stardew JSONs in mind. It even does it's best to preserve comments.
You can't find any other JSON to YAML converters online that preserve comments.
(slaps the top of the converter you can fit so many comments into this bad boy)
Oof .NET 5.. that's practically ancient now
its not really important but is there any perf differences 
since u r just patch content patcher i imagine most of the bad perf is still gonna be people putting on time changed stuff
I mean, SDV is using .NET 6 so it's not that ancient by comparison lol
and we've only just stopped using it and switched to .net 6 (which i think is also EOL)
Both are though. .NET Core 8 is now LTS
By comparison to LTS sure, but I was comparing against something that actually mattered in context
Oh yeah that's true. I just forgot how old Stardew is 😂
There are still people who play on the compatibility branch too
I think it's nice that u can run stardew on fossilized potatoes
(I mean there's stardew mobile)
Isn't that still not up to date?
it's on 1.5 yeah
here's something im trying to do. im just struggling with the highlight line. the json validator says "Invalid type. Expected Object, Null but got String." which i dont kno what it means
CA put a post out a bit ago that he's actively working on the 1.6 update for mobile but no ETA.
Your Entries should be a model (enclosed in {})
oh i didnt see that. thanks. its just this chat is pretty active 
Some ppl have phones with better spec than their pc from 15yrs ago 
As for gift tastes though
I believe you have to use text operations for that
Unless it's for a new NPC?
If it's a vanilla npc, yes
My (this year) phone has better specs than my (seven year old) laptop
But that's okay
@royal nimbus I suggest finding a mod that does something similar to what you want, specifically try to find ones that do the same kind of edits you are doing, and use it to see how yours should be set up
i have a template stashed somewhere if you wanted to add something to a universal likes, neutral, etc, lemme grab it, but if it's for a custom npc, it's unnecessary and you'd have to use (i can't pull up the wikigg right now https://stardewvalleywiki.com/Modding:Gift_taste_data
https://smapi.io/json/content-patcher/2362635990bb4aa19a2a18e0a9bf88ef gift taste vanilla edits
ah okay. how to i type that out? and yeah its just edited npc data, im not skilled enough to make new ones yet
Follow the second link Aviroen sent just above
sorry... there's a lot going on here atm so i wasnt able to read all the replies
okay this is making more sense now, thanks.
(goodbye i am in lecture)
hey i heard that the greenhouseinterior.png is no longer used for whatever reason so when i tried to edit it, the changes didnt work. so im wondering, where's the texture for it which i can edit?
Maps/townInterior is what the map currently uses
If you have the greenhouse map open in Tiled, you can select the stamp tool and right click the tile you're trying to find and it'll select it on the tileset
You need the correct layer selected as well, but that helps narrow down what you're looking for
i see. well im not familiar with tiled yet. it looks so complicated and its something im gonna have to save for last for working on x_x
Tiled is fairly easy, kind of like an image editing software but more simplified
i srsly wish working on maps were easier. like just a put together set png
can u edit images on it?? i wasnt sure
im gonna have to look up a tutorial for it
Nah, just the map files
yeah i meant like can u edit the textures on there? like change colors and draw things on spesfic opened textures on it?
I feel like creating a map is like making an image, just with specific stamp tools
Nope, you have to do that in a real image editor
ah okay
something ive been wondering. whats this pink glassly looking texture? ive been wondering if its a place holder or something
Not sure, might be unused, kind of hard to track what's used where
ah
I can't think of anywhere I've seen that, but it might just be something innocuous that I glossed over
Hi, I'm making a mod using the GoldCoin object in a shop system; I've ran into a issue where if the player purchased more than 1 gold coin it doesn't stack more than 250g into the wallet...
Would anyone know how to fix this? ;-;
this is a known issue i believe
I believe it's fixed in 1.6.9
Ah, so I should wait until 1.6.9 is released before contuining work on this mod?
(why are they buying coins)
(casino shop)
If you are on steam can use the beta, see pins
ty
Hi! I'm kinda new at modding and I wanted to mod a heart event in, but the event isnt triggering. I used a new safe file. Any ideas why? This is the test code I've made:
{
"Format": "1.16.0",
"Changes": [
{
"Action": "EditData",
"Target": "Data/Events/Hospital",
"Entries": {
"88/f Harvey 250/t 900 1500/p Harvey": "50s -1000 -1000 /playMusic distantBanjo/warp farmer 5 9 12 Harvey 5 5 7/playSound doorClose/skippable/pause 100/playSound wateringCan/emote Harvey 16/pause 500/move farmer 1 3 12/pause 200/textAboveHead Harvey "Oh hello farmer. I just finished watering my plants.$0"/move Harvey 0 0 14/speak Harvey "How are you holding up on your farm?0$"/speak Harvey "I see! Good to hear! Don't overwork yourself on your farm and take care!$1"/pause 500/emote Harvey 16/speak Harvey "...$8"/pause 300/speak Harvey "Oh? You'd like to chat with me?$8"/speak Harvey "Well, I suppose we can talk about uhm...$2"/pause 400/speak Harvey "Jugulars...$2"/end warpOut",
}
}
]
}
do you have all the conditions?
There needs to be a slash after "50s"
you're missing a slash between 50s and -1000 -1000
Also your quotes " need to be escaped with \" inside the string.
You're also missing the 3rd command for the actors, events have to start with music/viewport/characters, otherwise the event script is invalid
Also, you need to be in Format 2.0.0 at least, 1.16 is way out of date
(this is a great use case for yaml imo)
(Would YAML help with event scripting tho?)
ty all for the feedback!
where do i get this version?
(Yeah, a lot, it allows multiple lines and special characters don't need to be escaped)
I think JSON CP can do multilines now?
Use jsonl to get it to stop complaining
yeah events, dialogue and a few other places ignore whitespace now
yeah, my point is that the event scripting isn't JSON, it's its own thing, so not sure the YAML would affect it
Just change it in your JSON file, it's telling Content Patcher what minimum version to use.
I think for readability YAML is maybe better, but it won't help you understand the event scripting any better lol
okay ty!
You might also find some of the event tutorials to be helpful, there's several on the modding wiki, like https://stardewmodding.wiki.gg/wiki/Tutorial:_Anatomy_of_an_Event
thanks for this! was looking at the stardew wiki and didnt help much
Hey I’m very new to the modding community and coding, I just wanted to ask is https://github.com/Pathoschild/StardewXnbHack#readme the right gitlab code for converting XNB’s? (My dad just asked me to talk with the community as he just make sure since he often works with code and I want to get started) ^-^
I’m sorry I didn’t mean to include the thumbnail
You can wrap links in <> to remove embeds, if you want
Yeah the StardewXNBHack is the recommended way to unpack the game files
For future reference, anyway
You can ignore this, it's unrelated. I just gotta proselytize for the YAML way.
||
Format: 2.3.0
Changes:
- Action: EditData
Target: Data/Events/Hospital
Entries:
"88/f Harvey 250/t 900 1500/p Harvey": >
50s/-1000 -1000 /playMusic distantBanjo/warp farmer 5 9 12 Harvey 5 5 7/playSound doorClose/skippable/pause 100
/playSound wateringCan/emote Harvey 16/pause 500/move farmer 1 3 12/pause 200
/textAboveHead Harvey "Oh hello farmer. I just finished watering my plants.$0"
/move Harvey 0 0 14/speak Harvey "How are you holding up on your farm?0$"
/speak Harvey "I see! Good to hear! Don't overwork yourself on your farm and take care!$1"
/pause 500/emote Harvey 16/speak Harvey "...$8"/pause 300/speak Harvey "Oh? You'd like to chat with me?$8"
/speak Harvey "Well, I suppose we can talk about uhm...$2"/pause 400/speak Harvey "Jugulars...$2"/end warpOut
||
Okay thank you my dad is usually strict on this stuff :D
I didn't get to read what you did to my heartevents.json but I'll look when I finally find a place to sit
If you only wanted your heartevents.json file to be in yaml, that's also an option. You can "include" a .yaml file from a content.json file (as long as YACP is installed)
For my crazier events I can imagine the parsing would be faster for me to see errors 
Honestly it'd be a great pr but you said the nuances were too complicated
I don't know about the average user, but a brand new modder can definitely have yacp as a requirement if it helps them push content
I'd have to make a PR to SMAPI too.
Idk what other examples you'd like, I probably have a decent chunk of content patcher related things lying around everywhere
Though I think my custom npc hits all the high points 
btw, do i use player or farmer in the code
farmer
Events? farmer
Maybe I'll throw in my crazy 12 splitting switchevent for you to parse in yaml, link
That's when I get home in like 6 hours though 
That sounds fun
oh yea does the yaml support extend to i18n
I'll have to yeet my actual custom assets but I do want that github to be my command to be like, want a running example of an npc? Just fill it out
Wdym i18n
can you do i18n/default.yaml and such
Is that part of contentpatcher?
Oh my i18n folder was untouched, all of my tokens are still bracketted
c# mods can use it without extra setup
though there is the ModTranslationClassBuilder thing as well
So, I have a problem. I had an idea to have my custom NPC give the player a custom beverage through their festival dialogue. This worked (yay!), however since festival dialogue can be repeated, it can be exploited to gain the custom beverage an arbitrary number of times. I tried setting up specific-day dialogue for the gift but that doesn't trigger once they arrive at the festival. Ideas?
its for a specific day of the desert festival
Location dialogue is endlessly repeatable, I would just set the dialogue to the specific day rather than using location
Oh once they arrive, I see
Oh so I can just get rid of the location dialogue altogether and then it should use the specific day, probably?
You could use the $1 <letter ID>#<1st-time text> #$e# <nth-time text> dialogue command.
https://stardewvalleywiki.com/Modding:Dialogue#Dialogue_commands
I cannot confirm, but location has higher precedence
If it's festival though, uhhh the appending for the festival might let you circumvent it?
I will try that thank you
Hmm I need opinions. Right now I have most of the crops in Forage to Farm set to just the raccoon family so later in game but should I also offer the ability to get them earlier in regular shops if you reach friendship markers?
My "Tue2" (spring Tuesday 2 hearts) dialogue key seems to be taking precedence over my "spring_16" dialogue key (specific day in spring any heart level). Is there a way to fix this?
are you in year 2?
yes
it's not a priority problem
it's that the key doesn't work on year 2
WARNING: this first-year-only behavior is different from other keys and often catches unsuspecting modders!
Example: 10: "Did you watch the game last night?#$b#Or wait, do you even have a TV set...?"```
having spring_16_2 should work for year 2 and after
I would say this depends on the value of the crops, if they aren't very valuable then making them only available in late game is going to make them less appealing, unless you're also devaluing vanilla crops
Ah I've read that wiki page a dozen times and still didn't realize that, thank you
sure! it is something you kinda need to know about
(even with the warning, it's pretty easy to miss it)
and i remember it happened to me in the past and i also helped another modder figuring out why (took us a bit of time)
at least here i was "hmm, wiki is pretty clear about what the precedence order is... let's check it's not the year issue striking again"
Is there a way to get my NPC to the desert festival right away? Otherwise it's a 3-hour walk for them.
you can use 0 schedules to spawn a npc into a map at the start of day
they may sometimes (we don't know yet if it's because of them+some other stuff) duplicate npcs. It's quite an elusive bug usually so the causes aren't narrowing down i believe
so you can decide to make them spawn directly at the festival map, or at the bus stop/town if you just want them to be closer but not here too soon
I assume you mean setting the spawn point by editing their disposition? Anyway I think I am probably overcomplicating here and will just let them get there by 9ish. Thank you again.
no, but thanks for saying what you are assuming, because lot of people don't when they do that and it makes misunderstanding. I mean having the 0 in the schedule, let me grab an example/the wiki
well, the wiki doesn't mention 0 schedules so that doesn't help
OK lol I did search for it and came up with nothing
but if the behavior is buggy it's better if I leave it alone
"1": "000 Beach 9 8 3/1030 Forest 75 75 2/1500 Saloon 20 19 3/1900 Town 84 9 0",
as said, it's a rare and elusive bug that most people dont encounter even when using 0 schedules
gotcha
so you can avoid it, it depends if you really care about being here early or not
(i believe being around 9 for the desert festival for ex is ok since it's when things start anyway)
(but really i appreciate you trying to get clarification by explaining what you understood of what i said, it's rarely done)
What about giving them a warp room?
I hadn't thought of that, thank you, but I think I'll leave it as is for now.
I don't really even need one/it wouldn't be better than using the warp menu, but I really love the idea of a warp room for some reason
when you say warp room, do you mean an actual map area where the NPC goes and then warps to another map instead of pathfinding?
Typically that's what it's for, though my second comment was more of a player warp room
I know that sounds like a silly question, I was just checking that warp room wasn't a programming term I wasn't familiar with.
I don't think it's silly, clarification is important
like a special square that is linked to the target square in another map such that the pathfinding thinks it's closer and then a tileaction for the NPC when they hit that square to warp (so that they still walk around a bit instead of starting the day at that new location or immediately warping to the target).
But it would probably be easier to just have the schedule to be to walk to x spot, then at y time they warp to the new location.
The thought of the entire town slowly walking through the desert from town for three hours is funny though.
Just the yearly desert pilgrimage
Yeah, most of these are pretty cheap seeds/product so I'll those to stores with just friendship lock on some of the more valuable ones
Anybody know how to set another map as safe to fall asleep on?
I'm looking at Data/LocationContexts but having trouble understanding what I'm seeing
I have not encountered duplication since the early 1.6 alpha, so i suspect it's caused by something we have yet to pinpoint. I use 0 schedules a fair amount and have installed several NpCs that are known to duplicate.
This has info on the passout-related fields: https://stardewvalleywiki.com/Modding:Migrate_to_Stardew_Valley_1.6#Custom_location_contexts
what is the code to get the players name in the dialogue?
thank you!!
@
@ is replaced with the farmer name
this whole thing is a great guide for understanding what's happening in dialogue/events; @ for player name is on page 20
I'm guessing you might wind up needing more information like that
Hmm weird. I did that and it turned into backwards arrow
The text is in a balloon
Could that be why
Also, I'd double check this guide against the wiki, it seems to say the last time it was updated was about 8 years ago now
ah yeah good call
I think @ is for actual dialogue
I think you can do something to get player name in text overhead, maybe {0}?
Oddly, I’m still getting suplicate Sohpia’s! It seems somewhat related to frequently restarting the same day with mod testing ad debugging. But it doesn’t always happen.
I have to run or I'd find it, sorry
Since it's probably being added it with CP you can also use the CP token {{PlayerName}}
hmm doesn't work
textabovehead only seems to care about gender specific dialogue
doesnt do any other kind of parsing
This works! Thank you!
I see that there is a debuffprojectile but it seems to be limited in what debuffs it give (freeze, -def), which I was going to do something with. It looks like it might be easier to make a custom buff on the player instead?
specifically the original plan was "projectile hits monster, applies a debuff. If another attack his the monster with the debuff, do an extra thing".
And it might be easier to say "when you cast this spell, get a buff that empowers your next attack"
I guess that buff could be stored internally but having some visible for the player to get feedback on if it's active would be nice.
you can apply any buff to the monster that get hit by it
so you can make a -10 attack custom buff to use with the debuffprojectile
translations aren't loading correctly for my JA mod, I can see it loading the different languages, but for some reason it seems to be displaying the previously selected language instead of the current one? Like I had it on english and it was displaying the names in english, but when I switched the language to german it still showed the english names. And then when I switched to portuguese it showed the german names..
and I'm sure the i18n file names are correct 😅
welp I tried that, it's still happening 😅
ooh that'll work ok. Can be a placeholder or minor debuff and then the next attack that hits that monster will consume it. Excited to get that going.
won't even need the debuff projectile I think
wait.. if I exit to title and reload the game then the correct translation loads
How are you selecting languages