#making-mods-general
1 messages ยท Page 550 of 1
If it becomes a problem surely they will say smth
I wouldn't be confident making sweeping assumptions about 821,000 mods
They would I'm sure! And I wouldn't wanna then have to figure out what to do with all my mod pages that were relying on that load bearing unpublished mod
Oh so if a mod has a conditional field/data in the asset, the entire asset will be reloaded. Like right now we have AccessibleTileData which takes in "map" entries and the tile descriptions. so every mod would add their tiles to this asset. And when one of them updates, everything reloads, that could cause performance issues i think.
Maybe we should have two assets? One that is supposed to be static and does not change under any circumstance so I don't invalidate its cache, and the other is dynamic so invalidation is done like normal.
SMAPI has an AssetsInvalidated event for you to watch, as shown on that page.
I didn't see anything else other than the name of the asset invalidated in the event args, can we atleast know which mod's data (for an asset) is invalidated?
I mean I was team low-effort mod pages
Any mod can invalidate any asset at any time. I would advise against relying on one being entirely static.
You cannot see which entry specifically changed.
Like, huh, you get two screenshots, badly cropped
You can only see that an asset was invalidated, and the next time you (or anyone else) does a Game1.content.Load for it, it will be with a fresh set of data
Oh, you want to know what the mod does? Please refer to the markdown documentation
Do you cache this for the entire world or just the map the player is on
Reloading assets can be a performance concern, and this is why most people try to avoid OnTimeChange assets. But for just your own asset, don't worry about it.
You can hide a lot of sins in that map warp time
You can have multiple assets if you want it's not necessarily a bad idea in the case where you are aware of the possible keys
It gets bad if people change LooseSprites/Cursors or a bunch of portraits every 10 in game minutes. Changing your custom dictionary at towk/MyAsset is practically nothing.
The game does a lot more than that every single tick.
You just can't really do something like "list all assets that match memod/meassets/* (crimes to the content manager aside)
ATM I cache for the entire world, we the player visits a map, it fetches the tile data of that map from that cache and more internal data sources.
If you expect some kind of conditional need for your asset, it's better to provide Conditions
Rather than force people to use cp tokens/when
Yeah, but exposing map accessibility is kinda crucial, the current method of using the TileDesc property is not very intuitive for the creators.
I'm saying you should not care that your asset is being reloaded every time CP updates it.
It's a negligible amount of work being done.
oh i see, and that is what I mean by static earlier ๐
I'm also saying do not assume it is static.
You should have your asset and you should cache its data, and you should purge that cache whenever your asset is Invalidated
You should handle invalidation
I feel like using tile property isn't that bad, it's just a massive pain to apply to every tilesheet
Because tsx isn't a thing u can load and share across multiple mods rn
And I just had an Idea of maybe having dynamic Asset name?
So maybe like this shoaib.stardewaccess/AccessibleTilesData/<map name>
So this way at least we can limit the updattions to individual maps.
No you should use the tilesheet asset imo
I'm not sure. I'm trying to do the following:
- Allow tappers to be placed on giant crops
- Have tappers on giant crops produce a new artisan good, "Flavored Syrup," with the following properties:
-- Price = 5 + floor(base/3)
-- Has gold quality when produced while the giant crop is in season
-- Affected by the tapper profession/whatever profession boosts the price of tapped items
-- Has a production time equal to ceiling(initial crop growth time/2)
I was originally going to do a content pack using the CustomTapperFramework, but I'm not sure if its possible to do this without the use of C#.
If it is possible to do this via content patcher, I'd much prefer that.
Thanks!
Let's say i make map using Maps/hime_outdoorfurniture from hxw tilesheets
If the tilesheet mod has stardew access integration and described everything on the sheet, then I don't do anything more
It's easier for just adding a name to the tile but then we have to add i18n, the tile's category, and more fields that stardew access eventually adds like the "state" field.
If i also make a custom tilesheet just for my mod i also do the stardew access integration for Maps/chu_special_sheet
Now rather than getting info per map you can inspect the map's tilesheet assets n construct the full picture that way
Whether u do 1 big asset or several smaller asset doesn't make a huge difference
hmm. i don't think this work well for dynamic tiles right? But then we can use CP to edit tilesheets as well.
Do note that someone has to Load the asset in order to EditImage
Sure, so that is case where both assets get invalidated
Or you still provide a map level override for specific things
Starting with tilesheet reduces everything having to go "these tiles on hime_outdoorfurniture is a picnic table" separately
The game's innate system of changing maps generally alter the tiles as in switch them to another tile id, so if ur descriptions are mapped to tile id, and a tile changed due to nighttiles, you would know
all of that should be doable with MTF and content patcher except the quality thing
Across my various framework mods, there's only been one case where i did subassets and the possible ids are completely known at launch (it's all the mod ids that depend on me)
In all other cases, I just did a Dictionary<string, WhateverCustomModel> because it's less spaget to glue together
I don't think the perf is that much of a concern with data models 
the quality thing might be tricky because giant crops aren't seasonal, and I'm not sure if they retain references to the seed they grew from
(They null out the Crop instance when they grow into one)
I think I got it figured out, but lunch is ending and I have to get back to real work, so I'll try more later.
Thanks. I think I understand what you mean. And I guess this is the best solution for static tiles at least (tiles with no interaction based changes). And we can also use CP to add tilesheets. So the existing "TileDesc" property solution remains, but should segregate into multiple properties? Like "TileCategory".
I'm just not sure how I'll tackle dynamic tiles. For example the feeding benches, they're empty by default and when the player adds Hay, its state changes.
Hay is an object
Sorry but, What do you mean by map level overrides?
Well in addition to the asset for all those static tiles, if im doing something weird with this standard sheet it'd be good if i can be specific
For example maybe I use a book tile and it's actually supposed to be a registry for the player to interact with
Does your cache currently react to events like "a furniture is removed and placed"?
Yes, but in order to correctly and concisely describe the tile we have it say like, Empty Feeding bench when hay is not present.
You are looking at a combination of states then
A tile and a object placed in world
Having a separate asset for object place in world makes sense to me, since stuff like stone and weed r also just objects
I dunno if it's that important that the underlying tile is bench to your users 
There can be case where hay object isn't on the map trough via mods
No but we do track objects/furnitures and other stuff detectable normally by C#, so we don't need to worry about them. It's the visual stuff that isn't an object or anything that the asset or tile desc property is for.
Yeah so i think hay is bad example for this
Let's say I got this tile on tilesheet, it is normally invisible and then I do CP EditImage to make it a trapdoor based on a mailflag (is just example not real mod)
This mailflag is a content patcher When HasFlag
Now when I go add stardew access integration, I also just do a conditional edit on the tile desc asset you have
On flag change, content patcher would invalidate the tilesheet and the stardew access asset
So after they both get reloaded they'd match up
This is case where I actually change the tilesheet asset though, so reloading is the only choice 
If i instead had 2 tiles one invisible one trapdoor
I describe both of them in my stardew access edit
And then i do an EditMap to change the tile over to trap door
The tile id would have changed and there's no stardew access asset invalidation
That's great to know! And I'm fine ditching the quality thing.
Depending on what happens with some family matters, I'll probably try working on the tapper mod later this weekend!
so you add the a11y to the tile itself and not the tile's position (which is basically what we're doing right now)? Yeah that should make it dynamic.
Makes sense.
Thanks I'll sleep on this and get back to ya. If this works than we won't need the custom data asset. I'm just going back and forth to data asset and tile property solution lol.
Oh no i recommend the custom asset lol
You know how vanilla tilesheets have properties like Water T on the tilesheet
Rather than as objects
oh, I really need sleep lol.
This works well within 1 map and any instance that uses that tile is Water T
But there's no way to share this tilesheet metadata, aka tileset, across different maps using the same tilesheet asset
They all gotta individually go declare Water T
Your custom asset can bridge the gap by letting people say "tile 194 on Maps/spring_a_sheet is Water" regardless of which map this tilesheet asset appears in
(replace Water with other kind of a11y desc as desired)
I see I see.
So I guess I should complete the custom asset integration and all, and public the beta so we can have a real benchmark of things and then decide how to tackle dynamic tiles. Dynamic tiles are maybe like 10% of the total tiles btw so we really shouldn't over-engineer lol.
got something cute coming up for ub :3
-# pau art pau art yummy pau art 
you can tell @.@?
hi! i'm new to making mods, so sorry if this is a dumb question. how can i change the sprite of npcs in the game?
There's a few ways
- You can EditImage the sprite
- You can add a new Appearance entry with EditData (+ loading your sprite)
she's my friend 
How do we add a mod to the mod showcase? I just published my second mod!
It's a small QoL mod that forces the traveling merchant to always sell furniture catalogues ๐
Thanks!
wow, are you using any framework to create these UIs?
What does that mean? I just wanted to create a mod that I was shocked didn't exist yet ๐
The mod author thing is just a discord role
Getting it gives u access to #mod-showcase among other things
It's 100% optional
The UI art itself was commissioned to and designed by Pau.
It's an upcoming theme available for anyone to use in the Unlockable Bundles framework.
For the creation of the UI no frameworks were used by UB.
If you're looking for a UI framework for stardew, try Stardew UI.
If I'm too lazy to do actual UI then i normally just find something to repurpose
For example multiple choice is just the question dialogue thing
A timed event can be represented by a buff icon
and shop menus can be used for anything that can benefit from a list with icons
dialoguebox can be a lot of things too
what's the difference between smapi c# and content patcher for making mods?
C# is the programming language that sdv runs on, so a C# mod can directly change pretty much everything
Content patcher is a C# mod that let people edit content with json files, it's very powerful but it can't just change anything
what are some example of what can't be changed with just content patcher?
new gameplay mechanics, like a new tool that has unique behavior beyond what the existing tools can do
does the wedding event not have an id or what does it count as? Went through vanilla event id's and didn't see one for the wedding scene
okay thanks, was confused when trying to add it as a condition for when an NPC wears an outfit to it. Non-romancable wearing just a nicer outfit to the ceremony
Does anyone have a good up-to-date guide on how to add locations to the map with Tiled? I'm attempting to add a tree you can interact with that teleports you to another location/house but am struggling on getting it to show up.
Last edited by AtlasVBot on 2025-09-13 18:57:52
Tiled is understandably one of the most unintuitive/intimidating programs to use when making maps or patches for your mod. This tutorial aims to break it down into very simple steps with pictures! This tutorial will use the example of making an NPC house to teach you how to make a map patch (for ad...
Thank you!
If I want to change dialogue or portrait for a specific NPC based on a marriage condition (only change their dialogue or appearance when the player is married to a certain NPC) using CP, how would this work in multiplayer? Does the host control these changes for everyone, or can they happen locally per player? For example, if a non-host player marries the target NPC, can another NPCโs dialogue be changed only for that player?
Everything Content Patcher does is done locally. However you can have Content Patcher check specifically the host to see who their spouse is, or also check if "any" player has a specific spouse
how do recolor mods work? Do they apply the new coloring on every sprite of the game and patch them?
Yes, they use edited versions of every relevant image asset and use an EditImage patch to apply them
(EditImage in Content Patcher. I don't know of any recolours using C#)
Nightshade is an exception, it uses shader stuff to change colours.
Whether you count that as a recolour or not though is up to you.
So itโs not that the host shares the world and is the only one who can make changes, but rather that each player has their own local version of the game state and can trigger changes on their client?
The host doesn't share assets
World and game state is a separate concept
Applying edits with Content Patcher is like applying edits directly to the files inside your game's Content folder in the install directory
Host cannot do that for you, nor can other farmhands
But Content Patcher can check the host and other farmhands for things, and use that to determine that it should change your files for you
Gotcha. Tysm!
By default, checks will look at the "current" player. Which for the most part, just means "you, whoever is in charge of this game window"
(Which isn't always the same person in split screen where every player gets their own effective game window)
i want to know how feasible this is for a custom npc,, if you dont mind
basically hes a farmer with an underground farm, but instead of it being in a cave, its underwater
i was inspired by the harvest goddess in harvest moon games lol
im thinking you have to throw a certain amount of crops into the lake to trigger a cutscene and then you can enter it but... that sounds very difficult to do
i know nothing abt making mods for this game so idk what is and isnt possible
making an NPC: very doable
underwater map: very doable in terms of visuals, difficult if you want things like the player swimming
counting number of crops thrown into the lake: difficult/impossible without a framework
conditionally making the underwater map able to be entered: very easy
for the crops thrown into the lake, you could check out unlockable bundles
oh yeah, bundles, thats a good idea
thank you for the breakdown! very helpful 
we have tutorials for things like making maps and NPCs so if you want those just ask
id appreciate a map making tutorial, i think i have some npcs ones bookmarked but maps are beyond me
start by downloading Tiled and visiting [[Modding:Maps]] to understand the basics
tysm! 
Making maps is easy. It's the getting them to do things that's the tricky bit.
fair enough
im not looking forward to the learning curve lol, have never made a mod before but im really only interested/have ideas for npc mods
it's a lot of little moving parts that can be finicky but if you have perseverance it's doable!
ill keep that in mind ^^ tyty
It's not too too hard when you figure out what you're doing. Just, don't ask ChatGPT or any of those for pointers. Their coding is really weird...
oh yeah no, definitely not lol
I don't think u can throw things normally
Maybe if u just make a special order "put 100 parsnip in dropbox"
well dragging and dropping things out of your inventory is throwing
And then do a lil event
Where the player throws temporaryanimatedsprites into the water
This is similar kinda logic as willybug.gif
BETAS dropped item in water then
i was gonna ask if BETAS had that sdhksdfh but it seemed almost impossible to imagine
in that case @lethal wadi if you want to add BETAS as a dependency, it has a ton of awesome features and if button adds this item-fell-in-water trigger you could unlock your map that way
either way sounds fine, tbh, either that or bundles
"HasVisitedLocation |contains=Club": false,
this would be the correct way to write this right? for the when condition for visiting a location?
I havent done this in a couple months so it's a bit foggy
that would test whether they haven't visited the location
yeah so if an edit data entry had that as a condition if they havent visited the casino it would load right
correct, but also keep in mind the patch also wont run until the save is loaded to know that
during main menu the token isn't ready so it also wont run
im specifically doing it so i can make an alternate schedule for him so i dont have to deal with the weird issues that occur when he doesnt exist
what would you want in a marriagable npc that makes going out of your way (essentially) to romance them worth it?
one way im thinking is regular gifts
Good writing tbh
as someone who did something similar with Mr.Qi people seem pretty happy with writing and gifts during marriage. like good events to make it so that they're worth pursuing and also pretty sappy stuff like them making you breakfast or whatever
i like that we said the same thing essentially lmao
makes sense
thats crazy i was literally JUST ogling the mr qi mod....
but yeah, just.... nice writing tbh, i want a character i can fall in love with and interact with
ill do my best lol
im not super confident in my writing but ill persevere
I have silly organization decision to make 
Atm my mod (C#) uses custom assets for potential extensibility, but all the built-in data is inside the C# too
I wonder if I should do stuff as a cp add on instead to have better examples of everything 
Atm i kinda figured well u just patch export to see the data model
what mod is this
Chu Spoilers Mod that will ship tmr and no longer be spoilers
oh is it modfest mod
Ye
i didnt realize that was gonna have extensibility
i mean do you even have documentation
replace lenin with regressions
Yeah
There r some things that can't be cp anyway (yearning of foreach)
nonsense
mushymato/MyAsset/ForEachDefinitions
construct the foreach from data
it's vital to me that you let me name my iterator variable in my CP patch
the best documentation is also releasing a simple content pack ๐โโ๏ธ
that is definitely not the best documentation
see: all of nics woes with spacecore dungeons
based on the number of people who say 'yes there's documentation but does anyone have a mod i can copy' it's up for debate
thats because they dont want documentation in the first place they want a template
they want the ad libs of modding
mod libs
I think the content part of this mod is more like bluebs making another custom item type definition than actual general use framework
no quote? tough crowd
@calm nebula please quote
New quote added by atravita as #7612 (https://discordapp.com/channels/137344473976799233/156109690059751424/1479264426464116899)
thank you
Lol
you did your part its ok
no quote? tough bot
maru engineering
i will say, you and chu have the best documentation iโve worked with so far
yes please tell me every single detail about what you offer, the type of data it is/takes, what it can and canโt be used with, etc
honestly thats better praise to me than someone saying they like my content mods
docs are hard
if im trying to get rid of the right-side door for premium barn, unpatch is the right direction, right?
What's the right side door
I'm not sure what you mean by unpatch either
There is a specific harmony patch in SVE that makes the right side door work
Sorry, I am zero-context queen. I'm awful at asking for help. SVE patches in a second door to its barn. Its ~ line 620 https://github.com/FlashShifter/StardewValleyExpanded/blob/master/Stardew Valley Expanded/StardewValleyExpanded/ModEntry.cs
was reading through harmony basics, trying to understand what i'd need to do ... kill that door.
You can patch and skip prefix the patch
Yeah the method named Postfix
You can also unpatch it
Some stuff like formatting is easier with context. I like both, an example pack rarely can have all covered
I dunno which one is better tbh, maybe just depends on how permanently not there u need
Documenting stuff is hard and tedious so thanks for people doing it
So one method wouldn't be preferred over the other, then? Spose I could try both, see what works.
Well like chu said it depends on how permanent you need it
Once you unpatch it, it's a lot more of a pain for you to repatch it if you want the functionality there again later
If u actually want the side door to be conditional somehow a skip prefix would work better cus u just return true or false
Nah. Its gone gone. I don't need it back.
Then sure unpatch go brr
Side note i think sve did a terrible thing by doing a harmony patch for a problem solvable via tile action
Was it solveable via tile action years ago?
Premium barn is new
Premium barn is new to 1.6 as is
Thank you all for the assistance. โค๏ธ
1.15 was started before 1.6 came out though, no?
I think it came out shortly before 1.6.9
And I believe the building stuff would have been in the alphas
But y'know i am ultimately not even bothered enough to go send in a PR for this 
It just would have made jenna's desire trivial
oh to have trivial desires
truely the dream
Tbf this is also pretty trivial as far as C# goes
New quote added by atravita as #7613 (https://discordapp.com/channels/137344473976799233/156109690059751424/1479270213865177294)
Hi all! I tried looking for a similar problem in the chats but couldn't spot one, so I thought I'd ask. My friend and I are building a mod that adds two npcs to the game, and it's like 75% done right now so we're making good progress. However, trying to make the npcs work with other expansions and npc mods has been challenging, particularly with Ridgeside Village because whenever SpaceCore is installed, the pathing seems to break. Instead of walking out of their attic apartment like regular people, our npcs walk through walls and into the void. We're beginner modders with practically no coding experience to speak of, and I haven't figured out what SpaceCore actually does yet. Is there something specific I should be doing to the maps or the npc schedules to make them work with SpaceCore?
Please explain it to me like I'm 5 if possible haha, on top of not being very proficient at mod making just yet, English is also not my first language
hmm
that's a new one on me. SpaceCore usually improves pathing, to my knowledge. Hopefully someone knows more about its quirks than me
so something spacecore does is improve the macro pathfinder
this is like "i need to get from mountain to beach how do i walk there?" kind of pathfinding
if you find that the pathing has changed as a result of spacecore being installed, i would check if you have unintended warps on your map
this mod has a layer that shows warps (in blue)
Oh, that's a good point... We used Elliott's house as the base for our map, and the npc is trying to get to the beach, so I guess they might be trying to find a shortcut... Didn't even consider there might be leftover warps
Thanks, I'll check that out and see if I can fix the issue
Secret invisible hidden writer hatch
What if Elliott's house is not that small... that's just the only parts the farmer is able to perceive
That did it!! There was indeed a stray warp out to the beach that was within the void of the current map!! Thank you so much for the assist!
If I am understanding everything correctly, DROP_IN_ID should refer to the crop the tapper is placed on. Given this ID, how would one retrieve the crop's cost and time to grow?
Sorry for the constant pings, I've been a bit all over the place lately ๐
for cost you can use CopyPrice and it should duplicate the base price into the output item; you can them modify it further with PriceModifiers
for days... hard coding every case is an option (ie if input item is Parsnip growth is 4 days, if input item is Kale growth is 6 days), but this is where the custom output method would be useful
so you can do the look up against game data yourself in C#
gotcha
anybody know how i might implement a wild rabbit running out of a bush into an event? i've been looking for the sprite for it for like twenty minutes now in the unpacked files, but didn't see it in LooseSprites, where i figured it might be located. i'm assuming this would be a temporary animated sprite type deal?
OMG I'M AN IDIOT. I just realized I was looking at the wrong thing for the output method ๐ .
Okay, I think I'm like 60 to 80% certain I know how to do at least a decent chunk of the OutputMethod now.
TileSheets/Critters
@torpid sparrow https://smapi.io/log/1d1f93cfe64d44308094bbba84ac629c
Log Info: SMAPI 4.5.1 with SDV 1.6.15 build 24356 on Windows 11 (10.0.26200.0), with 204 C# mods and 465 content packs.
ahh tysm
bless up !! thank you
now that it is located, what is the best way to implement the rabbit running into the event script code?
i forgot a curly bracket when copying from i18n
Mmpa a rabbit
you're gonna want acceleration 0 but movement probably at least 2 (or -2)
ahhh okie, this is a scary section
other than the wiki, anyone got any good links for a tut on how a TAS is formatted? like an example or something similar?
my advice is go slow, make sure you're keeping track of each index, and don't be afraid to get it wrong and change things
it's really very simple, just irritating keeping track of all the unnamed number fields
i might be able to find some old code of mine from when i made a bird flying away but i ended up changing the event so idk
eeeek haha. i'll see what i can do
yeah my bird TAS did not survive i didn't commit it
sad!! thanks for looking though </3
so for example if you wanted a vegetable running across the screen you might use temporaryAnimatedSprite Maps\\springObjects 64 0 16 16 600 12 999 27 35 false false 35 0 1 0 0 0 motion -2 0
which would use the 16x16 sprite at pixel coordinates 64,0 in the Maps/springObjects spritesheet, playing a looping animation of the following 12 frames at 600ms per frame, repeating 999 times (basically endless), created at tile 27 35, and moving 2 pixels left each frame
very simple, very easily tweaked until you get what you need
ohhh i thought it was tiles/second not pixels/frame
not far off, but also not as intuitive
a TAS isn't even scaled to game time unless specified (in c# or in 1.6.16 alpha events) so motion is variable based on your framerate
wack
wisdom
how do you know where the pixel coordinates are within the spritesheet?
sometimes the only difference between wack and wisdom is one InvalidCastException: Specified cast is not valid. Event.TemporaryAnimatedSprite() Unable to cast float to int. (Line 53)
New quote added by handwrittenhello as #7615 (https://discordapp.com/channels/137344473976799233/156109690059751424/1479294525066317924)
most image editors will tell you pixel coordinates when you make a selection or sometimes when you're just moving your mouse around
Line 53? You lie
you can also do simple calculations on some spritesheets based on position if you know there's a standard sprite size in the sheet, i.e. Maps/springObjects has 16x16 sprites so the coordinates are always going to be the x,y number of the sprite you want multiplied by 16
It's gonna be line 4927572276473
others like the Critters spritesheet for rabbits might not be standard
(I will note that Krita does not have that feature, but you can get around it by selecting the area up to that point and reading the size of the bounding box/selection)
I reverse patched it into my ModEntry and added a #line directive ๐
even windows Paint will tell you pixel coordinates under cursor
aseprite seems to show the coords thankfully
Unless something's changed recently, Krita doesn't show pixel coordinates under cursor because it impacted performance too much.
It's not that hard to work around
in any case be sure to round your pixel coordinates to some reasonable multiple like 8
occasionally you might overlap into another sprite if you choose some good-enough approximation
god you know what kills me? the fact that pathfinding can vary by pixels so if an NPC approaches a schedule point from two different directions they'll be positioned totally different depending, especially if you want to offset them like to sit on a couch
i agree that is cursed
@ pathos 1.6.16 pls thx
Sanity check: After an Item.addToStack() call, there's no reason that the before/after difference in stack size for the incoming item should ever be different from the before/after difference in stack size for the stacked-on item... right?
uh
i would think not, but this seems like the sort of question one asks when observation contradicts one's assumptions
No, just asked when uncertain how widely addToStack is patched and/or used by other mods that might do things I wasn't accounting for
i am using addToStack a bit for my current Inventory Bullshit but i'm not patching it or doing anything else unseemly
Commendable
It seems like the most Base function to patch so I sure as hell hope no other mod is doing stack management manually
Base in the sense that All roads of adding to stack lead to Item.addToStack
Hello internet modders!! Any ideas as to why mail would be sent right away at the start of the game and ignore conditions?
I'm trying to make a MailFlag for her appearance to change. It worked before, but now it's sending immediately according to EventRepeater...
Specifically at RosalieWCFlag
the flareup ones do it too for some reason but I'm not worrying about it right now
- i don't know if this is your issue but your entries and their IDs should match to avoid weird behavior. you should also probably avoid spaces in them
- you can combine each patch to the same target into just one patch with multiple entries to improve readability if you want
- you can skip needing a trigger action to add a CT on mail received by simply adding the CT inside the mail itself
- i'm pretty sure the mismatch in names/IDs is making it so you can't mark them unapplied again
also, having an actual entry in mail with no text just actions will show up as phantom mail in the player's inbox
Maybe she's mixing up local mail and global mail. I did that.
https://smapi.io/json/content-patcher/7675047f848f49f6b7241e271c0c3434 see if this fixes your issue; i highly doubt it does, all i did was clean up formatting and make the IDs match the keys, but worth a try, and easier for someone to debug at a glance
in response to this from earlier, i've attempted with the line in the screenshot, but something definitely is not right because nothing loads in or shows up on screen... hehe. i am wondering what i need to change^ from what asesprite told me about the pixel coords, the rabbit running animation, in the very top left corner, is coords 128 160, and it is a 16x16 sprite. i have an entry for each of the 17 required fields according to the wiki
it's the first wip so def needs tweaking, just wondering what i need to do to be able to see the sprite and tweak from there
are you getting an error? i think you have to take motion out
i am getting no error & i was wondering why i didn't
the wiki i think requires motion to be in front of the pixel values?
could you please paste the text rather than a long thin screenshot 
oops yes sorry
temporaryAnimatedSprite TileSheets\critters 128 160 16 16 600 5 999 32 10 false true 0 0 0 0 0 0 motion -10 0
oh you're right it does need motion i forgot pathos changed the format of the wiki
there's two slashes behind TileSheets btw, idk why it pasted without the second one
you need to wrap it in `
or ideally upload the event to smapi.io/json lol
oh your sort tile y is 0
a couple of issues here, firstly you need to set the sort tile Y field to equal your tile Y field value (10), and you also need to set the scale field to 1
it needs to be higher, right now it's hidden underneath the back layer
temporaryAnimatedSprite TileSheets\critters 128 160 16 16 600 5 999 32 10 false true 10 0 1 0 0 0 motion -10 0
it's not hidden beneath back since sprites are drawn later, but it will affect layering with other features
instead with scale 0 you're setting the sprite size to (16x16)x4x0 = 0x0
oh i thought sort tile y was the depth, i always set mine to like 7+. but yes blueberry is right about your issue
you'd use a higher or lower sort tile Y value if you wanted to draw above/below other layers (like Buildings and Front) or other sprites
note that in 1.6.15 sort tile Y can be a decimal (non-whole) number, but tile and scale have to be whole numbers
ahh okay! i wasn't certain on the scale so i just threw something random, aka 0. i figured it was something off about one of those lellll
the wiki wording for scale is a little confusing:
A multiplier applied to the sprite size (in addition to the normal 4ร pixel zoom).
'in addition to' ๐ซ
i'd update the wiki but the whole event command is being updated for 1.6.16
but yeah scale is applied as (size x 4 x scale), not (size x (4 + scale))
rahhh just replayed the event but nothing shows up still 
unfortunately i have disallowed perfection runs with qol mods. you can apply for a permit for $20
(yes, the game doesn't know if you're using mods, and it will not block you from perfection)
it wouldn't be because of the pixel coords, would it? my cursor is in the very top left of the first rabbit frame, and on the bottom of the screenshot the pixel coords appear to be 128 160. would those coords work for the game to draw from them?
Thank you so much for cleaning it up! That was on my To Do list later lol xD I'll give it a shot thank you!!
Wait there's a difference????
yes mail is checked per player
if you want to set a global mail flag you should set and check on the host
your next problem is that you're using the source area 128 160 16 16, which is the completely transparent blank topleft corner of each of those 32x32 pixel rabbit sprites, visible as the dark-grey squares on your aseprite canvas 
try 128 160 32 32 instead
How do I do that? I've just been doing AddMail Current Id any/received/etc
awe man
i totally set my grid in asesprite to 16x16 at first, changed it to 32x32 and then never changed the area in my actual code
it showed up this time god bless. i am a dummy fr
Okay i see, so what difference would that do versus Current?
it's easy to get lost in the string of 128 160 32 32 600 999 1 0 false true false true false 0 0 1 1 1 1 1 35 0 0
etc et al
131 11 66
quite literally </3 was pulling my hair out over that string lol
well for example what if i join my friendโs game, i befriend rosalie immediately, i trigger her being in a wheelchair. then you check if current player has seen her in a wheelchairโwho should the game ask? me or my friend?
Okay I see! I always thought mods don't work in multiplayer lol! I'll give it a shot, thank you so much I really appreciate it!
they do but with an asterisk
mods only don't work in multiplayer if the author didn't correctly structure the mod hahah
or by user error lol
CP authors have to worry about it much less but they still do have to (if they want)
see above, ensuring that select world-changing features such as an npc changing their appearance should use the host player when tracking progress to ensure parity between all multiplayer farmhands
otherwise each farmhand ends up having a 'truth'/'worldview' different to one another
Update: I changed all the "Currents" to "Host" and it still sent too early ๐
It's not hard to make a CP mod break in multiplayer if they use Save dependent tokens when defining locations and character definitions
as the CP flow when host creates/loads a save, and the CP flow when a farmhand joins a server are subtly different and tokens are available at different times which result in locations/npcs not being created
Hi. If I want to specify multiple days in a linear order with a DayOfMonth check in an event, would I write out each day like 1 2 3?
which one specifically? can you also send a log?
I did for all of them from the one you cleaned up. I think the issue is the mail is on a loop, which it is supposed to do that but not when the conditions aren't met DX
you linked a log? i don't see it
Log Info: SMAPI 4.5.1 with SDV 1.6.15 build 24356 on macOS Unix 15.7.3, with 20 C# mods and 2 content packs.
this log says you're still setting mail on the current player
did you relaunch/reload the game and start a new save?
I believe so, but as a shortcut you can also use {{Range: 1, 3}} or whatever your linear range is https://github.com/Pathoschild/StardewMods/blob/develop/ContentPatcher/docs/author-guide/tokens.md#number-manipulation
I believe I might have! I think for that one I changed my Appearance one to say the Host got the mail to change the outfits hold on
Log Info: SMAPI 4.5.1 with SDV 1.6.15 build 24356 on macOS Unix 15.7.3, with 20 C# mods and 2 content packs.
so to be clear, no mail/flags should be applying?
not yet no
none of the conditions have been met
if you turn on trace, you can see these applied:
00:09:42 TRACE game Applied trigger action 'stardewaly.rosalie_WCDoneTrigger' with actions [AddMail Host stardewaly.rosalie_RosalieWCFlag Received], [MarkActionApplied Host stardewaly.rosalie_RosalieWCFlag false].
00:09:42 TRACE game Applied trigger action 'stardewaly.rosalie_FlareUpDayDoneTrigger' with actions [AddMail Host stardewaly.rosalie_RosalieFlareUpFlag Received], [MarkActionApplied Host stardewaly.rosalie_RosalieFlareUpFlag false].```
I did see that but I use Event Repeater and it told me it was applied when the game starts
i don't know what event repeater is but are you sure this isn't a mod interaction causing this?
Event Repeater is a mod that you can repeat events and triggers and stuff https://www.nexusmods.com/stardewvalley/mods/3642
in fact why don't you just use the vanilla command eventSeen? /gen
Thanks! I was wondering what the shortcut was
I did for the first time she's in a WC at 3 hearts(cause she has to be in one for the scene and changeSprites does not work for some reason in the event). But I didn't want her using the WC again until she reaches 6 hearts then it's random when she uses it
Anyone know if I have formatted this wrong? : "UnlockConditions": {"PLAYER_HAS_SEEN_EVENT |parcy.jack_intro":true}, Because I'm getting this error: Can't apply data patch "Jack npc > Jack - Character Data > entry #1" to Data/Characters: failed converting entry to the expected type 'StardewValley.GameData.Characters.CharacterData': Error reading string. Unexpected token: StartObject. Path 'UnlockConditions'..
are you using the appearances system?
Yes it's in my Content folder
okay that's good
i don't think i can help with this further, or at least not tonight, because i'm struggling to wrap my head around the system of checks and flags and events you want :(
That's totally fine! Thank you for your help โค๏ธ
Hello gamers, I am coming once again in need of a bit of assistance
.
Trying to understand how to code custom furniture into Stardew, I think I have a general understanding of it, but I've been struggling with getting the textures to work properly? Theres no red lines or anything on SMAPI's side of things; any help would be greatly appreciated ;-;
For context as well, I feel like it's like...1 or maybe 2 things that may be causing it to just not wanna work, because as Im fiddling with the code Ill either get the black box with a little bit of wood on it, or, Ill end up getting the red x icon for failing texture loading
Do u recognize that corner of texture? It looks like some issue with alpha
I guess it could also be game using
fallback
!json
JSON is a standard format for machine-readable text files that's used by Stardew Valley mods.
If you need help with a JSON file, you can upload it to smapi.io/json to see automatic validation and share the link here.
When making mods, it's recommended to edit your files in a text editor with JSON support, such as VS Code, Notepad++, or Sublime Text. These programs will check for syntax errors.
You should share your json so ppl can help look
Well that does look like Maps\\townInterior
it may be in jargon, but the error message does tell you where you went wrong:
Error reading string. Unexpected token: StartObject
which means it's expecting a"..."string value, but you've given it an{ ... }object value. furthermore, you've formatted it as if it's a CPWhencondition, when it's simply a vanilla game state query.
reformat it like so:
"UnlockConditions": "PLAYER_HAS_SEEN_EVENT parcy.jack_intro"
You gotta out your loaded texture here
Ohh, thanks blueberry ๐
Mods\\Kiwi.Horsemod_saddlestand
Gotcha gotcha, lemme go ahead and add that and see what I get 
OMG it worked

Thank you kindly
cute!!
love how that emote is titled cryign
successfully trapped in horse prison
I'm not sure why my event is sayingIgnored Jack npc > Jack - Events > data/events.json > Jack Intro: one of Entries, Fields, MoveEntries, or TextOperations must be specified for an 'EditData' change when I have it set up the same way as in my other mod (minus using a custom location) "LogName": "Jack Intro", "Action": "EditData", "Target": "Data/Events/BusStop", "Enteries": { "parcy.jack_intro/600 1700/Season Winter/DayOfMonth {{Range: 1, 7}}/": " continue/ 27 18/ farmer 14 23 3/ skippable/ pause 2000/ end " And I have this in the content json: { "LogName": "Jack - Events", "Action": "Include", "FromFile": "data/events.json" },... do I need to load it in actually, even though the busstop is in the game?
Enteries 
ohh
mi bomba
also your precondition isn't checking for a time range of 600 to 1700, it's just looking at 600 and wondering what to do with it
C# for SMAPI mods, JSON for content packs, english for here
si
wait, I'll need to look at the wiki again in that case ๐ฅ
thank you!
You need Time at the beginning of that
i'm not sure about DayOfMonth {{Range: 1, 7}}, i feel like the commas that CP inserts in a range token will break it
give it a try and see though
Oh, right. I was literally referencing my other working event too and missed that lol
sob
Cam linked me to this page, so it looks right... I think: https://github.com/Pathoschild/StardewMods/blob/develop/ContentPatcher/docs/author-guide/tokens.md#number-manipulation
I'll definitely test it though
and report back
It's not the token that's the issue, it's that it will end up having commas in it that will probably mess up the precondition reading it
herein lies the problem
"{{Range: 6, 14}}" // equivalent to "6, 7, 8, 9, 10, 11, 12, 13, 14
compared to
DayOfMonth <number>+
which typically means space-separated, not comma-space-separated
i.e. it'll become DayOfMonth 1, 2, 3, 4, 5, 6, 7 when it should be DayOfMonth 1 2 3 4 5 6 7
so just using 1 2 3 etc. to specify the days is the better way then? As long as it works, I guess I don't care
it's fine to just write DayOfMonth 1 2 3 4 5 6 7 though
thanks, that's helpful
otherwise it's valid to use Range when evaluating CP conditions, rather than SDV event preconditions
same issue as earlier with using CP conditions for SDV game state query UnlockConditions
what layer is the ocean overlay drawn on? over all the Backs but under Buildings, correct? what layer(s) are NPCs drawn on?
(related) all these errors I've had made my npc spawn with half his sprite in the ground and a shadow which I had gotten rid of ๐
the Water tile property overlay is drawn above Back, barely
ok cool thanks. i'll probably have to make this mermaid a map tile for my event then
buildings, objects, characters, etc aren't tile-based and so aren't exactly on layers, but if their tile Y coordinate is the same it should be back > buildings > instance > front
are their tops and bottoms drawn differently from each other?
that's basically what i'm concerned about
nope, not at all, sprites are drawn whole (and i think farmer sprites get their own spritebatch call to ensure it's in one piece)
again, not tile-based
inch resting ok
consider that the entire back is drawn at once on the same layer, and then (everything else) like buildings tiles, critters, animals, characters, items, front tiles, shadows, each with its own layer value related to its Y position (and some other tiebreakers like X position, or arbitrary layering additions for specific instances), and it's then all arranged and sorted out before drawing
the reason you might see half a character clipping through some badly layered Front tiles isn't because the character is drawn in two, it's that the Front layer tiles are each drawn based on their tile position with their natural added offset for being Front tiles
not the simplest concept and i've not tried explaining it before
so something at 1,1 is always sorted "beneath" something at 1,4?
depends on the something. AlwaysFront tile? false. flying bird critter? false. temporary sprite with sort tile Y set to 1,104? false
no worries it's mostly just curiosity at this point, i know drawing is terrible and i'm pretty sure i need to just use map tiles
if both are the same type of Something, like both Front tiles or both farm buildings, then true
.. unless for example the farm building has some DrawLayers with SortTileOffset set to a value greater than the distance between the two buildings. then false lol
Anyone know if there is a female sprite template around that I can play with?
??
If anyone knows, is there a way to make any npc appear where their spawn is right after an event on the same map?
if you don't need help making a mod, then i don't think this is the right channel for you
blueberry
ok
i think there might be one on patreon somewhere, but you can also combine the female farmer body + arms to make your own template
me
what i also recommend is looking at vanilla NPCs and drawing over them/studying them
yes
i don't think so, because you'd have to beat their schedule
depending on what you need, you could fake it by making them invisible and then making them a map tile or something
oh, well... the schedule makes mine stand at the exact same spot, Idk if that changes anything
all the time?
yes
then they should be there when the event ends
Hmm, would it be any different if my npc did not appear in the event? That may be the problem
I'll have to add more to it
afaik events have zero impact on NPC schedules, unless it's you making them invisible. and even then, i think they still go about their schedule for the rest of the day, just invisibly
make mod where bacon
I have a "UnlockConditions": "PLAYER_HAS_SEEN_EVENT parcy.jack_intro true", so maybe that's making something wacky? Not sure why it would though
oh if they're not unlocked then yeah that's probably why. idk when that gets looked at but my guess is at the beginning of each day
you could try SpawnIfMissing: true but even still if that's not evaluated after the event then you're SOL
2 moderator with chicken
although you could again fake it by changing map tiles in the event and then having them spawn the next day
Hmm, that might be an option if nothing else works. I have the npc hidden until met on the calendar as well though, so it might look a little wonky from the player's perspective. I'll have to work on this more later.
Thanks Nic 
oh, just a side note since I was about to leave, but I checked the next day and he's still not there, so something else might be the problem ๐ซ
i'm p sure PLAYER_HAS_SEEN_EVENT needs to specify a player
whether that's current or host or what (probably host)
Interesting.
https://smapi.io/json/none/9b0be7be163d445a97bfa3b809534c16
...oh no it happened again 
Sorry to ask for help again, but I went to start adding more items by essentially copy/pasting the line for the Stable Stand but replacing relevant information, but it...doesn't think it exsists? But it...does? 
Your texture fields start with "Mods" but the Load targets don't
Thank you so much I appreciate it

It grows
Yay, got Generic Mod Config Menu setup on my mod. I wish there were a couple ways you could coerce the "vanilla" option adders (like have a max and min on a numeric, but force it to still be a textbox), but in the end it works and that's what matters.
yay I have a cool mod idea but I literally haven't used c# in 12 years
is there any preset asset list which recolor modders modify, or would I need to go through every asset and decide if need to patch it or not
nvm i can just look at the content.json of other recolor mods
is it possible for me to make a mod or get a mod that repalces the farmer with my oc
with the ability to change shirts shoes and hats
I know about furry farmer but its a bit outdated
hi guys! I don't know if this is the right place to ask if someone would be willing to help me with making a mod? I wanted to make a horse retexture mode, but I'm having troubles with editing the sprites (I wanted the horse to be modeled after a specific fantasy creature) and I was wondering if there was someone who has some time and energy to help out!
I mean the farmer itself
not the farmer you see in the inventory
you could probably patch Charactes/Farmer sprites
You want to look at fashion sense
it looks so goofy lmao
I mean it makes sense to make them like this but still lmao
patching that asset is much more complicated than it seems
certain things like sleeves etc are generated from specific pixels or drawn in very specific ways
It depends a lot on what your OC looks like. If they're vaguely human shaped fashion sense has a really great pack, myths and monster I wanna say? You can get damn near everything you might want for a furry/classic monster from that pack, I used it to make a naga. I know there are packs that change the skin tone options which are easy to customize even in paint. Feel free to poke me, I've modded the character sheet a few times and made several fashion sense personal mods..
Hi, Iโm trying to make a mod for the first time and Iโm getting an error and Iโd really like to not have to start my map over if I can help it. Would anyone be able to give me assistance?
Hey all, I'm making a horse replacement mod + patching some farmer sprites (reins + seating position). It was working before, when I was replacing the whole farmer files, but since cropping and adding the x and y info, smapi is happy with the json info, json checker is happy, but SDV doesn't load the farmer sprite adjustments. Has anyone come across something like this before?
Edit: found the fix 
send a log / describe the issue
are you doing any conditional farmer sprite edits
Since I asked, I've actually just realised what my issue was...
I've been adjusting and tweaking for hours, had a break, came back, was still confused, decided to finally ask in here, and suddenly my eyes are working with my brain

Thank you though, @lucid iron
Sorry!
!tilesheetclimbing
When creating or editing maps in Tiled, one common error is tilesheet climbing, marked by red text containing "invalid tilesheet path '../../..'. This is caused by SMAPI not being able to find the tilesheets needed by the map file. To prevent this error, make sure that you have a copy of all necessary tilesheets in the folder containing your WIP tmx file. Copies of vanilla tilesheets can later be deleted, but must be present while working on your map.
If you get this error with a completed map, an easy way to fix it is to open your tmx file in VS Code or a similar text editor, find all of the places with <image source=, and remove the filepaths to so that only the tilesheet names remain. For example, if the code says <image source="Content (unpacked)/Maps/townInterior_2" width="512" height="64"/>, change it to just <image source="townInterior_2" width="512" height="64"/>.
classic
its not end o world u can fix it still
Map Fixer: Upload .tmx files to fix common map errors.
Ok cool it worked! Gonna have to adjust the warp a little bit but that's easy enough...I think lol.
if you want to prevent it in the future now that itโs fixed you could always use tilesheetinator
!tilesheetinator
You can use the Tilesheetinator tiled extension to create Stardew Valley maps that work in-game without having to copy vanilla and modded tilesheets back-and-forth, rename files with a . in front of their name, edit maps only in the unpacked content folder or make symlink workarounds.
See the mod page for full installation and use instructions.
Does #$b# not work with the /message command anymore in events?
it shows it like this
maybe it does work 
well i rly dont know 
Chu why dont u have all the knowledge of modding at all times in ur brain
Well u wouldn't use /message in speak anyways since it's a message not a dialogue, right?
i mean $b in speak
it do???
Yes?
why have i been torturing myself
hey, Does anyone know where the cave with the mushrooms is on our farm? in expanded mod please
you prob want #modded-stardew
thanks
Hey, so I'm working with editing buff data to make custom buffs for trinkets I've made with trinkettinker. The buffs themselves do work, as far as I can tell what isn't working is specific effects. Like, I can consistently get Luck level to appear as a buff, but the other buffs don't seem to work?
Do some buffs just... not appear in the buff description?
Yes
kk ty
(Extra Machine Configs make them show up as a passive fix)
If ur buff works by debug action AddBuff id then it'll work for trinket tinker
There's no special handling done
Has the warp functionality been changed? Been trying to get it to work but nothing happens when I walk over it?
Hi everyone! I want to make a mod that adds one NPC with like heart events and marriage and all that, how hard is it generally?
never tried making stardew mods before
If it's possible I'd also like the NPC to change its appearance and schedule after a certain heart event
making an npc is kinda a long process you gonna sign up for, especially if it happens to be your first mod. its do-able tho.
Because there's lots of dialogue?
among other things
we do have a tutorial on the wiki for it thho https://stardewmodding.wiki.gg/wiki/Tutorial:_Making_a_Custom_NPC
Making sprites and portraits would be the hurdle for me, but everyone's got their own strengths and weaknesses
Yeah, portraits are probably the hardest
I have drawn sprites before, but I have no idea how to draw a face
good thing one can always start using the vanilla ones as a base to work off of
Thank you for the knowledge :3
Changing their appearance is pretty easy, my NPC does it after their 6 heart event! Schedule I'm not sure about but I imagine could be done too!
You can change schedules with When conditions, yeah
I don't think you can change it IMMEDIATELY after, it'd take effect the next day, but you can do that
That's great, then I'll probably try to make the mod
I'm adding in a new crab pot item and I'm trying to make it only catchable in ponds, not rivers. I added it to Data/Fish with the location "pond" and also edited Data/Locations for a few maps, changing FishAreas to add "freshwater" and "pond" as the crab pot fish types. Is there anything else I would need to do?
The wiki just says this:
The vanilla values are freshwater or ocean; mods may add their own region.
That's on the page about Data/Fish
(C#) anybody know where the code is that makes the screen shake when you use a club's special attack?
The screen shakes?
it does! i think it's in MeleeWeapon.triggerClubFunction, but even if that's not it, what i did seems to work for my purposes so i'm all set 
Tree jar
Hi, does anyone know if there's a mod out there that adds different dirt crops (like Spring Onions and Ginger) to the game?
Trying to test for compatibility before people make bug reports alr
On a scale of 1 to 10, how difficult would it be to implent a missing items quest similar to Robin's/Linus', ect?
Once you release you will find out ๐
I think this is supported in vanilla so u just gotta fill in the data?
I love the idea so much!
Hi y'all, i wanted to ask where this sprite appears up for? tried to look on the wiki to see if I catch her doing something special that'll make this appear but i can't seem to find anything 
and also, does it pair with the one on the left? It looks like a beach protriat but it's in her basic set of protraits
does she sunbathe else where than the desert? I see her doing that but she has a bikini on
Emily's special order cutscene
anybody know where is the this palm with 5 'stem-sections' thing in the sprites?
looking through assets i could only find other variations of palms but not this one
I feel a little silly asking but, I want my candy conversion machine to accept either the small or large mallow egg to produce "plain marshmallow" would I just set the requiredcontexttag to "Mallow_Egg"?
These are wild trees
sleeping iirc
maybe I'm wrong though
but all the bachelors/bachelorettes have a sleeping sprite
i don't usually see them so i was surprised when i found out
TerrainFeatures/tree_palm2
As someone already said, it's the cutscene after Emily's gem special order, where they meditate with gems (and Haley fall asleep)
and they r defined in Data/WildTrees just like oak/pine/maple
i have the sprite patched on a time based rule, and the new sprite does exist in my assets, so im thinking the game is constructing these wild trees and using day time sprites as reference
ill prob have to check the code
yeah there's one sprite where she has a green gown on that i didnt expect to be a sleeping sprite. I had expect them to wear all the same clothes as it gets hidden by the bed covers lol
if it's a tag both items possesses, sure
This is the sprite for the time she goes to Emily's rock thingies
Or not, maybe I'm wrong on that one
theres 2 palms
It is, so, awesome! Ty :3
id 6 and id 9
Is there a Game1 command that can find the growth time of a provided crop id?
Also, is there a way to print to the SMAPI terminal from a static function?
not sure if theres a debug command for data, but you can check the data/Crops.json and add all the values in DaysInPhase
No, you can add it up yourself
https://github.com/elizabethcd/MoreConversationTopics/blob/20254c966ad6b2d85eb19f573f7ce031bb4b27b0/MoreConversationTopics/MCTHelperFunctions.cs#L26 here's what I did at one point (pass monitor into my functions), you don't have to do this but there's a number of similar sorts of workarounds
just load the content
see DataLoader
some data do get put on game1 as static forgor if crop is one of those
you wouldn't happen to have a third npc named Jame would you
don't know one offhand, i would not be confident it exists
is the shadow that gets drawn underneath spring objects an actual 16x16 texture or is it hardcoded
it's shadowTexture and it's drawn separately
i keep a static reference to my modmain class (the one that extends Mod and implements Entry) and then just refer to it from wherever, since it has access to Helper etc.
in practice i go even farther and use major shorthands, like a Log utility class, but they use that technique behind the curtain
it's always cursors until it's shadow or swimshadow or springobjects or temporarysprites or ..
i do all that in my mod template https://github.com/Mushymato/StardewMods/blob/main/csharp-templates/sdvmod/MODNAME/ModEntry.cs
more or less same with the shared code library i'm working on, but my mods are in various (disaster) states of actually using it at this point so i figured i should just explain it instead of linking my terrible current examples
a lot of my mods dont even have the LogDebug thing bc i add that later
@gentle rose i have a niche tilesheetinator scope creep request, now that we can easily use vanilla assets outside of the maps folder: when adding objects to the map from spring objects, could it automatically add a shadow beneath them? if this isn't possible then it's not too hard to do manually, no worries
If i add a special order by an event, will it just automatically start? Or will it be added to the board immediately
I made my log helper class I've been using entirely because I find typing Log.Debug or Log.Warn to be better than inputting a log level parameter. also so I can safely pass null in and also see what type something is
๐ฏ ๐ฏ ๐ฏ on typing Log.Debug instead of the normal thing which i hate
when i work on PR to other ppl, i can never find their special sauce logging stuff
New quote added by atravita as #7628 (https://discordapp.com/channels/137344473976799233/156109690059751424/1479590045491920896)
-# so i just Console.WriteLine
Ew
-# pathos' is the most confounding one
this feels like unexpected behaviour really
for example, what if I'm adding one of the 2x2 resource clumps, or the pointer finger
or an animated explosion puff
Automatically start
My log stuff is static so easy to find and use
I have though used Console.WriteLine in a Pathos PR as well
While mine comes with this comment
// this little generic trickery means that each mod gets separate statics.
Believe it or not I didnt copy this from stardewhack, I independently decided this bullshit was right
i lifted Log.D from spacecore years ago and never thought about it since
hmm i didn't think about the 2x2 stuff
is that thinking emoji ok
i've never copied anything from stardewhack ๐ (and i don't expect to)
Hi...how do I debug an npc that's not showing up again?
i was under impression that even if class is static when you compile each class ref that source would get a assembly namespaced majig of that class
The only thing I've copied wasn't mostly copied but instead just inspired by and wrote my own which is Pathos's console command stuff
Hard ref situation

i have more thinks wel come to the thonk wholesale
I dont know what i was thinking

Blueberry would u rather have the thinking or one million dollars
i already think but i do not have one million dollars
I neither think or have a million dollars but I think I'll have a million dollars some day
oh, does snow count as rain weather, by the way?
it could be due to any number of reasons given how many parts go into a functional NPC, so for now start with debug whereis mynpcname and a patch summary
nope, snow is unfortunately something else entirely
Oh, ok. I just wanted to make sure that his rain schedule being empty wasn't why he isn't showing on a snowyday
pretty sure snow is also not windy. iirc there's also some powder snow effect ingame you can run into when toying with the weather commands but that might've been removed in 1.6
do event actors actually take the texture name instead of the key in data/characters? i'm trying to figure out what to do about old mariner, and looked at mr qi for reference, and his internal name is 'Mister Qi' but in events he's 'MrQi'
Snow is it's own weather
Mr qi is special
A regular schedule should run during snow though, so it doesn't look like I'll need to account for that rn
oh no ๐ซ : No NPC found matching 'parcy.jack_Jack'.
!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.
Yeah, I'll grab it...
and a patch summary, naturally
is old mariner also special? i'm honestly tempted to go the SVE route and just make my own shadow old mariner a separate NPC entirely
Dont recall!
Doubt it
The old marnier on the beach is magically spawned in
truly the most ephemeral of all npcs
When will someone make the traveling salesperson a real npc
When will the bookseller grab a beer after work
hopefully never ๐โโ๏ธ i like my set-dressing npcs
i think i rather marcello npc be like
how do you usually do it manually?
a guy who live in another town all together tho
so its still canon that he just comes to peddle books and then leave
arent they the same guy
well i haven't before actually, but i assume i would just add the tilesheet and then draw the shadow on some Buildings -# or Back # layer
that or theres a family of 3 twins all of them who have same fashion taste
between harvey event marcello, bookseller marcello, and movie theatre marcello
spring objects i would normally put on a Buildings or Buildings# layer
hmm. don't the shadows have to match the object
Movie theater might be Harvey event dude
Tbh my personal opinion (maybe wrong) is that this is the only movie theater for dozens of miles so people drive in for it
it's just the one flat circle
The Walmart is the next town over
All springobjects have the same shadow
you're right, ty too!
oh, right for springobjects
i think the problem is that loosesprites/shadow is 12x7
Two towns from here has a climbing gym
u need to make a custom 16x16 version to position it right
if there's no vanilla asset for it then it's not really in scope, sorry ๐
here's my log. Jack just won't show after his event https://smapi.io/log/14ce89e0cf9e4f83a4b5e4433a682af5
Log Info: SMAPI 4.4.0 with SDV 1.6.15 build 24356 on macOS Unix 15.6.1, with 17 C# mods and 7 content packs.
Suggested fixes: One or more mods are out of date, consider updating them, SMAPI is out of date, consider updating it
yeah that's my bad i wasn't sure it even was one
since tilesheets have to be minimum 16x16, right?
Just a side note, but I had to cut my other npc from testing, because he had a billion errors the other day. That's a problem for future me
is this where you have unlock conditions set to has seen event?
It should be? is it not showing?
well i can't tell from your log, that would be in your json
Oh, I can link that too
but anyway this is what i was talking about last night, where i don't think unlock conditions will be evaluated immediately after the event ends
i'm not sure when it's checked but i would guess at the beginning of the day
I slept the day away though
hmm okay then
I'll run the event again through debug
it says you've seen the event, assuming it's parcy.mrNPC.intro.part1
it's parcy.jack_Jack before this event
Oh, that must be a remnant from my other mod
I removed it to test this one
let me find the other's event id
then yeah it's not showing as you having seen parcy.jack_Jack
hmm, ok
HasSeenEvent | [X] 60367, 520702, 1590166, parcy.jack_intro, parcy.mrNPC.eventY, parcy.mrNPC.intro.part1
well, I replayed it then slept...
oh, wait, does this need a : between it and true? "UnlockConditions": "PLAYER_HAS_SEEN_EVENT parcy.jack_intro true",
it doesn't need a true at all
oh
no, but i'm pretty sure you need to specify a player like i said last night
I forgot that, sorry
Player before the event ID, and the true can be removed
PLAYER_HAS_SEEN_EVENT <player> <id>+
UnlockConditions is a game state query, which will always resolve to either true or false, and GSQ evaluations will always check for a result of true (unless negated with !)
hmm i think i made things extremely complicated by accident; I set up tractions to send mail after a Special order is complete, but also did Mail Received in the Special Order. I don't need both right?
well not complicated just overlapping stuff
He's showing now! Thank you! I'm going to start another test save to try it again
Alright, so Nic was correct. It will take a day for him start his schedule, even though it's in the same spot. I'm sure there'll be a solution though. Thanks again!
You dont have to gate his schedule behind a when command
If he is not there he woll not scheduled
I don't currently have it behind a when though, unless you mean locking the entire npc behind an event
this is all I'm using "UnlockConditions": "PLAYER_HAS_SEEN_EVENT Any parcy.jack_intro",
Hmm, I'm surprised the schedule takes a day theb
Yeah, idk why. I think I may have to change the update rate for him showing. I'm not sure I want to go with a map edit trick.
unless i'm misunderstanding, it's not the schedule, it's the unlock conditions that are preventing him from spawning
his schedule is always "stand at this spot"
I wonder if just locking his schedule behind a when condition instead of the whole npc would change anything...? Probably not
Wait what do you mean instead of the whole NPC
I meant that the npc has an unlock condition attached, sorry, I worded it unclearly ๐
With a When condition?
No
Everyone thinks I'm misusing when conditions right now lol
It was that and the comment about the "update rate for him showing" that made me think it
I'll be honest, I'm thinking about trying one instead of an unlock condition though. Without sharing too many details, he has to be at the same spot after the event, and being able to chat with him would be ideal.
That's why I'm iffy on faking it with a map edit
When conditions on NPCs are generally ill-advised.
Especially if the condition relies on data only available once a save is loaded. Pretty sure that case just always leads to errors or warnings in the log. Doubly so in multiplayer.
Well, I guess it's unfortunate my idea really needs him to be locked behind an event then. Why does the stuff I want always need to be so complicated ๐
It'll all make sense when I release him though, I promise!
I know the mod might be sounding kind of weird with the stuff I'm doing behind the scenes right now
When you say "When" conditions on NPCs are generally ill-advised though, you are also refering to doing something like only locking his schedule behind one right?
I assume it would be the same thing because the schedule also spawns the npc, right?
It'd probably also lead to issues, but I'm not as confident in saying that vs the Data/Characters part.
The schedule doesn't spawn the NPC
Oh, I guess he's still show if his default home is in the same spot then
If I could change that to the void though....
Characters and locations should always be available at all times using no save dependent tokens
If you want an NPC to not exist until something happens use it's spawn condition field
Oh... that doesn't mean my that my other npc which has a location patch using a when condition is also going to break stuff, would it?
There is no reason for a Location to not exist
You remove the access to the Location conditionally, not the Location itself.
You can edit the data/locations definition with extra stuff, but the base location should always exist
Ok. I'm not adding any new locations in this current mod anyway
So, just to be clear though, I was referring to possibly changing his default spawn to be out of view on the same map so I could make his schedule conditional. That's not technically messing with his spawn.
pssst @torpid sparrow you might wanna check Tilly's wedding event data to add a condition for when the spouse is actually her 
i can do that rly quickly just dont sleep and exit the save
no problem for me! this is my test save, just popped it in to make sure nothing else was interfering when I saw it originally โค๏ธ
hmmm im not sure if its spouse or engaged
guh
ill try spouse first...
uploaded
guh
you are speed 
Modders are capable of incredible speed and motivation when a critical bug on an already published mod is brought directly to their attention. It's like modder adrenaline.
@torpid sparrow how are u adding wedding data
Are you override default wedding or making one of your own
overriding
Making one of your own is more likely to be more robusr
See...the romancable razzy, female version, the wedding for an example i think
thanks!!
New quote added by chu2.718281828459045235360287471 as #7629 (https://discordapp.com/channels/137344473976799233/156109690059751424/1479625319383175220)
All the East Scarp NPCs have specialized weddings too, but they're all in a new location. You just load it into Data/Weddings with your NPC name as the name field.
Can a quest be a requirement/condition for a cut scene to trigger?
Or even a heart scene?
Is it a quest you add, a vanilla quest, or someone else's quest?
(This changes your options)
A quest I would add
Either that or absolute despair as we wade through the stack trace trying to figure out what is causing said bug with no end in sight.
I would rather that than pushing an update, going to bed, and then waking up to reports that my update broke everyone's item stacking (which almost happened)
You can either set a mailflag in the final dialogue of the quest or use the autogenerater CTs to set a mailflag
Then make your edits on that
My favorite are the ones that require a specific set of like 5 circumstances including trying to summon an Old One that you as the author would never even imagine trying but apparently half the users of your mod do.
It's not like you can just scream "Stop having tea with Cthulhu" at them, so instead you must make sure that the player has some sandwiches to go with it.
Are the multiplayer farmhand locations defined anywhere in things like the wedding event?
I don't recall seeing a spot for farmhands but it's been a while since I went looking
I was looking for information regarding editimage patches and just saw this. I'm sorry for not replying three months ago, lol. Sure, I'll update AoC to make them load on the content pipeline
all u need is this
if (name.IsEquivalentTo("yourmod.modid/ui"))
e.LoadFromModFile<Texture2D>("assets/ui.png", AssetLoadPriority.Low);
i usually do asset priority Low in case someone wants to replace the whole image
but u can do Exclusive too that is fine, just mean ppl have to EditImage
is that the same as loading my assets with content patcher?
alright, thanks, that's good to know
by any chances you know how I could make an editimage patch using an asset I loaded with the load action? like, instead of having to use the file path
this is for a CP only mod and I was wondering how I could let people edit the asset I'm using here:
{
"Action": "EditImage",
"Target": "LooseSprites/map_{{season}}",
"FromFile": "assets/Tilesheets/Map_{{season}}_Vanilla",
"ToArea": {"X": 90, "Y": 0, "Width": 111, "Height": 20,
"PatchMode": "Overlay",
"When": {
"RMPEnableAspen": true,
"HasMod: |contains=FlashShifter.StardewValleyExpandedCP": false
}
},
You cannot.
you could however use the BaseTexture field in world map data instead of EditImage
EditImage would apply after you do that
Interesting... I didn't know about this, thank you!
tbh I despise that editing LooseSprites/map is still done.
it isn't needed
there is a Textures list in the worldmap data model that will have vanilla do the overlays for you where you can have GSQ conditions for when it should be done
i think people just donโt know itโs an option
like how they donโt know about NPC appearances and do EditImage with conditions instead
i suppose i could make a tutorial on it, but i donโt really have a solid grasp on it myself
When I last did my scan through the mod dump, I found zero mods that actually used the Textures field for the valley world map
though that was quite a while ago
Important modding related question for UI purposes: If you had to assign one colour to "input" and one colour to "output", what colours would you choose?
hmmmm
Green - Input
Blue - Output? 
more saturated for input, less for output?
for your vaugely magic-y mod, input would be a dark purple, output would be a shiny pastel, maybe yellow?
I would worry this would make someone more think on vs off rather than direction of flow
(It is for my magicy mod)
Can u not draw arrow
yeah, reasonable
Like forge
New question then: If you had to assign one cardinal direction to input and one to output, what directions would you choose
west to east like english script
๐ฏ
You know I wasn't worried about the cultural differences in the perception of input/output directionality but now I am, thank you
I kinda put myself in a bit of a corner because there's already unrelated arrows near where the thing would be inputting/outputting to
The thing in the bottom center is the input/output source
input - royal blue, output, fuscia?
if ancient greek go east-west, down, west-east, down, east-west and then west-east again ๐
Well you'll be able to put things into that capsule or take them out and neither is like, more important than the other enough to deserve one being flashing
I will wait until someone from Ancient Greece comments on my nexus page asking for support for this, I think
time to learn ancient greek AND invent a time machine just to be annoying
how difficult would yall say it is to move from being mostly proficient in js python & java to c#
straightforward, its oop
i made my first mod (C#) in a week after spending an afternoon learning the syntax
sweet thank you!
so confused...
this.terrainFeatures.RemoveWhere((KeyValuePair<Vector2, TerrainFeature> keyValuePair) => keyValuePair.Value.seasonUpdate(onLoad));
as far as i can tell this should remove terrainfeatures where their seasonUpdate returns true? except the terrainfeature class seasonUpdate, and the HoeDirt class's override both always return false, and yet HoeDirt always get removed. regardless of patching it to only return false, or even true.
there's like 3 different places where hoedirt gets checked for removal
gimme a moment to dig up my code
I have the exact same experience as you (python & java), it's really really similar to java but sometimes there's just abbreviations that you don't really know
handleGrassGrowth, seasonUpdate, and dayUpdate in GameLocation
i have dayUpdate working fine. I haven't done anything with grassgrowth yet.
but it always disappears on season change.
as far as i can tell its just that one line, which isn't doing what i expect, and im not sure why
hmm isnt HandleGrassGrowth actually where the seasonal dirt clearing happens
Grass.seasonUpdate can return true if the location doesn't allow grass surviving in winter
every other subclass returns false yes
...bleh its that first check even, isnt it. "ClearEmptyDirtOnNewMonth"
well. i guess at least the fix is simple then? remove that map property from the farm XD
thanks :P
and i dont need to touch seasonUpdate at all then it looks like.
I do agree that code should be in seasonUpdate instead of handle-freaking-GrassGrowth
at least i still don't need to figure out transpiling.
Don't need to figure out transpiling yet
When using a SetNpcInvisible <NPC name> <day duration> does the day duration have to be specified, and if it does, would 999 be the max if I want it to be indefinite until an event is seen?
- yes, <> means required
- i wouldn't bank on 999 being forcefully ended when the event is seen, it might accidentally make them invisible forever, but i don't personally know
The maximum value is approximately 2.4 billion.
oh, well it definitely doesn't need to be that high. 112 would work just fine
You would need to set them visible again manually if you wanted them back earlier.
The plan is to have the npc set as visible right after the event is seen
that would work right?
It's the next thing I was going to try because Dolphin suggested it as an idea
I'm going to go put it together
Ok... this is a dumb question, but it's ok to copypaste stuff from the wiki right?
images or code?
code
yep, that should be fine 
thanks, I can get anxious sometimes
So, does this all look correct?``` {"Action": "EditData",
"Target": "Data/TriggerActions",
"Entries": {
"{{ModID}}_HideJack": {
"Id": "{{ModID}}_HideJack",
"Trigger":"DayStarted",
"Conditon":"!PLAYER_HAS_SEEN_EVENT Host parcy.jack_intro",
"Actions":"SetNpcInvisible {{ModID}}_Jack 200"
}
}
}```I think this looks like it should do what I talked about here?
this is all in the content json by the way
actions is a list
