#making-mods-general
1 messages · Page 407 of 1
Worked perfectly
And it produces Oil from the Oilmaker
I was tempted to make the sunflower have variant shades of blue.
if you have fun, go for it
Procrastination 🙂
If I keep going in this direction I could become known as "That Joja Guy Person"
inspiration strikes where it strikes, we can only try to have lot of inspiration rods and hope
apparently for you the blue one shaped like a J are the most efficient currently 😄
blue is a nice color
Can NPC detect going island resort that day themselves?
detect in what sense?
My NPC is talking every morning "Today I go ***~" and when his schedules changed as going island, all his talking became lie.
Monday is fishing, tuesday chopping, as like that.
So, I wanted to know is it possible or not to detect his plan.
sure, it's perfectly simple
just add some new Resort dialogue keys as shown here:
https://stardewvalleywiki.com/Modding:Dialogue#Special_dialogue
if you prefer, you can completely prevent him from going to the island resort:
https://stardewvalleywiki.com/Modding:NPC_data#Social_features
Resort key? arn't it the dialogs after arrive the island?
...wait a minite. why my NPC is talking ordinally morning dialog in island day at all...?
need to rethink its structure...
the Resort keys are used for various places on the island, so it should be what you want
They are talking about before the NPC goes to the island
Presumably they're talking to them at the crack of dawn
oh i see
And their NPC is like "I'm going fishing at the mountain today!" -toddles off to GI like a LIAR-
forgot they can be interacted with before they go to the island. definitely knew that's how it works
I don't know of any way to detect whether they've been picked for GI attendance with just CP (tbh I don't know any way at all but it's probably possible with C#, right?)
Ooh I was wrong!
someone will be by shortly to say 'anything is possible with c#'
You could put $query IS_VISITING_ISLAND <your npc's internal name> in your dialogue keys and if it's false, have them say their normal thing about their schedule but if it's true have them mention GI.
C# thing?
i would say that personally i wouldn't look forward to making all my dialogues query checking for island, so i would likely mix solutions like :
- having them only be able to visit island on some days
- some of those days can use a query if needed in dialogue
- and maybe make my character speak about other stuff than their schedules
It would look something like this:
"Mon": "$query IS_VISITING_ISLAND <your npc's internal name>#{{i18n: visiting.island.true }}|{{i18n: visiting.island.false.mon }}"
// i18n
"visiting.island.true": "I'm off to Ginger Island today? Are you coming too? We can look for starfish together!",
"visiting.island.false.mon": "Monday again. I'm getting myself an iced coffee for lunch. Always have to treat myself at the start of the work week so I can make it through!"
very helpfull. I'll try to push it in mine.
for extra map layers, do they have to be sequential? or if I make a Front69 will it still render?
it will render ontop of everything lower than 69
even if it's the only extra layer?
Yup
Yep, Thats what I did for one of my mods
great! ty
Hey, this is probably really basic, but when you're crating custom objects how do you tell SDV that players should not be able to pass through them?
Objects that you can place down on the farm, like sprinklers, scarecrows etc
usually they are by default not passable
i'm not even sure you can make them passable
evening PM
anything marked as a bigcraftable isn't passable
this is checked before any other property of the object, so there's no exceptions you can use
The Prime Minister of Vibecoding has learnt some lessons tonight
I
i hope you're not vibe-coding a mod
what's vibecoding
AI-generating code, tldr
a really bad idea is what it is
It's where you tell an AI to make code for you without you having any clue what you're doing.
e
how is that even a thing?
listen man i saw a mod with credits to chatgpt saying it's the authors best friend
which i mean, i don't even know what to say about that
The human brain is wired to take shortcuts where possible to conserve energy. Some people take that too far.
i feel we as society need to do better
Nobody's best friend should be parasocial relationship with LLM...
you'd think, but it's alarmingly easy to form a parasocial relationship with a chatbot
there is a difference between shortcuts and just blindly trusting something that uses sources with no fact checking and just makes shit up
waves hand at my thesis
how is it going?
i've had 0 good experinces with chatbots
Officially crossed 7k words! Only 5k to go and some of that will come from correcting one of my chapters

so much time for modding once I'm done
exciting!
gonna actually start writing dialogue for assorted projects once I'm done
any specific project u have in mind?
ah yes, writing dialogue
I have an expansion planned adding a new area, a dialogue expansion for Gus, and then I just have other stuff that's been on the backburner
all them npc creators do this and im here like what even are words
(The same one I know of?
)
I wrote 50 lines for an npc and p burnt out alr... haven't revisit since 👉👈
I haveeeeee
- Interface
- Indian food
- Dutch food (which is a collab with bestie, which will be fun)
- hi alab
- Soda update
- A separate soda mod
me, who has zero experience in writing and doesn't spend any time around kids: yes i will just write dialouge for my stardew children
there are more?
(yes, that one!
)
(i wish to know too
)
Tee hee
- hi alab
soda soda soda!!!
(once I have something to show, I'll formally tease it bea dw. I also think I mentioned it in smc a couple times?)
Soda soda soda!

What's the use of local token?
templating!
so then I don't need a bajillion individual snippets for each item
I'm planning compat with a bunch of mods out of the box so I have a lot of items
streamlines items
like if you have, a donut that has multiple flavors u can simply local token until u egt them all
[stares at gaystries]
Most useful when you want to do something with the same ID in a variety of different places, like add an object and a recipe and a shop entry
there's more use cases ofc
worked!(maybe) thanks much!

I YEARN
I think I finally get it, it can also make the most information about the item shown in one place. Def nice...
Expect much rambling in your DMs when that happens 
I'm trying to add a custom machine that has a weighted random output minstack/maxstack value. I figured I could do this using conditions since game state queries has a RANDOM condition, but I'm not quite sure the setup I need to do here, anyone got any advice?
looking at MachineOutputRule there's OutputItem and UseFirstValidOutput, i figured I could add a RANDOM condition to the machine item outputs and just choose the first one that gets the chance, but MachineItemOutput doesn't have any conditions field in it. MachineOutputTriggerRule does have a field for conditions, but does it appropriately sync up the trigger -> output?
it depends a lot of how you want the weight to be, but i suggest to look at the stack field
the stack field can accept condition and it may be better suited for what you want
not entirely sure what that is ngl, but surely there must be some kind of way to make conditions work with the existing setup. If OutputItems is a list of condition-less items that will always be picked randomly from unless UseFirstValidOutput is true, then whats the purpose of UseFirstValidOutput? surely the same effect would be achievable by just having only one element in the list. I feel like I must be missing something here because it seems to be setup to allow for conditions but I can't see how
i suggest looking at what that is then!
fair enough, got any resources for where to look for that? googling "stack field stardew valley modding" doesn't come up with much, is it a more general programming term which I'm just incorrectly attributing to stardew valley?
I can't find a field just called "Stack" either
I'm not too familiar with machine , but this could be of help?
https://stardewvalleywiki.com/Modding:Item_queries
Min and max stack prolly
They look like they're int fields, not bools
oh
min and max stack would work but it would lose the weighted randomness that I want to keep. I was thinking of using the item query RANDOM token and making three output rules which would be selected in order via UseFirstValidOutput and just individually checked.
Yes you can do that
That was my first thought
Might have to do some playtesting to land on good values but its possible
You can also use conditions in the quanitity modifiers im pretty sure
was assuming it didn't have a field for conditions but it was in the parent class GenericSpawnItemDataWithCondition
so instead of having three output rules you have multiple quantity modifiers that are random
that can be a little neater
np
"StackModifiers": null,
"StackModifierMode": "Stack",
"StackModifiers": [
{
"Id": "RareDouble",
"Condition": "RANDOM .1",
"Modification": "Multiply",
"Amount": 2.0,
"RandomAmount": null
}
],
Hello! I'm new to the making side of modding, and running into some troubles with my first map mod. Repo is on github at https://github.com/KasualTheGamer/SDV-Mod-Open-Air-Seed-Market. the bug I'm tracking down right now has to do with getting caught in a warp loop between my map and the town's BusStop.
usually this happens because you have one warp sending you on another warp. You need to arrive one tile higher/lower than your warp
Immediate thought is that you've put your warp entry point from your map into the busstop closer to the edge of the map than the warp out of the bus stop.
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's way easier to see if a field exists if looking at the proper place than a random google search
(of course that also requires not stopping at the first result, but that is true for google too, so... )
(this is related to the stack field, not the warp issue)
from my map property: <property name="Warp" value="2 3 BusStop 43 6 2 4 BusStop 43 7"/>, from the content pack for my mod ...
{
"Action": "EditMap",
"Target": "Maps/BusStop",
"AddWarps": [
"43 6 {{ModId}}_SeedShops 1 3",
"43 7 {{ModId}}_SeedShops 1 4"
]
... and there you have it. Thanks!
yeah if you change 43 6 to another value for one of them this should be good! same for 43 7
the other warps look ok at first glance
the 43 point is on the right side of the bus stop, so backing the warp to 42 on the map, and pushing the seed shops map to arrive at 3, i think? I get left and right mixed up, but I can switch if that doesn't work. :)
yeah it's pretty easy to adjust if needed!
out of curiosity, is there some weirdness with content patcher that prevents doing an addwarps on a custom map? I tried doing the same thing for the BusStop warps for my map, but the warps wouldn't add, so I set the warps on the map's properties in Tiled.
hmm, it may be that you weren't targetting the proper map
i dont believe order of operation is too important but it may be a reason
I had it as "Changes": [
{
"Action": "EditData",
"Target": "Data/Locations",
"Entries": {
"{{ModID}}_SeedShops": {
"CreateOnLoad": {
"MapPath": "Maps/KTG.SeedShopsMap"
},
"DisplayName": "{{i18n:DisplayName}}",
"DefaultArrivalTile": {
"X": 9,
"Y": 8
},
"MusicDefault": "AbigailFluteDuet"
},
}
},
Where's your EditMap patch?
The default arrival tile is not a warp, that just sets the tile you arrive on if you are somehow warped to the map via nonspecific means (like debug warp)
"Changes": [
{
"Action": "EditData",
"Target": "Data/Locations",
"Entries": {
"{{ModID}}_SeedShops": {
"CreateOnLoad": {
"MapPath": "Maps/KTG.SeedShopsMap"
},
"DisplayName": "{{i18n:DisplayName}}",
"DefaultArrivalTile": {
"X": 9,
"Y": 8
},
"MusicDefault": "AbigailFluteDuet"
},
"AddWarps": [
" x y BusStop x y"
]
}
},
!codeblock By the way, you can put your code in a much more readable fashion using code blocks
You can embed code in Discord using a series of three ` :
```
Your code can go here
Even if not a haiku
Just an example
```
For syntax highlighting, add the language code on the same line as the first
``` (with no space, like ```json).
The usual codes are cs (C#) and json.
Ah, no, you can't do this in your Data/Locations entry. It has to be an EditMap patch.
I'm not that great with discord
Location data and map data are different things
Ah, okay! I'll give that a shot. I've got my map using CentralStation to prevent overlap, but I can see some folks not caring, and I haven't run across anyone going to the right out of the Bus Stop yet, but you never know
Which is why 'walk to the market' is a config option ... need to finish my thoughts
Ayeisha is to the right off the bus stop, so you'll conflict with her
(But it sounds like you've already given people an option around that)
every vanilla area is kinda full of buildings but hey not everything must be compatible
config option is a great way to deal with that, yes. CS is more reliable imo than finding a free spot in vanilla maps 😄
I too am going for the "put my mod on the map but use CS as an alternative" route
i have considering moving TSP to the central station but i'd need to like, make a map
would solve issues if i ever make another mod that adds items but like
making maps 
idk if this has been done before, but this is indoors / outdoors, will be good for the open world!
ooh that's cool
Wow that's so fancy Erin!
Oh that's smooth! I'm going to have to get back into makeing vanilla stardew on the map!
Ooh, using the same core as your multi-floor house stuff from a while back I imagine?
Actually yeah, that supported SObjects and stuff, didn't it?
here's the content patcher pack:
{
"Format": "2.7.0",
"Changes": [
{
"Action": "EditData",
"Target": "aedenthorn.IndoorOutdoor/dict",
"Entries": {
"{{ModId}}_Example": {
"Location": "StardewOpenWorld",
"Areas": [
{
"X": 5006,
"Y": 5006,
"Width": 19,
"Height": 19
}
]
}
}
}
]
}
different indoors have different arrays, so if you're in one indoor area, other indoor area won't be shown
it just patches DrawTile so nothing too complicated
need to add support for drawing objects, trees, and stuff
Thinking about it, secret woods could use this too!
This could be used for a pretty cool DeepWoods alternative!
it is hard to compete with deep woods imo
Yeah, I'm imagining something mines-like.
i feel set pieces would be quite useful for competition in term of interest
getting a wacky issue that I'm hoping pintail knowers can know: someone trying to use Extra Animal Config's API is complaining that they got the following error: https://smapi.io/log/009879584d51440ebbc39878113fd45d
this is their code: https://github.com/TechnicalityCreations/StardewMods/blob/master/HaySubscription/[CODE]HaySubscription/Apis.cs#L4
and this is the API: https://github.com/zombifier/My_Stardew_Mods/blob/master/ExtraAnimalConfig/Api/IExtraAnimalConfigApi.cs#L28
Log Info: SMAPI 4.3.2 with SDV 1.6.15 build 24356 on Microsoft Windows NT 10.0.26100.0, with 11 C# mods and 2 content packs.
Yes! The corrdinate changes worked, and I took the warp off the map and into content patcher! Thank you @hallow prism!
sure! it's aba that deserves credit for spotting the warp issue however 🙂
glad it's working! curious what the mod will be about!
Thank you @vernal crest
It's my first map, and it's just a seed market
i have to leave for a bit but i have a quick question, there's nothing preventing me to append a dialogue to add a dialogue command or something, right?
from what I can tell it's complaining that it can't map IFeedInfo, but AFAIK the interface's identical in both files?
hmm i don't think so Lumina but i'm no dialouge expert
Does the namespace make a difference
they copied the namespace name in their API too
I mean does the fact that the namespace is identical make a difference
I can't really think of y tho
wacky
I can reproduce in my own mod as well, with a different namespace when importing the api
is something up with IFeedInfo specifically
hmmmm can anyone read mandarin. not sure what this new bug report is about
I think I just says not compatible doesn't it?
nah, it’s actually complaining about the housing market in Canada
Namespace is not relevant
both very possible outcomes
bleh I wanna investigate this further but gotta head to work for 9 hours
the weird thing is that IAnimalProduceCreatedEvent gets mapped fine in the API, and that one’s even more complex
Remind me to take a look after work on Friday if you haven't figured it out
不兼容
Not compat
see, clearly about the Canadian housing market
how do i make a farmhouse mod without worrying about screwing up all the events that happen in there...
ok new question. if i do screw it up will it just be visual errors or will it actually break things/force people to skip events
(There's also home renovations to account for with a farmhouse map.)
the renovations are easy ive edited those before
ok on second thought not "easy" but i changed the rects and the costs and the text and the locations and everything so. even if i run into a roadblock i can just reference what i did last time
prolly about this. uhh i asked about it an DH i think said the smapi.io wasn't updated so stardrop complains
Question for bigger sprite animations. I made a sprite animation that is too big for a single sprite space. I have found that I can use spacecore to make it work, but I’m still curious as to how it works. Do I need to write this code in json.content? Where do I put the sprite animation on the sprite sheet?
I am big stoopid when it comes to code. What can I learn to make this process easier for me? C#? json coding? 
I only know art waah
And I’m like too broke to hire someone to code for me
this is json yeah. id recommend not putting it in your content.json directly and instead doing an include. it helps with bug testing because itll tell you which included file has the error (at least for syntax ones... im not really an expert)
you dont really have to go out of your way to learn json either since stardew modding is relatively easy. you just kinda threw yourself in the deep end with making an npc
you can just go ahead and copy it yeah
the parts after those red // are meant to help you, feel free to ask though
What’s drawoffset?
Like for….the fishing rod?
And for the sprite sheet placement—how does this work, do I just place the sprite in two sprite spaces and leave it at that? How will the sprite be identified by the code?
Yeah I really did, I’ve realized. However this is the only thing I wanted to mod so shrug emoji here
Yep
well it being something youre inspired for is a strong motivator! better to learn with something you want to do than drudging through other stuff
ok i havent done this so take the following with a grain of salt but here's what i think is true
"sourceRectSize" should be how tall and how wide a single frame of the animation is. then "drawOffset" is how many of those it is from the top left of the sprite sheet. so like if your sourc rect were 16, 32 like a normal sprite, and you wanted the first sprite on the fourth row, then your drawoffset would be 0, 3 (since it starts counting from 0)
The drawoffset makes a lot of sense now, since it would help identify where the sprite is on the sheet
exactly yeah!
so the sprite can go anywhere on the sheet theoretically. but i wouldnt overlap it with other parts like the normal walking or flower dance
Anything between walking and flower dance would be fair game then right
the number of frames and such is probably still decided by data/animationDescriptions like a regular animation. and then this part just tells it to be big
i cant remember the npc spritesheet layout off the top of my head one sec
Nah its cool I think I’m good on that part
This makes a lot of sense now. Now I just really really want to make a proof of concept for this project haha!
yeah! once you get something down it becomes a thing of "whoa something i made is in the game that's so cool!" and then you wanna finish it even more. at least in my experience
Omg you’re so right. I’m so excited now
Now I just gotta figure out how to proof lol. Maybe I can spawn him in my house and make him play the violin and walk around a bit. I just gotta figure out how to do all that in the coding part.
There should be tutorial for that in the npc wiki tho, will do that tmr. I gotta go to bed
Tysm for clarifying things for me oclarina I really appreciate it:D
ofc! i hope im right and i didnt lead you astray also ^^;
I’ve been recommended a mod that does smth similar for animations so I’ll check with that mod to see
personaly if the animation needs more than a few sprite frames, i might put it on its own image and then only use that part to animate a single frame on the npcs larger spritesheet
I think it’s no bigger than 2, and I don’t plan on making a bigger animation than this so should be fine ish
mostly because if you put them on the same sheet, you'd be mixing purposes by putting spacecore animations as well as npc animations in the same spot, and separating it will make it easier to find the indexes for spacecore anims. thats my own perspective tho
Yeah if thats all then its fine
iridium recolors also does an animation for something larger than one tile
Curious about this, how would bigger sprites mix up different sprite anim purposes? A bit worried that I will end up doing this on accident.
One sprite tile? I’ll go check that out too then
Hold on
I backread and I got the function entirely wrong
I apologize
I was referring to a different animation feature in spacecore, which functions differently from the npc animation feature
therefore none of what I said applies lol because it does have to be on the npc's spritesheet itself
Tiled update. I think something was just being stupid. I did a full uninstall and reinstall and its working again
hello everyone - newb here! does anyone know the feasibility of using a mod to connect to an external device (such as LED lights) via serial or BLE? wondering if this is possible or if anyone knows any examples I could reference.
Hi, I created a new map and placed some new fish in it. I used the "visible fish" mod, but there are always some fish floating out of the water onto the land and beyond the screen. I want to know if this is the reason for my map? If it is, what should I do to improve this situation?
Well, you get full access to c# in a c# mod so
"As feasible as doing it with c# is"
Which is to say with interfacing with C-based libraries... probably entirely!
But what if I want to interface with a rust based library instead
Portability might be fun
ha - thank you guys
I think there's nothing you can do, it is a visible fish bug
You can double check and make sure you don't secretly have water on the map though
OK,Thank you again. I will have a try.☺
I usually focus on not overlapping with NPCs I play with/like, so my NPCs will be free of overlaps with a random Chinese NPC but will overlap SVE 
XD lol yeah, i get it
Squid just do that sometimes, I don't believe it's a problem with the map.
squid moment....
oh that comment may have been a while ago... hey DIscord, why did you just... not... update until I sent a message?
me replying to Forsy's message from 3AM
The squid thing is technically a bug but it amuses us so we told sheku he's not allowed to fix it 
now worrying if it was a Discord weird or my new router being weird 
Discord, creating awkward moments by being weird! Ah well
@brave fable just saw you updated Raised Garden Beds
Do you happen to know if it's compatible with Let's Move It? Or should I try if I ever play the game again and report back?
do my eyes deceive me?? we got blueberry updates???
hell yeah we r so back
Okay I'm making a mod that adds new aquarium decor, my json files are all working fine but whenever I place the items into the tanks there's a fish sprite just underneath the actual decor sprite. Does anyone know how to fix this?
Here's my content file: https://smapi.io/json/content-patcher/d088a80fdd274dcb8b592f975f3e5444
because you are overlaying the aquarium sprites instead of using your own asset
it isn't recommanded to use the vanilla asset in this case as it is pretty bad for compat
"Lumisteria.MtVapius_Sturgiant": "0/fish/////Mods\Lumisteria.MtVapius\AquariumFishes",
this is how i specify i want to use my custom asset
{
"LogName": "Load images",
"Action": "Load",
"Target": "Mods/Lumisteria.MtVapius/Fishes, Mods/Lumisteria.MtVapius/AquariumFishes",
"FromFile": "assets/images/items/{{TargetWithoutPath}}.png"
},
this is how i load my files including the custom asset
I'm using static fish sprites for this yes
(to clarify by decor i mean coral and clay and such)
No the coral has funny randomization
You get different kinds of coral
Also hat on sea urchin (important feature)
i mean, it's worth seeing what happens with a separate asset and if it's good enough for the purpose
You can make bottom fish tho, which is perhaps close enough for your usecase
doing more testing I also realized I messed up the spritesheet locations, so thats great
okay I set the patch mode to replace and the sprites are all working now
is there a way to show a specific dialogue key for a character, somehow? i want to see if a dialogue change is applied properly and test it in one action rather than patch exporting
debug loaddialogue <NPC> <translation key> should do it
you'll have to talk to em afterwards either manually or via debug db <NPC>
what is the translation key in this case?
a standard translation key in the form of e.g. Characters/Dialogue/Haley:Resort_Leaving
oh interesting, good to know. the wiki didnt say itd show and theres a separate command for showing the currently loaded dialogue so i just assumed it wouldnt
Can someone show me how to install mods? I’m so lost
yeah it's one less step, so it's great 🙂
!gettingstarted (though this is the wrong channel as this one is for MAKING mods. if you run into trouble after following this governor command instructions, you can use the #1272025932932055121 forum)
If you would like a guide to setting up mods for Stardew Valley, check out the getting started guide! https://stardewvalleywiki.com/Modding:Player_Guide
hey lumina may i dm you?
yes
Thank u! Yeah I know I didn’t know where to put it
i want to rewrite the code the game uses to get marriage dialogue but i didnt see in the wiki if thats possible through smapi, would i have to use the ingame variables to work around that or can i somehow replace a method directly?
what’s your use case that (targeted edits to) Characters/Dialogue/MarriageDialogue<NpcNameHere> doesn’t cover?
(you can do anything in C#, but it’s useful to know your intentions lest I suggest using a chainsaw to kill a mosquito
)
the game has hardcoded daysaverandom.next() numbers that i want to change (so they vary based on the number of keys that fit the criteria and etc), im aware that using random{{etc}} in the json can circumvent this but i wanted to see if i could remove that hardcoded limit. ex you can add in an entry under Outdoor_6 via EditData but it wont show up ingame because of the hardcoded daysaverandom.next(5) in NPC.cs (that i see via a decompiler)
(or well, we will be in anywhere between 1 to n months from now)
oh yay!! i do still wanna play around w this though while we're still on .15 (mostly cuz i find this interesting lol), what would i do in that case? does smapi have stuff to replace methods?
!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
there are many ways to solve this, and harmony may not always be necessary
for example you can simply modify the NPC’s currentMarriageDialogue field on day start/time change/entering location
tysm, this is probably as close as i can get w/o directly modifying game code!! it might be easier to change the variable as you mentioned but ill take a look at harmony and see which one is easier !
what do you mean by "directly modifying game code" without harmony?
like if i were to decompile the game and then change those numbers and then recompile it, which wouldnt be a sharable mod at that point ..
ah. most decompiles of the game are not recompileable without a lot of work iirc
im glad that tools like harmony and smapi exist since without those i wouldve went straight into recompiling without knowing much about it 😭 all for minor dialogue changes
scope creep is a bitch
hey guys! Does anyone know why this is the case? it's so specific and unrelated!
kinda just is tbh. Just some weird coding
hurm, alright
so when talking about a custom NPC who needs location dialogue, this block counts as gift tastes specified right?
I have no clue tbh, we'll have to wait for someone who does more content modding to confirm haha
I'll just run it and find out!
excellent point
yep this is how you add gift tastes! make sure you have all 5 types in there delimited by / even if you don't put any values in there
yep they're all in there, thank you for making sure though!
Conversation topics also don't work if the NPC doesn't have gift tastes, so I'd hazard a guess that special dialogue in general fails to fire if the NPC doesn't have gift tastes.
Ahh I see, good to know
lol yeah
well antisocial npcs are a thing
it is important to know what does and doesn't work for them
yeah, I'm wondering if that's how the game could "tell" an NPC was antisocial before 1.6
thank yoba i got into modding after 1.6
every day i find out that everything got so much easier after it
The amount of times I look up how to do something and find it on the 1.16 additions is... frequent
heheheh
1.16, wow we really jumped versions huh
coming back to modding in 1.6 after starting in 1.5 and realising that parentsheetindex is dead was a wonderful moment
🤔 i just watched a video of little crablets swarming the shores to hide in the forest
... can i add that to stardee
w
...
that would be mega cute. like a different jellyfish festival
New quote added by atravita as #6596 (https://discordapp.com/channels/137344473976799233/156109690059751424/1410019636224721027)
what's the deal with parentsheetindex?
Used to be how items were identified
It led to all kinds of horrible hackery and necessitated using either json assets or dynamic game assets to add items
ParentSheetIndex still exists but now it's only used for determining which part of the spritesheet to use
it was also the cause of things like staircases becoming purple shorts
And wallpaper incubation
if you've seen a video its mildly terrifying
baby crabpocalypse
(incidentally this is why many older mods like pfm match against item name instead of id- it made it easier to work with JA items and reduced the number of issues with shared ids)
parent sheet id lives on via 1.5 mods that are only minimally fixed to work in 1.6
but why did it work the way it did, what was it doing in the background to be so awful
it’s just how the game used to work
it wasn’t built with modding in mind, so “position of the item sprite on the spritesheet” was sufficient to uniquely identify an item
because an items entire identity was decided by where it was drawn on Maps/springobjects
(or others depending on if it was a BC or etc)
Christmas island every year
(except for edge cases where you would use an item in an unexpected context)
All items regardless of type used the sprite index (or "tile") to identify which item it was, which led to a few major issues:
- all items of the same type needed to be on the same sprite sheet
- all items needed to have a unique and invariant spot on that sheet
- items of different types could have the same id
wow...
Well a handful of cases the game would check the internal name
Often in an...interesting way
Anyways
There's also the old BO thingy
Yesterday I learned
I think island pedestal still use that one
1.6 separated the index from the id and added a bunch of code to help unify item logic, which fixed a ton of bugs and made everything easier
small fun fact: a BC can work as a barn/coop heater if its internal name is “Heater”
Huh, til
and at some point you just needed to have part of the name being arecrow to behave as such, or something along those lines
ran into it when making a custom heater upgrade; for now I abused that fact to avoid reimplementing that part of the code
it surely won’t explode in my face in subtle ways later
atra why is your screenshot aged
Put it in a cask, duh
Wdym aged
I downloaded it from discord and re-upload it
ah yes, compatibility requests. i remember these
maybe i un-update the mod
more seriously though i have no idea and ive never used lets move it or any other wii fit games about losing weight
Bluebs, is raised garden beds compatible with remove greenhouse shadow
No worries, I'll try it out and report back... eventually
ok well the update itself was about a year and a half late so the time scale here is very accommodating
Blubs is raised garden bed compatible with the sunken garden beds i dig in me field /j
leave a note in your obituary and ill add it to the mod page faqs
New quote added by atravita as #6597 (https://discordapp.com/channels/137344473976799233/156109690059751424/1410031907340685423)
I figured out the solution btw, I didn't realize that aquarium data was also going to be referencing the vanilla aquarium spritesheet. Re-did the spritesheet to situate my sprites around where the fish sprites are located in the vanilla game files (and then updated the content file) and its all working now
Why not load your own- yes
I did, it then loaded the sprites for the fish underneath my sprites
no, but i do hope to have a new Raised House Beds update out to let you sleep a little closer to the ceiling for that bunk bed feeling
that wasnt loading a new sheet
or if you did you didnt point to that sheet in your data
lonelysheepling they mean you can make the game not reference the vanilla sheet whatsoever. a custom sheet would need not concern itself with arranging "around" the vanilla ones
No guides on adding aquarium fish with existing vanilla ids showed me how to do that, this is the solution that worked for me
I'm no expert but I imagine adding things to the vanilla sheets is going to run into compatibility issues pretty fast
Yeah when the 1.6 update came out some sprites overlapped with the new fish
it will be compatible with other mods that touch the sheet, too, not just game updates
incompatible*
vanilla/modded ids shouldn't matter, what matters is the texture field in the aquarium data which you can set to whatevs
if its just for personal use and it works for you then you can ofc decide for yourself what its worth to you
The wiki does specify u can specify ur own sheet
https://stardewvalleywiki.com/Modding:Fish_data , 6th field in Data/AquariumFish
thats not what you did
by setting the 6th field on the AquariumData you can make it use a texture that is not "LooseSprites/AquariumFish"
you're still just using the default vanilla spritesheet
and just editing the spritesheet itself, and not the data in the aquarium
here's an example of a modded aquarium item using a custom sheet loaded into a separate asset name: https://stardewmodding.wiki.gg/wiki/Tutorial:_Adding_a_New_Fish#Aquarium_Data
Anybody knows what will happen if host has some mods that other players don't have
That's some detailed explanation
no, bc the answer depends on the mods
the host and the farmhands should always match modlists
!mpmods
You can mod your multiplayer games, but to avoid any hiccups, all players' mod lists need to match. If players have mismatched mods, you will experience bugs in your game - even if the mods were working fine earlier, there is no guarantee that they will stay that way, and strange things may start occurring.
There are few exceptions to this. The main mod page often includes information on whether or not they work in multiplayer.
See the wiki page for more details on how mods work in multiplayer!
Multiplayer Mod Checker is an easy way to determine if host/farmhand mods match.
yeah, dont mix and match that mod
map mods are definitely in the "this will kaboom your save if not synced" category
Ohhh fair enough, well thanks then
if I'm editing this line to add textures "388": "93/static", //Wood
would I just add two slashes and then the asset name after the static?
more than two, but yes
5 slashes
Have u opened the link?
yes
make sure when writing the asset name you use backslashes \, which you'll always need to write two of \\ to escape them properly
so if your custom spritesheet is loaded to {{ModId}}/MySprites you would write {{ModId}}\\MySprites
ty
SMAPI will handle the slashes for asset names no matter which way they are written, but bc aquarium data splits its sections based off forward slashes, you need to use backslashes here
I also provided an example earlier from vmv
off the top of their head, does anyone know of any mods that send HUD messages when you go to bed? or, even better, where i would find related methods in the decompile?
Spacecore can send hud message when a trigger action is triggered
No idea how that would work on day ended, but it can be done on day started
So maybe it can help as a starting point
i'm looking specifically to expand my C# knowledge, but thank you 
unless you mean reference its code, which could be helpful
Yes looking at the code
in this case its easy though: Game1.addHudMessage()
update: I fixed this by using IDictionary<string, IFeedInfo> instead of Dictionary<string, IFeedInfo>
it's weird that Dictionary<string, string> works though. probably should have used IDictionary the entire time, but ehh too late to change for those existing functions probably
oh i also ran into that with CMCT at one point i think when i was still working on 2.0
probably bc strings are types shared by every assembly
Yup
If both assemblies have access to the type, it's not proxied at all
The dictionary thing makes sense iirc too
Because you can emit a concrete class for an interface
I wonder if there’s any list with all tags we can use for dialogues (even extra or hidden ones), is there any?
WHY SO MANY INFORMATION IM GOING CRAZY
https://stardewvalleywiki.com/Modding:Dialogue lists all vanilla keys + conversation topics
there are no hidden ones, theyre all on the wiki
mods can add their own CTs though (which I'm not sure if that's what you meant)
I did these all but i still get some randomly generated ones ingame, does it mean i cant change them then?
wdym randomly generated ones
I dont know i just like made the custom npc have children and when the farmer was pregnant he would say random things i didnt script
those are controlled by different strings and i believe hardcoded until 1.6.16 is out
i also know there's some things in stringsfromCSfiles or something
(dont quote me on that 1.6.16 part)
(idk if this is what you're talking about)
New quote added by bblueberry as #6598 (https://discordapp.com/channels/137344473976799233/156109690059751424/1410049497542688798)
youve been quoted, unfortunately
YES basically this but for a male npc
Are these custom keys?
you can conditionally change them when your NPC is the one married to, i suppose, though that wouldnt handle polyamoury
it's fine for now i'm sure, all characters use the same ones, so you're not an outlier
New quote added by atravita as #6599 (https://discordapp.com/channels/137344473976799233/156109690059751424/1410051290225971222)
so how did you even find out rgb had an update. dont tell me youve had a no-longer-compatible error mod in your list for the last 18 months
New quote added by atravita as #6600 (https://discordapp.com/channels/137344473976799233/156109690059751424/1410051375064420382)
I'm glad you are doing well atra
possibly Watched the mod on nexus. some people actually do this
sorry Tracked not Watched
how can I get smapi or stardew to give me the save id?
I forget to track mods so sometimes I'll have no clue there's an update, and ill like.. never know bc they forgot the update key
do you mean a farmer's unique multiplayer ID?
Or do you just mean the save name(?)
i'm pretty sure the number is simply from player.uniqueMultiplayerID, for the master player
either way, SMAPI has Constants.GetSaveFolderName()
thank
out of interest, why do you need the save folder specifically
I just want to use it as a seed for rand
Game1.uniqueIDForThisGame is much easier then
thats just the number part and not the save name
i mean the game usually uses whatever it wants
also, be aware that the save ID can be seeded by the player
Utility.GetDaySaveRandom() (?) is pretty common as a mix of both
as in, its literally just the save seed they put in the save creation screen
this may or may not be a downside to you
nah I want it to be the same seed for each save file so...
Yep go for it 
i think i have a lack of understanding how classes work, perhaps. how do i tell it the message that i want to send? it doesn't accept a string, even though public string message exists in the HUDMessage class
i've tried to declare a HUDMessage object in several different ways, all of which threw errors
nic my advice for classes in modding is dw about it oop is lame anyways 
good bc OOP is why i dropped my java class lmao
The straight forward kind of behavior of code in a video game is <something> happened, and therefore <mything> should happen
What do you do if you dont oop
It got linked in Sunberry!
the whole game loop can be thought of as events 
nothing
majored in linguistics instead
In your case you have a day ending event, and inside there you can construct a HUDMessage to do what you want
It doesn't need to persist beyond this event
Is there a trigger action for like when my mod is run for the first time on a save?
No
wack okay
- objects are generally created either through a constructor (
new myfunnytype()) or through a method that happens to return anewobject for you. - referencing members of a type, not an instance, is static behaviour. these members are instances on the type itself, not on any instance of that type created with
new, and all usages will reference that same single instance. - by calling
HUDMessage.messageyou're trying to accessmessagestatically because you don't have an instance ofHUDMessage, but it's an instance member ofHUDMessageso you'd need to create an instance first if you wanted to do it this way - to define a string message, you want to use
string message = "hello",var message = "hello", or define a lambda function to reevaluate it whenever referenced withvar message = () => "hello". you've instead tried to define and assign to a static method and a bunch of other things at once, so it'll need rewriting.
Er, but also DayStarted that doesnt repeat would be lole that
But that's not an individual Action thing
if you just want to have a string always be the same, you could use private const string MyWeddingMessage = "hello" or private static string MyWeddingMessage = "hello" if you preferred/required static behaviour, which can be accessed with this.MyWeddingMessage or ModEntry.MyWeddingMessage respectively
if you wanted to load translated text from i18n, you could use a lambda like so```cs
private string MyWeddingMessage = () => this.Helper.Translation.Get("my.i18n.key");
which will ask the i18n helper to get the translated string each time it's called
think that's the right syntax anyway, discord isn't a helpful ide
how does it know to reference a specific json file? is that baked into Helper.Translation?
i have so many other questions but that's the only one i can clearly articulate right now
more on lambdas here, but essentially it's private because we don't want or expect anyone else to use it, it's not static because it has to reference our mod instance with this (remember static members don't have an instance reference, only the type), it's of type string because we're implicitly returning a string value, it defines an empty list of parameters () , forms a lambda with => syntax, and then runs the line of code afterwards (or a {} scope that returns the expected type, if needed)
the translation helper does all the magic of picking the relevant translation for you, you just need to use the same structure as CP by having an i18n folder with the expected files inside
Late reply but nope, I didn't add a sword swing animation (I don't know how to either). Apologies!
You could probably accomplish a similar effect with a temporaryAnimatedSprite, though. I'll have to mess around with it.
idk how you would do that with the farmer, but good luck!
how can i fix this error? what am i not understanding
all this is to say that if you're not reusing the MyWeddingMessage behaviour elsewhere you're ofc free to just call Game1.addHUDMessage(this.Helper.Translation.Get("my.i18n.key")); inline when needed, or however else you'd get your message
oh let me try that, i don't need to reuse it
(AddHUDMessage doesnt take a string)
oh i see, it wants a HUDMessage instance, not the text for the hudmessage, which means you've got to create one yourself
yeah that's what i was originally trying with the first screenshot (badly)
which should be simple, iirc all you need to do is use new HUDMessage(this.Helper.Translation.Get("...")) to create a new one with your translated text
is new built into C#, and is all it does call the method and return the object?
Yeah, it's a Constructor
it calls a constructor, one of however many are defined on the class, and whichever one matches the types of the params you provide in the parentheses
okay and i'm providing that i want a string by telling it to Get it from i18n?
the HUDMessage constructor wants the string, *you *have to do what it wants
but yes, you're fulfilling the param by getting a string from Helper.Translation.Get()
is this a constructor?
yes! an unnamed method that returns the containing type is a constructor
in this case, that constructor first runs the HUDMessage (this) constructor with the params string, float (fulfilled by message, 3500f)
and then runs whatever's contained in its own {} method scope
how does it know which constructor that i want? there are 4 or 5 in HUDMessage
these can chain endlessly from constructor to constructor, including to the superclass (inherited, parent, base, ..)
that's for you to decide depending on your use case
in this case though it looks like there's helpful xml docs on each that describe why you'd use each
so if i wanted the second, i would pass the params string, int and it would know to look for that one?
(where multiple methods with different parameters and with the same name, or multiple constructors, are considered overloads)
It would be cute if the icon is the mermaid pendant
i will put that down as number 28374628 on my list of "how make work" (not being sarcastic, i like it)
pretty sure you'd just use Game1.addHUDMessageForItem() or somesuch, maybe editing the text of that message afterwards if you can't set it as a param
i think the next question i have is: how do i make it yes/no like the "go to bed" question? i searched for bed and nothing useful came up
aha
question dialogues will joyfully introduce you to the concept of delegates and callbacks since it's a mess
uh oh
you'd also need to probably need to use harmony to replace the usual Sleep behaviour with your own
which is probably a transpiler since it's not its own exclusive method
which means learning IL
uhhh then maybe i'll stick to sending mail about it 
i would just do the reminder when they enter the farmhouse
or maybe when they leave in the morning
i mean the hudmessage works too, you'd probably just want to show it on day started on the morning before the wedding, instead of on day ending on the night before the morning before the wedding
since otherwise it'll immediately be slapped with the EndOfNightMenu and save screen and never appear when the save is next loaded since you're no longer on the night before anymore
i've been operating under the assumption that the wedding starts immediately the morning of the wedding, before you even step outside--is that not true
i mean the morning before the wedding, not the morning of the wedding
gotcha
how could i tell if they're entering the farmhouse at 9am because they forgot their keys, vs at 9pm to go to bed?
add a new event handler to helper.Events.Player.Warped or whatever it is, check if e.NewLocation is FarmHouse house && house.owner == Game1.player.uniqueMultiplayerId or however it is, then show your message
you probably dont really need to if you just do it every time
if you wanted to get fancier you could check when the player enters a rectangle around the bed
i was thinking this but wasn't sure if that wouldn't be desired behavior
you don't know when the player wants to go to bed, they might do it first thing in the morning to skip to the wedding
i would call it desired behaviour if the mod page said its what itd do

modding life hack
lol
on that note, it wouldn't work if someone slept for three days straight to get to their wedding... since they would never warp back in
depends if the Warped event fires on each day i suppose
you can do it both on warped and on day started
you'll find a lot of these questions can only be answered by trial and error
or if you prefer, by reading the code thoroughly to get a good idea of how it'll work
but that's lame
i think this is what i'll do, because i like that it also provides a back-up reminder
just as a quick aside about events since now you're looking at adding more than one, you can register as many handlers to as many events as you like, and you can register the same handler to the same event as many times as you like (usually you would like only once)
add handlers with += operator, and remove them with -= if you need to
and an event handler is a method that references one of the game-defined events?
handlers are added by named reference, but not by call, e.g. Warped += OnWarped; instead of Warped += OnWarped();
sure, an event handler isn't a specific construct, it's just a name for whatever method (or lambda) with matching parameters for the event
got it
well it can be any event so long as it's defined
feel free to send mail when lightning hits the farm because that has its own event
(i just didnt want nic to go looking for Warped or DayStarted events in the decompile)
yeah i def wouldn't have known the difference lol
did i get GameLoop_DayEnding from somewhere (in the code, not from blueberry lol), or did i make that up (and could have called it anything?)
i tried changing it to DayStarted on both sides and it liked it on the left but not on the right
Green underline...
telling me to touch grass /j
no i have no idea what that warning means
Idk either tbh, but if u mouse over it'll probably say something more useful
if you go to your GameLoop_DayEnding method you'll notice it has specific parameters for the DayEnding event
chances are Intellisense(tm) created that method for you when you went to write up that line
Oh u need object?
if you change the left-hand-side reference to the DayStarted event, you'll also want to change the parameters of your right-hand-side method to match the ones it wants
if you hover DayStarted it'll tell you the expected types
and yes, you can call your methods anything, so long as it's not a reserved word, doesn't start with a number, doesn't contain illegal characters, terms and conditions apply, etc
are there no expected types?
press F2 with the caret on a name to try and rename all references in the project
or like shift-alt-f12 or something unholy if you use jetbrains products
try using the params (object sender, DayStartedEventArgs e)
wat
no wait i'm stupid it didn't have this, it had DayEndingEventArgs still. this worked
it's disappointing that convention calls for the phrase reserved words instead of words of power
how can i find out what params this method wants? like how did you know it wanted (object sender, DayStartedEventArgs e)
why, it tells you right there in your image
`No overload for (your method) matches delegate EventHandler<WarpedEventArgs>'
ohhhh inside the <> ?
so your parameters are object, WarpedEventArgs
oh inside the ' '
(object is implicit and usually null and zero people in history have referenced it)
EventHandler is object, <WarpedEventArgs> is...
oh i see
and can i write whatever instead of e in my method, or does it have meaning?
here i should mention that <> denotes that EventHandler<T> is a generic class, or a particular member of a generic class, where one may be created based on any type T , and you'll want to read up on generics somewhere else entirely because i'm not paid to write on discord
are you paid to write anywhere else?
the parameter name doesn't need to match, just the types
well yes, in my ide. at my job. in my office. that i'm in
you dont seem to be doing much writing there
sorry to keep bugging you with questions, i really do appreciate it!
does this logic look correct? i copied the day started method and i think i implemented the checks correctly according to what you said, blueberry
it would be checking if you warped into a farmhouse and then checking if it belongs to you
at a glance it looks good
i'm sure you're familiar already with test saves and debug commands so you'll know how to do a test run
yep, i just have to make a manifest and compile i think
and an i18n file
i'm still only halfway through the button push test lol
instead of i18n if u use Game1.content.LoadString then ppl can edit it 
advanced topic for the second semister
if you wanted you could separate the whole contents of DayStarted into its own TrySendWeddingMessage() method to reduce code reduplication, but for now give it a test, see if it works, and setup git for your project so you can make a commit milestone here for easy changes with a safety net of your saved code
ooh yes! would they access it like how i access stuff spacecore exposes, for example?
yea its just a C# mod reading from content, which content patcher edits
all content is equal, whether it's mods/spacechase0.spacecore/myfunnydict or data/objects
Say, can I use whether the player has a specific Mastery as a condition? I'm not seeing a condition on the wiki that seems to match Masteries, unless it's maybe a Base Skill Level at 11 or something
they each get a stat, i dont remember it off hand but you can check Data/Powers
Cool, thank you
since they use it to show which masteries you have in the powers tab
the masteries are in the powers tab so there should be something there for it, yeah
so you;'d use PLAYER_STAT with it
PLAYER_STAT Current mastery_0 1
Perfect, thank you
how do i make VS recognize my manifest? i tried file>new but that didn't seem to put it in the project
the tutorial just says add your manifest then build
are you sure you clicked the right place when you right clicked to add file
where did u save the file
here
move it into WeedingReminder
move it in
*Wedding
"you're getting married tomorrow, but a growing number of weeds have damaged the farm. you may need to evaluate your priorities"
my second C# mod--
your spouse may have signed up for life or death but they didn't sign up for weeds
since you mentioned 'place project in solution folder' the other day, i'll note that the manifest should be on the project level, so if you'd checked that box then the manifest would be where it is in the image above
ah that's probably why then
A mod that lets your spouse snide at you for the weeds you refuse to scythe 
me getting married in green rain
but since you didn't, it goes into the project folder
on earth they ask "would you like me if I was a worm"
in stardew valley they ask "would you like me if I was a weed--" fuck, you guys already like weeds
did you upgrade your house. broke ass
day 1. bro she should be running away already
lmaooo i'm not good enough for her i see i see
it works! i got no translation because i forgot to make i18n but it works!
do i need to rebuild after adding i18n?
or can i do that in notepad++ and file explorer like normal
not in this case
this is C# territory where if the string aint in the i18n, its in the C#
you'll need to rebuild after adding your i18n
no worries, i didn't clarify!
i will not ignore you bc i think you have a lovely presence
however i will gently inform when the presence is incorrect on some small things
and it is always appreciated and warranted, thank you Button 
@brave fable say can i add new raised garden beds
wow it comes with a recipe model
Using tile properties to allow tiles to show both when indoors and outdoors (the leaf border in AlwaysFront)
i actually made the rgb 1.6 compat commit like half a year ago i have no idea why half of this is written the way it is
can i get the mod without the added rgb, i prefer a simpler style without all the colourful lights
OG dragon quest? in my stardew? it's more likely than you think! /lh
(C#) anyone know a convenient incantation to determine whether an NPC is
a. standing still at a schedule stop, or
b. en route to their next stop?
performance is a factor, so iteration should be avoided. i'm hoping somebody knows a useful combination of NPC/Character properties that has not yet revealed itself to me during code inspection
doesn't isAtEndPoint do that?
does it? (NPC.controller?.isAtEndPoint()?)
NPC.controller.pathToEndPoint would be empty I think when at the schedule stop, but taking a quick glance not sure a good way to check if it is empty or not
the pathfind controller 'eats' points from the path/stack as the npc is walking as part of the schedule, and there is a stack per time section of the schedule
hmm, ok. thanks!
isAtEndPoint doesn't look bulletproof as the stack can contain points from multiple locations (and the pathfind controller doesn't really know which point belongs to which map) so can have a false positive
does everything you load using C# have to be a string/string dictionary (barring maps/images)?
no
Naw any type is fine
string string is a lil special because LoadString specifically wants it
oh that's actually good
i was trying to load just a string and it was having issues
when you use a framework that says "edit my custom asset"
there is usually some class behind it
this is my method to store a default HUD message. people would target my path in CP to edit it, right?
also, i found the C# side of the wiki and you can tell lol
you don't have to do this tbh 
as in, not actually needed to init the dict from C# side
loading blank json from cp side also works so up to u basically
but putting aside details this is correct for doing equiv of this
would doing it through CP be two mods/manifests?
i'll def do that for more involved stuff, but not sure about doing it for literally one string lmao
{
"Action": "Load",
"Target": "yourassetname/HUDMessage",
"FromFile": "mystery.json"
}
where mystery.json is
{
"Default": "etc."
}
but what i actually meant is
you can use a string string asset like this for specific spouses
oh so like someone could edit in "You're marrying Morris tomorrow!" ?
to "Morris": instead of "Default": ?
yea
LoadStringReturnNullIfNotFound is helpful cus you can detect whether you actually got a string 
but yes second semister thing™ just do this with Default for now, maybe even source Default from yer i18n lol
and just to be clear: if i add this through C#, does it prevent people from adding their Morris key?
if you use the AssetRequested etc. events provided from SMAPI Content Events then you're running them through the same content pipeline as any other assets
so no, you won't prevent them unless you load from your mod assets directly
ok i think i get it. in this specific case i feel like it's easier to add it through C# then since it's literally only one string and i don't see downsides to doing it this way (correct me if i'm wrong, and it's good to know i can do it through CP instead if i want)
the downside is it's ugly
the bottomless pit side is that you don't get to use all of the conveniences offered by content patcher
the upside is that u can stop yearning for the foreach (cus you have it :))
true, you do get the loops
are you both talking in general, or in this specific instance? i'm not trying to be obtuse i promise
i'll take you at your word i just want to be sure
i suppose you can also reference other assets directly, which i can show with an exemplary example from this extremely sexy & popular mod
https://github.com/b-b-blueberry/SeedsUnboxed/blob/master/SeedsUnpacked/ModEntry.cs#L46-L97
where i edit data/objects and assign corresponding values from data/crops, assuming it's been loaded already
conveniently this also highlights how you can load an asset containing data of complex types to a class instance
I thought someone said that one can use tokens in the i18n default file, but it is very much not working for me
in general -- you don't need to use them here at all
you must pass them into the token, and they cannot be used in the i18n key, only the value
Ohhhh I see. Thank you, that's just what I was looking for
if you end up using many passthroughs, you can end up setting them all up in ONE passthrough token from hell
good times
https://smapi.io/log/2b5856b7f60e4c48b7c9c448011a3169 (is it preferred to upload code somewhere like the json validator, or are screenshots okay?) i got the same error when i had \\ in my path
Log Info: SMAPI 4.2.1 with SDV 1.6.15 build 24356 on Microsoft Windows 11 Pro, with 22 C# mods and 3 content packs.
Suggested fixes: One or more mods are out of date, consider updating them, SMAPI is out of date, consider updating it
https://smapi.io/json/content-patcher/ef00c81e6ef64b7f89a35cdadc8d412b also my content.json
i feel like the issue is inside of LoadString...how does it know what string to load out of the whole dictionary? i must need to tell it to look for a specific one, but i'm not sure how
as an example, Game1.content.LoadString("Strings\\Buildings:UnderConstruction") means check the asset Strings/Buildings for an entry with the key "UnderConstruction"
so you'd want a colon followed by the specific key you're loading
just like i18n then, that makes sense. thank you!
C# can't use CP tokens like {{Spouse}} i'm assuming
but i could use a loop...
iirc there's a field on Farmer (i.e. on Game1.player) to check their spouse, poly mods aside
but in general no, those tokens are used by CP, so it has to pass through CP to get converted to anything
also there are tokenized strings, but I've never used those personally
if i think about poly compat my head will explode, so no need to worry about that right now haha
(also ftr while I'm here)
a minor update to EMP is out:
Esca.EMP/PlayerStatis case-insensitive now (and slightly faster because it uses the cache properly) (thanks chu & button)Esca.EMP_IS_TIME_PASSINGGSQ added to check whether the game is paused; not guaranteed to work on Android or certain niche cases, though
i didnt do anything but im very happy to see this 
I would've ignored my "todo: cache better" comment a lot longer if you two didn't discuss it 
confusing
string SpouseSpecificHUDMessage = Game1.content.LoadString("handwrittenhello.weddingReminder/HUDMessage:" + Game1.player.spouse); why is this returning the literal path and not the value of the dictionary
im not sure
Do u have the key in ur dict
this is my i18n
i'm getting this:
oh hang on it must be a mismatch with i18n
lord i need to get a rubber duck and stop bothering you all
Patch export your asset
That's more important usually
And dw i
this channel all the time
i rubber duck this channel too
i only added it to my i18n and not in my actual content.json like a rookie
im a rookie
@ivory plume just to double check, is it intended that something like this does not work:
"Action": "Load",
"Target": "{{DynamicTokenList}}",
"FromFile": "assets/Portraits/{{TargetWithoutPath}}.png"
where {{DynamicTokenList}} is something like Portraits/Abigail, Portraits/Haley literally as its value and i have an Abigail.png and a Haley.png in my assets folder
i ask cuz looking at Content Patcher's source, it seems clear enough to me why it doesnt work (PatchManager.SplitPatches() is called before/without token parsing, and they arent even ready by then anyway i believe) but what confused me at first was that it didnt give me a non-existent FromFile error, but it did if i used {{Target}} or {{TargetPathOnly}} instead. i assume System.Path just looks for the last / for {{TargetWithoutPath}} and thats why, but it still threw me for a loop for a bit wondering why one Target* token "worked" and the others didnt, which is why i wanted to ask if this is intended behaviour and/or if this was a hard technical limitation that meant using a token for a Target like this will never be feasibly possible
woah
what does a duck do
is that a serious question
(/gen idk if ur asking jokingly or dont know what rubber duck debugging is genuinely)
duck good
i can't add constants to the HUDMessage class, right? i'm trying to implement one last thing, which is displaying an icon with the message, but it takes an int and there are only a limited number of consts declared
you cannot change the members of a game class
okay makes sense, thanks
even with harmony you can only add, remove, or change behaviours in or around methods of a game class, you can't actually add, remove, or change the members themselves
and previous proposals for solutions to this have been rejected because it's infernal
wasnt the outcome of the cecil mods PR to simply put a pin in it?
anyway you are in fact able to change the icon of the hudmessage, but i couldn't tell you how atm
the answer also depends on what exactly you want to use as the icon
i'm checking spacecore because i know it has it for trigger aciton on item use, but i can't really read it tbh
i was thinking easy mode = the mermaid pendant, hard mode = your spouse's sprite upper half
I'd love to get into modding a bit more, tho I couldnt find any good guides, does anyone have some tips? I can code Java, Python, js etc. tho never really touched C# kinda having a hard time with the library management and stuff, it just feels really weird. Also I kinda dont get the modding part itself even tho I've modded other games like Minecraft etc. So I'd really appreciate some links or just tips
easy mode and hard mode are actually the same, but hard mode involves adding a dummy item that uses spouse texture name as the texture field 😌
maybe not that then 😂
!startmodding is the usual reference
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.
^
Alr, thank you. I will definetly check that out later
sees rubber duck mention. inspo. functional rubber duck is born
what is the function of a rubber duck 
debugging
Squeaking
need this immediately
after looking around the decompiled HUDMessage class for a bit, it's very simple.
the draw() method will always draw your message when set, even if you've also set messageSubject (the item shown), which means we can simply create a new HUDMessage(message) and assign the item afterwards
which in boring syntax might look like this:```cs
var hudmessage = new HUDMessage("Your wedding is today!!!");
hudmessage.messageSubject = ItemRegistry.Create("(O)460");
Game1.addHUDMessage(hudmessage);
or in cool c# syntax  ```cs
Game1.addHUDMessage(new("Your wedding is today!!!") { messageSubject = ItemRegistry.Create("(O)460") });
this is 'simplified object initialisation', which is just shorthand for you to assign accessible non-readonly fields and properties immediately after running the constructor by adding a {} block after the new() call. in this case, we're just making a basic hudmessage and then assigning the item to show, which wonderfully requires no extra effort to get working.
you already know about qualified item IDs so i won't go into that
i'll leave it at a mention that pretty much all of your item creation should be run through the ItemRegistry
and as an added note on scope and lifespan, since we aren't actually giving this new item to anything in the game world, just our hudmessage, it will cease to exist as soon as the hudmessage expires. no need to worry about spawning items and having them appear anywhere
(but yeah given the extremely convenient item messagesubject draw behaviour, if you want a spouse portrait you're gonna have to make a new dummy item that's just their face. like with weird abby above)
(unless you use harmony ofc)
that's so cool blueberry
Is the error item texture replacable using content patcher? or is it hard coded to display the circle with line?
well there's one for buildings, makes u wonder
Ahhh I never noticed that there was a buildings one, good spotting, thank you
dun see one for items tho 
its just the one in cursors
cusors 1
bea 0
thank you!
Oh my oh my he oh my duck
actually could something be in the game tilesheets and still be hardcoded?
its hardcoded to use that texture when its an error item. doesnt mean you cant change the texture
the texture has to come from somewhere
as far as i know there isnt anywhere that the game constructs a Texture2D from scratch for anything substantial
ah, that makes sense. thank you Button 
hey atlas i found u in the files
~~I'm always in everyones game
~~
Actually only in mobile players’ games.
the file is still there on PC though
Wait, it is? Oh god, since when?
is there a debug command to trigger trash bear?
https://stardewvalleywiki.com/Modding:Console_commands#Commands here are the commands, i only see a reference about removing the worldstate related to the change after trash bear quest
your best bet may just to get a random save (or create one) that is in y3
if it's to test the changes after trash bear, you may search if you can find the related worldstate stuff and set it to the value you need with a debug action command or something
(or find a save that is past this point)
yeah i think cheesing a y3 save is my best bet
i did just that and it turns out my patch wasnt applying correctly. which was an easy enough fix
glad you made progress 🙂
With the exception of a few console releases changing the big controller sprites
Lumi may i DM you about something unrelated?
Yes but im on phone so if i forget to answer give me a reminder tomorrow
Done!
How can I make a mod that displays an image on the screen when I press a key (and I can press like the arrow keys to switch between images)
I tried making one but I kept having errors and then when smapi finally didn’t display an error in the game the image didn’t load and instead there were brown rectangles covering the number of each item I had
So I might aswell just restart
the best place to start would be the ButtonPressed tutorial for a simple C# mod, and then add your image-draw code to a new helper.Events.Display.Rendered event after the ButtonPressed event, where pressing a button will set the image
given you say other sprites onscreen started to get mangled, it sounds like you were messing with the wrong methods for creating a texture
to keep it simple, you can just use Game1.mouseCursors to draw all the game's miscellaneous sprites at once
no need to create a new texture just for a quick test:```cs
e.SpriteBatch.Draw(
texture: Game1.mouseCursors,
position: new Vector2(Game1.viewport.Width, Game1.viewport.Height) / 2,
color: Color.White);
you can also load any image assets available to the game:```cs
e.SpriteBatch.Draw(
texture: Game1.content.Load<Texture2D>("LooseSprites/Cursors"),
position: new Microsoft.Xna.Framework.Vector2(Game1.viewport.Width, Game1.viewport.Height) / 2,
color: Microsoft.Xna.Framework.Color.White);
maybe your ButtonPressed event will load the texture, and your Rendered event will draw it if it's been loaded
Does anyone know why my resource clump shadows aren't drawing with transparency? I'm not drawing them manually
the obvious question is 'is your current spritebatch using an alpha blend state'
the REAL question is 'how many logs are on that tile'
maybe I'm adding it in two places
are they always cut off like that
Hi @brave fable! Just wondering if the plate texture is ready yet so I can update my code and release the mod. Thanks, and sorry for the inconvenience! ^^
is this a path?
hi, i'm actually waiting on a spacecore update before i can push the mod update, since i'd like to have the menu show custom skill buffs when they're available. i'll give you a ping when it's ready
oh I think I'm not removing it when moving chunks lol ty
how do resource clump work
They are ResourceClump and have approximately 1000 if to check if you can remove them with a given tool
this isn't a tiled thing is it?
no theyre, if placed in tiled, a paths item iirc
Got it, thanks a lot! I really appreciate it. I’ll wait for your ping ^^
chu does dotnet crimes iirc if you do need cli compilation help
Do you mind if i DM you about something unrelated?
i got it with the exception of dotnet run so i just have a custom shell script now
why are you refusing to use an ide
im using vscode but that doesnt let me make projects
and for some reason doesnt let me run them
(i dont want to have to deal with jetbrains on linux, intellij was painful enough)
oh right, that's because they want you to use actual visual studio I think
rider on linux actually works really well
that's what I used to use pre this windows pc
but they dont seem to easily provide a linux version (for intellij at least) so i need to find wherever they give a tgz for it
The toolbox program is actually super useful for grabbing... any of their things.
tbf it is
iirc rider has a native linux version
so did intellij it's just hidden away
All (well, most) of their things do, yeah.
either that or it was on the aur 
sort of unrelated, what horrors am i doing here to get an invalid program from CLR
harmony.Patch(
original: AccessTools.Constructor(typeof(TemporaryAnimatedSprite), new Type[] { typeof(string), typeof(Rectangle), typeof(float), typeof(int), typeof(int), typeof(Vector2), typeof(bool), typeof(bool), typeof(float), typeof(float), typeof(Color), typeof(float), typeof(float), typeof(float), typeof(float), typeof(bool) }),
postfix: new HarmonyMethod(typeof(ModEntry), nameof(ModEntry.TemporaryAnimatedSprite_Constructor_Postfix))
);
the types should be right, given public TemporaryAnimatedSprite(string textureName, Rectangle sourceRect, float animationInterval, int animationLength, int numberOfLoops, Vector2 position, bool flicker, bool flipped, float layerDepth, float alphaFade, Color color, float scale, float scaleChange, float rotation, float rotationChange, bool local = false)
2 random fence tops in secret woods
i fight leaf,. leaf win.
how to make more natural
there isn't many tiles, i will try
Yeah, that's a consequence of the lowering approach used for multi-target patches, so we could document that as a known restriction. I wouldn't mind supporting that if you want to work on a PR for it, though it might be a bit complex since we'll need to rework the patch implementations, patch manager, initial patch parsing, etc.
oh no
It doesn't look so bad
but def bad
ok Bea. So if im correct, this was the example you gave in the other chat. I recreated it really quickly
yes
honestly the only thing you really need is a bit more depth on your second layer in. Your edges and shape are perfect
So i did this real quickly. But using the interior pieces to add a bit of flair to the edges
That looks fantastic
i want this one to be more of a slope but when it did it looks too damn straight
Then, and this is a personal choice for me, I like to add a bit to the empty green space
oooh that's pretty
Slopes with trees are hard
i suppose tree just don't slope
I think you are one with the forest spirits because you make good canopies, I'm jelous
forest confusing


)
