#making-mods-general
1 messages · Page 175 of 1
(also we did have one class about multi-threading code on mainframes where we had to do ssh connection junk and bespoke scripting, but yeah, pretty brief)
I kinda meant both because there was a lot of that too, but yeah, technically most folks were in the router-related course
I ran a roguelike map generator on the mainframe and that was basically it
it is the reason I know what mutexs and semaphores are though so ig that’s that haha
we got into that in "advanced C#" or something, it was good to learn but another big confusion point
thankfully SDV's code is deathly afraid of threads and it doesn't come up much
Chest mutex my behated
that sounds fun, everything we did was along the lines of “there are 6 people at a table, 6 plates and 6 forks, and you need a plate and a fork to eat, make it so they are all able to eat concurrently without locking on picking up a fork”
it was oddly specific
@brittle ledge: grab your tempActor example (1h ago)
the winforms stuff earlier reminded me of it because I made a goofy space invaders thing in the threading class
pretty low bars on most of the projects though, like "just don't do other logic in the draw thread"
I recall a lot of people having trouble conceptualizing how it'd be useful, aside from that bit
Low bar but sdv does all the logic on the draw thread
@lusty elm: get back to work incase I get distracted (1h ago)
don't talk bad about multiplemutexrequest. i know on the surface it may look ugly and it behaves like a toddler, but let me assure you the IL is even worse
at least the class can't be wholly blamed for that, since that is called the dining philosophers problem. The plates and forks is how I was taught too
Remind me in 1 hour to make sure i'm working on Mods.
yep sure sure np (#6479212) (1h | <t:1737072933>)
(What did chests do this time?)
Still no luck finding the sprites used for Krobus' footprints during the winter. Any help would be appreciated
I can probably make a custom tile but... no idea how to add that to the game at the moment xD
footprints are generally hidden in loosesprites/cursors
It's not in Cursors
There's no way it's in Cursors
... it was in Cursors
- @tiny zealot (Jump)
I'll double check, but I didn't see it in cursors
And I did look earlier
But it's probably in cursors xD
there's like 2 4x4px sprites for it in a 1200x???? spritesheet
Point taken. I'll look again xD
It's not this, is it? I don't recall what it looks like
It was back in me first mod where for some stupid reason i couldn't get the chest mutex to work properly unless it's opened at least once after creating the chest
I'm still traumatized by chest mutex
If that's it, then I'm probably going to have to redo it anyway, since I need muddy footprints. Was hoping they would just be shadows that I could put on any ground
Please don't discuss that in my presence /s
Im psure im just dum tho but my solution is to just
Open the chest 1 time when u put it down
For my Ultra Organized Chests mod, I'm converting regular chests into chests with a unique global inventory id so that mutex work consistently for farmhands
I avoided letting people chop down walnut bushes for a while because I didn't want to figure out if the mutex liked that 
turns out it's fine, though
Yes sorry i should have put content warnings \s
Between Khloe and I, I can't imagine how many hours were spent trying to get a farmhand to lock a chest mutex for chests placed in unsynced locations
Something I'd like to do, but it would break a few mods, is just make every placed chest a global inventory, and that would simplify everything.
Despite giving the same advice countless times, I've had to violate it more often than I care to admit because SDV's update loop has all the consistency and organization of a laundry hamper after a week of use.
(Example: In what order do you think key-press events, gamepad events, and the Update method fire? The answer will surely surprise you.)
in more practical terms, the university lessons were more like "don't put so much logic in the forms' buttonPress methods that it locks up"
So for my tempactor, I did /addTemporaryActor gemflamingo 32 32 55 31 0 false which adds a 32x32 "NPC" at coordinates 55,31 facing north and not breathing. And this is the spritesheet I loaded, which is just swiped from vanilla.
However, if you're not actually making them walk anywhere, you don't need the full left/right/up/down movement sprites.
Did you tell Content Patcher to add a new image or overwrite an old one for this?
I loaded it as its own spritesheet.
I don't know how images work and am having trouble finding a guide, sorry
"Action": "Load",
"Target": "Characters/gemflamingo",
"FromFile": "assets/images/Sprites/gemflamingo.png"
},```
Oh! So "gemFlamingo" is the id that can be used later as a "character"
Yep!
Got it, that makes sense
You can make it whatever you want.
...actually now that I'm looking at it, I probably should append {{ModId}} on there to make it unique
Yeah, I just thought that the asset would already have to exist in "Characters" for CP to find it
Good to know I can add new stuff
(also it occurs to me that if you're not moving the footprints or having them appear mid-event, it might actually be easier to make a temp map... depends on how familiar you are with Tiled
)
Uhhhhhhhh xD
Okay, temp actor it is 
I just want things to show up and stay in one place for one event as a clue for where a missing character has gone xD
😛
So I think tempActor works, yeah
Thank you so much for all of your help!
So for your case, you would want to load your tile (or tiles) as a single sprite of that size - since you aren't moving it, you wouldn't need to make it any larger.
A quick note that if you want the footsteps in more than one place at the same time, you'll need to load multiple tempActors with different names (e.g., {{ModId}}_foot1, {{ModId}}_foot2, etc.
writing all of this down, btw
If I did want to make a temporary map (basically, just the mountain map with footprints added to it), do you have a resource you'd recommend to start learning Tiled?
Nvm, looks like the wiki has actually got some good information on it
🙂
What is the name of the location where Adventurer's Guild events are stored? Im in the events and can't find them
AdventureGuild, I think
Where are animations created for NPCs?
Hmm. I don't see it on the list. Maybe im missing it
oh, maybe it doesn't have its own event file, my bad
looking around
Hey guys, i wanted to ask if anyone know how to change the townmap.. i need to put a warpplace there and can‘t figure out how to put the edited map into the mod.. (i already have the edited one on tilted)
I tried putting the editmap command on the content.json file but as soon as i start the game the old town map is still there
I was going to try tying an event to joining the guild as an alternative since this isnt working the way I was expecting it to:
"Action": "EditMap",
"Target": "Maps/{{ModId}}_RusticRidge",
"FromFile": "assets/RRPatch.tmx",
"FromArea": { "X": 11, "Y": 13, "Width": 5, "Height": 8},
"ToArea": { "X": 11, "Y": 13, "Width": 5, "Height": 8},
"EditMapMode": "Replace",
"Update": "OnTimeChange",
"When": {
"Query: {{MINE_LOWEST_LEVEL_REACHED 20 100}}": true
}
},```
CP's "query" token isn't the same as the game state query system from SDV 1.6; MINE_LOWEST_LEVEL_REACHED is a game state query, but not a CP token
one of my frameworks does let you use queries like that as CP tokens, but I don't think mine progress is available with just CP
yeah, that'd do it
I'm on my way to see if my local Joann is going to close. Byeeeeee!!!!!
{
"Format": "2.5.0",
"Changes": [
{
"Action": "EditData",
"Target": "Data/TriggerActions",
"Entries": {
"{{ModId}}_SetFlag": {
"Id": "{{ModId}}_SetFlag",
"Trigger": "DayEnding",
"Condition": "MINE_LOWEST_LEVEL_REACHED 20 100",
"Action": "AddMail Current {{ModId}}_YourEventFlagHere"
}
}
}
]
}```
something like this, basically
then you can use CP's mail flag token in "When" to apply that map edit
Awesome. Thank you so much
(Why the upper limit btw?)
I'd recommend uploading your content.json file here, with the "Content Patcher" option. It'll point out any formatting errors and let you share the link here. https://smapi.io/json
(I dunno much about map edits personally, though)
Said so on the Wiki. Trying to use my resources before bugging y'all
unless you specifically want it to not happen if they're past 100, you can just leave it out, the max is optional
https://stardewvalleywiki.com/Modding:Game_state_queries#Player_info_.26_progress
e.g. if somebody installs the mod after they've been through the normal mines already, MINE_LOWEST_LEVEL_REACHED 20 100 will be false, but MINE_LOWEST_LEVEL_REACHED 20 will still be true
I took off the max and got everything else working. Thank you both
@lusty elm: make sure i'm working on Mods. (1h ago)
Remind me in 1 Hour make sure I'm still working, NO SLACKING!
sure thing, champ (#6479296) (1h | <t:1737076582>)
(he's not working)
I am! I'm learning how to redo my world maps cuz instead of only showing spring, 1.6 makes the worldmap rotate seasons so i need to add new sprites and setup the CP to rotate between them seasonally 
and after i'm doing with that i'll probably spend like 15 minutes trying to figure out why it isnt working...
yup, there is red text there
the red text means it's thinking
If one frame of an animation for an NPC isnt working, is there something wrong with that frame art wise or is the game not recognizing that square?
welp, I fought it for a good 25 Minutes without it working, just to try and see if i could get the rotating ocean farm sprites of the world map instead of default, nope. so I'm just gonna go with default. Gotta go with what works atm, better to patch and upgrade later (Motivation pending) than not do anything.
@tiny zealot I am using your secret note framework to add more secret notes to the game but I noticed when I tested adding 2 secret notes it would only let me read 1 of them, the other would "Crumble to dust", Do I have to make a seperate item for another note?
hello! no, you only need to make as many items as you want to have.
a note will crumble if you read it without having any unread notes available to read (meaning: drawn in the collections menu but grayed out). if your Conditions aren't met, the item won't show the note when you read it
if you don't mind sharing your json, i'd be happy to take a look at it
Alright, so I need to make 1 item for each note? Also sure! Let me grab the JSON
"Format": "2.4.0",
"Changes": [
{
"Target": "Mods/ichortower.SecretNoteFramework/Notes",
"Action": "EditData",
"Entries": {
"SecretNote01": {
"Contents": "I sure hope nobody finds this! It's full of embarrassing secrets.",
"SecretNote02": {
"Contents": "Testing Note Compat",
}
}
}
}
]
}```
(This is from the framework)
"ichortower.SecretNoteFramework_DefaultNote": {
"Name": "Secret Note",
"DisplayName": "[LocalizedText Strings\\Objects:ichortower.SecretNoteFramework_DefaultNote_Name]",
"Description": "[LocalizedText Strings\\Objects:ichortower.SecretNoteFramework_DefaultNote_Description]",
"Type": "asdf",
"Category": 0,
"Price": 1,
"Texture": "Mods/ichortower.SecretNoteFramework/DefaultNoteTexture",
"SpriteIndex": 0,
"Edibility": -300
}
}
hmm, your json should be fine. with no conditions and no object id, they should both use the default item and work normally right away
let me check it out on my end
I can read the one that says "I sure hope nobody finds this! It's full of embarrassing secrets." but I can't read the one that says "Testing Note Compat", it crumbles to dust
ok i am reevaluating and you are missing a }, to close your first note
when you load in, you should see two grayed out notes in your collections menu
each time you use a note item, it will reveal a random note from all available notes that use that item
you can create as many or as few custom note objects as you wish
i was about to joke and say 'you must create 8 secret notes or else.' until i remembered that hairstyles used to require exactly that
alright, ty! i will see if this works and ping you if anything else comes up
I‘ll try it, thank youuu
good luck! please don't hesitate if you need anything else 
Sorry, I have been trying to find where to close off the first note but it keeps coming back with errors.
Wait-
!json if your text editor doesn't validate syntax for you, this page can
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.
@lusty elm: sure you're still working, NO SLACKING! (1h ago)
_>
I have been using that page
try the following
{
"Format": "2.4.0",
"Changes": [
{
"Target": "Mods/ichortower.SecretNoteFramework/Notes",
"Action": "EditData",
"Entries": {
"SecretNote01": {
"Contents": "I sure hope nobody finds this! It's full of embarrassing secrets."
}, // <= this is the line that was missing
"SecretNote02": {
"Contents": "Testing Note Compat"
}
}
}
]
}```
Do all Harmony Patches have to be in the Entry cs file, or can you have the patches in their own class and just call them from the entry cs file?
they can be called whenever and wherever
ok, cool. just don't use patchall
if you use annotations they have to be in their own class
i dont believe patchall will even do anything if you're not using annotations
right, but annotations are not recommended
none of my harmony patches are in my entry class or even my entry file and i use patchall to do the patching
annotations vs non-annotations will honestly like never make any difference ever
It works, ty so much!
ok, I was just going off the wiki, it recommends not using annotations, bhut I will just keep them since that is how I have it currently written
if your harmony patch breaks after a game update and smapi needs to rewrite it, its probably broken anyway
good point
(It makes one major difference currently: android)
is that still no good 
i don't do annotations because i don't like creating a class for every patch. does it matter? no. only vibes
i patch with reflection crimes instead of annotations
static classes with an Enable method for me
khloe was working on some kind of source gen
so u can have manual patch but with annotations to do source gen
Look into my repo and ask: is there any consistency here? No. No there is not.
that should work for android presumably, cus the annotations are already consumed by time of build
That is what I am trying to keep is consistency
And this is why we love Khloe
To be fair, BSavage, each individual mod is internally consistent
just follow your heart 
But across the way too many mods in my repo, I've changed my mind on how I do things many times
And it's not always worthwhile to go back and rework
You can specify target type per method
My project started like this . and is now like this ⚪
^ also why I use a ton of classes prefixed with HarmonyPatch_, log every method I patch despite a harmony console command existing now, etc 
copy-pasting a template file is also very easy (re: standalone classes mostly, annotations work either way)
SMAPI's thing where it goes out of its way to log patches on methods also helps, now
Personally, I don't use Harmony annotations because I find programs easier to maintain when you can follow the entire logic down from a single entry point; annotations are action at a distance (albeit a relatively small distance).
Plus, it's more straightforward to conditionally patch, i.e. only if some other mod is installed.
you can do what i do which is patch with annotations but also in the same class that you use reflection crimes to do other things automatically at the same time 
pretty much all of BETAS is built on harmony annotations and then reflecting to grab all the classes with annotations to auto register things
are you creating a new class for every individual patch?
Yeah but that's more action at a distance.
To each his own; as I mentioned the other day, I dislike abstractions that simply provide a "different" rather than obviously better/safer/more efficient/more concise way of doing the same thing.
no, that's the thing i don't like doing, for Vibes reasons
you can put every patch in a single [harmonypatch] class
in case you aren't doing that
Does LoC have an 8500-line EverythingPatches.cs file?
Do we have a 1.6 Data/Locations tutorial yet on the moddingwiki, or do I actually need to look at potentially making one?
I'll do it if I have to, but if someone else gets there first, I will be relieved. LOL
rokugin has Tutorial: Adding a Custom Location (CP)(1.6) on there, it looks like
hooray!
heey back to mod work. I checked code and wiki about it, now I believe I ve known what u meant yesterday(maybe not yesterday). And another problem: I'm reading GameLocation code about blacksmith, and I cant understand how it check if Clint's tile positon valid. Code like this:
public virtual bool blacksmith(Location tileLocation)
{
foreach (NPC n in this.characters)
{
if (!n.Name.Equals("Clint"))
{
continue;
}
if (n.Tile != new Vector2(tileLocation.X, tileLocation.Y - 1))
{
_ = n.Tile != new Vector2(tileLocation.X - 1, tileLocation.Y - 1);
}
n.faceDirection(2);
if (Game1.player.toolBeingUpgraded.Value != null && (int)Game1.player.daysLeftForToolUpgrade <= 0)
{
.....
ok, say I have a GMCM that has different configs for an individual horse, and then I add another horse, is there a way to refresh the GMCM so that the new horse will also show up in the menu?
i've got worse patching patterns than that in other mods, believe me
it checks if clint is either 1 tile up or 1 tile up and 1 tile left
annotations are tops
u can see which tile it is by checking the blacksmith shop tmx
but if (n.Tile != new Vector2(tileLocation.X, tileLocation.Y - 1)) seems doing nothing....
Or, should I use StardewUI and create a seperate place to configure the horse options?
i think it might be decompile nonsense
the original code probably assigned that x-1 y-1 tile to a variable and never used it
In this criterion, it uses an _ to accept another bool why did it do that
hm yea i double checked the IL, it is big spaget there too
unclear if there is jump to next loop anywhere
so possible that it just dunwork 
literally speaking, _ is a "fake" variable that discards the value without actually using it;
it still calls the "get" methods for the tile X/Y and such, then does nothing with them
either way, you can basically ignore that part
and this tile prob activates as long as clint is anywhere in the blacksmith shop
game runs like this?
I'll go into the game and take a look
pretty sure there's no way to refresh GMCM like this.
you might be able to pull together some cursed solution with AddComplexOption but at that point just write your own UI
sorry for that lol..
I guess that might really be the case, as Clint sometimes swings his hammer on the right
Where can I find the achivement ID's? They aren't in the great ID sheet.
Data/Achievements
Thank you!
what do you need them for though
I am using them as a condition for an event
ahh, gotcha. carry on then 
Yes! shop menu can be opened as long as Clint is in his house, even if he is already planning to leave
I can confirm, you can access Clint's shop when he's using the anvil on the right of his shop
lol
I did this last week xD
One thing about doing configs is that if you want it to be accessible through the GMCM menu, you'll have to roll your own Harmony patch.
It's definitely doable and I do it for AFS, but that particular hack is not included in the framework. I'm kind of hoping to work out some long-term supported, API-based solution with Casey at some point, and reluctant to put a "compat" feature into the framework that's fragile in the meantime. So if you decide you want to go that way, you can look at AFS to copy/paste.
(It's probably very easy to create the menu. Just rather less easy to integrate it with GMCM if that's part of your goal.)
And yes, for the record, one thing that GMCM is exceptionally bad at handling is variable-sized lists, because it's all static layout computed at menu creation time.
Does this mean that I can check the NPC's tile position and his shop tile positon at any time to see if the shop is available
a easier integration is to do a clickable button with gmcm custom options, to open a stardewui menu
yes thats what i was talking about with OpenShop
gmcm is ..?
ohhhh game mod config menu
And why I need check Doors and warp in? (festive said that
gotcha! Like this, it can exclude case that pierre or clint pretend to get to work but don't open the shop door
thank u again I think I can do it
@tiny zealot Is there an easier way to get the text on the note to skip down to the next line when I want it to?
secret notes use the same formatting as mail: use ^ for a line break
Oh, ty!
anyone know what mods mess with the time scale? something in my loadout is making the days very quick
time speed?
AFS has a feature that does that while you're fishing. Only other one I can think of is time speed.
is here a game state queire that is based on what the lowest level of the skull caverns you have gotten to is?
the one in the link here (quoting since I'm on mobile)
skull caverns are the same, just number 121 and higher
Oh, ty!
But what if I need it to be the skull caverns, level 1-121?
Skull cavern level is just mine level + 120
add 120(?) to your floor numbers, yeah
It is literally just the mines, as far as the game is concerned, it's not a separate location.
It means if I use ladder successfully by some way at the bottom of the mine, I will fly to desert
Anyone happen to recall in what context the heart cursor is used?
petting animals is my guess
it may not be. i don't recall seeing it
Pretty sure petting animals is the hand cursor.
(that's this one)
Yeah, definitely the hand. Hm, maybe it's just not used.
spouse kiss? 
alternatively you can just search the code for cursor index set with that number
Can I send my JSON here and the errors I am getting? I can't figure out what is wrong.
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 mean send us the link to it
rather than sending the json here
Searching turns out to be rather difficult. Though there are constants like Game1.cursor_harvest, and those constants end at 6; the index of this one is 7.
No biggie, it's just for naming purposes anyway.
what's going wrong right now, by the way?
The console said entry #14, #17 and #02 were having trouble
having trouble with what? what isn't working?
can you either send the full error or describe what expected behaviour you aren't getting please? preferably both
let me get the error
ActionsOnFirstRead is a list it seems
but you have just strings for some
so it cant convert from string to list, if i had to guess what the error is
[Content Patcher] Can't apply data patch "MoreSecretNotes > EditData Mods/ichortower.SecretNoteFramework/Notes > entry #14" to Mods/ichortower.SecretNoteFramework/Notes: failed converting entry to the expected type 'ichortower.SNF.SecretModNoteData': Error converting value "AddMoney -50000" to type 'System.Collections.Generic.List`1[System.String]'. Path 'ActionsOnFirstRead'.. [Content Patcher] Can't apply data patch "MoreSecretNotes > EditData Mods/ichortower.SecretNoteFramework/Notes > entry #17" to Mods/ichortower.SecretNoteFramework/Notes: failed converting entry to the expected type 'ichortower.SNF.SecretModNoteData': Error converting value "AddItem 66 1 0" to type 'System.Collections.Generic.List`1[System.String]'. Path 'ActionsOnFirstRead'.. [game] Failed parsing condition 'PLAYER_STAT Host daysPlayed 560 [561]': optional index 4 (int maxValue) has value '[561]', which can't be parsed as an integer.
correct
oh so i cant have it in those brackets?
assuming you mean the ActionsOnFirstRead
yeah
the brackets in your PLAYER_STAT need to be removed
when looking at documentation if something is wrapped in brackets [] it just means its optional
dont write them
that goes for all of your other conditions too, like SecretNote14
(but not just secretnote14, you have it in several places)
alright, ty!
how would i target the "Filters" field within an entry that looks like this
''' "{{ModId}}_Junimo": {
"Motion": {
"Anchors": [
{
"Mode": "Crop",
"Range": "{{JunimoCropRange}}",
"RequiredAbilities": [ "HarvestCrop" ],
"Filters": null,
},
{
"Mode": "Shakeable",
"Range": "400",
"RequiredAbilities": [ "HarvestShakeable" ]
},
],
},
'''
look at "Edit a deeply nested field"
I did but I don't understand how to get past "Anchors" in this example. the documentation example that looks similar has an "Id" field to target a list value but there isn't one here
in the Format section above that it says that it can be any one of the ID, a field name, a list value, or a list index
so you can do like #0 if you want the first one
Oh! that's what I was missing. Thanks!
side note but that's why it's recommended that models in framework mods have an Id field even if said field otherwise does nothing
(there probably should be an ID field though)
@uncut viper You helped me earlier, I still dont understand though. When I take them out of the brackets or in the errors appear no matter what.
https://smapi.io/json/content-patcher/b6757895be594f3c8c3d3b12a1207361
[Content Patcher] Can't apply data patch "MoreSecretNotes > EditData Mods/ichortower.SecretNoteFramework/Notes > entry #14" to Mods/ichortower.SecretNoteFramework/Notes: failed converting entry to the expected type 'ichortower.SNF.SecretModNoteData': Error converting value "AddMoney -50000" to type 'System.Collections.Generic.List`1[System.String]'. Path 'ActionsOnFirstRead'.. [Content Patcher] Can't apply data patch "MoreSecretNotes > EditData Mods/ichortower.SecretNoteFramework/Notes > entry #17" to Mods/ichortower.SecretNoteFramework/Notes: failed converting entry to the expected type 'ichortower.SNF.SecretModNoteData': Error converting value "AddItem 66 1 0" to type 'System.Collections.Generic.List`1[System.String]'. Path 'ActionsOnFirstRead'.. [game] Failed parsing condition 'PLAYER_STAT Host daysPlayed 560 [561]': optional index 4 (int maxValue) has value '[561]', which can't be parsed as an integer.
again for ActionsOnFirstRead it is a list so they all need to be in brackets. they need to be written like you have for SecretNote02 even if you are only doing one action.
the other brackets issue is for the actions of game state queries themselves. for example you write AddItem 74 [5] [0] in SecretNote02. the brackets in the documentation that tells you how to use the AddItem action means that the value is optional, meaning you dont need e.g. the 5 or the 0. if you want to include those numbers, dont include the brackets
AddItem 74 5 0
this goes for every other action and game state query (in the conditions fields) you've used
I think I understand, I will tell you if something comes up. Thanks!
I have it in brackets but I am still getting errors.
"Contents": "You have too much money... Give some to the poor.",
"Conditions": "PLAYER_MONEY_EARNED Host 50000 100000",
"ActionsOnFirstRead": [
"AddMoney -50000"
],```
did you fix it for all of them? please send an error log
All 3 of them are still getting errors, I am just trying on SecretNote14 until I fix it so I can then move it over to the rest.
[Content Patcher] Can't apply data patch "MoreSecretNotes > EditData Mods/ichortower.SecretNoteFramework/Notes > entry #14" to Mods/ichortower.SecretNoteFramework/Notes: failed converting entry to the expected type 'ichortower.SNF.SecretModNoteData': Error converting value "AddMoney -50000" to type 'System.Collections.Generic.List`1[System.String]'. Path 'ActionsOnFirstRead'.. [Content Patcher] Can't apply data patch "MoreSecretNotes > EditData Mods/ichortower.SecretNoteFramework/Notes > entry #17" to Mods/ichortower.SecretNoteFramework/Notes: failed converting entry to the expected type 'ichortower.SNF.SecretModNoteData': Error converting value "AddItem 66 1 0" to type 'System.Collections.Generic.List`1[System.String]'. Path 'ActionsOnFirstRead'.. [game] Failed parsing condition 'PLAYER_STAT Host daysPlayed 560 [561]': optional index 4 (int maxValue) has value '[561]', which can't be parsed as an integer.
also unrelated but are you aware that PLAYER_MONEY_EARNED is for lifetime earnings and not current money so they might not have 50,000 to take
and if they exceed 100000 lifetime earnings it will never happen
please send an actual error log using the uploader
with the latest error you are getting after retrying it
fix it on all of them as well
Let me fix them all then get the log
Log Info: SMAPI with SDV on , with 0 C# mods and 0 content packs.
this is not an entire log
if that "OH" doesnt mean you figured it out then i would ask for another current json too. if it does mean you figured it out then carry on
Log Info: SMAPI 4.1.10 with SDV 1.6.15 build 24356 on Microsoft Windows 10 Enterprise, with 29 C# mods and 7 content packs.
Suggested fixes: One or more mods are out of date, consider updating them
I realised I needed the entire log
have you had the game open the whole time?
snf_reload is not going to reload the file you're editing. patch reload will
if you've had the game open during editing but never do a patch reload, your changes are not going to happen
ok progress
its now #11 #12 #13 that have errors
let me refresh the console so it doesnt have so much text
please send an updated json with it too
start with full error logs in the future instead of copy pasting from the console 
If mod doesn't support a certain language, it will use default.json, right? Is there a way for me to detect this?
I want to achieve this effect: If my mod's i18n file exists, use it; if it doesn't, use the vanilla i18n
sorry 😓
its ok! it just woulda revealed the issue a lot sooner
im not sure what you mean, what do you mean the vanilla i18n?
and why would your i18n not exist if its your mod?
I don't support every language, so if the player is in a different language, English will be displayed. They are some text about location, so actually I can just use the displayName of Location
i18n of sdv
a vanilla location im assuming? is it just the name of the location by itself, or is it in the middle of a sentence?
can you send/show a json snippet so i can get more context for what you mean?
You should be able to fetch display name without doing any translation yourself
wait a minute I will show you picture
only in places that support tokenizable strings, unless you mean with a content patcher token, which would require LocationChanged update rates
tokenizable string support is not guaranteed
god I just changed a bug, I'll fix it first.sorry for that
They r in C# i think
if theyre in C# then its trivial yeah. i dont have context for what theyre doing or where
May I ask if I edit the content of a custom farm to add Mail, will it actually affects all new farm playthrough? Thanks!
Are you sending this mail yourself?
how comes you're sending the tv by mail? I thought the tv bug got fixed in 1.6
This is old code
it'll affect all playthroughs and not just new ones. but like chu said you do still have to send the mail yourself
I felt that the displayName didn't meet my requirements, so I translated each location myself(although most of them are same with displayName)
"locationData": [
"Farm",
"Town",
"CommunityCenter",
"JojaMart",
"ArchaeologyHouse",
"Island",
"SeedShop",
"ScienceHouse",
"Blacksmith",
"FishShop",
...
]
no
I mean what does send the mail by yourself mean? xD
what are you trying to achieve? @ pichu
so I think if i18n doesnt exist ,just use displayName
Actually, I allowed someone to use my map file to edit and expand
im still confused on the context of where this would be used or why you wouldnt just use the vanilla display name always
BUT, I want to remove my TV mail on my own farm. However, the farm that another creator is using adds mail in the game by sending message.
So whatever which farm I open, I keep receive that mail
Well i suppose u could target the string asset? Only the en one
Im also pretty confused about the purpose
some of them are too long and some of them are too confusing. sorry for wrong json was sent
"ChooseLocation.WizardHouse": "Wizard's Tower",
"ChooseLocation.AnimalShop": "Marnie's Ranch",
"ChooseLocation.LeahHouse": "Leah's Cottage",
"ChooseLocation.BusStop": "Bus Stop",
"ChooseLocation.Sewer": "The Sewers",
"ChooseLocation.Desert": "Calico Desert",
"ChooseLocation.SandyHouse": "Sandy's House",
"ChooseLocation.SkullCave": "Skull Cavern",
"ChooseLocation.AdventureGuild": "Adventurer's Guild",
"ChooseLocation.Woods": "Secret Woods (Hardwood)",
"ChooseLocation.Backwoods": "Backwoods (North of the Farm)",
"ChooseLocation.Railroad": "Railroad (a.k.a. Spa)",
"ChooseLocation.BathHouse_Entry": "Spa (a.k.a. Railroad)",
"ChooseLocation.Tunnel": "Tunnel",
then just do what chu suggested and patch just the EN string and use the displayname everywhere
like this
So yeah, if a mod edit the mail data to send player farmhouse a mail, there is no way to specify only sending to that farmhouse?
if its not your mod thats sending the mail then it depends on how exactly theyre doing it
maybe complete i18n work is what I real need. sorry for confusing question
there is a FarmMapAsset token that you can use to conditionally send mail if its your own mod, or if the other mod sends the mail from something you can edit before it happens (like a trigger action) then you can change it according to that token too
but if the mod sends it with C# you're out of luck
Do you mean content.json?
the suggstion to edit just the EN string and use the displayname is a valid suggestion that will function as you want it to
no, i mean C#
if they dont use Content Patcher to send the mail and add the mail to the mailbox directly then there's nothing you can do
but i dont know the other mod in question
Just these lines in content.json
So yeah, maybe I have to ask them to change another way to send mail or simply remove that mod, I guess.
you can null out their event with content patcher from your own mod
Tbf I actually not experienced in modding so I actually made my own farm by copy paste and change around. 😂
ty for your help anyway. next time it will not a weird question like above
So even if I null it, it will still apply to vanilla farms right?
if you null it and remove the event, the event will never happen ever. regardless of what farm you're on
if you want to not null it on a specific farm, you need to use the FarmMapAsset token
Where is the guide for creating heart events for NPCs? :)
I search around and I do not know how to achieve that.
!npc here somewhere
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!
specifically Events
Is anyone else know a way to remove a mail that is sent to every farm caused by a custom farm mod?
Asking aythor for compat or trying trigger action to remove the mail or mark it as read
My mod is a custom farm. But another custom farm adds mail via editing mail data, which means it apply to every farm.
Anyway, if I moved the mailbox, the default one will keep spawning. Is there a less hassle way to move it in 1.6?
i believe you need to move a property and maybe something else
wiki may have more info
https://stardewvalleywiki.com/Modding:Maps Look for MailboxLocation specifically
The yellow part was always there or?
Because I never recall the need of patching Data/Buildings
I mean...My massive farm mod doesn't do that...But then again I also move the house...
New in 1.6
Which made the farm house moveable
Which is why it's embedded into the farmhouse now
Yet I don't have to do the patch?
I don't recommend detaching it tbh, it makes it worse to move the farmhouse
So wait...do I no longer need the MailboxLocation in my map?
Tiled make an instance, the game itself makes another one by default 😵💫
Wait a min.... do you mean we can now move individual mailbox by Robin?
👀
hey so let's say i wanna make it so my chicken has multiple sprites for the baby version and it changes randomly
i'm guessing i just need to load those and use a random block?
you can, but every chicken will change at the same time
use the skin system
is there a guide for that somewhere?
ty!
ok im having trouble here, im trying to fix the town -> blacksmith warp on the door, but it keeps throwing me back to the default location
"Action": "EditMap",
"Target": "Maps/Town",
"MapTiles": [
{
"Position": {
"X": 94,
"Y": 81
},
"Layer": "Buildings",
"SetProperties": {
"TouchAction": "Warp Blacksmith 15 18"
}
}
]
},```
it's like this, but.
i thinki did something wrong?
is there, an example somewhere on how to use the Skins value? or do you know of a mod that uses it? 
vmv has skins for its animals
and elle's mod has skins for vanilla i believe
also remember the base game has a lot of examples
you may need to test how to target field but once you target a field once, you know the logic for the others
will do! thank you
Does VMV not effectively use every single 1.6 addition/change? 
If you're trying to place a TouchAction where the Warp map property already has a warp point, then I think the map property is probably taking precedence
but it's on the outside of the building, like to get in
The Warp map property is on Town
(the base game actually doesnt use farm animal skins at all
)
Oh wait hang on, I'm thinking of screen warps
all im doing is changing the endpoint to a different tile, but the game spits me out in the wall 😔
<property name="Action" type="string" value="LockedDoorWarp 5 19 Blacksmith 900 1600" /> isn't it this on the native town map?
TouchAction Warp is a Back tile warp
It's the one that triggers when you step on a tile
You want Action Warp
so not the one on a tiledata?
Or LockedDoorWarp as Kristian pointed out
welp time is the time in my coding where i panik a little and attempt to understand things. pls bare with me
gah
Action Warp and LockedDoorWarp are still TileData
They're for the Buildings layer
TouchAction Warp is for the Back layer
.< i got them mixed up
How hard is it to program a character to work with sve maps? Looking to make a mod but I am a total newbie when it comes to making characters for stardew.
alr so here is my content.json
https://smapi.io/json/content-patcher/63a00e8a0d004d4b96234dae11f91d72
how would i go about adding skins? elle's mods have a seprate block for skins that targets ["Animal, "Skins"] and i am, a bit lost
why does smapi.io not like format 2.5.0
Most likely the validation schema hasn't been updated yet
It's something Pathos has to do manually, so it's not something that's going to be done perfectly in sync every time
fair enough.
No more difficult than normal, just have to make sure you're keeping everything related to SVE in mind
!npc
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!
elle has to use TargetField since she's adding data to existing vanilla animals
you're defining a new one, so just put your stuff in the Data/FarmAnimals block
a new field named Skins containing a list of skins you want to add
(This little guy right here, if you're curious!)
Would uh, this code load all these files
{
"LogName": "Load Chicken Texture",
"Action": "Load",
"Target": "FarmAnimals/BabyOmniChicken_{{Range:1-6}}, FarmAnimals/OmniChicken, Cursors/ShopPreview",
"FromFile": "Assets/{{TargetWithoutPath}}.png"
},```
No
thought so. alr, load all of them at once time
Hey hey! This is a sizable request, but would anyone be able (and willing!) to help me debug my Fashion Sense/Content Patcher merger? I'm not getting any errors in SMAPI, but my hat won't show 
This is my stuff
And this is my current SMAPI log: https://smapi.io/log/83d0a9281f77480c9bf25320c70bbca5
Log Info: SMAPI 4.1.10 with SDV 1.6.15 build 24356 on Microsoft Windows 10 Home, with 8 C# mods and 10 content packs.
Suggested fixes: One or more mods are out of date, consider updating them
I know it's a newbie issue; I'm struggling with the purpose and syntax of the FS fields
The examples all seem so similar 😭
there's possibly a few of them i don't use or didn't use at release : if you wanted to make a list, a list of not used would definitively be shorter than a list of used 😄
does VMV use Data/Mannequins
as usual, i am forever confused about formatting anything, heh
https://smapi.io/json/content-patcher/a099d3db61ea44eeb1d4b1b0733d701f
no it doesn't use it 😄
maybe next time........
i'm a bit afraid to look at it
they are haunted, so that's undersrandable
ah okay after looking at vmv my formatting is wrong, haha. ty Lumi
...I'm seeing a CustomFields in the mannequin data.
Interesting... 
oh no
i mean this is fine considering the fact only the first line has the spots but it's a bit funny
anyway, baby time
and it uses string IDs! might just be the most versatile and usable data asset in the game 
i don't actually know what i meant by that desription
whats not to get?
Has someone made a paleolithic mod yet
I like it!
From watching PBS because insomnia land tbh
what's "paleolithic"?
is that the era dinosaurs were in? bc- wait no that's a Jurassic mod
Stone age, more or less!
those, are different times right
start with stone tools
axe/pickaxe needs 2x amount of hits as vanilla base tools
hoe needs to hit twice to till dirt, same with watering can
didnt cryomancer just release a dinosaur mod
different eye color babies aquired
I think that's a few couple million years back
different time periods iirc
but there was fred flintstone clothing
(it mightve actually just been tiger skin but i saw someone make a joke that it was fred flintstone clothing but didnt lurk long enough to know if it actually was)
i like to think the chickens just have a miniature kitchen somewhere to make all this food
Watering can leaks water
hhh
Watering cans leak water, too much rain damages crops...
do u guys just like causing pain? /j
Using the same patches of land too often causes nitrogen deficiency in the soil, making the crops grow slower and have worse produce... 
A cruel hardcore type mod like that could be kinda fun!
Unless you grow peanuts
You need crop rotation, making beans actually great to grow
darn I was actually genuinely considering making a mod like that a month ago
even includes renaming regular fertilizer "P fertilizer" and speed gro "N fertilizer"
and crops like beans replenishing N content
oh no, chemistry
scrapped everything though since I ultimately couldnt boil it down to something I find interesting and want to engage with
Yeah if I had the knowledge of how to make stuff like that I think I'd want to enrich a mechanic that could use more complexity, like cooking
this channel is great cause you can see mods that torture the players but also, a chicken and other silly things
it's never too late to learn said knowledge
True but alas time and energy are in limited supply 
I almost came this close to yeeting my cat to another solar system when he stepped on my keyboard and collapsed all my layers and folders
I was worried I wouldnt have enough undo to bring them all back. luckily I did >:(
remember you can include your psd files in a git repo and have a longform version history to call on
question: how would I go about modding my movement speed during festivals? It happens in the Archipelago mod but I've found no other mods that change it. I play with a base +2 movement speed and going into festivals feels so slow!
it's fairly easy to fix but requires C# and probably harmony patching
I swear pathos updated cjb to do just that
So could probably use that as an example code wise
i remember pathos posting about it for sure. don't know if it was implemented/released
if buffs work in festivals, a trigger action could do it 
effectively, when the game calculates your movement speed, during festivals it simply doesn't take boosts into account. (i assume this is to prevent you from "cheating" at the egg hunt)
it might be during all events, actually, i forget exactly. but certainly during festivals
I use CJB for adding that +2 speed so perhaps I'm missing something 😮
Dang. Time to start learning C# then? Heh
I thought that cjb fixed that, noted…
Hello i'm starting ti learn modding on C# the thing is that on the stardew wiki they recommend visual studio and net.6 but right now visual studio is discontinued we have to use visual code and they released net.9 i just want to know wich software should i download please
you can safely download a newer .NET sdk (i am using sdk 8, if memory serves). the important thing is that you must target .NET 6 when you build your mods (any newer SDK can do this)
most C# modders use visual studio (full, not code) but it's not required. you can use vim like a caveman (me) if you want
oh wait really? I think I installed .net6 especially for stardew haha, that's good to know ichor
you can also use Rider now that it's free!
Thank you for the advice ☺️☺️☺️
You do have to install net 6 sdk yea
But u can use latest dotnet tools and compiler as long as ur build target is 6
I think I know the answer but just to confirm: is there any way to unlock the frame rate in this game?
Lots of ppl including me use newer C# language version for qol
rewrite a bunch of the game engine, i think
ggez
Aren't most animations gonna be at 175ms a frame anyways
I struggle to imagine what 300fps would even do with sdv
(i don't actually know the answer, but i'm pretty sure i heard the game is capped at 60 and it is not practical to undo)
i mean you just need to decouple the update and render loops
from what I've seen, the draw code is so connected to the logic that I wouldn't be surprised if increasing the framerate also made half the game faster?
Yea sure i am just not clear about what purpose it would serve
problem is idk how coupled they are, probably very
There's not much interpolation going on
for me it would be benchmarking
stardew draw functions are very often called directly within the logic methods I think (please someone correct me if I'm talking out of my ass)
on second thought that wouldnt help at all
It's the other way around, draw always happen in draw functions where the spritebatch is open for drawing, but random unrelated logic happen in there
ty for clarifying! all I know is that half the time they're all in the same place so there would be a lot of rewriting to separate them
I wanted to move some costly functions that run every tick to a background thread
but my pc is too fast so idk how to benchmark the difference
And ofc anim logic is sometimes used for other things, but i think we r at least not looking at ds
I'm being slow today, ds?
Do it anyways just for the ms savings 
Usual sdv not very thread safe warnings apply
yeah. if you need any of the game state for your operations, i wouldn't put them on a background thread
unless you can map some game state to another model on the main thread, then use that on your background thread
is that just for modifying the game state, or also reading it?
i do read some game state
I was thinking of like, reading something from content in single thread
things like current location, position, animation frame
i don't think that's safe at all
Then send off to processing in new thread without reading content again
I'm mostly thinking of doing this for enemy AI
oh, reading on main
because WoL adds a lot of stuff to it that makes it sluggish
Yeah
so the main thread would queue requests to update the current target, for example
and the target would be calculated in the background thread
...took me a while to realize you're DaLion
visual studio is discontinued
No it's not. Where did you read that? Unless you're talking about VS for Mac or something.
What you probably need to be very careful of here is assuming that each of those values will be consistent with each other, which they won't always be when you read them on a background thread. You might get a position that makes no sense for the location, for example. Since there is no way to read them all atomically, and no way to lock them.
Instead, I would read all the game state on the main thread (not just in a single thread, but on the main thread) and then if there's any really expensive calculation afterward, you can hand it off to a background thread like chu says.
As an aside, it is rarely worth the effort to do this unless you can tolerate the results of the background work being a few frames late and actually expect them to be a few frames late. Otherwise, the work required to context-switch between threads twice during a single frame can often exceed the entire cost of the background work. So, always profile. Even if your hardware is super fast, it's all relative.
weirdly enough I also remember reading about visual studio being discontinued/eol. I assume back when the Mac discontinuation was announced some people misunderstood and spread bad information.
I'm trying to spawn a bomb, but it's not exploding 🤔
Game1.currentLocation.tryPlaceObject(spawnPosition, new StardewValley.Object("287",1));
``` any advice?
After placing it you can use GameLocation.explode
Or if you dont really need the object itself, just use GameLocation.explode
oki I'll try that! thanks
Here is an example for an explosion at the player's tile, dealing damage scaling with their attack.
"Game1.currentLocation.explode(Game1.player.Tile, 2 + Game1.player.Attack / 6, Game1.player, false, this.Parameters.ExtraDamage);"
but that makes it explode immediately correct?
Yep, for a timed explosion theres a few ways you could go about it. Such as a flashing temporary sprite at the location, or placing the object then waiting.
I see :3
thank you! I'll try to mess around a bit more and see if I can get it to work! 
Hi, does anyone know where to look up the names of fishing locations? I couldn't find in Data/Locations for example location in mines at level 100
dang, does nexus fast-track your mod zips through the scanner if you have premium? i've never seen one of mine get the green checkmark so fast
I feel it's rng
Mines fishing is special sauce
General fishing data for beach or whatever is in Data/Locations yes
And then what to do with the mines? 😔 I have fish just for them
There is an UndergroundMine entry in locations with fish, it just might not always behave the way you expect because there's a lot of extra hard-coding for certain mine floors.
And you definitely cannot target per-floor without Harmony patching.
You can make a cavern lake in the mines entrance i guess
Or put those fish in the caldera
More New Fish adds to the mines, you could look at their code possibly
I don't believe it's updated for 1.6 yet but the location code shouldn't have changed
Can't you use thr Location name gsq?
Huh?
Check out StardewValley.Object.placementAction
I saw that but it seems to just return a bool if the object has an placementAction no?
IIRC the floor names are generated, unless they're something easily predictable like UndergroundMine60
There might be a "current mine floor" GSQ? Didn't check.
Not exactly
It's generally pretty confusing though; e.g. Stonefish and Ice Pip appear nowhere in the location fish data, they're hardcoded.
It places the item and returns a bool to indicate whether or not it did anything
Mine levels don't have guids
So easily predicted
ok, so I did this
new StardewValley.Object("287", 1).placementAction(Game1.currentLocation, (int)spawnPosition.X, (int)spawnPosition.Y);
``` and it did the animation for a bomb explosion but did not place a bomb (no dmg just animation) 
oh for reference
Vector2 farmerPosition = Game1.player.Tile;
Vector2 spawnPosition = new Vector2(farmerPosition.X, farmerPosition.Y);
look at the bomb code in GameLocation.placementAction rather than the object itself
you can search for case "(O)287": or one of the other bomb IDs
I don't think calling it directly will work for your use case because it's about using items in a farmer's hand & doesn't just take an object to use
though looking at it again, I'm not sure if that covers the actual damage either 
What is the goal here
I remember bombs being dumb and having all their logic on the TAS lol
(my assumption was spawning an active bomb somewhere)
*temporaryanimatedsprite
the first sprite broadcast has something in extraInfoForEndBehavior so maybe that affects it
or just the IDs involved, etc
So u can skip to calling that instead
yes
Use placementaction as a ref for what u should be doing
TemporaryAnimatedSprite
oh my bad 💀
just tested and yeah, the gamelocation code excerpt spawns a functional bomb when copy-pasted out
(with x and y = pixel position, placementTile = tile, etc)
So weird question I won't necessarily be doing anything with
Is there a way to control the quality of harvested crops in the seed data
E.g. if someone buys a seed, allow it to grow a vanilla crop, but vastly restrict the ability to get anything that isn't normal quality
btw lyoko while you're here, there's a slight issue with uws-rsv that has been causing a lot of long mod warnings in the logs of anyone who has it installed because it's trying to detect NPCs who aren't in the save yet sometimes, is there a way to prevent that?
(@ lyoko) definitely not vanilla, but in C# you could tag them at creation time from stores, I suppose
Update content patcher
I've seen that issue a lot with people who have up to date cp iirc
Then Pathos's fix didn't work
I assume it's user error though
Let me showcase it... I know where to nab it from in here
.
I'll try to see if I can find a recent smapi log that has it
Please do.
It would be difficult even on c#
I imagine there's some place to intercept the quality in a harmony patch, but I don't know much about crop output offhand
see the log in this thread for an example https://discord.com/channels/137344473976799233/1329583149335842846. Up to date cp apparently
The short version is my random idea that is now gated behind c# (which I hope to carve out time to learn next month, no promises though) was "people are talking about joja not having lower prices" so I thought "okay, lore accurate joja with shitty seeds giving shitty results"
Time to look at this log
so you copy pasted the stuff from case "287": ?
it's a little long-winded so I didn't paste it earlier, but yeah; I put this in a console command
var who = Game1.player;
var location = Game1.player.currentLocation;
var x = Game1.player.Tile.X * 64;
var y = Game1.player.Tile.Y * 64;
Vector2 placementTile = Game1.player.Tile;
foreach (TemporaryAnimatedSprite temporarySprite2 in location.temporarySprites)
{
if (temporarySprite2.position.Equals(placementTile * 64f))
{
return;
}
}
int idNum = Game1.random.Next();
location.playSound("thudStep");
Game1.Multiplayer.broadcastSprites(location, new TemporaryAnimatedSprite(287, 100f, 1, 24, placementTile * 64f, flicker: true, flipped: false, location, who)
{
shakeIntensity = 0.5f,
shakeIntensityChange = 0.002f,
extraInfoForEndBehavior = idNum,
endFunction = location.removeTemporarySpritesWithID
});
Game1.Multiplayer.broadcastSprites(location, new TemporaryAnimatedSprite("LooseSprites\\Cursors", new Microsoft.Xna.Framework.Rectangle(598, 1279, 3, 4), 53f, 5, 9, placementTile * 64f, flicker: true, flipped: false, (float)(y + 7) / 10000f, 0f, Color.Yellow, 4f, 0f, 0f, 0f)
{
id = idNum
});
Game1.Multiplayer.broadcastSprites(location, new TemporaryAnimatedSprite("LooseSprites\\Cursors", new Microsoft.Xna.Framework.Rectangle(598, 1279, 3, 4), 53f, 5, 9, placementTile * 64f, flicker: true, flipped: false, (float)(y + 7) / 10000f, 0f, Color.Orange, 4f, 0f, 0f, 0f)
{
delayBeforeAnimationStart = 100,
id = idNum
});
Game1.Multiplayer.broadcastSprites(location, new TemporaryAnimatedSprite("LooseSprites\\Cursors", new Microsoft.Xna.Framework.Rectangle(598, 1279, 3, 4), 53f, 5, 9, placementTile * 64f, flicker: true, flipped: false, (float)(y + 7) / 10000f, 0f, Color.White, 3f, 0f, 0f, 0f)
{
delayBeforeAnimationStart = 200,
id = idNum
});
location.netAudio.StartPlaying("fuse");```
(the first part is sloppy and the foreach loop probably isn't necessary, but the basic idea works)
thanks!
a hacky way might be to see if you can automatically apply some sort of invisible fertiliser that nukes the quality when the seed is planted? since I know people have successfully managed to make fertiliser-related mods
Welp.
@ivory plume it looks like the relationship token fix isn't in 2.5.1 or it bugged somehow (maybe a mod interaction for this user?) Unique Winter Star RSV is throwing the missing unlockables error in this log.
it's not this user - this has been in several logs I've seen
this user just reminded me to let you know in case you didn't
I knew this would happen back in 2.4 Content Patcher. Tis why I put in the tempblock
At the very least if the issue ISN'T resolved Pathos needs to know
If it's a c# mod interaction.... hoo boy
out of curiosity (I'm learning about content packs right now so I like hearing details like these) is it not possible to condition the patches on the npc existing?
actually, let me do a minimal test for you, lyoko, and we'll know for sure
this is what the token should do
ah, I see
at least i think it's the purpose, checking if there's a relationship to see if npc exists
Does the affected NPC always exist in Data/Characters with a CanSocialize field set to a true condition (even if they're not spawned manually or via UnlockConditions yet)?
The four always exist in Data/Characters. Cansocialize, however, is not always true - socialization is locked to event conditions
Event blocks here
That would explain it; in that case you're asking for the player's relationship to an NPC that can't have relationships.
is there no mail flag set when they're unlocked that you could condition on? obviously not an ideal solution but would be a specific fix
I don't think so. I can check when I get home regardless
The problem is all four are in the same file for additions, so they each have a different one. So I have to bar the patch from running at all without event seen, because I can't ALSO put that condition in since the dialogue variates by relationship level
I think I'll have to run some patches in the content.json that makes a mail flag
Then checks for it
One option would be to use a dynamic token for each NPC's relationship level, which defaults to something if their socialization isn't unlocked yet.
It's either that or reprogram to four files
well dialogue by relationship level can be solved by query or by i18n key and token, but it may not work with your current layout
Hmmmmm.... I will have to check the patch structure when I get home (work would probably have a conniption if I tried to go on nexus from the work PC), but the dynamic tokenry may be possible
That'll be a few hours though
Well, I finally worked it out (ik its nothing but its a learning curve lol)
spin
spenny energy (or, spenergy)
does spenny still work-- ichor same braincell 
.mov
idk what cracked me up more when I first found spenny, the fact it exists or the fact that there's apparently a deluxe version 
deluxe spenny?

please don't ping me in replies
what about spenning wheel
the what
my bad
https://www.nexusmods.com/stardewvalley/mods/17326
how is this my first time hearing about this 
it's shitposts all the way down
there is a thing as too much power, i think
the spacechase shitpost to foundational cornerstone of modding frameworks ratio is impressive
modders posses the capacity to shit post way too close to the sun
there is also Spenny Lite
there don't exist a thing such as too much shitpost as long as its quality
that's what icarus said
me looking the 804 page of message of 6480 to find a message that can help me to resolve my issue
omg this reminds me of old Spenny 
I love how I just accidentally triggered a memory lane for the fellow shitpost enjoyers
I need to pick some brains a sec.. I'm trying to replace woodsTheme during the winter.. thing is, I already replace it... any thought on how I can have an audio change in the winter?
Maybe using a Trigger Action would make it work
I'm trying to do a transpiler patch on Crop.harvest.
My method gets triggered when you harvest regular planted seeds but doesn't get triggered at all when harvesting planted forageable seeds.
The vanilla code does if (forageCrop.Value) so I'm confused why it doesn't trigger at all. Does that only cover the forageables that can be found randomly?
i would need to see how that works
"woodsTheme": {
"ID": "woodsTheme",
"Category": "Music",
"FilePaths": [
"{{AbsoluteFilePath: Music/SecretWoods/GForest.wav}}",
"{{AbsoluteFilePath: Music/SecretWoods/LostWoods.wav}}",
"{{AbsoluteFilePath: Music/SecretWoods/abandoned.wav}}"
],
"Looped": true
},
``` this is the non-winter code
"woodsTheme": {
"ID": "woodsTheme",
"Category": "Music",
"FilePaths": [
"{{AbsoluteFilePath: Music/SecretWoods/FrostForest.wav}}"
],
"Looped": true
},
```this is the winter code thusfar
Asking in a different way: Which method gets triggered when picking up (harvesting) forageables that have been grown from seeds if it's not Crop.harvest?
could you send the whole file through the smapi json page? maybe we'd have a better idea that way
Pretty sure Casey updated it for 1.6 yeah 
she updated all her critical mods 😌
Pretty sure it'll still be Crop.harvest so other details may be needed to find out why it's not working for you
Actually, scratch that. Just realized you're referring to wild seeds?
Looks like forgeCrop.Value is only set for the crops which are spawned by location. The Wild Seed crops are instantiated using the regular Crop constructor, which only sets whichForageCrop.Value and not forageCrop.Value
So it would fall under the next condition after if (this.forageCrop.Value)
Just tried to figure out what method gets called. Tried prefix/postfix/transpiler on Crop.harvest but it never triggers when harvesting the forageables. Even without checking for forageCrop.Value.
It works fine for regular seeds/crops and prints my debug message
And just to confirm, you're referring to wild seeds (Spring, Summer, Fall, Winter) that you planted on regular hoe dirt?
Yes
Thinking from the last time I played the game 500 years ago, it feels like they just spawn the forageable SObject on the ground, so there's no real instance of a crop or anything at that point?
there's a value called replaceWithObjectOnFullGrown in Crop, so yeah, probably that 
So is it possible to check when it gets harvested?
I think Object.performUseAction is what gets called when you pick forage up, if that helps
it's where I assign forage quality and such in a custom subclass, though there're probably other methods involved too
Guess I was pretty close then. Tried HoeDirt.performUseAction (which makes no sense)
I guess GameLocation.checkAction is the place to check for forage pickup, depending on what you're aiming for
it effectively starts in this section
else if (this.objects.TryGetValue(tilePos, out obj) && (obj.isSpawnedObject.Value || isErrorItem))
{
int oldQuality = obj.quality.Value;
Random r = Utility.CreateDaySaveRandom(tilePos.X, tilePos.Y * 777f);
if (obj.isForage())
{
obj.Quality = this.GetHarvestSpawnedObjectQuality(who, obj.isForage(), obj.TileLocation, r);
}```
I actually only need the trigger. Don't want to modify the method itself.
it seems to pass new forage through GameLocation.OnHarvestedForage(Farmer who, Object forage), which might be a convenient hook
@dusk mulch FYI, your secret note mod causes and error in SMAPI. Full log in in a bug report on the mod page.
[game] Failed parsing condition 'PLAYER_CURRENT_MONEY Host 50000 99999999999999999': optional index 3 (int maxAmount) has value '99999999999999999', which can't be parsed as an integer.
Crap sorry, I will go archive the new version now and fix it in a few days as I am not going to be home
It should be a simple case of just lowering the number to something within the integer limit?
yes
Probably doable in a minute right now.
the max arg is optional, so it can be removed entirely
or omitting it
oh yeah one sec
removing it will automatically set it to int.MaxValue so yea just remove it
(I need to clean out some of my saves, I keep loading this one for non-bush tests
)
At least you haven't gotten to the point of breaking Steam cloud saves because you have so many!
is that a thing? I disable cloud saves for everything 
Yeah, I had to force it to delete everything through the website... somewhere in order to get it to do anything with Stardew's saves.
ok should be fixed
i should bug test my mods more 😰
OMG YALL I GOT MY FIRST ENDORSEMENT :DDD
Nice!
@patent helm I saw your custom NPC mod and I was wondering if I could use it as a foundation to make my own custom npc?
(with credit ofc)
https://on.soundcloud.com/GX4sPqc4t5mtATSy7 I was thinking of using this in the Skull Cavern... what do you all think?
Heard this too many times last night
could work for mining iridum and slappin' monsters
!npc It's good to refer to other mods' code, but instead of copying one can I suggest the tutorials and free-use templates on the modding wiki? 
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!
can someone link me to a character modding reference? i want to do surgery on a bunch of custom NPCs i have installed to be hidden until met and idk how to do that
ooooooo
ok this is amazing someone posted it literally while i was typing
i will try, ty sm!
just 1 quick question, am i able to do your tutorial in content patcher? (i despise C#)
nevermind-
What is the ideal size for a recipe mod?
what do you mean by size?
Not file size or anything but like scope, how many recipes it's adding, like that.
there is no ideal size.
however many you want to add ig haha
I wouldn't make recipes just for the sake of having more and I wouldn't leave recipes out just for the sake of having fewer
So if it added like 50 recipes (with a lot of recipes to make the recipes) it wouldn't be like oh no that's too much
if a user thinks its too much, they wont install it
I'm sure it would be for some people, but some people would be okay with it
no one is going to install a mod that says it adds 50 recipes and then complain that it adds 50 recipes
well...
When I say recipes to make the recipes I mean things like a base recipe for heavy cream, which would be used for a wide variety of other recipes
no one worth listening to*
nobody you should pay attention to, at least
it doesnt matter what you mean by recipes. the point is you make the mod you want to make, and the people who like it will install it
there is no ideal size. its akin to asking "how can i make a mod that everyone likes?"
there's also no avoiding stupid complaints in some cases 
Okay, thank you, everyone. I'm feeling a lot better because what I initially envisioned as a basic homesteader recipe mod is getting bigger in scope & I'm only on my second upcoming update lol (which is like 10 times the first). I'm worried all of a sudden lol that the "you gotta make this recipe to make this recipe" thing would be too much for a lot of people. But the people like me who like things like that would probably like the mod, too, which is what I'm getting. And the people who don't, just won't bother, which is okay, too.
Also it's my first mod ever, for any game lol, so a lot of uncertainty
If I recall correctly, it is something base game does already with a few ingredients like fried eggs(?), though I don't interact with the cooking too much >.<
It sounds like a fun idea though! I imagine heavy cream recipes could create an argument to not process all of your milk into cheese, which could be neat!
Is there a mod to change mayors?
Make the mod that you want to play, and whoever uses it will be happy
question what's up with all the boncher mods rn? i find it very funny and it obviously comes from this server but.... why?
ask #modded-stardew for questions about mods that exist, this channel is for making the mods
ok, sorry
inside joke from when one of the server bots had a temporary name change
i see thank you
you're fine! happens all the time, this place just wont be able to give you answers bc that channel actually plays the game lol
Also, great work on your first mod!
: )
There are plenty of mods like WAG and raffadax who have their own ingredient systems with sometimes more complex ingredients being used for lots of stuff, and both of those mods have tons of passionate fans
so yeah i dont think theres anything to worry about
ok this is so random: why is cornucopia’s kimchi sprite not red
I forgot what it looks like
I love WAG so much! And I got permission to use Wildflour's ingredients so there are all the addon recipe variations that it's like wait I gotta make sure my basic one works first lol
maybe mizu had a certain kimchi variety in mind when she made it?
i mean there is baek kimchi yes but
it isnt ever called baek kimchi
then again i dont think cornucopia has pepper paste/gochujang to even Make It Red so perhaps thats a mod idea for me for later
sorry i just like thought you knew so i asked lol
i forget mizu is the person behind most of those choices
Lol yeah she normally directs the art :P
Then half the time I come to her and ask "why isnt the kimchi red", but for whatever reason I thought it was normal
@dusky vigil do we want to change the sprite on that or are you good?
we have a couple more complicated kimchi varieties as cooking recipes in the upcoming mod which is exciting
Can I get a link to "When" statements.. trying to do Seasonal conditions.. can't remember the syntax
nvm i found it
yoooo neato
but ya i was just curious bc. if u google kimchi. its ALL RED lmao so i was like… howd this occur
sometimes it looks less red/more pinkish depending on the brand
we also have a patch to incorporate WAG ingredients into the recipes if you want more integration between both mod sets
I'm excited about that one
🤔 It's honestly probably just because the color strayed from the reference
It's supposed to be
This in appearance
definitwly looks like it got less red over time haha
Very eventually I want to add Napa Cabbage and it would feed into the logic, but
oh well
i really wanna start making mods but i’m completely clueless, does anyone have any advice on where to start?
I had started by using some youtube tutorials I found and the SDV wiki as a starting point, and sorta went from there.
I think there's a modding wiki that has a few tutorials there as well.
!startmodding
Making mods can be broadly divided into two categories:
- Content packs are formatted text files, and don't need any programming knowledge. They can add/edit NPCs, maps, new items, shops, and more. To get started, see the list of framework mods, the wiki tutorial for Content Patcher, and there might be relevant guides on the tutorial wiki.
- C# mods use programming code to change fundamental game mechanics. See getting started with C# modding.
Usually it’s easier to start with making content packs, since you don't need to learn programming.
youtube tutorials are almost certainly out of date now and i would avoid them
definitely do not look at anything that was posted before march/april 2024
thank you for the advice:)
hi gang, I wanted to try and make my own farmer sprite animations to change the drinking animation (and maybe other animations in the future)
I remember opening a github readme ages ago but I cant remember what it was 😭
does anyone know what I might be talking about 👉 👈
atra knows some stuff about farmer animations i think
(likely the answer is "dont" but you may get a link in there)
ugsiyugsaf no I get it, I think thats the reason I exited out the first time a few months ago, I saw just how many farmer sprites there were and figured "Oh, this is a LOT of work"
hi can someone help me? so pretty much i'm trying to replace the sprites with my own
and i want to see if the winter sprite for harvey is working
but when i use the commands to turn the season to winter, no ones outfits has changed
try sleeping a day
an NPC has to change location to recheck their appearance
It's not so much the number of sprites but the insane troll implementation of the farmer renderer.
so i can't go in and out of the town?
dont know if the NPC warp commands trigger that
no, only when the NPC changes location
or has a dayupdate from sleeping
hmm.. ```json
{
"Action": "EditData",
"Target": "Data/Locations",
"Fields": {
"Woods": {
"MusicDefault": "{{ModID}}_secretWoodNormal"
}
},
"When": {
"Season": "Spring, Summer, Fall"
}
},
if you havent already, maybe having this will help speed testing for u :D
https://www.nexusmods.com/stardewvalley/mods/4
Ooo this is really handy, thank you
Omg thank you it worked
He’s in his winter outfit when he went outside
Yay!
yknow 6480 id tag atra but im also shy to tag them uidsghfiugsf 
ive been digging but this 🤏 close to just straight up asking 😭
solved it
I need to make a When Condition that patches when you're in the Skull Cavern (UndergroundMine 121+)
any Ideas?
I'm pretty sure that LOCATION_IS_SKULL_CAVE actually does what you want, despite the misleading name.
Its implementation checks for mine level >= 121 and excludes the quarry mine level.
@calm nebula
if you're using locations in the patch when conditions you need to make sure to set the update rate to on location change btw afaik
idk about for gsqs though
Not sure how to apply that
{
"Action": "EditData",
"Target": "Data/Locations",
"Fields": {
"SkullCave": {
"MusicDefault": "{{ModID}}_SkullCavern"
}
}
}
``` I didn't have a when on it at first.. but it seems like I do need it
The game is a little weird about it - the location named "SkullCave" is actually just the entrance. Actual floors are, as you pointed out yourself, UndergroundMine levels 121 and up.
If you're trying to patch the skull cavern, and not the "cave", then you're patching the music for all mines (or all locations period) and just making it conditional on LOCATION_IS_SKULL_CAVE.
specifically, the ID LavaMine is used
I know that from my CM Mod
but I used LUA to fix that
UndergroundMine doesn't have a music ID either.. it's coded in
so I would need a way to patch LavaMine multiple times
adding two seemingly benign lines to my transpiler that was going remarkably well just to get Common Language Runtime detected an invalid program .... Harmony always ready to keep my ego in check 😭
@pastel aurora hello doctor professor platinumcats, may i dm you about a permissions question?? :D
ugh... this last hurdle is tough to figure out
Question, the Modding Maps page in the wiki has this, which is new to me, but if I made a map area that was buildable that was seperate from the farm, how exactly would building there through robin work? Like would you be able to choose which map to build on?
ok common language runtime was right to be mad at me bc why did I put a label there
If i ever have to maintain this transpiler I think I would die
The mine music is hardcoded, as you noticed. So it's a bit tricky to edit from a content pack. In theory you could use When conditions to patch Data/AudioChanges to redefine LavaMine depending on the player's current mine level, but rebuilding the audio changes on warp would be pretty inefficient due to how it works under the hood.
Yep. If there are multiple buildable locations, Robin will automatically ask you which one you want to build on; we added support for that in vanilla since it'd be tricky for mods to avoid conflicts doing it.
THAT'S AMAZING, holy crap! ^
That makes my life so much easier for adding extra pastures and such 🤩
Btw I was asking both for me and for frost
(yes thank you 💜 )
i'm grateful vanilla included that, the support of building in different location would have been limited without it, but i don't take it for granted that it was added for mods only since vanilla doesn't use it (so far)
inb4 for patch 1.7 -> build stuff in Ginger Island
bah... means it's not really good to do and I hate it 
I'll just shuffle in the Music to Lava Mine
in content patcher, what does "LogName" do ?
it basically tracks what that specific block of code is for you, very useful when you're trying to debug many lines of code
nothing more than a label
it's not required
thanks
May not be required but useful to have if you have a big content.json or multiple data files
yep... helps when you a lot.. not required... but helpful
can someone remind me how to set a Change on location?
I also find it helpful for if I need to do multiple different schedules and the like - sure I can see the when conditions and what not but its way easier to see the log name on the top and be like 'ah yes this is for this thing labeled directly as for this thing'
I love labels...
nvm i found it
Hi! You had questions?
#making-mods-general message (the context)
thank u aaa
Yes, I had questions, i vaguely remember seeing a sort of framework? or maybe it was a guide, for adding custom farmer sprite animations
But I cant for the life of me remember what it was that I read 😭
and Ive been digging, and cant find the specific page i saw months ago 
So now I suppose Im asking for some direction
hi atra
hiii atra
Item Extensions has it
Farmer extensions
(that was a joke)
the moment you start playing with transpilers you'll regret ever having said this
No, nothing! Sorry for taking so long to get back
I'll just add them conditionally if they're installed
(And just want to bump this a final time, in case anyone else is interested!)
You can have my single (1) guy and his finished walk cycles
placed bombs aren't actually objects ‐ you really want to copy the behaviour the game uses when placing a bomb, since it's not intuitive or something you can guess at all.
try searching the game code for "287" to find behaviours for the bomb, it'll probably be in Object.cs in an action method
Done with the quick patches for most of my mods, the 5 or 6 left will require some level of map adjustments and edits to update
then i can challenge finishing my... 4 WIP Mods
thank you! yeah @ Esca showed me what I needed to find in the vanilla code! :3
(also Miihau for future reference you usually dont want to be using the object constructor directly)
Would you be able to send them here/dm me? That'd be perfect!
noted! <3
pretty sure its in GameLocation
https://www.nexusmods.com/stardewvalley/mods/30964 My music mod is complete!!
i forget how to showcase here
right click on desktop/long tap on mobile, apps > publish
rightclick on what
on your post 😅
i was unconvinced then i saw the side sprites. Hello sir. Are you into women.
Oh gosh... he's taken, Lani!
... I did put apps 
just tell me there's no chance and i'll go back to my ca- SEE
thank you.
congratulations to the happy couple. (i am sobbing)
adding new event preconditions is surprisingly straightforward https://medal.tv/games/stardew-valley/clips/jvKt0QKkFHwAd5CDI?invite=cr-MSwwaWksMTI4MDI2MzUzLA
Watch Negative Heart Events Demo and millions of other Stardew Valley videos captured using Medal.
waita sec. can't you already make negative heart events by just doing friendship -number?
we all make mistakes, or are blind at times :p
Unless I'm mistaken, it will check >= but I want a <=
because it should play the -2 heart event if you have -2 or -4 or -7 hearts and haven't seen it
OH
nemesis
you mean LITERAL negative hearts
oh ya
as in negative relationship like the sims
ok i thought u just meant minus friendship KEKW nvm
I feel like i am getting dumber the more I work at that gas station xD All I do is watch Anime and sit around
such a great job for lazy me ❤️
finally, fist fight heart event incoming
yeah it's time to have beef with pierre for real
Oh, Miss Coriel, somebody posted on my Pelican Valley Loft NPC Apartments mod recently asking about adding the apartment rooms to your NPC Builder (I'm guessing as a home?). I told them it was unlikely to be added to the old builder, but just figured I'd let you know there is apparently interest...?
can it be a love hate relationship
how dynamic are we talking
straight up hatred or are we Nuanced
i mean penny isn't going to call you names, she's just going to be sad you're mean to her. but like other NPCs might have actual beef
The way NPCNT is going, it might do that natively if you also download the NPCUtilityTool I made for it
it's a binary choice of friends/marriage route or enemies route tho
is there any mod that like


