#making-mods-general
1 messages · Page 532 of 1
are methods like OnCursorMoved etc called automatically when said event happens, or do they need to be called in ModEntry? or something else?
Is that a SMAPI event?
Then yeah your event handler (your this.OnCursorMoved) will be called when appropriate
Don't need to call it manually
okay so i can delete that line?
No it's because of that line that it does that]
You are adding to the list of things that SMAPI will call when CursorMoved happens
ohhh okay so every SMAPI event i want to look for should be called in Entry
Well you can add em any time, though Entry is the most usual and likely place
But you could just as easily do it in GameLaunched, for example. Or literally any other time
It Depends™
what is the purpose of +=? the wiki says // event += method to call; is that like saying "this event running is now equal to this event and this method both running"?
i'm trying not to code without understanding what i'm doing lol
Usually += is just shorthand for = itself + e.g. x += 4 is equivalent to x = x + 4
For EventHandlers though I think it's overridden to be shorthand for adding the method to its internal list of methods to call though, so not actual addition like that
(Don't quote me on that)
Operator overload weee
i see thank you! yeah i was like how are we doing addition here this isn't math
(I mean I understand its not literal addition just not 100% sure what its doing behind the scenes obv)
Event handlers are general C# thing you can go look at .net docs for info
ohhh okay i'm never sure if something belongs to the game or SMAPI or C# or what
If it's syntax related, it'd be C#
You can tell where things be from if u look at the full name
The namespace tells u much about where it from
And then you can look for appropriate docs
yeahhh i'm trying to get more comfortable with VS and all its options. i think this project specifically has helped me get more of a handle on intellisense especially
idk if anyone here ever read the golden compass but it kind of feels like using the alethiometer lol
is calling OnRenderedWorld (which has draw methods inside of it) inside a method like OnCursorMoved bad? i think i'm struggling with the advice of "draw in OnRenderedWorld, but keep your logic outside of it"
(i'm trying to draw a green square under the cursor if the cursor is in range, but a red square if it's out of range. each of these should only occur if the player is holding a bomb)
just so you know, you can have more power on how your furniture looks with FF, but it'll require to learn some json format rules. A lot of people here including myself will help you if you ever want to try it out.
damn, there has been a lot of Furniture talk while I wasn't looking
why does that always happen when I'm supposed to be working...
Hmmm I'm trying to add a feature to my mod which would cause the Sell Price of animals to increase by 1.4x if they've eaten a Golden Animal Cracker.
Initially I was thinking I could do this with a relatively simple Harmony Postfix on FarmAnimal.getSellPrice() which conditionally multiplies __result by * 1.4, but now I'm realizing I don't know an easy way to check within my Postfix whether the animal in question has eaten a golden animal cracker or not.
E.G. I don't seem to be able to do something as simple as check whether this.hasEatenAnimalCracker.Value is true or false, since that's not available in the content of my Postfix. Or FarmAnimal.hasEatenAnimalCracker.Value, unless there's a way I can have my Postfix look at the particular animal being checked?
you can add the FarmAnimal __instance parameter to your postfix to have harmony give it to you for free
lookup the harmony docs for other stuff like this, there are a few useful tricks to learn from it, even if it's not very useful to get started with harmony patching from nothing
Ah that sounds very useful!
The first doc I followed didn't really mention injections, and I hadn't really explored the page that covers injections in the other doc I'd been following as I hadn't realized that could be useful in Postfixes (I've forgotten basically everything about transpilers from the last time I did one other than how annoying it was)
Thanks for the tip!
https://pastebin.com/1nhvV3Vd i'm lost in the sauce i think. how much of this is redundant? i'm not seeing anything out of the ordinary happen when i hold a bomb. is the problem maybe the pixels/tiles thing in GetBombThrowingRange, or is there possibly something obvious i'm missing?
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
Bombs do nothing until they’re placed
i'm not even at generating an explosion yet lol i'm still trying to do the range thing
Sorry I’m on mobile, now reading more of the actual stuff
You also aren't updating IsHoldingBomb as far as I can tell, and your OnRenderedWorld is commented out in Entry so its not being called
Maybe add more debug prints?
That’s usually what I do to check if things are getting called
ohhh yeah i'm def lost in the sauce, i commented out OnRenderedWorld when we talked about calling them other places and then... didn't call it another place
i'll do some logging or breakpoints too yeah
thanks, i really have been looking at this too long
okay yay it's doing the draw now! but it's doing it when i'm not holding a bomb so back to the drawing board lol
Hi everyone! 
I’ve received junimo’s permission to post this here and would like to kindly ask for your cooperation.
I’m Renato, a graduate student at Korea University and a fellow gamer. I’m conducting research on game modding for my master’s thesis and would love to invite you to participate in a voluntary online interview about your experience as a mod creator (1–2 hours, audio only).
If you’re interested, please send me a DM so I can share the formal details and consent information.
Your participation would mean a lot to me.
Thanks in advance! 
How firm is it that it would need to be audio rather than text? (I am asking as a modmaker, not as a staff member ^_^)
I've sent you a message!
Hiii is this a good place for complete beginner at coding/modmaking to ask questions? Or is there another server that I should head to instead? : ) thank you in advance!
There are other servers where you can also get help but this tends to be the main place for it :)
Ooh okay thank you, that's good to know! I've done all of the art for my mod but I have NO idea how to code it! I've been referencing other mods and templates and the SDV Wiki but I'm so hopeless at this stuff that it's just not working 😭
What sort of mod is it?
It's so basic that I'm lowkey embarrased to say, but it's just a SCA mod!
Seasonal Cuter Aesthetics^ : )
hey. New to the server. just now got past the 10 minute stall to speak. I wanna learn how to mod, and have a mod in mind I want to work on. But I've never modded anything in my life and definitely need the help. I wanna make a mod that extends the heart progression system to add more date events between the 10 heart event and marriage so that the process of falling in love with your spouse feels more gradual and organic, rather than 1 date, wedding, 1 post-marriage event. But I wouldn't even know where to start with something that ambitious. all I know is that Alex will be my guinea pig because Best Boy gets to go first.
Nothing is too basic when you're just beginning! The smaller, the better imo. So you're wanting to make an edit to SCA itself? (By that I mean you want your mod to edit SCA's sprites, not that you want to edit SCA's json files directly.)
Welcome! Do you want to actually change the heart level system itself to add more after 10 hearts but before the wedding, or do you just want to be able to give the player more than one heart event at 10 hearts?
Haha thank you for being so sweet! I'm making an SCA mod for the new East Scarp update - it's just for personal use atm but if it all goes well I'm planning to ask for permission to upload it! I hope that answers your question? : )
Unfortunately it doesn't quite because I don't know what an "SCA mod" is. Do you mean a mod in the style of SCA rather than actually editing SCA's existing changes to East Scarp NPCs? (This seems really picky but it does change what I'd point you towards for how to do it.)
this is roughly my intention: the original 1-8 heart events remain as before for the Platonic Heart Events. Once you give them a bouquet, it restarts the hearts (now iridium purple) to trigger the Romance Heart Events, with the original 10 heart event as the new 2 heart event in the romance line. Anything that required X hearts before (like aggreeing to be your dance partner at the Flower Dance) still work. It's not "setting your hearts to 0" so much as starting a New Game Plus on a game you've already completed before. The past accomplishments are still registered. But, this gives room for there to be a 4, 6, 8 Heart event for dating, a 10 heart engagment or declaration of love event, the wedding (which you can only propose now at Romance Heart 10, rather than Platonic Heart 10), and then the 14 heart event stays the same.
Oh sorry!! A mod in the style of SCA for the new characters in East Scarp! It doesn't seem picky at all haha I totally understand where you're coming from!
Okay, thank you for the very detailed explanation! How much C# do you know? Adding new heart events doesn't require any programming but what you're wanting is definitely going to be programming.
I don't even know what C# is.
this might sound heavily specific but could someone please tell me what amount of pixels should i use for specific furniture? (for example, if i want to make a table, my guess is that it'd be 32x32, but if i want to make something that can stand on the floor, how many pixels would that be?)
Okay, so this is going to mostly be a fairly simple asset replacement so I recommend starting with the CP author guide to get an understanding of what CP mods are, then looking at the EditImage page in combination with another SCA style mod (you could use the existing SCA for ES one). You'll need to look through the ESR files to find their Load patches to Portraits/<NPC internal name> and Characters/<NPC internal name> and then copy those Targets for your own EditImage patches to replace those images.
It's a programming language. Do you have any programming experience?
!unpack Have you unpacked your game data? You can check in the vanilla furniture spritesheet or you can look in data/furniture for the tile sizes (tiles are 16x16px).
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!
oohh, alright! i'll keep this in mind, thank you very much ^_^
Thank you sm for your help and patience!! Fingers crossed I can make it work : ) ❤️
Hmm, ok. How determined are you? You'll need to learn an entire programming language for this. There's a slight chance it might be possible to do it without programming, but you'll need to get very familiar with how to use Content Patcher and all the tools we have as content modders to be able to do the hacks needed for it without C# (and even then, I'm just having ideas while I write this and I don't know for sure if they'd work).
I mean, I joined this discord server SPECIFICALLY to learn how to mod so, I'm at least somewhat determined. there may also be easier ways to do what I'm wanting to do. like instead of wiping the hearts and changing their colors, just changing the heart progression so there's more events between 10-14, and move the trigger for the mermaid pendant to be at a higher heart threshhold. If the hearts don't start over, then the progression would be:
1-8 platonic
10 - dating
12, 14, 16 - modded
16+ rerouted marriage/mermaid pendant availablility
20 post-marriage event.
I think its possible to add heart events at certain frienship points levels instead of hearts directly (which would translate to a 8.5 heart event for example)
You can very much emulate extra hearts/friendship points with trigger actions & IncrementStat, however without C# there's no good ways to really convey that you're still gaining additional hearts
i'm sorry but i just tried to install stardewxnbhack and it says that it needs to be put in the stardew valley folder, but it's already there! what am i doing wrong??
Did you take it out of its folder? The file itself needs to be directly in the Stardew Valley folder.
the whole point of adding the romance heart events is because the progression from stranger to spouse is too sudden in the base game. they express little to no romantic feelings, you go on one date, and then you're getting married. I just want to make the romance portion feel more gradual and organic without uprooting the entire platonic progression because that's necessary. I suppose I could tweak it so that the platonic events trigger every 1 heart and instead of 2-10, they trigger at 1-5, freeing up 6, 7, 8, 9, and 10 for romance events?
i didn't take it out of the folder, but now it just closes as soon as i try to open it
i have the latest smapi version too
ideally they should be holding hands
like so
Yup or even set hearts back to 0 and do a complete replacement of their dialogue so they're using affectionate dialogue rather than returning to stranger dialogue, but it would probably be even more difficult to convey what was happening with the hearts.
I just want to clarify that I'm not wanting to discourage you at all. I totally agree with you that the romantic progression is very weirdly abrupt in vanilla and would love for that to change. It's just not a small project so I want to make sure you have a realistic idea of what might be needed.
This particular idea would be much more feasible with CP alone, I think. It'd be fairly incompatible with a lot of other mods because they would not adhere to your heart progression but if you didn't intend for it to be used alongside other mods it could work.
well, people do make mods that only effect 1 character's heart progression, so I don't have to do every character at once. I can start with just Alex alone.
Definitely
thanks to this screenshot i finally found out what exactly was wrong; i was putting the FOLDER inside the stardew valley folder, which meant that it would create a folder there and stardewxnbhack would load in a "lonely" folder. so now i copied the program into the game folder and now it worked 😅
silly me
thank you very much for your help though!
Okay, so for that you will also want to look at the author guide to get a feel for making CP mods. Then you'll need EditData for how to edit data assets. You'll want to unpack your game data to find the heart events for Alex (they are found in the Data/Events/ file corresponding to the location they take place in) and then you will need to set the existing events to null so you can copy their content into a new event with the correct friendship level preconditions. Here's the wiki page for events to help you understand preconditions.
(There's more, in case you want to adjust things like dialogue too, but that's a starting point at least.)
if I did do the 1-5 platonic 6-10 romantic heart events concept, you said it might not work with other mods. is that specifically stuff like RSV and SVE, or would it break more mods? like how catastrophically incompatible would such a mod be?
It depends which NPCs you want to change. If you only edit vanilla NPCs, you only run the risk of weirdness with other mods also affecting the romance experience for those NPCs - for example, at 8 hearts someone might experience a "we've been in a relationship for two years" event from your mod and a "this is our first expression of interest in each other" event from another mod that's using the vanilla progression.
Another possible clash with other mods editing vanilla NPCs is that they might edit the same event. If they change the preconditions before you do, your event might never trigger so your intended progression would be affected. If vice versa, players would miss content from the other mod in favour of just getting the vanilla event (or, if you edit the event content too, your event).
Obviously mods that are explicitly intended as romance mods for those NPCs would be potential problems. SVE might be given how many vanilla things it edits, but I don't know enough of SVE by memory to know for sure (and I suspect it's probably fairly low risk).
If you want to edit modded NPCs, the main issue is permissions: you have to include the entirety of the event in your mod to be able to edit its preconditions so by default you would not be allowed to do it for most mods and would need to seek permission from the modmaker.
(Disclaimer: I might be missing other potential issues because I've forgotten about them or they haven't occurred to me, so please don't take this as an exhaustive list.)
I don't know HOW they change it, but the mods made by Maggplays add a lot of heart events for Sam, Seb, and Alex. I don't know if they do a 1 by 1 heart event thing or a complete heart event overhaul, they're just the closest example I can think of to what I'm doing.
They do the thing that I said is easy. It's just adding new heart events using whatever criteria you want. It doesn't actually change anything about how the vanilla mechanics work, it's just adding more story.
(I haven't looked through the files to check whether they actively edit vanilla events and don't intend to, since I haven't yet played through those mods and don't want to spoil them for myself lol)
(i can check)
now I gotta ask: does unpacking game data or any of this other stuff break your save files? I can live with losing them, I just gotta know if they can survive the mod-making progress.
(For what it's worth though, I love this concept, because I do completely agree the jump is rather... fast.)
Nope, unpacking doesn't affect anything in your game at all. There is a risk of breaking save files if you use them to test in-progress mod development, but an easy way around that is to just not do that haha. If you want to use the save because it has game progression that's difficult to achieve using console commands (like GI access, for example) then you can make a backup of your save file and then test.
they do change the vanilla events, at least the sebastian one does, so i assume the other mods do as well 🤔
Thanks Forsy
So that makes them a good guide for Prince to look at and also makes them likely to be incompatible with what Prince would do unless Prince made theirs with compat specifically in mind.
well the vanilla event edits are just rewriting the dialogue/script
im not sure if it actually would conflict if the triggers are just x hearts in x weather and meet xyz condition 🤔
They would if Prince was going to edit the vanilla preconditions to make them happen earlier
I am waiting for Claire's input with bated breath
Yeah, I also wanted to expound on this a bit but wanted to let you talk about it first. Atleast speaking as an author that writes dialogue, I follow the vanilla heart progression and their corresponding keys and I know a lot of dialogue authors do, too. My 8+ lines usually convey a sense of closeness/familiarity and 10 already entails romantic lines (which is the same for many dialogue mods).
If possible I'd love to add holiday heart events too. like Alex having a unique heart event that only triggers at the Grange Festival, or a unique cutscene at the flower dance or moonlight jellies. etc. Going to the Night Market on the night your spouse is at the docks. idk. It'd be fun to just add more cutscenes where applicable.
TLDR: I agree with you. 
You can't have heart events inside festivals because festivals are a type of event anyway
Passive festivals are fair game though
what about triggering when you leavea festival? like when you click "go home" after Winter Star or Spirit's Eve?
I'm not sure. It might be possible to have an event that triggers on entry to the farm or farmhouse. I don't think I've seen any discussion about it. It'd be worth trying, unless a C# person jumps in to say one way or another.
I think that for the most part your incompatibility with other mods would be something that could be overcome if you're just shifting the romance to start earlier. And there's also the option of just going "if you have my Romance Alex mod, don't use it with other Romance Alex mods" which is completely valid imo
Hi there! The audio format was suggested by my thesis advisor, as it’s more academically accepted for qualitative research at the master’s level. I’ve discussed the possibility of text-based interviews with her as well, but for now I’m recruiting audio-only participants. 
There definitely is hehe, I do that for FGWL 
Thank you for the explanation! Unfortunately, that rules me out but I hope you get some good data :)
But yeah, just concisely reiterating what Aba said - I think it’s possible but it won’t be an easy process (incompatibilities aside). As long as you’re patient to learn and committed to the mod you want to make, it will be fruitful.
so the pepper rex monster data doesnt have the dino egg in its info is that drop hardcoded?
yep
damn
you think maybe spacecore has a way to exclude the spawn hmmm
i dont recall such a feature
my custom monster is dropping the egg
FTM has some feature to exclude drops but hardcoded stuff likely bypass that
bumping this question again because I still couldn't figure it out 
no seriously this thing is a life saver because it almost makes everything for you, it's like mcreator (mod maker for minecraft) but for stardew valley 😭
i can't remember who recommended it to me but if you're seeing this i love you
hey gabe what's a CT? I'll try to look into it
conversation topics!
I don't think it nearly that powerful yet lol
I was thinking maybe instead of CT you could try a dynamic token, were you thinking of using CT because of the duration?
The more constraining thing is the question completion requirement part
I don't even think I need a CT at this point but I'm not sure. I somehow need to change the completion requirement of the quest to be "Talk to NPC X" to trigger the next question in the chain.
@merry river You leveled up to Farmer. You're now a prettier shade of blue. Thanks for sticking around!
Quest, not question
i know it's very simple, but at least for me it's very helpful because i don't have a lot of experience in coding 
OH HEY LOOK AT THAT. i can become cheeto now
Need proof of mod /j
Yeah it is meant to be usable without knowing about the jsons 
Knowing about the jsons is fun though
The cheetoing? 👀
hmm i feel you def need a CT if you want to trigger a specific dialogue with a "remove quest" command
No I promised Mouse I would do no more moderating tonight!
there is no "talk to NPC" quest objective
I am naught but a simple apple bobbing in the sea
Awww
(Good on you for setting a schedule for it!)
which is why i was wondering about a workaround
CT triggering at the same time you add the quest to force a dialogue is the main solution I know of
after I sent you such a great mod proof /j
or you can dip your toes in C#
I can do it for gabe if it's not that hard
I feel like you want unique dialogue for a "talk to this NPC" quest too right; CT is the way
or is the quest just "go talk to them about the weather or something, idk"
or just make it an event
selph this is the height of c# i have dipped into so far
baby baby c#
It goes brrrr
I have various Opinions and one of them is that you should write your C# as if they are framework for content modders
(You should DM Bouncer to get the ball rolling)
Even if you are literally the only mod who will use it, doing this means you can integrate with your own content patcher component easily
That is more than so many people!
i eventually want to be able to write frameworks but i have 0 programming experience and i feel like i'd need even more time to understand how to work with c# with work and life and all
and i don't want to come running into this channel every five minutes with a new thing i am confused about 
Just DM chu directly
/j
Baby steps
that is what this channel is for, though 
No the learning shall happen in Public where everyone can Learn and Discuss
is it alright if I try to make the new type of quest? I want to try to give it a try, no idea how to make it useable in CP packs tho
fine by me! but I want to see the process 
yeahh we can learn together yay
well if it's a new type of quest I'm assuming you're giving it a new type in which case any mod can use that type
unless you're hardcoding quest IDs i encourage you dont
hmm if you dont want to deal with serialization fun times and/or patching the quest parser function you can just give them the generic "Basic" type and then give content mods the ability to say "this 'Basic' quest is actually a "talk to NPC" quest
I don't really know what to put in this value
oh hey, serialization fun times incoming
you probably just want to save the NPC name instead of the entire instance
oh also do I still need to do this? I feel like I might break another mod by just adding onto this
yeah probably dont
(if you add a new type that will be saved into the save, like a Quest subclass, you need to register it and its fields with SpaceCore to ensure it gets saved correctly)
:v
oh yea I have it as a quest subclass
you dont need to save the NPC anywhere; OnNpcSocialized gives you one and you can just compare the name anyway
what do privateand publicmean in that context
from a design (and a memory leak) perspective I try not to save references to objects I don't own if possible
yes I use rust btw how did you know
private: only accessed by your code, public accessed anywhere in the code (better to use private)
onnpcsocialized is a method created by the quest subclass socializequest
am I using that?
or do I just steal it...
it's a virtual method on the base Quest class that gets called every time the player talks to an NPC
ohh huh I guess the socializequest changes/mutates/i don' rememver the method
you want to override it with "if the NPC being talked to is the target NPC complete this quest" in your class
do I need to worry about netfields?
yes (see: serialization fun times)
I'm trying to make it a framework, how do I make it so you can change the target npc?
here's a custom special order objective I added (not quest but eh close enough)
https://github.com/zombifier/My_Stardew_Mods/blob/c469057da730fe29345bcd4eb17e5c261d99a5f4/FreshFarmProduce/CompetitionObjective.cs#L41
presumably you read the "completion requirements" field in quest data when you're parsing it and creating your class
reading along and trying to understand
(Same, lol)
Have I seen a weak reference i dont like?
I'll look into it, I thought I had to do something more for it
uhh
equality is ==, = is assignment
but again, I would only store the name in the class
i changed it from bool to void as well
and you seem to have a stray }
quick question; stardew valley indoor plants use 32 pixels for height and 16 for width? i'm asking because i want to make something like that, basically a plant
not necessarily; furniture items can be bigger
ok i had to change it to bool for override to work (it's really hard to code when 5 people are yodelling beside me)
take this as an example 😅
FYI the function returns true if the quest state was changed, false otherwise
You can tell without asking us by looking at it in your art program
Or by looking at its entry in data/furniture to find its size in tiles, as I mentioned last time
But basically the answer is that you can make your furniture whatever size you want because you control what size it says it is in the data
is npc automatically the required npc?
no, it's the NPC the player is talking to
what I mean is, your class has only the name, and when the player is talking to an NPC you check that their nameplate matches
Question...did the original game not implement probe?
I don't know how to access the npc in the quest data
oh wait it's the net fields I deleted it by accident ohhh
I was like where am I going to get this thing to happen out of nowhere
1.6.0 was the first time anything but performActiveObjectDropInAction used a probe arg, and even that one wasn't consistent until 1.6
heyoo!
Is there an easy way to stack multiple overlays in sprites? I have a high chair sprite that I want to use for events, but it has a front and back.
If not, I can just use a regular chair for le toddlers.
actually "overlay" may not be the right term.
I want a chair sprite with a toddler sprite on top of it. (that's easy enough) and then the arm part of the chair on top of both of those sprites.
https://pastebin.com/6G8VHqTw This is what I ended up with, I removed the loading the quest description though
i do not know an easy way to do this, and i suspect accomplishing it "correctly" will involve pain. probably the simplest solution, if you control both the chair and the toddler, is just to make a composite sprite of how you want it to look and use a TAS or something to display it
When you say for events, you mean like heart events? Because you can layer things in some commands like TAS
Pshht using a TAS is easy /hj
what i mean by pain is getting the different parts to layer correctly so you don't have to bake a composite sprite for the result
good start! i think you want to also assign xml names to all the other netfields
Why? Just TAS the chair low and the chair arm high, with toddler in between
yes, like heart events!
(Ignore that my English didn't even make sense there)
I may just put them in a normal chair then. nbd
thanks!
okay now for the stupid question: what is a TAS? 😅 Google only game me time-assisted speedruns
temporaryAnimatedSprite
shorthand for temporary animated sprites, in SDV specifically
bless y'all
It's an event command (in this particular context)
I've used them before, I just didn't know the cool shorthand
thanks so much, what is their purpose in the context of stardew?
stardew's save serializer turns class instances into XML in the process, unlike all the json used by mods
I haven't actually used spacecore's serializer thing myself, but I imagine it needs something to call your fields when it saves them too
Is this about the custom quest stuff
I almost never implement new class tbh it's usually enough to just do things for specific data 
yeah I mentioned earlier that I usually just harmony patch the base Quest functions instead of doing a new class
no need to deal with serialization fun times™
half of this would be easier to understand if i knew what all these words mean and do
though for FFP I need a buncha new fields and I can't imagine reading/saving all that in modData
feels like having to learn vocabulary
stardew saves are in a certain format, to save data you need to convert the data to the format
I thought the netfields were reading the json
i thought there was a list of abbreviations on one of the wikis somewhere
I don't know how to do that, I only have these for reference 😔
yeah but i meant especially in regards to the classes, methods etc you can use
all i know is that bool is something that checks for true or false
basically instead of making a new quest subclass use Harmony to insert new code into the existing Quest class
ohh subclasses are just other class files that reference the original class file? I actually never had to work with them before
Subclasses are not just other files
public class SubClassOfThing : Thing
Doing this has a bunch of implications due to how sdv serialize saves
huhh, yeah I only ever had to do projname.csproj and class.cs sized projects in my classes
So instead of this it's often easier to just say "if Thing has id = blahblah" do something else
I don't know what your goal is though
make a new type of quest, I didn't know if I needed to copy the original code's way of handling quest types
But what will the quest do
i was also referencing someone else making a new minigame type which involved making a subclass in the original minigame class
when talk with npc, quest is completed
That's just a socialize quest then
heres the code sans the xml naming things
cp doesn't do socialize quests for some reason
it's for 1 npc and not a list of npcs
This thing is in jail cus I never finished it, but how it works is:
- store info about cohorts in a new asset
- form a SocializeQuest with the data given in the new asset
You can have a list of 1
And I am just giving example of how you would make use of existing vanilla types to do such a thing
I don't think your logic is custom enough to warrant a new class
Also u wanna take this thing n finish it idm 
Since i have low desire to do that myself rn
just wondering, wouldn't it affect performance if it loads every time you load an asset?
I don't understand the question
{
helper.Events.Content.AssetRequested += OnAssetRequested;
helper.Events.Content.AssetReady += OnAssetReady;
}```
That's a event handler and the standard way to interact with the content pipeline
Entry is only ever called one time per game session
are the variables in the beginning how you get the data from the data/json? Also the join next quest, does it add it to the quest list or just adds it as an existing quest? I don't really understand the load priority but I don't think it's important. My intention was to make a framework for gabe to use, since they want to reuse the one npc quest for some sort of quest line
Next quest is a vanilla thing, and so I supported it just bc it's there
just unsure how to get the modder to set the requirement for the player to obtain the quest
The quest being created is completely vanilla, it just has extra info passed to it
Having the content pipeline stuff setup means that the content modder interacts with it like thus
Selph has a guide that explains all this in more detail than my barely documented spaget
hello, i've just caught a catfish on riverland farm a few times after 12am, and i'm wondering if this is a feature of the farm, a bug, or maybe a mod? the only mod i have connected to fishing is the one with visible fish in the water 🤔
thanks for helping me understand everything, I can finish it, I'm just unsure why it's unfinished
It's unfinished bc making mod page is hard 
wow that's a lot easier than whatever I was doing, I thought the netfield was to get the data from the json, I guess it's for the xml stuff
And also cus the mod i made this for is big hiatus
This is also pre 1.6.9, i don't know if it compiles rn
don't you want to publish it yourself? It's your framework, I can test and refine it though
No cus making mod page is hard

There's also a lot of things I'd do differently
Maybe for a full featured quest framework kind of thing
I'll be sure to credit you, I don't think I'll publish it but Gabe just needs it for their quest line at the moment
thanks for everything chu
If you only want it for one specific quest you can probably omit the whole asset though
Just do this stuff inside the trigger action
And take in info like quest id which npc what quest etc from the args
it's like a quest activating another quest activating another quest iirc
I'm not too sure if my wip works properly with the vanilla next quest stuff (maybe?)
thanks for giving me an idea of where to look when I start troubleshotoing it 
But it's quite simple to just do $action inside the npc dialogue
Rather than next quest id
Any tips for making tilesheet variants in Aseprite?
I want to make Earthy and Starblue versions.
I believe the author of earth has published a photoshop filter thing for making any tilesheet earthy?
chu you're a hero
thank you a ton
Can You please enlighten my ignorance, i did a npc and it does not appear at his mod house, instead he walks all the way from pelican Town plaza to the ginger island and then to my mod Town, he is halfway recognizing his shcedules but in the patch summary it says that it is not loading his shcedules nor the NPCDispositions,
!json
JSON is a standard format for machine-readable text files that's used by Stardew Valley mods.
If you need help with a JSON file, you can upload it to smapi.io/json to see automatic validation and share the link here.
When making mods, it's recommended to edit your files in a text editor with JSON support, such as VS Code, Notepad++, or Sublime Text. These programs will check for syntax errors.
the only command i remember
I saw it, but I was asking if it could be done in aseprite
is his home at the mod house?
sounds like his home is at the town plaza
.jail
If you wanted any help with designing the mod page or stuff like that, I’d be happy to look into it! 
No I put the thing in .jail already
Oh, okay 😅
This is the bigger blocker
But i mean code be there, it work mostly
That’s fair. If it’s not where you want it, it’s not where you want it!
if/when subtype serialization is merged into SMAPI, I imagine an SO objective could emulate the socialize quest pretty well
(also i'd assumed it had that kind of objective already, but ig the game only makes you do it once)
It does have that yeah
The wip i have just makes a SocializeQuest with a custom list of people to greet
Emily's daily quest use it too
I don't think SOs have a "talk to somebody" objective yet?
ig either one would work, I just default to thinking about SOs anyway
Oh i thought u meant normal quest 
yeah, earlier I checked whether that could be done w/o the socialize quest via SO, but it's all items/monster killing/etc currently
I think it'd be nicer to just do more type reflection stuff
closest CP-only setup would be like "here's an item, go give it to the new NPC and say hi"
Potentially infinite times! It's exactly the same as Emily's quest to say hi to everyone
It's nice that trinkets just take an assembly qualified class name to do all the effects with
And that thing never goes into save
oh right, yeah, didn't parse that 
just thinking of the wiki note that Social decides the quest is talking to everyone
Were enchantments ever changed to using that too in the alphas?
Something similar for special order objectives would be good
I don't remember tbh, it may have been more like the tools where the class is namespace limited
Data/Enchantments gets ClassName and such in 1.7, apparently
https://stardewvalleywiki.com/Modding:Migrate_to_Stardew_Valley_1.7#Enchantment_data
yeah, I've yet to touch those, not sure how exactly the setup works
Special order objectives are also class names on the inside but
Only from that one namespace
The class must be a subclass of StardewValley.Enchantments.Enchantment

ah, the more limiting part, ig
For example, given a value of BottomlessEnchantment, the game will create StardewValley.Enchantments.BottomlessEnchantment
This is why we need Cecil
Yeah i had hoped to talk pathos into breaking it out 
I guess that'd also work but I also want Cecil
Well I'm picking my battles here
You don't have room for unlimited battles in your heart?
Also i think so far the namespace limitation are there because the class does actually go into the save
So it's a guard against mods just subclassing here
If there's plans for SMAPI serializer stuff though...
Then it could just be yeet the guard ezgame yes
Tbh button
Otherwise it'd have to be first refactor away bits that will be saved, then yeet the guard
And this is the nerdsnipe canon warming up
I've occasionally entertained ideas like "what if xml was less verbose and could handle unexpected subclasses"
I think a lot of sharpies have but no one wants to put effort into that when spacecore exists or the possibility of SMAPI handling it eventually exists
Knowing my luck, I'd finish a big serializer thing and then the next day pathos would announce the new serializer API in SMAPI
Tbh what i really want is the less verbose
still in the middle of some nonsense pseudo-serializer stuff for monsters 
it would/will be pretty handy for some types like that, if only to reduce framework-on-framework reqs
if nothing else, with enchantments you can kinda change-monitor for a generic being equipped w/o much cost, or apply a buff and check for that
Save serializer stuff is scary and I choose not to think about it by just removing my stuff before saving
I consider the verbosity of the XML to be under the jurisdiction of the serializer in general
Oh no I just realized I have to be careful when checking reactions on mobile now I almost just accidentally pinned chu's message
directs the nerdsnipe canon at Esca
it's casey's actual job to touch the serializer, okay
i'm just here doing brittle beforesave/aftersave junk
directs the nerdsnipe cannon at Casey
Casey i know the people want the third dimension
But what about smaller save files and less netsync and more robust xmlreader code instead
They're already doing less netsync
Can someone help with furniture code, please? The json is ok and i checked the coordinates too but the "down" items just dont show properly no matter what i do. https://smapi.io/json/none/db910d5178c94547a13b78efbc23e212
hi there! i'm using stardewmodsmithy for making my mod, and right now i'm currently trying to make a flower pot, but when i test it in-game, it looks cropped. in case it's necessary, i also put the image of how i configured it in stardewmodsmithy :p
sorry if i ask too many questions way too often, i'm trying to learn :<
oh, and by the way, the flower pot has 16 pixels of width and 32 pixels of height in case that's important
Texture should likely be 1x2
You need to make the white border completely cover what you want to see
While the green square is how much space it occupies
my brother in christ i was testing some things and made it much worse accidentally 😭
i tested that and this happened
Remember to spawn new furniture when changing stuff
Can you post rosefurniture.png for comparison? Screenshots of the appearance issue might also help
it is a WIP, sure
what do you mean?
yeah, i did exactly that and it just... kind of exploded
💔
.
pretty sure this is how it's supposed to look, but it looks messed up in the game
i wonder if it's stardewmodsmithy itself that it's bugged?
Why are you using randomized_plant?
it acts like it takes a differernt number
@lucid iron is randomized_plant the damn cactus
yes
Decor maybe
i use vases as decor
am officially cheeto now
congrats!
HEYYY congrats!!!
your count seems to be off: your "20" sprite is index 10, "40" is 20, "60" is 30, etc
The orange looks nice with the purple in your pfp 
Oooh and you can make a thread now!
it's affected by image width and such, so it's easy to lose track of
Sidenote a useful feature is to put all your loose sprites into 1 subfolder
Smithy will automatically merge it into 1 sheet for you
You better summon me there if/when you do, rn I’m taking a tiny break from my responsibilities so I won’t be active for like an hour but I’d love to see 
Thanks for spotting it!
this sounds like a super function
Is there, like, a tutorial on how to make new monsters using Farm Type Manager?
Is there a way to make it possible to put a window or a picture under the garland?
Anything Anywhere
If you mean a new C# class (rather than just customizing /sprites/stats/etc in a content pack), then I'm not aware of any, but I made Pollen Sprites with it a while back.
- The new class itself is a subclass of Ghost: https://github.com/Esca-MMC/PollenSprites/blob/master/PollenSprites/PollenSprite.cs
- It has a default constructor (used by SMAPI for any monster) and a Vector2 constructor (used by FTM to spawn new ones)
- It's spawned in FTM packs with
"MonsterName": "PollenSprites.PollenSprite"
it's not an ideal tutorial (e.g. I wouldn't use a CP pack now, it could add the data with C# or just pull it from elsewhere), but it's the only example I remember offhand
As in, new monsters that are just reskinned Vanilla ones spawned in different parts of the game.
If that makes sense.
Ah, in that case it's probably easiest to look at expansion mods like SVE/RSV/VMV/etc for examples 
FTM's monster spawn areas mainly have a list of "MonsterTypes", and a basic reskin would look something like this (spawn numbers & location parts aside)
"MonsterTypes": [
{
"MonsterName": "Skeleton", //base monster type
"Settings": {
"Sprite": "Mods/Your.ModId/YourMonsterTexture", //load a texture somewhere with CP, use its "Target" here
"HP": 999, //alter its stats if you want
//etc
}
}
]```
making a new pack or opening one with the Config Editor download on FTM's nexus page might also help, since it attempts to explain everything via tooltips
https://www.nexusmods.com/stardewvalley/mods/3231?tab=files
In the Night Market, on the fishing submarine, the water there does not count as "Water" or "WaterSource" .
Im checking like this:
bool IsWater(GameLocation loc, Vector2 t)
{
return loc.doesTileHaveProperty((int)t.X, (int)t.Y, "Water", "Back") != null;
}
bool IsWaterSource(GameLocation loc, Vector2 t)
{
return loc.doesTileHaveProperty((int)t.X, (int)t.Y, "WaterSource", "Back") != null;
}
How can i detect if it is the water in the fishing submarine?
Alright then. Thanks.
That's really what I want to do with my mod
The water should act like water, but without the animations
Like the desert
spacecore already has a patch for tool data that allows non-stardew types, it would probably be extremely simple to do the same thing for enchantments
As far as I can tell, they do have "Water": "T" on both the Back and Buildings layer of that map, whether the sub is open or closed
both Tiled and Lookup Anything show it (the Back part, at least)
But if I use Cecil I can not use Harmony. The wiki tells me that Harmony is very dangerous so I think it's safer if I go with Cecil
Why do you have these functions instead of calling the ones already present on GameLocation?
actually the safest option is to replace the game with this random exe I found on moddb
trust
Oh ok. I trust you
(tbf that used to be how you installed TModloader)
saving over dlls is still very common in some circles 
To be fair I never got my TModloader from moddb
I'd trust an exe a lot more if it came from the official stardew forums for SMAPI
thank god we have bepinex nowadays
well, for me it returns false, tried other game methods and didnt work either, i will just hardcode and check the triangle, its good enough for what i need
if (loc is StardewValley.Locations.Submarine)
{
// x=8, y=6, width=14, height=7
Rectangle water_rectangle = new Rectangle(8, 6, 14, 7);
if (water_rectangle.Contains((int)t.X, (int)t.Y))
return true;
}
i just heard about the notepad++ breach and im wondering, how do i know if i was affected? i’m like 99% sure i didn’t use the auto update feature but that 1% is lurking
my impression is that there isn't a way to ID it yet, but running the latest installer (even if you have it already) from the official site will overwrite the problem if you were affected
though iirc it was also specifically targeting users from a relatively small region
alright, tysm!
This was a highly selective attack by a state-sponsored group targeting specific high-value organizations. Security researchers confirmed that the vast majority of Notepad++ users were never affected - attackers filtered victims based on strategic value, not random distribution.
thing is i’ve got notepad++ on my school computer… would that be “high value”?
so are you a federal employee working for a three letter org
i don’t think i am
should i use the online converter or use pathoschild’s i18n script
there is an i18n converter?
!i18n
So you'd like to stop writing all of \"your strings straight in your content.json?\" and/or you'd like the capability to see all of your strings across all of your .jsons?
Introducing i18n!
-
How to make your mod compatible with other languages: stardewmodding.wiki.gg
-
The file where you can put all of your strings is called default.json, and it sits in a folder at the same level of your assets, named "i18n".
-
If you're converting from an older version of the game, there's a converter for ease-of-access.
Not to be confused with
{{DynamicTokens}}since these require the specific{{i18n:<KEY>}}modifier
nope
hang on
Yes, there is a converter it's amazing!
oh wait, yes this is the right thing
the converting bit!
does it scan your mod for strings then put them into an i18n?
the page says it only does one at a time
Some of them can handle multiple like I did a whole objects.json
ohhh
so all my dialogue lines like these could be converted quickly?
Should be, yeah!
i’m shocked i didn’t know about this earlier
would’ve saved me so much time from realising i forgot to add the i18n and having to convert every string manually
oh thank god, i have like 100 lines of dialogue
Fr me with 60 events to convert
insert reaction image here
Ye, paws go tappa tappa
events are fun to make yet so tedious
Oh absolutely
i hate how they have to be all in one line
I have an easier time with them as opposed to dialogue
I thin kyou can multiline and it still reads
iirc a lot of people prefer multilining over single lining
yes you can but i saw its not reccomended for beginners
and when you try to find that one vanilla event you got to scroll through the behemoth of slash delimitated code
(oh my god do I know what I'm talking about?) in my humble opinion if it works for you, do it
ye
anyway i gtg
(I think vscode has a 'turn this into multilined' feature somewhere)
I think in a stardew syntax extension
it has a format button i know that
SMAPI supports multiline strings yet, but it is non-standard json and most editors/formatters
will cry
The wiki for event data does mention you can multiline just fine though, it doesn't have any warning against it
I don't mind it and understand why a lot of people like it, personally I just find it harder to read
i thought i read it the modding wiki somewhere
i’ve read so many tutorials im probably hallucinating this stuff atp
a month into modding i had dreams about dynamic tokens and game state queries each
this has happened to me too albeit with different hyperfixations
oh while we're vaguely at the topic of i18n
I was trying to pass a dynamic token to one of my i18n strings but i couldn't figure out how to do it properly
i'm not at my pc because i got tired so i can't look at my code but essentially it was like
a token called NoOfDays (crop growth) with the values 13, 20 and 27 that changes depending on a config
i wanted the seed description("Needs XY days to grow") to reflect the config choice but i couldn't figure out how to format it in both the i18n token and the string to make it work
You should just use localizedtext tbh
It's what the game itself uses for item descriptions
and it's much nicer to work with than passthroughs
Using direct i18n for this has some risk in that object descriptions may not update in time 
[[Modding:Tokenizable_strings]] localized text my belovalized
Now to answer the original question you must pass the token into the i18n using |key=value
They take line breaks now
time to read up on localizedtext 
The bigger why not i18n here reason is just the quirk that objects store the display name
It's tia "I am waiting for reports at work so why not backread" hours 
why did i not figure i'd have to to put the key within the string in brackets 
It's possible to use i18n for the Strings/Objects edit you do
New quote added by atravita as #7241 (https://discordapp.com/channels/137344473976799233/156109690059751424/1469079230368317572)
Or u can use the game's method which is [LocalizedText Strings\Objects:key {{subToken}}]
And have a {0} in your i18n
I forget if u have to put the subToken also in a LocalizedText tbh (maybe?)
i;/""?
"
?"
"
Hello kitty!
i'm fine i'm fine i definitely didn't just smash my ankle bone and then my keyboard
me too
that's how i felt after skimming through the tokenizable strings wiki page
Hey all. For those interested I'll be adding a few copies of Aseprite to the DP store in the next few days
https://www.nexusmods.com/modrewards#/store/item/251
oh shit you okay voyager?
i have ice. LOL sorry I had my hand right by my keyboard when it happened and just did my own catsmash

the ankle bone has a 98% critical hit rate 
It reminds me of trying to reach for ctrl + z while doing things on paper, so I do not. /lh

Without a keyboard even present.
I do that too it's okay
for a while I kept trying to double tap on paper to undo
once I was so tired a double tapped a random surface hoping it would undo whatver action I did (do not remember what LOL)
omg yeah whenever i draw traditional i try to use keyboard shortcuts to undo/select/zoom/etc
oh same-
helloooo is there a reason why gift dialog like AcceptGift_Loved would have lower priority than dialog in the gift taste data entry?
okayy looks like the error is that smapi doesn't register my object at all
oh! no it does
Ok, for some reason I can get Minos’s introduction to work but not any other dialogue lines. It shows the speech bubble icon and plays a noise, but no text box shows up.
Smapi’s log did not give me any errors
!json
JSON is a standard format for machine-readable text files that's used by Stardew Valley mods.
If you need help with a JSON file, you can upload it to smapi.io/json to see automatic validation and share the link here.
When making mods, it's recommended to edit your files in a text editor with JSON support, such as VS Code, Notepad++, or Sublime Text. These programs will check for syntax errors.
-# luckyyyy /j
the only thing the validator has is the same error from before
Wait! I think I fogured it out
the validator is also to share the code with other people without requiring them to download it
I talked to him on Spring 4 and haven't finished the specific day dialogue yet which has a spring 4 line
okayyy getting this error about not finding my string, here's the error and my strings code (ignore the mod ID placeholder hehe)
[game] Failed parsing [LocalizedText Strings\HeadInTheClouds.theyrejustcuteokay:DwarfName_Player]: the key 'Strings\HeadInTheClouds.theyrejustcuteokay:DwarfName_Player' doesn't match an existing asset.
where is the keyboard on paper 😭
and yes the patch is loading, i added a purposeful error there and it did notice
There's no Load for Strings/{{ModId}} here.
OHHHH
(Load a blank)
gotchaa, how would that be formatted?
Same way you load a blank json to anything else
.....
lol it's just my left hand starts twitching with muscle memory
I'll just look at other mods for ref LOL
target the same target as your edit data
Sorry, I'm on mobile and didn't feel like typing a bunch of json and I thought you'd used blank jsons before!
"LogName": "blank",
"Action": "Load",
"Target": "Strings/{{ModID}}",
"FromFile": "blank.json",
"Priority": "Low"
}```
Make sure your blank.json has {} in it and not literally empty
no worries, and thanks for spotting the error :) I happen to be clueless 
thanks boxosoup!!1
im the opposite where I get confused when digital doesn't behave like irl 😔
I'm the happy medium of being confused 24/7
Hey, y'all! I apologize if I'm interrupting the above conversation, but I was wondering if there's anyone hangin around who might be willing to help me figure out how to start making an NPC mod? I've never touched modding other than adding them to my game and I understand that creating a new NPC is definitely a far reach for a complete beginner, but I promise I have a good reason! 🤣
Spring is coming up fast and I'll be moving to full-time with long hours so I won't be able to chat and hangout with my boyfriend as much so I'm wanting to turn myself into an NPC for him in SDV so that it'll maybe help curb the lonliness while I'm working. I've read through the modding page on the wiki, but I don't really understand it super well, so I'm just praying somebody here can dumb it down for me so that I can at least get a start on it 😅
just out of curiousity did you load a blank for dialogue
do you have any content patcher knowledge?
!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!
are you using modid/string as your dialogue?
nope, the target's Characters/NPC/Dialogue
If Claude is editing the dwarf then they already have dialogue
So no need for a blank load
i do! just using tokenizable strings for a lil extra chaos
ohh I forgot it was vanilla dwarf and not a new one
All I really know about it is that it's crucial for a lot of mods, I'm not the most tech-savvy person out there and it's been hard to try to decipher the lingo/slang words that are used in a lot of the resources I've looked into. Or I might just be a bit dense 🤣
That NPC guide in the governor command Selph got for you will be a lot of help
!cp
Content Patcher (https://www.nexusmods.com/stardewvalley/mods/1915) is a mod which loads content packs to change the game's images and data without replacing XNB files. If you want to make mods using Content Patcher, start at https://stardewvalleywiki.com/Modding:Content_Patcher.
Just as long as you take your time and don't rush or skip steps, because making an NPC does take a lot of time and a lot of different things must be written correctly, but no individual step is all that complicated
ooh ppl here are good at explaining so that'll be good! I'm gonna be modding rn but I lurk here a lot so I can hopefully help out sometime :)
you should look at this guide first
I'm just checking it out now! Just looking over the bullet points it definitely looks super comprehensive!!
Making an NPC is maybe the most common desire for new modders
lots of resources for it as a result
That's really good to know! I must've been looking in the wrong places for resources, I've never seen this guide before but so far I'm definitely understanding it better than the others I've read! I really appreciate y'all ❤️
you load a blank to create an asset that didn't exist before, and then you edit data the asset
When attempting to give a bouquet to a non-datable NPC who have RejectBouquet_NotDatable dialogue, I find that it still occasionally shows the You can't date this NPC message instead of the dialogue. Is there any way to suppress that?
the.. baby modders.. yearn for custom npcs... i guess.
Use rejectitem with the bouquet id
Someone should make a poll
Aa thank you! I'll try that.
Started getting into stardew modding, prepared sprite sheets and animation cycles; where do I begin on reading up on how to do scripting and what not
New quote added by head_in_the_cl0uds as #7242 (https://discordapp.com/channels/137344473976799233/156109690059751424/1469100287728947273)
!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!
lots of ppl looking to put their blorbos in SDV today
Cheers
makes sense tbh
bumping this bc I still dk-
code?
pff-
one sec
anddd gift tastes https://smapi.io/json/none/f1dd4d60cccf42bea7cb6cf39197a97b
i'm confused, why do you need AcceptGift_Loved to override gift taste dialogue? isn't it functionally the same thing
I have released fire safety into the world, fire safety be upon ye
i can see wanting to override specific objects but not all loved gifts
wait I'm confused? (default state of being ngl-)
why don't you describe what you want to have happen
just regular gift dialog stuffs, I simply prefer having alll the dialog lines in one place- wait would that line override other gift stuff too?
also wedding attendance
you're i18ning it, it's already all in the same file there :P i can look at the decompile to see if it gets overridden but i gotta say if it's giving you trouble just do it the normal way lol
ohh okay, I shall 
hello, can you tell me how to put my character into the game 
selph how do I make a blorbo 
just in case are you sure you included the file
some people add blorbos, I have added fire extinguishers (and also a blorbo)
or a blorbo fire extinguisher
{
dialogue = this.TryGetDialogue("AcceptGift_" + gift.QualifiedItemId) ?? gift.GetContextTags().Select((string tag) => this.TryGetDialogueByGiftTaste(taste, (string tasteTag) => "AcceptGift_" + tasteTag + "_" + tag)).FirstOrDefault((Dialogue p) => p != null) ?? gift.GetContextTags().Select((string tag) => this.TryGetDialogue("AcceptGift_" + tag)).FirstOrDefault((Dialogue p) => p != null) ?? this.TryGetDialogueByGiftTaste(taste, (string tasteTag) => "AcceptGift_" + tasteTag) ?? this.TryGetDialogue("AcceptGift");
string[] rawFields = rawData.Split('/');```
selph is this what you're looking at?
who says that fire extinguishers can't be blorbos!
gabe why aren't you asleep?
i read this as "blorbo extinguisher"
That is concerningly close to some of those educational shorts where some object comes alive and teaches a kid a lesson
thank you for covering my shift boxosoup 
no I just naturally become depressed around this time because the europeans go honk shoo
Grrrr the americans are telling me to go to sleep 
MURICA demands you have a sleep schedule
i'm honestly just waiting for the melatonin to do its job
boxo please never say that again /hj
it dont work if you staring at a screen in my experience
wait what should we call you boxosoup?
if i end up sending some weird ass message or accidentally calling someone or something: i'm sorry, i passed out with phone in hand
i'm still iffy on reading C# but i think => is like "do the following with the previous" and ?? is to prevent it returning null
I have a theory that its gift categories having priority but iirc it was disliked gifts not having priority rather than the opposite
eughhh my stupid fucking tokenizable strings STILL aren't parsing- I'll ask for help after a lil more tinkering
can you verify the file's included with a patch summary
NOOOOOO 
welp here's the line, got no clue why it's not working
"i18n_Dialog.Dwarf.Gift.Liked": "I like this. Thanks, [LocalizedText Strings/{{ModId}}:PlayerName_Dwarf].$1",
The answer to both of these things is "not particularly but not entirely unparticularly" but I don't know how to concisely explain them 
New quote added by head_in_the_cl0uds as #7243 (https://discordapp.com/channels/137344473976799233/156109690059751424/1469111087474675722)
lol no worries i'm very slowly making my way through microsoft tutorials so i'm sure he'll get to that stuff eventually
I typed the modID out in mine. maybe that's the problem?
Mr. Microsoft himself is teaching you...
i try to read the decompile for practice but alas it's Some Bullshit a lot of the time
hmm mayhaps? but I do have that |ModId={{ModId}} thingy
er, what?
Token passthrough into an i18n file
(thank you I have no clue how to explain that LOL)
Oh, no, I know what that is, I was just wondering why you did it that way instead of just writing it in.
All else being equal, there is no difference between using {{ModId}} and writing it manually.
easier? I do plan on changing my mod ID eventually, but then again there's text replacement
Google "lambda function"
claude are you aware you don't have to prefix your i18n with your mod id? it's already local to your mod
Well, if thats not it, I don't know what the problem is unless that string doesn't exist or something.
mhm! I'm just neurotic about formatting
Oh god okay that's linq fun
..if that's the problem I will cry
nope, it's there
I'm not 100% certain gift tastes parse tokenizable strings.
oh.
I thought it was just mail that didn't
I was trying to follow along backwards in the decompile but also, Data/NPCGiftTastes is one of those assets that has a bunch of localized variants in the unpack
I'm not saying for certain they don't, just putting it up as a possibility if any other people who can read the decompile wanna help verify it or not
lemme see if the dialog ones (ie the ID specific) ones work..
dammit i keep forgetting to pause the time and passing out
...oh shit.
so it's a gift taste issue- but I can't tell what?
..more json time
(also thank you guys so much for helping!!)
wiki said multilining was fine
do you have slashes in your i18n dialogue
-# hehhhhhh how am I fucking up this bad my life is a comedy of erros
I do have in the tokenizable string
Ohh that may be futzing it up
Try changing the slashes in the LocalizedText part to double backslashes
yeah it's parsing that as the delimiter it seems
ohh, they are double backslashes
Not here it isnt
oh, for this one I'm testing now, i thought maybe changing it to a / would fix stuff but nah :( I'll change it back
?? is an operator that returns the left-hand value if it is non-null, else the right-hand value, e.g. string text = data?.message ?? "default text"
i wouldn't exactly call => an operator, more just a part of the lambda syntax for defining a local/anonymous function, which being a function essentially does what you described
maybe more accurately non-member function
..nope still broken, and the custom lines aren't showing?
hmmm thank you this is slightly more understandable than the c# docs (i still probably need to play with it to really understand it but this helps)
now it shows as a like, which it should be, but it's just the generic dialog
both are quite common, but also both can generally be substituted with other (more verbose) methods of doing the same things
honestly I'm losing my energy for this atm, gonna work on it more later, but thank you guys so so much!
for example```cs
string text = data?.message ?? "default text";
is equivalent to```cs
string text = data?.message;
if (text is null)
text = "default text";
ahh yeah i'm really explicit with my style of coding because i need to be sure i can understand it when i go back to it, which is why/because i have trouble reading it
saving that for reference thank you!
(I'm not really seeing any immediate issues jumping out at me, sorry Claude, and I can't put my whole focus into this atm. Only thing I'd suggest next is removing the multilining, but beyond that, I'm not sure)
no problem 👍 you can also use the null-coalesing assignment operator ??=, which is the null-coalesing ?? operator but combined with = ```cs
string text = data?.message;
text ??= "default text";
because c# has a dozen ways of skinning any cats you throw at it
New quote added by atravita as #7244 (https://discordapp.com/channels/137344473976799233/156109690059751424/1469116453780328508)
Hi I’m working on a bus stop c# mod I am always trying to come up with solutions to problems but I can’t seem to make the player and Pam board the bus using c#
the BusStop class itself has a working solution for attaching a pathfinder to the player to board the bus. are you patching the existing method, or doing something new?
alright, I feel like I'm going insane.
I know I used Linus's basket as a sprite before, but now I can't find it in the game files
Wild bet
it should be in Maps/springObjects
Maps/springobjects
99% of things are in spring objects or cursors
so I've learned! I look through cursors and couldn't find it.
for everything else, there's cursors2™
and I knew I found it before, so that was fun
my brain was like "well, it should be a fall object, amirite?"
hahaha ofc it's right next to lewis's shorts
do skins for a mod id-prefixed animal also have to have their IDs prefixed?
Its not mandatory but if another mod wants to add skin to your animal later it will be clearer and "safer"
i should figure out local tokens for this tbh there's like 12 skins
Hi guys, i have a question: while doing flavored items sprite overlays, its possible to reduce the "intensity" of a the flavor color? for example an input with red color flavor should produce a pink-ish output item.
if I want to make my ui compatible with bigger backpack (for the community center) does it just boil down to making 48 slots on the ui's image for it, from 36?
or is it.. more involved lol
Yes, dont use full alpha in the color mask
Thanks!
Long story short, I'm fixing a mod that used to need the Quest Framework mod. I've followed the wiki on how to format the code and everything. It's still not working. Any tips on what to do?
are you trying to update it to be content patcher, or still using quest framework?
Content Patcher since Quest Framework is no longer available to be downloaded
ah okay yeah that's unfortunately not content patcher format at all. hold on, i can find you an example of what a CP quest should look like
it's slash-delimited so much less nice
If you look at the page I linked you to and expanded the "Data" bit. it shows vanilla quests for reference
"{{ModId}}_VisitLNF": "Location/The Lost and Found Department/Edwin has been taken back to the Dollhouse by his former warden. The Night Nurse might know how to get him back./Interact with the mirror she left to travel to the Lost and Found Department./{{ModId}}_LostAndFound//-1/0/-1/false/0",```
this is an example of what a quest would look like; each field in the string corresponds to something on the wiki page that midnight linked
Thanks!
if you have more questions feel free to come back here
how often is OnRenderedWorld raised? i can't find a measurement in like ticks or seconds or anything
i feel like it would be every tick but idk
Every tick(*)
how terror
crouching & wincing
Does the farmer animating when petting a cat or dog
nope, you can do drive-bys
oh i was looking for that the other day to make an LB adopt cat event
i think the closest i found was sitting down
yea i am also making one for example 
well ill think about it later let me push some updates first
scope creep add petting animations to farmer /j
[game] Failed to retrieve encrypted app ticket: k_EResultNoConnection, False how am i breaking things i've never heard of so bad
index out of bounds of array? sure. object reference not set to an instance of an object? no problem. wtf is encrypted app ticket
that is some steam thing
oh hopefully not my fault then?
What if u use the first frame of the watering can
What time speed mod is best for testing NPC schedules?
i like sinz' event tester which turns fast forward on/off with a keybind
please get the reference
8 hours later, an unknown number of back and forths with ChatGPT since I don't know how to write in C# for CP files, I finally, finally I have the modEntry.cs file completed to where it should, hopefully, do what I've wanted it to do from the beginning, spawn stuff on my map!
And yet, when I load the game and start a new day, literally nothing changes...
What is it this time I wonder? I didn't need to do 8 hours of work writing in a language I barely understand because it needs to be yet another language? I just... What am I doing wrong here?
No SMAPI errors, code is coming up clean of syntax errors, as far as I'm aware, this, like all my previous attempts, should be working...
we don't recommend using AI of any kind to help you code mods; stardew modding is very specific and AI doesn't have enough information on it to make good recommendations. if you share your code in here you may find people willing to help you, but not if it's AI-generated (which is also against server rules beyond being a waste of mod authors' time)
I wrote the initial stuff myself, I just used ChatGPT to help me clean up the errors and syntax since I'm not familiar with C# coding.
i would recommend starting from scratch and learning the button press tutorial, if you want to learn how to make C# mods. if you want to make content patcher mods, you can start with some tutorials depending on what you want to do
It won't clean things up though, it'll just break things.
Well, this has been broken already, and I can't wrap my mind around yet another language.
Also, any mod that is made using generative AI will not be allowed to be advertised in any way on this server (just mentioning in case that matters to you).
if youre stuck theres nice people here who will be happy to review, i know from experience
Again, this is just for my personal use. All I've been trying to do for the last two weeks is get my dang farm map to spawn stuff...
Have you considered using FTM instead of C#?
if you want your farm map to spawn stuff, that's doable with a framework like FTM
Are you kidding me right now?
No...why would I be?
That's literally what I started with 2 weeks ago!!! And everyone told me to stop using it and to swap to CP!
FTM isn't a coding language, it's a framework you write JSON for (which is fancy data entry)
Are you sure you weren't using Custom Farm Loader?
Oh, sorry, you're right. I started with CFL, not FTM.
FTM is not used to make farm maps. It's used to spawn additional things on maps. Usually the maps are made with CP and then the FTM component is additional.
In that case, I'm not sure that will work for me. I made a custom farm map, and I'm trying to get it to have custom fishing and spawning mechanics that blend a little bit of everything together.
did you implement the custom farm map with content patcher instead of CFL?
When? At this point, I don't even remember everything that I've tried.
And I've long since overwritten the original, non-functioning file...
how is your farm map loading in right now
Using Content Patcher. The map itself works, the overlay shows up, so everything regarding the tmx file is good. But nothing else I try is working. And everytime I've posted here for help, I was told to change to a different system, which I tried today with absolutely zero progress or results to show for it.
i think you might be confusing C# and CP?
Am I not supposed to use a C# file for a CP mod? That's what I understood for the confusing wikis I read through...
No, CP mods are just json
!startmodding no, generally CP mods don't require a C# component. here's some information on the differences:
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.
what we're recommending is a CP mod (which it sounds like you already have), combined with a content pack for FTM to handle the spawning
Am I allowed to swear on this server? I just spent 8 hours stressing about and doing something that I never even needed to do apparently...
i'm sorry you spent so long frustrated!
Yes, swearing is allowed as long as it's not at people
Also it has been said a couple of times that you're still welcome to just use CFL, you don't need to switch, it's just unlikely that you'll be able to receive much help here. All of that is still true. FTM has also been mentioned previously, because there is no one single modern mod/framework that does everything, unfortunately. Just comes with the territory of a renewed modding scene after a significantly game-changing update.
So sometimes things will take a couple of different things to make work the way you want it to.
It is very frustrating to end up spending a lot of time on things where you don't really know what's going on, especially if you thought it was going to be somewhat straightforward at the start. One of the unfortunate things about being new to modding is that you don't really have any way to judge what's going to be easy or difficult.
Right. Well, I guess once again I need to rest and refresh myself to try something new, again, and learn how tf to mod for FTM now instead of just CP. That's my entire day down the drain... Yay...
Seriously, why can't I just use one framework from the start?
That's what I liked about CFL. It was simple and everything was in one place.
Because there is no one framework that does it all.
The wonderful thing about modding communities is that there are different people with different ideas and different skills. That does also make it a bit more complicated because it means things are more spread out, but it's a net positive imo.
Well, to see if I can at least salvage something from the last 8 hours, would the C# ModEntry.cs file I created be able to potentially do what I want?
you could code your own spawning with C#, yes. i think it would be difficult without knowing C# though
Well, I don't know what's in your ModEntry.cs, but a C# mod can do anything it wants in theory.
Custom Farm Loader, for example, is just a C# mod that lets other people write json and does the C# stuff for them.
Also, are there any resources that are not from the Stardew Valley official wiki? I genuinely can't make heads or tails about how I'm supposed to format, well, anything.
Okay, so how would I go about trying to implement what I've got here? Idk if it will even work, since idk how to even use it it seems...
we have the modding wiki (stardewmodding.wiki.gg), but i don't know that you'd find what you want there
(Also to add on to what Aba said earlier, AI generated content isn't allowed on this server in general, even if the code is for personal use only, so please do take care to remove any if there is any from any .cs files you might ask for help with)
I don't know, because I am not familiar with how Custom Farm Loader worked, so even if I knew exactly what your CFL mod looked like, I wouldn't know how to recreate it.
It probably wouldn't be a trivial task to recreate every option that CFL allows.
And as Nic says there is the modding wiki too, you may find other resources there, though they tend to refer back to the official wiki where appropriate, so it kinda depends.
You could also check out other open source code
I assure you, it's not.
It's apparently not a simple task to just spawn all the different kinds of ores and adjust their spawn chances, because in every other system, you apparently have to name them one by one or call to another file to get rewritten.
It's also not a simple task to have a body of water have every kind of fish in it anymore either.
If you mean for formatting Content Patcher or Farm Type Manager stuff specifically, that also wouldn't be on the official wiki to begin with, as it'd be in the documentation for those mods found on their respective NexusMods pages.
Like I said, I've learned how to code CFL and CP, and I've somewhat learned how to code C# (still don't understand what half of the variables mean), but none of that was enough to get the job done. So I guess I'm just going to go to FTM on another day and learn how to do that and maybe, maybe get something that can even somewhat approximate what I was able to achieve with CFL before the 1.6 update since literally nothing else is working...
i'm also learning how to code C# so if it helps to know i'm also in the trenches with you 🤝
I've spent more time trying to fix this map at this point than I did making it in the first place.
plenty of people in here have experience with FTM though, far more than they have with CFL, so you likely wouldn't be as frustrated with it
Yeah, maybe. With my luck though, it still won't work despite my best efforts. We'll see though since I need to start over from scratch again I guess...
ummm..is there a server for having people help test mods? just curious.
help please! i'm scripting an event. i added a prop using the addBigProp command, but i can't remove it. I've used removeObject, removeSprite, removeTemporarySprites..none remove it, prop remains on screen. anyone encounter this before?
i don't see a way to remove a prop added by that command on casual inspection of the event code. i think it's simply not possible with vanilla commands
it should go away when the event ends, but i expect that's little consolation
i see, thanks! do you know if it would be otherwise possible in c#?
yeah, it wouldn't even be difficult. you could just register an event command to handle your use case
i'm stubborn so i'm gonna give it a shot
(going the c# route.)
i'm a total c# beginner. i know some javascript though. maybe it'll translate 💀
I sent it. Thanks for the suggestion!
if only there was a knowledgeable modder working on an event command framework of sorts 
if only 
Is there a way to apply a buff like the burglar's ring (bonus monster loot) to something else without just retexturing the ring?
(through C# all things are possible and I'll go that route but I'm curious if CP is available)
it looks like the burglar's ring buff is probably applied via C#
🔥
HARDCODED
🔥
Does anyone know if there is a way to have 2 maps edited when the bundle is done with Unlockable Bundles?
I could just do an edit map with a when patch but this would be faster/more convenient
what exactly are you trying to do?
When the bundle is completed I want 2 maps edited with the EditMap feature in Unlockable Bundles (just so I dont have to do another editmap patch)
ohh i am not familiar with unlockable bundles but perhaps that's something a dyanmic token could solve?
Thing is I want both locations changed at the same time so I don't think a dynamic token would work
the location change is part of the reward for completing a bundle, did i get this right?
the map patch, i mean, sorry
yeah
okay i snooped around in the unlockable bundles documentation and my idea was as such:
apply one map patch with the UB built in edit map function
the second one you could use a dynamic token in a regular edit map patch for
UB seems to provide a token to run checks, DLX.Bundles/Purchased
i'm on mobile so please bear with my terrible formatting
in the other map patch, you could then set a dynamic token with the new coordinates as value
let me type it out real quick
all good its just annoying because ive already got so many edit map patches but 1 more wont hurt
oh also, the cutscenes after you finish a bundle where the junimos are dancing throwing their space dust onto the bundle reward, is that hardcoded?
damn i actually have to go now, if you're still going to be around later, i'll ping you to show you what i mean
i actually think you dont even need a dynamic token for what you are trying to do, i'll msg you later 
i figured it out, ty!
how did you solve it?
Hey guys how to fix I wait so long but I stuck save loading screen
Does this error sometimes mean a pirated game? Galaxy auth failure: FAILURE_REASON_INVALID_CREDENTIALS
(this is probably more indicative: C:\Games\Stardew Valley)
Just realized someone who's been having a lot of issues with my Smoluanu mod might be using a pirated version.
steam/gog isnt running in the background
that game path isnt indicitative of anything necessarily, could very easily be a gog install
They also made this comment: (also please ignore the Galaxy auth error, hate me if you want but just spare me)
(which makes me think that they are doing something I will frown upon)
eeehh yeah that last one is more hmmmmm
I feel like I'm about to stop trying to help them bugfix, and it might explain why some things just ain't working for them.
you'd be entirely within your rights i think
if you dont feel comfortable telling them to go pound sand directly, perhaps you could suggest they do a fresh install from steam or gog and report back if theyre still having issues with your mod specifically
I"d be entirely within my rights to just give up on them regardless of their situation.
true true! sorry, i think my inner people pleasing projection shines through a bit much sometimes
but yeah they've had a lot of stuff no happening and they've also been force triggering events so...
I am also a natural people pleaser.
Well it's possible if it's a pirated copy then weird stuff might come up because of it, stuff that you wouldn't be able to fix
but in this instance, they have come to me wiht a number of issues I cannot replicate and cannot see why they wouldnt' be working in the code, so I suspect they are not playing things entirely as intended.
(and quite frankly, I have been finding them a bit frustrating)
they also somehow lost the Dwarf Translation Guide from their wallet
if theyve been force triggering events and who knows what else, thats not how the mod is designed to work, as you say. they're not using the mod in the way it was meant to be used. and shouldnt be surprised if things break when used as not intended
they what 
Uhh yeah what
...how

When I finally manage to make it work, and start playing, imagine my surprise when I went to the daily talk to the dwarf and found out that huh suddently I can't undestand him anymore. All scrolls are already donated but the the Dwarvish Translation Guide dissapeared from my Special Items menu.
diagnose: PEBCAK 
sweats nervously pebcak
What is a pebcake
“Works on my machine”
twinsies
Looks like somehow they... Un-dwarvish translation guide flagged themselves
They were trying to move a multiplayer game in which I assume they were a farmhand to their computer to play singleplayer, so god only knows what they were doing.
Yikes
(I just read that part now, and I'm like "yep that sounds like a recipe for disaster")
Maybe save editing and broke something
I think there are potentially lots of broken things here
And few of them, like, mod errors and rather use choices
tbf, I wasn't paying much attention because they DM'd me to help and I just said "can't help go to the main discord, ain't nothing to do with my mod"
in another random question, has anyone tried East Scarp on mobile?
I've jsut had a report that when you enter the Scarp bus, it takes you into the temp NPC warp room - which is via an NPCWarp.
(alternately, poster is actually an NPC)
Caroline finally got fed up of Pierre and is trying to get on the first bus out of town 
Hi, I'm new around here and I know practically nothing about programming languages. I would need help to edit a mod and add some features, in case someone is willing to help me 🙂
Thanks.
Can you tell us what kind of mod it is?
It's about this mod. All I’d want is to add magic regeneration, 1% for every in‑game minute.
https://www.nexusmods.com/stardewvalley/mods/36609?tab=description
I tried to do it myself, but I need to know how to edit and then compile a .dll file, and I don’t know anything about this stuff
doesnt seem to be open source, you're better off just mention it to the author
⚠️ Beta Notice:
This mod is still in beta, so you may encounter bugs or unexpected behavior.
I’m actively developing and improving it, and I’m happy to hear your ideas or suggestions.
Please leave your feedback, bug reports, or feature requests in the comments — it really helps make the mod better! (beta notice ~ visuals spells can be buged in mulitplayer)
I contacted him in a private message and he agreed, but only on the condition that it was for private use. So I already have the permission; now I just need to know how to edit it, or for someone with the skills to do it for me.
Adding that feature isn’t something he plans to include in the mod once it’s finished.
Aseprite is now available in the mod rewards store!
https://www.nexusmods.com/modrewards#/store/item/251
Ooh nice!
private use typically means not sharing it with others, which means we can’t make it for you. But if you want some resources on C# mods, we can send those your way
I got 2 reports of NRE somewhere in here https://github.com/Mushymato/GrassVariety/blob/main/GrassVariety/LocationGrassWatcher.cs#L51
Exception says line 68 but I think that's probably compile silliness and not correct
Can't rly think of anything that would be null here
grassVarietiesForLocation is null sometimes, right? is it definitely not null in activate?
It's null on dispose 
I've been getting a GV error too, let me go look what it is
I wish nres had more info 
Maybe it somehow got Dispose and yet didn't leave the cwt?
I dunno man garbage collection goes brrrr
yeah, that was my guess? especially since afaik line numbers are usually somewhat accurate to source
oh wait, chu, do you have the logs actually
Another thing is that this exception specifically happens on saved
The ppl reporting it says it works fine in normal play
Oh mine is different so nevermind
I have a suspicion I want to double check, if they gave you logs
Log Info: SMAPI 4.4.0 with SDV 1.6.15 build 24354 on Windows 11 (10.0.26200.0), with 34 C# mods and 96 content packs.
Log Info: SMAPI 4.5.1 with SDV 1.6.15 build 24356 on Windows 11 (10.0.26200.0), with 44 C# mods and 57 content packs.
Suggested fixes: One or more mods are out of date, consider updating them



