#making-mods-general
1 messages Β· Page 198 of 1
tho tbf i'm missing context for the convo entirely, so everything im saying might be completely missing the mark.
no you were on the mark still theres Both
oh and I also made this which is more generally usable I guess
https://github.com/zombifier/My_Stardew_Mods/tree/master/ExtraAnimalConfig#game-state-queries
"usable only in machine output rules" 
did you still want to give up custody of those
sure, consume them
unfortunately I can't remove them now because I have started using them in one of my mods
if you own four or more cows, it's going to rain tomorrow, your speed is more than 5 and you're holding up tuna, you may take the bus to my new location
when do i have to answer your riddles three?
thats what i was thinking, is this a puzzle where you're going to give random context clues?
if you want, you could hide your custom ticket machine behind a bush that gets cleared with BETAS clear terrain features stuff if you meet the conditions
call down a lightning strike on the bush at the same time it gets cleared
your reward in the new location will be a singular sap
but if you hold THAT sap while going to the bus stop then-
you get shown an apparently identical location in the options but it's actually the skull cavern level 10,000
worth it
then you go to the mirror world, where all the tiles are flipped, (it will be really confusing) /j
(also that should, theoretically, be possible I think - you define two locations with identical names and the two different conditions)
why is github search in repos so bad... I promise you, pathos' mods repo does include uses of the word "train"
are you just stuck on the main branch or something? bc that's annoying
im actually usually surprised by how well github repo search works for me
really? it never seems to work for me
if your code is too new it isn't indexed
if it's not the main branch it isn't indexed
if your file is too big it isn't indexed
if you didn't pray to the Steve Ballmer effigy in your closet yesterday (you have one, right) it isn't indexed
nothing is ever fking working properly on github code search
I see I am not alone 
(The Central Station code is on the central-station branch since it's not released yet, so it won't show up in repo searches by default.)
ty! I did find the code itself, I just didn't realise github doesn't do searching in non-main branches until I searched and saw it wasn't an option in their advanced filters either. Guess if I want to have a closer look I'll have to clone it 
if a mod is using their target path to load an asset as {{ASSETS}}/AssetName how would I load my recolor over their file? Would it just be mods/ModFolder or ModId/assets/assetname?
ok so just use the {{ASSETS}}/AssetName
use the same path they do
but odds are they are doing an exclusive load so make sure to handle priority as necessary
yes, use the same target path
but if that's a dynamic token you need to know the value
u prob wanna just EditImage right
in all likelihood
I need to replace the whole png
edit image can do that
so if that works
and is better because then you don't need to worry about exclusive load
ok cool, so then I would just need to replace dynamic token with the actual value
correct
which would be ''mods/mod name/assets/asset.png"
Probably not
nOoOO
Targets don't have file extensions
can you harmony patch a new item into a flag enum 
without that
technically you can just cast any int to an enum and unless somewhere checks that the enum is actually defined for that int, it'll just use it. however iirc it has difficulty being saved in the serializer
i would double check how to do it at least because I might have it backwards but I know it's technically possible even if not strictly advisable
I think you're probably right I'm just not sure if flag enums are special in that way
or if they work the same as regular int enums
TBH I don't actually know what you mean by flag enum
after a quick Google I think they are still just ints under the hood but don't quote me on that i don't wanna look bad in front of the competent coders
I believe they are some kinda fancy schmancy int under the hood thing but I have already looked plenty bad in front of the competent coders so you can throw something at me if I'm wrong
they r enums that make themselves nice for bitmaps
I think that's the hardest part of the crime I'd like to commit rn
so instead of going 0 1 2 3 they go 0 1 2 4 8
I'm debating on a few options here, and I could use some random opinions. (this map will not rotate seasonally, and be Robin buildable)
Note - Grass (for Animals) Only Grows on Tillable Land
Note - Tillable Land on an Inside map, acts as a greenhouse. Outside Maps Till as normal seasons.
As My options, I can Spawn ore, Forage (Mushrooms w/e), Make the Dirt and/or Grass Tillable. And Make it an Inside or Outside Map (Which i would disable weather effects on).
When you look at the map, what kind of things would you expect?
To be Fair, with the Surface Map being 155x200, they are probably playing with friends or want a massive amount of space to do stuff too.
So if using the mods folder name didnt work for the edit image to I switch to modID
Or how do I tell why the edit image action didnt work?
what did the other mod put in their "Target": line? whatever they put in there, thats what you put in your Target
if they used tokens in their target, replace the tokens with their actual values in your json
"Action": "Load",
"Target": "{{ASSETS}}/CookbookSprites",
"FromFile": "assets/cookbook-sprites.png"
and I put
"Action": "EditImage",
"Target": "Mods/LoveOfCooking [CP]/assets/cookbook-sprites",
"FromFile": "assets/cookbook-sprites.png"
your target doesnt match their target at all
you need to find out what {{ASSETS}} is supposed to be
pretending that isnt a dynamic token and tokens werent a thing, you would also write {{ASSETS}}/CookbookSprites
but your mod doesnt know what that dynamic token is
Ok how do I find that im assuming its in their source code on github or something similar
i assume its just a defined constant somewhere up top in their dynamic tokens section made to reduce having to re-type stuff a lot
its in their content.json
ohhhh
its in their dynamic tokens
I promise I'm smart guys 
no one knows everything!
Thank you Button, I appreciate it A LOT
this is like christmas
me and dynamic token are gonna be besties forever
We Learn. :3
i finally figured out how to animate tiles so... i now wield unlimited power
Yea I learned that after going overboard on my first map
XD
It looked like I was hallucinating lol
I couldn't find any good burlap sacks on the nexusmods tilesheets (fill the niche, friends!), so I spent 4 hours trying to make my own. LOL
Well well well!!!! Apparently a child is not an NPC!
The farmer's children are indeed not NPCs
?
The summer squash seeds?
Those 2 comments 1 after another have some odd implications
oh yeah the children you have
Those are not large enough for my needs, and there wasn't actually a 'blank' one. π
I did use them as a base though
thats why uhh, idk which but one of the children to npc mods yeets your real children into the void
and replaces them with npcs
Little NPCs AKA the mod aptly named The Farmer's Children does that, I think?
thats fairly normal practice for turning a not npc into an NPC
I'll probably just kluge the harmony patch to make it do something else!
i think the main jank with little npc in current form is that it doesnt just make you add a Data/Characters entry for the replacement npc
Apparently The Farmer's Children and LittleNPCs are the same mod, which I did not realize until now. LOL Scratch that, I confused myself again apparently
instead it does that from own content pack and incompletely
I would expect forage and being able to garden from a map that looks like this (it's very pretty and fun). I have no opinion on inside or outside ^_^
It's gonna probably just have to be a different patch than NPC.ActiveItem or whatever the hell the thing is I am patching. Anyways luvs I am going to sleep good night!
@steep oracle meet @vernal crest !!
They taught me everything I know about maps so I have total faith they'll be able to help you out :)))
Having trouble with setting and testing a schedule key... this is the code: ```{
"Action": "EditData",
"Target": "Strings/schedules/Clint",
"Entries": {
"sdvlao_clint_test": "{{i18n:clint_test}}",
},
},
{
"Action": "EditData",
"Target": "Characters/schedules/Clint",
"Entries": {
"Tue":"850 Blacksmith 3 13 2/1100 SeedShop 20 22 1 "Strings\schedules\sdvlao_clint_test"/1630 Blacksmith 8 12 1 clint_hammer/2200 Blacksmith 10 4 1 clint_sleep",
},
},and it results in[game] NPC 'Clint' failed setting temporary dialogue key 'Strings\schedules\sdvlao_clint_test'
Microsoft.Xna.Framework.Content.ContentLoadException: Unable to parse string path: Strings\schedules\sdvlao_clint_test_Friendly```
Technically, and as far as I know, the only thing that FlagsAttribute actually does is make ToString() behave a little differently. If you're only doing bitwise operations then you can use any enum (or any int) for it, and regardless of whether you add the attribute, it's up to you to set the values to powers of 2 if you want those operations. The attribute is barely more than a marker.
Finally got around to finishing up my dynamic tokens tips & tricks page on the modding wiki, thanks to Tia making the half-done page public and me shaming myself into not leaving it like that 
This is a collection of various tips & tricks for using Content Patcher's dynamic tokens for increased coding versatility. At their core, dynamic tokens are used for creating a token that changes its value depending on various conditions, which with a little creative thinking can be used for all sorts of situations!
This page assumes that you're...
Oh I think I see what I'm missing now
need to put a Clint: after schedules\ and before the string name whoops
wheew... maps hard 
Not exactly, right? LittleNPCs is the framework , The Farmer's Children is the content pack using that framework.
Child Age Up and Growing Valley also use LittleNPCs.
(Unless, likewise, I've been mistaken all these time.)
That's correct, yep
the mod naming format just confused me then
hi guys, i got an interesting idea for a mod, i wanted clothing to have weather effects, but i realized a lot of modded players play with fashion sense.. is there a way to wear both vanilla clothing and FS clothing simultaneously? or is there a way to integrate it being tailored to alter the design (think forge but for tailoring)?
what do you mean weather effects, like next day if they're wearing it it'll rain?
i was gonna set various buffs/debuffs depending on what the player was wearing, example, if player was wearing a bikini in the middle of winter, they'd get a -1 speed debuff until they change into something warmer (then get the snowing buff below once they do)
also clothing sets.. if a player has full prismatic outfit then they have a +1% extra chance of prismatic shard drops or something
if the player was wearing a rain outfit then i'd give them a +1 fishing buff while it was raining
sunny could be +1 foraging
snowy could be +1 mining
wanted the breastplates to give +1 combat
i was kinda surprised such an idea wasnt made yet, so i was wondering if it was worth trying to figure out since fashion sense has its own system
then i thought about the forge but for tailoring mechanic π
I was basically going to add custom tags and buffs to existing vanilla clothing
This does exist (Clothing Buffs and Price Adjustments or Skillful Clothes Revamp) but I'm not sure if they integrate with FS or not
Ah okay thank you, if there's no way to integrate with FS then I won't even bother, especially since skillful clothes is very similar to what I was thinking
FS does allow having physical in game items now
you can look up how to do that; I think Pathos posted a WIP mod in this channel that does that earlier
Oh?
thank you Selph!
Had another question burning in my head before I turn off my PC, is it possible to have an NPC schedule based on syntaxes like divorced, but kids arent doved? on the wiki i only see heart requirements and this seems a bit complex for CP
Checking if an NPC is divorced is easy enough, that's just a standard Relationship:NPCName check, but checking if the player has children is trickier
From searching, it looks like you can use "HasValue:{{ChildNames}}": "true" though
Thanks so much Airyn, I can't wait to work on this tomorrow if that's useable 
i've been wanting a custody mod for so long
Does anyone know of any frameworks that lets you add lotions to willy's boat? Like more islands?
oop i meant locations*
i figured you would make a custom menu option to go to the other locations as the easiest way to do it but im not sure 
Ah, was your plan for the player's kids to go stay with their other parent? Unfortunately, that won't work unless you're reliant on Little NPCs π The player's kids aren't NPCs so they don't have schedules
I was gonna make the divorced NPC come back to the farmhouse on a given day during the week to "visit" the kids
Central Station will let you add locations accessible from Willy's boat
it is only an alpha right now though
Ah, gotcha! That'll sort of work, but you'll need to make them stay in the farmhouse the whole day, since NPCs can't path through the farm
but ofc if kids were doved then they'd just go back to normal like nothing happened bahaha 
hmmm, what if they leave after a certain time, would it conflict?
i guess if theres modded spouses then all day would be easiest
Yep. They can't enter or leave the farmhouse, only spawn in there with a 0 schedule and stay all day
i think if they leave the farmhouse they should just teleport to the bus stop, no?
if theyre scheduled to go elsewhere
Do they?
I thought that was only for marriage schedules
i read on wiki it was just for marriage but im not sure
when i was testing Custom Schedule Keys i gave Haley a non-marriage schedule and she walked out of my farmhouse and to the Bus Stop, but she was ofc married to me, so it mightve been coincidence
(well not walked TO the busstop she was yoinked there)
If that doesn't work, you could maybe do a workaround with adding an invisible NPC warp inside the farmhouse that leads to a waiting room and have the divorced parent schedule in and out of that
But it'd be finicky
Where's the guide for updating mods to 1.6/1.6.9 again?
I swear there was an article on the wiki about it.
I'm trying to think of a way why my ex would still be in my house at 2 am when we got divorced recently without being awkward but I can't LOL so I may have to try this
"Today's my custody day so I want to spend as much time here as I can. I'll leave when I'm sure our kids not sleeping home alone."
bam
awkward moment if there's only one kid but thats a risk im willing to take (unless i can do 2 diff dialogues just for this lol)
yay okay i can finally sleep now thanks again!
i expected there to be a framework or something, there is a framework for everything
did you see this reply
search through pathos' posts for an alpha you can check out
isn't train station already able to add that?
they asked for boat
central station is improving on that (adding more fine options/tuning/cool stuff)
does TS add boats?
Walk to the railroad and interact with the ticket machine to buy tickets. For boat destinations, unlock Willy's boat and then interact with the ticket machine there.
it should, yes
ah it does 
my understanding is that CS will offer more option/fine tuning/bus transport in addition (and stuff like not having to wait for some stuff to be unlocked to have travel options, like being able to join the central station earlier via bus or something)
I guess there's also Transport Framework
though admittedly with CS coming out TF is going to have stiff competition lol
not the least because it uses content packs
(also I wonder how they would interact. not destructively I hope)
used a diff tool to find contributions someone made to my mod, I'm a Real Developerβ’ now
Can someone help me mod stardew valley?
It's basically my first time trying to mod the game
!gs
If you would like a guide to setting up mods for Stardew Valley, check out the getting started guide! https://stardewvalleywiki.com/Modding:Player_Guide
Thankssβ‘β‘
Also #modded-stardew is the channel you want for using mods. This is for creating mods
You can create your own mod?
Please don't ping me on reply. Yes, it's possible to create your own mods, that's how we have any mods in the first place
They don't just magically create themselves π
Rude
It's not rude to not want to receive pings
I'm not talking about the pings I understand that
Oh then I don't... I mean I still dont see it
Yeah you can make mods :D
It might not be magic but sometimes it feels like it when I do make them lol - anyone with an orange name here has made a mod :3
(and some people without it but y'know)
i wana make mods but im all dry out of ideas and my secret note mod needs a framework to be updated to work so i have to wait for that
Well some people don't wanna be bothered and it's understandable that's how I see it
and none of the mod depo ideas interest me
Funny timing! 
fancy seeing you here lol

So to be clear, the PEEM thing is a completely standalone thing intended for you to include with your mod. There's nothing for me to release!
How can you create a mod?
I really want to make a mod but all of the ones I have in my idea list are not interesting to me right now... (I do not want to sprite apples and apple trees)
peem....
This guide Airyn sent is a good start to look at !
Well it isn't MEEP, so PEEM felt appropriate!
If the user doesn't have the PEEM mod installed it wouldnt work though...? Do you mean I have to include PEEM into the mod? (Also I found a bug with peem)
Thanksss~β‘β‘
You need to have some basic understanding of how certain things work, a good start is to unpack the game files and look at that/look at the type of thing you're wanting to make
!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 don't see how it's rude? You asked a very obvious question, so I poked a little fun at it
If you haven't installed mods before though, I wouldn't recommend trying to create one until you're more familiar with things
If you need help with whatever you end up wanting to make we're all here to do so :3 Everyone here has been... monumentally helpful for me for sure
Thanks again you're so helpful
Airyn also has a point with that - if you haven't even installed them I definitely suggest looking at that first- who knows maybe you'll even be inspired!
It's a confusing thing to dive into to be sure
I started making mods because of Custom Furniture (a framework mod) because I wanted to make my own furniture ... (and ended up turning gunther into a carpet)
Ooh, what's wrong? I'll get that fixed, and then you can just include it alongside your mod like I said, yeah.
Yeah ik but if I don't have any leads I'll never look at it
I have the interaction set to the Buildings layer (the highest layer with a valid tile on that tile) and it won't let me interact with the spot unless I remove the bush that is in the tile using terrain features. (I am a bit slow sometimes, sorry π )
π i got excited seeing a little tree stump house so i put it on my map and now i dunno what to put in it...
Best place to start are those three things:
Playing with mods
Looking at the game files
Looking at how to start making a mod
thats for the squirrel
(spoilers srry)
Omgg that looks soo beautifully cutee
i started by making dumb funny mods, my very first one was making everyone into krobus
That's usually how it goes really, You play mods, you realize 'i want this thing' - you don't find the thing - well now you gotta make it... profit
Thankss a lotttt
I'm still making dumb mods to this day- please see: Qianu Reeves
(I think Qi finally drove me fully insane)
Is this like, an external map to explore or is it a farm map
external map
(and are you actually looking for ideas or just talking about the absolutely adorable tree stump)
(because it is absolutely adorable)
The bush preventing the Action tile property firing off sounds like just a plain old vanilla/mapping quirk. It's not one I've heard of before, but unfortunately, PEEM doesn't do anything until the game registers that Action tile property has been interacted with, so it's kinda out of my control.
the tree stump is indeed cute, haha, i sorta want to know what other people would put in it if it were them
So... what should I do?
An npc /hj
A little squirrel npc sounds adorable genuinely though
I could make a squirrel npc....
I will not make a squirrel NPC I wont do this to myself
ive already been scope creeped into the sun
Maybe you could put a little area in it that spawns mushrooms
like a mega mushroom stump
π i dont like mushrooms
im the opposite, i only like the ones cooked, on my plate
well you dont even need to make a sprite
cant stand them otherwise XD
there is already a sprite for a squrriel that runs out of trees and bushes sometimes
you could give it a string when you click on it about a little familiy of mice that live in there or something
Really all I can think is you just put it somewhere there's no bush? Unless in your case you need it to be a bush, in which case we can definitely tweak a few things about how it works under the hood to make it work for a bush...
If I made a squirrel npc it would have cute little outfits, id have to make sprites...
And Id have to make it a tree house of course because its a squirrel
While making a mod can you like create new characters?
I do need it to be for a bush, I can commision this if you want considering how much work it has been.
and give it a little tree seed shop...
using a "fake" bush drawn directly onto the terrain, rather than a real one, is usually the go-to for issues with them
oof
^ That would be a good way to do it!
i think i went a little overboard
but yeah, logic-wise, Action has lower priority than any actual objects on a tile
yes you can!
Making NPCs is VERY complex though, I reccomend starting with smaller projects to build up to learning how to do that
There's a lot of moving parts to an NPC
Omggg fr?? Damnnn that's sooo exciting
so i remove the normal bush, draw an overlay of a bush and thats it?\
Yeah I get that....
This is also why I said to try using mods first, by the way, since then you'll learn more about what's possible from what already exists
yep, pretty much; they won't shake when interacted with and such, but it'll allow action properties and such that way
i havnt even made an npc yet and i have been modding for... 2.5 years? (take that with a lump of salt)
To give you context, I learned how to do my NPC mod by first learning all of the little parts that I knew I would want to include with any NPC I made - making maps, crops, furniture, etc
SVE does that for some stuff like bushes in config toggles, bushes they only want removed after a quest, etc
Yikes......
Alright, ty! (i just know this will be a pain in the ass to do)
my npc making has been... largely stalled by the fact that
- i hate writing
- i hate making sprites
π
The fake bush thing will be very simple, don't worry! It's just a matter of finding the bush tile in the tilesheet, and drawing them on the map.
What exactly is making your own mod includes? Like coding? Drawing? You need specific skills?
I published my first mod in June of 2022 and I only am having my NPC mod being beta tested by some people
π₯²π₯²π₯²
I don't need to override the whole map right? Just the 2x2 area where the bush is?
Depending on if you want to commission other people to do certain things you aren't good at you need a bit of a lot of everything really
I see i see
Why is this a "yikes"? People don't have to create an NPC and it doesn't matter how long it takes to get there if they do want to make one
Pixel art is a big thing if you want to add... most things to the game aside from dialogue
I think the yikes was more of a metaphorical 'oh wow i didnt realize'
not easy to tell without tone tags though I suppose
Yeah, you'll be able to patch just that tiny section with a little EditMap patch.
i cannot do pixel art for the LIFE of me
ty so much you are a GOD SEND
i've been modding sdv for the last four years and i've barely made one. it's not a big deal
Map making doesnt necessarily require pixel art skills, but if, like me, you want specific tiles that arent anywhere else and no one has made youll need to know how to make said tiles (or pay someone to do it for you)
If you want a specific fruit and dont want to pay someone to make it you gotta make the fruit y'know?
(Answer to Airyn )The yikes is for me cus damn.... I'm a bit tooo excited and idk how much it may take for me to go through allllll this if I wanna create smth...
what would be the general price for 3 64x64 pixel arts?
depends on how detailed, probably?
I wanted Qi to be an npc and goddamn did I do it
and what exactly the 3 pixel art pieces you want are
as detailed as those secret note pictures
^ prices will vary
Hmm... Never done this before...
And depend on the artist you commission
Do you have any ideas for what you want to add into the game (aside from an NPC since that's big work)
I was just about to type out an example of a mod I was going to make and I think I just scope creeped myself thinking about it oh god
@inland loom I would recommend either starting off your first mod with a framework or sprites, then looking at the mod idea depo and go from there.
Yeah ik but if someone wants to it really takes some time to get there...
π
Everything cool takes time
ive been working on mine for like... a good few months lol, im definitely not consistently working on it though
I'll keep that in mind thankss
modding requires a bunch of skills sure, but as long as you treat it like any other skill (something that needs practice, research, and learning) then youll eventually make something
^
Again starting off small is the best idea
If you have a large idea, like making a set of sixty crops, just start by making one
Starting off by just making the pieces is also great too!
start with small retextures, study the tutorials on the wiki, maybe use mods and see what youd like to do
I started modding by adding a bathroom to the farmhouse lol
Thankss for the advices
You want to add neon grapes to the game? start by spiriting the grapes :3
isnt that on the mod idea depo?
Omg I love that idea
that is insane π Farmhouse data scares me
I started modding by editing a UI mod because I wasnt happy with the contrast, and then before I knew it I started making my own UI theme mod
I'm sorry I have to get used to no reply or do reply thingy..
No idea, I don't read it haha. I wouldn't be surprised though because a) there are already a bunch of bathroom mods for the farmhouse and b) everyone loves the idea when I mention it xD
It's usually in folks' names :3 I just make sure to read em first before sending my message if Im not sure
If that was to me, you're okay! I am happy with pings :)
though ive been in here so much I mostly know who likes pings and who doesnt by now...
Again my first few mods were literally just me messing with a framework that I liked
Yeah I noticed at first I thought it said no then I checked and saw that it was fine
You can reply without pinging
Oh I didn't know this was for that reason
I would only need a front layer, right?
Damn is that why I don't see when ppl ping me here some times? Okay good to know
Yeah if I do this and I toggle that off it doesn't actually send you a notification!
On.
Haha yeah farmhouses can be tricky but fortunately I didn't run into much of that because I only patched the farmhouse to add a door into my separate bathroom map rather than adding a new room on the same map in the way most people do.
Off.
I know why you did that but it's so ominous
For a bush, you would typically want the bottom two tiles to be buildings for collision, and the top two to be front so you can walk "behind" the bush.
why did i open GIMP to edit maps?
I always get your ping but I noticed sometimes I don't get from others
Didn't know... Thankss
lol, (off.)
(You can check to see if a reply was a ping or not!)
ty!
Ping and no ping. Just look for the @!
Oh that's really cool actually i didnt know that
Also, do I need object layers along with the tile layers if I am not doing any tile data?
Ohhhhhh okay that's useful
I'm really not much of a map person, but I'm 99% certain just the Buildings and Front layers should do for the visual map patch, yeah.
ty sm!!
Yeah and that's hard to keep up with..... I saw this message bc of the screen shot
Yeahh some people just don't enjoy the pings. Others like myself prefer to be pinged because I also struggle with seeing messages sometimes... or in get distracted and forget what I was doing or if I was helping someone so if they don't ping me then I forget I was even here
Everyone has their reasons:3
I find it hard to answer a message if I don't see it pinged.. That way it's easier for me too..
me downloading an old mod to salvage old code:
can confirm farmhouses are scary (and irritating)
farmhouses are terrifying
highly do NOT recommend starting mapmaking from a farmhouse. you need to have like lv 5 in the debugging professsion minimum because you will run into a bajillion issues 
Heyo, I keep getting this message in my smapi log and I'm not sure what it means cause my dialogue still seems to load fine...
[Content Patcher] Ignored HakanNPC > Haki_Dialogue > data/dialogue/dialogue_hakan.json > EditData Characters/Dialogue/Docky: one of Entries, Fields, MoveEntries, or TextOperations must be specified for an 'EditData' change.
(Suddenly imagining a page on the community wiki with modders and stats pages for them to rank their own skills...
)
maybe we could make joke certificates that list what frameworks every contentsmith is proficient in, lol
Fortunately patching very small things into farmhouses is actually not tricky at all or I would've possibly given up modding immediately lol
oh yeah, that's just like any other simple map edit
!json It means you wrote your code block incorrectly. You're missing one of the fields needed to do a CP patch. Can you share your json please?
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.
even then farmhouses still have more 'no touchy this' tiles than any other type of map 
I did make a location with changeable wallpaper and floors for my first mod though which I would now not advise others attempt first lol
yeah uh, i started from farm maps, and imo even replacers are,, a little complex for someone who's going in blind
maps have too many moving components
Yes it's a pity that the things that people generally want to attempt first are in fact some of the worst to try first haha
imo easiest things to start with are retextures/object recolors 
Though I guess that partly depends on how much you enjoy the process of troubleshooting and learning new things because running into problems was enjoyable for me so it didn't really matter that what I was trying was more difficult.
i have multiple jsons involved with dialogue...umm should i just share my dialogue json or would the issue be from the content json... i think this issue started after i added a second npc. @w@
It is specifically this file, as is shown in your error message: data/dialogue/dialogue_hakan.json
(i did start with personal retextures/AT, but my first published mod is a farm map, so i consider that my starting point
)
If you've copy-pasted your code to the other NPC though, you've likely got the same error in that one too though
You're the author of Hakan, right?
oh i think i found the issue actually
Yes!
Please don't ping me on reply
Sorry qwq
What's the reason your mod requires SVE, by the way?
I had events that took place in SVE locations
and I wanted to play the mod with SVE
I'm almost done making it stand alone tho
That's good to hear π There's a lot of people that prefer not to use SVE
Yeah I got alot of people asking me to drop SVE dependency
If you had events in SVE maps, that's a huge amount of work to undertake. Good job on pushing through that. 
Are all of the events just taking part in vanilla maps now, or are you keeping multiple versions of each event? One for vanilla and one for SVE? 
Because if it's multiple... hoo boy, that's even more.
I'm keeping multiple versions of the events. If SVE is detected it will load the events for SVE
it wasnt too hard tho bc many of my events are still on vanilla maps
Why is the colon triggering it?https://smapi.io/json/content-patcher/e5d76cacc6944490bbd90b8092471a6f#L27
Double quotes around "Paths"!
Uh, how did you answer so quick? But thank you!
magic
"Layer": "Paths",
Oh
" being a double quote, and ' being a quote.
https://smapi.io/json/content-patcher/87aff686d0214101a54fad13fdf67a0a I feel like I am being dense.
oh, MapTiles is a list of objects is it not
Actually, @dusk mulch, for this item pickup thing... do you want it to refresh after a certain number of days? Or do you need it to be a one-time-only thing?
also i figured out what happened with this I had some leftover code at the bottom of my dialogue json that i forgot to delete so it confused the heck out of smapi and me
One time only
"MapTiles": [
{
"Layer": "Paths",
"Position": {
"X": 27,
"Y": 25
},
"Remove": true
}
],
i think this is how it should be
[ ] means a list and { } means an object, so a list of objects looks like that
thats how json works in general
Okay, I'll add a quick tweak so you can have it set a mailflag, so that way you can make the patch that adds the tile property conditional on not having that mailflag so it can be really one-time only.
Help this map is 12mb everything is laggiiiing
The interaction still isnt working after I made a visual bush.
Content.json: https://smapi.io/json/content-patcher/2f3d0971735e49889c3f51502a2db89e
PEEM: https://smapi.io/json/content-patcher/1b5351af08594bc2ba8c35a69322bbc9
hold on
let me test something
..wait are the special item reject/accept lines called something different
ok
like acceptgift vs rejectitem
Log Info: SMAPI 4.1.10 with SDV 1.6.15 build 24356 on Microsoft Windows 10 Enterprise, with 24 C# mods and 5 content packs.
Suggested fixes: One or more mods are out of date, consider updating them
The interaction still isnt working
Yes they are for some reason lol
{
"Action": "EditData",
"Target": "PEEM/ItemPickups",
"Entries": {
"PEEM.Test.Pickup.BackwoodsArtifact": {
"ID": "PEEM.Test.Pickup.BackwoodsArtifact",
"ItemID": "(O)101",
"Quantity": 1,
"DaysToRefresh": 3,
"LocationName": "Backwoods",
"MailFlagToAdd": "MyMod.MyMailFlags.PEEM.Test.Pickup.BackwoodsArtifactObtained",
"OneTimeOnly": true,
"Tile": {
"X": "29",
"Y": "26"
}
}
}
}
It'll look like that now. Only changes are the "MailFlagToAdd": "MyMod.MyMailFlags.PiereTomatoThingObtained", line, and the "OneTimeOnly": true, line.
Just rename the mailflag to be whatever makes sense for your mod, and then make the patch that adds the tile property (not the ItemPickups model here) conditional on that with a When condition.
Hmmm... is the bush definitely being removed properly? Probably the first thing to check!
I will try to add a priority to the removal of the bush
omg that's... π so annoying lol. i was looking over my dialogue like "something isnt right here." before realizing that's what it was
The priority shouldn't matter here. It's just more important that it's definitely being removed at some point. As long as there is a tile on the Buildings layer at the point the patch tries to add the tile property to it.
Ah the map is so large because the game adds tile data about the tile's flip and rotation to every single tile now
So much unnecessary information
Such laggy Tiled
flip and rotation have always been recorded by tiled. the only barrier to using them ingame was SMAPI.
in any case, default values aren't saved to the file
you can open the tmx for yourself in a text editor to verify
...holy.
what the
tiledata β
TileData all the way down
I think this is a change as of 1.6.9 - ooh I was going to say I can't check that but actually of course I can because I still have 1.6.8
i certainly don't remember being able to patch export maps
I think Atra PR'd that a good while ago?
Only I can't check right now because the entirety of my computer's resources are going into deleting those object layers haha
I wanna say it exported like that in 1.6.8 too
I don't remember it doing so roku but my memory is terrible so...
I've definitely never had a patch export of 12mb before though. That might just be SVE.
...
Yeah, probably just that lol
I still have my 1.6.8 install and I'm not doing anything else currently lol
Thank you @blissful panther and @uncut viper !!!
It does not in fact put TileData on every single tile
I AM A HERO
that doesn't look good 
The reason I thought it might be 1.6.9 is because that was when we started having the thing with rotating tiles too
So clean
funny thing about modding is if you change 1 letter/number/character, the whole thing breaks, every character counts
In the meantime, Tiled has made zero progress on deleting those object layers.
Might be too much for your poor computer
It is, my poor little baby
maybe you're better off with the text editor after all 
I'm just sitting around while I wait for another patch export from the person I'm helping
Which means I should kill Tiled so I can view the next one
Oooh it wasn't even trying to delete the layers! Rude
i have school tommorow and instead of sleeping im hurting my head making mods, trying to get this next version done
Almost! You still need the condition to get rid of the tile property patch when that mailflag has been added. Once you've done that, it should be perfect, and only obtainable once.
is it not possible to chain question dialogues 
this is absolutely horrifying
I don't quite understand the property patch bit. I understand what you mean, just not how to execute it
i think you got some tile data there
Do you mean where the NPC asks one question and the player answers and then the NPC asks another question based on the answer? Yes it is and I wrote a tutorial for it.
ooh actually i think i need to reset Game1.currentLocation.afterQuestion
forgot i needed to say in cs haha
I was so excited and now I am so crestfallen 
oh well at least we can have multiple tile-tiledata now 
I'll be back at my computer soonish, unless someone gets to explaining how to add an extra condition on the mailflag being set.
Wow, I can't believe my attempt at using TextOperations for MapProperties was right first go
I love when that happens
you get some weird syntax right on the first go and it feels like you've mastered the ancient arts
Yes it's excellent. I give Pathos the credit for having such great documentation and examples.
Interesting
It is supposed to exclude flip and rotation if they are zero
I'll add it to the nine things I'm supposed to take a look at
Do you want me to get you copies of my map (that has flipped and rotated tiles) exported from 1.6.8 and 1.6.15 for comparison atra?
Just the 1.6.15 would be great+
Will do
Thank you so much 
Hmm or I will immediately crash my SMAPI instead lol
@blissful panther I have to go to sleep, just ping me with the instructions and i will do them when I can
Oh symlinks again. I am going to keep tripping myself up with those
https://www.nexusmods.com/stardewvalley/mods/16767
Is a bad Idea to make rubber shooting less than lethal ranged weapons that have very poor damage, but have 100% stun chance and have infinite clips/mags?
How much this concept does hurt the concistency of the game lore? (I know its not a lore-friendly idea)
I would like to further develop this idea
You craft them
oh right, it's a peacefulend mod
lore-wise I personally don't want guns anywhere near my game but I guess you can do whatever you want for yourself?
It's your mod idea, so it's your decision whether or not it's un-immersive or matches the game's lore. Personally I would never install a gun mod regardless of what type of gun it is.
That framework also hasn't been updated to 1.6, so it may or may not work.
there goes my staple gun mod /lh
I think archery's borked yea
Reminds me of this random image I saw one time where someone had legit asked "what type of gun would Jesus use" ( π ) and someone else replied with the only legitimate answer of "a nailgun, for carpentry" π
I'm still confused about how this is mechanically much different to a slingshot, except for the specific bit about 100% stun chance
"what type of gun would Jesus use" is a hilarious question ngl
It deals 1 or 2 damage.
Its semi auto or full auto.
shoots fast untill you empty the mag.
You dont need nothing to reload the weapon.
any more questions or ideas?
Infinite ammo but you still need to reload the magazine
I cant use archery mod?
maybe my instinct to reuse slingshot is because writing a handler for a projectile weapon sounds like literal hell
We just told you it's broken
There is actually a fairly new (uploaded December 2024) firearm mod for Stardew that adds an AK-47. but
- It's on Curseforge.
- I only heard about it when it broke a user's save file.
Ok

wait, you have to adopt children in stardew valley?
hm, so my current map is 75x80, and i want to make it bigger... but is that too big? (and no, it's not a farm map)
idk if i should instead just make a second map and just warp between them or not
so anny stardew valey mod you can expand or use as base like the archery one filosofy, but working?
No need to be weapon related specifically
Esp if there's a lot of scenery
No, you don't have to. You can refuse to have children if you don't want them, and you only adopt if you're in a same-sex relationship
Also more of a #stardew-valley question
!startmodding
Making mods can be broadly divided into two categories:
- Content packs are formatted text files, and don't need any programming knowledge. They can add/edit NPCs, maps, new items, shops, and more. To get started, see the list of framework mods, the wiki tutorial for Content Patcher, and there might be relevant guides on the tutorial wiki.
- C# mods use programming code to change fundamental game mechanics. See getting started with C# modding.
Usually itβs easier to start with making content packs, since you don't need to learn programming.
See list of framework mods

no like for example if i wanna marry haley as a male we have to adopt children to have them or what?? π
Are you making a mod
Don't ping me on reply, please. I already answered that.
how much pain would it take to add command aliases
(hey Pathos...I kid, I kid)
(ngl, I think Central Station is great)
(agreed, i spent too much time sifting through the flavor text to try and find more funnies)
i kinda want to make it double the size
(badly drawn sketch)
Hey @blissful panther , what do you think of a SpringOnionZone x y w h map property?
I'm totally not asking for stupid reason I promise
Seemed fine to me
i like the park?? town square?? area :))
Seems fine to make 2x size I mean
yeah i think i'll just go ahead and elongate the map... this is all bc i dont want to fight with warps
Is there somewhere I can go to find more help with making a custom farm map and adding the location to the game as a new farm type rather than overriding an existing one? I'm super confused with the info I've found so far, and I feel like I keep getting confused by the different data I need to edit/create/add and accidentally keep adding multiple versions of the location or something? I'm not super sure. But I know I'm doing this wrong, and https://stardewvalleywiki.com/Modding:Location_data hasn't been super helpful for me.
You need to add an additional farm
Yes, I gathered that much π
(matching: GingerZone x y w h x2 y2 w2 h2....)
I was hoping there's a more specific wiki / documentation for modders for the farm
YES thank you
Here's page on that
That's hwat I need.
i suggest looking at a mod doing what you want
Thank you π
and see how they do it
Are you referencing any existing mods? Pathos has a couple that add new farm types that I'd recommend looking at if you haven't already
Besides this take a look at kisaa's farms they r all additional farm type
(i usually try to have both : documentation and a mod as a example)
ah
i'm too slow 
If you're talking to me, I have looked at examples, and ended up confusing myself. I keep losing track of when I have to use an ID like Froststar.MapNameHere and when I need to use a _ instead, and it's just a mess π₯²
no they're not, little falls is right there 
that's not really something other people can help with because you decide those names yourself
It helps if u use tokens
perhaps develop a specific system
{{ModId}} and stuff
I know. Thus why I asked for documentation help rather than showing someone my json and having them help me fix it lol.
Ugh typos sorry i'm not awake yet
i dont think there would be any proper docs for that, unfortunately
well it's usually why i look at several ones because then i can see the patterns, but as long as you find a method working for you it's what is important
like chu said try prepending {{ModId}} to all the names, and use exclusively . or _ as a separator
you have to develop your own system. i prefer _ myself because . is for UniqueIDs in my system
Like, I just literally need a good example of the names people have used, and the {{ModID}} and such because tokens are a new concept for me as an older modder before that was a thing I could do in this application. So my biggest struggle is like... "this field should be the same as that field" and so on. Like, a really nicely commented json example would save my life rn π And sadly not many people comment their jsons the way that would help me.
Yeah, I think my system is to use . for unique IDs for myself like you do Kisaa, and then the _ is for like... different locations within that ID? If that makes sense?
mine's like this
"Action": "EditData",
"Target": "Data/AdditionalFarms",
"Entries": {
"{{ModId}}/MystwoodHomestead": {
"ID": "{{ModId}}/MystwoodHomestead",
"TooltipStringPath": "Strings/UI:{{ModId}}_MystwoodHomestead",
"MapName": "{{ModId}}_MystwoodHomestead",
"IconTexture": "Mods/{{ModId}}/Icon"
}
}
},```
I think everyone's got their own idiosyncrasies with their mod organization
slashes for entry names and the ID field, underscore for names, dot for UniqueID
If it helps, {{ModId}} is just a token that subs in your unique ID from your manifest. It's just a nice little shorthand token that helps to keep things unique from other mods
It might be better to just look at someone's mod first then ask here "why did they do that"
(but try not to make me an example because i'm very anal in certain aspects of my workflow and an absolutely disorganized heathen in others)
that aside, i recommend making a template. there's this one that avi made:
https://github.com/Aviroen/Cozy-Extra-Small-AdditionalFarm/blob/master/content.json
I'll play around with it and if I am still stuck, I'll come back and post my broken ass .json so someone can help walk me through it in a more specific way, I guess lol.
(i do not have a template because 1. i'm lazy to set up my github and also github is confusing 2. i forgor
)
Small Beach Farm should be a good example to use since it's one of Pathos's: https://www.nexusmods.com/stardewvalley/mods/3750
Everytime I open some cp mod i see they mixed space and tabs and i take 5 psychic damage
Yeah I definitely plan on making a template, once I actually figure out how it works, so I can use it in future.
i agree that sometimes it's not easy to get why people have a modid_stuff and then a modid.stuff
I'm going to intentionally mix spaces and tabs and zero width whitespace
Oh damn, is it? π
Enjoy!!!
Ahh, it is too π Okay, disregard that one then, Frost, haha
Yeah it's old
yeah i feel like it all comes down to figuring out what works for you specifically
(When I open CP mods I usually have vscode fix the formatting)
I think I'm often mixing up when I have to reference a location vs the map name in these fields, honestly. That's most likely my biggest issue. Is just not knowing what to use in what circumstances. Like I said I'll play with it and come back here when I've tried everythiing I cna think of π
there's a bit of personal preference and a bit of what is suggested in wiki and such in term of format
For me it's important to understand why the conventions are what they are so I understand how to use them in new contexts too.
my only advice is: stay consistent.
I love chue's emoji
do you want to take a further 2d8 psychic damage
my C# repo mixes extensively (because of copying) and I cant tell the difference while editing because I have tab = 2 spaces
@unique sigil is the mine cart bundle in mystwood map suppose to take a weird type of stone? Because I don't know how to get that stone. The picture looks like stone on the ground before you break it. Not sure it is actually something I can get.
That's what I'm trying to do right now, I think. I don't understand the why, so I can't just mimic the examples I've looked at and make it work for me.
Every time I copy someone else's code and they've used spaces I have to delete them all and replace them with tabs
GitHub has tabs = 4 spaces and do they stand out
me and my map patches :
"let's name it basemapmappatch"
me a month later :
"i will name it basemapbundlepatch"
me another month later :
"i will name it bundlepatch"
HEATHEN
known issue, i mixed up item IDs in the code. and please do not ping me in this server for suspected bugs with my mods, go make a proper report.
If you want a more quiet space where you can ask very minute questions without feeling like you're taking up all of mmg, we have the NPCs and maps thread you're welcome to ask in :) https://discord.com/channels/137344473976799233/1277457201077813280 (Not that I think you have to worry about asking in here but I offer in case you'd be more comfortable)
Sorry
(I use four space tabs personally, but I also set VS to enforce spaces)
AND make whitespace visible so I can see this
god I can't with mixed tabs/spaces because then github janks it all up
Ah, thanks for that! I appreciate it. And I appreciate the note in parenthesis, because I immediately worried I was being a nuisance without realizing it π
remind me in 30 hours to remember to do the github thing i forgot about, uber pls
Oh okay, lumisteria (#6510076) (30h | <t:1738700695>)
i fought in the whitespace wars once, but i retired. i don't care anymore.
"that's a job for clang-format", i say, and then usually i'm too lazy to remember to set it up (cf. not caring) so sometimes i'm consistent and sometimes whatever
i keep forgetting that this thread exists ngl. i might go there for mapmaking support if i have the time 
why does the word clang give me a sense of terror. I can't even remember what it is just that I hate it
clang as in,, clanging sounds?
because it's the sound of dropping dishes on the ground
also it's the llvm cpp compiler
that does ring a bell
(i also fought in the editor holy wars. i still quietly prefer modal editors, but i don't particularly like vi/m, it's just the best one that i already know how to use)
look, I don't care what you pick as long as you're consistent
my coworker has been doing 2space tabs in python and ...
one day I'll bother editing my config to automagically transform all pasted tabs into spaces
well
atra can I put your coworker in jail
that day will be at least after march 4th 2025
they are a danger to society
being consistent is very hard for me, i am glad i don't do code π

Why...
what are they editing on that lets them do that...
vscode
whitespace-has-meaning languages my behated (i say this even though i use make)
I'm sorry, ichor, I didn't pick the programming language
if I had a choice I wouldn't have picked python 3.6
anyone who uses tabs in code instead of spaces has some answering to do
-# yaml
thinking about it, I actually don't edit python directly in IDEs any more since I almost always use jupyter notebooks 
yk if my cruddy dinky custom additionalfarm is gonna get subjected for "tutorializing" i should probably add comments to it
I rarely need to do anything that isn't very quick and standalone
at least I'm glad this chat seems to have picked a side in the tabs vs spaces war
(the only people who even thinks this was a discussion are CS undergrads prove me wrong)
all i know is: i hate manual harmony patching because vs22 gives me ugly whitespace
/s for legal reasons
any cs undergrad that thinks it's up to debate should be punished by becoming a 100% front-end dev for the rest of their career /lh
front-end devs are very talented it's just a bit like drilling holes into my skull
Please do when you have a chance, that would actually be very helpful π
in all fairness it was me uploading all of my projects so i could reformat my computer and me going, "i don't need any of my shit to be private, actually"
i will work on this but first it's breakfast time
hmm, ok so I adjusted my sprite sheet to properly have the sprites aligned, however I'm still getting this sprite. doesnt even change to the corner sprite when changed. someone said something abouta sprite index, but im not sure if I should change it or what to change it to (its currently 0)
have you spawned new items
yes
sprite index must correspond to the position of the sprite you want
is the sprite you want the top left sprite (ie pos 0)
yes..... I think? its not at exactly 0,0 .. none of the other fence tile sheets start at 0,0 though.. so its a bit confusing
fenceshave another sprite for the object dont they
in springobjects
they dont use the fence image directly
you need to draw something like that
I never made anything for spring objects and its pulling from my tilesheet, is that just a work around it does in that case?
you need a separate image for the object when its in your inventory
doesnt matter what image it is
a fence is two tiles high but inventory items are not that big, thats why theres a completely separate sprite
yes, I know, I'm just saying because I never made one, why is it still pulling from my tilesheet (even if in the incorrect position)
I feel it would still give me the π« if I didnt have the thing
it's pulling from your tilesheet because you put it in the object code somewhere
it only pulls from where you tell it to pull from
likely you listed the tilesheet without understanding what it would be used for
yes, this is true
just change the Texture field in the Data/Objects edit that you do
because I only have like 1 thing to pull from for reference for a custom fence object and that is SVE. I'm just working bit by bit as I can since the guides for custom fencing aren't fully there 
so lemme go change a thing I suppose. for the sprite I'll have to save it as edit data to spring objects? correct?
edit it to point to your own tilesheet where the fence object can be fit into a 16x16 box in the top left
one last wip before i collapse X.X
looks great! i like the shoreline 
is this a thing already? I can't find a ref to it in smapi docs
thanks!
@lucid iron Hey


Translating content patcher docs
chu
why is your nickname chu root e but your username chu(e as a decimal)?
where did the other factor of root e go
I ate it
do you decide to translate all of these
Translating Content Patcher Docs
updated but i got kind of lazy near the end, mainly because i'm sleepless and it was a negligible amount of fio on my end to just rip the fish data from other farm entries
is there someone to report a website that's publishing pirated versions of stardew to...?
like idk if this is a junimos thing or what
maybe the public forum?
uh I don't have an account on that, maybe I'll have to make one
of COURSE this website is using aigen art for stardew
if I want the corresponding sprite image to change seasonally as well, I'll need to add the seasonal sprites (in each of their respective light/dark tones)?
and I need to add the gate sprite as well?
final screenshot. mooding
ah yes, my favorite part of the game, when grandpa showed me around the farm
god it's so bleak when a website has to put that up as some kind of CYA even though every person writing or reading it knows it's a lie
oh sorry it's a leagle page ichor, my bad
Thats my one legged beagle's nickname
well if you put it that way, go right ahead! 
I am morbidly fascinated by this website
Law eagle... leagle if you will
Leah if she were a lawyer
the actual youtube IP lawyer legal eagle would like to have a word 
I was gonna send a gif of him but I wasnt sure anyone would understand lol
they have social links at the bottom but they've already managed to get suspended from reddit lmao
yes, the same way you're doing your fence pngs
gates are unnecessary; there is only one gate item that you hold in your hand
(the vanilla one)
I made a custom gate for to go with my fence
not a gate item that you put on a fence to turn into a gate
mm no, I suppose not. I see what you're saying now
if you mean the gate sprite in the fence png, yes, but I assume you already have that
anyway I'm done, will find someone to send this website to
:airyndisgust:
I'm famous 
Probably best to tell the stardew support email to get ca/related. Technically you could go to the registrar but i assume for copyright they prefer the holder to complain
yeah, I doubt going to the registrar will do anything about a report from me, it has to go through CA. I was just surprised that there is a very real pirated version of the game on this site (I did check the download)
What site is this? I am interested in wasting a monday evening looking through this (probably shouldn't share here tbf)
Mind if I DM? like you said, I deliberately blacked out the URL in screenshots
but I'm like 99% convinced you already own a legit copy /lh
Sure
I have.. too many legit copies at this point
@ivory plume any chance of getting an API for Central Station to add destinations?
So, I have a couple of food items in my mod that are not intended to be available through cooking (similar to magic rock candy), however I have a report that they show up on the cooking tab even though I do not have recipes for them in the mod. Is there a property I can apply in data\objects so they don't show up? They don't seem dissimilar from the objects entry for magic rock candy.
it can be done via content patcher already, which can be accessed in c# via the content pipeline (edited for accuracy)
Well, there's always the question of how do ppl do c# content edits on custom data models
I don't know if there's good answer there
It's a bit tricky in C#, since you need to somehow add instances of the correct type to the data model (since you're working with the actual data instead of a JSON representation like Content Patcher). It's something I want to look into more, but not sure if that'll be done in Central Station 1.0.0.
I was using Train Station's API, so I was just looking for a lateral change. I will look at CP API
I wonder if we could do something with Pintail for that.
But that part wouldn't be api boundary anyways right
It's 2 mods leverage same game system
Yep, but Pintail isn't technically restricted to API boundaries (that's just how SMAPI uses it).
I was kind of wondering if just giving the edit an object would like, work
Since the type would be known via the initial load by framework mod right
Unfortunately not. The data asset has a specific type (e.g. Dictionary<string, StopModel>), so C# will fail when you try to assign a non-StopModel value (even if you use reflection to cast it).
how does content patcher convert these things? some very complicated code, I assume?
Yep, converting between arbitrary data and JSON is a big chunk of the Content Patcher code.
set their Type to something that's not cooking I think
a content patcher api would be interesting if almost entirely unnecessary 99% of the time
Usually the approach would be to bundle both a C# and Content Patcher mod in the release, but that might be overkill if the only content edit is adding the Central Station destination.
(yeah I havent found a good solution for this that doesnt involve a hard dependency)
I have a generic Dictionary wrapper for use with pintail for modifying data assets
I wonder if there are some super hacky ways to do it. Like make your code generate a content patcher pack on the fly
You could use reflection to create the StopModel instance. It wouldn't be hard, just tedious (especially if many mods need to copy the code).
also magic rock candy is one of the items hardcoded to be excluded from the cooking collection so no luck copying it
I added a TODO to look into adding a C# API for Central Station in the meantime.
that sounds like a good idea though, which doesn't seem in character for me /lh
It would be nice if content patcher has like
C# facing "load this particular json for me"
Would be hard to support tokens and stuff though
https://github.com/KhloeLeclair/StardewMods/blob/main/Common%2FTypes%2FModAssetEditor.cs
I need to update this a little, since the generic Create<>() method is effectively worthless. But it has worked in my testing, otherwise
Khloe's experiments with Stardew Valley modding. Contribute to KhloeLeclair/StardewMods development by creating an account on GitHub.
Wouldn't it be simpler to just use assets in that case?
i hadn't done it, so i assumed there was some pintail coverage that would make it work out and wrote my SNF docs accordingly. i learned later about all of CP's code that makes it work
you can't Include an asset instead of a file, can you...
every time I talk about content packs I am reminded that I know nothing about them
(i haven't updated the readme about it. that's a todo, don't @ me)
The uss case is a c# mod trying to edit another c# framework mod's custom data model asset, and not using hard dependency
Would that be super different from creating a fake content pack?
https://stardewvalleywiki.com/Modding:Modder_Guide/APIs/Content_Packs#Create_a_fake_content_pack
That's trivial to do with reflection though
actually I wonder if some other mod they have is showing my items to appear there... I tried 'debug cooking' and my normal recipes show up, but the two special food items are missing as they should be
Oh I didn't know this was a thing
in the case of complex custom models it would be kind of tedious (see convo above)
it doesnt matter if your cooking items have no recipes, if it's type cooking it will show up in the collection
That's very specialized; essentially it's a way for the consuming framework to create a temporary content pack. But creating a temporary content pack won't add it to the loaded list for another mod (and that other mod may have already loaded its content packs by the time you do it anyway).
why would they not show up in mine then?
the farmer collections screen? or the cooking menu?
oh yeah I just realized that. they do show up in collections
i was thinking of the cooking interface
Though I guess Content Patcher could have a C# API which lets you pass in a temporary content pack. It'd still require a bit of rewriting to support, but much less than a C# API to apply arbitrary JSON data to an asset.
what we really need is a content patcher IncludeAsset patch type that takes in a string asset of the json and includes it like it was a file /lh
Ah, that's right. It's been awhile since I've used that functionality. I just remembered that's how JA used to be able to load arbitrary content packs as part of its api.
(But on the gripping hand, at that point you may as well just create an actual content pack so it's properly tracked/versioned/etc.)
If you're just adding/removing entries, that can easily be accomplished with generic method delegates and smapi's helper, and deep edits are also possible using dynamic
Cp proxying would only be narrowly useful if you're doing lots of complex edits to many different foreign assets
#making-mods-general message I believe this was pathos' explanation message but you may have to scroll further up/down
did you got an answer? you need to have a category that isn't cooking, or use the mod to exclude them from perfection
ah well yes you did, i didn't scroll enough
Yeah it is a bit silly given that the point of doing edit in c# was to avoid dependencies
I tried changing the item to basic but it looks like it still appears there? What category would you recommend
I don't think you can cast a dynamic to a data asset type?
For example:
I saw that, but that only applies if your creating the entire thing through code. You can create a method that reads a local json as the entry type using generics, and then bind it to a delegate with a little bit of one-time reflection
ah I might have misremembered and you need category as well not just type
You don't have direct access to the type though (unless you have a hard dependency on the mod).
You're correct, dynamic can only be used for edits, not to create new entries
Oh I still have them as "Category" -7 that's probably why
(pathos, while you're here, do you know what's the best way to report a website uploading a pirated version of the game is? we found not one but two today, though I didn't share them here for obvious reasons)
how does content patcher map arbitrary json onto a type declared in another mod?
You can get a type by name from an assembly, and you can get an assembly handle either by grabbing an api instance if it has an api, or otherwise by scanning loaded assemblies for one with a matching assemnly name
Alternatively, you could lazy-load the delegate and read the asset datatype directly
This is why you include in your API a method to construct one of your backing model instances, and whenever someone tries registering one you do a type check (and possibly force pintail to unbox things)
They are gone from collections after updating category and type, thank you selph and lumina
Well, actually this isn't too difficult with dynamic if you create the type:
IDictionary asset = new Dictionary<string, StopModel>();
dynamic entry = Activator.CreateInstance("Pathoschild.CentralStation.Framework.StopModel, Pathoschild.CentralStation");
entry.DisplayName = "Test";
entry.ToLocation = "...";
...
asset[$"{modId}_Example"] = entry;
Just very fragile.
I'll probably just add a C# API which takes the values and registers the destination itself, it's a lot safer and versionable.
I think so far Khloe's pintail method seems the most durable (short of an actual api)? unless I'm missing something 
public interface IStopModel {
string DisplayName { get; set; }
// ...
}
public interface ICentralStationApi {
IStopModel CreateModel();
}
public class StopModel : IStopModel { ... }
public class ApiImpl : ICentralStationApi {
public IStopModel CreateModel() { return new StopModel(); }
}```
You'd then want to ensure any IStopModels passed back into the API are actually StopModel instances if that matters, of course, but that's a pretty easy assertion.
Removes the need for people to do weird reflection things to grab your type and instantiate it.
It could be problematic for versioning depending on how you change your model, admittedly, but for that matter so could people accessing it with reflection.
You can add fields fine right
Well I was thinking Central Station would just add a simple API like this:
void AddDestination(Func<string> displayName, string toLocation, Point? toTile, string toFacingDirection = "down", int cost = 0, string networks = "Train", string? condition = null);
And if the data model changes later, I can just add an overload and deprecate the old method.
ducktyping is a fun idea, programming languages should do more of that (not in the javascript way. never in the javascript way)
-# monkey's paw curls. it's the javascript way.
got it, every class is now a Dictionary<string, object>
I will be the first person to defend javascript but not on this
But what about Dictionary<Symbol, object>
if I use c# and run into the nonsense where "2" + 1 = "21" but "2" - 1 = 1 I swear--
is there a small generic npc schedule mod i can dissect from to help make my mod? i have no brain power right now but i also really wanna work on this 
(and yes that is 100% true javascript)
what do u mean npc shedule mod?
im kinda confused
i wanted divorced npc to stay in farmhouse for a day but its a generic one (not specific npc)
hmm is that something that's part of avi's template?
wait is that even possible for non-spouses
wouldn't you have to get them to spawn in the farmhouse first
yeah
I don't think that's a thing without C# I'll leave this to the npc georgs
You are so lucky extension methods can't add operators yet or I would
@hallow prism Could I get you to look at something else for me? I based one of my special orders after one of yours in VMV, and I can't say I completely knew what I was doing. Someone is reporting they can't turn in the SO
i know of one npc mod where they straight up live in ur house
but that was... oh way before 1.6
Relationship:NPCName & "HasValue:{{ChildNames}}": "true" would be my conditions
idk if anything changed
...can't they? I swear I could remember doing that
JSON is a standard format for machine-readable text files that's used by Stardew Valley mods.
If you need help with a JSON file, you can upload it to smapi.io/json to see automatic validation and share the link here.
When making mods, it's recommended to edit your files in a text editor with JSON support, such as VS Code, Notepad++, or Sublime Text. These programs will check for syntax errors.
!json of the order pls
but i wasnt sure what i would replace with npcname since its generic
They say they are unable to turn in Eggplants for the SO
hmmm...
i feel like it would be more straightforward to just do it for each vanilla npc
This is the bit that I used from your example that I don't completely understand: "AcceptedContextTags": "{CropType:Tags}"
because i know you can %spouse but idk if you can do that for your ex
have you tested it?
or am I blending memories of defining operators inside new classes and doing unrelated extension methods for other things 
if you haven't tested it, you may have something not working
oh man so is there no way for modded npc's to be added??
I thought I had tested it but I'm sure I didn't/couldn't test all possible permutations. I will take a look at it some more I just thought you might have noticed something wrong with the AcceptedContextTags line idk
and if its multiplayer, would the npc go to the main farmhouse even if they didnt divorce that npc?
or would they go to the cabin
... im... not sure? i now want to test something like that
i don't spot anything wrong at first glance
and for what i remember of this report
the person had no trouble collecting the eggplants
just donating them
I wonder if they are trying to submit a different quality other than gold. thank you for checking I will do more testing and ask for more information
either the donation has issue with tag, or that, or the box is already used by another quest (but you seem to have the proper exclusion for that case)
yeah i wanted to make a children "custody" mod but the more i think about it, the more im realizing it might not be possible ):
i wanted divorced npc to visit the farmhouse that they divorced from in one day of the week
well maybe not possible for MP with CP
or maybe it is??? im not sure how to check the code for npc going into players cabins
well, i feel like the only way to know if it works or not is to test
true haha
if i wanted to make this mod compatible with bachelors/ettes from other mods, i would just need their ModID, right?
last i heard, almost none of them do, but i haven't kept up
huh
π i started making it a habit to stick my modid in front of everything just in case
i know that sve and rsv's npc don't though
maybe its because they havent tripped over duplicate names yet
should i only do this for vanilla characters then? sorry if im not understanding right now, head's foggy
@faint ingot if this is about the eggplants thing, could you keep this person https://discord.com/channels/137344473976799233/1331148031239651329 up to date if you solve it? they're the ones who made the bug report
i think sticking to vanilla is a good place to start imo
private static Dictionary<string, Action<IAssetData>> adders = new();
public static void AssetRequested(object? sender, AssetRequestedEventArgs ev) {
if (ev.NameWithoutLocale.IsEquivalentTo("x"))
ev.Edit(a => AddEntries(a, "assets/x.json"), AssetEditPriotiry.Normal);
else if (ev.NameWithoutLocale.IsEquivalentTo("y"))
ev.Edit(a => AddEntries(a, "assets/y.json"), AssetEditPriotiry.Normal);
}
public static void AddEntries(IAssetData asset, string local) {
var name = asset.NameWithoutLocale.ToString();
if (!adders.TryGetValue(name, out var add))
{
if (TryCreateAdder(asset.DataType, out add))
adders[name] = add;
else
return;
}
add(asset, local);
}
public static void AddEntriesImpl<K, V>(IAssetData asset, string local) {
if (asset.Data is not IDictionary<K, V> data)
return;
var toAdd = Helper.ModContent.Load<Dictionary<K, V>>(local);
foreach((var key, var val) in toAdd)
data[MOD_ID + '_' + key] = val;
}
public static bool TryCreateAdder(Type type, [NotNullWhen(true)] out Action<IAssetData>? adder) {
adder = null;
if (!type.GetGenericTypeDefinition().IsAssignableTo(typeof(IDictionary<,>))
return false;
adder = typeof(...).GetMethod(nameof(AddEntriesImpl))
.CreateGenericMethod(type.GetGenericArguments())
.CreateDelegate<Action<IAssetData>>();
return true;
}
Will work with any dictionary asset, including custom models. Adds new entries from a local json file.
if it works, you could always work on adding modded npcs to it later
okay thanks forsy
at one point my NPC was the only one following the unique string id convention.
any mod from before 1.6 might be grandfathered in, but new ones were either ignorant of or choosing not to follow convention
unique string id convention?
Speaking of which, ichortower, just wanted to shout out quickly about how much I'm learning from looking at Hat Mouse Lacey. It's been an incredibly valuable learning tool for me
NPC internal names like {{ModId}}_whatever
im so indecisive i just changed my npc's name lol
ah yes, i did follow the convention in a lot of place but this one i didn't
(See unique string ID on the wiki; all the wiki docs should be updated to link to it for ID fields.)
i think basically all VMV is a stellar (pun intended) example of following the naming convention (AND i didn't have modid token) except the npcs
thank you
(please don't report me for my crimes
)
to be fair i started the project before the naming convention, and for npcs i didn't have the courage/hearth to adjust
(it was already weird to have VMV in their internal name, it was the best compromise i could do)
(what kind of crimes? mouse crimes?)
it is definitely less convenient than having a straightforward name, so i understand completely 
admiting my crime in advance, in future npc mods i may have, i likely will keep the namefamilynameshortacronym
π€ come to think of it, are there actually any npcs who share names
so for example SuHyeonFaycombeSereneAFS, rather than Lumisteria.AFS_SuHyeon, which, admitelly isn't SHORTER
but still
I'm not really the person to be replying to with this since I'm just thinking out loud and have already said I know very little about the asset pipeline π this is probably more geared towards pathos and/or Khloe
i believe there is, but probably not between "major" mods
like three Susans
Modding a vanilla villager is hard enough. Adding a whole new one sounds like a whole can of words. Mad respect to y'all for doing it
thankfully its just bachelors/ettes i need to worry about
(Tip: Content Patcher has a MigrateIds feature which lets you safely change NPC/item/etc IDs without breaking existing saves.)
Could I use this to update a specific letter ID?
oh thanks
i admire pathos' patience, not judging us for our crime and trying to gently nudge us instead
Yep. It works for events, items, mail, NPCs, recipes, and songs.
Nice. That will make testing one of my events so much easier
I've been making manual changes and copying save files around
I have on event with ... 5 branches? Depending on which version of a letter the player received earlier
(Oh, apparently it doesn't work for NPCs yet? I'll add that in the next Content Patcher update.)
oh speaking of crimes, there were some central station related crimes I was intending on testing out yesterday I never got around to
I should go do those (shh don't tell pathos) /lh
Oh right, it doesn't support NPCs because that's built-in to the vanilla data; see FormerCharacterNames in the NPC data. I'll add a note in the MigrateIds docs for clarity.
i don't think i can really accept to entirely follow the convention for npc naming, for whatever reason it feels so weird
Do I call it as a debug command? Just looking for documentation
(to be fair some mods still use the internal name in place so this may play a part)
I think as long as the names are guaranteed to be unique like yours are, then it's fine 
off my memory i think every single npc in the big expansion mods im looking at dont share the same name
It's definitely helpful to have a naming convention, particularly for new modders, but as long as people are sticking to the spirit of it, then it's fine
(Personally I find {{ModId}}_SuHyeon simpler than SuHyeonFaycombeSereneAFS, and it lets other mods like Lookup Anything identify the mod automatically.)
I'd play a "Five Susans" mod π Unintentional slapstick
oh i agree it's simpler
mind doesn't always care about what's simpler π but well, i can still change stuff if needed anyway
pro tip: make your npc internal names unique by dynamically setting them to an unused name using c# every time!
-# terms and conditions apply. This is not a real pro tip. Side effects include not actually being able to do anything, people looking at you weird, and wasting a lot of time doing nothing.
This would be a trigger action in your content pack's content.json. Content Patcher would run it automatically when a player loads their save.
There actually has been issues with minor characters in the past - SVE clashed with LFL because they both added a character called Hank and it nearly clashed with ARV because Flash was going to add a character called Sterling but Hime found out about it ahead of time and convinced him to change it
Thank you! For those looking for the documentation, I found it:
https://github.com/Pathoschild/StardewMods/blob/develop/ContentPatcher/docs/author-guide/trigger-actions.md#migrateids
i think recently there was something with zuzu having a character of a certain name and another mod needed to change their or something
I can't remember the character's name, but there was, yeah
dropping this for a personal note for later heh, marriage candidates in every major expansion mod and vanilla stardew
(12) vanilla: abigail, leah, emily, penny, haley, maru, alex, harvey, elliott, sebastian, sam, shane
(7) SVE: claire, lance, magnus, olivia, scarlett, sophia, victor
(22) RSV: ian, jeric, june, kenneth, philip, sean, shiro, alissa, blair, corine, flor, kiarra, maddie, ysabelle, anton, bryle, daia, faye, irene, jio, paula, zayne
(10) ES: aideen, barron, hector, jasper, juliet, kataryna, mateo, sen, sterling, tristan
(1) VMV: aster
(6) downtown zuzu: cal, david, gwen, kristoff, sadie, selena
(6) passerby cemetery: nikolai, john, lyell, cotton, valerie, thalia
stoffton: alexandria, brina, clay, ebbe, fabiana, juliana, odo, quinn, silas, vasha, will, xen, dahlia, josef, mac, rolf, yosef
(12) Mineral town: Aja, Ann, Cliff, Doctor, Elli, Gray, Kai, Karen, Marie, Nami, Popuri, Rick
So I see NPCs have to follow Hollywood actors guild name rules
(i have more planned for VMV but this may take a random amount of time)
what is the hollywood actor guild name rules?
(Just use properly namespaced names and you'll be fine )
inb4 we get a David Tennant npc for the exact same reason David Tennant got his name
thank you 
Okay! I've got this Americium here, I'll wait for it to decompose
i have no idea if :
- this is a real thing
- how long it takes
or if it's a political joke
Science joke
It's a scientific element 
To join the Hollywood Screen Actors Guild, you have to have a name that no actors has chosen before
Hence why actors pick new names for themselves
thanks for explaining π
huh, i learn something new from this discord every day lolol
I don't know how long it takes to decompose, but from memory it's one of those ones that basically doesn't occur naturally and has to be lab-created under very specific conditions
a lot of actors, like David Tennant iirc, have had to change their names even if they weren't initially planning to because of that rule
this reminds me of the clowns faces on eggs


