#making-mods-general
1 messages · Page 412 of 1
how do you make specific dialogue for specific loved items or just specific items in general. like when you give them smth and they reply with smth they only say for that item?
im trying to do a few of those
while also having the general whole of like the likes, neutral, dislikes, hate
you need the AcceptItem_ dialogue key
okay! thanks
what are tokens?
content patcher tokens are these things: {{something}}
Got the dwarf villagers actually planting crops now
Decided to add interiors for all the dwarf villager buildings as well
the forestry hut :D
dope
Okay planning out this artisan machine concept:
- New trees for Pokemon Apricorns (technically one tree with colour variants) (how are these trees obtained? Do I do a new NPC or just make Pierre sell them)
- Trees produce Apricorn fruit (colours depend on tree colour)
- Keg makes Aprijuice
- New artisan machine makes Pokeballs (type depending on colour) (Are Pokeballs just giftable/decoration items?)
Not too complicated when I lay it out like that
🤔 i have a few ideas, but depends on how you want to go about it. like i think maybe the apricorns can be foraged? and thus turned into tree seeds? you could also have a vendor who shows up occasionally in town to sell them
I had a dumb idea to have a video game character isekaied into SDV to be a vendor and I could use that as a base/foundation for if I do other video game-themed mods
But foraging is also a really interesting idea
Can Seed Maker make tree seeds though
you can make custom bush
im not sure how the seedmaker works tbh
that'd be closest to pokemon berries i feel
I could also have it be a coffee bean situation where the foragable is both a fruit and a seed
I thiiiink in the anime (and maybe PLA) Apricorns come from trees
seedmaker doesnt automatically make tree seeds but you can add custom machine rules to make it do that
same for custom bush starters if you go with chu's suggestion
im looking forward to getting my hands on Bush
not looking forward to actually having to Draw said bush
(so im going to borrow the coffee plant)
Based on that video my guess is either the spritebatch is using premul alpha or I did the tint color wrong (or both)
do u want the whole mod to do repro 
i didn't try the texture mode, just the map layer mode
Nah I can do a placeholder debug thing that just does the render part
bush isnt any harder to draw than crop or tree imo
i also was not good at drawing them when i first started making my crop mod. maybe ive improved
the difficulty of drawing a plant is proportional to the number of leaves
is grass the ultimate challange
go on, draw grass tiles that tile. i'll wait
Okay guys, what would be going wrong with a mod where a cutscene plays but the farmer isn't appearing when they should?
I have two different older mods where this happens but they work otherwise
Okay one is from the Stray Catfe. Tabitha is debating going into the Saloon. It starts and she talks but the part where the farmer appears to talk to her doesn't happen and the scene just stops and doesn't continue
The other is from Mona. The scene plays, the farmer just isn't there so she's talking to no one
do you got the event jsons
!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.
Ok so I'm here asking for help. I have a mod idea I want to make but I have no idea how to code. It's a mod that would use [CP] code and is mostly event based but I can't for the life of me figure out how to do this. I've read multiple guides multiple times and had some help from someone else but I just can't make sense of this and get it to work in my head. I Have ADHD and OCD and as a result I did really poorly in spelling, math and gramar and I'm having a similar issue trying to learn this. Reading guides doesn't help and I don't want to be hand held for every line of code I write. I want to learn how to do this but I can;t get it to take. THe guy I was talking with suggested I ask for help here since he thinks there might be people who would be better suited to helping me learn. THe short version is its a romance mod mostly based off of cut scenes that are locked behind prequisits and changing the requirments for marraige. Bassically it bothered me that dating was just 2 two more hearts and a pendent to get married so I wanted to make a mod that made dating an actual mechnic. Similar to date night but it would have a story element for each character and it's focused specifically on dating and not on marriage to make it a process.
uhhh hm. depending on how complicated you want it to be honestly you might need some C# in there too
but it shouldn't be hard to just setup a linear set of events that you have to view before marriage is an option
[[Modding:Events]]
based on what I've been told so far I won't need C# just CP
damnit
you wouldn't need C#, but you do need to learn how to write event script
it depends on what exactly you want the new "requirements for marriage" to be, whether or not you'd need C#
a lot can be done CP only though
its just impossible to say without knowing exact specifics
this is like 90% of the mod.
[[Modding:Event_data]]
in terms of the mechanics of "no marriage until you seen these events", i think you can achieve it by adding a RejectItem_ for the mermaid pendant
wait, what guides have you read already so i don't try and link them again
I've already tried all the guides I have the wiki links and the propper software for coding etc. The guides do not help and activly confuse me more.
I've used the modding wiki as well as one on Git hub
like put "RejectItem_(O)460": "no we can't get married yet :(" into their dialogue asset
this is getting ahead of ourselves tho, prob want to understand how to edit things with content patcher first
do you have any understanding of json itself in general?
(/gen, asking to try and gauge where most of the confusion might be coming from)
ah yep I was using new(Color, float) instead of Color * float.
i think a solid understanding of how json works would probably help, since i think a lot of guides tend to gloss over how exactly it works or dont go into too much detail in favour of just effectively going "just put this text like this, dont worry about the Why"
(for the record the way I'm tinting a whole layer is by modifying the ModulationColour on MapDisplayDevice, calling layer.Draw, then changing it back)
From the perspective of coding I'm an elementry schooler. In high school when my teacher was supposed to cover it he put a line of code on the board and basically said "Copy this" and that is all I was told about coding. I've wanted to learn for a long time and I finally was motivated to try by stardew valley but I've never learned well from reading and youtube is no help. I'm considering just hiring someone but one I want to learn how to do this and two by the time what I want to do will be fully realized I'd probably spend over $1000
@lucid iron with the weird blending fixed
i do think then starting with learning how json works and less so on the modding itself would be a good idea, then, and then taking another look at some of those guides afterwards. if you've already looked at the guides on the modding wiki, thats already mostly what people point to when trying to teach someone how to make those kinds of mods
i do have a json tutorial i made with minimal focus on stardew modding specifically and more focus on how json itself works, if you wanted to give it a try, otherwise there are probably better resources elsewhere online. they wont be stardew related, but most of the json syntax is universally applied
but understanding how to read and write json definitely helps a lot more stardew modding tutorials and guides make sense when you can begin to intuit why things are written the way they are instead of blindly copying bc "the guide said so"
Those activly confused me and led to me making 50% of it mistakes. THings are often worded in confusing days or they mean one thing but I think they mean another. I got very confused when I was trying how to figure out how portraits work in the code. It's kind of like understanding words in English but not knowing anything about punctuation, grammar or sentence structure.
I'll give it a look tomorrow.

oh it support map ss too nice
map ss?
screenshot
oh thanks I didn't do anything specific to support it
one of the usecase is to hide stuff while off screen
is there any way to change the speed of the fade atm?
oh wait I guess I used AlwaysFront renderstep instead of RenderedWorld so that is probably what made it work with screenshots
no, but that's a good idea
what's the code for brazillian portuguese translation?
pt-br
pt_br I think?
pt-br.json, pt_br.json, pt.json it is then
pt.json will just overrule pt-br.json
added a FadeTime field, which is an int and the number of game ticks to complete the fade
also implemented the animation fields, which are just FrameCount and FrameTime (also in ticks)
u know i always wondered
what is the difference between using ticks vs using ms
i usually do ms (TimeSpan)
ticks are easier to write and locked to framerate
ticks arent guaranteed to a consistent ms
I used to use ms but implementing ms-based timings is a lot more annoying and for cosmetic things like animations the improved accuracy and framerate independence is not really needed
s'why OnUpdateTicked is not guaranteed to happen at a consistent time interval
tbh i think i mainly use ms cus i dont know how to access ticks everywhere 
Game1.ticks lol
but time is just Game1.currentGameTime isnt it
Game1.currentGameTime uses the system clock for measurements, Game1.ticks just increments by one every game loop
GameTime.TotalGameTime has both the ms and the ticks
really?
I'd recommend using ms everywhere
err I think so
I usually avoid ticks like the plague (just like real life)
i was pretty sure TotalGameTime was just ms?
ElapsedGameTime has a Ticks property but I'm almost positive that's epoch ticks and not the game loop counter
fine for testing something quickly that needs a timer, shouldn't ever go into a release
Do ticks carry plage?
ah that's it
IRL deer ticks carry lyme disease
well that's fleas, but ticks probably could too
i yoinked how game did draw layer frames which was Game1.currentGameTime.TotalGameTime.TotalMilliseconds
though notably dog ticks do not carry lyme disease, so while they are gross, they're mostly safe
(is plage an American spelling)
no its an atra spelling
BuildingDrawLayer.GetSourceRect
yeah I mean I've done that before, it's just that it's much more verbose and requires working with floating point math which is a lot less convenient than simple integers for spritesheet animation
milliseconds is the milliseconds component
think of it like the decimal point after the seconds
i think
I made that mistake too recently 
total milliseconds is the interval as represented in milliseconds
monogame should really just have a built-in spritesheet animation tool
(I also used ms for animations, but the context I'm working in is pretty self-contained which makes things a lot easier)
i guess for now i just put EMU in me playing list 
make some kisaa house personal edits for the attic and balcony
Does anyone know where I can find all the names for the locations for making a schedule
!unpack
Follow this guide to unpack the game's content files in order to see and explore how the game data is structured.
It's helpful when making your own mods, or just to learn about how the game works!
after you do that Maps folder will be your friend
New quote added by atravita as #6614 (https://discordapp.com/channels/137344473976799233/156109690059751424/1412228921193402480)
theres not just a list somewhere?
when i try to put in a monitor for a harmony patch using the example on the best practices section of the main page the ide gives a warning about it hiding the inherited member from the mods class, is that whats supposed to happen cuz im not seeing any traces from it in smapi when i run the game with dev mode on
Did you name the monitor static field Monitor
That conflicts with the instanced field inherited from Mod
when i name it something else the ide says it must be a non null value when exiting the constructor, should i assign something to it?
Yeah u can put = null!;
This is a smapi quirk basically
The Entry method acts as the ModEntry constructor in most regards but is ofc not an actual constructor
As long as you are sure that you won't access a thing before assign the null warning is ignorable, and null! suppresses it
oh yay i see them now!! thank you!!!!
If I want to test a patch that activates when a mail flag has been activated, is there a way I can just set that in the SMAPI console?
debug action AddMail Current yourflaggoesrighthere
nice, thanks
You can run any trigger action action with this
heck
Well, it mostly works, but I tried to set it so that anything sold to the shop would be sold for nothing, and that doesn't appear to be working right
https://smapi.io/json/content-patcher/c4b78774c44a442c85b9decc6846dedb
It's the one that's labeled "Municipal Clothing Donations". I appear to not understand how those price modifiers work...
If I could "sell" them in exchange for a prize ticket, that could also work, but I only see how to do trades the other way around
When I looked into this last, you can't actually modify how an item could be sold to a specific shop.
(I was trying to look if I could have a shop that buy artifacts at higher price than others)
I just want it to buy one type of thing and do it for zero money. This seems to say it's doable...
https://stardewvalleywiki.com/Modding:Common_data_field_types#Quantity_modifiers it even has examples over here
Oh, if you want it to accept just one thing, you can set that item ID as currency.
No, I mean... It doesn't buy anything but what I want to sell it, I'm not trying to make specific items cost more, I guess?
I just want it to buy everything I can sell it for nothing
I can't tell if I'm confused or this wiki page is confusing.
PriceModifiers (Optional) Quantity modifiers applied to the sell price for items in this shop. See also PriceModifiers under Items.
This LOOKS like it's what I want
unless it means them selling to me
Yeah, that meant them selling to you.
argh
You want to do a donation box thing?
I want a clothes donation box, yes
Also wanted to do a little free pantry sort of deal, but if I can't donate stuff, that's kindof not helpful
I am making a mod with a lot of override options for crops, and was wondering for having certain areas with "higher quality soil" whether I should have it locked to the vanilla fertilizer values, or if it should be based on a float that a mod author sets.
you can do a machine
the little free library mod does that
a machine, outputs prize tickets, you can use the prize tickets in a shop thats the free pantry (or just leave the shop free and have the machine output something else to get around the mechanic)
I didn't want the free pantry to exchange anything
like it's a box, you can put stuff in it or take stuff out of it without judgement
I seem to recall one of the map utility mods had an action thing for global inventories. mmap maybe?
The machine aspect kinda makes me... not use the library, so I didn't want to go that route
it would only have stuff that you put in it though
honestly not to be that person but this kind of thing would be much easier to do with c#
Easier to do with C# seems like it doesn't account for "learning how to do C# from scratch for a side feature that only unlocks after 10 hearts with an NPC"
I don't really exactly want a global inventory. The shop let me kinda emulate other people putting stuff in there by setting random inventory, you know?
there's a traction to add stuff into a global inventory too
mushymato.MMAP_AddItemToBag
unfortunately this only accepts an item id, i was gonna make peliq do the fancier item spawn field version but didn't get around to it
iirc ftm can also spawn a chest with stuff inside
maybe I'll just make it a deadass normal shop with no markup and you're just gonna have to pretend it's free
#modded-stardew is the channel you want. This one is for discussion about making mods :)
oh mb
For that matter you could also maybe just spawn in a retextured chest and play pretend that other people are accessing it?
I know it's basically an RP addition, but I kinda wanted it to have some use, like maybe there's something in there you could use right now.
So a box only you contribute to isn't really along those lines
Like a chest with a random chance that something disappears from it or spawns in it each day.... (dont actually know the feasability of this im just rephrasing for my own understanding)
🤔 the talk of a donation box reminds me... Since the mod im working on is related to cloth, i had thought about like... A special order where... Idk what it's called, but being able to donate quilts to some charity drive... Mainly bc i can't really think of what else to do, tbh. Maybe i can have a pelican town craft fair...
Special orders aren't difficult, are they? 
I was considering doing some, so I hope not LOL
Also i... Hm. Festivals.... I hope those aren't hard either
Or maybe i should try something like the night market
The MONEY donation box part works anyway
i don't think they are hard, but there are a few weird quirks (be careful with dropbox location, no character icon or something like that, time limit is required unless you have one of the four infinite-duration framework implementations or 1.7, probably more)
How long can i make the time limit?
Month is the longest in 1.6
😔
if you want longer, you want a quest
Well, id just hoped to not put pressure by having a time limit
i wasn't kidding i think there are four different mods that implement no time limit on special orders /lh
🤔 which 4
you'll have to ask someone else for that 😅
i have one unreleased but it's waiting forever anyway
the authors yearn for untimed special orders
Nemo's Magic Skill Mod 1.0 is out and about. Please let me know what you guys think could be improved! I have some cool ideas but feedback is hugely important!
hey just a heads up that AI generated mods are against the rules
Thanks for the heads up!
small steps 🥳
i will put them in the hot pot.
Yess delicious soup
a fine roast
Green things...
but the bronklies...
bronclies are off
6480 is your firstborn perhaps a gold quality cauliflower
huh i didn't expect it to actually find the items
i should really rename this food. i dont think there's such a thing as a hot pot roast
wonder what i was eating in 2021
I mean: I’d say it counts. Hot pot roast is right out of the pan or slow cooker
Then there’s cold pot roast. For sandwiches the next day
….now I want pot roast
Cant be any worse than the recipes in vanilla im ngl
Especially when that first bean fills you /s
Maybe the sdv farmer is just growing really big beans
I love fiddlehead risotto with No Rice
Chocolate cake <3 dont ask where the chocolate came from dont worry about it
yeah there's a lot of cruel injustices in the cooking and i was happy to remove all the custom crops and objects from the love of cooking in v2
but not cooking chocolate. you can take that from my warm chocolate-covered hands
Is there any way i can make the folliage compatible with recolor mods?
Foliage and dirt will auto-match if you use vanilla tilesheets. Make sure to delete any reference tilesheets from within your mod so the game applies the vanilla sheets that would be edited by recolors instead of the ones inside your own mod
Also im SO excited for context tags/love of cooking compatibility. A few days ago i didnt even know my plan to use spacecore context tag cooking ingredients in a future cooking mod would cause incompatibility, and now by the time i finish it in 6-8 months, it won't!
6-8 might be lowballing it. Ill set the deadline at 2 years
it's definitely long overdue and hopefully it'll lead to more recipes using context tags for common items (e.g. n Butters)
just needs a little more cleaning up
So many different mods add butter.....
And like. I get why. You dont have a guarantee the end user will have any of the other butter-adding mods. But you wanna use it in a recipe so you have to make sure they have it
The butter compatibility nightmare
Ill keep context tags in mind when i start making more items
chocolate cake is one thing but why did he never patch this retroactively lool
It thankfully doesnt cause incompatibility (or cause anything to break), you just have to make sure the vanilla recipe string is acceptable because thats what will display for loc users
So for cornucopia its set up to be a configurable option
(always great to set a toggle to turn off features just in case like, that feature temporarily breaks in spacecore at some point)
also supports spacecore custom skill buffs and added attributes (health/stamina regen)
Nodding along. Ok i think i understand
Im still a good bit away from the recipe mod bc i have to finish a different one first but learning things ahead of time doesnt hurt
Basically
1- make the recipe as if it were a normal no context tags recipe
2- add an entry in whichever part of spacecore does recipes that edits it after the fact to use context tags
?
WAIT SPACECORE ALSO ADDS REGEN?
Im disintegrating. But like. In a good way. Im so excited to work on this mod when i get there
You're required to add the recipe via the normal game method, before also adding the spacecore entry anyways (otherwise spacecore cant add its context tag function)
Didnt realize that you didnt know that yet
Yeah i cannot understate how far along i am making this mod ^^;
Ive like. Decided names and some ingredients. Thats it
For the record i do know how to add normal recipes i just also knew i would need context tags to deal with the Butter Compatibility Nightmare. And i hadnt gotten far enough to learn how to do that yet
I see, in that case i would still recommend choosing a specific butter-having mod to use the items from for the default recipe, just in case the context tag method isnt viable for any reason such as a player using another incompatible cooking mod, spacecore temporarily losing the feature in a major game update, and so on
(Butter Compatibility Nightmare is just a silly name its other items too) rn im thinking of like. Having a config option to decide which mod shared items will be drawn from. Then using dynamic tokens to put whichever item that ends up being into the base recipe. Then context tags on top of that
and there are other mods like the item switching mod that allow people to put the right item in
yeah thats fine too
Dont have to overthink it rn though, you know theres potential solutions so you can just focus on the basic aspects of your mod first
We need a butter framework
mod that adds Butter and nothing else and everyone requires The Butter
but it's like ten copies of butter too late for that
Im not tryin to stress myself over it dw. I just get excited thinking ahead and planning for features way ahead of time
I just really love modding. I love learning all the things i can do and thinking about how i can apply them all and where theyd be useful
Butter framework unironically wouldve been so good. But youre right about being ten butters too late
Now that everyone has their own butter it would be just butter number eleven
dont worry guys, ill handle it
exactly
there are now 15 competing spreads.
"I Can't Believe It's Not Butter 1-10"
My MAIN goal. Is to only add butter (and other repeat items) to the game if the player doesnt have any other mods adding them. Or if they want to have 11 butters and ask for mine to be active anyways
god I am basically 3 events from a potentially release ready NPC
vibrates
Maybe a few more if I do some of my Scope Creep column
I should maybe work on making a resource that lists all the mods that add butter/baking products/meats etc. Because i know id find it useful and maybe other people will too
Also ooooooo new npc soon
they're heart events and those take me time
But I've been working since September last year
aside from the side-track for when my gall bladder decided to die
rip gall bladder u will be missed
"please download the mod, i put my blood, sweat, and gall bladder into these events"
"Please don't let my gall bladder have died for nothing"
Well. Maybe itd be missed if it functioned correctly. Did it ever consider that
Exactly
Obviously the answer to this series of events is you make the npc also have had their gallblader removed. Fate dictates it so
You're reminding me of that mod that gave you heart pills that you just had to take or your heart would go
mod idea: One day, you don't know when, your gall bladder will go.
Reflections of real-world diversity in mods is always good. Even if it ends up sounding kinda silly as a gameplay feature
Gonna start giving the farmer MY issues. You have to sit down at least once every hour or you start taking damage
farmer forgets to fucking eat and becomes dizzy, starts walking in zig zags
Get overheated, faint
Next you are going to mandate the farmer actually sleeps 8 hours and not 4 hours they get currently from 2am to 6am
Nah see, you just need a farmer with insomnia
if u don't sleep for at least 8 you will never hit ur target
going to chop down this tree? no
implementing the nap mod, where if you stay up until 2am you lose four hours randomly in the middle of the day to The Nap
eldritch horror
or you wake at lunch
Food coma after eating
just pass out on the field
new CT that gets added: “LazyAss”
hmm. why did i make the lasagna buff make enemies slower. it should really just make you move slower
don't wear a hat in summer? enjoy sunburn
I mean tbf i often do go to bed at 10 pm when i play the game
can confirm this is irl effect of lasagna
source; Garfield
My farmer is fully rested
these are actually good ideas if i do want to make that Old Farmer idea. Old Farmer needs less sleep but moves slow as shit and is prone to The Nap whenever sitting down
(Though that does have more to do with a different Issue where i cant visually distinguish dark colors so i just stop being able to see past a certain point)
Can only plant trellis crops as you can't bend down for the parsnips
solution: no sit
Today was productive anyway. Got a coffee maker working, got all my donation boxes sorted, made sure all my map patches worked. those three heart events loom ominously in the background
issue: ow back
solution 2: lie on floor
every day you spend without sitting raises chance of mandatory hip surgery by 1%
new issue: how get up from floor
That's a feature not a bug
this is fine, I don't breathe good anyway
benefits of being old: senior discount on everything, pam stops calling you kid
cat: sits on chest
me: wheezing aww ur such baby
if the farmer was like me they'd get a random ass "oop got a migraine, can't do anything for the rest of the day"
Oh, old farmer: knees get worse when it rains
Old Farmer starts with a cutscene of your grandchild giving you the deed to a farm they bought that they decided was too much work
but also: feels when it's going to rain tmrw due to knees
no weather channel needed!
i’m actually loving this idea more and more not just for meme potential but also for the difference in roleplaying it would mean
everyone in town gets New Grandparent
how will u get around the spouse stardrop
suppose e everyone just rooms with krobus
he is as old
make george romanceable /j
pam is right there
Evelyn D:
poly mullners
Hi i will contribute to the butter conundrum
oh well that's fine then
where is butter frog
everyone is like "I add butter" but no one dares to add the butter frog from the hit movie cloudy with a chance of meatballs 2
Bit movie
serious answer: could do some fuckery to either make farmer a widow and give it after an emotional moment… maybe deceased spouse left it for you for the one year anniversary of their death. or maybe you get it after “adopting” someone as your honorary child (doesn’t have to be literal adoption, but basically a meaningful relationship with a townsperson)
my neighbor growing up was like a second mom to my mom and i’d love to see that sort of relationship in a game
Alternatively: mod all the marriageables to also be Old.
Honestly that's probably easier
too much effort
oh god so much rewriting
Probably
banned
i’d rather do C# nonsense than rewrite all of that
@urban patrol You leveled up to Shepherd. Wow, you've been talking a lot! Have a prettier, slightly more brag worthy, shade of blue.
All of the hardcoded marriage/children stuff scares me
"Be a different blue" is orange
As someone who does 0 C#
silly governor
Bea when will you be shorts
I'm trans it should be so
George and evelyn are now alex's grandchildren who he named after his grandparents
I'm on like 880 and it's 1k no?
Yeah
awww
All these ideas for Old Farmer would be a lot of work but im just brainstorming for fun im not thinking about logistics
rewriting all other npcs would be a nightmare
that’s where i’m at too lol
and that not even mentioning the dreaded mod compatibility
if old farmer turns out to be that involved, i’d say screw compatibility :/
Maybe the age everyone up dream is just that... a dream. Im still gonna be imagining elderly gay couples in my head tho
i mean, this could be a collab if someone else wanted to handle that creative aspect of it!
Ur a genius...
i just know i myself only have so much time in a day and don’t want to reinvent the wheel 😂
scope creep hitting nic hard
But what if you could make it rounder this time
Im joining the war on scope creep on the side of scope creep

okay I love all that lol
Hi everyone! Question about coding my mod. I'm making a dirt retexture for winter, and I'm thinking about having it disabled during snow, so then the snow will cover the ground as normal. What would I add to the "When" section to make this happen? I know nothing about coding, so I have a hard time understanding how to connect tokens properly.
memory problems, like forgetting some liked and loved gifts in the character menu
You're gonna have to apply your retexture to each season individually because of how vanilla tilesheets work, so just dont apply it to winter
No when tokens necessary
Wait
I cant fucking read
lol No worries!
I was just replying cause I was confused too. XD
is there any uncomplicated way for me to simulate a farmhand with a certain house/spouse room to test my mod?
REAL answer:
"When": { "Weather": "Snow" },
I need to disable stardrop for this, right?
The content patcher github has an author guide with more info like this if you get stuck again! Hope this helps
Also never take anything i say as law im guessing like 70% of the time
For example my first thought was to use a GSQ and then i went "no.... i should fact check myself" and lo and behold theres a built-in content patcher token for this
you wouldnt be able to use a gsq for this anyways without complicatedly routing it through a trigger action to set a mailflag
cp action requires cp condition
Even with stardrop, you launch the first time normally, wait until idling at the main menu, and then back in stardrop press the unlock button in the popup thingy and in the top bar you can launch smapi again
Would I be able to add false onto it to make the retexture not appear during snow then?
OMG thank you!
"When": {
"Weather |contains=Snow": false
}
Yeah adding a false to a token check is a bit more complicated than just tacking on a false at the end
Thanks btw! ^.^ I've been looking over the github, but again, I have trouble understanding how to string the pieces together correctly. @.@;
Youll get the hang of it!
assuming Snow is the correct weather type, its that style of structure to invert the query
Ah! Thank you! ^.^
Thanks! ^.^ Really appreciate the help!
CP generally prefers you to conditionally patch on positive constraints rather than conditionally not-patch
you can force it to do it but its always semi clunky as a result
Alright, I'll keep that in mind.
Its not applicable in this situation regardless but is it true you could also write a "false" statement by just listing all the other possible values? For this i know it would mess with compatibility with weather mods and be super long but like. For other stuff
yes
I had thought about that, but yeah, weather mods would throw that off. T.T
for the reasons you list is why switching to the inverse check is the safer play, though has similar compatibility issues for other weather thats snow-like
as there isn't a specific snowy weather characteristic token/query
Now back to my art program to make this mod even more unnecessarily complicated. 
Mostly with CP ive found myself missing elif statements though... ive figured out i can sort of do them just...backwards
whats an elif
It works just as well it just bends my brain a little
If (condition) do A
Elif (other condition) do B
Else do C
if <condition> { stuff } else if <second condition> { stuff 2 } else { rest stuff }
u can do that with CP no?
stuff2 will run only if <condition> isnt true but <second condition> is
You can do it but backwards
you can always make the !(<condition>) && <second condition> statement, but can be less ergonomic/readable
In cp its like
Do C
When (other condition) overwrite C with B
When (condition) overwrite C and/or B with A
again, CP prefers conditionally patching, not conditionally not-patching
tbh I can't think of a clean way for CP to even do proper else/elseif that wont feel like a bolted on hack
closest would be some "PatchGroup" mechanism that lets you group patches together and only one patch in the group is allowed to be active and runs in standard priority order
can query do that or is that cheating
query just lets you more brain off write the large expression, it wont let you have patch 2 not run if patch 1 is running
I relied on elifs a lot in my coding classes in college (maybe too much...) so its just been a bit of a learning curve doing it other ways in content patcher is all
In my defense though coding wasnt my major these were just elective classes
all patches in cp are independent of each other and trying to couple their states together gets messy
true
most similar thing but not the same is dynamic token it so only one patch runs depending on conditions
which is again not elif but uhh
content patcher is entirely declarative not imperative
and if/elseif is very imperative control flow thinking
and there isn't that much reason for cp to branch into the more imperative control flow, because if you want that much complexity, C# is right there
Learning C# just so i can have my ten million conditions spaghetti code back <3
spaget
which is one of the features of a declarative system, the potential for spaghetti is much lower
spooky action at a distance isn't really a thing as everything is running off the identical state and no patch can mutate that state
Mm spaget
sadly I cannot join myself on my pc q.q
private static bool IsSebastiansSpouseHouse(GameLocation loc) { if (loc is FarmHouse fh) { Farmer owner = fh.owner; if (owner != null && owner.HasNpcSpouseOrRoommate("Sebastian") && Game1.netWorldState.Value.hasWorldStateID("sebastianFrog")) return true; } return false; }
is this the correct way to check if a farmer or farmhand is married to Sebastian and has the frog tank?
if you are in their house, presumably
perfect
Late reply but thanks a ton.
@dusky sail This is the user who was trying to fix up that Ruan Mei mod. It worked and it managed to verify and validate the new files. Just a little problem...
I found out that the original modder just updated a new version of the mod in CN a few days ago and the new files look radically different from the ones I edited my machine translation into. At this point, do I redo everything from scratch or is there some kind of json array tool where I can easily merge both seemlessly? Or at this point do I have to do everything from scratch all over?
For reference, this is the json log for my attempted EN machine translation:
https://smapi.io/json/none/7f7eb27e75894363a04036285fc51bbf
And this is the new one...
I notice the newer one adds 300 lines into the json.
I have yet to check how the dialogue json files have been affected. Mind you I'm only doing this for private use / I initially did not plan to publish this especially without their permission but I do wonder if at this point I should just contact the original modder and acquire their permission to publish a translation into nexus?
This is the page for the og mod
https://www.nexusmods.com/stardewvalley/mods/36795?tab=description
so im using gwen's paths and for some reason wood path looks like this? the code looks fine i am lost. this is in winter btw, works fine for other seasons
patchmode ain't on overlay or anything
oh no, this is happening for all paths
why,,,
Im actually no expert in writing translations for mods without i18ns 🙏 i only spoke up in the thread bc i recognized the syntax errors that could be fixed
issue was pathe dits overlapping
Ah my bad. Anyways, I contacted the original modder to see what they think. Via machine translated ENG to Trad CN but I'll see how that works. Thank you for the insights still.
I asked about the new update because the mod runs fine... except everytime I speak to Ruan Mei, she ignores and when I click on her profile, I get this error; mismatched ui mode push pop counts
but all my mods were up to date and the game was running fine otherwise so I wondered if it had more to do with the creator of the ruan mei mod
Edit mode Overlay instead of Replace?
mhm
I seem to be having some weird issues, trying to include HarmonyLib; I'd enabled it in my csproj config but whenever i try i can't include it without referrencing 0harmony.dll directly i can't which i really don't want to do, same issue weirdly with modmanifest and I'm having to include the Coreinterfaces dll file as well
an i doing something wrong here?
don't reference harmony directly
yeah, that's what i'm saying is the issue - i read about the version conflicts
put <EnableHarmony>true</EnableHarmony> in your <PropertyGroup> in your csproj and then using HarmonyLib; in your .cs files
Please a upload it to, like, a gist
The other possibility is that you have the game in a non-standard location
And need to specify the <GamePath>
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.
ah oki, sec
Okay, it looks like you're not using the nuget
Can you try that?
This also looks like you've forked an incredibly old mod
One second
nope, no fork here just fresh project
this is going to be a problem
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
are you using Visual Studio Community 2022, or an older version?
did you follow an old tutorial?
2022, which version should i target? there's not many c# tuts out there
modern csproj files (SDK format) look more like this:
https://github.com/b-b-blueberry/DesertBus/blob/master/DesertBus/DesertBus.csproj
this is what you target for current stardew
<TargetFramework>net6.0</TargetFramework>
!startmodding
Making mods can be broadly divided into two categories:
- Content packs are formatted text files, and don't need any programming knowledge. They can add/edit NPCs, maps, new items, shops, and more. To get started, see the list of framework mods, the wiki tutorial for Content Patcher, and there might be relevant guides on the tutorial wiki.
- C# mods use programming code to change fundamental game mechanics. See getting started with C# modding.
Usually it’s easier to start with making content packs, since you don't need to learn programming.
The migration guide i linked also gets you the new csproj format
sorry for interrupting, i want to ask is it possible to add custom map properties to custom npc's spouseroom?
map properties are typically applied to the entire map. do you mean tile properties?
tbh I don't think TargetFramework net6.0 would even work in classical project structure
RipZ, SinZ, I sense a pattern
If you mean tile properties, depending what you are trying to do potentially yes… but spouse rooms are finnicky little shits at times
Map properties apply to the farmhouse map as a whole
Tile properties are data on specific tiles
i could believe that. stardew modding is literally the only thing i've ever used C# for
(Despite this, many map properties specify tiles to affect, so unsurprisingly it’s confusing)
hi @brittle pasture , do you have any idea why Machine Terrain Framework (and Aquatic Crops - formerly Custom Tapper Framework) would prevent raised garden beds from accepting seeds
with rgb, without mtf(aacfctf):
with both mods:
Plus it’s the farmhouse. Which I am pretty sure it’s haunted
mtf(aacfctf)
gezundheit
i believe it's map properties, I'm trying to add NightTiles and stuff like Light but it doesn't show up in-game
I think it won't work on a spouse room by default
You may have to do a separate edit targeting the house, unsure
spouse room and spouse patio's edits wouldn't copy over map properties
while SMAPI's map edit code is based on it, the logic that would also do map properties isn't in vanillas map modification logic
Do they copy the paths layer?
think so iirc
they do, since loadSpouseRoom() specifically checks for a Paths tile to use as the spouse standing spot
one of the actual uses for the red circle tile
it uses the standard ApplyMapOverride logic which copies all tilesheets and layers
(memories of 1.5 having all of those vestigial walking paths drawn on the maps, which 1.6 removed)
there is magic code for spouse rooms based on the tile ids used to automagically edit the light related map properties
EDIT: the code is more than just spouse rooms
thanks for the report. I definitely didn’t know there are mods that adds modded plantable pots when I set custom pots to ban vanilla seeds by default (why did I do this)
but selph, you are a mod that adds modded plantable pots
I briefly contempated a mod that would grant any big craftable the special classes
So u can make more IndoorPot or more AutoGrabber
Yes plz
oh and since you asked about custom (identifiers) chu, rgb has one
(So did i lol)
mine is even fashionably named OutdoorPot (the class not the identifier) (this is not an identifier even though it's in parentheses) (none of these are identifiers)
Smh
However i decided not to do anything since blueb updated pots
But
Chests. Autograbbers. Autopetters. I don't remember other subclasses
Dear lord
Item pedestal
That was supposed to be to the beat of "heels. Nails, blade, mascara" but I gave up real fast
autopetters and grabbers don’t have their own classes right
Eff if i know I'm dumb
only chests and pots (and both have mods that handle it already)
(not pedestals though)
oh yeah there’s a lot more that I forgot
I legit thought those were just regular BCs with special check actions
Hi @brave fable ! I was wondering how can I translate the text of the cooking skill on the skill menu page. I thought It was the "menu.cooking_skill.name" entry but it wasn't. I couldn't find where that line can be translated
hi, it's definitely menu.cooking_skill.name, i'll have to give it a look tomorrow
looks fine for the other custom skills so definitely something wrong on my end
I am making a mod for fishing, and it's turning out great! (7 fishies so far, very balanced + tested along other mods)
Only problem is that all my fish when caught have a purple background (the item caught popup on the bottom left that shows what you caught)
I'm unsure why that is..and some people online said that it's because of the gold worth being over 500, but most aren't, does anyone know?
hard to say without more information tbh
the purple background in the new item popup does mean its worth more gold so it becomes a question of "why does the game think its worth that much"
obj.sellToStorePrice(-1L) > 500) ? new Rectangle(163, 399, 26, 24) : new Rectangle(293, 360, 26, 24)
so its 500 after all the various multipliers are taken into account
ohh gotcha that makes more sense lol
not all but a few do become worth some good gold, the highest fish is the Marlin which has a difficulty of 95 and is a darter, good luck catching him, but if you do, sells for 800. If he's iridium quality, which if you use the right bobbers he will be, and smoke him, he'd be worth thousands lol
stonks
Can someone tell me how player warps and npc/event warps differ? Cause the player is traversing the map without issue, but there is one warp spot in particular that gets locked up during events, or when an NPC tries to use it (specifically, entry to bus stop from tile 11, 23 after arriving there via warp)
Hi @tawny ore I'm trying to read and understand to learn stardew codes. If it's not a bother to you, would you point to me where in your code for Ultra Organized Chests the icons for the chest types are loaded into the config menu? I mean, when you are setting up the organizer, it pulls different icons if it's a fridge, a normal chest or a big chest. Sorry if it's a stupid question
does this look stupid with no background and the frog image so central?
(Im still trying to get rid of the name "scroll"
It looks fantastic to me, but maybe a shadow below the frog would make it better given it's a whole body sprite?
probably better to zoom in on his face? portraits are often like that 
if not perhaps bigger
ahh and apparently my code cannot detect if there are two frogs :(
if (Game1.random.NextDouble() < 0.85) { Texture2D crittersText2 = Game1.temporaryContent.Load<Texture2D>("TileSheets\\critters"); base.TemporarySprites.Add(new SebsFrogs { texture = crittersText2, sourceRect = new Microsoft.Xna.Framework.Rectangle(64, 224, 16, 16), animationLength = 1, sourceRectStartingPos = new Vector2(64f, 224f), interval = 100f, totalNumberOfLoops = 9999, position = spot * 64f + new Vector2(Game1.random.Choose(22, 25), Game1.random.Choose(2, 1)) * 4f, scale = 4f, flipped = Game1.random.NextBool(), layerDepth = (spot.Y + 2f + 0.11f) * 64f / 10000f, Parent = this }); } if (!Game1.player.activeDialogueEvents.ContainsKey("sebastianFrog2") && Game1.random.NextBool()) { Texture2D crittersText3 = Game1.temporaryContent.Load<Texture2D>("TileSheets\\critters"); base.TemporarySprites.Add(new SebsFrogs { texture = crittersText3, sourceRect = new Microsoft.Xna.Framework.Rectangle(64, 240, 16, 16), animationLength = 1, sourceRectStartingPos = new Vector2(64f, 240f), interval = 150f, totalNumberOfLoops = 9999, position = spot * 64f + new Vector2(8f, 3f) * 4f, scale = 4f, layerDepth = (spot.Y + 2f + 0.11f) * 64f / 10000f, flipped = Game1.random.NextBool(), pingPong = false, Parent = this }); if (Game1.random.NextDouble() < 0.1 && Game1.timeOfDay > 610) { DelayedAction.playSoundAfterDelay("croak", 1000); } }
this is how the game codes it
and this is my try at detecting it:
` private static int CountSebastianFrogs(GameLocation loc)
{
if (loc is not FarmHouse fh)
return 0;
Point p = fh.GetSpouseRoomCorner();
p.X++;
p.Y += 6;
Vector2 origin = Utility.PointToVector2(p) * 64f;
const float minX = 24f, maxX = 112f;
const float minY = -8f, maxY = 32f;
int count = 0;
foreach (var s in loc.temporarySprites)
{
if (s == null) continue;
if (s.Parent != loc) continue;
int startY = (int)s.sourceRectStartingPos.Y;
if (startY != 224 && startY != 240) continue;
Vector2 rel = s.position - origin;
if (rel.X >= minX && rel.X <= maxX && rel.Y >= minY && rel.Y <= maxY)
count++;
}
return count;
}`
I think this is a painful way to count the froges
Is there no mailflag or whatever you can check directly
As for the scroll the path of least resistance is to just give the froge a display name
maybe give frog background?
Sorry if I'm asking over someone but I just wanted to ask about a content pack
I'm trying to make a content pack to get littleNPCs to work with The Farmer's Children but I've gotten a little lost around the part where I mess around with the content json, do I copy and paste the content files from those mods into the one content json for the pack or am I missing a step entirely? This is my first time messing around with content packs and I'm very bad at tech stuff in general so I'm very sorry if this has been asked 101 times
@tawny ore thanks so much, it's all very complicated to me but reading it over and over helps
The Farmer's Children is a content pack for LittleNPCs, so you shouldn't need to do anything special to make them work, really. Just put both mods in your mods folder.
Oh oops, so that solves one problem then
I have both installed and they're both updated but I'm still getting the error when my kid is telling me to go to the mod page for littleNPCs but the art is showing in the portrait, I had assumed I needed to merge them somehow (hence me trying to make a mod pack and failing lmao)
Have you installed both parts of The Farmer's Children? The art files and the dialogue files?
Yeah, I have both freshly installed
Then you may want to open a thread here: #1272025932932055121
Will do, thank you :]
Nevermind I deleted a random file and it's now working! I don't know what I did but it works now!
(getting rid of the name scroll will be a bit annoying without a transpiler, from what I remember of that class. I’m fairly certain that part is in DialogueBox.draw)
tip: you can use ```cs to get a proper code block. (you have to also end it with ```)
ohh thank you!
namespace StardewValley.BellsAndWhistles
{
public class SebsFrogs : TemporaryAnimatedSprite
{
private float yOriginal;
private bool flipJump;
public override bool update(GameTime time)
{
base.update(time);
if (!base.pingPong && base.motion.Equals(Vector2.Zero) && Game1.random.NextDouble() < 0.003)
{
if (Game1.random.NextDouble() < 0.4)
{
base.animationLength = 3;
base.pingPong = true;
}
else
{
this.flipJump = !this.flipJump;
this.yOriginal = base.position.Y;
base.motion = new Vector2((!this.flipJump) ? 1 : (-1), -3f);
base.acceleration = new Vector2(0f, 0.2f);
base.sourceRect.X = 0;
base.interval = Game1.random.Next(110, 150);
base.animationLength = 5;
base.flipped = this.flipJump;
if (base.Parent != null && base.Parent == Game1.currentLocation && Game1.random.NextDouble() < 0.03)
{
Game1.playSound("croak");
}
}
}
else if (base.pingPong && Game1.random.NextDouble() < 0.02 && base.sourceRect.X == 64)
{
base.animationLength = 1;
base.pingPong = false;
base.sourceRect.X = (int)base.sourceRectStartingPos.X;
}
if (!base.motion.Equals(Vector2.Zero) && base.position.Y > this.yOriginal)
{
base.motion = Vector2.Zero;
base.acceleration = Vector2.Zero;
base.sourceRect.X = 64;
base.animationLength = 1;
base.position.Y = this.yOriginal;
}
return false;
}
}
}
there is also this but I dont even know really what mailflags are
yes it has the animations
But yeah my meaning is that find out how game is adding the froge
yeah that is vanilla (pls correct me if i am wrong)
And check those conds to spawn your dialogue
oh that is vanilla. that's cursed af
it calls activedialoguevent contains key
one frog is random 85% chance, the other frog is always added if sebastianFrog2 is active and 50% chance
(Late but subclasses of TAS are especially bad because the way the game literally bans them lol(
Look at the binarywriter for them
Why does SebsFrogs then
The ones the game has are explicitly whitelisted iirc
You can also get away with it if it isnt broadcast
Honestly I don't get why these froges aren't just Critter
I say this because it is the big exception to "if does not hit save serializer is fine"
Look, I don't ask questions no more
Ever since bat blinks and white pixel of the moon
oh i don't think i know about bat blinks
Quick question
When adding fish to the game (locations.json), how can you make it so that the fish can appear in multiple spots (I have the locations (3), but I don't know how to make my fish appear in three at once)?
For Content Patcher
wow! cutest thing I've seen on stardew valley

sorry for hijacking the convo but can anyone tell me where this texture or only the scroll sprite in dialogues is located? or what its name/reference is?
thank you!!
its literally baked into the portrait box in Cursors
noooooooooo q.q
thats why chu said it would be easiest to just give them a name, i imagine
is there a way to replace it with a custom made portrait box only for dialogue boxes with the frog?
can harmony do that?
sure, if you transpile DialogueBox.draw, which will be very painful
or prefix skip it, and accept incompatibility with a lot of other mods that touches dialogue boxes
mhmm dang
To add to this, replacing the portrait box might also make it harder because there are modded users who have customized boxes/themes, I've seen a handful of them, and this might add to both your and their frustration
or make your own DialogueBox class (but see above about incompatibility)
thats correct, any recolour that recolour that scroll would just add it back even if you edited the texture yourself
so you'd have to make it not use that texture at all
via methods listed above
ok, I need help. Im pretty sure this is a simple thing but I cant figure it out. Im following the wiki as expected...
CP is giving me this message:
[Content Patcher] Ignored Explosive Baby Ammo > EditImage Maps/springobjects #1: the When field is invalid: 'ChosenAmmo' can't be used as a token because that token could not be found.
Im calling the token like so:
"Format": "2.7.0",
"ConfigSchema": {
"Ammo": {
"AllowValues": "Baby,Eevee,Junimo(Red),Junimo(Green),Junimo(Purple),Pam,Random",
"Default": "Baby"
}
},
"DynamicTokens": [
{
"Name": "ChosenAmmo",
"Value": "{{Config:Ammo}}"
},
{
"Name": "ChosenAmmo",
"When": {
"Ammo": "Random"
},
"Value": "{{Random:Baby,Eevee,Junimo(Red),Junimo(Green),Junimo(Purple),Pam}}"
}
],```
did you restart your game after adding the dynamic token?
I did. Twice
thanks i hate it
wait, what is "Config:Ammo"?
there are no other warnings in your log? because thats not a token
Im calling ammo from the configuration. Did I misunderstand the wiki?
that'd just be {{Ammo}}
which wiki page? dont add "Config:"
the configschema just makes tokens u can use normally
Ah ha, Im just dumb. That got it.
is Config secretly a token, or did CP not warn about it when parsing the dynamic tokens?
chosenammo dynamic token looks correct
and no. That was the entire warning. Normally I can trudge through it.
ok. Good to know. Thanks all.
a secret token? i don't want it
It's so brilliant I'm impressed ngl
Does anyone know, or has it not been attempted yet?
Look at the mod "More new Fish"
They added a number of fish and you can get an idea how it's done
I took a lot there, but I am unsure if any of their fish spawn in multiple locations instead of just the beach or rivers etc, im trying to make mine spawn in all of ginger islands waters
So if you look at the locations.JSON file you have to edit by map name. Since Ginger island is several maps combined you'll need to edit the locationdata for each map
So i copy and paste my fish entry like the one I showed you into each location? Oof, yeah I know ginger is based on a lot of locations, was wondering if there was any cleaner way. Appreciate it now I know u can do that
how do i use the temporaryanimatedsprite event command within a quickquestion? it's intepreting the \\ within my asset path as the start of a new command
switchEvent to a new key
Did content patcher ever add negating tokens with ! or is this just a vague memory of something pathos said he was interested in doing
! Is for GSQ, and negation on a token doesn't really make any sense cus it's just a set of values
Gotcha, I remembered this. Was curious bc someone in ES tried to do it
Contains: false is basically the same thing
Well this is outside of When block
It should resolve to false whenever contains resolve to true basically
@ivory plume hello there how do you feel about a notcontains arg for tokens along these lines
They tried to do it in a when condition, wanted to confirm ! was not implemented before doubling down telling em it was wrong
|contain't
I'd rather avoid it, since that would imply adding custom notX versions of any other boolean input argument. Usually this would be used in a When block, so I think adding a generic ! prefix for condition keys would be more generally useful.
Would it look like this
{{token |!contains=blah}}
I guess it's a little wacky because When is already capable of negation so this new thing is really for token usage only
It would look like this:
"When": {
"!SomeToken": "blah" // equivalent to "SomeToken |contains=blah": false
}
(But maybe just having the contains version is clearer?)
Yeah I think using ! here is a bit confusing cus most tokens aren't bools
All conditions are boolean, so ! would just negate the condition. For example:
"When": {
"!Random: 1, 100": "{{Range:1,25}}" // *not* between 1 and 25
}
But it might be confusing compared to the more explicit contains= form.
So, what would {{!i18n: my-key}} produce
An error message. ! would only be valid in a condition key, not a token name.
so it wouldn't work for chu's suggestion here?
it also does read as a little confusing to me but i couldnt explain why it does but not GSQs, but also i think there's a non-insignificant chance that adding that syntax would make people think GSQs can be used as when conditions even more so than they already do
Nope (and I don't really like the ! syntax in this case anyway).
Yeah i think the feature i had in mind is something else
Like contains is "element is member of set" so notcontains is "element is not member of set"
It seems like normal set theory thing to want but it is quite niche 
makes sense
I think it's a little less confusing to have the ! on contains (the actual boolean operator) rather than the token name personally, just because I feel like there's the implication that removing the ! should result in the negated behaviour of when it's there
chu can you give me an example of when this would be useful outside of a When block? i'm having trouble
I would like to directly use the resolved token value false in places such as an i18n key
(Technically contains is not "set contains element", but "set intersects other set").
GSQ Conditions
localtoken values as well
(but the negation of "!Random ...": "{{Range ...}}" is not "Random ...": "{{Range ...}}", it's the |contains version I think?)
There's a tutorial for fish on the modding wiki, but yes, I believe you have to patch each location separately
unless i misunderstood the way i read Pathos's example is that the negation of the former would be the negation of the latter?
At any rate the suggestion was largely a whim, I'm not super attached to having this niche thing and it's not even needed by axell's original ask 
It's a bit confusing because Content Patcher mostly hides the set theory. But this:
"When": {
"Random: 1, 10": "{{Range: 1, 3}}"
}
Is by definition equivalent to this:
"When": {
"Random: 1, 10 |contains={{Range: 1, 3}}": true
}
Which is why ! would always make sense for a condition key (but would be confusing due to the abstraction).
if that was true, in boolean logic they should currently be the same thing 
i mistyped, ignore the second "negation"
oh I see, that's what I was stuck on
(I forgot the former syntax existed lmao)
Tbh I see this entire feature as syntax sugar
Yeah would be a cool niche thing but nothing that can't be handled in other ways.
Good I wasn't giving misinformation my memory is just very good for vague memories of things I thought I saw 
while a bunch of c# people (and maybe pathos still) are here, does the game ever currently unload loaded assets from memory except for when it’s closed? (or alternative question, what’s a good approach towards optimising a mod that may load a lot of assets)
It yeets it when u return to title psure
(also maybe worth pointing out that Pathos's idea would work for chu because chu can just put it in a dynamic token, which would use when conditions)
Well i can already do that with contains
Pretty sure I've had plenty of assets remain loaded after returning to title
The map assets definitely get yeeted
As far as I know image assets are never removed from a content cache
does it ever do it during a session though? or does it literally store all of those things until you return to title again?
I don't think Game1 content gets yeeted
Game1.temporaryContent is gone whenever you change maps i think
If u want something temporary use that one
Iro can you load your assets piecemeal on demand
in that case, would it be better for me NOT to hold a hard reference to them, but load them from content each time? I’m not really sure if keeping a hard reference to them would mean they’re in memory twice
I already am! I’m just being extra cautious for potatoes
(Note that assets loaded through helper.ModContent instead of Game1.content aren't cached.)
oooo, interesting
Can you load them even piecemealer
so that does give me extra room to optimise by getting rid of hard references and letting gc do its thing every so often 
not really, rn I’m loading the equivalent of a single portrait sheet each time
Depends on what you're doing with them. There's a tradeoff between the CPU/GPU performance impact of loading the textures each time vs the memory usage of caching them.
(Also note that it's far more expensive to load a dozen small textures, compared to one texture with a dozen sprites.)
yeah, it definitely won’t be each time since this is an animation and would be hell
Iro what I usually do is I hold on to data assets, but load texture from content each time
I refuse to reload the same texture every 300ms potentially 
There's just a lot of overhead involved in loading assets and creating textures (e.g. needing to reserve GPU time), beyond the actual reading/writing pixel bit. So if you split a texture into smaller pieces, you're multiplying that overhead.
I put it into a context record while I need it
And then toss the context once I don't need it anymore
(tbf I didn't realize iro was talking about images)
It's not like I'm calling content.Load every draw
yup, my question becomes how to define “when I need it” in this case. maybe I’ll just keep track of one npc’s portraits perscreen
For u and ur portraities not holding the ref once u change location seems reasonable enough to me
or that!
And you can see if u rather load all on map entry or on dialoguebox start
I dunno what's better for potatoes
not map entry. poor festivals
Hiding the load in black screen may be preferable to a lag everytime u talk
there shouldn’t really be any massive lag when you first talk to an individual npc if memory isn’t being eaten up for no reason I’m pretty sure. my potato has a stutter right AFTER the first dialogue load is done but it’s actually outside any of my patches so I have no idea what’s going on there
and my potato has weird stuttering in general
I’m willing to call that stutter a wash for now 
but ty everyone, I’ll keep all these things in mind! hopefully I won’t release 32GB of RAM Required: The Mod
(mostly because my three computers together don’t have that much)
You can design ur content pack model to fall back to the base texture to encourage not using multiple smaller tx
That is also how building draw layers work
wdym?
In building draw layer if you have Texture: null
It'll just look at the base building texture
oh I already do that! haha
not even for efficiency reason, it was for practicality for animating overlays
Guys i have a question: It's possible to apply a rainbow effect to an item ? i mean the default rainbow effect of stardew valley, if yes how?
Otherwise i should use a spritesheet with different colors and animate it?
What do you mean "the default rainbow effect"?
probably something like the prismatic shirt/pants/hats
those are hardcoded to those items specifically (minor correction: not just those items, but only clothing can have that effect)
Oh then how i just animate an item? i wanted to animate some fishes
I already have the spritesheet of the fish
look into spacecore’s texture override feature
this type of code is deprecated?
that’s Content Patcher Animations which is sorta deprecated yes
SpaceCore’s animation feature is different
also where did you get that code from since that looks like CP syntax but those arent valid top level fields
oh wait CPA does have those fields, interesting
This was the 1.5 version of the NotYouAgain fish mod
I've used it as study but had to switch entirely my mod to 1.6 with the new fish spawn system
Still working on it i had like 700+ fishes added cause whenever I was bored i spent nights adding more fishes to Stardew Places xD
yeah CPA technically still works but you’d need new syntax if you want to use SC’s version of the feature
Oh , i should check the CPA wiki, right?
Oh alright sorry , i will surely check it!
Hope it will be easy as it was in 1.5
You just have to target a particular asset
i have players that are annoyed to not see the normal products of animals past a certain point of friendship, usually for animals with eggs and another product.
What is the best solution between :
- trying to have an higher DeluxeProduceCareDivisor but hoping it's not too high that it's annoying
- having the normal egg as a potential deluxe product (i'm not too much of a fan because then it kinda defeat the deluxe product purpose)
- having the deluxe products having some GSQ so they are rarer
- else???
I don't believe i can have stack on animal products, right?
like, i can't have them produce 2 normal eggs as deluxe product?
ducks and rabbits have very high care divisors to ensure that even at max friendship you still get egg/wool most of the time
other animals whose deluxe produce are just large versions have low divisors so you’ll just get the large version at max friendship
from a balance (and a player’s, not that I play much nowadays 😛) perspective i definitely prefer the divisor route
Large milk is not even 2x the price of milk tho
hmm, divisor route involve math
now if you want the regular produce to always drop and the deluxe produce to be a nice to have once in a while I have a certain mod that could help with that 
I’ll just copy the wabbit/duck values tbh
hmm
Lumina if u just make a large to 2 of not large recipe then it's fine
mr ape tested and certified
That's what vpp did for large sap anyways
maybe i can scope creep 1.7 into allowing stacks for animal products
i mean, it kinda makes sense for milk maybe, not really for eggs
people are not really complaining they no longer get small chimken eggs right (unless they forgor to ship it for perfection)
no, they are complaining they don't get my animal eggs anymore
i don't know why, but it happened several time
Like too much feather?
what’s your divisor value
default of 1200
definitely too low
1200 is meant for if you want the deluxe produce to totally supercede the regular
i mean
i didn't see a problem in wanting that, but apparently it is!
and it is not really obvious what is the sweet spot of "between chicken and duck"
ducks still drop eggs most of the time, and as someone who made a mod to make them drop eggs all of the time I see why ppl would be annoyed their egg layers just lay feathers all day now 
ideally i'd like a "rare but reliable"
according to the wiki, at max friendship, mood and luck ducks drop feather 42% of the time
I would like to request the mod author role please https://next.nexusmods.com/profile/JennaJuffuffles/mods
you can do math™ to tweak that value down or up
you don’t need to care about the various variables, just assume max friendship/mood/luck since I’d that’s the average animal state
maybe with something along the lines of 3600 i can have something okish
i have yet another question
@outer glacier cheeto dust requested
wiki says that "DeluxeProduceLuckMultiplier" is of default 0
does it means it negates entirely the value of the dailyluck, or is the wiki formula wrong?
yeah
i practic coding by reading it
by default luck doesn’t affect deluxe produce chance
ok!
then the wiki formula on ducks and rabbit is wrong since they have a non 0 and non 1 modifier
my freind said to do that
hmm
their luck modifier is 1.01 and 1.02 respectively, which is a rounding error away from 1 (aka just add daily luck)
then why not just make the value 1?
wondering the same
(don't worry i just feel betrayed by game values, nothing against you)
wondering if it's worth having a non default chance here since daily luck doesn't seems to impact much
guys how do you get better at coding
my (probably unhelpful) advice is simply practice and experience
doing online coding challenges help of course
(I’m assuming coding here means programming code)
thanks for the time explaining game code and game code trap, selph
and i will consider the optional dependency path
I become better at coding by being bad at coding for a long time
i know im just talking about practice ic ant type if i dont have an idea about what to type so i thought reading code first would be a good idea
I also spent a stupid amount of time reading blog posts, especially those by Microsoft
I don't know I'm just insecure about myself.
i dont know if its reading or writing since typing is 70 percent reading and thinking
Reading code has almost never helped me write better code. The only exception is when I see them use something I didn't know existed which solves my problem for me
Most of my learning is either practice or doing research on some specific thing
If you're totally new to coding, with zero experience, I would recommend something that covers the basic concepts of object oriented programming (boolean logic, control flow, types and methods, etc)
If you have the basic concepts down, that is usually enough to just start messing with stuff
well then ivve wasted alot of time i was reading stardews code to help me
Reading stardew's code is useful if you want to know where to hook in your own code
im just sad now
I think for hobby coding like mods just doing whatever it is you want is much better than reading
It's ok if it is jank at the start
i dont know how to practice coding ive watched a tutorial
it's also worth remembering that ca was not a professional dev himself when he started afaik, so there may be things in the stardew code that aren't actually best practice (not to mention decompile nonsense)
Practice by setting yourself a modest project goal and then making it. My go-to for learning a new language is writing a console dice-roller app
I'm just overwhelmed now
(in fact, most decompiles of stardew don't actually compile, someone has to go in and fix them until they do I believe)
the way i started learning coding for stardew was trying out a very simple concept (sending a reminder message to the HUD the day before the wedding) and then the helpful people in here walked me through it. you could come up with your own idea you want to implement and try that?
wait they don't?
i belive reading through it would help me i dont really no how to write my own code the tutorial taught me alot about what it is but not
it's worth also remembering the other side of what I said though. ca wrote stardew valley without being a professional dev and while not knowing every tiny detail of best practice. we learn as we go, the only way to make something is to sit down and write it.
that's what I've been told, at least. never tried recompiling any of them ngl
Every blockbuster game that I've decompiled has had horrible messy code, because instead of trying to make it perfect they just made something that worked well enough
you know maybe i should stub code for a while- write my own code the first idea that comes to my head
I don't think I've ever written a substantial piece of code where I haven't learned something while writing it
but you do need to htink aobut what you want to code as well right
(right now what I'm learning is that NPC.checkAction is lightly cursed)
Terraria's code for example is almost entirely made of gigantic arrays and god methods
of course, but it doesn't have to be a good idea
you learn more from implementing something stupid than from sitting down trying to come up with something clever
I once made a mod that replaced every texture in the game with nic cage's face.
You can learn what ideas are Bad by having nexus users stress test your mod against 1000 long mod lists
okay thank you i thinking learning a beginner c sharp tutorial helped, and also learning from stardew tutorials
i wanted to and still do want to make a kaiju mod? why because giant mosnter are friggin awesome
cough me complaining about lookup anything cough
that was my first time dealing with the asset pipeline! it was really stupid! it was unpublishable!
every c# mod author has an arch nemesis mod
one more thing is it a crime to look things up youve forgotten in coding
NPC.currentDialogue! that's what I was looking for
Imagine remembering stuff that intellisense can remember for me
what do you guys think of kaiju
I don't know a single dev who codes without a browser window open at all times for docs
Even before the internet programmers kept reference books on hand
trying to memorise this stuff doesn't actually benefit anyone
my one quesiton now is when you need a c sharp mod how the hell do you know what code from stardew to put in
90% of programming is not writing code, but figuring out what code to write
since decompiling is innacurate
that is what decompiling is for. Ilspy allows you to see where and how things are used, which you can use as a reference for hooking your own separate code
okay then uhh so would i be eannoying for asking another question
Not at all
(wren, is hhd not open source?)
ah, I was looking at your mod page and got confused 
okay so umm as a noob how do you look and see where and how things are used i thought for a long time that meant reading.
I don't think so? but I totally might have missed it
like i read about animaitons and shit
What we're saying is you can read the code to figure out where to hook, but you shouldn't use it to learn how to write your own separate code
Also, ilspy lets you right-click a method or object and find where else it is used or defined in the code
okay thank you for being patient
hi I was hoping to request a mod author role
https://next.nexusmods.com/profile/nancyxdrewx/mods
Make sure to add yourself on the wiki and ping a Junimo
@outer glacier
Well, not now that chu has pinged them
is their a way to figure out what code you need to read at what moments or do you just go their when you need to like when i need to learn about animations i go their
most of the time if you knew exactly what you needed to read you wouldn't really need to read it tbh. You just kind of start by looking at related stuff until you find what you're looking for
Usually the process is something like
- I want to do thing
- game does thing, or thing involves some game element
- look at whatever that game element is until I find something related to thing
- experiment with that bit to see if I can make thing happen
for example, I was looking for how to tell if an npc has more dialogue a few minutes ago, so I went to the NPC class and skimmed through the checkAction method (that's what handles interacting with things) until I found it
because I knew that there would have to be a way for the game to know if it should show you dialogue
Like, if I wanted to spawn a fruit tree when a key is pressed, I know that saplings spawn fruit trees when planted, so I would look at object and find where it references fruit trees
thank you for being patient you all looked at some of the stardew wikis modding tutorial right
And then I'd see that it just has a constructor that accepts an item id, and I'd call that constructor myself
because i used one to make my basic avocado mod
question: should I edit the wiki now or wait for bouncer to dm
I'd wait for bouncer just in case I think?
okay thanks 🙂
make sure u have dms on
the dustening...
it can go either way
Hey everyone
What do you prefer for a pirate fish? Do you prefer the hook or the tail?
Or if you have a better idea, let me know
have you thought of an anchor tail
you guys use tutorials
there are tutorials for the art? 😭 i just use pixlr online..all manual (thats why my fishies take forever)
i mean for like making basic mods
ohh, no I don't, I read the documentation online...for a game like stardew, it's costly to make a mistake with AI, and the tutorials for fish run up very dry on youtube
I don't think anyone was mentioning ai?
im just asking if people have ever used a tutorial for making a mod
btw your fish looks fantastic
Guys i know it sounds silly but i tried to look into the github wiki of Spacecore but i dont know what I'm supposed to look for TextureOverride, i tried to look into the Animate SVE fishes mod and i found this: But I'm not sure if this way to do things it's enough , I'm confused
no but lot of people use it for coding nowadays, I deal with them vibe coders a lot lol..
mm not me but I think the best is to learn from other mods, unzip and see how they implement
wasn't the tea app that got leaked made via vibe coding
if u want fish then look for very small fish mods like that new goldfish one has like 9 fish, they did an alright attempt at implementing fish very easily
for other stuff idk
practically, database was fully visible, publically accessible
im shocked it wasnt discovered on day 0
aw ty
Their release date was too early to have likely been vibe coded, theres plenty of insecure systems written by humans
Mods are by default open source (at least 90% of them), while you can't use their code for yourself, you can learn from them on how they implemented certain food, fish, recipes, mechanics, etc
as well as documentation
oh okay
i have alot to do
for modding a building i was just looking at the building tutorial on the wiki but i can look at other mods as well
Can't do an anchor that's really detailed sadly, this is another option of a larger hook..sadly I am not skilled enough to pull it off in a 16x16 lol
this is not how open source works. You can use open source code (depending on the license, you may need to make your own code open source too), and nowhere near 90% of mods are open source because the default is always ARR.
the latest mod dump stats estimate around 63% of c# mods are open source.
Exactly, as I said, you cannot use their code, when I said open source, I meant viewable. All mods should have their source code fully public, and most do, the ones with oddly suspicious .dll's that cannot be viewed or authorized by Nexus or any other publishers should not be there in the first place. I come from mainly Skyrim modding, and most or if not all code is viewable, but you cannot use their code, and I already stated that
viewable = source available. open source is a different thing.


