#making-mods-general
1 messages · Page 34 of 1
There's a mod for that, but yeah it's pretty insane lol
i love when there's something bonkers in the code like this. must have been a "this is the first solution/workaround i thought of, it works, moving on" situation
(to be completely clear, i respect and in many cases advocate this approach)
It works, there should technically be very little that could happen that would interrupt the process and cause issues
theres a Spiderbuttons.BETAS_WarpFarmer action
did spacecore have a item used action i forget
does that fire on tool usage is the question
Totems aren't tools
I am just using a cp item
Or this would be an entirely different problem lol
the return scepter in the game is a tool
Right and he could make a custom tool but that's not as simple as using an established framework to do this hacky solution
If he had shown interest in creating his own C# mod, I'd be suggesting different solutions
Ichor said the same, looking at it I agree, but it's not the only option so we'll see how this goes
honestly how i approached my mods
- Make it work.
- Make it work good.
- Make it work pretty.
Most people finish 1 and move to the next feature with the intent to come back and finish it, and we know how that goes.
You would define a trigger action firing on SpaceCore's item used trigger, check that it is your totem item in the Condition field, and have the actions be "add that totem to inventory". Then in SpaceCore's Vanilla Asset Extension data set the item's UseForTriggerAction field to true
For this MarkActionApplied would need to be false right?
There's not something about how the action is triggered that would circumvent that, I assume
I'll see if it works first
When I right click the item it adds another one but does not get used as a warp totem. Also after doing this once, a error appears in the smapi console:
Should have kicked that error the first time, you do indeed have to supply either Target or Input to that GSQ
I think it's just Target, but I'm not sure
I'm of two minds over it
On one hand, yes, expedient
On the other you eventually bury so many landmines it's impossible to move
(But the little I understand of anything, apparently everything is like this.)
I'm currently trying to argue SharePoint into letting me see a file lol
My god
It's been half an hour
Hm, I guess it's Input, but the warp function doesn't seem to work
The item only copies itself once and does not warp the player. Here is my code: https://smapi.io/json/none/81a5b110efe64d40baabea8718b5f593
I can pull up my spacecore doc but uh mines a recipe and doesn't give you a new one
It seems like it can't do both things at once
It can either do TotemWarp or be used for a trigger action

