#making-mods-general
1 messages · Page 304 of 1
oh yeah maybe config has another impact on priority
Hello, could someone shed some light on the following situation? Today I started learning how to create my own farm map. I was doing some testing to better understand how everything works. The problem is that when resizing and moving the farm using Tiled, when loading the game, the farmhouse and greenhouse remain in their previous place even though the tiledata has been repositioned with the farm's movement. How do I solve this? 
Are you testing by loading up an already existing save, or are you testing by creating new saves?
I'm testing creating new saves.
The farmhouse and greenhouse are no longer part of the map itself. You should not have any tile properties on the map specifically for them.
To change the position, you must set specific map properties; see [[Modding:Maps]] for reference. (specifically, GreenhouseLocation and FarmhouseEntry. My capitalization might be wrong, check the wiki.)
Guys...help. I'm having ideas about overhauling Margo into Sunberry Village.
My rewrite for her has gotten so big that I just can't see her living in Willy's attic anymore
😈 what about your own custom location using Central Station and boats and scope creeping and...
SOBS
Scope creep is the other modders curse
joke aside, you can see how sunberry team feel about it, but i think it's good to have alternate options in case for whatever reason they can't accomodate/aren't open to the idea
you can join the SBV server, but last I checked they're not currently looking for new tenants
I want to do this but I'm scared of losing what I currently have...but maybe new things would be fun?
ES is always an option though
Oh! I didn't realize they weren't looking for anyone new. I might ask, though
also i like having options to work on stuff alone if needed but everyone is different
a far off location is nice
no need to deal with warp patching
it's a lot easier now than before too
there are a few limitations in term of warping back to location if she goes to PT but nothing awful imo
Thank you for this! I will consider other options
Well, time for me to find a new home for her!
I feel cautiously optimistic about this 
What's her deal?
Margo's? She's a war veteran like Kent and was raised by a family of fishermen. She was married but is now not (why? Find out in next week's episode), and is a little hesitant to reconnect
Like a lot of characters, she's rough around the edges but is very loyal and dutiful.
I'm really not selling her am I
Maybe I'll just...keep her vanilla but patch in a new area for her
I'm thinking of a forking path from the way down to the beach into a new area SVE vineyard-style...but then it wouldn't be compatible...

there is a lighthouse npc mod that when sve is loaded lives between the beach and sve's vineyard area
This is so stressful and for what
if you want low stress with compatibility, go in the loft mod, or have an area connected by central station
Loft mod?
Hmm...
I might go with central station...take me to the beach
Ohh god this idea is expanding quickly
Am I really gonna try and make a small expansion..?
Oh! Alright then.
Is there anywhere I could ask for collaborators?
I feel like a very silly guy rn
You can ask but my experience is that you will need to have a very mature project first
And then someone might help you with a little c#
Got it. Maybe I'll do character sprites + portraits for Margo and conceptualize + sprite new characters...then I'll ask around if anyone is interested
i think having her live in willy's attic is fine tho
are there other npc patching that
I can't do buildings/furniture/or map making for the life of me.
then i second sinz's rec here
theres an npc living in a room on the left wall of willy's shop
not sure about attic or not
its basically boarding house 
See. Before it was fine. But now it's not. Her story has ballooned without my permission
but for 1.6
This is what taking breaks does to a mf. You start building new lore.
iterative development, while doing sprites/portraits etc have her be in the attic yolo
once you have an npc that works then you can consider maps
She does work. I have her moving around and such. So I think I'll do the art side of some things and come back later to request a partner
I've been doing general Lore Stuff™ while i pretend i don't have to make all of the maps, sprites, dialogue, and events.... 
I'll keep what I have on her currently and I can always come back to it if this doesn't work out
Are mod authors allowed to make threads on behalf of non-authors still or has that changed?
Trying to create/update some events and wondering if this is the correct format, specifically for the farmhouse level:
{
"Action": "EditData",
"Target": "Data/Events/farmhouse",
"When": { "FarmhouseUpgrade": 3 },
"Entries": {
Probably low, since...
- it'd involve new art and translations which the base game wouldn't use;
- the newer ones are equipment-related attributes which normally aren't displayed by the base game.
It's designed to be extensible though, so mods can add custom display logic for any that aren't handled by the base game.
time to PR to spacecore or something 
alr I have no idea how to code in C# or how SV modding works but I need to make a mod
!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.
well the mod I wanna make would have quests and in-game tracking so I think it will need coding
Im not new to code its just I dont know c#
idk im checking the pinned resources
there's a lot you can do with just content patcher, since a lot of the game is data-driven and therefore a lot of game behavior is governed by content
mhh ok ill check it than thank you!
Still allowed!
Would you mind making me a thread, Aba? 
I can, but you already have one?
If two isn't allowed then I understand but I'm planning a mini-expansion and don't want folks to be mislead by my original thread title 
There aren't rules around it - iro has two - but you can just get whoever made your thread to change its name if that's the only reason you're wanting two.
That looks fine, though I'd suggest using the precondition InUpgradedHouse instead of the When condition to check for farmhouse level for people like me who use Event Lookup.
I'd prefer if mine was in the general mod making chat, since it's more than art! 
That distinction doesn't mean anything (my thread is half C# and it's in the art channel) but sure. What do you want to call it?
"Sage Makes A Mini Expansion (Agony)"
Thank you. That was the big question, if setting up FarmhouseLevel in line with other preconditions (like Time, Date, etc.) was better than the format of my example because I rarely see "When" used in other events
Sage Makes A Mini Expansion (Agony)
Question: Is there any way to reset response ID's? I want the farmer to be able to answer a question multiple times, but right now the response ID is logged, and after that the question cant be answered again...
Do you want to use the response IDs for anything? If not, you can just remove them from the question (note: you can't actually remove response IDs but if you set each one to something unique, the question will repeat endlessly and never play fallback text - but will give you friendship point changes unlike $y questions) or use a $y question. If you do, you can run a trigger action MarkQuestionAnswered <player> <answer ID> [answered] to unselect a dialogue answer.
Would this be a better format than the previous example?
{
"Action": "EditData",
"Target": "Data/Events/farmhouse",
"Conditions": { "FarmhouseLevel3" },
"Entries": {
Or would it be better to put /FarmhouseLevel 3/ in with all the other preconditions?
Nope, that won't work. Conditions is not a real field. This is what I meant by precondition:
{
"Action": "EditData",
"Target": "Data/Events/FarmHouse",
"Entries": {
"{{ModId}}_Event1/Friendship Penny 1000/InUpgradedHouse 3": "Event script here"
}
}
Wonderful! Thank you very much. I greatly appreciate it! Placing everything within the preconditions will be so much easier for me to do and understand because my brain can only handle so much lol
(In general preconditions are preferred over conditional edits, so that its always known to the game and stuff like EventLookup and stuff will be able to see it)
So, just for clarification, if I wanted a 14-heart event to only take place after I was married to Abigail and had a level 3 farm, the precondition would be:
"{1234567/0 Abigail 3500/InUpgradedHouse 3": "Event script here"
}
}
Thank you. Good to know.
Friendship Abigail 3500 or Spouse Abigail/Friendship Abigail 3500 if you wanted to be certain it was marriage and not some other source
1: use strings for event IDs rather than numbers - way easier to read and guaranteed to be unique if you prefix them with {{ModId}}_. (Also that opening curly brace shouldn't be there but I'm assuming that's a typo)
2: use full word preconditions instead of the single letter ones, so use Spouse Abigail instead of O Abigail
3: the Spouse precondition doesn't take friendship points, so remove the 3500
in general the legacy short aliases shouldn't ever be used. Vanilla only uses it for backwards compatibility
(also that was the number 0 not the letter O)
How would Spouse Abigail guarantee it to be a 14-heart event when she can be a spouse at 10+ hearts?
It wouldn't, you have to do what SinZ did where you have Spouse and Friendship preconditions separately. And please do include the Spouse precondition because I get some weeeeeird events playing with a mod that allows higher heart levels without romance when people just use heart level to gate events haha
(Which I deal with because I'm using a mod that changes the expected behaviour - but since it's very easy to add both preconditions it makes sense to do so imo)
Perfect! Thank you both so much. You have no idea how much easier you just made things for me.
Good to hear!
Before I go, does everything here look good after what we discussed?
{
"Action": "EditData",
"Target": "Data/Events/farmhouse",
"Entries": {
"<eventID>/Spouse Abigail/Friendship Abigail 3500/InUpgradedHouse 3/<other preconditions>":
Yup that looks like it's what you were after. If you try it in game and it goes wonky, the InUpgradedHouse level might have to be 2 instead. The wiki says it's about how many times the farmhouse has been upgraded rather than its current level and I might've gotten mixed up with how many times you upgrade to get to house level 3 lol
I thought it was 0-3, 0 being the starter, 1 adding the kitchen, 2 adding the other rooms, and 3 adding the cellar
Okay so maybe I was right then lol
I am basically just updating some code from Legacy. The event already has an ID number and "When": { "FarmhouseUpgrade": 3 },
I am just trying to simplify everything and bring it up-to-date with how things are currently done
Is it your own mod or someone else's you're doing a personal edit on?
Someone else's that I am just doing for my personal game. There are events in their Legacy version of the mod that are not present in the current version and I am trying to include them. But this also helps me learn how to code my own when I get to that point.
Up to you whether you change the event IDs then I guess. I tend to edit mods to change their IDs from numeric to string but it can be a lot of work if they have a bunch of other json that check if the events have been seen etc.
Right. I don't plan on changing them for already established events, but WILL use string when I make my own. I am having to go through something like 10 different json files between the Legacy and current version of the mod to see what events exist in both, need to be added/edited from Legacy to current, etc.
Don't know if this will be of any use to you in this particular project, but there are various ways of doing a "find in files" search where you can search across many files at once. I use it to search my entire Mods folder to find which mod has a certain event or to see where in a mod's files it's referencing the event ID outside the event patch itself etc.
I am definitely interested. I know Notepad will use the same Control+F search across each tab, which is what I've been using, but did not know there was a way to search all folders at once.
If you're using Notepad++ (which is what I assume you meant when you said Notepad, because Notepad doesn't do tabs) you can just open the search screen and go to the "Find in files" tab.
Is there a condition we can use to apply a patch only for hosts/farmhands?
Just started using Notepad++ and it is what I am using for editing, but have also been using Notepad, which does allow me to have multiple tabs open at once. I currently have a Farm.json and a Farmhouse.json open. I basically use Notepad to open the json files, then copy/pasted what I need over into Notepad++ and edit everything there
what are you thinking of doing? there are some types of patches (e.g. maps, likely) where this will cause Problems™️
A dialogue key where I'm using IncrementStat to serve as a counter and will only really work for the host
So I'd like to just replace it for farmhands
Why not just open them with N++? (Oh and I just googled and found out Notepad does support tabs in Win 11 - I am on Win 10 which is why I didn't know lol)
i would probably just unconditionally patch the dialogue key and make the place where you are checking the stat only work for the host (for example, if it's a trigger action, there's an IS_HOST GSQ you can use in its Conditions)
Because I have no idea what I'm doing lol
No worries. I have only ever used Notepad on Win 11 and was not aware that previous versions didn't have tabs
Honestly, I think keeping them separate helps me make sure I don't accidently mess with a file I don't intend to. So having to go between the two program windows gives them a certain degree of separation which keeps my mind at ease. But who knows, as I become more confident in what I'm doing I will most likely switch things up and become more efficient.
Hmm... that might be somewhat awkward to do because the dialogue key is also already a $query type of key to check if the stat counter is already active
Can $query check more than one GSQ at a time?
GSQ already has the primitives for that, QueryOperationA "arg1" "arg2", QueryOperationA "arg1" "arg2" would return true only if both operations were successful
I know we can use multiple in places like Conditions but dialogue commands in particular seem more temperamental 
Can I list multiple seasons in 1 precondition? For example, if I wanted it an event to take place in Spring or Winter, which will work best:
/Season Spring Winter/
or
/Season Spring !Summer !Fall Winter/
You should use the first one. You can't negate an argument for a precondition, only the precondition itself. So for example if you wanted to have an event that didn't play in winter you'd do !Season Winter not Season !Winter. By the way, are you making use of the events page on the wiki?
(TriggerActionData also just has a HostOnly field on it)
Can I use a / within a dialogue string, or do I have to escape it?
As of 1.6, no need to escape it.
"Event commands are quote-aware, so you can use spaces and slashes in arguments like speak Penny \"I'm running A/B tests\" without needing to escape them (the quote marks themselves do need to be escaped). "
Yeah I think escaping it would still work but you can check that easily
Oh yeah I remember seeing that, it's in event commands rather than dialogue
Oh sorry I have events on the brain you just meant regular dialogue. I don't know if you ever needed to escape them in regular dialogue?
Ooooh, that makes perfect sense. So would it then look like:
/!Season Winter !Season Spring/
Yes, I actually printed it out so I can flip through it, make notes, highlight, etc. lol
No, it would be !Season Winter Spring. But you can just do Season Summer Fall instead if that's easier for you.
Curiously, $query seems to return true if either condition is successful 
the query dialogue command just calls the normal game state query parser, it doesnt parse any differently from a Condition field
Excellent! Thank you, again! You have been a wonderful help. I know I will have more questions as I progress through this, but I think everything we covered so far will keep me busy for a while.
Well, it doesn't seem to behave like other condition fields, is writing it like this not sufficient for $query? 
Wait, I think I'm just stupid
Yeah I'm just stupid, needed to reverse the dialogues to make it work like I wanted with this 
i'm using notepad++ and having trouble block-commenting out stuff. ive tried the ctrl+shift+q shortcut, highlight and right click, highlight edit block comment, and noen of it is working. is there some way i need to set it up to be able to block comment instead of commenting out every line
You could just write it yourself? It's pretty easy.
/* Woooo I'm a block comment laaaa.
Oooh still so commented out!
*/
maybe it's just me, but it doesn't seem like that works either?
is your thing set to jsonc or json5 instead of just json?
probably not? i've just been saving as .json
your syntax highlighter, i mean
cuz comments at all are not allowed in standard json and will show as errors
That's just because you're using json for the language so Notepad++ thinks your comments are errors. Switch to json5.
See my happy comment in the background
oh does the red mean error skdjfhdsfj i thought the red meant comment
newtonsoft (the library SMAPI uses for json parsing) is more flexible and allows comments, but ordinary syntax highlighters dont know that
Versus json
yeah it probably means error. depends on how your highlighter chooses to highlight things
Yup it definitely means error.
You can probably set up a file association so it always sets the language of json files to json5
good idea, i'll look up how to do that
Looks like you edit langs.xml to add json as an extension to the json5 language. I didn't have to remove it from the json language.
You could handwrite some planning stuff in a cooler place?
Ohh true! Thank you!
Is Game1.player a valid way to access the Farmer in multiplayer? If so, is that also true for split-screen?
Game1.player is always the current player, whether in single, multi, or split-screen
wonderful
i was delighted to learn my UI "just worked" in split-screen co-op and i hope that trend continues lol
GULP TIME TO LAUNCH MY TEST
Tail between my legs...could anyone assist me?
https://smapi.io/json/none/3dd96344bfd1401b9262c7b9b1fbcae4
https://smapi.io/log/7a65da379e544aaa8572b2ebcfcfe47f
Log Info: SMAPI 4.2.1 with SDV 1.6.15 build 24356 on Microsoft Windows 11 Pro, with 10 C# mods and 5 content packs.
I do have action fields filled out...I think I'm missing something obvious
Istg I retained such little knowledge on things...then again I've never done map stuff other than Add Room so...
WAIT NVM PRETEND I SAID NTHING

Why are you using CustomLocations, Sage? That's old.
IS IT? I'm using it because...that's what was in my Margo files 
You never updated Margo for 1.6?
You're also not using mod ID for your map assets and you really should be.
I didn't think I needed to...she works fine. But she's old news now, this is Unnamed Fishing Village time
The {{ModID}} ?
My guess is that your log warning is because you're trying to put CustomLocations inside the Changes field and use an Action field inside it, neither of which is how CustomLocations works.
It gave me the same error before I added CustomLocations
I just assumed the first action field didn't...count...which is so silly now that I think about it
It looks like you're just typing it out manually in your shop entry which you can do if you want to. But for your map load you're not using your mod ID at all.
"Target": "Maps/Custom_CentralStationTest",
Well, you've got Action fields for your map load and your central station shop stop entry, so you might've been missing one of those before.
Anyway, I recommend you completely yeet the CustomLocations stuff and use this instead: https://stardewvalleywiki.com/Modding:Location_data
It's clear I've royally messed up because I'm not adding a shop, I'm trying to add a location for Central Station to go to
as a test before I make the actual map
Grabs this with my grubby hands
Oh whoops no that's me continuously misreading "stop" as "shop"
Oh haha
Hm okay the tutorial I was kinda following doesn't have that haha I see why I got messed up
What tutorial?
Tiled is understandably one of the most unintuitive/intimidating programs to use when making maps or patches for your mod. This tutorial aims to break it down into very simple steps with pictures!
Tutorial made by skellady.
I see at the bottom the last edit was 2023...I thought since Dao was a recent release, it was recent
Oh that's max's tutorial which I asked and was granted permission to update but which I still have not updated lol
Always important to check how recent tutorials on the modding wiki are and then crossreference their info with the official wiki
Because unfortunately they're outdated pretty quickly
Dang alright
Anyhow, could you keep helping me get this thang up and running? I'm way out of my depth here...
See the example on the location data page? Copy that.
Aye aye captain
Yes, No, Maybe So?
No errors yet 
Uh, you just deleted CustomLocations but haven't added the patch you need for the location via the newer method.
(Also it will be easier for you to avoid errors if you fix your indentation. If you're using VSC, hit Alt+Shift+F to auto-format your json.)
(oki)
I feel the need to apologize for my silliness haha
You don't have to apologise!
I just worry that I miss the obvious too much haha
Log Info: SMAPI 4.2.1 with SDV 1.6.15 build 24356 on Microsoft Windows 11 Pro, with 10 C# mods and 5 content packs.
what is working and what isn't?
Nothing, I can't access the location via train because it can't locate the map
Log Info: SMAPI 4.2.1 with SDV 1.6.15 build 24356 on Microsoft Windows 11 Pro, with 10 C# mods and 5 content packs.
Ah, your map doesn't have a Front layer, so the location didn't get fully made so later on when trying to warp to it, nothing happens as its not a loaded location
Oh, I see
Okay lemme add a front layer
Woah a new error: https://smapi.io/log/fe7a4307e57b448596d68c749a14a556
Log Info: SMAPI 4.2.1 with SDV 1.6.15 build 24356 on Microsoft Windows 11 Pro, with 10 C# mods and 5 content packs.
hm, how do i go about adding custom context tags to items? I tried poking around the wiki but couldnt quite find what im after
items have a context tag boolean (is that what's it called?) unsure of the exact format I think there's a []
Tilesheets should be in the same folder as your tmx file during development in Tiled
There is a ContextTags array in the Objects entry to specify them
This is not an error I've ever encountered while making this kind of mistake (and I've made it a ton)
for vanilla items, if i wanted to tack on a context tag, would i just edit the entries for each one i wanted and add the tag into that array?
Yes, but you would need TargetFields to get deep enough in to not delete everything else adjacent to them
"Action": "EditData",
"Target": "Data/Objects",
"TargetField": ["472", "ContextTags"],
"Entries": {
"context_tag_name": "context_tag_name"
}
},```
if someone downloads a mod to change the rain mid save would that change the rain still (trying to figure out why my rain mod isnt working for someone but its working for me)
idk if rain is one of those things where you might need a fresh save for 🤔
Is it More Rain? Make sure they've modified the config to what they want, it starts out as the default rates
nah I made a rain recolor and they said its not working because they have cloudy and weather wonders but i have both of those and my rain still changes
they might have something else overwriting it but i wanted to make sure it wasnt one of those "you need a fresh save" kind of things
if anyone knew
possibly, the thing is they didnt provide a log so i can't even try to see if i can visually see why its not working
(Also sleep a day ofc)
oh yes true
oops, sorry, didn't see this. I have a few affected ones but they're from modded-tech-support rather than being mine, https://discord.com/channels/137344473976799233/1368333776572383283 and https://discord.com/channels/137344473976799233/1368771523527053424 are two examples (need to scroll down in the second one to see the problem mods)
Man, I sure wish I had asked the question that popped into my mind while at work instead of waiting until I am home because now I forgor :(
does anyone know if there is a mod that adds more tools to event modding?
What do you mean by tools?
If you want more tools for testing, SinZ Event Tester is the one that comes to mind.
I mean like adding more commands that do stuff
eg. adding a event command that allows you to turn an actor by 90 degrees
If mean like more event commands, i know atra is working on something
Turn actor 90 degrees 
Isn't that just face direction
You can use things like temporaryAnimatedSprite for that
I believe you can add event commands in C# if you want
But I'd wait for 1.6.16 changes before considering that
And yeah what aba said
that's what I was planning to do but I wanted to ask first :3
I am your friendly local TAS representative
lmao
thank you. this actually helps me with multiple things!
some people like you guys answer so many question here, very honorable. you have my dearest respect for all the knowledge you have 
Miihau I'm extending this offer to you specifically but if there is ever an event command you want I can make it for you
Just..... my schedule is hell on a good day so it make take me a while
We can also probably get a chue to do it
No im allergic to npc bye
I did wonder if critter spawn trigger would work in events tho
I don't recommend awaiting 1.6.16 before starting anything. There's no timeline (e.g. it could be years away for all we know), and any event stuff you make now will still work in 1.6.16.
I'll keep it in mind <3
that's really awesome of you!
(I'm really considering just deprecating the logic for parsing info like that out of the raw log, and having SMAPI dump a hidden JSON log message with the metadata for parsers.)
I do think that would be a good idea in the long run, but I would worry about Android SMAPI users if it didn't fall back to the old style when not given the JSON data.
It would still support the old method until the older SMAPI versions were no longer in active use (just like it still supports logs created before the recent web revamp).
once again i come on here and see reminders that i should figure out if my event bullshit mod can even work
Do it. We all agree the less modding atra does the better tbh
How can you use temporaryAnimatedSprite? I thought the animations were hard-coded
Wiki might be helpful:
https://stardewvalleywiki.com/Modding:Event_data#Basic_format
Scroll down or use CTRL+F to find it.
Never used them, though, so no idea how it really works.
Oh I see, that's new. The wiki didn't have all that information about the command
Hi, does anyone know if it's possible or how it could be done to have an item that lets you collect water from the water well? Like a bucket or a bottle, something like that
Isn't that watering can
More storage for water would be fun
Anyways, I personally think it's trivial c# but y'all don't like it when I say that lol
i would maybe call that "outsourced C#" /lh
content mods r generally using other people's c# tho
Sometimes the other person is concernedape llc
Smh I'm gonna get f# to work just to make a c# free mod
true enough, every CP pack is using CP's C#
But yes the reason for trigger is so that u can make it once a day
Oh! May the fifth be with you
wasnt there that one VBA mod
There was, reset terrain features had a VBA .net 5 port
Hello wise people
, I need your help. I want to add a glow to my hat, is this possible in Content Patcher? If not, can you suggest a way to realize my need🙏 ?
Hm is that a fashion sense feature
no, just cp
I mean, I don't use fashion sense
I want my hat to be a real object (which fashion sense doesn't allow under the conditions of using standard 20x80 (that I've read out)) and to glow when equipped
My idea is to collect water and turn it into a cooking item for a recipe, but I think I’ll just make the item and have it purchasable at the Saloon.
Not possible in CP, maybe possible with a framework
Definitely possible in C#
finally adding water to the Bread recipe i see /lh
FS supports real items now, maybe look into that
(idk if it supports glow)
got it
???
i can make animated hat and add it in to store???
Actually maybe u can do it with like
Spacecore equip buff + that mod called glow buff
#making-mods-general message has an example mod for physical FS item
I don't think anyone has actually made a mod with that feature on Nexus yet
🫡
well, if i understand how
then maybe...
thanks
i'm ready for when they do
Atracore equip model directly supports glow
You should try bullying me into separating it from atracore and releasing ut
Atra can u do that and dehardcode this too ty
Maybe take back combined rings in the process
Just realized that FF doesn't refresh Furniture data when CP patches a content file, so the CP compatibility I advertised is only half working 💀
You might already be aware, but I would guess that furniture instances themselves also do not always refresh when the underlying data changes, at least for some properties
Never specifically tested furniture but I've run into similar issues w objects
I think the texture would update, but maybe not some of the properties?
There's a bunch of net fields that persist into save yeah
I don't really think this is FF's job to fix though, it's like how you shouldn't rely on Data/Objects for item names
true enough — there's some properties that might be nice to be able to change dynamically, though, so it could be a possible feature (or the persistence might be something people prefer to happen!)
Trigger action mayhaps
Well, FF basically handles all the data of the Furniture because I had to work around weirdly hardcoded stuff and somewhat wrong rotation maths, so refreshing the data in FF should refresh the whole Furniture
I can't think of anything that wouldn't be refreshed through FF
Then it's fine as long as u don't impact vanilla furniture 
Yup, all my Harmony patches check if the Furniture ID comes from FF before doing anything
What is wrong about the rotation maths tho
I thought it was merely uh, quirky and kind of broken when u had a fireplace rotated
the rotations are really weird case by case on the type of furniture
there's some assumptions about the dimensions of specific types
like I think the Long Tables make an assumption that they can only be a certain height?
end tables at one point couldn't be rotated at all, but I think that got fixed
but they probably still can only be 1x1?
basically everything is totes fine as long as you only make furniture the same size as vanilla
if you start making bigger or smaller furniture, usually it's fine
but there's some weird cases depending on which of the seventeen (iirc!) types of furniture
don't ask me why there are 3 kinds of tables and then also decor and other
My npc phased through a house then never came out when they were scheduled to get home and sleep
Believe it or not, atra-equips is a messy pile of emit code
classic schedule problems
I could rewrite it, huh
some possibilities: you made them go too fast
My messy emit code, not the scheduler
schedule points too close together
maps name misspelled
something blocking the path (though I think this usually just makes them refuse to move?)
I've been thinking I should just use atrabase again
Atrabase is fairly independent and has a lot of helpful ReadOnlySpan functions that I do rely on
I've copied SpanSplit tooo many times
(Independent of game or monogame code)
For debugging schedules:
- remove any mods that are not directly needed (debugging general best practice)
- move them step by step (simple 2-point schedule -> check if it works -> add one more stop -> check if it works)
- check that map names are correct
- check that the farmer can walk the same path without obstacles
- check that the times are in the proper format (can't move right at 600, 2am is 2600)
Remind me in 4 days to build a schedule linter
sure just remind me before i have to remind you ok? (#6668817) (4d | <t:1746815146>)
Thanks
Other issues that can happen:
- when the same map has 2 ways to get there (between maps) the game doesn't always find the best route
- having lots of schedule points too close together sometimes means the NPC can't reach them in time and protests by running off into the void
- schedule points too far apart in distance for the amount of time between them has the same problem
GIMA 2.0?
Hey
I keep getting burnt by using conversation topics as timers for events. Is there a better/different way to trigger an event a set time after something else happens?
Pretty sure the culprit is LastingConversationTopics, but not 100%. And it's a popular mod, so kind of sucks to be incompatible with it
Yeah you can use stats
@copper kestrel heyyy is there an option to opt out here
IncrementStat yourstat -1 in a trigger
I have a lot of trigger actions that use CTs to space them
And given this is how vanilla works
I was under the impression that Lasting Conversation Topics was opt-in
Unless you're using vanilla CTs
How do I get the items in a Junimo Chest? For a normal chest, I'm using (ItemGrabMenu.context as Chest).Items but for a Junimo Chest that list appears to be empty
Junimo chests go in a specific global inventory
I think the name is JunimoChest but double check
Haven't seen this before. I thought that player stats were all predefined. Is this something I can do with just CP, or something I would need to use C# for?
That sounds absolutely amazing
The main disadvantage is that you can't access stat as cp token without another mod rn
I'm hoping to implement the stat global token eventually™️
I thought so, too, but I have several users who are having CTs screwed up. Set to 14 in the save file. Sleep a few weeks, it should count down to 0. Open the save file and it gets reset to 73. Then 88
LCT is opt-in, the content pack by Lenne does contain several vanilla CTs that could conceivably be used as timers. my personal recommendation: trigger action on DayEnding, if the player has the CT assign your own alternate CT with the same duration as it would normally have, use your own instead
Do the reminder CTs stay around forever? I might be able to just detect the presence of one of those, rather than the absence of the once I was using as a timer
if you don't want to do that for whatever reason, you can patch into the asset and null out the CT to stop it from lasting forever
I was using my own CTs, prefixed with my ModID for timing, so I really don't understand how LCT could be the problem. But I looked at their log and can see absolutely nothing else that stands out to me
It sounds like a different problem then
send me a log and an explanation of the issue and i can take a look at it if you're certain it's LCT
Sure. Give me a bit to track down the file again. User sent it to me a few days ago
And thanks
no worries, it'll be a bit before i can take a look anyways
DM me bc i don't check maincord
I couldnt find anything for Junimo Chests
Well im 100% sure it is a global inventory
Where would global inventory data be stored?
I dont see anything under Player, Game1, or Chest classes
case SpecialChestTypes.JunimoChest:
return Game1.player.team.GetOrCreateGlobalInventory("JunimoChests");
}
GetItemsForPlayer should work for both regular and global inventories right
It's right in Chests.cs
(FFP doesn't use it and does things manually because uuh I didn't know)
Well, no luck so far.
I followed all the steps carefully, but still no movement from any custom NPC...
Am I missing something obvious?
Here's schedule.json
{
"default": "610 FarmHouse 5 6 0/700 FarmHouse 5 8 2",
}
And content.json part
{
"Action": "Load",
"Target": "Characters/schedules/Elena",
"FromFile": "assets/schedule.json"
},
Try "spring" instead of "default"
(and sleep a day if you haven't already)
(which mod, btw)?
Esca's modding plugins and calcifer both have it iirc
A stats token
Ofc if ur using this for events then u can just check the stat in preconditions
That would be all I'm using it for, yeah
You can trigger action a mailflag based on a stat to use it in cp more easily. My book mod does that a lot
And there's another workaround where u use a second trigger action to set a mailflag which do have token
But yeah if event then use the GSQ
It's generally recommended to avoid having conditional patches into events
Thank you!
A quirk is that you can't ever check stat=0
Cus when u increment to that it is removed
Can I check stat = -1?
So check for 1 instead
Got it
the current release of calcifer doesn't have it, it will be in the update
explain for me🥺 what "logname" is doing, like, i will see something in console?
Log name is for hint when your patch fail for any reason
If you don't have the logname u get a default name
Having it helps debug
Oh wow, that actually worked! Wish all my problems could be solved with a bit of sleep. Thanks a ton!
thx ♥
No you're fine if your goal is to iterate ocwr all player inventory
a lot of problems can be irl too, but yeah npcs don't move on first day of install (except day 1 because you play day 0 before that)
I have an event that is triggered from several different locations, but the event is stored in the eventdata of only one location, SeedShop for example. Is there any way to have the end of the event warp you to where you started it, or will it always warp you to where it is stored in data?
i don't think you can now because i don't see how you would store where you triggered it
however my understanding is that future plan in game update may allow this kind of thing more conveniently (maybe), but it's likely long term stuff
i believe you can end an event in a specific map, to clarify, i just don't see how to do the "where event started" rather than, i don't know, end in town
Maybe you could have the main event be a changetotemporarymap? I think the player goes back to the map they started on once the event ends
Though that would mean putting versions of the event in each of the locations it can be triggered from
is there a way to take the Stardew Valley Fair wheel and reporpuse it? I want to add a wheel system for rewards but idk
The way is called programming your own minigame in C#
I dont know if that is a doable thing
I think it'd be fun esp if u let other mods add prizes
-# in other words framework it
ye probably its easier
Yeah thats what i want to avoid lol. Its not a big issue
so basically making it a library that other mods use?
Not quite
Basically you can define and access a particular content
And using this data, build your wheel game
Another question i have though, how is mail data structured? The wiki page isnt very helpful. I know how to add mail via CP, but how do i tell the game when to send the mail? I looked at the unpacked game files and, for example, in the AbbySpiritBoard letter, there is nothing to indicate that the letter is sent at 8 hearts
Framework mods refers to C# mods that add new functionality to the game's code, and allows content mods to make use of them without having to make their own C# component. They usually work by reading custom data set in content mods and then apply their changes accordingly.
This page details the various...
thanks!
So the "other mods" in question would be content mods
alr
E.g. maybe i add a new hat and wishes to put it in your pool o prizes
Or I don't want it to be in there cus it's a special plot hat
Yeah probably many different words for that
you take the component and give it stuff you want it to use
I don't do game dev outside of modding so im using sdv modding words here
Mail is typically sent via TriggerActions
Easiest way these days is via trigger action. There's also an event command
I would like to make a mod with challenges, penalistes and rewards, given trough wheel systems so probably itd be better to first just make the wheel
As seen in Data/TriggerActions:
How would people find your wheel?
ahah for me its the opposite I only do games and super new to ehre
literally installed dev smapi yesterday
"Id": "Mail_Abigail_8heart",
"Trigger": "DayEnding",
"Condition": "PLAYER_FRIENDSHIP_POINTS Current Abigail 2010",
"SkipPermanentlyCondition": null,
"HostOnly": false,
"Action": "AddMail Current abbySpiritBoard",
"Actions": null,
"CustomFields": null,
"MarkActionApplied": true
},```
here's the trigger action entry for example
itd be a UI
Thanks! big help
oops lily beat me lol
lmao
Oh but u know how the vanilla wheel is part of a festival
LOL
Where/when do ppl find your wheel in game?
mhhh wdym
You played the game right 
accordying to the system I had planned it'd be a panel that appears at the end of a season/month when you finish a quest and a new one is selected
yeye but what I mean is taking the UI part of the wheel and using that
Ah it's a virtual kinda wheel then, rather than in universe carnival game 
I was going to make an app but than I tought an actual mod would be way better since it'd be able to directly track the ingame quests ecc
https://github.com/ChoppingSlime/StardewChallengeGenerator
yea
but I mean, once the wheel system works it'd be very easy to make a phisical version of it (I think)
Neat, i think it'd be cool to have this tracked yes
wdym
Tracked within the game as a mod (im agreeing with you)
You may find this useful https://stardewvalleywiki.com/Modding:Modder_Guide/APIs/Data
I managed to do a couple stuff like tracking acions and ingame time but that is fluff
ah no didnt see this
This is also relevant if you want to do things like "ship 300 flowers" without hardcoding every flower mod ever
omg thank you so much
this is somethign I was really looking for
Hmmm.... Im getting this error : Mail Triggers > assets/Jsons/Events/MailTriggers.json > EditData data/TriggerActions > entry #1" to data/TriggerActions: failed converting String value to the expected type 'StardewValley.GameData.TriggerActionData': Error converting value "Mail_Abigail_Initiation" to type 'StardewValley.GameData.TriggerActionData'. Path ''..
and several more like it for lines 2-4,
when i run this code:
{
"Changes": [
{ //Initaition Mail
"Action": "EditData",
"Target": "data/TriggerActions",
"Entries": {
"Id": "Mail_Abigail_Initiation",
"Trigger": "DayEnding",
"Condition": "PLAYER_FRIENDSHIP_POINTS Current Abigail 750",
"Actions": "AddMail Current AbigailInitiation"
}
}
]
}
Anyone know what the issue is?
Entries take the form of a key to object dictionary
currently you have the object as the Entries field itself
"Entries": {
"Mail_Abigail_Initiation": {
// the fields here
},
}
Including the "Id" field?
yes
if you want to add another trigger action that would be another block below that one (with its own Id, Trigger, Condition, etc.) inside Entries
Ok! That got rid of most of the errors, but theres still this one
Initiation Mail Triggers > assets/Jsons/Events/MailTriggers.json > EditData data/TriggerActions > entry #1" to data/TriggerActions: failed converting entry to the expected type 'StardewValley.GameData.TriggerActionData': Error converting value "AddMail Current AbigailInitiation" to type 'System.Collections.Generic.List`1[System.String]'. Path 'Actions'..
This one sounds a bit more insidious...
also thank you so much btw
is there a place where I can see all methods? Idk if its possible to force a different luck level
Actions is a list of strings
so you need [] around the value
If you only need one action use Action (without the s)
!decompile
If you want to make SMAPI mods with C#, one important resource is decompiling the game to read the game code. Here's how to do it: https://stardewvalleywiki.com/Modding:Modder_Guide/Get_Started#How_do_I_decompile_the_game_code.3F
yay! it worked. Thank you!
Modding is so particular. So many times ive been pulling out my hair only to find a missing comma
im slowly getting better tho
coding in general
god sounds like a lot of work
decompiling has been super helpful for me. it took a second to do, but it was worth it
I mean you're making an entire C# minigame...
i imagine that it will be a lot more helpful when working with C#
all u need is ilspy
Ah shit i forgor to add ilspycmd instructions to wiki
Remindme 1hr add ilspycmd
Weh
ill try it thanks
It's incredibly easy and a miniscule amount of work lol
Download ilspy, open DLL, check settings, export to project (if like me you can't figure out how to use ilspy).
I think if you're a normal dev ilspy plug-in works
If you're a crazy transpilrr dev
I had a thought but I lost it
I haven't found something better than just reading all of Stardew Valley.il tbh
I have gotten better at spotting the opcodes tho
Every time I try to look at the game in ilspy I get lost. Combined with not knowing if there's any advantage to viewing it there over in VS22, I gave up.
ILSpy's search is much more powerful than what VS has
Like more flexible or something? Or is vs somehow not searching all the files?
The only issue I've ever had with searching was when I didn't know what to search for
Not sure if this should go in modded-farmers, but I have a quick question.
Can I install Content Patcher packs while the SDV instance is running safely? I assume it's not the same for C# mods.
You can install them but they won't do anything. Same with C# mods. You'd have to restart SMAPI to have the mods load.
Why do you want that 
So you can have more chonky cows immediately Chu obviously
Thank you all. I was idly curious. ^^
I can imagine shenanigans needed to make it happen but it's shenanigans for good reason
Surely I am not the only person who browses and downloads mods mid-game lol
You're in #making-mods-general
my god this thing is lgging so much my fps dropped to 2
The veeeeeeery slow wheel of fortune\
Is a large map more likely to cause lag and is it advised to split it into a few?
loading and edits to it will take longer, both due to filesize and it scales with size
oh I was recreatgin the wheel every frame
Hmm, alrighty. I think I may split it into 2 maps
Did somebody say transpilers
you can have large maps and be fine, but don't do conditional edits to it during a day
and definately don't have multiple large maps and have them all reload at the same time
And don't do timechanged patches for maps. Please.
The trees being weird past 200 x or y is still a thing right
the fashionable performance painpoint for maps is wanting to change the lights on a time basis
1.5.6 was changing the music, but Data/Locations does that now instead much better
Remind me to, mumble mumble
It feels like lights are a solvable problem
(Solvelable by 1.6.16?)
Hey a chue. Will a chue do it
I solved it in mmap but idk if anyone use it
Yayyyyyy
The lights in that one can take GSQ
Also u can make window lights if u want
Which makes them obey day night rain
Yayyyyyyyy
whatever farm Scarlett is using could benefit to porting to that then
Isn't that what game does already
No
pufferthink
Actually I think this is pretty straightforward
as long as the condition itself can be static, put it in the map idc, or if the condition itself has to differ put it in Data/Locations.
if its GSQ then don't do it every frame but timechanged is fine
It wouldn't be too hard but I don't know how useful it would actually be
Hm the light cond in mmap is on location changed
Like, could do it without harmony easy
I could probably have it recheck on tome changed too
tbh one of the things I want to experiment with is the concept of sub-assets.
for example, map properties is a sub-asset of the map, and if you only want to change a map property, only the map properties need to be invalidated and reloaded, keeping the rest of the map as-is.
Also want to explore it for some of the stupid spritesheets like Cursors, but detecting what changes affect what section is not fun
Having properties edited separately would be pretty useful, since you can update those without having to go through the entire asset chain with the whole map
subassets would be nice for big assets like Data/Objects too
invalidate only MossSoup
Maybe I can add that to my renovations thing
I suspect, SinZ, if we can get rid of the remaining getdata/setdata calls in the intermediate image structure we could get pretty good
Yeah, that's why I usually go with LocationExtData over map properties
It's fussier but all you do is update a data entry
You can also do more complex structured data that way
I've only made three separate LocationExtData 🙈
Map properties have some advantages though- you can use them for building interiors and event maps
the hard part is when you have a change that affects multiple 'subassets' you kinda have to give up and do the entire thing.
CP can be semi-smart and self-split it, but an arbitrary SMAPI asset change its gg
Yeah. But that is less than common
It depends on the feature
I have a theoretical new way to do editimage that would mostly avoid the interior set/getdata
(And I think iirc memcpy from two arrays in memory is pretty fast as is)
You do it (a) once to get the data to edit (if needed), (b) once to set the new texture at the end, and in the middle as needed only if some c# mod starts poking at the texture directly
I did do the experiment with having the EditImage "remember" being IRawTextureData and only going back to a Texture2D at the end, or if a Texture2D edit is happening, but it was hit or miss and didn't meaningfully change performance.
doing the source image cache did it much better
You still have that PR open, right?
that one didn't progress to a PR as it had some image artifacts or something iirc
https://github.com/Pathoschild/SMAPI/compare/develop...SinZ163:SMAPI:optimization/assetimage-edits
and didn't help with perf anyway
ah yeah those are PRs open
main thing keeping them from merging is 1) me having them in draft, and 2) I still need to get around to working with pathos in how we want to disarm this functionality during mod development
I can probably tweak 980 itself to be slightly more performant by using the forRawData flag to know if I need a duplicate version for the cache or not
currently I don't use it and always store a duplicate for the cache
Oh, I was just thinking of a ModContentLoader.ClearCache
981 I'll want to look at because the underlying tiled data structure is, to put it kindly, bullshit
old and new both seem to work™️ but this runs much faster
the thing with this, is that smapi doesn't currently have commands exposing asset pipeline operations
patch reload is content patcher, not smapi.
and how does a C# mod thats using hot-reloading or whatever tell smapi that the developer changed asset.png
for the GSQ PLAYER_SHIPPED_BASIC_ITEM - Does it only work with vanilla items?
[I ask because I did try to use my own custom item and it did not, in fact, work]
In general, vanilla has no way to tell the difference between (O)ModId.MyAwesomeItem and (O)MixedFlowerSeeds
I don't think so because objects have to have their ExcludeFromShippingCollection field set in order to not be in the shipping collection.
How odd
I don't understand why it wouldn't work then
I know that that part of the conditions was the problem becasue after removing it I actually got the mail I wanted
what was the GSQ you tried?
Is your object excluded from the shipping collection and you forgot that?
What I changed it to:
"Condition": "PLAYER_SPECIAL_ORDER_COMPLETE Current QiChallenge9 QiChallenge10, PLAYER_SPECIAL_ORDER_COMPLETE Current QiChallenge5, PLAYER_MONEY_EARNED Current 1000000, PLAYER_COMBAT_LEVEL Current 8",
What it was:
"Condition": "PLAYER_SPECIAL_ORDER_COMPLETE Current QiChallenge9 QiChallenge10, PLAYER_SPECIAL_ORDER_COMPLETE Current QiChallenge5, PLAYER_MONEY_EARNED Current 1000000, PLAYER_COMBAT_LEVEL Current 8, PLAYER_SHIPPED_BASIC_ITEM AngelOfStars.Mrqifriendable_AncientCactusFruit 10",
It is not currently excluded from the shipping collection :]
sitting there very respectfully in fact
That is not the correct way to write that GSQ
:(
You have to specify which player
You can check GSQs in the SMAPI console btw which is so handy for seeing where a multi-GSQ situation is failing
(Thank you Atra for teaching me debug gq)
is there a command to make mail read as not sent?
A debug command? Yup
debug action removemail current MailID
Apologies for lack of code block - my backtick key is rebelling
Ah i may or may not have just cleared all of the mail lmao... that will be useful I will log this away
Also whats the uhhh ... GSQ debug
No need to apologize!
debug clearmail nukes everything in received yeah
debug gq PLAYER_SHIPPED_BASIC_ITEM Current AngelOfStars.Mrqifriendable_AncientCactusFruit 10
That will tell you if that GSQ is true or false (so if you have already shipped at least 10 it should be true)
You can do it with whole condition fields, like this one of mine:
debug gq "PLAYER_FRIENDSHIP_POINTS Current Wooble 1000, !PLAYER_HAS_CONVERSATION_TOPIC Current FriendshipQuestionCTTimer, PLAYER_HAS_DIALOGUE_ANSWER Current Question_friendship_answer_no, !PLAYER_HAS_DIALOGUE_ANSWER Current Question_friendship_answer_yes Question_friendship2_answer_yes"
(I copied and pasted the backtick from wikipedia for that, you're welcome lol)
Another optimization I'm tempted to do, is when tmx files are requested, is write to disk a tbin variant of the file with the hash of the tmx file or something, and when tmx files load check if a cached tbin exists and use that instead, as the tbins already in the correct binary data structure to deserialize compared to tmx
I did not know that the qi-plane-mysterybox thing was a mail flag... i know it now because i had to watch it again but
with minor exceptions, everything is a mailflag
so many mail flags...
It wouldn't be too hard to set up manually. Just do a file watcher and have it invalidate an asset when the backing file changes.
IDK how useful it would be though. I don't tend to do that much asset stuff with c#
I personally want anything world state related to be in the worlstateids and not just a mailflag on "host"
as it makes changing which farmer should be a host a pain in the ass because no good way to tell what mail is a host mailflag and whats actually farmer specific
but I lost that war a long time ago
file watchers add overhead which would lower the performance savings from caching in the first place.
I might just have to take the L and disable it for mods by default and have mods opt-in to the cache which CP will do as it already has patch reload infra to do it.
it did do good performance wins for SnS as they load a bunch of images and shit every timechanged/locationchanged to re-evaluate their CP tokens that don't use the images anyway
Data/AudioChanges can be a bottleneck in 1.6 if a mod uses oggs but doesn't set StreamedVorbis. even with not so many songs of not so much length, the poor game still has to snarf the whole file (and, i assume, convert it to a waveform) on the UI thread, and it is... noticeable
theres a difference between changing with music to play vs changing the audio itself.
but I do have a mod that mostly unfucks Data/AudioChanges terrible performance (at least the 2nd time onwards)
on my todo list to revisit it to try to async it
back in 1.5.6 i loaded my mod's music (oggs) on a thread and then found time on the main thread to add it directly to the soundbank, although i suspect my methods were not fully sound and i simply got lucky (or had few enough users, lol) to never encounter a problem
...I wonder if XNA/MonoGame makes the threading do synchronization contexts.
Taking a peek, and they only do it for internal unit tests, and maybe some android stuff.
so I can't just get back to mainthread using await whatever().ConfigureAwait(true);
I forgot how much I hate working with radiants and sin cos etc
There is a method to stall to main thread
You may want to generate geometry directly instead of using a ton of sprites
It will be more performant and probably simpler
yoo much better, tysm
super cool, not sure why i didn't consider that monogame lets you draw primitives like that. sounds great for ui testing, maybe a little less if you want a very stardew stylised ui
Hey, y'all. I'm trying to make a tool mod but I'm having some issues. Does anyone know of a similar mod i can use for reference?
can the [(O)OBJECT] dialogue thingie be used with custom items? i.e. can I do [(O)MyObjectId] and it will still give that item? I would guess so but I just want to see if anyone's done it before
I learned it from tinkering with Terraria modding, since it uses primitive geometry and shaders for a lot of effects.
In general, vanilla has no way to tell the difference between (O)ModId.MyAwesomeItem and (O)MixedFlowerSeeds
you did say that earlier... sometimes my brain just likes exgtra confirmation thank you SinZ :)
Fancy!
(also Terraria is FNA while Stardew is monogame so there can be subtle differences between the two, but for the most part if FNA can do it, Monogame should too, the reverse may not be true)
So, a break glass method is usually pretty common
thanks, really greate improvement
now I gotta understand how to fix button, screen notifications, legend/title positions etc
is there a way to QUICLY check things
!reload
- Content Patcher pack: enter
patch reload <your_mod_id>in the SMAPI console window. This will reload and reapply all your patches (but won't recalculate theConfigSchemaorDynamicTokensections if you use them). - Translation files: enter
reload_i18nin the SMAPI console window. If it's for a Content Patcher pack, also runpatch reloadafterwards. - C#: see the Visual Studio hot reload or Rider hot reload feature.
note that there's limitations on what you can and can't apply when reloading code changes at runtime, and the side effects of adding or removing values and variables, but generally ui tweaks will reload well enough.
you'll probably want to add your clickablecomponent position set calls in the override gameWindowSizeChanged method, and resize the game window after changing clickable positions in your ui if you're moving stuff around
I have a location that defines the map property DefaultWarpLocation but when I try to get its default arrival tile in my code using location.GetData().DefaultArrivalTile that returns null. I know I can just grab the tile by parsing the map property, but this feels like it should allow me to get the tile either way. Is this possibly a bug or am I missing something?
(the location is from another mod - I am trying to parse it for my own mod)
pretty sure that DefaultArrivalTile grabs what's in the DefaultArrivalTile field in the Data/Locations entry, so it doesn't load that map property
(1) neither of those two are used in normal gameplay
(2) does the game even use the map property anymore at all
Well it's Pathos's Central Station that's using the DefaultWarpLocation so I suspect it's supposed to
you should call Utility.getDefaultWarpLocation, which checks both things
oh... that is useful to know!
(the map property is checked first, so it will take priority)
I had no idea there even was a map property
the map property is used for legacy/backcompat reasons. you can use it if you like、but setting it in the location data entry is probably preferable for ease of editing and readability
I only saw it when I opened the .tmx file in my text editor
Yeah, makes sense - this is me looking at Pathos's files so my mod can handle it internally
isn't the value used for warp totems, if any exist for the map? (just guessing, just asking)
what do you actually need it for? it's only needed when warps don't specify coordinates, which as atra was getting at, generally doesn't happen
It didn't used to be, not sure if that's changed
Previously totems and obelisks were all hardcoded
(i have a DefaultArrivalTile set on my mod's location, but just for me, so i can debug warp there without having to type in coordinates)
My mod is a navigation system so I'm grabbing the relevant data for where the player ends up around the world
It's not. It's still hardcoded as hell and I don't like it
Pathos plz
WarpTotemArrival map property plz
would a spacecore totem use a specific given tile position、or would it just defer to the default tile?
I'm begging you ||okay not really||
Specific given tile
also the luau eating beach totems never got fixed
The luau what
If you use a beach totem while the luau is getting set up, the totem will be consumed but it won't warp you
||Pathos if you read this we truly appreciate everything you do.||
that seems like it'd have been a very longstanding issue
Technically this applies to totem teleporting into any festival, but the beach is the only totem warp that also has a festival
You could check the destination location for a festival I think
You could! I did that with warp network
does it only consume and fail on setup、or throughout the festival?
The game just handles it in warp logic and doesn't pre-check when starting the totem logic
Only setup. The issue is the rejection is handled in general warp logic, which only gets triggered after the totem is consumed
I did it in a mod too!
There are several steps to quite a few warp events so it's not surprising that that kind of bug would appear
My most recent discovery is that after warping from Forest to Farm, if the player is on the lowest 2 rows of tiles, then on fade from black it moves the player west 48 pixels
That's oddly specific
It applies to all vanilla farms except beach
I wonder what the cause for that is
I figure it's to center the player in that lower path... but that's just a guess
Oh that makes sense
but it's the only warp that applies to
(and moving the player 32 pixels west would make more sense)
The real solution would be to use floats instead of ints for warp coords
Helloo, sorry to interupt. I'm making a hair replacement mod and I'm struggling finding specific resources and answers to my questions. I have a general idea of what to do, reading through the wiki and such, but I'm worried my hair might be too big and if theres a way t get them in game full size. circled are the hairs i'm palnning on replacing, but if theres a way to just add them in and keep them full sixe I would prefer that
FS can add hair of any size iirc
You need FS for big hair, yup
I know the general how to get the mod into the game but not if what I've drawn up will work
oh? FS?
Fashion Sense
TY
!fs
Fashion Sense is a framework mod that allows modders to create static or animated clothing, hair, accessories, and shoes that can be accessed through a special in-game menu. To access this menu, players will need to obtain the Hand Mirror from Pierre's Shop. The framework supports multiple content packs and also adds the ability to save, load, and export custom outfits.
Mod Users: Install Fashion Sense as well as any desired content packs. Content packs can be found by searching Nexus, or for an interactive list, click here.
Mod Authors: Instructions, tutorials, and tips for creating FS content packs are available on the mod's wiki.
oki oki Ill look into that
Thank youi so mch!!
you're both too kind:))
Otherwise they need to fit inside 16x32px I believe
ooh thats also very helpul thank you! this is my first mod so im a lil dazed i feel like these things are common sense but im like ,_,
It's very normal to have to learn all of this stuff. Having common sense doesn't magically let you know what size game assets have to be after all haha
thank u!! ahh I can breathe a sigh of relief. I will report back!
does this look right so far? do i need to add anything into dependencies and should my folder name match exactly with the Name in the json file?
Your folder names do not need to match the "name" in the json file (and for this one it needs to be named "Manifest"
also if you could send that json using
!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.
this
ty!
it would be easier to tell if there were any issues :)
it will also tell you sometimes too when you validate it
SLAYY ty
I think I'm gonna try to make this mod a framework, so basically a wheel that spins a list of items you give to it and than gives the item to the player
But since i intend to use it for another mod of mine (hopefully) I will also add an option to have a list of "things", and display a name and description of the thing that got selected+ a signal (basically I will use the wheel to choose negative effects, quests, and other stuff, which will be applied in another mod but this will make it possible to show the description
Is there anything else that I should add?
Is it possible to add a way to weight the wheel for specific options?
If not, I suppose just making sure that the same option can appear multiple times would work.
how do you intend to make the wheel accessible to players? As a menu option only, or something that can be opened via a map tile Action?
is length ↔️ this way or ⬆️ this way?
↕️
epic tyy
i hate coming up with a name for an npc only to remember another modded npc already has that name
I mean... a lot of people have the same names IRL why is that stopping you
as long as the internal name is unique ... I mean that's the whole reason we have that now, no?
Yeah, i know naming them the same won't cause any problems so long as the internal name is unique, but... Idk it would irritate me 😭 since I could've chosen any other name...
Did you name your NPC Jorts? /j
I would be concerned if i did lol
Although i did debate naming an npc jean at one point
(pronounced the french way, of course)
just avoid the j names 😛 we have 25 other letters in the alphabet!
Mhh currently all items have the same weight, I'm not sure if I should different %
Oh yeah it's a static list of items that doesn't change
Mhh i mean it's just a matter of calling a function. In my case it's be whenever you complete a quest or (idk how yet) whenever you fail a quest
But I guess it wouldn't be a problem to make it interact with a structure physically in the game
Idk to be honest it's my first day modding lol
I really like it so far but it's super confusing
Especially visual studio I'm really not used to such a crowded IDE
Hello wise people, I'm adding a glow effect to the hat via CP and spacecore. Or rather I don't add it because I don't understand something.....
where im wrong?
What part isn't working?
if i know....
scariest part of writing all of this is ZERO ERROR's
and it's just isnt glowing....
no buff when equiping hat
where the "logname" stuff go?
so i can maybe see something
LogName is used in errors/warnings but also in patch summary. If you write "patch summary YourModId full" into the SMAPI window it should show you which patches were applied.
But can you show what your code is for the hat object itself? You might have written the ID incorrectly in your WearableData patch or something.
sure
Hmm I think I remember something about WearableData requiring qualified item IDs. Let me check that.
Yes it requires a qualified item ID. Which for hats is (H) apparently.
So your WearableData patch should have the ID "(H)ValyaLumina13.void_r" instead
maybe i understand you wrong
but...
(i added (H) in front of every)
ValyaLumina13.void_r
Yes, you did understand me wrong.
most strange part
the hats I've already bought look like they work....
Just change it in this bit here. This is the only one that needs the (H) at the beginning.
That is because item data is cached. Once an item exists in the world it doesn't update its data anymore (sometimes it does, but not in this situation).
even if i restart game!??
Sometimes, yes. To test changes to items you should always throw away the old one and spawn a new one.
Oh, I missed that before. You need to edit Data/Buffs with an s at the end, not Data/Buff.
Hello, I'm trying to make something happen when player consumes a drink, and i cant figure what is the category or tag that the game recognizes drinks as, i couldn't find one on the wiki, because from my testing apparently "drink_item" context tag doesn't apply to all drinks at all, is something like that really the only way to do this?
I'm not sure if it applies for your situation, but the game uses the IsDrink field to determine whether it's consumed using a drinking animation or not.
I would like to try that, do you know how can i put it in an if statement?
Not a clue, sorry. My C# is pretty rudimentary. Something to do with reading assets? https://stardewvalleywiki.com/Modding:Modder_Guide/APIs/Content
so)
i guess i can't do it like i did it with hat
Your icon texture needs to be the entire thing that is in the Target
So it has to be Mods/ValyaLumina13.Hotline_valley/voide_icon, not just voide_icon
it's WORKING!!!!!!

not the way i want it🤔 , but it's fixable
my biggest hugs to you👉 ❤️ 🫵
Does anyone know how to figure out the coordinates of a map in stardew? I want to add a building, but currently struggle to put it into the right spot.
There's also Lookup Anything or opening the map in Tiled
okay thank you so much
Hi, I'm wondering if anyone might know what the issue is? I'm following the instructions on t he Fashion Sense page pretty closely so I'm stumped
Are you sure it's a json file and not just titled .json?
Also I recommend VSC for better visibility and parsing
Asking purely because this has happened to me lol
It's definitely a .json file, but I can see an extra closing curly brace after the first HairSize field, which matches the line in the error (it says 17 and it means the error is on line 16)
Ooh I'll look into that Ty!
I THINK IT WORKED
Nod nod. Aba is correct. For the future, please upload your .json and log into smapi and share the links here
I do agree about using VSC instead. It makes it much easier to catch things like funky brackets.
Yeah, the issue would've been caught immediately had vsc been used 
I'll look into vsc thank you all!!
Unless you had your language association for the file as .jsonl but nobody would be that silly...(it's me I'm that silly)
Ooh I think I was doing that earlier I should've used that lol
Yup! It's just more convenient
I never use the json parser. It's rude to my comments.
Next issue but I can't believe it's in game!;!!!!!!
The solution is to just keep fiddling with positioning in your code, then you're golden!
That has got to be a contender for one of the worst in-game pictures I've seen, congratulations :P
You're golden!
😂😂
I've made exactly one (1) fs accessory and the worst part is fiddling with positioning
also fs_reload in console very useful
(so you don't have to close and reopen the game while you're fixin a position)
Hrmmmmm I should not mod but I want to mod
wdym?
I am already very fatigued and I shouldn't push myself past my limit but I want to keep working on my dialogue plans.
i feel you
but I usually procrastinate the next day after a this
so maybe yah, dont :)
there's always tomorrow
unless it's dont...
Sick!
Work on them in your dreams, while you are resting 👀
Could always open a Google doc and do some planning on your phone? 
My planning document is 12,000 words long already xD
Oh goodness
well, maybe some revisions and reviews are in order? Or maybe just rest. Rest is also good.
There's no way to override the vanilla machine rules is there? Id like ginger in the keg to make ginger tea, but it defaults to ginger juice.
You have to use MoveEntries
I kind of wish there was something similar for CP 
An additional crops, recipes, and artisan goods mod for Stardew Valley 1.6 Content Patcher - MizuJakkaru/Cornucopia
We do not
I'm adding Peppermint, Ginger and Chamomile Teas to Jessie. Currently the only brewable one is ginger.
the others she just sells
it works! Thank you
Yay
can someone verify if this is correct? this is a content.json btw
https://smapi.io/json/content-patcher/1d92f7016ad74a1ab9fd33e0090dbb33
also dont know if the last action is right
You should not be using CustomLocations and also editing Data/Locations. CustomLocations is deprecated and should not be used - take it out, you don't need it because you're adding your locations to Data/Locations.
You can combine your two Data/Location edit patches to include both the lower and upper garage in the same patch (ask me what that looks like if you're unsure ^_^)
Your format is waaaaay too low. It should be 2.6.0 at minimum (current CP version is 2.6.1 so just use that).
Your tilesheet should really be named something more unique than just GarageTiles. It's tricky using the {{ModId}}_ prefix for tilesheets at the moment because they have issues with ChairTiles but you should really have something as a prefix.
Good work on using the {{ModId}}_ prefix for your maps and locations, but your Garage entry in Data/Buildings should also have it. I'm unfamiliar with buildings so I'll have to check the format for it to see if the fields are correct.
Finally, your map patch for the farm adding warps is incorrect because you don't have numbers for the tile coordinates but once you add those I think it will be okay.
If there's any part of this message that you don't understand, please ask questions because I am happy to explain more :)
So, i want to make a mod but i want to make sure its even possible. i want to make a chainsaw. is it possible with custom animations (later) and sounds.
Okay now I have looked at the wiki page for buildings:
You are missing the Texture field which is not optional so you have to add that. Relatedly, you have not loaded a texture for the building into Buildings\ so you need to do that (in a separate patch)
Your BuildMaterials field is incorrect. You can't have a dictionary of item IDs with the amount as the value. It needs to be a list of models. That looks like this (including the square brackets):
"BuildMaterials": [
{
"ItemId": "(O)390",
"Amount": 200
},
{
"ItemId": "(O)268",
"Amount": 9
},
{
"ItemId": "(O)771",
"Amount": 100
}
],
so just using json assets, content patcher and spacecore are not enough?
How can I do that I can't delete error reference and nothing happened by add .dll
I can't delete them
Should I change those $(GamePath) to detect game path or learn how to add two MSbuild properties?
Absolutely not
It seems all paths lead back to learning how to code. Boy how i wish i was 20 years younger again.
It's never too late
Its not too late but man if it ain't more difficult. A lot more difficult.
The time's gonna pass anyway!
Oh I worked out it,just copy <> to my .csproj
Nice
Well, damn, it turns out using a "sleep" animation in an NPC's schedule in the middle of the day puts them into the sleeping state for the entire rest of the day even if they can still walk around and complete the rest of their schedule 
that is mentioned on the wiki yes
if you want to do a “nap” then youll have to name it smth else
the word sleep is hardcoded to do whatever
Do you recall where it's mentioned? The page for schedule modding only specifies that it makes them unresponsive "while the animation is active", not for the rest of the day
i swear modding:schedule_data said that
well. lol
i just avoid naming anything a Mentioned Key so i dont have weird behaviors in general
but _sleep just sends them to the underworld til the next day
I'll just make do with making them sleeptalk, but I guess there's nothing I can do about being able to hand them gifts while they're napping 
could also name it _nap to just avoid the sleep word altogether
idk if sleep in the key will affect anything
Yea what I'm meaning is that I actually wanted them to sleep, just not for the whole rest of the day 
Once they wake up they walk to their next schedule point and proceed to fall asleep again there
yeah yeah i know
If I want an even to take place only after the farmhouse has reached level 3, but not take place in the farmhouse, which precondition should I use?
/InUpgradedHouse 3/
OR
/FarmhouseLevel 3/
Pretty much I am trying to remove this:
"When": { "FarmhouseUpgrade": 3 },
and change it to an event precondition
Where are you seeing an event precondition called FarmhouseLevel?
Internet search. I asked because I don't know the accuracy of it. If it doesn't exist, then that is perfect and makes things easier.
By internet search do you mean AI?
Unfortunately, and only because, besides the information you gave me the other day, I could not find anything anywhere that addresses the farmhouse level
You have saved me SO MUCH time I can't thank U enough
FarmhouseLevel is not a valid event precondition. if an AI gave you an answer to something, you should immediately distrust it until proven otherwise
All the event preconditions the game accepts are on the events page of the wiki. If it's not on there, it's not an event precondition (unless it was added by a mod, in which case you'd look at the mod page for what preconditions it adds). The wiki is almost always the best reference.
Also, don't even bother with using AI. As you found, it's always wrong.
Question: why are you trying to remove the when condition in favor of an event precondition that does not exist
Hence why I am asking and verifying here before proceeding.
I'm using the wiki and finding nothing with regards to the farmhouse level. The only info I have for it is what you gave me two days ago, which was
InUpgradedHouse <level>
Which means there is no such precondition. That one on the wiki is the only one.
I cannot even find that one on the wiki. That's the problem.
Did you do a ctrl+F for it?
So far, updating an old event from Legacy to current, the even only triggers if the "When": { "FarmhouseUpgrade": 3 }, removed
So I want to make it a precondition. I am asking here to make sure I do it correctly.
You cannot
You can't make it a precondition
You could only do that when the event was taking place inside the farmhouse (which is what your original question included which is why I told you about the InUpgradedHouse precondition).
You have no idea how many times I have read that page lol
Thank you. I appreciate the help and apologize for having missed simple info.
We all miss stuff, it's fine. Just check in here first next time and we can save you the hassle of getting rubbish AI answers.
That did not feel friendly enough (of me). Here, have a smiley 
Ok, so where do I find what I can use in the When field?
I came here first and haven't changed anything yet beyond the example the other day.
https://github.com/Pathoschild/StardewMods/blob/develop/ContentPatcher/docs/author-guide/tokens.md This page, but it looks like what you already had in the When field was correct.
Perfect! Thank you! Once again, I appreciate all the help.
You came here the other day to ask about the precondition with an event set inside the farmhouse. I gave you that. You then went to AI to get a precondition for an event outside the farmhouse.
Correct. The AI answer existed before I asked you the other day. I was getting ready to mess with things today and it hit me that InUpgradedHouse would take place IN the house and I wanted to just make it dependent on the house being a specific level. So I thought it best to ask before I continued and maybe messed stuff up.
For purely pedantry sake, you can convert CP tokens into a precondition since 1.6 now that GSQ exists
"EventId/GameStateQuery {{Query: '{{FarmHouseUpgrade}}' = '3'}}": "...event"
but please use real preconditions rather than CP tokens
Probably not going to be an issue because I have no idea what that means lol
Is there a way to quickly unlock the Dangerous Mines for testing purposes? 
debug md 1 maybe
That works, thank you! 
One more simple question. Does the season need to be capitalized? Winter vs winter
Should be fine either way
Excellent. Thank you. I greatly appreciate it.
Guys what do I need to make mod for sparkling glittery water?
it depends how you want to do it. there's probably a path by adding/editing the water tile graphics and animations, or you could probably get something working via C# code (either with render loop events or by patching the water draw code)
either way you'll need to have images, since i doubt the existing sparkle particles will look good for this purpose, so some software to do graphics will be more or less required
Ive gotten pretty good at adding content with CP, but id like to try something a bit more integral to the game. Specifically, id like to change how much friendship talking and gifting gets you. What would be the besr way to do that?
Im making a relationship-centered mod and i feel like progression is too fast in the base game.
C#. There are already mods that adjust friendship progression in case you aren't aware. But that shouldn't stop you from doing your own if you want to.
sounds good. Never worked in C# before, but ill give it a shot. Will i need to make a new “mod”? Or can i add C# code in my current mod (albeit in a file seperate from the CP stuff)
Has to be a new mod, at least as far as the manifest goes. Like how the expansion mods work where you have one main folder and inside that folder there's a CP folder and a C# folder (and an FTM folder, CC folder, etc)
How to get started: https://stardewvalleywiki.com/Modding:Modder_Guide/Get_Started
implementing recipes can be done with cp correct?
just wanna make sure i dont bite off more than i can chew lmao
yes
You can't specify the roe of a particular fish as an item a shopkeeper will accept for trade, correct?
Usually I make games on Godot, the only there ide I used was something I don't remember the name of, in highschool, using C++ to control microcontrollers
I just don't like how oversatured with information this IDE is
Is it possible to write c# mods on other ides
yeah you can use any text editor you want
I'm sure you can write it in notepad and compile over command line
i use vi(m)/make/dotnet build like some sort of caveman
(it isn't, though. i'm just a dinosaur /lh)
i like rider except for one visual bug and its hot reloading not working
and the fact that the full-line completion model is really bad but at at least i can turn that off and get normal tab-complete intellisense
I bet I even know what visual bug that is. 
it's the duplicated folder for me 😔
and then if u delete the visual duplicate it deletes the real one
Ooh, might not be the one... can you grab a screenshot?
yes but now i'm worried you're going to point out a SECOND bug lol
idk how to make mods but i think i got an idea : When the bookseller is in town you can fly with him to his land and discover new places

