#making-mods-general
1 messages · Page 148 of 1
Yeah I do use patch reload but some edits require the game to be restarted

Can you share your log please?
Is that what it looks like when it tries to display Korean in the default font?
I know about the massive errors just...
I assume so?
if modders always did what was advisable, would most mods even exist?
/lh
just dont ytell art nme
Sorry DuskyGirl my reply was to rokugin
yell at me
If they aren't errors relating to this problem we can ignore them, most likely
The wiki doesn't have a listing for English translations, you might actually have to swap the en to default and the Korean to ko
default does not have to be english
I think I will just pop that in the wiki so Button doesn't have to repeat this forever lol
2021
it would be quite an inaccessible and english-centric choice to decide default has to be english
That was A Year
Oh
I remember 2021, aka 2020 part 2
The events aren't i18n
two of them are
The event that DuskyGirl is testing is though
one of them is not
the Woods one
Going off this screenshot #making-mods-general message
https://smapi.io/log/910a31e3162f4a04837f1e48532ca7ca
Ignore the portraits and missing saloon thing
https://smapi.io/json/none/2dbca958ad884ce8a07b11fa6e7628f6
and here is the updated json one
top one in the uhh. assets/Data/Events
there's a post about a missing i18n for an event in the mod page
Log Info: SMAPI 4.1.9 with SDV 1.6.14 build 24317 on Microsoft Windows 10 Home, with 110 C# mods and 378 content packs.
Suggested fixes: One or more mods are out of date, consider updating them
and yeah, I know I need to uodate a lot of stuff
I think the chinese translator also had issues with that same issue
Unrelated: It's still complaining about that duplicate entry
complaining about a different duplicate, actually
(Extra unrelated: No More Lag is not a helpful mod. It does not improve performance but it does break other mods and sometimes your game. I'd recommend removing it.)
strange that it didnt catch them both before?
why did the validator only show one dupe warning...
Well these are all duplicated. "NPC.cs.4293": "As expected, I can't understand your actions at all.$3", "NPC.cs.4294": "I'm not sure why you did that...$1", "NPC.cs.3957": "Why are you handing it to me?", "NPC.cs.3955": "Do you know what it means to give this to me?", "NPC.cs.3956": "Are you serious?", "NPC.cs.3971": "That's a funny joke.", "NPC.cs.4293": "As expected, I can't understand your actions.$3", "NPC.cs.4294": "I don't know why it's doing this.$1", "NPC.cs.3957": "Why are you handing it to me?", "NPC.cs.3955": "Do you know what it means to give this to me?", "NPC.cs.3956": "Are you serious?", "NPC.cs.3971": "That's a funny joke.",
okay, I'll de4lete those
keep the first 6
It hurts me inside to see that many updates needed.
Frog, DuskyGirl asked us not to comment on the stuff like that.
I only commented on No More Lag because it's an actively harmful mod.
The fact that the game and SMAPI are not up to date is not likely to be the problem here, right?
it shouldnt be no
isn't the game updated????
you're one minor version behind
aaaa
i wouldnt worry about it
k
can you send your en.json file itself? like not through the uploader
(whats the command to test an event again? debug ebi?)
This will be a Sisyphean battle, I'm afraid... I have to deal with a similar issue on one of my other projects and no matter how many individual users you manage to inform, the collective problem will never ever go away.
Yeah but I'm a tech support volunteer so I chose this life xD
At least I am willing to listen and do what you sayt to do? :>
@brisk rover You leveled up to Cowpoke. You can now speak in our voice channels and share images in all channels!
Yeah, it wasn't a knock on you personally, just a musing about the overall situation.
sorry
You have nothing to apologise for DuskyGirl. They were just talking about the fact that no matter how many individual people I warn that No More Lag is a bad mod to use, it will still get used by everyone I never manage to reach.
Yep... nearly 250 endorsements and over 15k uniques, it's a runaway freight train.
It looks like Button is testing in her game btw. I am trying but I haven't updated anything for ages so all my mods are broken.
ill be honest, i dont know why it doesnt change
it does just keep using default.json
This mod is a mess tbh. The entrance to his home is behind the cannoli statue behind unbreakabhle objects lol
the only way to get in is use a chair, noclip or the move anything mod
all this so you can talk to god
What if you swap to Korean and then back to English?
yep, works if en is default.json instead
i did switch to korean and back, it did not work
i also let the game start in korean and did not work, though i know it does actually start in english and then switch to korean once it loads my settings
lemme test somethin else real quick
Okay so that at least is the fix for DuskyGirl right now? Change en.json to default.json
it works if i change en.json to fr.json
and then switch to french
so its just english it doesnt work for
Weird
which makes me wonder if its Content Patcher weirdness with deciding not to update because it thinks the locale hasnt changed
bc it was en when the game launched
Shouldn't it change if you switch to a different language and back though?
thats what i woulda thought
Like default can definitely be other languages, that much is for sure true
I would ordinarily trust Pathos over the wiki, though it is probably a bit he wrote anyway
But unless there's some problem with CP thinking en is just default, I don't even know where to look for info on how i18n works
you do not, its SMAPI that handles loading the actual files
it puts them into a TranslationHelper thingy which is what CP uses
So it should be possible to write a C# mod to test if it's CP?
i could try editing one of my C# only mods for it rq
This is the wiki page for SMAPI and translations: https://stardewvalleywiki.com/Modding:Modder_Guide/APIs/Translation
Could probably just throw in an en.json into one with wildly different text
If it works it should load it even if you have a default
yeah thats what im doin real quick
though maybe one where the i18n is just used in GMCM wasnt the best one to test with lol
xD
hiya! i heard we were talking translations over here ? 👁️ i scrolled back a bit but i cant exactly tell what the issue is
Not the most user friendly approach, but the base mod also apparently doesn't care about users so it'll fit right in
The issue is that English might have to be default.json after all, I think
Not en.json
name and dialogue work
the fact that its not user-friendly to non-english modders is why i think its a bug somewhere, but i just dont know where
Might have to just bring it up with Pathos when he's back in town
Translation via i18n is SMAPI, isn't it? Not game?
it is indeed
I think having a default at all is not very helpful
It's done through SMAPI but I thought it was something that already existed outside the sphere of SMAPI
I think that's because it's not compatible with SVE?
A default.json that is.
well i think that's done because of the base game
the Translator class constructor sets it to EN... im not actually sure where it checks for a default.json
ive seen other mods have default as another language
You meant i18n at all or translations for the game?
Yeah it was working in Korean with Korean as the default.json
But do en.json translations work in those mods?
i've seen them use en.json in addition to a nonenglish default.json
but i cannot profess to have playtested these mods
It was still using the Korean translation (but unsuccessfully because the game wasn't using the Korean alphabet)
do you happen to know one of those mods off the top of your head?
I wonder if the ones that use the same alphabet as English do work
Christmas debugging ⛄
No that doesn't make sense Aba
i dont think it was a font/alphabet thing though, bc i changed the first line of the event in default.json (when it was in korean) to english text
the english text did show, but it wasnt the text that was in en.json
cracks open the naver guess i'll go diggin
default.json is typically where english would have to go - i havent personally seen en.json used for english translations yet
But Pathos said that it doesn't actually need to be English in default.json and that you can have an en.json
And the first part of that is certainly true, but the second part doesn't seem to be
yeah, I thought default was just the fallback if you didn't have a language specific json
(it wouldnt be feasibly possible for the game to know what language you actually wrote in default.json anyway)
i havent ever seen en.json in terms of english translation of mods, they always are named "default"
its possible thats the case but unfortunately thats not something ive ever seen used 
No, but if en.json doesn't work then any mod that wants to have English available will have to have it as default.json even if it's not the default for the mod-maker.
but i think buttons extra books does actually use it specifically
Yar, tested en.json on my mod and it doesn't work.
since it loads it directly from the file and bypasses the i18n system
for some things
(i pass the CP i18n to my C# component that way but havent noticed any discrepencies. this isnt me pointing out anything useful just responding to cider having never seen it used)
Yeah, I know. But I can live with that tbh
thats interesting!!! now thinking about it typically with other language translations of mods they are named with the language in mind so i wonder why english only works if its titled default and not en
unless the english tag is something else but im not sure what else it would be
the modder guide for translations doesnt actually include the bit about default.json being english
https://stardewvalleywiki.com/Modding:Modder_Guide/APIs/Translation
it says it will look for specific translations first and default.json last
it doesnt include EN as a language, but EN is a valid LocaleEnum code
The other translations wiki page does though
I didn't know we had two different pages
pathos wrote both of em
Yup it is confusing to have two
or at least, the part about default.json being english was there from the start when he made the page, and so is the lack of mentioning default.json being english at the start of the other page
And then also a custom languages page
it makes sense to have a custom languages page at least since thats a lot different and more involved to add in
Oh yeah it does make sense
But I did get mixed up between mod translations and the game languages when I first started looking for info about game languages on the wiki
Likely PEBCAK though haha
i think trying to look into SMAPI's code here to see why en.json does not work is. far beyond my ability though
far beyond my understanding of SMAPI's codebase anyway
i just keep goin in circles
and i would rather not ping pathos on christmas night when hes visiting family lol
Yup my vote is we put this on hold for a while and then ask Pathos when he's available again
It's not like it's urgent
id rather not ping him on new years either!
thank you everyone for your help
He will be gone for a few weeks he said
I wouldn't know what to do withouyt all of you :>
tbh i was gonna ask uber to make a reminder to me to then ask
No problem!
i still feel like in the back of my mind like im missing something obvious but i think i should probably just close ilspy before i lose too much sleep over it 
Hi loves! What's the C# equivalent of HasMod?
Helper.ModRegistry.Get(modId) != null
Thx so much!!!!!!!!!
You sleep now?
Odd that en.json doesn’t work, the translation helper even uses en.json in the comment about what it does
/// <summary>Provides translations stored in the mod's <c>i18n</c> folder, with one file per locale (like <c>en.json</c>) containing a flat key => value structure. Translations are fetched with locale fallback, so missing translations are filled in from broader locales (like <c>pt-BR.json</c> < <c>pt.json</c> < <c>default.json</c>).</summary>
incidentally thats already out of date anyway since we can use multiple files per locale now
Yeah, seams like it is just going straight to default if the games locale is set to English.
Which would make more sense if en.json wasn’t a valid translation code
and the default one it sets to in the Translator constructor, at that
I'm also too tired to trace all this, but the comments in SMAPI suggest it uses an empty string for Locale in english, which might result in it never checking for the actual en set
https://github.com/Pathoschild/SMAPI/blob/develop/src/SMAPI/Framework/Translator.cs
what even is the purpose of using an empty string for that
it's probably really old, but idk, it might be as easy to fix as setting that to "en" instead
i thought it checked LocaleEnum too but like i said, i kept goin in circles with all the functions using each other lol
yeah, I just got sidetracked looking at the other Translation class, which sets a private Locale and then never reads it 
"the inner workings of my mind, are an enigma" n all that
were you able to find where it actually chooses to load "default" instead of another string
I don’t see where it would cascade down to default like it says it does
I thought so, but now I'm lost again 
oh yeah, GetRelevantLocales
there's the fallback down to default there, yeah, I just wasn't sure if it read default.json by getting the empty string there
why would it break if theres no dash
Nevermind I think this is where default gets set ```/// <summary>Get the locales which can provide translations for the given locale, in precedence order.</summary>
/// <param name="locale">The locale for which to find valid locales.</param>
private IEnumerable<string> GetRelevantLocales(string locale)
{
// given locale
yield return locale;
// broader locales (like pt-BR => pt)
while (true)
{
int dashIndex = locale.LastIndexOf('-');
if (dashIndex <= 0)
break;
locale = locale.Substring(0, dashIndex);
yield return locale;
}
// default
if (locale != "default")
yield return "default";
}```
guess it's more likely it falls through into that
So if it is assuming en is empty, then it will always default
so it yields the given locale first, which would be "" when it sets up in english, then breaks because there's no "-", then gets "default"
oh i missed the top yield return
it returns a list of those locales in order, then... so for french for example, it'd be [ fr, fr-FR, default ]?
i wonder if it would be as easy as just changing the single line in the Translator constructor then, since thats where the string.Empty happens
or at least thats a place it happens
Could be
theres 6 things that i can see that call SetLocale and i dont feel like tracing all of them back however many steps
What happens if you put the translation in like an en-EN.json file
I tried en-us and en-uk earlier with no effect
So, it is more likely just ignoring English as a locale
By assuming it is the default locale
But, where is it doing this
the game itself makes EN the default locale i believe
digging around a little more, I think SMAPI itself is getting the more specific language codes from this SDV method in LocalizedContentManager
/// <summary>Get the language string which appears in localized asset names for a language (like <c>pt-BR</c>).</summary>
/// <param name="code">The language whose asset name code to get.</param>
/// <remarks>For the current language, see <see cref="P:StardewValley.LocalizedContentManager.CurrentLanguageString" /> instead.</remarks>
public static string LanguageCodeString(LanguageCode code)
{
return code switch
{
LanguageCode.ja => "ja-JP",
LanguageCode.ru => "ru-RU",
LanguageCode.zh => "zh-CN",
LanguageCode.pt => "pt-BR",
LanguageCode.es => "es-ES",
LanguageCode.de => "de-DE",
LanguageCode.th => "th-TH",
LanguageCode.fr => "fr-FR",
LanguageCode.ko => "ko-KR",
LanguageCode.it => "it-IT",
LanguageCode.tr => "tr-TR",
LanguageCode.hu => "hu-HU",
LanguageCode.mod => (LocalizedContentManager._currentModLanguage ?? throw new InvalidOperationException("The game language is set to a custom one, but the language info is no longer available.")).LanguageCode,
_ => "",
};
}```
so it either uses its own default "" for english or pulls from that and gets "" anyway
(
also not sure why thai is in there when it's not an official translation, but w/e)
Probably just an oversight when adding translations. Default is English so why would you need a specific en file.
yeah, ultimately it's just that, the mechanical reason's just a little convoluted
But with such a big kr scene, it is definitely something that should be reported as a bug/feature request
Remind me in 14 days to ask Pathos about the en.json thing
For you? Of course, abagaianye (#6439652) (14d | <t:1736401433>)
well i can at least say its not as easy as changing the Translator constructor lol
it is also not enough to make LanguageCodeString return en-EN
unless SMAPI is getting that and caching it or something before my harmony patch can run, which i guess is actually not unlikely
okay, yeah, thats what was happening
changing StardewModdingAPI.Framework.ContentManagers.BaseContentManager.GetLocale(LanguageCode code) to return "en-EN" if it got an empty string from LocalizedContentManager makes it use en.json
i have absolutely no idea if anything else strictly relies on english being an empty string from that though
as far as i can tell at a very quick and cursory glance, my translations are not broken in my other mods
(i should specify i mean im not sure if anything in SMAPI uses it. i dont think it'd be as simple as changing the vanilla game's code bc it seems like the game might rely on the english string being an empty string when it comes to loading the correct localized asset in some cases. shrugs)
@tardy adder: finish dealing with BHI (3d ago)
can i send multiple items through a mail or is it only one max
You can send multiple
The mail page hasn't been updated yet but here: https://stardewvalleywiki.com/Modding:Migrate_to_Stardew_Valley_1.6#Mail_changes
it just doesn't get it's own funny little box and will give it to the player 1 at a time
thanks
oh what a wonderful piece of junk mail we could make.
a hundred individual Wood that need to be claimed piece by piece
xD
doesnt pressing esc just add all the item at once
(this is unsubstantiated, I'm on my bed and will fall asleep in 2 minutes, I will not check)
it does, so you'll just get a very loud popping noise of item collection
which is also
.q 6280
Let's stop talking about making mods safer, why not make mods even more dangerous and user-harming
- @drowsy pewter (Jump)
we should wait for 200 more quotes to happen, then repeat this one, so the quote #6480 goes to @ 6480
that'd require me to pay attention to the quote numbers though
and there's probably much funnier 6480 quotes 
you could do it nexus domain-squatter style and just quote that message another 199 times
alternatively quote 6480 being #making-mods-general message this one specifically, would be the funniest joke
(it's always jamore in life, never j'adore
)
I've been tinkering away at a Nexus mod page for a few days, does anyone know if that "original upload" date on the preview will update to the date when I actually publish this thing or not? 
i wouldn't worry about that date, people only check for Last Updated dates
It's one of those things that's gonna bother me even though it doesn't matter 
@versed wyvern You leveled up to Cowpoke. You can now speak in our voice channels and share images in all channels!
if it doesn't matter, it won't bother you 
It updates
When it comes to code efficiency and performance, is it better to have a big json with 100000 lines or 10 jsons with 10000 lines each? Does it make a difference?
readability > ultra tiny performance gains
Got it, thank you ❤️
(It's also easier for people to open if they need to see your code- my computer's decent and it struggled with SVE's content.json when it was still 30k+ lines)
speak for yourself, I spent an hour rewriting a content manager to not use linq before I profiled it and realized it didn't fucking matter 
at least I saved that 200kb 
something something the root of all evil
some people spend hours crafting their mods out of love
some spend 20 minutes making alex into troy bolton from hsm
everybody is valid
not just love though, all the emotions
I poured not only my love into my pierre jail mod, but also all my malice and hatred
Omg just wanted to pop in and say I love L&O SDV
@tawny ore If you're around... I just tried out your Unlimited Storage mod, and I'm getting nowhere. It's not creating a config.json file in the mod folder, and it's not showing up options in GMCM.
It doesn't have any options at the moment. It just makes all storages able to hold unlimited items.
Yeah, it's not... doing that.
!log
Important note: Your computer username may appear in the log. If your username is your full name, please be aware of this before uploading it.
Please share your SMAPI log file. To do so:
- Open this page: smapi.io/log.
- Follow the instructions at the top of the page to upload the log file. (Don't copy & paste from the console window!)
- After uploading, it will show a green box with a URL to share. Post that URL here.
Please do it even if you don't see any errors. This has useful info like what mods and versions you have, what the mods are doing, etc. If the issue didn’t occur in your last session, please load the game to the point where the issue occurs, then upload the log.
Log Info: SMAPI 4.1.10 with SDV 1.6.15 build 24356 on Microsoft Windows 11 Pro, with 55 C# mods and 10 content packs.
Suggested fixes: One or more mods are out of date, consider updating them
@tawny ore For that log file I disabled all my other chest QOL mods and was only running Unlimited Storage. But, on my existing save, it wouldn't allow me to overload an existing chest with more items.
And how are you testing it? You're opening a chest and adding items individually to it, or something else?
Opening an already full chest (or would be full wihtout this mod) and trying to add MORE items to it.
Trying again... maybe I missed something.
Never mind...
I blew it.
@tawny ore So where I blew it is that I was trying to use the Quick Stack button to quickly move items to the chest. It won't Quick Stack to a chest that is full, but you can continue manually adding items to a chest like that.
@dim pebble FYI Convenient Inventory implements stacking correctly in a way that is compatible with Unlimited Storage. Convenient Chests does not and hardcodes the chest capacity value rather than use the vanilla method for checking what a chest's capacity should be.
So this means in addition to not working with Unlimited Storage, I don't even think Convenient Chests would work with the vanilla large chests either.
what code do i need to change the price of the return scepter? I'm making a personal edit in a mod that affects krobus' shop
but i know nothing
if you're editing an existing mod, it probably already set up the TargetField for you
theres a site for it, you can also unpack your files
!itemids
its not 100% guaranteed that the shop entry id is the id for the scepter though (but it is most likely that)
!unpack is usually better since it's more accurate/up to date
Follow this guide to unpack the game's content files in order to see and explore how the game data is structured.
It's helpful when making your own mods, or just to learn about how the game works!
Good to know. I'll go play around with that now too. 🙂
@tawny ore what made you decide to give up on Better Chests? (Just out of curiosity)
does this look right?
no, that is incorrect (also please use the smapi.io/json uploader and send the link to that instead, it is easier for us to see and would tell you right away that you had json errors)
the string before the colon : after "Entries" needs to be the ID of the shop entry, which is probably the ID of the return scepter. i also dont know why your ID for it has brackets around it, but if thats how that ID website had it, then dont copy those
its just (T)ReturnScepter
you also placed it inside the braces {} of the "Dwarf Scrolls" entry, which will break your json, as everything needs its own object, but you also need to remove all the "Dwarf Scrolls" stuff anyway
well, i was about to say next that they also want to change Entries to Fields, bc theyre editing an existing entry, so ID is ALL that matters 
yes i know, you need to remove it
or if you want it to be in the same mod, you need to rearrange your json
Seems like directly editing the existing mod and not creating a patch to it is what's happening here
yeah i just wanted a quick personal edit
then make a copy of this dwarf scrolls mod and rename it to something else
ah
because the dwarf scrolls mod needs to use Entries and you need to use Fields to just change the price and you cant do both in the same patch, so you're going to be rewriting a patch one way or another
okay made a new copy
change "Entries" to "Fields", change "Dwarf Scrolls" to "(T)ReturnScepter", and then remove all the stuff that isnt "Price" after that (but keep the braces)
"(T)ReturnScepter":
{
"Price": 10000,
}
this is what it should look like (not the entire file obviously)
also, make sure in your copied folder that you change the details in the manifest.json too
is the logname okay?
only remove the stuff mentioned after "Dwarf Scrolls", dont worry about anything above there
besides the Entries -> Fields change
the logname doesnt affect anything but what you see in your console, so you CAN change it if you want, and you can remove it if you want, but it doesnt matter if you dont care and its just a personal edit
its just for logging purposes
gotcha
updating the manifest seems pretty straight forward. I assume i should delete the update key though
you can delete that and leave it as an empty [] yeah
thanks
welp i did something wrong https://smapi.io/log/801dfb4ded6542de94246ad10dc7313b
Log Info: SMAPI 4.1.10 with SDV 1.6.15 build 24356 on Microsoft Windows 11 Home, with 150 C# mods and 439 content packs.
Suggested fixes: One or more mods are out of date, consider updating them
!json please send your json too
JSON is a standard format for machine-readable text files that's used by Stardew Valley mods.
If you need help with a JSON file, you can upload it to smapi.io/json to see automatic validation and share the link here.
When making mods, it's recommended to edit your files in a text editor with JSON support, such as VS Code, Notepad++, or Sublime Text. These programs will check for syntax errors.
i assume both
you dont have to send the manifest
{
"Format": "1.0.0",
"Changes": [
{
"Logname": "Cheaper Return Scepter",
"Action": "EditData",
"Target": "Data/Shops",
"TargetField": [ "ShadowShop", "Items" ],
"Fields": {
"(T)ReturnScepter": {
"Price": 200000,
},
}
},
]
}
change it to this
it was bracket/brace misplacement errors and it was easier to just rearrange them and send than to explain how to fix them lol
haha thanks
oh, do change "1.0.0" at the top to "2.4.0" too
thats the content patcher format version, not the version of your mod
oooohhhhhhhhhhhhhh
that should generally always be kept up to date with the latest available format version (which i think is actually like 2.4.2 or something but im not sure the exact number, but 2.4.0 is fine)
yay no errors! thank you!
and the price correctly changed in game?
(always good to double check that too bc another mod you have might also change the scepter shop price and overwrite your change!)
Can't remember if using the Season token in a Load will make it Load every season
It will only load the current season, but it will reload when the season changes
Sorry I clarified bc I want sure which you were asking
Ah, well that should also be fine, thanks
Simple question that's proved difficult to google: For crops that grow in the fall, should the json file use Fall or Autumn>
(you should also be looking at vanilla data)
Thank you! Yeah, I had a sample, but it was just for an apricot tree which is spring.
Have you unpacked your files?
Not on this PC. I'm working from my laptop at my folk's place for the holidays. If I were home then I'd have the files.
Ah got it
Gotta say, adding a ton of spices and spice crops has taught me more than I ever thought I would know about the production methods and growth of various spices.
I've been annoying my family for days now with random facts about spices.
What is the unexpected character on line 14?
https://smapi.io/json/content-patcher/de6ea419cb5b49a19dea47ae371f108a
missing comma on end of line 13
Usually if it calls out line 14 for being unexpected, it means it didn’t realize line 13 is over
thank you
Posting for input: Working on a daily missions mod, I've got some standard easy collection and slayer missions added and some unique ones (e.g: Catch a fish over a certain size, hoe artifacts in multiple locations) Anyone have ideas for unique missions you think would be fun to randomly get?
cook food, gift (liked/loved) items to people, talk to x number of people
The gift / talking ones are added, but I completely forgot about cooking! Thanks 🙂
wa ter your pet
yes it is!
Also, do config schema go under changes? Json vallidator was saying error with having no "changes" command in content json
Configschema is a top level like changes, dynamictokens
the 3rd one is already an Emily billboard quest I think
I apologize if this is not the correct place to ask this, but I am new to making mods for Stardew, and I have an idea of a mod that I want to make, but I'm not sure where to begin (I did look through the pinned posts). The mod I want to make is to add to the pool of items that can appear in regular and gold mystery boxes (and maybe even Skull Cavern chests too). Any help to figure out how to do this would be much appreciated! Mostly I want the seed pool to include mod-added seeds.
Uhhh boxes n all that stuff is... c# isn't it? I'm currently afk so I can't check if there's a json somewhere but it's most likely
Those are with custom geodes, the vanilla ones are still hardcoded AFAIK
Yeah i vaguely remembered next.random 
I was wondering why there were no mods like this already...ok thank you for the info!
hmm
i am pretty sure it should be possible to add content to the existing geodes by targetting the right field
only part of their content is hardcoded
Maybe spacecore?
the geodes are patchables
the boxes may not be
making your own box (and then having a npc somewhere trading them for existing boxes) may be the simpler way
Why do I get this error in Smapi for my mod (The Elven Penny) but not in json validator? (Do notmind Ridgeside, just haven't updated yet)
https://smapi.io/log/22566688bb704fc68bfdeb083cd4da27
https://smapi.io/json/content-patcher/c8bea53125684fe7a474de2e5b013f10
Log Info: SMAPI 4.1.10 with SDV 1.6.15 build 24356 on Microsoft Windows 11 Home, with 35 C# mods and 46 content packs.
Suggested fixes: One or more mods are out of date, consider updating them
Yeah the 4 regular geodes use the CP fields, but the mystery boxes do their own thing in C#
ooh that's an interesting idea; thanks!
That's not the dynamic token stuff
grabbing example
ah, actually the brackets are correct
you just have no changes field
My bad on half of it
are you sure the json you've uploaded is the json in your mod folder?
it looks like the log does not match what you sent in the validator
because your json in the uploader is valid json, but the log is indicating it cant even read it
Path 'DynamicTokens', line 5, position 2
you'd get a different error for not having changes (which is a separate problem you'll need to fix too)
what?
they're running it on D. My guess is they're editing a copy on C
And that's the discrepancy.
(Source: Done that a few too many times...)
All of my games live in D: but my builds go straight to C:
I think you may be right. I may or may not have forgotten to transfer content json after making first fixes.
now I just need to figure out which file is missing the "changes" command or where that needst o be placed in the content json
i read these as emojis
every file needs a Changes field
except the config.json that gets generated
but otherwise if its a json you're using in content patcher, it needs a changes field
*exceptions for jsons you're Loading directly
you cant put dynamic tokens or configschema in their own json, either. those need to be in content.json
okay, so it would be changes at the top and dynamic tokens and configschema within the changes correct?
no. ConfigSchema and DynamicTokens are their own top-level fields. i would recommend looking at the content patcher documentation for them
(Third solution fix is the charm I guess on my end XD Glad you fixed it!)
thanks. Also, is it wrong to download a different/actually published seasonal outfit mod to see how they wrote the code and use that as a template for mine?
generally no, it's all going to be the same format, but would highly suggest being able to understand it on your own
i would also say generally no but it may depend on how custom their setup is and how strictly you copy it. but generally, there's only one or two ways to really do a lot of things, so a lot of CP mods that do the same thing are going to look near identical anyway
but like jamore says, its important that you understand what every line is actually doing in case you run into issues
Thanks. I like to try and learn as well but seeing the formatting and a larger example than I can usually see unless I miss something in the github wiki (I've never used github so may be missing thing)
i have made the mistake of clearing out my entire cache so i can no longer just type in "npc" to get the wiki results anymore
https://stardewvalleywiki.com/Modding:NPC_data#Appearance_.26_sprite but once you get the hang of understanding what fields are and stuff and what dictates needing [] vs {} will help in the long run
uhhhhh there's probably airyn's wiki
(just ignore the bit about the TIME GSQ if you plan on having time-based outfits)
Can you give me a brief explanation on why some field need brackets vs fancy parenthesis or whatever their proper name is. I see that in wiki but never know why
{} = braces, or curly brackets
[] means its an array or more commonly called in here a list of things
{} is a single object
[1, 2, 3] is a list of numbers
{ "key": "value": } is a single object with some data in it
configschema being the odd one out 
there is nothing different about configschema
ConfigSchema itself is an object (also commonly called a Dictionary) of string keys paired with config option object values
this is JSON syntax, not Content Patcher syntax
the difference between braces and brackets, i mean
i used to have a newtonsoft website that described all of it but it's gone to the wind now
and that also only correlates to cp, if you're using a framework that has it's own syntax you're on your own for that 
all .json files will follow these same syntax rules
a [] will always be a list and {} will always be an object
thinks about the list of lists
Content Patcher didn't create any of this JSON syntax
Thanks for the info.
(a list of lists is also valid JSON syntax and not unique to CP or any other mod)
the original json site is still somewhat good about it https://www.json.org/json-en.html
I made a dictionary of int, list dictionary string, list string 
It took way too long and ended being way easier than I was making it at first
at that point just setup a relational database
-> dict[str, dict[float, tuple[float, float, float, float]]]
I too need to play around with tuples
I love tuples
But they are less useful in c#
Please consider, instead, the humble record struct
Tbh half the time I do a tuple in c# I rip it put for a record struct
someday... i'll read the difference in structs between c++ and c#... but that ai-
every time I've thought about using tuples ive decided that I'd really only be doing it for the novelty and should realistically probably just stick with out variables or returning a class/struct
i have a long backlist to read, none of it is fun fiction, and yet i decided to spend 5 hours instead neck deep in next.js
At a fundamental level, C++ struct and C# struct should be compatible, but the .NET runtime has added a bunch more sauce into them
I think tuple is a list with indescrimate declared types and a declared length
a thing to remember is the .NET Runtime can run C++ code in the virtual machine
And in python its not mutable, not sure for c#
I think of tuples as wrapping my lunch in newspapers
Also python tuples are not mutable (ish)
I thought?
I mean the members may be but the tuple is immutable
C# actually has two things it calls "tuple" but when we say tuple we mean ValueTuple 99% of the time
it should be possible to write a smapi mod in C++, but I don't like C++ enough to make that poc
Tuples are kinda like a hastily tossed together collection
i have yet to scrub it from my brain and it's the thing that's slowing me down in my own projects
and this is with me having working Python and Lua smapi mods in my github
does anyone
question wrt Alternative Textures: do the three Strange Statues (Pinky Lemon/Foroguemon/HMTGF) count as Craftables? or Furniture? actually, same question for things that are doubled on the craftables tilesheet & the furniture sheet, like obsidian vase, chicken statue, singing stone, the big geode, etc.
Does anyone know of a way to get another mods ModEntry instance?
Answer 1 would be don't
I mean, it's pretty easily doable but like. It's. Generally a bad sign.

It depends
If you want something from the mod, that mod should expose it via a mod api.
Or be data driven from an asset
The strange statues are like, craftables
the duplicate ones in the furniture sheets are unused
No button
Pretty sure the vase is a craftable, but it really depends, it's not consistent
if you want to be sure look them up in Lookup Anything with data mining fields on. BC are big craftables, furnitures are F
.q 6279
(One of the benefits of content packs is that they're generally stable and rarely break in game updates.
Button: "Let's fix that!")
- @ivory plume (Jump)
ohhh I did not know that :O 
(you're not allowed to notice me while im lurking thats cheating)
I know what I'm trying to do is not a good practice but this is for a private project, I'm trying to patch a mod that has no public api and i need to get the ModEntry of said mod
if youre harmony patching, you dont need their instance
Ichor is the king of crimes
with reflection you can get anything
ah, ok can do!

the ModRegistry class which is accessible via the helper has them, you would just reflection to grab it
but your mod will be fragile and break randomly and is not a good time
Anyways, you can get their modentry instance by grabbing their modinfo from the register
And then reflecting for this field
accesstools can just search for the method with a TypeName:MethodName formatted string
its one of the AccessTools.Method() overloads
Not done yet, by far, but the basics work. I haven't dug through the new game code enough yet to quite know how to fix things like scheduling and snow drawing, and some methods just don't exist at all anymore (like color swapping...?).
Though it's probably better to say that "the basics never stopped working, but everything else broke"
I'm unfamiliar with any such issue?
It's why More New Fish was invisible only when spritemaster was installed
I can also glance at 'Clear Glasses', but I usually don't like merging forks back in unless there's a significant change.
Can you show me a bug report? I just don't have any details to go off of.
a full-screen overlay, off-the-top-of-my-head, shouldn't have broken anything in particular.
Full width was the issue iirc
Color swap was unused, so removed
I'm not sure what that means in this context - screen-width?
No, full width of the texture
Oh. It shoudl have handled that fine, it just sucked.
There was only one case I remember that did that, which was the starry sky screen, which sort of scrolled.
It certainly wasn't optimized for that case though.
No, the smapi asset edir code
I feel like I'm missing some core details :|
also, SM itself as you can see is (partially) running on 1.6 off the main source again, since I've had a bit of time to look at it today.
though I'm not sure how to approach or continue since a fork exists.
Also the game did optimize schedule
I see lettuce, ready to harvest, what more is there to want? 
@slim gorge it's the case where this function is called with https://github.com/atravita-mods/SMAPI/blob/670d25aa43593614339375534a8abb23e9dd7ec5/src/SMAPI/Framework/Content/AssetDataForImage.cs#L141 startrow not equal to 0
where tf is the background
would be funny if it was behind the floor
I found it
@calm nebula: do the thinf (31d ago)
classic off-by-one error
Tbh without the background if it had the dancing text I'd be none the wiser
Off by one axis, you mean?
as well as I did?
Ah.
I assume that I just didn't properly apply startRow as it never came up.
Probably not!
tbh spacecore now rocks a stripped down version of my scheduler, so you also probably don't need to do it anymore 😛
it's not a common case. I just know about it because that got reported, repeatedly, as "More New Fish has invisible fish?" And because it was my PR, I spent forever looking into it
Does anyone know the easiest way to find all the warps in a location, and all the locations they warp to?
Not super familiar with location code so before I start scanning through all 18,000 lines of code. Hoping someone might point me in the right direction.
15th try's the charm
or something like that
god I'm tired
I really never imagined that I'd ever have to say "I need flexbox in Stardew Valley"
but here we are lmao
maybe I don't tbh, maybe I just hate myself 😆
boots up the game once since, like, forever ago, with all but nine of my mods compiling
yup, that's exactly what I expected tbh
so what devil did you make a deal with to get all this time, atra
christmas
lmao
but is your scheduler as good as mine...?
:|
or do I just need to replace two schedulers...
😛 you can find out for yourself XP
more importantly, does it return the exact same results as the default one?
no, it intentionally does not, because the default one is a weirdly botched dfs
StardewUI has something pretty damn close, what are you trying to do?
So, mine does because otherwise, during multiplayer, if one person has SM and the other doesn't, it breaks badly
which causes npcs to wander maps out of the way if someone happens to insert a loop
huh. I thought your implementation was dijkstras or something
which still would not produce the same order as the vanilla game
it's a variant of dijkstra's
meant specifically to put out the same thing that the game does
if it was purely dijkstra, it would not
I'm not sure how you would have gotten that, tbh
the game does dfs. We switched it over to bfs.
dijkstra is priority-first. Though usually it is effectively BFS. IIRC (it's been a while) the priorities are set up to act like DFS.
rather, Dijkstra is a BFS when the priority queue is a FIFO queue
I don't remember the details, but I do remember specifically being very frustrated by the game's implementation and having to make mine return the same results.
which causes npcs to wander maps out of the way if someone happens to insert a loop
This is a case where the SM one would differ, though... since the loop wouldn't loop.
I'm not sure if that's a bug in SM or not.
@teal bridge I'm redoing all of UIInfoSuite's tooltip logic
I meant specifically what's the layout scenario that is flexbox-like.
I have a pre-prepatch planned that will rip that information before intervening functions already, so in that case it wouldn't. It'd break the present implementation though.
I pinged you in the art channel
I'm sure you don't want a framework dependency but nevertheless, there might be a solution in the code.
I was already aware of the potential issue, at least
some frameworks in the past have done similar things
Those look 100% like supported layouts.
yeah that was the main drive for it, along with having really tight control over the logic. If I went with StardewUI I'd just be making a wrapper for it anyway
I considered it but it only took a couple hours to throw together a flex implementation, since I don't have to make it as generic as you do
Oh, well, your message gave me the impression you were having a hard time with it. No worries in any case!
oh, no lol I'm just an idiot
stuff like this lol
the last screenshot is everything working after I fixed my copy paste errors putting it halfway to narnia
Right, I gotcha
Actually there was one thing that gave me a bit of a headache, maybe you have some advice?
When a dynamically sized component changes, I wanted a way to know without having the parent foreach its children every frame. I ended up just passing the dirty flag up the call stack, which works pretty well but I wondered if you had a better way
/// <summary>
/// Marks the layout as dirty and notifies parent components.
/// </summary>
/// <param name="stackCall">Tracks recursive calls to prevent infinite loops.</param>
protected virtual void SetLayoutDirty(int stackCall = 0)
{
if (IsLayoutDirty)
{
return; // Already dirty, no need to propagate again
}
IsLayoutDirty = true;
NotifyParentDirty(stackCall);
}
/// <summary>
/// Notifies the parent component that the layout needs to be recalculated.
/// </summary>
/// <param name="stackCall">Counter to prevent infinite recursion in the layout update chain.</param>
private void NotifyParentDirty(int stackCall = 0)
{
if (stackCall > MaxRecursiveLayoutCalls)
{
ModEntry.Instance.Monitor.LogOnce(
$"A tooltip has exceeded {MaxRecursiveLayoutCalls} recursive layout calls.\n" +
$"Component Type: {GetType().Name}\n" +
$"Stack Trace:\n{Environment.StackTrace}"
);
return;
}
if (Parent == this)
{
// ???????????????
ModEntry.Instance.Monitor.LogOnce(
$"Tooltip parent refers to self\n" +
$"Component Type: {GetType().Name}\n" +
$"Stack Trace:\n{Environment.StackTrace}"
);
return;
}
Parent?.SetLayoutDirty(stackCall + 1);
}
That's probably OK for relatively simple use cases, if you're willing to have a doubly-linked graph and don't need to deal with children being inserted or changed at arbitrary times.
In general, the recursive measure pass + layout pass is a pretty standard mechanism and very hard to optimize for arbitrary layouts.
Like, in your case you track IsLayoutDirty and don't notify the parent if it's true; if the parent can change then that implementation is potentially broken, or at least unsafe because its outcome depends on the order of hierarchy vs. property changes. But if you're not exposing this to the outside and you're always in full control of the order then you can kind of wave that away.
I think you'll find that dirty checks are very rarely worth optimizing anyway. The amount of time it takes to iterate children checking for the dirty flag is nothing compared to the amount of time to actually do layout.
One thing you may want to watch out for is whether or not the available size has changed, which supersedes any dirty checking. If you don't pay attention to that, then your views/widgets/whatevers can't adapt to changing viewports or changing containers.
that's mainly just to avoid propagating when I don't need to, if the parent changes then its own dirty flag gets set and it winds its way up the call tree that way.
I couldn't think of a reason that the parent flag would be set and the call not have propagated.
But like you said, I'm controlling exactly when IsLayoutDirty gets set, so I can guarantee that
I understand why it's there, of course, just pointing out that it's a lot more work to maintain a notification-based dirty model than a state-based dirty model, for not that much of a performance improvement.
oh you're totally right I don't cover that at all, thanks
I don't think I understand what you mean by this...
I do need to deal with children being inserted into the tree, is there a problem with me just invalidating the layout when a new node is added?
it's worked so far at least 😆
No problem in theory, just harder to enforce structure and easier to create leaks and other bugs when it's a two-way graph, and much harder to catch situations where something that is supposed to be updated does not get updated.
Not to say it can't be done. Just is more work (that is, more complexity/ongoing maintenance) to make it all correct.
Can your implementation do partial layout, or does a layout pass always mean performing layout on everything in the subtree?
For example, what happens when you attach a node that already has its own children or its own subtree? Or if you update a node in the middle of the graph? Does the parent know how to stop after that one dirty node and skip the rest of the layout? (Also, does it know enough to force layout on all the descendants of that newly-attached node, even though none of them were marked "dirty" explicitly?)
Does this look like a good basis for the seasonal outfits? Using Seasonal Outfits - Slightly Cuter Aesthetic as a guide to help see how to make stuffs work
Any tips or suggestions are welcome
https://smapi.io/json/content-patcher/b543e21c49e34e598a277d4459ee58a9
working on that exact thing rn, I'm having it propagate up until it either doesn't trigger a layout of the parent or a sibling
Personally, I wanted to be able to simply use List<T> or equivalent for layout views and not impose a bunch of requirements downstream. If you need to propagate up the hierarchy, and therefore track whenever the hierarchy is changed, then essentially every child list needs to either be an immutable list (replacing children is all or nothing, callers have to transform the list based on current contents in order to "append" or "insert") or you need to use ObservableCollection everywhere so that you can watch for added elements.
Like I said, it's entirely doable, just a lot of work over the long haul for what I personally didn't consider to be important gains, and performance profiling proved that out pretty clearly; StardewUI has its own profiler and layout frames where nothing is dirty are virtually invisible even though they technically have to do a "recursive" check. If you think about it, the most complicated UI imaginable isn't going to have more than a few hundred elements to check. Equivalent performance to just iterating a list of 100 elements. Lots of mods do that every frame, like iterating the player's inventory.
Another reason I did it that way is because sometimes it's not clear whether a single property change should actually be considered dirty. Changing an image's sprite (texture + source rect) might need a new layout, but only if the image is set to be content-sized, otherwise it can ignore layout.
what
I was banging my head against the wall trying to figure out why the game wasn't taking my string for cooking recipes
the reason: I was patching them into data/objects
Okay, I need a hand with figuring out what I'm doing wrong here. Trying to load my cooking recipes for the first time and running into a error loop when I open the cooking menu (this only occurs when my mod is enabled)
An error occurred in the base update loop: ArgumentException: An item with the same key has already been added. Key: 1
https://smapi.io/log/570d9e422ca942e7a374096f00b21724
Loading recipes here: https://smapi.io/json/none/efe262bd2f774e75831ea48a72f444f4
I don't expect every recipe to match up with an existing item yet, since there are minor mismatches between our recipe and object files currently. I just want to figure out what causes the error so I can load a barebones version, even if there are visual/errored items in the menu
Log Info: SMAPI 4.1.7 with SDV 1.6.15 build 24356 on Microsoft Windows 11 Pro, with 30 C# mods and 37 content packs.
Suggested fixes: One or more mods are out of date, consider updating them
i believe that hapens when theres an ingredient amount where an ingredient id should be
unfortunately not an easy way to find which one i think without patching the function to log it
you could toggle each of those config options one by one to narrow it down
I think I'll try that
(im assuming the stuff like WorldTraveler_Essential is config and notr dynamic)
Actually it's all dynamic so nvm lol
yeah, the easiest thing to do is to add a condition like
"When": {
"Season|contains=Spring": true,
"Season|contains=Summer": true
}```
found it
Just kidding. I found a different issue
Oh god there's so many typos in this file
oh no
pathos can debug dayupdate default to 1?
I found a total of six typos causing that error
But it works now!
Thank you so much button!
np! 
I got annoyed at athing
(it's just repeatedly calling dayupdate and water, one second apart.)
Did I miss something or why is it still using vanilla portraits and sprites? Here is the json content file and smapi log of which neither show errors.
https://smapi.io/log/56fe995e544e412a9e59bf8d6d090d25
https://smapi.io/json/none/d72c355340764891af801026ab4f2fa6
Log Info: SMAPI 4.1.10 with SDV 1.6.15 build 24356 on Microsoft Windows 11 Home, with 36 C# mods and 49 content packs.
Suggested fixes: One or more mods are out of date, consider updating them
I can't currently check. What's the Precedence set by SSC for Penny?
i vaguely remember something like either -100, -120, or -150
i would:
- set a false dependency on seasonal cute
- set the precedence to something ridic like -500
- even then, i still get the random off beat that SCA overwrites me, so you'll have to tell people to turn off specific toggles on their end
seasonal cute is set to the highest (or something) priority i think? , so yeah it will overwrite everything unless you just turn it off
Yar, theoretically that shouldn't matter with the appearance precedence system.
This would cover my dependencies correct? Unless I have a typo, have had these three in since start
https://smapi.io/json/none/fb01d5810a5d474a804a79430cc1ca02
update key is empty as not uploaded anywhere yet
that's fine, and yeah that looks good
i don't remember exactly what happens based on load:high priority, so that might also be the thing
what happens if you toggle off penny for SCA?
then it works. I'm not stupid, since mine is dependent and loads after, it shouldn't have made a difference right?
load order priority should only affect the order in which patches are applied. it wont have any difference on Appearance precedence
so if ALL you have is those dependencies, thats likely not enough
unless you both happen to use the same ID for the appearance entry, which you shouldnt be
No, mine have a different naming scheme, they may have same condition set. Would setting all of mine to have a lower number in precedence fix this error? Thought mine loading after would avoid this problem
the patch load order is an entirely separate concept
its not something the game itself cares about
if you are both using different naming schemes, then it doesnt matter who goes first. both of your appearances will be added to the list of appearances
Precedence is what matters the most in this case.
the game does not care what mod added the appearances, it has no way of knowing. it just cares about the Precedence
Now matter the load order, if your precedence is of higher number it would always be beaten with those that fulfill the conditions. (If the precedence is exactly the same it'd have a random chance of appearing.)
So, should I have the precedence be much lower on mine or have the names be the same and lower precedence? I could see this getting messy.
dont use the same names, just lower your precedence
has to be lower than whatever seasonal cute outfits put as their precedence
thank you. Will be funny as my Penny sprites are taller than seasonal cute so for any festival or event where they have outfits and I don't Penny will shrink 🙃
If your entry has lower precedence than those festival entries, then it would replace them too, assuming the conditions are fulfilled.
Also, just to double check. For the two, condition sets below. Since they are different they would be able to have the same precedence but the rain one would take priority on any rainy day correct? Trying to see if I'm starting to understand
SEASON spring
SEASON spring, Weather Rain Snow Storm
they can have the same precedence even if they were the same
the one with the lower precedence has priority
if they are tied, its chosen at random
If both have the same precedence and both fulfill their conditions, then both would have 50/50 chance of appearing.
err, I should rephrase then. trying to ascertain priority so I make sure stuff is maybe hopefully going to work
If you want the rain one to always appear when it rains in spring, then you'd have to set its precedence lower.
thank you. So rain/storm outfits do need lower precedence, even with the stricter requirements as the regular Season spring one would still meet criteria?
the Conditions do not make a difference in priority whatsoever, the only thing they do is decide if theyre even in the list of appearances to choose from
Yeah! And the Weight is what determines the chance of them appearing.
Where do I edit this image? World sprite, social tab image of her, and portraits all are correct except for that image in gift log
I'm not actually sure, but maybe you can try do EditImage on her standard Characters\Penny?
thanks.
I would like to extract a single sprite from a spritesheet available as Texture2D and replace an icon in an asset through asset editing. Usually you provide a string of the icon/texture path in your asset and while editing. Would that be possible in any way?
!startmodding sounds like something simple with cp
Making mods can be broadly divided into two categories:
- Content packs are formatted text files, and don't need any programming knowledge. They can add/edit NPCs, maps, new items, shops, and more. To get started, see the list of framework mods, the wiki tutorial for Content Patcher, and there might be relevant guides on the tutorial wiki.
- C# mods use programming code to change fundamental game mechanics. See getting started with C# modding.
Usually it’s easier to start with making content packs, since you don't need to learn programming.
they're working in c#
you'll probably need targetArea arg, after that is beyond my knowledge
I have a gift:
And sourceArea but hey, I wish I had seen this page when I was trying to fix a mod that had been relying on files that got deleted in 1.6.9
It wasn't mine so I ended up taking the lazy route of getting the old file and putting it in the mods files to load it, but knowing the right way to fetch textures from a sheet is handy
hey uhm i'd appreciate if a cool mod maker can check out #1321839537722232912 bc neither i or the author know why it's giving me errors and i for one am at a loss
FromFile token seems to be from their C# component and they don't have an open source link as far as I can tell
Unless I'm missing where it's declared
Hm, well, that's not right format for a C# created token
i'm wondering if it's bc the {{spouse}} value they refrence is invalid?
like my current save has me not married to anyone
i think the from file is just uh, what's it called,
Oh, I see where FromFile is now, I've never used this, interesting
internal asset?
It's a token that pulls the FromFile of the patch
Like a CP token, just never seen it before
they specifically mention they aren't having this error and they are married, so idk
ah, interesting
And you're not?
I had a look at the CP docs when you first opened the ticket and the example in the docs matches their example nearly perfectly
Hm
Well I don't see them checking to make sure you're married for this, so unless they have some defaults in the files that could be a problem
I wonder what happens if you use FirstValidFile and none of the files are valid
can't believe smapi is yelling at me for not being married
SMH no maidens
because using FirstValidFile AND HasFile in the same patch seems interesting
i'm guessing first valid file just checks for either of the listings?
Whichever matches first
does hasfile do the same here
oh i missed an update for the mod let me see if it fixes it
what if neither of them matches though. Does it return nothing?
i think?
Possibly but it's weird that it's not complaining about the FromFile being wrong
It's complaining about the HasFile, which is using a FromFile token
Log Info: SMAPI 4.1.10 with SDV 1.6.15 build 24356 on Microsoft Windows 11 Home, with 67 C# mods and 139 content packs.
Suggested fixes: One or more mods are out of date, consider updating them
i think HasFile would just be returning "False" no?
I think the FromFile token is returning empty there
that's what I was thinking earlier
Ah, I see
Because it thinks it's a HasFile that's checking for nothing
anyone know if the mod author is in this discord by any chance...
No clue
Did you already update and try again?
mhm, log I just sent is from the newest version
I assume slapping a when on married somewhere should be fine
i can edit it myself and check, what would that look like?
Yeah, I wonder if When short circuits
back to the cp docs i guess
like is it doing HasFile on an empty string
which is why it says it requires an input
this would do yeah?
i'd imagine smapi is shitting itself because there's no spouse value and it breaks the tokens
oh wait I just realised what you're saying. I hope so
would make the fix much easier because you just add that condition above hasfile
lmao that's kinda funny since the specific Juliet and Sebastian Ginger files do check for spouse
stares this is correct rite
Well it's probably because it's using the FirstValidFile token and it's not matching anything because you're not married
alas i am single
And they didn't set a default
I'd imagine it's possible to spawn in a kid without a spouse though? it would probably be more generally compatible with other mods for the mod author to just add a spouseless option to the FirstValidFile
They really should have set a default, I'm sure they haven't accounted for every single NPC that exists
hopefully they see the ping.
I think they assumed that HasFile fixes that because it just won't patch anything in that case, but it clashes with FirstValidFile
they mentioned that that's why they put the HasFile there in the replies to Bea's post on nexus
Yeah if HasFile just silently failed if it was empty that would be fine, and realistically it's probably fine even with the red text
But red text == complaints
Okay! after adding "HasValue:{{spouse}}": "true" there's no errors
probably best practice to always put some kind of default fallback that doesn't depend on any tokens in FirstValidFile just in case
Even yellow text will get complaints
(I wouldn't permanently solve it like that just in case, I would add a default fallback instead so it doesn't break if someone has a different spouse)
sorry, I meant if someone has an incompatible spouse, I'm like only half awake lol
but all they have to do is add a generic kid option and add that to the FirstValidFile
The final option for FirstValidFile is the default
ah you mean for modded npcs
But if the tokens on it don't match then it can't select anything
So the final option in it should just be whatever the default would be
So probably just the vanilla ugly kids 
they do mention they wanna add compatibility to those so i'd imagine this convo would help with that heh
not ugly, just creepy
Tomato potato
they just kinda 🧍♂️
so adding a generic kid sprite to the FirstValidFile section would help with that no?
actually, no, since it will always exist
As the final option in the list

So it will only choose it if no other match is found
oooh
that's exactly what they should do
i understand
Then it won't matter if you're married, it will just patch some stuff you won't see lol
And it would account for un-supported NPC's
yeah and u can just tell people to edit the generic kid sprite to match their spouse
or, uh, deal with it™️
For un-supported NPC's you mean?
yeah
I suppose, though probably the author will deal with them eventually
there's already sprites for Jessie in the mod
I hate dealing with the child sprites so I Could Care Less 
Assuming there's some level of demand and the author continues to support it
wait would the first block apply anyway
so it would like edit the kid twice if the spouse is jessie
i suppose that doesn't matter
i can barely handle the farmer sprites
Yeah it would just use the last one to edit it if it did
I have no clue who Jessie is
probably a way to make it not do that with tokens
her
Also, I agreed to the kid prompt but honestly I'm considering a magic trick...
oh no the children are rgb
All new Children by Corsair
i was in fact wrong they have a whole lota sprites for a bunch of modded npcs
dammit you beat me to the joke rogukin 
i don't understand this joke
!twocakes
If you discover that someone has made or is making a mod with a similar concept to yours, don't stress! Our community promotes the idea of "two cakes", where two versions of the same idea can peacefully co-exist. Your mod will have your own unique stamp on it that makes it special.
But for jokes
Corsair is a tech company that makes RGB peripherals
Keyboards, mice, etc
I was presumably going to go with razer for extra gamer cred
ooh
Fucking, glowing mouse pads...
wh-why
Exactly
i get like keyboards and mice but the mouse pad??
I wanted one of those mouse pads so bad for a while as a teen 
Just the rim around the edge
It's like the street car underglow
But for your desk
they look pretty sleek in pics, but it would probably be SO distracting and meh irl
omg there's so many babies and they're all green
they also make RGB ram
It would either be annoying to look at or completely unnoticeable
Only green blankets

And I guess onesies
prismatic baby mod when /lh
let the babies be rainbow
I'd be more interested in them staying in my house if they were prismatic, NGL
i'm sure it's doable, spacecore got animations
Yeah, but SpaceCore can't patch entire character sheets
You would have to patch each index individually
ah
It's an issue
nevermind. i mean yes for doable, but also yes for painful
Same for portraits
can probably make the baby change the onesie color daily or something
depends how you'd define prismatic
mmm yeah
I have a strong computer so never noticed an issue even when I had a screen full of prismatic fish ponds
prismatic babies are worth it for the pure deranged value they would add to a late game save
imagine trying to sleep but if u can't bc ur child is fucking prismatic
Prismatic baby ...
if that's the only reason your baby is keeping you awake I think that's a win ngl
though it would definitely seal the deal on new parent sleep deprivation
I don't want to actually edit and use that image in the same place. I want to extract a part of the SpritSheet and use it somewhere else.
Example:
- Take SpritSheet of FarmAnimalData.Texture
- Extract parts of it
- Use those parts as FarmAnimalData.ShopTexture but not in the same AssetRequested event
Texture and ShopTexture are both strings. How would I convert the extracted image to a string like that?
Just got into Asset Reading/Editing and I'm lost.
To read the image, I used Game1.content.Load<Texture2D>(farmAnimalData.Texture) but how do I convert that back?
It's something I still do by the seat of my pants every time. The specific mod I was thinking of the correct way to do it would have been to pull the appropriate textures from Cursors since that's where they are, the ones that were deleted weren't from before v1.0 and were super scaled up unused textures
If they're strings they're likely a reference to either a path or an asset they're looking for
I would have to check later to see what they actually want
They're asset names. That's why I'm stuck.
In my head, I would have to create a temporary asset through c# if that's even possible
Unless someone who understands it better can correct me, I am pretty sure you would load your extracted images back into the content pipeline in order for them to be assets to make reference to
This is one of those things that I would probably just do in CP, whenever you start recreating CP functionality it becomes a question of if it's really worth it to be doing this in C#
If you needed to extract these images for making draw calls or something, that would be different
But extracting from an image to enter in the data assets, may as well be a CP mod
Hello!
Sorry to bother-
i turned an .xnb mod to a CP mod for personal use (using https://xnb.pillow.rocks/ ), but it seems like the mod is not working
The mod changes the sprites of the bachelors, but there are more variants available so idk if i should choose just one to be picked, or if i can make the CP mod to be customizable.
I kinda wanted it to be customizable, but i don't know how to do it °O°
In the file i only have the content and manifest files- i presume that for make it customizable i need to have the config.json file but idk how to set it up ahah ;u;
this is the first time i'm approaching any coding for mods-
Can someone help me figuring out how to make the mod work? 
you can make a config
in the content.json
set up a configschema
"ConfigSchema": {
"YourConfig": {
"AllowValues": "option 1, option 2",
"Default": "option 1",
}
}
ohhhh-
thank youu!
and you have to make sure that your changes (aka the sprites) only change with the respective config options
so you need a
"When": {
"YourConfig": "option 1"
}
(thanks, i misplaced that page 😭 )
i'm slowly getting my cache back in order 
i wonder if i should make this character ive made like a rivaling mayor candidate to lewis
I bought stardew valley on Xbox. When I download SMAPI, the game doesn't measure my time, is there any way to solve it?
i dont know if this is also a bug but when i got smapi to help w my perfection late game brainrotting gameplay i didnt get the achievement for cooking everything
!mh this channel is for making mods
For help with modding issues, please ask in #1272025932932055121! When asking for assistance there, sharing an error log will help others identify your issue (see https://smapi.io/log for instructions).
sorry
As a side note: SVE gating Perfection beyond year 3 is incredingly annoying.
Deliberately or because one of their NPCs doesn't show up until year 3?
I've always perceived not a lot of overlap between the SVE subset of players and the Perfection/minmax subset. I'm sure there must be some, but...
I mean, generally, I wouldn't be either, but it's one of the last two achievements I don't have. 😄
use the 1.6 addition and ||buy perfection||?
but yeah I would exclude a Y3 character from perfection
(well. I wouldn't make a Y3 character in the first place because no one would ever see them
)
yeep
I feel vaguely having a ministry of magic in ferngill is very silly
but whatever man. c.c
Ithink the character is largely excluded, the problem is that the recipe isn't
Do they have a unique friendship req / mailed recipe?
yeah, 3-hearts
Perfection waivers do help a lot with timegated stuff, but then I'll bet the average SVE player is even more allergic to anything Joja than they are to minmaxing.
At least if the typical narrative in #modded-stardew is anything to go by.
probably, yeah
"tia, why did you stop doing SVE compat?"
that cutscene WAS compatible with SVE but I guess he moved something in the map again
I know recent updates mentioned some map changes
I told them to send me a log, if they do I'll probably look at it at least and see how annoying it would be to fix
I didn't notice anything different, so I thought it was just the new trees. Wouldn't surprise me if it did stuff like "move Jodi's trash can two tiles to the left again"
it wouldn't surprise me if it's a trash can move
I suspect it's something in the farmer's path but
it's doubly annoying because I built that code on SVE's vanilla tweak in the first place
well on the bright side apparently that should be SVE's last major update, so hopefully (if you do choose to resolve it) you should not have compat issues pop up again
SVE is entering maintainace mode?
He's said that before though 
Just like with SDV I'm sure there will be no take-backsies on that
(theres also no real indication that SVE is the actual problem from that one comment)
Was SDV supposed to be done with updates at some point?
FS' recent blog post said that SVE is feature complete, and that the future 2.0 Castle Village update would instead be a new mod
I don't even think 1.6 was supposed to exist
there's not, that's just the most likely suspect based on the fact that the event works fine on non-SVE maps and I haven't had any non-SVE reports about it
and said mod can be used without SVE, so I imagine map changes made by that mod would be minimal
That makes some snese, although I do find it peculiar that SVE is listed as the limit of what SMAPI can achieve.
(well, "pushing the limits")
if I was doing approximately ten thousand map patches I'd be pushing it too 
it's more accurate to say it's pushing the hardware performance limits
thats what the blog post says
that he's doing ten thousand map edits? 
that its pushing the limits in terms of performance and hardware
he clearly has not seen my new mod "map patches and foreachitem on updateticked for no reason"
yeah, I just.. kinda have mixed opinions about SVE and the fact the proposed Castle Village mod would be doing the same thing
"SVE 1.15 has already pushed the limits of what I think SMAPI can handle across a wide range of devices, both in terms of performance and hardware requirements."
this is the exact wording used
SVE does already come with an appreciable performance cost, so splitting castle village into its own mod makes sense for this
since you wont need SVE installed alongside it
so it doesnt matter if they both have performance costs if you're able to choose between them
true
i wish the people with 1000+ mods and every expansion mod under the sun installed luck when it comes to their loading times, though
yeah, I'm at 171 and that's.. well, enough. c.c
im sure "you dont need both installed" to them might as well say "you might as well install both"
my system at 220 or so mods (and my own wave of red text from my own unhinged expansion not having assets even though they're being called) takes roughly 5 minutes to go from pressing "ok" in a new game to actually being able to move
yeah, SVE is just the most noticeable in terms of lag/improvement when it's gone
next playthrough i do i plan on installing all the expansions at least, but i probably wont come close to 1000
honestly I might have tried castle village if I didn't have SVE-related mod author trauma 
inb4 "is it compatible with castle village"
At some point of time someone should take a hatchet to smapi asset loading and figure out where the time isssss
1000 is pretty much just aesthetic mods, which i can't justify because i enjoy vanilla enough


