#making-mods-general

1 messages · Page 110 of 1

teal bridge
#

If this is a TAS tool then I'm guessing it wants to be frame-accurate, and probably the idea is to smash a rock and then immediately smash again as soon as the animation ends, etc.

narrow vault
#

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)

amber adder
#

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)

teal bridge
#

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).

narrow vault
ivory plume
#

(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.)

teal bridge
#

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.

ocean sailBOT
teal bridge
#

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.

narrow vault
narrow vault
teal bridge
#

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.

narrow vault
#

that if would be replaced with the logic for animation cancelling later on, if i can figure out how to do that part

teal bridge
#

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".

narrow vault
#

yeah, i will worry about the tas specific speed strats later on, for now the overall concept needs to be working first

teal bridge
#

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.

narrow vault
indigo yoke
#

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.

acoustic summit
#

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

rancid temple
#

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

acoustic summit
#

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

indigo yoke
acoustic summit
#

Thats a fair complaint

rancid temple
#

One mod works and the other doesn't, I wonder which one is broken

acoustic summit
#

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

rancid temple
#

Sure, in that instance it was right to message you, though it's only a similar situation

acoustic summit
#

To the user its the same situation

rancid temple
#

Yes well, users arthur_fist_intensifies

narrow vault
#

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

indigo yoke
#

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

acoustic summit
#

So its like, well it was working (To the user)

rancid temple
#

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

indigo yoke
uncut viper
#

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

hallow prism
#

yeah i get why users may do that, i usually encourage them to directly report to the related mod instead when possible

rancid temple
#

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

narrow vault
uncut viper
#

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

hallow prism
indigo yoke
#

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)

calm nebula
#

Stuff like "unexpectedly changing your api methods"

#

Or "unexpectedly changing your mod ID"

narrow vault
uncut viper
#

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

calm nebula
#

That would have gotten you to the "yeah no no more compat ever" on my list

hallow prism
uncut viper
#

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

hallow prism
#

(which is fine by me, no one owes me a change, but i also do not really want to redo the whole maps either)

narrow vault
uncut viper
#

you wouldnt

torpid ridge
#

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?

uncut viper
#

you can, of course, feel free to

#

like you said, you are the mod author

hallow prism
#

better name of your mod has the name field

#

you don't need to change the mod id for that

uncut viper
#

you will not be supported in changing your uniqueid

calm nebula
#

But don't get surprised if people no longer want to bother with compat with you in the future

narrow vault
hallow prism
#

no

uncut viper
#

its often that

hallow prism
#

that is a naming convention

uncut viper
#

from convention

hallow prism
#

it's not set in stone

uncut viper
#

its recommended to be a combo of that bc those two things in combination mean they will always by definition be unique

hallow prism
#

you can change your name at any time WITHOUT needing to change the id

uncut viper
#

if everyoine follows it

narrow vault
#

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?

uncut viper
#

like i said, i didnt say it applied here

indigo yoke
uncut viper
#

if you arent maintaining an API, you can do what you want with the structure of your code

hallow prism
#

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

narrow vault
uncut viper
#

even most people who do unofficial updates and rewrite an old mod that wasnt theirs keep the uniqueid with the old author

calm nebula
hallow prism
#

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)

calm nebula
#

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

hallow prism
#

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"

brittle ledge
#

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

narrow vault
indigo yoke
hallow prism
#

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

brittle ledge
uncut viper
#

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

hallow prism
#

they can deal with the report about "yeah well, the author changed id so i'll fix that when i can"

brittle ledge
#

they usually let the mod author know because they want to do cross-compat and are excited about it

hallow prism
#

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"

brittle ledge
#

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

rancid temple
#

dogekek I can't even get the people who have downloaded my mods to tell me when my shit isn't working

uncut viper
#

at the very least it would be common courtesy to include breaking changes like that in the changelog

hallow prism
#

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

narrow vault
uncut viper
#

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

narrow vault
hallow prism
#

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

uncut viper
#

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

hallow prism
#

(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)

narrow vault
#

that reminds me, i still need to someday upload my source to github (haven't gotten around to it yet)

acoustic summit
hallow prism
#

(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)

brittle ledge
#

(so not worth it)

narrow vault
lucid iron
#

it's ok ill only look at ur code if it breaks my code

indigo yoke
# uncut viper at the very least it would be common courtesy to include breaking changes like t...

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.

uncut viper
#

if its courteous to do and common in the community, i think that fits the definition of common courtesy

brittle ledge
#

Other communities and what they do aren't relevant

uncut viper
#

dont know why i would be assumed to be talking about other modding communities if they're not the ones we're modding in

indigo yoke
acoustic summit
#

Common courtesy dosnt have to be required for functionality either, sometimes its just to ease things. (As a response to the second quote reply)

indigo yoke
#

They then narrowed to just this community while I was typing my reply and I left it in.

uncut viper
#

"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"

drowsy pewter
#

Um..

uncut viper
#

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

drowsy pewter
#

Is there a specific scenario we're still trying to solve?

acoustic summit
#

I think its more in the "general" category of conversation now haha

uncut viper
#

there was a relevant impetus to the conversation initially but its not really relevant anymore, no

hallow prism
#

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

uncut viper
#

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

brittle ledge
hallow prism
#

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

drowsy pewter
#

me too

hallow prism
#

and yes, there's changelog but

narrow vault
indigo yoke
# drowsy pewter Is there a specific scenario we're still trying to solve?

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).

