#making-mods-general
1 messages · Page 515 of 1
it's the shop and the town, so I hope they are
same precedence
i'm not sure how it works if the dialogue is the continuation of it
Also the only way I found how to check the appearance ID they use is to scroll past all their dialogue in the lookup anything menu
that's a bit annoying
i think it refreshes when the dialogue box opens, so my guess is it's fine, but i only tested with regular dialogue and then debug speech after warping
i wonder if with the e break the dialogue is already loaded and the portrait set?
how do you warp an NPC? I had to wait for them to exit the sjop...
debug wctm npcname
(warp character to me)
here's the patch export for the specific appearance btw:
{
"Id": "Winter_Indoor1",
"Condition": null,
"Season": "Winter",
"Indoors": true,
"Outdoors": true,
"Portrait": "AnimePortraits/Abigail/Winter_Indoor1",
"Sprite": "Characters/Abigail_Winter",
"IsIslandAttire": false,
"Precedence": 0,
"Weight": 1
},
{
"Id": "Winter_Outdoor1",
"Condition": null,
"Season": "Winter",
"Indoors": true,
"Outdoors": true,
"Portrait": "AnimePortraits/Abigail/Winter_Outdoor1",
"Sprite": "Characters/Abigail_Winter",
"IsIslandAttire": false,
"Precedence": 0,
"Weight": 1
},
check your bools there for indoor/outdoor
you have Indoors: true and Outdoors: true for both
also i would suggest remove the null fields as it is easier to read stuff
(ah it's the patch export, so you can't remove the null there 😄 oops)
Also I just now realized that I might not be able to fully rely on appearances: I have 2 pairs of indoors/outdoors, but the random choice might missmatch them...
I think the solution is to randomize the load?
is that efficient
which random choice?
well, I have 2 pairs of portraits for winter with the same precedence so that the game randomly chooses which one to use on day start, but it can choose indoor1 with outdoor2, which I don't want
then you may need some synced random
so I'd have to make a single appearance pair with the asset "Winter_Outdoor" and "Winter_Indoor" (with no number) and have a CP random choice choose to load either version 1 or version 2 in them on day start
can you sync random in the appearance system?
with gsq? hold on, I'll look that up
So I'd have one pair with SYNCED_CHOICE day winter_key 1 2 1 and the other with SYNCED_CHOICE day winter_key 1 2 2, is this correct?
yes
I'm assuming I can use a CP token in here too, since I'm using localtokens to make a template, I'll make SYNCED_CHOICE day winter_{{Name}}_key 1 2 1 (or 2)
it should work
nice!
no, use spacecore tile action to run a manual trigger action with multiple actions instead (this is what i’ve been struggling with this week so i have many examples if needed)
Ik BETAS and MMAP both have similar kinds of crimes
perfect, three whole cakes
Hey guys, does anyone know if there is a way to edit/add totem's warp properties? I added a totem that teleports to my own map and for now, I only have a workaround via C#, where it warps me manually to that place. But in that case, it doesn't have the typical warp totem effect. I am also thinking about replacing the location for the beach totem, so the problems are kinda related
*with location I meant just changing the tile, so still on beach
you can with spacecore
the benefit of using spacecore instead of C# are for you to decide however
not sure about what could work on vanilla totem however
if you're already in c# you can do anything
if you wanna change where the vanilla totem goes to you'd patch the relevant code
if East Scarp hasn't done a Load action for a tilesheet, is there a way for me to access it anyway?
I might be able to, but still not good enough XD
look at Object.totemWarpForReal
That sounds useful, thank you
I'll also look into that, I didn't consider spacecore so far at all XD
which tilesheets are you referring to?
all of these
no, if it's not loaded explicitely one way or another, you can't, to my knowledge
lemur may be open to doing that if there's a request however
yeah it would make recolors possible as well
but yeah for now i dont think you can do much
is there a way to test island beach sprites with debug commands?
because wctm applies the summer appearance I defined
they need to change at the change cabin i believe to equip them
i'm not sure how you can test them, at some point people used GIMA for that
I guess I can trust the Load into Portraits/{{Name}}_Beach, it's simple enough, although I don't know if the game adds _Beach to the NPC's default portrait or the current/summer appearance
I compromised and used the default dessert mines
oh actually
bang, I now have a two tile tilesheet for this dumb cave lmao
maybe it's a smart cave that is just shy
how do you find the names of sprites? like, I changed the person from Vincent to Abigail because she has the one I'm looking for, but I can't find out its name. Like I managed to find an example that let me turn it into Mara's clinic outfit, so I know it works.
!unpack
Follow this guide to unpack the game's content files in order to see and explore how the game data is structured.
It's helpful when making your own mods, or just to learn about how the game works!
has anyone else received reports lately that chrome is blocking their mod from being downloaded from nexus and getting flagged as a dangerous file?
not personally but ive seen the issue happen to other people on other browsers so im pretty sure it's a false positive/browsers being overzealous
Anything to do to get users unblocked or get the file unflagged? Because right now users can't do manual downloads if it gets flagged by their browser
i guess you could petition google about it, but realistically no, not that i'm aware of
I'm sorry, I'm still confused. I got to Content Unpacked, but all I'm getting are the sprites themselves. Are they numbered instead?
what exactly are you looking for?
You see that last one? I want to use that sprite first and then make it look like she's sleeping in the clinic afterwards, but I can't even get the current sprite I'm working with to so much as close her eyes
Wait, is it okay that I copy and pasted that? I'm sorry
🤔 what are you using this for? an event?
Yes, I'm testing an event out and writing them down before I put myself to the test by using custom NPCs
ah, then you can just use an event command to show a specific frame.
[[Modding:Events]]
ohchgh
[[Modding:Event_data]]
alright, thank you I appreciate everyone's help
Alright, so, I now found everything that I needed to add all the code for my own warp totem. I would just like to know, what is generally recommended in a situation like this. So in order to make my own warp totem work, I could either copy the decompiled code to have the same effect, or could I maybe add into the decompiled code the case for my own totem. It would be generally a pretty small edit, it would literally just be "case:MyCustomTotem" and then everything should work the same way. But I don't know how. So I am generally curious, what other modders would generally do in a situation like that, because I am guessing that both works
(The actual warping itself is separate, so the decompiled code is just for the whole animation thingy)
!harmony
Harmony is a framework for patching .NET code, allowing you to take any portion of the game's logic and insert or substitute your own. This gives you more flexibility and control than SMAPI helpers and events, at the cost of being typically more complex and difficult to use safely and correctly, and more likely to break with a future update of the game and/or SMAPI.
If you are trying to do something that isn't possible or practical with SMAPI alone, then Harmony is usually the solution.
For more information, refer to the following:
- Harmony Modder Guide - Intro, Use Cases, Initial Setup
- Tutorial: Harmony Patching - Types of patches and code examples
- Decompiling Stardew Valley - For finding methods to patch
^ you will want a patch of some kind
(but also consider just using spacecore)
Okay I see. I guess I'll get into that and decide afterwards what I do, thank you
Yeah, I have to look into that as well XD I'm just trying everything I can before looking for different ways XD
Okay, the wiki says "Harmony should be a last resort", I'm just copying the code for the animation XD and look into spacecore XD
(the wiki is overly aggressive about discouraging harmony, imo)
using spacecore is just using harmony with more (fewer?) steps /lh
I guess ite depends. Just adding the case for a totem should be pretty safe I guess, it is just wayy more dangerous, when you change other crucial code. Messing with the original code is always dangerous XD
Do a postfix and it should be largely harmless
Ah, okay, good to know
Harmony has different levels of invasiveness
Postfixes do the least meddling, generally
if you can do a postfix, and you almost certainly can for this, it's quite safe (not counting the unsolved AVE problem, which is not in your control anyway)
I'll try XD just need some time to understand harmony XD
I’d recommend looking at some mods that use it in addition to reading the docs, to really illustrate what it says
Nah, screw harmony, I'll just copy the 8 9 lines for the animation XD I am barely getting into C#, I'll go to harmony patches when I really need it, but for now, naaah XD
if you don't use harmony you can probably get away with input events (user pressed button when holding item)
Yeah, that's exactly what I've been doing so far XD
hi does anyone know why this code wouldn't work?
private void Test(object? sender, UpdateTickedEventArgs e)
{
if (!Context.IsWorldReady)
return;
Game1.player.SetMovingDown(true);
}
attempting to move the player just from the code
i admittedly dont know what SetMovingDown does but have you confirmed the function is being run (via logging/etc)
yeah i added a log before and after and its hitting both every tick
What does SetMovingDown do? Have you decompiled?
seems like it just set your move direction? doesn't even change your sprite methinks
yeah i think you're right
public override void SetMovingRight(bool b) => this.setMoving((byte) (2 + (b ? 0 : 32 /*0x20*/)));
if (this.movementDirections.Count < 2 && !this.movementDirections.Contains(2) && !this.movementDirections.Contains(0))
{
this.movementDirections.Insert(0, 2);
break;
}
break; ```
Moving the player isn’t a thing that happens normally, it really mainly happens during events, so I’d be suspicious of any functions behaving nicely when applied outside an event
It’s definitely possible (something has to turn mouse/button presses into movement) but it may not be straightforward to directly call
yeah this is what i previously thought, no problem thank you for the help!
Update ticked seems late.
What are you trying to do?
If you're okay with using some undocumented behaviour, you can use them in your map if you change their image source inside the .tmx to something like this, using the seashell_clutter.png tilesheet as an example:
../SMAPI/lemurkat.eastscarp/assets/Locations/Underground/seashell_clutter.png
This will make it load the asset from their mod folder
or a slightly more zoomed out snippet from the .tmx if it makes it clearer:
<tileset firstgid="5464" name="seashell_clutter" tilewidth="16" tileheight="16" tilecount="100" columns="10">
<image source="../SMAPI/lemurkat.eastscarp/assets/Locations/Underground/seashell_clutter.png" width="160" height="160"/>
</tileset>
(obv the firstgid would be different for you in all likelihood thats fine tho)
oh this DOES work?
Only in the latest SMAPI I should add
If any user is not using the latest version of SMAPI this will completely break
the "undocumented behaviour" part is that the SMAPI/lemurkat.eastscarp part of that asset name is what an Internal Asset Key turns into, thats how SMAPI manages private mod assets. you can technically access them any time, you just cannot edit them, and its not said anywhere that you can access it. so technically the format can change and in SMAPI 5.0.0 it might be SMAPI/managedassets/lemurkat.eastscarp/files/assets/Locations/... or whatever, but its unlikely
Hi guys, I’ve finished my portraits and sprites, and I’m trying to follow the wiki to make my NPC appear in-game. I keep running into this problem. Both images are correctly placed in the folder. They are PNG files. I don’t understand what the issue is. [Content Patcher] Patch error: Teleport > Load Characters/Meroe has a FromFile which matches non-existent file 'assets\NPCs\Meroe\Sprites.png'. [Content Patcher] Patch error: Teleport > Load Portraits/Meroe has a FromFile which matches non-existent file 'assets\NPCs\Meroe\Portraits.png'.
good motivation for them to update
Just make sure you set the required SMAPI version in your manifest 
change them from "assets\NPCs\Meroe\Sprites.png"
to "Sprites"
oh no wait
I didn;t actually read your message
oh but I think I guessed correctly anyway actually
do you see file extensions for other files on your computer?
(reason for asking: if not, then that may indicate that your sprite file is actually Sprites.png.png secretly)
that's such a good potential catch
I’ll check, thanks for the tip.
omg i could cry
patch working without extra patch only dependencies
id just like to point out that was always possible with ATA /lh
The good news is that I no longer get the error message! The bad news is that my character doesn’t seem to appear (lol, I’m going to go crazy, I’m progressing very slowly in understanding this).
Is this enough for him to appear? {
"Action": "Load", "Target": "Characters/Meroe", "FromFile": "assets/NPCs/Meroe/Sprites.png" }, { "Action": "Load", "Target": "Portraits/Meroe", "FromFile": "assets/NPCs/Meroe/Portraits.png" }, { "Action": "EditData", "Target": "Data/NPCDispositions", "Entries": { "Meroe": "adult/male/neutral/shy/0/0/SaturnCultureClub/spring summer fall winter 600 SaturnCultureClub 33 10" }
!npc
Keep in mind that making NPCs is a complex process that requires learning many different aspects of Stardew modding.
Here are a few links that can help get you started on all that you need to know:
-
Tiakall has a great tutorial on making a custom NPC for 1.6.
-
NPCs no longer use dispositions, check the wiki page for the new NPC data.
-
Feel free to jump into the https://discord.com/channels/137344473976799233/1277457201077813280 thread for more interactive feedback and help!
-
Fireredlily has a WIP NPC Builder Please do report any errors you get with it into the NPC thread!
im not free enough to provide much help rn but the guide in that first bullet point will be very helpful
if you are following a different guide currently, its very very outdated
Data/NPCDispositions doesnt exist anymore
!json (also in the future when sharing json you should use the json uploader)
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.
how do I toggle cheats? Like debug teleport
console commands are always available as long as you have the Console Commands mod installed, which comes with SMAPI
if you no longer have that mod, reinstall SMAPI
ehhh
no slash
commands dont have slashes in the console
allowing them in the in game chat does require something or whatever that i dont know how to enable probably 👍
Why does this work with maps?
Or does it work anywhere as long as u have a Load 
this only works because of the new SMAPI update that lets you use any image in the content pipeline as a tilesheet
internal assets are still technically available in the content pipeline via the internal asset key format
Oh i mean the SMAPI prefix thing
thats just how SMAPI does internal asset keys
But i have realized where my confusion lie
any asset name prefixed with SMAPI/ is an internally managed asset that only SMAPI itself can edit. why does SMAPI load mod files to those internal assets in the first place? idk. ask Pathos i guess. i imagine its better than loading them from IO every time
Hm then what stop u from EditImage those
SMAPI does
Weh
it specifically will check for the managed asset prefix (SMAPI/) and then return the asset before running any editors
Back to sadness very big i guess
i coulda sworn id talked to you specifically even about the consequences of patching this function to not block you from editing them 
to answer this though itll work anywhere, Load or otherwise. you can use someone elses internal object spritesheet for yours, if you want
if its a file in their mod folder you can grab it, so long as the place you're using it in accepts an asset name
okay I am curious cause this is the 2nd time it's happened. Is something up with nexus donation points?
I averaged 60k per month for like 3-4 years. Then like 5 months ago it got cut in half to 30k.
then again this month it went down to 15k. Monthly downloads have remained relatively stable. actually slightly up in the last 2 months because I released some more mods to help get the numbers up.
nothing has changed with donation points since they changed their algorithm
@fathom hound This is what I use for GMCM recolor compat
// GMCM - buttons
{
"Action": "EditImage",
"Target": "Mods/GenericModConfigMenu/ConfigButton, Mods/GenericModConfigMenu/KeyboardButton",
"FromFile": "assets/{{Target}}.png",
"When": {
"HasMod": "spacechase0.GenericModConfigMenu"
}
},```
If the asset name hasn't changed this should work if you have the files matching the path and names
Thank you kindly 
Hrm if this month = december then i didn't see much change
mods are slightly less rewarding for me over months but i didn't see such a decrease
Tho it's definitely less dp/udl than nov and oct so they probably tweaked the parameters or whatever
It's always kinda variable, that's why non-Fallout mod numbers tanked when the new Fallout show came out
It's part of ad revenue, so it's based on where the site gets traffic or something
i did other research and a few others saw a large cut in august as well. nexus' only statement is that they continue to tweak the formula
and that "other games might have became more popular, and more modders are opting into the donation pool"
They have basically said they want to keep the maffs secret
Yeah, that last bit is tied to what I was saying. It's some fraction of ad revenue, so it's partially tied to where they get traffic on the site
that's one reason I asked here, because if other games did become more popular, then others here in stardew would have also saw a hit as large. but if others haven't then it's just like /shrug?
So i doubt you get much answer from anyone else here 
i think a lot of people also forget that they said the algorithm takes into account unique audience interaction as well
I def got hit hard.
i.e. even if you release a bunch of different mods, if its generally the same set of people downloading your stuff, that counts for less
10 mods with 10k UDLs each is worth less if 9,000 of those people are all the same for every mod
Hmm I did get 40% less DP in December compared to June, while the udl were mostly the same
they said that would only take affect if all the mods are "the same or could be bundled into one single mod easily"
no, thats a separate thing
like a person releasing 10 different skin packs that could have easily just been 1 mod
That's just the part that's re: fighting DP farming
thats not related to the algorithm, thats just related to DP farming
Also looking in the past, my numbers have always dropped a bit in December for some reason
also i would fully believe that more modders are opting into the pool. we've all seen the amount of AI slop being put on stardews page recently. imagine how many other vibe coders are releasing slop for every other game and taking a cut of the pie?
unpopular modding month I guess
If a mod has a requirement that is also your mod, you're getting less DP too
speaking of are you guys able to see UDLs in your reports?
Nope, but you can see them in mod analytics
Yeeeep
ok wasn't sure if i was missing smth lol thanks
one AI mod getting a couple dozen/hundred UDLs in itself isnt gonna take up a lot of the DP. but hundreds of AI mods each getting a couple dozen/hundred UDLs...
and thats just for stardew
ye, don't have that issue.
yeah but that would have hit everyone. same with "other game got more popular".
i mean, you said yourself other people you saw have gotten large cuts
ngl I don't think most people watch their DP stuff like a hawk, seems like a good way to go crazy
My dp/udl went
Oct: 2.35
Nov: 2.28
Dec: 2.00
I assume dec is just that fallout show s2
i noticed cause I use it to pay artists to make mods to pay artists to make mods xD
That'd be a good explanation
That nexus promoted with events on main page and everything
Because S1 wrecked the WHOLE SITE
and they didn't even promote it, it just happened
Oh that's fair, I've just had friends burn out really hard paying very close attention to site numbers and I hate to see it happen
I like the numbers going up and down but i don't take the dp so it's not important really
I'm unemployed, so I'm absolutely taking the DP, but I have seen too many good modders fry themselves focusing on it to pay that close attention
roughly follows the same decrease for me:
Oct: 2.17
Nov: 1.98
Dec: 1.60
(same relative decrease)
You're not the only one, in 2023 it averaged 4 to 5 for me, 2024 3 to 4 and 2025 2 to 3
Yeah at least it's not just one person
The Fallout S2 is a pretty solid explanation, MAN the numbers went haywire when S1 came out
When did S1 came out again? 
On top of the servers just exploding because even the backups they arranged got overloaded
April 2024
lol i remember that.
anyways ty for the chat
Oh yeah, it did cut my DP by 40% then too
Yeah that was a whooole thing
Even my download numbers on my Fallout mods went up, and they've been out for ages
Tbh I also got swept in that and played modded out Fallout 4 for the first time 
I remember being like "man people sure are commenting on my Fallout stuff all of a sudden- OHHH right"
and a lot of the ai mods don't even work 😭 I saw one that just made theoretical code that redirected to nothing and made up location names
someone tried using ai to make a reverb sound mod for another game, but it literally made up fake locations + it was only dependent on the y coordinate for some reason. I wanted to make a similar one for stardew, but I think it requires completely overwriting the sound engine of the game which sounds like a lot of issues 
What is a reverb sound mod? /gen
basically sound physics. I was inspired by the one in minecraft, but for stardew, I feel like it would just be adding reverb to caves and dungeons. I was going to base it off how rain indoors sounds different than outdoors, but that's ambient/background sound and not the other type of sound effects. It would involve stopping how the original sound engine worked sadly, which causes a lot of issues
Aa, an example would be appreciated! I've been trying to make it work via Tiled using both Spacecore and BETAS and couldn't figure out the right format. 😅
"Id": "{{ModId}}_DungeonDoors1",
"Trigger": "Manual",
"MarkActionApplied": false,
"Actions": [
"mushymato.MMAP_WrpHere 0 -3 0 false true",
"Spiderbuttons.BETAS_PlaySound doorClose",
]
},```
Oo, that's super interesting! A shame it doesn't seem to be feasible for SDV...
Aah got it. So refer to the traction, and then definr the traction via json.
yep!
never mind I think I just came up with a solution randomly. Earlier Chu was helping me with a mod that transformed a NPC which involved replacing sprites, so what if it was just replacing audio files based on the location? I think I need to go look at the code a bit more to see if there's a special tag for indoor locations/dungeons 
(I'm sure I've actually done this with BETAS when I tried to make portraits for Central Station happens...)
there's a positional audio framework you could look at maybe
I thought the sound system supported filters
positional audio is more like waterfall and fireplace sounds, what I'm thinking of is replacing the eating sounds and pickaxe sounds
Ah, replacing audio files means manually making a different version of the audio for different locations, right?
yeah I'm pretty sure the sound system doesn't support filters or adding reverb and things like that so it requires replacing sound files
Ie, how the game handles muffling for rain
I thought it did it via playing a different sound cue?
it definitely supports reverb, if it's this you're talking about
Can someone explain this? Is this a bug?
(The special orders board's hover action seems to care about the daily help wanted quest state, and not perform correct hover stuff when there isn't a daily quest available...?)
It's pretty easy to make a transpiler that just replace the audio cue calls 
why would vanilla transpile itself
Oh i mean like if boxosoup wanted to make this reverb mod
huhh but I thought the framework stardew used didn't support reverb (Microsoft.Xna.Framework.Audio)
from the last time i messed with audio i think i remember seeing stuff about reverb but you had to get like distressingly far into the Cue itself
it'd be similar to the NPC one where it does it depending on the location right?
Well no cus it's a harmony patch
Decide what audio cues you wanna take over (possibly all of them) and patch stuff to change how it work
yeah I have no clue where it gets it from
well that specific property is from the AudioChanges thing nic posted
I don't really know what reverb sounds like in game though
theres just more Secret Settings you can access if you dont care about trivial things like "access modifiers"
and "guard rails"
New quote added by chu2.718281828459045235360287471 as #6987 (https://discordapp.com/channels/137344473976799233/156109690059751424/1461142302243160175)
The music system in stardew is fairly custom iirc
it's just confusing to me where the "use reverb" comes from when the things stardew uses doesn't support it
The field use reverb comes from the game's custom data model so I'm guessing your question is more where does the value go
Xact stuff does use the reverb and I presume it does something otherwise why would it exist in the library
but you're not gonna be in stardew's namespace anymore if you go looking
maybe I'm looking at the wrong documentation for Xna 😔
Microsoft.Xna.Framework.Audio.SoundEffectInstance.ApplyReverb()
Are u looking at monogame docs or something else
this is as far as i understand here be dragons
I've been trying to look for that in the docs
maybe I'm just a bit bad at this
😭 bruh when I look for XACT reverb it says page doesn't exist
i think part of the difficulty here is its my undersanding (which may be wrong) that XNA from microsoft like... doesnt exist? anymore? the XNA that this is using comes from monogame or something. but iot uses the MS namespaces for backwards compat
but i dont know much about things
it makes me wonder if the game already applies reverb to sounds inside dungeons, just really minimal
this reverb stuff isnt from stardew though its from the monogame stuff
This is secret enough to not be on monogame docs https://docs.monogame.net/api/Microsoft.Xna.Framework.Audio.SoundEffectInstance.html
No, button, stardew has edited monogame
The monogame packaged with stardew is a fork
honestly trying to use the monogame method sounds a lot more complicated than the "just replace all the files when ur in a dungeon", other than it probably will be more compatible with mods with custom sound effects. Not even sure how to go about it
well either way then there is stuff for reverb in here
because instead of replacing the files, you're going to have to probably change the code ingame, to stop it from playing the sound effects unedited, and that's a bunch of stuff I don't know how to do + probably will break some things; so maybe it's just better to do it the replace the files way. Only downside is the file space I guess?
You can't replace audio cues in the middle of a game
AudioChanges is special snowflake
So yeah decide where to patch if u wanna make this 
😔 you mentioned replacing cue calls, and it would be simple if the logic could just be "if in dungeon play this or not" but I don't think locations in stardew work that way
I've always suspected you could subclass Cue
(Don't kill me)
(Actually what am I saying. You can kill me)
I'll just come back stronger
but what doesn't kill you makes you stronger
This thing doesn't replace cues in game either it just makes them use a different cue if it exists
And only specific cues
For the broad usage u want I'd patch somewhere deeper into the sound library
But i never noticed what reverb even sounds like 
but how does that get the original sound to stop, and then there's the problem of getting the thing to recognize the type of location. I don't think locations have a type like "indoors, cave, outside"
There is inside and outside actually
And Cave is easy enough tbh
There's no cave though that's true
but you don't want to make lewis' house super echoy
yeah I wonder what gets the rain to stop inside caves
But u can just have it be some location custom field
I know enough about various pieces to know how it might work but audio stuff is cursed and i don't wanna touch it myself
yeah I think I see why nobody has tried to attempt this
relooking at the way it plays sound locally, I think it's too cursed to try
Try it anyways

I don't even know where to start, I think I got the logic down, but in practice
it's like trying to put a piece of bread in a toaster without knowing what the toaster looks like. I don't even know where the sound cues for like breaking rocks comes from
I wish it was just as simple as replacing sprites when you move into a new area but music files 
unlike sprites and stuff it's all located in a bank instead of separately so I'm probably going to have to see how other people were able to replace the files
pretty sure there's simply a check buried in there for if (this is MineShaft) do not do that
no particular map property tricks or anything, just hardcoded
I looked at the examples of how other people did it, they used harmony patch like chu suggested, but no idea how that works. It looks very cursed, because it involves stopping the ingame sound then replacing it with your own
Harmony is only slightly cursed
But yeah it lets you stick you grubby paws into the middle of the game code
It’s very fun, and slightly risky as far as game crashes go (you can take precautions to minimize)
I would describe it as letting you stick little bits of code into the game in specific prescribed locations
Basically right before/right after a function runs, although if you get very into Harmony you can also stick code into the middle of functions (that’s where things get tricky)
Can anybody help with a small graphics issue I'm having on one of my mods?
I'm trying to draw a background behind a textbox but it always seems to draw the gfx on top of the textbox, even though I've tried changing the draw order and later depth, I'm a little stumped
The fun bit is that the layer depth mostly doesn't matter because of how the game draws to the screen. (Instead of having one sprite batch, it's constantly opening and closing batches throughout the draw cycle.)
So generally you need to...
- draw your new sprite before the game draws the textbox;
- or redraw the textbox on top of it;
- or patch/override/circumvent the game code to change what it draws.
(+ menus are typically BackToFront anyways)
whats the text box u trying to fiddle with
generally the answer is harmony unfortunately
does anyone know which wiki has the emotes? I closed mine and can't find them anywhere
While you're here, @ivory plume , I swear you used to be able to control the order in which conditions got checked
In this case, the HasValue gates the EnableFor
Content Patcher conditions were never ordered. It's not really possible due to the underlying design, since updating the patch tokens (including in When) and checking the conditions is two different steps. The only exception is HasMod, which is special-cased to support integrations.
There's Modding:Event data#Emotes on the main wiki, if that helps.
Having HasMod in a When field doesn't stop the other conditions from being checked - or am I misunderstanding you and you're not saying it does?
Content Patcher has special logic to check HasMod early (if it's immutable), which should skip the rest of the conditions without error if it fails.
It is not, because that same message that Atra linked has a HasMod check for Custom Tokens, which I did not have installed, but CP warned on the EnableFor token check.
(Also, I might be misremembering, but I think CP warns about CMCT tokens not being found if there's a CMCT token check in the same When field as the HasMod. We usually tell people to put the patch with the CMCT token check inside an Include, and put the HasMod check on the Include patch.)
Do you have a log with that error? (In that case it was validating the syntax when loading the patch info though, not checking the conditions.)
Not right at this moment but I'll run a cut-down setup and grab you one.
(Ah, okay!)
there isn't some obvious way to have a BC machine show the color of the flavor item being processed right
like the machine itself changes blue while making ancient fruit stuff or such
like i know you can manually give it sprite indexes to change it per output rule but i don't think you can just give it one of those color mapped ones yeah?
good news, with the magic of "I did that" you too can do that: https://github.com/zombifier/My_Stardew_Mods/tree/master/ExtraMachineConfig#colored-draw-layers-based-on-output-item
see the dye pot in Cloths and Colors for an example
thank you
@shut edge pinging just in case since it's been 5 min
ah neat, cool
i will probably not use it now since this mod is probably just about ready tho lol
perhaps in an update, good to know anyway
Sorry that took a while, my new glasses arrived so I was excited and then disappointed lol
https://smapi.io/log/e4c9b249a7b24effabc2334943b6d9ce
The patch in question: https://github.com/atravita-mods/StardewMods/blob/2017c2ce5f804d706db34f9a5cbdf00e3c7c4fe1/ContentMods/[CP] Atra's Dialogue Expansion/assets/default/base.json#L3
Log Info: SMAPI 4.4.0 with SDV 1.6.15 build 24356 on Windows 10 (10.0.19045.0), with 74 C# mods and 18 content packs.
Suggested fixes: One or more mods are out of date, consider updating them
EnableFor is a config token, so Content Patcher is able to validate the format when it loads the patch regardless of whether the mod is installed. That error shouldn't happen if you were doing something like TheMightyAmondee.CustomTokens/AnniversarySeason |contains= for example.
That said, the error itself is weird; contains= should work fine with config tokens. 
I think it's because I don't have a spouse so the spouse token is empty. When I comment that patch out, I don't get warnings about any of the other patches which are also using contains with EnableFor.
(what did you mean by "which should skip the rest of the conditions without error if it fails" then if it still checks the other tokens anyway? what does it mean for HasMod to "fail"?)
Essentially the patch lifecycle has three steps for the purposes of this discussion: it's parsed from the raw JSON, loaded into Content Patcher's metadata, and applied at runtime. The special case for HasMod just lets you reference tokens from another mod, without getting no-such-token errors when the mod isn't installed. It's not meant as a get-out-of-jail card to disable all patch validation if the other mod isn't installed, since Content Patcher still needs to parse/load the patch to even get to the point of checking whether the mod is installed.
(Also I'm going by memory, I haven't worked on that particular code in ages.)
would it cause any issues to actually skip the rest of the condition parsing if the HasMod check failed due to the mod being missing?
am i allowed to ask if someone can test my mod? steam is updating rn
since that would be an immutable thing that'd never change, i cant think of what the issue would be if you just then assumed the patch had a set of Conditions that was just "HasMod" that was false
since the other ones would nver be needed as the entire patch would never be applied
It'd be possible, but a bit counter to Content Patcher's design philosophy. It tries to detect and report issues ahead of time, to minimize cases where the mod author releases a version that works for them but fails for players (e.g. because all the errors were hidden by a HasMod condition). That helps keep mods more stable, since you can just launch the mod to test for the basic issues (instead of needing to test every permutation of config/mods/state every time).
So essentially validating the conditions (that aren't specifically related to the HasMod check like missing tokens added by that mod) is by design, though the specific error in this case is a bug.
can we get "unsafe"
thats understandable, and a similar philosophy that i had when making CMCT return false when checking the token validity if the mod isnt installed, as otherwise a typo would silently fail and leave a user confused why something wasnt working, though it does then cause this other workaround being needed of gating things behind an include as mentioned since theres no short circuiting
i guess theres not really anything wrong with that approach per se
it has come up a lot with people using it and getting caught out by it though since its a bit unintuitive
i should do the include for dynamic tokens at some point...
(to clarify: by "return false for token validity" i mean the like, ValidateInput check, not GetValues)
I'd be interested in seeing the various use cases for it; it's certainly possible we could extend the special case without disabling actual static validation.
i like to gate groups of patches behind an include anyway, since then i don't have to repeat the (e.g.) HasMod a bunch of times
i initially started typing a reply to ask about the possibility of that, but then i wasnt really sure how that would look like with the custom token API
i also prefer this! but sometimes you only need one patch and itd be nice if you could just toss that in
i also cant really think of a different use case than something like CMCT anyway
Yeah, I do have experience with CMCT token throwing errors if mod is not installed even if it's after HasMod, but that's because I use them in dynamic tokens. It's not really bothering me that much tho, since the weird workaround with Queries works
honestly thinking about it even though i think chu was joking with the unsafe thing i wonder if thatd be a viable solution as like a named/reserved arg for any token in general to say "if parsing/validating this token fails for whatever reason, just mark it as false and move on"
well if we just had this then it'd work out for nomori
the vague ass idea i had is that u can use includes on jsons that only have "DynamicTokens" field
inside the dynamictokens section
and u have a very limited When u can use that's only hasmod (or other invariant tokens)
besides the cmct usecase, bigass dynamic tokens section is generally a problem for larger cp mods
That'd be very neat
i think there's room for both things, i think it could still be useful to mark tokens in general as safe-to-fail too, though i do think optional dyntokens is a much more important thing
Why just limit it to an include with just dynamic token field tho and not allow includes with both dynamic tokens and changes? Genuine question out of curiosity 
it'll be hard :)
Makes sense 
but mainly the include's position is important
in the Changes section where u put it is where the interior patches will get expanded to
and the order matters for patch priority
similarily u want the interior dts to live where u put the include
hence mixing doesn't make any sense
Ah, so the dynamic token include would be inside the dynamic tokens field?
Okay, that makes full sense now
but you still have to include the same file in both dt and changes section
this seems confusing to me, so i feel being explicit about it (i.e. enforce only "DynamicTokens" ) is better
Yeah, it wouldn't really make sense to do it that way if it requires way more work
Plus I do have the same "compatibility dynamic tokens" I use for 2 separate mods, so having an include with just tokes would be better now that I think about it
The newest D/R added map tile reflections, so how do I directly add the property as a "Custom Properties" using tiled?
it shouldn't matter where tile props come from
here's the standard instructions https://stardewvalleywiki.com/Modding:Maps#Tile_properties
I see I wanted to add it to cattails through the tmx file
Okay so I feel am close, after setting the name I use "ReflectableMapObject" and am set or is it something else?
or "DR_Object_Id"
jerky time
Hello!! I was hoping anyone could help me with a problem I came by (as a very much newbie modder)
Currently I'm working on a mod using the HaveMoreKids framework (which I think is fairly new?) to make an adopt Morgan mod; However I'm having trouble with the mod recognizing Morgan as an NPC (it switches to the default baby sprite and behavior), and I just cant figure out what the issue is
If anyone has any idea on how to help, I'd be very grateful
Hi, do you have LittleNPC or Unique Children installed? Also can you share your json through here? https://smapi.io/json
do you have lookup anything?
Hi! I do not have LittleNPC mod installed, yes I do have lookup anything
Is probably very chopped, I'm throwing stuff at the wall lol;;
if u see this then it worked otherwise it didnt
oh yea another requirement is that the npc Morgan has to exist in your save
you should not need the Load to Characters/Morgan
It doesn't seem to have worked then, It just created a new default baby named Morgan (which is odd, because in the little dialogue that pops up when you adopt a child, it did show me Morgan's portrait )
yea hm something is resetting the internal Name then
I'm testing it in a save where the farmer already met Morgan
can u sent your log?
SMAPI log, right?
a second section u can check is down in the modData (need datamining fields)
every morning HMK attempts to restore the Name from Id
Log Info: SMAPI 4.3.2 with SDV 1.6.15 build 24356 on Microsoft Windows NT 10.0.26200.0, with 42 C# mods and 48 content packs.
Suggested fixes: One or more mods are out of date, consider updating them, SMAPI is out of date, consider updating it
hm it does look like it worked
- mushymato.HaveMoreKids@AdoptedFromNPC@Morgan: KidEntry { KidNPCId = Morgan, IsAdoptedFromNPC = True, PlayerParent = 6171025310727844127, OtherParent = NPC_ADOPT, BirthSeason = Spring, BirthDay = 9 }
as far as HMK itself is concerned this kid is NPC_ADOPT from based on Morgan
can u go turn on datamining fields in LA
This is how it looks, if i search with look up anything "morgan" theres also the normal NPC morgan under it
I'm unsure on how to do that
it's just config setting of lookup anything itself
hrm i wonder if Morgan's lack of Appearances is the issue 
oh AT is installed
those look like normal keys tho si prob not that 
ah yea i rmbr now i do in fact skip the reload sprite when no appearances (which has never came up as a problem for vanilla 
lets just give them something real quick
oh
{
"Action": "EditData",
"Priority": "Low",
"Target": "Data/Characters",
"Fields": {
"Morgan": {
"Appearance": [
{
"Id": "Default",
"Season": null,
"Indoors": true,
"Outdoors": true,
"Portrait": "Portraits/Morgan",
"Sprite": "Characters/Morgan",
"Precedence": 0
}
],
}
}
},
it's an HMK quirk that all custom kids must have at least one valid Appearance entry
Oh, so to be sure, the problem was Morgan having no Appearance field?
and i completely forgot about that for the adopt from npc case
yea
its not anything to do with other mods or vanilla
just literal if (no appearance) { return; } 
in the next version ill try to fill in essentially this
for now just put it somewhere n try again
on nexus how do I add what translations my mod has?
I'll do that, thank you so much!
The most you can do is tag it.
(Just give the language tag, not the Translation tag.)
https://www.nexusmods.com/stardewvalley/mods/41279?tab=files
rock is now added to stardew
thanks so much for everything, and the company
is the panning / hat function hardcoded or something we can replicate?
i don't but i know someone i can bug about it maybe
fun fact, it's the same functions that allow wearing the trimmed purple shorts
that makes sense
honestly probably easier to just watch for the click than use harmony
actually maybe the stuff i wanted to do isn't that simple either, hm
was gonna attempt to make a food item also a hat that grants a buff
the two functions in question are really straightforward (literally "if this item is to be worn which hat to turn it into" and vice versa)
tortilla hat 
that still seems like more work than "if you clicked the hat box, do this" which could make your whole mod into one line of code 
plus you save the harmony warning
however this is very much like deciding which half of a double door to use
lol, also an idea sure
but it also handles rings, trinkets, boots, shirts and pants
@lucid iron I tried running it through the mod's content.JSON (didnt work), but pasting it directly into Morgan's SVE code did the trick lol (I'm sure there's a better way that I didn't figure out), thank you so much! it works perfectly now ❤️
sure and that would make harmony better for a mod that adds multiple things
but overkill for somethin that adds one thing
it does make me wonder how difficult itd be to add special support for Item though to make it possible with BETAS Harmony 
and don't forget it also handles emily stripping you against your will at the desert festival
part of me has wanted to add support for reference types besides string even though i have no reason to
and mannequins
i can file those under user error
and mannequins stripping you against your will
hm does fields not work with priority low 
well either way i hopefully fix this properly by the time u release, do remind me if i forgor
well presumably the patch adding the entire CharacterData entry comes after your fields here with priority low
which is likely just using Entries to add the entire thing
ah yea i am too eepy
thus wiping the appearances
i think my brain actually wanted High and thought of Late
but in CP 2.9.0 if you targetfield into appearances itll create the list if its null
but thats prob bad too cus SCA and such
even though i coulda sworn it did that before too but idk w/e
it is just workaround in the end 
...it doesnt before?
Added field auto-initialization when using Fields to edit a null parent field.
maybe it was specifically with Fields?
maybe this is not actually relevant then, i didnt pay too much attention to this when the update was put out admittedly
I'd like to make a stardew dice mod, but I'm not sure what the easiest way to go about it would be.. 
yeah that makes more sense, since i definitely Entries TargetField-ed a null list before
tbh though i also thought it did it for fields since ic ouldve sworn i tested that with CMF
but whatever
could be a reusable item with spacecore that gives a random "you rolled an <x>" message
the number would be the same all the time without a way to choose a random action
that is probably achieveable with copious use of SYNCED_RANDOM tick
well not all the time but all day
assuming all trigger actions run on the same tick (I have not tested)
i guess you could make a list of 20 trigger actions
yes that is what I envisioned
they should all run samew tick
or I'd just do it with C# 😌
Ohhh, like an inventory item?
heads up that you can't use CP random more than once a day lol i tried to make a magic 8 ball and failed miserably
Aww
we discussed that earlier; if you're willing to write a lot of trigger actions with SYNCED_RANDOM tick conditions it is technically doable
I am willing!

sick
BETAS also has a RandomAction action that streamlines the randomization
it's probably a better idea than the cursed pure vanilla method I mentioned
Ooo okay!
so "on dice use, use RandomAction to randomly pick one from a list of 4/6/8/12/20 ShowHudMessage (from SpaceCore) actions
And I can modify it to be more than one, too?
(Basically you get more dice/rolls over time)
sure, however you want to do it is up to you
Nice!!!
if you prefer a pop-up message and not a hudmessage BETAS has that as well
Actually, is it possible to make it show up in the text chat???
nope
Ah rats...
not with anything but a custom C# component
Okay. That would have been neat for multiplayer. Oh well
send msg to chat action when
SMAPI doesnt even have events to detect chat messages let alone send to em
I feel like sc hud message is basically same thing
If u want it to be in the chat though I'd just make a chat command (in C#)
i personally like the idea of it being an item
That u can just register
Me too! I just wish the message would show in chat too
its all moot anyway since Anaira isnt making a C# component
as far as beginner C# goes, this would be very easy
i mean the example mod on the wiki for Button Pressed is like, halfway there
various colored dice collectible in various ways; collect all 5 of the same color for a full set 
Yeah that would be fun!
There are 6 bonus dice you get
So 7 total, like stardrops!
I can have multiple messages in a single item as well? (Since first it's d6 roll, then d20 rolls)
I figured yes but asking anyway 
i mean with C# you can do anything as long as you write the code for it
True, thank you
when is monster display name actually seen? i'm trying to conditionally edit mummies to appear as something else when in a location. with lookup anything they show as mummy, but i can't tell if that's because my patch is bad or if LA is special
probably the monster slaying goals board
hmm can't check that because i'll be leaving the location lol
it actually probably doesn't matter, because i can be like "these enemies are called x" in an event beforehand or something
if there's nothing to show the enemies name in that specific location anyway, does it matter if they aren't renamed?
Can I ask about making translations for mods in here?
sure
Its my first time, and I'm translating into a language for which the file doesn't exist. It says to copy that one file but idk how to do that, could someone help me?
does it have an i18n folder at all, just no default.json?
It has a i18n folder, and a default.jason in it
But it says to copy the default.jason and rename it. I just literally don't know how to copy a file
right click > copy
Right this is dumb it just worked, but it didn't before. It seems I have to right click on the text and not just anywhere on the "row" of text
Sorry, thanks for the help!
I have a few questions about making a mod translation
-
How do I select the language that the mod should run in? (Its a language that doesn't exist in the base game)
-
When I've translated everything and made a file in the i18n folder, what do I do? Is it done? How do I share it with the mod author?
I appreciate any help, I'm trying to learn how to translate mods
Sadly if this is not a language supported by the base game, this is less easy. You'll have to save your i18n file as another language (or just as default.json) and you can't just send it to the mod author to be added in the mod. You'll have to make a separate mod. The first thing to do is to ask the original author if they're OK that you publish it.
im lost in the horse sauce.. can horses have skins? 🤔
if not then i can just use a random token to pick on out of whichever options i have listed in the config, right?
speaking of horse where on earth is the horse data
I vaguely remember there were mods that added new languages to the game. So, what is your language? Maybe there is a mod for it.
horses? data assets? you misunderstand
oh god.
Ah thats unfortunate, thank you
Swedish
Anyone know if a custom farmhouse mod could affect where a farmhand wakes up? My boyfriend keeps getting kicked out of the main house back into his, which... sends him into the void, because we use the cabin as a workshop.
-# Apologies if this is the wrong channel. I have been sent to multiple channels now after trying support threads.
horses can't have per-instance appearances in vanilla, though you can use AT to get the same effect with multiple horses. otherwise, to replace all horses, you'd just be tokenising the asset name per config value
ah fair enough. maybe one day horses can be freed from their prison
There is currently this work-in-progress Swedish translation, but it's only for 1.5.6, although it is planned to be updated to 1.6
It's not in the game unfortunately
oh, really? shame
is it just the first 5dogs in the game? same as cat
So, you can still do it if you want, but I don't really recommend it. If you are doing this for the purpose of uploading the mod, then don't bother until this Swedish language mod gets updated. And if you want it for personal use, then do as other people said and simply replace it with another language (e.g. using the Spanish language but have a Swedish translation inside it)
well i guess i'll add a new pet breed for iridium cat and dog then
hm whats the flag to give the player to the cat grandpa shrine statue...?
i want to use it as a contion for cat
GotPerfectionStatue 
a fine choice of mail flag 🙂↕️
time to test this thing
hm how do i even do this. how to i get gramps to give me that statue..
yahoo
Are we safe to use rotated tiles from TILED? Or does that need an extra mod requirement>?
can someone please give me an example of how to have characters appear when you're changing an event from one location to another? I already learned about the changeLocation command, but other than that I'm kind of struggling.
the mod that I wanted to learn from has been discontinued for the time being so I can't look in its code for answers, unfortunately.
you should be able to add them to your original actor list and simply hide them offscreen (-1000 -1000 or similar) and warp them in when you need them
thank you i'll try that
hang on i'm being handed a note
(i confabulated that command. do the other thing)
there's addTemporaryActor, which may work for you
right, addTemporaryActor it is. thank you
how do i make a texture pack w/ content patcher
!startmodding take a look at content patcher's documentation, particularly the edit image tutorials
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.
!unpack and do this too
Follow this guide to unpack the game's content files in order to see and explore how the game data is structured.
It's helpful when making your own mods, or just to learn about how the game works!
It won't load the Hospital now, I'm afraid. It says "[game] Event 'MySafeLittleCOrner.Pitiable_HelpChild' has command 'addTemporary Actor farmer 7 17 1' which couldn't be parsed: require index 5 (Vector2 tile > y) not found (list has indexes 0 through 4)" the same for Harvey and Abigail
addTemporaryActor needs more arguments
already done this, have the textures ready and made
also i dont think it works with farmer?
also what do you mean by edit images
i know how to make textures 😭 is that what you're saying
by EditImage i mean the literal Content Patcher action to edit an image in game using your own asset
man the gitlab wiki is genuinely terrible 
keeps breaking my styling.
any good alternatives?
(and that's like two of so far over half a dozen different cases)
HTML
Sorry, but nothing I'm trying is working. Do I need to specify somehow to warp the people to the hopsital or is changeLocation Hospital enough?
Hello everyone so I though about trying to make mods (I hope this is the right channel for this)
And I was thinking if someone could recommend me something simple that I can try to recreate, for practice. (This will be may first mod)
I read through the wiki page and the GitHub though I found all a it a bit confusing and overwhelming. (That is why I am asking for a thing to start with)
(Also I would prefer if the recommendation had something to do more with technical aspects rather than art because I don't know how to draw)
Thank you!
Hello! Personally, I started with editing the dialogue of an NPC 😄
I'd recommend trying to add an item to a shop, I think that one was pretty simple to me. I'm just checking to see if there is a good tutorial
Is there a certain place I should look on how to do both of this in the github page? (the page is really big and kinda got lost)
There is the stardewmoddingwiki that exists with tutorials, just make sure that you aren't using one that has a message about it being obsolete or outdated at the top!
The Stardew Valley Modding wiki (aka the Modding Tutorial Wiki or the Modding Wiki for short) is a companion to the Official Stardew Valley Wiki.
You can think of stardewvalleywiki.com/ as a sort of "textbook" or "dictionary" containing vast amounts of useful information and as the resource for things...
all the information you need are generally here https://stardewvalleywiki.com/Modding:Index
for the shops, here is an example: https://stardewvalleywiki.com/Modding:Shops#Examples I'd recommend trying to add an item to "SeedShop"
after you change location, you will need to warp the characters to where you want them to stand (how would they know otherwise?).
i usually do fade/viewport -1000 -1000/changeLocation/faceDirection actor true/warp actor x y/viewport x y true so everything is in place before the fade-in
All of these are for making mods with content patcher right?
you should also start here too https://stardewvalleywiki.com/Modding:Content_Patcher#Get_started before any of the other stuff
Thank for the information everyone it was really helpful. I think I am ready to give it a shot 
thank you
(I would also argue that if you only want to make a quick mod that you can easily verify works, adding a line of dialogue to an existing NPC is probably one of the simplest tiny mods)
No art assets needed for that at all, just text and JSON code if you are working with Content Patcher
I was thinking adding an already existing item like the pufferfish in the example, yeah you're right
Adding items to an existing shop usually needs TargetField or Fields which can throw off newcomers IIRC
editing an NPC dialogue key is dead simple and easy to verify, as long as you pick the right one of course /lh
I would like to clear my mods folder is there a mod that is needed for the game to run or can I just delete all of them?
content patcher
keep Save Backup and Console Commands
those are the two that ship with SMAPI and can only be replaced by reinstalling it
You will also need Content Patcher since you are creating a CP mod, yep
i deleted it when I was making a CP mod at first hahahah
O ok though I can delete them if I want to install it again (I was thinking about doing a fresh install of all the tools)
https://stardewmodding.wiki.gg/wiki/Tutorial:_Adding_New_Dialogue heres the tutorial for adding new dialogue if you want to try that instead of the shop one
are you having a problem that necessitates this?
should I be using some sort of mod manager? I've been manually moving my mods whenever I test something
I manually update all my mods
Also, should I install stardrop do I need it to check if my mods work easily or is there an alternative
You can just put your mods in a subfolder and rename it to have a . in the front to temporarily disable that set of mods, unless your on an operating system that doesn't like that
I think Linux has issues with that method
it does not
Then I am misremembering!
I am using windows 11 so I thing I will be fine
well, i guess define issues
Though installing the mod manager isn't really that difficult for me so is it generally worth it?
I use the . method all the time on Windows
on unixes (including linux), starting a filename with a . marks it as hidden, so it doesn't show by default to many tools and programs
I vaguely remember people saying that the folder wasn't being ignored at runtime but it was a loooooong time ago
I could absolutely be misremembering
so if you go into a regular file browser and add the dot, your folder will disappear unless you have it set to show hidden files
Hello I am making mod using Csharp HarmonyWhere ca
Where can I ask
this channel
😔 yeah yikes I'm on mac
You can try asking here, I am not C# person but there are usually some around!
!harmony
Harmony is a framework for patching .NET code, allowing you to take any portion of the game's logic and insert or substitute your own. This gives you more flexibility and control than SMAPI helpers and events, at the cost of being typically more complex and difficult to use safely and correctly, and more likely to break with a future update of the game and/or SMAPI.
If you are trying to do something that isn't possible or practical with SMAPI alone, then Harmony is usually the solution.
For more information, refer to the following:
- Harmony Modder Guide - Intro, Use Cases, Initial Setup
- Tutorial: Harmony Patching - Types of patches and code examples
- Decompiling Stardew Valley - For finding methods to patch
Here's general guide but it's better to explain what you want to do
People can give you implementation ideas which may or may not involve harmony
Hello I am trying to reduce GPU usage when it rains
I think these codes are making the Dark Blue screen effect
- Game1.DrawWorld
https://github.com/Dannode36/StardewValleyDecompiled/blob/main/Stardew Valley/StardewValley/Game1.cs
Line 13691
//
if (currentLocation != null && (bool)currentLocation.isOutdoors && !IsFakedBlackScreen() && currentLocation.IsRainingHere())
{
bool isGreenRain = IsGreenRainingHere();
spriteBatch.Draw(staminaRect, graphics.GraphicsDevice.Viewport.Bounds, isGreenRain ? (new Color(0, 120, 150) * 0.22f) : (Color.Blue * 0.2f));
}
//
I tried using Harmony-Prefix-return-false on stuff like Game1.drawWeather
but they only make rain drop not exist
and blue screen effect still exist
I am looking for a way to delete these lines
I am guessing if I can make Game1.currentLocation.IsRainingHere() = null
It might solve my problem. How do I do that?
!decompile
If you want to make SMAPI mods with C#, one important resource is decompiling the game to read the game code. Here's how to do it: https://stardewvalleywiki.com/Modding:Modder_Guide/Get_Started#How_do_I_decompile_the_game_code.3F
When doing stuff like this sure you are looking at a local decompile
Since this bit is deep in the method though I'd consider a transpiler
To just remove the spritebatch draw call
I will Learn some Transpiler
Patching IsRainHere would have impact beyond the visual
wow i had no idea the rain tint was just drawing staminarect over the screen at blue 0.2, that's wild
I know that because i tried patching once and rain just don't exist
So I have to use Transpiler?
If I chose to use a mod manager to open and test my mods which one would you recommend?
I think it's the best way yeah
Since the goal is to eliminate a particular block from getting called completely
!stardrop
Stardrop is a mod manager written specifically for Stardew Valley. See the Stardrop wiki for installation and usage.
See this tutorial for connecting Stardrop to Nexus or updating mods in Stardrop.
If you have issues with Stardrop, see the issue report guide.
I'd match for the is rain here if (which is probably a brfalse) and then change that to a br
Okey thank you
You need to decompile the game to IL in order to know about the instructions to match for, and i think barley wrote a transpiler guide
Ok I just learn coding 5 days ago
And Transplier gave me a headache
I need guide
how do i add a context tag to my item?
Should I create and edit (code) the mods in notepad or should I use a code editor (like VS code)
(I am trying to add the manifest.json file and I don't know what type of file to create)
vs code because you can see syntax errors if you end up making an error. Make a json file
Oh really? Is it unofficial? Where can I find it, github?
How can a link it? (if there is a way)
There's a command with links to the editors if I can remember it
preview, Pet Renamer soon to be replaced by Renamer (which can support pets, horses, kids, and the farm)
!json this one gets you the JSON validator though
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.
Ah-ha, the code editors are at the bottom there too
So in simpler terms (sorry I didn't understand) what should I do in my mods subfolder, how do I create the manifest.json file (and the other files later)
This link should have guided you towards creating the manifest
(sorry for the ping, boxosoup!)
yeah no worries at all, 🙏 I still need help with adding a context tag to my item
Yeah but I don't know what type of file to create in the folder, is it a text document?
JSON
it's a file called json,
All CP code files are JSON files, you may need to turn on file extensions in case your code thinks it's a text file instead
So I should open the folder in vs code and the create the file, not do it from the file explorer?
if it doesn't work on the file explorer then do it in vscode
In VS Code, I usually create a new text file, and then in the prompt at the top of the new file, click Select a Language and get JSON from the dropdown
(new text files prompt you to start typing or select a language before you enter anything in)
for me I name the new file anything.json and it automatically turns it into a json in file explorer or vscode but it might depend on system
You can just start with a JSON file but you have to immediately choose the save location in that case, so have your mod folder created already
OO I understand now thanks everyone 
that looks great!
okay I figured out how to add the context tag to my item
What is a good way to test if mods work in game is there a mod that can take you to certain places or trigger certain events or chain of events (that I can use along side my mod)
console commands (this is why i told you to keep it around)
https://stardewvalleywiki.com/Modding:Console_commands
you can also use CJB cheats for most of the same things, and it's easier to use if you're not used to typing commands into a terminal
O so lets say I wanted to change the dialog of the wizard after his last heart event, I can do that with commands?
I mean check not change the dialog
edit object data, TargetField into the context tags list
yeah debug wtc wizard to go to him and then just talk to him
You can also use a command to forcibly trigger the last heart event to make the conditions match for the dialogue.
So would it be better to try and understand and learn the commands rather than using the recommended mod?
debug ebi <eventid> and don't include the < and >
(Because they feel a little overwhelming for now)
I haven't messed with CJB Cheats, you might be able to trigger events from it?
Either is fine
i personally recommend console commands/debug command entry but i consider myself an atypical user
do whatever gets the job done for you
You use make ichor
exactly!
Thanks for the info everyone 
why does my texture look like this?
too small, bottom pixel row got stretched to fill
Also to the right
is it possible to also change the social page sprite?
yeah you want to edit MugShotSourceRect in character data
Mod Concept:
Hire dwarves.
When you place a structure around rocks and mineable nodes, each day dwarves will mine up to 20 around it.
Is this doable? Has something like it been done?
as usual, everything is doable with determined application of C#
!twocakes as well, i wouldn't worry too much about having an idea someone else has had before
If you discover that someone has made or is making a mod with a similar concept to yours, don't stress! Our community promotes the idea of "two cakes", where two versions of the same idea can peacefully co-exist. Your mod will have your own unique stamp on it that makes it special.
my roommate item is also not working for some reason
did you embiggen your house
16x16
count your pixels
thanks I miscounted them to 20
my engagement dialogue is also not working properly, but I put it as this
need 0 and 1 at the end of the key
probably two separate keys for both
look at unpacked file for reference
the rock is still speaking when I added 2 seperate keys
the accept dialogue isnt controlled by Data/EngagementDialogue
it's for talking to them for a few days afterwards
ohh where can I edit it? I don't see it in the unpacked folder
When you're scaling art, make sure you scale it by a multiple of 2 and use nearest neighbor mode
That will make sure you have nice crisp pixels
yeah I had no clue why my art program was constantly blurring it, so I just zoomed in and screenshoted it 😭 Thanks
Strings/StringsFromCSFiles
NPCNAME_Engaged
look at the two Krobus_ strings in there for example
The default filtering mode for scaling is usually bilinear or bicubic, which works great for photos but not so well for pixel art
😔 idk if theres a function to do that in krita
aww all marriage dialogue is hardcoded?
there should be a dropdown in the tool options panel
what dialogue are you referring to
some strings are hardcoded, but most allows you to override them on a per villager basis
this one, not sure how you override it
im pretty sure all npcs ive talked to used the exact same dialogue
that is one you can override yes
see the wiki page i linked
they use the same dialogue because they dont have specific overrides
uh, I have a couple mods that say they “need” tmxl, but I’m told it’s unnecessary. Can you folks tell me how to fix it?
That depends on how the mods are using it
Some mods you can just remove the dependency, others need to be converted to newer formats, and a few just won't work without it and you can't use them on 1.6
Tmxl has been dead for a while though, and using mods that are that old is not recommended due to potential compatibility issues
At best they are 1.5 mods that never updated, but they may even be 1.4 mods
it's still not working when I tried it
That's not how string keys work
The part before the colon is the asset you need to target, and the part after the colon is the key in the string-string dictionary you need to add/edit
okay I fixed it, but it still doesn't work 😔
Re-read re wiki carefully. It says you need to define two separate dialogue keys in different files
i have those dialogue keys in those files
I do all of my art assets in Krita, there is absolutely an option to resize to nearest neighbor, you just need to make sure that you are resizing by the correct ratio
Oh, then I'm not sure why it's not working. Did you reload the patch?
yes and it still loads the default dialogue
Does your i18n parse correctly?
yeah I didn't do it by 2s, you're right
the i18n works
yeah idk
What does it say about your specific patch? Should have a reason for not applying it if it's not applied
it's applied, at the bottom
!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.
It's really hard to read from screenshots
https://smapi.io/log/87ac371734bf463f85f717e86dfbba76, sounds good here's the smapi log
Log Info: SMAPI 4.4.0 with SDV 1.6.15 build 24356 on macOS Unix 14.6.1, with 3 C# mods and 1 content packs.
Maybe it wants the npc name instead of the id? Or there's some other mismatch between the npc and the dialogue keys?
Idk, the code looks built right
the npc display name?
this part feels really sketchy, but it's how its said in the wiki
Is your blank json load just a json with { } in it?
That seems unlikely but if the id is right maybe that's what it wants? I've never made an npc
Nah, it always wants the internal ID for keys
yeah it is
!json would you mind sharing your JSON files for dialogue.json and also where those engagement dialogue patches are, just in case they are overwriting each other somehow?
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'll be back at my computer momentarily to look at the file structure
https://smapi.io/json/content-patcher/d1b210338796427fa719ddb2305e6922 dialogue json, I moved the engagement dialogue from the content.json to here
take your time, I appreciate everything you've done so far, and wren helping me with the sprites
what do I do if the size should be inbetween the multiples of 2? nvm its good now
Then you end up with inconsistent scaling, with some pixels being larger than others
The best way to solve that is unfortunately to just redraw it on a new layer
#modded-stardew (but my own, obviously)
this channel is for talking shop about making mods
What mod have you made
What does it do
https://www.nexusmods.com/profile/ichortower/mods Hat Mouse Lacey is my golden child
That's actually super cute
I just looked
You have a lot of unique ones
158k unique downloads is nothing to scoff at either
okay, sorry for that delay. Would you mind running patch export Data/EngagementDialogue in the SMAPI console and checking the JSON file it creates in the patch export folder, to see if your dialogue line shows up there?
yep it appears at the end
okay, and the key matches what is expected?
LOL
It just needed to feel threatened by being looked at more closely. 😛
(or needed another restart)
🙏 thanks so much idk why it does now 😭
I learned a lot of neat tricks, thanks! Thanks for also remembering to help too
I was about to ask for the exact context tag you used on the roommate proposal item to make sure it was lowercase, but no need now.
Yeah, sorry it took me so long to get back to you, I got pulled away to deal with something for work
yeah no worries, I took a small break because of it 
how do I get the update tag from nexus?
its the number at the end of your mods url
@pale river you are insane, and I admire that
😭 the same problem came back but for roommate dialogue even tho im 200% sure i did everything right
hmm can we see?
ohh yeah you're gonna want CFE for that i think
but all the dialogue is already replaced
but you should be able to override with just putting the specific daily key for every day bc they take higher priority
one sec lemme draft something..
"{{season}}_{{day}}": "{{i18n:rock}}"
bc the season_day key has highest priority afaik!
wait forgot to summon you @pale river
😭 it's in the screenshot
it did work once but then stopped working after idk why lol

that sleeping dialogue is one of the hardcoded ones in StringsFromCSFiles that happen if the spouse can't path outside of their bed
I think you have to conditionally patch those lines directly if your 'spouse' is your NPC?
this one is def overwritable, because I was able to do it once, but idk why it doesn't do it again
it worked once, idk why it doesn't work again 😭
hmm do you have Outdoor_1 in your file
yes I do
i tried exporting the patch and it said Couldn't load asset 'Characters/Dialogue/MarriageDialogueboxosoup.rock_rockRoommate' using a likely type
did you load a blank for the asset first
I only see the EditData code block
I don't know what you are doing but you are cooking 💯
I loaded a blank for the dialogue one, do I need to do it for the marriagedialogue too?
yes
if it's not in your unpacked content folder you need to load it
because it doesn't exist yet
I loaded the blank and it's still giving default
nevermind my bad
nevermind it still loads the default dialogue
here is the loading the blank dialogue
okay i guess the date specific generic dialogues overwrite my dialogue
Can I suggest this for our humble memes page 😌
according to the wiki, it should be correct
yeah it is, it works now because I manually just put the season_day since generic dialogue takes priority somehow. I'm kind of too lazy to make a spouse schedule of the rock not moving though
I… I don’t know what this is but I love it
pet rock no, wife rock yes
it's my npc rock mod #mod-showcase message, someone asked for a roommate feature, so I spent 5 hours getting it to work
I already published the update
😭 it was originally supposed to be a template for npc, but it probably has too many things going on to be a good template
templates are a difficult thing because you need even more clarity than normal npc making
and clarity requires a lot of experience usually
yeah my portrait template was surprisingly hard and it still only does non-season replacements for all portraits
yeah it has minimal clarity and like 7 unique homes 😭
Hello, I’m working on the animation of one of my characters, the animation runs smoothly until the end, when the character disappears for a second. Then it reappears once the animation starts again. I’m not sure if the issue comes from how it’s written in the json or something else. https://smapi.io/json/content-patcher/05354e69e4ba4636a2695961c010de2d
which animation and can you screenshot your spritesheet?
I’ve checked Janelle’s, but I haven’t tested the others, so I’m not sure if they’ll show the same problem. This is the section I want to animate and here is the video where the issue can be seen.
can you screenshot the whole spritesheet?
preferably in an art software of some kind
i suspect your issue is you forgot that they're 0-indexed
yep, frame 20 on that is blank. remember that you have to count left to right, top to bottom starting with 0
for the 4 where she's sitting down, you want 16 17 18 19
You’re right, I completely forgot. Thank you so much!
np!
Has anybody used SpaceCore spacechase0.SpaceCore_OnItemUsed Trigger? I would really appreciate some example.
Mainly, I'm not sure what use item GSQ conditions to check the right item on the documentation means. I tried ITEM_ID but that doesn't seem to work.
Cornucopia Cooking Recipes uses that, Dolphin
"Action": "EditData",
"Target": "spacechase0.SpaceCore/ObjectExtensionData",
"Entries": {
"{{ModId}}_Magic8Ball": {
"UseForTriggerAction": true
},
}
},```
``` traction:
"{{ModId}}_8BallUsed_BadLuck": {
"Id": "{{ModId}}_8BallUsed_BadLuck",
"Trigger": "spacechase0.SpaceCore_OnItemUsed",
"Condition": "ITEM_ID Input {{ModId}}_Magic8Ball, {{Query: {{DailyLuck}} < 0}}",
"MarkActionApplied": false,
"Actions": [
"spacechase0.SpaceCore_ShowHudMessage \"Outlook not so good...\" (O){{ModId}}_Magic8Ball"
],
},```
Thank you!
Ah-ha! This was the problem. Thank you. 😅
that definitely sounds like it should be on the doc
I looked at Wiki explanation They take a <target> argument which can be Input (the machine input item) and was "well it's not a machine, so". 😅
yeah idk how i knew to use Input, i probably asked in here too
These applies only to vanilla contexts, modded ones can pick what items they want to pass to Input or Target.
(in this case theres also no reason spacecore cant send it to both)
Hypotethical, but if I have this as trigger actions, is there a rule on which one would take precedence? "Actions": [ "RemoveMail All TheMail", "AddMail All TheMail" ]
SO it would remove first, then add it?
Alright, thanks!
Does adding All do...anything
Ohh, right
how are the crates/barrels generated in the mines?
(<MineShaft>location).populateLevel() calls BreakableContainer.GetBarrelForMines() 
Are there any frameworks for mine ore/barrel generation then?
FTM
does FTM do breakable containers?
I thought so, but maybe I'm thinking of Item Extensions?
I'll check both
It's been a hot minute, but I thought Sunberry used FTM for their mines.
They do - but they also use IE
FTM can do breakable items
forgot i already had FTM downloaded for SVE and downloaded it again lol
wait if im doing an editmap patch to put something into a mine floor do i need to change the generation?
spacecore does both
ore generation and breakables?
does spacecore use content.json or its own json to function
you write a content pack for content patcher and edit spacecore assets
using spacecore actions in trigger actions and stuff
ohhh alright
ty
ill see if i can find a mod that uses spacecore for a visual example
well since it's in the mines i dont need ore generation since that's already done for me i just need the barrel generation which i'll use FTM for since i am more comfortable with it
"Action": "EditData",
"Target": "Data/WildTrees",
"Fields":
{
"CustomFields": {}
}
},
{
"Priority": "Default +10",
"Action": "EditData",
"Target": "Data/WildTrees",
"TargetField": ["{{ModId}}_Araguaney", "CustomFields"],
"Entries":
{
"MoorTarPetal.WildTreeFramework.WildSpawnIds": "SpawnId_Forest",
"MoorTarPetal.WildTreeFramework.SpawnChance": "1.0"
}
},```
I'll ask here, since I've already messaged the mod author whose framework I'm using more than once and don't want to seem too evasive
Is there any reason why CustomFields would just have an empty bracket next to it? Or am I supposed to figure out what goes in those?