Which kind of feels like an issue on SpaceCore's side?
Since both of these are in that override
There's no vanilla trigger action for an item being used
Maybe BETAS warp trigger action would work then lol
Wait is it because of that markactionapplied in the apacecore
Though when you consider having two frameworks to make a single mod work, making a fucking custom tool certainly sounds better
yes, all things in moderation, of course. as you yourself said: "games with good coding practice never ship" 
I have MarkActionApplied false, I didn't check his code yet
That would be why it's only duplicating the item once though
So I think I messed up with my code a lot, but have zero idea what's wrong exactly.
Frankly, I don't know which file needs fixing or anything, I'm completely clueless.
Triggeraction and totem warp should be fine in the same space
!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.
I changed that now. I will test one more time
as the message says the (CP) test1/content.json file is not vlaid
If you started on a saved day, the trigger action will need to be debug set false
I'm going to say something probably polarizing
It's okay for games because fundamentally you don't need to maintain that long term
Ah i see. I'll see what to do to fix it then. Thanks!
Yeah, these two things can't both happen
The code checks if it should do the OnItemUsed and returns if so, then it checks if it should do the TotemWarp and returns if so
So if it should do a trigger action it'll never do a warp
I guess in the meantime that really does only leave C#
I did fix that content.json, but map isn't even there. I can't even teleport there via debug warp YourLocationName X Y dosen't work
I've got error "[game] No location with name test1"
!json share the updated 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.
Upgrade to data/locations, customlocations is depreciated
Actually is it a new farm, additionalfarm* instead
It's good practice to upgrade but custom locations should still work
Though really, they're harder to get help with because a lot of us never used them
If it helps, I just wanted to add extra location going from my farm to there and back
Oh, you should be doing debug warp Custom_test1
I have some remembrance of custom locations but it's not as flexible like being able to add fishing n stuff 
I think you could edit that stuff in in a separate patch block
It's not as nice as just adding it in all at once, plus it has naming restrictions
I think I messed up with the whole thing xD
I changed it additionalfarm and didn't work, I did with locations and same issue
And I tried to warp there with Custom_test1 name
Did you try to use the warp prior to changing it around?
I just now changed it back to how it was and still nothing.
I'm not sure if there's something missing that I'm not aware of
I'm on mobile so I can't really dig through examples, if you transition it into data/locations then it'd be easier to spot the problems https://stardewvalleywiki.com/Modding:Location_data
Running example: https://github.com/Aviroen/Custom-NPC-Edelweiss/blob/master/data/Locations.json
where could we find the dialogue from the start of the game?
what all do you need for your NPC to work? like the basics? I have the manifest, content, and dialouge but the little man will not work. I get a big old pop up telling me the mod failed, though I could just be doing it wrong
!npc
Keep in mind that making NPCs is a complex process that requires learning many different aspects of Stardew modding.
Here are a few links that can help get you started on all that you need to know:
-
Tiakall has a great tutorial on making a custom NPC for 1.6:
https://stardewmodding.wiki.gg/wiki/Tutorial:_Making_a_Custom_NPC -
Custom NPCs received many improvements with 1.6. For changes made, see the migration guide:
https://stardewvalleywiki.com/Modding:Migrate_to_Stardew_Valley_1.6#Custom_NPCs -
Some information on the NPC wiki page is still relevant:
https://stardewvalleywiki.com/Modding:NPC_data
Just make sure you're checking the migration page and tutorial first as this page still has outdated information on it as well. -
Aviroen has put together a template that will allow you to easily create a romanceable NPC:
https://stardewmodding.wiki.gg/wiki/Npc_template
Strings/StringsFromCSFiles.json
GrandpaStory
Has anyone looked at the "key polling" code in Game1? I'm not sure if I'm reading it correctly but it seems like half the keys have different delay/repeat behavior:
- Direction keys count DOWN from 250 initially (milliseconds, I guess) and repeat from 70
- Gamepad and left click ("mouse click") starts at 0, initially waits UP to 650 and then resets back to 600 (so delay is 50)
- Right-click polling seems to start at 500 and always resets back to 500 (no difference between initial delay and repeat delay)
Aside from being insane, does this sound accurate?
do u guys kno if its okay to add copywritted things to mods? like say a character from a cartoon and such?
tysm
like they're just mods that are free so i dont think there would be any issues?
its basically like doing fanart featuring 2 different ip characters
very likely to lose the lawsuit but hopefully they dont bother to sue you lol
Imagine mentioning Mickey Mouse in your mod and getting bonked by Disney 
copyrighted music will probably get more attention than a fan adapation of someone else's IP.
Technically speaking, legality is pretty gray in that area; however mods are usually small and aren’t usually targeted for copyright claims (at least in the stardew community) so you don’t really have to worry
cuz i have a rly funny idea for a grandpa mod. so like since my mod is a big goth mod, i didnt kno what to do with the grandpa so i thought id make him edgar allan's ghost from south park xD
lol yeah i figured but just wasnt rly sure
like im putting some mentions of some goth bands here and there too via texture art and such
there's whole ass npc mods
Yeah it’s like, you’re likely to be fine, but just in case be ready to have to take the mod down if the owners of the IP randomly decide to file DMCA takedowns
feat. definitely copyrighted anime character
if you are really concerned then keep this separate from the rest of your mod 
Obviously not. Do you even really need to ask?
i made this plant Rogue from Crüxshadows xD
I don't think south park people would mind a grandpa mod, they'd probably think it's funny.
yeah i figured most ppl would ;p
that said, I got written permission from the artist of a game before getting a tattoo inspired from that piece.
When it comes to stuff like that, it's not the creators of the original content you have to be worried about, it's their fun sucking lawyers
of course yeah
but yeah its just a stardew mod for a small community so i doubt anyone would cry about it like that
If the Gojo mod can stay up, I doubt you have anything to worry about lmao
im not familiar with that one but ive seen somethings lol
We're again into that silly speculative territory of "ok, maybe it's not legal but will I get caught/prosecuted?" We can't predict that, either you ask for permission or you take the risk and maybe later have to take down or beg forgiveness.
right yeah
Copyrights are also not trademarks - just having a reference to some character from some game or show (for example) doesn't mean you've done anything wrong if it's not a registered trademark. Using their art, music, etc. directly though, clearly copyright violation.
makes sense
anyways. how do we get mods to go on mods showcase?
Someone with the mod author role can put them in there
how to we submit one to them?
alright. i will inquire more once my mod's done
right yeah but i was wondering if there was a channel or ticket or something because ik not to dm ppl that i dont kno unless its very important
its a informal thing really
Usually people just throw it out there asking if anyone would be willing to showcase it
and mostly bc mod author is restricted to lv25
i see
As long as your mod isn't something very disturbing or controversial then almost anyone with the role will showcase it for you.
(And I don't think I've ever seen a request to showcase an un-showcasable mod)
alrighty and yeah its nothing like that xD
That said, TBH I think #modded-stardew has a lot more visibility than #mod-showcase . The showcase is just kind of a... badge? I don't know.
i do have some trolly mods i want to make but even those will be tame
I think the go to is usually it gets posted in farmers and then showcased from there
So max visibility
Though I didn't bother with my most recent mod since it doesn't do anything for non-mod creators
is there a similar channel/process to ask for playtesters before a mod is released out of curiosity?
or do folks just ask in modded-farmers for that too?
Pretty sure it's just farmers as well
Yes - they ask in here, we post in #modded-stardew and then submit it to #mod-showcase. Highly intuitive process.
The cyclical nature of time and conversations lol
Wow lol
yeah sounds alright. im just iffy about dropping links in servers like this lol. i dont wanna be breaking any rules and such
Well often people will ask here since this is where the mod authors live
No
Used to just ask friends
If it isn't tagged as adult then you're fine to throw nexus links
And then the author will go post in farmers and showcase it, since you can only showcase your own posts
"Live" is polite
sounds good
Well, "rot" is accurate but kinda rude
I prefer "hide"
hey, so... how can I share my mod to possibly get some feedback?
Tempting to have a beta testing thread lmao
If it's a C# mod, you can make a github repo and link it there
If it's just CP, I believe zipping it up and sending it here is fine
I mean, the focus is CP since it's the maps mod but it does have C# to make locations work...
Ugh, I remember why I haven't even entertained the idea of making a SpaceCore PR, I can't even get this damn thing to build
spacecore was pain, took over 30 hours to make work
well... if anyone want to try, the entrance is on the map north of your farm, hidden behind a tree
just want to know if the size is too big or too bland, too hard or anything
btw most of the maps are unfinished, the almost done ones are the entrance cave, the after the cave and 2 to the right
#modded-stardew is likely going to be a better bet, your typical mod authors here barely have the time or inclination to play their own mods.
fair
(I do post unreleased stuff here occasionally too, but it's more of an "early access for friends/peers or just excited that it's done" thing than expecting anyone to test or give feedback.)
One of these times I'll try to figure out why AchtuurCore is throwing red again...
just swap your screen hue until it throw greem
if map north of farm means backwoods then u gotta watch out for compat
several big mods patch stuff in there
I wonder if I'm fucking anything up by not letting the code do this lol
what mod mess with backwoods?
Ridgeside possibly, SVE definitely
both works with my mod
jorts and jean iirc?
i uploaded a short vid of me reading the modded grandpa lines, can i post that in here?
im sure ur current patch is fine with your mod list, just stuff for future proofing things
I'm using the system that replace a map area with other
and did just a small cut there
So it work with ridge metal stuff and expanded area
That's going to mess up almost everything? That's the only way the game/mods are able to determine which inputs are newly pressed.
I haven't noticed any issues is the problem
As little as possible to make it not consume totems
It's used like... everywhere in the game. If you're not noticing any issues, I would guess it's either because you are not consistently blocking it from running, or similar code is being run in some other place.
You're probably seeing input up when you shouldn't
Which you know
Would make this piffle sad if I was still bothering to upkeep mods
Input up isn't used particularly often
Oh, if you are blocking it for one frame to deal with item use then that might be safer. Still probably has subtle issues, but it's only going to miss one frame.
Oh I see why it's fine
By giving back false here, it skips past all this other stuff and then just sets those anyways
has anyone used the new revive locations in the location contexts for 1.6?
I'm a bit confused, because it says if I add an event called "PlayerKilled" to the area, it should play after the player is knocked out (which it does) then it will apply the lost items/gold logic (which it doesn't)
I considered doing the specific event action that seems to get used in the PlayerKilled event for Harvey's clinic, but the wiki seems to indicate that will initiate something with Harvey
There’s an event command you have to call for item gold loss if I remember correctly
Don’t recall what it is, just know I needed a custom one recently for someone
there are two, one named deathhospital and the other deathmine or something
i use...
minedeath
yeah close enough
without issue in VMV so far
ah ok, I didn't use that because minedeath said "pulls up the dialogue box with Harvey. " at the end
I'll throw it into my playerkilled event and test, danke!
wiki is made by people so sometimes it's not accurate
and yeah
it has the dialogue as, the "i lost x item and z money" whatever thing
oh, which I do want
and I suppose it could be that prior to 1.6 it really did do something with Harvey and that changed
possibly the hospital version says something about paying for surgery? but yeah, test and see which fit
how can i replace/add more soundtracks?
yup minedeath does the job, doesn't seem to have anything to do with harvey at all
Red from Achtuur is it can't find the LooseSprites/buildingPlacementTiles asset anymore, redid my unpack and sure enough it doesn't exist now
Interestingly, building in game still shows the placement tiles, so I'm not sure where base game is getting them
wdym i have those
In the latest 1.6.9?
Hm, maybe it was one of those files that just finally got purged lol
sad that they didnt choose to go with the not cursor asset
cursors consumes all
Just to avoid having everything be on cursors? lol
Looks like they updated to 1.6 but haven't been active for 3 months
Until 1.6.9 it was all working fine, light source changes caused an issue but that was easy enough to fix and it was also only for a debug build specific thing so didn't really matter
Now I gotta figure out exactly what they were doing with this spritesheet to recreate it in cursors
the 2 sprites look identical, but buildingPlacementTiles is at 4x scale
quick question, for (1.6 spoilers) ||that one walnut on the island||, is it just looking for a projectile to trigger?
it's not a 1.6 spoiler,and yes i believe so
Oh I guess I haven't played in a bit lol.
Gonna make a small GMCM update to fix... this...
Just gonna make headings for each mod instead of prefixing the mod name on the keybind name
Hopefully won't break anyone's GMCM hacks
re:casey, totemwarp and triggeractionapplied not working for spacecore in the same command
I saw rokugin put in a PR on some related functionally, I'll take a look after I do this. (Though it probably won't be released until 1.6.9 is out)
Ok then
makes config names so long they cover half the screen /j
Well, at that point that's that mod author's problem 😂
oh i dont recall this interface is it new?
Nope
wow 
my brain decided it's button for virtual keyboard
and never investigated further
To be fair it also took me an embarrassingly long time to even spot the button, let alone click it
I should probably also fix this crash that happens if you resize the window while GMCM is open...