hallow prism
#

i wish i had a way to have ONE line in the dl summary or something

drowsy pewter
#

Ok

hallow prism
#

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

brittle ledge
hallow prism
#

better deal with optional dependency

#

yeah! i will likely put here in a few place

uncut viper
#

(i also never said anything was needed)

indigo yoke
#

One thing I do agree with 100% is that the changes should always be listed in the logs

drowsy pewter
#

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)

uncut viper
#

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

shadow pagoda
#

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.

hallow prism
#

with nexus it's the best approach, do whatever i can, and hope for the best 😄

zenith steppe
#

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?

indigo yoke
# uncut viper (i also never said anything was needed)

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.

drowsy pewter
#

MoonSlime.

indigo yoke
#

it might not have been your intention but it absolutely came off like that

drowsy pewter
#

So just check what that is

mellow knot
mellow knot
#

like dont add to it if its not in the objects.json ( is what i meant to write)

zenith steppe
acoustic summit
#

"QL_BishopsLace" is the id

brittle ledge
#

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.

mellow knot
#

so thats what you use. you dont add the modid to it

zenith steppe
#

Gotcha! Thank you kindly all! ❤️

mellow knot
#

its best practice to have it in there so you would see it like that often but its not required

#

yw!

drowsy pewter
#

I was reading this like "Oh it says wildflowers so it's one of wildflour's mods, glad she's here to answer"

hallow prism
#

(note that the ModID_ItemID is a convention and for various reasons isn't used by all mod)

mellow knot
#

i use PC's flowers hehehe so i know they dont follow the convention

hallow prism
#

(so mods can have different mod naming)

mellow knot
#

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

zenith steppe
#

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!

acoustic summit
#

Sometimes I'll use an abbreviated mod id as a prefix instead of the whole thing

zenith steppe
#

So I was like, okay, I must change these to the ObjectID so that it'll get the right pansy or peony!

hallow prism
#

i have that for my npc, at the time there was no modid token

indigo yoke
#

wildfour's flowers are so pretty

hallow prism
#

so i had a short id rather than a long one

brittle ledge
#

yeah, all my old mods are pre-1.6 so my naming conventions are not great SBVLmaoDog

mellow knot
#

thanks Moonslime! i work with a lot of very talented artists heheh so im glad their art gets appreciated

drowsy pewter
brittle ledge
#

but they should be unique enough that they're not conflicting with anything

zenith steppe
#

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.

hallow prism
#

i would have advertised serene meadow but with that mod number you probably already got it

zenith steppe
#

I have Serene Meadows! And VMV!

hallow prism
#

so the only conclusion i can make is that i need more pretty flowers

green patrol
#

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)

Stardew Modding Wiki

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.

hallow prism
#

a thing i would want anyway

zenith steppe
#

Yes please! ❤️

hallow prism
green patrol
#

what's that?

hallow prism
#

so

#

basically a recipe to be sold in a shop needs a matching internal name and recipe id

uncut viper
#

(love that we call it the cookie trick. like speedrunners naming glitches after arbitrary things or people)

hallow prism
#

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)

rancid temple
#

I think flavored items in recipes can only be done with SpaceCore overrides though right?

hallow prism
#

i don't remember the exact field name, hence the trick of "cookie" because searching for cookie in shop data will show an example

old edge
#

Is it possible to move players position a bit to the left here so it's more aligned. My farm is an island 🏝️

hallow prism
#

it depends if it's recipe using kimchi (like kimchi fried rice) or recipe to make kimchi

green patrol
#

using kimchi

hallow prism
#

i am assuming the first (in which case kimchi is an ingredient and will be fine once the cookie trick is used)

green patrol
#

kimchi itself is produced by a machine called an onggi

brittle ledge
#

(korean food mod? 👀 )

rancid temple
#

Would it not just accept all flavors of kimchi then?

hallow prism
#

it's like using vine or honey

#

if the flavor is on the display name

green patrol
#

(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)

drowsy pewter
#

kimchi wishes

green patrol
#

so just having the basic ID of the unflavored item would be enough then gotcha

drowsy pewter
#

yes, they all have the same id

green patrol
#

pog it works, tyvm everyone :)

brittle ledge
royal stump
brittle ledge
#

well, i stand corrected then SDVpufferheart

#

actually I sit corrected because there is a cat on me and I can't get up

next plaza
#

Not yet anyways

next plaza
calm nebula
royal stump
#

SDVpufferthink todo: trigger actions to check the actual device clock & open default browser to a url (tax site)

calm nebula
#

Todo: game automatically shuts off if it detects the computer clock is after 11pm

uncut viper
#

don't be silly
GSQ is much better suited to checking the clock

calm nebula
#

Todo: pomodoro

royal stump
#

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 SDVpuffermlem

#

ig the game's internal runtime is fine for that anyway

uncut viper
#

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#

royal stump
#

yeah, I don't think anything exposed to CP allows for it yet

