#making-mods-general
1 messages ยท Page 19 of 1
so woe betide me if I want to send Zayne a gift
Because that's several "next" menus
Yeah, mine would be a proper scrollable menu that looks similar to the relationship screen in the main menu.
well, I can tell you this
if you make that mod I'm instantly downloading
Because fuck that would be so much easier XD
Does that mod have source? Would be nice to see if they implemented any special logic for gifts. I think I know what needs to be done but gifts are definitely one of the more confusing and spaghetti parts of the game logic.
theres also postbox mod idk if that one somehow touches the mailbox code or something
I'm almost certain it does, but I can never remember the way to find said source
Because I don't think Digus lists it on the main page
I just googled digus stardewvalley
that's mail framework
but that said
Oh, this one: https://www.nexusmods.com/stardewvalley/mods/17614
That's also kinda the same idea. Other than being ugly, what's the problem with it?
oof, the shade on the sprite there
But I've never used that one probably because of the gigantic mailbox
VMV had a really nice looking mailbox that I saw the other day when playing through it
But it wasn't usable as a mailbox mailbox
oh i just mentioned it since you asked about possibly conflicting mods or something in regards to the mailbox
Is the menu better on postbox
postbox is fine and tbh i made my own texture so ye lol
it's by TheLimeyDragon, creator of Ayeisha
(also molamole did a retex too teehee)
Even better!
It was small, unobtrusive, and fit naturally in the area, so I liked it
Oh, Lumi, while you're here, I should say that I attended the "Market" on the Saturday and it was... weird
there were two people at the shop areas, but I could access all but one of them even without a vendor
(i know TheLimeyDragon allowed people making expansion to use the mailbox for consistency, if a post mod wanted to use it, they may be fine with that too)
which one was the one you couldn't?
What does the actual menu look like for Postbox? Strange that they post a screenshot of the box but not what the box actually does...
Middleish area, down and right of the mineral person IIRC
I can reboot the game and port there to give an image
no, it's not urgent ๐
Gotcha. Unfortunately I only played to the Sunday after it because Daia rolled a camping date, and by my own date writing laws if I run into one of the beach or camping dates I haven't written by pure chance, it's date writing time, so I'm about 3/4 through writing Daia's camping date right now
so short version is I haven't played enough to memorize names yet
most shops once open can be accessed even if the vendor isn't around. In real markets, it's pretty common when someone isn't at their stand to have the neighbor shopkeeper to take care of their sale for them, so, while i can't emulate exactly that in VMV that's the spirit.
The main thing i need to do is the opening shop hours message
(they all open at 9am but it's not really obvious now)
(but i still need to basically find the correct "closed" format thing to use)
back to cleaning
ah also
Hi atra! Enjoy cleaning and the holiday weekend!
it's possible it's moira's shop, that will open at her return
hey all, does anyone have an example of location based dialog in a custom location?
she should now, let me see if it' on the live version
its just the names you can click through tbh
Isn't this even more clicking 
Because I was getting red in my log prior to unlocking her on the day after the festival
And it was about a "Moira"
I think I might still do this; looking at Postbox's code, I'm not a big fan of it being a Robin building, or that it depends on SpaceCore.
of course i didn't note this in the changelog
And yeah looks like a lot of clicking through names.
it would be cool if it was kinda like teh FS menu where you click through or could click anotehr button that had the entire list you could scroll through
and it's indeed possible it's not yet fixed in live version, i believe i indeed used moira instead of the full internal name
gotcha. Makes sense, figured I'd check to make sure it wasn't something already fixed
Also
The UI should actually be pretty easy to make with my own framework. Tricky part will be compatibility, and making sure all the can-receive/after-receive logic is correct.
I'll probably take the easy route to start with and make it just not interact with quests.
... actually I gotta send this elsewhere, one mo
Using thelimeydragon mailbox with a machine InteractMethod would get you around dealing with existing mods touching the system mailbox I think
tbh what i likes about postbox was that it added a new building lol (cant control myself making retextures wahh)
You'll have to explain what you mean re: InteractMethod, that went right over my head.
Oh it's this thing in Data/Machines
I know how machines work, I just don't know what you're referring to.
I noticed it the other day but I think you give it a delegate kinda like output method
And it calls it on interaction
(also I don't think the mailbox is a machine?)
Well u r make this mod right 
Nope, mailbox is a building, not a machine
What is "using the limeydragon mailbox with a machine InteractMethod"? None of that makes sense to me.
So the suggestion is make new big craftable and machine rule
And it was all, Cheeto
Leave vanilla mailbox alone
.... speaking of buildings. Since I haven't seen a response on the modpage about it but Sin was around recently, I'll take the bullet for the following
Apologies I will try to get my thoughts in order 
Eh, I don't do art, and this is a smallish mod. Maybe a custom BC for a V2 or something. For now, I think I'll use the regular mailbox and have a compat option where it doesn't trigger unless you're holding a modifier key.
@lucid mulch Do you know why using a custom farm map messes with Several Spouse Spots's building of the Spouse Patios? I tested with and without Grandpa's Farm - with it my spouse patios are presently invisible, but without it the spouse patios show up. I might temporarily have to swap back to Custom Spouse Patio Redux until it's visible in the meantime, but I figured I'd check with you on if there's a simple way to fix that
The thing is, other villagers send you gifts, and they don't have fancy postboxes. Those other mods are immersion-breaking to me, plus things like having to get crafting materials or spend a few days with Robin affect balance.
Anyway, I've procrastinated long enough, back to date writing!
- Make new big craftable (perhaps with the mailbox sprite by thelimeydragon)
- Make machine entry for said big craftable
- Use InteractMethod on machine entry to open your menu, rest is send/receive logic that you are doing regardless of how player should access the menu
This is really just for dodging other mods that are established to go through the regular mailbox 
Machine seems like the wrong tool for the job, even if I had a sprite. Machines are for inputs and outputs; having an entire machine just to do a menu interaction is, well, silly.
If I needed to use a custom BC then I'd just watch for a button press on the BC.
Yeah sure same idea 
not all bigcraftables are machines, and InteractMethod is not just meant for machine interactions
As I said though, I think I can provide a reasonable compat option by simply supporting a modifier key.
(Seems reasonable!)
InteractMethod is part of the machine data?
How could it not be for machines?
it's a weird place to be, but it doesn't really depend on any machine logic (other than that it doesn't have ready output, which for a non-machine big craftable is always true)
I don't think you need a real input/output rule to use it
I mean, in order to use it I would have to define a machine, not just a BC.
I just don't really want to have a "dummy machine" with no inputs or outputs. That's the kind of thing that leads to more bugs and headaches down the road.
I want to make a machine randomly output a random trash item. So far I got RandomItemID set to the vanilla trash items, but I'd rather have the machine output any item that is categorized as trash, with better compatibility for trash added by other mods. I'm not sure how to do this....
every big craftable is a dummy machine. you can make the Stardew Hero Trophy have machine rules if you want
as mentioned earlier, InteractMethod is in a weird place but looking at the code it's fairly divorced from actual machine logic, so you can use that if you don't want to set up button detection by yourself. But you're free to do whatever you want 
you can use item queries to automatically output a random item in a certain category
Every BC is a machine? That's weird, they're in different JSONs, different data sections, etc.
I think we're starting to argue over semantics here, so let's not continue
look at the PerItemCondition field on this page: https://stardewvalleywiki.com/Modding:Item_queries
Oh boy
Sure, no problem. I didn't mean it as an argument, just honestly was not seeing the connection between the two. I guess, looking at the code, technically any object at all can be associated with machine data since the machine data just points to an object ID.
I gotta patch a compiler generaterd enumerator
(I wouldn't)
(y not?)
What lead you to this need 
I suppose in principle it is no different from patching any other IL in a binary that's already compiled, but... enumerator blocks are not supposed to be tied to any particular implementation.
I'm gonna use a postfix and patche the result's type, so it won't be dependent on compilation
Oh, that's not so bad, I thought you were trying to write a transpiler method for it.
I am
Welp, have fun with that!
Use a postfix on the method to get the hidden enumerator type, then use a transpiler on the __result.GetType()'s MoveNext() method
@merry rampart re your question I replied to in modded-farmers - I thought I could share my machines.json template in case you might find it useful - feel free to ignore if not! (I put it together a few months back when I was learning the structure, saves me from constantly going between the code and searching the wiki - I've popped it on my github with some updated comments, it should be mostly error free and cover pretty much all fields
) https://github.com/Teaiscoldagain/Teas-StardewValley-Mods/blob/main/machines.template.json
oh, awesome thank you!
you're welcome - feel free to shout if you find any issues or errors
Hello all! In the new world of 1.6, I know that there is inherent Anti-Social NPC functionality baked into SDV now. Is there a short guide to making one somewhere? I made a couple for myself in 1.5, and I'd like to convert them. I didn't know if there was a simple guide for that yet?
Edit: Or one I can look at and copy?
Ok I found the solution to this. The Netcode part of this is obsolete, so I removed it. But in the NetCollections.cs of base game, there's a function called RemoveWhere that would find the destroyMe bool and remove the projectiles that were destroyMe = true.
There's info here, specifically the CanSocialize field: https://stardewvalleywiki.com/Modding:Migrate_to_Stardew_Valley_1.6#Custom_NPCs
For making an NPC in the 1.6 format this guide is your best bet: https://stardewmodding.wiki.gg/wiki/Tutorial:_Making_a_Custom_NPC
PERFECT! Thank you! Looks like it's just that "CanSocialize" tag that I need. Might be as simple as redoing their basic CP file to the new format with that set to no.
Is UniqueMultiplayerID consistent across sessions? If I save that ID in the game save data and look it up on game load, is it guaranteed to find the same Farmer or is there a better way to keep track?
ok so I got my machine to work. It makes a random trash item.
Unfortunately this also includes Rotten Plant and Joja Cola. Is there a way to exclude those?
put another condition to exclude them
how?
(sorry was on subway)
Add the !ITEM_ID game state query after your first one in PerItemCondition separated by a comma
! to invert
I think you can also use the context tag rather than the category - trash_item excludes the joja cola and rotten plant and only has Trash, Driftwood, Broken Glasses, Broken CD, Soggy Newspaper - @brittle pasture out of curiosity, as this is also something I'm thinking for my mod, is using category query or context tag query better for compatibility?
i have no idea how to do this
What was your query looking like before? You were using ITEM_CATEGORY? (if it helps pop your json into the https://smapi.io/json and you can share the link here, might be easier for people to help)
yeah, item category
Probably context tag? But I have to check whether that tag gets autopopulated for modded trash category items
ITEM_CATEGORY Target -20
so you can swap that for ITEM_CONTEXT_TAG Target trash_item
(my hunch is it doesnt looking at the wiki page)
(but I can't check for sure until maybe several hours from now)
alright I shall try that
No worries at all - I will have a look myself as now you said it I think I made a note which context tags auto populate
there! that works perfectly!
I love that feeling when the machine finally spits out what you want
right?
now comes the hard part... the pixel art.
and yes I consider pixel art worse than coding because I can't art worth crap
but the technical part seems to work perfectly
Once you get the structure right you can just copy/paste with abandon - but with art... yeah, I've been derailed doing art instead (and I'm learning too, takes forever - but still fun!)
For me at least it's that pixel art requires more patience than code
The code tells you what you're doing wrong pixel art doesn't
With code you can do one discrete chunk at a time and see progress, but with pixel art you kind of just have one thing that gets progressively more finished
Well, I verified through some trial and error that UMID does persist across saves, even though it's got XmlIgnore and I couldn't find where in the code it's persisted.
and it's hard to tell when you're finished with the art
random question, is it possible to make craftables 1 tile high instead of two?
Eh, not always. It tells you when you give it instructions it doesn't understand, but if you ask correctly, it will happily do exactly what you ask it to even if that's not what you wanted
Technically you can just leave the upper part of the sprite.. empty? So it looks like it's 16x16
Or I suppose you could make a BC that just has the upper half transparent.
it's already one tile high for collision purposes, you can simply not draw in the upper part
No but you can just make the sprite visually shorter
yeah, I'll just leave the top tile blank. That seem easier
In the inventory though it will still try to take up the space of two tiles so will look a bit small most likely (I'm assuming as I have never tested)
The big disadvantage of computers is that they can't be smarter than the person programming them
(yet)
I don't know, sometimes I think the computer is smarter than me.
(the getter/setter is public and isn't xml-ignored)
There's a reason why we like our lints, analyzers, rule-checkers, etc.
my dumb ass put the connector on the WRONG SIDE OF THE BOARD on thursday and didn't catch it until I looked at the 3d render
I can't for the life of me create an extra tab in the collections page :(
Hey didn't crash immediately this time
Now my computer froze lol
It works ish...??
Could anyone help me with this? Here's the code https://github.com/brog-io/HatChallenge/blob/master/HatChallenge/ModEntry.cs feel free to ping me. Thank you!!
@dense jolt You leveled up to Cowpoke. You can now speak in our voice channels and share images in all channels!
Well, I know I have to ensure only the front view of the hat gets drawn. And I need to add a page system
So I have a few questions.
I managed to translate the Lui mod from Naver Cafe to English.
- Would it be ethical to redistribute it? I don't have permission, but on the original page for the mod, the author did not put a note on forbidding this. I'd contact them, but I don't live in Korea so I can't.
- If one is not a don't do it, where could I place it? The Korean version is not hosted on Nexus and their rules forbid posting translations unless they host the original.
- It seems to work just fine on Android, but I am no expert. Anyone willing to check the code?
no, don't redistribute naver's mod without explicit permissions, they are very strict on that usually, if nothing is granted, it's a big no
That's fair. Thank you for the answer.
in comparison in here, if nothing is granted is a small no
they are already reluctant in having their mod out of naver because of some issues in the past
i don't remember the details
I was wanting to do another for personal use. If the TMX is in Korean, will it still work if the rest is still in English, and file names haven't been changed?
i can't tell
Best bet is to test and pray?
you'll have to test but i shouldn't be too hard to test
Heh
With no pc, my editing options are limited. I was looking into it, and I couldn't find a good (or at least simple enough for me to understand) option. I'd prefer doing it as CP, just to make sure I don't overwrite anything.
You can sign up for Naver without living there, but... it's a lot of effort for what's almost guaranteed to be a no.
I tried a couple of years back and gave up.
It's a lot!
works just fine on android
Is this a 1.5.6 only mod?
It's an older mod. I don't think it was written specifically for 1.5.6. I'm just trying to collect as many mythical/supernatural style NPCs as i can.
Although it's technically fine to distribute just the translations, I don't know how much good that would do if the original mod isn't on nexus 
With what Lumina said specifically about Naver, I probably won't.
As for the other mod can you explain what is meant by "the tmx is in korean"
I tried opening it up, and everything is in Korean. Like I said, I'm an idiot at this stuff.
These mini translations were twofold; to see if I could, and to learn about coding to maybe make something. I made mods for Baldur's Gate 1&2, but that was almost two decades ago. At fifty, I don't learn as quick as I once did.
But you have English (or whatever lang you prefer) version of Tiled right 
Now whether you would be able to translate the various text in a map without editing map itself depends on whether they used the string assets rather than just having text right in the map
I don't know how to correctly open it to examine that. I just used a text editor to open it.
I don't have a computer at the moment, so I couldn't use that tool.
I have no clue why discord thought I really needed to see this message
but it is the one I see
(as far as I understand this isn't true either ftr)
ah ig it is like level of legalness as fan translations 
copyright holders retain the right to create or authorize translations since they are derivative works
so I guess if you define "technically" to mean "in this case someone probably won't care or go through the legal effort" then it's technically true
yea right, i was thinking of this in terms of making a retexture, though that could be argued as derivative work too
editing a map file with a text editor is like trying to change how a png looks by converting the file to text and trying to read it
Legal aside, I also believe in Karma. Since Naver doesn't approve, I won't.
I suspected that was the case. Infinity Engine map files could be viewed as text, but similar issues.
you probably dont need to edit it anyways for a translation :)
Just looked at the mod page again. It said it overwrites the beach. I've got other mods that could hose so I'll just skip it. Maybe when I get my laptop fixed I'll look into tools to convert it to CP.
One of the things I did with BG mods was take old ones that overwrote the game and changed them to ones that appended it instead.
I'm trying to edit the game's save file, where in the save file does it store information regarding what artifacts have been found?
it's suggested to not edit game files but rather use mods like CJB cheats or debug commands as it's less susceptible to break
i have then no idea how to do that because i never tried save editing except once to save a file during 1.6 alpha
As Lumina noted, it is not recommended to edit the save file directly. What you're looking for though is under <archaeologyFound>
is the goal to remove entries from there?
^^ yeah what's the goal with editing the save file?
if (Game1.player.archaeologyFound.ContainsKey(id))
{
farmerHas = true;
}
this is the relevant snippet of code that helped me find that section ^^
just to add the items that another character has found in a multiplayer game to my character's "collections" page, since picking up the item doesn't seem to fix it and I can't donate the item if someone else has found it
are you the host?
yeah
i feel it should work, as long as you are finding new copies of the item
When you say "picking up the item," do you mean you're picking it up in the museum? Because that will not work
try debug MuseumLoot?
(that will give them everything i think)
every piece of museum loot that they have not found
and to update collection it would need to be newmuseumloot
(but yeah i didn't suggest it because it would then be too much)
yea i was assume they already found everything
Yes, which is what i said in #vanilla-tech-support
u can do player_add name "name of item" for individual things
oh yeah i absolutely didn't look if support had discussion about this
Any reason in particular you need the collections tab to be updated right now? The issue is already fixed in 1.6.9
when is 1.6.9 releasing? and will it retroactively fix this issue?
- I do not know, and even if I did I couldn't tell you
- Yes
I just wanted to update it to see if I can, and to make it easier to track my perfection progress
If you'd like, you can hop onto the 1.6.9 beta with your multiplayer partners
(note that not all mods will be working on it yet)
it's a public beta?
Don't go around sharing this everywhere, but yes, it is public
ah alrighty
its steam only
this seems to have worked, cheers
I'll look into the beta as well to avoid this issue in the future
I reckon you're going to need to patch into a lot of the menus functions with harmony, I'd also take a look at how the collections and tab buttons are created in the constructor since they heavily rely on numbers to find the correct tab (check the name of the tab button)
(Though I wouldn't be surprised if more collections is already in spacecore
)
So does anyone know where I can find a step-by-step guide on how to use advanced textures? Preferably one written like it is explaining it to a five year old?
what kind of textures are you looking to make? c:
I'm trying to use one I downloaded on the game. Turns the farmhouse into a hobbit home.
I find guides how to make them, but not how to use them.
Got a link?
this sounds like Bog's farmhouses //i forgot what they're called but I know how it looks uifdsiugf
ah, I was wrong, its a different hobbit home
Alternative Textures has this guide if you havent seen it yet https://github.com/Floogen/AlternativeTextures/wiki/Creating-a-Content-Pack
( its actually pretty much just the constructor thatd need some attention but unfortunately that also means you'd basically need a hell of a transpiler or to just rewrite the whole thing. i dont recommend anyone who likes their sanity dig into the collections page code to try and change anything
)
to use AT in the game you need to go buy the tools from robin
(And you're deeply incompatible with any other mod that tries that!)
So generally people....don't
(Collections page framework, say no more, framework #66 incoming)
I've got all dependencies installed, and it shows up on the mod config menu, but no luck.
I do have a mod installed that changes the farmhouse, but I edited the manifest for it to skip it.
"P": "None",
"Target": "Buildings/houses",
"FromFile": "assets/houses.png",
I changed add to none for that mod.
did you use the paint bucket on the house 
good luck with secret note framework compatibility 
also i dont know if AT works in android actually

It tells me it can't detect a matching texture (or something)
u can post in #1272025932932055121 but unfortunately help is limited for android modding
I'll play with it a bit more, then try that if I can't figure it out. Thank you.
Actually taking a quick peek at the code, this doesn't seem like it'd be too bad (- famous last words)
Gotta finish docs on current project first though
the tabs r basically full anyways
if you just want to add a new tab on the side, its not too terrible really. could even probably do it with a postfix. you just wont be able to line it up. and you need to hardcode its position (and so back to atra's comment about compatibility)
so it'd look ugly but it'd technically work
maybe u just add a button to open new modded collections that ppl can use
(Oh hey, how's SAML?
)
giving me depression since 2021 
But at that point I might as well float my new button anywhere else
That causes less issues
Right side, maybe
yes
and if you're adding a new button, you might as well just remake a n ew page from scratch
Yup
(hence, SPUTab.cs)
My thoughts exactly (ur faster)
It's the general case of "yes but why get into a conflict with other people unnecessarily when I can just float a button somewhere else."
(i just got "lucky" in that compatibility with the powers tab wasnt too big a deal since it was new to 1.6, so... no one really doin anything with it yet.)
(I wanted to optimize the collections menu but figured doing anything else with my time is more productive.)
Like lying on the floor looking at the ceiling popcorn
(And knitting!)
Hi again. I know I can stack a basically infinite number of targets, but is there also a way to use a Dynamic Token array? CP doesn't seem to like it when I try that.
So instead of "Maps/[Map1], Maps/[Map2]...", something like {{arrMaps}}?
nope
i think newtonsoft.json is fine with multiline strings
despite what your text editor may say
I found a method that Harmony hates.
out of curiosity, how do you mean optimize it. like in what way
CP was many of sad at my attempt to break lines. Oh, well.
are you already using {{TargetWithoutPath}}
In FromFile, yeah.
Trying to keep those down a little. It works the way it is, I was just looking for ways to polish it.
No, but I also never got around to check as it worked fine on the one custom map I tried when I released it
but now that I think about it, I tried actually custom farms, and not farm replacements
Has anyone run into issues where harmony simply cannot patch a method, even when it patched with no prefix, postfix, transpilier, or finalizer?
I'll finally look into it properly now
if the method is too small theres a risk the method got inlined and so .NET is never actually using the method
(Mostly seeing if it could lazy load!)
Instead of immediately loading literally everything every time
it would definitely go a long way if all the menu pages did that. the initial lag spike when i first open a menu after launching is very mildly annoying at worst, but also very noticeable, which is a cardinal sin
Yeah but then I decided it would be too annoying to maintain
And then I knit a sweater
abandon all notions of maintanence and just release it into the wilds. surely another modder will adopt it eventually right
And learned patience
And joy
its prettier than the reflection code im writing right now thats for sure
are you still trying to patch the enumerator MoveNext
Yes. This patch that does nothing is causing an error.
I've done this before, so I know it's possible.
FYI - still a fair bit of work to be done but the UI is coming along nicely.
oh did you test for portraiture
No? I'm just using NPC.Portrait here.
ohhh me likey
I'm running a seasonal portraits mod already, so I'm assuming portrait edits should be fine.
it'll probably not work then (portraiture is HD portraits)
God this looks so clean
Major props
I dunno, does it patch getSourceRectForStandardTileSheet to work correctly with portraits? I assume whoever made it must have done something to get all the vanilla code to use the correct source rect size, unless they patched every single place where a portrait is displayed.
i think it mainly patches the dialog box portrait draw, unsure
Thank you!!!! Sorry for bugging you. It's just. I finally got around to actually playing and the invisible spouse patios were weird enough I had to check
Oh well, guess I'll cross that bridge when I get there. For now I've got a few more UI tweaks and the actual overnight gift logic to write.
(Also, it goes without saying that this does work with controllers!)
perhaps you could just offer alt mode where you display the sprite instead
oh but then u have to fight sprites in detail 
that one is much less common though
It might work with Portraiture, if they did a good job on this implementation: https://github.com/Platonymous/Stardew-Valley-Mods/blob/master/Portraiture/OvSpritebatchNew.cs#L40
It's patching the actual SpriteBatch.Draw, so as long as it doesn't change the actual destination rectangle dimensions, it should be fine.
Layout is a non-issue for me, or should be, since that was the point of the UI framework in the first place.
I still haven't started playing modded 1.6 yet
{
"Action": "EditData",
"Target": "Spiderbuttons.SpecialPowerUtilities/SimplePatches",
"Entries": {
"{{ModId}}_PatchTest": {
"Id": "{{ModId}}_PatchTest",
"TargetMethod": "StardewValley.Game1, Stardew Valley: OnLocationChanged",
"Type": "Prefix",
"Priority": 0,
"Condition": null,
"Action": null,
"Actions": [
"spacechase0.SpaceCore_PlaySound crystal local",
"AddItem (O)24 1 4"
]
}
}
}
i cant tell if this is a dumb idea or a neat idea but i sure am enjoying implementing it anyway (defining simple harmony pre/postfixes with CP patches)
Is there a simple way to add a custom color rule to Visual Studio Code? I'd like for Tokens to show up in a different color, but I have no clue on how to add anything to this beast.
It might be a bit like handing a shotgun to a toddler, but cool idea nonetheless.
ill just put a large disclaimer on the mod page that says "if you break things its not my fault"
besides i plan on splitting it into simple patches and advanced patches similar to CP's token API. simple ones (as shown above) will only let you run trigger action actions and nothin else. dunno how exactly im gonna implement the advanced ones yet but i have some ideas
i just mostly wanted to see if i could actually make Special Power Utilities at all any more useful for actually doing stuff with powers ยฏ_(ใ)_/ยฏ
can you hot swap schedules with a patch reload when doing testing?
or are they determined at beginning of day like dialog?
is advance ones just gonna let people put inline C# 
thats putting far too much trust and expected effort in someone who presumably doesnt know enough about C# to do the harmony themselves
i was thinking theyd let you define the parameters you want to read (maybe alter?) and some operations you can do on the __result. maybe lettin you drill down into arbitrary fields of things (like if one of the params is a fish, letting you check fish.Stack or something) but only if im not too lazy to figure out a good way to loop it since im generating the IL dynamically for this
anything more advanced than that starts to veer into "you might as well write the C# yourself at this point..." territory
The main thing that leaps out at me is "How will a typical CP author know what a 'method' is, which one to use, and what conditions/actions can apply to it?" Hence the shotgun analogy.
But that doesn't mean you shouldn't do it, just that it will be... interesting seeing how you solve that problem.
i did also think that, but i also know its the same system used in Data/PassiveFestivals already, so at least theres precedent for it!

Hah, alright, fair enough.
i figured id at least link to the wiki stuff about using ILSpy and whatnot and if someone really wanted to use this they might be able to search for a suitable method themselves or maybe ask in here if theres one they might be able to use
TIL that iridium quality is actually 4, not 3; did it mean something historically or does CA just have an aversion to the number 3?
3 has a funny placeholder icon
if pathos doesnt know then i dont know who would
You mean this one?
(well, besides CA)
Not sure if it's an intentional placeholder, or used for something else and just a weird artifact of the quality sprite's funny little math (I have no idea why CA wrote it to use math when there are only 3 sprites).
items usually get passed through a FixQuality() function in a lot of places too iirc to really make sure you dont set it to 3
the precedent for string method names in CP is that the method has to fall under one of the defined delegate though
its the variable used in price calculations based on quality
This is a bug
You mean the integer itself is used in a math calculation?
Huh. That's certainly an... interesting way to avoid a 3-line switch expression.
But it does seem to explain the oddity, so thanks.
true, it does have to either match a PassiveFestivalSetupDelegate or a MachineOutputDelegate, but i more meant the syntax for defining what method to use is already there
schedules don't like being patch reloaded unfortunately
fair enough
i can just not require that it match one of those delegates (bc im stopping short of actually building a delegate, im just getting the type name and method) and its fine
or any delegate for that matter i mean
(i am terrified of the 'giving a baby a shotgun')
i was thinking u should just split it up to type name and method name
as long as no one tries to patch XNA or something with this whats the worst that can happenโ
not like u are use TryCreateDelegate
democratize Harmony! Shotguns for everyone!
There's no customizable version of a ConfirmationDialog is there? (I mean aside from a totally custom IClickableMenu)
thee ", Stardew Valley" at the end is required to reliably find the correct type though
it also doesnt need to be ", Stardew Valley" it could be e.g. ", SpecialPowerUtilities" if you wanted to patch SPU with CP
Got it, patching the runtime
yea i am include the whole assembly in this consideration 
No one needs List.Add right?
its just so that u can do stuff like
i can find alternative,s feel free to get rid of it
safety mode only certain types are allowed
since u arent required to follow the joined by : format
im not sure what you mean or why splitting it into just type name and method name would help
just, maximum size, red text, "do not touch this specific command if you do not understand c#"
I recall there being a way to make a tool do the slingshot aim mechanism, but I can't find it now. Something about a minigame?
I got the projectiles to come out of my harp, but I want to make it feel like a bow.
one doesnt really seem easier than the other
the ease is 1 less str.Split that's all
i could just ask for the type name and method name ofc and do it just fine, i just went with the : format bc its something that someone could already see in use somewhere else too, so its consistent
targetgame? it does some strange things in there
and to strongly implicate that this isn't going to become a delegate
you are make up the model anyhow 
it didnt imply that its going to become a delegate to me, and i dont think anyone who is using CP to do harmony patches instead of C# would really know what that means in the first place
ill give it some thought though, im gonna need to change the format a little bit anyway regardless
that's it, ty. Not sure if I can pull it in but that's the right spot to start reading.
because im going to need some way to define which overload to use
Well there's also the actual slingshot part but modifying slingshot feels dangerous.
i was initially thinking just like StardewValley.Game1, Stardew Valley: OnLocationChanged(GameLocation, GameLocation)
Well that's not quite right
08:44:17 TRACE SinZational Several Spouse Spots Invalidating Farm: assets/Maps/GrandpasFarm.tbin
There's no way this isn't a bug. Simply changing the operand type prevents either Harmony or MonoMod from being able to correctly interpret the generated IL code.
the way im detecting the farm asset is not getting the right value for custom farms so it doesn't invalidate correctly
also it initially worked perfectly for me on grandp'as farm when I had it placed, then married
it was only moving it that revealed the issue of not invalidating
does anyone by chance have any idea how iโd write my content.json if my character has an outfit change based on their location? for example, my NPC goes into the secret woods every friday and dances. i have no idea how to trigger different sprites/portraits based on location. i attenpted to look at seasonal clothing ideas and was reading about the dynamic tickets and such and tbh im so damn confusedโฆ.if someone legit just has an example that would be awesome bc she works otherwiseโค๏ธ
We patch lots of methods with lists, so I suspect there's something else going on in your patching code.
(and then in addition to that link ,this section on that same page describes the Appearance section and its options in more detail!
https://stardewvalleywiki.com/Modding:Migrate_to_Stardew_Valley_1.6#Custom_NPCs)
Probably the patch itself is assuming the object[] arg type and generating an invalid program for a different arg type.
youโre a saint ๐ฅน
appreciate it sm! @uncut viper
basically you can use a GameStateQuery to determine whether a specific appearance should be used. it gets checked automatically every time an NPC changes location
I really don't think it's my patch code tbh
(plus weights and precedences)
Where is the patch? That's just the call to Harmony.Patch, not the actual patch.
There is no patch
I'm just call harmony.patch on a method and it's throwing an exception
does that mean it dies in CreateProcessor
I'm making a separate project for this
so i had patched something which returns a List before and it was fine, didnt find case for patching something with List argument
It's not list itself
It has something to do with the for loop
public override void Entry(IModHelper helper)
{
Harmony harmony = new Harmony(ModManifest.UniqueID);
MethodInfo EXAMPLE_1_Enumerator_MoveNext = AccessTools.EnumeratorMoveNext(AccessTools.DeclaredMethod(typeof(ModEntry), nameof(EXAMPLE_1)));
MethodInfo EXAMPLE_2_Enumerator_MoveNext = AccessTools.EnumeratorMoveNext(AccessTools.DeclaredMethod(typeof(ModEntry), nameof(EXAMPLE_2)));
//Harmony.DEBUG = true;
Monitor.Log("Patching Example 1...");
harmony.Patch(EXAMPLE_1_Enumerator_MoveNext);
Monitor.Log("Patched Example 1!");
Monitor.Log("Patching Example 2...");
harmony.Patch(EXAMPLE_2_Enumerator_MoveNext);
Monitor.Log("Patched Example 2!");
Harmony.DEBUG = false;
}
// This method can be easily patched
private static IEnumerable<object> EXAMPLE_1(object[] enumerable)
{
foreach (var _ in enumerable)
{
yield return null;
}
}
// Trying to patch this method throws an InvalidProgramException
private static IEnumerable<object> EXAMPLE_2(IEnumerable<object> enumerable)
{
foreach (var _ in enumerable)
{
yield return null;
}
}
Oh, these are enumerator methods. Told ya you'd have a bad time.
Enumerators are just weird, I won't pretend to understand all of their restrictions. For example, they can't have out params.
does it work if you use annotations?
iterating over an array is a different ballpark IL speaking to using IEnumerable
I can pretty much guarantee that it's related, but if you need to be positive, just change the method not to be an enumerator and see if it still fails.
This is what I assume the problem is
Either harmony or MonoMod doesn't like the IL in Example 2
Harmony will spit out IL, but MonoMod is like, um no, this isn't right buddy.
So idk if Harmony's patch logic is making it invalid, or if the original unchanged IL code isn't seen as valid by MonoMod.
Updating MonoMod.Common to the latest version didn't fix it
Released v1.1.1 which should now work on custom farms more consistently
it did say something about methods being inlined?
in the docs. idk what that means though
That would cause the method not to be called but it wouldn't cause an error.
Hi loves! I am working on a Girl Sam. I am trying to make her look vanilla-ish, but also a little more sparkly. How do you think of this?
They're all visible again! Thank you!!!
Now I just have to find the mod that lets you build anywhere even on non-buildable tiles so I can arrange them better XD
Well, that and I need to figure out why they're bunched up here rather than on their patios, but I think that's due to the main mod, not the spouse patio mod
I can see the patios, which is what matters 
if you want to CP your way there, EditData SinZ.SpousePatio to set the Size smaller.
it is only used for placement and to a lesser extent the unallocated visual, when its a spouse patio it uses map overrides not building logic anyway and does not care about unbuildable
it can get kinda awkward trying to move them when the size isn't 4x2 though as you need to grab the top left tile
Eh, it's not that I need the build space smaller, it's that some tiles on the places I used to place them are either no longer or never were buildable
as long as the top left tile is placeable then it would work
Hey, you'll probably get more feedback on #making-mods-art !
(i see them all bunched up and my immediate thought was, "CONGA!")
Hm, that would solve most of them... maybe not Claire's, though, not sure if the right of the pet house is buildable - though the doghouse is moveable. (For reference, the 1.5.6 setup:)
Is the Child class supposed to be only applicable only to the player's children? (not Vincent, Jas, etc.)?
yes
I'm fairly sure that's the case, focus, since dispos have Age and the relevant stuff associated with it in stuff like the Lexicon
So they wouldn't work off of "child", they'd work off of whatever's in the age part of the dispo
(or in C# parlance, not Child class, but w/e the class is that deals with NPC age)
would just be NPCs
Child is a subclass of NPC so it wouldn't be missing those fields.
Huh, really? Unexpected
The inheritance of NPC is terrible
Looking at the code, it does seem to be only for babies/toddlers but I wanted to make sure.
(At least to me)
I'm also aware there's an NpcAge that is normally used for this, which is why Child stood out as weird.
the fact that villagers use the base class, and then stuff like pepper rex or sepents are Monster that inherit from NPC and thus have all the villager fields anyway is annoying
but it would break so much trying to fix the hierarchy
Haha, yes, well, that's what happens when it's not planned carefully. People wonder why some games use terms like "actor" rather than "NPC" and that's exactly the reason.
Player, hostiles and NPCs can all be actors. But in Stardew they're all NPCs.
(also why the old code in 1.5.6 had SO MUCH "and is type StardewValley.Object and the type is definitely StardewValley.Object and not Furniture or Wallpaper...")
actor also has more specific meaning, as actors are whats inside an event, and can be temporary clones of the npcs
(or BigCraftable which is just also Object)
and the only difference was which constructor was used
(it is what it is. I'm on my sixth pair of socks for the year.)
(my sanity is restored.)
Actor is of course just one possible term, although the fact that Events in particular need to make that distinction is also weird.
In an ECS, you wouldn't have any of this hierarchical nonsense, just components representing the different behaviors that an "NPC" can have (movement, dialogue, etc.)
Somehow I don't think Stardew's fundamental data design is going to change, though.
well, you could do that with interfaces in C# but also like
Components are not interfaces.
this game predates interface method iirc
1.6 changed a lot, just not that
(I don't know what components are. I do know what traits are though.)
Yes, it did. But I think even a hypothetical 2.0 update would not drastically change the entire inheritance model.
Components aren't traits either. Components are actual data. (In fact, they are literally the data in ECS-land, the only data)
Closest analogy would be a SQL table, I suppose.
(But I'm not saying Stardew will, or should migrate to that model. It would be insane to try.)
I am starting to suspect that to make a sword's alt fire be the slingshot will take harmony to do.
Well there's no ammo to worry about, that makes it a little easier.
(nexus finally let me in
)
https://www.nexusmods.com/stardewvalley/mods/27436
i am going to make a chaos mushroom when i get the motivation to see how wide i can make it
i already manually rewrote the whole content.json file and it's still showing the files from my other mod. do i have to make a new one just to fix this botched copy paste. 
If you're not wanting to include AbigailDialogue.json then it looks like you've just missed deleting some stuff from your content.json
ill double check the file thank you 
I'm gonna showcase for you because cool mushroom
(if you want)
sure! sorry i went to grab something to eat 
description be like: "Ever wanted a perpetually updating mod because the author wants to see an entire biome of mushrooms? Look no further! Updates will be random but suggestions for mushrooms are always welcome."
A new mod courtesy of @velvet narwhal!
"Ever wanted a perpetually updating mod because the author wants to see an entire biome of mushrooms? Look no further! Updates will be random but suggestions for mushrooms are always welcome."
https://www.nexusmods.com/stardewvalley/mods/27436
thank you
i am being taken away to get actual food (not a cookie)
Gooooooo food is good
(I am currently being dragged away from reworking my config tokens to eat as well)
Another page in the "book of strange things found in decompilation":
public void fuelLantern(int units)
{
Tool lantern = getToolFromName("Lantern");
if (lantern != null)
{
((Lantern)lantern).fuelLeft = Math.Min(100, ((Lantern)lantern).fuelLeft + units);
}
}
Is there a document or a better guide on transpilers and labels than what the wiki has? I can't for the life of me figure them out
There's a bit here: https://stardewmodding.wiki.gg/wiki/Tutorial:_Harmony_Patching
More advanced guide at: https://github.com/loco-choco/TranspilerHandbook/blob/main/transpiler.md
The world of Harmony is a bit of a lawless land, but it's incredibly powerful. You can pretty much implement anything you want, but you can also break anything you want. With that in mind, you should begin by reading the main wiki's intro to Harmony to get you set up. This tutorial will focus on the actual patching and assumes you already unders...
Thanks, I'll give that github doc a read. I already tried the modding wiki page before.
You might have found the "transpiler" wiki page (https://stardewmodding.wiki.gg/wiki/Tutorial:_Transpilers) which really does have almost no content, the one I linked has an actual example. But it's pretty basic, yeah.
(nvm I saw you posted it. got drowned out by the github embed lol)
I usually de-preview any links I post but in this case they seemed actually relevant.
So from what I can understand it looks like the issue I am running into is because when I remove instructions it is removing the labels too. Thank you again for the documents, hopefully with these I can piece things together tomorrow morning
Is there any reliable way to tell if a quest was completed once it leaves the active log (i.e. has no reward or reward was already collected)?
i don't think so, unless it has a unique side effect that you could check for instead
the Farmer.questLog list has a list of quest objects with IDs and a "completed" bool field, i dont think they get removed from the log completely just hidden from the players view if theyre done
they also generate automatic conversation topics upon completion in the form of questComplete_[ID]
(i missed that if the money reward was less than 0 and either the rewardDescription is null or the rewardDescription length is less than or equal to 2, it does get removed, but the convo topic is still generated)
It's not in the questLog (asked the question after trying that and realizing it wasn't that simple, apparently).
id just check for it in the past conversation topics list then
Active dialog events, you mean? Those are timed too.
there's a function somewhere called like farmer.hasOrPreviouslyHadConversationTopic or something which checks both lists
if memory serves
Oh, interesting, I was looking at activeDialogueEvents but didn't realize there was a previousActiveDialogEvents.
oh yeah, Farmer.hasSeenActiveDialogueEvent(string)
TIL there is a reliable way to check for quest completion
(also i should correct myself bc apparently convo topics for dating and marriage are removed upon engagement and divorce respectively, apparently)
(including from previousActiveDialogueEvents)
Well, this quest one is still there, so thanks, that'll work.
why is that some items have a shadow in the toolbar and some don't? like the sprites them selves don't have shadows, where are these shadows coming from?
its hard-coded to be in a specific spot
sigh..
so if an item covers up the shadowed area, you wont see it
//doesnt seem to apply to decor items tho from what Ive seen//
Yeah it's pretty random, as to where they come from it's just a second sprite with black/transparent tint (but usually implemented in some Utility method).
Very easy to replicate if you want to, but if you're looking for UI consistency in the game, well... get used to disappointment haha
There's a Utility.drawWithShadow that's used in quite a few places
basically im wanting to change it because my shadow is too big for the object
also thats a mod idea
shadow consistency
Sounds like a lot of work
could be a framework to allow changes to shadow 
Yeah, how 'bout no
but it does sound like a lot of work yeah
I'm almost certain that's not the only method that handles drawing shadows in menus
i mean it keep me busy
likely keep you busy til 1.7
Trying to hunt down all the places and de-hardcode it sounds like hell lol
Haha, if you want to do it yourself, then go for the gold... as for me, that's the kind of tedious stuff I get paid for.
well well if nobody's gonna do it il do it
Also, probably want to make sure the basic set up doesn't cause any existing mods to explode
You're going to be Harmony-patching a whole lotta vanilla menus and HUDs.
And Harmony-patching the UI sucks.
oof
I feel like doing anything UI related sucks
I've been finding greenfield UI pretty alright now that I've ditched nearly everything from the base game except the actual sprites.
greenfield ui?
Actually, starting this mod was a good thing because I realized I implemented the scrollable container completely wrong for GIG. I don't know how to use my own APIs, how sad is that.
And by wrong, I mean I literally forgot to put in the scrollable container. It just... wasn't there, so all the content just overflowed.
- makes very cool api
- dosent know how to use it :(
- no profit
Tai - https://en.wikipedia.org/wiki/Greenfield_project
Essentially means you're not reusing anything.
ah i see
Technically have to "reuse" IClickableMenu but that doesn't stop you from overriding every single method on it.
I'm still alive.
welcome back, a few things here and there changed
I'm working on some code that rescues the player when they are defeated by a monster while swimming. This may occur in some modded areas with monsters like my mod. I was able to build the mod and test it. It's working ok but when the dialogue box appears I wanted to add a fade out before that happens. I'm not sure which method I should be looking for in the decompiled code right now. Here's my uploaded gist https://gist.github.com/aronyoddity/c7f7fa217536e1e1d16ea41f6aaaa5e5
Easiest fade is just Game1.globalFadeToBlack (or clear)
I have it on good authority that war never changes.
You might want DelayedAction depending on exactly what you're doing.
I've decided that the logical next step for SM is to completely wrap the game in another VM layer - MIPS on .NET on x86.
It offers no benefits but greatly complicates things.
(Also it's been suggested to actually add 2x/4x/aligned downsampling so that the game actually looks and works like an 8/16-bit game)
Port the Mega Bezel CRT shader to Stardew.
(System requirements: RTX 4070 or better, probably. Why not.)
- @wise berry Fixed in the latest Stardew Valley 1.6.9 beta patch. Thanks for reporting it!
I don't think it is, unless I'm blind and don't see it in the docs ๐
Friends, I have a question about how player configs work. If I change my mod to no longer allow a specific config option, but the player already has the removed option in their config file, will that config file correct itself or do I need to direct them to delete the config?
Removing an option should be safe, I think, it'll just get ignored.
And will disappear from the config file next time you actually save it.
It's when you change the structure of a message or the type of an option that things go bad, like changing the values allowed for an enum.
(see previous reply)
For instance, I currently have a drop-down with two options. I want to update my mod to remove one of those options from the dropdown, which effectively means there is no dropdown. Will that break anything?
I just want to make sure I'm understanding right.
The dropdown is, presumably, a GMCM thing, which is fairly irrelevant. That's just how you present your option.
ok
If the type is string, then any string value is allowed. If the player has an old option set, it won't display right in the GMCM, obviously. And whether or not it affects your mod depends on how you handle unknown values.
If you remove the option entirely from both the config and GMCM then nothing happens.
Ah. Well, my particular use case is, my bathroom reno mod does not like it when you change the config from patch to reno mode mid-game. And I can't tell it to not let them change it mid-game since it's a CP mod. Sooooo, plan is to remove the patch option entirely and only allow reno mode.
No idea how it affects CP. Probably same though. You can see for yourself, just add a line like "foo": "bar" to your config.json and see how it reacts (or doesn't react).
alright, thanks!
That will be the same result as if you had an option that used to be used and is no longer used. It's just a redundant line in config.
Ohhh Ameise is back
Are there any tilesheets with dark grass surrounding dirt? I'm only seeing light grass surrounding dirt in vanilla tile sheets, but I may just be blind. (Also cliffs with dark grass or dirt would be nice.)
This is the template for the mail framework mod.
I'm just checking something
"Date": "10 spring Y1", // Must be that date or after it. The format is "[1-28] [spring|summer|fall|winter] Y[1-999]".
Date is the day the mail will be arrived correct?
i'm really only seeing dark dirt + light grass
Or is the date the mail can start arriving to the farm?
I don't know enough about MFM to be able to answer your question, but do you know you definitely need it? Vanilla can do most of what MFM does now.
But woudn't that require c#?
No
mail can be sent with trigger actions
so with CP?
(just gonna throw this into the wind, i've tried literally every iteration of "TIME" and nothing is working for my tree)
{
"Texture": "Textures/PanellusStumpNight",
"Condition": "{{Time|contains={{Range: 1800, 2600}}}}"
},
{
"Texture": "Textures/PanellusStump"
}
],```

Yes. Like Avi said, you can send mail with trigger actions so you can have all sorts of conditions. You can also send multiple items, send recipes, send money, set custom BGs. All with CP.
https://stardewvalleywiki.com/Modding:Trigger_actions it's much simpler than looking at mfm, i've never used mfm
There's probably still something that MFM is needed for, I'm sure. But you don't need to reach for it before trying just CP first.
Hm.. kay then.
What are you trying to do with your mail?
"Time": "{{Range: 1800, 2600}}"
in a condition?
Woops one second
I'm planning to add more story later. The mod's state right now is just retextures and data edits. The mail is to add reason to these sudden edits. Not that it matters.
What data is this patching?
item data
i've been trying to throw everything at it, but if i throw a condition on the "morning" texture, it falls through and goes into the base
it's from ender's tree framework
ah unless not me, i'm still trying to throw everything at this lmao
You didn't use the all caps so I assumed this was a token, gotta look up the GSQ for this
If you just want to send simple mail (as in, at X hearts with X NPC, send this mail) then definitely CP will be fine
it should be TIME <min> [max] but it's not working 
"Condition": "TIME 1800 2600"
Or other conditions like "is X date" or other things you can get with a GSQ. The hearts thing was just an example.
The mail is essentially just send mail when the mod is installed and the player loads into the world to explain the changes and another one at level 7 or whatever the level is for the keg and explain the retexture/edits for the keg.
GSQ?
i was about to say roku should have it up cause i'm a dumb
Aba with the lightning response though, typed extra stuff and almost beat me to it :P
Pew pew
digs through spacecore for the nth time even though i know nothing in spacecore makes the texture have a glow effect
I shall let roku continue with the speed-linking for now as I have to go stomp holes in my back yard
Lawn aeration?
well aba lives in australia right? emu war 2 electric boogaloo? /j
haha electric boogaloo
Right now I'm reading through the trigger actions page on the wiki and I feel like my brain is melting. I'll try to understand this tomorrow.
Atra wins!
Gn y'all
Most exhausting part is figuring out how to keep the stupid things on
lol what even are those things
Lawn aeration sandals for stabbing holes in the ground with your feet.
Huh intresting.
In my case so that I can then put down poison to kill mole crickets because they murder me with their screaming
/sadly converting a mod to AT so I can use it/ Sometimes too much knowledge can be dangerous.
Oh I can just make a new path with CP. /sadly makes a new path in CP instead/
Why sadly though lol
Because I don't want to lol. I just want to play the game but I want a grass path in DaisyNiko's Earthy colours that doesn't replace any of the vanilla paths.
I guess I could just download IdaIda's grass path and replace the texture files with the recoloured ones from spiderbyhoshi. Yeah ok that will do.
Problem solved! Thanks for rubber ducking, roku xD
It wouldn't have actually been much work to just make my own new path (well, still using someone else's texture) but I am tired
I come to this channel and the first thing I see is this. I mean it's cool, but wtf is this? ๐ญ
Also, a really cool way to deal with cockroaches
I see. Will good luck becoming a farmer IRL.
Maybe rancher? Animals tend to be a little easier to keep alive
Though, I'd never be able to butcher the ones meant for meat, I get way too attached to animals
I am also not a responsible pet owner so I don't own pets for that reason. I would not do better with farm animals.
Consistency is not one of my strengths lol
Wait, then why are you using these sandals?
My backyard is almost entirely clay and to let the mole cricket poison get into the ground I had to stab lots of holes in it
One message removed from a suspended account.
Pretty sure there's not
Cheese and goat cheese are both -26, artisan goods
Right, but so are a lot of other things lol
Grilled cheese sandwhich: goat cheese, regular cheese or a bottle of wine, your choice
Though, knowing some white women that's actually a viable recipe
If it's for a recipe, you could use SpaceCore to use context tags, but you'd also have to tag the various cheese
One message removed from a suspended account.
Yeah I know I wasn't saying it as though that was a useful thing for them roku
Are there any shopping instructions?
Shopping?
By adding items to the store. I don't know English well ((
Thanks
I have a tutorial for adding recipes to shops, which is almost exactly the same as adding items but it has a few slight differences
https://stardewmodding.wiki.gg/wiki/Tutorial:_Adding_Recipes_with_CP
I wish I had named this more specifically for 1.6, didn't really consider future proofing lol
Guess I just have to constantly keep it up to date ๐
https://github.com/rokugin/StardewMods/blob/main/ContentPatcherExamples/[CP]exfruittree/content.json#L63-L82
Can compare the recipe tutorial against this to see the differences
It's got 1.6 in the title, that's fine
Yeah, the alternate title, would have preferred the link to have it
Just wasn't thinking when I made those pages lol
The page that has all the tutorials only shows the link name, it's auto built based on the tutorials category so I dunno if there's some way I could make it show the alternate title instead
A whoooole bunch of the tutorials don't have any information about what version they are for so you're ahead of the curve already
Yeah, that's part of the reason I want to make it more obvious lol
Afternoon. I'm trying to i18n some things, but anything in StringsFromMaps just returns the path of what is supposed to be shown in the dialogue box. Is there some kind of trick to this one?
CP
@marble verge You leveled up to Cowpoke. You can now speak in our voice channels and share images in all channels!
I'm a Cowpoke now..?
It's one of the chatting tiers, I guess that one lets you finally share images in channels where that's normally prohibited, such as here
#roles has them listed out
Gotta be at least Farmer role in order to apply for Mod Author role, given you have a mod published as well
Aha
Looking at SVE, it has this: "Forest.5": "{{i18n:String.05}}",
I did pretty much the same thing, but all I get is the path thing
Did you make an i18n folder and a default.json?
What's the path thing?
When I click on something that needs to return an 18n line, I get something along the lines of "Strings\StringsFromMaps\Entry.1"
!json seeing what you're doing is gonna be a lot more useful than describing it I guess
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.
And the i18n?
And this is the i18n in progress:
I'm working with a savegame in progress, but reloading the i18n and patch didn't affect anything.
Might be worth going back to the main menu, doing the i18n and patch reload, and reloading the save
Just a minute
Seeing where you're using these Strings assets would also be good
Right but I can't be sure you're doing it correctly if I don't see it
How would I show that?
Well you can screenclip I guess, if it's just in Tiled
I forgot that people tend to do a lot of stuff in Tiled lol
Okay, fantastic. Never mind; I am just being a colossal idiot.
Includes are great - if you actually friggin' include them. -_-
It happens
If it's any consolation, the code all looks good as far as I can tell
So hopefully that's the only issue lol
Just did a reload, everything works as expected now.
I'm going to start keeping track of the number of times I say "God, you're an idiot" to myself out loud. Maybe get myself a treat if I break a previous record or something. ๐
Haha, I wouldn't be too hard on yourself, it definitely happens
To meme it up, I ain't even mad
It's just always stuff like this, and never "wait, I actually need to dig into this"
Is there a way to attach a tooltip to a custom wild tree? I'm using the Informant mod, and all of my trees show up as "???".
as far as i know, no, because theres no name field in wildtree data
informant probably writes their own label for vanilla stuff
Ah, okay.
There's a lot of base game code that has holding melee weapon and holding slingshot as mutually exclusive to some functions, so I'm wondering if I can use harmony or just regular code to say "when the action button is being held down, the sword is no longer a melee weapon for legal purposes and is currently a slingshot". Is there a better way to do that?
Maybe u can make a Slingshot based on the sword then store that in heldObject
Or other way around 
I need to read more on heldObject but it's not an object type on its own, but like, tags?
unsure what you mean by tags
ah the heldObject idea isnt viable cus Tools only inherit from Item
I think I'm unsure what I mean by tags too. And definitely can't make a new weapon type.
well you can if you want
just remember to use spacecore
need RegisterSerializerType to save ur new weapon properly
Sounds like it would need some transpiling to work with base game "if you're holding x then you can't move" stuff and that's fragile.
But, I will add reading spacecore doc in detail to my list today.
hm maybe you can implement shooting as a weapon special move
cus thats a thing you do with weapon in which you cannot move 
BetterSlingshots and Enhanced Slingshots are outdated but have a lot of harmony in them that were giving hints of how to do it, but they're modifying existing slingshot.
the logic aint quite the same ofc, lots of reimplementing stuff in this route
My initial thought was on the buttonpressed/buttonreleased event, set a bool, and then while bool is true and held tool is harpsword, force enter the slingshot aim mode. But that's skipping a lot of steps.
No ammo involved, so the sword does not need the actual quiver thing to hold rocks. I'll just generate a projectile and run it through my spell validation to deduct mana.
i do feel like making the harp really a slingshot and then making your own melee hit on button press is easier than the reverse
Um OK maybe... Activate the slingshot aim, but the release just creates the initial vector for a regular projectile instead of calling in all the other slingshot methods.
I am inclined to agree, since regular slingshot does not have a left click (I think? Haven't used it in years).
Oh it's been a minute then. Well I have some ideas to play with now, ty.
Hey! I am trying to copy a snippet of code from an another mod to an another mod?
They are both contentPatcher mods, one uses a different version?
When I add
// Panorama
{
"Action":"EditImage",
"Target":"LooseSprites/stardewPanorama",
"FromFile":"assets/{{Target}}.png"
},
// Clouds
{
"Action":"EditImage",
"Target":"Minigames/Clouds",
"FromFile":"assets/{{Target}}.png"
},
// Treestrip
{
"Action":"EditImage",
"Target":"Minigames/treestrip",
"FromFile":"assets/{{Target}}.png"
},
```to the `Changes` attribute, it does not do anything? Since it's an older mod, the format is `1.19.0`?
do you have these pngs in your mod?
yes
assets/LooseSprites/stardewPanorama.png and so on
yes
the format for these EditImage didnt change so u can use 2.3.0
check your logs for any errors
could this be stardrop doing something weird? I edited the file straight in my games mod directory?
didn't find any?
Important note: Your computer username may appear in the log. If your username is your full name, please be aware of this before uploading it.
Please share your SMAPI log file. To do so:
- Open this page: smapi.io/log.
- Follow the instructions at the top of the page to upload the log file. (Don't copy & paste from the console window!)
- After uploading, it will show a green box with a URL to share. Post that URL here.
Please do it even if you don't see any errors. This has useful info like what mods and versions you have, what the mods are doing, etc. If the issue didnโt occur in your last session, please load the game to the point where the issue occurs, then upload the log.
Log Info: SMAPI 4.0.8 with SDV 1.6.8 build 24119 on Unix 6.10.6.0, with 11 C# mods and 35 content packs.
Suggested fixes: One or more mods are out of date, consider updating them
The mod is the Vintage Interface 2.0 (CP) which should set the main menu background too
Like is in content.json
so going by the logs your edits all applied correct
idk if anyone here is intending ro make a Boothill mod, but I'm an artist; and would be very considering helping out with art assets- in case anyone needs it bc i am starved for cyborg cowboy
but the mountains are actually Maps/HarveyBalloonTiles rather than assets/LooseSprites/stardewPanorama seems like
@gaunt yarrow here's a mod that edits the mountains https://www.nexusmods.com/stardewvalley/mods/11213?tab=description
Minigames/Clouds is correct though, do you see clouds change in main menu?
not notably since they are smaller changes
but yea, i'll try this!
So, you're interested in creating a new character for Stardew? Good news: with version 1.6, creating a character is easier and allows for more flexibility than ever. However, NPCs are one of the more complicated things to create for Stardew, as they have a LOT of moving parts. This guide aims to provide a basic but thorough walkthrough for ea...
oh thank u! I'm not much good at modding, but I might try this if no one picks up a similar project
THANK you! Now it works :3
Hi guys, does anyone know how to trigger quests? the trigger actions don't have an option for an immediate trigger so I guess that is not way to do it? I'm trying to trigger a quest after player has just seen a mail like how most vanilla quests do
Attach it to the letter using %item quest <quest ID> %% in the mail
No need for trigger actions
Ah that's brilliant, thank you! ๐
Is there any way to use line breaks in i18n?
\n
Merci!
Are there any tilesheets with dark grass surrounding dirt? I'm only seeing light grass surrounding dirt in vanilla tile sheets, but I may just be blind. (Also cliffs with dark grass or dirt would be nice.)
the dark dirt tiles have slightly darker grass
dont think there is dark grass in vanilla though
There is 3 shades of grass in vanilla, but no I donโt believe thereโs any vanilla tiles that connect dirt and/or cliffs with the darkest grass tiles
yea that is what i meant, no darkest grass -> dirt
That's what I was seeing
maybe cus darkest grass is suppose to imply dense grass
I was mostly looking for the second tier. And there are arguably 4 colors if you count the tree shadow grass as one.
Good evening ๐ I have a quick question : when using "Modification": "Multiply" in a shop entry and the result is say 16.5, does it round up or down ?
Tried everything that i'm capable of now ๐ nothing works oh well
I don't think SpaceCore has anything for collectiontabs at least not what I found
it's better if you forget about integration with collections tab and just make a menu that works first
doing stuff to the vanilla menu is like burying compat landmine for other mods 
Yeah might do that, integration seems like a pain
Is there a way to load a currently loaded tilesheet into a new slot? Say, transfer Maps/spring_outdoorsTileSheet to Maps/New/spring_outdoorsTileSheet?
A "slot" is just an asset. You can implement the asset loading any way you want in the AssetRequested event.
In CP?
Not CP, no.
Yeah, I kind of figured that that wasn't going to happen. Oh, well.
what's your use case though? is this for a weird maps thing?
I'd like to offer three on-the-fly recolors: currently loaded, default and Earthy.
Default as in, vanilla.
It does sound odd. If it's just a copy of a game asset, then why not reference the game asset directly? Why do you need the copy?
Because the loaded game asset may have been recolored by another recolor.
Then how is your recolor supposed to work? One of them has to "win", no?
I've built in support for vanilla and Earthy by loading different tilesheets, but I'm not sure if I can switch back to whatever was originally loaded from there.
and why do you want to switch back?
you just dont load yours
Mainly to figure out if it's possible. If so, I could add (Default) as an option for currently loaded and leave room for other recolors to recolor DTZ assets.
Wouldn't vanilla already point to the last mod to modify that tilesheet?
Unless you've made your own custom "vanilla" that's a literal pixel copy of the game's vanilla assets.
Presently, I'm not actually loading the default assets... Actually, they're not being targeted at all.
im not really sure i get it but it sounds like
[vanilla][other mod][your mod] -> [your mod] applies
and you want to go to
[vanilla][other mod] -> [other mod] applies
Are these recolors for a vanilla map, or recolors of a custom map that happens to use vanilla tiles?
If I target them with a conditional EditImage and and the condition is no longer true, will it go back to whatever was there before?
(also, do you have permission to use the DTZ assets?)
if cp reload changed in way that your's isnt being loaded, then it reapplies the whole stack
This is just a homebrew project
there wouldnt be any other recolours recolouring DTZ assets to worry about then, no?
I have no plans to upload anything - and if I do, I'll go get permission from whomever's stuff I'm working with
Yeah, the way assets are handled is not static; each time something changes, SMAPI/CP reloads the vanilla asset and then reruns everything that modified the asset.
If your edit runs at low priority and some other recolor at high priority, then the other recolor happens last; if you swap the priorities, your edit happens last. Remove your edit entirely and it's whatever mod came before + whatever mods came after. That's all there is to it.
Maybe it would help if I actually explained what I'm doing xD
You are not "editing" a "file", you are editing a step in a pipeline.
u can just try installing 2 CP farm building retex mods with config 
I have tilesheets for Earthy, and tilesheets for Vanilla. The vanilla ones are copies - because it might be possible that someone is using another recolor, in which case you get a recolor clash in DTZ. For that scenario, I want to introduce an option to force DTZ to use all-vanilla assets.
see how it goes when u turn off 1 farm building
I'm not sure I understand why you'd want to force a complete reversion to vanilla if another mod has changed it. Surely no user would interpret it that way, "vanilla" would be "turn this mod off" not "erase what every other mod has done".
Just have your Earthy recolor depend on a condition. Job done.
I don't want to affect anything outside of DTZ
i mean it sounds like what you want is to just load the original tilesheets onto themselves again but from assets in your own folder, and make that conditional based on config, but it also just sounds like bad user experience to me when instead they should just uninstall the recolour
Which is where my original question came from: right now, I'm loading everything into Maps/DTZ.DowntownZuzuCP/[Tilesheet].
But everything that points to vanilla assets is untouched, so that recolors other than Earthy can do their job elsewhere.
Is there a way to copy the loaded tilesheets to another slot without C#?
As I said, when you edit an asset like with EditImage, you are editing a step in a pipeline, not editing the raw asset. Remove the edit (i.e. by making it conditional) and it just reverts.
You do not need to "edit" it back to vanilla. Just remove your edit.
Okay, that's good.
Unless your actual goal is to override any previous recolors and force vanilla, but that's... unusual for a mod to do, and kind of hostile to players.
that will let other mods still edit though rather than forcing whatever tilesheet is originally there to be the original again, am i misunderstanding or was that not what you wanted
No, not at all. I only want to give players an option to make DTZ full vanilla so that whichever recolor they use outside of it doesn't clash with what happens inside of DTZ.
The maps are combination of DTZ-specific tilesheets and - currently - whatever is loaded in the default slots.
(ah, i was misunderstanding then, in which case yeah like focus says just not applying your edit will revert it
)
So they are custom maps? I asked that question earlier.
Oh crap, I missed that. Sorry, yeah.
I see. In that case you want two conditions, the first using your copied vanilla texture, and the second using your earthy retexture.
As it is, you could get a combination of, say, Starblue and Earthy, or Starblue and Vanilla, and that looks kind of wonky.
When both conditions are false, it'll revert to "ambient recolor".
This honestly seems like your best bet (I'm obviously not the first to mention changing around game menus is a pain)
I'm going to do that, I asked someone on Nexus if their source code is open but I haven't gotten a response (their mod adds a collection tab)
Which mod? You can check here if you can find the mod's source linked (if it's open source) https://stardewvalleywiki.com/Modding:Mod_compatibility
Okay, got it. I'll run some tests.
FYI, even if you manage to add the tab visually, trying to get all the IClickableMenu stuff working with it, especially the neighbor system, is probably going to drive you insane. Almost every mod I've seen that tries to modify vanilla UI completely and utterly screws up controller support.
Thanks for the help, everyone.
If anyone knows Gurms GitHub lmk https://www.nexusmods.com/stardewvalley/mods/21620?tab=images
(SPU has controller support
it was, absolutely, a royal fuckin pain)
if i had to guess the crafting collections page just adds a button there in a hardcoded spot like all the others and it would not look as good once you wanted to add one more
you can always decompile their mod yourself to take a look for curiosity's sake too, so long as you dont just copy things
Ahh it's closed source, oh well I'll just add a custom menu
Might do that, I won't copy things ofc
(I thought SPU was a framework mod, where do controllers come in?)
(fwiw it does seem like it actually just goes past the last tab, no matter how many tabs there are, but obviously that only works until you get to the bottom of the screen... no scrolling support by default)
SPU rewrites the Special Items & Powers tab to add categories
basically turns it into a Collections page but separated by mod, for powers
Oh, yeah, patching the UI for that sounds like tons of fun.
it also does the more frameworky stuff behind the scenes
luckily i didnt have to patch it i just overwrite the original menu completely
(and add a config to disable it if another mod requires the original menu for some reason)
Oh, in that case the controller story isn't that bad. It's just super broken whenever a mod tries to add clickable stuff to the vanilla menu.
controller support did break me when i made my searchable collections page but it kinda. sorta. half works? if you dont look too closely-
as long as you only move the joystick or dpad downwards its fine. who needs up or left or right anyway
Honestly now that I think about it I probably have more freedom if I don't integrate it with the collections tab
whenever possible creating your own menu is basically always going to be better and easier
lol, well I won't further pimp my UI thang but it's there to try. It took a long time to get controller support just right, but as of now it very rarely fails to do the right thing.
unless you really want it integrated in another menu
if id made SPU now id probably try it, but SPU predates it i think, and my mindset is that if it works now, i have no motivation to try and rewrite it all again and potentially break it
Understandable.
FWIW, the UI I showed yesterday, after adding all the functionality to apply rules, dimming, overlays, etc., nets out to just over 300 LOC for the entire menu. It doesn't have tabs, but tabs aren't really that hard (I use both top and side tabs in the in-progress logistics mod.)
Most custom menus I see are like, thousands of lines, so to me that's an improvement.
my SPU menu has just under a thousand apparently, though thats without minimizing line breaks and such, and a lot of it is just copy pasted stuff from other vanilla menus bc a lot of them share the same functionality. sure as hell aint very readable though even if its not a lot, so id still take the 300 ofc
Oh, yeah, I use csharpier so the 300 involves very generous line breaking. According to VS analytics it is only 83 lines of "executable" code.
tbh i hadnt actually looked at your UI thing until now (i knew you'd made it but didnt have reason to use it so i didnt look into it) and it does seem really nice, so if its any endorsement its making me think "i wish i had a menu i was working on so i could try it out"
Haha, thanks, I think?
I'm fine with however many or few people use it, the offer's still open for anyone wanting to try it out and let me know if any features seem to be wonky or lacking.
ill just make an in game menu for writing custom harmony patches at runtime from the mailbox to go with my CP-Harmony-Patches thing im working on 
Much meta, so harmony
ButtonDE
On an unrelated note, I'm trying to test the gift-rejection logic, does anyone know of an actual example where an NPC has a custom gift rejection dialogue?
cant be much more work than my current mind worm asking myself constantly "how difficult can it really be, to make an extremely simple 'programming language' for the advanced CP patches feature?"
Jas and Vincent
oh rejection
never mind not jas and vincent then
wholly reject, like they won't take it? || birdie's quest ||
what if you just patch some in to test 
Mateo & Hector (SnS/NEACOT) both have reject dialogue for the bouquet
i thought its just matter of having a reject_<itemid> dialog
Thanks, good to know although I don't run any expansions, was hoping for a vanilla reaction.
(it's rejectItem_<itemid>)
Yes, I'm aware of the logic, that's what it checks and that's what I'm trying to test.
Marnie has reject dialogue for Louis's shorts
i FORGOT about that one 
but also yeah like Avi said i think everyone has reject dialogue for the birdie quest items too
There's two types of rejection - reject because they're the wrong recipient for an active quest and rejected because they don't want it as a gift
unless theyre the recipient ofc
the latter is new to 1.6
Yup, that was it. Works!
Well... I tinkered with it, and I think I'm going to have to stick with vanilla and Earthy. If I make maps look in Maps/ for their assets, any change I to make tilesheets like spring_outdoorsTileSheet applies everywhere and not just in DTZ; if I make maps look in Maps/DTZ.DowntownZuzuCP/ for their assets, I can't make the maps use default assets. As far as I understand, anyway.
is there a different logic between quest vs reject or is it just the same
the former is reject_ and the latter is RejectItem_
oh, no one in vanilla has RejectItem then
I do have it checking for both. Too bad if there's no vanilla test for the new logic though.
are you going to let people propose over the mail
if you send a bouquet or pendant through the mail i think it should immediately jump you to divorced status
"i'm breaking up with you over text" new level
I thought of things like the bouquet/mermaid pendant and decided I had no idea how the mechanics of such a thing could work. So the mod has a configurable (by patching, not user-configurable) blacklist of items that can never be mailed, and those ones are on it.
And yes, the human factor also did occur to me, "who the hell asks you out on a date by mail?"
yea that seems like best thing to do
mechanically RejectItem_ will not prevent gifting quest items (so for example you can have someone who normally reject alcohol still have a "give me alcohol" quest). reject_ will prevent both
yeah you need the dialogue response to those things to set up other things and it just wouldnt make sense to do over mail
In the game logic it does - that is, it prevents them from actually doing receiveGift. They can react, but it won't come out of your inventory. It's the same basic type of rejection AFAICT, just implemented in a different place.
or... i guess you can technically do everything and then just, not draw the dialogue, but thats also strange, bc then you'd be dating as soon as you sent the letter
As soon as they received it. There's no instant-teleportation here, it's mail.
But yes, I'd have to do some weird thing where they send you mail back saying "yes, I'm totally into that!" and it's just... weird.
If someone else wants to make that mod, they can patch the asset to remove those items from the blacklist and figure it out themselves. 
or just check if the letter has an engagement/dating item when they receive it and until then leave the player in a state of schrodingers dating status 
triggers dumped_
if you ask someone out remotely you should expect to be randomly dumped remotely too
oh are you doing a thing where the npc mails you what they'd normally say for the gift at a later time
You just... don't ask people out remotely. I'm pretty sure their response would be to ignore it entirely. That's been my response when some very confused individuals tried to do it online.
does gifting through mail not trigger the dialogue? i assume it'd be the same logic as "gift everyone"
chu and i same braincell apparently
I did consider it, but the thing is, if I mail 20 gifts in one day I do not want to receive 20 thank-you letters the next day. So it's out of scope for now.
yea it'd explode the mail page too
I considered even just posting HUD notifications, but it's still too much.
you could start a conversation topic and give them all "hey i got your letter" lines, so if the player talks to them they can bring it up
One thing I will need to send actual mail for is for "returned" gifts, i.e. you tried to exploit the gift limits and I caught you.
thatd let custom NPC makers add dialogue for it too
oh it might be neat to add mode where you can only mail gift that you already given them in person
progression mode kinda
Nah, what's the point of that? Though it is set up that you can only mail to people you've actually met (spoken to), and the thing I was asking about yesterday requires you to have completed the "How to win friends" quest before you can send anyone anything.
(or tbh even just adding the convo topic thing but not giving them to the vanilla NPCs would be neat from a custom NPC maker persppective)
I do like the idea of adding event dialogue after sending a gift, though that is pretty far outside my wheelhouse, I'm not sure if it involves 2 lines of code or 2000.
the point is to reserve this system for late game filling out points, and make player hear at least a few gift reaction lines
though now that i think about it im not sure how you'd limit it to just the person who received the gift unless you appended their name to the convo topic, which is a bit wonky
but ofc if you just make dialog work through mail somehow then u dont need it
I am handling that through scaling. While I'm allowing it to be configured, by default it will net you only 60% of friendship points which means you cannot max out any given NPC's friendship in one year without also visiting them several times in person.
i guess you could just append it to their daily dialogue directly and just check if they have a "receivedMailGift" dialogue key
itd only work on that day but maybe that makes sense idk
The idea is, you shouldn't have to waste all your in-game time running around time gifting people to max everything in an entire year, but you also can't be totally lazy/ignore the system entirely and just mail everything.
If it were only available late-game, it would completely defeat the purpose to me. First of all it's illogical and unimmersive just from a rational point of view (why can't I send it now?) and requires a bunch of silly lore, and second, late-game is when you actually finally have the time to run around gifting everyone.
I was actually just about to ask this with gifts, if there was a good base game way to do it or (as I just finished doing) use the spacecore event to make it ungiftable.