#making-mods-general
1 messages · Page 293 of 1
okay hello !! im done fully clearing out any ai in the code.. the issue of NPC not accepting any gifts is still present,, it doesn't react at all at any item i give to him nor does the log show anything about any errors,, where should i start?
Share your content.json
and you can share it using this: https://smapi.io/json/none
To close the loop: yeeting the unique properties for Maru's sprite and portrait in the map and using the commands in the event to change those got rid of the warning. Thanks all! 
There's no gift data in this file or any Include patch for gift data.
Unrelated to the gifts, but "RepeatEvents" is not a thing in Content Patcher as far as I know.
i have no idea what that is,, and the code isn't mine,, so maybe the author wrote it there as a mistake??
Since this is someone's published NPC mod that you want to translate, maybe use the i18n-fier?
i somehow managed to translate the lines from the dialogue file without messing things up, honestly the fact it still works is a blessing,,,,,,,,,, oh and i opened that but....... theres nothing expect one file that has the character's name
so this is why it wouldn't react at all to anything,,,,,,, how can i add it?
I'm confused at what you're trying to do..
Gift the NPC gift tastes
Hello, had a dumb mod idea I needed to manifest. Still on a modding hiatus, just felt the need to get this out there.
There's a bunch of examples of new item names in the description.
Enjoy your hiatus, casey, I may have some questions about spacecore guidebooks when you officially come back in the future ❤️
forgive me!! i'm facing a problem where the NPC refuses to take any gifts,
Follow this tutorial (ignore the bit about the Include, just put the EditData patch straight into your content.json) https://stardewmodding.wiki.gg/wiki/Tutorial:_Making_a_Custom_NPC#Gift_Tastes
Wow, none of you nerds have downloaded it yet and it's been a whole five minutes, I'm hurt
(/s, of course)
I haven't even finished reading the description yet lol
silly content patcher question
how do I negate "When": { "HasFlag": "XYZ" }
mod should be called Alto clarinet Volley
I considered autocorrecting valley for the mod name
But I feel like having Autocorrect in the name is, alas, important for searchability
Because I'm sure most of the modding community will be actively seeking this mod out to install in all their games
"When": {"HasProfession |contains=Blacksmith": "false",}
I also considered having it run on literally all user-facing text in the game, but I figured that would be slow even with vanilla, but especially with heavily modded installs
Because again, most people will want this in a completely serious manner for their playthroughs
thank you!
piglatin language option
Clearly you need to just harmony patch DrawString
And if I did that I'd probably want to have a separate autocorrect with just names for NPCs... (custom dictionaries are usable with the library I used)
i'myay obinray , ethay ocallay arpentercay . ayormay ewislay entsay emay erehay otay etchfay ouyay andyay owshay ouyay ethay ayway otay ouryay ewnay omehay . e'shay erethay ightray ownay , idyingtay ingsthay upyay orfay ouryay arrivalyay .
Wow some of those item names are inspired.
Ah yes, because this mod doesn't have bad performance implications already. I'm sure autocorrecting every string drawn every frame would help the game run super fast. (Caching, what's that?)
Exactly
There are many more I didn't show of course. 😂 And that's not counting modded!
I think one of my favorite is all "egg" items not even being super corrupted, they just become "eggo" items
Wounder Eggo!
Item name words are autocorrected individually, not all together, so a word in multiple items will always correct to the same thing.
I guess in theory you could learn all the item names and their associated items that way.
Though with how it works the item names aren't necessarily unique, I'm pretty sure I saw something besides Catfish that was also turned into raffish
Shoutout to dinosaur being translated as minotaur.
You heard that right, minotaurs are canonically dinosaurs now
Ah, but if you looked at the item names listed on the mod page, you'd know that fried eggs are the One True Eggo (well, "trued eggo", same thing)
When I saw strange bun became estrange idun, I wished it ended up as estrogen instead, so I could make a bunch of estrogen buns
(Technically estrogen isn't in the dictionary apparently, but oestrogen is)
I adore that Elvish Jewelry became "oldish revelry".
Also shoutout to emeralds for becoming personified. Good job, jerald
I honestly have no clue why that is in the dictionary
oestrogen is British English
I'm sure many people who just see the mod name and item list would say "what the heck, that's the worst autocorrect ever"... that's literally the point, please read the description
Oh I should showcase the post
There, now the #modded-stardew people can suffer enjoy it too
I think...that I must get this mod so I can show my wife. She will be enraptured.
She will make me show her every single item in the game 
And since it supports modded items, there's endless content. If you want more, just install more mods!
But will refuse to play it herself in favour of me sitting there hovering over every item in CJB Spawner one at a time for the rest of my life.
The mod is 350 lines long, for the curious
What have you done to me Casey?>!!?! 
Don't tell her there's a config option to make it semi-hinged, or you'll have to suffer twice as long.
Or, alternatively, switch it to semi-hinged and show her. Then tell her there's an unhinged mode and see how much more she enjoys those versions instead
I didn't even look at semi-hinged mode, I wonder how boring it is
For all I know it's completely broken and will not work or crash your game. I don't think that's the case since it's the same code but with FirstOrDefault instead of LastOrDefault, but who knows
I will examine its hingedness and report back.
Ermmm the config menu for it does not work lol. I click on "Autocorrect Valley" in GMCM and get nothing but this pretty red error.
Oh no, Casey forgot the i18n initialisation that I've NEVER FORGOTTEN MYSELF BEFORE.
I would never.
Huh. Well, it has been literally months since I even opened Visual Studio
Every single time I've used those in a C# mod I forget that thing first time. 
I've forgotten it before but I usually catch before release since it usually isn't used just for config menu 😛
Huh, it's not easy to see the allowed values in a config.json for a C# mod.
Okay, 1.0.1 uploaded with that fixed (untested, of course, who do you think I am?).
For the record, the other option is SemiHinged
Assuming my memory is correct for how it treats enums
Do de doo waiting on Nexus virus scanning...
Finally
It appears to be the exact same amount of hingedness.
what are your favs

Any UI mod author came across this error when patching Unlockable Bundles?
Can't apply image patch "Vintage Interface v2 - 1.6 fix > EditImage UnlockableBundles/UI/BundleOverviewIcon" to UnlockableBundles/UI/BundleOverviewIcon: target area (X:0, Y:0, Width:61, Height:56) extends past the right edge of the image (Width:60), which isn't allowed. Patches can only extend the tilesheet downwards.
I'm very confused, cause both assets are the exact same size (61x56) and I can't replicate it (2 users reported it so far).
My only idea for a probable cause is that maybe they manually replaced the original asset for something smaller before 
possible, UB just loads the pngs as is without checking sizes
finally figured out this linux stardew modding thing.
The only thing I have picked up about Linux Stardew modding is "assume you need exact matching capitalization for assets every time"
Very nice magical floating ball of light ❤️
wisp attraction mechanic
just is all lower case ez
it attracts wisps
Hi guys. Anyone mind answering a question I have about flipping individual tiles? How does the game recognize flipped tiles on a vanilla tilesheet? Can you just flip a grass tile for more variation, no issue, or is that not how it works?
as long as you use tmx, yep flip away
it’s saved in the tmx which i believe you can find somewhere when you open it in notepad++ (or wherever) if you really care. the only issue might be that lighting can look weird depending
rotate works too
Ok, thanks! I'm happy to hear that, because I'm so annoyed with only having one corner tile to use when making forest canopies.
Now I have 2
Oh, is rotating different from flipping?
(Sorry if that's a really basic question)
er, are you asking me about maths here
Hello !! thank you so much for the tutorial earlier !! but im currently facing a problem wherer smapi log is " ignoring the file" because it doesn't have a target field,,
in tiled there's these 4 buttons u can use them
oh
as long as you don't save as tbin
Four fold symmetry lecture, go!
noooo
It worked! I can't believe it was that simple... I guess I didn't really poke around the tools much when starting, because I had to search around a bit before I found the buttons to do so. Thanks! I do wonder though, is there any real difference between using that tool and flipping?
The Target field is the thing you are attempting to replace
forgive me,,, im new to coding and all,, could you elaborate?
Imagine an object reflected in a mirror. That's flipping. Imagine picking up an object and turning it. That's rotating.
If this is still for the Gift Taste issue, then the line of code in your patch would be "Target": "Data/NPCGiftTastes",
From the second code block in the guide you were linked to earlier.
Basically, NPCGiftTastes.json is the base game file that the game uses to store all gift tastes for NPCs, and it's inside the game's Data folder under the Contents
So the path is Data/NPCGiftTastes
And you leave off the .json file extension when defining a Target in your code
For images of a certain type, it's CAN be the same results, but something with other types of symmetry... like if you imagine an image of a person, you can't rotate the person in a 2D plane and get the same result as mirroring them left/right.
Yes that makes sense, I'm just wondering if there is a better one to use or if they are completely interchangeable. Rotation is useful for more, because you have more options to rotate, but my confusion came from the fact that I simply wanted to mirror an object, and it seems both options can do that just fine.
but i believe i already placed this code line in there,, that's why im slightly confused about it
It just depends on what you need. If you need it mirrored, use mirror.
Ok, so should I mirror the object just I rotated to get what appears to be the same result?
!json could you please put your code in the JSON checker here and share the link?
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.
If you already did it, no. Mirror or rotate, neither is BETTER, it's just whatever gets you the results you want
Ok, sorry for overcomplicating the question. I understand it
The 'DayEvent' token makes something work only on the day of a specific event. Is there a token that makes something work only during the event, not the whole day? I want an asset to load only while the event is happening
there's IS_EVENT
i've never used it though
if you meant event as in the cutscene-like things. if you meant the day of a festival that's different
Ah, I meant festival days—my bad! English isn’t my first language lol
you're good! i think many people mix up festival vs. event vs. cutscene. anyway, i think IS_EVENT should still work for you, since festivals are technically complicated events, but i've never modded a festival before, so i don't have more information, sorry
trying to decide if making crops on specific maps (Greenhouse/ginger island) have different growth/regrowth times if "out of season" (i.e cant grow at all out on the main farm) is even a thing that can be done, or is little more than my own unhinged musings [that nobody else wants or asked for even if its doable].
totally not getting cursed mod ideas over here with my miniscule amount of experience.
Thanks for the info! I wanted to know more about this because I'm editing some farmer sprites for a few festivals, and I want them to load only during the festivals. For now, I'm using 'DayEvent', but I'm not happy with it
Yeah IS_EVENT is what you want: https://stardewvalleywiki.com/Modding:Game_state_queries#Events
Wait it's for a costume? A lot of mods do that for Spirit's eve
i believe having variable crop growth times is something that requires C#? that sounds cool though
"ID": "{{ModId}}_SheriffBill_SpiritsEve", "Condition": "EVENT_ID festival_fall27", "Portrait": "Portraits/{{ModId}}_SheriffBill_SpiritsEve", "Sprite": "Characters/{{ModId}}_SheriffBill_SpiritsEve", "Weight": 1, "Outdoors": true, "Indoors": true, "IsIslandAttire": false, "Precedence": -20,
When you say it's ignoring the file, is that an error in your SMAPI log? If so, can you please post the log in the log parser and send the link to that as well?
I did Event_ID like this
!log Log Parser Link for Pillows
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.
YES OF COURSE one momenet
Log Info: SMAPI 4.2.1 with SDV 1.6.15 build 24356 on Microsoft Windows 11 Pro, with 15 C# mods and 22 content packs.
I'm planning to cover several festivals, but I'm also thinking about Spirit's Eve
Yeah, look at the bit I put up there from my Dispositions. It works for Spirits Eve, should work fine for other festivals if set up in the same way
At least normal festivals, I'm not sure how passive festivals handle things exactly
It doesn't work with passive festivals
Still doable the "old way": DayEvent, Location and Update on location change
okay, so in your code, you use the LogName "Wanderer Gift Tastes Include" and the log says it can't load "Wanderer Gift Tastes", so it looks like you might still have an extra code block somewhere that was formatted wrong.
Look for "LogName":"Wanderer Gift Tastes" to try to spot it
should i send you the content.json? ,,
What are 'passive festivals'?
The whole idea is rooted in me being annoyed at late game stardew becomes so entirely centered on "season agnostic" locations with no maintenance gardens like the Greenhouse or Ginger Island.
And honestly I'd just like some way or another season to matter in those locations.
With the greenhouse taking on the current season for what not to effect, and applying a 50% initial growth time and 100% regrowth time increase to crops that can't grow outside during the current season(so for example ancient fruit would take 2 weeks to regrow during winter and 21 days to Initially grow), fruit trees and custom seasonal bushes instead have a 50% to fail to produce anything when they would otherwise while out of season in the greenhouse.
Ginger Island would be simmilar jus always considered to be Summer.
You can, Pillows, or you can just look for the piece I edited my message to include. 🙂
Like Squidfest, where there's a festival, but you're not locked into it by going to the location
So it's not a fancy event, it's more like just a fancy normal day
SORRY !! ok i will edit wait a minute,,, thank you so much !!
Ahh yeah, makes sense. I think handling these passive events is way easier — just set a location and time. What bugs me with festival coding is that using DayEvent + Location + UpdateOnLocation messes with other mods, like mouahrara’s Module Collection (which makes festivals end earlier). After the event ends, you can walk into the festival area like normal, but the character still has the event assets loaded. Hoping IS_EVENT fixes that. Thanks a lot for the help!
Passive Festivals are so much easier to work with, especially because you just can schedule NPCs to path to them and go in and out. The only downside is that time isn't paused in them.
hello so i found it but it still displays the same text of ignoring even after i changed both of them....... could you please take a look at this?
content file
https://smapi.io/json/none/26302783cd4a4cc9b97fd59b60fed1e0
gifttastes file
https://smapi.io/json/none/87679d46a26e4d1bb7cd4258e4c86907
here's the log!! it instead says WandererGiftTastes ignored this time </3
https://smapi.io/log/35ff5337dbc74a2ebb683a63e6e1308c
Log Info: SMAPI 4.2.1 with SDV 1.6.15 build 24356 on Microsoft Windows 11 Pro, with 15 C# mods and 22 content packs.
Your issue is in line 37-41 of the content file. Remove that block and you should be set.
"LogName": "WandererGiftTastes",
"Action": "EditData",
"FromFile": "assets/data/gifttastes.json"
},``` this one
See how it's missing the "Target" line? 🙂
AH OKAY
You've already put the fixed code in your included JSON, so you can just delete the one I showed there
forgive me........ i might have misunderstood the tutorial,, thank you so much !!
No problem! Go ahead and remove that and check for any other issues, just in case.
should this work? (idk it does not change the value on location change)
"DynamicTokens": [
{
"Name":"TEST",
"Update":"OnLocationChange",
"Value":"{{Random:a, b, c}}",
},
]
it does update on starting a new day
I don't think you can make DynamicTokens change on a different rate, I believe they are only checked on the new day
yeah it is not mentioned anywhere in the guide :/
you don't put a rate on the token itself. put it on the patch you want
they will update as often as they need to according to the patch update rates
to get an npc to participate in the egg fest, you'd need c# probably, right? as in: they have a score, they wander around, etc
where's the text for item delivery quests on the board stored? I swear I found it once but now it's eluding me
one of the strings files
i think you can have them move around during the egg hunt without C# with an advanced move? i'm not 100% on that. you're probably right about the score needing C# though
actually im looking at it now, its purely event code
this is nuts
the abby winning is just a fork
Well, the movement is event code
yeah lol i went in there and was like oh this is just here huh
Also, I'm not entirely sure how you'd target the correct part of the event script to not mess with anyone else's modifications to that entry
So you will likely run into compatibility issues
but it makes sense not to pathfind them based on which eggs you've already picked up, that would be nuts. a predetermined path is easier
ive never seen anyone modify the advancedmove portion of the egg fest
Is TextOperations: Append-ing an event entry a thing?
where is the cutscene thing defined in the game code. let me go searchy
probably?
If you could append it after Leo's AdvancedMove, that seems like the safest thing to do.
I specifically called out compatibility as an issue because if you manage it, someone else is inevitably gonna want to do the same with their own NPCs 😉
If they haven't already rewritten the event on their own to do so
ahhhh true true
okay so the file isn't ignored anymore but he still wouldn't accept gifts..... im suspecting it has something to do with the Disposition file..... but im not sure
Are "CanSocialize" and "CanReceiveGifts" both true?
i think they're not even in the file to begin with,, also the file isn't called disposition but it's called the character's name instead
should i rewrite the whole thing?
"disposition" is an old term from before Stardew Valley 1.6
So the new character entries should be using Data/Characters as the target and the entry should be the character's name
Both "CanSocialize" and "CanReceiveGifts" should be true by default, if they aren't included.
Next thing to check would probably be that your GiftTastes entry ID and the NPC's internal name match exactly
OK
i cant seem to find any mention of eggHuntWinner or anything in the game code that suggests you need 9 eggs to beat abigail. it doesn't give any qualifications for the fork in the spring13 json either :( https://stardewvalleywiki.com/Egg_Festival#cite_note-1
oh my god of course as soon as i say this, i find it
Can you make actual farm plants built into a map and unable to be harvested? Like, plants you can walk and swish through, kind of like grass on maps...
not that i know of
Ok. They don't need to register as crops, I'd just like them to swish when walked through, but I guess there simply is no tile property for that
Anyone remember where to find the tilled earth tiles which I think are only used on the farm when you hoe the ground (and maybe for spring onions in the forest)? I know that they are slightly different than the dirt available on the outdoors tilesheet.
its in the Terrain Features folder
Oh, ok! Thanks
Hmm, since it is not in the maps folder of the content unpacked folder, is the game still able to load it in normally by taking from the vanilla tilesets if it is removed from my mod's map folder on release?
no
some custom tilesheets have crops too
Thank you, I was worried I might make recolors incompatible by using the exact tiles I wanted
Just to be sure, listing that mod as a dependency doesn't count as using its assets in its permission requirements right?
Oh, I didn't realize Button made it! She has a lot of useful mods, doesn't she?
unless stated otherwise it's fine
Ok, that's what I was thinking, but I just wanted to be sure that I understood what is meant by the language in the permissions, since I'm kind of new at this
everyone uses smapi and content patcher 
hm i swear there was a tilesheet that has seasonal crops
but it occur to me that it might literally just be sve lol
SVE does have some nice looking crop areas
those are definitely manual(ly copied into a new tilesheet)
like the outdoor kegs and beehouses
Mhm, that makes sense. I would probably be doing a lot more of that myself, if I didn't want the recolor compatibility
https://www.nexusmods.com/stardewvalley/mods/28434 there is a single sunflower here 
daisyniko has some trellis flowers too
Those are cute, though I'm not so sure I want to have any tileset depencies. I often like to edit things to be exactly how I want them.
just make ur own tilesheet ez
Yes
I'm not entirely sure I understand?
well, if you use a tilesheet that has recolor compat
then u dont have to do things yes?
and conversely if you decide to release your own tilesheet mod, you can perhaps have enough in there to justify trying for recolor compat
Right. I'll probably stray from making anything that I need to make manual recolors for, like adding one new grass tile. If I did that, I would just need to make a whole grass tileset with it's own unique colors.
smiles in OURple
i know for daisyniko there’s a layer mask(?) out there for you to easily recolor your own tiles but i have yet to figure out how to use it
Not entirely against that new tileset idea btw, but I'd have to add it in much later in the process so I don't have too much on my plate
tilesheets are p fun to make
I'd love to have an otherworldly feeling to my maps by using interesting colors, etc. but I need to put that way down in the priorities list, lol
Must finish mod, not endlessly develop it...
the scope creep bug will get you soon enough /j
🫥

spooop lands
Stop! Don't make me want to do it mooore!
i made my whole entire island OURple
i wonder if its worth making some kinda grass texture swap feature 
tho more grass exist so maybe not
i with MG had blue gras compat
naur
it does change all grass yeah but you cant have a texture for gras and a different for blue grass
i made my MG mod for grass and in the screenshot above I used blue grass yet its still my normal grass texture
i am rubbing my rat hands
free scope creep...
MG is also still show as "broken" by smapi/stardrop for some reason :(
huh really
yeah
its green on the site rn
Probably for 1.6.9 big recheck
Dunno bolb
well but either way it would be cool to have a grass retexture mod with also extra blue grass retex option
The reason why I'm considering this is cus there's an extremely similar bit of code that i did for hoedirt
O:
To adapt it for grass i basically just need to change it to take a list of grass per location
And per season ig
ohh
I can't provide hd grass with this but u could probably do that via spacecore
yea
cuz i like my pixel pixel sized xD
or like
Do you guys know if a sizable amount of people still use 1.5.6? I know mobile users do….
so it wouldnt personally bother me
grass animated besides the usual run through grass
mobile is 1.6 too
the other limitation would be me expecting 66x240 size grass exactly (since all i am doing 4 u is swap out the texture lol)
it would not be a real "more kinds of grass" feature if i do it like this
🤔
but it could be like this grass in this location and that grass in that location or something like that?
yea
and u get the normal rules about regular vs blue vs spiderweb grass
plus multiple kinds of grass texture per location if u want
notes down to make special grass for the island
so u can throw in flowers
Oh man when did it get so late again? I was nicely typing away dialogue and its soon to be 3am
I should probably go to bed, but the mod is calling me
are you also gonna add grass that only certain animals will eat
ok so I'm in the starting stages of making a druid Linus mod. One thing I'm on the fence about is editing his gift tastes. Canonly speaking, I would describe him as pescatarian (vegetarian that eats fish). Should I change him to be completely vegan or should I just keep him as is?
Gourmet rabbit grass...
no i just said this aint an actual more kinds of grass feature
literally me swaping the texture out randomly 
oh I missed that 
I thought I could get you to do it for free
the mod will remain even after u eep
(I quietly removed that feature from Extra Animal Config's "Future features" list a couple weeks ago once it became clear I did not have a single use case I myself would be interested in, nor motivation)
i don't know a lot about druids but for some reason i doubt any of them were/are vegan. but anyway pescatarian is just default stardew diet since there are fish but no terrestrial meats (not counting bug), so i'd probably just leave it
most likely, but the rat in me is vibrating into another reality or maybe i am jsut tired, off I go get ready lol
yeah i think i might just leave it.
base linus is already very druid-like without the magic. really all im gonna do is add some lines to him, edit his schedule, and add a couple heart events
say can u change the delimiter for cp tokens
normally it's like thing,other,whatever but what if i want to get string thing other whatever
you might be able to do some shenanigans with {{Render}} or similar but i don't know of a way offhand
Time to attempt modding with... however many ram my computer will allow without crashing lol
what are you gonna make
Not much
Reprogram the mine, add more minerals, add some machine, probably a train, an entire city maybe.
Light modding, as one will say.
you might reach point where game just doesn't load then 
Ah, a great challenge for game optimization
guess its prob fine if u just only ever run your mod ofc
i think it'd be a powerful statement to say "my mod has no sve compat because i lack sufficient ram" so go for it
Vanilla stardew is very good when comes to RAM usage (800mb) so I hope that adding more stuff wouldn't impact too much ram...
Unless SMAPI is very ram intensive.
not smapi itself no
Praying that 1.7 stardew will take longer than Geometry dash 2.1 to 2.2
I'm going to get my Bachelor degree before finishing this mod
I mean I'd assume so too. I saw Minecraft modding before and 512mb to 8gb is a huge jump, but then again the content in those mods are way more intensive.
yea i turned on my mod list (199 mods) on to check real quick and it got to 3gb 
199 and only 3GB that's pretty efficient lol
i should note that i only have ES VMV for expansions on this list
so it is fairly light
Something in my head is telling me that reprogram a game function is going to explode RAM usage
the lang server is homf 2gb 
well depends on what u r doing
if u just dont use the lang server then it'll be fine
Not sure. I might need to study the game a bit more to know how the game renders and stuff.
the language server is the C# language server for intellisence and such
not sdv thing
So it's C# itself, I see...
but its just dev tool, u can just not use it
I see I see.
i realize im basically saying go use notepad to code ur mod 
Notepad ++ is what my friend who works in cybersecurity told me to use.
do u have prior C# experience
Nope. I'm going to fuck around and find out.
Unless somehow biochemistry knowledge helps...
then doing it without the language server will be painful
I've been through organic chemistry, I'd like to see it try.
My stardew uses 10gb ram easily
terror
Please tell me that's vanilla
I have 128gb ram so .net also doesn't try as hard to garbage collect
What are you running on stardew man... Are you trying to simulate photosynthesis on your parsnip?
speaking of 10gb ram, i'm looking at profiler because i realized it takes content patcher 2 seconds to load in between maps -- in the log analysis thingy, is there a way to see WHAT mod specifically takes the longest?
or is it just gonna blame content patcher for taking 2 whole seconds and some change
Use my version of cp along with the profiler and profiler content pack
ah fuck okay, guess ill play another day again lol
The key content patcher methods to monitor are immune to harmony patches, so needed to add the profiler telemetry directly
how r they immune...
alright, switched em out, lets see what goes on
Generic methods are hit or miss
can someone please hit me with a newspaper so i stop scope creeping myself
continue
the impossible challenge
Struggling to get a custom mod to do what I want. Specifically, a few mods I'm using combine to mean that some of the crops don't work properly with the Seed Maker; and since I'm also giving myself the challenge of not buying seeds, I'd like to find a way to get that working again. I've looked at a few other mods to see how they set up machine recipes, and I can't see where I'm getting it wrong. I've used the list_items command to confirm that the item IDs are correct, and I know the mod is loading correctly because I have a few crafting recipes in the same mod that are showing up properly. Here's what I have for using grapes in the seed maker, hopefully someone can help me figure out what I've got wrong:
"Changes": [
{
"Action": "EditData",
"Target": "Data/Machines",
"TargetField": [
"(BC)25",
"OutputRules"
],
"Entries": {
"grape seeds": {
"Id": "(O)398",
"Triggers": [
{
"Trigger": "ItemPlacedInMachine",
"RequiredItemId": "(O)398",
"RequiredCount": 1
}
],
"OutputItem": [
{
"Id": "(O)301",
"ItemId": "(O)301"
}
],
"MinutesUntilReady": 20
}
}
}
]
might need to move entry this
move entry?
yea to put it above the vanilla rule
the other thing is that your key (grape seeds) and your Id field ((O)398) don't match
recommended to use {{ModId}}_Grape
Ah, ok. I'll try those and see if I can get it working. Thanks!
you can validate your rules in game with lookup anything
Oh, I didn't even think about that!
Oh, very nice! I'll probably grab that for other things anyway, regardless of whether I can get mine to work as intended
to clarify what i meant by move entries
the order in which machine rules appear is important
i want to bar players from beginning heart events if they've heard a certain line of dialogue. is that possible?
you could probably use a dialogue action command to add a mail flag at the end of a dialogue line and then have a GSQ in the event for the pllayer to not have that mail flag
oh yeah
hey, there's already a mail flag in the game
if the player's started the joja storyline i don't want them to be able to see my heart events
this seems doable
thank you once again for your invaluable help lmao
Always happy to help :D
Trying to figure out using FTM to spawn more dust sprites in the mines... am I correct in understanding that the framework works by spawning things in randomly-predetermined waves across valid time ranges set in the json? 
is it mines mines or just dungeonish place
The real mines
that's what I was thinking, I don't believe FTM lets you spawn stuff in the mines 
It can spawn in the mines when the player's present but this random wave spawning means I can't get it to spawn them just one time when the player's present 
well FTM does let you do 'spawn only when player present'
and it lets you do a minimum and maximum spawn
and it lets you have a minimum tick between spawns... so I would think that it does
specifically this section
Yeah, but because the spawns are pre-distributed across waves in the day according to the minimum and maximum spawn counts, I don't seem to be able to tell it to, say, spawn X-Y sprites while the player's present then stop spawning
Rather, the min and max settings appear to be "Distribute X-Y sprite spawns across the specified time range"
I could tell it to try spawning more often, and then cap the simultaneous spawns, but I'm pretty sure that would cause it to spawn more enemies every 10 minutes as soon as you kill any of them
Ohh I see what you mean yeah ... yeah
are you using FTM because of custom drops?
I think content patcher now allows you to spawn monsters if I'm not mistaken, maybe it can do what you want
or you could use spacecore
not sure if either framework would have exactly what you're looking for but you can look into em
The primary thing I wanna do is just distribute more dust sprites across the entire mines so every playthrough involves less of that one portion where you're just grinding the iron levels for sprites because the Burglar Ring is so good 
But being able to finetune sprites to be weaker and have less loot on the lower floors, and the opposite for the later floors was something I also wanted to do if I could get the spawning to work
I think the issue there is that FTM wouldn't stop the vanilla sprites from spawning either? Though I don't know if you mind that
I don't think spacecore can do health/dmg but it can do drops
Well, I wasn't gonna touch the existing iron levels, just 1-30 and then, what was it, 80-120?

Hmm... I do see a segment about monsters in Spacecore but it looks like that whole spawning action is on Trigger Action
Provided this works maybe I could look into a trigger action checking for if the player is on any of the floors I want to add spawns to whenever changing locations but I get the impression that'd be bad for performance? 
is this formatting correct? "GameStateQuery PLAYER_HAS_MAIL current !JojaMember"
You want the ! in front of player has mail
Yeah I'll be honest when using spacecore for my monster spawning initially it was really laggy every time the monsters spawned (so every tick lmao)
Or tick over to 10 minutes anyways
i actually had a question about spacecore monster spawning in events. can you use a trigger action inside of an event to spawn them?
Just to confirm, FTM isn't really built to spawn things in the mines. It only spawns objects at specific or random times of day; if no players are currently on a specific mine floor, it doesn't exist, and FTM just doesn't spawn anything there. It can work for certain uses, but adding more dust sprites everywhere would be pretty elaborate to write, and inconsistent about spawn rates.
(I am still working on trigger actions that would be more flexible for stuff like that, but I've been on hiatus for a while again)
Yeah, the time-based spawning is where it just slips through my fingers, I think 
If you set spawn times 600-2600 and "a player needs to be there", monsters will basically just get pre-assigned a random time at start of day, and if somebody's there, they'll appear. It makes the numbers a bit awkward, and can't pre-spawn anything on map entry, etc. 
By maximum spawns per day I had initially thought maybe it meant that it would stop spawns after successfully spawning that many mobs and I could tell it to just keep trying to spawn a bunch every 10 minutes
I could have lived with making the new spawns effectively once-per-day
That's the other issue, yeah. FTM can't check how many monsters exist, it just has time settings for "only let this area spawn X monsters at the same specific time" and a delay between spawns
At some point I meant to put in a caching system so if the mine level didn't exist, it'd just spawn them once someone went there, but it was pretty awkward too.
Tldr I'd just recommend looking at Spacecore to see if it's an alternative for now, or wait for other trigger action stuff.
The game has a buff for combat level that doesn't display in the tooltip unlike other skill buffs, and it makes more/harder monsters spawn, right?
Could you use that but only for the dust sprite floors as an alternative?
Yeah, I'm gonna keep digging around because I really don't like that dust sprite grind but I don't want to just cheat in the Burglar's Ring every run either 
Mm, I don't think the difficulty stems from a lack of conditions I could use, but just that we don't have many tools to control enemies and enemy spawning in general? 
Without C# we can't add new monsters, can't change spawning rules for existing monsters, can only easily add new places for them to spawn
You could use the easier monster eradication mod 
Naw, that's still in the same vein, I think
No i was just saying you could use it in the mean time so it's not cheating it in
I just have the nebulous desire to make the task "feel" more natural 
Without feeling like I'm just taking it out
if i wanted to switch to a temporary map during an event and then switch back, how would i do that? i'm getting an error when i try to make my temporary map the map that the event actually takes place in when swapping back, and i'm not sure if that's forbidden
I'm not sure honestly, I did my temporary map in a way you're probably not supposed to (Aka loading it into the game and sending the player there during the event)
I just use changeLocation, but I haven't tried doing it as A -> B -> A. I did A -> B -> C.
Aba you haven't spelt your name!! O: /silly
I tell a lie. I did A -> changeToTemporaryMap B -> changeLocation C. Not sure why I did that.
i mean i guess i could use change location instead of temporary map, since it's just the town map!
temporarymap makes a new instance of the location under the location name "Temp"
changelocation is a warp that once you arrive immediately starts the event playing again
also if you want the best help, a copy of the error itself would be more useful than "an error"
oh yeah no problem, let me get a log
taking a glance at the code, I don't see why a -> b -> a would even error out
Log Info: SMAPI 4.2.1 with SDV 1.6.15 build 24356 on Microsoft Windows 11 Pro, with 16 C# mods and 1 content packs.
Suggested fixes: One or more mods are out of date, consider updating them
Presumably there must be some situations where using changeToTemporaryMap is desirable over changeLocation?
i'm still testing changeLocation though
that looks like you missed the {{ModId}} prefix on the event warp
oh, it doesn't take the plain tmx name?
did changeToTemporaryMap CrystalAndNiko and theres no map called CrystalAndNiko, but there is a handwrittenhello.dbda_CrystalAndNiko
you're probably right because this is how i load the map
"Action": "Load",
"Target": "Maps/{{ModId}}_CrystalAndNiko",
"FromFile": "assets/maps/CrystalAndNiko.tmx"
},```
but i think i still need to learn exactly what load targets are lol
SMAPI has the concept of the asset pipeline.
when the game (or mods accessing the game pipeline) tries to load an asset, smapi will ask all the mods if they want to handle the asset.
mods can add a load handler (like yours), and/or edit handlers.
only one load can happen, and if no one tries to load, smapi will let the vanilla logic try and read the XNB file from the Content folder.
if a load did happen, then the edit(s) will run on priority order.
so wait, even if i didn't load my map, SMAPI would try to read it anyway?
assets in the asset pipeline only exist once something tries to read it
(I think)
an asset that has a load handler but never gets requested will never be read from disk
Well, if she used changeToTemporaryMap {{ModId}}_CrystalAndNiko in her event but hadn't loaded it, she would get the same error as she's getting now: that it doesn't exist.
so in this case, it was the act of the changeToTemporaryMap CrystalAndNiko command executing that caused the asset Maps/CrystalAndNiko to be read, which no one registered a load for, so it tried (and failed) to read from an xnb file in the Contents folder which didn't work
ohhh i see so it only tries to read it (and fails because it's expecting an xnb?) when it's called somewhere by a not-load
an xnb error showing up in the log means no one in smapi tried to load it
No it doesn't fail because it's expecting an xnb. It fails because it's expecting a map but there is none (and then it tries to find one in the vanilla files and there's none there either).
if it was Maps/handwrittenhello.dbda_CrystalAndNiko then it would have been fine, as content patcher is loading it on behalf of your content pack
It was expecting "CrystalAndNiko" which you didn't load and is not in the games Content folder nor is loaded anywhere else
Your map is actually your Mod Id+CrystalAndNiko which means that's the map you need to do stuff with
this all seems like it should be obvious lol but i realized i have no actual knowledge of the asset pipeline so thank you guys
its been on my todo list for like a year to diagram the asset pipeline, but never get around to it
I didn't know the technical details only the surface level so this was also educational yippie (Aka i know the simple: game needs this because this and not the how or why it did that)
By Yoba, I think I've done it 
YIPPIE
i do love a good diagram it must be said
cutiessss
Readable diagrams my beloved..
It took me much longer than I would've liked to read that ternary conditional operators line for the temporary location but I have finally parsed it.
God i want to play stardew/mod but I have a migraine, so I'm trying to sleep but I can't sleep... because I have a migraine . Very fun. Very cash money /sarc
(And learned what a ternary conditional operator is)
Now, is there a way I can write the json to have {{Range:1-30}} but exclude the safe chest rooms on 10, 20, 30?
Multiple ranges?
I have no idea what those words mean together Aba
{{Range:1,9}},{{Range:11,19}},{{Range:21:29}}
Oh, that'll work? In the context of
"Condition": "LOCATION_NAME Here UndergroundMine{{Range:1-29}}",
?
that range wouldn't work there anyway
All range does is generate a set from low to high, which if used in that would just serialize back out to the string form of "1,2,3,4,5,..29"
Do you want an explanation or are you just making chitchat? (Genuine question, I think you're chitchatting but don't want to be rude and not tell you what it is if you actually wanted to know what it is lol)
need to be careful when trying to mix GSQ concepts with Content Patcher tokens
Oh I'm genuinely curious!
Sorry if I didn't seem that way heehoo

It looks like it's working to me, I just need to exclude 10 and 20 from it
Oh, maybe not
They seem to be spawning on floors they shouldn't be 
{
"When": {
"Hearts:Abigail": "{{Range:11,14}}"
}
}
has very different behaviour to
{
"Condition": "LOCATION_NAME Here UndergroundMine{{Range:1,9}}"
}
In the former, its a content patcher condition, where the key (Hearts:Abigail) being a set of things, overlaps with the value ({{Range: 11,14}}) which is also a set of things.
In the later, the tokens only being used for string substitution.
in both cases, Range is just subbing out for the set, and is identical to:
{
"When": {
"Hearts:Abigail": "11,12,13,14"
}
}
and
{
"Condition": "LOCATION_NAME Here UndergroundMine1,2,3,4,5,6,7,8,9"
}
(I can't remember if cp will add spaces or not)
I was reading this line: @event.temporaryLocation = ((mapName == "Town") ? new Town("Maps\\Town", "Temp") : ((@event.isFestival && mapName.Contains("Town")) ? new Town("Maps\\" + mapName, "Temp") : new GameLocation("Maps\\" + mapName, "Temp")));
The ternary conditional operator is the ? : bit. It's like an IF formula in Excel with the question mark and colon in place of the commas in Excel: evaluate this query that is written before the question mark ? if the query is true, use this value that is written before the colon : if the query is false, use this value that is written after the colon.
So this is saying: if the mapName is Town, make a new instance of Town with a mapPath of Maps/Town called Temp. If it's not, assess the next query which is whether the current event is a festival and the mapName contains Town. If that's true, make a new instance of Town with a mapPath of Maps/mapName called Temp. If it's false, make a new instance of GameLocation with a mapPath of Maps/mapName called Temp.
So Mud will just have to write a really long condition of "ANY \"LOCATION_NAME Here UndergroundMine1\" \"LOCATION_NAME Here UndergroundMine2\" \"LOCATION_NAME Here UndergroundMine3\"" etc?

If I understand the GSQ correctly I think I can put the entire list of mine levels I want in that one condition
But perplexingly, the incorrect usage of Range seems to cause it to spawn them in every single map I go to
Oh yeah so just "LOCATION_NAME Here UndergroundMine1 UndergroundMine2 UndergroundMine3" etc
doing a patch export on the asset that contains the condition will show what it became in the end
That appears to work, but can I make it less annoying to write?
I'm gonna need to add a separate trigger for 80-120 with a stronger sprite variant
Also is it going to cause problems if I have this LocationChanged trigger action checking for 27/36 locations 
Ohh.. that's all very fancy code stuff
You explained it well though so I could actually understand it (usually hearing anyone talk about stuff like that loses me completely lmao)
formatting makes it less scary
@event.temporaryLocation = (
(mapName == "Town")
? new Town("Maps\\Town", "Temp")
: (
(@event.isFestival && mapName.Contains("Town"))
? new Town("Maps\\" + mapName, "Temp")
: new GameLocation("Maps\\" + mapName, "Temp")
)
);
Still scary if you're me and you've only done the very basic 'hello world' stuff for C#/Any code 
I did get a bit farther than just 'Hello World' to be fair to myself... just not... That far
I had been avoiding learning about ?: because of my struggles with understanding stuff like lambda expressions but once I bit the bullet just now I realised it was easier than I was expecting.
that being said, most style guides would try to avoid nested ternary operators where possible due to the added complexity it adds
note it gets its name purely from taking 3 arguments, pretty much every other operator is a binary operator (2)
and since its pretty much only ternary style operator around, everyone just calls it the ternary operator
That is an interesting titbit
+ for example is a binary operator as it takes two numbers a + b
though ++ is a unary (1) operator.
myNumberVariable++;
Welp, I think I will need to put off trying to determine the functional differences between changeToTemporaryMap and changeLocation until a time where I know more C#.
So as mentioned I'm a little wary about performance impact from this long-ass LOCATION_NAME condition having a list of 27 locations in it, under the assumption that might be a somewhat heavy check, if I place another condition in front of it like LOCATION_IS_MINES first does the game skip checking further conditions if the first one returns false? 
Which mod adds map/position like this:
yeah, i'm running 1.16.0 and it looks more like yours
no it's a current mod, as someone was running it on a stream with a huge ton of mods on 1.6
NPC Map Locations had a debug option that made it display like the image I posted, but that got removed when 1.6 came out and I just miss that style, as I found it very simple and tidy.
huh, didn't know that was a thing
it was, the debug mode of NPC map locations also let you right click warp to any tile you pointed at, which was funny in multiplayer as you could instantly spawn in circles around another player :p
sadly not a thing with that mod anymore
can see those functions in action here
oh that's cool
so it's possible whatever mod is displaying like this is just another mod with an option turned on:
is there a content patcher condition for only activating if you have 50 starfruit in your inventory? and also is there an action for removing 50 starfruit from the target player?
if you're watching the streamer we were watching yesterday i recall him mentioning something about a coordinate mod so you could ask about that 
i found it
is there a way to set a default for local tokens(so it uses that and doesn't spew an error if the local token isn't provided)?
hello!! so i did check i believe, but the items id should be fine… one thing i noticed is that the gifts are not recognized by the mod “gift helper” so maybe theres something else? maybe it’s something in the dialogue or… something…….. 
If you want to share your content.json and gifts json again I will have a look at what you've got now and see if I can spot anything.
THANK YOU!! give me one moment please
There's no code block including the gift tastes in the content.json. Where is your Include for the gift taste file?
i was told i should remove it since the log kept ignoring it,,,,,,,,,,,,
I'd try to delete the last slash and the spaces in the gifts file.
oh my gift taste file is in the assets folder and in there i madde a folder called data
I think you misunderstood somewhere along the way. You need to have code somewhere in your content.json that tells Content Patcher to look in your gift tastes file to read the json in there. Content Patcher will not know to do anything with your file just because it's in your mod folder.
AHH OKAY
but then i'd be back block, because when i tried to put it in there,,,,, it kept ignoring it,,,, i think i still have the log somewhere
You can have Include patches inside Included files, meaning that your gift tastes Include patch doesn't have to be in content.json itself but if it's in another file, that file itself needs to have an Include patch inside your content.json.
So it's possible that you do have your Include patch for your gift tastes somewhere but you haven't realised it. The easiest way to check will be if you hop into the game, load a save, copy patch summary full YourModIdHere into the SMAPI window (replacing YourModIdHere with whatever the mod's unique ID is) and then sending us a link to the log after it runs.
OKAY ONE MOMENT,,
i think the thing is it’s not really my code so i’m not sure where everything is and where is everyone 😭😭 but i’ll try putting the code into content again and see what happens
originally this what it says when i had the code in there (i mean in the content.json)
https://smapi.io/log/35ff5337dbc74a2ebb683a63e6e1308c
Log Info: SMAPI 4.2.1 with SDV 1.6.15 build 24356 on Microsoft Windows 11 Pro, with 15 C# mods and 22 content packs.
Since it's the gift tastes file that you created, it doesn't matter that the rest of it is not your code. If you created that file and didn't write an Include patch, you didn't allow the game to actually use the file.
As Lily said, that was because you didn't have a Target for your patch. However your patch should not be an EditData patch. It needs to be an Include.
OH OKAY
I SEE
IT WORKED
THANK YOU SOMUCH YOU TWO
Hooray!
the bottom of https://stardewvalleywiki.com/Modding:Shops has the vanilla shop IDs, but im not seeing things like Gil's reward items, is there a place those are listed?
You mean you want a list of the rewards? https://stardewvalleywiki.com/Adventurer's_Guild#Monster_Eradication_Goals
That isn't a shop
Try....uh
Data/monsterEradication?
Wild, wild guess
But I'm sure it is is own data file
i mean what do i do to trigger the menu opening?(theres also MineElevator but that one is in the mines, i don't see a tile action or whatever on Gil)
I think he is a hardcoded tile action
what about marnie's animal purchase or clint's geode open? can i access those through just a tile action?
Action AnimalShop and Action Blacksmith according to their maps
don't those require the NPC?
I don't know. I don't know what you're trying to do.
access all shop-y menus from a MMAP menu tree
Don't all the shops require the NPC to be present?
I have no idea about that, I always play with Self Serve so I never need an NPC present.
you can do "OpenShop Blacksmith" to bypass clint for example
Does MMAP let you call the answerDialogueAction method? If so, you might be able to get to the geode processing menu.
pretty sure any Action, Tile Action, or Touch Action(to my knowledge that means Action, map layer Back action, and map layer Building action)
If it's not a tileaction/touchaction/triggeraction then you can't do it
Gil might be a hardcoded performAction on adv guild, I'm not sure
You are depriving the people of their answerDialogueActions chu /j
To answer this, you can indeed open any ordinary item shop with OpenShop, the marnie/clint stuff is for checking the npc and for the game's default dialogue tree
Things that aren't ordinary item shop is anything outside of Data/Shops
It's this one 🙂 https://www.nexusmods.com/stardewvalley/mods/31622
It pulls the raw location however not the display name, so if you're using something like Event Lookup the map names will differ.
for debug/modmaking purposes the internal name is almost always more helpful
Mod ideas
Repeating my three-part question here hoping the morning crowd might have some insight, I'm currently needing to use a LocationChanged trigger action checking for 27 Location_Names for a GSQ condition (UndergroundMines1-29)
- Is there a way I can write this more cleanly than 27 separate locations?
- Is it a terrible idea to make the game check for 27+ location names on LocationChanged?
- Will the check be lighter if I add in another condition that will return false if the player's not in the Mines or does the game still check all conditions even if one has already returned false?
Since its a case of mine levels, could you limit the location checking to the map type? (Frost/Lava/Castle etc)
Is there not a GSQ for current mine level so you can just check the range? Or is it only lowest reached that's a GSQ?
Pokemon suggestions for Pam, Penny, and Sam?
Toxtricity for Sam?

I have a toxtricity tattoo lolol
i really did put it into daycare and tried to forget about it
only lowest level unfortunately
maybe something that belongs in BETAS? 😅
It's not a popular pokemon lol,. but I like that for Sam!
Closest GSQ I could see was Location_Is_Mines which is too broad because I need to be able to exclude the starting floor and the safe chest floors 
i'm fairly sure GSQs short-circuit, meaning as soon as the result is known (one of the clauses returns false), the query stops evaluating and returns false (and the same is true for ANY, returning true as soon as one is true)
For Penny, maybe Chansey/Kirlia? Something nurturing?
Epic, that assuages all of my worries if accurate 
ah yeah i was thinking something like that too
i had also considered normal types
but my knowledge of normal type pokemon is uh. comically limited
maybe one of the little dog ones
The cinnamon bun dog
that one is new right?
Fidough
(Cinnamon dog bun is a fairy
fidough!)
Yeah, I didn't play it so I can't recall the names
But it's got buns like her hair 
Maybe Granbull for Pam? Looks grumpier than it is?
OH that's a good one!
fairy type my beloved (clefairy my beloved)
That one! i couldnt remember the name
pam looks like the type to have a full conversation with her pokemon after a long day
Maybe Penny could have a Togepi?
Purugly would look good with her, and having a Glameow that evolved would fit Pam's story I think!
thinking of pokemon to match with character in any fandom is fun i think XD
I think so too~ Entirely why I started this project :3
The question being, do you pick a pokemon that is like them, or a pokemon they would want?
Does anyone know what the structure of the MugShotSourceRect key is like
In Data/Characters
lacey,,, Minccino
I didn't find anything in the documentation and also nothing in other mods for example.
For editing it, like this
{
"Action": "EditData",
"Target": "Data/Characters",
"TargetField": ["Sebastian"],
"Entries": {
"MugShotSourceRect": {
"X": 48,
"Y": 448,
"Width": 16,
"Height": 24
},
},
},
It's weird iirc. Try searching this channel, I think someone was having a struggle with it a while back
Ah, so it's a dictionary of coordinates, with position
Since it's their partner pokemon in this case, I think I'm mostly going with Pokemon that suit them. Tho I've made some unusual choices in some cases lol
Vincent needs to have Exeggutor for head-related reasons 
i know this is, like, a joke, but it's shockingly plausible
I do my best
especially when I know nothing about pokémon except for cultural osmosis
oh, i could probably edit the [[Modding:NPC_data]] page to explain it. it's a Rectangle (object with X, Y, Width, Height fields)
my NPC uses it but most don't since the default value works for almost everyone
What about the Shadow in the offset field in Data/Characters?
The documentation says: Offset (Optional) A point pixel offset applied to the shadow position. Default zero.
Is this Offset field an integer, or a point like this?
"Position": {
"X": 0,
"Y": 0
}
it's a Point, like that
I figured, what confused me was the "Default zero"
They should have written default { "X":0, "Y":0 }
that would be clearer, but for a certain subset of programmer types, "zero" applied to a struct of this nature implies that all the fields are zero
I found an error in the documentation, there is the property: KissSpriteFacingDirection
But I didn't find this property in the Data/Characters file
However, I found the property: KissSpriteFacingRight, and this is not in the documentation
Would there be in any interest in a search functionality for GMCM? Just designed it today, you can even press enter to load the config if there's one left.
I'm assuming I have to get permission from the Mod Author for it but I noticed the repo hasn't been changed in 2 months or so.
looks cool! you can always send a PR to GMCM's repo
PR would be best but you could release it as a mod that depends on GMCM, this would be kinda fragile tho
- This channel is for making mods, not using mods. You want #modded-stardew to discuss using mods.
- Please press enter less when sending messages.
i fixed this too. thanks for reporting it!
i wonder when that one got renamed? i missed it completely, lol
Glad to help.
I mean my math side says a zero vector is a vector of length zero
(As I get booed off stage)
(in 2d, how else would you have zero length unless both fields were zero?)
makes sense to me! but i'm in the programmer subset where there is a struct and you called memset on it, so all the fields are zero
unsurprisngly im with atra here
finally stopped procrastinating and implemented machine ready effects
ignore the decorative error items
I need to create an ornamental "no entry" sign mod
late, but EMC next version will support ReadyEffects, which can accept a IncrementMachineParentSheetIndex field to determine which sheet index to use depending on the input item
the caveat regarding your mushroom log idea is that the new log sprites has to be on the same sheet as the base sprite, which requires either extending the craftables tilesheet (bad), or switch mushroom logs to using to a new tilesheet (better, but because a machine's sheet index is saved, if you want a user's existing logs to not look weird your new sheet will need to have the log's sprite be in the same place as the current sheet)
Nice thanks Selph!
Would I be able to use Replace instead of Overlay instead for the new sprite sheet? Or does that not matter
what I meant is switching logs to a new texture name altogether
so it doesn't matter
basically, mushroom logs' sprite index in the data is 283. if you switch to a new texture to accommodate your new sprites you'd also need the mushroom log's base sprite to be at sprite index 283, because that number is saved into the item
(you don't need to do this if you just tell your users "if you install my mod your existing mushroom logs are gonna look weird, break them or harvest from them once to fix them)
(hmm, this will also help that person who wanted their toaster to play a "ding" sound on ready, but that's like half a year ago)
Ooo i can make the smoker emit scent of tasty feesh now
To future atra: look at how objects remember spritesheets
Hmmm yeah I think I’d just rather tell them

So I’d need 2 sheets right? Replacing the original in the BC sheet & also the extras in another sheet?
I'm not sure actually!!!
Might be different for some, I'm thinking furniture
Yeah I'm only 100% sure about Object
Walls and floors cache the texture in the item
But that's because they don't have proper item data
Do you know if there is documentation for the Data/AquariumFish file?
Do you know if there is documentation for the Data/AquariumFish file? I saw that in json, the values can be divided into numbers, or strings, separated by /
But I need a reference to understand how to create this list.
Should be on the official wiki modding docs, but I think there's also a breakdown in my fish tutorial on the modding wiki.
I just deployed an experimental update for the mod compatibility list; let me know if you see any issues!
Main changes:
- The data is now fully fetched and rendered in the browser, which should reduce response times and server load.
- Fixed sort order for mods with non-Latin characters in the name.
read that as “non-Lani” and i was like, what did i do 😔
Technically correct. Lani characters sorted fine, but some non-Lani characters didn't.
both the original and the extras must be on the new sheet
LOL
Okay thank you sm for pinging me!
very excited hehe
I think I wanna make my own version of a new cute valley
Exactly 600 broken or abandoned open source C# mods. That's a nice number!
Well, not specifically C#, I suppose.
600! yay!
We really need a filter for ones containing Lani characters, though.
(Mostly yep. You can launch the game with nearly all C# mods loaded, and it'll run fine at a blistering 2 frames per second. There's just a few mod conflicts you'd need to fix; e.g. one mod deletes the save if it detects some other mods, and some Harmony mods crash the game when installed together.)
i am very surprised bjs no clip still works
hey!!!!!! >:(
Well we need to be able to find them to know what to download, right?
Perfect.
love this for me
lani:no is just the regular list without my npc 
OH coders while you’re here: how shrimple would it be to make an “egg festival participation” framework.
as in, changing the threshold needed to win from 9 to a higher number (like 12 for example) and having another npc compete
i know the movements are advancedmove, but the eggHuntWinner check is c#
it wouldnt be super crazy difficult to change that number if an npc is competing right
corrupt Lewis... the winner is.... "me!"
LMAOOO
corrupt lewis grabbing the eggs he conveniently hid under the table pretending he found them
secret year 3 result
lewisWin…
Awesome! Better framerate than my work machine
"I found 64! (only places 36 of a box containing 100)
Does your work machine have a gpu
which one deletes saves? 👀
Oh, I mixed two mods: Hardcore Mode deletes the save if you have the wiki open in a browser, and Stardew Debt prevents loading a save if you have some other mods installed. (Here's an old list of mods which you'd probably need to remove when testing all mods.)
(Though that latter one is, if I recall... not-for-discussion-here in nature.
)
why is everything you touch so cleanly organized 
That’s crazy…. How do you even make a mod that can tell when you open the wiki browser
... cannot tell if im using my phone to look it up.

numerous loop holes
Gosh I wish I got into programming as a lil bean
access the wiki via the command line
Thx
fascinating
I think I've only ever had to used a Command Line browser about 2 times for legitimate reasons (rather than just opening it for interest/etc)
That's 2 more than most people
browser history reading
though iirc hardcore mode does it not like that
I just checked, and it continuously checks the title of every open window for anything containing "Stardew Valley Wiki". 
(It was a nice little surprise when I was testing all mods for the compatibility list, and my saves were just disappearing.)
So i can just open other language wikis then
Hi,I'm new here and I was wondering if any of you Know how to fix the ddl file while making a mod, my older brother is having trouble trying to fix it and make the mod work. (He's tried erassing the file but that didn't work lol)
(Ignore the other mods on top and bottom he forgot to remove those mods lol)
It's the one that says souls that isnt working
Let me know if there's a way to fix it
Is this your mod?
A dll is a compiled C# mod (usually), your error says there is no Souls.dll
Yes this Is my mod
Is it a C# mod? Do you have the source code?
Yes give me a sec to give you a screen shot of it.
There's no need to, better for you to review the information about building a C# mod
!startmodding
Making mods can be broadly divided into two categories:
- Content packs are formatted text files, and don't need any programming knowledge. They can add/edit NPCs, maps, new items, shops, and more. To get started, see the list of framework mods, the wiki tutorial for Content Patcher, and there might be relevant guides on the tutorial wiki.
- C# mods use programming code to change fundamental game mechanics. See getting started with C# modding.
Usually it’s easier to start with making content packs, since you don't need to learn programming.
Second link
Delete whatever's in the Mods folder and build your mod again, make sure your csproj has ModBuildConfig before doing that
Ok
This Is my brothers second attemp of making a test mod.
Here are the best screenshots I could get from his computer
Honestly it's pretty hard to help you two indirectly like this 
Perhaps just get your brother to join this server
Hes at Work rn
Ok
Is your mod just adding an event?
Yes it is
It might be simpler to not use C# to do that
Or in other words, to use Content Patcher and not C#
Yeah please see the first bullet point
(It IS entirely possible with C#, just more complex)
Ooohhh
(exactly, more complex... for no reason)
Or u can be like movies

Build the event script dynamically lol
Lmao
I see
horrifying thank you Chu
Dats what they call metaprogramming
Feel free to come back here for more help!
I know how (most of) events work so I can definitely help
So yo ucan ping me if you need and if I'm around I'll hop in to assist
LMAOOOO
Wait you’re cooking….. TRANSLATIONS??

I love deep fried umlauts
Pathos, I thiiink it came up previously but any chance the "Mod not loaded, missing requirement (<ModId>)" could be made into a link + banner on top maybe, similar to the updatable mods banner? ppl often miss it for some reason
In the log parser u mean?
I know you'd need the mod IDs which obviously isnt availble per nexusmods API (duh), but maybe it'd be possibly with a registry from mod auhtors or so?
yes, sry
That sounds like a good idea
Im fairly certain Pathos mentioned it years back and had some good reason not to do it but I forgot
The log parser does have access to the compatibility list data; so as long as it has the mod ID, it can fetch the mod name + URL serverside.
fail to load (missing dependency: modid)
Can also show things like fail to load (empty folder) 
The log parser isn't very fun to extend though, since it's all regex parsing of the raw log text. I've thought about having SMAPI dump a hidden log entry with machine-readable data (e.g. loaded mod IDs, update alerts, missing dependency IDs, etc), which would make things like that way easier.
yeah but thats a fair bit down (and bright red, yes I know, but users... :p)
thats just SMAPI mods, right? would help a lot already though
it is mostly frameworks
Currently yes. In theory I could extend the monthly mod dump to generate a metadata .json file which the server can access though.
(It's a bit lower-priority unless someone wants to submit PRs though. My next project for SMAPI might be to improve security; e.g. add an optional permission request feature when a mod tries to load third-party DLLs or access certain system APIs like networking.)
Less crimes allowed 
TIL that ebi stands for Event By Id... which you would think I would know but I never actually directly looked at that on the console commands wiki ... or thought about what it could mean...
What are the implications of the third party dll thing
Does it mean any dll that isn't game, smapi internal, or another mod?
Yep, any DLL that's not (a) already loaded by SMAPI and (b) not the mod's main DLL. For example, that would prevent a mod from loading a C++ DLL (which SMAPI can't analyze), so it could sneak data harvesting past its network API restrictions.
Guess casey's autocorrect is banned then
trying to come up with some kind of puzzle for collecting wisps..
It's just at the idea phase currently, but the rough idea is:
- The player enables paranoid security restrictions (off by default at first).
- When SMAPI is loading mods, it finds one which needs a third-party DLL or accesses a restricted API.
- A UI popup is shown asking the user to approve or reject the permissions required.
- If it's approved, SMAPI continues loading the mod; if rejected, the mod is disabled with an error message.
(One big worry I've always had is that SMAPI mods can do anything. There's nothing stopping them from reading all your browser passwords and sending them to a third-party server, except the honor system and Nexus TOS. Currently it's "install mods at your own risk", but I'd want to make it a bit safer than that.)
I imagine SMAPI might be able to fairly easily get all system calls from native DLLs/.so files without too much difficulty.
Though analysing them and coming to a conclusion is a different matter entirely.
The .NET reflection API would probably require a permission, since it could be used to bypass any security restrictions. SMAPI's reflection API would be fine though, since it can check what you're reflecting at runtime.
Yeahhhh.....
Oh wait what about harmony AccessTools
I guess Harmony would probably need a permission request.
I imagine it would be something like...
Mod permission request
SpaceCore needs extra permissions because you enabled security mode.It needs:
- .NET reflection: access or load any code (may be used to bypass security checks).
- Harmony: access and modify any code at runtime (may be used to bypass security checks).
- Save serializer: directly access or change the game's save serializer.
- File access: read or change any files on your system.
[Accept]
[Block mod this time]
[Block mod permanently]
is this a proper ui or fancy console stuff?
It's just an idea at this phase, but probably an OS-specific proper UI.
I hope there's a bulk UI then
Or potentially break every mod using Harmony, and require going through a SMAPI abstraction over Harmony like the reflection helper?
Then you could at least blacklist certain targets.
Well smapi is already shipping a special version of harmony right
Can u just do stuff to it
Loading 0harmony.dll separate is like 72 bad as we seen with 1.6.9/4.1.0
Potentially. The initial version of the feature would probably just have a permission for Harmony in general though. The idea is to prompt a "do I trust this mod?" question and avoid any surprises (e.g. "why does this flashlight mod need network access?").
It connects to my IoT irl flash light
SMAPI could also have a manifest.json field which lets the mod explain why it needs certain permissions.
So the user would see something like:
Mod permission request
Flashlight Mod needs permissions because you enabled security mode.It needs:
- Network access: download or upload data to the Internet.
Reason provided (not verified): "Flashlight connects to the Flashlight.io domain to sync with your physical flashlight."[Accept]
[Block mod this time]
[Block mod permanently]
sadly that domain is parked /hj
Security Enhanced SMAPI
(I think about the reflection load thing b/c reflection loading a subdll was a thing I considered explicitly to avoid smapi "does this method exist" checks.)
(Sorry)
Joking aside though, this will be great in the long term.
Besides the security stuff this should help catch some strange mod setups
Like this one C# mod that packaged ContentPatcher.dll for purpose of doing data edits
Poor Casey
I support having spacecore content be new mod 
It would be kinda useless if it's not eventually made default
It'd be opt-in for SMAPI 4.x, but could be enabled by default in SMAPI 5.0.0 (once the feature is more polished and mod authors have had time to adjust).
(Hi Casey!)
Don't forget third party DLLs, since SpaceCore's content engine thing is technically a separate DLL.
(Also, RIP autocorrect valley)
Gotta say, I kinda hate this for SpaceCore in particular given how most mod users install it. 😛 And you can't exactly whitelist a mod ID either since anyone could set their mod ID like that to fool people. Which leads to the only real solution being signing your mods and being someone SMAPI trusts, which A) can still be bad if someone "turns bad" or is compromised, and B) sounds like a big pain (is SMAPI itself even signed yet?)
DH let me know you came up with a plan specifically to kill Autocorrect Valley /s

(DH did let me know with a joke about it killing Autocorrect Valley 😛 )
Pathos, what if I gpg sign builds
I don't know much about gpg in particular but doesn't that run into the problems I mentioned about signing?
(SMAPI isn't signed because it's a pain in the butt.)
I think players would just get used to permission requests (like on Android), so the permissions would just need to make sense for the mod. Like if you install a popular framework mod that does a million things, file/network access isn't a big issue. If you install a flashlight mod and it requests network access with no reason given, players might be concerned.
<player installs a 400+ modpack for the first time getting into modded SDV, has to sort through at least 100 permission requests> /s
Well that's why the UI should be a checklist sorted by perms 
(It would at least have more sane/understandable permissions than Android used to. It's sort of getting better!)
For people to not read and press confirm on ez
(If 25% of mods need advanced security permissions, that's a bit of an issue that would hopefully be cleaned up before SMAPI 5.0.0.)
But yeah, while it's off-by-default in SMAPI 4.x we can see how it works in practice and polish it (e.g. add a bulk UI somehow).
QualityModifiers: The documentation says this
(Optional) Quantity modifiers applied to the Quality or Stack value. Default none.
The quality modifiers operate on the numeric quality values (i.e. 0 = normal, 1 = silver, 2 = gold, and 4 = iridium). For example, silver × 2 is gold.
I don't understand if it has a list of values, or just one value, and if it is a text or numeric
Brb moving back to minecraft modding where I don't have to deal with this nonsense /s
(This has credibility because like I mentioned recently (maybe in programming off topic, definitely on krobus) having some MC mod ideas.)
And honestly, Minecraft modding probably needs it more given it's much bigger and I hear about compromised mods more often...
It's a list of models
(Keeping in mind that with SMAPI's deprecation process, SMAPI 5.0.0 is likely at least two years away and probably further.)
I'm honestly sort of amazed there aren't way, way more issues in Minecraft land.
I mean, tons off ppl use harmony. thatd fall under that no?
Do you have any examples?
Ah, so what you're saying is I can pretend it doesn't exist for at least 1.9+ years and then panic/whine excessively closer to release
Wellll
This mod uses several i believe (im on phone so i haven't checked)
(Some of the stories about compromised mods in other communities is part of the reason I want to address it. Imagine the reputational damage for Stardew Valley modding if someone released a popular mod which silently harvests all your passwords and sends it to a server, and it leads to a bunch of data breaches.)
If SMAPI did a harmony wrapper API that might help, but it couldn't really allow transpilers since the scanning can't really detect stuff through there (if you even could do that stuff without reflection)
Yes. You would have to trust that atra is [my real name]
Legal name Atra Vita, yes. /j
But that doesn't fix: 1. atra turning evil 2. atra being hacked 3. the pain of signing
"Homeland Security databases breached after employee installs SMAPI mods" 
I think we'd just have to live with transpilers needing permission cus taking it away would break so many things 
How about a nice game of chess?
To be fair I normally wouldn't expect SDV to be on a computer with anything helping access (software, passwords, etc.), much less SDV mods. But [REDACTED BECAUSE SERVER RULES]...
eh most people install sdv on their personal machines
The pieces have tiny microphones and wireless transmitters in them. Nowhere is safe
the important stuff hopefully uses 2FAanyway
Which prob has their personal info too 
Wait that was a reference? Clearly I didn't get it
Atra is evil
I took a look at it, but it seems to be related to machine mods, I didn't find this QualityModifiers key there either...
I'm messing around with Data/Buildings
I thought ||WarGames||...
Ah, but you see, clearly nobody in the world would seriously reuse passwords and such, right????
I remember reading when some of the first Linux ports of some bigger titles got released, the porters got bug reports where the spec in the log showed they had a few TB of RAM.. showing they were running on some very beefy servers
Well, it might be, I have no clue what that is 😛
yes
i assume casey means passwords to homeland security there
Ah yeah that would be skill issue on homeland sec's part yes 
For personal machines yeah. If it's work machines, well, there's tons more concerns (specific software, open ports to servers, ...)
mhm
Although someone using sdv mod to somehow acquire 20k bank accounts would also be pretty bad
"oops the NSA's private key has been leaked, oh well I'm sure nothing bad will happen"
(A password harvester with input tracking could do things like detect when you're typing a password into a known password manager, then use it to decrypt your password database. Even if it's just your personal machine, I don't think it's uncommon for people to put work passwords in their password manager.)
Yeah but we're talking about best case scenario /s (at least as far as "compromised information" exists in any best case scenario...)
Say how feasible would it be to dockerize smapi
Work would kill me
That's a thing ppl enjoy right
(And let's not forget that 2FA won't do anything against session hijackers.)
#making-mods-secure
I really don't think any mod should have the right to access files outside of it's own folder to begin with (tho i am aware of cursed uses cases for this)
A thread for SMAPI security conversations might not be a bad idea!
I will have to give up stardewui hot reload ofc 
(I'm not opposed to a thread, but it's just an exploratory idea at this stage; so I don't really expect the discussion to go much further until we start implementing it.)
I feel like we should add the game saves folder too
to clarify, this security proposal would be not just for Android, correct?
Well ideally we just get a api for it right
(backread a bit)
No, it'd be for all platforms.
Akin to global app data
Pathos doesn't even do stuff with the android version as far as I know
It'd be nicer than the current mod save data thing for debugging
I think technically there is already? But I think it requires using json
Using SMAPI's built-in file APIs (e.g. ReadJsonFile) would be fine. But accessing files directly (e.g. using System.IO) would need permission; even if it's just within the mod folder, it would let you do things like write a batch script and execute it.
The json api goes to the mod folder tho
the ff pw manager can just be copy pasted to different computers if you dont have a master password x)
And even argued for the one where you put it in the actual save folder because of the whole cloud syncing thing, way back when
Yeah me too, that one gets shoved into the save xml
I did this when I changed computers (well, I did my whole profile).
Not talking about that one
I was thinking thing that let u do the spacecore-serialize.json file
same, thats how I know x)
Is that exist
Huh, I thought it existed, but I guess I asked for it and it never got implemented
Could've sworn I'd used it before
There is one for the global saves folder, but not the current save
I thought there was.
I have a sense that users are going to report bugs just for getting the popup at all but the security probably outweighs the annoyance
Yeah i dunno, but i do kinda want it 
There would be a rough teething period for support, that's for sure.
There's definitely constants to get the the current save folder at least, I know I use that (and it breaks if the loaded save is one of the hand named ones that isn't farmname_1234567890 format)
When i was debugging mod save the data i was open thr whole xml and pasting the bit of serialized json...
I did a test in Visual Studio to try to find what's in the object I'm working on to find out what its data is like, could anyone help me?
From what I saw, the QualityModifiers variable is a list of the QuantityModifiers type, but to use this in the content patcher, would it be a string, or a dictionary? If it is a dictionary, how can I know which variables I should put in the dictionary?
I already basically only get complaints on spacecore, might as well pack up and leave when this gets turned on by default /s
(Not that I've checked my mod comments for months...)
It'd be cool to have optional perms... like my mod won't fail to load so long as I can read files even if I'm denied network access for example
It would he a model wrapped in { } yep
How does one go about doing recolors/recoloring tiles using existing recolors for compat (i.e. earthy recolor)
is it all manual recoloring of tiles or
i think earthy has photoshop files for it
How do I know which keys to put in {}
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
sounds like a great reason to just never check spacecore comments tbh