next plaza
calm nebula
#

Yay!!!

long jungle
#

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.

teal bridge
#

Prepare for some Harmony patching.

#

(Unless someone already wrote a framework for it)

uncut viper
#

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

narrow vault
# teal bridge Prepare for some Harmony patching.

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

teal bridge
#

Well, I'm not gonna say I told you so, but...

narrow vault
#

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

teal bridge
#

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.)

narrow vault
#

cause all that i changed that does break fishing is that the in game time can be outside the default 600-2600 range

teal bridge
tight rivet
#

hah

#

Me: I'm done modding starts playing to 100% the game

narrow vault
tight rivet
#

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

teal bridge
# narrow vault ok, that looks like i might have to manually test those two mods together specif...

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.

narrow vault
#

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

tight rivet
#

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?

uncut viper
#

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

tight rivet
#

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

teal bridge
narrow vault
teal bridge
#

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.

narrow vault
#

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

lucid iron
calm nebula
#

No

teal bridge
#

No skeumorphism pls...

calm nebula
#

You start with just wires and string

#

And build a radio that way

narrow vault
calm nebula
#

(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.)

teal bridge
#

That is in reference to the radio knob discussion, not your night shift mod.

narrow vault
tight rivet
teal bridge
#

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).

tight rivet
#

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.

calm nebula
#

I'm very confused as to what your mod is going to do tbh

teal bridge
#

Ham radio, maybe? There's already a jukebox so I don't imagine it's intended to be just "jukebox but worse".

calm nebula
#

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.)

teal bridge
#

I can't say I ever even noticed that... I never spend that much time in one location.

hard fern
#

There's a jukebox?

brave fable
#

honestly i'm shocked we don't have to write down everyone's phone numbers

hard fern
#

DJ mod for sdv. join sam on his music journey

#

XD

lucid iron
narrow vault
crimson meteor
#

Hey guys, I made this texture pack, how are you? I need to fix some textures that are not squared.

gaunt orbit
#

They look fine to me? What's wrong with them

brave fable
#

jesus why do i keep making menus with books in them. sorely underestimated how hard it is to draw a looped notebook

drowsy pewter
#

there is one in the game art

brave fable
#

if i see an ingame notebook i'll just start drawing that one instead lol

drowsy pewter
#

actually no idea if this is from game art or if it's mine

#

looks like mine circa 2019 cause it's lowkey bad

next plaza
#

I don't recognize it

drowsy pewter
#

this is the one from vanilla

uncut viper
#

pretty sure thats a surface mounted chip in need of soldering

drowsy pewter
#

So true

brave fable
#

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

drowsy pewter
#

OH

#

That's too many pixels for me to help with

brave fable
#

yeah it's kind of a task haha

teal bridge
#

(I'm probably going to wish I hadn't suggested that)

calm nebula
#

Yup

#

You'll have to solve for the passband frequency

narrow vault
#

like, one knob applies a pitch shift, a second applies a phlanger, a third applies a chorus

lucid iron
#

Find secret gotoro number stations

calm nebula
#

Cool!

#

You're now in charge of making it

#

I expect it on my desk next week

narrow vault
uncut viper
#

(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)

narrow vault
narrow vault
#

altho i do remember there being a functional language specifically for building audio effect chains

lucid iron
#

Button I thought you got the pitch stuff working, somewhat

uncut viper
#

the problem is moreso working with monogame/XNA/whatevers audio system

#

oh, no, i couldnt even get that to work right

lucid iron
#

F

uncut viper
#

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

brave fable
#

"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

drowsy pewter
#

Is there something in the SMAPI log that says what language a person is playing with?

brave fable
#

LocalizedContentManager has the entire language info
oh in the log. oop

crimson meteor
#

A question, does anyone know where the .xnb file for the explosive ammunition is located?

lucid iron
#

Well I hope you aren't making xnb mods

#

Should be on springobjects tho

#

Maps/springobjects

crimson meteor
uncut viper
#

extremely incompatible and highly breakable

#

and no point when Content Patcher can do them safely

brave fable
#

!xnb

ocean sailBOT
#

XNB mods often break the game and are not recommended. See:

For mod creators, see editing XNB files for help unpacking & editing them (including for use with Content Patcher).

crimson meteor
#

I really don't know how to do it with content patcher

rancid temple
#

!cp

ocean sailBOT
uncut viper
#

(i believe this is an English-only server btw just a heads up, excluding certain channels but not this one)

brave fable
#

CP is extremely simple to use, and there's plenty of examples out there

#

any mod you download shows exactly how they did it

lucid iron
#

Imagine if I want to edit parsnip (springobjects) and button wants to edit pumpkin (springobjects)

uncut viper
lucid iron
#

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)

teal bridge
#

Hey there, I got some patches for your patch patches that patch the other patches

dense crane
#

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?

uncut viper
#

the right way to do it would probably to not use those fields at all tbh and just go for the qualifieditemid

dense crane
#

oh, qualifieditemid?

uncut viper
#

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?

subtle saffron
#

Would it be possible for a mod to alter the lines of another mods i18n default.json file?

uncut viper
#

no

#

technically yes but practically n o

dense crane
subtle saffron
#

