#making-mods-general
1 messages Β· Page 605 of 1
- Content Patcher pack: enter
patch reload <your_mod_id>in the SMAPI console window. This will reload and reapply all your patches (but won't recalculate theConfigSchemaorDynamicTokensections if you use them). - Translation files: enter
reload_i18nin the SMAPI console window. If it's for a Content Patcher pack, also runpatch reloadafterwards. - C#: see the Visual Studio hot reload or Rider hot reload feature.
ooh, interesting
π₯ reload 
yeah discord is having some issue, API unresponding
(the answer is day start by default, reading the documentation explains the project)
I also can't seem to see any images
oh yeah, big time lagging
THERES A HOT RELOAD OPTION IN VS STUDIO
the good news has breached containment
I think it's back!
Nvm, still can't post images. But the colors of everyone names came back!
search also still broken :(
Currently working on my first procedurally generated mine area. I got the entrance working and the levels are going down like normal level 1 level 2...etc. But I'm not sure how the actual mines work are they changed by the code. Right now my map is just a single map it doesn't change but the monsters increase as I go down which is good at least.
Maybe it's jsut the ores and monsters that change and the maps are made manually?
that would mean I have at least 20 maps to create by hand.
Mine maps aren't generated procedurally
The mines follow a set pattern. The Skull Cavern randomly selects one of the mine floors and changes the tileset as needed
That is how it works unfortunately
-# I'm in the same boat with one of the mods I plan on making eventually... I'm gonna need to make so many maps 
Though you could probably do procedural generation via C#
okay, so i want to apply daily patches for my stupid event when the day starts because otherwise, if you upgrade your house, the event will use the coordinates from the smaller house still
sorry if this sounds really dumb, but would i use cache invalidation for this? or is there another way to edit beyond asset request events?
ah well, my brain is leaking out of my god damn ears, i'm just gonna have a content patcher pack in addition to the dll mod
not worth spending another 10 hours for something that takes 5 minutes w/ cp lol
If you are in C# anyways you can use tokenizeable string to give coordinates
(that said if you didn't use tokenizable strings or just go for a CP pack, invalidating the asset to make room for a different edit to apply in AssetRequested would be the way to go. that's what CP does every time it detects an asset needs to change)
Ok so I just needed a place to banish my custom monsters too I think Iβll just do 10 maps if procedural generation is not already part of vanilla it will definitely be a bigger challenge
In my event I write [mushymato.LivestockBazaar_WildPos 0 3]
Dreamy did you look at the spacecore dungeon stuff
It let you glue different pieces of map together for dungeon purposes
I wish someone could help me build my custom mines itβs so difficult
I am working in c#
So far monsters spawn but the stone is not itβs coming out as error items
Yeah I'm suggesting a framework if you didn't wanna do all that yourself
Don't let me stop you from rolling your own but worth mentioning that you can still use SpaceCore's dungeon stuff through C#
Spacecore can do anything!!! π π π
At this point I am deeply wary of most .dll mods. I believe Pathoschild has imprinted in me the suspicion all the latest ones are AI Vibe Coded....
hey i was looking at fishpond data and i think i noticed something undocumented??
in the legendary fish pond produce section, theirs a default option with a precendence of 100 and no condition that gives each legendary fish an additional 50% chance to produce 1-2 fish roe before its own unique roll.
Am I reading this right? the wiki doesnt mention it but if its true that would (for example) *double* the daily profit from the legend pond compared to what the wiki says.
maybe this is that? π€
thank you so much, i got that working
it was not all for naught
i gave it a try by invalidating data/events/farmhouse on day end & on game load to try to get in there before daystarted, but it didn't seem to work
checking the wiki history, it seems prior that the base chance for a legendary pond to produce roes was the same as a 1 fish normal pond. (15+8= 23%) and then the chance each legendary produced a roe after that check was 100%.
Now (according to the wiki) each legendary pond has 50% base chance to produce roe and then after that roll a roe is made is anywhere 43%-84% based on the legendary fish.
but this doesnt factor in the default which rolls a 50% chance to produce 1-2 before each legends own production which boost some significantly
I would vote for the tokeized string
It's only tokened in right when the event starts
And you can register ur own token handler iirc
this thing, right?
TokenParser.RegisterParser("tokenName", ...).
my brain has been sucked back into my head, excellent
Same can also be said for CP mods (even though it's not code)
have to make it so messy that it looks too messy for AI
That's why I only create my mods in binary. c# mods aren't really code fr
As a c# mod author I'm biased but I would say this isn't true. There are now more ai c# mods than there used to be, but they're usually pretty easy to tell apart
- missing/broken features
- ai description/thumbnails/banners
- ambitious c# mods with no prior modding history
- other mods made with ai
- no visible source
I'm more of a Befunge and Brainf*ck guy myself.
-# And I say that as someone who has made their own Befunge programming language before π
There's other less reliable tells too, like the author not being on the sdv discord, or the mod being a "quality of life" mod that isn't actually very useful, or a pathological avoidance of harmony
So do you write raw machine code or raw il
tbh i would be lost without CP π I have a tiny tiny amount of c#.
just enough to make people suspicious
I started out doing cp but now I almost exclusively do c#
I've taken to glancing at the author's profile whenever I see a new mod that I'm unsure of. Usually a slop-poster will use AI for all of their mods and usually at least one of those mods will be more obviously AI.
(Doesn't help when it's an author that only has 1 singular mod obviously)
Is there a way to invalidate the cache of one specific map? This is what I have currently
if (id.Equals($"{ModEntry.ModId}_Book_Lewis1"))
{
ModEntry.StaticMonitor.Log("Clearing Basement Cache", LogLevel.Debug);
ModEntry.StaticHelper.GameContent.InvalidateCache("Data/Maps/LewisBasement");
}
Maps don't live in Data/
I also like decompiling mods from new authors which usually makes it apparent when an author is using ai
Where do they live?
In Maps/
Same place as in your unpack.
The path is relative to the content folder
So I'd do InvalidateCache("Maps/LewisBasement")?
Yes
(Tbh I tend to prefer open sourced mods as is.)
aren't mods produced using smapi required to be opensource? or does the license not require that
Also you'll want to check the qualified id instead of the unqualified id
No. Because none of them include any of smapi's code, they aren't beholden to its license
Mods are all rights reserved by default
This is the entire function (it's a harmony patch)
private static void readBook_postfix(StardewValley.Object __instance)
{
string id = __instance.ItemId;
ModEntry.StaticMonitor.Log($"Player has read {id}", LogLevel.Debug);
if (id.Equals($"{ModEntry.ModId}_Book_AncientFruit"))
{
ModEntry.StaticMonitor.Log("Clearing Cache", LogLevel.Debug);
ModEntry.StaticHelper.GameContent.InvalidateCache("Data/Crops");
}
if (id.Equals($"{ModEntry.ModId}_Book_Lewis1"))
{
ModEntry.StaticMonitor.Log("Clearing Basement Cache", LogLevel.Debug);
ModEntry.StaticHelper.GameContent.InvalidateCache("Maps/LewisBasement");
}
}
ahhh okay, thank you
Yeah you'd want to use QualifiedItemId and prefix the id in the equals check
Gotcha
It doesn't really matter, readBook isn't going to happen for non-book objects
But it is good practice
It's good defensive programming
So I'd do __instance.QualifiedId == "(O)..."
Exactly
dope
As opposed to offensive programming?
I would say anyone manually calling readBook on something that is not a book is an offensive programmer
Offensive programming is when you use reflection to reassign readonly fields
Defensive programming is essentially designing code to be flexible and close off vulnerabilities that can be exploited by malicious actors
Yeah, or in modding terms, make it harder for people to break things by accident
I've used reflection to reassign private, auto generated backing fields for things meant to be readonly before. Exhilerating
It's fine, all I was doing was overwriting a mod's UniqueID and other manifest data
Offensive programming is calling harmony patches in your mod constructor so that when it crashes it takes smapi with it
I so badly want to make a malware joke
(I once installed a mod that actually did that)
Go for it
I don't think I can.
lawless hours
Why not? It's not against the rules unless you're going to link to like, an actual malicious file or website
Offensive programming is replacing artifact spots with worms

The original joke I had involved stuff that I'm like 99% certain isn't classified, but I don't want to risk it π
Mod that makes artifact spots drop artifact spots that you then have to go break at clints
Would you happen to be active on the war thunder forums /jk
Just to clarify, a worm is a type of malware. Iirc, its basically a self spreading trojan
Yeah
No. But I am a government contractor
The first ever virus was a worm that actually wasn't intended to be malicious
I know. I forget the name of it
The morris worm I believe
That sounds correct
Isnβt the most widespread evil excessive use of OnTimeChange?
Lol
Morris, huh
I don't think CA based Morris off of the morris worm
Anyway, time to try modifying minecart data!
(I did make a malware joke!)
I know the general consensus is to avoid multithreading when interacting with the game's data, but what about if I am getting info from the data and not trying to do anything to the data that is used by the game for the player?
Specifically I would want to call gameLocation.Map.RequireLayer on specific layers and then process them in new threads. What problems might come up in doing so? The only problem I can think of is that the map asset gets invalidated while another thread is processing the (now old) data, but I know how I could work around that one. Are there other problems? I've avoided trying this before, but I'm curious now whether I can try it.
If someone makes a change to a dictionary or a list while you're looking at it, it does throw an error
that would be some really unfortunate timing, but obviously that means it'll come up given enough chances to...
If you plan on redoing this processing whenever the map is invalidated in order to account for new data, I don't think that's even that unlikely, since you're probably not the only person interested in redoing things when a map changes
Can someone send the code ' thingy discord uses to make code look different than the main text?
I'm on mobile idk which it is
if you're on iOS long pressing apostrophe (') should show it, probably something similar on Android too
one for a line, three for a block
Tyy
I like tacos
Is there a way to resize the console window that SMAPI opens up? I had a recent update to my Linux Mint OS that completely messed up all of my display settings. I've gotten most of them fixed, but the SMAPI console and the SV game both are still really small.
if you mean resize it manually, it should work like any other instance of whichever terminal emulator it's using. if you mean preset it to a particular size, that should be controlled by your settings for the terminal and/or your window manager
Odd, because when I open a normal terminal, it's sized correctly based on my UI scaling. For SMAPI, both the window and the text inside it aren't scaled the same as my typical terminal.
for me when i launch via steam it always does xterm
instead of konsole
usually i just do this from cli
exec env SMAPI_USE_CURRENT_SHELL=true "$GAMEDIR"/StardewValley
you can change the default terminal by editing the smapi launch script
line 122 of the file Stardew Valley
# select terminal (prefer xterm for best compatibility, then known supported terminals)
for terminal in xterm gnome-terminal kitty terminator xfce4-terminal konsole terminal termite alacritty mate-terminal x-terminal-emulator wezterm; do
if command -v "$terminal" 2>/dev/null; then
move whatever you prefer to have use before xterm
is there a consensus on whether you should use _ or this. for private fields? i feel like underscores look cooler, but both my gut tells me this. is more clear and also i'd rather adhere to any community standards
this. is just used to avoid ambiguity when referencing members, such as around local variables, or just for overall clarity and readability. it isn't used to indicate a private member.
_ is most commonly used for private members, i think it's the microsoft standard to prefix with an underscore.
honestly with modern IDEs I dont rly see the point of using _ as prefix; whether you use this in cases you dont actually need it is personal preference
this. is more for differentiation between class field/properties and local method variables and less whether those class field/properties are public/private
I always forget they rec that 
I'm used to just seeing it in backing fields as shorthand for "don't use this one"
ig also because SDV just uses camelCase fields, PascalCase properties (mostly)
or private/public, but everything was made public to reduce reflection, etc
I forget the standard coding practices for C#. But prefixing private variables with an underscore is fairly common, even in languages like Python that don't have visibility tokens
Yall, I'm hoping to maybe finish v1 of the book mod I've been working on. Or at least, all the logic (I need to do code clean up and documentation)
I may also try and finally tackle my firework block mod. Hopefully knock something off my ever increasing todo list.
Or start my weather mod... UGGHHH THERES SO MANY THINGS I WANT TO WORK ON 
Afaik c# doesn't have a pep 008 but it does have the aging stylecop
Also the jetbrains one
Matt uses the jetbrains one
BTW, if a shop sells a crafting recipe, does the game automatically make the recipe texture?
huh, turns out I was wrong about special order rewards, if you set them to a dynamic variable it will absolutely change, it's just the reward on the board that doesn't change (what you get does though)
yes, recipe textures are an overlay of the item itself
same is true in mail rewards
Excellent
How would a C# mod add mushroom boxes to an arbitrary map? FarmCave.cs does the following:
public void setUpMushroomHouse()
{
int[] array = new int[2] { 5, 7 };
foreach (int y in array)
{
int[] array2 = new int[3] { 4, 6, 8 };
foreach (int x in array2)
{
Object mushroomBox = ItemRegistry.Create<Object>("(BC)128");
mushroomBox.fragility.Value = 2;
setObject(new Vector2(x, y), mushroomBox);
}
}
setObject(new Vector2(10f, 5f), ItemRegistry.Create<Object>("(BC)Dehydrator"));
}
The issue is is that setObject is a GameLocation method. Is it possible to convert an arbitrary map to a GameLocation? And if so, how?
you should be able to place them like a normal big craftable, I made them craftable and placable with a CP mod, it's just settings on the big craftable itself
How do I place big craftables in C#? I've never done this before π
you can't go to your map if it isn't a gamelocation afaik, so once loaded into the game your map will be a new gamelocation (and I suspect you'll ahve to put it into the locations array) so you should be able to call setobject just fine
have you tried yet?
I personally load all my custom locations, items, etc in a helper CP mod just so if there are tweaks to that process they'll get handled in future CP updates automatically, then interact with things in my c# mod
no idea if others do it that way
it looks like it worked, what didn't work?
It did, it just placed them in the wrong location (I'm fairly certain I just have to subtract the initial x and y values by two) π
oh, gotcha
just be glad stardew valley only has one "direction" for it's perspective, coordinate math when you can rotate gets real wonkey real quick π
Ohhh, trust me, I'm aware
ok, time to bite the bullet and make my new event so I can add my last special order!
That's more like it!
thats a neat skull
Thanks!
And with that, the second Lewis book is mostly finished! I just need to move a few things around and create a proper map manager class
And create a tile action for the skull
So.. if an NPC has the same entry for gift tastes in 2 different fields (say liked and disliked) I'm guessing the more favored value goes through?
I'm looking through Elliott's vanilla gift tastes in the code, apparently he has item category -79 (fruits) in both Like and Dislike?
Β―_(γ)_/Β―
Only 1 more book left to go!
I think this pseudocode here is still accurate
tldr the check order is love -> hate -> like -> dislike -> neutral, so that example should be "like" if nothing else affects it
https://stardewvalleywiki.com/Modding:Gift_taste_data#How_a_gift_taste_is_determined
Ahh, Alright
an unrepeatable special order will come back to the board until the player completes it, right? it just won't come back once complete?
Oui
Yes
The final book is done! I just have to do the following:
- Add the actual powers for the Lewis books
- Add the books to the store
- Code cleanup and documentation
so, looking at events at the farm, there are specific cordinates that are used for the front door events.
how do those work if a map moves the farm house? do these events just break?
Probably not
(I'm considering making a "as you leave the house" event like these, but not sure how to handle folks moving the farm house)
Bear in mind that players in 1.6 can now move where the farmhouse is
Via robins
Or the wizard
right, that's why I'm confused i guess, all of these farm events specifically place characters at:
farmer 64 16 2 Sam 64 18 0
So either the game looks for those and moves them at runtime if you use those coordinate sets in a Farm event, or they just break π
yeah, honestly I was expecting to find a variable or placeholder of some flavor in these vanilla events
so
the game ignores your spawn coords
you always spawn at the front door uniless you explicitly disable that'
for farm events? or if you enter those 2 coordinate sets?
for farm events
ah interesting
How do you mark a bug on Nexus as "Not a Bug"
Nvm, found it
God they make that button hard to find
[Visible Fish] OnUpdateTicked: 0ms
[Visible Fish] OnUpdateTicked: 0ms
[Visible Fish] GameLocation_draw_Prefix: 0ms
I often get OnUpdateTicked twice per draw call; that's only when the update takes too long and it skips the drawing right? π€
it could also be split screen maybe
Never did I think it would be Gift Tastes that would take so much time to do
It's a lot of work if you want to be thorough
You could just let universal tastes do most of the work for you but
Im not like that XD and will painstakingly separate out certain items
I'd say I'm being decently thorough, but man I've only done 4 characters fully and I'm already thinking "oh god this is gonna take a while"
It's also making me realize that some of these characters I just do NOT know like I never talk to them 
Oh chu, can I dm you my mead spritesheets tonight when I get home?
Oh sure
All 12 books are finally finished! All I have left to do is code cleanup and documentation!
Apparently Sebastian was very easy to come up with gift tastes for from my mod
It's finally finished! Introducing Money Sinks - Books for Dark Offerings, the next mod in my Money Sinks series! This mod currently adds 12 new books for sale, with more to come in the future!
https://www.nexusmods.com/stardewvalley/mods/46024?published=1
Yay!!
On to the next mod! I think I'm finally gonna try and make that firework block mod
@brittle pasture I'm not at my code atm, but does AHM recognize the deluxe items set up by EAC for animals for pregnancy? And if not (which I'm presuming, I just didn't test it so I'm hedging) but is there a way to set up an animal that has different harvest methods for the deluxe good that AHM will recognize?
(legit if it's just "haha enable it in the AHM and it works" I apologize, I'm just not at my computer atm to try hahaha)
if item is edible but tastes bad (-300 > edibility < 0):
why on earth is there a floor of -300 for edibility O.o
or is that only in the pseudocode
kind of assuming edibility is how much energy you lose for eating it
-1 to -299 is health/energy loss, yeah, -300 is the magic "can't eat this at all" number
"if you eat this you will DIE"
that's an interesting way of doing it
how do you add a conversation topic after an event happens
is it something like "seen_EventID"
You don't need to, the game generates one for you automatically
eventSeen_<event Id>
patch summary yourmodid
The basic unit of content patcher is a patch and not a json though, so the patch summary shows you which patches took effect
wowa
thats fine, close enough for me :3
I can manually check the patches that don't activate yet, just lowering the amount of files i need to manually check is good enough
Any C# person here happen to know a good and relatively simple example of a mod using GMCM's Complex Options for custom configuration stuff? I've never used it before but I will either need to for my next mod or just roll my own IClickableMenu, but I don't know any mods off the top of my head that I can look at to see how they've used it
https://github.com/Mushymato/MachineControlPanel/blob/main/MachineControlPanel/ModConfig.cs#L14
I yoinked this from ichor it's a texture button
I didn't really enjoy doing this so when I did disco I just rolled my own IClickableMenu and made GMCM open it through some hacks
Honestly that sounds much preferable to me
Flute and Drum blocks are considered objects. How does the game know that they can be placed?
It was mostly the click detection stuff I was unsure about
Yeah it doesn't really exist for custom options
Just a guess but they probably have the placeable context tag and then some hardcoded behaviours on top
The jank with this is that it works kind of strange in the title screen and you'll see empty gmcm behind the custom menu
Definitely has hardcoded behaviours. This is the first I'm hearing of a placeable context tag though
I wasn't able to banish GMCM completely there
"464": {
"Name": "Flute Block",
"DisplayName": "[LocalizedText Strings\\Objects:FluteBlock_Name]",
"Description": "[LocalizedText Strings\\Objects:FluteBlock_Description]",
"Type": "Crafting",
"Category": 0,
"Price": 100,
"Texture": null,
"SpriteIndex": 464,
"ColorOverlayFromNextIndex": false,
"Edibility": -300,
"IsDrink": false,
"Buffs": null,
"GeodeDropsDefaultItems": false,
"GeodeDrops": null,
"ArtifactSpotChances": null,
"CanBeGivenAsGift": true,
"CanBeTrashed": true,
"ExcludeFromFishingCollection": false,
"ExcludeFromShippingCollection": false,
"ExcludeFromRandomSale": false,
"ContextTags": null,
"CustomFields": null
},
What's with the 0ms delay 
the DelayedAction
Is that to prevent some weird GMCM behaviour
I think so but tbh i don't remember
In that case it's from the Type
Just gotta trust the chu from the past that u die without this
I trust chu from all timelines
Huh. So any objects of type crafting can be placed?
if (this.type.Value != null && (base.Category == -8 || base.Category == -9 || this.Type == "Crafting" || this.isSapling() || base.QualifiedItemId == "(O)710" || base.Category == -74 || base.Category == -19) && (this.edibility.Value < 0 || this.IsWildTreeSapling()))
{
return true;
}
Shrugs
(this is in Object.isPlaceable())
Thanks! My dinner just arrived, but the good news is that I've (hopefully) demystified everything else needed for the firework launcher and have pseudocode written for the required harmony patches.
how do i make another character appear into an event after ive already made like 50 lines
do i just do name x y direction
AHM doesn't recognize the extra drops (ie. items not in Data/FarmAnimals), but I think you can add "dummy" entries with Condition FALSE and it should work
(you can have deluxe produce with different harvest methods, but obviously they will compete with each other and the regular produce in the vanilla produce "slot". the FALSE workaround prevents that from happening while still letting AHM "see" the item))
load them all in the start but make them spawn far away
then warp them in as needed
so farmer -1000 -1000 0
yes
and then after a bit itd be warp farmer 8 22 0?
yes or whatever you want them to appear
alr thanks :3
I'll give this a try!
is wizards internal name just wizard?
It's whatever it is in Data/Characters
it is & that target asset does already exist, so I guess double-check your own NPC ID, patch export Data/Events/WizardHouse to make sure it's applying correctly, etc
weird
also when you say "isn't working" that can mean a few things... it doesn't trigger, it loads and crashes, etc
it doesnt trigger
at all
i enter the wizard house and nothing happes
happens
ah, i think i forgot a comma...
you don't need a comma if it's the only entry or last in the list.
i forgot to put manny at 6 hearts
oops
why is it trying to treat direction as continue?
does warping not have direction or
Nope
so warp farmer 8 22
That ought to work
ye, you set the direction with faceDirection right after the warp, i stumble over that all the time too lol
the world needs warpWithDirection that simply is parsed and replaces the relevant strings
grrr
i have a quick question related to my dream of having an eventlistener that listens for a specific event w/o needing to have an updateticking listener
if i had the character warp to specific unreachable spots a couple times on the event triggering map while the screen was still black and tracked if the sequence was correct, would that work?
alternatively, is there a better way to listen for a specific event w/o updateticking lol
this sounds incredibly more complicated than "make an event command" tbh
and stick it at the start of the event in question
How do you update an object after changing its sprite index? I currently have the following:
private static void checkForAction_postfix(StardewValley.Object __instance, Farmer who)
{
if (__instance.QualifiedItemId == $"(O){ModEntry.ModId}_Launcher")
{
string colorStr = "0";
__instance.modData.TryGetValue("FireworkColor", out colorStr);
int.TryParse(colorStr, out int color);
// held firework = get firework color (held). If held != 0 and held != color
var held = who.CurrentItem;
if (held != null)
{
int heldColor = Utils.GetFireworkColor(held.QualifiedItemId);
if (heldColor != 0 && heldColor != color)
{
__instance.modData["FireworkColor"] = $"{heldColor}";
__instance.ParentSheetIndex = 4 + heldColor;
__instance.reloadSprite();
held.ConsumeStack(1);
}
}
}
Everything seems to be working, even the the sprite index is changing when viewing the object with UIInfoSuite, but the object doesn't change.
Correction, LookUpAnything, not UIInfoSuite
gang I need thoughts on my mod
I'm overhauling my "Familiars" system to make them into a unique character class - not npc, not farm animal, not pet. They live on the farm, have tamagotchi style needs like food and attention, they have gift preferences, and they have portraits + dialogue. So, my dilemma:
I want to make a UI menu to track their needs and gift log, but I'm not sure if I want that UI to be accessible from the NPC Social tab, the Animal relationship tab, or... something else?
Me personally I would add my own menu tab (with Better Game Menu support if it was installed, or just require BGM) or add a button to the Animals social page to swap it to the familiar page, but still within the animal tab (and just replace that AnimalSocialMenu.cs with your own FamiliarMenu.cs)
(to clarify the last bit: i mean swap it out when the user clicks that button, and restore the AnimalMenu when they swap back)
gotcha gotcha - would that be through BGM too? I want to limit dependencies as much as possible if I can but I hear messing with the pause menu is a pain
You hear that it's a pain because it is a pain, especially compat wise πββοΈ
BGM lets you add as many tabs to that pause GameMenu as you want
or at least up to like, 20 or something
yeah might let my strict dependencies go for this one cause lolol its probably a good trade for compat
If requiring BGM, I wouldn't be messing with the Animal tab at all, I meant I'd make my own tab entirely
The animal tab thing was just if not using BGM
gotcha gotcha
You can always make BGM an optional dependency too and if they dont have it installed, just make them press a hotkey to open your menu instead
yeah I'll probably go for that, so its not a strict requirement
oh man youre right
So many options now
Honestly I forget adding on-screen UIs is an option sometimes
I didnt even know that was an option
Anything is an option with enough C#
same, totally slipped my mind
I could go real wild and do both and let the player pick through config too
(but on screen UIs is very easy C# as its natively supported by the game)
I updated my translation mod, just to spite someone who I presume is a vibe coder trying to be "helpful".
It's here: https://www.nexusmods.com/stardewvalley/mods/21317 and has no features to enable machine translations.
Had another one earlier who had updated my bigger backpack mod to add a second upgrade. Except there was no branching logic added to determine which upgrade was being bought. Rookie mistake I guess? But perhaps a mod that heavily uses transpilers is a bit much to take on then.
My translation mod can now handle files with 10.000 entries.
wow, I didnβt know there was a mod to help with translations. Might be a good thing to link to translators whenever I finally get my i18n sorted
It's dependent on GPU but 4096px is pretty safe
Does anyone know if it's possible for Content Patcher to load a different bark sound for a certain dog? You know how we have our choice of like five different dogs, but they all share the same bark sound file? Is there a way with CP to change out the bark for just one of the dog skins?
pet breed data has a BarkOverride field that accepts a (i assume) cue name
That sounds promising. Is there a place I could read more about the syntax of using that?
Thank you. ^_^
If I want to add an additional capability to the scythe, would that have to be done with a harmony postfix?
Reading up on that right now and just want to be sure it's the right rabbit hole to dive down (especially with the bolded 'should be used as a last resort' at the top of the section lol)
Harmon is perfectly fine to use. It's your only option here unless you want to make an entirely new scythe tool.
Thanks!
Is there a way to see why a patch isn't loading? Like with patch summary.
you can check if it's being applied and if the conditions are being met, but it doesn't say exactly why
Yes, the why is what I need, sadly...
what does it say?
The patch is loaded, but not applied
can you share the line exactly
[X] | [X] | [ ] | Exclusive | Include Lavinia/content.json > Schedule Dialogue (Load Strings/schedules/Lavinia)
do you have two loads to the same target?
No
you can try sharing your json
( @frosty gate can't do masked links until you're a higher level)
(I removed your timeout manually)
thanks, I keep forgetting that.
Lol Lavinia isn't loading at all... did Patch export of Data/Characters, she's not in there. Lol. I broke her file.
Wait, I'll post this somewhere else, maybe in #modded-stardew as it isn't technically modding related, sry
Imma go cry... I work very early tomorrow, so this problem must wait... thx all tho
Hi, the GetModInfoAsync API provided by smapi can only retrieve mod versions that have a UniqueID.
Is there a way to perform update checks for translation-type mods that do not have a UniqueID through smapi?
if a mod just adds an an i18n file or otherwise can't/doesn't have its own manifest.json, SMAPI just won't know it exists, as far as I know
Hm that's strange because my exports mention why they're not applied at the end in a comment
Granted I put it in the smapi log and then looked at the raw data, not sure if that changes things.
This only happens if there's a condition causing the patch to not apply (and maybe a few other instances that I can't currently remember). If it doesn't apply because of the asset not having been called yet or because the asset to be edited doesn't actually exist (like if you try to use EditData to add a schedule but you forgot to Load a blank first) then there won't be a reason listed.
Will just need to see the content and schedule jsons
Would there happen to be a simple way for me to have the game give the player a notification message if they haven't installed a compatibility patch? 
Ah cool, BETAS is already an optional dependency here so that should work, thank you
I think the formatting would be something like this with betas, for example
"Action": "EditData",
"Target": "Data/TriggerActions",
"Entries": {
"{{ModId}}_CompatWarning": {
"Id": "{{ModId}}_CompatWarning",
"Trigger": "DayStarted",
/* note the ! on the second one; this should be "true, !false" if you have the first mod and NOT the second */
"Condition": "{{HasMod |contains=ModThatNeedsCompatibility}}, !{{HasMod |contains=CompatibilityMod}}",
"Action": "Spiderbuttons.BETAS_Log {{ModId}} \"Hey you should install the compatibility mod.\" Warning true"
}
}```
though ig betas also adds a has_mod GSQ that would make it more readable
Hello! I'm pretty new to C# modding and want to make a mod that adds a buildable farm building like a pump house that passively increases the range of all sprinklers on the farm, the equivalent of giving every sprinkler a free pressure nozzle, so for example an iridium sprinkler would go from from 5x5 to 7x7, and then stacks with an actual pressure nozzle to go 9x9.
after looking at the decompiled source code I think I would need to do a Harmony postfix patch on GetBaseRadiusForSprinkler(), incrementing the return value by 1 if the building is present on the farm.
Does this seem like the right approach? Any gotchas I should watch out for e.g. with how other mods might patch these methods. This is all very new to me so sorry if dumb questions.
Are there any example mods I could look at that do something similar to learn from interms of modigying other object behavior?
There's a get modify radius for sprinkler iirc
That's probably what you want to use instead
Just bumping this now that it is no longer midnight.
Normally it just worksβ’ but there's some cases where the parent sheet index of the item isn't being used in the draw
Well first of all we need to know if this is true
Isn't GetModifiedRadiusForSprinkler() used for when the pressure nozzle is applied? How would I apply it all the time when a certain building is built?
I think the logic inside checks for pressure nozzle right, I'll have to get up n check
A long while ago i did base radius != modified radius to check for whether a pressure nozzle type thing is added
public virtual int GetModifiedRadiusForSprinkler()
{
int radius = this.GetBaseRadiusForSprinkler();
if (radius < 0)
{
return -1;
}
if (this.heldObject.Value != null && this.heldObject.Value.QualifiedItemId == "(O)915")
{
radius++;
}
return radius;
}```
Yeah there ya go
at a glance it's always used, just modified if the nozzle exists, yeah
Just postfix that 
It should be. The held item is consumed and all of the objects metadata seems to change when looking at it view LookUpAnything
So would it be something like this:
[HarmonyPostfix]
[HarmonyPatch(typeof(StardewValley.Object), nameof(StardewValley.Object.GetModifiedRadiusForSprinkler))]
public static void Postfix(StardewValley.Object __instance, ref int __result)
{
if (__result < 0) return;
if (IsPumpHouseBuilt())
__result++;
}
The thing I'm saying is go check the draw code of your thing
How do I do that?
Use 3 back ticks for code block
In the decompile
I don't really know what the whole context is atm so i don't have better answer for you
(also for code highlighting, cs or json)
```cs
your code here
```
not much, it's just javascript vs javascript object notation 
js highlights json yea
iirc it technically does more/different things with js
I see
So I currently have the following object:
And this is the object after interacting with it while holding a green fire work
Thanks, sorry I forgot
Noticeably, the firework launcher icon DOES update in look up anything
So how's this?
However, this is what it looks like in game
Ok so it's an ordinary object right
Yes
Then yeah i think it's the draw in world stuff not necessarily doing what you want
What's the goal here
You placed it after right?
The game is very insistent on fixing the parentsheetindex when you grab/place smth
Iirc
So my goal is to allow the player to interact with this object while it's placed on the ground and while holding a firework.
When this happens, the firework is consumed, and the sprite is updated to display what color firework was provided.
Finally, once the player walks by the object, it'll launch the firework (similar to the flute block)
Currently, the firework is getting consumed and the metadata being used to track the firework color is also being updated. I've yet to patch the farmerAdjacentAction though
And that will still work with the farmerAdjacentAction?
If it wasn't obvious, I'm modeling this off of the flute block π
So for this mod, I setup things such that the big craftable has a working effect
This working effect is activated by me in C# putting a bogus held item on the "machine" rather than anything player does
The point isn't to actually use machine to do all the logic, just take advantage of the working effect
In my case I used it to animate, which will indeed change the parent sheet index
Okay. I'll look into changing it to a machine once I figure out the firework logic!
Besides this you can also just leave the base sprite alone and handle the alternate sprite draw yourself
I'm still very new to patching sprite drawing (i.e., I've never actually done it before)
Could opt for a custom class via spacecore
It's no different than patching anything else
Okay!
What's a TAS?
Maybe, but I want it to immediately launch the firework
I'll most likely end up doing that if I can't get the firework logic to work.
TBF, it looks very close to what I've written thus far
Time to test it! I'm almost positive it won't work
-# A part of me is hoping I completely borked the sprite index and it just draws random textures.
AND OMG IT WORKS
Kind of
Need to fix the delay time
And something else is being very wonky
u know abour DelayedAction right?
Yes
TBH, I was expecting the game to crash
So the fact that it didn't crash, and is somewhat functional, is a big win in my book
I'm fairly certain I did indeed mess up the sprite index by not making it 0 indexed. I'm also fairly certain I need to change how its keeping track of what firework to launch
Is there a way to check how a method like. Changes after Harmony patching it? Similar to patch export with content patcher and json but the changed method instead
I do know you can Harmony log txt but I can't read it T_T I just wanna get an overview on how the method ends up looking so I can try to make things more compatible.
I modified ichortower's tater toss code so you can toss Himeko, but I removed a few features I didn't need and modified other features, and seeing as most of the code is a direct copy I wanted to avoid redundancy and find potential conflicts if it detects both being installed.
They seem to work fine together but a lot of the methods are exact duplicates (which is why I'm guessing it's fine cus it doesn't matter if they override it's the same anyway) and I wanted to see which ones I could exclude if the other mod is installed... And perhaps spot some unseen conflicts...
Im guessing the answer is no considering it would probably be stated if it exists, and maybe the only way to do that is not allowed or something, but in case it does exist I'm asking anyway, I've been known to be very unlucky when I try searching for solutions lol
For just "patches" in general, not really? SMAPI has the command harmony_summary that lists patches on each method, which might display them in run order, but I'm not sure on that part. I don't think Harmony or SMAPI offer a "decompile every patch on this" command or anything, so just finding the methods involved is the simplest option.
If you're using a transpiler specifically, you can dump all the instructions into the SMAPI log and see what the final IL looks like. It should include any other transpilers' edits if yours is applied after them, which it'd probably need to be there.
you can log the IL after transpiling it if you mean like that
Yeah I found the methods I just can't see the changes to them, so I guess I gotta guess by testing in game
There are also priorities, etc
by methods I mean the prefix/postfix/etc methods being attached to w/e you're targeting there, too
nothing but transpilers actually edit the original method's code, they just run before/after it, swap places with it, disable it sometimes, etc (afaik implementation-wise)
so not easy to just export the whole logic of it all
Maybe it'll be easier to PR ichor tbh
Yeah probabbyyy
It sounds like what you need is a way to tell tator toss to let you toss arbitrary NPC
Much easier than copying whole thing
Still i have nothing better to do while in purgatory until tomorrow
I already copied the whole thing so o just gotta figure out if it conflicts
it's still fragile to do this imo
And if ichor fixes stuff upstream you won't be able to get it 
Yeah that's why I wanted to see changes, but I'll play around with it a bit while I'm bored
A little embarrassed to be asking because of not knowing the lingo too well, but could someone explain to me what exactly "map" means in this context with a short example?
Like, how does it translate to CP?
In json land it's { }
And I write them to selph.ExtraMachineConfig/ExtraOutputs with an editData patch with this asset as target?
there's an example below that:
"Action": "EditData",
"Target": "selph.ExtraMachineConfig/ExtraOutputs",
"Entries": {
"JellyExtra": {
"Id": "JellyExtra",
"ItemId": "FLAVORED_ITEM Jelly DROP_IN_ID",
},
},```
(edit: more relevant parts )
but in abstract, the map phrasing means the asset is a set of IDs that are each connected to an item data {object}
as in "JellyExtra" to that data, etc
I feel like I've searched the doc three times for an example, where is it hiding 
thank you so much 
nevermind, found it 
I got lost going back to look for it, but yeah, one of the collapsible tabs 
hmmm.. me thinks I may have messed something up π
i don't know what you are trying to achieve but do know that it gave me a good chuckle
I'm working on a firework launcher that acts like a noteblock. In theory, it should only be launching a firework every 1000 milliseconds
instructions unclear, will now launch a firework every 0,001 milliseconds
Its launching them every millisecond I believe
The good news at least is that it is surprisingly way more fun than I thought itd be
It's a good thing SV doesn't have cops... I'm fairly certain I've launched way too many fireworks to be legal
NGL, kinda tempted to make this the mod banner
Time to flood the smapi console to see what's going on
are u animation-ing?
No
just firework until the mod work?β’
AAAAAAAAAHHHHH
Hate it when that happens π
loaded a wrong save once, reality collapsed (game crashed)
Yall, I think I may have found the issue
Ahh, I see... I'm providing "TotalGameTime.Milliseconds" instead of "TotalGameTime.TotalMilliseconds"
Fixed it!
π
the game always refs ElapsedGameTime.TotalMilliseconds or ElapsedGameTime.Milliseconds, fwiw (no idea if there's any difference there, I haven't had to think about it in a while)
TotalMilliseconds (at least that's what it does for note blocks)
yeah, I just mean the elapsed property
a few do use both sub-properties for w/e reason
...oh, I see it does use .Total.Total everywhere too
I'm used to seeing Elapsed but ig it's all about the same
Time to try patching the draw function. If that doesn't work, then I'm gonna go down the machine route.
Then all I have left to do is:
- Define a crafting recipe
- Make the recipe available at the casino
- Run from the cops
I've launched way more than enough fireworks at this point to destroy a small community (I may or may not have spent far too much time playing around with the launchers when they were launching every millisecond)
I'm getting the following error:
[Firework Launcher] Mod crashed on entry and might not work correctly. Technical details:
System.Reflection.AmbiguousMatchException: Ambiguous match in Harmony patch for StardewValley.Object:draw
when trying to do the following:
harmony.Patch(
original: AccessTools.Method(typeof(StardewValley.Object),
nameof(StardewValley.Object.draw)),
prefix: new HarmonyMethod(typeof(Patcher), nameof(Object_draw_prefix))
);
if overloads exist for a method name, you need to specify its argument types after your nameof(... argument
e.g. here where I target something that takes a Furniture as its arg
Monitor.Log($"Applying Harmony patch \"{nameof(HarmonyPatch_BedPlacement)}\": postfixing method \"GameLocation.CanPlaceThisFurnitureHere(Furniture)\".", LogLevel.Trace);
harmony.Patch(
original: AccessTools.Method(typeof(GameLocation), nameof(GameLocation.CanPlaceThisFurnitureHere), new[] { typeof(Furniture) }),
postfix: new HarmonyMethod(typeof(HarmonyPatch_BedPlacement), nameof(GameLocation_CanPlaceThisFurnitureHere))
);```
I did try that originally, but it wasn't finding a method (I'll double check to make sure I wasn't passing the wrong arguments)
optional arguments need to be included there iirc, among other pitfalls
@brittle pasture Sorry for the ping, but is it possible to use EMC's ExtraOutputs asset with multi-flavored items?
It compiled! I must have messed up the parameters. I just hope I'm patching the correcting override
Wrong override (probably)
Yknow, something doesn't look quite right. Can't put my finger on it though
strand of grass in the background
add a config option for XTREME OVERCLOCKED FIREWORKS?
yes, just repeat what you'd do for the primary output
I was trying to debug my overload patch the other day for about an hour, turns out it was using the system vector2 instead of the xna frameworkβs π€¦ββοΈ
Ugh the same method that's supposed to do almost the same things but requiring different use of them is the worst
You often don't figure out which library or package or whatever is the culprit until it's too late
I think I may have miscounted the number of parameters iirc
And system just adds random ones in sometimes π like no go away
Or when a tutorial or guide doesn't tell you which to use... And they don't have a GitHub... So you don't even know there's two different packages...
How do I fix this? (Ignore the price, I forgot to add a zero).
The recipe is as follows 388 25 390 25 335 1/Home/{ModEntry.ModId}_Launcher/false/null/
Still not working. I currently have the following:
// Editing Objects
data[$"{ModEntry.ModId}_Launcher"] = new ObjectData()
{
Name = $"{ModEntry.ModId}_Launcher",
DisplayName = Translation.Get("Launcher.Name"),
Description = Translation.Get("Launcher.Description"),
Type = "Crafting",
Category = 0,
Price = 100,
Texture = AssetPath,
SpriteIndex = 4,
CustomFields = customFields,
};
// Editing Shops
casino.Items.Add(new ShopItemData()
{
Id = $"{ModEntry.ModId}_Launcher (Recipe)",
ItemId = $"{ModEntry.ModId}_Launcher",
Price = 2500,
IsRecipe = true,
ObjectInternalName = $"{ModEntry.ModId}_Launcher"
});
Fixed it!
Hey, I'm trying to add a simple 16x48 PNG to the town map so it shows in all seasons using Content Patcher.
It's not appearing with EditMap or EditImage. Any help with the correct setup would be great!"
!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.
!log and your log as well
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.
Blam! The firework launcher mod is finished! https://www.nexusmods.com/stardewvalley/mods/46051
... Does, does this mean that I can play SV today?
vr
nicee
I think Ive seen some video of the vr gameplay
could be from you as well
OH DEAR GOD, PENNY IS MASSIVE
probably, I've posted about it before
what headset do you use?
Share da wisdom we can pass on
It's the name of the crafting recipe entry, not the name of the item itself
Currently a Quest 3S for PCVR using Virtual Desktop. In the past I've also used an HP Reverb G2, and the original Oculus Rift.
Steam Frame when
I use quest 2 with the wifi link thing, really hope to see the mod one day!
is everything fully renders inside of the game engine sdv uses?
I never thought to see 3d in a stadew valley
It's a cool concept, but I can't. Just something about it makes me queasy π
Also, tall penny is very intimidating
I have a dedicated router hooked up straight to my PC for PC VR, since it going through the household router causes lots of latency (headset -> downstairs to router -> up to PC -> back to router -> back upstairs to headset)... and also crashes any other streams people do, like Zoom meeting (guess how I know)
dizzy
Yeah, like Sasha said, it's a billboarding thing. Villager billboards are also scaled up by 50%, since they were way too short otherwise (ex. Penny comes out to less than 4.5 ft or something if I don't)
2d sprites in 3d environments gives me so many nostalgia feelings of 90s adventure\rpg games
Eventually I want 3d models for everything, in which case the sprites will only appear if someone has modded items or something
I think the 2d sprites have a certain charm personally
obviously works better for certain sprites more than others
Yeah, things like buildings are just not practical to stay as sprites
not how the curse works
Things like that are the first priority. Also NPCs (because of some animations being tied to facing direction in 2D)
kiss me... not the air to your side...
There is a third person mode too, so that would probably look okay with the billboarded sprites (from the correct angle)β¦
I expect it to look less uncanny once not everything is a billboard
And the locations are more filled out with the proper decorations, etc.
I just spent a while adding on to an npc's house until I remembered that you can't expand to the map to the left 
(It was a pre-existing npc dwelling, ofc. It would destroy a ton of schedules)
work wasted lol
hmm
mines pc is connected physically with a cable and I use link cable or wifi on the headset to connect
wifi ones has almost no latency but depending on the signal it lowers the quality of the image
for a moment when it happened for the first time I though my eyes gave up on me
the dark borders of the negative world.
Jokes on you, I was able to play SV for a solid 2 or 3 hours! ... And now I want to work on a super secret update for my books mod 
So you aren't going to keep giant penny?
All NPCs will have a proper animated model. Eventually
How would a C# mod spawn monsters on a map?
...I have a script I use for Console Code for that exact purpose (including in that VR video), hold on
for ( int i = 0; i < 8; ++i )
{
float dir = (float)Game1.random.NextDouble() * MathF.PI * 2;
float dist = (2 + (float)Game1.random.NextDouble() * 4) * Game1.tileSize;
Vector2 pos = Game1.player.StandingPixel.ToVector2() + new Vector2(MathF.Cos( dir ) * dist, MathF.Sin( dir ) * dist);
pos.Y += 8 * Game1.tileSize;
StardewValley.Monsters.Monster m = null;
switch ( Game1.random.Next( 3 ) )
{
case 0: m = new StardewValley.Monsters.GreenSlime( pos ); break;
case 1: m = new StardewValley.Monsters.Bat( pos ); break;
case 2: m = new StardewValley.Monsters.RockGolem( pos ); break;
}
m.health.Value = m.maxHealth.Value = 100;
m.damageToFarmer.Value = 0;
m.resilience.Value = 0;
Game1.player.currentLocation.characters.Add( m );
Console.WriteLine($"spawned {m} at {pos} {Game1.player.StandingPixel}+Y8 {dir} {dist}");
}
BTW, in case I forgot to mention it, I do genuinely think your 3D SV is impressive! It's just probably not my cup of tea π
Spawns slimes, bats, and golems centered around 8 tiles south of the player. All with 100 health, no defense, and can't hurt you
Dope. Thanks!
Yeah that's fair, I don't expect it to be for everyone. I'm literally making this because I couldn't find something similar I was happy with in VR. (I found one game that's similar, and that's it)
Fair! Most of the mods I've made have been primarily for myself π
wawa
It's really funny to me that my second most downloaded mod was made to help with something I barely even do in the game.
I forgot about this mod and definitely need to get it when I make a full "pretty farm" for demo purposes
(I've been occasionally working on one manually. It's a pain)
It would be nice to just get that working normally in VR too...
Once the mod is ready and out, I'm willing to help anyone foolish brave enough to add support for their own mods.
I'm aiming for it to be relatively easy for anyone who does want to.
There's technically no API yet, but a bunch of things should be Pintail-able already
Like the game mode system, or the cursors used to control pointing/interacting
(I'll be adding a simple no-hard-dep-needed method for getting what is currently selected by each cursor, too)
(Including objects / animals / terrainfeatures / etc., and more permanent stuff like tiles or walls)
Is there a source detailing the stats of each monster in the game?
Data/Monsters should have it I think? Can't recall if it's a data model in 1.6.15 or not though
(Also, fun side fact: the VR mode technically supports dual wielding.)
What about triple wielding?
...I could very easily allow equipping an item to your head in the same way that the off-hand does
And just double checking, creating a new "DinoMonster" instance would use the default stats in Data/Monsters unless overriden?
Yes, and passing a name in to the constructor for most monsters will use that stat block from the file instead
Dope
All I would want is access to the controller positions, some way to float UI elements in the world, and controller pointing coordinates.
I'm pretty sure it would be fairly simple with those! 
is it weird for a mod to include a copy of spacecore in its files as dependency?
No
that sounds like they didnt build it properly lol
Unless you mean copying spacecore in its entirety
Menus floating in world is semi implemented already, and I plan on making easy ways to make "UI-less" menus (like the forge or sewing machine) as well (for VR purposes)
That is very weird yes
like they didnt exclude the dll from being included in their csproj
Very weird, but an easy mistake to make
so it got copied over
I do it sometimes too
if they were hard referencing spacecore and didnt know it could happen
how could I fix it?
you have to have their source and fix their csproj
Wait, so are they including the entirety of spacecore, or are they just including it in their manifest as a dependency?
its a build problem usually
now if it was like, spacecore manifest.json and all
then they prob just dont understand that u should use dependencies by asking ppl to download it 
nah no manifest, just the dlls
I'm seeing on taking over this mod and well... there's that lol
I seriously think Smart Building would be easy to port once I'm ready. Depending on how intertwined your code is, of course
which mod is it in particular?
skill prestige
Godspeed young'n
Essentially mapping the slots and buttons of the UI to parts in 3D space or something?
I tried to modify skill prestige for my own personal use before learning about mastery extended
Yeah, though what already somewhat exists is literally just the menu floating in the worldspace and you interact with it via pointing + buttons
Time for dinner with parents for mother's day, ping me with any followup questions
heres how u r supposed to do it https://github.com/b-b-blueberry/CooksAssistant/blob/master/LoveOfCooking/LoveOfCooking.csproj#L29-L32
if u had to hard ref spacecore (likely when it's a skill thing)
Aren't skills entirely doable via its API
Iβd definitely be interested- it seemed like theyβre voxel-ish textures from the example of the tv you showed? How does it work?
no iirc there's a bunch of stuff you gotta subclass
not entirely... if you want to add a skill yes
but prestige needs to access the professions which aren't accessible
Interesting
tbh it prob could be done if we refactor all of it to interfaces?
i dunno tbh i never made a skill
Who is we
royal
(Okay no dinner yet, sitting in car on the way)
The nexus page doesn't show any requirements, does it not need anything else (besides SMAPI, I presume?)
idk who we is either, but I support their initative to getting this done 
i vote we scope creep pathos on this
Theyβre just .gltf model files that get loaded. Things that donβt have a model are billboards, like for most things you see there.
Locations are a bit different though. No gltf information, itβs information in map properties and new tile layers that you can patch in even with content patcher.
There is a location editor to make the relevant patches, because making them in Tiled is tedious without a proper visual for it
Oh and the TV has special support so that it actually shows on the screen, but it is super easy to reuse that for any TV
Planned for the 1.7 release (as well as plenty of other cleanup)
was there a period of sdv modding where smapi had the concept of mod provided api but no pintail yet?
i was kinda wondering cus CP docs were also talking about how u had to hard reference ContentPatcher.dll (this is no longer true)
Yes, but it was much more limited
Well afaik its conditions API isnt available via Pintail regardless
Idk what that is sorry, but it is a 3d model that has to be made right?
Pintail was written by Shockah specifically to make us able to do more, if I remember right
Yes. Gltf is a specific 3d file format
i thought u just need to copy the relevant IConditions now 
at least it worked when i tried
Yayy awesome
Before the pintail support, the interface thing was doable, but not recursively.
And before that, you basically had to hard reference. Which was how it was when I wrote the skill API
You also couldnβt do custom enums and some other stuff in that initial interface impl
I mightve misread it from that same hard reference mention tbh
How would a C# get a map by name? I'm trying to spawn monsters on a specific map
theres a helper on Game1 something get location
i wouldnt actually get the location like that though\
for mp reasons, i would spawn the monster only when player enters the location
prob wanna clean them up when all players leave too
A) What does mp mean?
and
B) Yeah, this is currently strictly for testing purposes rn
multiplayer
Ah. Gotcha
for testing it's still easier to just
make a Warp get and check the new location
if u need something just to spawn monsters there is a debug console command
I gtg, dinner's here. But thanks for the help!
Hey guys, I have a quick question. Is there any reason development-wise as to why there are not many mods that seem to overhaul mines or add new monsters or fish to them? Are the mines a location that is hard to code things into or modify?
its annoying yes
but i know someone is making one 
Why is it annoying?
well the mines dont really exist as actual locations
they r transient places made by game
other jank include the lv100 fish hardcoding
I wish mines and volcano wasn't that hardcoded
One day Iβll continue my old prototype of a mine replacementβ¦
many mods choose to just make their own dungeon-esque places
(One day = after the 3d mod at minimum )
instead of touching vanilla mines
sdv 1.8 update with 3d graphics
TL;DR hardcoded :(
basically from what I've gathered
1.9 full vr and body tracking support
I know that is a problem for cutscenes, but is it a problem for fish, monsters and ores?

I have one mod that makes things you place in the mines persist across days, but itβs pretty unknown
Because for cutscenes it makes sense - base game Stardew valley doesn't play cutscenes IN the mines, but there are fish, monsters and ores in them.
This is a mod not official content thank you
So I wonder is that a thing that can be modified to add new content in them?
ikk its just sillier this way
there are mods that add new nodes there
for example
and VR is day 1 for it, and maybe the body tracking too if I have something to test with by then
since we are in #making-mods-general though it's prob more useful to ask what you wish to do
(I backed the FluxPose trackers, so probably that if it does deliver through)
I'm just interested in creating new monsters, ores and fish to populate the mines.
I was also considering adding Marlon cutscenes for when you reach treasure levels (that play on those), but those seem much harder to do.
new monsters is own can of worms
<flashbacks to Monsters: the Framework>
ore can be done with like 3 different frameworks, fish might be doable if you don't want to replace the existing ones?, monsters are a pain
New monster variants will be easier in 1.6.16 I think?
but ftm can add monster at least, as long as u dont need anything special out of them
(FTM can do that soon, but the beta's not ready because I haven't been able to work on it for like 2 months again
)
New ones entirely with custom behavior, not so much
(Unrelated but did you see the crimes against codemanity I posted earlier)
FTM 1.x limitation is that it spawns stuff at preset times or start of day, so if nobody happens to be in the level at the right time, new monsters won't spawn
this one covers more than just mines but it does lean in that direction
fish i wanna say the 20 and 40 ones r just underground mines whatever right
might need to be more specific, I forget 
I have events playing on floor 20, 60 and 100, I just use content patcher but sdv wiki mentions something funky with the mines fish which i cant remember off the top of my head
i forget if 100 is literally eels only
100 is eels and trash i think
or if u just cant not have eel
eels and trash π
I wonder if level 100 pool will ever have volcano lava and not some red water
cuz I suppose it was lava back then
Actually, what I was thinking of doing would be slightly more complex
I had the idea of as soon as one would reach the last level of the mines a cutscene would activate that would allow new creatures, mobs and fish to spawn in the mines
Like a Terraria Hardmode type of thing
oh, no, really nice progress
I saw the convo but not the video link
And through The Unlockable Bundles framework, I would gate progression with mob drops/other items obtained from these new things that spawn
Though, I have not looked deeper into it
does that work now?
it did use to complain if there wasn't a hard reference, which is why FTM does that and hard-requires CP
i think so
i tried when i was updating docs for pathos
like instead of hard ref go copy the interfaces 
could do it fine with a when condition on the patch, unless you want it to trigger same-day
I'll make a note to try that, haven't touched the old ftm pack format in a while
This one seems to utilize: https://www.nexusmods.com/stardewvalley/mods/32241
yea i wrote it
Which is only a reskin of monsters

yea thats what it do, but u can alter drops too
goes back to "custom monsters is also a pain, independent of mines being a pain"
Can I somehow detect if the killed monster is a specific variety and then replicate a loottable to drop items?
thats what it does

bog/aba uses this a lot in monster mash because they got a sort of shiny hunting find the rare skeleton deal going on
Is there a framework for adding new fish that I could use for adding new fish into the mines?
If I recall there was one of the "new fishes" mods that added new fish into the mines.
You can add fish with just content patcher for the most part, I think
yea i think floor 20 and 40 just gets the fish from the undergroundmine entry
Are the floor levels separate locations with a name?
not really
No I meant the ones with fish
the answer is still not really
Cool π
they only have 1 set of location data (undergroundmine)
technically UndergroundMinefloor number here, but yeah, they probably share a Data/Locations entry
(probably in that I don't touch that stuff)
but u can use gsq to check the actual location name
which is actually different despite 1 data 
there is this extremely niche framework too
should do exactly what it say on the tin
Very specific name
that should indicate how hardcoded it is normally 
I think EMP can also make the mine get fish from somewhere else entirely, but using that to add new fish would be even more convoluted 
well map editing does work normally too
this mod just edits the actual tmx map with the big spiral
emp which lets u do fish from tile data can work that way
So see, it's nice that we find all of these frameworks, but I'm wondering whether it is possible to gate progression by not spawning these fishes/monsters before X true/false boolean variable equal is of a value?
Which I don't think might be possible with some of these frameworks
i have no idea but their desc doesnt say anything
you can always write your own C# tho 
Yeah, that's what I'd like to do.
sometimes the problem isnt "it's hard" and more that it's too niche for anyone to bother
you can do anything in C#
Okay, neat
only thing really stopping u would be compat concerns
looks like the minefish framework doesn't do conditions, since it's not a CP framework
EMP does since it's data asset or* map properties, but yeah, only handles redirects and not a specific list of fish
i think if u feel committed to it
This one adds new fish to mines
But it doesn't seem to use any frameworks to do so
just MineShaft.getFish prefix and then redirect to undergroundmine<floor> from Data/Locations (if it exist)
but i think doing append to undergroundmine fish list will become sufficient once we get that GSQ which let u check current floor 
-# something something even absurd/silly things Iβve already talked about way too
(as long as you dont mind inability to remove lava eel or whatever)
No, I do not mind
yea then i'd just try this for now 
MNF does this in just CP, like chu was mentioning
"Target": "Data/Locations",
"TargetField": [
"UndergroundMine",
"Fish",
],
"Entries": {
"MNF.MoreNewFish_barreleye": {
"Id": "MNF.MoreNewFish_barreleye",
"ItemId": "(O)MNF.MoreNewFish_barreleye",
//etc```
its better to know what will work and wont b4 diving into the spaget
But this fish in specific, is it tied to a specific floor level or does it spawn everywhere in UndergroundMine? Because I don't see any numbers that tie it to a specific level.
UndergroundMine only has fish that are available all level yeah, looked into all the jsons myself and there are no specific floors, nor is icepip, ghostfish or lava eel there
gotta add in C#, unless adding like. a new "custom location" works
i think we should prob walk a few steps back first 
you know how fish works for normal locations right
im also surprised that the map this long doesn't have a guaranteed ladder like some floors have
so annoying
MineShaft::getFish perhaps
there be a location whose name might be Woods let's say
and in Data/Location there's a entry for Woods, that have a list called Fish
the thing about mines is that even though you are going from floor to floor
there is only 1 Data/Location data entry called UndergroundMine
any CP data edits can be conditional on location or various other things, and iirc each fish data entry can have optional conditions individually
(gotta run though, defer to chu & company for practical advice)
however, the thing in Fish is a type of item spawn data
and it supports the use of Condition (game state queries) to control whether the fish will appear
this combined with quirk that mines do get different location names means you can do LOCATION_NAME Here UndergroundMine20 to know ah im on floor 20 allow this fish
more new fish didnt do it probably just for design reasons i wouldnt know why 
Oh, I understand now.
in 1.6.16 there's a new gsq LOCATION_MINE_LEVEL that checks for a level range too
this would make it easier to add a body of water on some floors and then say ok floor 20 to 30 has this fish
i plan on backporting that MMAP it if u need it now
MMAP?
another framework of mine
https://www.nexusmods.com/stardewvalley/mods/28423
its not that relevant to the fish talk, but my friend asked for LOCATION_MINE_LEVEL for their wip mod
I think it could definitely help out just for adding specific monsters/ores/fish, so I wouldn't mind.
Could be helpful.
yea and when we get 1.6.16 u can just stop requiring it 
LOCATION_NAME Here UndergroundMine20 will work in .15 though
so if u r fine with write LOCATION_NAME Here UndergroundMine20 UndergroundMine21 UndergroundMine22 etc it should serve same purpose
I suppose it'd help if I were actually calling the function I'm trying to test
Strictly hypothetically speaking, how would one remove all monsters from a certain location?

Even more strictly hypothetically speaking, making sure monsters despawn at the end of the day so that you aren't bombarded with one million enemies once you hypothetically reach ginger island
I mean there's the killall command if you want something manual https://stardewvalleywiki.com/Modding:Console_commands#killall
I was kinda hoping to add this to OnDayEnd
no idea then 

yes just smapi
and sdv, and an os, and a computer
and electricity
Journal:
Title: The Great Attack of the Dinos
Page 1: This may be the first and last page I write. I was helping Leo with the parrots that kept eating the pineapples he was growing, and suddenly....these dino's came out of the grass, and were barricading me! I'm lucky that I got out of there alive.
Page 2: It's been some hours now, I- wait, I see another dino, hey why is it coming clos-
Player Tip: Hmm... the rest of the page seems burnt, maybe I should investigate the area
er what was it I should put on unofficial updates so the versioning doesn't get all messed up if the original author comes back and uploads a lower version number? 
just "Version": "1.5.0-unofficial" ?
follow unofficial with .1-Mangupix or similar
https://github.com/Pathoschild/SmapiCompatibilityList#unofficial-updates
ah thanks, that's the page I was looking for 
My Lazy Days mod just got updated to version 1.1.0! It now includes extensive configuration options, including the ability to easily enable and disable the mod whenever you want!
Lazy Days is a game mechanics overhaul to remove time pressure from the game. Is the clock stressing you out? Then give this a try!
https://www.nexusmods.com/stardewvalley/mods/45025
-# do you want it showcased?
I'd love that!
done
I'm really excited about this update. Literally everything in the mod is configurable now, lmao.
Oh that reminds me I have to write an article that was βcoming soonβ LOLOLOL
Mot authors are more likely to read a mod page's articles ... Right...
nexus articles? what's that /jk
honestly, can't say I've ever read anything in the article section though
wouldn't rely on it too heavily for super important stuff
I generally look there if I can't find the information I need on the page
I JUST HAD AN IDEA
yea usually I look for a github link on the main page... and it's been there every time so π€·ββοΈ
or if the page says they put something in articles
WOAH, MY NAME IS RAINBOW?!?!
U talk lots
That's the role for being chatty yeah
woah, they evolved
Yall better be careful about talking to Bill
hi fellow rainbow
Hi!
I'm kinda tempted to begin hiding super vague and mysterious lore in articles
-# And I think I know who the lore would be about...
#Stardew-ARG-When?!?
BRB, gotta write an article
pufferduck...
Hello fellow modders! Does anyone know how to add multiple conditions to a mail flag for a trigger action? Or is there a better way to make the game go "if this and this is true, do this"?
thats cursed
Errr I think you can just put them in the condition field?
DO separate them by commas
Thatβs what I do
You could also add a when condition on the patch but for a trigger action using the condition field should be fine
Do separate the GSQs by commas
Oh ok I wasnβt sure if it was or wasnβt 
When do you not separate by commas? I thought there was a case for that but I canβt remember
for AND*
"{{ModId}}_ShanexRosalieBFFFlagTrigger": { "Id": "Shane x Rosalie BFF Flag Trigger", "Trigger": "DayEnding", "Condition": ["PLAYER_HAS_SEEN_EVENT Current {{ModId}}_ShaneRosalieSneezeEvent", "!PLAYER_HAS_SEEN_EVENT Current {{ModId}}_Rosalie6HeartEvent", "PLAYER_HAS_HEARTS Current {{ModId}}_Rosalie 6" ], "Action": "AddMail Current stardewaly.rosalie_ShanexRosalieBFFFlag now" }
cause I had it like this and it didn't seem to work
I don't really think there is a case
Scratches head
condition is only a single string
There isnt, unless the query youre using accepts multiple arguments and treats them like an AND, but it still wouldnt be incorrect to use commas instead and just write the query twice
"Condition": "PLAYER_HAS_SEEN_EVENT Current {{ModId}}_ShaneRosalieSneezeEvent, !PLAYER_HAS_SEEN_EVENT Current {{ModId}}_Rosalie6HeartEvent",
BOOM...
... It begins
and I dont think any vanilla gsqs work that way anyway
If you do 'any of these conds' then you can do it without commas like this
"ANY "ITEM_CONTEXT_TAG Target unread_book" "ITEM_CONTEXT_TAG Target fiction_book read_book"",
that is not an AND
Mayhaps I read any as and
Yeah but it is a case of not using commas
wem asked for AND though
Memory fickle
okay! if I already have an event with the precondition that the player received the flag when the conditions are met, then what should I have the letter say for the action? Should I make it say nothing since the flag has been recieved and that's all that needs to be done?
i don't want it to actually "say" anything since it's just a flag
If you send the letter straight to the "received" inbox it skips the mailbox
They wont get an actual letter
thank you! should i use the null command then so it doesn't do anything but just exist?
No, just send the mail flag to that inbox
I have a command named after me?!
Instead of now
AddMail Current stardewaly.rosalie_ShanexRosalieBFFFlag received
double check my spelling of received
okay! but for the flag itself should it have anythign in it? Because I do need to make a "letter" for it to work
you dont need a letter
Naur
You send it to the received inbox. It counts as being received but skips the mailbox. The player will never see it
I tried it without one existing and the game told me that they couldn't send the flag because the letter didnt exist
You do not need anything in Data/mail
Two questions.
- is it possible to set overlays to have certain ones load after? Say an eye color overlay apply before glasses overlay (I know dumb as easy to combine those, but bear with me)
- If 1 is not possible, just to double check, I can have an overlay trigger only if two configs are set correct? Say for overlay delta to apply, both X and Y need to be marked yes in configs
Within your own mod, excepting any priority differences, your EditImages are applied in the order you have them in your json
for 2) yes, assuming you mean your own config settings & not a third-party mod (though there's a cross-config mod for that), just check both tokens in the When conditions for a patch
thanks for the answers Button and Esca. We shall now see if I am smart enough to put options in order or if I need to use the more cumbersome, but fool-proof option two.
You can also lean into priority and just make the 2nd one apply Late
Question!! I have an event that depends on whether or not my NPC arrived before or after Shane's 6 heart event. What should I put in for the "$query" or is there another way to signal to the game which dialogue to use?
follow up, how do I make my NPC invisible before conditions are met?
would that cause slow load times for people? If I had to choose an evil due to my own lack of skill, would it be worse for players to have a larger mod or however much slower loading?
Late doesn't mean Slow
It's just order of operations and game will always apply all edits to an asset
Do you mean that your event shouldn't happen until Shane's 6 heart has or that your event will happen either way but different things will occur within it depending on whether Shane's 6 heart has been seen yet?
For the invisible NPC, do you want invisible or not yet unlocked?
The second one, and Not Yet Unlocked
-
Okay, and is it just one line of dialogue that you're changing? If so, it'd be
$query PLAYER_HAS_SEEN_EVENT Current <event id># <true> | <false>(if you only want to check the current player - change Current if you want that to be different). -
That's the UnlockConditions field in Data/Characters. You put a GSQ in there.
-
Oh! Sorry I misread it! It would only occur if the player has seen his 6 heart event. It just depends if the NPC has arrived before or after the player saw the event. (for context, if the NPC arrived before the 6 heart scene occured, the NPC says "I wish I reached out sooner" but if she arrived after Shane's sobriety she says "I'm glad @ was there to help."
-
would that be for a token?
Is stardewmodding.wiki.gg a good website to use for modding documentation step by step walkthroughs or are there better places?
Yes but the stuff there tend to be specific guides
You'd want the main wiki modding namespace for basics
!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.
-
I think there are two checks here then? First is whether the player has seen Shane's 6 heart event, which would be a precondition in the event key itself. Second is inside the event itself you need to check when your NPC arrived. That one is harder. What is the condition that controls when your NPC arrives?
-
I'm not quite sure what you mean. Would what be for a token?
- Right now I just have it that the player is at 1 heart with Gus but that's temporary. Then a cut scene starts with him getting ready for her to arrive.
I do have a dialogue for her for after Shane's 6 heart event (CA didn't make it a CT but characters like Jodi comment on it)
- Sorry I wasn't sure where or how to put it in for her arrival (it's been a while since I worked on her basics like her personality so if it's there I'm sorry!!)
- Okay, well, I think what you'd need to do is put a check into her arrival event (or dialogue or something if you're not giving her an event) to see if Shane's 6 heart event has already played. If it has, set a mail flag. Then in this later event, your query would check if that mail flag was present or not. That's the main way that I can think of to check that, since you won't be able to check at the time of this later event whether she arrived before or after Shane's 6 heart event.
(All events create CTs, by the way ^_^)
- You put it in the field
UnlockConditions, like I said, and as for what to put in there - well that depends on what you choose to have unlock her. It needs to be a GSQ and which GSQ you choose depends on what you want to have determine when she arrives.
Okay thank you so much! β€οΈ (the CT for Shane's 6H event wasn't found in the Wiki or anywhere I could find it I had to look at Jodi's dialogue directly so maybe it was missing from the list, at least last I looked! )
It isn't listed because the dialogue page explains how CTs are created rather than listing every single CT. There would be so many CTs if we were to list all of them, not to mention that every mod that adds events (or many other things) causes the game to auto-create CTs for them too.
Are the auto generated CTs all 3 days
Wiki says 4 days
yeah, 4 for generics, though some of the specific ones use various custom durations
https://stardewvalleywiki.com/Modding:Dialogue#Conversation_topics
Just to double check, if the both option is selected for these two outfits it will be a 50/50 for which beach outfit loads correct?
"{{ModId}}.Penny.Beach": {
"Id": "{{ModId}}.Penny.Beach",
"Sprite": "Characters/Penny_Beach",
"Portrait": "Portraits/Penny_Beach",
"When": {
"Penny Beach Skin": "Beach, Both"
},
"IsIslandAttire": true,
"Precedence": -11000,
"Weight": 1,
},
"{{ModId}}.Penny.Snorkeling": {
"Id": "{{ModId}}.Penny.Snorkeling",
"Sprite": "Characters/Penny_Snorkeling",
"Portrait": "Portraits/Penny_Snorkeling",
"When": {
"Penny Beach Skin": "Snorkeling, Both"
},
"IsIslandAttire": true,
"Precedence": -11000,
"Weight": 1,
},
Lavinia is back, if anyone wondered. I accidentally (I do not know how) removed her Include entry where the Data/Characters edit is....Due to complex legacy reasons, the Data/CHaracters edit lives in a different place than the Load Portrait, etc. Anyways, A Interesting Lesson: it appears that if a character has a portrait loaded, they on some level exist, even if they do not exist. There are likely cunning applications for this.
I just had the stupidest silly idea ever but I regrettably lack the skill to make it.
Solve ALL the Problems... With BUNDLES.
Fix WIlly's Boat? Bundles
Solve the Wizard's Mairrage problems? Bundles
Golden Walnuts? Who needs 'em? We got Bundles!
Bundles
random question
is it possible to force grandpas farm to give the farm expansion
mainly for planning reasons lol
i figured it out
In concept, yes. But you can't use When with the appearance data. You'd need to use the Condition field with GSQ.
Does someone know how to change the output folder for a C# mod made with Visual Studio 2022? It seems like the Pathoschild NuGet just overrides the output path, but because my mod does contain a bunch of content packs as well, the output needs to be one folder deeper and I can't figure out how to do it XD If I put the path into Output Path, it puts something else in the folder, but not the dll and manifest files
does someone know how to like overwrite the forced output Path or something? Or whatever would fix that? XD
As for now, I am just manually moving the files into the right folder which is... quite annoying XD
Are you using this