#making-mods-general
1 messages · Page 110 of 1
the action would be determined dynamically by the game state (e.g. health/energy low -> eat, ladder found -> only mine/fight when necessary and move to ladder, fight only if a monster is within a certain range, mine otherwise), ideally it can perform an action on every tick, without performing unnecessary checks on the game state (thus the isFree check going before the rest of the checks that determine the next action)
I'm looking for a way to get Look Up anything to dump the data that it grabs from the game on start up or whatever into a file that i can easily organize/reference so I can make a massively modded gaming bible thing so to speak so that way I can finish my guide without getting distracted and playing the game when I'm meant to be workin on the guide thing lol (I have 0 self control when it comes to playing my modded stardew except right now when I don't wanna update mods lmao)
That being said... if this is a TAS tool then actually waiting for the animation to end is not ideal for a TAS because you can animation-cancel much sooner (unless it's explicitly supposed to avoid animation cancelling as a strategy, but... that's accepted even in human runs).
ideally i'd want to include animation cancelling as well, no idea yet tho on how to check for the timing to perform the animation cancel, so for a first running test i would do it without animation cancelling
(For context, I'm fine with anyone helping them customize the Lookup Anything code for what they want; it's all available under the open MIT license.)
Well, they are going to be completely different implementations. With animation cancelling you want to not wait until the player is free, instead wait until the "effect" of the animation has happened, which is very specific to the action being performed.
!commissions
If you're looking for people who do mod commissions (either art or code), here's a wiki page with a non-comprehensive list of people who do them: https://stardewmodding.wiki.gg/wiki/Stardew_Mod_Commissions
I suppose it's fine to start out without cancelling, but to add it later, you'll end up having to throw away whatever code waits for IsPlayerFree and start over.
yeah, that latter part is why i decided on doing it without animation cancelling first to have an overall construct of the mod
i mean, it's not technically code waiting for isFree, rather an if checking if the player is free with an early return if the player isn't free
There's other stuff, like frames at the end of the warp during which you can't move (game still considers farmer busy) but you can bring up a menu to pause time.
that if would be replaced with the logic for animation cancelling later on, if i can figure out how to do that part
If this were a regular mod then the original advice (Context.IsPlayerFree and/or PerformActionWhenPlayerFree) is exactly what you want. But for a TAS, it's actually kind of the wrong way to be thinking about it, since so much of Stardew's speed strategies involve abusing the game's inconsistent detection of "busy-ness".
yeah, i will worry about the tas specific speed strats later on, for now the overall concept needs to be working first
So if you are just trying to sketch it out and fill in the "real" strategies later, then I would take the dumbest/simplest possible implementation to start with, since you know you'll need to change it anyway. Don't worry about performance or even frame accuracy, because the frame timing is going to change.
Simple strategy would be to just reevaluate your "what to do now" function every update tick, and short-circuit the function if player is not free.
ye, that would've been my initial approach too, just wasn't sure on how to do the isfree check
T_T got a bug report... a summary here
Skill prestige is no longer working with this skill since I updated this mod!
Well.... Maybe that's a skill prestige issue and not a problem with my mod @,@ why report it to me instead of skill prestige.
Edit: I did rewrite my namespaces and modID that update, so it is for sure other mods that need to update their modID if they use my mod for some reason.
I guess if the incompatibility only started after you updated it, it isnt unreasonable to let the mod author know about it.
Yeah thats good to add on lol
If you make a mod that affects another mod and your mod stops working on that other mod, the responsibility is on you to fix it, not the author of the mod you're affecting
Its not the author of skill prestige reporting the bug though, just a user informing the mod author of an incompatability
They dont know which side the responsibility lies on neccessarily
they should report the issue on both pages, yet they only did one.
Thats a fair complaint
One mod works and the other doesn't, I wonder which one is broken
Just recently I updated my mod and it broke compatability with another mod. The errors only affected the other mod, not mine. It was still helpful to report it to me since it was my mods fault
Errors with one mod are not always that mod's fault
Sure, in that instance it was right to message you, though it's only a similar situation
To the user its the same situation
Yes well, users 
to the user it might very well have seem as if your mod broke, since from how i read your initial complaint other skills did work with skill prestige, just yours didn't, so to the user it might've been obvious that your mod must've been the broken one as it was the only skill to not work with skill prestige
Another example I would say is when the bundles of VMV was acting weird in multiplayer.
while VMV used the bundle framework mod, they have no control over what the bundles do/function. It's better to report the issue to the bundle framework than to VMV
I still reported it to both VmV and the bundles framework just in case
And it broke when they updated the mod, too
So its like, well it was working (To the user)
Yeah, ultimately MoonSlime is right and it should be reported to both, it's just annoying to get reports for stuff that have nothing to do with your own mod
other skills did work with skill prestige, just yours didn't, so to the user it might've been obvious that your mod must've been the broken one as it was the only skill to not work with skill prestige
That would still be ultimately on Host to fix, even if say one mod doesn't seem compatible to it.
i do see what Nature is saying and i do think its worth pointing out that i don't think Nature is saying that a user should always definitely report it to MoonSlime
just that, from a user perspective, it makes sense why they did
not about whether it was right or wrong to
yeah i get why users may do that, i usually encourage them to directly report to the related mod instead when possible
I'm from the camp of "I'd rather die than complain about my food being wrong" so it takes a lot to get me to actually file a complaint about anything to anyone
i think the main thing is which mod depends on which, cause the way i see it, if mod B depends on mod A, and mod A gets updated, through which mod B breakes, it would be up to mod B to update to reflect the changes mod A made in it's update, otherwise no mod could ever change certain things
mood
to be a bit of a devils advocate, there also are just situations where i would consider it the mod authors fault if another mod breaks because of a change they made, so its not impossible
(that reminds me of earlier when i bought a stuff and the price tag and price paid was different and i was like "oh no let me check how do i bring that i must say something but also not be an inconvenience")
like for the longest time I didn't want to bring up the blackscreen in some areas of VMV since I knew some one else most likely did. (turns out some one did, and it was just a cross-mod issue with reflections)
(Yup)
Stuff like "unexpectedly changing your api methods"
Or "unexpectedly changing your mod ID"
i still feel it's kinda wrong to hold one mod author accountable for breaking another mod they might not even be aware of exists
yeah, API is what i was thinking, though in this case i dont think theyre using an API so its technically fine
changing your uniqueID would be another
me 🤝 atra
That would have gotten you to the "yeah no no more compat ever" on my list
yeah this one is a bit complicated because : it's only on VMV so far BUT more mods could do that (so fixing it on VMV side fix only short term) BUT the author of Dynamic Reflection isn't around too much so it may not get fixed soon
if you change your unique ID or make breaking changes to your API and dont follow semver accordingly, i will hold you accountable for the mods that break
(which is fine by me, no one owes me a change, but i also do not really want to redo the whole maps either)
so how would one go about changing one's unique id? since that will always break mods depending on your mod, and as a mod author i feel like you should be allowed to change that id in future updates (e.g. you think of a better name for your mod)
you wouldnt
I'm trying to add i18n to my mod, but all I get is "}" dialogue. Text strings are fine for things on the map; I think it's dialogue only. I'm not sure what I did wrong, because it all looks the same as any other mod using i18n?
better name of your mod has the name field
you don't need to change the mod id for that
you will not be supported in changing your uniqueid
But don't get surprised if people no longer want to bother with compat with you in the future
according to the wiki the unique id is combined your name and the mod name
no
You can't use tokens in loads
its often that
that is a naming convention
from convention
it's not set in stone
its recommended to be a combo of that bc those two things in combination mean they will always by definition be unique
you can change your name at any time WITHOUT needing to change the id
if everyoine follows it
also what about the namespace change? since that is what actually happened in the situation that was brought up, how would you go about changing your mods namespace?
like i said, i didnt say it applied here
I absolutely changed the ID of my mod since my mod ID wasn't unique.
There was an issue I noticed on the Pathos log posted yesterday where SMAPI put out an error of "Do you already have X mod already loaded or have two versions of the same mod?"
if you arent maintaining an API, you can do what you want with the structure of your code
if your id is 7chords.nightshift and you decide you want to name your mod "day shift" instead, unless there's a big confusion in keeping existing ID it's better
so if you absolutely do want to change the id it would be better to re-release under a new id to avoid breaking other mods?
even most people who do unofficial updates and rewrite an old mod that wasnt theirs keep the uniqueid with the old author
(Your namespace is not part of your public api.)
HOWEVER since the question is "how you would proceed", it happened in the past, the best practice is to reach authors you know are having use of the ID, and you can do that by :
- common sense
- asking the community
- see if someone with the big whole repro of mod can make a search on your mod id
i know some (content packs) mod that changed their id for whatever reason and it's how they did it to minimise issue
and they accepted that if issues happens, they are partly responsible (it happens, it's not necessarily a big deal)
In cases where it is (intentionally, difficult to tell in this community because people do not necessarily mark things internal), yeah I would consider that a breaking change
if you're fine with dealing with the duplicate, potential no compat, bug reports on old pages and some others issues, it's one of the option
i dont think it's necessarily better
it's hmm
basically it's a situation when if you have to change id, you did something wrong, and everything has a cost, keeping the old mistake or moving on
you decide which cost is the most acceptable, preferably not only for you, but for other actors involved
sometimes the cost is just "send a few DM letting them know of the change"
likewise, if you do content that other mods have done compatibility for (e.g., items, NPCs) and you change the names without letting the compat authors know so their compat with your mod just breaks... yeah, don't do that
what if you are not aware of those other mod authors building stuff on top of your stuff tho? would it not be the responsibility of those who build on top of you to keep up to date with what you change in your stuff?
yeah I don't agree with this.
refactoring is a common practice and while you might want to reach out to others while doing it, it's not required of you. Especially since you might not know everysingle person who knows what did what with your mod
you can disagree, but if you don't play nice, don't expect others to play nice in return
you aren't obligated, they aren't either
yeah, if the mod author never tells you they did compat, sure, but that's not what folks usually do
changing internal item IDs is not really necessary for refactoring, as they dont have any effect on the code itself
and again, i dont think anyone is ever going to try and stop you if you are determined. but like oothers have said, people will stop making compat patches for you
they can deal with the report about "yeah well, the author changed id so i'll fix that when i can"
they usually let the mod author know because they want to do cross-compat and are excited about it
we are a community, so if you're unsure, you ask, see the points i made earlier
there's some people that get all the released mods and can check stuff like "what files contains Lumisteria.MtVapius"
and tell me "oh you may not know but mod X has compat stuff"
and arbitrarily changing things like NPC internal names or map names (neither of which is generally necessary), and can't be bothered to say anything, those people aren't going to continue to be excited about offering compat
I can't even get the people who have downloaded my mods to tell me when my shit isn't working
at the very least it would be common courtesy to include breaking changes like that in the changelog
in 1.6 release i think the map name change was a good moment but definitively trying to let people know beforehand was a good thing to do
i know that feeling, only reports i have gotten so far i haven't been able to reproduce and are stuck on waiting for additional info
and worth emphasizing again, this is all "common courtesy." literally none of this is required. nothing is ever required of you in a modding community. but its nice to be courteous if you want the community to be courteous back
a community thrives more when it has conventions that people follow that make it easier for everyone to work together
ye ofc, inclusion of refactoring in changelogs would be standard i'd say
and to be clear, i think it's fine to have occasional break of the convention, whether by accident (didn't know) or convenience, but often just letting people know is enough
you can agree or disagree or have your own takes on it that are slightly different from someone else takes or what have you, but ultimately, these are the conventions that a lot of the community, definitely the majority in this server, follow
(and sometimes the stability and convention are contradicting each others, ex : internal npcs names : better to have an ID somewhere, better to not change them once other mods touch them)
that reminds me, i still need to someday upload my source to github (haven't gotten around to it yet)
Same, github scares me but I know keeping things closed isnt good
(so old mods are usually better by keeping simple Name even if the convention isn't that, because anyway if other mods DO follow the convention they are safe)
(yeah, this is why Ridgeside hasn't changed NPC names to follow best practices - it's likely to break a lot of compat, some of which may be on mods where the compat author is gone)
(so not worth it)
i have a lot of my past projects on github already, some with much worse looking code than night shift, i just haven't gotten around to uploading night shift yet xD
it's ok ill only look at ur code if it breaks my code
Which was very well done, but again I completely disagree that it's common courtesy.
you can agree or disagree or have your own takes on it that are slightly different from someone else takes or what have you, but ultimately, these are the conventions that a lot of the community, definitely the majority in this server, follow
It might be something this community does, but it isn't something others do, and those communities work just fine.
and again, i dont think anyone is ever going to try and stop you if you are determined. but like oothers have said, people will stop making compat patches for you
if you're changing your IDs or breaking stuff every update sure I agree it becomes a pain in the ass to keep compact (like what SVE does), but if it's once in a blue moon due to a rewrite, again I disagree.
if its courteous to do and common in the community, i think that fits the definition of common courtesy
Other communities and what they do aren't relevant
dont know why i would be assumed to be talking about other modding communities if they're not the ones we're modding in
BUtton originally talked about it as if it was relevent to modding communities as a whole. So they are the ones who brought it in
Common courtesy dosnt have to be required for functionality either, sometimes its just to ease things. (As a response to the second quote reply)
They then narrowed to just this community while I was typing my reply and I left it in.
"a community thrives more when it has conventions that people follow that make it easier for everyone to work together"
this is all i said talking about modding communities in general. i dont see how it could be false to say "if a community works together better they work together better"
Um..
the things about item IDs and unique IDs are inherently specific to SDV
things about conventions are general
but i dont know of any conventions specific to other communities
Is there a specific scenario we're still trying to solve?
I think its more in the "general" category of conversation now haha
there was a relevant impetus to the conversation initially but its not really relevant anymore, no
well, if it's once in a blue moon it's still possible to be "i changed mod id, in case other mods/mod users are asking", but if it's too much of a courtesy honestly i'm not sure what is worth discussing about
people do what they want, people judge that how they want
i will say i think i could have worded those confusing parts a bit better, so i will at least apologize for that and explain that my "nothing is required in a community [...] its nice to be courteous if you want the community to be courteous back" were not meant to both be talking about communities in general. i was saying you're never required to do anything in modding, but in this community, its nice to be courteous and follow its conventions if you want it to be courteous back. but the part you quoted was not about communities in general, no, nor the thing about compat patches
the difference between "a" community and "the" community in thhose sentences
I have gone out of my way to do compat for folks who then broke said compat with stupid or unnecessary changes and didn't bother giving me a heads up despite knowing about the compat, so I'm mostly agreeing with Atra that if someone does that, I don't do compat for their mods anymore.
one last thing before i change conversation but
i wish nexus had a way to tell users "hey note that"
because next update of my flower crop mod will need a folder reinstall
me too
and yes, there's changelog but
if they know about the compat it almost seems intentional to not give a heads up
Were talking about Mods making changes which then breaks another mod. Discussion was about who the user should report to.
Button chimed in that if you are making a change that breaks APIs or changing your Mod ID, you should make posts to let other people know about it and is needed for the community. Also how you should never change your IDs and they would hold you responsible if you do that and it breaks other mods.
I am on the side that changing IDs is nessesary at times, such as if you're doing a full rewrite or restructuring, and it isn't completely your responsibility to go out on let other people know (such as posting here that you're doing a rewrite, or going to every mod page that has a compact and doing a rewrite).
i wish i had a way to have ONE line in the dl summary or something
Ok
like "breaking change : note that you need to delete old folder"
to be fair, there's a lot of things i wish nexus would do
You can put it in the instructions for the file? Though if they use Vortex or the download button without going to the file page, they won't see it
(i also never said anything was needed)
One thing I do agree with 100% is that the changes should always be listed in the logs
If you put a second main file in the downloads then it will bring them to the files page where they can see the note
(not a great solution)
you can put bbcode in your file descriptions to make the text big and bold and hope for the best
or w/e nexus's markdown is called
Hi, I'm new to stardew modding, but proficient in C# and programming in general. I'm following the "Modder Guide/Get Started" on the wiki. I'm at the "Reference the Pathoschild.Stardew.ModBuildConfig NuGet package." step, and this is where I'm getting lost. I'm at this website (https://www.nuget.org/packages/Pathoschild.Stardew.ModBuildConfig), but I'm unsure how to exactly add the package. I'm using VS 2022, and I'm unsure of which command (.NET CLI, Package Manager, PackageReference, etc) I should be using.
with nexus it's the best approach, do whatever i can, and hope for the best 😄
Hi all! Trying to make item bags!
Quaint Living Wildflowers has a flower in the json that looks like this Name:"QL_BishopsLace" then the Display Name is "Bishop's Lace"
The ObjectID would be: PC.QL.Wildflowers_QL_BishopsLace right?
Going out and saying it's "common courtesy" and "a community thrives more when it has conventions that people follow" along with the wording you used in all your posts very much have the emotional feeling of "Do it or the community will shun you" type aspects that a lot of other "you need to do these or else" type sayings have.
MoonSlime.
it might not have been your intention but it absolutely came off like that
That's probably the ID but the thing that is definitely the ID is the thing right before the opening bracket
So just check what that is
nope its going to be whats in the objects.json as the nameid
This has pictures
like dont add to it if its not in the objects.json ( is what i meant to write)
"QL_BishopsLace" is the id
this is a free fan hobby community. There are very few rules. Button is merely pointing out that if a person doesn't extend basic courtesy to others, you probably shouldn't expect them to do the same to you.
so thats what you use. you dont add the modid to it
Gotcha! Thank you kindly all! ❤️
its best practice to have it in there so you would see it like that often but its not required
yw!
I was reading this like "Oh it says wildflowers so it's one of wildflour's mods, glad she's here to answer"
(note that the ModID_ItemID is a convention and for various reasons isn't used by all mod)
I was thinking the same!
i use PC's flowers hehehe so i know they dont follow the convention
(so mods can have different mod naming)
no big deal just something i noticed while working on compat XD
i like that my stuff shows that its from my mod in things like lookup anything so i stick to that naming convention
I loves them so much, they are so pretty! HOWEVER, I have mods that have more than one "Peony" and "Pansy", among other things. So my item bags were using the display name and that wound up getting the wrong pansy put in the bag, lol!
Sometimes I'll use an abbreviated mod id as a prefix instead of the whole thing
So I was like, okay, I must change these to the ObjectID so that it'll get the right pansy or peony!
i have that for my npc, at the time there was no modid token
wildfour's flowers are so pretty
so i had a short id rather than a long one
yeah, all my old mods are pre-1.6 so my naming conventions are not great 
thanks Moonslime! i work with a lot of very talented artists heheh so im glad their art gets appreciated
It's definitely a benefit haha
but they should be unique enough that they're not conflicting with anything
I just love all the flowers, I have all the Cornucopia ones, all of Flour's beauties, all the QL!
But inventory space is limited, lmao.
i would have advertised serene meadow but with that mod number you probably already got it
I have Serene Meadows! And VMV!
so the only conclusion i can make is that i need more pretty flowers
raises hand smol question, when adding an item that can be flavored to a recipe, how would you define that in the recipe file? I know how to do it with unflavored items or numeric categories but this would be a custom item
recipes.json: https://smapi.io/json/none/2fc1465d85944a4da58a617b6f96d390
shops.json: https://smapi.io/json/none/89de4e8187de4e1085fb069109653fd1
objects.json: https://smapi.io/json/none/cb677ef190b84ef18473509bfad015fc
Basically trying to make two kimchi recipes that you buy from Gus, but the kimchi itself can be flavored (ie: red cabbage kimchi, bok choy kimchi, etc). The recipe's showing up as the crafting recipe for a torch in the shop and when I buy it it's not showing up in the cooking part so I'm guessing I'm defining the ingredients wrong. Already looked at this page but couldn't find any ideas: https://stardewmodding.wiki.gg/wiki/Tutorial:_Adding_Recipes_with_CP#New_Cooking_Recipe_for_an_Existing_Item
(also yes all the flower mods are v pretty I love them qwq)
Hello! Rokugin here with another tutorial on how to make some simple stuff with Content Patcher. If you need any help with this or any of the stuff on my Git, feel free to try to reach me on the SDV Discord, there are also a lot of other super helpful and knowledgeable people there that are willing to help.
a thing i would want anyway
Yes please! ❤️
you need the weird cookie trick!!
what's that?
so
basically a recipe to be sold in a shop needs a matching internal name and recipe id
(love that we call it the cookie trick. like speedrunners naming glitches after arbitrary things or people)
which is done either by : having your recipe id the same as the internal name (or internal name same as recipe id) OR using the field "internal recipe name" that is used in game by the cookie recipe (and a few others)
I think flavored items in recipes can only be done with SpaceCore overrides though right?
i don't remember the exact field name, hence the trick of "cookie" because searching for cookie in shop data will show an example
Is it possible to move players position a bit to the left here so it's more aligned. My farm is an island 🏝️
it depends if it's recipe using kimchi (like kimchi fried rice) or recipe to make kimchi
using kimchi
i am assuming the first (in which case kimchi is an ingredient and will be fine once the cookie trick is used)
kimchi itself is produced by a machine called an onggi
(korean food mod? 👀 )
Would it not just accept all flavors of kimchi then?
(not quite tiakall, someone asked me to convert Kimchi Maker to 1.6 so I'm working on that along with a champagne wishes 1.6 patch that I got permission for)
kimchi wishes
so just having the basic ID of the unflavored item would be enough then gotcha
yes, they all have the same id
pog it works, tyvm everyone :)
I don't think you can adjust this outside of C#? 
Data/WorldMap apparently gives some control over that?
https://stardewvalleywiki.com/Modding:World_map#Real-time_positioning
well, i stand corrected then 
actually I sit corrected because there is a cat on me and I can't get up
Not yet anyways
Another victim of feline paralysis 😔
What about my taxes
todo: trigger actions to check the actual device clock & open default browser to a url (tax site)
Todo: game automatically shuts off if it detects the computer clock is after 11pm
don't be silly
GSQ is much better suited to checking the clock
Todo: pomodoro
I can think of one reason to actually add a "real time changed" trigger, and it's one of those "you've been playing for X hours" reminders 
ig the game's internal runtime is fine for that anyway
if there's a way to differentiate between initial day start on save load and regular day start you could do that already, but I dunno if there is a way without C#
yeah, I don't think anything exposed to CP allows for it yet
Yeah, next version integrates with TurboTax
Yay!!!
Hello! Does anyone here have any experience on modifying monster spawn rates?
I need to find a way to increase the monster base spawn rate for all monster spawning areas.
Prepare for some Harmony patching.
(Unless someone already wrote a framework for it)
you'll specifically probably want to look at MineShaft.populateLevel and also good luck
just adding more monster shouldnt be too bad
just as long as you never wanna make specific tweaks to existing code
i think the slimes on the island and volcano dungeon enemies have their own functions but idk how much of a mess they are, they might be easier
never looked at em
i remember when i first went through that, i was thinking night shift was gonna be an easy project and nice to do as a first stardew mod, then i relised within like an hour of decciding to make it i'd need harmony, and the fun times began
Well, I'm not gonna say I told you so, but...
i mean, it did end up working, and i still play with the mod in it's current form
and so far nobody has reported an incompatibility to me either
only had someone ask for the code to be open source for making a fishing compat, but so far i haven't gotten around to publishing the code on github
Weird, I thought I was the only one with those kinds of fishing patches, and I definitely didn't ask. (If you want to make it compatible with AFS, I left convenient functions for Harmony postfix patching so as not to require transpilers.)
fishing compat for night shift might be doable as a cp add on, only thing that would need to be added is fish that spawn with the in game time being between 0 and 600 as well as 2600 to 3000
cause all that i changed that does break fishing is that the in game time can be outside the default 600-2600 range
(That's my concession to mods that mess with the day-night cycle. I don't plan on writing any compat code into that mod, except maybe for VMV.)
ok, that looks like i might have to manually test those two mods together specifically, since what you wrote might not go around the changes i made, lemme just upload my code to github and send you the link in case you wanna adjust your code to overwrite/work with what i did, will check if my mod breaks anything from yours in the meantime
Me: ... maybe I can have a mini mod. As a treat.
(I kinda want to write a working DNT I just stare every time at the concept of handling ambient lighting and run screaming.)
Once was enough
I mean, I'm not asking you to write compat in right now, honestly I doubt there will be that much intersection of users who want fishing predictions and metadata (a min-maxing play style) and users who want to literally extend the game time (fundamentally changing balance). I was just mentioning it because you brought up compatibility with fishing specifically, and I couldn't think of any other scenario where that might've applied.
will test regardless as i am curious whether your methods overwrite my changes to the time or not, since we both interact with the default hardocded limits in different ways
That said: do people here think a mod that would let you mimic a radio (not quite a true radio because I'm not sure I want to mess with audio) make sense, or just kinda be too superflouous?
depends what you mean by mimic a radio, i think, but i think most mods have at least a few people who'd enjoy em
It's hitting a button and having a text message mimic a radio. I might be.. more bold asto make a UI later, but it's currently up to me summoming up the urge to do a lot of writing for it
AFS doesn't mess with the day-night cycle. That property exists for other mods to patch if they want to change the timing window that AFS uses for predictions.
ye, i'm just curious tho as to if the way i mess with time causes your methods to break
If you've patched the performTenMinuteUpdate to allow splash spots to happen after 2 am, then the mod won't be able to predict them after 2 am because it assumes the day ends at 2 am. That's all.
haven't patched that method iirc, but can't hurt to test things anyway, can it?
especially with how weird some bugs and code interactions behave
Do u have to manually turn the knobs to find stations 
No
No skeumorphism pls...
no whut?
(My dad built a radio with me when I was a kid. And by that, I mean he built the radio and I didn't understand a bit until many years later.)
That is in reference to the radio knob discussion, not your night shift mod.
i'd still love to know what that word means xD
I do not hate myself... and you.. that much.
Knobs that you have to "physically" turn with the mouse bring back god-awful memories of terribly-designed VST instrument/effect UI (which is still sadly kind of in vogue).
Like I might do that if I wanted to actually mess with audio and wanted to program in the FM fade-in and out effect..
but I don't.
I'm very confused as to what your mod is going to do tbh
Ham radio, maybe? There's already a jukebox so I don't imagine it's intended to be just "jukebox but worse".
So one of the things I've long hated about the jukebox is the randomized option
It just picks a single song at random
(Instread of randomly picking a new song every time the old one ends.)
I can't say I ever even noticed that... I never spend that much time in one location.
There's a jukebox?
this is a silly videogame though and not a mixing deck
honestly i'm shocked we don't have to write down everyone's phone numbers
Gotta have one phone number exclusively in the manual for anti cheat
from what i've seen so far there seems to be no conflicts that are noticeable in game, so all good to go still
Hey guys, I made this texture pack, how are you? I need to fix some textures that are not squared.
They look fine to me? What's wrong with them
jesus why do i keep making menus with books in them. sorely underestimated how hard it is to draw a looped notebook
there is one in the game art
if i see an ingame notebook i'll just start drawing that one instead lol
actually no idea if this is from game art or if it's mine
looks like mine circa 2019 cause it's lowkey bad
I don't recognize it
this is the one from vanilla
pretty sure thats a surface mounted chip in need of soldering
So true
ah well u see when i said 'menus with notebooks in them' i was more agonising over drawing a notebook at 144x144 rather than 14x14
yeah it's kind of a task haha
So the radio knob turning is actually... a minigame?
(I'm probably going to wish I hadn't suggested that)
that could work well with actual audio too, different knobs changing different audio effects, with the goal being a clean signal
like, one knob applies a pitch shift, a second applies a phlanger, a third applies a chorus
Find secret gotoro number stations
each with one position being the effect completely off for the clean audio which is the goal
(i had ideas for an audio-based mod at one point too but was never able to find like... anything helpful about how to actually effect or modify Cue stuff so. alas)
nah, i still got my own project to work own, you have fun with that xD
i only know how to create different audio effects with circuit boards, not c# xD
altho i do remember there being a functional language specifically for building audio effect chains
Button I thought you got the pitch stuff working, somewhat
the problem is moreso working with monogame/XNA/whatevers audio system
oh, no, i couldnt even get that to work right
F
i use the PlaySound overload that returns the Cue and that just has a pitch field you can change directly, which is what i used because i could never figure out why the PlaySound function itself did not respect the pitch i passed in
still no clue why changing the pitch after calling PlaySound changes the pitch of the sound I just played
and my idea would need a lot more than just changing the pitch anyway, but at best all i could find was that you could set or get "Variables" on Cues
what are the variables? who fucking knows
they take strings as input to choose the variable to effect
is there a list of possible things i can affect anywhere? if there is, please let me know!
cuz i sure couldnt find one
"Frequency" is the only variable i've ever used and i could never get it to work right
i hate cue
oh and "Volume". god i hate volume
Is there something in the SMAPI log that says what language a person is playing with?
LocalizedContentManager has the entire language info
oh in the log. oop
Yes
A question, does anyone know where the .xnb file for the explosive ammunition is located?
Well I hope you aren't making xnb mods
Should be on springobjects tho
Maps/springobjects
What's wrong with making those kinds of mods?
extremely incompatible and highly breakable
and no point when Content Patcher can do them safely
!xnb
XNB mods often break the game and are not recommended. See:
- using XNB mods for more info and a list of Content Patcher alternatives;
- reset your content files to fix problems caused by XNB mods.
For mod creators, see editing XNB files for help unpacking & editing them (including for use with Content Patcher).
Es que la verdad no sé cómo hacerlo
I really don't know how to do it with content patcher
!cp
Content Patcher (https://www.nexusmods.com/stardewvalley/mods/1915) is a mod which loads content packs to change the game's images and data without replacing XNB files. If you want to make mods using Content Patcher, start at https://stardewvalleywiki.com/Modding:Content_Patcher.
(i believe this is an English-only server btw just a heads up, excluding certain channels but not this one)
CP is extremely simple to use, and there's plenty of examples out there
any mod you download shows exactly how they did it
Imagine if I want to edit parsnip (springobjects) and button wants to edit pumpkin (springobjects)
theres also a good number of tutorials on the modding wiki as well
https://stardewmodding.wiki.gg/wiki/Main_Page
Our mods would be incompatible unless a merged springobjects.xnb is created
Now imagine this for every mod that touches the same asset
Content patcher is middle man that does the merging at runtime , so no one else has to
(it does lots of other things too ofc)
(AKA: Bethesda modding)
Hey there, I got some patches for your patch patches that patch the other patches
Opened up my mod project again and found an error with this line. spesifically the parentsheetindex
if (obj.Category == StardewValley.Object.metalResources || obj.parentSheetIndex == 390)
"Cannot apply operator '==' to operands of type 'Netcode. NetInt' and 'int',"
Assuming this is something that must have changed with an update or something, but can i just do obj.parentSheetIndex.Value? Is that the right way of using this?
the right way to do it would probably to not use those fields at all tbh and just go for the qualifieditemid
oh, qualifieditemid?
but i assume the parentSheetIndex was one of those Netfield types that got its implicit conversion removed in 1.6.9 so itd need obj.parentSheetIndex.Value if anything
yeah im not sure why you're using parentSheetIndex
what are you trying to do with that line?
Would it be possible for a mod to alter the lines of another mods i18n default.json file?
I'm checking what items are added/removed from the players inventory, and executing an action for certain items
thought so, thank you 😭
you'd need to go around all the barriers in place
they can overwrite fields to use their i18n instead though
then yeah, just use the items QualifiedItemId
parentSheetIndex was the old 1.5 way of identifying item
oh?
the same way you're setting, say, DisplayName to be {{i18n: whatever}} they can also just overwrite DisplayName after you to change it
ah yeah i made my mod before 1.6 released, so that makes sense
but they cannot affect your default.json itself
ahhh
yeah, basically you have to edit the same fields/dialogue keys the original mod is and then point it at your i18n instead
oh.. ew 😭
a C# mod could, in theory, actually edit the default.json in the users installed mods folder to change things. however i would say this falls under the category of "please dont ever"
yeah, just re-editing the same key is way easier
dont think any mod ever actually has
That is so incredibly evil. One step removed from editing the actual content.json!
Imagine the bug reports.
the beauty and risks you accept when letting arbitrary .dlls run on your computer
so hypothetically, i would replace obj.parentSheetIndex == 390 with obj.QualifiedItemId == "(O)390") for example? or whatever the item ID is?
(in theory you wouldn't have to point it at your own i18n and could just edit the field/key directly... but seems kinda rude to un-i18n a mod
)
thanks a ton!
I am trying to create a black screen in game similar to the one in the To Dew List mod. Though I just want the text to appear; nothing about the player clicking to remove it. Is that something I would do with Generic Mod Config Menu, is it something native to To Dew List, or is what I'm trying to do more of simple than what I'm initially thinking?
Even reading other mods' i18n can be a pain, and I'm speaking from experience. If it must be done, far safer to do with reflection and/or transpiling than physical file manipulations.
you'd need to use reflection to fool-proofedly get the actual file anyway, so you get to do the fun of both 
no guarantee that their mods folder structure is what the default is, after all
GMCM is for configuration only, if you want general-purpose in-game UI then you have to build general-purpose in-game UI.
not even a guarantee its the same structure that the mod author uploaded it in
I rewrote over 300+ lines of dialogue, and was kinda hoping I could just, have my mod overwrite the original lines in the other mods i18n file without needing to alter the other mod in question
the way to overwrite them is to edit the same things they do and make yours higher priority
You can only do that with either (a) Harmony or (b) if the authors of those mods pulled their mod-specific i18n strings into regular addressable in-game strings.
As Button says, you don't overwrite the translations themselves, you overwrite the things that use the translations.
Somewhere there is a CP mod that uses an "{{i18n:whatever}}" and you replace the element that has that attribute, not the whatever itself.
there are technically some mods that actually let you overwrite their translations, but they have to specifically make it possible and also theres like almost no point to it ever
I think the point is to say "I wash my hands of mod compatibility"
Which is, I'll admit, more of an "inner" win than a practical win.
in my case, the point was i wanted to put all my i18n into the CP portion of my mod but still use them in the C# portion without duplicating the files 
editing dialogue keys shouldn't be too terrible though 🙂 it'd be just like adding dialogue to a character.
😅 my npc has a full walk cycle that has been de-abbyfied
Editing keys is fine, But is probably gonna take a hot minute locating where every key is actually located
(which mod are you rewriting, out of curiosity?)
I wonder if there's a niche for a translation-overriding framework that mod creators can opt into without having to do a lot of extra work, thus not having to incur the ire of Pathos.
it would probably be very easy
It would involve Harmony to do safely, but not crazy difficult.
reflecting into smapi to get a mod list is easy enough, and from there you have access to every mods translation helper
similar for reflecting into CP
Yeah, you can use (and I do use) reflection to get the translations, but to override them you'd need to Harmony it.
You want a clean system where the overriding author just specifies the same key (qualified by mod ID), and a priority.
i wonder if simply replacing one mods translation helper with another mods translation helper would work or if itd cause catasrophic bugs
That's not good. What if the source mod adds new translations?
"Catastrophic" is a matter of perspective of course, but that is not safe.
i wonder if simply replacing one mods translation helper with a combined set of it and another mods translation helper would work or if—
Hahaha, well at that point I think it's easier to just write the transpiler.
I'm currently updating the Piper mod, which is just a pierre rewrite/replace. And I figured, Aside from altering the base game lines, why not make this compatible with major expansions and what not? So as of right now I've rewritten all the dialogue I needed to in both SVE and RSV, and was hoping the changing of lines wouldn't be too much work
You have to consider that this isn't just an agreement between two mods, it's a 1:N agreement between the source mod and many other mods that all have to negotiate their priorities, same way SMAPI asset loading is prioritized.
It was not fun locating every line that needed changing in the base game files, And I was hoping not to do that again
true. that should be handled if you just make it a custom asset though that people load their i18n files into
But it's not a huge project. I'd estimate about a week to get it to a reasonable level of polish.
like a unique ID to i18n list dictionary or somethin
i've already got some disgusting method that copies all translations from my CP component into my C# component
simple, doable, but also do you really want to give people that power (other than me)
well, ive already done it, so i guess my answer is yes
As I said, though, the key element here is mod authors opting into it. The framework wouldn't allow you to modify a translation that's not marked as overridable.
correct. a mod author could probably add theuir uniqueID to a list with a custom asset the same way. could also make them include it in the manifest
And that's the concern from Pathos and others (though I'm sure if he were here, he would tell us it's more nuanced than that) - that you shouldn't just go overriding other mods' private state willy nilly.
So this would involve something like adding a JSON comment at the top of the file marking all translations as overridable, or annotating individual translation strings somehow.
id also think it'd be very much the frameworks responsibility to make it very clear at all reasonable avenues that "Hey user reading this log, MOD A IS REPLACING MOD B'S TRANSLATIONS please report bugs to mod A thanks"
oh i hate the thought of having every single i18n entry given an annotation
(not that itd stop them)
that's worse than reflecting someone's translations away
And then the overriding mod could write a qualified string like authorname.ModName:Foo.Bar: "new value" in their translation file and it just works.
That's why I prefaced it with "JSON comment at top of file to opt in every translation"
Well, I can't speak to SVE, but the i18n keys for Ridgeside should match to the actual keys fairly closely. The bigger issue would probably be editing any of the events where Pierre is referred to by name or pronoun. (Think Jio's one event does, among others.) You basically have to count and edit the specific field of the event. (The old Ridgeside Gender Neutral mod has some examples of this.)
tbh, i think itd be more trouble than its worth to even allow anything other than full opt in
Lemme just check the Ridgeside files real quick....
But there may be cases where a mod author decides that some particular string should really be private, or only a few strings should be overridable.
if you're only going to opt in to a few lines, the other mod author can just manually override those
same with vice versa, even if you make just one or two private, those are still easily overriden the good ol fashion "edit the same entry" way
IMO it has to be available. Mods may want dialogue text to be overridable but that doesn't mean they want other mods screwing with their UI strings.
ah yes public marriage_Mon_1
other mods can already screw with their UI strings
Or the names of their configuration values. Etc.
not the config stuff i suppose
Come on, we're not talking about esoteric Harmony stuff here, we're talking about what any beginner CP mod author can do in 10 minutes.
when talking about UI strings my mind went to the stuff you add to like, Strings/UI and the like
but i do also understand that theyre not all accessible that way, so i do see your point
Heliax: Yeah, the keys for dialogue seem to all line up like so:
Yeah, that they can override, if they go through the steps of adding their strings to that dictionary, which I bet most authors don't.
light mode flashbang
So for the dialogue at least, you could just search for Pierre and find the i18n key, and derive the dialogue key from that.
Light mode FTW
mhm
that said
(Sorry, my Notepad++ is on light mode because I've never bothered to switch it
)
I am disappoint. I thought it was light mode because you are a writer and care about readability.
much easier to denote specific files in those subfolders as editable
though, then you'd have to reflect again to read them manually i suppose...
Yes, doing it at the file level is definitely more scalable than doing it by string - still needs a feature at the framework level to decide which strings are overridable and which aren't.
i forgot they all get added to the same dictionary in the end with no distinction
well the thought is you would put all the strings you dont want edited into a file without the top-of-the-file annotation
Hm, is there a way to make SMAPI console not close when it crashes? It's not putting this error in my log and it closes before I can read it
somewhat serious answer: it depends on the color scheme tbh! As I've gotten older/my eyes have gotten worse, I prefer lightmode on a lot of things, but like Discord is high contrast enough that it's fine 
run it through powershell if you hate yourself
pick a good terminal if you liek yourself
I wouldn't ask users to actually organize their translations by whether or not they should be overridable. They can if they want, but they probably want to organize large mods some other way.
well you gotta ask em to do somethin to opt in, though, and i doubt any of them would want to do per-string annotation either
my daily appeal to the Stardew Developer role to make the title bar respect dark theme in windows eleven
I think we agree on the basic concept of how to design the i18n from scratch, but the secondary scenario is retrofitting it into an existing mod.
you could just have them keep all their i18n files as is, and just add an extra one as a blacklist
windows 11
found the problem
Luckily with modded lines, I dont need to decompile a bunch of xnb files trying to locate where a dialogue line is located. MOdded lines are a bit more streamline, So I feel, say... lines from scarlett, will most likely be found within scarletts files.
though, SMAPI would complain about the duplicates
However the means of having my mod direct my altered lines to those keys will still be a tad tedious
windows 10 makes me retch
That's weird. I'll take 10 over 11 any day.
at least 11 looks good while being the exact same bad
I like how i can have 20 different file explorer tabs open
LINUX CLEARS RAAHH sorry I saw the word Windows and I passed out
also with dialogue, it's all going to be the same general format of having to edit Characters/Dialogue/NPCname, so if the i18n key matches the actual dialogue key, you can just logic into where the edit goes.
mhm
Anyway, I am kind of busy with other things now, but if no one else has taken it on in a week or two, I might run it by Pathos and build it. I really do think this is a common scenario that just isn't addressed well by CP, and there are ways to do it cleanly (heavy emphasis there) without flagrantly violating public-private boundaries.
I could also just be real lazy with it, and just included altered i18n files for the mods I've altered 💀
fwiw i would keep in mind that pathos has already rejected the idea of letting other mods edit another mods i18n from a different implementation suggestion in the past. might be different if its opt-in, but keep it in mind
Yes, I'm well aware of the history of that debate.
As in they replace the i18n in the target file? Mod users being mod users, I wouldn't trust them to do that properly 
couldnt remember if you were here at the time
my sense of time is no good
TRUE
Plus you'd have to make sure your replacer i18n is the entire i18n
would you need to? you could just have a partial i18n that overrides only the included keys, as well as adding any new keys
(replaces default.json with it.json, reports bug to original author, "why is all your mod text in Italian now?")
well if you exppect users to just drag and drop the new i18n file in...
if you're replacing the i18n file in the target mod, you'd have to, I think, otherwise you'd poof all the other lines
i thought the whole point of an i18n override mod is that you have a separate mod rather than dragging and dropping to replace the old mod's files?
two different convos!
How does the new split i18n feature handle duplicate keys/load order
Honestly, the issue with providing your own translation files to replace the other mod's translation files is the same issue I commented on earlier re: replacing the entire translation helper: it's not backward or forward compatible, extremely fragile all around.
me and focustense being nerds and tiakall and heliax talking about actual actionable things here
You mean the hypothetical, possibly planned, vaporware split i18n feature? Presumably by letting mods request their own priority, similar to how SMAPI's regular content pipeline does it.
every file one by one is loaded into the same dictionary, same as if you just had one file. duplicates get the same warning
i think selph meant the actually added in smapi split i18n files feature? the i18n subfolders
Yes
Oh. That makes sense too.
maybe we can go that route and pray the user doesn't open bug reports from the warnings
its literally just "foreach json in folder -> foreach key in file -> add to dictionary" instead of "foreach key in default.json -> add to dictionary"
Which conversation are we talking about here?
if a mod uses i18n subfolders though, every language must be in an i18n subfolder
you cant just replace one file
assuming you're talking about tiakall/heliax convo and not me/focus convo
like blueberry i am also dizzy now
clearly notch filters
Hello everyone! I'm thinking about migrating from Mail Framework Mod to Content Patcher and I was wondering: how do I make the game send an email when the player has a certain recipe? I've seen wildflour use G {HasRecipe}, but the Wiki doesn't have an event pre-condition with a capitalized G - only g which is for gender. I'm lost haha
(also, middle finger emoji to XACT for making one of its structs internal that i wanna poke around in)
(xna. xact. whatever it is)
or have we moved on to fm decoding yet?
[[Modding:Trigger_actions]]
I literally just tuned in
I was referring to the "want to override some i18n lines to change some gendered references without needing to duplicate the entire file"
have you considered the magic of a publicizer
Developers, take note: Button cares not for your petty "encapsulation" and "accessibility" concerns.
dont know how to use one to be honest. seen em talked about. never looked into it
I believe G for an event preconditions is still on one of the migration pages
if i used a publicizer would i need to ship an extra dll with my mod and if not would my code that references internal structs and classes work fine for an end user
i know nothing about publicizers
I don't think you do. I didn't ship an extra DLL with RadialMenu.
no you don't need to ship an extra dll
in my defense, this is purely for curiosity! im trying to see what sorts of RpcVariables an audio Cue has by default, but RpcVariable itself is an internal struct
You may need to include an extra DLL in your source, but it doesn't get deployed.
and if i use a publicizer i can just do like RpcVariable[] list = blabla in my code and it'll just... work fine later?
yup
If the type actually exists and is private, it will become public.
i honestly thought it'd just break for an end user who wouldnt have a publicizer so i just never looked too deeply into it
(Please, use this feature responsi... oh, forget it, who am I talking to)
Button FM radio mod 
Wiki is still being slow, so who knows if I'll ever find it
atra, are you willing to explain what the IncludeAssets and PrivateAssets lines are for in that csproj
or focus i suppose
or is that explained if i go look up Kras.Publicizer
PrivateAssets is what specifies whether or not the DLL is part of your output.
Non-private (i.e. public) means you're relying on a shared assembly reference, not providing your own.
Wow, I missed the i18n conversation 😔
It's what you want in order to avoid having to ship an extra DLL.
(Thanks for all the help everyone, sorry for sparkin up an old debate 💀 )
Pretty sure Pathos wouldn't go for outright overriding another mod's translations, and a comment opt in wouldn't work since I don't think something loaded with Newtonsoft retains the comment nifo?
aha, a stardew developer. have u considered dark theme title bars in windows 11 
(yeah, the package needs to exist at compile time but it's actually irrelevant at runtime.)
However, Shockah's Project Fluent mod allows content packs to override translations from other mods

For my personal computer or for the game?
hey, I have Words to Speak about RNG
well the game, it won't be much use to me if only you have it
I would not expect Pathos to add a feature to SMAPI. But I think I could come up with a design and implementation he'd approve of as a standalone framework.
is there not magic to override this locally
(so wait, whats the IncludeAssets part with runtime, build, native, etc? do i need that too?)
it'd be a huge power play though
can't believe stardew only uses a pseudo-random number generator 
implying dark title bar has functionality that's useful
we have to feel goth somehow
I've never been too clear on IncludeAssets, I usually just leave it alone.
(uh, I think so?)
Yeah IncludeAssets isn't even mod build config
just like the rest of us did from the publicizer's documentation haha
it's a normal dotnet thing, I think it has to do with what is available during compiling
Yeah, I mean I know what it does in theory, I've just never seen it actually affect project output in any way.
The valid values are listed there too
can frame it as an accessibility bugfix
which, it technically is
why the hell we all type it out and dont' do all is a Question TM https://learn.microsoft.com/en-us/nuget/consume-packages/package-references-in-project-files#controlling-dependency-assets
I think you do need buildtransistive though for these sourcegenny projects
(Also, on this: I'm a big fan of Project Fluent, but realistically, this is a situation similar to YACP; we can't avoid Metcalfe's Law, and traditional JSON translations are here to stay.)
completely tangential csproj question, is there a way i can just make it reference the "latest" ModBuildConfig in the csproj instead of a specific version
Don't think so. I don't use it.
Oh, but maybe it's different for <ProjectReference> vs. <PackageReference>
I'm looking at my own <ProjectReference> which has none of that, but the <PackageReference> does, so... who knows.
If you have a monorepo, you can get all projects to reference the same version of a package, and centralize all your package declarations. But no, there's no "auto update" for packages.
https://learn.microsoft.com/en-us/nuget/concepts/package-versioning?tabs=semver20sort#version-ranges
I think the answer is "probably but what is this"
Very true - just wanted to point out it is technically an option
stuck forever updating my dotnet template by hand 
oh
have you heard of the good word of dependabot?
nope!
I don't really get dependabot stuff for my mod repo which I find kinda weird
...Unless I just missed it
this seems like something that would be very neat and helpful to set up, if only it was for something i did more than like, once a month
I think GitHub has built-in dependabot stuff for reporting vulnerabilities, but it doesn't automatically update your packages, that's definitely opt in.
yeah, but it sends you an EMAIL OVER IT
and you can just accept the PR and be on your merry way
smash your laptop against the wall and go swimming instead
(delete the dependabot.yaml file)
I haven't gotten a dependabot PR in a year and a half
And that was only one, most of mine were in 2022
They're all on old repos
neither have I, but like, main has been frozen for more than a year at this point lol
Through the zen of email filters and banner blindness.
I'm not powerful enough to ignore the 
Email filters? What's that?
Yeah, you youngins grew up with adblockers, you've never experienced the web as it truly is.
(I have a few at work that were set up for me)
We old farts have learned to ignore everything, no matter how big and blinking.
(I don't need them now much at work, since, well.)
You could show me a bright red banner that takes up 92% of the screen and I would just sit there squinting at the other 8%
Me everytime I try to look at Nexus on my phone (it logged me out and I'm too lazy to log in)
(as has happened many times in the past, i am now using this publicizer and thinking "damn... that was so much easier than i ever thought itd be and i feel so dumb for not using it in the past when it would have immensely helped." oops)
One day I'll bother with publicizer instead of using reflection
what about 103%
(Fandom my beloathed)
Live and learn. It's like I said a few days ago, reflection isn't primarily a solution for peeking into other people's private stuff, it can do that but there are better options if that's all you want to do.
(I like it because it prevents me from making stupid typos)
also it means that when the game changes something to slightly rename a method, it's a fucking compiler error and not a runtime error
and 🦀 likes compile error and hate runtime error
Yeah
hi tia!
step 1: depression
step 2: ???
step 3: profit
Reflection is good when you really actually don't have all the info at compile time.
I'm just super lazy 
I love reflection
What is the mechanism behind publicizer?
no you're not
It is not just fancy reflection right
I will argue with you over this
I'm not depressed. Are you depressed? I find it quite relaxing to be able to blind myself to all the visual noise.
I think casey should be more lazy, like cat
It's okay, you're allowed to be wrong on that
in technicality - it makes a reference assembly that has everything public, you compile against that
you maintain so much code for a hobby space! I gave up to make sweaters!
Publicizer is actually not fancy reflection, it is "ignore access checks", it's a built in .NET feature that's just not easy to use (for obvious reasons).
I'm a millennial, of COURSE I'm depressed

that said i thought a publicizer was supposed to not give me FieldAccessException errors 
oh did you mark your binary unsafe
i dont even know what it means to do that or how
i just installed the nuget package and told it to publicize Everything
Depression gang!
why is that necessary?
FYI: Microsoft's official word on ignore access checks is here: https://github.com/dotnet/runtime/issues/37875
(They say: "it's not for you plebs, it's for us only, and it's broken in Mono, please don't use it." Does anyone listen? Of course not, and now it works fine in Mono.)
Nahhhhh, SpaceCore's only... 15k lines of code...
that's a lot!
Is that LOC or LOEC?
LOC
"only" doing a lot of heavy lifting there
LOEC is almost 7k
Huh, I thought it'd be bigger. StardewUI is bigger than SpaceCore now, going by the all-important LOC metric which we know is a 100% absolute measure of productivity.
I wonder if I loaded all my csprojs and added them all up how much it would be
i still get fieldaccessexceptions :v
weird
(And I guess S&S, at least the version I last worked on, since 95%+ was me and that's a lot of C# too)
works for me 
If there was a quick way to unload all projects in VS I'd check, but as far as I'm aware I'd have to unload each one that isn't in a folder one by one
can't you select multiple?
Hmm, good point
You definitely added the unsafe tag to the right mod? Like, you're not doing the access from a framework mod but added the project attribute to a downstream mod?
Actually, I did not even add <AllowUnsafeBlocks> to RadialMenu and it still works fine, so... hm.
Okay, this count is gonna be inflated since it seems to count shared projects in each project 
(ie. it says Spenny is almost 4k, but doing the dropdown says 34 for the project code specifically)
Yeah, on account of how shared projects work by basically copying code.
out of curiosity I checked as well, 10k lines in C# and 5k in json across all my mods combined
so 2/3 of a spacecore, not bad
how do u check loc
I'm aware, but I'd still prefer it to count them separately since the IDE should be able to detect that 😛
Get there by View -> Other Windows -> Code Metrics Results
git ls-files | grep '\.cs' | xargs wc -l if you're a fellow caveperson
That's probably more accurate vis-a-vis shared projects, but won't give you LOEC.
yeah its for sure in the right mod, i just spun up a new solution for it
When you export the results to Excel with the button in VS, it shows it by namespace
I can probably take out the spaceshared stuff with a little manipulation
Ugh, why do I get the weird issues. If I don't delete the config.json from the previous build of my mod when I make a new build, SMAPI crashes while loading
I've never had this problem before, still need to I guess download a terminal to try to get this error to stay up
i think its probably just because im getting the actual soundbank itself incorrectly
i dont remember how i got access to the Cue itself last time i was messing around with this, womp womp
So, as it turns out, SVE gets kinda funky with some dialogue, kinda forcing my hand to just having to publish an edited i18n file 😭 well hey, easier on my end... I guess?
(did that get added bc of people playing sdv without audio devices?)
And you're sure this FieldAccessException is coming from Publicizer (or rather your use of the publicized field)? It's very strange because that's a Reflection exception.
not in the least, though it is the publicizer thats allowing me to just write the fields directly
LOC and LOEC for all my mods, + 13k/4k for S&S
Only other thing I can think of is maybe you're publicizing a different version of the assembly from the one you're running against.
var bank = Game1.soundBank as SoundBankWrapper;
var realBank = bank?.soundBank;
it gives the exception when trying to get the backing soundBank field. and ofc if i remove the "as soundbankwrapper" part i cant do that at all, but it is a soundbankwrapper
(Not including anything in SpaceShared)
(thats not where the exception was being given before but it is now as i have edited it to try and figure out where the issue was)
I do seem to recall that publicizer did not behave well against SMAPI or possibly against the vanilla game or Game1 class in particular. Somebody brought that up, a month or two ago.
what if its DummySoundBank
well i didnt get any errors indicating that it fails to initialize XACT, so it shouldnt be
(For comparison, SDV itself (in whatever decomp version I'm on, this isn't the source code, I'm not gonna check for that) is 216k/130k)
Sadly all I can say is that it works for me
Same. Anyway, there wouldn't be a FieldAccessException if it was the wrong type, it would be a NRE.
Or, not, because it's elvised.
I can maybe take a look if you post the whole project? At least we'd know if it's machine-specific or maybe something to do with publicizing XNA or game types.
Wait... nvm, I'm dumb
Yeah, I'm headed out, but if you don't figure it out by Sunday after next I'll look at it
(So 8 days from now.)
Re mind me in 9 days to pester atra /s
my decision to not bother having Rider set up a git repo for me biting me in the ass now
You're not overriding <PublicizerRuntimeStrategies> in the project, right? The default setting should work but it could be broken on some platforms if you override it.
no, it actually was not present by default, so i added that, and then it still gave me the error
added it per the publicier'z repos instructions, rather, to try and get around memberaccess exceptions,, which i assumed this fell under
(or well not per its instructions, it does say its by default, but i thought maybe it wasnt doing it for some reason, so i added it)
Better not to add it, by default it uses strategies for all platforms but overriding it can break stuff.
Was just checking if it had been added accidentally from some copypasta.
And it's an SDK style project, right? You didn't create a legacy csproj?
really? it doesnt say that its platform specific on the repo
and i dont think so? im pushing the code to a repo in a sec
Can you even do legacy projects with .net 6?
Yeah, there are separate solutions for Mono and .NET Framework.
Huh, TIL
Sure, last I checked it's still the default when you create a new project from within VS (not from dotnet)
It's not the default when I create my new mod projects
my very first mod for 1.6 had a very legacy-looking repo that worked until i needed it to not be legacy
(.net 8, I replace the csproj contents afterwards)
sdk just means <Project Sdk="Microsoft.NET.Sdk"> at top of csproj?
That's how you can tell, yes.
anyway, heres the repo
https://github.com/Spiderbuttons/AudioTestMod
Hmm, I have never tried using PublicizeAll. I'd start with publicizing that specific assembly.
I think <AllowUnsafeBlocks> should be unnecessary because Publicizer adds it on its own.
i added it after atra pointed it out as a possible cause
This is... interesting. Project doesn't even build for me.
Oh, it's game folder junk, one moment
smh Button why is GamePath in your csproj
ah yeah, i wasnt sure if you were just gonna copy it or clone it, so i didnt mention
Use stardewvalley.targets like a proper modder
as far as i know ive not customized that
so... place the blame on whatever default or tutorial i initially followed and then integrated into my dotnet template
(hey, I do that too, but also I'm not a modder anymore so.)
also, publicizing just Stardew Valley.dll also does not work
(I'm very lazy)
This is mine:
<Project>
<PropertyGroup>
<GamePath Condition=" '$(GamePath)' == '' ">C:\Users\space\Programming\StardewValley\WORKSPACE</GamePath>
</PropertyGroup>
</Project>
(The condition is important so that I can use an environment variable to launch VS with a different workspace folder entirely)
Ok, I can repro the error at least, so that's a start.
how is this any different than me just putting my steam install path in there
ie. My bat file for launching SVE's sln:
set GamePath=C:\Users\space\Programming\StardewValley\WORKSPACE_SVE
"C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\devenv.exe" "C:\Users\space\Programming\StardewValley\StardewValleyExpanded\Code\StardewValleyExpanded.sln"
Well, what I'm saying is you should be doing that instead of specifying the path in your csproj 😛
i never figured out where i am supposed to put stardewvalley.targets
putting it in ~/ didnt seem to do anything
is that not a specific path? i dont know what stardewvalley.targets means
should just be ~/stardewvalley.targets
stardewvalley.targets is a file that is applied for any project using the mod build config package. It's stored in your OS home directory and not part of your repo.
That way you can override the game path without having to do it for everyone who clones your repo
if that doesn't work, open a ticket
(You should also put your GameModsPath in there, since that would interfere when someone clones your repo too)
ill consider it at some point i guess, even though im a weird one who doesnt like anything unnecessary in my home folder, but for now it works for me
i do prefer to keep the gamemodspath in the project though i do change that back and forth from time to time
i bet past chu spelled it wrong but it works now 
though it might have also been me wanting to switch between 168 and 169
i wish it could be named .stardewvalley.targets so i wouldn't have to look at it all the time, much like ~/.config which is used for lots of things in linux land
(i also just personally dont really like the idea of globals so much)
I have yet to figure out why, but I can see the issue with your test mod is that it is not actually getting the IgnoresAccessChecksToAttribute on the assembly.
i use $(MSBuildUserExtensionsPath)/sdv.props rn so i remember that it is actually something i set and not just modbuildconfig automagic
To be fair my environment variable trick doesn't work 100% of the time. I have this in my common.targets to comment/uncomment as needed:
<!-- This sometimes fixes running the game from the right folder when I use an environment variable to override my game path. No idea why -->
<!-- Other times it breaks it when it was working (which is only sometimes)! Joy -->
<!--
<PropertyGroup Condition="'$(OS)' == 'Windows_NT'">
<StartProgram>$(GamePath)\StardewModdingAPI.exe</StartProgram>
<StartWorkingDirectory>$(GamePath)</StartWorkingDirectory>
</PropertyGroup>
-->

having to go in and manually comment/uncomment seems like it breaks the point of having a global targets file in the first place!
at least somewhat
button perhaps us mere mortals are not meant to enroach upon the domain of metatron, the voice of god
(how did you check this also?)
Ah, well, the normal way doesn't require that. It's specifically a problem when I use an environment variable
Ilspy
It builds in the right part always, but sometimes launching uses my stardewvalley.targets value instead of the environment variable value
And you'll notice the thing I posted doesn't have any hard coded paths anyways
It's literally what mod build config does already
It's very strange
for some reason it hardly ever occurs to me that i can use ILSpy for looking at more than just functions and stuff
I think I found the problem. It's your use of this:
<PropertyGroup>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup>
The IgnoresAccessChecksToAttribute is part of the assembly info and that's suppressing it.
ill be honest i dont know what that part of my csproj does
Haha then why do you add it?
its in my template that i use for all my mods so i mustve copied it from some initial template
It suppresses all the version info and such being added to the assembly itself (as opposed to the manifest which is different). Those are (for example) the properties you can see when you right-click on the DLL, go to properties and go to the details tab.
my entire understanding of csproj is "copy paste the things i see in other csprojs into it"
either that or i mustve needed it at some point (though i dont know possibly for what) and just included it in my template by mistake
You really probably do not want that in there for any of your mods. And in the case of this one specifically, it's preventing Publicizer from adding the required attribute. Remove that element from the csproj and everything works fine.
(My clue to this was when I opened it in ILSpy and ILSpy showed it having a version of 0.0.0.0)
is there ever a reason why id want to not generate assembly info?
the little greenhouse is live! :3 https://www.nexusmods.com/stardewvalley/mods/29443
Not that I can think of.
I mean, there must be a theoretical reason, otherwise they wouldn't have added that property. But I can't think of a practical reason.
(would you like a mod-showcase? if so: what description would you like?)
Anyway... you're welcome 😉
im more so trying to remember why i would have added it ever, because i truly have no idea, but im very thankful for you pointing it out
huh i wonder if that is why the android version of smapi always showed game as 0,0,0,0
in the logs
Could be, but Android is a whole other ballgame.
sure! is there a better place to post mod updates than here?
Description:
You're a simple farmer maintaining the hobby farm your grandfather left you. This small greenhouse will suit you just fine.
CONFIG OPTIONS: Simple Foliage; VPR, Vanilla
Alternative Textures version is Vanilla Only
i don't want to post them in the wrong place
okay never mind im more confused now, i thought it was back when i was a baby (read: dumb) modder who really liked having her folder names start with a capital letter, so i wanted to include the Assets folder instead of the assets folder, which modbuildconfig did not grab by default. so i assumed in the course of me trying to figure out how to include that folder in the build, i added that propertygroup, since Special Power Utilities is the first mod that has generate whatever set to false and also trries to include that folder
i go post in modded-farmers
however when i remove that from SPU's csproj it just fails to build completely, because it tosses Duplicate Attribute errors at me
Error CS0579
Do you have an AssemblyInfo.cs in that project?
not as far as i can tell? where would that be
hey thanks for this, this is really cool. i didn't know you could put conditions on csproj values, so now i can make my life easier when switching between my GOG and Steam installs (which i do when they are on different game versions)
In the root, usually.
oh i see it in the obj folder
not the root folder though
its on obj/Debug/net6.0
i dont know what any of these things are
Oh ok, that's normal.
And use that - if you want to find the duplicate, look at the attributes in that cs file and find where the same attribute is used elsewhere in the project.
You almost certainly have something like an [AssemblyFileVersion] or [AssemblyTitle] somewhere, that's why it's complaining about a duplicate. Usually that's in AssemblyInfo.cs but it could be somewhere else, anywhere in the project could have an assembly-level attribute by specifying [assembly:AssemblyTitle] and so on.
[assembly: System.Reflection.AssemblyCompanyAttribute("Spiderbuttons")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("2.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("2.0.0+8febb7fc3dc9adbaabf42a3af22fc7fbf9799779")]
[assembly: System.Reflection.AssemblyProductAttribute("SpecialPowerUtilities")]
[assembly: System.Reflection.AssemblyTitleAttribute("SpecialPowerUtilities")]
[assembly: System.Reflection.AssemblyVersionAttribute("2.0.0.0")]
these are all the attributes, though
i dont think SPU uses any attributes besides [HarmonyPatch]
Try deleting the entire bin and obj directories and then rebuilding with the element removed from csproj, maybe you have some old stuff stuck in there.
(Like the obsolete PDB files people have been accidentally leaving in their deployed mods)
naw, same errors
is it Rider conflicting with it by me maybe setting those variables in rider's solution editor, maybe
Does the build log tell you where they are?
it tells me its those ones i pasted above, in the SpecialPowerUtilities.AssemblyInfo.cs
Hmm, not any others? 
thanks! i'll post there in the future
it just tells me those are duplicates, doesnt say where they are duplicating ¯_(ツ)_/¯
i was able to find the googled suggestion to add that generateassemblyconfig false thing to my csproj that i almost certainly listened to way back then though lol
I cloned your repo, removed that attribute, and the build succeeds.
So you've got some old junk in the repo somewhere. Maybe delete the whole thing and re-clone from github.
tbf once you have the mod author role you can post in there and showcase it yourself, but if you want someone else to showcase until then, it's okay to post it here/making-mods-art
I only deleted that attribute we talked about, plus the gamepath/modspath settings.
FYI, we can only showcase our own posts, so no matter where you decide to post, one of us has to repost it anyway.
gotcha
sounds like a job for future me 
Well, I suppose most mod authors here are lone wolves. These are problems you'd definitely want to fix if you had other contributors.
If you're the only one maintaining it then yeah, sure, you can have a repo that only builds correctly on your local copy
in this case it works on only not my machine apparently lol
Well no, it builds correctly on your machine with that (no-assembly-info) element included, because you've got the assembly info duplicated somewhere. If anyone else tries to build it, they'll get a DLL with no version info or other attributes.
which isnt really a problem, is it? /gen if thery dont need a publicizer or somethin
On a clean fetch, there's no duplicated assembly info, so you'd want to not have that attribute so that generated assemblies are correct.
I'm not sure if SMAPI relies on any assembly info or exclusively on the manifest. It's... really not a good thing to have an assembly without even a version.
well i wasnt kiddin about it being a job for future me, i will do it next time i work on it. just not right this moment
For one thing, it means every released version of the mod has the same version as far as .NET is concerned, and it won't be able to detect any incompatibilities if something depends on an older/newer version. Maybe you don't care about it, but again, it's not great.
(Every assembly has a version. If you don't specify it, the assembly version just defaults to 1.0.0.0.)
^ Nope, it defaults to 0.0.0.0 if the csproj has <GenerateAssemblyInfo>false</GenerateAssemblyInfo>. The attribute really is not there, you can see it in ILSpy.
Well, 0.0.0.0 is a weird default, but essentially you still have the main assembly info even if you don't specify it via attributes.
0.0.0.0 is just an empty Version.
The [AssemblyVersion] and [AssemblyFileVersion] attributes truly are not there. It has no version. Honestly, it doesn't.
If you don't add a version tag to your csproj, then yes, it does pick a default version. But the GenerateAssemblyInfo tag completely suppresses all of it.
That seems like a bit of a semantic distinction. If you check assembly.Version it returns a value, and a version number is still present in the assembly-qualified name if you didn't specify one. So basically as far as SMAPI is concerned, it does have a version even if it defaulted to 0.0.0.0.
Well yeah, Version is a value type so it always exists, but every build of the assembly will end up reporting the same empty version of 0.0.0.0.
So the assembly-qualified name is essentially meaningless, doesn't tell you anything about which version you're really running.
Yep, but that's not really different from the majority of mods who just never change their assembly version.
More people should use Khloe's manifest builder so it's automatic! 😛
I would make a joke about decrementing the assembly version if I'd didn't know that would actually break shit
Hmm. Well, can't speak to that. But if Button's going to the trouble of bumping the manifest version, I think it's safe to say that the intent is to have an assembly version too.
(I think it's good practice to set the assembly version to your actual mod version, but it won't cause any issues for SMAPI if you don't.)
(i think i've yoinked DH's template as well as some bits n pieces from a template chu gave me cause i am also in the crowd of "iunno enough to set up my csproj appropriately")
That's just about everyone when it comes to msbuild tbh
nope i'm not in any mood to go back to cmake, not at least until i bother to go back to uni
Nothing beats cargo, though.
im glad all my things link correctly without me goin in and hardcoding stuff
CMake 
cmake my behated
No can do. Can I offer you a tsh script a coworker probably wrote before I was born?
say is there docs on nexus premium api
Do Linux binaries still have the dorky ./configure step?
@calm nebula Did you transfer Identifiable Combined Rings to Mushymato? They replaced that mod's entry on the compatibility list with their version, which is a bit unusual since the original mod page seems to still be up.
We can consider it transferred
can anyone get access to the download api or do u have to be one of the approved ppl
(He did the same thing with Pick Your Enchantment... did you ever actually take the original page down?)
hey are we hating on cmake in here?
Haha, it's no skin off my nose, though it is kind of funny, that was more than 2 months ago!
I think on the api key page you can get a personal one?
yea i was unsure what i should have done, but since i didnt change the unique id it never showed up as new entry
binaries don't (they're already built), but ./configure is a sign of GNU automake/autoconf, which usually works on a wide array of systems but is utterly inscrutable and dog-slow
neat, i dun think i am releasing it'll just be smol script
(As a general rule anyone taking any of my mods has permission. That's kinda always been the case but...)
Yeah, I was trying to think of "build systems worse than CMake" and that probably qualifies.
The compatibility list only shows the original mod when there are reposts with the same unique ID; in this case the repost would get added to the workaround summary since the original is broken. (If the mod was changed into a redux/continuation with a new ID, then it would have its own entry to match.)
u can revert it to the state w/ the original mod page link + workaround link to new mod page if u want 
i did the change cus the new 1.6 compat version of mod didnt get yoink into the compat test and that seems inconvienant for the future
(atra should keep pages up so that i can just link to it instead of writing real nexus page)
Yeah, unofficial updates are pulled into the compatibility testing (since they're actually used in update checks for the original), but mods linked from custom workarounds aren't handled by the main compatibility pass. I'll be looking over those separately after the main updates though.
(Sorry)
I'm new and not sure if this is the right spot for this, but I've been trying to code a mod to make Kigakuen's portraits work, and I finally got SMAPI to load it, but the box is just blank when I talk to the people who are supposed to have a new portrait. I'm not sure why the picture isn't loading and how to fix this
I've tried a few different ways including plain "Load" and a variant of "EditImage" with X Y Width Height defined in a way that let SMAPI load the mod, but it doesn't actually pull up an image - just a blank bo with a shadow.
Are you using Portraiture? Kigakuen's portraits are HD so they won't work with regular CP
Oh! That's why. I know Portraiture is out of date
I have Portraiture, Portraiture Plus, and I downloaded HD Portraits
Aero is supposedly obsolete
Is there a way to get them to work with Content Patcher, or am I out of luck? I also tried the old fashioned way of unpacking, editing, repacking into an xnb, replacing the game file itself on portrait, and that still didn't work (still a blank box)
Nope, CP requires the default game resolution
darn. Maybe if I load them into Pixilart so they aren't HD, then that will work as a CP?
If you shrink them down to 64x64 pixels per portrait, they'd work in CP, but they'd look bad 
Hmmm, any fix on how to make HD portraits work on 1.6?
wren is working on updating it (last i heard), but there's no ETA
For what it's worth, SpaceCore's Texture Overrides feature might work with increases sprite resolution... you'd just have to do it for each one (portrait in this case) instead of simply loading an image
I've never tested it though
Interesting, I might try that
portraiture had a content pack feature
Thank you! btw ^^; very focused
might be borked in 1.6 tho
🤔 portraiture still uses life support pytk right
Oh, hmm, maybe you can't do it with SpaceCore?
From a technical level it supports it, but you can't manually specify the source rect range
That's fixable though
would anyone know how to handle sending info messages to the multiplayer chat? trying to figure it out with my c# mod
Do you want to send them to all players, or only show them for the current player?
all players (:
Why aren't you behaving VS
...ah, that would be why
The big question being... why is it being skipped
Really wish there was a button to toggle more detailed build diagnostics isntead of having to go in settings every time...
You can use Game1.chatBox.globalInfoMessage to send an info message to all players, but the caveat is that it must be a translation in Strings\UI with a Chat_ prefix. For example, Game1.chatBox.globalInfoMessage("SomeExample") will load Strings/UI:Chat_SomeExample on each player, so it's shown in their language.
Alternatively, if you don't mind the message only being visible to players who have your mod installed, you could send a message through SMAPI's multiplayer API to your own mod on every connected player, and then your mod code can add a local info message to the chatbox (which doesn't have the same restriction).
I like the idea of using the SMAPI way of doing it, but my mod is a cheat mod so I want hosts or clients whoever to know when a cheat is being used, so they can decide if they want to play with said person, so probably best if I figure out the way you're talking about with making it a translation
Well, the catch-22 is that the translation would need to exist on the receiving players' computers too... which would require them to install the mod too.
ah, so my best bet is probably the smapi anyways
No idea why this happened but restarting VS seems to have fixed it, weird
That said, you don't necessarily need to notify players through chat. SMAPI sends the list of mods you have installed to other players (to enable things like the mod messaging API), so host players can install mods like Anti-Cheat Server to detect and block specific mods.
oh fantastic, so if someone cares enough about it such a thing is already in place
Yep.
perfect! thanks very much
Welcome!
usually you want to have everyone match their mod lists though, to avoid potential problems
even tho some mods r theoretically fine to use without all players it's just less headache when troubleshooting
ideally but my mod could just be grabbed by some client that wants to start cheating 🤣 was trying to build in some kind of prevention settings for hosts or at least info
Hmm... I don't think this worked properly...
big
Probably works for certain spritebatch calls but not others
at least something is happening
tbh given the prevalence of cjb cheats/item spawner if someone was gonna cheat they would have
trust your friends who trust in you
that's kinda how I left it for people before, was trying to be clever about it but it's tricky
XD if people are so worried about playing with cheaters, then maybe find someone else, i feel... idk if that makes sense
yeah that's my stance but I have my mod on nexus so I didnt want sneaky cheaters to get away with it is all
@ivory plume would you happen to know off the top of your head how I could access something like being charged for the purchasing qi coins dialogue? had 0 luck finding it so far and I just assume your knowledge of the games code is crazy 🤣
Specifically trying to find it in the decompiled game code, not sure where dialogue purchases like that are kept
That would be in Menus/ShopMenu.cs. If you're trying to make purchases free, the easiest way would be to edit the shop inventory after the ShopMenu is opened to reduce all prices to zero.
thanks, I'll look deeper there
Note stuff like anti cheat won't be disabling mods, it would block users that have them
I crashed the game wooooo
I'm not sure how though
Well, maybe I know
Got this when I hot reloaded.
[21:44:14 ERROR SMAPI] An error occurred in the game's draw loop: Failed loading type 'SpaceCore.Content.StardewFunctions.ContentPatcherTokenFunction': TypeLoadException: Could not load type 'SpaceCore.Content.StardewFunctions.ContentPatcherTokenFunction' from assembly 'SpaceCore, Version=1.26.2.0, Culture=neutral, PublicKeyToken=null' due to value type mismatch.
at SpaceCore.Patches.SpriteBatchPatcher.Before_Draw_4(SpriteBatch __instance, Texture2D& texture, Vector2 position, Nullable`1& sourceRectangle, Color color, Single rotation, Vector2 origin, Single scale, SpriteEffects effects, Single layerDepth)
at Microsoft.Xna.Framework.Graphics.SpriteBatch.Draw_PatchedBy<spacechase0.SpaceCore>(SpriteBatch this, Texture2D texture, Vector2 position, Nullable`1 sourceRectangle, Color color, Single rotation, Vector2 origin, Single scale, SpriteEffects effects, Single layerDepth)
at StardewValley.LightSource.Draw(SpriteBatch spriteBatch, GameLocation location, Single lightMultiplier)
at StardewValley.Game1.DrawLighting(GameTime time, RenderTarget2D target_screen)
at StardewValley.Game1.DrawWorld(GameTime time, RenderTarget2D target_screen)
at StardewValley.Game1._draw(GameTime gameTime, RenderTarget2D target_screen)
at StardewModdingAPI.Framework.SGame._draw(GameTime gameTime, RenderTarget2D target_screen)
I assume something got rewritten upon load and the hot reload wasn't so Problems ™️
I don't think Harmony plays well with hot reload, if they happen to touch the same code?
Well, I don't see any rewrites in the SMAPI log
[21:33:16 TRACE SMAPI] SpaceCore (from Mods\SpaceCore\SpaceCore.dll, ID: spacechase0.SpaceCore, assembly version: 1.26.2)...
[21:33:16 TRACE SMAPI] Loading assembly 'SpaceCore.Content.Parser.dll'...
[21:33:16 TRACE SMAPI] Loading assembly 'SpaceCore.Content.Engine.dll'...
[21:33:16 TRACE SMAPI] Detected game patcher in assembly SpaceCore.dll.
[21:33:16 TRACE SMAPI] Detected possible save serializer change (StardewValley.SaveGame.farmerSerializer field, StardewValley.SaveGame.locationSerializer field, StardewValley.SaveGame.serializer field) in assembly SpaceCore.dll.
[21:33:16 TRACE SMAPI] Loading assembly 'SpaceCore.dll'...
This is just a prefix patch, and I'm pretty sure I've hot reloaded for those before
OH
I changed that method in particular to be a potentially skipping prefix (ie. return type void -> bool)
How did hot reload work at all though
thats usually what hot reload does for me when i do something like that
I thought hot reload was supposed to error and not let you when you do stuff like that
i guess if its an annotation patch and isnt directly referenced anywhere it thinks its fine
Ah