thought so, thank you 😭

uncut viper
#

you'd need to go around all the barriers in place

#

they can overwrite fields to use their i18n instead though

uncut viper
brittle pasture
#

parentSheetIndex was the old 1.5 way of identifying item

brittle pasture
#

(for context)

#

for 1.6 yeah use qualified item ID instead

uncut viper
# subtle saffron oh?

the same way you're setting, say, DisplayName to be {{i18n: whatever}} they can also just overwrite DisplayName after you to change it

dense crane
#

ah yeah i made my mod before 1.6 released, so that makes sense

uncut viper
#

but they cannot affect your default.json itself

subtle saffron
#

ahhh

brittle ledge
#

yeah, basically you have to edit the same fields/dialogue keys the original mod is and then point it at your i18n instead

subtle saffron
#

oh.. ew 😭

uncut viper
#

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"

brittle ledge
#

yeah, just re-editing the same key is way easier

uncut viper
#

dont think any mod ever actually has

teal bridge
#

Imagine the bug reports.

uncut viper
#

the beauty and risks you accept when letting arbitrary .dlls run on your computer

dense crane
#

so hypothetically, i would replace obj.parentSheetIndex == 390 with obj.QualifiedItemId == "(O)390") for example? or whatever the item ID is?

brittle ledge
#

(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 SBVLmaoDog )

dense crane
#

thanks a ton!

shadow pagoda
#

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?

teal bridge
#

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.

uncut viper
#

you'd need to use reflection to fool-proofedly get the actual file anyway, so you get to do the fun of both SDVpuffersmile

#

no guarantee that their mods folder structure is what the default is, after all

teal bridge
#

GMCM is for configuration only, if you want general-purpose in-game UI then you have to build general-purpose in-game UI.

uncut viper
#

not even a guarantee its the same structure that the mod author uploaded it in

subtle saffron
#

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

uncut viper
#

the way to overwrite them is to edit the same things they do and make yours higher priority

teal bridge
#

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.

uncut viper
#

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

teal bridge
#

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.

uncut viper
#

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 SDVpuffersquee

brittle ledge
#

editing dialogue keys shouldn't be too terrible though 🙂 it'd be just like adding dialogue to a character.

hard fern
#

😅 my npc has a full walk cycle that has been de-abbyfied

subtle saffron
#

Editing keys is fine, But is probably gonna take a hot minute locating where every key is actually located

brittle ledge
#

(which mod are you rewriting, out of curiosity?)

teal bridge
#

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.

uncut viper
#

it would probably be very easy

teal bridge
#

It would involve Harmony to do safely, but not crazy difficult.

uncut viper
#

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

teal bridge
#

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.

uncut viper
#

i wonder if simply replacing one mods translation helper with another mods translation helper would work or if itd cause catasrophic bugs

teal bridge
#

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.

uncut viper
#

i wonder if simply replacing one mods translation helper with a combined set of it and another mods translation helper would work or if—

teal bridge
#

Hahaha, well at that point I think it's easier to just write the transpiler.

subtle saffron
#

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

teal bridge
#

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.

subtle saffron
#

It was not fun locating every line that needed changing in the base game files, And I was hoping not to do that again

uncut viper
#

true. that should be handled if you just make it a custom asset though that people load their i18n files into

teal bridge
#

But it's not a huge project. I'd estimate about a week to get it to a reasonable level of polish.

uncut viper
#

like a unique ID to i18n list dictionary or somethin

brave fable
#

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)

uncut viper
#

well, ive already done it, so i guess my answer is yes

teal bridge
#

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.

uncut viper
#

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

teal bridge
#

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.

uncut viper
#

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"

brave fable
#

oh i hate the thought of having every single i18n entry given an annotation

uncut viper
#

(not that itd stop them)

brave fable
#

that's worse than reflecting someone's translations away

teal bridge
#

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.

teal bridge
brittle ledge
uncut viper
#

tbh, i think itd be more trouble than its worth to even allow anything other than full opt in

brittle ledge
#

Lemme just check the Ridgeside files real quick....

teal bridge
#

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.

uncut viper
#

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

teal bridge
brave fable
#

ah yes public marriage_Mon_1

uncut viper
#

other mods can already screw with their UI strings

teal bridge
#

Or the names of their configuration values. Etc.

uncut viper
#

not the config stuff i suppose

teal bridge
uncut viper
#

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

brittle ledge
#

Heliax: Yeah, the keys for dialogue seem to all line up like so:

teal bridge
#

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.

uncut viper
#

light mode flashbang

brittle ledge
#

So for the dialogue at least, you could just search for Pierre and find the i18n key, and derive the dialogue key from that.

teal bridge
#

Light mode FTW

uncut viper
#

that said

brittle ledge
#

