#making-mods-general
1 messages · Page 384 of 1
i mean thats still not true even with all vanilla
Yeah ! basically negates the condition
words are hard alright
im making a stardew mod and i set my npc's schedule to my custom house and he is in the wizard's tower
https://smapi.io/json/content-patcher/f9f02e1b6f454b9ca99f3311e8030ed0 not sure what character the error is for, anyone know?
okay never mind i fixed it
but i do have another problem
i get this error
[Content Patcher] Error loading patch 'Robert Mod > Include assets/data/MoviePrefrences.json': file 'assets\data\MoviePrefrences.json' doesn't exist..
missing " after trash can box
Could you share a pic of your assets folder?
check for typo, you mispelled Preferences as Prefrences here so it's possible you spelled it correctly when naming the file
nic already replied to you once about this issue
i have a second quote mark tho?
on line 646, sorry
he did?
oh i see, thank you!!
Like you were told earlier, MoviePrefrences (which is still misspelled) looks like it's not a JSON.
yes, she did
oh sorry she*
you're missing the .json
right here
the screenshot shows that it is not
Your file is named "MoviePrefrence", it needs to be "MoviePrefrence.json"
oh
(though it has the .json icon. are your others actually named like gifttastes.json.json?)
Because you formatted it correctly doesn't mean it is of the right format
yeah that's what i thought
well i would recommend not having things be named .json.json if that is the case
It'd probably be best to just share a pic of what your actual assets folder looks like in your file explorer.
(With file extensions turned on.)
File extension usually aren't hidden by default in VS/VSCode, you need to explicitly add them when creating the file so your computer knows
They actually are hiden by default on Windows nowadays. 
fwiw, file extensions have always been hidden by default for me when setting up new windows
Ah, too slow for the edit.
it's not .json.json
(its ok i was also too slow)

