#making-mods-general
1 messages Ā· Page 53 of 1
and i think assuming you have all the references you need set up there shouldnt be any reason you couldnt
but, a stardew mod would be expecting the references to SMAPI and the mod build package and whatnot
(you didn't see the decompile)
it's rough.
oh i see
lots of decompiler artifacts to clean up.
well. okay and assuming the code itself still worked
maybe an ILSpy dump would be better.
well gl getting it to build in 1.6, but there's a similar mod
i figured that was covered by the "change it" clause
u could see if this is what you want
yeah, it's not fundamentally impossible to go from dll->decompile->recompile, but it's a lot of fussy cleaning
It was not lol.
well... what else did you mean by change it then
also this one https://www.nexusmods.com/stardewvalley/mods/25136
What WindmillPunch is trying to do. Poke tentatively at the mod in the hopes that he can find something that will work, while ultimately not knowing very much at all about C#. (Sorry if that's an unfair characterisation, WindmillPunch. It's not intended to be rude.)
Oh it's an incredibly fair characterization
I think using ILSpy and not Rider to decompile would help
that's an unexpectedly large amount of decompiler artifact tbh
the ones ILSpy produces are cleaner
My first decompile was using something else
I don't recall
If that's what you were looking at lol
Rider's been pretty good with decompiles in the very few cases ive used it but yeah id still recommend ilspy
(I have a very minor gripe with open source mods with 1.6 unofficial updates that isn't. I still appreciate the time the new authors put in updating the mods, and depending on the original mod's license they may not be required to release the source, but still)
does the original repo have a PR anywhere?
(I could ask them if they could release the source, but ehh anxiety and laziness)
Are PRs called merge requests on GitLab?
(fwiw, this is why I encourage people to fully take over my mods if they adopt them, including new mod page + forks + enabling dp for them.)
Original repo: https://gitlab.com/yuri0r/toolbelt/-/tree/master
yeah, MR on gitlab
None that weren't already merged by the original author, it looks like
Unfortunately the radial menu one doesn't work, as it's controller only :c
I don't know if it's just being past my bedtime but I don't think I understood that first sentence. "That isn't" what?
Yeah
that isn't open source
tbh I'm also like, not impressed by the unofficial here
the unofficial update is closed source, the original is open source
"closed source" more like "missing source" tbh
also i wasnt here for when it was brought up originally earlier, whats the issue with the unofficial update code wise
Ah right yeah. That seems likely a reasonable gripe lol
One of the features doesn't work? #making-mods-general message
Basically, there's a toggle to have the tools show with a backdrop or without. It fails to draw the assets.
i see
Honestly, the tool pouch kind of looks like it "borrows" the layout from tool belt lol it almost looks identical. Except bug reports state the pouch part breaks eventually and you lose access to all your tools
honestly you'd have more luck forking the original
they do credit the creator of tool belt, so its possible they had permission or help
!1.6 <- and fixing things
Stardew Valley 1.6 is the recent major game update, which added lots of content and modding changes. See...
- 1.6 release notes (scroll up for patches);
- changes for mod authors.
It released for PC on March 19th; console and mobile are coming soon.
Why are people still making farm mods that replace vanilla ones now that it's possible to make new ones?
to have the meadowlands coop without more mod
some are probably just using old mods as a template too
I don't know if I'm smart enough for that ha ha. I wasn't even able to successfully change a couple of lines. But maybe at some point. I don't know enough about what is broken I think?
biggest reason tbh. 1.5 inertia
it's time, aba, we bring about the new age
wasnt additionalfarms a 1.5 thing though
also SVE does it (and keeps doing it for compatibility reasons), wouldnt be surprised if others are copying it
I must find a tidy person with a custom farm to copy from 
it's also (marginally) easier, you can either add an additional farm entry, set up icons and stuff... or you can just replace a vanilla map
is waffle the name of a person or name of a farm
faff around getting your fish to work
i got it to work! trash is just overabundant
name of a farm, the full name is waterfall forest farm
(this is why I suggested "IgnoreFishDataRequirements": true,)
I will take that recc, thank you. Waffle it is.
i'm going to probably remove trash from the item pool and see if that works though
removing trash from the item pool does nothing.
wait, no
it would actually make that weird double loop work, huh
If I do get the itch to try things again, how does someone uhh very inexperienced identify not so useful code?
nothin to it but to bash my head against it and see what sticks
by gaining experience, usually
assuming its just not useful and not just outright broken
asking "why?" a lot helps get that experience too. like if you're asking for help asking "why was this code written like this?" instead of more "what does this code do?"
(though both at once probably good too)
I'm usually able to like brain my way through code when I'm reading it. But the idea of code that used to work not working anymore is a weird concept kind of thing
Parts of it anyway
if its something that used to work but doesnt anymore thats usually bc the API or game itself changed
signatures change, things break
and if thats the case you just gotta look through the migration guides according to how old the version is
Like I was able to figure out where the problem was in the mod I think but not the specific why and made an incorrect assumption because I was like "I don't know these first phrases, but they sound like potentially LOGICAL PHRASES"
But yeah
if you get a solution/project set up in Rider properly it'll probably just straight up tell you "the function/code that this line is trying to use does not exist" anymore which is a good place to start
Like I was a computer science major at one point but a head injury made differentiating , . ; : and other very similar punctuation an incredible pain.
they likely were logical phrases at some point
my best learning experience is fixing all the green squigglies
It's been around 16 years though
i honestly have a hard time seeing the difference between : and ; depending on the application so 
i got my dirt override to work but hoeDirtDark has these weird paddy masks
gotta make them tiles in the end 
iunno it doesnt look that off to me
not any more off than dirt in cobblestones in the first place
oh y'know, did i even leave enough space for a coop+barn+greenhouse 
turns off the front layer i think so
yea that is also why i think i gotta make own tiles
but at least this spaget will let me dodge onlocationchanaged updates
for readability reasons it's better if tillable tiles look similar to something like the greenhouse
but aesthetics selph
(or use the volcano tillable)
if you're making custom tiles anyway then might i recommand making some custom ones to at least give like. an outline around the tillable area. like they can still be cobblestones but have a defined edge that separates the outer space from the tillable area
so it doesnt look weird when theres dirt next to it cutting off the cobble halfway thru
this aint any worse than every other custom farm having diggable grass so
and denotes that there is Something abouit the space that is different
yes but tillablegrass is believable
(I don't like those as well, but shh)
i think i made the whole thing tillable
like, if I were to swing a hoe at grass, it would indeed
till.
tbh if I swung my hoe at grass and it just bounded harmlessly off I would be MORE surprised, dear three random tiles on Meadowlands
maybe the play is to till and reveal lava
i just refused to put actual paths down because i hate having to coordinate flooring to match the damn roadpath
but u plant on it
i think if you just made this line and maybe the cobbles to the left of it look a bit different and have a clearly defined right edge to separate it from the rest of the space itd give at least some sort of balance between aesthetics and tillable readability
all personal opinions of course, feel free to do whatevs you want
(feel free to deal with that mess of transpilers!)
volcano does have dirt but idk the color feels wack
if you're already makin custom tiles just put the same shade of purple overlay on it
oh would seasonoverride on a random work for that
why change season every day instead of just changing the fruit tree output
wouldnt just changing the season every day mean it bears no fruit for like 3 days in a row
to keep you guessing
(this is for things like, say, one particular fruit tree that bears two things in different seasons.)
there's something like that?
did 6480 make a durian tree, i wanna commit war crimes
WAG makes vanilla fruit trees have rare extra out of season drops
yup, VMV
yes
how do those work in a greenhouse?
just the main drop
orange blossom
Since it always qualifies
encourages planting trees outside (to clarify this is for WAG)
though you can also move the extra drops to the top, which I think VMV does
though uh I haven't seen a single orange blossom drop from orange trees in the greenhouse in my main save, so I don't think that's the case
what kind of war crimes, since your post now gives me the idea to allow durians inside slingshots
1000 damage, totally balanced and immersive
oh as a child i had durian icecream, i was also forced to bathe every hour after eating it
Ok. I'm trying to make myself a personal mod that will swap which body I'm using according to which character I'm playing using the {{PlayerName}} token but nothing is working even though the mod worked before I swapped it for a token in the name... Can I not use tokens for calling the player's body?
farmer sprites are weird right
you should try patch export and see if your changes loaded
the player name token wouldnt be initialized until the save was loaded (i assume) so it might be too late by then? iunno
That... actually makes sense.
Ok thanks. That wasn't something I'd thought of.
mod groups with stardrop + per save config might work out
itd probably have to be a config setting instead you'd change but even then im not sure if you'd need to restart the game first
stardrop has per save config right
Yea I don't use stardrop? It's starting to look like I might could maybe need to, I just have a file structure that I was using. I just got annoyed when the mod I used to set my body updated and made it so that when I put clothes on my body reverts back to the base body... which was like... WHY?
Sorry if my typing is shit. I've been frustrated about this for a while and my typing suffers when I'm angry
About stardrop. You can pick which mods you have loaded that you're using per save yes? and can alter config files per save too yes?
You can use a layer to give an offset to your Furniture sprite, and make the "base sprite" nothing, this way you can have the visual furniture anywhere you want, without restriction from the collision.
It's not per save but per profile (both config and enabled mods)
and you can pick the profile before starting
Hey Leroy ^_^
Ok so it functions just like what I've been doing for the most part. cool

https://smapi.io/json/none/c885f852ac5b4b5b9fb009f8bac13171
time to see if this works
Hey so, say I want to use the standard farm but want to use another farm's interior, like say the beach or hill. How would I go about transferring their interiors into the standard farm right from the get go?
if you start poking around the file's map data or content.json (it could be in either) you'll see a Farm Furniture heading like this. copy the entire string of numbers, and paste it into the same heading of the farm who's interior you want to replace
each furniture item presents in a set of 4 numbers, the first being the object ID of the furniture peice itself, the second the X coordinate it will be placed at, the third the Y coordinate it will be placed at, and the last is the North/West/South/East heading the furniture piece will be facing.
every farmhouse is hardcoded to have a bed in the lower right corner (I think the coords are X8 Y9?), so you don't need to worry about putting a bed in
Pretty sure all the vanilla farms before Meadowlands use hardcoded farmhouse set ups
Which is to say, I think you can set custom values, but you need to look in the decompile to see what the other values you're changing to are, as they're not in the map properties
hey, I'm in developpement hell for the next version, I'll probably ask for testing help in a week or so if you're available
how do you sync map changes in MP?
Worked, cheers!
Help
you dont have the required mods, its telling you which ones you need in the parentheses. also, in the future you want #1272025932932055121
you'll need 1.5.6 versions of those mods for android
that is the game version. you need the mods its telling you to get, but you need to make sure you get the mod versions made for stardew 1.5.6. and again, please use #1272025932932055121 , this channel is for making mods, not help with using mods
Alr
Ooh I didn't think about using layers. That makes perfect sense thank you! I hope you figure out the problems you've been having š
It should be fine, the VSCode background extension has been updated, so I'll have my support crew now
https://www.nexusmods.com/stardewvalley/mods/4266 yay Hot Fix is done ^^
Hi, I want to make a mod with more grass variety like the older ones that use "more grass", but for cp that don't replace the blue grass. I've looked at this mod below for a template, and they only use 3 variations for each season, is there a way to use more than that? Could I just add a few more so that instead of 3, there would be like 5 or 6 in a row, or would that not work?
https://www.nexusmods.com/stardewvalley/mods/22018
i wonder how the grass plays with being extended, i'll look
mm yeah that's probably a c# thing not a cp thing
public const byte springGrass = 1;
public const byte caveGrass = 2;
public const byte frostGrass = 3;
public const byte lavaGrass = 4;
public const byte caveGrass2 = 5;
public const byte cobweb = 6;
public const byte blueGrass = 7;```
thank you, but I'm new to modding and don't know what c# means. I meant that, if it would be possible to extend the rows horizontally, like this, not vertically: https://imgur.com/L2yOzp7
I would put more variety where the red boxes are, do you know if that's possible?
someone who can read the actual game code in terms of where those sprites are would have a better answer for you, but i'm going to assume that it is limited to those 3 sprites
Hi! Does anyone know if you can create a furniture catalog via CP? Or is it only possible with Calcifer or FF? Thank you!
not with CP
CP can only replace the entire version of an asset in a location (ex : all orange trees), not make variation (ex : having one red orange tree and one yellow orange tree ok my choice of example is questionable)
AT can do that but i don't know how it behave with blue grass
Is there a way to dump the content of the player inventory in the console? I'm still having this issue where Farmer.addItemToInventoryBool doesn't seem to work
[mod build package] Copying the mod files to /home/dh/Library/Application Support/Steam/steamapps/common/Stardew Valley/Contents/MacOS/Mods/

Well, I found one of my issues: For Some Reasonā¢, adding stuff to a Chest.Items by using the [] operator sets their Stack to 0, so when the player picks it back up, the game goes "oh ok, yeah sure, I can add 0 of this item in the player inventory, no problem"
Ah, the ol' stack size oddities! Definitely run into a few of those.
oh wait, is it because of Farmer.reduceActiveItemByOne?
I can't do GetOne, because it returns an Item, not an Object...
Oh that explains a lot
GetOne, in the game, returns a new inventory-acceptable (this matters only for a handful of things like crab pots) instance of an item
you're getting your weird bugs because you let an instance be in two locations, which is a big no no
for GetOne, you can just cast it
Object copy = (Object)original.GetOne() and if GetOne is correctly implemented it should work
(if you're paranoid, I do
Object? copy = original.GetOne() as Object, then just immediately null check it and bail if null
Hello hello! I'm trying to make my NPC show up in beach sprite SPECIFICALLY ONLY during luau event (not outside of the event during normal schedules)
Does anyone know how to do this..?
Ok, so in the previous version I had:
Item item = Game1.player.ActiveItem.getOne()
if (item is not Object obj) return;
But I noticed that the method Farmer.ActiveObject exists, so I switched to this, but it was sceaming at me because getOne always returns Item, not Object. So now I reverted and that fixes my disapearing Furniture in slot.
HOWEVER the crash is still here when I try to place an item...
your crash is different and...that's a good luck have fun, ngl
something in some driver somewhere, do you have an art tablet plugged in, for some reason your computer has zero valid display devices all the sudden.
getOne always returns Item, not Object. So now I reverted and that fixes my disapearing Furniture in slot.
yeah, you would just have to know that C# doesn't support covariance in the return of an overridden function, lol.
this is a Major Ask tbh
that's why it's like that.
Item item = Game1.player.ActiveObject.getOne();
if (item is not Object obj)
worth it to know that Object is also the name of, like the, base class of everything, so I have StardewValley.Object aliased to SObject
I chose SVObject personally
nothing like this, I'm pretty sure the errors I get sometimes are caused because there's something hitting my computer in the face when the crash happens, potentially overwriting RAM or something like this
that does sound like the definition of "segfault", yes
It's not the first time I see a completely unrelated system break because of how badly the game crashed
!npc you have to use appearances
Keep in mind that making NPCs is a complex process that requires learning many different aspects of Stardew modding.
Here are a few links that can help get you started on all that you need to know:
-
Tiakall has a great tutorial on making a custom NPC for 1.6.
-
NPCs no longer use dispositions, check the wiki page for the new NPC data.
-
Aviroen has put together a template that will allow you to easily create a romanceable NPC.
-
Feel free to jump into the https://discord.com/channels/137344473976799233/1277457201077813280 thread for more interactive feedback and help!
Ok, I fixed the issue: I was DeepCloning a struct containing a Texture2D
and the SpriteBatch
damn, I guess I asked for it
I remember deepclones are begging for trouble
I think I went for it to make sure that my vectors would be cloned and not referenced, and since I was in the middle of the rework I couldn't test it straight away so I left it for later...
why are you deepcloning at all
Idk, I'm not familiar with structs
if I do MyStruct struct2 = struct1, does changing stuff in struct2 changes stuff in struct1?
no, that's a copy
nice
so, if I dostruct2.position += new Vector2(16, 16), does it change struct1.position?
Structs are also just permanently public too, right? Or is it different in c# 
no, because vectors are value types
I had to make everything in it public manually, so I don't think it is public by default
(yes, this is confusing.)
Ok, so I should be fine
this is why if you look into my code and there's a struct involved, all the sudden the nightmarish C# bits start showing up
like, it's SUDDENLY ref everything, CollectionsMarshal, on and on
If what I have is not fine, LynnNexus will tell me when testing comes
but yeah, you cannot deepcopy (in any language, frankly) unless you're basically dealing with a boring data-only class where you know exactly what it is in it
this is double-extra-special with Texture2d and ilk
Hey @desert vapor, just so you know: the crash I had was caused by me DeepCloning a struct with a whole Texture2D and SpriteBatch in it (every frame), so no need to spend time trying to fix it!
is there a save with perfection for testing purpose somewhere?
Can anyone help me figuring out schedules for 1.6? I have this super simple schedule:
"spring": "0 Custom_CuratorBedroom 6 7 3/610 Custom_CuratorBedroom 6 7 3 Curator_Sleep/0630 Custom_FishMuseum 15 47 2 Curator_work/2100 Custom_FishMuseum 23 47 0/2300 Custom_CuratorBedroom 6 6 3 Curator_Sleep"
}```
But I get an error saying that the map was not found? Log: <https://smapi.io/log/0992a5f6a8214692bfb9113ec99385c7>
Also not super sure how to do maps in 1.6  But I did it like this for the ``Data/Locations``:
```"{{ModId}}_CuratorBedroom": {
"DisplayName": "{{i18n:Locations.Aquarium.CuratorBedroom}}",
"DefaultArrivalTile": { "X": 15, "Y": 10 },
"CreateOnLoad": { "MapPath": "Maps/CuratorBedroom" },
"FormerLocationNames": [ "Custom_CuratorBedroom" ]
},```
Log Info: SMAPI 4.0.8 with SDV 1.6.8 build 24119 on Microsoft Windows 11 Home, with 35 C# mods and 30 content packs.
Suggested fixes: One or more mods are out of date, consider updating them
unless your mod id is custom, you need to replace custom by the mod name
(before maps were all prefaced custom_, but this changed when the 1.6 nation attacked)
so my schedule should be like this?
"spring": "0 {{ModId}}_CuratorBedroom 6 7 3/610 {{ModId}}_CuratorBedroom 6 7 3 Curator_Sleep/0630 Custom_FishMuseum 15 47 2 Curator_work/2100 Custom_FishMuseum 23 47 0/2300 {{ModId}}_CuratorBedroom 6 6 3 Curator_Sleep"
}```
(Would debug perfection work for testing purposes? Backtracking)
If all of your locations are entry'd with modid you tack it on https://github.com/Aviroen/Custom-NPC-Edelweiss/blob/46c09260c5f35c7120ef8422404a5f5c44a88639/data/Schedule.json#L9
Gdi mobile
yes! note that you don't neccessarily needs a 0 schedule in most case)
I found this one but I think from reading the post it's 1.5.6 perfection in preparation for 1.6 https://www.reddit.com/r/StardewValley/comments/1bf26r1/i_made_a_blank_perfection_file_for_16/ I use it for testing later game stuff but don't test specifically for perfection.
hmm I tried now it says: System.Collections.Generic.KeyNotFoundException: Required location '{{ModId}}_CuratorBedroom' not found. 
may be close enough Aba, thanks
oh yeah
you probably is loading the file?
not editing it?
tokens don't work in a load
Looks like this one might be 1.6? https://www.nexusmods.com/stardewvalley/mods/3814
so how do I write the name of the map? 
You can load a blank then editdata it so tokens work, or else writing out your modid instead of using {{ModId}}
Uniqueid_Locationname
This is just retextured hoe dirt I'm making for farm cave, not actual lava. They go on the terrainfeatures net dict
ModId is the same as the UniqueID in the manifest? Sorry it's been literal years since I've looked at modding 
good enough, thanks š
yes it's a shortcut
Yeah, but the {{ModId}} token is relatively new so don't worry about not knowing
but if the area you write this doesn't accept token you can write directly the whole ID
also nice to see you around š
i hope you're alright
hmm that didn't seem to work
Have you loaded a blank file for your schedule like EnderTedi said?
Tokens don't work in a Load CP action, so you have to load a blank file first and then use EditData to include your actual schedules
no I wrote the ModId manually
Then if you want to share your json we can have a look and see if we can spot anything else going on
!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.
This is my manifest: https://smapi.io/json/manifest/5f399d7bacaa442084f74124e03f8355
This is my content json that handles maps and other stuff:
https://smapi.io/json/content-patcher/657c712f89d94c9c8f588597ee228d59
This is my content json for NPCs and stuff (don't ask my why I have 2 CP mods lol):
https://smapi.io/json/content-patcher/94465d7bb4544cd6850d6bf9b19ed4dc
This is the schedule json:
https://smapi.io/json/none/7a45f5149ff44b2dbffbdd195b559757
do you have a log to go with the latest version?
oh right here
https://smapi.io/log/8604f4a334044cc7892d2341cc19c74c
Log Info: SMAPI 4.0.8 with SDV 1.6.8 build 24119 on Microsoft Windows 11 Home, with 35 C# mods and 30 content packs.
question, what is this schedule.json called?
Curator.json
i don't see it loaded/included anywhere
the fishmuseum map exists yet?
Won't the load be calling "assets/Characters/schedules/Curator.json" since it's not using targetwithoutpath?
oh that's where it is
You fixed one of the locations, but you have Custom_FishMuseum in the schedule, while the location is {{ModId}}_FishMuseum
ok the error i see in log is that yeah
the other locations don't throw errors so far
so it works, except the one you haven't fixed yet
(meaning you're making progress!)
oh right I missed one 𤦠Thanks!
Okay now the schedule loads properly
but one of my maps is still acting up 
if it's Maps/KayaRoom, from the error message you set up the tilesheet wrong, should've been in the folder your map was in when creating/editing the map, the tilesheet path should just be hime_outdoorfurniture, you can fix this by opening the map in something like notepad++, looking for the string Vanilla/Spring/hime_outdoorfurniture.png and replacing it with just hime_outdoorfurniture
No I fixed that one. It's the SpiritOasis. Log: https://smapi.io/log/131ad148c23c4597aec4e3e150d9041b
Log Info: SMAPI 4.0.8 with SDV 1.6.8 build 24119 on Microsoft Windows 11 Home, with 35 C# mods and 30 content packs.
The Maps/SpiritOasis load has a HasMod condition for MoreFish, but the location data doesn't, anytime the mod isn't installed the location will error because the map never loads, i'd suggest either putting the when condition on both or removing it entirely (i'd also double check the id for More Fish, i doubt it's just MoreFish)
Huh, that's certainly a unique id
Oh right, yes I remember seperating all modded maps to their own Data/Locations patch, was a nightmare. Guess I missed one
Thanks!
Plenty of older mods are non-conforming to modern naming convention
I'm not a fan of how maps are added with CP in 1.6 lol
tbh they had it first that's valid
it's because of the extensibility, customlocations didn't have the audio feature iirc
it has perks but, your mod doesn't really benefit for said perks, so it's understably more work
it still has backwards compatibility, but the long-run of it makes it easy to edit
(for mods with forages/fishes/artifacts spot it's really great to have this format)
I has a weird Idea i want to get to work... I want to make "events" you receive by mail with my new Investment mod. But I want to randomize the reasons. Clint's Blacksmithing Drops X points due to (Catching Clint stalking Emily) the () is the random thing and of course X is the value of points chosen.. how best should I do this?
successfully loaded Stardew Aquarium for the first time in 1.6 
(Note that you can load all your maps at once if the filenames match, instead of having one patch per map.
For example, this:
{
"LogName": "Load ExteriorMuseum",
"Action": "Load",
"Target": "Maps/ExteriorMuseum",
"FromFile": "Assets/Maps/ExteriorMuseum_Spring.tmx",
},
{
"LogName": "Load ExteriorMuseum Spring",
"Action": "Load",
"Target": "Maps/ExteriorMuseum_Spring",
"FromFile": "Assets/Maps/ExteriorMuseum_Spring.tmx",
},
{
"LogName": "Load ExteriorMuseum Summer",
"Action": "Load",
"Target": "Maps/ExteriorMuseum_Summer",
"FromFile": "Assets/Maps/ExteriorMuseum_Summer.tmx"
},
{
"LogName": "Load ExteriorMuseum Fall",
"Action": "Load",
"Target": "Maps/ExteriorMuseum_Fall",
"FromFile": "Assets/Maps/ExteriorMuseum_Fall.tmx"
},
...
Could be simplified as:
{
"LogName": "Load maps",
"Action": "Load",
"Target": "Maps/ExteriorMuseum, Maps/ExteriorMuseum_Spring, Maps/ExteriorMuseum_Summer, Maps/ExteriorMuseum_Fall, ...",
"FromFile": "Assets/Maps/{{TargetWithoutPath}}.tmx"
},
...
)
and my question has vanished 
i still see it
i must have a tiny screen xD
I didn't really draw attention tho lol it's a passing thing and I don't know who's on that could even conveive the issue
If you're doing it in C#, one quick option is to use Game1.random to choose the random value.
yeah.. i know that part.. but I need to create a mail message
i know how to make a normal one with C#.. but I want to assemble these events to be random
and also provided i18n xD
The mail message will be read from Data/mail at the point where it's opened. So you can edit the asset to have your new text, and that's what will be shown (as long as you don't need to support multiple instances of the letter with different values).
let me try to put the theory to practice
{Stock} {had a} {random Value} decrease due to {reason related to stock}``` The issue I am having is making this in a way where people can translate them to other languages
Okay so my next problem, none of my warps work now that names have changed. My old warps looks like this for example LockedDoorWarp 17 52 Custom_FishMuseum 1000 2100. But my maps are now called {{ModId}}_FishMuseum or Gervig91.StardewAquariumCP_FishMuseum
Is there an easy fix to this, or do I have to manually edit all my 43 maps with Yoba knows how many warps...?
you could test fate, open the folder in vs/notepad++ and ctrl+h--
yes they are all tmx files
yeah but make a backup
(i did that and it didn't end well)
don't use the token in tmx files too
(i did that and it didn't end well)
Could also just have a bunch of JSON with the warps instead
okay so open all the tmx files in a text editor and just mass replace all Custom_ prefices with Gervig91.StardewAquariumCP_ is what you guys are getting at?
open and terminal and type find . -name "*.tmx" | xargs -I {} sed -is "s/Custom_/Gervig91.StardewAquariumCP_/" {}
I think
(this is unixland bullshit btw, I'm runnign via mingw64 on Windows)
to explain.
find . -name "*.tmx" <- find all .tmx files in current directory or children
sed is basically a terminal find and replace
my recommendation, for nutty sed sequences like this, is to have everything in git beforehand
also I edited that like three times because I'm dumb XD
(This is a great time to make sure your maps are in Git; then you can easily see a diff of what changed to make sure it didn't replace anything unexpected, like tilesheet paths.)
yeah, I may want to tighten up that regex a bit.
If you send me a zip of your map files, I could do a quick find & replace for you since I have Git / Sublime Text already set up for that.
quick question, in marriage event, there's confettis i believe
someone knows if there's anim of them somewhere and where?
I really should move my mods to GitHub... I started modding before I learned how to git 
there's also like, a sed verbose mode iirc
i'm going to assume this cursed line of code means it's in cursors:
oh wow cursors ptsd just kicked in
this stuff?
are the confettis CC cutscene?
Oh pathos is the 4.2.0 version of modbuildconfig on nuget behind github?
maybe i mixed stuff š¦
Aviroen and I were trying to use the ContentPacks thing, but it only worked for me if I build it from source
Yep. I can release a new version if you need that feature now.
okay warps work again
but the Curator doesn't seem to follow his schedule? Just stays in his bed all day 
Thank, and it's not urgent, just release whenever convenient for u 
I have a release wave coming today, so I'll release that one at the same time.
unsure, i'm trying to dig into the 'celebrations' bit now
specificTemporarySprite ccCelebration this may be that yeah
still cursors, but i don't know how to read what index
thanks for taking the time to look then š
specificTemporarySprite wed
but be forwarned it changes the music too
Hello, is there a particular source for the assets which are available inside Stardew Valley (or for example, the wiki)? We've been working on a mod for quite a while and seems like we'll need a few assets from the vanilla game.
thanks! i just want to see the assets
!unpack
Follow this guide to unpack the game's content files in order to see and explore how the game data is structured.
It's helpful when making your own mods, or just to learn about how the game works!
Yeah only with those two mods (or SpaceCore)
so CC is the balloons and wedding the confettis
for some reasons i thought there were both together AND the confettis were colored
apparently none is true
Oh no got an error with the code for the aquarium
guess the 1.6 update will have to wait a little while longer
tis frowned upon here to upload the game's actual assets for public use, but you can unpack your own game to see everything #making-mods-general message 
don't care about the code now, take a deep breath, work on what you can, and see if someone can see what the code issue is and is willing to solve it (but C# of aquarium may be heavy)
surprised smapi didn't auto-fix for c# if it's map edits?
Yea MindMeltMax and Pathos helped me out with the C# a while ago. I reached out to Max again. But if anyone is interested, the AquariumSign doesn't work. When I went to go click an aquarium, I got an error and it didn't display the sign menu. ~~I don't have the 1.6 source unfortunately š ~~ (Apparently Max made a fork)
Only the old pre 1.6 repo: https://github.com/ChroniclerCherry/stardew-valley-mods/tree/master/StardewAquarium
Log: https://smapi.io/log/5d8e0edbd75648d3b68da57bc894f77b
Log Info: SMAPI 4.0.8 with SDV 1.6.8 build 24119 on Microsoft Windows 11 Home, with 35 C# mods and 30 content packs.
sign menu? is it just a regular dialogue box?
is there a source we can reference?
Is this a map tile action
(the C# is way more than map edit)
In case the conversation moved too quickly for you, this was intended for you: #making-mods-general message
yes, they are added to the map like this for example
There should be register tile action call somewhere
I edited my message with a pre 1.6 repo, doesn't have the edits max made tho š¦ repo is in the message now, 1.6 version should be in Max's fork
So if u didn't register u get key error for the dict
remote add name url?
yeah, that sounds right
i'm not seeing a difference between the fork and the src 
(Or use a nice GUI like SourceTree.)
ahhhh I'm old fashioned and lazy (is sourcetree free?)
Yep, and works on macOS and Windows. (It'll ask you to create an account, but you can just click skip.)
oh alright, thanks~
Hey folks, I'm finishing up an initial beta of the StardewUI framework (with StarML/MVVM) and I'm interested in any usage examples that people might like to see. I added a discussion at https://github.com/focustense/StardewUI/discussions/10 if any idea is too niche or long-winded for the chat.
(The brainstorm is not limited to users of the old framework, just anyone who's done UI, or even avoided doing UI for the obvious reasons.)
it's weird that the error thrown is inside the stardew aquarium code though. It also doesnt look like the tile property was triggered
oh I see what's going on
mkay I'm at the point where I don't understand how to do this ```json
"stockNameClint": "Clint's Blacksmithing",
"stockNameRobin": "Robin's Carpentry",
"stockNameSauce": "Queen of Sauce Show",
"stockNamePierre": "Pierre's General Store",
"stockNameJoja": "Joja Incorporated",
"stockNameZuzu": "Zuzu City Business",
"stockNameStardrop": "Stardrop Holdings",
"genericMailHadA": "had a",
"stockDecrease": "point decrease due to",
"clintFailA": "Clint dropping a hammer on a customer's foot.",
"clintFailB": "Clint oversleeping and missing deadlines.",
"clintFailC": "Clint caught stalking Emily."
aquarium is doing the 1.5.6 thing where you really want to use names, not ids
to keep things easy, let's use clint
BUT this is generally Not A Good IDEA tm in 1.6 since names aren't guarenteed to be distinct.
one second, let's see if I can just build a migration
@chrome mountain is this okay with you?
I don't know what that means? 
is this i18n? should be easy to pull them into mail, unless I'm missing something?
one second, I'm finding more issues
basically, in 1.5.6 because of JA, you never wanted to refer to the item's id number. You used the name instead
it's in pieces I have to be able to generate the message
but in 1.6, that's...not great, since names aren't distinct.
I'm seeing more issues, for example
the last donated sign directly referencing Maps/SpringObjects
and also doing sins to lists XD
Gervig, can you dm me the entire mod
(let me know if my permissions are set jank.)
I added some suggestions 
so you want to autogenerate mail to be sent instead of a static list of mails?
a fishing sea + penpals have all the things mentioned so it'd be nice to see how one would do those in StarML
You can use tokens in your translations. For example, you can have a translation like this:
"your-i18n-key": "{{Store}} had a {{Action}} decrease due to {{Reason}}."
And then get the rendered text like this:
string store = this.Helper.Translation.Get("stockNameClint");
string action = this.Helper.Translation.Get("stockDecrease");
string reason = this.Helper.Translation.Get("clintFailA");
string mailText = this.Helper.Translation.Get("your-i18n-key", new { Store = store, Action = action, Reason = reason });
Note that translations in pieces like that can be hard to translate due to grammatical gender/conjugation/etc, so you should try to make the tokens as small as possible.
(vin de orange?)
I will do my best lol
(I'm sorry.)
and that's something I needed
can I ask to have this DM'd to me so I can keep the reference without having to scroll up as conversations go about?
Natural language processing time 
Done!
I saw, thanks. I appreciate the general suggestions, though if anyone wants to add more specific examples (a screenshot, mockup, detailed description, etc.) then those would be even better. I'm especially interested in "this is a problem I actually had to solve/am trying to solve" types of things.
I have a issue with my custom building? for some reason i cant move it
Oh I did have something actually, sometimes a machine have a long list of outputs which get really wide
has anyone else had this issue?
For time being I just made a button that opens a modal with grid of outputs but I feel like a custom tooltip would look better
A custom tooltip feature is generally useful for making info about your mod available so it'd be good to have overlay based example for that
so the AquariumMenu there isn't even used, what is it meant for?
do you have a json? I havent really ran into an issue like that with buildings
ill grab it
this is the json
ive tried removing the collision stuff, still would let me move it. Ive changed the size of the building and the same issue continued
o.O this looks useful
to clarify, can't move as in moving it at Robin's?
hmm I see you defined HumanDoor as -3000,-3000.
182 languages 
that might be the issue
But wait not all of them have plurality
its the wizards place he builds it and the human door didnt cause this issue before the tree was working before hand. do you think a code change might have done something?
I know that as part of collision checks the game makes sure that nothing is blocking the position before the door
i actually have a lil warning now oooh let me see
the package presumably does nothing with them
(It uses the Unicode CLDR, which encodes metadata about languages like pluralization rules. In a language without pluralization, the token would still work but presumably the translator wouldn't need to use it.)
if you want to remove the human door you need to use -1,-1 specifically
though it looks like an animal house, in which case how would you enter 
you dont
obviously they're starting the revolt in there 
No boys humans allowed.
the animals dont need to be fed, its more like a jumino hut
see the thing is it was working before i dont know why it suddenly stopped šļø
as mentioned try setting human door to -1,-1
i am
selph thank you it was the human door
SUCCESS
the zoots spawn in the tree
these zoots are supposed to increase the crop growth rate once the tree has 6 occupants!
and you get a new zoot every winterstar
Wait then it takes 6 years 
i want to add a little greenhouse area to my farmhouse via a renovation. i added this code to my content.json, but i still can't till the soil or plant crops. any ideas?
"Action": "EditMap",
"Target": "Maps/FarmHouse2, Maps/FarmHouse2_marriage",
"MapProperties": { "IsGreenhouse": true }
},```
You need to make the tile diggable
i did
yeah its a end game feature, and i wanted it to not be op
i added those two properties to the dirt
Yeah fair, but I never played past year 4 ever
personally opinion but I feel like 6 years is way way past endgame for most people
usually, 'end game' when people completed everything and starts trying for perfection is around 3-4 years
I have also never made it past year 4
hmmm šļø ill talk to my coder friend
(speedrunners/year 1 perfectioners notwithstanding)
Maybe if u add a second way to zoot
And I play as slowly as I can manage
So if u work at it u can 6 zoot by year 3 or so
When you do lookup anything with tile props on what do you see?
Possible that renovation shenanigans is not copying the tile props
hhhm another way to get the zoots?
Get the raccoons to give you one every couple of requests 
That would be hard to do i think cause the zoots are born from the tree roots
(Have zoot requests, similar to fish ponds and raccoons?)
Yeah they are born in the raccoon tree so the raccoons are trying to get rid of them /j
how do i do that?
it could be a quest line
maybe u just get 2 zoots per winter star if you did crop rotation and didnt exhaust the soil with a mono culture of pumpkins
i see that the isgreenhouse property works but for some reason the tile properties don't seem to...
Ask your coder politely?
buildings can have chests in exterior. you can have like a special item that when placed into the zoot tree chest spawns a new zoot next morning
for request you could do unlockable bundles maybe?
You'd need to do that part in C#. Maybe have some logic which (a) detects when the conditions are met for the request, (b) decides what they want, (c) draws a bubble over the building like fish ponds, and (d) shows a donation menu on click.
not sure how you would do the 'add zoot (farm animal) as reward' part but i assume u got that covered
well if we're doing C# anyway there's like a thousand different ways to do this
ah, i think i know what the problem is. i didnt add the tile properties to the original tilesheet that the farmhouse itself uses. let me try doing that real quick and see if that fixes the issue
yep, that fixed it
I do like the idea a lot, but I would feel bad cause we just got the zoots working ;-;
If you want it to be less post-endgame, you could maybe...
- lower the requirement (e.g. 3 zoots instead of 6);
- or have each zoot increase crop growth by 1/6th, so you don't need to wait until you have all of them to benefit.
Then it's just a tweak to the existing code, instead of a whole new thing.
say did you math out some crop growth tables?
growth days are greatly impacted by break points where just 1 day faster means you get 2 harvests that season (until you get greenhouse anyways)
Since Pathos is here, I had a question about asset caching: SMAPI doesn't like us to repeatedly call IGameContentHelper.Load for the same asset in a single frame, but is that just because of the hash lookups or are there other performance drawbacks?
Well, I don't think it needs to be super finely tuned. Most players would be fine with just "X% faster" rather than carefully tuning harvest schedules.
So decidedly human set it to the first of every month instead. and the crops will grow 10% faster for every fully occupied tree
This is a joke that only Pathos is going to get, unfortunately, but it could be every... full moon. 
(Does it reset each time a moon is destroyed though?)
If not, it should!
"event_Joja_Loss": "Recent events from Joja Incorporated turned heads as the new Pelican Town branch failed due to mismanagement and a town-wide boycott. This action has stuck a chord on some stock owners and caused them to sell their stock, leading to a 300 point drop. The CEO of Joja commented that they took a hit on this venture but will recover from this embarrasment quickly.[#]Joja Price Drop",
"event_Joja_Win": "With the completion of the Joja rejuvination project, Management held a unveiling of the new Warehouse in Pelican Town.^ 'This building will bring supplies and sundries to Pelican Town and bring in the savings', Morris commented. This acheivement impressed shareholders and increased stock worth by 300 points! Competeing stock from Pierre's General Store has gone down 50 points. The owner commented, 'How in Yoba am I to keep up with a store that sells things at a loss?! I have quality goods superior to Joja Mart!!'.[#]Joja Price Rise",
"event_Robin_Home": "A Zuzu City Magazine, 'Home Living in the Country-side', reported on a home built in Pelican Town. Robin, owner of Robin Carpentry, built the house with the finest techniques and elegance of a master craftswoman. She was awared Carpenter of the Year and even sits on a 200 points increase in stocks. 'I can't even handle all the calls for houses I'm getting', Robin commented.[#]Robin's Skills'",
``` Finally going to put these in my mod.. I've been sitting on how to do them for a long time
^ awarded (typo)
It's cached deep down, but there's quite a bit of parsing/validation/processing logic between your Load call and the low-level cache. So it's much more efficient to just reuse the value you already fetched than to go through the whole pipeline each time.
thank you
Hello.
Does anyone know how to animate textures with TextureOverrides using SpaceCore?
I'm currently working with the guide, but I'm having trouble getting the texture to change, even though there are no errors and the patch is applied correctly when I check the summary.
Okay - I try to avoid the X/Y problem but sometimes it turns out to be a Y/X problem, so maybe I should just ask Y; if the alternative involves internally caching assets that are managed by SMAPI (and obviously, being very careful to check for disposal and/or invalidation before attempting to use them) and doing my own cache lookups by string, then is that still a preferred alternative to many (potentially hundreds) of Content.Load calls?
It's what I've been gearing up to do anyway, but I had a moment of "is this really a better way?" hesitation.
hold on a second...
Load action
(optional) When multiple patches or mods load the same asset, the priority which decides which one is applied. Default Exclusive.
[...] Avoid using Exclusive when possible
but it's optional! how can you tell me to avoid using something that is forced onto me in an optional field?
Pathos, what's up with these shenanigans?
In terms of performance, that will certainly be faster than calling Load each time. Whether it's worth the added complexity in your code really depends on how often you're doing it, what you're loading, etc. It may be worth measuring the performance impact in your specific case (e.g. create a naive cache and see if there's a noticeable difference with some basic StopWatch tests).
!json if you can post your code it could help
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.
Thanks, I'll do that.
Testing could be a little tricky since this only happens on binding frames, but I still don't want to be the cause of even a single jank frame.
say what is main difference between using IGameContentHelper.Load vs (LocalizedContentManager) Game1.content.load
i think ive only used the latter
for custom assets the Exclusive is what you want (so its not possible to avoid it), its basically saying to avoid loading into normal vanilla assets using Load without a different priority, instead of EditData, really
It's better to avoid Exclusive if a less restrictive priority works for your mod, but only you know how that'd impact your mod. SMAPI itself has no way to know whether your mod will safely work with a non-exclusive priority, so it defaults to the previous behavior which is the safest and easiest-to-troubleshoot option. There are also cases where it's the best option (e.g. loading your own mod assets, where other mods can edit but not load).
(or well exclusive is possible to avoid for custom assets but you probably WANT it since, its yours)
Everything that this file does, presumably: https://github.com/Pathoschild/SMAPI/blob/608c8fa34497aa35e9bf37fe71ab5c19e8fd3579/src/SMAPI/Framework/ContentManagers/GameContentManager.cs
Although if it actually replaces the game's own LocalizedContentManager then maybe it's the same.
I think the main reason to use IGameContentHelper is for its other functions, like invalidation.
SMAPI replaces Game1.content with its own type, so there's not much difference. The main differences when using the mod API are that (a) it knows which mod called the API for error handling, and (b) you have access to a higher-level API like invalidation.
(is GameContentHelper also your own cache?)
I believe one quirk of this is you have to match the size of the texture exactly
If you havenāt checked that, what are you animating?
This does not seem to be an error.?https://smapi.io/json/none/d390e24fd9ff46b7ae43bb83917595f2
My mod magic furniture uses spacecore animations
well no, I can simply put my UniqueID in the Target
(FlashShifter didn't set a priority for some of the 1.15 stuff, now I have to use EditImage; unnecessary patches š )
I didnāt use an internal asset key
I donāt know if thatās the issue
But maybe?
Iām not sure how internal asset key gets parsed and processed
putting your unique ID in your target doesnt prevent other people from Loading into your target with Exclusive priority
Yes and no. GameContentManager extends LocalizedContentManager and wraps its internal asset cache, and IGameContentHelper is a higher-level wrapper around GameContentManager. So essentially it's using the game's existing cache, though it has some extra logic around it.
Both Game1.content and IGameContentHelper use a GameContentManager under the hood, so they have the same caching mechanism.
I will look for Dr. Elizabeth MathPerson's mod and see what it says!
if they go as far as putting my ID in there target, that's deliberate
like they must have a reason for that
it is. thats the point of the Exclusive priority for a custom asset, to make sure that someone cant just overwrite your stuff like that, and that they need to go through EditData or EditImage
you can just allow it if you want by setting a lower priority, but like pathos said, only you'd know if thatd be bad or not for your mod, so thats why it defaults to giving you exclusivity
i just want to say that i search 'aquarium' on here nearly every day to check for updates, and i almost teared up when i saw this. thank you so so much for your work, i love this mod so much
Exclusivity is good for a framework mod's editable asset
I don't imagine it's terribly useful for textures
(and if I had to guess, I'd assume SVE's stuff would be purposely and deliberately set to Exclusive anyway if they thought about it)
If it is your spritesheet maybe
I'd argue exclusivity is especially useful for custom spritesheets. If you extend the spritesheet later, any mod which edits the older sprites via Load will now break your mod. Mods which just edited their image into the spritesheet area they expect will just leave the sprites as-is.
so here's what I got before I create the event generator. @ivory plume this is correct right?
From a technical perspective, that looks correct.
How do I get started making a mod? I want to make a very simple mod that adds a furnace recipe
!startmodding
Making mods can be broadly divided into two categories:
- Content packs are formatted text files, and don't need any programming knowledge. They can add/edit NPCs, maps, new items, shops, and more. To get started, see the list of framework mods, the wiki tutorial for Content Patcher, and there might be relevant guides on the tutorial wiki.
- C# mods use programming code to change fundamental game mechanics. See getting started with C# modding.
Usually itās easier to start with making content packs, since you don't need to learn programming.
you'll wanna look a t the Content Patcher stuff
welcome to the modding scene :3
!unpack you'll also wanna do this to look at the games content
Follow this guide to unpack the game's content files in order to see and explore how the game data is structured.
It's helpful when making your own mods, or just to learn about how the game works!
that reminds me.. i haven't unpacked the game again since after my HDD failure
i've been so depressed and disheartened for a bit
furnance is a machine, so take look at this page https://stardewvalleywiki.com/Modding:Machines
That is... intimidating
dw most of these fields are optional
Just take it step by step and it gets easier
if u want u can describe what the recipe should do to us
@chrome mountain what's the custom crab pot logic for?
I did my first CP patch by looking at a similar mod
Could you please tell me the name of the mod?
I couldn't find it...
It's called Magic Furniture. https://www.nexusmods.com/stardewvalley/mods/10142
(Thanks Abi! Thatās the one)
I think we just made them work like the ones on the beach?
okay! It's possible to do that with data assets now
the question I had is because it's actually not quite the same logic rn.
it looked like it was trying to be an extra roll or something
but got it, thank you!
hi elizabeth! 
Thank you! I'll do research!
didn't the i18n generator have a GetByKey thingie?
Make sure you're using the latest version (2.1.0, not 2.0.1)
:pufferthink:
The Magic Furniture animation is still working correctly today, correct?
I'm experiencing a strange problem...
I installed it and the animations are not working in my environment...
I have tried reinstalling SpaceCore but no change.
Hmmm...
Hmmmmā¦what other mods do you have, and have you checked the configs?
Last I checked it was working
Itās possible something broke
Ahhh! I found the cause!
I set the language setting to English and now it animates.
Is this the same glitch as the content patcher animation? I wonder if this is the same glitch as the content patcher animation...
Too bad it doesn't animate when you set your own language...
hm maybe if you load to the localized targets too
but i thought content patcher does that by default
I just noticed this interesting extension in the game's decompile:
public static int RemoveWhere<TKey, TValue>(this IDictionary<TKey, TValue> dictionary, Func<KeyValuePair<TKey, TValue>, bool> match)
{
if (dictionary.Count == 0)
{
return 0;
}
int removed = 0;
foreach (KeyValuePair<TKey, TValue> pair in dictionary)
{
if (match(pair))
{
dictionary.Remove(pair.Key);
removed++;
}
}
return removed;
}
Is this not going to throw an exception every single time it actually matches an element? You can't modify a dictionary while iterating it.
NetDictionary has its own bespoke implementation that does not look broken at first glance; it seems the only place the above extension is actually called from is MineShaft.yearUpdate, which only happens at the end of each in-game year. I suspect it either never matches anything, or it's bugged and something is swallowing the exception.
The original code may provide more context:
/// <summary>Remove all elements that match a condition.</summary>
/// <typeparam name="TKey">The dictionary key type.</typeparam>
/// <typeparam name="TValue">The dictionary value type.</typeparam>
/// <param name="dictionary">The dictionary to update.</param>
/// <param name="match">The predicate matching values to remove.</param>
/// <returns>Returns the number of entries removed.</returns>
public static int RemoveWhere<TKey, TValue>(this IDictionary<TKey, TValue> dictionary, Func<KeyValuePair<TKey, TValue>, bool> match)
{
if (dictionary.Count == 0)
return 0;
#if NET5_0_OR_GREATER
// On .NET 5+ platforms, we can safely remove dictionary keys while enumerating.
int removed = 0;
foreach (var pair in dictionary)
{
if (match(pair))
{
dictionary.Remove(pair.Key);
removed++;
}
}
return removed;
#else
// On .NET Framework platforms, any dictionary change while enumerating will throw a 'collection was
// modified' exception. Initializing an empty list is faster and uses less memory than using ToArray/ToList
// to clone the collection.
List<TKey> keysToRemove = new List<TKey>();
foreach (var pair in dictionary)
{
if (match(pair))
keysToRemove.Add(pair.Key);
}
foreach (TKey key in keysToRemove)
dictionary.Remove(key);
return keysToRemove.Count;
#endif
}
Huh, that's wild, apparently you can remove from a dictionary while enumerating now. I just checked and it was broken in .NET 4.7.2 but seems to work since 5.
Guess that explains the conditional symbols there.
HMmmMm it must think the texture in other languages has -ES or whatever ending
@next plaza seems like spacecore animations have something weird when translated? I canāt look now but if itās still wonky Wednesday Iāll have more free time
Sorry when game lang isnāt English
Not when translated
I tried everything, but the animation still didn't seem to work properly in non-English...
I'm getting sleepy, so I'll leave you to it.
Thank you for all you have taught me!
Hi, uh, I have some problem with the game's serialization. I want to have a customized item with some customized use action handling method. Originally I subscribe the button pressed event to handle the use action, but I think this is too ugly, and I have received some bug reports saying that sometimes my items cannot be used correctly. Thus, I decided to subclass Object and register it as a new item type, so it is more convenient to handle use action. Also, I can store my data directly instead of serialize it and put it in mod data, and I can customize how the item is drawn too. However, the problem is that the game can not recognize my item type, so it crashed when saving player's inventory because it don't know how to serialize it. The error message suggests to use XmlInclude attribute to specify the type, but the problem is that XmlInclude is used in Object class, which I cannot directly modify. This is a lite mod so I don't want to introduce harmony, beside, I don't think harmony can modify attributes either. Is there any other ways to let the game recognize my item type? or I shouldn't create the new item type at first?
You would need to register it with SpaceCore if you don't want to do your own serialization
howļ¼
are you sure you want to subclass Object
?
it sounds like you are making some kind of custom tool
ah so like a tool with it's own inventory?
no, like a zip file
thank you, I am going to try that
either serialize via spacecore as someone else said, or remove your custom types from the game on save and put them back in on load
@ivory plume I'm slowly going through Aquarium now apparently and doing a more through update to 1.6. My branch is here. https://github.com/ChroniclerCherry/stardew-valley-mods/compare/master...atravita-mods:ForkedFromCherry:Aquarium-1-6-migration Do you want me to do continuous, slow PRs?
Smaller scoped PRs are definitely preferable. If you plan to do some ongoing work on Stardew Aquarium, I could review & merge MindMeltMax's changes so you can submit normal PRs to the main repo.
I forked off of MindMeltMax's for now
and ongoing is overselling it, more like "comb through for now"
I am so confused by this, there is nothing different between this and any other mod I have made but some reason it just cannot find the asset no matter what
!log pls?
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.
(also having intendation may help readability)
(please also show your content.json with your Loads for your assets too)
Right sorry I was mostly ranting but give one second andI'll pull that for you
(i perfectly get ranting, but fresh eyes help too š )
Log Info: SMAPI 4.0.8 with SDV 1.6.8 build 24119 on Microsoft Windows 10 Home, with 2 C# mods and 1 content packs.
where are you loading your Mae.FarmAnimals/objects asset?
minor issue but it's enough to drive me nuts...
so i got some dirt in my farmhouse from a little greenhouse area. when i walk on it, it sounds like dirt, as it should. but when i walk off it, my footsteps still sound like dirt instead of the usual thud of farmhouse floors. is there a way to fix this?
Oooooh I think see what I did
i had that too on my outdoor map, i think its because the dirt tiles have "Dirt T" in the tilesheet
you can make it diggable without making it dirt
wait it was "Type Dirt" not Dirt T lmao
but anyway
you can make the surrounding tiles Type Wood which would change it back to the wood sound, I believe(idk if you solely use vanilla tiles or w/e tho)
Man, I got so hyper focused thinking there was an issue elsewhere that didn't ever think of that
Thanks everyone that tried helping yesterday and today ā¤ļø
TBH I probably jinxed it
Is there a way (or a framework that adds a way) to have the player interact with a building tile and receive an item? I've tried doing action AddItem in a map string but that doesn't seem to work
SpaceCore allows trigger actions on tile/touch actions
though you can also show dialogue and have the dialogue add an item?
no need for spacecore with that method
Show dialogue?
Oh wait, now I see the action dialogue option in the modding wiki, never seen that before lol
wasnt there something with tile action dialogue not doing dialogue commands right or am i misremembering
probably, idk lol
if that doesnt work then you need spacecore
I'll try that and if that doesn't work I'll see if I can figure out how spacecore works lol
i thought it was somethin brought up a waaay back and might be fixed in the 1.6.9 beta
I'll try it and report back, if it doesn't work then I guess I'll either wait till November or start finally learning how spacecore works lol
Thanks!
Is there a regular console command to invalidate some/all assets or is that a CP feature only?
I recall a discussion regarding the lack of console commands for that functionality
you can reload a CP mod, and I think that invalidates any assets it touches? forgot there's a CP command for this
I think itās just patch invalidate with CP or asset_invalidate with SpaceCore
Nothing with SMAPI / ConsoleCommands itself
Hmm, I guess that makes sense
Remind me in 3 hours to look into that
...mmmm I just wrote that down in a database marked for deletion...eh it'll probably be fine (#6285145) (3h | <t:1728258066>)
Alright, guess that means I have to add my own.
Yep, action dialogue doesn't currently seem to like trigger actions lol
I thought that was what it was for
There was something broken about it, but I can't remember if it was that the action has to be at the start of the dailogue or something else
Or maybe it just specifically doesn't like being after a break
I can keep trying different formats, maybe it prefers mail format (%) or needs to be somewhere else in the string
Doesn't have any breaks currently
It might be fixed in 1.6.9 but I could be mistaken
@chrome mountain I'm setting up the Stardew Aquarium C# code so it can be updated, which includes retroactively creating the release notes. The Nexus page is hidden; could you send me a screenshot of its changelog and Files tab so I can use that info for the release notes?
Ah yeah, found the previous convo, it is indeed fixed in 1.6.9 and the issue is putting it after a break apparently
i believe for the tile action it's having it at all that doesn't work
Oh I thought this was dialogue
break, no break, it breaks
yeah i think that break thing is a separate issue
I thought tiles didn't have an action thing
action dialogue is a tile action
and trigger action doesn't work in action dialogue
lot of action in all this :p
Oh lmao
i sent a repro pack to pathos back then, no idea if the issue was easy to fix (i don't think i saw anything about it in changelog yet)
I guess there's always SpaceCore if it doesn't make it into 1.6.9
This is the latest iteration I've tested:
{
"Action": "EditData",
"Target": "Strings/StringsFromMaps",
"Entries": {
"{{ModId}}_Test1": "Testing testing.#$action AddItem 199",
},
},{ "Action": "EditMap", "Target": "Maps/Mountain", "MapTiles": [ { "Position": { "X": 61, "Y": 37 }, "Layer": "Buildings", "SetProperties": { "Action": "Dialogue {{ModId}}_Test1" } }, ], },
I've tried other formats but nothing seems to stick. I'll probably just wait till 1.6.9 is out and give it another shot
Thanks! Any chance you could copy & paste that changelog too? (You can just stick the text on smapi.io/json and post the link here.)
But the changelog isn't json Pathos! š±
It could be, if you put " at the start and end!
Thanks!
last update for the aquarium... it's been a hot minute
anything can be invalid json!
Everything is json if you ignore the warnings/errors
and we use smapi website to send invalid json alll the time š
Ugh, I had already solved this stupid diagonal controller interaction is bad issue, just didn't copy my code properly between projects
aquarium update: events work now 
edit: Some events work now curse you Custom_ prefix
Hi guys! i'm trying to put the minecart on a custom farm, but it gives me errors, where do i go wrong? {
"Action": "EditData",
"Target": "Data/Minecarts",
"TargetField": [
"Default",
"Destinations"
],
"Entries": {
"Kana.NaturalMiniFarm": {
"Id": "Kana.NaturalMiniFarm",
"DisplayName": "NaturalMiniFarm",
"TargetLocation": "Kana.NaturalMiniFarm",
"TargetTile": {
"X": 7,
"Y": 9
},
"TargetDirection": "down"
}
}
},
The Farm is maybe just Farm
Yeah the location for your farm for minecart networks is just Farm, your edits to add the physical representation of the minecart to your map would be to the custom map you loaded
Assuming you don't just do it in Tiled directly anyways
In Tiled I put the minecart.
Also FWIW, you can put spaces in Display Name, as that's the actual text that will show up in the minecart menu
Thank you! now I will try
You can use the actual farm name set by the player
"DisplayName": "[LocationName Farm]"
Oh a base game thing huh, interesting
ofc u can use i18n here too
@chrome mountain To keep the versions in sync, will the next Stardew Aquarium version be 1.5.5 or 1.6.0?
2 years is about right for most mods, don't worry about it š„Ŗ think of all the happy users that didn't have to go through updating their modlist
most of my mods, anyway
1.6.0
did you intend for your minor versions to match the game
Need to release nine bug fix patches to match the game now.
gervig quick, release it on consoles. save the masses
only nine? 
Thanks guys!! it worked š <3<3<3<3
(Pathos, I'm putting a lot of trust in this reflection based ClickableComponents finder you have.)
I don't mess with SMAPI, that will be someone else's problem 
it seems to work alright, just make sure your components are public, and your menu has a list<clickablecomponent> for it to find
I seem to recall that code was rewritten in 1.6.9 to handle subclasses, though it's been a while.
List of Lists seems like it won't work from the code
i doubt your average instance check would go for a specific type right, and surely it'd be the desirable behaviour
lists aren't co/contravariant
ah i see
I don't know if this is the right place to ask this question, but I often get this message when starting a game and SMAPI terminates.
What does this mean?
I've been getting that too, but it always closes before I can get a look at it and it never goes to the log
loc just has this for gamepad nav: https://github.com/b-b-blueberry/CooksAssistant/blob/feature/sdv-1-6/LoveOfCooking/Menu/CookingMenu.cs#L344
mystery harmony error 
add everything to some list after assigning ids, called from the constructor, before calling the populateclickablecomponents method
It's also been really inconsistent so I haven't bothered with it lol
you can try removing all your mods, restarting game, then putting them all back
oh that is nice. but also im not going anywhere near my gamepad nav implementation haha
it works. it does not not-work. i trust it to keep working.
Yes, yes. That's right. I'm in trouble.
do not š
Sounds like break time :P
After several attempts, it started up normally.
The next time it happens, I will try to delete all the mods once and work on undoing it!
omg don't even look at collections page behaviour, let alone question it
horrifying class
Oh oof, I've never had to try starting it back up more than once so far
Because suffering /s
clearly simpler than having several competing maps of bools as in the bundle logic
Anyone know anything about setting tiles on maps to be NPC accessible? I am trying to add a custom NPC to the withch hut but they are unable to move anywhere within the hut. I know how to replace tiles in maps I just dont know where to access the property that allows NPCs to pass
npcs can use map property warps and tile property doors, but not tile action warps. im not sure if the witch hut is included in pathfinding though?
alright I can look into what kinds of warps are present on the map, thanks. I know NPCs only pathfind through certain town maps, so maybe I need to set multiple waypoints to get through the witch hut?
pathfinding behaviour is beyond me, so i won't say anything more š
thanks for the help!
@calm nebula I just merged MindMeltMax's Stardew Aquarium updates into the repo with some fixes, so there's a few conflicts with your PR. Could you rebase your changes onto the current repo?
Likely the issue is that there's no NPC warp into the swamp so the pathfinder never goes there
The only warp into it is a player only one
Surprised that none of those maps are marked as excluded for NPC pathfinding
There's also no warp to the warp cave from the swamp map
This is typically not something to worry about if you make content packs, but if it only happens to you and not to other people then itās a sign to worry about your computer
Oh wait yeah there is lmao, it's in the water There's actually a warp in the water of the swamp that goes to the railroad (maybe in case you somehow end up in the water, which you can do if you ride your horse into that area somehow)
Itās an error that means a C# mod is doing something bad if itās consistent across computers
I will try to successfully rebase
this may take a few tries
perfect, ill look into the warps to and from the swamp, thanks
the warp cave? is this a new location or a convenience for npc pathing
it's not telling me there's conflicts?
The cave that leads to the WitchSwamp is called WitchWarpCave
ah right. i think i played the game once and that wasn't on the farm so
Glad we didn't forget this part.
I'm so sory
looks like classic modding to me
so some of this stuff isn't going to matter - I'm moving LegacyFishPatches out of Harmony and into data, for example
Feel free to submit smaller PRs for general refactoring/improvements before the actual fixes; I can review and merge them today.
sorry!
No worries! I can review one big PR if you prefer, though smaller PRs are easier.
Reverted commit 'blah'
You know waiting Marnie to tend her shop to test my custom animals has made me realize what a horrible fire hazard the left room is
And it's right next to Jas's room to
okay, successful merge conflict resolution. Hopefully
now to get it back on my computer and start with the de-harmony-ing
Not to deflect from Marnie being a terrible guardian, but you can use debug ws Marnie to warp you and her to her shop area
Oh thanks!
you can also give yourself that book
I keep forgetting about the books
I totally forgot to build this mod for 1.6.8 but apparently it works okay so that's good
Also wow, I don't usually spend much time in their place, but yeah that room is actually insane
Right? Like what the hell Marnie
@fiery cobalt You leveled up to Cowpoke. You can now speak in our voice channels and share images in all channels!
Where's the Marnie's house burns down and you have to help her build a new one and teach her proper fire safety mod
its ok these r all decorative plastic hay bales
Hey I have a farm with my girlfriend, but I want to get into mods again in single player. Is there any easy way to have my modded single player farm without bringing them over to co op? One idea I had was maybe having to change the launch option every time from my mod folder, but that seems tedious.
The fact Jas's room is right there also blows me away
You can use something like Stardrop
If someone has to sleep next to fire hazard room make it Shane
Though I don't like mod managers so I'd probably just rename my modded install of the game, install a vanilla version and swap back and forth as needed
Technically similar to what I'm doing currently for the beta lol
If anyone was likely to set off fire hazard it would be drunk Shane though
if anyone was likely to intentionally start a house fire it'd be the kid tho
Button has a great image on CMCT that seems highly relevant for that
i think i can imagine š
@blissful panther I sent you a DM to talk about something I cannot talk about here
I rename mods folders
Itās a pretty quick swap
āMods (farm name or purpose)ā when not in use
āModsā when in use
Yeah, I suggested whole install because I dunno how completely they wanted it to be vanilla
I label mine like [Crops] [Fishing] [Animals]
Completely empty mods folder should be identical to vanilla
I have subfolders inside the Mods folders often
I admittedly often play with the basic SMAPI bundled mods when playing vanilla MP
Never had a problem
(I just go by the honor system and donāt use any console commands)
honor system, eh?
@ivory plume okay, merge conflict resolved.
really silly questions time - how different is the android shop menu?
because I'm pretty close to wanting to move the custom shopmenu logic to a OnPurchase delegate
that IS in android, right???
Wait is atra modding?
(didn't want to draw attention to it in case it snapped atra out of it)
Helping gervig with aquarium issue
(I foretold this. Not the aquarium, the modding.)
Atra's grand return, starting small with aquarium issues
It wasnt mean at a contradiction š
i foresee in your future..... git conflicts.. so many git conflicts š®
rebase merge conflicts are great
Why not just do merge 
NO LONG TERM MAINTENCE
I was wondering about this apparent un-retirement.
it's not really, I've done one-offs for people, but it's limited in scope to one-offs
an actual return would be me maintaining my own mods again, which lolllll no
yall need to update these mods no cap.
I was thinking for this hot reload business that it might be more useful to just monitor the file system for changes instead of relying on a console command, but is that sort of thing discouraged? It probably involves creating a FileSystemWatcher that sort of cheats the boundaries of IModContentHelper.
I imagine it would work though. Don't know about performance.
For what it's worth, I plan on doing that for a CP PR that Pathos already approved the idea of
My modding energy has just been low lately
(For this PR, it would be an opt-in command - like patch watch mod.id or something)
Hah, interesting... OK, if it's going to get added to CP (or might get added) then that sounds safe enough for other mods.
(Not always monitoring it for everyone with every mod installed)
Fair point. Since the entry point for this is via SMAPI, I think I can let that be an argument instead of a separate console command. Then modders can either set it to true manually while developing or just put it behind a debug flag.
That makes sense and would be convenient. It's similar to what I do for making the reload command for MMR monitor my VS folder instead of the mods folder
Doesn't it still need to get copied to the mods folder in order to get loaded by the content manager?
Or do you actually change the asset loader to load from an arbitrary FS location?
It's just my content engine stuff, not textures and things
Though I've contemplated that as well
what is the behavior if you change file while menu is open
(My content engine stuff doesn't use the mod content helper since it doesn't have "load a raw txt file")
It should update while the menu is open, that's the whole point of a hot reload!
Make a change and see it on screen immediately.
(Yeah, I had to Harmony-patch SMAPI for that part)
Ah, I remember that being discussed a week or two ago
ah like serving a node.js app then 
Didn't realize this was for the same thing
What was interesting is that a few days ago I ran across an old changelog comment in SMAPI implying that HandleUnknownFileType was meant to be patched... even though it's private.
Yup. I want this partly for myself, but I think it's an attractive feature in general. The whole hot reload thing is already done, it's just a matter of invalidating the asset.
(The whole class is internal, so making the method public wouldn't make any difference for patching it. But it's much easier to patch a modularized method than to transpile something in the middle of a larger method.)
yeeees isn't it 
but if its meant to be patched how come it doesnt just accept delegates through some api?
Casey, you've seen the code for ShopMenu on Android and I haven't.
is the OnPurchase delegate there
Looks like it
sweet
I can't really make sense of the logic here and it'll be so much cleaner to...not menu and just use ShopMenu, thank you!
@next plaza: look into that (3h ago)
Yes, it only needs a prefix, so I guess that's a bit easier. Although it has to be a skipping prefix, so...
Because it's not part of SMAPI's public API, which is much more controlled. Many parts of SMAPI's internals are designed in a somewhat modular way that lets mods patch them if they really really need to, but patching SMAPI definitely isn't a recommended practice. It's just more stable to have mods prefix/postfix specific small methods than to transpile critical parts of the SMAPI internals.
Remind me in 6 days to look into spacecore animations not working in other languages and the 0-schedule fix breaking marriage schedules
uhhhhhhhhhh oh yeah k i'll probably remember (#6285431) (6d | <t:1728776650>)
hey, im new to this server and mainly joined to get help with something
i heavily modded my female farmer sprite but it shows up like this ingame
any idea why?
is this a mod you are making
Maybe it's tooting my own horn, but I think I qualify as really-need in this case. It was kind of an epiphany to even come up with a possible way to build entire UI over an API boundary.
i guess so, currently just trying stuff out though
(not that I interpreted your comment as hinting otherwise... just sayin')
this kind of 1 color block usually means you loaded the texture wrong
or didnt load big enough image so the draw is going outside
!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.
ahh so theres limited space for the sprite?
no like, game expects farmer base to have these frames/sprite index
if you unpack game u can see the vanilla version, that is what u should be matching to
can we see you rspritesheet
sure
also its nice to test with small mod list, can use mod groups for that
im not fully sure what you mean by this, but i made sure to test on the og game and not the smapi version so no mods get in the way
See this link for how to load different mod groups: https://stardewvalleywiki.com/Modding:Player_Guide/Getting_Started#Can_I_have_different_mod_groups.3F
this is a way to have smapi use a different mod folder than the default Mods
i previously modded my sprite but it was less intense than this version, and that one worked
assuming you're on the steam/gog version to have smapi and content patcher up to date, repacking xnbs are heavily discouraged because any little patch that the vanilla game does, will break your mod
any other mod, has the potential to break your mod
red, eh?
what's your eye color and sleeve color
or I guess shoe color?
is there a stats CP token?
there's the gsq: PLAYER_STAT 
I think for CP there's just the ones added by... Esca?
gsq may not work here, but I can just Add One TM
the question was more or less "does atra need to do it or does CP have it already"
swweet
by the way, the color of the block is entirely dependent on the shirt color for whatever reason
yeah, okay, sleeves
Hot reload is almost working perfectly except that the game's update loop doesn't run when the "window" is not active, which is annoying to my perfectionist tendency... is there any part of the game loop that does run in the background? (Other than drawing, obviously)
Probably equally useless, sound?
my assumption is that you deleted pixels 256, 257, and 258
I should probably just not go down this rabbit hole, but I'd really like to see the change on screen without having to click or alt-tab back into the SDV window. It's just... nicer.
Yeah, probably don't want to hook into the sound loop for that either, haha
I would love if SDV had a proper run in background functionality lol
what if you make it a chat command
wat
see these pixels in the corner?
you deleted them
this is how the game knows how to recolor your skin to match your chosen skin color
the three pixels starting at 256
so it's trying to color the background instead
as I said - boots, sleeves, or eyes
ill put them back and see if it works
atra was the chat commands this mod https://www.nexusmods.com/stardewvalley/mods/28325
is this what you want or were you thinking of something else?
or something a mod can register for use
Yes, good timing, I just found the same thing and it does exactly that.
Of course now my problem is that FileSystemWatcher fires while the file is still being written (ugh).
- It's just in https://www.nexusmods.com/stardewvalley/mods/19458
- It's..actually just reflecting into SMAPI
But I think I can work around that, kludgily.
Chu, are these questions about commands directed to me? Because if so, I don't understand the connection at all. Not sure if I should, or if it's an unrelated conversation.
kind of? the original thought was that there is way to enter commands through the in game chat box, eliminating switching away from game
but then i wasn't sure about atra's impl so i asked atra about it
I'm not sure what you're picturing, but you pretty much have to be in a non-game window to edit the asset that you want to hot-reload.
unlike the rest of you fools who copied that, I do know what it does.