(Sorry, my Notepad++ is on light mode because I've never bothered to switch it SBVLmaoDog )

uncut viper
#

there is actually a much easier way now

#

with i18n subfolders

teal bridge
uncut viper
#

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...

teal bridge
#

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.

uncut viper
#

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

rancid temple
#

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

brittle ledge
calm nebula
#

pick a good terminal if you liek yourself

teal bridge
#

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.

uncut viper
#

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

brave fable
teal bridge
#

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.

uncut viper
#

you could just have them keep all their i18n files as is, and just add an extra one as a blacklist

brittle ledge
#

windows 11

found the problem

subtle saffron
# subtle saffron mhm

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.

uncut viper
#

though, SMAPI would complain about the duplicates

subtle saffron
#

However the means of having my mod direct my altered lines to those keys will still be a tad tedious

brave fable
#

windows 10 makes me retch

teal bridge
#

That's weird. I'll take 10 over 11 any day.

brave fable
#

at least 11 looks good while being the exact same bad

hard fern
#

I like how i can have 20 different file explorer tabs open

brittle pasture
#

LINUX CLEARS RAAHH sorry I saw the word Windows and I passed out

brittle ledge
subtle saffron
#

mhm

teal bridge
#

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.

subtle saffron
#

I could also just be real lazy with it, and just included altered i18n files for the mods I've altered 💀

uncut viper
#

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

teal bridge
#

Yes, I'm well aware of the history of that debate.

brittle ledge
uncut viper
#

couldnt remember if you were here at the time SDVpuffersquee my sense of time is no good

brittle ledge
#

Plus you'd have to make sure your replacer i18n is the entire i18n

brave fable
#

would you need to? you could just have a partial i18n that overrides only the included keys, as well as adding any new keys

teal bridge
uncut viper
brittle ledge
#

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

brave fable
uncut viper
#

two different convos!

brittle pasture
#

How does the new split i18n feature handle duplicate keys/load order

teal bridge
#

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.

uncut viper
#

me and focustense being nerds and tiakall and heliax talking about actual actionable things here

teal bridge
uncut viper
#

i think selph meant the actually added in smapi split i18n files feature? the i18n subfolders

brittle pasture
#

Yes

teal bridge
#

Oh. That makes sense too.

brittle pasture
#

maybe we can go that route and pray the user doesn't open bug reports from the warnings

uncut viper
#

its literally just "foreach json in folder -> foreach key in file -> add to dictionary" instead of "foreach key in default.json -> add to dictionary"

teal bridge
uncut viper
#

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

calm nebula
distant radish
#

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

uncut viper
#

(also, middle finger emoji to XACT for making one of its structs internal that i wanna poke around in)

#

(xna. xact. whatever it is)

calm nebula
#

or have we moved on to fm decoding yet?

brittle pasture
#

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"

calm nebula
teal bridge
#

Developers, take note: Button cares not for your petty "encapsulation" and "accessibility" concerns.

uncut viper
#

dont know how to use one to be honest. seen em talked about. never looked into it

rancid temple
#

I believe G for an event preconditions is still on one of the migration pages

uncut viper
#

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

teal bridge
#

I don't think you do. I didn't ship an extra DLL with RadialMenu.

calm nebula
#

no you don't need to ship an extra dll

uncut viper
teal bridge
#

You may need to include an extra DLL in your source, but it doesn't get deployed.

uncut viper
#

and if i use a publicizer i can just do like RpcVariable[] list = blabla in my code and it'll just... work fine later?

calm nebula
#

yup

teal bridge
#

If the type actually exists and is private, it will become public.

uncut viper
#

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

teal bridge
#

(Please, use this feature responsi... oh, forget it, who am I talking to)

lucid iron
#

Button FM radio mod ukimasu

rancid temple
#

Wiki is still being slow, so who knows if I'll ever find it

uncut viper
#

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

teal bridge
#

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.

next plaza
#

Wow, I missed the i18n conversation 😔

teal bridge
#

It's what you want in order to avoid having to ship an extra DLL.

subtle saffron
#

(Thanks for all the help everyone, sorry for sparkin up an old debate 💀 )

next plaza
#

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?

brave fable
calm nebula
#

(yeah, the package needs to exist at compile time but it's actually irrelevant at runtime.)

next plaza
#

However, Shockah's Project Fluent mod allows content packs to override translations from other mods

uncut viper
next plaza
calm nebula
brave fable
#

well the game, it won't be much use to me if only you have it

teal bridge
calm nebula
uncut viper
#

(so wait, whats the IncludeAssets part with runtime, build, native, etc? do i need that too?)

brave fable
#

it'd be a huge power play though

brittle ledge
next plaza
#

implying dark title bar has functionality that's useful

brave fable
#

it.... looks good

#

and dark and stuff

calm nebula
teal bridge
uncut viper
#

ill just... copy these lines in their entirety then SDVpuffersquee

#

thank you!

next plaza
#

Yeah IncludeAssets isn't even mod build config

calm nebula
#

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

next plaza
teal bridge
#

Yeah, I mean I know what it does in theory, I've just never seen it actually affect project output in any way.

next plaza
#

The valid values are listed there too

uncut viper
#

which, it technically is

calm nebula
#

I think you do need buildtransistive though for these sourcegenny projects

teal bridge
uncut viper
#

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

teal bridge
#

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.

teal bridge
calm nebula
#

I think the answer is "probably but what is this"

next plaza
uncut viper
calm nebula
#

also, like

uncut viper
#

oh

calm nebula
#

have you heard of the good word of dependabot?

uncut viper
#

nope!

calm nebula
next plaza
#

I don't really get dependabot stuff for my mod repo which I find kinda weird

#

...Unless I just missed it

uncut viper
#

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

next plaza
#

Oh do you have to turn it on?

#

I didn't realize that

calm nebula
#

yup

#

you have to turn it on

teal bridge
#

I think GitHub has built-in dependabot stuff for reporting vulnerabilities, but it doesn't automatically update your packages, that's definitely opt in.

calm nebula
#

yeah, but it sends you an EMAIL OVER IT

#

and you can just accept the PR and be on your merry way

lucid iron
#

How do I turn it off

#

I have old nodejs thing it keeps bugging me about

calm nebula
#

smash your laptop against the wall and go swimming instead

#

(delete the dependabot.yaml file)

next plaza
#

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

calm nebula
#

neither have I, but like, main has been frozen for more than a year at this point lol

teal bridge
lucid iron
#

I'm not powerful enough to ignore the pingCat

next plaza
#

Email filters? What's that?

teal bridge
#

Yeah, you youngins grew up with adblockers, you've never experienced the web as it truly is.

next plaza
calm nebula
#

oh god

#

I would have died in college without email filters

#

literally died

next plaza
#

(I have a few at work that were set up for me)

teal bridge
#

We old farts have learned to ignore everything, no matter how big and blinking.

calm nebula
#

(I don't need them now much at work, since, well.)

next plaza
#

Yeah, I don't recall ever actually clicking on an ad

#

Even if I use adblockers now

teal bridge
#

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%

next plaza
#

Me everytime I try to look at Nexus on my phone (it logged me out and I'm too lazy to log in)

uncut viper
#

(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)

next plaza
#

One day I'll bother with publicizer instead of using reflection

brittle pasture
teal bridge
#

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.

calm nebula
#

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

next plaza
#

Yeah

calm nebula
#

hi tia!

brittle ledge
teal bridge
#

Reflection is good when you really actually don't have all the info at compile time.

next plaza
#

I'm just super lazy SDVpufferdab

calm nebula
#

I love reflection

lucid iron
#

What is the mechanism behind publicizer?

calm nebula
lucid iron
#

It is not just fancy reflection right

calm nebula
#

I will argue with you over this

teal bridge
lucid iron
#

I think casey should be more lazy, like cat

next plaza
calm nebula
calm nebula
teal bridge
#

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).

brittle ledge
uncut viper
#

that said i thought a publicizer was supposed to not give me FieldAccessException errors SDVpufferthink

calm nebula
#

oh did you mark your binary unsafe

uncut viper
#

i dont even know what it means to do that or how

uncut viper
#

i just installed the nuget package and told it to publicize Everything

next plaza
#

Depression gang!

uncut viper
#

why is that necessary?

teal bridge
#

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.)

next plaza
calm nebula
#

that's a lot!

teal bridge
#

Is that LOC or LOEC?

next plaza
#

LOC

brittle ledge
#

"only" doing a lot of heavy lifting there

next plaza
#

LOEC is almost 7k

rancid musk
#

I wonder how many lines of code my Stardew stuff is

#

Too many I expect

teal bridge
#

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.

next plaza
#

I wonder if I loaded all my csprojs and added them all up how much it would be

uncut viper
calm nebula
#

weird

next plaza
#

(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)

calm nebula
#

works for me SDVpufferthinkblob

next plaza
#

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

calm nebula
#

can't you select multiple?

next plaza
#

Hmm, good point

teal bridge
#

Actually, I did not even add <AllowUnsafeBlocks> to RadialMenu and it still works fine, so... hm.

next plaza
#

Okay, this count is gonna be inflated since it seems to count shared projects in each project SDVPufferThink

#

(ie. it says Spenny is almost 4k, but doing the dropdown says 34 for the project code specifically)

teal bridge
brittle pasture
#

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

lucid iron
#

how do u check loc

next plaza
next plaza
#

In VS at least

teal bridge
#

Get there by View -> Other Windows -> Code Metrics Results

brittle pasture
#

git ls-files | grep '\.cs' | xargs wc -l if you're a fellow caveperson

teal bridge
#

That's probably more accurate vis-a-vis shared projects, but won't give you LOEC.

uncut viper
next plaza
#

When you export the results to Excel with the button in VS, it shows it by namespace SDVPufferThink I can probably take out the spaceshared stuff with a little manipulation

rancid temple
#

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

uncut viper
#

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

lucid iron
#

sdv has the soundbankwrapper thing

#

around actual soundbank

subtle saffron
#

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?

lucid iron
#

(did that get added bc of people playing sdv without audio devices?)

teal bridge
#

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.

uncut viper
#

not in the least, though it is the publicizer thats allowing me to just write the fields directly

next plaza
#

LOC and LOEC for all my mods, + 13k/4k for S&S

teal bridge
#

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.

uncut viper
#
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

next plaza
uncut viper
#

(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)

teal bridge
#

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.

lucid iron
#

what if its DummySoundBank

uncut viper
#

well i didnt get any errors indicating that it fails to initialize XACT, so it shouldnt be

next plaza
#

(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)

calm nebula
#

Sadly all I can say is that it works for me

teal bridge
#

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.

calm nebula
#

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.)

next plaza
#

Re mind me in 9 days to pester atra /s

uncut viper
#

my decision to not bother having Rider set up a git repo for me biting me in the ass now

teal bridge
#

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.

uncut viper
#

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)

