#making-mods-general
1 messages · Page 45 of 1
anyone know how draw order for fashion sense "accessories" works? I want to tweak to force a specific draw order
Yeah, rugs are like hardcoded to expect a specific size
You can make non-rotating versions if you want to do custom sizes
But if you want them to rotate they have to be that default size, 3 tiles wide 2 tall for one direction and 2 tiles wide 3 tall for the other
@cobalt anvil #making-mods-general message
say is there mod that let you remotely put down flooring (happy home designer?)
then yea no loss in making them flooring 
okay awsome - thank you guys! I kind of came to the conclusion that it had to be something type related about rugs so I started turning it into the flooring.
it was also weird because when i started messing around with it, it wasn't acting like a rug. i could put it on tables and stuff lol
Yeah, looking at the wiki I thought you were supposed to put the type number for what it was instead of just the string name
So I put 12 instead of rug and ended up with something else
Probably should fix the wiki
yea when i put 12 instead of rug it acted REAL weird
It might assign type Other in that case
unfortunantly fashion sense wiki just has guidence for overriding draw order relative to other segments, but that doesn't seem to work for reordering drawing of accessories over other accessories :V
so... it will be a floor now lol
i think that's built in if you're thinking of layering, the player has to choose that in the form of the accessory "1", "2", "3" etc 
(you can obviously hard force it using fashion sense's API but that's a higher end thing and it overrides the player's appearance completely)
does anyone know how my tilesheet pooped the bed, and how to fix it? I did the normal File->Export, but it didn't export in the typical configuration, and attempting subsequent exports still results in this mess, even though the tileset from the original map still looks the same
see the returning arrow on top? the one that makes a u thing?
try clicking on it
↩️
that
that did it, thank you
glad 🙂 yeah i did that a couple of time too
This knowledge will be useful in the future 
@calm nebula: fix the obvious disposal error (28h ago)
Meeeeeeooooooooowwwwwee
Meow?
angry hissing at the bot
It's no wonder that bot is always so grumpy.
Does exactly what you tell it to and then gets hissed at.
(to be fair this is normal orange cat behavior.)
Thank you for the wet food, mother. Unfortunately, because you are 5 seconds late to serving dinner time, I shall proceed to slap you a little.
The next Data Layers update now shows just-off-screen warps along the edge; I'll go through all the vanilla locations and make sure there's no other missing warps. Thanks for reporting it!
Does this mean you're working on mods again? Is a PR merge on the horizon??
Nope, I just did that change to help test vanilla bugs.
(Though there's a couple of small updates coming tomorrow just to update for the latest beta changes.)
Well. Had to ask.
Cool - I did flood fills in all the locations which is why I think I've covered them all with the Backwoods and Summit as the only cases (edit: only cases with missing warps)
how do I intercept the events that give a player crops or seeds or drops them on the ground, like harvesting by hand / scythe / junimo? I want to add some properties to those items dynamically.
what properties do you want to add?
You can look at onTerrainFeature changed or OnInventoryChanged
Depending on which end you’re interested in affecting
If that’s not specific enough then it’s ✨ harmony time ✨
I want to add some data that modifies crop / seed traits, like seasons it can grow, whether it drops bonus seeds or crops, etc.
too many possible combinations to mod in all variations for each crop
That might be also done via CP
Seasons it can grow is done in data iirc
Bonus seeds might have a framework that already does that
Though I’ve lost track of the recent framework features
Item Extensions? Or just Mount Vapius? Something I have installed is doing it
Spacecore
Spacecore's YieldOverride handles that, but it's a bit buggy
it seems like if you need to add some mod data to the primary harvest you'll need to do some transpiling? otherwise you have to detect whether that crop item that was just added to your inventory came from a harvest, a fridge, or whatever else
unless CropExtensionData actually allows overriding the primary harvest and not just the extra drops
you could also just use C# to edit Data/Crop
I was able to do that stuff with my crops mod, but my mod added all new crops, it wasn't changing existing ones. maybe you can use CP to patch your changes in?
editing Data/Crop would impact all of that crop, right?
I'm trying to wrap my head around all of it, I'm new to C#/stardew mods in general
the idea is for the player to progressively improve the crop, but not change all the crops they previously had
so, maybe they get a parsnip that can also grow in winter.
or, a variety I should say
here's a snip from my mod, if it'd be helpful to have something to look off of
Part of the problem is that you're looking more at creating some kind of larger framework to prop that system up
You need some way to track which seeds came from which plants and then save data associated with them, and then you can make changes directly to the crops that come from those seeds
The way the game works, seeds are just a generic object, they're tied to the crops via their item id but that's it
you'd also have to create some kind of qualified seeds... maybe?
@next plaza: look into marriage schedules breaking with your 0 schedule fix (6d ago)
Objects do have CustomFields, so you can use that to store which ones should cause different data
you can save whatever data you want to modData, and you can change the game logic based on those modData fields with patching
Do objects have mod data?
almost anything have modData
I only see CustomFields
i store basically all the info from BETAS in the mod data of items
I think we're confusing two things here: CustomFields is a data field, while ModData is a live instance field
Is it maybe that items have it and it's not exposed to the data asset then
Oh, I was thinking of the field that's sometimes in data assets called ModData lol
the ModData field makes it so every item of that type gets created with those fields saved to modData
So like a system to choose seeds to get modData that will be used to change the crops that are created by those seeds
(as long as that data is stringified. right?)
Alternatively, some crops that are similar to the vanilla crops but with different data and then randomly dropping the seeds for those crops from a vanilla crop
yes, but like carcinization, anything can become crab string with enough effort
Hehe
Lol
Clearly I should just reinterpret this Color[] as a char[]
Right???????
everything is over my head right now, hopefully it sinks in eventually
personally i think the easiest approach is to have special seeds that unlock with certain cp conditions
I think you're right. But I much prefer the idea of randomization and keeping everything dynamic
but i know that may be very difficult
the next easiest would be doing these conditions in C# 
can introduce some kind of machine that converts any ol seed into their winter plantable variant
that you generate during data edits
Let's say they get a random feature, like it grows similar to rice/tarot. can that be added to the game's list of crops dynamically?
yea
this is kind of how CP conditions work anyways
apply edit on When, does not apply otherwise
i was assuming all of that had to be predefined on startup
itd have to be defined at planting time
to make game go through editing it again
the already planted crops wont change i think
oh this is great, then
but still i think it's better if you just make them whole new crops
Yeah, that makes sense.
use a late edit so that typical cp crops would have been put into the asset
I don't mind if I have to add 9 different variations to a persons game. I just don't want to do 2^9 combinations if I have 9 features I want to add.
which u read and copy with modifications to new crop
this also bypasses the problem of stacking seeds / crops if they're different
and just leverage all the vanilla stuff I want
theres not many alternatives to this without C#
sometimes you can get away with fancy token usage but a lot of times you do either need just a lot of json or C# to do it more dynamically
C# doesn't really scare me all that much, I just don't know the language too well right now
maybe when that one PR from casey goes through
with C# you have a ton more options available to you since you can just edit any crop you want, whenever you want, even after its already in the ground or in the world
that PR would help a lot
its not exactly a for loop but it does let you template away the common fields
still the other limit of content patcher is that you have no way of applying some edit on everything
yeah, cant automagically do it for all modded crops
i have a personal mod that does the artisan goods keep quality thing by C# asset edit, you basically want something similar but on Data/Crops
https://github.com/Mushymato/StardewMods/blob/main/MiscTweaks/ModEntry.cs#L42
say what does content patcher do if you try to edit a list of models that have duplicate Id
if content patcher uses the ID as the key and treats lists as a dictionary for editing purposes in the first place id think that wouldnt be able to happen would it? unless the game itself had a duplicate id somewhere
the game can have dupe id in some places yea
u may recall me trying to add a index to a iteration in a transpiler, that was because machine triggers weren't guarenteed to have unique id
and often don't if the mod just doesnt supply one so it defaults to Trigger.ToString()
this has no effect on machines functioning properly
in that case i do not know the answer. maybe it just picks the first one it finds
i ran into similar problem at the machine output rule level 
wonder if i could just modify the output rule's Id instead of trying to do index there too
and ditch the index local for triggers too ig
there are list models where the Id is just a field in the model itself. I think in those cases the Id is only used so CP can pick which one to edit
i thought thats what chu meant
yep
yeah seems like it
if i do it late then it should be fine right 
maybe i add a content patcher false dependency just to be safe
speaking of being safe, can someone remind me what the safe/best way to use newtonsoft's json stuff in my mod is. can i just install it with nuget or do i need to reference a specific one smapi uses in my csproj or somethin
im reflecting myself into hell and i want the JObjects™
no idea what the best way is, but lacey references the one in smapi-internal and nobody has complained about it
i forgot the smapi-internal folder existed tbh
<Reference Include="Newtonsoft.Json" HintPath="$(GamePath)\smapi-internal\Newtonsoft.Json.dll" Private="False" />
does Private="false" control whether its packaged with my mod or somethin
no worries, i was just curious but am more than happy to just blindly copy things if they work 
same tbh
turns out, using JObjects makes things a whole lot easier instead of working with generic object instances. who'da thought! if only the me from hours ago wasnt so lazy i couldve gotten this done so much quicker 
anyone have an idea of how to check the in game location of only one player of a co-op mode instance? As in always the host of the split-screen coop, without it defaulting to the host of a real multiplayer instance.
in C# or CP?
C#
the game handles its own split screen data switching, so Game1.player is still the split-screen specific player
so you can just check if theyre the host and grab the location and store it
or not check host but check if theyre the main player i mean
Totally! Is there a way to differentiate between the main player of split screen and main player of multiplayer?
Yes, exactly; non-private assembly references don't get copied to the output directory when you build.
correction, i think its Context.IsOnHostComputer that you wanna check
you can use Context.IsSplitscreen too
actually i misread what IsOnHostComputer checks, so maybe not, hm
well, you can probably get by with just the IsSplitscreen check i guess? its only true if you are in a game that is currently splitscreen, so you can check if thats true and then check the host. if its not splitscreen, just check Game1.player
Thats the play
Nice idea!
Cause a game cant be multiplayer and split screen I dont think
I think someone managed to get that working, but it would definitely have oddities since there are some interpolation changes and such in split screen that would end up applying to MP too
can u have different mod config for different players in coop
Not unless you explicitly code in that support yourself
i guess theres nothing stopping you from only calling ReadConfig when you load and see if its multiplayer or not
i was wondering cus a common kind of config is conditionally change content
ok cool i dont have to worry about it 
is the host the only one with config.json then
in splitscreen?
in regular coop
I assume you mean split screen, so sorta - your same configuration object would be used for both players
on online coop everyone has their own config.json for their mods
does anyone here know if we're allowed to store List<string> types within a modconfig file?
which is why its important to keep them aligned when playing coop
wait then you can have different config 
you can, but expect issues
SMAPI doesn't automatically sync configs
There are definitely use cases for different configs - pronouns, for example
you have to turn it into something that can be stored in .json
how would I go about doing that?
I think List<string> works fine in config? I could've sworn iI've done it before
purely client side stuff is generally fine to have different configs
It just wouldn't automatically work with GMCM
nah it's giving me errors, unless im doing this wrong
What error are you getting?
i was think about this because cornucopia artisan machines has a config which adds a machine rule
this is from the this.Config = helper.ReadConfig<ModConfig>(); line
and here is my mod config file
Ph. tjat
Okay I messed up that badly
That was supposed to start wtih "Oh, that"
Anyways
😭
(speaking of configs i just accidentally created an empty config.json for every single mod in my testing folder that didnt have any config options... oopsie)
Are you sure that's coming from your mod config loading/saving?
Can you post the full error with stack trace?
wdym, also wanna move this to dms or nah
!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.
Oh, right
(I got used to the ES server where the commands start with .)
chris, can you follow those directions the Governor bot posted and put the resulting link here?
Log Info: SMAPI 4.0.8 with SDV 1.6.8 build 24119 on Microsoft Windows 11 Pro, with 13 C# mods and 1 content packs.
there :D
That doesn't look like an error with your config
I'm not sure how it's happening actually, but it's something to do with Data/BigCraftables
I have never heard of BigCraftables in my life 😭
It's the "big" objects like furnaces
idk but it runs perfectly fine if I dont initialize locateHistory variable in my ModConfig.cs file
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.
They already posted it
ya this is all i have
what does locateHistory do?
I just added a List<string> to mine and it worked fine. Let me try with nullable enabled
as of right now, nothing
im just trinyg to store 5 strings in it
to use later on
not sure if this will help with the issue
Oh, that's not the error in the log
Oh it is
Hmm
Does newtonsoft not like nullable? 
by nullable u mean like the ? right?
@ivory plume Any ideas on this?
Yeah, I guess you can try making it List<string>?
Oops, sorry for pinging you twice
I don't understand what nullable context is though 
What's in your csproj
yeah making it nullable does not solve it
Nullable works for me 
wdym
NullableContextAttribute is part of the underlying .NET framework, used to track nullable annotations. It looks like there's an issue with the loaded .NET; are you targeting .NET 6 specifically?
Uh I'm afk so
Make that not static as a test
Wait, no
That wouldn't help
oo i am currently targeting .Net 8.0
Ah, that makes sense then. You need to target .net 6
You have to target net 6
You can edit your csproj to have this:
<TargetFramework>net6.0</TargetFramework>
Instead of
<TargetFramework>net8.0</TargetFramework>
oo yippie it worked! It ruined another part of my code but it was an easy fix.
(You can use <langversion>latest<langversion>)
how owuld I do that, cause I just right clicked my project thingy and clicked this
Oh, that works then
(This bug report.
)
anything else you think might be relevant;
• • This makes me sad
You can also edit a csproj file directly by double clicking on your project name in the solution explorer
The one with this icon next to it
I'm not sure I'd recommend that to most mod authors. That will enable all newer C# features even if they require a newer version of .NET, which may then crash at runtime for players who don't have it.
this might be a dumb question, but would swapping .net frameworks have any impact on user experience? Or is it something where like, if it works on the developer side then it works on the user side
As long as you set the framework version to 6.0, the compiler can sort out any discrepancies between the two.
It won't let you use .NET > 6 features.
I've never run into that with langversion latest
i just want to use [] instead of new(){} 
[] containers are so nice
real, i had to swap my [] to a new() for another part of my code 💀
Even if I've heard thy aren't the most efficient in .net 6
Looking for some help with event instructions... I have this subset of commands inside an event. I am trying to have Sam warp out of the building before Sebastian gets there but he always waits and they warp out together ```speed Sam 4/speed Sebastian 3/
advancedMove Sam false -8 0 0 3/
pause 300/advancedMove Sebastian false 0 -1 -9 0 0 3/
proceedPosition Sam/warp Sam 1000 1000/playSound doorClose/
proceedPosition Sebastian/warp Sebastian 1000 1000/playSound doorClose/
You can if you do the langversion thing in your csproj
I have this in all of mine: <LangVersion>latest</LangVersion>
huh i assumed compiler would turn both kinds into same IL 
I am too scared to touch anyhting that im not familiar with 😭
but out of curiosity, would that be a new line I haveto add under <PropertyGroup></PropertyGroup>
I think it's just because collection initializers don't necessarily know the best concrete type for something like an IReadOnlyList<string> that gets initialized to [], and maybe it'll allocate a new collection instead of using a shared static empty list or whatever. But I also haven't looked at the decompiles.
We are most likely talking micro-optimization unless you do it every frame.
It's fine under these following conditions
- You're using it to make an empty collection
It's specifically [..otherList] that has nonsense codegen
Ah, I've used that a few times. Oh well.
but splat operator my beloved 
No one's complained yet!
So have I! In places performance does not matter
The newer C# features aren't all compiler syntax sugar. For example, List<string> list = []; will compile just fine, but fail at runtime if the player has an older version of .NET because the required List<T> changes aren't implemented in older versions.
Are you sure that's true? I'm sure I would've gotten a report about that by now.
I have literally used this in SpaceCore 
No that works fine
I think
It's all over the place in my code
Yeah, SpaceCore uses it a bunch (mostly in atra's PathfindingFix stuff though)
maybe most ppl just have net 8 though 
i certainly never tested my mods on net 6 only env
🐍
(pathos probably has)
I just looked at my own code in ILSpy. C# with <langversion>latest</langversion> is:
operands = [pausedTimerField, timerSinceLastCheckpointField],
And decompile is:
operands = new List<object>(2) { pausedTimerField, timerSinceLastCheckpointField }
Well, it's a bit hard to test on a newer system. I guess we could create a VM without newer .NET versions installed to see what happens with the various C# 11 features.
(might be misremembering) I thought SDV packs its own .NET DLL? It doesn't use system .NET at least on Linux
Yeah, I went through and checked the code gen when it came out
Also for primary constructors
I think the decompile/MSIL tells us enough so as not to require actually testing on older systems; if it generates the same IL as the C#9 version then it should run fine on older setups.
And it's not ILSpy being silly or anything; the IL itself is just a standard "make a List<object> and add items to it".
Even the spread operator looks OK to me. Here's a decompile snippet of ButtonResolver.GetActionButtons which uses the spread:
List<SButton> list2 = new List<SButton>();
list2.Add(SButton.ControllerA);
list2.AddRange(Game1.options.useToolButton.Select((InputButton b) => b.ToSButton()));
That's from:
ButtonAction.Primary => [SButton.ControllerA, .. Game1.options.useToolButton.Select(b => b.ToSButton())]
(Based on the PolySharp readme, CollectionBuilder is the .NET 7+ type used to implement [] initialization on some types that can't be implemented with compiler downleveling.)
Maybe there are issues with specialized types? I can check where I've used something like ConditionalWeakTable.
Well, can't find any instances of trying to initialize that with actual data, but CWT<...> table = [] just does a new CWT. These fallback cases must be pretty rare...
I've definitely used it for CWT
Anyways. For features that truly require runtime changes it will refuse to compile
Also known as every time I want a regex
Yeah, that's been my experience as well.
Not with regexes specifically, but I've had no end of heartburn with ref structs which were just barely functional back in .NET 6.
Maybe it's for even older versions like framework 4.0
curses the existence of framework 4.0
Could be? But most of the decompiles I'm looking at would compile all the way back to .NET 2.
Or 2.1 or whatever the official release was. Feel like a dinosaur even mentioning that version.
Oh, I wonder if maybe it lacks a default constructor?
(Pathos, the framework 4.0 context is a lot of swearing at labview for making me use it.)
Or MyType m =[anything]
It looks like ranges (str[2..3]) don't get downleveled?
IL_0040: newobj instance void [System.Runtime]System.Range::.ctor(valuetype [System.Runtime]System.Index, valuetype [System.Runtime]System.Index)
Not sure if the compiler injects the required type or something though.
Range should be in 6
But we have range in .NET 6. They don't get downleveled to 4- maybe?
I think we had range since 5.
Ranges also aren't part of collection init
Yeah, I'm referring to C# 11 features in general (not just collection initializers). The range pattern (..) is from C# 11 + .NET 7, but I guess System.Range was already in .NET 6?
Yes, we had Range since 5 I think.
Oh, actually it's from C# 8.
I'm sure that something did happen, somewhere, to justify the caution, though I think for most of us compiling for C#latest+net6 is problem-free. If I try to do something like implement an interface on a ref struct or write a ref <ref struct> field when targeting .NET 6, it'll just nope out of that, even though C# latest would allow it.
Well I guess langVersion latest seems safeish until we see evidence to the contrary. (I'll still stick to nice legal C# versions to be safe though.)
I recall issues with using langversion preview
But they were of the hot reload variety
And that was preview
I actually got in the habit of using LV latest back in the .NET 5 days because the framework development really was not keeping pace with C# compiler development at the time. And so I think the C# team just got used to the idea of having to transpile sometimes.
Transpile is maybe the wrong word... down-compile? Polyfill? Whatever we want to call it.
Meanwhile I find myself asking if for loops in labview really have to be that annoying lol
And wondering how to get a view on a string in python
I like my Saturdays to be python-free and especially Labview-free.
You should take a break sometimes.
I'm not sure how that works
It's simple, you just take whatever time you had originally planned to spend banging your head against the desk and redirect it toward, well, anything really.
this reads an awful lot like my bug reports 
On-topic question, what draws the new-day UI showing items sold and profits? I'm trying to locate it in _newDayAfterFade, but it's so long, it's looking for a needle in a haystack.
i believe it's ShippingMenu.cs
Really? That's not the menu for the shipping bin?
my husband codes everything in .Net 2 because half of his stuff still runs on Windows 95. I mentioned this sentence to him and he made a sad noise
nope, it's the summary of shipped items for the day
Huh, ok. Yes, I see, it's coming from the aptly-named showEndOfNightStuff.
you can tell because it's not an InventoryMenu
and because it's where i stole the cloudy weather effects from
Interesting, so there is an endOfNightMenus stack, I was thinking to show an EOD summary I'd have to hack the EOD menu but it looks like I could just push a totally separate menu.
for sure! i think you can even set your own end-of-night icons and statuses to show for waiting players
Multiplayer is an alien planet to me. I try to fix things when someone reports they're broken and that's about it.
Ah but it's using Spacecore to add the hook.
Game1.endOfNightMenus.Push(new NewRecipeMenu(variantKeys: variantKeys));
Game1.player.team.endOfNightStatus.UpdateState(ModEntry.EndOfNightState);
Game1.player.team.endOfNightStatus.AddSpriteDefinition(
key: ModEntry.EndOfNightState,
file: AssetManager.GameContentEndOfNightSpritesPath,
x: 48, y: 0, width: 16, height: 16);
in some order or another
I mean, I don't even know what an "end of night status" is or what purpose a sprite would serve for it.
it's the icons that show what people are doing in multiplayer at the end of the day
I don't think it's really important in my case though, since it's more of a list of minor changes that happened vs. some overarching status.
Yes, again, alien - to know what this means I would have to have played MP at least once.
Split screen I can deal with (more or less), but MP is "hope and pray that the netfields do whatever they're supposed to".
trust in the netfields 🙏 they know what they're doing
The real question is... do I know what they're doing
I trust little in a game that names its methods "stuff", but I trust the netfields because I have no alternative.
don't be nosy
the net fairies are working hard and sending packets somehow
Net fields are fun
Dwarf Fortress style fun?
what is the most category_vegetable vegetable in your opinion
beets
parsnip is the very first one you grow
I see we're rooting for the... roots
kale is the greenest
but sdv parsnips look fake as hell
kale is good one i always find myself missing those
how dare u attack my precious parsnips
i also need opinions about the fruitiest fruit and fishiest fish
kale and similar things dont even feel like vegetables to me theyre just leafs
i think apple is the quintessential fruit though
was about to post that exact sentence lol
as for fish, I argue the carp
||Smoked Fish|| default icon is Carp
plus look at it, it's the platonic ideal of the idea of Fish
what about 
broccoli 
i think 90% of the fish in the game are about as fishy as any other fish
alternatively, cauliflower for the most vegetable vegetable if not parsnips
u know what bok choi is the most veggie of veg
the Vegetable Medley is made from tomato and beet
oh gosh
i knew it wasnt just me thinkin about beets
im thinkin about thos beets...
(i also completely forgot stardew had bok choy)
quick C# and logic question... I want to test if two bools are the same. I can do A == B of course, but is there a reason why A !^ B doesn't work? (^ is XOR, so P^Q is true if P and Q differ)
is there a reason the logical operation ^ doesn't work like a conditional operation on bools?
!(A ^ B)?
ok, sure, be all smart about it... of course I forget I can use parentheses...
ugh, i just spent an excruciating amount of time fixing a transpiler and the reason it didn't work is because i can't read good and i set up my matching for the wrong part of the function
thanks, Selph, though... I'll stick with == since it's way more readable
(ive been there, my condolences /pat)
(still seems like !^ should work, though)
reading IL can be weird, definitely been there
i think my weird reflection adventures for today are comin to an end... now that i have tested what i think is a properly functional CP token that will grab any arbitrary config value from any other mod installed
it hasnt completely crashed or broken anything yet anyway 
are item queries cached in anyway
with only a little bit of tweaking i could probably also make a token that grabs i18n from someone elses mod too, but that seems like it has a lot less use
and game state query
i dont think vanilla queries of any kind are cached in any way
besides the delegates themselves i think
im glad i am do something worthwhile then 
caching list of item id for particular context tag
i vaguely remember someone experimenting with a mod that added caching to queries but idk if it was more than just a fun experiment or not
it was a while ago
(checking config values in other mods is why lacey has a newtonsoft reference)
now you know why i needed it too then! 
honestly gettin the config out of smapi wasnt bad at all. trying to figure out how to properly make an advanced Content Patcher token broke my brain a little bit tho
It was Khloe and her hyper game query
that does ring bells
though that's for GSQs, not sure if item queries were included
i feel like i also recall that the lack of caching also didnt really matter until you started running like 10,000 queries at once
yea probably 
although, i can notice a small speed improve on second time opening keg menu, over the first time
so it does something
You sort of have to be careful with trying to cache queries, because the possibility/frequency of staleness depends on the query itself.
hrm does C# hashset have inplace intersect it was IntersectWith
hi guys im back, does anyone know how to "stretch" a ClickableTextureComponent? For example, I have a 9x9 sprite that i took from Cursors, and I was wondering if I could stretch that image to fit the dimensions of 45 x 9
if you are calling SpriteBatch.draw() yourself, there should be a version that takes a destination rect. that should automatically scale your source to fit the rect
(i did it anyway bc it was about as easy as it seemed)
I finished all 4 of my greenhouses for my mod, and now I'm wanting to make a config option to allow players to enable or disable individual greenhouses from showing up in Robin's Build menu. looking at the documentation on the CP github, do I need to have each greenhouse in its own seperate .json to do this, or can I disable individual greenhouses when all 4 are in the buildings.json?
they dont need to be in separate jsons, but if you want to toggle them individually, they need their own "Action": "EditData" blocks with their own When conditions
I know this isn't correct yet, but when you say When conditions, you mean this, correct?
yes
and I've already got it down in my config schema. besides fixing the obviously-incorrect FromFile, is there anything else wrong with it?
i mean that depends on how you intend to fix the fromfile, because fromfile isnt used for EditData at all
if you want to use config to determine whether they show up in Robin's build menu, you toggle on or off with When conditions the EditData patches you are doing to Data/Buildings
hmm i cannot get it to work properly, because for that I would have to load the Texture2D without specifying a source rectangle. Which would mean it would use the whole SpriteSheet
then Target is what I want, instead of FromFile, because I'm 'targeting' what part of the mod I want to load, correct?
you are doing the exact same thing you did to add to Data/Buildings in the first place but with When conditions attached
oooooooooh
you will just have to split up each of your Entries into their own Action: EditData blocks
instead of all under the same Action
for love of cooking i used dandelions for forage, tulips for flowers, plums for fruit, and bokchoy for vegetables
and the default fish category icon for any fish
so like this, and I make my own EditData block for each greenhouse?
above entries
above or below, but at the same level in the json/tree/etc
just not {inside} of entries
like this?
actually
you can probably just use your config options in the BuildCondition field
if they are just true/false config values then just putting the config token in there will make the BuildCondition either true or false
so if the config is set to false, the buildcondition will be set to false, so it wont show up bc you cant build it
(example of config when here:)
https://github.com/Pathoschild/StardewMods/blob/develop/ContentPatcher/docs/author-guide/tokens.md#player-config
however if you do still want to do the When condition way instead then what you have there looks tentatively correct to me assumin the name of the config schema matches up
BuildConditions can take config tokens?
you probably want to When it out rather than using BuildConditions if the building is a perfection requirement
doing the When condition way will make the buildings not exist at all in the game when the config is turned off. using the BuildCondition field they will still exist but just wont be buildable ever. i dont know if theres a functional difference
i didnt realize you could set a perfection requirement on a building
if thats the case then yeah go with When conditions
i don't know if you can haha
i have no idea how perfection works, just that people complain to me about it
i dont see a field for it in BuildingData, but idk if perfection checks it manually
the only requirement I currently have is the Pantry being done (currently commented out for testing)
the wiki just says it needs the obelisks and the golden clock, so its probably fine
you can use multiple queries in one condition
PLAYER_HAS_MAIL Any ccPantry, {{Enable LudeonicrousGreenhouse}}
that will require both of those things to be true
but if your config is set to false, the token will be false, so both being true will never be possible
ah woops I saw Button posted above
so for the sake of checking that I understood things correctly, these two screenshots are correct and I no longer need the When condition and seperate EditData entries for each greenhouse, yes?
looks right to me. best way to find out weould be to test it though
excellent. it's time for testing!
Just to confirm, you cannot make an arbitrary building a perfection requirement, unless some mod is doing it through Harmony patching. The obelisk and gold clock clock logic is completely hardcoded to those buildings. It's everything else that's percentage based, so adding 500 new items to ship/craft/cook or 50 new NPCs significantly alters the balance for perfection because all of them are required. (which presumably is a big reason why the Perfection Tweaker exists)
that's something I'm a little worried about, I was originally going to do weapon upgrades through the crafting system and didn't want it to be part of perfection
I don't think weapon or tool upgrades are part of perfection either (if you mean forage recipes or going through Clint)
Yes, every single crafting recipe counts toward perfection. Add new recipes, add new perfection requirements.
If you mean forge "recipes" though, that's different.
But if it's a regular crafting recipe that takes, say, Galaxy Sword + some unobtainium as ingredient and you can just craft it willy nilly then yes, it becomes part of the perfection score.
I haven't gotten that far yet but the crafting is more to infuse other weapons into the weapon, which would be a regular crafting recipe. Maybe I'll make it more of a machine thing? Put item and other item in, get upgraded weapon back the next morning in the mail.
Machines won't skew perfection, although it feels like kind of a weird mechanic.
The logic is pretty straightforward, the name of the function is percentGameComplete.
(The two most irritating stats in there, by the way, are actually not crafting or cooking, but Stardrops and Maxed Friendship, because "all stardrops" is literally all or nothing, you get all the points for all and nothing for [all - 1], and maxed friendship means "% of NPCs with maxed friendship" so if you have every single NPC at [max hearts - 1] then that also counts for bupkis.)
Oh, monster slayer quests behave the same way, although I don't think I've seen a lot of mods that add those. But if you add 50 new monsters and add quest rewards for all of them, then you also essentially knock a flat 10% out of the perfection score.
communicating the recipe would be tricky doing it as a machine... the idea is that the harp levels as you progress down the mines, so you feed it the sword, the slingshot, the dark blade sword, the master slingshot, the galaxy sword, and each one increases the damage of the respective attack and other stats.
Anyway... I went off on a bit of a tangent there but I'd say if the crafting is meant to be a single linear progression then don't worry about it, but if it's meant to be many different variants on a recipe with one relatively rare base item (i.e. like the Forge upgrades) then it's better not to use regular crafting for that. If it's a "weapon tree" then it'll screw with perfection; if it's just a single upgrade path, it'll still affect perfection but you can argue that's intended behavior.
it would be pretty linear, and I would assume if someone is playing with the harp mod that they are using the overpowered weapon in it that is required to cast spells.
You learn to assume the bare minimum about what players will do. Frankly, I'm surprised that there's much intersection between players who care about perfection and players who install a lot of content addons, but according to blueberry they exist.
we'll see when I get there, lots to do until then
some people completed vanilla perfection and wants more of a challenge (though probably not to unfair/unobtainable levels). not very surprising to me
though I presume making perfection obtainable even with your mod is no longer that crucial given the ||perfection waivers|| in 1.6
you can exclude some items from Perfection requirements, at least
once again we dream of data models crafting/cooking recipes
(maybe someday violently shakes the magic 8 ball)
I thought that cooking was a part of the shipping requirement, because you can ship food. is cooking everything a seperate requirement? (I never did True Perfection, so I never looked at the requirements)
yes, but you fulfill them by cooking them, not shipping the cooked item
similarly, you fulfill the fish collection by catching it, not selling the fish
okay, that makes sense. not being able to disable the other stuff stinks, then. that person up in the chat channels with over 1100 mods (as of her latest username) must hate seeking True Perfection above all others
(tbf, i've tried to actively avoid adding anything into perfection % for any of my objects so far, but i could've missed one somewhere)
Quick question: I'm working on updating Solstice Winter Star, which changes the Winter Star festival so that it's less Christmassy and people give food instead of gifts. With the new CP custom Winter Star gifts, I need to edit out some of the existing gifts from RSV for compat, so I've tried this to remove them:
{
"LogName": "SWS RSV Philip Gift Changes",
"Action": "EditData",
"Target": "Data/Characters",
"TargetField": [ "Philip", "WinterStarGifts" ],
"Entries": {
"(O)349": {
"Id": null,
"ItemId": null,
//"MinStack": null
},
}
}```
but when I do a patch export on Data/Characters, it's showing `"Id": "???",` (with the rest of the fields there but nulled) where the item entry used to be. Is that going to cause problems and/or is there a better way of completely removing that entry?
also, an hour later of wrangling my building.json into compliance (it didn't like my curly braces, for whatever reason), trying to chase down why my mini greenhouse maps wouldn't load (turns out that I did not have a file named MinilGreenhouse and my eyes glazed over the unneeded l when I was trying to figure out why it wasn't working) and why my map patches weren't working properly (turns out having the mod point at the actual patch files helps a ton with that), my greenhouse mod works!
I just have one final question, because I am not sure if I did it wrong. when it comes to disabling the greenhouses in Robin's Building menu, I have to clear out true and type in false, instead of having a little clicky box like the map patches do. is it possible to have the disable option also have a clicky box, or is that a no-go because it's linked to a BuildCondition?
i'm not... 100% on this, but you could probably get away with the 'fields' instead, and changing the minstack to -1 and the maxstack to -1 to.. ensure it doesn't get given?
I think you wanna remove the list entry itself
so like "(O)349": null
Ah, okay! I'll try it out, thanks 😄
and if that doesnt work (im not 100% sure thats the way to do it), WinterStarGifts is just a list of generic item spawn conditions
so you should be able to add a Condition field to the entry
and just set the condition to FALSE
though keep in mind that the list of possible gifts cant be empty
i mean, it can, but then the game chooses from a list instead
yeah it's the item_spawn format
"Id": "{{ModId}}_GalaxySouls",
"Condition": "PLAYER_NPC_RELATIONSHIP Current {{Marlon}} Married",
"ItemId": "(O)896",
"MinStack": 5,
"MaxStack": -1
},```
Nulling out the whole entry worked! 
Also while we're on the topic, is it possible to edit the default gift list via CP? Or would that require C#?
Aw, figured it might be. Oh well
(though its just between kids and adults)
I've got replacement lists for all the vanilla, RSV, and SBV characters so it'll take priority for those characters, and I'll just add a little how-to section for any mod authors who want to add compat with SWS on their end
SWS?
Solstice Winter Star
that makes a lot more sense than the welsh word for kiss i thought at first 
(also since its a list you can also just move your entries up to the top of the list for priority instead)
actually scratch that i forgot thats not how winter star gifts work
i forgot it doesnt just take the first valid one
it's a range at random
I am using a PIF mod, with a special door. There is a chest, and when I open it, the location is so long I can't see the other locations. Is there a way to rename it?
I want to write data to save but failed(written to json before), data model is like this,can anybody helps T-T
public sealed class PlanData { public List<Plan> plan = new(); public int max_plan = 20; }
failed how?
no error but no data also
how are you writing it?
Helper.Data.WriteSaveData("plandata", model);
when are you writing it? when are you reading it?
I read it OnSaveLoaded and write it when a key I set is pressed
did you sleep in bed to actually save?
(Also, afaik, OnSaveLoaded triggers only once, when you click load the save from the save selection menu)
Your link to your screenshot is not accessible. You can just upload an image in here instead of uploading it somewhere else and providing a link.
ok
that is what I want . I just want to load it once
thx I make a stupid mistake
Ok this should work.
I removed the door, and the room, and now its still there. It covers the area that tells you which chest you are in.
There probably is a way to rename it, yeah. I'll download the mod and have a look.
Are you using Kisaa's More Hatches and Ladders mod too?
Okay I have looked at the Better Chests docs and apparently if you give the chest a unique name it won't show its location in the dropdown anymore. Can you try naming that chest?
good morning gang, hope everyone's doing well 
I come here to ask if there's a mod that adds a custom language so I can study how to add it alongside the tutorial I found
someone on my UI mod asked if I could add vietnamese and Im like
yea sure !!
You mean like this? https://www.nexusmods.com/stardewvalley/mods/8409
Or do you mean a custom language in your own i18n?
I just searched "vietnamese" in Nexus you dork :P
Sometimes the smartest among us are also the dumbest 
We all have to take turns doing silly things so we stay humble haha
real and true iugdfsiugf
but yeah so UI mod right
This guy who asked already went through the trouble of recolouring the stuff I did and Im just
Oh wow they really want this on the mod
im so honoured
thats why I came here cuz I havent modded in weeks uigdsiusg
(I spent two hours last night not noticing that I had {{Random: 1, 100}} instead of {{Random: {{Range: 1, 100}} }} and I was tearing my hear out about why my condition wasn't applying.)
omg i wouldve missed that too HAHA
Good, you need to get back into it for your own sake to avoid the wallowing anyway 
real 😭
and then Nexus email surprised me with "Hey you have 6k UDLs, here's premium on us"
and Im just
Oh wow, but I havent done anything in a while wweh wweh
I wish I knew how to add extra letters in the English version.
real, is this for some of the maori letters you need?
Yeah so I could use macrons. Using whatever the two dots are called is a better-than-nothing workaround (thanks again to Airyn for telling me) but my ideal is macrons.
ah im glad there's a workaround
Who knows tho maybe one of these days you'll be able to do the macrons :D
Yeah I hope so. So what are you doing for your Vietnamese UI thing? Just making the alphabet sprites a different colour or something?
so the person who wants me to add it in recoloured the LooseSprites and Minigames that had some Vietnamese words, and they also made a vietnamese translation for my config
I'd have to do an i18n conversion of that if I hope to use their translation
They also wrote this for content already:
{
"Action": "EditImage",
"FromFile": "assets/LooseSprites/Button-vietnamese.png",
"Target": "Mods/ILoveFish.VietnameseTranslation/Button",
},```
and Im sitting here like, oh, do I uh just add this? udgdusauigsa it seems okay to do that as is //clearly I havent tried yet
https://www.nexusmods.com/stardewvalley/mods/24371
I also found the mod it's targetting :D
Sorry, Yes. I'll try naming it.
hi hi, im getting this error:
[Content Patcher] Ignored Starry Ocean Garden UI Theme > EditImage LooseSprites/Cursors #1: the When field is invalid: 'Cursor|contains= {{i18n:config.Cursor.values.Off}}' can't be used as a token because that token could not be found.
here's the relevant snippet
"{{i18n: config.Cursor.name}}": {"AllowValues": "{{i18n: config.Cursor.values.Teal}}, {{i18n: config.Cursor.values.Blue}}, {{i18n: config.Cursor.values.Pink}}, {{i18n: config.Cursor.values.Purple}}, {{i18n: config.Cursor.values.Off}}",
"Default": "{{i18n: config.Cursor.values.Teal}}",
"Section": "{{i18n: config.section.Appearance.name}}"}
},
"Changes": [
{
"Action": "EditImage",
"Target": "LooseSprites/Cursors",
"When": {
"Cursor|contains= {{i18n: config.Cursor.values.Off}}": false
},```
It used to just say
```"When": {
"Cursor|contains= Off": false
},```
But because Im trying to make it i18n I felt like I had to change it, but now it doesnt work anymore 
oh wait
this is real life rubber ducking im so sorry backreaders iugfdsiugsdf
okay I tried changing it to
"{{i18n: config.Cursor.name}}|contains = {{i18n: config.Cursor.values.Off}}": false
},```
and now got this HAHA
it doesnt seem to like that ihygsdfe
I tried this too
"config.Cursor.name|contains= config.Cursor.values.Off": false
},```
and now getting this
`[Content Patcher] Ignored Starry Ocean Garden UI Theme > EditImage LooseSprites/Cursors #1: the When field is invalid: 'config.Cursor.name|contains= config.Cursor.values.Off' can't be used as a token because that token could not be found.`
and now im kinda stuck ihiusgfa thank you in advance for the help 
Don't put the i18n token in the config names, I don't think configs read tokens at all
Configs will automatically use the config.<config name>.name translation key if present in the i18n translations
Oh ! so leaving it as Cursor should be okay for it
Yes
Yes this page explains how translation works for the config schema: https://github.com/Pathoschild/StardewMods/blob/develop/ContentPatcher/docs/author-guide/config.md#translations
oh thats so neat
Yar, basically all your naming scheme is already correct. Just need to use Purple there instead of {{i18n: config.Cursor.values.Purple}}. etc
I see! thank you so much
in retrospect that makes sense, because of the actual file names for my cursors 😭
Ive changed things back as far as I can tell, but Im getting a weird error
[Content Patcher] Can't apply image patch "Starry Ocean Garden UI Theme > EditImage LooseSprites/Cursors #1" to LooseSprites/Cursors: the FromFile file 'assets\Cursor\{{i18n: config.Cursor.values.Teal}}.png' doesn't exist.
Here's the snippet with config schema and cursors
https://smapi.io/json/content-patcher/8b7802b22f1b411fba0e6a0e07cc8b8a
If it helps this is what I put for my default.json https://smapi.io/json/i18n/57590e3d8eda460abd2707a22abec010
pretty sure I saved 
I also backed up my original file before I tried to erroneously edit in i18n tokens 
Mm, if you're sure you saved, try deleting your config.json?
ohhh I forgot about that! Okay okay i'll try
that fixed it! thank you Dolphin 😭
so easy to overlook
Yey!
yipee the vietnamese translation works well !!!
gonna credit the guy that edited my files and did the nice code for it
Im also gonna try and sit down and do translations for the rest of the languages so it matches 
question now, does this warrant a Major change, or is it just minor change (adding i18n + adding vietnamese)
my mod before update was a 1.2.3
By "adding i18n" do you mean you didn't have i18n support at all before and now you do?
yesh
because prior to this request my config was just english
and no i18n yes yes
Hmm that's definitely bigger than just adding one translation. I think there's a guide to versioning somewhere that might give an idea?
I just closed my Firefox but I think it's on the wiki on the manifest page?
Personally I'd just name it 1.2.4 now.
sounds good to me bet
off the top of my head I remember it being like "major, minor, bug fixes" 
You mean that's all the guide says? No guidance on what counts as major or minor?
oh nah, thats just my notes
the guide is much more detailed
its just my personal mnemonic
I should review tho 
https://semver.org/ This if you want it all official-like.
Oh right. Yeah it definitely doesn't warrant a first number change. Maybe it counts as a second number change because you're making translations much easier?
yeaaah thats what I was thinking of !
Ah that's the link I was thinking of too thanks Dolphin!
yess
and the reason why I remember it like Major, Minor, Bug fixes is because of the summary at the very beginning 
but yes ah thank you guys rly appreciate u, i hope ur meal is delicious
hello! im creating a custom map and i want to add a fireplace and make it interactable like how it should be but im having trouble doing that behavior. or maybe have it lit up at night time only? :/
not sure about the interactable but a possible only when its dark kinda thing might be day and night tiles like the windows have? otherwise iunno
i wish i knew as well cuz i just have my fireplace on the map not lit xD
its my hope atm. following the one in wiki NightTiles [<string layerName> <int x> <int y> <int tilesheetIndex>]+
how can Tiled know which tilesheet im referring to if its a different one? the animations (afaik) for fireplace is named animations while fireplace is in furniture tilesheet 🤔
yeah i fear it might be more of a C# code snippet with the animation but iunno day/night tiles usually are not animated afaik
aww, the seedshop map doesnt give much clue either; but thanks tho! 
looking at lewis house map i dont see any tiledata or map settings for the fireplace there either
but my brain is also garbage and i modded for so long idk if those even light up in vanilla lol
NightTiles and DayTiles have to be on the same tilesheet. I don't know how to make a fireplace that turns on when you click it.
it does not neither at saloon. i think only at pierres but its not toggeable xd it just lits up starting at 6pm (or earlier not sure).
it does seem to be hardcoded but im not rlly sure :'>
If you can find a mod with a fireplace that works you can check that. I can't remember if any of the expansion houses have working fireplaces or not.
the ones ive looked up at nexus are not updated (idk if theyre still working or if applicable).
Oh I don't mean a mod that specifically adds a fireplace. I mean like East Scarp, SVE, RSV etc. One of those might have usable fireplaces and then you could check if it was in their C# or CP stuff.
GameLocation.setUpLocationFlair if you want to follow the crumbs
I wonder how weird it would look if it was just done using NightTiles without an animation
Probably too weird
You could make a fire animation in Tiled, I think the lack of light might be kind of odd
I think you'd have to use CP conditions with an OnTimeChange to make it only lit at night though
I actually don't know if the night tiles respects animated tiles
I wouldn't think so
(Asking wren for a fireplace for MUMPS)
Because the animation is set in the xml for the map but NightTiles goes off tilesheet. Unless I am misunderstanding somewhere.

Time to make (FF) Fireplace Framework
I guess I could actually just slap that into my map actions mod, I need to rewrite that as is
That seems like a good fit for a map actions mod, yeah
I'm just going to leave mine unlit
ok, i just tried it and no, day/night tile does not work with the animation
now we know :B
I appreciate it, I wanted to know but didn't have anything set up to easily test that lol
i luckily did since i have quite a few indoor maps i am working on for my fishmonger update lol
and i happened to use a flickering candle as light source
Thanks for checking Void
on top of the feature for BL?
Lol, I try to avoid releasing mods with such wide functionality :P
anyone knows what is the name of the file that contains these interface elements? I looked at the cursors.png but couldn't find them
https://www.spriters-resource.com/pc_computer/stardewvalley/sheet/225090/
anyone know if "ItemId": "{{ModId}}_MinecartTrack", is a valid unqualified ID or is it missing something?
Did you make an object called {{ModId}}_MinecartTrack?
Assuming you're still working on the flooring thing, it's asking you to link up with an object, rather than create one there
(it also depend if you're in the same mod or another)
yea still the flooring, same mod
https://smapi.io/json/content-patcher/c1571667084e475f8bb1c155471e6265
I put this together yesterday
oo i did not make an object
i made... the FloorsAndPaths edit and the crafting recipe, which works, but then it gives the Error Item 🚫 guy
so... it is probably missing the object
Yeah, it's a weird little linked up system
ahh got it. thank you! i've been banging my head against a wall lol
I love the chaos of these tracks though
Once I got the basics working I started screwing around with the way paths connect
lol oo that looks great!the middle piece is wild
idk how to make that sticker go away.. that's not what i typed
Looks like it's part of that message lol
lol totally
hmm im not sure. afaik, i havent seen a specific tilesheet that contains just those but i found some of those in the cursors
The page says it's unused content so if that was a tilesheet it has potentially been removed from the game. But maybe someone just put several different things together? I don't know how the spriters resource works/
Hello!
I've added two new TileActions in the latest update:
DLX.PIF_WarpSameLocation <X> <Y> - TouchAction that silently warps the player to the specified coordinates in the same location
DLX.PIF_DoorSameLocation <X> <Y> - Action that warps the player to the specified coordinates in the same location. Plays a doorOpen Sound
oh that's awesome to hear!! thank you so much for your awesome work 
Question cause I don't see it necessarily specified: how do you make sure a seed can only grow in certain seasons?
It's in Data/Crops
OHHHHH
Seeds on their own are just objects, the crop data is where all the info about how crops actually work is
Crop data has to be tied to a seed, which makes finding the crop you're looking for annoying
Because you have to figure out what the crops seed item Id is and then search with that
I see I see, thank you
wait how exactly do you do that other than running the game and seeing what happens?
I usually have Data/Objects and whatever else I need open at the same time
Just go back and forth
Maps/menutiles
I dunno why but I can hot reload just fine now, maybe the changes I was making before were just always too much for a hot reload, I really don't know
thank you!!
Having a map action for turning fireplaces on and off is neat, checking for auto on/off times seems like maybe out of the scope of my map action mod though
The debugger should normally give you the specific reason why a hot reload isn't possible. A tragically high number of things are in that bucket.
Is this where I go for mod support help?
I'm trying to animate an item using Spacecore but I keep getting errors no matter what.
{
"Action": "Load",
"Target": "Mods/{{ModId}}_RainbowSand/RainbowSand",
"FromFile": "Assets/Miscellaneous/RainbowSand.png",
},
{
"Action": "EditData",
"Target": "spacechase0.SpaceCore/TextureOverrides",
"Entries": {
"{{ModId}}_RainbowSand": {
"TargetTexture": "Mods/{{ModId}}_RainbowSand/RainbowSand",
"TargetRect": {
"X": 0,
"Y": 0,
"Width": 16,
"Height": 16
},
"SourceTexture": "Mods/{{ModId}}_RainbowSand/RainbowSand:0@10,1@10,2@10,3@10,4@10,5@10,6@10,7@10,8@10,9@10,10@10,11@10"
},
},
},
Nearly everything I've put into SourceTexture causes an endless cascade of the error below (or some variation like 2.xnb or 3.xnb)
---> FileNotFoundException: Could not find file 'D:\Games\Steam\steamapps\common\Stardew Valley\Content\1.xnb'.
File name: 'D:\Games\Steam\steamapps\common\Stardew Valley\Content\1.xnb'
Edit: Currently giving InternalAssetKey a better try.
you got a bunch of animated frames right
The final image has all the frames for the animation, if that's what you're asking
So, checking what I did in one of my mods, if you use a , instead of the spread syntax you need to respecify the asset name
So you could have
Mods/{{ModId}}_RainbowSand/RainbowSand:0..11@10,
or
Mods/{{ModId}}_RainbowSand/RainbowSand:0@10,Mods/{{ModId}}_RainbowSand/RainbowSand:1@10,<rest of frames here>
does source texture support targets instead of internal asset key?
Yeah
It just loads it through Game1.content
As long as you Load it it should be fine, or just use internalassetkey
Thanks, that was the solution. Just used 0..11@10 instead and no more cascading errors.
hm how would i go about detecting game state queries related to items
what do you mean detecting
i think i have to do a reverse patch and search for Helpers.TryGetItemArg?
can you describe the specific usecase?
so i am gather list of items that could possibly go in a machine
is there a way with a debug mod or something to know how much a crop gives as xp? i suppose the indirect way would be to see how much xp i have before and after
but i want to exclude conditions unrelated to items
xp bars shows you how much xp you get iircbut yeah lookup anything might be faster
LA might even show how much xp
Or ui info suite
if you check the crop
atm i just hardcoded the list of gsqs that involve Helpers.TryGetItemArg
It's a constant multiplier of the crop value iirc
I mean
You could use PatchProcessor.GetOriginalMethod I guess
But also, I have a costco sundae now so see y'all laterrrrrrr
thanks 🙂
float experience = (float)(16.0 * Math.Log(0.018 * (double)price + 1.0, Math.E)); to be precise!
(and then rounded to an int)
when would QueryTypeLookup be completely populated 
hmm,i don't see it with LA, even with the debug info, but i may search in the wrong part
it's ok, i'll do that later
(i would do the math except that it would involve me doing the math 😄 )
possibly dumb idea: can you just pre/postfix GameStateQuery.Register, get the Method.MethodInfo from the delegate passed in as an argument, and then check the IL of that methodinfo for a call to TryGetItemArg
and then store a list of delegates that use it
whatever answer you got, I'll make a mod to register one even later than that just to mess with you
thanks selph
and yea button that makes sense
i may be going a bit overboard on this item query caching thing 
even the vanilla GSQs go through GameStateQuery.Register so it should be fine i think
(my lawyers have advised me to inform you that that was a joke)
also most mods do so in entry
i hope no mod is adding to QueryTypeLookup manually
todo list
also it occur to me that instead of picking the fruitiest fruit
i can just show a random valid thing every time u open menu
What is the fruitiest fruit
apple
Dan savage?
it was determined by committee already
or do the fading thing
this is partly cus i am keying the cache by conditions now
rather than context tag

what if the result of the condition changes
qq: what do you do with ITEM_QUALITY or ITEM_CONTEXT_TAG with dynamic tags
i have a separate thing to find the quality tag yea
the conditions arent immutable with a lot of the conditions since you can change things with When conditions
its excluded from this
Okay. Then I'll make a random item query
murder
ITEM_PRICE could also be an issue since mods can spawn an apple that costs 5000 gold or smth
i do invalidate the cache whenever Data/Objects or Data/Machines changes
BETAS adds some item queries that arent static too
Organic apple
specifically the ones that check mod data, which is not set in stone at the time the item is created nor is it determined by Data/Objects
how terror 
also adds a query for checking the enchants on an item which also change
also EMC has a feature to manually set context tags for item spawned from queries
oh is it a patch on ALL_ITEMS or something else
Do you persist them somehow
Because context tags aren't exactly persisted
it's a field in modData, and I patch PopulateContextTags to populate them
(The fruitiest fruit is obviously tomato.)
one evil use case I can think of is to make machines that only process items bought from Pierre
so if its Item.PopulateContextTags then i might be alright
Object.PopulateContextTags is doomed tho see preserve_sheet_index_
need like, ALL_OBJECTS tbh
isn't that's ALL_ITEMS (O) or am I missing something 
no ALL_ITEMS (O) would work
that doesnt make (TR) does it
so is the solution a ALL_FLAVORED_VARIANTS item query that spawns every possible flavored variants of an item
will the FLAVORED_ITEM query not work for those
well we want all of them 
flavoured anything still confuses me so idk what im talking about when it comes to them mostly
incidentally cjb cheat menu doesnt spawn custom colored objects
like peanut milk from cornucopia
CJB has a hardcoded list I think
only fruit jelly, vegetable pickles, fruit wine, flower honey, etc.
yea
so you can't spawn [REDACTED] honey even though that's a very possible item with mods
So if you go to a cosrco you can get a chocolate sundae
i would never
ALL_FLAVORED_VARIANTS would be very slow probably
it would probably be easier to figure out how to add a custom flag to ALL_ITEMS
How #mod-showcase picks mods to showcase? 🙂
mod authors manually showcase mods there
using a bot
you need the mod author role to do it or ask someone else to do it for your mod for you
How do you get that role? (or anyone willing?)
on second thought after looking at the function i dont think it would 
Stardew Valley Expanded 1.15 is now available on Nexus Mods and Mod Drop!
In the meantime if you have a mod I can help showcase it
great, and what do you want the text to be? just the description of those two mods?
Yes, the description should be fine.
I thought that I had fixed my config file last night, but it seems that it didn't fix the problem I was actually having. this is set up the same way that my farm's config file is, and that one works properly, so I'm not sure what's going on with this one
your 1st file references Maps/RiftstalkerSekun.LudeonicrousGreenhouse_Interior, while your 2nd file references Maps/LudeonicrousGreenhouse_Interior
...I am derp, destroyer of competancy.
thank you, I knew I was missing something, but my eyes kept glazing over what it was that I was missing
If you keyed by ingredient category, and cached the list, it might be OK.
where is sebatstion riding a motercyle located in the content folder?
loosesprites/cursors
ah thank you
I can make a Carpenter's shop require 4 different items to build, but it pushes the last one off the bottom of the UI screen and makes it almost impossible to read what it is if you can't recognize its sprite. sadness
Hey ya'll. I'm trying to override a specific field for a specific vanilla quest. Specifially, I'm trying to change the value of the intro quest from 00 to 10000. Prepending with a Text Operation doesn't seem to work since I don't want to have multiple segments. Is there a better way to target that field in a slash-delimited string?
the introductions quest?
Yep
9 in quests yeah? squints so field... lemme look up the fields
pulls up my textoperation
You can use TargetField to target specific things in a slash delimited string iirc, just provide the index of the specific field instead of an ID
"Action": "EditData",
"Target": "Data/Quests",
"TextOperations": [
{
"Operation": "Append",
"Target": [ "Fields", "9", "6" ],
"Value": "10000"
}
]
}``` 
i think... this will work, but y'know, wholly unsure
oh is it hash6?
With the quotation marks?
Oh I didn't notice you were doing text operations there I thought that was an edit data example
oh no i just ripped straight from my npcgifttastes because it works for me
Wouldn't appending it mean that the string would then be /00 10000/-1 etc?
That's where you'll need Edit data instead of text operations I think
Currently you can't just replace a field with a text operations
"Action": "EditData",
"Target": "Data/Quests",
"TextOperations": [
{
"Operation": "RemoveDelimited",
"Target": [ "Fields", "9", "6" ],
"Value": "0"
},
{
"Operation": "Append",
"Target": [ "Fields", "9", "6" ],
"Value": "10000"
}
]
}```
im not 100% sure I remember how to use edit data to do it though I was just like 80% sure you can
will removedelimited work 
That won't work
f
You can't append into a specific index
You'll just be appending after what is at that index
So by removing the index first then whatever is in index 7 will become index 6, which you will then be appending after
Cant you then do 10000/ ?
I also don't think that's how you should use target anyway when removing like that but I'm on mobile and can't look at the docs very easily right now
Something clean that will cause no issue whatsoever
You can try prepend instead
prepend 1000?
I tried prepending
CP tells me it needs multiple segments
TextOperations > 1 is invalid: the Target value must specify at least two segments
oh that's my formatting
"Target": [ "Fields", "9", "6" ],
i don't actually remember where i read what the format for this is
also I realized I was being a bit unclear earlier bc when I said using edit data instead I meant like using an "Entries" block with TargetField which I thought you could do somehow? don't quote me on that though
That was my first instinct and my first draft, but I don't think I targeted the fields correctly
like I thought I remembered being able to use TargetField like that to basically turn it into a list of strings
yeah i can't find the docs anywhere but fields requires 3 segments
i don't know where you're getting that from
There's a very small bit in the CP docs
mobile doc Reading is pain
For text operations
I think that might not be applicable for changing the fields in a delimited string
emphasis on think
it works for npcgifttastes 
I think that might just be if you want to target a field in a model that is a string?
is monsters the same
honestly my brain gets lost between what is and isn't a model
oh yeah it worked for monsters which has the same formatting
"Grub": "20/4/0/0/false/1000/684 .6 273 .05 273 .05 157 .02 114 .005 96 .005 99 .001/0/.005/3/1/.00/true/2/Grub",
once im back at my desk I can try things out if not solved by then, my brain is not meant for this without being able to tinker with it directly
I get it.
i could throw it together too, lemme pull up my stardrop closes out of honkai
I'm trying out Avi's formatting and will let you know
OK. So it kind of works - the patch loads and applies and conditions are met. I debugged completequest, but the gold reward isn't actually given.
Patch export ?
nevermind
loaded | conditions | applied | priority | name + details
------- | ---------- | ------- | -------- | --------------
[X] | [X] | [X] | Default | EditData Data/Quests #1
(About to go to bed so my ability to help id limited)
"9": "Social/Introductions/It would be a nice gesture to introduce yourself around town. Some people might be anxious to meet the new farmer././null/25/10000/-1/true",
Would I need a separate entry to change index 7?
were you testing on a fresh save
Oh yeah quest is baked in save
by that point the quest instance is already created

a fresh save didn't do anything
A brand new save works!!!
wait, i might be dumb
if a quest is already in the quest log it stays but if you havent received the quest yet it will not stay
So it will only work on brand new saves
why is my stardrop connected to beta i thought i fixed this last night 
People may also debug complete the quest and get it again
either on brand new saves or saves that havent gotten that quest yet, which is basically just brand new saves
Or abandon it and get it again 😄
just set it to false for abandonment then
that's probably more pain
They would have to clearquests and start over, right?
i didnt realize you could abandon the intro quest but i enjoy the thought of it
true introvert
Possibly!
Let me try that on the day 2 save
Or debug completequest 9
I did that on my day 2 save and it didn't grant the reward
Yeah but you want to get it again
To get the fresh one
Possibly you had a bugged version
Yes. So one would have to "abandon" the quest and then debug it?
Sorry, I'm confused on that part.
or get the quest re-added some other way
Because of the previous appending attempt
Yes basically recreate the quest to refresh the data used
if a quest is in your log book, it is no longer reading anything from Data/Quests
it only reads from Data/Quests when the quest is first created i.e. added to your quest journal
so it must be a newly created quest to get the updated data from your edits
Lewis: be neighborly. Greet the town
hits abandon "no"
Farmer: never leaves the property for the whole first year
Game mode: coronavirus lockdown
Ok. So to allow it to work on an existing save, one would have to debug clearquests then debug quest 9 to start it over
Yeah
well
I can live with that
you can do that for them basically with trigger actions
Oh boy
theres AddQuest and RemoveQuest actions
That's new territory for me
(Clearquests may alter all quests?)
if you do that on daystarted you can remove the quest and then re-add it again
But that would reset precious precious previous progrss
oh boy! trigger actions!
And yeah be careful with data erasure
(you can set it to a config)
progress being reset is already a requirement anyway
Maybe a config
Hi my favorite not a perfect square
if you're completing the quest with debug commands and then adding the quest again, you'll still need to talk to everyone again
People play on fresh saves and old saves
or if it tracks players you've met anyway, then you lose no progress
Especially with mp
(2 days later because i havent been modding) i actually do enjoy them both equally 😄
it's like solving a puzzle that also looks very pretty.
6480 you don't want to know how long I spent trying to find something fun mathematically with your name
RemoveQuest will only remove a quest if it is currently in the players journal, which you want to do anyway
Could I have a trigger action to removequest then restart it?
AddQuest will re-add the quest whether they've completed the quest before or not
you can have a trigger action do both RemoveQuest and then AddQuest in the same trigger
Use the spacecore thing
Have to go, good luck. Congrats on progress
The has ever had this previous auto-generated convo topic thing
And check for thr quest ct
Atra, you are talking to a baby modder when it comes to the scope of things I've done.
so, yes or no to config yeeting
i thought you wanted players to get the new intro quest even if they had done it before, otherwise why would you want them to do the debug clear stuff anyway?
"do it, again"
I want this to work on old and new saves - whether someone has completed it or not.
or are you only concerned with people who start a save and then decide to install your mod in the day or 2 before they compelte the quest
I think most people wouldn't do it again if they've already completed it?
if you add 420 to it you get 6900. which is something i learned four years after it was my name