Apparently it only happens on the individual mod page, not the mod list
If you do it on the mod list, the keybindings button disappears
Oh, because I implemented it dumbly
Oh it's only the keybindings menu crashing on window resize
Huzzah
Now I kinda want to do the GMCM rewrite...
Must resist...
i think focustense already transitioned out of the hack and they're the only one i recall so far... 
Remind me in an hour to look into the PR
sure thing, bud (#6246017) (1h | <t:1726526570>)
[evil kermit voice] do it
Nnnnnnnnnnooooooooooooooooooooooooo
Ok it's probably fine as long as it doesn't change the underlying UI code. But if it does break the RM config screen, let me know, I'd either have to update the Publicizer assembly or start the migration away a bit early.
RM config screen?
Radial Menu
I am going to migrate, I just wanted to finish the 2 other mods I'm working on first (one of which is in an intense week of yak-shaving)
Oh wait, this just updates the Keybindings screen?
I didn't write any hacks for the Keybindings screen. It's probably fine unless it interacts with the other mod config pages... somehow. Or unless publicizer'ed assemblies can't handle any binary change no matter how trivial.
So. Going back to look at some old Better Crafting bugs, and I find this when investigating why some SpaceCore recipes aren't showing as crafted. ```csharp
public virtual int GetTimesCrafted(Farmer who) {
if (Cooking) {
// TODO: This
return 0;
} else if
I think we're alright. Panic subsided. As long as the game actually still launches with both mods active and doesn't crash immediately when opening its config menu, then the rest should be OK.
I have absolutely no memory of this, lol
TODONT FTW
TODO(name of person who left the company 5 years ago)
Alan please count the cooked recipes
It's for this reason that certain companies have banned that type of todo comment in their code style. Of course, in mod code there's no point in putting a name at all since it's almost always 1 maintainer...
god i wish this weren't me 
i was investigate with intentions of PR and saw this, so i didnt end up making said PR
Other tweak for next GMCM: Conflicts are shown in red (per Nexus suggestion)
do you think gmcm should be wider
Probably but that would break people's complex widgets maybe
(If you happen to feel like opening up that API in the hypothetical V2, there are a lot of us who could benefit...)
So better to wait until 2.0
it'd definitely break mine lol
Keybindings API?
Yes, at least a read-only view of keybindings in use.
Ah, right, that makes sense
or perhaps just aligning the right side closer to middle, if its relatively easy to do
That would still break people.
Since custom widgets receive the right column position as their origin.
If they then subtract the (hardcoded, constant) column offset to draw along the full row, then they'll be out of bounds, etc.
@ focustense - Radial menu works fine with these changes
No crash on opening it's config
Thanks for checking.
Did Nexus just accept the update but not upload the file
I've noticed that Nexus is weird about caching sometimes. If you open up an incognito window to the mod page you'll see that the update (file, etc.) is there; it just refuses to show that update to you, the author, while signed in.
Oh great, now it's there twice
Haha, did you upload it twice, thinking that the first update didn't take?
Why not, let spacecore meow
if you type in meow to the game it meows back at you
there was a 5 minute period where ppl who downloaded one of my mod would have their console filled with BOOM and the occasional FUCK
relatable, i think my code exploded often for various reasons
Speaking of breaking things, don't update StardewUI for a day or two, lol
complete car brianed behavior, as well as same
@next plaza: look into the PR (1h ago)
At least it didn't catch a mouse
This is done (as well as allowing TA+TotemWarp to co-exist)
How can you suppress the item added to inventory notification when adding an item to a player's inventory?
Harmony.
Can't you just yeet the toast instance on the same ticj
That might work too. I did it with a postfix on GetItemReceiveBehavior.
Thank you!
Think something happened here xd, duplicate sophias
If you're looking for assistance, please go to #1272025932932055121
But yes
The game does that
Hey! I’m trying to edit the spouse dialogue and want to put in the random spouse nicknames, but I can’t do it. I’ve tried using {AffectionateSpouseWord} but it will show the dialogue I write but without the random nickname . If anyone knows how to put it in successfully that would be hugely appreciated 🙂
where did you get {AffectionateSpouseWord} from?
based on what i'm seeing in the code for 1.6.8, if you want the built-in random ones like "Ducky"/"Darling", you need to use %endearment or %endearmentlower
there is some kind of SendMessage limit right
can someone help me rq, im making my first mod, its just a simple hat, idk if its in the game, or even if its in the shop, how can i find out?
lookup anything and search for your item
Shift F1 by default brings up the search bar
can also look it up with cjb item spawner
Oh yeah that too. Better than LA since you can also spawn your item in
hm npc map locations broke the keybinds menu in GMCM-1.13.0
https://smapi.io/log/d82d4a45187943fa8ec8122541a61475
Log Info: SMAPI 4.0.8 with SDV 1.6.8 build 24119 on Unix 6.10.10.1, with 2 C# mods and 0 content packs.
also gmcm's main menu icon is invisible in 1.6.9
Yeah, mentioned that one earlier
ah might be more than just npcmaplocations 
Hey I have a question... is it possible to make cutscenes, like an anime cutscene (lets just pretend I can draw)
I don't know what an anime cutscene is but you can make events that are pretty much just watching the screen like in Emily's event or Caroline's.
i dont think there's any framework for this kind of thing 
hawo! its my first time doing custom locations and would like to ask if theres a difference in the placement of "z_" like for example fall_ztown vs z_fall_town
Does that mean you know what an anime cutscene is, Chue?
It's a cutscene that's drawn in anime style, I assume.
for 1 frame cg there's that map trick but to make it animated u prob want to make your own speshul event
Yes! The purpose of "z_" is to ensure your tilesheets aren't placed in between (or in front of) vanilla ones because the game expects tilesheets for vanilla maps to be in a specific order. If you're making a custom map you don't need the prefix at all. If you're editing a vanilla map, it needs to come before everything else.
like caroline's thing
You definitely do not need a framework just to make an event with animation
I mean, to put anime in Stardew would first of all require much higher res, unless it's some weird pixel art/anime hybrid.
I don't know of any size limit to temporaryAnimatedSprite
It's not going to happen with 16x16 sprites.
shenanigans 
You could maybe use sprites in detail if you wanted HD art in your event, I don't know
i see. thanks!
lol, 2560x1440 temporary animated sprite. I see no problem here.
dunno if this work atm but it's one way to put video in stardew
Since you're making a custom location, you won't need to use the "z_" prefix at all.
When used in a custom map, all of my custom tilesheets are prefixed with "Aba_" so I know they're mine lol. And any vanilla tilesheets that I pull from somewhere other than maps are prefixed with "vanilla"
Unless it's seasonal, I prefix everything with z_ just so it's all together at the bottom
Just for custom tilesheets?
Yeah, I do everything in Maps, with some oddities allowed for pulling in other peoples tilesheets for testing
Adding my name to that might be a good idea though because a lot of other people also use z lol
I don't think I have had to actually use "z_" because my only edit to a vanilla map so far has just used the same tilesheets as were already present.
Probably primarily for vanilla edits
But I haven't been keeping track really
If I didn't have to keep things all in the same folder, I would just organize it that way, naming it is the only way to get any control of the chaos
i thought it was specifically z because its not just not coming between vanilla maps but also not coming before them, i thought
Yes, I should've been clearer about that so I edited my message thanks Button
I used to think you needed "z_" for every tilesheet you added to any map
(im adding an after-the-fact /gen to that too bc i promise i wasnt trying to be like, nitpicky, just genuinely wondering lmao)
Well it was worth being nitpicky about anyway but I am pretty sure you're correct that the vanilla ones have to come first as well
I'm about to do some vanilla map editing so I might double check that just for fun
Custom map is doing alright, but is not getting snow on the ground in winter. I'm wondering if I've mutilated the tilesheets it's using too much for the map to pull fall/winter sheets.
Are you getting errors in SMAPI about it not being able to load the fall or winter tilesheets?
No.
Well, there is the message on save load that says "smapi fixed things in the map but we won't tell you about it here."
No red messages.
If you enable verbose logging it might tell you what it's doing to fix the map
Is that an option inside smapi or in the json?
I also made one of my spring tilesheets a tsx, don't know if that would do something.
A tsx doesn't replace a tilesheet, it's an external tileset that contains the metadata about the tilesheet itself
I'd recommend embedding it into the map unless you have some pressing need to keep it separate
And for the verbose logging thing, it's in the console I think but I forget how, hold on
Okay there's a log_context command you can type into SMAPI, which you'd have to do in the main menu (but I don't know if it would capture what SMAPI is doing to fix the map) or you can enable verbose logging for your mod in the config. https://stardewvalleywiki.com/Modding:Modder_Guide/APIs/Logging#Verbose_logging
Are you using "spring_" etc prefixes for your tilesheets?
Z_spring yeah, but because of wrong folder shenanigans it's a little messy. It's all vanilla tilesheets but I made copies of everything.
That's probably it actually.
Did you edit the tilesheets?
Yes, added an animation to the bathhouse fountain and made the horizontal bridge passable on the building layer, both within the tilesheet.
No extra art added.
ye of little faith
Hey, this channel is actually for people who are making mods, so I suggest you make a post in https://discord.com/channels/137344473976799233/1272025932932055121 for help with this :)
can someone help me, i’m a noob at modding, i’m editing a mod rn where the spouse’s have out of town work days. how do i make a spouse disappear for a whole day without being able to see them leave in the morning.
Might wanna check out how Elliott does it for his 14 heart event
oh pls tell 😭
how do u do that omg i sound stupid
No you don't, I didn't know how to do it before someone told me about it either. Let me just grab my code to show you.
This is my code for making Hiria (my NPC) invisible for 3 days. I've got the link to the wiki trigger actions page and the link to the GSQ page (for conditions on when it should happen) up the top.
// https://stardewvalleywiki.com/Modding:Trigger_actions
// "Condition" field is optional, but when used needs GSQs: https://stardewvalleywiki.com/Modding:Game_state_queries
{
"Changes": [
{
"LogName": "Add Trigger Actions",
"Action": "EditData",
"Target": "Data/TriggerActions",
"Entries": {
"{{ModID}}_SpringTramp": {
"Id": "{{ModID}}_SpringTramp",
"Trigger": "DayStarted",
"MarkActionApplied": false, // Keep this if you want it to happen every year
"Condition": "SEASON_DAY spring 18",
"Actions": [
"SetNpcInvisible Aba.Hiria 3",
]
}
}
}
]
}
However, I have been told that NPCs will still show up on world maps if you're using mods like NPC Map Locations or UI Info Suite - I haven't yet tested that myself but I thought I should let you know.
TYSM!! 😭🙌
Okay, I have confirmed that unfortunately NPCs do stay visible on the world map if you use the SetNpcInvisible trigger action. I don't think there's any way around that without asking the mod authors of NPC Map Locations/UI Info Suite to make changes to their mods. If it's going to bother you too much that the NPC is visible on the world map then you will have to go the route of having an NPC "warp map" that you use a 0 schedule to warp your NPC into at the start of the day, I think.
NPC jail....
it's okay i don't mind anyways, thanks for letting me know!
(Be aware that 0 schedules may cause issues like NPC duplication though, iirc)
Oh is that why people get duplicate custom NPCs?
And various other bugs but I dont remember which atm 
Is this a good channel to ask if a certain mod exists or not?
Depends on what kind of mod
I wonder if I can poke around in the code for the map mods and see if I can figure out a fix to PR to Pathos and Abs0rbed
OK so I have SVE. I have a cat tree furniture. I'm trying to place it in the kitchen in a landscape position against the left wall and it won't let me. Is there a mod that lets you flip furniture?
It should be easy!
(iirc spacecore has a tentative fix for that in 1.6.9 (not part of the base game because of risk of regression this late in 1.6.9))
I believe in you!
I think your belief greatly outstrips my skill and knowledge, atra, but I appreciate the encouragement xD I will give it a go anyway because why not
o.O my town-square just spontaneously unmuted
it's been migrating randomly recently it seems
(Casey has put this off for 5 days I think because busy? Wait nvm im thinking marriage 0s)
(I mean if Casey wants to I can test this secret spacecore build of 0 schedule fixes on marriage schedules if she just gives it to me, preferably with spacecore meowing at me ;p)
(Casey if you're seeing this, I still do not have access to a computer and won't for a few more days at minimum, I can not actually test it rn ;p)
Awe no way! Thank you! I was looking at a different mod that used that in there and was successful, but thanks so much! I’ll try it next time I’m at my computer
Hey, so I'm new to modding - is there a way to use CP or another framework mod to replace the farmhouse exterior with sprites larger than what's in houses.png? Or would that need to use C#? My idea is to turn the farmhouse into a treehouse using the giant trees in Cindersap as a starting point for the sprites.
It'd require C# yes (unless the house is in Data/Buildings for whatever reason?)
Thanks!
theres a farm mod that makes the house "bigger". it is the same size but the map around it is also part of the house. you just cant move the house then or it looks horrible
basically like this
and with AT you can reskin the house (or with CP obviously) so it fits
but yeah stuff like moving the house around wont work obviously :p
wouldnt need C# tho this way
the farmhouse is in data/buildings 👀
The mod that you saw using {AffectionateSpouseWord} was the Happy Birthday mod, I'm guessing. That's a token specific to that mod (so you can't use it in your own mod unless it's a content pack for Happy Birthday) and is defined using C#, but it looks to me like it mostly uses the vanilla terms of endearment anyway so what ichor suggested will hopefully give you a very similar result in a much easier way.
Oh no way! I must of missed that, I just thought because it was the same names as vanilla, it just grabbed it, thanks to you both for clarifying 🙂
I wonder how hardcoded the farmhouse is or if it's actually using the data from Data/Buildings
i added a skin for farmhouse as far as i remember so should have a good part in the data model at least
I really hope it's fully using the data model cause that would be so exciting for potential farmhouse mods
oh god
yeah- hold on
here's it's data in data/buildings
https://smapi.io/json/none/e8de3182a78a4493b34e2efc54216edb
Please do me a favor
||add an animal door||
Anyways, good morning, good night,
I would, but I don't have a computer at the moment so I can't
Someone else please do us a favor
Morning, g'night
i mean it has "AnimalDoor": { "X": -1, "Y": -1, "Width": 0, "Height": 0 }, 
why did it do that to me
-1 -1 might be the default value (and value for none I guess?)
now i'm afraid of atra's favor, is that an omen or is it a plea
Both
well now i gotta try it out--
okay not as ominous as i thought, i didn't add a sfx to it but i'm going to assume it just lets me usurp animals inside of the farmhouse
Let me have chickens in my farmhouse
(Cute idea: Farmhouse upgrades replace one of the rooms with a little chicken pen, chicken feed and all and add a side entrance for the chicks)
ok, clearly lighting isn't my thing, I just put in code to hard set the game ambient light to a specific value on every tick and it STILL changes at 8pm
when do animals with double unique frames actually use those frames? (or was i getting unlucky)
hey guys so my lil mod is alomst done and my gf cant live without it now, so my 1 playtester says its an absolute for hitting the mines/caves. But enough self glazing, i ahve an issue where if she quickly swaps between slots, like really quickly, items can disappear
anyone know why or how to prevent such a thing
Hi everyone!
Just uploaded some new mod again) https://www.nexusmods.com/stardewvalley/mods/27938/
Hi @ivory plume, are you accepting PRs for NPC Map Locations? I have discovered that invisible NPCs (like Elliott on his book tour) are still visible on the map but I think I have identified a pretty easy fix.
Yep, PRs are always welcome! I'm mainly focusing on Stardew Valley 1.6.9 currently so it may not happen right away, but I'll review the PR for the next mod update.
Thanks! I've never done a PR before so I apologise if I do anything silly!
No worries! If there's any issue, we can discuss or I can just fix it directly in the PR.
hi, for anyone who's ever made a custom farm cave before: do the mushroom boxes from demetrius spawn in specific tile coordinates?
Haven't made a farm cave but looking at the code, yes
4, 5 6, 5 8, 5
4, 7 6, 7 8, 7
ooo thanks!
is that something that can be overwritten in the json?
Nope
good to know...
what's the best way to make a target ifle for content packs? just listen for the assetrequested event?
and do an exclusive load in there yea
i mean as a c# mod
private static void OnAssetRequested(object? sender, AssetRequestedEventArgs e)
{
if (e.Name.IsEquivalentTo("MyCustomAssetForCPMods"))
{
e.LoadFrom(() => new Dictionary<string, MyCustomAssetForCPMods>(), AssetLoadPriority.Exclusive);
}
}
Load types are still part of C#
i thought u want something for cp mods to edit
ah ty
you may also wish to handle AssetReady (all other mods have finished editing the asset after it was requested) and AssetsInvalidated (some assets, maybe including yours, were invalidated and need to be reloaded)
is it possible to give it a default value even when it's a dictionary? do I just do it in the same place I do the e.LoadFrom() on it?
yea i gave it a empty dictionary
ah so e.LoadFrom(() => this.DefaultDictionary, AssetLoadPriority.Exclusive) will give it default values and let content packs exit it?
yeah you want a new in there
for secret notes i have e.g.
if (e.Name.IsEquivalentTo(NotesAsset)) {
e.LoadFrom(() => new Dictionary<string, SecretModNoteData>(),
AssetLoadPriority.Exclusive);
}```
so where would I fill in the defaults?
var a = new Dictionary
then fill in a
Ichor, does the docstring say something about a new instance?
Pillow, you can also check east scarpe, which loads a default set of data from a json file
i thought so. i remember hearing it somewhere
I recall so too but I'm afk
(maybe from you. memory is unreliable)
i will if i need further clarification
the API reference page doesn't mention always giving a new instance, but every example of LoadFrom uses new https://stardewvalleywiki.com/Modding:Modder_Guide/APIs/Content
how do I call base from a prefix? as in the base class of a class, do I just call it by name?
ah ty
There was a lib I was looking at that would let you embed IL into a method
....never mind I'm wrong that wouldn't work either
I assume I name BaseMethodDummy the name of the method in the base class?
is this correct or is it not supposed to have quotes
We need a thread for complaining about these translators, that darthharlock person uploaded a new mod page for Avi's mod and put a troll ass image on top of the same image they were getting reported for using when they didn't have permission as last time...
Been digging around in the c# files, and I'm not seeing anything that would indicate being able to move crops to a new map via the upgrade.
i'm not sure it can be done
You would have to copy all the info and then put it into the new map using C#
I'm not familliar enough with programming to pull that off alas.
I'll have to put this project on hold.
Translator woes
Could I get a second eye on this SMAPI log, just to make sure I'm not missing anything. I got a report that the interior of the barn and coop weren't loading for my mod, but looking at the SMAPI log, I don't even see where my mod is loaded in their game. the mod in questions is [CP] More Buildings for Cute Valley Pink, and the SMAPI log is below
Log Info: SMAPI 4.0.8 with SDV 1.6.8 build 24119 on Microsoft Windows 11 Pro, with 28 C# mods and 105 content packs.
it doesnt look like your mod is installed
Okay, good to know, that's what I thought, but I wanted to make sure I hadn't just missed it somehow. Thank you!
this would have caused very annoying bugs because the asset pipeline relies on always having clean references.
Take the example of the load and 1 edit in CP with a condition that is currently true, and it mutates the dictionary.
The CP condition then goes false and so CP invalidates the asset and something then loads the asset again.
The load then returns the existing reference, and so the CP changes are still present.
its the hard part of trying to find ways to optimise expensive loads, because it has to be a deep clone of whatever you are caching, and the deep clone half the time is just as expensive as what was being cached
SMAPI docs are also pretty clear that you shouldn't cache anything you provide to an asset loader.
Hello! I was trying to update my mod to 1,6 (https://www.nexusmods.com/stardewvalley/mods/12142), but I got some problem with ProducingAnimation, on 1.5 it work fine, but now anymore, I changed json assets with content patcher, but the same issue is still there, if the BC is not working it show the right texture, but then when I add some stuff inside (https://smapi.io/json/none/33d522c821514c7fb429168f6e16e50c) the texture is wrong (pic)
I'm pretty sure that PFM has no clue where to find the texture, any idea where I need to place them?
(is PFM still used in sdv 1.6 at all? you may want/need to convert your mod to pure CP)
1.8.0
Updating mod to be compatible with Stardew Valley 1.6
I'm using PFM for the animation
I have 4 different texture if the output is wood and 4 if is mushrooms
WoodMaker (idle)
you can do this with vanilla if you want
2-3-4-5 for the wood
6-7-8-9 for mushrooms and 10 for ready, but I have no clue why it's not working anymore, even if PFM doc has changed only for (BC) id
Can it be somewhat that I need to tell to CP for work? Like json assets with ReserveExtraIndexCount?
yeah, it looks doable with CP only: https://stardewvalleywiki.com/Modding:Machines#Audio_.26_visuals
though i forget if u can have different sprite for different output 
Sorry, what did you mean?
you can with the magic of IncrementMachineParentSheetIndex (or loadeffects condition)
The cosmetic effects shown when an item is loaded into the machine (for LoadEffects), or while it's processing the item (for WorkingEffects, based on the WorkingEffectChance probability). ... These consist of a list of models with these fields:
... you can check the input item (Input</samp) or output item (Target).
so you can have a selection of different sprites assigned as animations to your machine based on each different input/output item
simply by editing the Data/Machines asset with your custom machine and rules!
yea to clarify, you can do working animations in content patcher now, because Data/Machines supports having animations
Basically if you want to update to 1.6, your best choice may be to convert your machine to content patcher
It'll be less prone to breaking in the future that way I believe
Oh it's seems pretty useful!
and also much more compatible with other mods that work with machines
i don't see one in the converter list, no
Yeah, it's seems, I'm curious when I'm going to update Domed Garden Pot mods, the PFM file has 11k line👀
It's where I toke the animation for Wood Maker
the fan
and the bottom texture
Thanks you all for help❤️
anyone know why trhis might be going down?
do you have a code sample?
i can send u the entire code if u want
but its when i spam key combos quiickly one after the other that it sometimes YEETS an item
into the void
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
only took a cursory glance, but I don't see anything that would mutate the player inventory in your code. do they have any errors in the console?
if you can replicate this and send a log it could be helpful
!log
Important note: Your computer username may appear in the log. If your username is your full name, please be aware of this before uploading it.
Please share your SMAPI log file. To do so:
- Open this page: smapi.io/log.
- Follow the instructions at the top of the page to upload the log file. (Don't copy & paste from the console window!)
- After uploading, it will show a green box with a URL to share. Post that URL here.
Please do it even if you don't see any errors. This has useful info like what mods and versions you have, what the mods are doing, etc. If the issue didn’t occur in your last session, please load the game to the point where the issue occurs, then upload the log.
NPC pathing sure is weird. I just watched Sebastian get blocked by a clam on the beach, turn around, and walk straight across the ocean and all the way off the map.
he's free
alright ill try to get her to
does smapi's harmony have this stuff
i am trying to get to end of an if block by matching the start of the if block and getting the label to the end
thats dum actually i should just match for end directly 
anyone know if there's a tilepropery that can make something in the map be storage?
like just if you click it it opens as a chest you can use normally?
wanna make that freezer functional if i can
no tile property for storage afaik
This pathfinding logic, ugh... does anyone know how this works? If I'm reading correctly, it seems like NPCController is only used during events and PathFindController is used everywhere else? I'm trying to find the code that handles obstructions but it's eluding me. I even see a check for nonDestructivePathing but the code around it seems to have nothing to do with that (I see nothing that would lead to the question mark emote, or pausing, or clipping, or....)
(re: tile property storage, you could patch in a tile action and have the action open a storage container?)
I am struggling to find the part of the code that says that swimming gives 10 stam per second. I can find swimming, isactuallyswimming, and lots of references to stamina but not that specific happening.
ah ++, good to know
Nothing in vanilla for this. But there might be a mod for it?
I’m a little rusty but I know there was extended storage (some kind of framework for new chest type items)
you'd still need to code the tile action with XS
actually, I think FTM supports placing indestructible objects/furnitures on maps now?
so you can combine XS and FTM to spawn an indestructible freezer on your map
it seems to be in Character.MovePosition
Thanks, yeah, I've found bits and pieces of it scattered freaking everywhere.
It's very confusing. All I know is NPCs behave very oddly when (a) their speed is manipulated and (b) they're blocked. Hoping that maybe fixing the delay intervals will fix that issue, but maybe not.
There also seems to be some equivalence of speed 2 with "stopped" which I can't grok yet.
eh i will prob just skip that, don't wanna make a lot of required mods for this, just a PIF room
thanks tho
if you make it passable the player can put their own fridge back there
i think Esca's Map Properties allows for custom fridge tiles in a map?
Movement code is a llllliittle haunted yeah
possibly
Grrr, why do characters just decide to sprint in the opposite direction? This is totally wack.
The speed is accurate. The timers are now accurate after the other patches I just did. But about half the time, characters start running in the other direction (and across the ocean or any other obstacles) after the blocked timer is up.
I think the clipping must be because of isCharging, maybe it bypasses collision checks. But the direction makes. no. sense.
maybe i'll do versions with and without or something
isCharging is the state NPCs get into when you block them for five seconds or whatever it is, and they move faster and ignore obstacles to get where their schedule demands they go
(meaning, you're right, isCharging skips collision)
alternatively.... megafridge https://i.imgur.com/GNy2kvD.png
is this a custom farm building? you can have preplaced bigcraftables in that case
you can maybe even do a conditional appearance patch for the chest
oh yeah I forgot you mentioned PIF earlier. in that case hmm idk
yeah looks like you can tell it to set initial items, and enable mini fridges to be placed
so maaaaybe i could set a bunch of fridges there and do an appearance patch? not sure
This is Stardew's pathing without any of the mod changes. Just straight up vanilla behavior. smh.
Well, putting in some logging, part of the problem seems to be that there is one stray call to SetMovingRight, so even though there are many calls to SetMovingLeft afterward, they'll just keep moving right because for some bizarre reason those states are tracked separately and right has priority over left.
Oh yeah that sounds plausible
I feel like "yeets off screen to the right" is a common report
Unfortunately tells me nothing about why SetMovingRight happened in the first place. Some weird stuff going on with bounding boxes.
I have this theory that CA got it working well enough and then was like "this fucking code, I'm calling it a day and coming back later to fight it again" and then got absorbed in something else
I could totally see that happening.
this theory of mine is based on personal experiences 😛
What's "interesting" is that even setMovingInFacingDirection doesn't try to prevent movement in the opposite direction.
There aren't a lot of calls to the setMoving methods though. Aside from the facing direction, there's just the pathfind:
if (bbox.Left < targetTile.Left && bbox.Right < targetTile.Right)
{
this.character.SetMovingRight(b: true);
}
So... either the target tile is wrong, or the bounding box is wrong.
(I've definitely done this for more complex AI behaviors. Sometimes get into a state of "this apparently emergent behavior is actually pretty cool, and if I fix the glaring bug that caused me to investigate, I don't know how to recreate the cool thing on purpose".)
I wonder how many things I would break if I just patch that method to do what it seems like it's logically supposed to do... maybe NPCs would go into infinite loops of flipping direction every frame.
I think I actually have an idea what's going on. The clam is almost directly north or maybe exactly north of the entrance to Willy's shop, so the NPC overshoots just slightly in order to get past the clam, and then decides she should turn right.
She still has like, 25 tiles down to go, but decides it's more important to turn around and go back to where she was 1 frame ago.
I'm seriously wondering if I can fix this without rewriting the pathfinding code. Maybe I can Harmony-patch in a bug fix that says "no, please do not literally reverse direction when you can still cover distance at a 90° angle".
What would be the consequences of making path finding treat forage as impassable
It already does... that's why they're stuck.
I think chu meant just make the pathfinder path around all forage and placed objects
of course that would cause problems if 3 apples spawn in a box formation outside a door
I'm not sure if the pathfinder even understands the concept of "path around".
There's probably something in there somewhere, but I think I'll try the lighter weight patch first.
Question: is it possible to run changeIntoSwimsuit and changeOutOfSwimsuit in the same tile, but toggled to only do one or the other based on whether or not you are in the swimsuit?
Or am I better off just using the two doors of the resort building to have one be change into and one be change out of?
you could probably create your own tileaction for that buf afaik thats not possible in vanilla
I think it's more "vanilla" to have 2 tiles
it'd be difficult since the player could step onto the tile, change, and return the way they came but in the wrong outfit
not sure how youd prevent people touching the tile to wear swimwear and then just going the exact opposite way either
I mean it would probably work if you put a change out of swimsuit just in case players do that
i suppose it could be combined with the jump-into-pool tile touchaction, where you add the swimwear on enter and remove it on exit
since it forces you to move through the tile on touch
you'd then have the player not in swimwear until they're in the pool tho
You can kinda overlap them a little but it's extremely touchy.
usually people just place two tiles on each side of a hallway (maybe even next to each other) so the player always emerge one side clothed and the other side in swimwear
top is change out of, middle is change into, bottom is pool entry, but if your map making skills are better than mine you can hide it so the player doesn't tell the difference.
on the bathhouse map it does this (minus pool entry) but it has the changing room block over it
I could get them to overlap by about half but if I ran too fast it stopped working correctly.
Yeah, I don't really like the idea of leaving them open like that, which makes it more difficult vertically. One of my multiplayer partners pointed out that if you change the tiles too fast the farmer becomes topless for a second which is... Not ideal.
So I definitely want them behind a wall when it triggers
I'll figure something out later with the divider in the building, I guess
Help! If I want to store some information, like text input by player, should I save it directly into the game's save?
you've got a few options - you can save directly to the player's save file (good for persistent data), to the player themself (good for small contextual data), or make your own file to save to (good for lengthy data)
https://stardewvalleywiki.com/Modding:Modder_Guide/APIs/Data
very clear! thx
Hey could someone send me the tutorial on adding custom locations and the json for it? i seemed to have lost it..
I don't know of any tutorials, if you're talking about the actual CustomLocations field then you should actually be using Data/Locations instead
https://stardewvalleywiki.com/Modding:Location_data#Data_format
I also don't know of any tutorials but here's my json for adding a location #making-mods-general message
I hate discord's redirect links
If you haven't actually been near the target location in a bit it'll fail to take you there the first time
Yeah I sometimes can never get to the message and I have to give up
hi guys, what does this error mean?
To fix this error either change the JSON to a JSON object (e.g. {"name":"value"}) or change the deserialized type to an array or a type that implements a collection interface (e.g. ICollection, IList) like List<T> that can be deserialized from a JSON array. JsonArrayAttribute can also be added to the type to force it to deserialize from a JSON array.
Path ''..```
i'm trying to edit the fish spawns in my custom map. there are no errors in the code formatting, so idk why this happens
!json probably wrong brackets, easier to see with the code
JSON is a standard format for machine-readable text files that's used by Stardew Valley mods.
If you need help with a JSON file, you can upload it to smapi.io/json to see automatic validation and share the link here.
When making mods, it's recommended to edit your files in a text editor with JSON support, such as VS Code, Notepad++, or Sublime Text. These programs will check for syntax errors.
checked with this... i copy pasted it directly from locations/data though. how could it be wrong?
Share the link to that page
Though based on that, could be wrong because the formatting of the data assets is not one for one with the way a CP mod has to be formatted
The data assets are the end result, whereas CP has to be a specifically formatted dictionary of changes you want to make to those assets
https://github.com/Pathoschild/StardewMods/blob/develop/ContentPatcher/docs/author-guide/action-editdata.md
https://stardewvalleywiki.com/Modding:Location_data#Data_format
I have to run, someone else might be able to help more but I'll be back in about an hour otherwise
i'm not sure about how it needs to be formatted for CP, but the area names on lines 103 and 144 seem like they would be a problem
i wrote the same thing like another mod's content.json that also replaced fish spawns and added fishareas....
i'd try removing them to test if it makes it work
just the area names?
sorry im just confused why mine is experiencing problems and the mod i referenced didn't
is it because of the farm type im replacing? (beach)
the "ForestRiver": and "Ocean": parts
might be that the mod is targeting different section in the location data i guess
since the FishAreas field has keys like that
I might be looking at this wrong but what I'm seeing is that from line 188 onwards you've got a bunch of stuff that's in the wrong place. FishAreas entries need keys, which you've got for lines 103 and 144 but then not afterwards.
But I think I'm saying the opposite of what Kristian is and I don't have the locations asset handy to check.
yep, but it's a patch to Fish instead of FishAreas
some entries have a id key, but some don't
like, some are "ocean":{stuff} but some are just {stuff}
Oh you're right Kristian I read that section several times and thought it said FishAreas every time
{
"Action": "EditData",
"Target": "Data/Locations",
"TargetField": [
"Default",
"Fish"
],
"Entries": {
"Lumisteria.MtVapius_Trash_BrokenBottle": {
"Chance": 1.0,
"MinFishingLevel": 0,
"MinDistanceFromShore": 0,
"MaxDistanceFromShore": -1,
"Precedence": 500,
"Condition": "ANY \"LOCATION_CONTEXT Target Lumisteria_MtVapius_Main\" \"LOCATION_CONTEXT Target Lumisteria_MtVapius_Forest\" ",
"Id": "Lumisteria.MtVapius_Trash_BrokenBottle",
"ItemId": "(O)Lumisteria.MtVapius_Trash_BrokenBottle",
}
}
},```
Is how i add a fish to a specific location, with the key "Lumisteria.MtVapius_Trash_BrokenBottle": prefacing the entry
you seems to mistake the kind of fishing ponds to keys
if you want your fishes to be added to one of the area you need to use :
"FishAreaId": "Ocean",
not make the id "ocean" (which wouldn't work since you want to add several)
(it's why the two first don't give an error, because they are prefaced by a (wrongly named, but the game can't guess that) key (that will not do what you want it to do by the way)
(apparently i don't understand how TargetField works)
in what way?
i target "default" because it's an actual entry, and the target field on the example should work either since Farm_Beach exists too (and has a "fish" entry)
basically in this kind of "list" every thing in the list has an id
ex
"Id": "(F)2421",
and it's what is used usually as key to ADD to the list
"Lumisteria.MtVapius_Trash_BrokenBottle": {
Here
if you just had :
{
"Chance": 1.0,
"MinFishingLevel": 0,
"MinDistanceFromShore": 0,
"MaxDistanceFromShore": -1,
"Precedence": 500,
"Condition": "ANY \"LOCATION_CONTEXT Target Lumisteria_MtVapius_Main\" \"LOCATION_CONTEXT Target Lumisteria_MtVapius_Forest\" ",
"Id": "Lumisteria.MtVapius_Trash_BrokenBottle",
"ItemId": "(O)Lumisteria.MtVapius_Trash_BrokenBottle",
}```
The formatting wouldn't work, because it needs this key thing
why, well, i can't explain 😄
it expects a certain format (which is pretty common on the new data model)
i mean, i explained what you needed to do so you need to reread discussion at your own rythm 🙂
but no
i have to go but feel free to ask questions about what was said means if you don't understand it 🙂 others may be able to explain it
Farm_Beach also already has an Ocean entry in its FishAreas so you don't have to include it
Seeing as how it doesn't look like you're changing anything on it
The reason the format needs a key is a bit technical, it's because the data type is a dictionary, which is a collection of <key, value> pairs
(well, Fish isnt a dictionary, but Entries from Content Patcher is)
Oh right, Fish itself would just be a list of models
The way that you make edits with CP is generally a lot of dictionaries (one for each block basically)
Again, really technical, way easier to just accept "it's that way because it has to be that way'
its just a matter of remembering that you arent adding things to the game directly, you're giving them to Content Patcher first, so you need to follow Content Patcher's data model. Content Patcher's Entries data model is just a dictionary of key value pairs, where you give it a key and the value is a data model from the game
so all entries need keys, bc you're creating a content patcher data model with a vanilla data model inside it
rather than creating directly the vanilla model
Hm, another field in this data that's not on the wiki No longer
anyone kno whats with this extra scarecrow from the craftables png? im changing up all the scarecrows for my mod so i been looking them up on the wiki and this one doesnt seem to be on the scarecrow list just wondering where it comes from in game so i kno what to do with it for my mod
Has someone made a more scarecrows mod yet
And if so, have they discovered they can make one glow
See a lot of retextures. Do you just mean with the IsLamp field?
Super bright farm: set every big craftable's IsLamp to true
I seen a lot of reskins but not additional
Which makes me sad cause I like the originals but want moar
most people just make AT packs
ah thank you
is it still a thing that scarecrows only work if their name contains "arecrow", or did it get moved to data? i'm feeling too lazy to check the code
I want my scarecrow to be seasonal
No it's a context tag now
hooray
I want my scarecrow to be a machine
I want my scarecrow to glow
Is this too much to ask
normally i would say i want a haunted scarecrow that moves and changes its appearance (menacingly), but i'm pretty sure the mannequins do that
Fun fact
If you start the internal name of a bigcraftable with "Seasonal"
And it has a sprite index that is a multiple of 4
It will automatically increment them by season for you
Including respecting the GI hot girl summer
nothing like breaking your mod by forgetting a comma -o-
something weird. my modified buffs icons are no longer showing up and idk why. i think i just have the BuffsIcons.png in the TerrainFeatures folder and the bit on the json looks right. is there another place where there's buff icons? i was thinking somewhere in loosesprites but i didnt see it.
You mean TileSheets? That's all I see referenced in the code
This was a very helpful explanation for me, thank you
Huh, why is there a BuffsIcons in TerrainFeatures lol
Far as I can tell, it's not used anywhere
its like that in vanilla..
I see that, it's just not being used
ah i see the one in tilesheets. ima check my json
okay yeah i see what happened
i have the unused one written for the mod so i will just switch that and it should fix it
it is
i have both but i will just delete the unused one
it does get tricky with all these unused assets sometimes
I wonder if that one will get the axe before 1.6.9 releases
buildingPlacementTiles got removed recently
updates scare me lol. just dreading for things in my mod to get broken >_<
but yeah that fixed it
I just removed that in the upcoming Stardew Valley 1.6.9. Let me know if you notice any others that are unused!
how does one load a content asset inside a prefix, if they have to be static and Helper isn't?
you will have to cache the asset to a static variable
Store a static reference to your Mod entry class (or anything else), or use Game1.content which is already static.
ah, game1.content works, ty!
how come this places nothing? I assume the dummy method doesnt work but I'm not sure why
[HarmonyReversePatch]
[HarmonyPatch(typeof(GameLocation), nameof(GameLocation.setObject))]
[MethodImpl(MethodImplOptions.NoInlining)]
static string setObjectDummy(StardewValley.Locations.FarmCave instance, Vector2 v, SObject o) => null;
internal static bool SetUpMushroomHouse_Prefix(StardewValley.Locations.FarmCave __instance)
{
try
{
IDictionary<string, bool> positions = Game1.content.Load<IDictionary<string, bool>>($"Mods/{ModEntry.UniqueID}/Boxes");
foreach (KeyValuePair<string, bool> entry in positions)
{
// Continue if disabled
if (entry.Value != true) continue;
int[] numbers = entry.Key.Split(',').Select(int.Parse).ToArray();
// Confirm the correct length
if (numbers.Length != 2)
{
_monitor.Log($"Invalid mushroom box location {entry.Key}. Will not spawn.", LogLevel.Warn);
}
SObject mushroomBox = ItemRegistry.Create<SObject>("(BC)128");
mushroomBox.fragility.Value = 2;
// The first (0th) element is the y, and the second (1st) element is the x.
_monitor.Log($"Setting mushroom box at {numbers[1]}, {numbers[0]}", LogLevel.Info);
setObjectDummy(__instance, new Vector2(numbers[1], numbers[0]), mushroomBox);
}
setObjectDummy(__instance, new Vector2(10f, 5f), ItemRegistry.Create<SObject>("(BC)Dehydrator"));
return false;
}
catch (Exception ex)
{
_monitor.Log($"Failed in {nameof(SetUpMushroomHouse_Prefix)}:\n{ex}", LogLevel.Error);
return true;
}
}
setUpMushroomHouse is just a public void
(I looked at it yesterday to marvel in its hardcoded-ness)
Why are you doing this
nope
public void setObject(Vector2 v, Object o)
public void setUpMushroomHouse()
to unhardcode the positions
You can't override a non virtual method
are you talking about setobject or setupmushroomhouse
You do the reverse patch BS if it is possible for the method to be overridden
SetObject
why do you need to change setObject at all if you're already prefix-falsing setUpMushroomHouse?
I don't need to change it, but I was following https://harmony.pardeike.net/articles/patching-edgecases.html#calling-base-methods
you can just do __instance.setObject
does anyone know where I can find the dialogue for characters in unpacked content? I just need a reference (please ping me btw)
ive yet to personally run into a situation where calling it on the __instance has mattered
No
Decompiler artifact
I guarantee you they didn't write that
Characters/Dialogue
yeah that layout was changed in the 1.6 update so now im lost, the character folder is just the sprites now. (I think)
ahhh
theres a Dialogue folder in the Characters folder
schedules are in there too
God im so dumb, thank you
Have you got your whole game content unpacked or are you unpacking individual files?
its all unpacked, I just didnt look enough 
It can be easy to get lost in there sometimes lol
!!! it works !!! https://pillow.is-a-cutie.xyz/ILGktVn2zO
say i know you already made custom asset for this
but maybe it can just be map tile properties
it could have been, yes
but this is also me learning how to do this and it doesnt reallyyy harm anyone
nexus. I am publishing the mod, obviously it doesnt exist yet
"all changes have been saved"
immediately reverts my header
Nexus do gewd jawb
anyone kno some quick code to where i can edit the shadow colors from buildings to be grey scale rather than pink?
I think you can find the shadow in cursors? 
ah. i will take a look rq
can you really not delete a file before publishing the mod??
is it this?
Does it specifically say you can't delete the file or is it just not going away?
you can't really delete files anyway
i've just not got an option to delete it
Oh you can archive it
It is kind of funny that you can't delete a file on a mod that hasn't been published yet
ah yes that was it. ty
But I guess they probably don't differentiate between not published at all and temporarily unpublished for editing
Yup I had to archive mine instead of deleting it when it was unpublished
released a hopefully useful thing! https://www.nexusmods.com/stardewvalley/mods/27985/?tab=files
i feel this rn
for the different wine flavors, the various colors are code based yeah? i take it since the grey bit. im wondering how i can code a spesfic color for one wine type
is it new ingredient
you can change the input item's color context tag
well i changed the ancient fruit color so id like the wine to match
that'd change it for every artisan goods
For example ancient fruit has color_cyan, you can change it to something else
Tbh I wish the starfruit artisan goods were less
yeah i just want to make it match my ancient fruit color
Yellow
i turned mine silver
How could I create a mod that makes all caves darker (like floors 31-39)
I was playing with the idea of modifying my farm cave some more and this opens up some options, thank you!
I can't figure out why sprites only updates after the game resets instead of after saving the GMCM options
private void OnGameLaunched(object sender, GameLaunchedEventArgs e)
{
var configMenuApi =
_helper.ModRegistry.GetApi<IGenericModConfigMenuApi>("spacechase0.GenericModConfigMenu");
if (configMenuApi is null)
{
_monitor.Log(I18n.DisabledGmcm(), LogLevel.Info);
return;
}
configMenuApi.Register
(
mod: _modManifest,
reset: () => _config = new ModConfig(),
save: CommitConfig,
titleScreenOnly: false
);
configMenuApi.AddBoolOption
(
mod: _modManifest,
name: () => I18n.TitleSimplyShirtless(),
tooltip: () => I18n.TooltipSimplyShirtless(),
getValue: () => _config.ModToggle,
setValue: value => _config.ModToggle = value
);
configMenuApi.AddTextOption
(
mod: _modManifest,
name: () => I18n.TitleSprite(),
tooltip: () => I18n.TooltipSprite(),
getValue: () => _config.Sprite.ToString(),
setValue: value => _config.Sprite = int.Parse(value),
allowedValues: new[] { "0", "1" },
formatAllowedValue: value => FormatAllowedValues(value)
);
}
private void CommitConfig()
{
_helper.WriteConfig(_config);
_helper.GameContent.InvalidateCache("Characters/Farmer/farmer_base");
}```
you were the reason i did it 
I'm blushing.
now I have to redo the farm cave to use it
(and to make the swimsuit change area make sense)
(and to make the whole thing more thematic to my other mod in development)
Oops, i'm pretty sure i'm reading the config file only once. I need to use Helper.ReadConfig<ModConfig>()
How would i make a dialogue replacement moD?
Im thinking of making a custommod for my family
!startmodding check out the Content Patcher info in here
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.
short version: you write your new dialogues, and write some instructions for Content Patcher to make those changes to the game data when it runs
The wiki for Dialogue was so helpful for me when I made my first dialogue mod honestly 
Does the game not check for updates on the farmer texture? I'm trying to load two custom farmer_base and choosing one with GMCM but AssetRequested stops triggering for the farmer_base after a save is loaded apparently
did you invalidate the asset
I did
need to make sure FarmerRenderer.farmerTextureManager gets the updates
personally i wouldnt mind too much if this is a main menu only config
Well this took longer than I expected
Current solution is to make my own item query resolver for the purpose of building my own shop items
Tried to patch the resolver used to build the shop currently but I guess you can't patch IEnumerables
I wonder if I can just register my own query over the current one lol
I'm more leaning towards my current solution though, while it does mean having to build back the shop entirely it also means more granular control over every entry
(you cannot register over a query that already exists)
Ah well, decision made then lol
what do you mean about patching ienumerables though?
I dunno, when I tried it told me the type was not void or bool
What exactly were you trying to patch?
the patch needs to be void or bool but if its a postfix you can get the ienumerable it returns with just __result right?
This monstrosity from ItemQueryResolver
Hm, I was trying to prefix it and just add the OverrideTradeItemId and OverrideTradeItemAmount, didn't really consider postfixing it
The way these ItemQueryResults are structured really bothers me for some reason, hard to determine what the hell it's doing at a glance
you'd still use __result for that with prefixes too, the return type of your patch itself would still be void or bool
in this case bool
I see I was going about it entirely wrong lol
too long in transpilerland
I guess I'll give that a try again, because rebuilding the shop doesn't sound fun
<-- me after my fourth attempt to wrap an instruction with a try/finally via transpiler
And also thinking about it, being able to do more with these entries would actually probably introduce some issues since it needs to open the naming menu immediately and I dunno what you can fuck up by making it so you can buy multiple pets at once
Maybe nothing, maybe everything
(the item glitch?) @sleek flint (Chester)
Cat pfp detected. What's it's name?
would u need to patch enumerator move next in this situation
The like 3 minute lag where my brain refuses to pfp == profile picture
its not an enumerator function, its just returning an enumerable
why not just return a new one with ref
item queries just return a list of items (wrapped with ItemQueryResult)
oh i see 
I mean, if I had to pick just one reason, it's because I have no clue what I'm doing 
im not wholly sure what you're doin already but adding to/changing the result is what i meant with the pre/postfix thing
Yeah, I'm gonna try a postfix because I like those the most
(I sent roku on a hole to dehardcode marnie's monopoly)
postfix gang
The real struggle is going to be trying to figure out what I can do about her dumb farm animal adoption crap
You may have better luck just reimplementing the animal menu
just write your own menu ez
Yeah, that's what I was thinking too lmao

Start my own menu with blackjack
what are you trying to do with the animal adoption?
or use the shop one and do whatever the game's doing with the PET_LICENSE pseudoitem
the animal menu is kind of charming tho
I guess my two biggest goals with the animal menu would be unlinking it from being a Marnie only thing and making it so you can do it from and return to anywhere
But also being able to do the trade item thing would be neat
if you reuse the shop interface that's handled for you
Does the animal menu scale up when you add too many things to it?
I know shops do, which is really appealing
admittedly im with chu on this one with the animal menu
Oh okay, so I guess it's at least not hopeless lol
the pet_adoption thing makes specifically PetLicense objects which i guess you could maybe make a custom one for AnimalLicenses?
yes that's what I'm thinking as the simplest solution
Stupid questions time
and the PetLicense objects have custom functionality for on purchase
im not sure what you're referring to here
Oh, I don't have to patch this, I can just make my own method that returns the same crap but with the overrides I want
Literally basically what I've already done with two extra things, so it'll do the same thing as the current method
if you don't patch the original PET_ADOPTION then you have to exclude breeds that are already accounted for by it
and also wont be able to change the trade items for those either
I was just gonna replace the original shop Items entry with mine
But for mine I need to create an override asset that people will have to write to if they want to have trade items basically
Since pet breeds only have a gold price and not a trade item field
pet data has custom fields if you're willing to do string stuff
i think atra means u can bypass Register and put your own delegate over QueryTypeLookup["PET_ADOPTION"]?
I had considered that, but I'm not in love with that method
need reflection ofc
Depending on how many breeds you have for a pet, that string could get really wild
PetData has CustomFields, but PetBreed does not, so be careful there if you try it
you'd need to define the overrides in the pet itself
separate from the adoption info
"OverrideItemForBreed.BreedId.1": "(O)Stone"
"OverrideItemCountForBreed.BreedId.1": "10"
if you really, really dont want a custom asset 🙃
increment number for extra items
Damn, I'm dumb as hell, I was thinking just one really long string lmao
Thanks, I'll have to weigh these choices I guess
shame its not one of the rare string to object customfields
I think the only occurence of that is in ItemQueryContext, and it's not a data field
PowersData

works as you'd expect if you read the customfields as a JObject with newtonsoft
(triggeractioncontext and gamestatequerycontex are also object customfields but those arent accessible with CP either obv)
((theyre barely accessible through normal C# means too))
Could you elaborate pretty pls
every time I see a CheckConditions that passes in individual fields instead of a preconstructed context object I cri erytime
i'm still stumped
i send individual fields in checkconditions but in my defense its much easier to do that in a transpiler
than construct a gamestatequerycontext
now how would I transpile your mod code to add extra data to the context object
this is what i mean by barely accessible bc my first question is why bc i cannot think of a single reason why you'd ever want to, ever
but if you did, it would probably be easier to prefix the trigger action delegate itself
to add the customfields before i ran the trigger
or query. whatever
alternatively you can transpile my transpiler and NOP all my instructions or branch past them and write your own that construct a GSQContext
but have fun constructing a string object dictionary with IL
if you really wanna get fucky with it you can prefix false not my transpiler but the patch i send to harmony to transpile for me
the world is your oyster selph! go wild! i will close all your bug reports you open on my mod page
I appreciate the concerning amount of brainstorming for a joke idea that I'd never do
those are my favourite things to brainstorm about
more fun brainstorming: all that work i mentioned above is also unnecessary. just call harmony.Unpatch on my transpiler on that function specifically then patch it yourself. Harmony just lets you do this, to anyone
probably wouldve been helpful for roku unpatching that DTZ prefix
i reiterate, harmony is scary
if you want to really just fuck up everyone you can just do harmony.UnpatchAll and it will remove every patch on every method ever from anyone
the MAD method of ensuring your code works
New evil mod idea: Stardew Performance Enhancements and all it does is unpatch all other mod
it might even make it to the title screen
would that unpatch smapi
.....
does SMAPI do any harmony patching?
Not currently
It does have a few
we love to see a 2+ year old TemporaryHacks file
Bold of Pathos to name an entire directory TemporaryHacks
That folder will still exist centuries from now, I expect
Lol
You should see the message he prints when you disable the minihotfix
And have harmony mods installed
truly the console log equivalent of the melting chocolate gorilla meme
God damnit, why didn't I think of that lol
tbf i was in that conversation i think and i forgot about it too
Hindsight 2020
Oh well, I'm sure I'll restructure that mod again in 1.6.9
Oh right I might have to wait on helping tea do furniture framework if Leroy is still having issue 


)