#making-mods-general
1 messages ยท Page 5 of 1
did you update to 4.1.0 beta
i'm not updating to that
How old is the mod? Has it switched to ModBuildConfig?
oh it's not about getting 1.6.9 then, just 1.6 in general 
I'm restoring my mods.. I lost all the originals and I have outaded 1.6 versions
Make sure you've got <PackageReference Include="Pathoschild.Stardew.ModBuildConfig" Version="4.1.1" /> in your csproj (it doesn't have to be 4.1.1, but probably has to be 4.something).
Also probably don't need to mention this but just in case... make sure you've actually got SMAPI installed in your Steam/GOG Stardew instance, since ModBuildConfig just references what's already there.
it's there
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Version>4.5.3</Version>
<TargetFramework>net6.0</TargetFramework>
<LangVersion>latest</LangVersion>
<Nullable>enable</Nullable>
<WarningsAsErrors>Nullable</WarningsAsErrors>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Pathoschild.Stardew.ModBuildConfig" Version="4.1.1" />
</ItemGroup>
<ItemGroup>
<Folder Include="Properties\" />
</ItemGroup>
</Project>```
maybe you see something wrong elsewhere?
What do your dependencies expand to? Should be similar to below.
Yeah, those exclamation marks are not good, means they're not pointing to valid locations.
Hover over to see what the error is.
which is weird.. i have SDV in the same place
If you click on one, it will tell you the path it's trying to use in the property sheet.
Everything else looks OK to me, it's the right .NET version and all. So I think it just can't find your Stardew installation.
may need to set the GamePath property explicitly
Yeah, if it is indeed because of a wrong path.
<PropertyGroup>
<GamePath>SDV/is/here</GamePath>
</PropertyGroup>
Though I've never had to do that, and I'd expect to have the most problems since I'm GOG. You should only have to explicitly specify GamePath if you did a "manual install" of the game or copied it to a different folder.
(Actually, hovering over the exclamation mark might not do anything, I just checked. But you can still check the path in properties.)
Strings are basically dialogue with a different target, they're easy 
should farmhand be allowed for CP EditMap? should I add When master only?
"Action": "EditMap", ... "When": { // if is master game }
fairly sure all clients need to do edit map
unless this is some kind of area only available to the host?
It is like the market day town edit for the grange sell so it should be for all player
hey were would the textures for the mail papers be at? i found them once before but i cant seem to find them again
Letter backgrounds?
yeah
LooseSprites/letterBG
ah thank you
Hey ๐ how do I edit vanilla npc
!cp
Content Patcher (https://www.nexusmods.com/stardewvalley/mods/1915) is a mod which loads content packs to change the game's images and data without replacing XNB files. If you want to make mods using Content Patcher, start at https://stardewvalleywiki.com/Modding:Content_Patcher.
I think there should be instructions on there about unpacking, you would unpack the game files and use CP to edit them
!unpack
Follow this guide to unpack the game's content files in order to see and explore how the game data is structured.
It's helpful when making your own mods, or just to learn about how the game works!
can someone help me with this log here? I don't umderstand what's wrong 
https://smapi.io/json/none/f5e4128f40bd4abab01fcde9f2e38eea
so
o wait nvm
missing commas
After parsing a value an unexpected character was encountered: ". Path 'Changes[0].Entries.MainTheme', line 15, position 4.
This means that there's a character that shouldn't be here. It may be an extra one (,,) or a missing one. It gives you the place the game says "something is strange" but the error can be a bit before
in this case its at the end of line 14 (missing comma as others said)
(giving bit of explanation so you can understand them AND fix it yourself next time, missing comma is the most common/easier to fix)
after parsing is one of the best (and worst) errors to get, it's simple to fix, but you're also kicking yourself in the butt because "how could i forget a STUPID comma???"
Is there a list of relevant mail flags somewhere? Trying to find the flag for the Island Resort being built and the Island Hut being built
Assuming they exist, anyway.
i think roku added some
ive done that too many times, lost an entire evening looking for the error
there's a list on the mail modding data page
@velvet narwhal @hallow prism it worked tysm!!
Exactly what I was looking for, thank you
The list on the mail page isn't very comprehensive unfortunately (unless someone has recently added to it in which case they would be my hero)
importantly though it has the island upgrade flags
(roku added as many as they could remember)
Yep. Just trying to remember if the Hut is required for the Resort or not
would the qi challenge mines be considered island ? 
the challenge mines are just hard mode mines
Hard Skull Cavern is still Skull Cavern
are you sure it's even a mail flag and doesn't reuse a special rule from the special order
if (Game1.player.deepestMineLevel >= 145 && Game1.player.hasQuest("20") && !Game1.player.hasOrWillReceiveMail("QiChallengeComplete"))
{
Game1.player.completeQuest("20");
Game1.addMailForTomorrow("QiChallengeComplete");
}```

