#making-mods-general
1 messages · Page 367 of 1
after a save is created the rocks will not move
Hi! So follow up to a previous question, when an NPC hasn't been unlocked yet, can you still modify their data?
Like let's say you want to spawn in an NPC with a starting friendship based on how many Qi quests you did prior to them arriving or something. Can you change your friendship with them even when they're not unlocked, or would you have to apply that AFTER they're unlocked?
(example)
if they are not unlocked then they do not exist
Gotcha, ty!
Hello guys, how to fix it
Log found, uploaded to: https://smapi.io/log/54aee7b9427643489c9fe8e8fad8dd55
!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"/>.
@wanton rivet
Is there a best-practice recommended way for a mod to check if it is 'new' on a save (is being loaded onto a save that didn't have the mod previously)?
Not necessarily the 'first time' it's been on a save, just if it didn't have it the last time that save had been loaded.
The way I was thinking was just have a mailflag on the player for "this mod has been loaded" that is applied if the player didn't have it already, but idk if mailflags disappear from the save when the mod providing them is removed (which would be ideal in this case).
how might one make a custom npc animation with a sprite who goes out of typical bounds? I want to do an animation but it the sprite is like 3* the length of a normal sprite
Mail flags are persistent
(the humble green slime when you deliver 33550336 damage)
Mail flags can mean anything
You can see if there’s a SMAPI event OnGameClosed maybe??
It wouldn’t work for force quits though I think
Another thought I had was basically making use of Stardew/SMAPI error handling so that loading a save without the mod breaks something in the file in a way that doesn't get it removed but ALSO doesn't let it work when the mod is added in again, so that OnSaveLoaded can check "hey if this bit of data is either broken or missing, consider this the first time the mod is being added"
or storing the last in-game date the save was loaded with the mod every night, and if it's either nonexistent or any day other than the previous day, count it as a new mod addition
That approach seems maybe more intuitive, was just wondering if there was some built-in way to track the mods a save was loaded with previously.
you can use spacecore for this
spacecore? I’ll look into it, Ty
How to fix
What are you wanting to use the animation in? If it's a schedule, SpaceCore like nic said. If an event, you can do it using temporaryAnimatedSprite without any extra dependencies.
!log Please upload it to the log parser website and share the link instead.
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.
schedule :) spacecore will work
Log Info: SMAPI 4.2.1 with SDV 1.6.15 build 24356 on Microsoft Windows 10 Enterprise, with 4 C# mods and 1 content packs.
the implications of this paired with that sprite and smile terrify me dallas
(gl with your mod!!)
Your map is missing the Buildkngs tile layer.
You're also trying to Load Characters/Cataline twice and they're both exclusive so neither is working.
sorry if this is obvious, but what does this mean? I actually had a 'changes' but ended up removing it because everytime SMAPI would tell me there was an error with it lol
what did you replace it with? you need a Changes field, it's the main part of the content patcher file
could you send your 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.
nothing actually lol, i was following with a custom npc guide and they didn't have one
I think we'll have to see your json to figure this out tbh
also, can you link to the guide you're using?
uh oh json content patcher is mad at me LOL
this is the template
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!
I'm honestly not convinced what you're doing would have worked in 1.5 either but if you follow one of these you should have the correct setup anyway
'coding' is quite difficult lol
Owing to @lucid iron we might be getting PIF furniture buildings. 
Crazy to think about
(the castle is from Pink Sweety Amusement Park btw)
Thanks I forgot to add the letter "s"
Lol
is it possible to determine whether a player just used a totem warp in OnWarped 
for the purpose of skipping a method call if they did
colada i saw that mod think i read you can sit on the ferris wheel or something do you know if that works/ if you can does it move while your on it thatd be CRAZY
might go check myself wonder if that mod would look cute in me list lmao
Log Info: SMAPI 4.2.1 with SDV 1.6.15 build 24356 on Microsoft Windows 10 Enterprise, with 4 C# mods and 1 content packs.
Ask why i can't warp to interior Through the door
for mod help we have a section in server for that, this is more for making mods
Hej
I am making an Esperanto translation mod for Stardew Valley. I already translated the most important things (all items, all letters, some dialogues and events, ...). However I still have the problem that Stardew doesn't have the Esperanto letters: Ĝ Ŝ Ĉ Ĥ Ĵ Ŭ. I have tried to add my own font several times but never succeded.
I can't even succed with adding the Russian font (the most simple non standard font the game includes) as the Esperanto font to my mod. I followed the wiki step by step and also tried a few variations but it never works. Smapi is looking for the following .xnb file in ...\Stardew Valley\Content\Fonts\Esperanto_0.xnb
TLDR: I am trying to add a font to Stardew, but it is looking for a .xnb file in the game files instead.
Can anyone help me?
Log found, uploaded to: https://smapi.io/log/03af20c6ae274375a50dee0d8b6b1928
for help share the mod log using the log checker thing!
i dont think they like if you embed the log into discord
it works fine if you just attach it since the bot uploads it then
aa ok
https://smapi.io/json/content-patcher/af7d24990aa44ddfaeaf392da77647ce
(I uploaded your json to the validator for convenience)
I just tried and you unfortunately cant
you’re loading your font to Fonts/{{ModID}}/Esperanto_0 but it’s looking for Fonts/Esperanto_0
Hm, okay. Should I load it as follows?
{
"Action": "Load",
"Target": "Fonts/Esperanto",
"FromFile": "assets/Esperanto.fnt"
},
{
"Action": "Load",
"Target": "Fonts/Esperanto_0",
"FromFile": "assets/Esperanto_0.png"
},
I’d say try that, yeah
Now it can't find "---> FileNotFoundException: Content\Fonts/Jolesh.StardewValleyEsperanto/Esperanto.xnb"
Log Info: SMAPI 4.3.0 with SDV 1.6.15 build 24356 on Microsoft Windows NT 10.0.22631.0, with 3 C# mods and 1 content packs.
Adjust the FontFile in your AdditionalLanguages entry
Log Info: SMAPI 4.2.1 with SDV 1.6.15 build 24356 on Microsoft Windows 10 Enterprise, with 4 C# mods and 1 content packs.
Why can't I enter the NPC house that I created?
What should I adjust it to? rn it is "FontFile": "Fonts/{{ModId}}/Esperanto",
then possibly you need to target the same thing with your loads?
{
"Action": "Load",
"Target": "Fonts/{{ModId}}/Esperanto",
"FromFile": "assets/Esperanto.fnt"
},
{
"Action": "Load",
"Target": "Fonts/{{ModId}}/Esperanto_0",
"FromFile": "assets/Esperanto_0.png"
},```
Like that ?
did you add a warp? usually it's those of tiledata warps
I've added warp but when I right click on the door, nothing happens.
no error in log?
This is the error
That's what I had. However I just deleted the {{ModId}} from both the Load and AdditionalLanguages entry. Now I can open the load menu.
thansks, still waking up!
how are you adding the location, can you provide relevant code?
And there are no errors in the log
ok! possibly fonts requires a specific path format
So maybe the wiki is wrong?
https://stardewvalleywiki.com/Modding:Custom_languages#Add_a_custom_font
i dont know! i'm not sure exactly of what you tried and the different results
Sorry, what do you mean by relevant code?
!json of how you're adding the location
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.
Content.json file?
if it's where the info are, yes
The wiki says I should use: "Target": "Fonts/{{ModId}}/Esperanto",
But only "Target": "Fonts//Esperanto", works for me.
Funnyly the example in the wiki also is Esperanto
But yeah. It kind of works now.🤩
The thing is that it is now changing the font for all text for instance "Tago 8 de Aŭgusto, Jaro 2" uses a different font and it doesn't show the ŭ correctly.
!json pls
JSON is a standard format for machine-readable text files that's used by Stardew Valley mods.
If you need help with a JSON file, you can upload it to smapi.io/json to see automatic validation and share the link here.
When making mods, it's recommended to edit your files in a text editor with JSON support, such as VS Code, Notepad++, or Sublime Text. These programs will check for syntax errors.
(i prefer no pings)
ok hum
i honestly don't remember how CustomLocations are working, since it's deprecated (basically it works but isn't the suggested way of adding things)
So is there something wrong?
i can't tell, because i don't remember!
i suggest moving to up to date practices
{
"Action": "Load",
"Target": "Characters/Cataline",
"FromFile": "assets/NPC/CatalineSprites.png"
},
{
"Action": "Load",
"Target": "Portraits/Cataline",
"FromFile": "assets/NPC/CatalinePotraits.png"
},
{
"Action": "Load",
"Target": "Characters/Cataline",
"FromFile": "assets/NPC/CatalineDialogue.json"
},```
Here you load twice in Characters/Cataline, which cause another issue (unrelated to the map)
```json
{
"Action": "EditMap",
"Target": "CatalineHouse/Cataline",
"AddWarps": [
"19 7 Custom_CatalineHouse 12 23"
]
},
Here i'm not sure what this patch is doing/supposed to do.
https://stardewvalleywiki.com/Modding:Location_data
there is an example on the page that isn't too overwhelming
Ah i don't see that
ok! i prefer no ping on reply
Log Info: SMAPI 4.2.1 with SDV 1.6.15 build 24356 on Microsoft Windows 10 Enterprise, with 4 C# mods and 1 content packs.
wait, how come you're using Augusto? that seems to be the word for August, but stardew doesn't use months
shouldn't it be Somero?
Sorry, I mistyped. It is actually Aŭtuno, meaning fall.
Thanks a lot for your help. I tried to at these dam Esperanto letters for two years now.
https://smapi.io/log/367061ef538f4f3f8eace3185c16a3df
What does this mean
Log Info: SMAPI 4.2.1 with SDV 1.6.15 build 24356 on Microsoft Windows 10 Enterprise, with 4 C# mods and 1 content packs.
You forgot a field, i guess.
How to add the field
Where can I add fields?
!SMAPI
SMAPI is the mod loader for Stardew Valley. It loads mods into the game, provides APIs for mods to use, intercepts errors, and backs up your save files automatically.
See the player's guide to using mods for more info.
!CJPcheatmenu
Hi! Is it possible to animate a house tile at a specific time using only Content Patcher?
hi, no content patcher is not designed for that
Or, it might be possible if you use CP to patch the map itself to change the tile out for an animated one. You can give that a try but I'm not sure if it will work
If not, then you can animate using spacecore and use CP to set which time it's animated at
Hey so I just released my first mod and rather instantly got asked about putting it on youtube / translating to chinese. I cant think of a reason why this would be a bad thing but Im just suspicious of the speed at which that was asked. Is there some downside to this I dont know?
Translators often ask quickly (farming downloads), nothing bad with that really (unless it's fully machine translated/ai)... first time seeing anything about youtube tho...
I'm editing the Frontier farm map to move a couple of things around, but now some custom trees are not spawning, it seems that the log mentions something about it, but no clue on how to fix it:
https://smapi.io/log/4fd53eea3ed44ed4af7a7a9184f812e5
Log Info: SMAPI 4.2.1 with SDV 1.6.15 build 24356 on Microsoft Windows 11 Pro, with 138 C# mods and 290 content packs.
Suggested fixes: One or more mods are out of date, consider updating them
ok thats great thanks. Ha it's just my first one so when I got those questions within 5 mins of posting my paranoia kicked in.
You can also check the translator's nexus page to see if they have previous work that's been well received
Just as an extra way to quell anxieties
Thanks in advance! But is it possible to change it to an animated one that changes at a specific time?
CP can do patches at specific times, and it can also change map tiles, so yes you can combine both features
ok thx a lot for the help!
stardew automatically replaces certain characters with symbols. This symbol is usually created by *, so for some reason your character is being interpreted as *
It's probably a key code conflict
But for the other font it is working. I think it could be fixed if I also load an Esperanto version for that one, right?
when you set Paths tiles to spawn trees, they also need the SpawnTree tile property
https://www.stardewvalleywiki.com/Modding:Maps#Known_tile_properties
(or they need to be on the Paths layer specifically, if that's the issue)
Yes, I made sure that was the case
The tile 34 is on the paths layer, and the object has the custom propertie, also in the paths layer (for objects)
there are a couple of trees that do spawn, what I do not get it's the inconsistency of the issue
I'd guess some of those tiles have the issue and some don't, but the log doesn't specify which tiles have issues, so it's hard to check
indeed
which other font? what do you mean by this?
can I share the .tmx file? I'm checking every tile and property with no luck, some trees spawn, some don't, I'm at a loss
Late to this, wem, but I added this in MarryMe. If you can't find another solution, I could maybe release SweetActions (breakup, dating, engagement actions) as a separate mod
Thank you! I was told Spacecore could also do it so I'll check that out first cause it also has a few other things i wanna use
Yeah, spacecore is a lot more general and has nifty stuff!
AAAAAAHHHHHHHHHHH
PEOPLE LOOK UP TO ME!!!!
I HAVE RESPECT!!!! IM INSPIRING PEOPLE!!!! OH MY GOSH
THIS HYPERFIXATION MIGHT BE THE BEST THING THAT'S EVER HAPPENED TO ME!
> SVE
> on android
I'm going to have nightmares about seeing those together in the same sentence /jk
it's just missing multiplayer
I don't want to think about the fact that android does have multiplayer now and doing multiplayer modded mobile
it is truly nightmare fuel
question
ik this is like this so the game C# game auto recolor or something, but is that hardcoded or can i change the shape of the white flower head
the second one is a mask and yes you can change the shape of the mask
I found the issue! I had one object that did not have the tile 34, and it messed with the rest of the objects that followed it, I just added the tile 34 and all the trees are spawning 
wrong channel le excuse moi
Alright, can I add a file that is editable by other mods via content patcher (e.g. data/NPCNames.json) without registering it as a dictionary via C#?
I have a token (supported suitors) that is just declared in my content.json. It would be really nice if other mods could edit this, so perhaps I could read the values in this token from a file instead
loading it as a string/string dict should work I think
im gonna go see what all counts as a resource in another mod and finish those up so i can finish my first half of me mod
if that doesn't work you can probably hijack Strings/StringsFromCSFiles/etc.
It's actually not that bad tbh (my phone just tends to heat up a bit cuz of the ~70 mods I've got but whatever)
Alright, glad to hear I probably don't need another .dll for this one thing
I'll see if I can figure out the trickery. StringsFromCSFiles is a fun idea
Thank you
id make edits for earthy and other mods but imma prob just purt "you can edit this for your preferred recolor if you'd like i do not mind" in my permissions thing
the only other recolor resource redo i plan on doing after this is a personal edit for blue grass so its cuter 
Heelo guys i want ask , Why can't I enter the house I built?
did u add a warp
Yes i did but When i klik the door , The Indoor can't be load
!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.
whats the error
omg theres not as many resources as i though
and yet
i havent done any of them somehow
😭
i dont wanna draw more grass/weeds
begrudgingly begins
theres so many rocks idk which one is the right rock omg
Log Info: SMAPI 4.2.1 with SDV 1.6.15 build 24356 on Microsoft Windows 10 Enterprise, with 4 C# mods and 1 content packs.
!json can you send wherever you loaded your custom location
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.
Did I do something wrong?
I dont think you loaded the actual house as a location
you added "Custom_Cataline" but not the house
So, what should I do
{
"Action": "EditData",
"Target": "Data/Locations",
"Entries": {
"Custom_Cataline": {
"CreateOnLoad": {
"MapPath": "Maps/Custom_Cataline"
}
}
}
}
You have to do this for the house as well
i dont see the warp to the house, so i assume you have the warp in the TMX file. But it doesn't look like the names are matching up either
you have both CatalineHouse and Custom_CatalineHouse
Oh I meant in terms of mod support requests from users. Sve and android modding are both notoriously annoying to support while also being widely requested to the point that it's a bit of a meme
I have a Content Patcher question. I have this Overlay code for decorations that can be optionally turned off inside buildings, otherwise it shows both outside and inside, and I'd like to know if I can combine it in a single paragraph, for example with Dynamic tokens, instead of two separated ones (one for outside, one for inside) I've tried things already with Dynamic Tokens but nothing worked (I am bad at coding). Here's the revelant lines of code:
Section one: "When": { "FoliageOverlay": "True", "IsOutdoors": "True" }, Section two: "When": { "FoliageOverlay": "True", "FoliageFlowersIndoors": "True", "IsOutdoors": "False" },
Finally I'ts work thanks you , I got the name of the place wrong on TMX
Since my new mod is a framework mod for CP creators, I'll share it here as well even though I've already showcased it https://www.nexusmods.com/stardewvalley/mods/35477
I've created a text box with a simple message, the text displays, but the heart emoji kinda works, it shows as a heart, but followed by a 3, how could I make it so it only looks like a heart?
oooh just with a < it will display as a heart?
yep
awesome thanks!
Mine? it's on LocationChange, so it only work when the PG move in and out buildings. The main problem I would like to solve is giving the -choice- of having the Foliage shows up indoors to the player, while keeping it to one single paragraph, not two, otherwise I'd just set up a permanent DynToken like I did with the Seasonal Foliage in my old mod.
Ugh, I fear I am not explaining myself very well, sorry, English is hard enough without the code-talk...
does anyone know where the flower sprites are
flower crops, decor items or flower dance sprites?
flower crops
are they not in the same place as other crops?
err i dont think so
i think their on spring objects if you mean poppys and stuff
yw 🫶
oh right they're forage, not crops haha, my bad
it happens to the best of us
I appear to have come across an issue where my paths added by content patcher allow me to pick up artifact spots? I think its cause by my mod anyway cause I don't remember any of the other mods causing this?
how are the paths allowing that?
when you pick them you pick artifact spots instead? else?
I just placed it down ontop of the artifact spot, I expected it to just place the path on top and just cover it
I'm just looking for other artifact spots to see if vanilla paths do it, finding them is kinda hard
It shouldn't let you place it there at all...
then that should've been the behaviour I'd expect, I have nothing in the content pack even mentioning artifact spots
I think it's Happy Home Designer actually, both vanilla paths and my paths replace artifact spots when a catalogue is open, I tried both my custom catalogue and a vanilla catalogue and it does that same for both
when the catalogue is closed however, it doesn't allow me to place paths on there
hello
If I want a map patch to always apply late so that it won't be overlapped by another mod is it "Update
"Priority": "Late + 10",
I think that "Late" is an upperlimit. I don't think you can add to it, but I know you can subtract from it. Could be wrong, though
"If you need a more specific order, you can use a simple offset like "Default + 2" or "Late - 10". The default levels are -1000 (early), 0 (default), and 1000 (late)."
It doesn't explicitly say that 1000 + is bad, but it also doesn't show an example of adding to that number so... idk
for loading blank jsons should you be loading them early?
You probably just need to load them before you would use them. For example, if adding an event to the bathhouse, you'd want to load your blank.json to enable that bathhouse event first
Since Events/Bathhouse_Menslocker doesn't actually exist in vanilla. You need to create it as an asset (by loading from blank.json) before you can editdata on it later. If that makes sense
ok but for compatibility do you need set the priority on them so i dont blank out other mods?
does anyone have a link to or know how to force a meteorite
Good!
that said if someone does Late + 11 you will be overwritten 
What are you using blank.json for, exactly?
you cant force a meteorite
not without C# anyway
"Data/Events/AdventureGuild",
oh i thought there was a console commmand
also yes always Load blanks with Low priority
oh, meteorite for testing? im not sure then
ah its ok ill find it somewhere :3
apparently there is debug setFarmEvent meteorite
means its like most console commands
most (all?) of them dont output to the console. they just work
Excuse me
. The last line in the picture. I looked in the manifest I was updating and couldn't see where there was a Shop |[shopID] to change
. For context, it was a mod allowing different items to be bought at the normal shops (like prismatic shards from Clint). Am I missing something?
(It looks like the conversion went okish but a bit rough going
)
that seems to be referring to TileData in maps
if the mod previously added a map patch to add a tile to click on to open the shop, it needs to be updated
Ok 
hello when making a content patcher furniture pack do i need a front png ?
ty \o/
woohoo it worked it did not land in the perfectly cleared patch i made for it though, because its a very rude space rock (i had to go hunting)
Here's a screenshot of the code as it currently works (as writing it down in the chat would look weird since it's kinda big). To repeat myself, I want to give players the choice of having the decor show up inside buildings or not. First one only shows the decor outside, second it also shows inside buildings when the players choose "FoliageFlowersIndoors": "True" in the settings. I wanted to see if I can combine the two paragraph blocks into a single one with different tokens (like Dynamic ones), but it's either impossible, or I am just bad at Tokens. 🥴 (For some weird reason I like to have as fewer code blocks as possible.)
would it be this? 
you would need to edit the assets/LinusShop.tmx file presumably, somewhere in there im guessing there will be TileData that needs changing
Alright. I'll take a peek. Thanks again 
!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.
Yeah this is a sign that the summer heat is back, my brain completely forgot there is that thing. Thank you.
Okay, I downgraded the json so it only shows the important bits (yes it still works I checked). Can I combine these two code blocks into a single one, perhaps using Dynamic Tokens, or it's better if they stay separated? If it looks like a foolish idea, feel free to tell me not to bother with it, I am bad with coding so I glady accept constructive criticism.
https://smapi.io/json/content-patcher/729775cff0304d3c80c7a70b83c939a0
if you use the Merge token i imagine it should work fine if you do "Merge: {{IsOutdoors}}, {{FoliageFlowersIndoors}}": true as that means the condition will be true if either you're outdoors or they have indoors enabled. if both of those things are false then the When condition will not match
im confused why you have a UseMod config at all though?
It's so the mod can easily be turned off without having to turn off every single choice. I have several mods that can work together or can work with other people mods (like the decor mod can be used with other craftable retextures) so it's easier if there's a global off switch for my mod(s).
there is already an option for turning off an entire mod though, it is called uninstalling it
Hello! I'm totally out of ideas for dialogue lines, any tips for getting creative again?
mainly this : https://stardewmodding.wiki.gg/wiki/Tips_%26_Tricks_from_the_East_Scarp_Community#Daily_Dialogue_Tips_by_Yri
This is a list of tips and tricks for custom NPC creators collated from the East Scarp server. Feel free to add your own!
That's great, Thx a lot!
I wanted people to have an easy way to test my recolor/retexture mods in their game and with other mods without the whole install/uninstall every time, since some can work together with other mods for a mix and match, that's all. It's definitely been easier for me while writing them, that's for sure. 😂
Anyway I'll test the Merge option after dinner, thanks for the suggestion!
i need to add a config for my individual items later for my resources huh
ill remember to do that later
So I'm making a mod that's basically a stripped down SDE, with just Claire, Susan, Dusty and some food/fish/recipies
I don't have much modding experience but I've come a good way in it, but hit another snag
I've gotten Emerald Farm exterior to work properly, but neither Susan or Claire are present in the game yet (I've also synched up all the code and assets I have a hint of needing, so that should be working)
Also the interior of Emerald Farm doesn't load when I try to walk in, which should be possible even on day one with NoClip activated to get there
Also neither Claire or Susan show up in LookUpAnything, unlike day one of SVE where they do, so they aren't loading in for some reason, but I'm also not getting an error.
Here's my SMAPI, complete with patch summary:
https://smapi.io/log/3cdb0e72c99444bf8fd449633903622d
Log Info: SMAPI 4.2.1 with SDV 1.6.15 build 24356 on Microsoft Windows 11 Home, with 9 C# mods and 1 content packs.
This is just my modding setup 😅
And yeah I need to do something about the festival Json's too, and I'm not sure what to do about those yet either, but those festivals are far enough off in the save I'm playing now that they're low priority
the festival fix is easy, it tells you you need to specify an Action
Yeah, I just need to poke around for how and where
I could just compare it with another festival to figure that out and it'd probably be like 2 seconds, I've just been poking at trying to get the characters to work
no its literally just saying you have no "Action" field so content patcher doesnt know what you're even trying to do for the patch
theres no Load, no EditData, nothing
it’ll likely be “Action”: “EditData”, but i don’t know since i haven’t seen your code
Sorry. One last thing. I'm using Notepad++ to look at the .tmx files. Is that right or is there another way? Cuz I'm reading the wiki and it seems different to how I see it 
i mean, you can, but a tmx is a map file. you're meant to use Tiled when doing actual map editing
https://smapi.io/json/none/dfc8585b61064b0c9e51c438a3cb0b66
Okay here's the json for that
{, then "Changes": [
then it's just a very stripped down version of the start of the SVE file
line 33
Oh gdi, thanks
and the one at line 60 has no action field, as the warning says
or target, for that matter
Ooh okay, so it should be there before the append operation like above
(above that, that is)
I don't know where the room interiors information is, I mean, probably SusanHouse.tbin, but then how is outside working but not inside?
There's not exactly a tilesheet for anyones house layout in SVE, either
outside and inside will be different maps and different locations in the game data
[[Modding:Maps]]
take a look at this to get a general sense of how maps work
@uncut viper The Merge code works perfectly, thanks so much!
I spend most of my time drawing the animated hair for Fashion Sense so I often forget how Content Patcher works, ahah!
(We love your hair!)
(Thank you so much!)
Hello my lovely people, I have a few questions for anyone who might point me in the right direction :3
So, I have all the required things setup (ive previously modded for a different game with json and c#) Im just a little confused on how i would start by making a simple accesorie (Like a Cat Ear Headband or Mask Etc.) I'm new to Stardew Modding but not new to the coding languages given. So any help would be apreciated! and thank you ahead of time.
You probably want to take a look at Fashion Sense framework
Ah yes i have heard of that. I will check into this! Thank you.
if it doesnt go beyond vanilla dimensions it can be a content patcher mod
but tbh most people probably consider being available via the FS mirror a plus
Hmm, I do not plan on making anything beyond the vanilla dimensions. Well not yet at least...I would like to start small.
Another question: Does it matter how i have the sprite sheet setup? For example, the object in a different order then it would appear in game?
in most cases no
Hewo I have an inquiry...
[game] Failed parsing condition 'WEATHER Target Rain GreenRain': no location found matching 'Target'
-> why?
This is a Condition for NPC Home entry, and it has a normal default... and I can't get it to happen in my saves just others ><
(stuff like furniture rotations/etc. will expect the sheet to be ordered in a certain way)
Right, done, but none of that told me how to get an XNB to load into the game
And StardewXNBHack only seems to work on the game itself, not on XNB's in mods, unless I'm missing something
(apparently the solution is not "try to load it in like a tbin or tmx file in the content.json", I did try that)
you shouldn't be working with XNBs, for maps you should be using .tmx or maybe .tbin
what happened when you did this? what was the error?
SVE has all three
SVE is an old mod and does some no longer best practices stuff
i would not recommend looking at how SVE does things because it's very complicated
(CP can load xnbs if you feed it)
I mean I'm aware of this, but I'm working directly with assets from SVE, which is the problem
i would also absolutely not recommend trying to trim down SVE into a smaller mod without understanding how to make a mod normally in the first place
Seems i have done something wrong oops
So I have to work with what it gives me
(for context)
[Content Patcher] Patch error: Susan_And_Claire > SusanHouse #2 has a FromFile which matches non-existent file 'Assets\Maps\XNBs\SusanHouse.xnb'.
Well, the choices in that case are a bit unfortunate—either learn the old, no longer used SVE format to understand how the original assets work. Or convert it to a newer format that other people know and can give advice on.
it seems like target location can be null if the NPC doesn't exist before when spawning
your from file must match the filepath and file name exactly
as it exists in your mod folder
Did you intend to make your mod depend on JA? If so, just install JA
Otherwise check the manifest
think the actual problem there is the typo in the uniqueid
unless it really is spacechase0r with an r at the end?
GDI
Okay I knew that, but I missed that it's just Assets/XNBs, not Assets/Maps/XNBs...
(obligatory do you need JA in 2025)
(the answer is no you dont)
need a c# sanity check please, are the possible values of levelsDown 3,4,5,6,7,8,9,11,13,15? (no 10, 12 or 14)
seems right to me
ty
I kind of understand but I am also confused...
it's probably safer to check the farm weather
i dont believe you can use Here/Target for conditions on things that may be read before the player is actually in game, otherwise the player does not have a "current location" to fall back to
some checks of Home data provide the NPC's current location as a "target", but during initial creation, it uses null rather than dig the location out of the home entry or w/e
Target Here or even Town always says no location found matching 9-9
I mean I've made small mods before
This isn't my first foray into modding
There's just some new stuff
the problem is actually that you are trying to work with very very old stuff
And now that it "worked", absolute jackshit happened
Which I kinda expected 😅
I've just had no hint of how to get the interior to work, while the exterior was pretty simple
and even if you werent, trying to pare down a huge mod like SVE is a tough undertaking anyway and a lot of people may not want to touch that with a ten foot pole
Yeah, I know
I think Home is checking during loading for initial NPC creation, which may mean that a lot of GSQs don't actually work in its condition field 
(The universal opinion when people hear I'm doing anything with SVE, regardless of server, seems to be "omg holy shit whyyyyyyyyyyyyyyy please just don't")
you could arrange for their day 1 home not to matter & then I think full context would always exist? not 100% sure though
you should always have one conditionless home anyway
Yeah there is a conditionless home
you'd probably want to have a top listing that's just "if day 1, use this" too, so the others aren't checked
or CP/GSQ to make it use something else on day 1, etc
it's a little bit hard to diagnose the problem without knowing what exactly you're seeing or how much you know about maps and locations. have you created the location for SusanHouse interior? what happens when you try to debug warp there?
How do I make my NPC change their sprite sheet and portrait when they're at the resort?
(for context, it loops through Home entries in order, then stops if it finds a valid home; it won't even try to read the other conditions)
Using CP, is it possible to separate content.json into smaller files? I'm at the point where I have more than 1k lines haha, I've already worked with POO before but i'm not sure whats the correct approach with content patcher
Thanky for the in-depth explanation Esca, I'll see what I do, because I can't get the error to happen for me (regardless of new or old save)
Oh wait. i have zero clue what im doing oh dear
So I can have multiple .json that start with the same "Changes": [], define different patches and just include them in the main content.json?
if you load portraits and sprites for your NPC with _Beach appended they should automatically be used
Okay i was meant to use Fashion Sense. But instead i used the wrong json file.
will i screw up every NPC schedule if i make circular maps? i.e., i have a map that branches off the beach, what would happen if i made one to connect that map and the town map?
I mean I didn't make one
I assumed SVE would have that
And tried turning the .tbin into a .tmx (at least, by changing the end part, since it wouldn't let me load in/export the susanhouse.tbin file (which I know are outdated and such), and tiled told me it wasn't a map file, so...)
What the 265 meaning guys
did you enable tbin in tiled extensions ?
tile index
How do I know the tile index?
what are you trying to do?
I want add day tiles and nighttales on TMX map
i would assume SVE has that as well, yeah, but idk what you've stripped out. i also don't know if SVE uses old methods such as CustomLocations to create its locations
select the tile you want to change it to (for example, if you're doing daytiles for a window, select the yellow lit up window tile), stamp it onto your map temporarily, then hover over it. in the bottom left corner where it displays coordinates like 113, 34 [256] the number in [] is the tile index
I mean even going through a fresh copy of SVE, nothing is there
I think it does use customlocations though
I settled for late +10
yeah custom locations is old and i don't know anything about how to use it unfortunately. your options are to learn how SVE does it or update it to work with 1.6
Wouldn't be the first time I did that for this mod
Oh wait, name/action/target/fromfile is the current thing
I already changed it to 1.6 from customlocations
I see , thanks

I just need to... I guess make a new map? Or somehow unpack the old assets? (the wiki says I can export into tiled from file, export, but it's grayed out)
can you show a screenshot of what's greyed out?
were you able to open the tbin after enabling extensions like lumi said?
...except exporting would mean moving it outside of tiled, so of course it is
Except doesn't help if I can't open it
My brain clearly wasn't working when I said that 😅
I can't find that
I've had tiled for basically a few minutes
it's somewhere in preference/extensions if my memory serve
but if anything, you may be able to google it!
and maybe answer people when they ask
...I can only go so fast?
it’s greyed out because there’s no map open, btw
Like, google was my next step
Yeah I figured that one out
i mean, if i suggest a fix, you ignore it, then you ask same question, i suggest same fix, it is not a question of fast
it's rather a question of taking the time needed to read answers!
What do you put in a "when": { } argument to make it check for specific seasons?
see here! there's the whole set of default CP condition listed
Does anyone know any way to manually/force-unlock an NPC loaded in via Content Patcher with C#?
what do you mean by unlock?
just curious, why does it have to be C#
you can just change the unlockcondition whenever you want by editing the same asset
out of curiosity, what are you trying to do?
Efficiency, mostly. I have a C# component that scans once to get a list of characters that are ready to be added into the world from a roster, and then edits that character's data once they are spawned in based on previous player activity. Their UnlockCondition is currently a custom GameStateQuery that iterates across a list of entities, and I'd like to avoid having EVERY currently-locked NPC iterate across every entry every night if possible.
...as far as I can tell, I simply missed/glossed over it while working on whatever it was I was working on at the time and hoping that would work, then forgot, then got scolded for missing it
(The second part - editing that character's data based on the preexisting entities - is why I'd like to have it mostly C#-handled, bc while I COULD use TriggerActions for that it feels like moreof a workaround than anything so I was curious if there was a more direct way to not ping-pong between C# and Content Patcher)
that sounds right! now you can take the time to set stuff and say if it fixes the issue
editing a characters data without going through the asset pipeline sounds like a recipe for invalidation related disaster
hi yall
especially since in multiplayer the NPCs arent synced all the time
and are constantly being recreated
It seems my Custom Accessorie isnt being loaded?
I mean i get no errors
but it seems the actual item isnt showing up...
wouldn't unlocking them have the side effect of adding them to the world when they shouldn't be, though?
The goal is to unlock them. I just want to unlock them, and then update them with some modded data tags. And having Content Patcher's conditions unlock them would mean I'd need a C# component to activate on unlock (hence triggeractions), and the sequencing's just a little tidier without that lol
your modded data tags will be lost as soon as any other mod invalidates Data/Characters
or as soon as a farmhand goes to a map without that npc
So
I suspect you could re organize your mod so you don't have to iterate the world
Then make the custom gsq a simple dictionary lookup
This feels like you're trying to get out of an architectural issue
I want to ask, when SMAPI and Content Packer update, do I have to update my mod too?
Unlikely
it's mostly game updates you have to worry about
Oh! I did actually do this just now mid conversation lol bc I realized that too ty for mentioning. I was just curious if there was a way to spawn in an NPC that doesn't rely on the UnlockCondition.
How would I go about making them persistent then? I was just adding them as entries to their ModData.
Or, custom fields in this case
ironically, i believe moddata would be fine here, but customfields is not, as its read from their CharacterData
any time Data/Characters is invalidated and refetched your CustomFields get wiped and replaced with whatever is in the content pipeline
Goootcha
but neither of them will really solve the multiplayer problem, as theres no guarantees a farmhand will have the same moddata on their NPC that the host does
not impossible to work around, just something to keep in mind
Noted! Ty!
also, a farmhand cannot write to the moddata unless they are in the same location as the NPC, for the same reasons
it will just be lost
(the same goes for location mod data, as well, unless it is an active location like the Farm)
Makes sense! It's storing info into the save file from host rn so theoretically that won't be an issue?
whether its an issue or not entirely depends on what you're trying to do and what your intentions are and what code you've already written
i hope you're not trying to write to the save file when the player is a farmhand
I shouldn't be but I will make sure I do not lol
(A simple check for if(Game1.player != Game1.MasterPlayer){ return; } should do the trick yeah?)
okay...I seem to not understand what im doing wrong with making a content pack for FS
Im following the Github wiki and yet the Hat does not load in.
So far ive seen no errors other then it does not appear
I added _Beach to the sprite and to the portrait and my character still won't change to the correct spritesheet or portrait. I may be doing something wrong, I'm kinda new to modding. Could someone help me please 🙏
Are you expecting them to change immediately upon getting to the beach
Or is it smth like
Their outfit when the game (not you) selects them to go there
If I’m comparing dates to the stardew calendar, would Spring be January, February, March, and Summer be April, May, June?
what are you doing to deal with any potential issues that arise with an npc existing too early? e.g. their house not existing or something
Yes, I was expecting them to change outfits when they entered the changing area, but they never do. I assumed the issue was with the code, not with the game's random selection, since I know some NPCs, like Lewis, don’t always change either. But I've tested it five times on different days, and my NPC never changes their appearance.
By default if the assets exist correctly they will change
Can you please show all your code
you might need to use IsIslandAttire? not sure https://stardewmodding.wiki.gg/wiki/Tutorial:_Adding_Seasonal_Outfits_via_Appearances
If you want to add seasonal outfits for your NPC, there's two ways you can do this: the token way or the Appearances way. Appearances is a new code structure added in SDV 1.6, so if you're looking at an older NPC's code for reference, they'll most likely be using the token way. The main difference between the two is that the token way is simpler...
did you mean resort beach or pelican town beach
also yeah show your code
How do I make the lights only turn on at night?
you need to set both day and night tiles
Do you have it hooked up in your Dispositions?
Maybe a silly question, but never hurts to check
Sorry if this is a really nooby question, but I just want to be sure, is there a specific code or patch needed to make the _Beach sprite and portrait work for custom NPCs? I thought just naming the files with _Beach would be enough, but now I'm wondering if I need to add something else to make it trigger. Thanks for your patience!
I have it set to true!
anyone know where the bulletin board quest data is stored?
!json as requested pls post your code
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.
Why the NightTiles Error
exactly what the log says: there’s no tile at those coordinates
(pls use the smapi.io/json link)
oh sorry
anyway the issue is you only loaded into Characters/Julia and Portraits/Julia
you want to load into Characters/Julia_Beach and Portraits/Julia_Beach
and no When conditions
what kind of data are you looking for. do you just want the strings
the game will handle that
Are day tiles and night tiles the same? I copied daytiles to nighttiles
is there any data about the bulletin board quest like conditions for completions and such? can't find it in Data/Quests.json
(as a side note I highly recommend adding {{ModId}} to your NPC's ID, to maximize compatibility in case another mod adds another NPC named Julia)
the coordinates will all be the same, but the tile indices will not because you’ll want different ones to appear (dark windows and lit lamps at night, light windows and unlit lamps during the day)
nope, there is not. its always item delivery and it just pulls from valid characters who are allowed to have item delivery quests
You need to actually put a tile on the tmx map itself where you want this to happen, and it has to be on the right layer. This is generally the day tile
or rather its not always item delivery but when it is, thats hardcoded
ah okay thanks! makes sense
Thanks a lot @brittle pasture !
How do I know the tile indices for nighttiles
you can use the same technique i showed you earlier where you stamp it temporarily and then hover over it
then do you know where the string for the bulletin board quests are located? it's not in Strings/Quests.json...
Where tile indices for nighttiles
oh wait I've messed with those, lemme see
Strings/StringsFromCSFiles:ItemDeliveryQuest.cs.####
tysm button!
not something you can edit if you want a specific combo
nor doable if you want a specific string for a specific npc
Ye there they are
[469] Those are tile indices?
You're not looking for something labeled "night tiles", by the way. You are looking for that window but darkened.
If you look at the index of that tile as shown, it'll be the day tile still
yes, the number in brackets is always the index of the tile
I see thanks you guys
Okay I'm running into an extremely weird issue. Does anyone have spacechase0's @ so that I can discuss it with them? It seems to be some sort of mod interaction
casey is on modding hiatus here
what's the issue anyway, perhaps the c# knowers can help
I am trying to hook into Crop.Kill(), with a prefix patch. The intent is to notice when a crop is being killed, and tally up the number. I do it with a prefix, because I want to check if the crop was already dead before calling the method
What I do exactly matters very little. The logging line you see there is all that matters for this problem
When I play the game with just my mod, this works fine. I can tally up all crops that die on season change
But when I play it with JsonAssets and SpaceCore, suddenly, this patch is not running at all
I originally was testing with the debugger, but eventually switched to just logging it, for convenience
It appears something in these mods is fighting with my code. I'd like to fix it, but also, I'd like to not be overbearing in my patching in a way that would impact the other mods negatively
Hence the desire for a discussion 😐
it sounds like a harmony priority thing, but are you ever returning false from that prefix?
No, I always return true in this method
why is it a bool prefix at all then?
I do it with a prefix, because I want to check if the crop was already dead before calling the method
why is it a bool prefix at all then?
Take your prefix and make it a void
You mean to just make a void prefix?
a bool prefix, when returning false, skips the actual function
it also means it has to deal with the priority of OTHER bool prefixes
Yeah I can change it. But I don't see how that would fix my problem
if someone ELSE returns false before yours, your prefix is also skipped
void prefixes always run
ohhh
however, if its a void prefix, it is considered side effectless
I did not know that
and will never be skipped
Alright, then I'll try this
I've been getting into the habit of making void postfixes and bool prefixes and never thinking much about it
harmony moves in mysterious ways
Lol
this way is actually not even at all mysterious
It makes sense if you're willing to sit down and read the code
it's unexpected at least. maybe even mysterious
i've been digging through the JsonAssets and SpaceCore code and couldnt find an existing patch on Crop.Kill() though. That was my first suspicion, but then when I found nothing, I started to believe it was something else
just a little mystery as a treat
there's a console command to list every applied harmony patches to a function
does prefixing seasonal tilesheets with my mod id prevent them from automatically being used by my map? (i suspect yes, just confirming that's my issue.) is there a suggested different target to load them to, if so? this is how i'm loading them rn:
"Target": "Maps/{{ModId}}_finchhouse, Maps/{{ModId}}_FRL_Elevator, Maps/{{ModId}}_tongueandtail, Maps/{{ModId}}_furniture, Maps/{{ModId}}_furniture_2, Maps/{{ModId}}_furniture_3, Maps/{{ModId}}_wizard_furniture, Maps/{{ModId}}_fall_Lighthouse, Maps/{{ModId}}_spring_Lighthouse, Maps/{{ModId}}_summer_Lighthouse, Maps/{{ModId}}_winter_Lighthouse",
"FromFile": "assets/maps/tilesheets/{{TargetWithoutPath}}.png",```
the lighthouse ones are where i'm seeing an issue
okay thanks!
Is it being applied? And to the correct method?
judging by that screenshot, you're checking that dead.Value is true in a prefix on a method where it's set to true
so it may just not be dead until after the patch
oh, sorry, missed the text above it & ig that's intended
You're using breakpoints right?
it sounds to me like something you have installed is just skipping the call to Kill() entirely
What I have installed is this:
And I've confirmed that removing either JsonAssets or SpaceCore makes it work fine
So yes, it seems the Kill() call is skipped
I'm just not sure why or how
That's odd
The crops do die though. They dont magically survive. So whatever is skipping it, is killing them properly anyway
⬆️
harmony_summary in the console should list anything that edits Kill or newDay
(and I guess HoeDirt.performToolAction if that's a case you're testing, the other Kill caller)
harmony_summary
I'm scared it'll list hundreds of patches. Any way to make it list only the patches from a given mod?
looks like you can word search for the method names
help harmony_summary
[SMAPI] harmony_summary: Harmony is a library which rewrites game code, used by SMAPI and some mods. This command lists current Harmony patches.Usage: harmony_summary
List all Harmony patches.Usage: harmony_summary <search>
- search: one more more words to search. If any word matches a method name, the method and all its patchers will be listed; otherwise only matching patchers will be listed for the method.
I usually just do all and then grep through the file
Spacecore patches crop.newday iirc
I see this as the most suspicious
StardewValley.Crop.newDay
- spacechase0.JsonAssets (transpiler)
But I had found this one already here:
https://github.com/spacechase0/StardewValleyMods/blob/develop/JsonAssets/Patches/CropPatcher.cs#L34
I'm not a transpile guru, but it did not strike me as breaking the Kill() call
Plus, I'm not sure if this is outdated or something, but it says this:
// The only reference to 90 is the index of the cactus fruit for checking if it is an indoor only crop
if (instr.opcode == OpCodes.Ldstr && (string)instr.operand == "90")
And I see no reference to 90 in the actual decompile
This is what I was trying to remember
Yeah I found this too, but HoeDirt.destroyCrop() is different from Crop.Kill() and they aren't called for the same things
How long is Crop.Kill
could just be an inlining issue, if that's still a thing
(nothing I patch is that short
)
Would it get inlined with other mods, but not inlined in "vanilla"? 
because if so, yuck
time to patch NewDay instead
Inlining is done by the jit heuristically
I did run into inlining issues for the traveling merchant days in the past, but only on Mac. That was fun to debug
It depends on what gets called when, tbh
I'll switch to patching this:
I'll test for the same conditions and run my code if I expect it will go in this if
What if u just not patch anything and do stuff in daystarted
What would that improve?
Less usage of harmony and transpiler reduces the chance for that one AVE bug
But it does depend on what you intend to do with the patch
AVE?
btw I'm genuinely interested in your reasoning, but I think I'm way beyond the point of getting my harmony under control 
AccessViolationException
sometimes Harmony just decides You Can't Do That
that is one i would call a mysterious way
Eh dw about what you did previously it's more just making a choice to not use harmony when you can
(though its also possible to get AVEs randomly without Harmony too, so who knows)
Like if u need newDay to not do something and that something isn't easily reversible in daystarted
Then yea harmony go brrr
However i wouldn't patch newDay just to do something i could do in smapi day started
Just fyi, I believe this code runs on day ending, not starting, as it happens before the save. But your point would still stand regardless
Yes I know, that's why I said your point still stands
Yeah I think this is more a case of, I have a nice architecture that works well and is organized, for the patches, but my actual Event hooks are kinda messy and generally do meta-game stuff, not in-game stuff, so I'm a bit wary of diverging from the pattern. Not sure how justified that is. Just a preference probably
well u can have multiple event hooks if u want
Yes I know that
Specifically you can listen to the same event multiple times
Someday I might do a big refactoring and actually set myself up for it
What is it that you want to do with crop kill exactly
I just never spent the time
Tally up how many crops the players let die. It's for a custom bundle (Bad Farmer Bundle) where your "currency" is how many crops you allowed to die
I tally them per type too
You could Harmony patch the SMAPI events instead of hooking into them, just for fun.