Yeah, realised too late ^^'
im going back to working on my mod
on the topbar of the file explorer, click on the "view"/"display"button, then at the bottom of the dropdown the "view option", and check "show file extension" (paraphrasing, no english windows here)
is selph ok with being @ 'd, they were the one helping me with what i'm trying to do but i don't wanna @ them if theyre not ok with it
@brittle pasture are you ok with being @'d
i dont usually interact in big servers so i dont wanna be rude
ok yeah it should be alright now
I'm always ok with being @'ed but right now I'm staring down some C++ code at work so you won't have my full attention
i got this error now when i was testing movies on a tuesday
[game] NPC 'Rabegi.RobertMod_Robert' failed to parse master schedule 'spring_Tue' with raw data '900 Rabegi.RobertMod_RobertHouse 4 12 0/1000 Rabegi.RobertMod_RobertHouse/1200 SeedShop 12 20 0/1500 SeedShop 4 19/1600 Forest 70 38 3/2000 Rabegi.RobertMod_RobertHouse 10 4 2/2100 Rabegi.RobertMod_RobertHouse 5 4 1 robert_sleep'.
IndexOutOfRangeException: Index was outside the bounds of the array.
at StardewValley.NPC.parseMasterScheduleImpl(String scheduleKey, String rawData, List`1 visited) in D:\GitlabRunner\builds\Gq5qA5P4\0\ConcernedApe\stardewvalley\Farmer\Farmer\NPC.cs:line 6217
feel free to ask others
ah ok, good to know
well while you're here, does this code look correct for a global drop? https://smapi.io/json/content-patcher/0cde0fa47d0a48dc949a303f8a0567a9
it should be near the end of the file
1500 SeedShop 4 19 is missing a facing direction
oh
looks good
tnx
awesome! thank you so much
Hello again, friends. If I wanted my NPC to not appear/perform their schedule until after their intro event played... How would I go about doing that?
have them warp to a hidden room in their base schedule, then edit the schedule after watching the event with the one you want them to actually do
Can't you just tmake them not spawn in
theyll need to be loaded into the game if they are going to appear in the intro event
Can you point me to a guide on writing schedules so I can see how to do that?
i thought Atra meant with the UnlockCondition field
in which case theyll still be loaded in via CP
i found the wiki guide, i can probably do it with that
to do the warping thing, put 0 as the time for their first schedule point and theyll instantly be in the hidden room
the rest is Content Patcher stuff
otherwise the schedule page will tell you everything else you need to know
i can confirm that unlock conditions don’t prevent an NPC from appearing in their introductory event btw! i totally thought it would throw errors but it didn’t 
hmm inchresting
I don't understand a lot of what was just said but! Does this look like it would work?
I set a mail at the end of the intro event
is there any efficient way to test trash cans, currently im running around with no clip max speed and max daily luck but im wondering if theres a better way lmao 
if UnlockCondition would be cleaner then I am interested in learning more about that but this seemed easy
are you trying to conditionally edit a schedule? if so this format is incorrect, schedule values can only be the format “time place x y z”
i have an example in my mod if you want to go code diving! otherwise look at unlock conditions on the npc data page on the wiki
Use a temporary actor
I feel like that might be eaiser
i didn’t even need to do this. i could use the NPC name and she functioned like normal. maybe it has something to do with when the condition is unlocked? not sure
I will do that (at some point... lol), but for now I'll just do the thing that seems easiest, which I think is fixing this? Am I correct in thinking that the issue is that I have just a 0 and that it should be something like 0 Saloon 15 20 0? And they would still teleport into the hidden room that Vinilla was talking about? Until the mail flag is set and changes the schedule?
caveat that i haven’t personally used 0 schedule, but the way to do it would be that their default schedule would be written with only one schedule point which is set to a coordinate that the player can’t see/reach. then i would have a second patch with a when condition for player has mail, and then write their actual schedule under that patch
also note that with a when condition you can’t use GSQs, you have to use HasFlag
(personally i think unlockCondition would be easier, but ymmv!)
where can I find ur mod so I can do some delving haha
https://github.com/nbeymer99/DeadBoyDetectives this is the github repo if you don’t want to download it, or it’s under the same name on nexus. the character you should look at is named Niko, and her introductory event is called Seance2!
(sorry for embed, can’t remove it on mobile)
Thank you o7 I found it on nexus (if I don't dl it, how can I endorse it? :3c)
best of luck, @ me with any questions!
I'm working on my Paved Valley mod again, I'm using the vanilla town tilesheet (Iknow its actually the town bc I have a recolour that's effecting it) but the stone used for the walkways in town doesn't make the stone sound, when I add the tilesheet to the map I also add the "Type" "Stone" tag to the tiles, what am I doing wrong?
It works if I have the town tilesheet along side the map but not when it isnt
Also the stone is on the Back layer too
just @ ing you to let you know... I got it working no problem! Thank youuu!!
awesome! 
hey guys, can anyone tell me how exactly the shipping bin lid sprite works? Its for AT
I've tried to place it perfectly but the animation looks so wonky
Well it opens when you get close?
yup
What are you seeing that's weird
hold on
i know its because Im messing up the spritesheet placement of the lid for the png image
ive placed it here
sometimes it looks like the lid is flipping to the left or right
trying to make my NPC sit in a chair as part of his schedule. Don't know what I did wrong. Any insight?
im guessing the name of the location

Just want to bump this cause I'ts still confusing me
you're using a custom Path?
If so, you may want to check what you have set for the FootstepSound data field for your path's Data/FloorsAndPaths entry.
Or is this a recolor thing entirely?
the actual path (The bit that I want to make the stone sound) is from the vanilla toen tilesheet, it's a modification of the busstop that i've added the town tilesheet too, but it still references the base game town tilesheet
it's seperate to the recolour, that was just some information to prove I know it's using the town tilesheet cause the recolour only replaces that (earthy recolour)
The desaturated part is the bit I want to make the stone step sound, its part of the town tilesheet, the saturated is my custom one which I dont want to sound like stone (which is fine and working)
okay, the not desaturated parts won't sound like stone anyway, because the path edge tiles on the town tilesheet actually use Type Grass
exactly, that's the bit that works how I want, it's just the centre that doesnt weirdly
I'm trying to understand, sorry if I'm making you repeat yourself
okay, so the desaturated bit, is that from a custom tilesheet?
No no it's fine don't worry at all, I probably haven't explained it the best in the first place, I was struggling to put it into the right words
or the vanilla?
no, that is the vanilla spring town tilesheet, with a recolour,
the recolour isnt an issue because this occurs without it and it works corrently on the town map with the recolour
okay, and the recolor probably targets the png, so it won't break anything.
That I can confirm
Now, for this map in Tiled, the Town tilesheet wasn't originally part of it?
Correct, it is the BusStop that I am modifying, it doesn't have the vanilla town tilesheet as part of it
Just to confirm my suspicions, the fountain likely isn't animated for you either on this map.
(you can tell from the tiles not having the diagonal lines)
I shall have a look bare with
correct it isnt animated
okay, easy fix then.
(ah I see what you’re getting at lily, good catch)
I think I am too, I need to export the town map tilesheet as a tileset from the town tmx itself?
You could do that and then import it, yes. I went the text editor route myself when I had to this to add waterfalls to another map, which involved opening a map that had the tileset on it natively in a text editor, finding that tileset's <tile> section and copy/pasting that over.
That would be easier, I would've never figured that out without your train of thought, thank you for solving hours of frustration, I shall give that a go right now
Am I missing something?
My wine is in the game, but the texture for the output of the keg is the default wine texture
yep, everything starting from the highlight until the </tileset>
Looks like I'm not going the text editor route cause there is no tile id 736, export as tileset it is
Oh just directly coppying everything in there not just the specific part with the same tile id
I think exporting it will be easier
Yep, the entire thing will cover every tile property.
I was gonna say, tile id 736 is definitely in there, I was just looking at it. LOL
for me it skips over some? weird
<tile id="734">
<properties>
<property name="Water" type="string" value="T" />
</properties>
</tile>
<tile id="754">
<properties>
<property name="Type" type="string" value="Wood" />
</properties>
</tile>
on your custom map, maybe.
it shouldn't on the vanilla town map
unless you're in the wrong tileset
are you in the spring_town section?
nope, I was in the langscape section
to load a tileset (.tsx) do I just add it like i add a tilesheet?
to Tiled I mean
pffft vscode things the tsx is a reactjs file, red lines EVERYWHERE
change the file association to xml then
a lot more people use vsc for webdev than manually editing tiled tilesets so it makes sense to be the default
https://smapi.io/json/content-patcher/f460b7b9e7f14c64ae193c05a8ba2557 so after skipping a year with automate on and max daily luck, no boxes appeared in any of the chests i used to check trash cans. does anyone know what i need to change in the code to make the global drop work? the code for the boxes in trash cans is near the end of the file
I actually have no idea how to load a tileset, only png files appear
You'd use Map > Add External Tileset to import a tsx to your map in Tiled
Ahh gotcha thank you
I found the VSCode editor method way easier, so I've defaulted to doing that instead.
getting this error:
StardewModdingAPI.Framework.Exceptions.SContentLoadException: (CP) Paved Valley loaded map 'Maps/BusStop/BusStop.tmx' with invalid tilesheet path '../../../../Content (unpacked)/Maps/spring_town'. Tilesheet paths must be a relative path without directory climbing (../).
It shouldn't be directory climbing, it's along side the BusStop.tmx
the Tilesheet info is saved in the .tmx itself, it doesn't load it dynamically, so it doesn't matter if it's in the same folder if the internal data is wrong
(or saved in the tsx if using those)
I am indeed, if Map > Add External Tileset doesn't add it without directory climbing how am I meant to add it?
the Tilesheet would need to be selected from the same folder as the tmx, not simply moved there after
you can always just fix it manually if you've already added it
open the TMX in text editor or code editor and remove ../../../../Content (unpacked)/Maps/ before spring_town in your image source field for that tilesheet.
that's the manual fix
Gotcha, I shall do that
(or the tsx, if the offending sheet is in the tsx and not the tmx)
^
IT WORKS FINALLY
in this case, it did yell because of the link from the tmx
oh wait havent tested it without the tilesheets and set in the same folder
nope it died again, time to go through and remove any reference to anything other than spring_town
well, you definitely don't want to open it in Tiled once you remove the stuff in the same folder.
I haven't Im going through the text version
🙂
still shouting, even more so
@obtuse wigeon You leveled up to Farmer. You're now a prettier shade of blue. Thanks for sticking around!
i should also add i recieved multiple garbage hats and trash catalogues so i dont think its coincidence that i didnt get any of my items
WOOOOOOOO
I shall check it out
it lets you use tilesheets without having to move them back and forth etc, basically, so you can use them directly from the unpacked content folder
Omg that's defo being added, so much time SAVED
it's still in testing so please do let me know if it works or not!
it should be mostly fine, you aren't the first tester or anything like that 
Hello im making mods again after a few years, currently migrating a few to 1.6. In the MinimumApiVersion should i put 4.0.0 or the lastest one?
can't go wrong with latest major version
I've used your plugin but it also doesn't carry over any of the properties from the original tilesheets, like footstep sounds or type stone
unless I've misunderstood what it actually does fully
yeah, I didn't mean it would do that, I meant that it would allow you to continue opening and editing the map in tiled after you fix it even if you delete the one from your mod folder
Ohhh gotcha okay
I just tried your method of copying the <tile> section manually but that also doesnt work, I genuenly have no idea whats going on any more
this time I used irocendar's tiled plugin to sort the tilesheets automatically (turns out the bus stop does actually inlcude the town tilesheet), then i made my changes to the .tmx file, then I closed it and took the <tile> section from the unpacked bus stop tmx and pasted it into the same section in my custom bus stop tmx
Honestly might just scrap my new mod idea because I can't get the wine texture to show up 
do you need help
Yes 
I've tried it this way and the way with editing machines data instead
The annoying thing is my wine shows up in the game, just not as the output from the keg with my fruit
...ProducerRules is not a thing
pls throw away all of that code
I would ask where you got it but I think it's obvious
you can peruse the following pages for how to actually add machine stuff:
https://stardewvalleywiki.com/Modding:Machines
https://stardewmodding.wiki.gg/wiki/Tutorial:_Adding_New_Machines_(Or_New_Rules_To_Existing_Machines)
I guess that's what I get for browsing online, but neither of them work anyway
that one doesnt work for a different reason:
https://stardewmodding.wiki.gg/wiki/Tutorial:_Adding_New_Machines_(Or_New_Rules_To_Existing_Machines)#Use_MoveEntries_to_reorder_entries_in_a_list
you're just missing MoveEntries to move your rule above the vanilla wine rule
https://smapi.io/json/content-patcher/deb3d1aff4e94b8497d87c9b330a4ef0 so good news, this coding for the garbage drops DID work but for the gamer box only, and i think i overtook the chances for every item in the game, any ideas why?
after a month with automate i had like ten plus gamer boxes in every chest but no other boxes, and very little of any vanilla items
This makes me want to throw my computer out the window with it being such a small thing, but thank you so much 
i get that feeling fr lmao
Is there a way to get the default texture version out of my game or am I stuck with it haunting me
you overwrote the entire AfterAll list
Through this I mean, sorry lol
your previous code used TargetField (which is correct), why did you switch off it
that' just a CJB spawner thing (it autogenerates wine for every fruit in the game regardless of whether said wine is obtainable)
Ooooo ok, thank you!
the other reason you're only getting the gamer box is that Chance is not a field in garbage data, so your gamer entry actually has 100% chance
you should be using "Condition": "RANDOM 0.1", instead
i switched it off because it wasnt making the boxes spawn at all, so i messed around with it to try to make that happen
i slept for around a year with automate and got no boxes
you can revert to that approach and if it still doesn't work run patch export Data/GarbageCans to see if your changes are showing up
(does Lookup Anything work on Garbage Cans?)
oh wait I think I know what's happeing
yeah your entries are below the default 100% chance fallback items
you can either use MoveEntries to move them above it, or set IgnoreBaseChance to true for your entries
ohhh ok
i saved a copy of the original code one sec
{
"Action": "EditData",
"Target": "Data/GarbageCans",
"TargetField": [
"AfterAll"
],
"Entries": {
"{{ModId}}_TrashCanBox": {
"ID": "{{ModId}}_TrashCanBox",
"Condition": "RANDOM 0.1",
"RandomItemId": [
"{{ModId}}_GamerBox",
"{{ModId}}_SweetBox",
"{{ModId}}_KitchenBox",
"{{ModId}}_FruitBox"
]
}
}
}
if i revert to this and then add ignorebasechance true it should work?
yep
ok i'll give that a shot, again thank you so much for your help
is it working now or do you need me to give a better explanation?
it's not working, a better explanation is probably needed, sorry 
I've sent you a DM with the relevant code block pulled out into a file
oh brilliant thank you
Stardew Loot crates? careful EA will try buy it from ConcernedApe
i should double check, does the order of the item ids matter? like are the gamer boxes prioritized because theyre first? or is it just a coincidence that i saw more gamer boxes than others
bc i did see all 4 appear i just wanna make sure i dont have to change anything to make the chances equal if they arent already
nope, RandomItemIds are all equal chance
so if I want an event that takes place at the Farm, right as the farmer exits the door, how do I make that compatible with custom farm map mods that have different co-ords for where the house exits out at? Do I just have to make exceptions for every custom farm that I want compatibility with?
can "ArtifactSpotChances" be used for non-artifact items or is there a different way to add items to dig spots, the wiki makes it sound like it can only be used for artifact items
I think farm events always happen at the door
cool, I'll try it and see if it works
I feel like the map knows where the front door is? I’m not sure
When I was making my farm event it wouldn’t let me change the viewport at all
Not sure how modded farms handle that
there are a couple in the vanilla data i see that set the viewport to -10000 -1000
Just wanna check, is this the right way to change tilesheet for season?
{
"Action": "Load",
"Target": "Maps/zzz_AtlasV_StoneWShadow",
"FromFile": "Maps/Assets/zzz_AtlasV_{{season}}_StoneWShadow.png"
},
with each tilesheet having {{season}} replaced with the actual season its for
(speaking of which what in the world is a DiaryEvent i see when looking at event code)
DiaryEvent as in the C# class
oh 
that ILSpy tells me is unused but sometimes it just does that
lemme search for references in my 350k line source code file
anyway i think i found it and it looks like farmers do just always get put at the front door
unless you place them at x coordinate -1
Is that what grandpa event does
no that just works
Oh
this looks for you setting up the farmer actor in the character initialization
the third command
and checks if the location is Farm
NPCs also always get placed in front of the front door
but one tile further below
unless something something tile offset ignoring something something idk
indeed unused
interesting, if underbaked (all the farmer's writing about is how good they are at socializing)
kinda cute
also i think if you use a specific farmer id you can actually place the farmer elsewhere?
like farmer1 instead of just farmer
Huh I kinda wanna make more diary entry events
(i had no idea farmer IDs were a thing?)
where is the concept of a farmer ID even documented
i did find this on the wiki page though, this may have been why wem
"ignoreEventTileOffset | Tile positions in farm events are offset to match the farmhouse position. If an event shouldn't be based on the farmhouse position, add an ignoreEventTileOffset command to disable the offset for that event. This must be the 4th command (after the 3 initial setup ones) to take effect. "
Oh interesting
i cant find anything that documents the otherFarmers actor name either 
or like, any of the other hardcoded ones for that matter
Are they used frequently
so i'm going to add item extensions as a framework for my mod, do i need to create a second manifest and content file to do so?
you need to add a dependency to IE to your manifest
i dunno how frequently theyre used, but there's pet, cat, dog, spouse, golem, and Junimo
IE uses the asset system so you don't need a separate content pack
would that be under "content pack for"
(along with ofc the aforementioned farmer# syntax to place individual, specific farmers in multiplayer (or singleplayer if you do farmer1 i suppose)
(some frameworks act as "CP extensions" because they expose their assets to be editable, while other frameworks like FTM use their own content pack format. You only need a separate mod with a different ContentPackFor for the second category)
otherFarmers seems to just place Every Other online farmer that is not you onto the same tile
oh no i missed an increment, they get placed side by side
ohh ok i see. thank you!!
I feel like I've seen it in wedding events
but that might be it
the wedding events can get funky as a result
like you might see different events depending??
never really looked too closely
im sure all these actor placeholders are used, i just wasnt sure if i was missing where they were all documented
but as a result of Customize Wedding Attire there are some odd side effects
haha i see
documentation ... i would not bet on it
and yeah i can see this otherFarmers command does not actually check the next tile over is a safe tile lol
https://smapi.io/json/none/9d021c144b6e41019a435820571e9efc is this correct in terms of adding the dependency?
looks good
thank you
and i would just add my item extensions changes the same way i would content patcher changes?
yes, instead of targeting a vanilla asset you'd target whatever IE provides
awesome, thanks!
Anyone know how to make PFM find Cornucopia machines?
[Producer Framework Mod] This is just a Warning, don't report this as a bug. No producer found for ProducerName (BC)Cornucopia_ButterChurn. This rule will be ignored.
[Producer Framework Mod] This is just a Warning, don't report this as a bug. No producer found for ProducerName (BC)Cornucopia_CompactMill. This rule will be ignored.
It couldn't find it by name either.
[Producer Framework Mod] This is just a Warning, don't report this as a bug. No producer found for ProducerName Butter Churn. This rule will be ignored.
Cornucopia uses regular Data/Machines so PFM doesn't deal with it whatsoever
What's the goal here
Goal is to make an older JA+PFM mod use Cornucopia machines isntead of PPJA
(without having to do a full conversion to CP..)
uuh try removing (BC)?
!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.
Log Info: SMAPI 4.3.2 with SDV 1.6.15 build 24356 on Microsoft Windows NT 10.0.26100.0, with 37 C# mods and 67 content packs.
Suggested fixes: One or more mods are out of date, consider updating them
your a schedule, after the game calculates what the necessary departure time must be, is becoming 1600, which turns out to be a duplicate in the schedule
you'll need to adjust the timing
browsed PFM source, and I believe removing (BC) should work
that kind of error is particularly troublesome bc sometimes you might not even be in control of it (another mod may affect the path your NPC must take)
(it finds machines by the internal Name, which Cornucopia has set to the same as the unqualified ID)
[Producer Framework Mod] This is just a Warning, don't report this as a bug. No Output found for 'Ancient Nut Butter', producer 'Cornucopia_ButterChurn' and input 'Ancient Nut'. This rule will be ignored.
[Producer Framework Mod] This is just a Warning, don't report this as a bug. No Output found for 'Ground Herb', producer 'Cornucopia_CompactMill' and input 'Ancient Fern'. This rule will be ignored.
didn't work
i thought i remembered from a while back someone trying something similar and the result was PFM just cant do it
oh well
that looks like it found the machine but it can't find the... rule to edit?
I thought just adding rules should work
you can't edit CP rules in PFM yes, but if you add independent rules for it then they get checked first
you're right, the error did change
I'm confused about the warning then. I don't understand what exactly it cant find
it didn't find the Ancient Nut Butter item?
seems like it (reading the source again)
Thank you
you need to pass either the unqualified item ID~~ or the internal Name~~. I don't think "Ancient Nut" is either?
How to level up to level 5 here
just keep chatting (but don't spam ofc)
well its a JA item, so i'm not sure what the ID is
you can use lookup anything in game
JA items get turned into CP items now (or always has been idk lol)
hm, can't find the item in-game..
did it get skipped for some reason?
wait, I think I get it
Cornucopia's Nut Butter is a flavored item like Wine or Juice
so "Ancient Nut Butter" doesn't exist. if you want it to exist you need to make the ancient nut one of the eligible inputs to the rule
it accepts any item with the nut_item tag
JA does accept specifying context tags now so at least you don't need to write a CP pack for it lol, just edit the JA pack
same with Ground Herb (if it's not a thing). you can add herb_item to Ancient Fern and it will work with all the Cornucopia herb rules
are you saying Cornucopia Nut Butters are overriding the Ancient Nut Butter so they can't exist as separate items?
is there a reference to an "Ancient Nut Butter" item in the JA mod?
(if there is ignore everything I said)
yeah it should exist
other items are working, like Ancient Nut Milk
but in game I only see the Cornucopia ones
okay then I guess make sure the mod's loading in the logs?
the boxes are successfully in fishing chests we are gaming
yeah other items from the same mod are loading
there are no other warnings related to it
wacky
oh wait, there's this line in the file
"EnableWithMod": "ppja.artisanvalleymachinegoods",
oh you're right
ok that solves one
now the Ground Herb, I guess it doesn't exist because its a PPJA item?
likely
as mentioned adding herb_item to that item's context tags list would make it work with the Cornucopia rules like dried herbs
https://smapi.io/json/content-patcher/300ffe5c21dd48edbf45b12a2f7ea747 any idea whats causing this graphical bug? lines 503 and 504 are what i added in to try to add the animation
the second pic is the asset of what my machine is supposed to look like while working
I don't see you have any animations defined at all
isn't "shownextindexwhileworking" supposed to animate it?
like trashing the items in game and putting them down again?
oh wait I just counted frames
yeah that's happening because you have shownextindexwhileworking, which means "Show index 5" (since your machine is index 4)
your image doesn't have index 5
ohhh i figured it would loop, ok thats on me
i'll have to reorder the sprite sheet then
is there a way to make the index loop?
you need to specify LoadEffects/WorkingEffects
here's an example: the compact mill cycles between frame 2, 3, 4 and 5 relative to its main sprite while working, and shows the frame next to its main frame when done
https://github.com/MizuJakkaru/Cornucopia/blob/main/[CP] Cornucopia Artisan Machines/machines/compactmill.json
i'll take a look at that, thank you
its showing the frames changing but still shows two purple lines instead of the correct assets https://smapi.io/json/content-patcher/5d14650ee25648feb6da29525447dcf5
the two lines mean they're out of bounds
what does that mean?
the animation's sprite indexes are relative to the main sprite, not the absolute position in the spritesheet
so 0 would be the main sprite, 1 is the one to the right of that, 2 is two spaces, etc.
oh, so would i make it 1, 2, 3, 4 instead of 0, 1, 2, 3?
that'd make it worse (assuming you're still using the sheet you posted above)
i am still using that one yes
quick fix is reorder the main sprite to be the left most
i'll do that, it only was put in that order bc it was alphabetical
hey guys, does anyone know where I can find a tutorial for making ui
so this should work with 1 2 3 4 in that order?
yes
do you mean UI retextures or mods that add new UI
I wanna make a new ui, kinda like fashion sense but only changes hairstyles
how much C# experience do you have?
I think I know enough to make a mod
wonderful 🥳 there's no tutorials
vanilla UI creation is very "do everything yourself"
well is there at least anywhere I can look for the iclickable stuffs
every UI mod ever made is either from learning how the game does it (spoiler alert: lots and lots of draw), or, fairly recently, using StardewUI (which still has lots of DIY and studying the source mind you)
!decompile is your best bet
If you want to make SMAPI mods with C#, one important resource is decompiling the game to read the game code. Here's how to do it: https://stardewvalleywiki.com/Modding:Modder_Guide/Get_Started#How_do_I_decompile_the_game_code.3F
the game's source code is where you look
sadly there's no documentation online or inline, the best you can do is cross-reference vanilla and open-source mods
i actually think you can get by without looking at stardew menu sources at all with StardewUI if you do it all in StarML
yeah StardewUI has pretty good documentation
fr thank you so much selph you have been carrying me on this mod making journey 
hey so how do you make water functional as water in a custom map? I’ve got it set up with all the appropriate tiles having the Water tile property but they’re just existing as static tiles
thanks, I'll check the documentation
of course even if you use a library/framework like StardewUI you'll still need a working knowledge of the game code in order to actually affect the game state, e.g. changing hairstyles
so having a decompile on-hand is very much needed
do they have to be on the normal Back layer to work? I have them on Back-1 right now and I’d be very annoyed to have to redo that, but if that’s the problem…
whether you go with StardewUI or just raw C# for your UI you can ask here, there's often someone around used to either
They have to be on the normal back layer
additional (numbered) layers are purely visual and have no functional effects or properties
Please bluebs
including water
That makes sense, I will remember that
Rust or bust
at least it’s just a tedious fix and not a hard one XD
C or flee
Fleeing now then
you want #modded-stardew
Ah mb thanks
https://smapi.io/json/content-patcher/3b1e9ce6d8e44c58a77dc5c7159366d6 is this error because i need quotes around my context tags?
or am i just missing a bracket or comma somewhere
Quotes are needed for it to be valid json yes
got it, ty
https://smapi.io/json/content-patcher/fc06047149c041deab948f4f5efb79d4 i'm sure i'm missing a comma or something but can anyone spot where
uh. 🤔 im not sure if this is correct for adding gift tastes at all
well that wouldnt be good lmao
both gift tastes should be in the single set of quotes
the wiki showed character names in quotes on the gift taste page
ill try putting the gift tastes together
in a json object, its ```json
{
"Key1": "Value1",
"Key2": "Value2"
}
but you have
```json
{
"Vincent": {
"Like": "blind_box",
"pusheen_plushie"
}
}
there are no numerical values needed
oh can we use the words? i didn't know that
NPCs dont have numerical IDs
its not can its has to
unless you're using a category
i edited gift tastes a different way 
categories are numbers, context tags and item ids are strings
(npc's also don't have categories)
now im confused too. i thought you were supposed to edit vanilla villagers gift tastes via textoperations
ik what ur saying i dont think i expressed what i wanted to correctly cause thats not what i meant
this would be overriding all the gift tastes with their selection yes, due to the lack of text operations
how do i add text operations then?

yeah what Shrimply said, i thought it was textoperations
"the numerical values for each NPC" made me think you meant the NPCs themselves had a numerical value attached to them
yeah i didnt say that too well
i meant numerical values (the 0,1 = love, 2,3 = like, etc) for each npc
those are the fields
in which i now know is textoperations
for the actual gift tastes themselves
I was about to say if there was an easier way then what I was doing I think I would explode actually
yeah i'm the pusheen blind box person lmao
so i'm still a bit confused, what is textoperations and how would i add it to the gift tastes?
cause i dont wanna override any vanilla or modded gift tastes i just want to add my items in
https://smapi.io/json/none/7000531d36ba457fa6f61c6b7943bb33
I think this is how it's done.. I mean you can do it this way anyways (maybe there's an easier way and I am doing it the hard way)
that's how i do it too
and then i do it for every npc...idk if there's a faster way to do it
(and you do that by targeting data/npcgifttastes + doing text operations w/it)
can i use context tags instead of item ids? bc i have alot of items and i would rather not add each id individually
yes
eeeyup.. and all the different gift types too 😭
this should help
(only use the odd numbers btw.. I accidentally used the even ones once and everyone was responding to the items weird so)
what did they say?
well the evens are their dialogue
and the odds are the IDs
I can't remember what they were saying I think it was just the actual object lmao
oh lmfao
so they would be just say AngelOfStars.Mrqifriendable_Celery or smth I think
It's been a while since I had that happen
example of gift patches with textoperations without overriding original tastes here:
https://github.com/b-b-blueberry/CooksAssistant/blob/master/LoveOfCooking [CP]/assets/gift-data.json
oh i see
ohhh so that's why the items dont need a space between 'em huh
er
why they USE a space between them (i was thinking of a comma while typing that)
yep, it's just a single string (piece of text) rather than an array (list of strings)
if you wanted to completely destroy every gift taste you could use "Delimiter": "/"
but you didn't hear that from me

i suppose you could also do "Value": "", "Delimiter": " {{ID}}_eggsando_half {{ID}}_saladsando_half {{ID}}_seafoodsando_half if you wanted to be annoying
but again, someone else told you that, not me
Cursed behavior Blueberry, cursed behavior
so ideally this is what it should look like, and then i just adjust every character i want to?
i dont think that one would even work but i couldnt articulate to you why i think so, so for now i guess you can assume itd work
yeah for every character you want and every gift taste type you want for each character
sweet, ty everyone!
please do add {{ModId}}_ to your item IDs everywhere throughout your mod, it'll prevent you from having issues with other mods adding items of the same name, and means players/mods can tell which mods added which items
in my link above all my items start with {{ID}} because it's very old, but you want to use {{ModId}} instead
oh i have, these are context tags from my items not ids
ah i see, no problem 
Did anyone ever answer this question?
wouldn't the same principle apply? what if someone else makes up the same context tag
yeah if i was doing every item on its own this json file would be waaaaaaaaay more messy than it already is 
(ive never made my own context tag idk how it works)
context tags are meant to be general-purpose descriptors rather than unique identifiers
The major benefit (to me) of context tags is that it's easier to make things cross-compatible by using the same tag.
ohh okay makes sense!
like if multiple mods use the context tag funny_clown_item for their circus things that's a good thing
since you can give any of them to an NPC that wants funny clown items or have them all stocked in a clown shop
if i wanted all my custom items to be liked then would it be helpful to have a unique context tag
like just mine
i guess idk i usually have a hodpodge of types of items
it'd be about as much effort as adding them all to universal likes imo (if you were going for everyone liking them which i guess you're not in second thought)
well usually you dont want "all of my items" to be liked at once
(as in, most people dont want that, not that itd be bad)
yeah im raising an extreme case i suppose
i dont actually want to do that but just positing for funsies
really it's just for categorisation in the handful of places that use context tags, unless you're specifically adding functional tags like placeable, ``sign_item, prevent_loss_on_death`, ...
use_reverse_name_for_sorting 
what is a reverse name
The game is weird
when sorting alphabetically by display name, it'll read it back-to-front
i can only imagine it'd be useful if you had some items with some level scaling in their name and you wanted to group by level rather than by item name, e.g. Axe 1, Bow 1, Claw 1, Axe 2, Bow 2, ..
(Trinkets also intrinsically have this behaviour without the context tag)
vanilla uses it on stuff like Green Algae, White Algae, Grass Starter, Duck Mayonnaise
can anyone help me about my new idea?
i have a weapon in my mod,i wanna when player is holding this weapon,combat level+5,but i dont know this code,i use c#
I'm currently coding a mod related to the UI. I'm using a sprite sheet containing 7 images (448x64), with each image sized at 64x64 pixels. Each image is used as a button. However, while coding, I ran into a hitbox issue, the buttons are misaligned to the left compared to their actual visual position. If anyone has experience with this, please help me out.
@wraith aspen I'm a bit late, and someone may have linked it already, but this is how I learned about text operations. It's a really good breakdown of how it works: https://github.com/Pathoschild/StardewMods/blob/stable/ContentPatcher/docs/author-guide/text-operations.md
If nothing else, it will help clarify why it works that way
ty!
i just published the mod 
https://www.nexusmods.com/stardewvalley/mods/36257?tab=description pusheen plushie mod is published! this mod adds in blind boxes that can be opened for cute pusheen plushies you can collect!
I have a question for tile maps
Okay, not a question but more of a struggle. How do I plan the layout?
congrats! do you want a publish spot?
feel free to rework the post description and/or post to a more visible space like #modded-stardew
yes i would love one!
should i just post the link in that channel?
i don't talk alot in big servers so i'm always wary of breaking any rules lol
sure, you can post a link + a fluff description (so it shows up in the showcase)
ah gotcha!
though actually hmm, you don't have embed rights yet
only in this channel
eh it's fine
yeah ive been a long time lurker but only just started talking recently lmao
feel free to edit the post above to add the description and I can post that instead
if you want the embed
I think you can patch MeleeWeapon.AddEquipmentEffects?
edited it hehe
done 
a Harmony-free way is probably listening for an event every second and add a buff depending on the active item, but that's not very performant
is there anyone familiar with StardewUI? I've got some questions about it
sure (I made one mod for it)
I'm wondering how to add buttons to change the displaying sprites
well stardewui has a button widget, and you can configure it to do things
how far are you in getting a basic view setup and showing in game
They didn't but I also didn't get any errors, haven't tested changing season however
I've only managed to run the example in the game
the next step is to read about StarML and edit the example to add any widgets you want
I'm looking for something like this, when you press the button it goes to the next sprite, like sprite2
Yeah, I've read it already
but I'm still confused
I'll check it out, thanks
I can't load the map in
!log what error are you seeing?
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.
!json you can also post your code using this link and then sharing it
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.
Using a tmx file but I am just a beginner. It didn't say any errors with the logs and debug warp in but it says the map doesn't exist
Or no input
Even add a warp tile in game to get into my custom location but i stayed in the same location as I entered
(to quote the embed above, Please do it even if you don't see any errors.)
I realized what went wrong.
The action is editmap, not load
Does anyone know of any good reference materials for setting parameters for my own moded items (mainly cooking)?
I'm not good with numbers so I've been postponed them, but since these are all tentative, I have to think about individual values or prices for each.
I usually look at all the vanilla items and find one that's similar to mine and then choose a price within like +/-20g of the vanilla item price
For cooking you could also look at the combined price of the ingredients and decide how much of a profit you want from that
with cooking items in particular it can be worth making the final product sell for less than the sum of its parts, given it can be eaten for health/energy/buffs
if it has buffs, you might also want to lower the health/energy amounts so it's not a do-all item, so people are more likely to cook a variety of stuff
you might also want to make the effects better or worse depending on the ingredients used, since people are quick to do the cost-benefit analysis on cost and effort to reward
really though the base game foods are all over the place, so nobody's holding you to a high standard, and having a (reasonably) high reward means people are gonna give your mod more attention
in short, treat it as a triangle sum:
health+energy
/ \
/ \
buffs ----- money
with the total scaled to the cost/effort
is it possible to adjust a custom npcs schedule based on different conditions (friendship points, marriage with other marriage candidates etc) using content patcher?
yeah, its porridge
?????
*possible
😭 porridge... im sorry
Nom nom
need help,i met problem aaaaaaaagain
this is my code part,it means,if player is equiping "frost katana extreme",add buff "combat"to player,but when i equip this weapon,it warnings "ignored invalid buff without duration",but i defined duration in code,why?
When you apply a buff you defined in code, you need to use your buff instance instead of the buff ID
See the bottom of this page: https://stardewvalleywiki.com/Modding:Buffs
(Side note, I highly encourage namespacing your ID to avoid mod conflicts)
its dosent work
i change the code to
Game1.player.applyBuff(combat);
but it still say"invalid buff with no duration"
Then idk, anyone else have an idea?
I don't think weapons ever become equipped
i successd!
oh thanks it works now
Remember to prefix your items and your buffs with your mod id
this is right
you can roast (and burn) marshmallows over campfires
https://youtu.be/I1B9FBW0MA0
i miss marshmallows...
"Useful for climbing mountains!"
Hi ! I have another question about CP mod writing. I want to use a token that has been defined in another mod, but I don't understand the syntax I should use. In my case I want to load a schedule when Gunther is unclocked. In the Stardew Valley Expanded CP code, there is a token called GuntherUnlocked. So I guess I should have something like
"Target": "Characters/schedules/GuntherSilvian",
"When": {
"FlashShifter.StardewValleyExpandedCP/GuntherUnlocked": true,
},```
But I have this error message in the SMAPI console: ```the When field is invalid: 'FlashShifter.StardewValleyExpandedCP/GuntherUnlocked' can't be used as a token because that token could not be found.```
How should I write it ? Thanks for your help 🙂
uh ok well for one you can't use tokens from other mods without cross mod compatibility tokens
eh
u sure they don't use mailflag for that?
i don't think they use specific token?
or u can just recreate the condition when gunther unlocked instead?
Yup I'll be doing that instead XD I thought it was easier to like call tokens from one mod to another but turns out it's a bit more complicated haha
thanks for your help 🙂
How would you guys go about putting a time option in GMCM? The only option I can think of outside of implementing a custom input for it is to marshal/unmarshal a text input though its getter/setter of format hh:mm (am/pm)? to/from an integer variable with the same format as Game1.timeOfDay
The other way would be to still have a text input but have a looooong list of possible values
Unfortunately it doesnt seem to support a generic validation function
Hey, kind of new to the modding scene as a whole, I am trying to understand how do they load new NPC's schedules in SVE I've tried doing something similar but I'm getting errors that the schedule's format is incorrect. does anyone have any experience with it?
!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.
[[Modding:Schedule_data]]
so glad im correct
I've looked through those, my question is where do they load it?
Keep in mind that making NPCs is a complex process that requires learning many different aspects of Stardew modding.
Here are a few links that can help get you started on all that you need to know:
-
Tiakall has a great tutorial on making a custom NPC for 1.6.
-
NPCs no longer use dispositions, check the wiki page for the new NPC data.
-
Aviroen has put together a template that will allow you to easily create a romanceable NPC.
-
Feel free to jump into the https://discord.com/channels/137344473976799233/1277457201077813280 thread for more interactive feedback and help!
-
Fireredlily has a WIP NPC Builder Please do report any errors you get with it into the NPC thread!
ty I'll look through this
Anyone think of a better way?
configMenu.AddTextOption(
mod: mod,
name: () => "Pause after",
getValue: () => $"{ModEntry.Config.PauseAfterTime / 100:D2}:{ModEntry.Config.PauseAfterTime % 100:D2}",
setValue: value =>
{
if (!new Regex(@"^\d\d:\d\d$").IsMatch(value)) return;
ModEntry.Config.PauseAfterTime = int.Parse(value.Substring(0, 2)) * 100 + int.Parse(value.Substring(3));
},
tooltip: () => "Once per day, pause after this time (24h format). Use 02:00 to disable."
);
Hey, read through the entire document I am aware you can load the schedule by editing it, this is fine and dandy with EditData, the issue I am facing is I want to understand when does SVE edit exclusively the NPCs schedules, on their end they don't edit it using the standard methods that are in the attached documentation, they just have a json with strictly the schedule, nothing else no "Changes": no Editdate, nothing.
"Test": "0 BusStop 4 5 0/610 BusStop 24 5 1/730 BusStop 4 5 0/830 BusStop 24 5 1",
}``` I wrote this in their format as an example...
if you're trying to use sve as an example then i can't help you unfortunately
it's a complicated mod and im not familiar with its contents
you are trying to make an npc, correct?
or do you just want to edit the schedule
oh, alright. Thank you anyway! 😄
maybe I am missing something.
yeah, I got the gist of how to make it just looked extremely odd to me so I asked for a second opinion
well i could help you with whatever you're trying to do, just not if sve is involved since i dont know anything about it
other than that I got it but tysm for the willingness appreciate it!
good luck 
question to map makers
what are the most annoying things you have to do in tiled? (e.g. having to edit maps in the unpacked contents dir)
Weird annoying thing i hate is animating tiles with a lot of frames
Animations are annoying to set up, yes!
Or the opposite, animating a lot of tiles even if they only have 2 frames
And also when i manage to curse my map and duplicate a tilesheet without realizing and when i remove it it deleted half the map..
all because i didnt realized and used tiles from both the original and the clone tilesheet
...interesting. Do you know how you managed to do that? Because I did that testing the extension, and I was wondering if it was somehow partially a Tiled bug at first.
Uhh i made the unfortunate mistake of copying tiles off another map
One time though i have absolutely no clue how it happened bc i never opened another map
the tiledatas, cuz i can't copy paste multiple of them specially when I'm tryna cover a big area
ouh, thanks !!
Wait, that works with Stardew? 
wish i knew that before manually duplicating 100+ tiles😔
i think being unable to apply/tare/zero layer offsets is up there for me
I think when you unpack the game maps though it splits it all up into tiny 16x16 tiles
I don't think I've ever used layer offsets 
there's that bulk animation plugin that might help with that, right?
Oh there is? Ive bever loikied st olfugli
i occasionally use it while drafting, it's pretty niche. add your big map features to their own layers, move them around with the offset layers tool until it looks good, but then you've got to manually copy-paste the tiles onto a non-offset layer for it to be reflected ingame
I could probably write you an extension that zeroes them pretty quickly tbh
a button to apply the horizontal/vertical layer offsets onto the tiles on that layer would be cool. think apply transforms in blender/davinci
i'll be honest i don't know how much i'd use it given i'm mostly done with mapmaking myself, but maybe someone else would find it useful, too
(I'm in a tiled extension mood and looking for ideas, if you guys can't tell
)
If only hours were split into 100 minutes - This almost works and feels nicer to use, but 12:80 isnt a real time
configMenu.AddNumberOption(
mod: mod,
name: () => "Pause after",
getValue: () => ModEntry.Config.PauseAfterTime,
setValue: value => ModEntry.Config.PauseAfterTime = value,
formatValue: value => $"{value / 100:D2}:{value % 100:D2}",
tooltip: () => "Once per day, pause after this time (24h format). Use 02:00 to disable.",
min: 0,
max: 2400,
interval: 10
);
Bulk animation only work if the all the frames are set in a straight direction (left - right, up - down).
They are not supported if the frames are scattered around the tilesheet, or the frames are not in a straight line but multiple rows (like waterfall)
This is the UI of it, in case you don't know.
Figured out a decent way, converting between a %100 and a %60 representation (%100 matches Game1.timeOfDay, %60 makes it possible to use a slider)
configMenu.AddNumberOption(
mod: mod,
name: () => "Pause after",
getValue: () => ModEntry.Config.PauseAfterTime % 100 + ModEntry.Config.PauseAfterTime / 100 * 60,
setValue: value => ModEntry.Config.PauseAfterTime = value % 60 + value / 60 * 100,
formatValue: value => $"{value / 60:D2}:{value % 60:D2}",
tooltip: () => "Once per day, pause after this time (24h format). Use 02:00 to disable.",
min: 0,
max: 24 * 60,
interval: 10
);
Does anyone know why Nexus never seems to update the version at the top of the page correctly?
do you mean correctly, or quickly?
Can I add gift tastes to a few specific NPCs for my new items?
I can't find how to do it without it being a universal gift taste
I do mean correctly. After 0.0.3, I uploaded 0.1.0 and 0.2.0, and it still shows 0.0.3. I know smapi doesnt care, but at this point i have to assume it just strips the excess characters and zeroes and compares the resulting number
someone else asked earlier: @high brook ⤴️
asdg
Oh thank you!
Did you edit it manually
Or check the check box saying to update the version number
The version number on the first page
Hi chue!
How was China
The entire country
All of it
It seems to be doing ok
I did now, but im pretty sure i had that box checked each time. I mean it worked for the patch releases
Sometimes it's just haunted
any chance you guys know how i can spawn fireflies on farm? or any custom location
i met strange bug,look now my combat level is 15,so my maxhp should+75,but i didnt,why?
THANK YOU
How do I add more dialogue for an already made mod
I, an amateur, don't know how to do that in general, but it seems like it depends a lot on the mod you're modifying and where and how you plan on adding the new dialog
which mod?
for the most part, it will be the same as adding dialogue to vanilla, you'll just want to have a dependency on that mod being installed. But if you want to publish it, it is considered good etiquette to ask for permission to make things especially for other people's mods
Are you planning on overwriting existing dialogue or adding additional dialogue? Stuff that shows up as daily dialogue, only in a certain location, only at a certain time, reactions to events, etc
(e.g. if you want to add dialogue to tia's Jorts and Jeans and then publish it, you should ask tia first)
I asked the Modder if I could add more dialogue to their mod and they said it was okay but I wasn’t sure how to do it
They had a content template
Adding more dialogue
It’s supposed to be randomly generated
Are you trying to add more options to lines they already have? E.g., they have a line for Sunday and you want it to be 3 different options, including theirs?
you will need to provide the name of the mod
Yes
this will be way easier to answer questions if you do
It’s a bit embarrassing
(unless it's nsfw, in which case don't)
https://stardewmodding.wiki.gg/wiki/Tips:_Using_i18n_for_Easy_Dialogue_Randomisation it's doable though a bit more complex than just adding new keys
With the game's default dialogue setup, you would be limited to 168 lines of dialogue: one per season, alternate heart level, and day of the week. However, you can use i18n to easily create a pool of randomised dialogue, either to extend the amount of dialogue beyond the 168 line limit or to remove the season/heart level/day conditions without r...
then you may need to figure stuff yourself then, but at least it is a CP mod?
Yeah it’s nsfw
(i admit this wasn't a thing i considered)
Sorry
Thank you :)!
Assuming you're making this mod for yourself and don't plan to publish, I'd just toss their lines in as your first option and then add whatever other lines you want.
If you do want to publish, it gets a little more complicated.
I don’t want to publish it
Tia’s first recommendation will suffice
What about the publishing?
Okay yeah, then just use that tutorial and include their line with yours. You may also need to look at https://stardewmodding.wiki.gg/wiki/How_to_make_your_mod_compatible_with_other_languages if you're not familiar with the i18n the tutorial references.
Stardew Valley is played in many languages, and mods come in just as many. In order to make your mod available to as many players as possible, it's a good idea to allow to follow these tips and good practices to make your mod as accessible to translators as possible.
(if you wanted to publish, you would need to either 1. get permission to include their dialogue with yours, 2. use Cross-Mod Compatibility Tokens to pull their lines, or 3. tweak your Random to have null as one of the choices, which would remove your line and allow theirs to stay. But again, if you don't want to publish this, I wouldn't go that far for your first mod.)
Cross mod compatibility tokens?
Lets you pull info from other mods you wouldn't be able to normally.
(CP mods generally don't know what each other is doing)
How do I use it?
Apologies if I sound really stupid, this is my first time modding
I never done modding in my life
hmm I think automod just ate my reply for some reason 
the highlighted one is the one you want to reference, the format is {{Spiderbuttons.CMCT/Translation: othermodUniqueID, othermodi18nkey}}
(i think something fucky with the regex is happening)
So if you wanted to, say, overwrite the Monday dialogue in my Wren mod (which has unique ID tiakall.wren, which shows in my i18n file as "tiakall.wren.Mon": "Hi, @. I'm working some routine calls today, but I'm reachable by cell if you have an emergency.",, you would use {{Spiderbuttons.CMCT/Translation: tiakall.wren, tiakall.wren.Mon}}
(Sorry
It worked in separate chunks, so maybe I made a typo in my original that it didn't like)
its fixed now!
How do I open a DLL file
boy am i glad i don't have to maintain these automatic moderation tools
Open source?
Open-source software (OSS) is computer software that is released under a license in which the copyright holder grants users the rights to use, study, change, and distribute the software and its source code to anyone and for any purpose. Open-source software may be developed in a collaborative, public manner. Open-source software is a prominent e...
if the code making up the dll is available already from the author
Oh
(you can find a list of all open-source sdv mods at https://mods.smapi.io/, just check the box at the top marked show advanced info and options for a link to their source, if available)
If this is for the dialogue mod though, you really don't need to worry about dlls 
(unless for some reason the mod you're adding onto included the dialogue in their dll, in which case if it's not added via CP stuff like CMCT won't work)
I'm trying to completely scrub out (or maybe replace?) Abigail's Guinea Pig, David Jr. and I need to know all the places where he appears in the code. So far, I've got him in a few lines of dialog, but I can't seem to find Abigail's heart events in the code, so I can't be too sure
Data/Events/LocationName
Not sure what heart event David Jr. is in but it should be there
It doesn't look like he's meant to be in any. Does each location really only get one event? I'd figure you'd need more than one
every event for one location is kept in the same file
Ohh okay
Nope, like Vin said, events that transpire in one location are kept in the same file and distinguished accordingly. E.g. Haley’s heart events and the special 10H group event is in HaleyHouse
Oh, I see! That's weird and I don't like it. Good to know
I honestly prefer it tbh, I’d know where to look 
Hello! I'm trying to recreate Sebastian's pool animation in an event. Where can I find which frames to use? I've tried unpacking schedules, and I can't tell on his tilesheet which ones are the right ones. I'm likely missing something obvious.
Pool animation? Do you mean when characters go into the bathhouse or something else?
AFAIK, those are just their beach sprites, walking around like normal
Oh, no I mean when he's in the saloon and he's ducking down every once in a while at the pool table (billiards?)
Ah! hold on
Those are usually in Data/animationDescriptions, but I don't think Seb has one for playing pool. He just stands there. Sam does, however
"sam_pool": "4/4 4 4 4 4 4 4 4 4 34 34 34 34 34 4 4 4 4 4 4 34 34 34 34 34 34 38 34 34 34 34 34/4/Strings\\animationDescriptions:sam_pool",
Yeah, Seb just has a schedule string on fridays, not an animation
Sorry
Does anybody know which tilesheet (and where on the tilesheet) I could locate Abigail's guinea pig?
Edit: Found the bastard. townInterior.png, far left
(speaking of Sebastian, I really have to start playing again, I’ve been intrigued with Older Sebastian since forever
)
I probably just mis-remembered which sprite moved! Thanks for letting me know where Sam's is, I'll likely be using that one as well so it gives me a head start!
(joliefish just did a YT vid on it and I am over the MOON)
No worries. I also misremembered it. It makes sense for Seb to have a pool animation
I’m super excited 
I had a quick question about WEATHER in trigger actions, actually. In this one for Emily's 10 heart, it goes off on DayEnding to send a letter, but it checks the WEATHER for the Woods. Does that WEATHER call correctly check the weather for the coming day?
{
"Id": "Mail_Emily_10heart",
"Trigger": "DayEnding",
"Condition": "PLAYER_FRIENDSHIP_POINTS Current Emily 2502, PLAYER_NPC_RELATIONSHIP Current Emily Dating Engaged Married, PLAYER_HAS_SEEN_EVENT Current 2123243, WEATHER Woods Sun",
"SkipPermanentlyCondition": null,
"HostOnly": false,
"Action": null,
"Actions": [
"AddMail Current EmilyCamping",
"MarkEventSeen Current 2111294"
],
"CustomFields": null,
"MarkActionApplied": true
},
Because if so, it will solve a tokens issue I've been struggling with (by avoiding it entirely) xD
Tokens are evaluated by CP before the save is fully loaded. This means that any token that relies on data from that save can't be used as a condition in an Include call without missing a day. If that makes sense
I tested marking the Token as not ready until the data I need (farmer friendship) is actually there, but that just causes the token not to be evaluated at all when the Include condition hits. Super frustrating, because it means that a letter that was sent out on daystarted before saving will not be there after loading the save. Hoping that I can sidestep by moving the check to dayending, but the weather is super important
Psure it checks today's weather
Well. Fudge.
You can try anyways, like use rain totem n go to sleep
Yeah. I'll do some more testing. I just saw this in vanilla and my heart lifted
The thing im not sure of is just when does weather get evaluated really
Whether it's b4 or after the trigger
Maybe since it's on dayending, the weather has already been updated by the time trigger actions are evaluated?
Yep possible hence test
I think this kind of thing is why it's usually best to provide GSQ than a cp token
Oh, chu, while I've got you here -- what is the correct way to provide an NPC's translated name as a value for a token? I thought npc.Name was correct, but I have a Korean translator who is still getting the name in English characters when provided with the token value
What's the usage context here
If it's just dialogue then [CharacterName <internalname>] works
a token probably should be returning the internal name in most contexts
Hmmmmm. The token being returned is used directly in dialogue, but I can see Button's point. Is there an easy way to convert between npc.Name and DisplayName without making another token just to do it?
Like an inbuilt CP thing?
chu just gave the tokenizable string
Yeah local tokenized string enjoyer here
Oh! Thank you
I love tokenizable strings
if only it works in mail
Thank you guys 🙂
I'm having problems with the added lampposts
I've put them in the Day and Night tiles and the light properties, but they're not lighting up or changing to the different tile in-game
I'm using the EditMap function if that helps
Hey, I am following this guide
https://stardewmodding.wiki.gg/wiki/Tutorial:_Making_a_Custom_NPC#Schedule
but for some reason I can't seem to get a custom NPC I made to follow a schedule or have a dialogue
So, you're interested in creating a new character for Stardew? Good news: with version 1.6, creating a character is easier and allows for more flexibility than ever. However, NPCs are one of the more complicated things to create for Stardew, as they have a LOT of moving parts. This guide aims to provide...
when using EditMap you can’t transfer map properties. you’ll have to add the night and day tiles manually by using content patcher
Will ya please send your content json !json
!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.
does your NPC have gift tastes? they need those to function
Oh I see! How do I do that?
Do they need them to even have a schedule or dialogue?
yes
Wow, I don't think I'd ever notice that TYSM!
Thank you!
it’s strange what NPCs need to be considered bare minimum, but luckily an easy fix!
Unfortunately, it really does seem to be evaluating the weather as it is on the day that's ending
I got all excited and everything
is there any other obscure requirements I am too blind to notice by any chance?
i think following this guide will get you there :)
So would that be a content.json that read like
"Format": "2.7.0",
"Changes": [
{
"MapProperties": (coodinates here)"
no, it would still be under an EditMap action. let me get an example for you
Thank you, I really appreciate it
I seem to recall a mod or something that would let you check the weather for tomorrow. But I'll be darned if I can remember it now
https://github.com/nbeymer99/DeadBoyDetectives/blob/main/data/mapImplementation.json not at my computer but scroll down to this section. you would use text operations to make sure you’re not overwriting the day and night tiles that other mods add
I don't really understand why it's no good to send the mail in the morning
Thank you so much that's really helpful!
BETAS has a GSQ for it
won't work on save load due to token not being fully initialized in time
Because the letter shouldn't be sent if a token is false. And that token isn't evaluated until after the friendship data is loaded all the way in. So if I send it when the day starts, it will work if they are playing normally, but fail to send if I quit and load the save back in
I think I might be missing something else, It still doesn't load neither the dialogue nor the schedule
BETAS also has a trigger that's a tiny bit later than DayStarted called MorningStarted that may work too
That actually would work, because I can force the token to be evaluated on daystarted
can you share your content json and all relevant character files? also, just to make sure, did you patch reload and also sleep a day in game?
I think BETAS might just make this possible. The only other way I can do this is ignore it entirely and make the letters all say something like "If the weather's nice..."
xD
Not sure how annoying that would be to players. But it does let me send those out on dayending instead
sure, do I upload it to !json or is there anywhere else?
!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.
yep please always use the json validator unless requested otherwise!
is there any way to upload multiple Jsons or do I need to do it one by one?.
can u use the friendship GSQ instead
one by one unfortunately, but no rush take your time
In this case, probably not. But I'll check
Yeah, no 🙁 The letters can't be sent out if the black event is going to trigger, which requires a token evaluation to determine
Good thought, though
Content.json
https://smapi.io/json/content-patcher/f5dd1ac76e644107881d020f944b51d1
NPCs
https://smapi.io/json/content-patcher/5110022cb482403c83cb966c999127d0
Dialogue
https://smapi.io/json/content-patcher/2327ea4d36a6417489c18bfb119f74bd
Gifttaste
https://smapi.io/json/content-patcher/6782fe3b87f144ebb202552ca0b2ce9b
Schedule
https://smapi.io/json/content-patcher/81547ec962c34eddb0b627e242222c5b
it's as basic as it gets I'm trying to get into modding but I don't understand where I mess up
What's the most convenient way to test if a mod is working properly? I'd like to trigger the heart events at will to see how they play out
If you just need to test the event, debug ebi is your friend
debug ebi <eventID>
You type that into your smapi console
Ah, sounds good. I've heard of event IDs before, but I can't figure out which part of what thing is the event ID
One second, let me type an example
"Action": "EditData",
"Target": "Data/Events/BusStop",
"Entries": {
"{{ModId}}_Proposal_Sam/Dating Sam/f Sam 2500/t 1500 1800/w sunny/c 2/LocalMail {{ModId}}_StartSam": EVENT CODE GOES HERE
}
}```
In this case, the event ID is {{ModId}}_Proposal_Sam
i’m not sure that default or spring are valid dialogue keys. if you’re just trying to test, change those to “Mon” and “Tue”
Which would evaluate in my case to Kantrip.MarryMe_Proposal_Sam
as for the schedule, did you try sleeping in game?
{{ModId}} is a token that you use to make sure your event ids are unique
yeah, started a new save checked and tried going the next day after sleeping
ok let me take another look
!log also are you seeing any errors in your log? if not, can you type patch summary YourModIdHere into the SMAPI console and then send the log using the instructions at this link?
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.
The dialogue works, maybe spring isn't a valid key overall?
spring is a valid key for schedules but not for dialogue
now that the dialogue is working we just have to find the issue with the schedule
since it’s confirmed the game knows they exist
again TYSM!
no problem!
where does it exports to?
the site tells you where to find it since it’s different per OS
What would ModId be here? From the config.json, or something else?
content patcher is magic and knows to replace {{ModId}} with your mod id though, no need for you to write it out
You should pick something like "<username>.<modname>"
Yep! Just use {{ModId}} everywhere. But when you are testing an event with debug ebi, you will need to type the whole event ID out
Which is why you need to know what it is
yes true 👆
Log Info: SMAPI 4.3.2 with SDV 1.6.15 build 24356 on Microsoft Windows NT 10.0.26100.0, with 5 C# mods and 1 content packs.
Suggested fixes: One or more mods are out of date, consider updating them
this looks like you may not have typed your mod id correctly. the format should be in your manifest
see here
you’ll know if you’ve gotten it right if it lists out all of your patches and whether they were applied or not
where have I set it incorrectly?
So, I'm running events using the debug, and the weather and time of day is wrong. This is a mod I picked up from somebody else, so I'm unsure if they did something wrong, if the problem has to do with running the events during the wrong weather and time of day, or if I have a lot of work ahead of me
what you typed into the SMAPI log must match what your manifest says your UniqueId is
sorry SMAPI console*
If you start an event with debug ebi, it will ignore all the preconditions and fire the event immediately
If you are trying to test that the event will trigger under the right preconditions, you will have to make sure that weather/time of day are both correct and then enter the location where the event is supposed to happen
If you just want to test the event code (people moving, people talking, etc), it's ok to use debug ebi. You can event set the time in advance if you want to make sure the lighting is good. But to test that the event is working and ready for release, you're going to want to make sure that it triggers under all the right preconditions
ok good, this confirms that your schedule patch isn’t being applied, so we can look more closely into why
may I ask where do you see this?
With my example earlier:
"Action": "EditData",
"Target": "Data/Events/BusStop",
"Entries": {
"{{ModId}}_Proposal_Sam/Dating Sam/f Sam 2500/t 1500 1800/w sunny/c 2/LocalMail {{ModId}}_StartSam": EVENT CODE GOES HERE
}
}
The preconditions come after the event ID. I've got six preconditions for this event:
Dating Sam -- is the player dating Sam?
f Sam 2500 -- does the player have 10 hearts with Sam?
t 1500 1800 -- is the time between 3:00PM and 6:00PM
w sunny -- is the weather sunny?
c 2 -- does the player have two free inventory slots?
LocalMail {{ModId}}_StartSam -- does the player have a particular mod flag set?
That last was for you, sorry
when you scroll down to the bottom of the log you’ll see three columns with boxes, only some of which are checked off
the patch name is to the right, and you can see that the schedule patch doesn’t have an X under applied
yeah I just saw that, good to know you can debug like that and not with millions of prints
yep it’s handy. i’m pretty sure the target of your schedule EditData patch is wrong but let me check that
i think it should be Strings/schedules/character name
isn't that dialogue schedule?
wdym by dialogue schedule?
schedule in stardew refers to where your character goes during the day
oh yes i was wrong which is why i checked lol
oh do you mean where it goes in the assets? 
yeah
I'll add mod flags to my list of things to figure out
They are basically mail. You send them as if you were sending a letter to the player in the post box. But you don't actually attach any letter message data to it. It sounds a lot more complicated than it is
Also worth noting that the mod I'm copying from just... doesn't use the naming convention, for whatever reason. Possibly because they're overwriting existing events instead of making new ones?
unless there’s a typo i’m missing somewhere, i can’t see what’s wrong with your schedule. maybe try adding a “rain” key and value, in case that’s necessary?
if you're overwriting existing events then you have to use the name of the original event yes
Oftentimes the "name" of the original event is a number (vanilla heart events, for example)
@Button, your documentation is incredible
have you seen her tutorials btw?
No, I came blundering onto the discord and worked it all out piecemeal with all of you guys to help me xD
nope, where do you think the typo could've happened?
I've gone over the schedule and content and I can't seem to see anything odd...
Do I maybe need to apply and Load it separately or is Dialogue schedule a must?
no you have the bare minimum there. i would expect a typo in your target, or else in the target of the include, but i’m not seeing anything there. did you try adding a rain schedule in case that’s secretly needed?
yeah, still nothing
damn :/
it looks like you’re doing everything right to me, i just can’t figure out why the schedule specifically isn’t being applied
OH
It was a typo, in the initialization of the schedules,
i’m just glad we figured it out that was driving me nuts lol