teal bridge
#

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?

uncut viper
#

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

next plaza
#

Can you even do legacy projects with .net 6?

teal bridge
#

Yeah, there are separate solutions for Mono and .NET Framework.

next plaza
#

Huh, TIL

teal bridge
next plaza
#

It's not the default when I create my new mod projects

uncut viper
#

my very first mod for 1.6 had a very legacy-looking repo that worked until i needed it to not be legacy

next plaza
#

(.net 8, I replace the csproj contents afterwards)

lucid iron
#

sdk just means <Project Sdk="Microsoft.NET.Sdk"> at top of csproj?

teal bridge
#

That's how you can tell, yes.

uncut viper
teal bridge
#

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.

uncut viper
#

i added it after atra pointed it out as a possible cause

teal bridge
#

This is... interesting. Project doesn't even build for me.

#

Oh, it's game folder junk, one moment

next plaza
#

smh Button why is GamePath in your csproj

uncut viper
#

ah yeah, i wasnt sure if you were just gonna copy it or clone it, so i didnt mention

next plaza
#

Use stardewvalley.targets like a proper modder

uncut viper
#

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

calm nebula
#

(hey, I do that too, but also I'm not a modder anymore so.)

uncut viper
#

also, publicizing just Stardew Valley.dll also does not work

calm nebula
#

(I'm very lazy)

next plaza
#

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)

teal bridge
#

Ok, I can repro the error at least, so that's a start.

uncut viper
next plaza
#

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"
next plaza
lucid iron
#

i never figured out where i am supposed to put stardewvalley.targets

next plaza
#

Specifically, that's my stardewvalley.targets in my user dir

#

Not part of my repo

lucid iron
#

putting it in ~/ didnt seem to do anything

next plaza
uncut viper
#

is that not a specific path? i dont know what stardewvalley.targets means

next plaza
calm nebula
#

should just be ~/stardewvalley.targets

next plaza
calm nebula
#

if that doesn't work, open a ticket

next plaza
#

(You should also put your GameModsPath in there, since that would interfere when someone clones your repo too)

uncut viper
#

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

lucid iron
#

i bet past chu spelled it wrong but it works now monS

#

though it might have also been me wanting to switch between 168 and 169

tiny zealot
#

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

uncut viper
#

(i also just personally dont really like the idea of globals so much)

teal bridge
#

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.

lucid iron
#

i use $(MSBuildUserExtensionsPath)/sdv.props rn so i remember that it is actually something i set and not just modbuildconfig automagic

next plaza
#

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>  
  -->
uncut viper
#

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

lucid iron
#

button perhaps us mere mortals are not meant to enroach upon the domain of metatron, the voice of god

uncut viper
next plaza
calm nebula
next plaza
#

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

uncut viper
#

for some reason it hardly ever occurs to me that i can use ILSpy for looking at more than just functions and stuff

teal bridge
#

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.

uncut viper
#

ill be honest i dont know what that part of my csproj does

teal bridge
#

Haha then why do you add it?

uncut viper
#

its in my template that i use for all my mods so i mustve copied it from some initial template

teal bridge
#

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.

uncut viper
#

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

teal bridge
#

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)

