#making-mods-general
1 messages · Page 471 of 1
nah the stupid folder bullshit was me not wanting to include DBD or other mods so i moved them all out of Mods but then BETAS was missing its dll blah blah
yeah thats what i figured you meant
anyway assuming i ran debugging correctly, it still doesn't hit the breakpoint
betas causing issues 
betas has never had a single bug report, ever
betas can do no wrong
you'll know if you ran debugging correctly because the colour scheme will change, several new panels will open, and others will be replaced
yeah i see graphs n shit. fun
you can ignore the graphs 😌 the important n shit is at the bottom
diagnostics is for memory geeks
just as a sanity check, if you breakpoint your Entry method does that pause?
let me check. although worth noting that it does log the "successfully registered" message in trace
reopening the game as well, of course, since the breakpoint is only hit when that line is about to execute
it did hit that one!
if nothing else we've learned a lot about breakpoints 🙂↕️
no for real
perusing the local & watch & call stack panels is an exercise left to the reader
sooo much better than trying to write to console lol
sometimes log based debugging is the only viable option
but when breakpoint is an option its great
yeah i had no idea anything else existed
well in any case if your entry method breakpoint is hit but not the tile-action-method-open breakpoint, my only reasonable guess would be that you need to wait for GameLaunched before you can register tile actions
assuming your tile action itself is added to the map correctly, which it appears to be, even if we can't confirm the name is an exact match
(or it optimized enough that "just my code" meant the breakpoint didn't trigger)
i was following this https://stardewmodding.wiki.gg/wiki/CSharp_-_Beginner's_Guide
was the breakpoint icon bright red or hollow
the worse alternative to log; return 😌
red with an orangeish arrow in it after being hit
and for the breakpoint on your tile action method?
for sure, i use logging all the time for per-frame behaviours, like printing values for wind, circular motion, anything where i'm more interested in the change in values over time rather than the exact current state or breadcrumbs
https://stardewvalleywiki.com/Modding:Maps#Custom_Actions
this seems to agree with that and also looks vaguely pathos-code-shaped
when you started the mod, was it in Release or Debug?
debug
in which case we're running out of guesses
are you willing to send/DM your map? I might see if I can try to replicate your issue
for sure! do you want me to send the whole mod? it's a festival
for legal reasons i have to state i also have a festival with a bonfire you can burn shit on, just to avoid any conflict of interest here
but you're a step ahead in that you've actually drawn the fire 
skdjfhsd do you really lmao
no 😔 i tried and then found free to use assets 😔
at Shockah.SeasonAffixes.OvergrowthAffix.GetPossibleForage(GameLocation location, Random random) in C:\Users\mateu\Source\Repos\Stardew-Valley-Mods\SeasonAffixes\Affixes\Positive\OvergrowthAffix.cs:line 97
at Shockah.SeasonAffixes.OvergrowthAffix.GetForageToSpawn(GameLocation location) in C:\Users\mateu\Source\Repos\Stardew-Valley-Mods\SeasonAffixes\Affixes\Positive\OvergrowthAffix.cs:line 78
at Shockah.SeasonAffixes.OvergrowthAffix.Crop_harvest_Postfix(Int32 xTile, Int32 yTile, HoeDirt soil, Boolean& __result) in C:\Users\mateu\Source\Repos\Stardew-Valley-Mods\SeasonAffixes\Affixes\Positive\OvergrowthAffix.cs:line 60
at StardewValley.Crop.harvest_PatchedBy<aedenthorn.CropVariation__aedenthorn.Wildflowers__bcmpinc.HarvestWithScythe__Cherry.MultiYieldCrops__selph.CustomTapperFramework__shekurika.MagicalCropsCode__Shockah.SeasonAffixes__spacechase0.SpaceCore__Spiderbuttons.BETAS>(Crop this, Int32 xTile, Int32 yTile, HoeDirt soil, JunimoHarvester junimoHarvester, Boolean isForcedScytheHarvest)
at Wildflowers.ModEntry.TerrainFeature_performUseAction_Patch.Postfix(TerrainFeature __instance, Vector2 tileLocation, Boolean& __result)
at StardewValley.TerrainFeatures.TerrainFeature.performUseAction_PatchedBy<aedenthorn.Wildflowers>(TerrainFeature this, Vector2 tileLocation)
at ```
I feel the profusion of harmony patches has become a real problem.
(the missing bit because I ran out of discord text)
at StardewValley.Game1.<>c__DisplayClass925_0.<tryToCheckAt>b__0()
at StardewValley.Game1.tryToCheckAt(Vector2 grabTile, Farmer who)
at StardewValley.Game1.pressActionButton_PatchedBy<mistyspring.ItemExtensions>(KeyboardState currentKBState, MouseState currentMouseState, GamePadState currentPadState)
at StardewValley.Game1.<>c__DisplayClass978_0.<UpdateControlInput>b__0()
at StardewValley.Game1.UpdateControlInput(GameTime time)
at StardewValley.Game1._update(GameTime gameTime)
at StardewValley.Game1.Update(GameTime gameTime)
at StardewModdingAPI.Framework.SCore.OnPlayerInstanceUpdating(SGame instance, GameTime gameTime, Action runUpdate)```
you dont, all of mine are registered in Entry
how dare you.
now as is traditional, pick one mod at random from that harmony method signature to send the bug report to 🙂↕️
i meam its just showing everyone thats touched that method. to me that looks like a whole bunch of mods being completely harmless and one throwing an error
ah, i couldn't say for sure since all of mine are behind some kind of entry -> gamelaunched -> onesecond -> init gate
reports it to all of htem instead
(I'm reporting it to the top level one.)
My only vaguely content mod also registers a tileaction directly in entry https://github.com/SinZ163/StardewMods/blob/main/SinZational Shared Spaces/ModEntry.cs#L31
sure thing, if you’re willing to send it!
already done 🫡
i'm headed to bed, but if anyone backreads and has a brain blast, ping me
and thank you all for your help
my theories are the tileaction isnt being applied at all, or it is on the wrong layer or for whatever reason the callback method being static is being an issue (but I feel like it would be a compiler error if this was a failure case)
I just checked the second (it isn’t, a different tile action on that layer works), and I had the same thoughts about the third
static isnt an issue
Everyone tell me mods that have fire fests cuz one my box is going to have a pyro streak
🤔 ok.. Uh so do i really want to make an item for every single fruit in the game
for context im making candy
are you counting only tree fruit or also crops
there are 26 of those in vanilla
27 if you count qi fruit
you don't need to obviously, but are you willing to do that much
not only should you make an item for each but you should make a custom museum for the collection too 

button no!!!
yep
i mean if i want to give npcs gift tastes i would have to make them custom items 🤔
for each one
you can local token it
actually dunno if that'll be less work 
also u mentioned cursed recipes in modded so i say tomato candy
i have the colors of the rainbow and i'll just assign colors randomly i guess
wait no not randomly
obviously fruit is pink
wait i have no pink
peach
oh my god im making no sense
colors of the rainbow 
if you want you can make it so there's like multiple options for one candy but you'd need spacecore
do u also have indigo
yep
red orang yellow green blue indigo violet pink and white (coconut is real and dear to me)
indigo is troublesome, there's no fruit for it really
blackberry?
yeah what other color would they be
is violet tech a specific shade of ourple or just ourple
i mean it is technically a specific shade but for the purposes of
mod
it's just one of each color
🤔 great. now the question of "do i make melon candy pink or green"
i know pink cake is pink but who says it's not just bc of the frosting
Randomize it each day
evil idea
Make a twirl of color
Indigo and blue are both blue
indigo is a much darker blue though
Think about it backwards actually. If not melon, what fruit could be the green candy
Yeah but Forsy said one of each colour
oh i didnt realize thats what you were responding to
Yeah so if theres no other green then melon has to be green
But I am merely being pedantic, I actually do not want indigo to be disqualified because it's a very nice family of hues
also itd ruin the ROY G. BIV if you removed it
Wait i confused myself. Ignore that last message
Most of my favourite blues are indigo
There's no sour apple in (vanilla) stardew :(
I think melon candy makes sense as pink because Stardew melons are pink on the outside (what type of melon is that?) and watermelon is pink on the inside
but the stardew melon is green inside
I still think I would be more surprised at green candy being melon than pink
the bigger problem is what color is an apricot
orange? Yellow?
Usually orange by the time they're ripe (not my preferred way to eat them) imo
I mean its candy its gonna be brighter than the fruit
Invent a dark pink. For him (elliott)
@urban patrol I have good news and bad news
the good news: the issue doesn't seem to be with your code
the bad news: there seems to be a bug(?) that prevents custom tile actions from working in temporary maps right now. if you load your map as a regular map, it works just fine
(well, there's an error, but it does run your code)
possibly not a bug, since special festival behaviour seems to be intentional
yup, festival tile actions are hardcoded and don't accept custom tile actions
tile actions and warps are generally ignored for temporary event locations, i ran into that with halloween 2024
yup, checkAction is overridden for festival maps (well, not overriden, just caught by the event). they also have some special festival only tile actions like Shop (instead of OpenShop)
🤔 i think i answered my own question already but I want to make a recipe book that lets the player learn recipes by reading it. but i want to exclude two recipes that are obtained via other means. what ive come up with is to just prefix the recipes I do want to be available via the book with something specific and just use the prefix that wau
but is it? irl cactus fruit is pink in the middle
i would at least assume stardew cactus fruit is the same as real ones
not green ones
oh yeah the green ones are like. white or yellow-green
hooray, i have a green something now
im of the personal opinion that melon being green inside is not canon, but its a cute idea if you do want to do it
whether or not green-inside melons are in the game, they're in the game assets, ca drew them, and that's good enough for me 😌
mod that changes the unused green melon asset to pink
does the "equipment" tag actually affect anything? (vanilla or mod wise) I kind of want to give some stuff the equipment tag for better crafting sorting but at the same time don't since I want to avoid breaking stuff by giving non-equipment the equipment tag.
it doesn't appear to, though the equipment category (-29) would omit it from the shipping collection
I am okay with it not being shippable. Most of the spell scrolls (which I want to show up in the combat tab for better crafting) are money negative for crafting.
ty for the info
Quick question so I’m recoloring a mod and when I went to save the edited png it got reduced by a kb is that normal?
png is a (lossless) compressed format, so yes it's normal for the file size to fluctuate when making edits
I was just searching to see if a png was compressed or not, beat me to it
there are also different levels of color depth that png supports, so your program might also detect that a smaller one is suitable and save you a lot of space (but for stardew you should keep your images as 8-bit rgba to avoid weird problems)
I’m gonna be 100% honest I have absolutely no clue what 8 bit rgba means but I think I’m using those kinda colors since I’m using the same pallet as the original modder 😂 I’m just applying one of their color schemes to the rest of the pngs so I can have blue farm animals
if your images are looking okay when they get into the game, you don't need to worry about it 😅
if only we could make portraits as jpegs...
plz no jpegs I beg
jpeg
no
(in the interest of clarity and fairness, i have no objection to the jpeg format overall, but for pixel art it is Not Good)
(I have every objection to jpeg, in the interest of obscurity and unfairness)
Please
Tiff or dearh
I say "or death" because I suspect ichor WILL kill me
Oh no what about
Heif
what about webP
I had no idea about tiff, tiff seems great!
please hold
No TARGA love?
even worse than jpeg, was supposed to be the new web image format, but failed, miserably, and its unsupported by almost everything I use, webp isn't even worth a mention from myself XD
- atra, i would never kill you, where would you even get that idea from
- re: tiff https://inventingthefuture.ghost.io/mr-tiff/
webp is fine (you're already using it and you don't know it: nexus, for example, automatically re-encodes all images as webp)
Oh webp does work in browsers well, it's just the off browser support is lacking tremendously
nexus having cranked the compression up to insane levels does cause the toothpaste problem, but that's not webp's fault
Toothpaste problem..?
It's where images look like they have been smothered in a layer of toothpaste
much less noticeable for e.g. skyrim (nexus's main audience), but makes pixel art look super bad, like using a jpeg
We have a rough estimate of the amount for stardew thanks to the mod dumps, but for Skyrim where some mods can take up like 5gb easily, it must be a massive amount
i haven't taken anything resembling a wide sample, but from my limited observation, nexus's webp encoding has saved 30% file size on even small stardew pngs (which i would expect png to perform well on), so at scale i imagine it has saved them considerable bandwidth
Just gotta counter em by making my images 3 times bigger
4k
🤔 do local tokens die in cooking recipes or am i just doing it wrong...
https://smapi.io/json/none/8212cec2cef84f4faeaeea161175476c
https://smapi.io/json/none/35fc05c94f394fc296218e35725d72bc
do you have to file taxes
they were an inaccurate tax bill for halloween and then despookified
you're missing the quantity for the first ingredient
I mean, most people have to file taxes
but I work in tax
hmmm taxes yummy
ingredient count ingredient count
Oh, so they were rage baiting me in October and I missed it, then
right now it's ingredient ingredient count
elizabeth was low tire pressure
but it's in a dynamic token
the other cooking recipes work
just not the ones i have in local tokens
it wont show up in the cooking menu at all
the two that show up are the not local tokened ones
smapi isnt throwing any errors either
and i read my cookbook
and what's the code for that
your tokened recipes start with "Abby_" which may be related
ah.. hm
yeah i did wonder about that
for that matter none of my tokened items are showing up
my object jsons
Can you do these steps to provide more info?
- Load your save and view the content that should be patched.
- Type
patch summarydirectly into the SMAPI window and press enter. - Upload your SMAPI log to https://smapi.io/log (see instructions on that page).
- Post the log link here.
I've been a tax bill for a month
uh ok wait i figured something out. an oopsie of sorts if you will
ahahahaa
i fixed it
(i made a typo)
is it possible (with example please! the wiki is kind of bare T_T) to make a machine give a random output of a thing based on a tag?
I might just give in and go with making a custom output rule T_T
and the mod silently died on me
[[Modding:Item_queries]]
read through the page for a full understanding of the universe
doesnt mention context tags?
also asked for examples since examples help me learn a lot better than any page with text
Does anyone know where I can change the perfection tracker's maximum walnuts of 130 to like 140 or something? I extended ginger Island a little bit and I am able to place new golden walnuts via the paths tilesheet, but it seems like any golden walnuts going over the 130 aren't really counted normally (and therefore also not exchangable at the Qi shop with Qi gems). I just cannot find where to change the perfection tracker's stats (if this is even the thing that causes that issue)
So you can specify require tags in the input, and then for the output you can randomitemid
Do you need something more specific
sorry if I wasn't clear. I want the output to be a random thing based on tag.
Like the idea is a machine where you insert 10 stone + coal -> random archaeology item with the 'fossil" tag
Then u want ALL_ITEMS peritemcondition
i suspect the 130 for walnut count is hardcoded, but get a second opinion as i'm away from my decompiled source tree
This is just in the output too
Sounds like it might be one of the more difficult problems. I guess I could technically remove some walnuts from the game itself (like removing a few mine walnuts). I'll think about what I do
question to the other nerds, if you’re randomising an animation length do you go for uniform distribution or normal
Is normal the bell curve like way?
yup
in my two mods that allow random delays (only one of which made it to 1.0), the user gives an array and i choose uniformly between the values
if they need weights they can specify a single value multiple times
if anyone says something like poisson you’re getting blocked /j
I usually do uniform because it's easier to code however if I had a nice method of normal set out, I would use that more often I think
there are ways to convert between distributions
good to know! I shall have to check them out
mannnnn thank you so much for figuring that out! i saw you also requested it be dehardcoded for 1.6.16, thank you
So, in Tiled I have apparently 20+ copies of the same tilesheet open in the bottom right hand corner. If I try to close any of them it gives me a warning about deleting assets on the map. Any tips/help?
Everything still works, it's just slow to navigate through tilesheets.
were you copy-pasting from other maps?
sounds like u copied a bunch of things from maps and it made its own new tilesheet every time...
(i've never been in this situation, but i can imagine that a copy-paste like that would automatically add a new tilesheet for the referenced tiles)
(it does. i had the misfortune of doing it)
There are a couple ways to consolidate the tile sheets. Most of which are a pain and may be time consuming
I did not copy from other maps, but I've copied a lot from this map onto itself.
hm
Use Iro's tiled plugin. Stops this from happening when copying a map onto itself. (in my experience)
... I am using Iro's plugin 🙂
sigh time to wait like 10-15 mins for nexus to upload my file
check if your tile sheets are embedded
Could you give me a hint as to what that means? Or a place to start?
at the bottom
thanks forsy
embed tileset (the one next to the new tileset)
it embeds them to the map so.. uh. idk it does things.
i dont actually know the details
(but you should do it)
hm, I think they probably are because it won't let me click that option (the other ones are clickable)
...then i uh.uh
maybe have bad news
(you might have to remove the tilesets and just redraw the parts)
Or I can just suffer through having too many tilesets, because I'm nearly done.
Which is probably what I'll do.
i think there’s supposed to be a way to export as a tsx and then re-embed
no copies of tilesheets will cause errors
You can. Theres actually a couple ways.
It’s a pain though. Better to just live with it unless it’s problematic
If I edit another map, or make another, I'll look for this problem early.
excellent i know zero ways but i’ve seen it talked about before
Seems to work fine in game without errors.
Yeah, I just tested and it seems like whenever I'm cutting-pasting within the same map it's creating a new tileset.
Bizarre. I'll live with it for this, but would be intolerable if I decide to actually make a map for release. I'll have to come back to it then.
it shouldn’t happen with my plugin 
I'm not sure. I definitely have your plugin, and am using it's features. (Thanks for it, btw!)
I do have to select Fix Stardew Tilesheets each time I load the map, but I think that's normal
Ok. Well, the map is 8x larger in filesize than the original. I opened it up in notepad and it's completely duplicating all the tiles from one tilesheet into the other. So the same tile seems to be replicated many, many times.
hmm, can you either send or dm me the map? I’ll make sure it isn’t my extension’s doing
Even if it isn't...can we still blame you?
no 😇
dang
(I did send iro the file: thanks for that)
Though, yeah, I still can't use copy-paste within the same map or it duplicates. So weird!
How can you select a tile on a layer, and then get pointed to the location of that tile in the tilesheet? I assume there's an easy way to do it, and if I can't copy-paste, I'll have to do that for now.
right mouse click over the tile
if you're using the stamp tool, it's like right-click or something to pick the tile
which selects it in the tilesheet as well
Great, thank you.
Ok, so DO NOT use that deduplicator. It doesn't preserve TileData objects.
(I made a backup, obviously, so I'm fine)
@hallow prism: play with that, uber pls (18h ago)
Oh, so Elizabeth was also specifically targeting me. Dang, I should've been around more last month.
it's still october in my heart
is it possible to have quality items sold in shops?
https://stardewvalleywiki.com/Modding:Item_queries#Item_spawn_fields Use Quality here
@gentle rose If it helps when you look at it, I narrowed down what precisely causes the duplication of the entire sheet. It's when I use rectangular select to select more than one tile at the same time, use Ctrl-C to copy that, and then paste it somewhere else in the map. When I paste it, it create a duplicate of what seems to be the ENTIRE sheet and all tile commands related to it.
@royal stump why is my smapi log (https://smapi.io/log/57dd097b9a1348da8d1c706c17d47b42) showing like this: [07:32:42 TRACE Farm Type Manager (FTM)] Checking forage settings for this area: "ESOrchard Beach_Nova" (EastScarp_Orchard) [07:32:42 TRACE Farm Type Manager (FTM)] Checking extra conditions for this area... [07:32:42 TRACE Farm Type Manager (FTM)] CP conditions found. Checking... [07:32:42 TRACE Farm Type Manager (FTM)] At least one CP condition does not currently match: "conditions don't match: HasMod". Spawn disabled. (Correctly)
When someone else's is this: https://smapi.io/log/57dd097b9a1348da8d1c706c17d47b42 (incorrectly) with the HasMod conditions.
Interestingly, their Farm Type Manager is up to date and mine is 1 update behind. So new verbose logging?
Log Info: SMAPI 4.3.2 with SDV 1.6.15 build 24356 on Microsoft Windows NT 10.0.26200.0, with 77 C# mods and 80 content packs.
Ok, but then if I UNDO, and paste it again, it does not duplicate the tile sheet. Truly this is deep arcana.
yeah usually the best way is to use the right click method and drag to cover an area, i’ve never had it copy a tile sheet that way
That's what I'll do from now on, certainly.
I've had it duplicate tilesheets when I pasted from other maps, but not the same one
I swear sometimes Tiled comes up with new oddities just for fun
@hallow prism: look at association xp/theme. Synced random? (20h ago)
they're hardcoded in an amusing way where if you have 130 or more golden walnuts, you literally cannot receive any more and any you pick up are effectively nulled out. but if you have less than 130, like say 127, and then pick up 100 walnuts at once, you will correctly be placed at 227 Walnut. at which point you can no longer gain any since you're at or above 130
Thank yall so much!! I used Sublime and now everything is working as it should 
(Same log URL twice, but) yeah, the most recent FTM update moves most of the trace-level pack info to verbose mode. It's always caused file size issues for big mod sets and/or multi-day logs, though it's a trade-off with getting more info from users. The steps on the github release might help if needed.
(im late because I just woke up but as number one webp fan im required to chastise you (/lh) for placing the blame on webp instead of other programs not updating to support a better format that's been around for 15 years. webp is incredible when you keep it lossless or mostly lossless and very good for web use. id use it on my Stardew site if I had more images on there)
WebP is great. I convert all of my digital comics to use it over png and it drops them to about 10 to 20% the size
half of my beef with webp is when images online show a different extension at the end but it's actually a webp
quit lying!
I lie, it's all my beef, I have a program that can support it now :V
The worst is heic
but when I didn't, it was always like SURPRISE
This is my main specfic qualm aswell, especially given browsers are fully (and easily) capable of converting webp to png when you want to download it but being forced to use an extention or external site/program, my second even more specific qualm is the lack of support for anything over 8 bit colour depth, I hate banding, I use 10 -16 bit depth so very often to avoid this annoyance, other than that it's a great idea, just wuite poor execution BOTH on browsers and external software's part
(I did just learn aseprite supports webp so my qualms are like very much nullifed quite a decent amount)
use avif then
/lh
(The saving thing is annoying but also not a problem inherent to webp itself)
it's certainly not webp's fault at all, just the implimention of external factors miss classified by me as webp's fault
you were the one misclassifying it!!
I miss typed! I put 2 "as" instead of "me as" sorry ! XD
(i don't wanna delve further off topic though I just couldn't stand file type slander. go back to making mods or whatever it is people do here)
anyone know of any other frameworks that have schema created already?
I found furniture frameworks schema, plus the CP and Smapi Manifest. Just curious if any others exist before I start jumping in to make more.
dont they all? is that not what makes them frameworks?
I mean they all have rules and what is allowed in what spots, but not all of them have schema.json files
oh i see
Schema is just json schema stuff not specific to sdv modding
right
Normally newtonsoft json has export for that
But it gets complicated if you have a framework where the main mode to do stuff is by content patcher
That's why i didn't bother making any schemas tbh 
Usually it's better to implement more checks about illegal data given to my mod at runtime
yeah, that is why I am making the extension, so that I can have the extension handle any logic needed to determine which schema to use
No i mean inside the mod itself
E.g. here i check if the texture assets are all valid and remove anything deemed invalid before actually operating on the data https://github.com/Mushymato/HaveMoreKids/blob/main/HaveMoreKids/Framework/AssetManager.cs#L124
As for usage in vscode i just put a $schema field one time at the top n not worry about it
It is content patcher 99% of the time 
Hm.. One of my mods is spawning forage every time I harvest a crop. 🤔
it does this by destroying garden beds too, so it's a harmony patch
yeah, the extension basically is just a glorified automatic way to do this
If someone overrides the location object dict then the original item is gone
main use for me is just not having to jump back and forth to the docs to make sure my formatting is correct
It doesn't have to be harmony i feel
that makes some sense.
I am more poking fun at how a debug trace had like one function patched by five mods. 😄
(are you gonna be able to stay on top of it when the framework updates tho)
I think (iirc) the aim was to use schema that the mod authors have made themselves?
putting the effort (and blame when it breaks) on the author, which is a decent idea if the mod author makes a schema
this made me think they were making them?
Ohh I missed that message good point
I plan on keeping it updated for any that require a fully written one. I am am also going to share with the authors so if they want to host the schema and keep it updated as they make changes
I’m pretty sure I fixed that back when dh told me about it at the very start
interesting
Sorry 🙁 I know what a pain squashing bugs can be.
Something that is perhaps worth pursuing first is a extended version of content patcher schema with the vanilla asset models
Atm it only really checks for stuff above Fields/Entries and you are on your own after that
Tokens do make this extremely complicated though
do you mean like auto completes for item names and such
does it? cant you make the schema only apply rules if one of the fields is set to a certain value?
no i think chu means like if you write "Data/Buildings" then the schema knows what fields are in Buildingdata
yeah, you can do that
I am basically going off this as a guide to writing these - https://json-schema.org/docs
JSON Schema - a declarative language for validating JSON documents
tokens shouldnt complicate that bc most things would just be strings anyway
Well i mean if ur field key is a token
webp makes me legit crash out
It is also a public github, and anyone is fully welcome to submit changes or improvements
i hate it so fucking much
Then it's no longer a thing u can statically determine right
just let the field key be an arbitrary string
itd be the stuff inside the object of that field that matters anyway
yeah, most CP fields are strings, so the best you get is the little hover description of what the field is looking for
which I personally find very helpful
I would also like to figure out a way to offer a list of item ids with names when a field needs one, but that is for later me to worry about
Mods could be adding items tho, not sure what u can do about that
You could consider recommending the qualified item id form tho
(O)modid_thing
yeah, it would mainly be for vanilla items
my understanding is the schema stuff isn't part of core newtonsoft json, and isn't unlimited usage without a license.
though there are other .net libraries that have no such restriction, as OpenAPI specs are json schema
though purely in json schema I don't know how viable typing the entries/field would be when TargetField starts going deeper
one of the struggles with the current content patcher schema is that I had to PR it to remove some of the asset specific validation it did have because as soon as you added tokens to the mix you couldn't be sure of anything any more
my debugger mod has the chance to do more, but vscode is somewhat protective of the schema registration process
Should we make a thread for this discussion
and can only have static declarative schema registrations, when I would be wanting to mint a json schema on the fly for every individual json file based on what its touching
while also adding things to it without documenting them anywhere 
my existing debugger stuff is in https://discord.com/channels/137344473976799233/1378384399883698236
hellooo back with more questions, is there a way to set a GMCM thing where the value one enters is saved as a token? with a default for that value ofc
if you're using Content Patcher, config tokens may satisfy your needs
It's just the regular config but it can be used as tokens too
hmm okay, thanks :)
Heyyy I've been trying to mod a custom npc and I've been dealing with some issues. She appears on the map, I can gift her things, but won't move and won't show her dialogue. I'm not comfortable sending my mod's file, but I can screenshot if needed. I checked, like, millions of times to see if the pronunciations are correct and they are, I followed the wiki's tutorial and tried my best to do it identical but yeah can someone help me?
Is this normal?
Has anyone faced that before?
I already included the dialogue and schedules files on the content file
!log
Important note: Your computer username may appear in the log. If your username is your full name, please be aware of this before uploading it.
Please share your SMAPI log file. To do so:
- Open this page: smapi.io/log.
- Follow the instructions at the top of the page to upload the log file. (Don't copy & paste from the console window!)
- After uploading, it will show a green box with a URL to share. Post that URL here.
Please do it even if you don't see any errors. This has useful info like what mods and versions you have, what the mods are doing, etc. If the issue didn’t occur in your last session, please load the game to the point where the issue occurs, then upload the log.
what does 'pronunciations' mean
Yeah as Atlas linked to, all config settings can be used as tokens at any time. If you need to not use the config directly then you can create a dynamic token whose value changes depending on the config value.
uh, I'm still a little bit confused, my goal is basically to have the player be able to type what nickname (if any) an NPC should call the player by
Ok let me show you a little example
"ConfigSchema": {
"CT_Nickname": {
"Default": "shmoopie" // player will be able to type whatever they want in but if they don't put anything in the default will be shmoopie
},
}
"Changes": [
{
"LogName": "Dialogue edit",
"Action": "EditData",
"Target": "Characters/Dialogue/Krobus",
"Entries": {
"Mon": "{{i18n: dialogue.krobus.mon |nickname={{CT_Nickname}} }}"
}
]
// i18n
{
"dialogue.krobus.mon": "Hello {{nickname}}! You're lookin' mighty fine today!"
}
i adore this example 
'shmoopie' will now be my test NPC's name
My favourite part of writing examples is finding silly things to put in them xD
it's awesome :)
i am planning on adding some joke/easter egg stuffs anyways so that line is def making it into that category LOL
I was thinking about something, growing fruit trees in winter all use the same sprites, to be able to make unique winter sprites for growing fruit trees, you would need a C# mod wouldn't you?
afaik fruit trees use a data asset so i presume you can point them to a new texture/index
editing their sprite with a basic "when" check for winter in CP should also work, if I understand the idea
that would edit all of them at the same time, though, yes?
not any more than the editing the texture field would, afaik?
whether it's switching texture or editing it, they should be able to get the same effect
oh i see what you mean. i thought you meant editing the shared sprite with EditImage
I do, but I'm not sure what the distinction would be 
i believe they want the different trees to have different winter sprites, instead of sharing one
each fruit tree uses a separate row of that, afaict? but if the goal was to have them only look different from each other in winter, then the data edit would be necessary, yeah
...unless they share a sprite in winter because hardcoded stuff? I'm not familiar 
they have a separate row but ony for spring summer fall
all the winter ones are on their own row
No, each tree has its own winter
oh really?
idk if they use them since I don't actually play, but they do exist now(?)
Btw you should wrap up that banana
and cover them in hay ig, haven't seen the practice before
mmm grass
i think the only note is that when in a greenhouse the summer one is always used
should otherwise work as expect
I only mean the growing ones, not the fully grown trees, since they all seem to use the sprites above the banana tree row
Since it bugs me when I'm trying to make a evergreen fruit tree, or just unique ones for each tree
Even though it is only used for one season until it's fully grown, so it's only a little annoyance
i don't suppose anyone here happens to be proficient at Japanese? looking to do a quick check at something that might be a pun
Leroy iirc
i know only enough to be dangerous
lol right
I only know kindy level jp
if its important maybe go ask some jp translators on nexus?
ehhh i might know it but im not the best at puns
was just looking at the japanese name for this dinosaur
カニメザウルス Kanimezaurusu
which appears to be some kind of crab reference
wow i love him
kani is crab so that checks out so far
i'm gonna add him to my dino mod at some point here
🤔 maybe something like "crab eyed-
at least one jp person is on ur side
ok
but wouldnt u just use the official eng name
this guy too maybe
i would just use the english name, i was just trying to understand like uh the design principles i guess?
hungrysaurus
like is the dark ridge just like a blunt horn or is it meant to actually be a big wet nose
looks more like a horn
i suppose that's probably a localization invention then
maybe they're trying to say it's like a big dumb dog or somethin
chomposaur seems a bit more direct, cool
so my machine is acting a bit weird compared to vanilla machines. is that just because there is a lot of things for it to sort through so it takes time to accept the input?
it takes like 3 to 20 clicks for it to take the clay.
First is a video of the the issue compared to a vanilla machine, second is the code
well then i'll just call it wetnosaur and give it a crab themed color palette option
thanks
nope, test save isnt laggy and there isnt anything in the logs that I noticed
(give me a moment, going to post a log)
hellooo is there a GSQ for having a dyamic token set to a specific value?
https://smapi.io/log/70768e65221947ca9bc65ff5b6ecf667
The "testing mods" profile I use
Log Info: SMAPI 4.3.2 with SDV 1.6.15 build 24356 on Microsoft Windows NT 10.0.19045.0, with 16 C# mods and 7 content packs.
Suggested fixes: One or more mods are out of date, consider updating them
dynamic tokens are not content patcher
that wouldnt make any sense, because dynamic tokens are just a content patcher thing, and the game has no way of knowing when a token is even used
use mailflag
like other machines from the mod I am able to insert instantly / first click. Just this new machine is taking 4-10
i think it might be cus the item query you are using isn't guarenteed to produce anything
that is why i mentioned ALL_ITEMS with PerItemCondition
the cond is ITEM_CATEGORY Target <whatever category number arch is>
arch isnt a catagorry, it's a type
sure then use ITEM_TYPE (this is a game state query)
and u can use ALL_ITEMS (O) cus it'll only be an object
you have to be more specific about what you want to do
otherwise we doing a x y problem
gotcha
thank you for the help but i sitll don't understand. I'm a type of person who learns best with actual examples. give me a book on how to take apart an engine and I won't learn much. give me an engine to take apart and put back together along with the book and I can learn it.
I'm just going to make a custom output method. Since I can also limit the artifacts by area they are meant to drop from.
I'm trying to have an item be randomly a universally loved or hated gift, and to have unique gift dialog that also depended on whether that item was hated or loved. my current set up is a dynamic token that's either love or hate so i can do the taste entry for the item like this:Universal_{{fishe_taste}}
I wanted to use the same token to determine which gift dialog will show
..this is all for a joke item btw- going a little overboard
yea just use the token in a when
awesomee
and edit the item dialogue according to the value
i would normally say do what you want, but i have a vested interest against outputmethods lol
give me like 5-10min ill make exactly what i described
okay, sooo would it be like this? ```
"When": {
"fishe_taste |contains=love": true
},
okay perfect, thank you so much :)
As far as I can tell in testing, that's not the case, at least in SDV 1.6 or later. Trees seem to use their default sprites until fully grown, even in winter. The seemingly shared "sapling in winter" row there might be obsolete now.
@indigo yoke here ya go https://smapi.io/json/none/45d8d56c3c7c4ba091fc7305b617b58a
the reason why i care about this is cus machine control panel gets much better results when it is just a normal item query
Fallback in Item Query
i think that's up to each individual item query to implement 
RandomArtifact | DifferentQuery
and in machines, u can do that by having a second output item for when the first one doesn't work out
helloo is there a way for one to make fake NPCs, similar to birdie with their own schedules but not really social?
okay so one reason I was confused about this (again ty for the help) is that machine data on the wiki doesn't list PerItemCondition. didn't know we could add that so brain was conflicted when you kept saying add it.
they're just regular NPCs butr with CanSocialize to false (I think that's the right name)
it's part of the standard item spawn fields
hmmm okay!
thank you :)
personally i also don't look at wiki much when i gotta write cp stuff
usually start by copying a block from the unpacked content
it is listed, just might be confusing for beginners
yeah I looked at the bonemill since it takes a bones for a random output
once you get a handle of how item queries work and how prevalent they are in the codebase your power will only grow
you don't want to be the nth C# mod that implodes because they didn't know how item queries work and how content modders can abuse them
if you want to extend this in C# somehow there's a few ways
- add custom GSQ to use in the per item condition
- add custom item query that just gives back list of all possible outputs (machines always pick random one)
custom output method is ok if you really need access to the exact input item instance
which i have needed b4 so yknow it is a tool 
using spawn fields in FTM 2.0 stuff and just hoping it all works
if u didnt use at least genericitemspawnwithcondition then the world will end
also that it performs well, idk how much logic goes into all_item or w/e
i subclassed that to add other stuff, but I did get the condition part 
the world is safe for now
i have like, used it, then forgor to actually do the condition check lol
add custom item query that just gives back list of all possible outputs (machines always pick random one)
is custom item query similar to GSQ? I used spacecore as an example on how to add some to the mana bar api. I could add a custom item query to get the item I want based on item tags then.
since item query resolver doesn't auto do it 
well if item tags r just context tags then that is a vanilla gsq (ITEM_CONTEXT_TAG)
All item just spawns a copy of every item in the game no biggie
u can add that to the PerItemCondition in my example
i think game should maintain a cache of items to use for all items tbh
and just get one when cond actually match
https://github.com/Esca-MMC/FarmTypeManager/blob/wip-2.0-code/FarmTypeManager/V2 Code/CustomActions/Handlers/Settings/Components/FTMSpawnItemData.cs
stapled randomization weights & some misc spawn settings on here, then used it in Item/ItemList like this
"ExampleEntry_SpawnObject": {
"ActionType": "SpawnObject",
"Condition": "PLAYER_HAS_MAIL Current TEST_FLAG Received",
"Weight": 1,
"Settings": {
"Location": "Farm",
"TileCondition": "AREA_CIRCLE 30 30 20, ANY \"!AREA_CIRCLE 30 30 17\" \"AREA_CIRCLE 30 30 14\", ANY \"!AREA_DIAMOND 30 30 11\" \"AREA_DIAMOND 30 30 8\", ANY \"!AREA_DIAMOND 30 30 5\" \"AREA_CIRCLE 30 30 2\"",
"ItemList": [
{
"RandomItemId": [
"(O)93",
"(BC)143",
"(BC)37"
]
}
],
"MinTimes": 10000,
"MaxTimes": 10000
}
},```
I keep forgetting I have that set to make a weird eyeball shape in the tile conditions
if the aformentioned ITEM_CONTEXT_TAG is still not enough then here's custom item query example:
register with ItemQueryResolver.Register(ItemQuery_CREATE_TRINKET, IQ_CREATE_TRINKET);
https://github.com/Mushymato/TrinketTinker/blob/main/TrinketTinker/Extras/GameItemQuery.cs#L210
esca can i give u OOXXXOO form spawn map
I literally have more of an opinion on whether or not a very tired atra gets to stop by the Chinese bakery
(Yes.)
I think you should yes
I'll think about it, but I'm not sure how to cram that into the condition format 
I did want to do that in content packs too, but never made time
oh i mean wouldnt AREA_COLLISION_MAP OOOXXX/XXXOOO be ok
its the same kinda syntax buildings use
tho i forgor if / is valid or if u had to use \n
I guess that might work as like a wrapper query
Let me just xo my way to the entire farm map
or ig it could be like COLLISION_MAP startingX startingY XXX/XOX/XXX
[20:58:22 ERROR game] An error occurred in the base update loop: NullReferenceException: Object reference not set to an instance of an object.
at ArchaeologySkill.Core.PerformOrePanTenMinuteUpdate_Patch.TryToSpawnMorePanPoints(GameLocation __instance, Boolean __result, Random& r) in D:\Users\Beatrix\Source\Repos\StardewValley\ArchaeologySkill\Core\HarmonyPatches.cs:line 375
at StardewValley.GameLocation.performOrePanTenMinuteUpdate_PatchedBy<moonslime.ArchaeologySkill>(GameLocation this, Random r)
at StardewValley.GameLocation.performTenMinuteUpdate(Int32 timeOfDay)
at StardewValley.Farm.performTenMinuteUpdate(Int32 timeOfDay)
at StardewValley.Game1.<>c.<performTenMinuteClockUpdate>b__738_0()
at StardewValley.Game1.UpdateGameClock(GameTime time)
at StardewValley.Game1._update(GameTime gameTime)
at StardewValley.Game1.Update(GameTime gameTime)
at StardewModdingAPI.Framework.SCore.OnPlayerInstanceUpdating(SGame instance, GameTime gameTime, Action runUpdate)
I didnt touch my panning code at all, I just been messing with Content patcher data. WHY IS IT BREAKING SUDDENLY

I know why it's breaking, the confusing part is why it's breaking now all of a sudden
New quote added by head_in_the_cl0uds as #6754 (https://discordapp.com/channels/137344473976799233/156109690059751424/1440175378479186110)
Anyways, chue, fallback queries?
The | is unused
You know I'm kidding right
figured it out, when I started making a new output method, I copied my existing output method and changed the name. visual studio went and changed all refrences to the new class that was a copy
atra is always serious
I dont actually expect anyone to do anything I wouldn't do
(okay I think this format fits, noted for later
)
[_] 2.0: add collision map tile query/queries
look up how it's formatted for vanilla buildings again (XXX/XOX/XXX or w/e) and match that
COLLISION_MAP <mapString> [startingX startingY] [sub-condition]```
curious how discord parsed 1 tab into 6 and then 4 spaces
i looked it up n collision maps (buildings) are just split on \n
string[] array = CollisionMap.Trim().Split('\n');
for (int i = 0; i < array.Length; i++)
{
string text = array[i].Trim();
for (int j = 0; j < text.Length; j++)
{
_collisionMap[new Point(j, i)] = text[j] == 'X';
}
}
since that'd be annoying for gsq i would accept another char of ur choice
it also dun care about O hrm
only X
might just go with slashes anyway then 
"anything but X or linebreak = O" is probably fine, I tend to draw like X__X in my own notes for game maps
wew ty~ was able to set up my own item query to return a location based artifact and it returns one all the time.
and yet we continue to make mods and use computers
hm are you actually checking the current location of the machine?
Even made the item query check the player's archaeology level to increase chances of not arrowheads. Top is level 0, bottom is level 10.
here is what I am doing
hm this is mostly just RANDOM_ARTIFACT_FOR_DIG_SPOT right 
i think u could do it all in content if you want
yep xD except set to always return an arrowhead if no item is found
yea i mean if u had a fallback output item that would also work
the chance multiplier is hard to do in just content though
so it is kinda shrug up to you deal 
I'll leave it as is for now.
that said, I think I can convert the water sifter into an item query as well instead of a custom output like it is
mainly since I plan to eventually add VPP... VVP support to archaeology. I can have a perk being like the item qeury can output a random quality too if you have the right perk
the nice thing about item query is that u can use them outside of machines too
for example shop
that is good to know. I ... actually have a use case for that atm.
that just reminded me to adjust the shop data in wizardry to this
"ItemId": "ALL_ITEMS (O)",
"PerItemCondition": "ITEM_OBJECT_TYPE Target Basic ITEM_CONTEXT_TAG moonslime_spellscroll",
"AvailableStock": "{{Random: 1, 1, 1, 1, 1, 2, 2, 3, 4, 5}}",
So I no longer have to manually add spell scrolls to the random item list.
Guys, is the "Data/AudioChanges" supposed to be blank when unpacked?
Ohhh, I thought thats the issue, Im trying to add a custom weapon swing audio in the android version, but it just doesn't work. I've made custom machines, crops, weapons, and furnitures in android version and all worked properly. I guess editing audios in mobile is different
Thanks for the response
i'm trying to add custom gift responses but i feel i don't know what's the best way 
assuming there's a way to use one append to do it?
ehhhhhh that looks right
since you're targeting different things
do i need the / actually
yes
by changing the response
she's gonna say that for every hated item
just give her an accept gift dialogue
not in the gift tastes themselves
doesn't this just add a special item responce? thonk
no
ur changing her basic gift taste dialogue
o
i see
so do i add AcceptGift_(O)mylongassitemid ?
wait no
i want her to respond according to context tag, not one item
🤔 uhh is this several items?
yesm
think it's different
ah ok
i think you have to like... do... tag_something
(dont lisren to me)

the "category_fish" is the context tag
given to fish items
you could also do AcceptGift_Hated_{{ModId}}_seafood ig
would that work?
edit data ur target and add a new dialogue key?
since ur giving evelyn a new dialogue
target Characters/Dialogue/Evelyn
and that acceptgift thing is the new key
do i use entries
yeh
yeah looks about right
i see. thank you Forsy
i love ur new rock candy mod
im looking at RSV's C# code as a reference for making larger animations, and just noticed that they use __instance.Sprite.currentFrame = ...; in their entries.
does it just define which sprite that the animation starts on? should i be using it? 
oh, wait, i think i see how it is. the entries that use it aren't defined in their Animations.json, so i guess that they're just special cases. nvm!
I mean, if there's a schema, you get auto-completion and warnings without having to look at the doc, so what would your extension do?
classic coding blunder committed today: forgetting a bracket
the extension auto detects and applys the schema
hey gng need help i copied a seasonal building code but it doesnt seasonal like their mod did 💔
They're using the season token inside the FromFile field of one patch, so Content Patcher swaps which tilesheet it's using in each season. You're using four patches with no season token to try to edit the same tilesheet, but you have nothing to tell CP when to apply them so it's just applying all four one after each other all the time, resulting in you always getting the winter version since that's last.
so,,,,,, what do i add,,? bc it didnt even replace the buildings 
You mean it isn't working at all? None of your patches are applying?
yah 
Oh hi, you're the author of DDFC? such a coincidence because I actually got inspired to make RTL4SDV after seeing your mod!
Yeah I do have a working solution it's mostly harmony transpilers (honestly not sure if done in a way that makes it easier for other mods/transpilers to work with), and prefixes to shape languages (like Arabic) that has connected letters, Diacritics.
There's also partial bidi support in my version, so English and Arabic work together but unfortunately that only applies to dialogueFont render using StardewValley.BellsAndWhistles:drawString.
I'm in the process to also translate the game to Arabic but if you need more insights about how I've done things, I can happily answer your questions (preferably here https://discord.com/channels/137344473976799233/1398131594073477235) and as soon as I refactor my code and fix what's remaining to be aligned correctly I'll publish my repo to GitHub
I can give you access to the private repo too....
!log Then we'd better check what's happening. Can you load a save, type patch summary full <mod id> (replace <mod id> with your mod's unique ID from the manifest) and once it's printed out all the info, go the website linked below and upload your log and then send me the URL?
Important note: Your computer username may appear in the log. If your username is your full name, please be aware of this before uploading it.
Please share your SMAPI log file. To do so:
- Open this page: smapi.io/log.
- Follow the instructions at the top of the page to upload the log file. (Don't copy & paste from the console window!)
- After uploading, it will show a green box with a URL to share. Post that URL here.
Please do it even if you don't see any errors. This has useful info like what mods and versions you have, what the mods are doing, etc. If the issue didn’t occur in your last session, please load the game to the point where the issue occurs, then upload the log.
gonna be a bit my game takes its sweet time
I love seeing you pop in to update every once in a while! It sounds like you’re making great progress
if you need another set of eyes from someone who speaks a different rtl language, let me know
@vernal crest https://smapi.io/log/f6f871be39dd4e7db7a0bfd978f85542 
Log Info: SMAPI 4.3.2 with SDV 1.6.15 build 24356 on Microsoft Windows NT 10.0.26100.0, with 6 C# mods and 2 content packs.
your content.json is missing the opening and closing {}s around the whole thing - { before everything on the very first line and } after everything on the very last
ooh ur right heres the updated content
try this one and see if it works
yah i did but its still showing the same errors 
oh I nearly missed it, your comment slashes are the wrong way around
you need // not \\
nyani, they gotta be specific slashes?? okay ill post the results
yup, have to be forward slashes. in code everything has to be pretty much exactly as expected, there’s very little room for changing up things like that
It auto detects and loads the schema you need, this way you don't have to remember to put the schema line at the top of all of your files.
So like for furniture framework, if it detects "Furniture" as an object, it loads your schema, if it doesn't, it defaults to content patcher.
Log Info: SMAPI 4.3.2 with SDV 1.6.15 build 24356 on Microsoft Windows NT 10.0.26100.0, with 6 C# mods and 2 content packs.
if you read the full thing, it actually has different details part of the way through. in this case, you’re missing a comma at the end of every one of your “FromFile” lines
is that new?
outage
oh
it's a simple fix, don't stress 
Cloudflare has global problems today
it’s not so bad, you’ll get all these problems out of the way now and next time you’ll know to be very careful about syntax
what languages do you guys use? I feel like you have to be from a python or js background, if I had to guess
python, but on my first year we used c# and javascript
oh you may be interested to know that stardew uses c# for more complex mods that can’t be done via content packs then
are we unable to make custom bombs?
u trust too well of my memory but thank u iro /lh
not currently possible in vanilla iirc
dang it
someone may have frameworked it?
Bombs r awful special case temp animated sprites
grargh. finally get the motivation to go check out some stuff on my mod with profiler but nexusmods is down cuz of cloudflare
@hard fern forsy i formally apologize, I do think stardew melon is green and clearly me from two years ago agrees because he drew this green melon wine already
whuh. its clearly pink though?
What on earth is this first result, I was tryna find a veriaty of pink melon and them sthing was the first result XD
there's that unused melon slice sprite in the files too
huh. someone reuploaded my mod to some chinese website modding website. seems like some kinda scam website though cuz the mod has like 8x the downloads and like 20x the views on this website.
If the site is called Never, it's not a scam site tmk, it is very popular
Naver and isn't that Korean?
and google translate auto detected it as chinese so I'm assuming its chinese from that
Oh Naver ty, and I have no idea I just know it's very popular with the eastern population of stardew
oh uh, wanglia something?
I know that there is a whole Chinese modding community outside of Nexus but I can't remember what site they use
Iro is that the one that was stealing a whole bunch of people's mods? And then "asking" for permission, having already stolen them?
the wanglia??? website has reuploaded mods before so we know that's a thing
dont think its that either
doing some brief googling on the website it seems to suggest its a scam website
ah, looks like it's a chinese game piracy group maybe
seems like it
Wow I had no idea melons were so dangerous!
XD
also oh my god
okay so its still shite, someone tell me what im doing wrong bc its apparently supposed to work but its not
i even tried to separate the assets into {{season}} folders but alas 
this is the mod i was trying to patch
https://www.nexusmods.com/stardewvalley/mods/33220
When you say "into {{Season}} folders", you mean like assets/spring/z_ghost_farm_picture.png, assets/summer/z_ghost_farm_picture.png etc, right?
You appear to have changed your Targets so they are now incorrect. There should never be an Assets/ inside a Target. It should just be "Target": "Maps/z_ghost_farm_picture_spring",. Although, have you checked that the original mod did actually Load to those Targets?
first part yes
i see 
which original mod? the one i linked?
hey! can NPCs walking speed for schedules be changed?
I don't think so, but you can add NPC only warps as like a "shortcut" for them so they get to where you want quicker
Sadly, no. If you want them to get somewhere faster, start them closer with a zero schedule.
(I wouldn't really recommend adding NPC warps to vanilla maps until we (hopefully) get NPC-specific ones in 1.7)
NPC-specific warps you say 👀
It's been brought up, though I don't think it's a solid yes yet 👀
The one you're trying to patch, yes
But currently NPC warps can be used by any NPC, so it'll be real easy to mess up pathing, either with loops or with unintended NPCs wandering into your warps
Yeah currently adding NPC only warps as shortcuts is a guaranteed way to cause havoc for all the NPCs in somebody's game lol
so like i shouldnt put an npcwarp in a character's house to make them appear places out of view from the player
(a custom npc's house)
its a uhhh, idk,,,,, its content.json didnt even have a Load and Target
ouh if only i have a bit of disposable cash to have someone make it for me
How do you know what Targets to use then? You can't just go off the names of the files in the folders because they don't always match
you can use npc warps on your own maps, but it is best to be judicious so that other NPCs don't try to use them
Did the content.json have any patches with "Action": "Include" in them?
like tia recommended, it is much less likely to cause havoc if you use zero schedules to start your NPC's day somewhere distant, and let them walk home
Just don't make them connect to other maps that other NPCs might be using. Like if you have an NPC house in town with a warp to beach inside it you might get other NPCs walking through the house to warp to the beach
well i hopefully won't do that
I'm going to add NPC warps everywhere that randomise every day just for fun
im a dingus i was using specific filters on the notepad search, what am i supposed to look for @vernal crest thanks for being so patient 
This is probably a stupid question, but if a mod is encoded into a dll, there's basically no way to "open it up", right?
nah, you can decompile it with ILSpy just like the game
I'm gonna obfuscate my dolls just to spite you
Nice, thanks 🙂
What if instead of having my framework's api try to share a complicated interface composed of foreign types, I just exposed a dictionary of objects with string keys that the API user would just cast back to a shared type? Are dictionaries handled well at all? then i could possibly supply a class that fetches the known keys so the api user has some validation
Seems so simple compared to all the trouble i went through that I'm upset i hadn't thought of it before... Unless I did and it just doesnt work
hello! can someone help me, how to start making a mod? first steps, what i must have.. etc. i want to try this as a game developer, but the c# code lang and with this smapi resource its a bit messy as a new developer in stardew valley world
i followed some guides, and the wiki too (https://stardewvalleywiki.com/Modding:Modder_Guide/Get_Started) but i always get an error
what are you trying to do, can we see your code, and what error are you getting?
for now, nothing that i made that could be unique, for now i just want to make a null mod that is loaded by the game without error message
I'm not worried about how unique it is right now, just trying to help you get it working
!log can you share your log please?
Important note: Your computer username may appear in the log. If your username is your full name, please be aware of this before uploading it.
Please share your SMAPI log file. To do so:
- Open this page: smapi.io/log.
- Follow the instructions at the top of the page to upload the log file. (Don't copy & paste from the console window!)
- After uploading, it will show a green box with a URL to share. Post that URL here.
Please do it even if you don't see any errors. This has useful info like what mods and versions you have, what the mods are doing, etc. If the issue didn’t occur in your last session, please load the game to the point where the issue occurs, then upload the log.
Log Info: SMAPI 4.3.2 with SDV 1.6.15 build 24356 on Microsoft Windows NT 10.0.26200.0, with 7 C# mods and 7 content packs.
Suggested fixes: One or more mods are out of date, consider updating them
there's no actual compiled dll in your mod folder?
well, no.
guide writed down i have to make 2 file, and then build the projekt, but i got no dll
what happened when you built the project then?
visual studio cmd said it builded successfuly and showed a location to inside the debug folder
can i send pictures in this channel?
no, is it a visual studio package?
it's a nuget package. it's one of the steps in the page you linked.
oh, then i skipped it
please try not to skip steps, they're there for a reason. that package is what allows mods to compile correctly.
I got it, thanks for pointing it out
it works and is built well now! i didn't know a small flaw in the structure would matter so much
the package does a lot of the automation for you, without it you'd need to know what you're doing and do it manually
Dunno exactly what the usecase is but maybe you can add JsonConverters
flashback to AI trying to make manual binary references to the SDV exe
For example I added something that takes 1, "1,2,3" etc on cp side and turns em into List<int> internally
id like to believe it didn't work even in the slightest XD
lmao not sure if we're thinking about the same thing but... taking some time away from SDV and doing some Unity coding had me thinking a lot in terms of serialization when I got back to SDV
Yeah ig im not really sure what's meant by API and foreign types in ur original ask
internal framework class structure -> serialize to json -> expose api -> deserialize back into foreign mod structure
My thought was data model in context of expose a target for content edits
As for C# side API this is the kinda thing pintail is for
i don't know how close this is to what you want, but how about this https://github.com/ichortower/SecretNoteFramework/blob/prod/src/API.cs#L20
i just added an endpoint that returns my internal implementation of the interface the client would need to implement
As long as i have a compatible copy of your interface you can use custom types and pintail does the 
pintail was the name I was looking for 
I was having a hard time back then making pintail work because of some older bug that may or may not be fixed now
it didn't work at all
biggest problem was putting the glue on getter/setters and other underlying "invisible" methods (for lack of better word) that structures like lists also have
so my current API supports the same foreign type I have exposed for CP edits, but lists would break when I tried adding them to the api interface so those are out
Hm if it's content edits then that never goes through pintail does it?
but new idea is instead of relying on pintail, I just "serialize" everything in a dictionary<string, Object> and "deserialize" it by casting back the fields you know of
plus i can just edit ur things with dynamic on my end i think
iirc content edits through content loader wasn't supported with custom foreign types, maybe that changed?
dynamic was working with some success but I think it leads to the same issue with the dictionary approach, being that you throw some validation out the window
Well yeah that is kind of the point right it is a "trust me bro" keyword 

I don't have a working example but in the past what ive done is
I guess the piece of glue I wish I had thought of sooner is that I can add some (or all) of that validation back into the api you'd copy from my docs
- Have a shared library built into 2 different mods
- Make sure to load them using their own helper.GameContent instead of Game1.content
that works with foreign types?
After doing this, I am actually able to load the asset at the target created by mod B using mod A's GameContent
It's just weird cus I end up with another copy of the same data so ultimately i never did anything
Perhaps what you can do for C# mods is to ask for their GameContent to keep their stuff out of Game1.content 
Also ultimately the data loaded by mod A is using mod A dll's class
Even if it technically came from B
I feel like i did need to do dynamic or something in the Load impl, but i honestly don't remember
ah, yea, you probably did
Effing that
I'm not in a ducking duck type language I'm not ducking gonna program like that
Something pathos did in central station is
Make cp load a blank json to the asset that would contain custom types
hides the gettattr mess I'm writing under the table
Apparently that works approximately like dynamic
It's because each copy of helper.GameContent is individual
That said I'm very loath to give up good typing
And while I dont matter I also hate it so
I personally think content patcher is ubiquitous enough that it's usually fine with me if u don't provide a non content patcher means of putting data in ur mod
In a case where you actually expect a decent amount of C# integration consider letting ppl register delegates with you instead
Much like how u can register new map tile actions on vanilla
in the case of Farmer Portraits, I do expose delegates to the different draw calls, but their mod also needs to know the display data so they can render properly
honestly... 
but oh boy does Farmer Portraits have a lot under the hood that you wouldn't think of
Just gotta like
- Open ur own way of defining space and texture for farmer portraits
- If farmer portraits not installed load their data at their target and transform to whatever u prefer
So u can just tell ppl "hey my mod has farmer portrait support just go change manifest a lil"
tbh you can already have your own pseudo Farmer Portraits using DDFC alone
it lets you add custom textures so... just build it yourself lol
Yeah so it's more of the become compat with existing packs bit
it's also funny considering both mods are adopted from aedenthorn
There r many strange divides in aeden mods that always confused me
fairly sure FF is way older than DDF so it makes somewhat sense to start it as its own separate mod
FF also used to be more popular than DDF but um... I'm shocked to learn that's no longer true
another advantage of storing data this way is that other mods could expose their own fields directly through DDFC
like if Farmer Portraits wants to expose the variables it uses for rendering, DDFC pack authors could edit those variables in the same patches
the potential compatibilities are endless

I am drawing a blank, is there a way to negate in a when statement? Like when this flag is not active?
depends on the statement, some you can put on the lefthand operator and have false on the righthand
some you can do using queries, etc
If it's a condition (like a gsq) you can just put ! In front of it i think
so how would this one be "When": { "DLX.Bundles/Purchased": "{{ModId}}_HatShop.RestoreExterior" }
I may just have the patch not have a when, and then do another patch when the bundle is complete to blank out what I need
use |contains and check for false
"When": {
"DLX.Bundles/Purchased |contains={{ModId}}_HatShop.RestoreExterior": false
}```
Cool, I bet that will work. Thank you
uhm.. guys?
can someone please tell me, where can i find the sve route to pierre shop? SeedShop or how does it named?
SeedShop is the name of the location, yes, and afaik SVE does not move it at all. go in the door marked "Pierre's" in town
hellooo do you guys know of any other in-universe human languages? or is it just like the irl ones like english, french, spanish, etc.
i'm not sure vanilla ever mentions language at all, except dwarvish and junimo script
english could just be a language of convention and they're all speaking ferngillian or something
yeah, maybe i could reference speaking gotorian or something them?
Standard tongue
as opposed to non-standard tongues ig
i want a character to refernce another human language in an event
you might be able to get around it by just being slightly vague
I think theres references to people from gotoro speaking the same language as ferngil, would describing it as a dialect be a better idea if you go for the idea
"oh, see, in my native language we would say something like..."
hmmm not really, lemme send the dialog line
the context is dwarf is visiting krobus,they're near the sewers, and they hear human voices and they think that some humans found krobus and are attacking them, they jump in, bombs at the ready, and sees krobus playing with jas and vincent
Jas overhead speech bubble 'What language are they speaking?'
Vincent overhead speech bubble: 'Maybe Gotoroian?'
OR maybe:
Jas overhead speech bubble: 'What language are they speaking?'
Vincent overhead speech bubble: 'Maybe Gotoroian?'
Jas overhead speech bubble: 'That's a dialect.'
Vincent overhead speech bubble: 'You're a dialect!!'
i wanted to make a bigger fish tank and something weird has happened?
so when placing it looks liek this
but when i place it
So if u look at the first 2 tile wide tank
There's a second sprite with the water right after it
That's what draws over fishies
The second sprite is the one used for the front draw layer, yes?
Show us what ur png looks like? It is progress tho
It looks like a very cool bar and aquarium combo, i'd love to sit at it watching fish while I have something to eat
Hm that does look right at a glance
I guess you can try
- Patch export this png
- Reload game entirely and spawn new tank after
What's your furniture data entry look like?
I'm guessing your sprite index might be slightly off, but unsure
how do i patch export the png
patch export <your loaded texture asset>
patch export "Mods/yourModIDspelledout/Furniture"
just replace the {{ModID}} token with your mod's unique ID
Got your JSON for the furniture data entry anywhere?
Why is your sprite index 70? It looks like it should be 60
your furniture sprite index needs to start at the image with the sand in it.
I struggle with counting sometimes
Right now it's starting on the front layer
Me too, it's why I just counted five times to make sure I was right xD
is there a way to make multiple i18n files for the same language? i have too many entries to easily keep track of-
yes, make a folder and put multiple files in them
so instead of i18n/default.json you have i18n/default/whatever.json and i18n/default/whatever-2.json
they live!!!
oooh that's awesome! thank you so much ichor 
would i have to load them any differently?
or like, they just exist as per ususal
nah it's automatic. just make sure you don't recycle keys between them
and i vaguely recall some kind of weirdness that i expect button is about to explain
also, you must be consistent across every language
that's about it
no mixing and matching folders vs single files
gotcha! with the file names right?
the file names don't actually matter in the folder version I think
Just as long as every language does use folders
The FOLDER name does matter of course
good to know, thanks button!!
Heyy question, how can you make it so a letter gets sent (next day) once a drop box quest is completed?
you can have a mail flag as reward, and a trigger action to send another mail on day start conditioned on having that mail flag
the reason I suggest two flags is because I think the reward flag gets sent immediately
also side note but you most likely don't need Update OnLocationChange
Okii, now is there any documentation or any page that contains mail conditions and triggering? Also not entirely thr best with flags but I dont mind if the mail is sent nrxt day if its easier
i am trying to repalce a texture on Maps/springobjects, but the console tells me it doesnt exist, why?
have you read either [[Modding:Special_orders]] and [[Modding:Trigger_actions]]
woops that doesnt work
Noo not yet id love to know where to check thooo
!json code pls
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.
"Action": "EditImage",
"Priority": "Late",
"Target": "Maps/springobjects",
"FromFile": "assets/{{Iridium Sprinkler Skin}}_tools.png",
"FromArea": { "X": 96, "Y": 208, "Width": 16, "Height": 16 },
"ToArea": { "X": 336, "Y": 416, "Width": 16, "Height": 16 },
"PatchMode": "replace",
"When": { "Iridium Sprinkler Skin|contains=none": false, "Set Override" : false }
},
code and target looks correct at a glance
what's the error in the console?
[Content Patcher] Can't apply image patch "Tool Variants > EditImage Maps/springobjects #1" to Maps/springobjects: the FromFile file 'assets\none_tools.png' doesn't exist.