I mean it's not too hard to add a mailflag to that special order
you'd have to field edit, but you could do it so that the player, upon finishing Hard Mode Mines, would have something you could refer to
don't even need to add it to the order itself, you can just add it with a trigger action on day ending to check for whether it's complete
yeah i think i have that as a trigger action
(i'm most definitely not trying to find work to keep on slacking from writing my mod, no sirree)
One day I'll go through and get all the player flags on one of my further along runs to track
They're mostly vanilla runs anyway
I don't think that has a flag.
(i found them, but why is there 2 variants?)
if (random.NextDouble() < 0.008 && Game1.year > 1 && !Game1.MasterPlayer.mailReceived.Contains("Got_Capsule"))
{
Game1.player.team.RequestSetMail(PlayerActionTarget.Host, "Got_Capsule", MailType.Received, add: true);
return new SoundInTheNightEvent(0);
}
if (Game1.MasterPlayer.mailReceived.Contains("Capsule_Broken") && Game1.isDarkOut(this) && Game1.random.NextDouble() < 0.01)
if (Game1.player.mailReceived.Contains("Broken_Capsule"))```
unless i'm wrong again (probable)
(are you trying to set the syntax highlighting of your code blocks to c# by the way)
is that what my autocorrect is doing
just wondering if that's what the "c#" you put at the top is for
Got_Capsule is for when the capsule appears, Capsule_Broken is for when it breaks.
they're talking about the last part
yeah the capsule_broken vs broken_capsule
Capsule_Broken and Broken_Capsule
That I don't know
๐
Looks like a typo in the code
I doubt that
Most likely it was just that using string references for stuff isn't great for remembering what you've called everything and it got called both at some point and instead of trying to fix it there's just code to make them both work
not because I think you're wrong immediately, but because CA has a lot of weird calls
warpTotem warpTotemForReal
yeah. There's some weird shit in the code so I wouldn't be surprised if both are used
Feel free to ask Pathos though when he's around
If it is actually a bug, sweet, 1.6.9 is still in beta
do @ 's actually work on an edited post
A question: this has me a bit confused.
bool num = this.displayingSpouseRoom;
this.displayingSpouseRoom = showSpouse;
this.updateMap();
if (num && !this.displayingSpouseRoom)
How is it both displaying and not displaying? When would this come up?
it won't notify them
Does it just change the color? @velvet narwhal
it do change the color
Is it in your inbox?
tis not in my inbox though
let me find the original .cs that they're in anyway and i'll repost it
Context: that bit of code is from Farmhouse.cs
@ivory plume
BusStop.cs line 218
if (Game1.player.TilePoint.Y > 16 && Game1.MasterPlayer.mailReceived.Contains("Capsule_Broken") && Game1.isDarkOut(this) && Game1.random.NextDouble() < 0.01)
Event.cs line 8539
if (Game1.player.mailReceived.Contains("Capsule_Broken"))
Object.cs line 4853
Game1.player.team.RequestSetMail(PlayerActionTarget.Host, "Capsule_Broken", MailType.Received, add: true);
Summit.cs line 406
if (Game1.player.mailReceived.Contains("Broken_Capsule"))
Town.cs line 720
if (Game1.MasterPlayer.mailReceived.Contains("Capsule_Broken") && Game1.isDarkOut(this) && Game1.random.NextDouble() < 0.01)
Utility.cs line 4437
if (random.NextDouble() < 0.008 && Game1.year > 1 && !Game1.MasterPlayer.mailReceived.Contains("Got_Capsule"))```
 just letting you know that the `Capsule_Broken` has one out of sync in the Summit.cs, wanted to know if that's on purpose or not, i just named all of the files that refer to the mailflag for the capsule for your ease of access
(this is from decompiled 1.6.8)
Looks like local caching the original value of displayingSpouseRoom before potentially changing it and checking it
Oh, I see! Thanks!
(those were all the iterations of the word 'capsule' i could find so iunno)
Ok now I'm curious what the summit code does that checks the capsule flag, and if it's working as untended.
I'm guessing that this particular check is to see if it should remove the spouse room, if the room was displayed before and the player no longer has a spouse or roommate, it should remove the room and store anything in it
display some extra animations likely
Probably shows the occupant
it might already be fixed in 1.6.9 but 
Just in case you didn't get any jump scares earlier
I still see the different flags in 1.6.9
oh okay
i haven't updated to 1.6.9 yet because i still have a bunch of things to work on
Looks like all it does is add 8000 to a pause, which is in ms?
iunno i hate doing reports in c# because i'm dumb, send me back to the event debugging
Event code is outside my wheelhouse so I have no idea why it's doing this lmao
pause is quite literally just that, it's pausing whatever event is going on, but if it's not drawing a sprite then it's just adding time to an event?
i would've figured if capsule_broken, therefore add iunno an alien sprite dancing or something because i assume that's the perfection event code?
Yeah, it's the event for perfection
i have never done perfection so i have no idea how that rolls
All I see it adding is moonlight jellies, krobus, and then sliding the viewport
And then up to almost a minute long pause?
Followed by another pause immediately
Doesn't seem like the code's finished
the pause is probably meant to let the alien run across the screen
Yeah, does kind of seem like some stuff is missing here lol
(i have sent the general on a hunt)
It also checks if you've earned over 100,000,000 and if you're under or at year 2, which can you be for perfection?
Doesn't seem to do anything related to those two checks, just adds more time
where are you lookin for this event code
Summit.getSummitEvent
hello gang, where can I find the graphics for the slot game for casino? I went through everything and cant seem to find it ๐ญ
...||cursors?||
i swear if its in cursors I will cry selph
I see some of it in cursors at least
Perfection before the end of year 2 isn't technically impossible, but it would be a real challenge.
Is grandpa not required for perfection?
i see the shell for it
This is what I found so far
The items that show up in the slot machine are just the normal object sprites, I think.
There's just that and the frame.
Not sure about the background
yeah thats what Im trying to find too
Not hard at all, actually; year 1 is the real challenge (best I've managed so far is slightly into Summer 2).
wouldnt surprise me if its just rectangles drawn on the fly
Doesn't look like it, and even if he was, you can buy perfection waivers.
Refresh my memory on what the background looks like?
you need friendship with Kent to get perfection
a plain colour, focus
That's some serious focus!!!
If so then it's probably just StaminaRect with a color.
the reason I ask is because I wanted to try and see if I could do a EditImage thing for it with OnLocation context ((if thats the correct word for it ufdshiudgs))
Oh, the retrowave lines maybe?
You can do a When for when you're in a specific location and an Update for OnLocationChange in order to only patch when in a certain place
Really just takes a bit of planning and memory, though animation cancelling helps a huge amount.
yeah, thats what Im aiming to do! I noticed it in your crane code 
Yeah, from the before times lol
yess
i was just a little lost hydsuigs so I'll try and see if I can get far, with custom currency too ๐ trust
You would just EditImage instead of EditData, you can just swipe the code I used and make the adjustments you need
oh bless
Not sure when the new version of SpaceCore will have the currency API changes
But any like shop style thing you should be able to make use a custom currency
Ok, looking at Slots.draw is just painful. The actual rewards are calculated in the draw method.
oh no... does that mean i cant easily modify it without some C#?
You can change the look but you probably won't be able to do anything else
All these ancient hardcoded minigames lol
eh what's one more framework
I thought we escaped the days of a bajillion mini frameworks
Then Pau came along lol
I should make a framework framework to help all these new frameworks coming out
forgiv me ๐
i await the day for casey to usurp a good chunk of the world in 1.7 stardew
/jk
Part of what slots draws is the 3x3 square at (379, 357), eight times. And then, 17 x the square at (147, 472) which apepars to be inside the speech bubble.
I think there are 17 retrowave lines so that looks like a match.
I know 
So... it probably should be using staminaRect because what it actually uses is just silly.
Ah, so the entire background is drawn in code lol?
Pretty much.
Let me know if you need a framework framework framework, I can probably whip something up
...that was the wrong reply
Supposed to be Wren's message
Please do me a favor
TBF many of the new frameworks either could just be a single c# mod or are an extension of vanilla's abilities, adding new mechanics
Look at the drinking animation
uhdsiudgs as a framework user, id like a framework framework framework
Pau might still need it, just not for themself lol
Yeah, I just throw that stuff in SpaceCore now. People just don't like dependencies
I'm guessing that would probably be bad for my sanity.
Would a framework framework framework not just be Pintail though?
Though nobody uses some of the features I merged from other frameworks of mine (such as Backstory Questions)
You could make the same argument for SMAPI and Harmony to be fair
I don't speak for anyone but myself but I have less of a problem with dependencies per se than very large dependencies that cover 200x more use cases than I actually need.
It's kind of overwhelming how much you can do now
(I'm not even specifically referring to SpaceCore there, it's just a general principle)
At this point I'm making my main mod Extra Machine Config and shoving everything into it, machine related or not
||Junimo loved items||? That's a machine feature
Extra slingshot ammo? Machine.
Cooking flavored items? Machine, believe it or not
That's fair. I think I prefer that over, say, 10 deps when downloading a mod though
For me it depends on how invasive the mod is
Yeah, it is somewhat trickier in the mod world because every dependency is a separate download. Normal software is exactly the opposite, dependencies cost nothing for the user except whatever their size/complexity represents.
If something is doing huge edits I usually prefer it to be separate
i just prefer as few dependencies as possible bc i dont like leavin the functionality of my mod in the hands of someone else, basically
but otherwise im also with focustense and wren
It would be great if we had auto download dependencies ๐
But Nexus needs that Premium money
Large/invasive dependencies are also risky because they can get hard to disentangle and more likely to break/less likely to be updated if a new version of the game, SMAPI, etc. comes along.
Yeah but nexus would slaughter us for that 
Obviously you keep SpaceCore up to date but some of the other "Cores"...
That is also true. I remember when PyTK died
Yeah that's the main thing I was thinking of
Part of my problem is I feel like SMAPI should handle more (like, custom items pre-1.6), but eh.
Honestly, I don't think I'd mind downloading an extra mod or two as a dependency if that extra mod is very small. We've got users here bragging about their 1000+ mod lists so I don't think they'd mind either.
I do resist mods with too many dependencies if those dependencies are large enough to risk incompatibilities with something else.
One or two I don't mind either. But if people make a ton of mini-frameworks instead of centrallizing, that becomes much more.
I use stardrop so I don't usually mind. It does annoy me a bit though when it's more like, two halves of one mod uploaded separately
(Centrallizing their own stuff I mean)
I've seen a few frameworks like that
I can sorta see that, though at the same time someone might not want the default content so it's a tough decision
it's definitely a delicate balance act. It helps that you can have a vague theme to gather them together
(like maps or items)
i can understand centralizing their own stuff bein difficult bc like. i cant speak for everyone making frameworks or framework adjacent stuff ofc but a lot of stuff ive wanted changed has all been like... very tiny modifications, and usually nothing at all to do with each other
The pragmatic me says you can't expect modders who do this for fun to be very meticulous about splitting up their framework mods and partitioning the functionality to the mods that actually use them. The engineer me says that's an untenable situation, long-term, and leads to collections of mods dying from lack of maintenance and/or modders burning out from compat issues.
so until you somehow amass enough of a collection of random changes to justify the theme of your framework itself being "random small changes" its hard to justify releasing a mod that just changes 2 small completely unrelated things
(Fwiw, the reason why I'm framework leary is that the bigger the framework the more likely I am to find code that runs like shit on my seven year old machine.)
(hard to justify when you might not even know if you're gonna ever get that 2nd thing in the first place, i mean)
I have no desire to debug stardew performance anymore
I've given y'all enough of my sanity
That comment explains so much...
...i plan to use this though 
I am also planning to use backstory questions, I think
i think there's actually 1 good reason to decentralize your stuff and that's nexus search seemingly only matching titles
oh yeah, thats a good point that always frustrates me
hard to know if a framework/mod out there does what i want if its a minor feature in a framework whose name has no indication whatsoever about it
then you end up either doin it yourself or working around it until you come in here and happen to see someone say "oh [random mod] does that for you"
Time for Nexus page titles that are just a list of features
Aliexpress your titles
i mean thats basically why i named BETAS what i did
i did try putting all of the bee movie scriipt in a mod title once to see if it'd let me
it did not give me an error. however it also never finished loading and i got an infinite spinning cogwheel until i closed the tab
so. possibly.
no
However I am working on new docs for SpaceCore that's not one giant dense bullet list
Albeit slowly
can you make a copy of an asset with CP?
No
Yup
kk
the use case is that i want to copy retex of say the keg
and slap a icon like a diamond or smth on there
it was either copy texture or patch draw method, not sure what is better
seems like you could just postfix the draw method and do it the same way casks do
postfixing would make it AT compat, maybe
Careful to not get yourself into an asset loop
Imo postfix draw sounds much better given your usecase
yea i had same conclusion just now while rotating in my head 
you could make a framework for drawing icons on BigCraftables
its just that this is for @distant radish mod and it'd be nice if the C# is simple enough for me to hand it off forever
what if i PR extra machine config
i cant think of a 2nd mod that'd possibly need this though 
I'm sorry I am not contributing to the conversation, I am quite illiterate in this field xD
IIRC LeFauxMatt is already working on something like this
for textures in general
They're still around?
hes been quiet lately but yes
Huh, wonder how I didn't notice
Ah, yeah, spritepatcher
he doesnt plan to develop the extra parts of spritepatcher because they conflicted a ton with alternatibe textures
I have mixed feelings about spritepatcher due to the whole code part
But i asked if he could do the more basic parts like the bagi replacement
I guess it can be a good entry point for simple C# stuff though
yeah AT compat is a problem
(my water-placeable machines redo the draw code and is not yet AT compatible as a result. No one's bugged me about it so I haven't done anything about it)
(no one bugged me because there's currently a total of 0 mods with water machines)
not in my mind
Theres a wealth of mods in there
by water machines you mean that are placed in ponds and such?
Like crab pots, yes
because I believe the Archaeology mod had a Water Shifter or something like that
ok, I just found it, the Water Strainer, but I believe it stayed in 1.5 and was dropped in 1.6
well i have that 1 mod which slightly adjusts where the star is on the cask already, drawing a new icon would actually be easier than that 
ah but AT has a possible skipping prefix on object.draw
prob no compat there
Sorry if this is a dum-dum question, but is there a SMAPI debug command or anything to make it snow? I've set the season, but I can't figure out how to make it snow.
I had this same issue for fish nets, which I solved by grabbing AT's api and loading a texture from there if one is given (https://github.com/MindMeltMax/Stardew-Valley-Mods/blob/beb8c0cbbca1de1a46b52cfb885817de7fdc44c5/Fishnets/Statics.cs#L140)
I didn't equate snow with debris. Thank you!
Oh interesting! The snow from that command is different than regular snowfall!
I think it's rain actually, which in winter equates to snow
But might be wrong, don't use it myself
You can get rain in winter though with totems
Yep, that's what I was about to say. The debug command for rain does make it rain in winter.

CJB might have a weather option?
CJB does
That is what I use
It sets the weather for the next day. I don't know if that's what the debug command does.
The debug command debrisweather appears to turn on whatever debris-related weather matches your season. It's just interesting that the snow it creates in Winter is just mild flakes. I'll try CJB for testing this. Thanks!
A question: with the OnSaveLoaded event, the stuff that I put in there, is it the first thing which happens when the save is loaded, like, does stuff there happen before the maps load?
I believe on save loaded is after all initiation
Thanks! That helps!
pretty sure SaveLoaded and DayStarted are the same thing
one is just fired 1 line after the other
not sure what you're trying to accomplish, but there is the LoadStageChanged event as well
Does DayStarted not fire every day?
Day started fires every day yeah
Whereโd yall learn to mod stardew, all the YouTube tutorials suck lol
What about SaveLoaded? I was working under the assumption that stuff I did there would only fire once per load lmao
i think they just meant that they both happen at the same time
not that saveloaded happens every day
but like at the same stage of day preparation
!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.
Oh ok, I was concerned for some of my code lmao
I've only seen one 1.6 YT tutorial posted so far, think it was for setting up C# modding
there's yt tutorials for modding?
Everything else is old
Hey I learn everything from YouTube
harvz has a series
// after going to sleep
instance.IsBetweenSaveEvents = false;
this.Monitor.Log($"Context: after save, starting {Game1.currentSeason} {Game1.dayOfMonth} Y{Game1.year}.", Monitor.ContextLogLevel);
events.Saved.RaiseEmpty();
events.DayStarted.RaiseEmpty();
// loading a savefile
this.OnLoadStageChanged(LoadStage.Ready);
events.SaveLoaded.RaiseEmpty();
events.DayStarted.RaiseEmpty();
MIT OCW is amazing
dang MIT offers a SDV modding course?
(DayStarted ofc firing every day as opposed to just the first day)
do you think it's worth linking in startmodding?
never watched it tbh so no idea
I learned here. And in the Wiki.
(i cannibalized a cp mod and read it's code)
I can't even find these videos lol
Between here, the wiki, the github docs, and various repos, there's a lot of places to learn. Unfortunately people typically seeking videos aren't word learners
if you tell us what kind of mod you want ppl will point you in right direction
The tutorial mod shows how to set it up but not the actual modding, howโd u learn from here?
Yes, the cannabalize a mod and do what it does as an example method (but not stealing its ideas, simply copying its implementation because there is really only one way to do most things, or maybe a few, at most) is the ultimate way I learned! I am right brained, and autistic, and, hence, if I cannot see something, I cannot conceive of it; I have very little ability to comprehend abstract information, and all I know is essenmtially comparison.
In conclusion: this is how I learned.
!unpack
Follow this guide to unpack the game's content files in order to see and explore how the game data is structured.
It's helpful when making your own mods, or just to learn about how the game works!
most important to have an idea 
Like, what do you want to do?
Ok thatโs smart, thanks
Decide what you want to do, look at the base code and see if anyone has done anything similar
a lot of knowing how to mod (for non-content packs anyway) is just knowing how to code in general
Depending on what you want to do, I can point you to some of my stuff which does it.
Also, perhaps the most shining gem of it, and Lumisteria has said to do it, is Lumisteria's Visit Mount Vapius.
And Cornucopia
Chances are good if you need an example, it's in one of those two lmao
Visit Mount Vapius will show you how to do everything which can be done (nearly, anyways), and also, it is a Very Nice mod and I love it!
I know how to code in c# but I wanted to see if stardew also had documentation or a library
Though, a lot to dig through even when you know what to look for
!decompile if you haven't
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
From there, you either see what you can do or turn to Harmony to tackle the hardcoded stuff
Documentation of the code? Look at my github for all kinds of strange examples!
spacecore is the big C# facing library
and smapi itself provides various events to use in C#
When MoonMisadventures Redux comes out, it will be the ultimate example of C# location stuff.
https://stardewvalleywiki.com/Modding:Modder_Guide/Get_Started
I think this might be the same page that gets linked to in the embed but if you look on the right sidebar there's links to some stuff you can do with SMAPI
I mean, there's a section on the readme. It doesn't have examples though. (yet - working on docs right now... for the content patcher side first though)
I meant for the game
Not for spacecore
(I'm considering not making MMR open source for various reasons... but haven't decided for sure yet)
(It's why it isn't on github yet despite being in my sln)
oh can i ask what those reasons are? its fine if the answer is "no comment"
Not something I really care to elaborate on
No but I'm learning a lot about power systems!
Working with CP, I know how to edit an image, but can my target be my own file? I have a furniture object that I want to have change depending on season and weather. Here's what I have:
"Action": "EditImage",
"Target": "Mods\\Keep Christmas Well\\assets\\deco",
"FromFile": "assets/deco.png",
"FromArea": { "X": 64, "Y": 80, "Width": 16, "Height": 32 },
"ToArea": { "X": 48, "Y": 80, "Width": 16, "Height": 32 },
"When": {
"Season": "Winter",
"Weather": "Snow",
},
"Update": "OnLocationChange",
},```
your target name can be whatever you want, including a target you Loaded previously
if the asset you're targeting in a Load doesn't exist it will be created
Which I did.
then yeah, you can target it just fine. doesnt need to be a vanilla asset
It's worth noting, the Target of your EditImage is the asset you Loaded previously, not the image in your mods folder
assuming the Load target is the same as what you wrote there exactly
You're editing the asset you loaded into the content pipeline, not the image you used as a source for that asset
"Action": "Load",
"Target": "Mods\\Keep Christmas Well\\",
"FromFile": "assets/deco.png"
},
This should work!
(well no it wont not after seeing their load)
How should I have formatted that, then?
Mods\\Keep Christmas Well\\ is not a folder, its just a name of an asset
so whenever an object or something looks for a texture called Mods\\Keep Christmas Well\\ it will get your assets/deco.png
you probably want to Load into Mods\\Keep Christmas Well\\Assets\\Deco
but again your target can be anything it doesnt have to look like a filepath, you could just as easily load into Mods\\DecoPngThing or just dfkjgh as long as it matched everywhere else you wanted to use it
but if you Load into Mods\\Keep Christmas Well\\Assets\\Deco then you want to do EditData on Mods\\Keep Christmas Well\\Assets\\Deco as well
(also this is unrelated but you dont really need to change the Update rate for that patch since season and weather will only ever change daily anyway)
Ahhh yeah
It's not a real folder no
My assumption is they don't want a snowy indoor furniture
Or a snowy GI furniture
the season and weather will be the same regardless of location
So I could do:
"Action": "Load",
"Target": "Decorations",
"FromFile": "assets/deco.png"
},```
then
```{
"Action": "EditImage",
"Target": "Decorations",
"FromFile": "assets/deco.png",
"FromArea": { "X": 64, "Y": 80, "Width": 16, "Height": 32 },
"ToArea": { "X": 48, "Y": 80, "Width": 16, "Height": 32 },
"When": {
"Season": "Winter",
"Weather": "Snow",
},
"Update": "OnLocationChange",
},```
Gotcha
you could yes, however, its highly highly recommended to start your Target with {{ModId}}
bc if you do that, if any other mod also loads into Decorations then nothing will work
Ahhhhhh...that's helpful.
so its common to see it written like {{ModId}}/Decorations
that way its guaranteed to be unique
Does it matter whether you use a /, _, or . as the separator there?
the "Target can be anything" is not an exaggerating its literally just a name you are giving an asset, you dont even need separators at all
I guess in terms of best practice, I mean.
anything that will work in a string
most people use slashes
but theres no benefit to slashes versus underscores besides i guess subjective readability
Totally. As I asked that question I figured I should clarify about best practices since I understood when you said "you can use anything". ๐
There is technically a benefit to slashes
which is
technically there is a benefit to making your asset names as short as possible
practically i would not recommend it 
The modding API for Stardew Valley. Contribute to Pathoschild/SMAPI development by creating an account on GitHub.
It's compared segment to segment
if you use Decoration instead of Decorations you might shave off a nanosecond or two in the string comparison
C# actually compares lengths first
tbh id almost say theres a downside to slashes which is it makes people think theyre folders
Yeah and no normalization is probably still better than fast normalization
i dont think i know what normalization is in this context
ahh, right
Also casing (assets are considered case insensitive)
im just gonna start using colons as separators im anti slash now
So when I edit the image I loaded, what should my FromFile be?
whatever image you're editing it with
same way you'd edit a normal asset
vanilla asset*
Aha! I've been trying to use the same image.
So editing my image with the same image just specifying coordinates.
Maybe I'm going about it the wrong way?
It's less that you're editing your image
And more that you're editing your asset
Like, Load says "my asset looks like this"
And EditImagr says "okay now layer these changes"
So as I have it currently, I'm telling it to load a file then use the same file to layer the changes.
You can do that, sure
Which I can see might not work.
You can copy bits from one part of the image to thr asset
I assume you're targeting a different coordinate set?
Absolutely.
I don't see why it wouldn't work
After making the suggested changes to the target, I got the error
[game] Failed loading texture Mods\Keep Christmas Well for item (F)TheBigJB.Christmas_ColdSnowman: asset doesn't exist.
are you setting the texture to Mods\Keep Christmas Well or Mods\Keep Christmas Well\Decoration or whatever you loaded it to
You mayyyy need to spawn another item but I'm less sure on that
"Action": "Load",
"Target": "{{ModId}}.Deco",
"FromFile": "assets/deco.png"
},```
and
```{
"Action": "EditImage",
"Target": "{{ModId}}.Deco",
"FromFile": "assets/deco.png",
"FromArea": { "X": 64, "Y": 80, "Width": 16, "Height": 32 },
"ToArea": { "X": 48, "Y": 80, "Width": 16, "Height": 32 },
"When": {
"Season": "Winter",
"Weather": "Snow",
},
},```
I think I see! Let me experiment and see if I'm right.
So I'm going a little insane. I'm editing chair tiles and neither patch reload nor exiting to title seems to be working for them? Only resetting the game completely. Patch reload is working for visual stuff so I know I'm inputting the right mod-- Is this like. A thing with chair tiles, or am I just cursed
What, precisely, are you editing
Working on my tilesheet mod, adding new chair tiles :]
but I'm doing custom offsets for this one seat and reloading the game every time feels like a hell catered to me
Which asset are you editing
Sorry
I should have been more clear
The data asse
The vanilla image asset
Or a custom image asset
Custom image!
Remind me in 2 hours to check asset propagation
thank you atra 
Oh no, is uber down
no one wants to work remember things themselves these days
if i want a simple, nice, static custom sprite on an event, do i still have to deal with the hell of temporaryanimatedsprite?
I'm deeply surprised loading a saved doesn't clear that
Depending on use case a Temp Actor could also work
Okay so its not me that is cursed god bless
but yeah exiting to title doesn't work either
hmm, temp actor, i don't know, i feel like i'm breaking the rules
"why are you in prison?" "i used a temp actor for an item"
So, follow Follow up question, does anyone know if there's a plugin for Tiled that lets us load in multiple map segments to edit them all as one over arching map?
There are... So many map segments for renovations.
VX - X V
Would there be a way to dynamically apply a discount to everything pierre sells? I've gotten some items to have the discount applied (like sapplings) but seeds just constantly ignore any alterations I make. Been going at this for long I feel like a monkey with a hammer over here ๐ญ
seeds are set to ignore shop price modifiers so you'd need to add modifiers to the seed shop entries individually
that would explain it, thank you
alternatively you can also just make them not ignore the modifiers
that might mess with mods that expect them to ignore them though
@calm nebula and @uncut viper - I can't figure this thing out with replacing my own asset with another asset. Thanks for all the tips, though.
also i think that would actually double their price too i forgot pierre also has a default 2x modifier
!json send your relevant jsons through here
JSON is a standard format for machine-readable text files, often 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.
I'm not getting any errors or anything with that or any of the other items, it's not just changing.
you're not targeting the asset you loaded into
"Target": "deco.png", this is not what you loaded at the start of your json
you loaded a file into Mods\\Keep Christmas Well\\
so your target needs to target that
i also dont know if any of your furniture will correctly find the asset since none of them have the extra \\ at the end
Everything it working great except for the seasonal change.
(im not familiar enough with the furniture format to know if theres anything else wrong with those strings though)
fair nuf
then yeah, just fix the editimage
I'll update the target name as per your earlier suggestions once I get this working. I think it'll make it all easier for sure.
"Action": "EditImage",
"Target": "Mods\\Keep Christmas Well\\",
"FromFile": "assets/cs.png",
this is what you would want assuming you did not change it
bc again the Target is not a folder, you are giving the literal name Mods\\Keep Christmas Well\\ to an asset, so the EditImage is looking for an asset with that exact name, that exact name is goiung to point to your deco.png when the game reads it (kinda)
which means you cannot Load anything else into the same Mods\\Keep Christmas Well\\ later
Honestly, way too many renovations to mess with to make the old mod work, probably would be better to figure out how to add new renovations and add the rooms as renovations.
That code you sent is what I changed it to. Maybe I'll just do a find and replace and switch that to a name like you suggested.
If I were too, What field(s) would allow for that?
IgnoreShopPriceModifiers on the individual item entries
its a boolean
Ah figured, thank you!
Hmmm
I would be careful with slashes at the end of an asset name
it was more to show that the targets should match, i did mention the slash thing above that but they said their furniture worked fine with it so
if you'd asked me beforehand if slashes at the end would work i woulda cautiously said no but if im told it works then i dont have the knowledge or motivation to look into whether its actually good or bad
(or well, neutral or bad)
(I wrote the comparison code.)
You think I would know.
Question about the new beta, does it still have the weird hardcoded lines on the skill page (visible only with ui recolors)?
I always found it weird they were there and even overlapped with other assets
Yeah, it does. I think CA added them intentionally
(For aesthetic reasons, not to make it hard for recolors)
If SpaceCore is overriding the skills page, you won't see it though. I took those out at request of someone for that reason
But aren't they the same color as what's behind them? So nothing changes visually 
Yeah, that was probably my request hah
I think there's a subtle difference but I could be wrong
Still nothing, @uncut viper and @calm nebula . No errors, just still not changing. Damn, I had such a cute idea.
It'd definitely make more sense if there was a difference
Never noticed any tho ๐
please send your json again
Could just be a byproduct of iteration on the menu
(iteration being development iterations, not a for loop)
Possible
are you making sure to sleep so that the tokens can update?
Aye. I'm using CJB to make sure it's snowing the next day then I'm sleeping.
does it change if you remove the When conditions completely?
Just tried and it doesn't.
weird
can you send me a quick repo pack?
(or I can make one, no worries!)
would you send a zip of your mod folder?
how to determine sprite index?
left to right, top to bottom
(starting at 0)
the sprite in the top left is index 0, the one to the right of it is index 1, to the right of that is index 2, and so on
the furniture works fine with the normal texture though which is what confuses me
Yeah
i woulda thought if dots didnt work then those wouldnt either
Here's the zip
Honest to God I think repo pack time
id be surprised if every furniture stored a copy of the spritesheet
since theyre editing that and not the furniture entry itself
are you sure you're placing your ToArea coordinates correctly?
yeah its in the wrong place
thats what i was thinking
and why seeing the spritesheet is needed
you're currently placing the snowman overtop of the... uh. green. hanging thingies beneath the snowman
you presumably want X 48 Y 48
I am??
OMG
I honestly thought that's what I probably needed to do but convinced myself that it needed to be from top left to bottom right.
and here was me checking asset propogation
oh atra
maybe i would do that if like . Lumina came in here asking for help troubleshooting an image patch
@ivory plume by the way, with asset propgation, we've noticed that data/chairtiles isn't there. https://github.com/Pathoschild/SMAPI/blob/26cfac01605565879a796317b392e3d29ca69996/src/SMAPI/Metadata/CoreAssetPropagator.cs#L331
I'm assuming like, there's a reason for that, because chair tiles be complex
but Hime was having issues reloading data/chairtiles earlier (for offsets)
I'll need to look into it, but looks fairly straightforward to propagate.
OK, image patched successfully without conditions. Trying with winter + snow now.
Are there any underwater maps in vanilla?
depends on your definition of underwater map
OMG. I can't believe it was as simple as the coordinates being wrong. I talked myself out of that being the problem over and over. ๐คฃ @uncut viper and @drowsy pewter - you helped me immensely (again) and I appreciate you. @calm nebula Thank you for trying to help too! I value your expertise!
Oh, and it does work using the same file instead of needing a different asset.
I just need to create one underwater dive-able area
thankyou
the submarine is technically underwater
the submarine is why i asked lol
Hmmm something similar
Underwater in that you just have to trust that it actually is and not question anything else
Would work
I feel like #modded-stardew might have a better idea for that honestly, sounds more like a playing the game kind of thing and nobody here does that
Has an unofficial update, never been buggy for me
suffers from doc writing derangement
@distant radish 
i think there should be way to automate the colors rather than just slap an icon on stuff like this, but the easiest way would require you making a colorless sprite
Sorry for the late response, but thank you! I don't know if the helper works with the __instance of JunimoNoteMenu, though, unless I am missing something.
patches have to be static and assuming you are talking about Mod.Helper, then you need to make that static
should double check if you really need helper though, sometimes there's static game funcs that do same thing
I was just about to go to sleep, but feel free to DM me and let me know anything I should know to keep working on this ๐
I went insane and added all the frameworks I can think of to https://stardewvalleywiki.com/Modding:Content_pack_frameworks (including SpaceCore). Framework owners please take a look and feel free to edit it if I missed/misrepresented yours
oh there's not really much for you to do cus i just hardcoded the id pattern that you are already using, if you install this mod with MPS it'll start drawing the icons regardless of the big craftable texture underneath
i didnt expect you to put SPU on there
Can relate
i do think it looks mediocre rn and prob need some kind of uniform custom icon sprite 
you should link EBAGI i think
dunno if template allows it
also should we yeet TMXL and Shop Tile Framework? I think they're both deprecated/kinda broken
theres still a 1.5.6 branch on steam that people play with
yea TMXL causes crashes in the forest sometimes
if the template has a GitHub macro then yes. otherwise no (my account is too new and can't add external links ๐ญ )
I mean Pathos already removed BFAV so I assume the page's for 1.6 only
if pre-1.6 stuff was already removed then that does change my thoughts which are now "sure why not"
New docs are... 15% written
(Judging from pixels in a full screenshot of the SpaceCore docs page)
i think it's worth mentioning that CFL is no longer required to add a new farm type
(it was never required to add a new farm type)
(it was introduced after the game update that added data/additionalfarms)
^, MTN and CFT were the ones that existed pre-Data/AdditionalFarms
it just is handy, makes it easier for content pack writers to do what they want
what the heck is cft
ah i gotten CFL and CFT mixed up oops
Is this like anything goes or is it only frameworks which require their own content packs?
most of the frameworks on there dont require their own content packs
It looks like the ones that can be accessed through CP have "is CP extension" marked as yes in that column
sorry!
btw what is difference between spacecore animations (spacechase0.SpaceCore/TextureOverrides) and content patcher animation 
Interesting... I'll add two of mine tomorrow, too tired rn 
is it just different api
Different API, and also SpaceCore ones are more efficient
here's a rough difference
SpriteMaster/Clear Glasses doesn't really like CP-A
CPA - edits the spritesheet for animations
spacecore - patches the draw function to swap out the draw
oh huh, so better to use spacecore over CPA rn?
Yeah
cpa has repeated asset edits (and in monogame, GetTexture/SetTexture is implemented horribly)
I'm not updating CP-A again
prob worth mentioning then (on the frameworks wiki page)
spacecore - doesn't do sub-rectangle animations
(fwiw, I have no clue why monogame GetTexture/SetTexture is that bad.)
Ah, that's true. Important caveat
see! My memory works for some things!
if this page is for 1.6 stuff, theres probably no need to include the "1.6 only" bits
.choose shenanigans, tomfoolery, mishaps and mayhem, keep working on docs
i think theres an echo here 
...oh right, uber is down
noooo
Brb checking on the ES server since they have another bot do it
Sounds like it has chosen mishaps and mayhem
Lol
there's way to access archived pages right
yeah, with history
or u just throw old page to Modding:Content_pack_frameworks/1.5.6
done. I'm also thinking of adding this disclaimer for JA/PFM/MFM saying that CP can do these things but they're still around for features not in CP
that's expanded storage, and it's already on
im not actually sure what MFM does that CP cant besides setting the quality of the item attachment
sprites in detail
eh, not really
subjective
fair enough
I think there are still features MFM has CP doesn't
custom letter bg?
But CP also has features MFM doesn't, like tokens
Vanilla
you can do that in CP
thank you all three people
oh is solid foundation on this list?
[letterbg <asset name> <index>] at the start
actually idk if it has to be at the start i mightve made that up
but it sure does look nicer at the start
it can be anywhere
SF not req for building anymore but has some features not in the base building data
like making archways that u can walk under
nope, on it
OH wheres secret note framework
trying to think over all the frameworks i have possibly utilized in the past even though selph has for sure added all of them
(it's in "no consumers")
Lacey is a consumer
doesn't lacey
if SPU can be there i think SNF definitely deserves to be there
Lacey is both a consumer and a producer (of hats)
heck yeah I'm adding that too
i love secret note framework
i havent used it yet but i plan to
in my notes n everything
(and goodness the list's getting long, might have to categorize and sort this as a later project)
potential categories could be Items - Maps - NPCs - Others/Multiple
1.6 "The ALL THE FRAMEWORKS Update"
"Want to mod stardew? Have you heard of our lord and savior cp."
yes, but i don't count myself for dogfooding
ill count you if you wont count yourself
(yeah, 1.5.6 frameworks were necessary, 1.6 it feels more like "everyone but CP is fun extras!")
1.6 is all content patcher and if its not content patcher its a spot where you thought "cmon did you really have to stop dehardcoding before you got to this spot"
swoops in with my CP alternative, which comes with SpaceCore features since it's built into SpaceCore
just do what EMC did and get absorbed into 1.6.9
(/s)
"But what if I made this one very specific arbitrary feeling thing not hardcoded instead?"
Yeah Pathos I have a fully developed Data/Equips feature, do you want it?
(please?)
(anyone?)
"is anyone going to use the mod to dehardcode this one specific arbitrary thing?" "probably not but it bugs me"
(no takers?)
you didn't do my lights code
True!
(this is all in good hearted fun)
(I know, I'm giving you a hard time)
I would show off my new docs but it's on multiple pages hosted on localhost
...and 15% done
wait how'd you do that, im hosting my stuff on localhost...
Not counting that certain parts that are one line in current spacecore docs are going to get fully documented
also to be fair Data/Equip is about 30% creepy emit code I used to scare sophie
one of us is gonna have to change
("Content Engine" being one of the big ones)
It's complex, I wouldn't call it scary
When I'm done I'm putting it on kittycatcasey.com anyways ๐
Uber is back apparently
.cat
...uber is only back in #governors-mansion ?
perms shenanigans?
Why would it get changed though ๐ฆ
Remind me to remind the junimos to fix that in 12 hours... oh wait
modders cant be trusted with maru's robot anymore 
Whatโs the difference between content patcher and smapi
smapi is the mod loader
content patcher is just a mod, but one that does a lot bc it lets you edit game data
SMAPI opens the game so other mods can edit it, and Content patcher actually carries out the edits you tell it to do
in other games like skyrim the engine has content editing features, but since stardew isn't moddable like that content patcher is a mod itself
essentially
So you need content patcher to mod
no you need smapi to mod
not necessarily
content patcher helps with many common types of mods tho
but, like, it's a lot easier to use CP, especially for non-programmers
have you played with mods?
and CP has a lot of built-in optimizations that if you aren't careful about will shoot you in the foot if you try to replicate what CP does.
Content Patcher is just a mod that lets other people not need to worry about programming in order to edit textures and data and whatnot
it will do it for them
(ever been a victim of the "help my asset edits don't work in German?")
if Content Patcher didnt exist they could still do that but they would need to program their own mods with SMAPI to help
Yea
Oh ok
Ok thanks yall
remind me in 2 minutes to test
grumbles yeah yeah fine zoe.txt can do. (#6194717) (2m | <t:1724204304>)
.timer remove 6194717
Timer removed.
the robot lives!

We did a bunch of channel permission cleaning for the whole server, and it must have gotten switched off for here whilst that was happening -- since we have Ub3r disabled in all other chatting channels
but he is back 
first time trying to patch a mod (made by someone else) and it keeps saying 'Utility' does not contain a definition for 'getSaloonStock'... I checked new updates but it didn't really change saloon stock so wondering if anyone gets the same errors :'(
would appreciate any sort of help
is the mod open source?
creator said they won't be updating but they're open for anyone to update it
hm this function doesn't exist in current game 
Utility is a class in Stardew's code, that method got scrubbed
That's a pre-1.6 mod. The old Utility.get<shop>Stock methods no longer exist, since all shops are in Data/Shops now. The equivalent would be the unified Utility.GetShopStock method with the Saloon shop ID.

!decompile you should decompile the base game if you haven't so you can look through the code
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
i see i see
i wonder if the functionality of this patch can be replaced by editing Data/Shop
i never played the mod so no sure what it does
me neither lol i just randomly decided to take a look (?)
It seems to add a whole part time job for the Saloon, so probably not
then ig u have to patch ShopBuilder.GetShopStock now
okie
you should really do the decompile
i think i shld take a look at base game code first haha... :')
thx for the help!!! sdv modding community is so cool
At least it's just a postfix, so it should be relatively easy to recreate
Course, it also has a method in it that doesn't exist too lol
this postfix seems to just add a recipe (or maybe just the dish itself?) to the saloon if an NPC is currently inside the saloon that is marked as having a certain recipe. you could do that without harmony using the asset pipeline
I just met something called Collection Expressions, and apparently they do not live in .Net6, I think. So, this is what I am trying to do, is list the farmers and their spouses. (I am remaking PolyamorySweet Rooms) Anyways...
foreach (Farmer farmer in Game1.getAllFarmers())
{
farmer.haslistWives().Clear();
foreach (var npc in farmer.friendshipData.Keys)
{
if (farmer.friendshipData[npc].IsMarried())
{
farmer.haslistWives().Add(npc);
}
farmerSpouseDictionary.Add(farmer, [npc]);
}
}
Anyways, that [npc] at the end is apparently illegal in C#10... Please, if I might, how would I do this instead?
honestly this might be faster lol
oh you can use lang version latest if you want
(marked in their mod data i mean)
^, I use [a,b,c] all the time
Yeah, you should definitely go through and see if you can do away with any of these patches, no point in patching something if you don't have to
ah ok i dont understand but i'll take a look
okie! thank u!!
wow sounds like a job for BETAS_NPC_LOCATION
(you dont even need the asset pipeline either really you can check for the shop menu opening)
they'd need a way to check the NPC's mod data!
which BETAS cannot do
currently anyway
this is how you load and edit game data in C#
How do you get the [a,bc] to work, if the project is .net 6?
(tbh, i didnt realize moddata was a field on Character and not just Farmer and thus didnt realize NPCs also had a moddata field)
C# lang version and net version dont have to match
can just put <LangVersion>preview</LangVersion> in csproj PropertyGroup
Ok! And then, it will just auto-work?
You need the net 8 sdk
Have to have it installed, just don't target it
Depending on when you installed VS you may have net 6
I had to do a pile of bullshit ti have it but that was during their late beta
I installed it a while ago, so I suspect it's on 6
(actually as long as i have Rider open are there any other things that might have potential useful moddata fields that i dont know about besides players, locations, items, and NPCs? i know a ton of things do have moddata fields but, yknow, not very useful to add a query for TREE_MOD_DATA if you cant identify a specific tree...)
do you have similar check for CustomFields
Well, I must have it, cause it works most Groovily!!! Thanks loves!!!
is there a specific instance where it'd be useful to check the custom fields of a specific instance of a thing
vanilla has a custom fields query but just for locations
Gentle warning with NPCs in MP
smh vanilla leaving homework
That will only be reliable for NPCs in the same map as the farmhand
there's not really a case for instance + custom fields cus that thing is on the data model
wouldnt this be true for all the existing NPC related queries in vanilla too then
but it is nice to be able to check them at all
A lot of the "NPC" Data is actually stored on farmer.friendshipdata
(Mod translation class builder 2.2.0 is now available! This adds support for SMAPI 4.1.0's new i18n subfolders thanks to @next plaza, and more validation to detect invalid i18n files.)
i think i might just be a little confused on why checking the mod data for an NPC from a farmhand would be any more unreliable than a C# mod that tries to write/read to an NPCs mod data while running on a farmhands client
It works fine if npc and farmer are on the map
But for farmhands, the rest of the game world (with the exception of always active locations) is basically in a dormant state
Not synced
wouldnt that be the case with this aedenthorn mod too though then if it was running on a farmhands client?
i guess it does only check when you specifically look for the saloon stock so you would be on the same map, but like, if the mod checked all characters everywhere, wouldnt it have the same problem
(In general, I don't assume mods behave in multiplayer.)
If you want to see something trippy
thats basically what im gettin at/askin though, is if the unreliability of NPC mod data is something my GSQ would be responsible for or if its just the same thing any ol' C# mod would worry about too
Try debug whereis on an npc as a farmhand when your not on the same map
and thus something i can write off as "not my problem, its better than nothing"
(It should be obvious I don't believe in "better than nothing.")
it is sort of a content pack for some game functionality 
At the very least, add a warning about such queries not necessarily being reliable on farmhands
"not my problem, better than nothing" was a not entirely serious answer i will admit and was more for exaggerated funnies, more accurately it would be "can i write this as 'its not reliable bc of how the game works, not bc of how my mod works'"
Yeah, and there are plenty of things that are host only
Sorry, I'm just jaded and old
I debug weird shit at work day after day lol
i just always prefer to know beforehand if something i plan on trying that might not work is gonna be Entirely My Fault for it not working to decide whether its worth it or not to actually do it 
Just looked at the 1.6.9 changes. So for most mods no changes necessary right? The word "migration" scares me
Yeah, we're dealing with a pretty nasty case of ground bounce at work
Bitch to debug
To simplify - you generally assume that a ground plane is at exactly 0V
i think the only breaking changes i can remember are for C# mods so assuming you're including content patcher mods in this, i would expect most mods to be f ine, yeah
Ground bounce is when it isn't
(though i did just try this and it seems to work fine?)
Wait what
It โworksโ, itโs probably not correct as the day progresses
ah yeah, the coordinates are off actually
They could be on an entirely different map in theory too
its also not correct even when i am on the same map so. point taken
(wait actually i mightve had the wrong window open lmao)
@orchid acorn The upcoming SMAPI 4.1.0-beta.2 should propagate changes for Data/ChairTiles; let me know if you still have any issues with it when you get that update.
Pathos I hope your pillow is ALWAYS cold on both sides

I'm trying to change the code for JunimoNoteMenu again by using harmony and adding a prefix which is just its original code, but (eventually) going to have a change to the if statement that stops non-object items from rendering in the Community Center. I have tried to convert the code to harmony as good as I could, but eventually I kept getting this error displayed in the image. I am very confused on what is going wrong. Any idea on what is going wrong? Thanks in advance!
(Code) -> https://pastecode.io/s/tsdqme83
Returning null somewhere you shouldn't, gotta figure out where
Setting a break point and debugging might be a good option
I was looking at previous texts from this chat, and found something about IMonitors and IModHelpers being the cause. I haven't set mine equal to anything, which probably would make it null; however, I have no clue on what to set them equal to.
are you ever calling Initialize in your JunimoPatch class?
if you just call the initialize function and pass in the monitor and imodhelper you got from your Entry function, it should work fine
but you can also just make them static fields in your ModEntry class
and assign them in entry
public static IMonitor? SMonitor;
public static IModHelper? SHelper;
public override void Entry(IModHelper helper) {
SMonitor = Monitor;
SHelper = helper;
}
Usually one of the first things I set up
Considering SObject is for Stardew's Object my S here might not actually be great to mean static lmao
But I've unfortunately gotten into the habit of it already so 
Cool tks
Thanks! I'll take a look for an upcoming 1.6.9 beta patch.
So you create the IMonitor and IModHelper variables into the ModEntry class, initialize them in Entry, and then use them in my Patch class?
protip btw
that error shows up in the log of players
so either program perfectly (not possible) or...move your dev directory out of your home directory
(also, i have now just tested writing to and reading from NPC mod data as a farmhand and it appears to at least work initially; in what situations would the mod data get out of sync or behave weirdly, so i can accurately document the dos and donts of multiplayer BETAS use?)
What if you write before a farmhand connects and try to read?
its not syncing between the host and the farmhand, but i wasnt expecting it to
it only ever works if the farmhand and npc are on the same map
if
- Farmhand is on a different map than npc, that npc is a clone. their data isn't persisted. If farmhand then wanders to map with npc, they see data sent from hsot
writing to that clone npc is useless, it won't get persisted.
Wait, could you elaborate on this; I don't think I quite understand. Is my dev directory my csproj?
i think ive actually just been misunderstanding how moddata fields were supposed to be used this whole time bc i always thought they were only ever meant to be local and not get synced lmao. i may be dumb
i.e. i never realized that the host will resend the npc data like that with the moddata and everything
Oh yeah, it's netcode so like every 3rd frame or whatever it was
I meant the whole project!
like just move all your code somewhere else
I noticed you blacked out your name
just be forewarned every stack trace from your code will have your name in it
Oh that's what you meant lol
I was very confused as to how location could cause an NRE
sorry!
(I leave mine in my home directory, but also, like. (a) no published mods
and (b) my dumb ass managed to get "night" set as my permanent Windows username.)
in my defense I was tired?
I care about Linux more?
But that just makes you seem cool lol
boy was my face red when i learned about the stack traces leaking my home directory. i fixed it immediately
At some point, whenever I need to switch to a new operating system that doesn't involve just upgrading, I need to change my email to one that I didn't make when I was 12
the only embarrassing thing about my stack traces is that people are gonna see that i named my drives after pokemon bc i want as few things in my home directory as physically possible
I'm obviously too uncool because I keep thinking these things are fine lmao
(don't cha miss when operating systems didn't need an email account?)
i just edited my registry to fix my windows username after they nabbed my email for it
Are Furniture inventory sprites stored differently than normal Object sprites?
(hey asking for a friend who had a tentative idea. on a scale from 1โ10 how bad of an idea is it to send or receive a bunch of strings from SMAPI's multiplayer message events every second)
can your friend accomplish the goal using netevents instead? i would guess it's better to only send and receive on demand, but i'm not too familiar with stardew's netcode
i guess that question is the same as "can you send messages less often"
it's just that "every second" makes it sound like you're polling
the idea was to check every NPC's current location and current tile coordinates and (if they were different from last time they were checked) broadcast them to multiplayer clients to get more accurate data about where an NPC is in multiplayer
if it's for syncing NPC data, you might be able to get away with tracking NPC warps from the host or something 
(and send new data on warp, rather than every second, tbc)
that said, it's probably not going to be awful, depending on the volume...I'd consider it more of a question of whether the payoff's worth that
like half the GSQs in BETAS rely on the npc locations so if there was a hacky workaround that didnt cost too much thatd be nice
some of those rely on tile coordinates too so location alone wouldnt be enough
(npc map locations broadcasts the npc's location every 30 seconds)
i guess maybe a better question is "whats the quickest i can broadcast the data to balance both computational cost and also accuracy for when the GSQs happen"
yeah, I guess that wouldn't work for tile checks in particular; even 1 second caching could miss them stepping on a tile
otoh, this is a problem that only arises if the npc is not on the same map as the player
(e.g. if players block them until they go into hurry/shove mode)
you may be able to "get away" with just going "hey host, is npc at this location", host says "erm, no?"
and the player won't notice because the npc is not on the same map
i wasnt sure how i would await the host's response before returning the result of the GSQ (or action)
Could you send a message from the client to the host and trigger an update?
so, action is fine
not knowing the answers here is why I made my stat token host-only 
action is not fine if you use my relative queries!
you don't necessarily have to do the action on the same tick, just go "here's a promise I'll do it!"
queries, otoh
i suppose i could make actions an IOU
but yeah queries need a result like immediately
/j why not simply ask the host when you run the query and block until they respond
(the answer is i did briefly think about it but i didnt know how to do it even if i wanted to)
clearly just implement speculative execution but don't fuck it up like intel did
queuing up actions while waiting for a hosts response is a good idea though i didnt think abt it bc i was mostly focusing on the queries tbh
I think we were discussing query caching the other day
any query can change in a single tick
yeah
some are less likely to, but nothing, says, like
even if they were cached though im not sure how thatd solve the inaccurate npc location problem
"trigger action one does query A, adds mail flag. same tick, trigger action b does query A"
I'm not really sure how inventory drawing is done, I assume that the main sprite for each furniture from TileSheets/furniture is just being scaled down to fit