uncut viper
#

is there ever a reason why id want to not generate assembly info?

rain flax
teal bridge
#

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.

velvet narwhal
teal bridge
#

Anyway... you're welcome 😉

uncut viper
#

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

lucid iron
#

huh i wonder if that is why the android version of smapi always showed game as 0,0,0,0

#

in the logs

teal bridge
#

Could be, but Android is a whole other ballgame.

uncut viper
#

oh, you know what, i may be stupid

#

let me confirm my stupidity

rain flax
#

i don't want to post them in the wrong place

uncut viper
#

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

velvet narwhal
#

i go post in modded-farmers

uncut viper
#

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

teal bridge
#

Do you have an AssemblyInfo.cs in that project?

uncut viper
#

not as far as i can tell? where would that be

tiny zealot
teal bridge
#

In the root, usually.

uncut viper
#

oh i see it in the obj folder

teal bridge
#

wat

#

How did you get source in the obj folder

uncut viper
#

not the root folder though

#

its on obj/Debug/net6.0

#

i dont know what any of these things are

teal bridge
#

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.

uncut viper
#
[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]

teal bridge
#

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)

uncut viper
#

naw, same errors

#

is it Rider conflicting with it by me maybe setting those variables in rider's solution editor, maybe

next plaza
#

Does the build log tell you where they are?

uncut viper
#

it tells me its those ones i pasted above, in the SpecialPowerUtilities.AssemblyInfo.cs

next plaza
#

Hmm, not any others? SDVPufferThink

rain flax
uncut viper
#

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

teal bridge
#

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.

velvet narwhal
teal bridge
#

I only deleted that attribute we talked about, plus the gamepath/modspath settings.

teal bridge
rain flax
#

gotcha

uncut viper
#

sounds like a job for future me SDVpufferthumbsup

teal bridge
#

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

