#making-mods-general
1 messages · Page 147 of 1
I think its FTM
I mean the mod for meteorite is ftm
The map is with tiled and use CP
Ah, I mean that the paths layer doesn’t regenerate unless you reset terrain features
!rtf
Reset Terrain Features (https://smapi.io/mods/#Reset_Terrain_Features) is a mod that lets you reset, clear, or generate everything that spawns on a map using an in-game menu. That's especially useful when changing maps mid-save, as the debris will otherwise use the old layout (causing things like trees in the water or bushes blocking exits).
Not sure this is what I need. This is gonna edit the file. I need that to never happen when starting the game at all
I’m very confused—unless you’re making a new save, your first attempt at the Paths layer in Tiled is sticking around
And if that included a weeds, you get weeds
No I make a new save at each try
Now I moved the stuff and still do like this, but with other stuff
Ah, I see—yes, then you don’t need rtf
I think they can spawn anywhere free in the map, and since I need those space free to let the metoerite spawn, I need to elimitate te properties that make this happen
Esca would know for sure but I thought there was a way to have ftm place a meteorite even on top of things
@royal stump You know anything about this problem?
Especially not on Christmas!
It’s the settings on how much the checks are strict about
Oh I put medium because this was the setting on flashshifter mod. I put it back to max and try
Thank you!
And sorry for the ping
hey could a few more people download my (excellent) mods, please /j
You maybe also know why this mod create a folder with the save data inside the mod folder itself?
Like this
It's normal?
I tried it but it didn't work. Both high and maximum.
So close! 
It is normal; it is how ftm tracks what it has already spawned
Perfect thank you
By the way I fixed the spawning thing right now. I put strictness to NONE. Now the stuff still spawn, but above the meteorite, which is still ok
I have just added three more
portable hole is almost DEFINITELY going to be added to this save post perfection
How does one make a mod for clothing?
WHat type are you trying to make?
Mostly, though, you will make it using Content Patcfher.
!cp
Content Patcher (https://www.nexusmods.com/stardewvalley/mods/1915) is a mod which loads content packs to change the game's images and data without replacing XNB files. If you want to make mods using Content Patcher, start at https://stardewvalleywiki.com/Modding:Content_Patcher.
You will edit the specifc data of where you want to make it.
Is it possible to insert a new once-a-week routine into NPCs' schedules? I can barely find anything on schedules and it's looking like I have to alter their entire schedule which sounds like a compatibility nightmare
Yes, you can
You’d use EditData to add a schedule entry
Like “Monday”
Keep in mind schedule priorities
There’s also heart levels
It's priority I'm concerned about, wouldn't adding an entry slot it in at the bottom, which means their default routine takes priority?
No, the wiki page on schedules says the priority, based on the key
Oh, is that order also their priority order? I was under the impression it was simply a list of keys and their ordering in the json determined the priority
The order on the page is their priority, regardless of the json organization
their schedule is a dictionary, there is no actual order
Day of week is relatively low on the priority
Content patcher patches are done in order of position on the json file, but the game's data is not, AFAIK
Ahh, okay, I missed the important line "If multiple schedules apply, the first match in the order listed here is used."
Depends on the specific data, like shop Items is ordered
Thank you, that clears up a lot 
So if you want to move an entry that you've added to Items you have to use MoveEntries
In general, lists are ordered
And dictionaries are not
Please do not tell me about the outliers
Oh yeah I forgot about shops
The real problem is that most people who just do CP don't know the difference
Square brackets just look like square brackets
I find it really difficult to tell the difference for Stardew, yeah.
Everything in Stardew looks like it has a key to me
thats content patcher to blame, to be fair
The wiki and docs are decent about marking the difference but honestly I usually just keep track of which ones are ordered and not individually
list items dont have keys if you're working in C#
I would blame CP but I also can't tell in the game files
Unless they are just set up that way because that's how Pathos made the unpacker (it was Pathos, right) in which case I blame him lol
no it pretty much matches the C# classes
This is gonna be my first attempt at writing an NPC schedule and I can tell this is going to be painful 
I think schedules are more straightforward than events
Though harder to test I guess
Use fast forward to zoom them around
Need a mod that lets you forcibly change an NPC's schedule
the worst part of schedules is you need to install fast forward (or make it) so you don't have to wait soooooo long
Also that "go to your next schedule point" command blueberry (I think) told me about
debug hurry?
Yes probably
I can't risk opening Firefox to check lest it makes poor Indy lag
It was really helpful when I had to test the same schedule point over and over again
Yeah I'm gonna lift Gima's schedule tools into event testee
Probably won't make the next release
But eventually
I'm thinking of automatically pathing the farmer too
Behind the npc to follow
At like 7x speed
Oh that would be handy because I can't use fast forward very fast because I run into things
Friends, I could use some help figuring out which category to add my NPC Apartments mod in
Modding Tools? Modding Resources? Maps? Locations? Something else?
It is a location that allows mod authors to put NPCs inside it
Locations would be where I would look for it first
buildings, maybe
i dunno i literally neveru se nexus categories
Try my rendition of fast forward?
I play some tricks on farmer speed to make it easier to control
(I believe it is both a console command and a chat command, Event Tester.)
I think yours is the one that I can't control my farmer while using, let me double check though
I only added the farmer movement in the second to last version, it wasn't there originally, but I can tweak it moee
Hmm I have yours installed but I don't think I have actually used it, because it's the other one by ch20youk that I run into stuff with.
Because I haven't actually tried to use any version of fast forwarding on purpose yet, I just keep accidentally hitting the hotkeys for ch20youk's one lol
Yeah, mine is very much not advertised lol, that mod has now become "suite of debugging tools the mod"
It's accessed via either console or chat command, and I basically repeatedly reset the farmer movement so at most they are going 3x faster
So GIMA 2.0? 
This one is more sane though
It is, on the tin, suite of debugging features
It has no effect whatsoever unless you use one of the chat or console commands
Okay, well, supposedly my mod is up on NexusMods now! 😄
(It doesn't even hook events unless you use a command!)
Hm, the config for the copy of Event Tester I have says there is a FastForwardKeybind of K. Does that mean I have something old?
Oh, that still exists, I think
It's sinZandAtravita.SinZsEventTester version 0.1.6
Yeah, there are three ways to activate it, lol
Sorry! K was supposed to be out of the way
(And if you don't get a Nexus update alert it is the latest version, I'm pretty anal about keeping that straight.)
No no, it is out of the way! I have never accidentally hit yours.
The one by ch20youk uses tilde so I was hitting it all the time because I have a tiny escape key and giant tilde key lol
Keyboards, man
Lol
Just to be sure... NPCs use their rain schedule when the weather is Stormy, right?
Setting up some outfit conditions and I just wanna be totally sure I'm not accidentally sending anybody out to the Beach in their swimsuits during typhoons 
is there a way to add new furniture but only appear in shop (not in regular Furniture Catalogue) ?
I've tried to add furniture in Vendor from desert festival but its keep appear in regular Catalogue
this is the code
"guxelbit.KNTL.testtest55": "guxelbit.KNTL.testtest55/decor/1 1/1 1/1/0/2/{{i18n:testtest55}}/0/Mods\\{{ModId}}\\furniture_kntl"
and I'm adding this
{
"Action": "EditData",
"Target": "Data/Shops",
"TargetField": [ "Vendor", "Items" ],
"Entries": {
"guxelbit.KNTL.testtest55":
{
"Price": 500,
"AvailableStock": 1,
"Id": "guxelbit.KNTL.testtest55",
"ItemId": "(F)guxelbit.KNTL.testtest55",
"Condition": null
}
}
}
you need "off limits for random sale" field
https://stardewvalleywiki.com/Modding:Furniture
adding /true at the end of the entry should do it
For an example, my Magic Furniture mod isn’t sold in catalogues
(It’s too magic for that
)
thank you! I thought there's something with the Vendor code
Hmm... does anyone know where the Ginger Island schedule files are located? I'm trying to reproduce the GI beach animations but I'm having trouble understanding the syntax described for animation in https://stardewvalleywiki.com/Modding:Schedule_data as the presence of quotations doesn't seem to be allowed
IIRC you just set the right name for the schedule animation and the NPC will do it there
Yes you can give them schedule animations and dialogue keys for GI but you can't actually give them schedules
I am pretty sure the GI schedule stuff is all hardcoded
Ohh, wait, I see, that example is how to add a key to the animation descriptions file, not how to play it in the schedule
Try looking at a vanilla NPC for how their GI stuff looks
I think you just need a regular schedule animation named NPCName_beach_thing
where thing is the types of animations, e.g., chair
Not sure how many are vanilla though, GIMA added more but I'm not positive which ones
So for a long time I questioned why people would make mods for free for games. Then I made one… and got this comment. Aaaaannnndddd I get it now haha
The duality of users
"This is broken, no I won't post a log"/"Is this compatible with SVE?" <---> "I love your mod, thanks for making it"
Yeah. But I’ve worked customer service long enough you realize anyone can complain in the moment. It’s easy. Those that take the time to be kind and give a compliment…. That takes more effort and has a little more weight.
I think many of us also just really want to create for the sake of the joy of creation/learning/challenge. And then once you have made something, why not share it?
I only started modding because I wanted to update some mods I wanted to use, share it because I can but don't actually care if anyone uses them
That being said, the few compliments I have received on my mods (one of the best of which was actually from rokugin haha) have definitely been contributing factors to wanting to continue.
Funny enough. I started because my girlfriend and I liked like… 90% of mods. And had parts we didn’t like. So I just wanted to learn how to tweak for our personal use….. and now here we are
I also started by editing mods I was using and then progressed to "there is not a mod for this, I guess I will try to make one".
Mind you I haven't actually done that much yet. I talk a bigger game than I play lol
I started because UIInfoSuite had a broken cloud texture and that bothered me
now all the old maintainers don't have time and I'm rewriting the mod basically from scratch 
going on 3 years modding now lol
Hey, y'all. I'm trying to figure out the base sell price of cooked or crafted items. If I understand correctly, the "price" set in the objects.json is a placeholder. So looking at the code, the sell price would be the base price of the ingredients multiplied by the quality and any specific multipliers and/or difficulty modifiers?
Assuming base quality, no custom modifiers and default difficulty, that would mean base sell price is base.Quality * 0.25?
(for reference, looking at sellToStorePrice in Object.cs)
Cooked and crafted are always normal quality (without a mod to change that), trying to remember if there's anything else that modifies cooked or crafting items sell price
I don't think there is, pretty sure their sell price would just be whatever the Price is in the data
Yeah, that's where things get funky, because the item data is all the same, but in-game it's very different.
by the same, I mean, the objects.json lists price as 100, but when you actually make the items in-game, the price is very very different
does qi seasoning affect it?
I don't think I've ever used it lol, not sure what it even does
Oh it bumps it to gold
So that would give the quality modifier at least
Qi seasoning increases the sale price, yes. But I'm just trying to find a way to calculate prices without having to make all 1 godzillion items
So if I knew that an item was 1 cherry, 1 orange, and 1 wheat, I could calculate off their individual base prices multiplied by whatever
It's just the "whatever" that I don't know
it's base price * (1 + quality * 0.25), with quality being 0 for normal, 1 for silver, 2 for gold and 4 for iridium
and food item uses the exact price as set in the object data
Compliments without a "...but" are the best thing in the world 🙂 (Compliments with a "but" are fine too, as long as they're not such a major "but" they undo the compliment side of things).
there's no rhyme and reason to food prices really, in vanilla everything is set by vibes
It'd be great if everything was calculated based on its parts
The only other thing to check should be if the shop has a PriceModifier entry, I think?
Do PriceModifiers affect selling to a store though?
Thanks, Selph. Something is weirdly off, then, because the mod-added food item has a "price" set at 100 but when you sell it in game it's more
Normal quality, no price modifiers, default difficulty
hmm which item? maybe some other mod is affecting it?
When I built out the WAG wiki, for example, Flour and I had to make every single item to get their base sell prices because the object data price was just a placeholder. That's how it was explained to me
Hm, I just crafted a Void Delight from SVE, it's Price in the data is 800 and the item I got upon crafting is worth 800, about to go sell it
ok, so machine items can have their price dynamically set by the machine rules
cooking and crafting should use the price in Data/Objects
Sold for 800
WAG mainly uses machine rules with dynamic pricing depending on input
Yeah, machines are their own beast with pricing output
Most of WAG is that way, yes, but there are cooked items and items made in vanilla machines that didn't have dynamic pricing
do you recall what the item is?
I don't off, the top of my head, sorry! I've been swimming in data from other mods
But it does sound like I have more digging to do if the price in this particular objects.json is not what it actually is, that means something else is affecting it
If you come across it again, it might help to narrow down the issue
Where are custom animals added by CP mods stored? I found FarmAnimalData but the description says it only contains Data/FarmAnimalData which is the vanilla data only.
CP adds things without changing the base files
So while the game is running, they're part of that content asset in the pipeline
If you're trying to edit another mods added animals, you would write your patch as if that data did exist in Data/FarmAnimalData
I just want to access it, no editing
If you just want to see what they have set then you would check their CP files that they shipped
Let's say there's 5 CP mods that add custom animals. I would like to be able to loop through them
So there's no way around checking the specific files?
this is C#?
yes
Game1.farmAnimalData contains all animal data, vanilla or modded
Oh, then the description is misleading. thanks
what those animal mods do is add their own entries to Data/FarmAnimals
from the game's perspective there is no difference between "vanilla" and "modded" animals
CP mods add their entries to Data/FarmAnimals? Didn't know
CP mods can add entries to any vanilla game assets
(or even make new assets, but that's a story for another time)
That just made life so much easier. Thanks
Just remember you’re going to have to use the asset requested event if you want to make changes to it yourself
You can’t edit Game1.farmAnimalData and have your changes stay since game data can be reloaded at any time
Just need the data, no editing involved :)
umm is faux core down?
Seems currently hidden on Nexus
oh
Maybe the vitriol spilled over from Better Chests
it redirected me to moddrop, i know matt stopped support on better chests so maybe they're dropping support on-- yeah
Fundamentally, all ContentPatcher does is implement https://stardewvalleywiki.com/Modding:Modder_Guide/APIs/Content OnAssetRequested and a conditions engine that runs on other events that would call InvalidateCache
oh I didn't see the timestamps, that convo was a lot longer ago than I thought
one day I'll make infographics to explain how the asset pipeline actually works
merry christmas folks :)
The custom NPC I added will not act according to the schedule in the old archive, but it can act normally in the new archive, please ask why
is there a way to store and update persistent data which is to be used by a mod?
Im trying to make a mod which rewards giving variety of gifts instead of just the same gift everytime. but for this, i need to store a history of gift given, even after the game is closed and reopened
first thought was to use an asset file and update it during run time
wanted to know if theres a better way
also will need to figure out a way to differentiate different saves
Lots of ways tbh. One thought comes to mind for me would be to create a global inventory per npc and store a copy of items given in there.
A global inventory is like an invisible chest.
So you can tell what items were given and how many of each.
They’re unique to each save, saved automatically, and are easily accessible data
If you use a unique id it should be ignored by vanilla and other mods like “YourModId.NpcName”
oh i see,, thanks
If by "archive" you mean save, I believe NPC schedules are calculated at night when you go to sleep, so when you load an old save where the NPC didn't exist the night before, they just have no schedule until you go to bed again
I'll try. Thank you
Hello! I put out an update for my mod on nexus and some users have been reporting that the mod wont load and the console gives an error saying that "its DLL couldn't be loaded." Its strange because on my end the mod loads fine and in the bug reports, the mod loaded fine for one user's friend. I'm confused on whether its an issue on my end or the user's end. If its on my end, what would I need to do to fix it? If its on their end, what do they need to do to fix it?
The log with Trace enabled should help indicate why it’s not being loaded. Also make sure they are running it on a pc with the correct version of SDV+smapi.
I’ve seen people neglect to share they’re attempting to run my mods on Android which I haven’t tested compatibility with for example
Thanks! They had everything updated. Looking at the log with trace it seemed I left a refreence to a mod in my project file that wasnt required ^^'
but it seems without the refrence in there, things break.
I’ve done that before. That’s an unintentional hard dependency.
Merry Christmas!!!
for christmas. i might update "alex is troy bolton" to have the sharpay haley as requested once.... i just gotta remember where the files are
..vitroil over BetterChests?
Merry Christmas/Happy Feast of the Winter Star!
You know. As much as I want to know, maybe I don't want to know.
Back to puzzling over this mod
@calm nebula: add whatever example that was on the wiki (4d ago)
Is there a way to determine which Mod added an asset? Doing edits on Data/FarmAnimals in OnAssetRequested.
Or something like author or uniqueID of the mod?
FarmAnimalData doesn't seem to provide anything like that.
Not really no
There's no built-in way to do that, no. Most data assets have unique keys that mods should prefix with their ID, but they don't necessarily have to, and asset entries aren't otherwise tagged with whatever added them
And no good way to find out without reflecting the hell out of smapi/CP lol
me sad
yeah, it'd probably end up being "Harmony prefix every SMAPI asset event" if you really needed the info
even then, CP would be even more complicated
Haven't figured out a way to do it without that information.
Let's say a CP mod adds an animal with 3 colored variants. Usually there's only one shop option available which gives you a random variant of that animal.
I want to make all variants available in the shop and mirror the price of the default one.
The only thing that somehow/sometimes matches is a part of the DisplayName. But can't really rely on that
Might need manual overrides or an opt-in system if you don’t want to get too complicated. There is a variants field in the FarmAnimal data model. Maybe it should only work if the model provides that info.
Then “adding support” is just updating that field
yeah, the game itself seems to pick randomly from among that AlternatePurchaseTypes field, so you'd probably just want to try and change that from "add one random variant" to "all variants", and ignore mods that just add entirely separate but similar animals
Oh, that actually helps! Randomly checked some of the CP mods I use for debugging and they all provide AlternatePurchaseTypes. Can just compare the requested asset with that list
Maybe I'm blind or what am looking for doesn't exist.
AlternatePurchaseTypes contains the IDs of all variants but FarmAnimalData itself doesn't expose them?! There's only DisplayName but that's not the same as the Key/ID.
The key in the dictionary is the id
Just figured...
Tbh I have no clue how that menu works lol
Just that every animal is secretly a chipped amphora
It's a what
Can anybody explain what is causing the non-green pixel on top of the shoulder, I'm currently using a FS mod if that helps
Haven't been able to find the part of the code that causes it
In today's context tag shenanigans
Apprently CA used food_pasta to just denote any vaguely italian food
for example
spaghetti is pasta
eggplant parmesan is pasta
bruschetta is pasta
these 
I didn't know until now, but uh, yeah: Utility.getPurchaseAnimalStock fills the shop by making objects with ID 100 (so those), overwrites their name with the animal's afterward, etc
i.e. weird roundabout logic to make a shop sell animals
At least eggplant parm is often served with pasta
Bruschetta who knows
(it's relevant because in the 1.6 alpha for a while, the game was also overriding all animal purchase prices with 2x the price of chipped amphoras.)
I love how bonkers the game is sometimes, never change
yeah, figured it probably came up at some point with string IDs or something
literally speaking, I guess that's the player's bare shoulder pixel; if that outfit should have a pixel there, either the game or FS is probably ignoring that part of the shirt sprite
(no idea where to begin looking in the game/mod draw code though, sorry)
it's all pasta
that doesn't look right 
Users are bad people and should be muzzled 
o.O
Well, that's an answer
update: merry christmas to me (thanks for all the fish, my friends
)
It's not even that bad. It's just that it was impossible to make anyone happy. Every update was met with comments about how the mod used to be better, it's broken now, and that they're switching over to X mod instead. So if people prefer every other mod to Better Chests, then why should I pour weeks of development into it when I'm not even getting any satisfaction out of it anymore.
I'm really sorry people weren't more supportive of you Matt, you deserved better
I know I personally won't be looking at alternatives until better Chests is entirely unusable. Full respect for you taking it down, but it'll definitely be missed
Do I need target all on one line or does it work with a line break to make it easier to track portraits vs. character sheets?
{ "LogName": "Load Penny's Outfits", "Action": "Load", "Priority": "High", "Target": "Portraits/Penny_Spring, Portraits/Penny_Summer, Portraits/Penny_Fall, Portraits/Penny_Winter, Characters/Penny_Spring, Characters/Penny_Summer, Characters/Penny_Fall, Characters/Penny_Winter", "FromFile": "assets/{{TargetPathOnly}}/Penny/{{TargetWithoutPath}}.png" },
carb + italian = pasta, duhh /lh
tldr: you can use whitespace (line breaks, extra spaces, etc) in there, because CP trims it all out and ignores it, though you should avoid that for "Entries" and such if you ever edit data assets
Tysm <3
e.g. it runs fine when I test it like this, but internally, it adds a bunch of characters you can see on the json upload site 
(CP just ignores that in its own fields like "Target")
https://smapi.io/json/content-patcher/71b0fb5e81db4ee0bc31899f67718779
Hey friends, anyone who's got any knowledge about Content Patcher and adding crops; what's the proper path to use to make sure the modded crop tileset is used from my assets folder? Since moving over to CP I can't get either "assets/crops.png" or "Mods/{{modid}}/assets/crops.png" to load the correct sheet.
you need to load them into an asset name first
use the Load action to load your assets/crops.png into an asset named something like Mods/{{ModId}}/assets/crops.png
that second string is what you use in the crop data
I do have it loaded already
can you post your code then?
Just so I don't need to run the whole page over here
And one of the crops which isn't working.
One final note the objects file loads just fine.
you loaded into Mods/DomTSVG.PlentifulHarvestCP/Crops
but you're using Mods/DomTSVG.PlentifulHarvestCP/assets/crops.png in your data
Also, for weighting outfits since I want three per season, does this look correct?
"{{ModId}}.PennySpring": {
"Id": "{{ModId}}.PennySpring",
"Condition": "SEASON spring",
"Sprite": "Characters/Penny_Spring",
"Portrait": "Portraits/Penny_Spring",
"Precedence": 1,
"Weight": 1,
},
O.o
I just compiled that too
I'm using an ancient version of both game and smapi so I guesss I do updates now
So if im using mail flags to check for cc / joja complete, and I only want the edits applied if they went for the cc route, can I just use IsCommunityCenterComplete or do I need to specify jojacomplete = false?
updating game and smapi seems to ahve fixed this
I wonder....
how big this minishipping bin can get
If you make a mod to make the mini shipping bin bigger please share it. I was literally looking for one yesterday.
if im understanding it correctly i think you might need to specify joja = false. im not 100% on it though
I'll aim on the safe side and specify then! Thanks button
looked at it a bit more and you might be fine actually? the IsCommunityCenterComplete token checks for the mail flag "ccIsComplete" (seems to only be gained thru a junimo after the last bundle, so not possible with joja) or whether you have mail flags for every bundle, including the bulletin board
but there is no bulletin board in the Joja mart so the joja token just checks for any single joja flag and every other normal CC flag
so if you go joja i dont think you can get CC complete for the CP token?
someone might correct me if im wrong tho ive never done joja
somehow this doesnlt look stupid yet
You planning on publishing you mini shipping bin.
I’m not sure but I think Joja also satisfies at least some of the CC checks
So if you want to be super sure I would check
I think every section that Joja has also marks the appropriate CC flag
where does joja mark ccBulletin?
But uses the JojaMember flag to determine which route you went in a couple places
it doesnt have a bulletin board
I think it skips that one
but the CC checks dont
so if you cant get ccBulletin, you cant complete the community center per t he token's requirements
This was specifically for a CP token?
i accidentally linked to the joja token but the CC one is right above it so
the only thing im not 100% sure on is the gaining of the ccIsComplete flag, but searching through my decompile only found that happening after a Junimo goes to get you your plaque star, which i didnt think would happen with joja
Yeah I don't think it should, trying to figure out if the ccBulletin flag is set somewhere on the Joja route to satisfy the hasCompletedCommunityCenter method
Yeah the ccIsComplete only being given by the Junimo's is a problem if you're using debug commands
the game's own Utility.hasFinishedJojaRoute doesnt even bother checkin for it
i didnt see it anywhere relevant in searching the decomp either but i may have missed one
Just remove the Joja route, easier fix
funnily enough the CompleteCc command adds ccBulletin twice lol
and boilerroom?
and pantry... but not vault or fishtank or craftsroom

i actually dont see where ccBulletin is even normally added, so im assuming thats actually either in bundledata or in some forloop that adds flags based on the name of a thing in a list somewhere that i dont know where to look for
so i spose it is possible joja does the same somewhere
cant go over 184
Oh yeah, chue was saying there was a limit
huh, why 184?
your guess is as good as mine
184 is magic number
debug command CompleteJoja doesnt give ccBulletin either ftr
I'm not sure if the joja route actually calls this, but in the CC's doAreaCompleteReward:
case 5:
mailReceivedID = "ccBulletin";
Game1.addMailForTomorrow("ccBulletinThankYou");
break;
//...
Game1.player.mailForTomorrow.Add(mailReceivedID + "%&NL&%");```
which I guess is called by `areaCompleteReward`, which seems to be used in JunimoNoteMenu when purchasing bundles via Joja?
it's roundabout enough that I can't tell whether any joja menu buttons would actually trigger it, though, so it might just not happen normally
Thats too big.
sounds like the best way to be super 100% sure about the joja thing is to just check in game after all
but that takes so much more work...
interestingly enough, I can actually make the enricher bigger, but it just ignores slots not the first
Am working on mod that makes the joja route interesting (starting with coppersuns work, full credit there!)
I request Joja seeds. I miss them
It looks like the most straightforward option is a dynamic token checking that they have not completed the joja route, but have reached the trigger mailflag for either cc or joja before that
Joja seeds is on my list, as soon as these shops are working nicely again! However, i do care about CS's permission before I share with folks. I know their perms will allow me to share the updates, but I still feel wierd about it
oh, my god, that enricher is Hardcoded TM to be One Slot TM
Yeah, check if they have the JojaMember flag and then check either IsCommunityCenterComplete or IsJojaMartComplete depending
Copper Sun has given permission in his profile, with caveats
I think you can buy a membership all the way up to just before completing the CC lol
(but personally I would have liked that in More Fertilizers.)
iirc it had to do something with columns
I know, I did acknowledge that
still not personally comfortable with sharing without a check in from him tbh.
I've been very careful to meet all the caveats but I'm also adding new content and it feels important to me that I check with the original author
Buying a membership doesn't perma lock you out of the cc route does it?
Very good to know 🤔
smapi thinks it can best me. I think not
what is the condition set for an outfit during rain or similar whether? Can see the command to set appearances for weather but not what the game code calls them
you'd use game state query conditions
WEATHER <location> <weather>+ // The weather ID in the given location. The <weather> can be one of Festival, Rain, Snow, Storm, Sun, Wind, or a custom weather ID.
so iirc it'd probably be like, WEATHER here Rain
also about your precedences, the lower the number is (negative) the "stronger" it would be, so technically you can axe the "weight" part unless you have multiple outfits per season/weather/etc then the weight will determine rate of choice if all other conditions are the same
thank you, also; wouldthis be correct then?
"{{ModId}}.PennySpring_Rain": { "Id": "{{ModId}}.PennySpring_Rain", "Condition": "SEASON spring", "Sprite": "Characters/Penny_Spring_Rain", "Portrait": "Portraits/Penny_Spring_Rain", "Weather Target": "Rain, Snow, Storm", "Precedence": -200, "weight": 1 },
if you only want it in spring and during rain- where does weather target come from 
"Condition": "SEASON spring, WEATHER here Rain"
On the seasonal outfits via appearences wiki
WEATHER TARGET (weather type): Used for weather-specific outfits. TARGET refers to the NPC's location, so NPCs on Ginger Island, Calico Desert, or a custom location with different weather will match their weather-specific outfits to the weather in their location rather than Pelican Town.
Link?
yeah afaik that's not a valid field
https://stardewmodding.wiki.gg/wiki/Tutorial:_Adding_Seasonal_Outfits_via_Appearances
This is what confuses me most. Was directed to look at wiki for guide but some parts feel vague
If you want to add seasonal outfits for your NPC, there's two ways you can do this: the token way or the Appearances way. Appearances is a new code structure added in SDV 1.6, so if you're looking at an older NPC's code for reference, they'll most likely be using the token way. The main difference between the two is that the token way is simpler...
thats listed under "A few commonly-used conditions are:"
( @wanton pebble here you go: https://www.nexusmods.com/stardewvalley/mods/10959)
Yeah that's part of the Conditions field
also in: added sliders for the big/smol chests too
also has an option to draw the first item in a chest (off by default)
(we are keeping this on the downlow for now.)
Page format could make it more clear that it's a GSQ as part of the Conditions field and not a field of its own
there's a general overview of GSQs here: https://stardewvalleywiki.com/Modding:Game_state_queries
but weather is an example of a single GSQ, e.g. you'd use "Condition": "SEASON spring, WEATHER Target rain storm snow" or some such
(edit for the season thing, I missed that, so jamore's example earlier
)
okay, how do I with Pathos' thingie
It's only a problem when it becomes a problem 
i mean i dont think the wiki can indent the text, can it?
I'm unsure about the gg wiki
tbh i just subdivide with headers
not outside of a code block
I know the official can
to be fairrrr
One sec, lemme check my tutorials
its clear if you read the text and dont just skim
Because I was stealing official wiki formatting everywhere I could
what's stealing official wiki tutorials, i was slapdashing header1/2/3 everywhere
Also, how well formatted is the within wiki for content patcher on explaining how to do overlays? That is the part I have no idea how to do at all.
Would an overlay go on top of the appearance or how do those two play together
Yeah uh : should indent
so overlays will go over the loads and while they will always be above the appearances, it might act strange
interesting way to denote an indent
if i need a combination of appearances + overlays, i've delegated the "Appearances" to be like, Bald Ass Head™️ and the outfit
"One thing to note is that the TIME GSQ doesn't work for Appearances unless you also have a C# mod forcing a time-specific check, which has the same performance impact as using Content Patcher's Time When condition and "Update": "OnTimeChange""
this doesnt seem correct to me either, it will work once they change areas
with my overlays being the hair, accessories, etc, but you can do how you do
yeahhhh
I understand the formatting on the wiki as every command given was its own separate line. So it worked down what you would populate in each line or if you needed it
it's also not that bad, performance wise
OnTimeChange?
yeah updating an appearance manually is ezpz, you're not reloading patches or textures or anything
in other news, I do have a bit of ELR that suppresses outfit changes for npcs on on your map, in return for the ones on your map updating every 10 min
you're just rechecking conditions
tbh i just refuse to use it at all, i don't wanna be part of the problem
(they also update when you warp in.)
OnTimeChange is still potentially bad we're talking about just updating an appearance
yup
Appearance is checked regardless, may as well use it
the only reason that the TIME GSQ doesnt work as one might expect is bc the only thing that trriggers an outfit update is changing locations (without asnother mod)
ah, uhhhh iirc someone told me it just caches that query and remembers?
afaik the game doesnt ever cache query results
oh 
GSQs are meant to be checked on-demand
the game caches part of query caching
which anyone who has ever accidentally put in an npc's name lowercase knows too well
Though I dunno if saying a CP token is cached is quite accurate
The token is replaced with something unchanging before it even hits the pipeline
what do you mean by this
so, in y'alls opinion then, what would be the best route for me to go down coding side if I want to make a seasonal outfit mod that has two hair colour options and three eye colour options? The mod will have three outfits per season and as of current plans (especially with my skill) no unique portraits for festivals/events
i was just thinking about the time gsq because of my radioactive tree using the condition:time and it's all fine and good
give me a second to upload my highly technical outfit.json
basically, if you typo blah_custom_query leah and get "uh, it's Leah, not leah", you have to reboot the game to clear that cache
because if you then try to fix that, it's just....cached as lowercase
thanks
i dont know if ive ever had that issue?
ive done a lot of query testing with NPC names and havent put much care into capitalization
huh...
no idea how this bodes performance wise, i've just kinda thrown it to the wind
OnLocationChange should perform similarly to Appearance
iirc i did need to change the uh, eyepatch into an appearance because i wanted to completely remove OnTimeChange
i think how i have it right now, it doesn't Actually Work™️
i would think OnLocationChange would still be worse if it had to invalidate a bunch of data or potentially replace images
does overlay have the same correlation of invalidating
every time an asset is changed it needs to be invalidated
yes, I think CP redoes all the overlays again
with Appearances, all the data is already loaded and all the portraits and stuff are ready and in the game
you're just telling the game to switch to them
tbh i just Really Didn't Want™️ to make that many separate instances for each and every combination of config
which is why i just opted for the overlay approach
Performance-wise you'll probably never notice it
good 'nuff 
Maybe add a few thousand NPC's and then you have a different problem who cares about the appearance stuff anymore
someone give me the will to do a bug fix pls
no, it's crimis
also locationchanged will check it every time YOUR location changes and not the NPC so there is that too, a lot of pointless checks
Holiday treat: add a bug instead
do it in 5 business days 
make it a week for hannukah 
ah yeah i was gonna transition that one out entirely because people can deal with configs changing OnDayStart tbh
tbh i thought CP updated config reliant patches immediately anyway
I will say this, i should not have tried to do this mod given how little I know on Json file modding. Most of the stuff discussed has gone over my head. However, I already made the okay looking portraits so I'm committed
!anyonecancook
uhhh, i've had a mixed bag reaction based on how i've done portraits, so i Do Not Know™️
The idea of Marlon just taking his eye patch off and having a totally normal eye or switching sides depending on what location he's in is very funny to me
maybe if they went through a mumble dynamic token mumble
do those not update when their config change? huh
ah yep, that'd be me, hi
How does the game differentiate between "fresh" wood/stone or other items and not fresh?
No, I have seen firsthand some people can't cook and should not be allowed anywhere near a kitchen... biscuits that are both burnt and undercooked is not a pleasent way to start your day
this might be a me thing but I've now had two different people report something and finish off with "..., so that needs to be fixed/changed." and for some reason that zaps the amount of energy I have to actually do the fix 💀
well boy do I have the upcoming action for BETAS for you avi-
doesn't it just make sure you have collected that many of the resource after the quest started?
wait i thought your appearance changes were already in ver, are you making a different one
(editors note: it won't actually really help)
like any quest that says "fresh" is just a quest that requires you to first collect X many materials and then drop X many materials to the person
i added a trigger action action that just calls 'patch update'
Yes, it does - I guess my real question is where is the differentiation between collection and picking it up from a chest say
it will not help, you're correct, i have no actual idea when i would need that
that way you can call that on location changed for 10x worse performance than you already do!
Does it know the difference. I finish quest by taking stuff from. Chests all the time.
it can help if you send a mail flag and have another token checking for that mail flag
every item has a "has been in player inventory" field
New quote added by aviroen as #6280 (https://discordapp.com/channels/137344473976799233/156109690059751424/1319781133906346025)
Thank you!!!!!
you can refresh that mail flag token immediately
.q 6280
Let's stop talking about making mods safer, why not make mods even more dangerous and user-harming
- @drowsy pewter (Jump)
damn, 200 quotes off
it doesn't matter which ones you hand in, but for quests that say "fresh", you have to get that many new resources before finishing the quest
Just gotta farm 200 quotes
I love those quests where Clint wants to inspect ore and I put it away and go show him nothing
new lifehack: chop down a bunch of wood and just leave it on the floor for collecting when robin has a quest /lh
this is why you can "cheat" the Gus egg quest with autograbbers
those collected eggs have never been in your stinky pockets so they count as fresh
Considering the terrible things I've kept in my pockets, fair
y'know i wish you told me this before i finished my 18 part event but y'know people can deal with a staggered event
me keeping a fish in my pockets for days at a time:
Right next to the loose slime and sap
poisonous mushrooms. bug meat
but yeah for special orders because every item becomes stinky the moment you get your grubby hands on them, they keep track of "collect fresh" and "donate" objectives separately
The bane of my existence, when I collect a bunch of items, forget I need to donate them and ship them off
wild
I was given a gift card last week with the ending digits being 6379
well i only added it 1.5 days ago
It's not too late, just rewrite the event 
Have you timed this thing yet?
So, the one last question as I realized the conversation spiraled and it was never answered. For weather like if I want a rain specific outfit. Do I use the wiki's command of "Weather target" or am I reading something wrong?
oh I see why there's a bug. it's because I was being an idiot 
object moddata is still a thing, right?
It's just part of the Condition field, you choose whichever GSQ's you need that match your desired conditions
it got drowned out by me getting distracted by that Weather Target field 
Objects have exposed CustomFields
They might have ModData if you're messing with them through C#
I saw conditions mentioned and that I read the format of the page wrong. Then you were discussing on time change and how sometimes something didn't work and that's where my brain stopped. Also, who is Avi? I only saw Jamore, Button, and you responding to my question?
👋 formerly Aviroen
allegedly 
though i haven't changed my username, just changed display name because i'm in J Club Jail
Yes, apologies, I'm slow on the uptake 
okay, thanks. Yeah, didn't even see your condition message when I opened the wrong can of worms apparently. Time to go hide in my corner and hope I make it to spring
(also I didn't know what you meant by the wave emoji earlier but hiiii avi)
ooooo nice. I need to check out more of you guys' mods later
the valley gets mad at you if you gift it to them with like, 3 exceptions, cause like, "why are you giving toxic mushrooms to people?"
are the custom fields exposed through c# too? I just need to store some persistent data about something
Ah, Items have ModData but not Objects lol
Technically they should be able to access the Item's ModData since Objects are Items
but will it be a furniture thing, where a rectangle is not a square 
I need to reaquaint myself about what the different between those two are lol. BCs are objects, right?
yes
some items are objects. some items are not
it's Fun TM
anyways, inheritence is sane in C#
inheritence: never a cursed construct
CustomFields are part of the data, it's not really something you use for persistent storage on an object instance
Not to be confused with StardewValley.Objects btw
that's ModData's job
right, so moddata it is
ModData is also synced right?
I come from the wild wild west of python and js "classes". I'll take C# inheritance any day 
jlasses
synced with what? I think it's stored in the save per object if that's what you're asking but I could absolutely be wrong
usually yea
u can double check if the particular mod data is a net dict
oh and make sure its the mod data on the item, not the object data
Item's ModDataDictionary inherits from NetStringDictionary
ye u good
but like, if u put it on Data/Object it no work until u spawn a new one
the usual object deal
ModData in Data/Objects: when a new instance of this object is created, put these fields in the modData field to start with
...how would one do this? (sorry, back on my adhd meds after a while, I can barely think)
item.modData, not Game1.objectData["Carrot"].ModData or whatevs
oh, so for the specific instance not a generic object data basically?
can do, this is inside a harmony patch anyway
Can someone make sure I'm not crazy here? This event stage doesn't actually exist, right?
What do you mean "event stage"?
want to make sure before I patch in another render event, the item description box is clipping under my menu addition if I use RenderedActiveMenu
Well it's not a global render step, certainly, because it's just one specific menu, but that doesn't mean the menu itself doesn't expose some event. Where did you find that args definition?
I patched in a custom MenuBackground event step because the normal MenuBackground step doesn't apply to the inventory menu, either my content will be drawn below the background (rendering) or be drawn above the mouse (rendered)
I made it, just wanting to check and make sure it doesn't exist before I patch it in with harmony.
Question still doesn't make sense to me. What doesn't exist? The event args that you wrote yourself?
The Menu render step does exist. https://github.com/Pathoschild/SMAPI/blob/66fecc71f371f96e4b4303d387803ef3b40c7040/src/SMAPI/Framework/SCore.cs#L1224
any method of achieving the effect I described above, where the content is drawn before the item tooltip
Usually tooltips are drawn within the menu's own draw method, so the menu itself would have to provide that kind of hook; there isn't a global "before tooltip" step because tooltips are up to the individual menu.
rendering puts it below the background, but rendered puts it above the tooltip, which is the problem I'm trying to solve.
I just don't want to reinvent the wheel if there's already a rendering step I should be using, which is why I asked
if it doesn't that's fine, I already have a system in place to inject it, but I wanted to check 🙂
I tend to get carried away with the patching before checking and I've ended up making events that already exist before lol
I think it'll be clear if you look at the decompile for ShopMenu.draw. Menus draw their own tooltips in their one and only draw method. There isn't a distinct rendering stage for it because there can't be; it's just menu drawing.
are there any C# examples of sending a mail without using the mail framework
I did and I couldn't see it, just doing an idiot check tbh
The tooltip is not even the very last thing that gets drawn; the cursor and hover item is.
bc at my core, I am idiot lol
Actually, it looks like portraits even get drawn after tooltips, which is bizarre.
Should just be Game1.addMailForTomorrow unless you need something more specific?
Anyway, you definitely cannot insert drawing between "tooltip" and "stuff underneath the tooltip" without Harmony patching, because that is all in one method.
ok cool that's what I thought, just checking
I've already made a couple patches for other menus to get above the background but below the cursor / tooltip and figured it was a lot of code rewrite for there to not already be an event for it
but ig not
I suppose you could always prefix drawTooltip itself if you like to live dangerously.
I mean I do, but I think making a bunch of brittle harmony patches is the type of danger I'm choosing this fine Christmas Day
Yeah, I meant prefix it one time to create the event you want to exist, as opposed to prefixing to customize the tooltip. You'd have to do a fair amount of work to unwind the context, but since drawing is (must be) single-threaded, it is possible to do more-or-less safely. And you'd only have to do one very dangerous thing as opposed to many somewhat-dangerous things. Horses for courses.
Yeah that's what I was weighing. I figure since I already have several, I'll just make a generic patch I can slip into a draw() method with a CodeMatcher and link it to my own RenderingMenuContentStep event, which should cut down on the amount of work if the IL changes
I'm not sure how you'd do it generically with a transpiler, since some menus might not render a tooltip at all, or might have multiple conditional branches for different tooltips, etc. I think it'd have to be bespoke.
it's less about the tooltip, more about the position. I'd have to get the right match for each draw event, but it's not about the tooltip, it's about the render order for me. I just want my event to be called after the background but before stuff that renders over it like the mouse or a tooltip
private static void InsertEventPatch(CodeMatcher matcher)
{
matcher.InsertAndAdvance(
// IClickableMenu
new CodeInstruction(OpCodes.Ldarg_0).MoveLabelsFrom(matcher.Instruction),
// SpriteBatch
new CodeInstruction(OpCodes.Ldarg_1),
// Call Event
new CodeInstruction(
OpCodes.Call,
AccessTools.DeclaredMethod(typeof(PatchRenderingMenuContentStep), nameof(CallRenderingMenuContentStepEvent))
)
);
}
What do you mean by "background"... the "background" in SDV's UI parlance is like the fadeToBlackRect that draws on top of the world/HUD/etc.
The thing between the world and the cursor/tooltip is not the background, it's... the menu.
this
Yeah this is back to being unclear again. Menu and MenuBackground are distinct rendering steps, but it feels to me like the meaning of "background" is being misinterpreted.
menubackground doesn't apply for things like ShopMenu or GameMenu, it's drawn without the call to Game1.hooks
public override void draw(SpriteBatch b)
{
if (!Game1.options.showMenuBackground && !Game1.options.showClearBackgrounds)
b.Draw(Game1.fadeToBlackRect, Game1.graphics.GraphicsDevice.Viewport.Bounds, Color.Black * 0.75f);
ShopMenu.ShopCachedTheme visualTheme = this.VisualTheme;
I already tried using the built in render event, it doesn't get called with that step
So, there is a "menu backgrounds" setting in the game settings, which by default is "Standard", meaning it draws over the world.
There is a different, "Graphical" option that draws an opaque, custom menu background and completely hides the world.
If you change that setting and open the shop menu you get a background like this.
That's the "background" - that's what you draw over if you hook the MenuBackground step.
ohhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
I've never even touched that option lmao
makes sense why I thought it wasn't working
Yeah, it's easy to miss. Very few menus actually override drawBackground, it's just a base implementation in IClickableMenu.
(Which, ironically, checks its own menu type)
well then I'm back to my original problem/solution then, just with a bit more knowledge lol
The transpiler code above looks very broad... just loading the menu and sprite batch args must happen many times in a typical menu.
just found out "Characters\\asldkfjsquaskutanfsldk" is a real, vanilla asset name and that makes me unreasonably happy
For instance, ILSpy shows me this:
// drawCurrency(b);
IL_0115: ldarg.0
IL_0116: ldarg.1
IL_0117: call instance void StardewValley.Menus.ShopMenu::drawCurrency(class [MonoGame.Framework]Microsoft.Xna.Framework.Graphics.SpriteBatch)
You probably don't want to run your handler before drawCurrency.
Mind you, I might have been misinterpreting, you only posted the snippet that inserts the instruction and not what it tries to match on, so maybe that's not what you meant.
(My point earlier about having to be bespoke was specifically the latter - yes you'll always insert the same instructions but matching generically is likely to be hard)
I'm unpacking the game assets just to find out what that asset refers to
It's a sasquatch...ish thing.
One of the flavor animations you see in random locations IIRC.
Yeah you're completely right, I was just talking about the inserted code, since it's applicable to any menu I'd patch the draw method of
private static IEnumerable<CodeInstruction> TranspileShopMenuDraw(
IEnumerable<CodeInstruction> instructions,
ILGenerator generator
)
{
CodeMatcher matcher = new(instructions, generator);
matcher.MatchStartForward(
new CodeMatch(OpCodes.Ldarg_0),
new CodeMatch(i => i.LoadsField(AccessTools.Field(typeof(ShopMenu), nameof(ShopMenu.hoverText)))),
new CodeMatch(OpCodes.Ldstr),
new CodeMatch(i => i.opcode == OpCodes.Call)
)
.ThrowIfNotMatch("Unable to find insertion point content rendering in ShopMenu");
InsertEventPatch(matcher);
return matcher.InstructionEnumeration();
}
Effects\ShadowRemove.xnb => Effect isn't a supported asset type.
Effects\ShadowRemoveMG3.8.0.xnb => Effect isn't a supported asset type.
is this a known thing btw? using StardewXnbHack
Well, some code reuse is better than none. I only brought up the (kind of dangerous and not recommended) patching or prefixing of drawTooltip itself because you'd only ever have to patch it once, assuming you got the implementation right, and then it would work for any menu including modded ones.
Then again, if the point of the exercise is to patch very specific UIs in very specific menus as part of your mod, then you don't really need that anyway.
yeah I just don't know if it'd be worth the effort because of that exact thing
For something like that example, probably not; no sense in writing an overly generic event system for 3 or 4 bespoke patches.
it might be worth it if I had a good way to always position the harvest price box, but for modded menus it's always an unknown so not really worth
I, for one, would not be fussed about not being able to see the harvest price in a modded shop menu, because I don't think I ever sell actual unprocessed crops in a normal playthrough.
I've actually been seriously considering transpiling drawTooltip to insert a lot of UIInfoSuite's overlay info directly into the item tooltip
but respectfully
that method is a trainwreck
You don't need to tell me, I just added full vanilla tooltip support back in v0.4.
lmao
Some of the parameters literally don't do a damn thing, others don't do anything like what they claim to do.
I'd have to write some sort of modular framework first where I can register pieces of information and then just have some hooks that modify the dimensions of the tooltip window
the most annoying part when I was experimenting with it is all the dimensions of the texture boxes and how the variables are optimized down in IL
You'd probably want to use Lookup Anything's system as a reference. Not my favorite design, but it works.
Unfortunately, if you go the reflection approach, then unless you want to implement your own duck typing system, you'll be limited to simple types since you won't get Pintail proxying.
I kinda wish C# had MyGenericClass<_> blah = whatever;, aka better generic inferenc
var doesn't count?
the language I use most for work is C++ so tangling with all the reflective stuff you can do in C# is always an adventure for me lol
the proposals for c++ reflection are still in discussion (and look god awful ugly)
Using reflection to look up an arbitrary field on an IClickableMenu implementation is easy (like LA does). Dealing with any kind of complex data type that's not shared between assemblies, that's the hard part.
The C++ guys should probably have a gander at what Delphi was doing all the way back in the 90s with RTTI, but they won't.
is Gold Brazier a fallback value of some kind? I'm currently logging something to do with light-related methods and it seems to think there are gold braziers everywhere for some reason, and no other kinds of BC lights?
May the lord forgive me but sometimes I find myself wishing for some typescript functionality
In generic inference
Given
A<T> where T : B
Instead of
MyClass<T1, T2> where T1: A<T2> where T2 : B
Should just be
MyClass<T1> where T1: A<T2> or something like that idk
I don't think that's actually a thing in TypeScript, unless default generics are involved. Generic constraints have to be fully expanded at compile time in both languages.
From what I remember in ts you could have the types within the restrictions also count as declarations
But idk been more than a year since i last did ts
Oh and in this same type of thing i also wish nameof(MyGenericClass<>.SomeThing) was supported
Instead of having to fill the <> with object or some filler type
Knowing how the C# team tends to operate, that is probably never going to happen, since it is so trivial to just type nameof(Foo<int>.Bar)
can someone tell me how to make a CP mod to change a festival potion. I changed it tn the actual mod, but they just updated and now I have to cahnge it agian. I figure a CP mod that does it would be better.
it would be some sort of
interface MyClass<T1 extends A<T2>, T2 extends X> {}
I think that definition is valid in C#... isn't it? Or am I getting it confused with Rust.
How are Strings\StringsFromCSFiles localized? Is it not just Game1.content.LoadString?
I wonder why the game seems to believe there's a (possibly multiple?) gold brazier(s?) on the farm at (0,0)
Did older versions of Stardew actually have an implemented raft, or was it an aborted feature?
iirc it was never fully implemented in older versions, I remember reading a warning somewhere not to try to patch it in in a surface-level way or something
I could be wrong though
thank you for this summary, google ai! it's complete nonsense 💀
People wonder why were so adamant against ai, that. That right there.
I mean, a floating furniture mod isn't a terrible idea for all the aesthetic players... like a lilypad you can place on the edge of water like a crab trap and then place decor on
Iro do you know of the pain of the crab pot, I feel like that's a blacksmiths rite of passage
my favourite part is that it cites "sources" to create a sense of legitimacy, because it's not like people already have a hard enough time telling the difference between reliable and unreliable sources...
no?
should I go have a look at the functions to do with that
It'll probably make you go, "Right. Sprongobjects.png ain't so bad."
it's been so long since I looked at tilesheets/graphic assets I can't 100% remember why springobjects is bad
(mostly just being a giant index-based sheet of every object) (except stuff added in 1.6, which can be in other sheets)
ah, very fair
I refuse to look at crab pots
I'm just glad 1.6 apparently fixed the unqualified parent sheet index being used as ID half the time
yep, ID used to be interchangeable with "position of this item's sprite in springobjects", resulting in various messes until JA took responsibility for managing all that
(which had its own buildup of issues, but worked pretty well)
Figured it out, had to re-register my GMCM configuration when the language changed
didn't realize the game always started in english
iirc that's what led to the staircases turning into trimmed purple pants when used as pants?
bc they had the same parent sheet index
N3rdGirl's Nerdy Corner
It wouldn't be possible to make an EditData or other action only occur while a game menu is open, would it?
not with CP
Dang
not intended to do on the fly changes like that
what are you trying to achieve? this feels like an XY problem type thing
Trying to see if there's anything I can do to sidestep around a sprite display incompatibility with Sprites in Detail and NPC Map Locations
A difficult task since I don't know how to C# 
yeah, the switchover to string IDs (and adding type qualifiers) lead to a lot of bugs with object type ambiguity 
Unfortunately it doesn't, even when I got the offset to successfully show the sprite it was distorted and located in the wrong spot
// Children sprites are short so give them a booster seat
what a cute comment from npcmaplocations
sounds like that's a project that requires c# then (if it's at all possible to do from an external mod)
Probably, I was just pondering if I could possibly work around it by having an overlay of the NPCs' vanilla heads in the original location on the sprite sheet only when the map's open, but I guess that's out of my league
Does anyone know how to force a mod to load only after Content Patcher is completely done loading everything? Turns out Clear Glasses breaks CP overlays but if it's enabled after CP is done rendering the sprites then everything is fine
That’s not possible
Content Patcher does its things way after all mods are loaded
It would be on Clear Glasses to handle it properly
I mean it is open source I guess...
I was hoping there'd be some very easy hook to make that change because I don't have a C# environment set up and really don't want to invest that much time into doing it
What is "CP overlays" supposed to refer to? In general Clear Glasses does not have any incompatibilities with CP mods, it mostly patches the low-level graphics APIs.
That's the confusing part. I have a CP mod that doesn't change the map when the action is on overlay, but it does when it's on replace
So basically:
- overlay, clear glasses on -> no sprite change
- replace, clear glasses on -> sprite change
- overlay, clear glasses off -> sprite change
- replace, clear glasses off -> sprite change
Tested in the SMAPI console by updating/invalidating/exporting
I'm pretty convinced there's nothing wrong with the recolor mod; there's just a weird interaction between CP and clear glasses for some reason I can't explain
I'd take a look at some other mods that do that type of thing and see if they're broken too, before settling on the conclusion that it's either CP's or CG's fault. Unlikely that a bug like that would go unreported. Maybe it has been reported, check the Nexus bug reports on CG as well.
I went through recent bugs on all of them 😦 the author of CG said that macos is broken right now -- I'm guessing this is part of why? My CG experience has been perfectly fine except for the one interaction with overlays, so I was hoping I could fix it for myself by just delaying when CG gets turned on
Anyway I do have my silly workaround to manually toggle CG on/off so I'm not desperate, was just wondering if there's a quick solution (sounds like no)
let me guess. your overlay is a full width-overlay
yes........ I could make it 1 pixel off, would that help?
yeah
while debugging I DID try defining a to/from area but I used the image's actual dimensions
I don't know Clear Glasses well; I do know Spritemaster has had an issue with full-width overlays since, well
clear glasses's source code has a directory called "spritemaster" so I'm guessing it inherited it
yeah, I recall that being a thing ever since https://github.com/Pathoschild/SMAPI/pull/870
(I don't know Clear Glasses well, but it's a fork of Spritemaster, which was written by ameise, who I did know.)
My brain is too tired to parse that PR right now, sorry 😔 Is the issue that it's an off by 1?
no, the PR makes full-width overlays take a shortcut that's faster
Spritemaster never accounted for that
the point is not "anyone has the ability to cook right now" but rather "cooking is a skill and can be acquired through practice, no matter what level of 'talent' you have to begin with"
Can I set the maximum stack size of an object with CP (without making it a tackle) or do I need to patch the maximumStackSize method to make that happen?
Need C# yes
Can I override that method for an object I made with CP or do I need to harmony patch it in order to include my object in the check done by maximumStackSize?
is that object a separate child type of Object
It's an item that is currently created by CP
then you can't override since it isn't a new class, you will need to harmony patch. I think child types of Object are discouraged anyway but I could be wrong was indeed wrong 
You would just need to register them with the serializer I think
I figured I'd make the item using CP since I don't know how to make it via C# and I'd let CP handle adding it and such
Oh, how does that work?
or where can I read up on how that works
Well you only need to do that if you make the item through C# as a new item inheriting Object
Or any of the various other things that have to be registered when you make them, so the serializer doesn't explode
I'm not sure how you do it outside of SpaceCore, I would suggest just using SpaceCore's implementation of it
you need to create a new type that descends from Object solely to override that function, patch the item registry to make your new type instead of Object if it's the object you want, then register that type with SpaceCore...
... or you can just postfix the stack size function. your call
A postfix with a check to make sure it's your item is way easier
ah well, harmony was bound to make its way into this project at some point... might as well be now and just do the simple postfix
i mean with your original approach you need harmony anyway
(the item registry patch)
(harmony is good and fun and i remain slightly irritated that SMAPI warns you when a mod uses it)
the game doesn't magically know to use your new type to create your item
yeah, I asked originally because I was still enjoying not needing harmony for so long on this
Prefixes and postfixes are fine, they're just more C#
I still need to learn transpilers but I fear that's out of my league rn
Technically transpilers are too, but they're C# that affects IL, so more to keep in mind there
cool, yeah, I've made prefixes, postfixes, and a transpiler, so no worries there
(for other mods)
It does feel like an accomplishment to make a mod without harmony lol
and I was doing so well! I'm close to 10k lines and avoided it so far lol
my entire map event markers mod is harmony-free iirc and that seems like a miracle
the game's data structures can be kinda magic like that, but that is impressive
tfw you realize you're putting more effort into a fake mod for demo purposes than you put into many actual mods.
I'm wondering how I can (in C#) go from BuildingData.ItemConversions.RequiredTags (which is a list of strings like "id_o_262"), and somehow churn out a list of ObjectData that have those tags... I'm guessing it's some kind of GameStateQuery mojo, but I haven't used that much. Hint plz?
my shader mod has a couple tiny patches, but the actual shader part runs on SMAPI events. when you have an event for the thing you want to do, hooray! but SMAPI (deliberately, if memory serves) doesn't provide a lot of detailed events, which pushes me toward harmony for a lot of stuff
iterate over every object data in Game1.objectData, create an item instance associated with that data and check the new item's context tags
the reason creating an actual item is needed because object data doesn't contain automatically generated tags (the id_o ones notably)
(you can also just call ItemContextManager.GetBaseContextTags)
but you will miss the weirdos
Thanks. That sounds doable!
which is kinda important
I know the actual meaning. I just have been told that saying so many times it doesn't mean anything to me anymore. I've also seen folks that try their damnedest on skills and not improve. I usually just make my way forward through sheer stubbornness and lack of sense
hmm should I release my mod updates now and risk stuff breaking in the month I'm away, or wait at the cost of other people who may rely on my stuff
set a timer to release half-way through for an optimally bad solution
(I have: furniture machines, custom growing pots and custom lightning rods in the works, all features requested by other ppl)
(maybe I should ping them, but that feels bad)
Don't worry about me in that group, my stuff isn't publicly released yet
if you release the update and it all works fine, thats fantastic. if you release it and it breaks while you're away, they can use the old version until you get back
as long as you dont archive it
hmm good point, though I don't expect some nexus users to follow it
if you put in the release notes on the file download page in big letters "IF THIS DOESNT WORK USE VERSION x.x.x" then its their problem if they dont listen
can't let the nexus users' reading abilities dictate how you mod...
thouh these are frameworks, so if someone releases a new mod that uses a new feature only for said feature to break
well I hope they don't
if you were concerned about it, you can release the new version as a beta update instead
for mod authors
users wont get pinged about it (i think) or if they do they see its a beta, and mod authors can still use it
(i dont know for sure about the update notice ping though if the version number is listed as an alpha or beta. maybe? idk you can always just give it a completely different lower version number anyway)
beta sg, thanks
Last time I put up a prerelease on GitHub, SMAPI notified users anyway. Though I think as far as Nexus goes, it only looks at the main file and might ignore optional files.
I don't recall who wanted phone call console command, but it's in now. https://www.nexusmods.com/stardewvalley/mods/19458
I...didn't do this.
its still christmas you still have time!
(but also its still christmas dont bother and just relax instead)
Also you're retired
I made a translation to a mod from Korean to English but like... I don't know what to do next lol
Not really, I want to see iof it works first
(tis but a +2/-2 change, it's in now!)
but won't be released until...next cycle
when the atra orbit comes back around, i understand
Personal mods you might as well just keep for yourself, Duskygirl, you won't need to do anything in particular
Oh, I see.
does the original mod have an i18n folder?
You translated the mod but haven't made it work in game
yes
Yeah see Button's question
and yes
then you toss the translation in that folder
title it.... what's the korean code for i18n?
en.json?
It was translated from Korean to English no?
(lyoko i didnt mean to interrupt you im just dumb, saw "santa [vague letters here]" and thought "oh lyoko isn't typing yet, i might as well respond")
(i did not realize you were santa lyoko)
ko.json
okay i will try
But yes, if you're running the game in korean, title it ko.json and toss in i18n folder
Okay. In that case, en.json would be it
Is your en.json identical to the ko.json in terms of the keys?
keys?
Each line of dialogue in an i18n file will look something like this "key": "value" which as an example might then be "hiria.party": "I'm glad you could come to my party!"
yes
Is the Korean file named "default.json" or "ko.json"?
can you send your ko.json file using https://smapi.io/json ? so we can have a better look
Change that to "ko.json"
okie
an en.json should still override it, i would think
The wiki says the default.json is the default English but you're right that en.json might override that
#making-mods-general message
the wiki just mistakenly implies english is always the default
I'm seeing an error and here it is:
[Yoba] Mod couldn't load some translation files:
[Yoba] - en.json.json couldn't be parsed: Newtonsoft.Json.JsonReaderException: Can't parse JSON file at D:\Steam\steamapps\common\Stardew Valley\Mods[NPC] Yoba\i18n\en.json.json. This doesn't seem to be valid JSON.
Technical details: After parsing a value an unexpected character was encountered: I. Path '['NPC.cs.4294']', line 156, position 19.
at StardewModdingAPI.Toolkit.Serialization.JsonHelper.ReadJsonFileIfExists[TModel](String fullPath, TModel& result) in /home/pathoschild/git/SMAPI/src/SMAPI.Toolkit/Serialization/JsonHelper.cs:line 86
at StardewModdingAPI.Framework.SCore.ReadTranslationFiles(String folderPath, IList`1& errors) in /home/pathoschild/git/SMAPI/src/SMAPI/Framework/SCore.cs:line 2285
Then please upload your en.json file to the json parser so we can check it
Because you have an error in it somewhere
something about your json is invalid, but also you need to turn on file extensions
AAQAA
mightve missed a comma or done a quotation mark wrong, maybe
I found an extra quotation mark

Floating beehives that make carrots! What a wonderful world
thanks
I don't quite get the question 😅 anyway you can define whatever custom output you want, it uses Data/Machines rules with a custom lightning trigger
Well, it's progress! Are you wanting help or just commiseration while you try to troubleshoot?
oh I meant what can you make float, like just beehives or other things haha, sorry
help please. I don't know what to do from here.
!json
JSON is a standard format for machine-readable text files that's used by Stardew Valley mods.
If you need help with a JSON file, you can upload it to smapi.io/json to see automatic validation and share the link here.
When making mods, it's recommended to edit your files in a text editor with JSON support, such as VS Code, Notepad++, or Sublime Text. These programs will check for syntax errors.
That took a while Gov
Okay then please share your json with us like we have been asking :)
I should stop letting myself message after 3am 💀
any big craftables with Machine Terrain Framework
Oh the beehives use lightning to make the carrots, of course!
that "beehive" is a custom machine that I reused the beehive sprite
Lightning is nature's energy source
I mean yeah, just like real life... /lh
Does the mod's dialogue file really just use "Mon" etc for its i18n keys?
is the original mod on nexus?
That seems confusing
Uh, don't you leave the keys alone?
i dont know what 1.6 yoba is
yup
you have two entries for NPC.cs.4293 (lines 149 and 155)
I don't know what you meant by that lol
you should only have one entry per key
I will be able to tell you more after I look at the original lol
half an hour of irritation at my code and it finally clicked that I was trying to patch an abstract method when I only cared about the overridden version for a class
Woof, it's packed as loose files in the zip folder, that's crazy
Good way to introduce unneeded user error
did you make sure to fix the file extension?
Yeah ignore what I said
edited that part out
wait, what's the alternative? bc it's all in folders, not at the top level as far as I can tell
its not in a mod folder
does it work now?
that dupliocate key would not cause that error
gonna try it now, standby
ohhh, yikes missed that
the duplicate key is a red herring. did you fix the file extension issue mentioned earlier?
Before you do, did you fix the file name like Button said?
I was mostly wondering if it would prevent the translation from loading at all
but also yes, the extension!
yes I did :>
It should be
Zipped File
[CP] Yoba
assets
i18n
content.json
manifest.json
you're 100% sure the file is now en.json and not en.json.json like it was before?
So when people extract it, it's all just in a parent folder already
I always take psychic damage when someone has file extensions turned off
(Yeah sorry I told them to change it so this might be my fault :/)
I changed it back now ^^;
i dont think default.json should be strictly required, but ive never exactly tried, so, i dont know
that one im not sureo f
Swapping the default to ko and the en to default probably would have worked
But I forget if the eventual goal is to release this
it would just be treating a symptom and not the cause anyway
is there not already an English translation bundled with the mod btw? the mod page seems to be giving english translation credits to someone
Nope
they might be talking about their translator for the description
the english translation is gone
possibly, I didn't think of that
mostly because the two files are in two different formats now
Yeah the English translation was from before 1.6
The credit for the English translation is to a user page and they sure don't have any translations in their mods lol
the english translation has been archived as it turns out
So is it working with the renaming?

it's just the first load thats long
One of the many reasons it's suggested to test with minimal mods (I don't follow this advice)
loading in game is fast
WHenever I have to edit a mod I use in my play folder I move it to my testing folder first, then move it back once it's done
what about patch reload