I made an event with the precondition of having seen another event, and not having a specific CT. It only works correctly when I use the Content Patcher condition regarding the previous event but not when I use the event precondition, and I'm wondering what the difference is
The event that doesn't work:
https://smapi.io/json/none/871fb14feace43e8ae4470ff5ace3d01
The event that does work:
https://smapi.io/json/none/02f5d2c1d8ec42eaae5fe62bc45e5488
you could even do it with Content Patcher with BETAS Harmony
Ah u need to count up how many crops are there before and after newDay then
Been there done that, just remember to patch both dispatch mechanisms
That's the scariest thing I've ever read on this server
It's the core of Profiler
you shouldf spend more time in here
They are transpilers too for extra points
Not really. My approach is to simply check if a crop is about to get killed by newday, and if so, i increment the counter.
So
if crop alive && crop about to die then increment
That could entirely be done in the DayEnded events
Like profiler!
I'm curious to see what this profiler does. Specifically, what it does, that Resharper (DotTrace) doesn't. I've been using that, and it has served me well
Well i was speaking for the smapi event approach
like when I noticed suspicious intermittent lag on bundle menus, and realized I was querying the network every few seconds on the main thread

and I was doing that, even if you weren't looking at the network-based bundle lmao
"niko_sleep": "19/19/19//laying_down/offset 0 -4",
she doesn't appear to be proply using her sleep animation--it's hard to tell behind the covers, but that looks like it might sprite index 0 or something, not 19
Profiler is mostly useful to give to other ppl to install
Then you can look at their log n see what's up
It is ligher than full c# profiler i think
Also profiler works on measuring the time of discrete events, not doing CPU samples of where the thread(s) are
Alight so it worked fine, thanks all who helped!
My release is now out, and people can now do the Bad Farmer Bundle and Joetg Bundle even if they use SpaceCore and JsonAssets 
Tbh u dont need to support json assets in 2025 
Pretty sure I need it for one of the mods we're integrating
Has that mod not moved to just cp yet?
I would need to figure out which lmao ill look into it
does anyone want to test a mod 
how much effort does this testing need
very low effort ☀️
simply take the bus to the desert (debug time 820, wait 10 mins, debug hurry pam)
oh yeah use 100% zoom since i need to fix that
ill test rl quick
Is niko_sleep called in your animation schedule?
You should see the crimes spacecore commits for its transpiler tools
no, i use bed
@tiktoklink ⤴️ makes excellent use of DrawUserPrimitives 
Followup: is niko the internal name of the NPC?
no, it's NikoSasaki... is that a problem with bed? she's the first one i've tried using that command with
just tested it, when i rode the bus, this image appeared: (very cool blueberry!) redacted image probably too late but -
but after that i just woke up in the bed the next day, was that supposed to happen?
wow spoilers
<npc>_sleep typically looks for the internal name of the NPC
Was that misspelling intentional for comedic effect or have you been misreading my name?
(also thank you for the almost-ping, I'm curious to see what you did with it.)
do i have to tap left every so often for 8 hours to get to the desert festival?
Seems like it was an artifact from a previous mod folder. I cant find a mod in my mod set that needs it
Wait you can press buttons on the dash?
you can download the mod whenever you want 
i cant spare 8 hours right now
no hope for me
i mean the element of surprise is gone but it's about the journey not the destination
oh strange because my other NPC's sleep animation worked... or at least i assumed it was working, again hard to see under the covers lol. so the key should be nikosasaki_sleep?
there are penalties for running the bus off the road 😌 be grateful i don't ask you to repair the bus again
i should make you repair the bus again
so whats the deal with DrawUserPrimitives then
any idea why my npc is doing this? Ive been struggling with this issue for a good bit, lol
whoops should i have spoilered it 
Assume case sensitivity unless told otherwise, so maybe try NikoSasaki_sleep ?
in this case actually its case sensitive to need lowercase
i was going by this
well it works otherwise and... veery realistic 
That would be 'told otherwise' then 🙂
cool, thank you!
sometimes with the wiki i'm like "but what if i'm jared, 19" and doubt myself
well we can't skew/distort textures afaik so i had to do the next best thing for perspective
it makes sense when you're playing lol
why not do math on the raw pixel data of the texture2d
I mean, the wiki is not infallible but it's usually pretty close to correct
i think you just sold me on why not
It's just a convolution
being jared, 19, would actually imply the wiki being correct but the jared incorrectly reading it. we are all jared sometimes
(thank you, I did not get that reference)
("whats up im jared, 19, and i never learned how to read")
i couldn't even work out matrices for forcing perspective on primitives. i'm not about to apply them on array convolution
it cant be that convoluted
i have a degree in this but that was. a long time ago
what do you have a degree in now then
I'm surprised monogame doesn't come with convolution
temperature
not even using kelvin? kinda cringe
Is blueberry an SI unit
Lord Kelvin
I remember he was an absolute shit when it came to the age of the planet and evolution
I mean wouldn't a fragment shader be easier and faster than editing pixel data on cpu
is it as fun though
you're not a modder
is it as fun as driving the bus
We love matrices and math in this house
New quote added by atravita as #6494 (https://discordapp.com/channels/137344473976799233/156109690059751424/1394105969436397709)
i went with whatever got me to driving the bus faster
Yayyyyy
did you implement a speed limit
70mph 😌
What about backyards
how about you play it and FIND OUT
Actually I'm not allowed to play video games
bc im trying to figure out how/if i can do something with git i dont have time for busses
It's in the contract
I do like math but transform matrices I don't understand from a practical standpoint, especially since you need a 3x3 for 2d and 4x4 for 3d
What ailes thee
its off topic so i will be in the off topic zone
The only games I'm allowed to acknowledge are like rock paper scissors and tag
||this is a katseye reference||
In the old days it was just rock, rock, rock and everyone always tied
Hello, again! How can I make an NPC use a specific sprite sheet and portrait during a specific festival? Are there any tutorials or guides on how to do this?
Appearances are what you want! Let me see if I can find the wiki page
this worked btw! <3
in any case though transforms wouldn't have helped a whole lot, since the 'texture' still needs to scroll, and it's easier just to make a whole slew of new triangles for the road stripes and lerp them from vanishing point to the bottom
i do enjoy a good lerping it has to be said
Something I have found myself using a surprising amount is a method to map a value from one range to another
Like a smoothstep into a lerp
ofc my code for actually doing that is despicable & rotten but given it's all done in a weekend i'm fine with it
bumping this
supposedly:
hm, although this example had the two maps only circular between eachother, not with other maps
hmmm
i mean i suppose i could load a dummy map to test it. i just didn't want to get all excited about map design for no reason lol
related question, what's the reason for banning NPCs from backwoods? is it the circular pathing, or is it because of inaccessible warps?
not contiguous (inaccessible warps)
aha
I think farm is blacklisted from pathing so that prevents the circular pathing
oh that makes sense yeah
does SVE do anything special in regard to its NPC pathing/maps? i'm just now remembering that for SVE compatibility i did technically create circular maps (Town -> Beach -> Lighthouse (mine) -> Blue Moon Vineyard -> Town)
Circular pathing isn't terrible
So I'm making a greenhouse redesign mod, and i cant move the entrance and exit point? Its not a tiledata tile like the water trough
i thought circles were A Bad Time(tm) for the DFS pathfinder
i thought they just lead to inefficient pathing
In sve the blue moon vineyard warp is player only
I mean yes
ah i see
Inefficient pathing and probably a slow pathfinder
i know spacecore somehow fixes pathing--is that just within one map, or would that impact circular maps
bc i do have that dependency
(if the answer is "this is technically possible but not recommended", that's fine btw)
No, dfs can take cycles fine iirc
(what does dfs stand for)
Yeah, it's fine with spacecore
Its map data not tile data. You gotta go into map properties
depth first search
name of an algorithm
I stopped for capitalization
thanks
judging by the decompiled game code handling WarpGreenhouse, you can use Warp Farm x y to override the default warp position of 10 23:
GameLocation greenhouse = Game1.getLocationFromName("Greenhouse");
int destination_x = 10;
int destination_y = 23;
if (greenhouse != null)
{
foreach (Warp warp in greenhouse.warps)
{
if (warp.TargetName == "Farm")
{
destination_x = warp.X;
destination_y = warp.Y - 1;
break;
}
}
}
Game1.warpFarmer("Greenhouse", destination_x, destination_y, flip: false);
which is essentially using your exit warp to override the entry warp
just making sure i totally understand what you mean--because of spacecore, i can absolutely do this?
ah it depends on if you track visited nodes or not (but if you do track visited nodes you also don’t have an efficiency problem)
there’s no situation where cycles cause DFS to be inefficient but not hang
Spacecore entirely rewrites how the map to map scheduler work yeah
awesome!
(this really feels like something that Shouldn't Be In Spacecore)
i feel that way about much of spacecore
(and absolutely not in an upscaling/smoothing mod (even with legitimate reasons about corporate contractual obligations))
every time i learn something new about spacecore i only hold it higher and higher in my esteem
What about in elr
eight-legged race? absolutely not
And thats for the inside not the outside entrance
Yes
at the bottom of the "map" tab at the top of the program. there's something called map properties
But the tiledata tile isn't there
click on that, then on the left there'll be a list of things
the last one, "warp" has two sets of x y coordinates
just edit the first one to the coordinates of your door
Im going you kiss you on the mouth
hehe no worries ive just done two of my own greenhouse mods so i knew the trick to it
you do need to use code if you wanna make the door wider than vanilla. but that's not too difficult either
Ok thats good bc its a two wide now
ok one moment
{
"Action": "EditMap",
"Target": "Maps/FarmHouse2, Maps/FarmHouse2_marriage",
"AddWarps": [
"x y Farm 28 16"
]
}
with x and y as the second door coordinates
and. the correct map target. sorry i took this directly from my code and forgot to edit that part
Bluebs
I've been attempting to get this scheduler into the vanilla game since about 2023
I've given up
So one of the entrance tiles is edited in the map properties and the other one is in the content file
correct
I take the wins we got in the 1.6 one to not take 10-30 minutes anymore and can do it in <30 seconds instead
Ok, sick
the one in the map file will be the one you spawn on when you enter, if thats important
After i finish it could i send it to you to take a look at?
im about to leave for work im afraid otherwise i'd say yes
ofc~!
(Optional) The NPC's closest friends and family, as a dictionary where the key is the other NPC's internal name and the value is an optional tokenizable string for the name to use in dialogue text (like 'mom'). Default none.
This affects generic dialogue for revealing likes and dislikes to family members, and may affect inlaw_<NPC> dialogues. This isn't necessarily comprehensive.
for an optional tokenizable string, how do i set it to the default? empty quotes, or null, or having no value?
i had "friend" in there but that appears too vague in the actual dialogue, so i want it to say the name
I just nulled it when I changed the vanilla NPC's data, I think
ok thanks
Empty string
Defer to atra, they would know better how it works in the code
people keep reporting a "bug" to me that i'm 99% sure comes from SVE. it only happens when users have both mods installed. here's an example log: https://smapi.io/log/dee64994d95240768e9200bfb882a566
my NightTiles don't contain (20, 64) at all. my map patches Town from (6, 62) for a width and height of 16 and 15. am i correct that the order of what's happening is that SVE adds NightTiles, and then i patch the map, and then the NightTiles can't find 20,64 since i removed it? how do i remove the NightTiles that SVE added?
Log Info: SMAPI 4.2.1 with SDV 1.6.15 build 24356 on Microsoft Windows 11 Home, with 122 C# mods and 322 content packs.
Suggested fixes: One or more mods are out of date, consider updating them
looks like empty string and null will do the same thing
relativeTitle = TokenParser.ParseText(relativeTitle);
if (string.IsNullOrWhiteSpace(relativeTitle))
{
relativeTitle = null;
}
I read you shouldn't use queries in When: conditions if you can help it due to performance concerns (?). Is that true and HOW true?
(Yes but it's much harder to put a null in that space with CP, because CP interprets null as delete this entry.)
Queries are more computationally expensive relative to other mechanisms to do the comparisons
it still has value as it can do weird permutations of comparisons that you can't do otherwise, but if you can do it without query, that's preferable
Now that I think about it, you can have an OR condition for two mods by using Hasmod *without* |contains, right? If so, that removes the bulk of my query usage
"HasMod": "ModId1, ModId2" is an OR
so is HasMod |contains=Mod1, Mod2: true
Great to know, thank you.
its mainly when you want to mix AND's and OR's simultaniously that you start needing to lean on query
but you can avoid it more often than you think
even then, a lot of people forget about merge
"When": { "HasMod |contains=mod1": true, "HasMod |contains=mod2, mod3": true }, Does this resolve to requires mod1 AND either mod2 or mod3?
"When": {
"query: (({{season|contains=winter}} ) OR ({{Weather|contains=Rain, Storm,GreenRain}}) OR ({{HasValue: {{DayEvent}} }})": true,
"Merge: {{season|contains=winter}}, {{Weather|contains=Rain, Storm,GreenRain}}, {{HasValue: {{DayEvent}} }} ": true
}
would do the same thing
{{Merge}} my beloved
Can someone explain making a chair work on a building layer of a map to me? I read the wiki and im only kinda getting it
I wanna use those cute little green stools
when you broadcast an event in multiplayer, does the game pause time?
i have an event that happens at night and i don't know what will happen if the event goes longer than 2am
I don’t think time pauses but it’s hard to tell—usually we trigger these during the day
My guess is that the event would finish and then everyone would pass out where they stood
But this is only a guess
hmm not ideal i don't want to make players angry
what if i use spacecore OnEventFinished to warp everyone home
oh nvm that's for C#
what if i used a trigger action with BETAS to warp the farmer when the event ends
in my experience you just need to place the stool on the buildings layer
like straight from the towninterior tilesheet
You mean how to make it sittable when it's part of a map?
time never pauses in multiplayer without mods
but as a mod author for events and such, I wouldn't take that into consideration too much, multiplayer people that want time pausing will have a mod that does it
https://smapi.io/log/de820ad5b40645fc85cc59205876c673 why would my {{ModId}} be missing the first letter according to the log? i searched all my files for CuringNiko and none of the occurrences have my mod id typed out which is where i'd expect something like a typo
Log Info: SMAPI 4.2.1 with SDV 1.6.15 build 24356 on Microsoft Windows 11 Pro, with 20 C# mods and 2 content packs.
Suggested fixes: One or more mods are out of date, consider updating them, SMAPI is out of date, consider updating it
this is the item delivery quest that's supposed to add the quest {{ModId}}_CuringNiko as the next quest
oh thats unfortunate
so, quests are a lil funny
if a "next quest" starts with h the game assumes you mean it to be host only, and then removes the h
that's fucking hilarious omg
so... you'll need to make the quest id start with something other than h
is it acceptable just this once to not use my mod id? 😅
you can still use it
just put something in front of it
literally any letter except h
okay
or reverse them, so like CuringNiko_{{ModId}}
oh true
prefixing it with an underscore would work and might still work for mods trying to parse unique ids, maybe?
but probably not
reversing it sounds like a good option
typing it like that does feel wrong for muscle memory though haha
tbh im surprised this hasnt come up more often
i imagine if Quests are moved into a data model with the next update this will no longer be an issue
fingers crossed 🤞 don't want to have to change either my username or all my quest names just to be safe lol
it only happens if you put it in the "next quests" section at least
yeah, i haven't encountered that issue with any other quests which is good
and now i know to watch out for it!
it IS on the quest data wiki page too but given how like.... unexpected it is i cant blame someone for missing it
i was convinced i had somehow screwed up i18n and forgotten a letter or something
even though that makes no sense
im 99% sure its a case-sensitive check too so you could actually just uppercase your mod id
looks like case sensitive
string[] array = nextQuests;
for (int i = 0; i < array.Length; i++)
{
string nextQuest = array[i];
if (nextQuest.StartsWith('h'))
{
if (!Game1.IsMasterGame)
{
continue;
}
nextQuest = nextQuest.Substring(1);
}
q.nextQuests.Add(nextQuest);
}
what's even the use case for that? is it common to start quests with h to designate them host only?
mostly a rhetorical question
well dont forget quests used to be ints only
but yes there are some host-only quests in vanilla
i.e. the new save quests like building a coop or getting eggs or w/e
Does |contains only work on CP provided tokens? I was trying to use it on a mod-provided token, but I don't think CP likes that very much
"LocalTokens": {
"Suitor": "{{Random: {{Kantrip.SweetTokens/MaxHeartSuitors:type=custom}} }}",
"ModdedSuitors": "{{Kantrip.SweetTokens/ModSuitors}}"
},
"When": {
"ModdedSuitors |contains={{Suitor}}": "false",
},
(interestingly, it looks like the quest for crafting a scarecrow is allowed for farmhands normally, but host-only if you use Meadowlands farm)
|contains should work on all tokens
Hmmmmmm. Probably syntax error in there somewhere then
can you use a localtoken as a When condition in the same patch it is defined in even?
should
it was available for internal to the patch prior to working with inheritance on an include iirc
I've also tried just using the mod token straight. It doesn't have to be a local
I just tried that to see if I could make it work
if cp doesn't like it you should be getting warnings in the log
Well, the list token doesn't. The random one does.
The error isn't helping me much :/
Error parsing 'Kantrip.SweetTokens/ModSuitors}} |contains={{Suitor}}' as a tokenizable string
doesnt seem like its actually parsing the localtoken as a token when the localtoken value is a token
Missing {{?
But I'm able to grab the value of the ModSuitors token and store it as a dynamic. So I know the token itself works
you're not supposed to have {{ on the outside in a when condition
but that is the error you get when you do erroneously use the outer braces in a When condition
which Kantrip didnt
Let me reload the whole thing. I was playing with braces a lot, so I might have pasted an old error. Let me double check so I don't confuse us al
all
but it suggests to me that CP thinks Kantrip wrote
"When": {
"{{Kantrip.SweetTokens/ModSuitors |contain={{Suitor}} }}": "false"
}
@tribal ore what editor do you use normally?
XCode
Ok, a reload cleared that error, so sorry for pasting an old error. I'm still not getting expected behavior, but at least it's not choking on the braces anymore
I'm going to sleep and come back at this tomorrow though. I've been asked by a couple of people for a way to add mod-supported proposals to MarryMe, and am about 90% of the way there. I just need to disable the default proposal when they've added their NPCs name to the mod-supported npc asset. But if I do anymore tonight I'm just going to make more mistakes
Thanks for the extra eyes 🙂
mail flags don’t need an entry in data/mail, right?
correct
how often are event preconditions checked? on location change?
i can’t figure out why mine isn’t triggering after setting a mail flag
pretty sure events are loaded on day started, in which case you would need to sleep for new event preconditions to register
event preconditions are checked on location change but patches will not update til the next day by default
or, not SMAPI's on day started, the game's own overnight update cycle
how did you set your mail flag?
yes but how, what does your trigger action look like
did you add it to the correct mailbox
"Id": "SeanceIngredients",
"Trigger": "DayEnding",
"Condition": "PLAYER_HAS_MAIL Host SeanceIngredients1, PLAYER_HAS_MAIL Host SeanceIngredients2, PLAYER_HAS_MAIL Host SeanceIngredients3",
"HostOnly": true,
"MarkActionApplied": true,
"Actions": [
"AddMail Host {{ModId}}_SeanceIngredientsComplete received",
]
},```
i've been checking the host for everything in this long chain of quest/event/mail
lack of modid aside, are you certain this trigger action ran at all and that you actually have the flag?
let me check that, what's the debug command?
debug gq PLAYER_HAS_MAIL Host handwrittenhello.dba_SeanceIngredientsComplete or w/e your unique id is written out
however i said lack of modid aside bc i was looking at your trigger action id, but i do now also see that the mail you're checking for does not have your uniqueid in it
but the mail you're sending does
are you sure you are consistently using the uniqueid in all your relevant checks