uncut viper
#

in this case it works on only not my machine apparently lol

teal bridge
#

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.

uncut viper
#

which isnt really a problem, is it? /gen if thery dont need a publicizer or somethin

teal bridge
#

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.

uncut viper
#

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

teal bridge
#

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.

ivory plume
#

(Every assembly has a version. If you don't specify it, the assembly version just defaults to 1.0.0.0.)

teal bridge
#

^ 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.

ivory plume
#

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.

teal bridge
#

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.

ivory plume
#

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.

teal bridge
#

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.

ivory plume
#

Yep, but that's not really different from the majority of mods who just never change their assembly version.

next plaza
#

More people should use Khloe's manifest builder so it's automatic! 😛

calm nebula
#

I would make a joke about decrementing the assembly version if I'd didn't know that would actually break shit

teal bridge
#

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.

ivory plume
#

(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.)

velvet narwhal
calm nebula
#

That's just about everyone when it comes to msbuild tbh

teal bridge
#

Yeah, you should try CMake, or Bazel.

#

MSBuild is pure bliss compared to those.

velvet narwhal
#

nope i'm not in any mood to go back to cmake, not at least until i bother to go back to uni

teal bridge
#

Nothing beats cargo, though.

lucid iron
#

im glad all my things link correctly without me goin in and hardcoding stuff

next plaza
#

CMake SDVPufferSweat

lucid iron
#

cmake my behated

calm nebula
#

No can do. Can I offer you a tsh script a coworker probably wrote before I was born?

lucid iron
#

say is there docs on nexus premium api

teal bridge
#

Do Linux binaries still have the dorky ./configure step?

ivory plume
#

@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.

calm nebula
lucid iron
#

can anyone get access to the download api or do u have to be one of the approved ppl

teal bridge
#

(He did the same thing with Pick Your Enchantment... did you ever actually take the original page down?)

calm nebula
#

No. I'm lazy

#

I'm so sorry

tiny zealot
#

hey are we hating on cmake in here?

teal bridge
#

Haha, it's no skin off my nose, though it is kind of funny, that was more than 2 months ago!

next plaza
lucid iron
next plaza
#

Once you release you'd want to register with Nexus I think

tiny zealot
lucid iron
#

neat, i dun think i am releasing it'll just be smol script

calm nebula
#

(As a general rule anyone taking any of my mods has permission. That's kinda always been the case but...)

teal bridge
ivory plume
lucid iron
#

u can revert it to the state w/ the original mod page link + workaround link to new mod page if u want Bolb

#

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)

ivory plume
#

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.

calm nebula
#

(Sorry)

frozen cedar
#

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.

slender badger
#

Are you using Portraiture? Kigakuen's portraits are HD so they won't work with regular CP

frozen cedar
#

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)

slender badger
#

Nope, CP requires the default game resolution

frozen cedar
#

darn. Maybe if I load them into Pixilart so they aren't HD, then that will work as a CP?

slender badger
#

If you shrink them down to 64x64 pixels per portrait, they'd work in CP, but they'd look bad KR02Shrug

frozen cedar
#

Hmmm, any fix on how to make HD portraits work on 1.6?

tiny zealot
#

wren is working on updating it (last i heard), but there's no ETA

next plaza
#

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

frozen cedar
#

Interesting, I might try that

lucid iron
#

portraiture had a content pack feature

frozen cedar
#

Thank you! btw ^^; very focused

lucid iron
#

might be borked in 1.6 tho

hard fern
#

🤔 portraiture still uses life support pytk right

next plaza
#

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

plucky badge
#

would anyone know how to handle sending info messages to the multiplayer chat? trying to figure it out with my c# mod

ivory plume
#

Do you want to send them to all players, or only show them for the current player?

next plaza
#

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...

ivory plume
# plucky badge all players (:

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).

plucky badge
#

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

ivory plume
#

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.

plucky badge
#

ah, so my best bet is probably the smapi anyways

next plaza
ivory plume
#

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.

plucky badge
#

oh fantastic, so if someone cares enough about it such a thing is already in place

ivory plume
#

Yep.

plucky badge
#

perfect! thanks very much

ivory plume
#

Welcome!

lucid iron
#

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

plucky badge
next plaza
#

Hmm... I don't think this worked properly...

lucid iron
#

big

next plaza
#

Probably works for certain spritebatch calls but not others

plucky badge
lucid iron
#

trust your friends who trust in you

plucky badge
#

that's kinda how I left it for people before, was trying to be clever about it but it's tricky

hard fern
#

XD if people are so worried about playing with cheaters, then maybe find someone else, i feel... idk if that makes sense

plucky badge
#

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

ivory plume
#

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.

plucky badge
#

thanks, I'll look deeper there

lucid mulch
next plaza
#

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 ™️

ivory plume
#

I don't think Harmony plays well with hot reload, if they happen to touch the same code?

next plaza
#

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'...
next plaza
#

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

uncut viper
#

thats usually what hot reload does for me when i do something like that

next plaza
#

I thought hot reload was supposed to error and not let you when you do stuff like that

uncut viper
#

i guess if its an annotation patch and isnt directly referenced anywhere it thinks its fine

next plaza
#

Ah