#making-mods-general
1 messages · Page 316 of 1
I have discovered how to make a custom incubator would yall be interested in learning
(Feel free to post it! Could be useful for anyone looking to do that later.)
Can you...
- load the save;
- enter
patch summaryin the SMAPI console window; - and post your new SMAPI log via smapi.io/log?
Log Info: SMAPI 4.2.1 with SDV 1.6.15 build 24356 on Microsoft Windows 11 Home, with 95 C# mods and 161 content packs.
Suggested fixes: One or more mods are out of date, consider updating them
Seems the map file is failing to load:
Unhandled exception applying patch: Simplest Farmhouse Adjustment > EditMap Maps/FarmHouse1.
[...] Unable to load map with file path 'C:\Users\alexj\AppData\Roaming\Stardrop\Data\Selected Mods[CP] Simplest Farmhouse Adjustment\assets\SFarmHouse1.tmx'
[...] Could not find a part of the path 'C:\Users\New folder\Maps\bathhouse_tiles.tsx'.
There's some weird stuff going on with your tilesheet path; can you post the SFarmHouse1.tmx file here?
oh...I was just messing with it with the kitchen standing point thing
but it wasnt loading before that
The issue is that the tilesheet paths look like this:
<tileset firstgid="3217" source="../../../../../../../../New folder/Maps/bathhouse_tiles.tsx"/>
You can't use ../ to traverse the filesystem that way (normally SMAPI is supposed to have an error for that, but maybe it's not working for .tsx files). You need to copy the tilesheets into the same folder as the map file, and reference them from there.
i just realized i dont have the tilesheet in the folder because i used the vanilla bathhouse tilesheet for the bathroom
should I move a copy from the other vanilla tilesheets to the folder too while im at it?
@umbral plume You leveled up to Cowpoke. You can now speak in our voice channels and share images in all channels!
You'll need to do it for all the tilesheets referenced by the map. I suggest adding the dot for vanilla tilesheets, as suggested by those steps.
!tilesheetclimbing
When creating or editing maps in Tiled, one common error is tilesheet climbing, marked by red text containing "invalid tilesheet path '../../..'. This is caused by SMAPI not being able to find the tilesheets needed by the map file. To prevent this error, make sure that you have a copy of all necessary tilesheets in the folder containing your WIP tmx file. Copies of vanilla tilesheets can later be deleted, but must be present while working on your map.
If you get this error with a completed map, an easy way to fix it is to open your tmx file in VS Code or a similar text editor, find all of the places with <image source=, and remove the filepaths to so that only the tilesheet names remain. For example, if the code says <image source="Content (unpacked)/Maps/townInterior_2" width="512" height="64"/>, change it to just <image source="townInterior_2" width="512" height="64"/>.
ooohhhhh yeah makes sense, i had the maps with the tilesheets when i was making them but then i moved the maps into the mods folder to test it
-# DH when grandpa's tiled
using the c# players guide to refamiliarize myself with c# and im having so much fun making silly console programs
Log Info: SMAPI 4.2.1 with SDV 1.6.15 build 24356 on Microsoft Windows 11 Home, with 95 C# mods and 162 content packs.
Suggested fixes: One or more mods are out of date, consider updating them
I've seen tilesheet climbing errors so many times in here... And yet I know for sure that it will happen to me as well the instant I try to make a custom map!
it's a rite of passage
I thought I cleaned the climbing errors out T_T
for future ref can you get a smaller log pls
smapi log?
yea run less mods when you test
itll be easier to figure out why it no work when less variables are involved
anyways going by the trace logs none of your edits were tried
Log Info: SMAPI 4.2.1 with SDV 1.6.15 build 24356 on Microsoft Windows 11 Home, with 95 C# mods and 162 content packs.
Suggested fixes: One or more mods are out of date, consider updating them
i wonder if the cellar mod is conflicting gimme 5 to try it
for reference this is what edits applying look like on the trace log https://smapi.io/log/ee99eab1a8214cb78a5672eef72b35d0?Levels=trace~debug~info~warn~error~alert~critical&Filter=Distant Lands - Witch Swamp Overhaul
Log Info: SMAPI 4.2.1 with SDV 1.6.15 build 24356 on Microsoft Windows 11 Home, with 95 C# mods and 162 content packs.
Suggested fixes: One or more mods are out of date, consider updating them
learning about prefix and postfix notation. feeling very intelligent up in making mods general tonight
soon i will make more c# mods
its time to choose lani
math in the smapi console coming soon
will you be harmony.Patch manual gang or harmony.PatchAll annotations gang
i am barely learning how to do math in c# please idk what a harmony is 💔
ah do you mean prefix and postfix like
all i know is that it can break things bigly
debug addmoney 2+1e or something idk
- 1 3
5 2 +
yeah me too
there is a right answer btw
ok i got to chapter 10 tonight, its slepy time
chapter 10 starts with if statements omg guys.... we are almost to object oriented programming
random q: why does my code want everything to be nullable
well u enabled them
it's generally a good thing to have compiler precheck nullable stuff
if u disable these u get hit by it at runtime 
ok true
ofc game itself is not consistent about it either
i just didnt know if the random ? was normal for everyone else
so sometimes a Item can be null and u gotta deal
if u dont like it u can turn it off and ill just go be sad in a corner
i dont want you to be sad
happy to learn you use PatchAll too 
if you make a variable and dont immediately assign it the ide will tell you to make it nullable
because it's just correcter™️
so true
(the actual right answer is of course "both" and im very confident everyone will agree on this of course)
the one time i used annotations i did it by accident and used it in the attribute class form
what's wrong with that
well it worked but i was basically call CreateReversePatcher
getting the patch processor used for annotation mode of reverse patch
Hey, I am new here and still learning - but I had a question about Harmony. I've been looking into it since it is a last resort to patch a mod, since reflection isn't enough. But what I wanted to ask was, is it better to use manual patching with Harmony if there's only like a handful of methods to patch? And then just use PatchAll sparingly? I just don't want there to be too much reflection overhead and things breaking. Does that sound right?
wow how topical
i think people here all have Strong opinions but honestly just use what vibes with you
PatchAll overhead is negligible in the grand scheme of things
the reason i used manual patch has little to do with reflection overhead and everything to do with liking the syntax more
Ok, I just didn't want to be stuck trying to fix it over and over since I am not a great coder haha
I'm a dry coder as well
i do think it's perhaps more clear, since you are call a regular ol method yourself
Ok thanks, I'll stick with manual then and try to get more experience with it over time
(i never heard of the term dry coder though)
Oh.. I repeat lines a lot, it helps me see the coder more clearly
some people don't like it
I've never been able to fully grasp coding, not the way others do. I feel weird about it lol
I need to have it a certain way lol
Whatever floats the boat 
Log Info: SMAPI 4.2.1 with SDV 1.6.15 build 24356 on Microsoft Windows 11 Home, with 66 C# mods and 86 content packs.
Thanks for the advice for Harmony, I saw you all talking about it before and thought I'd ask lol
tried to make the log shorter @lucid iron
its not even picking up the bathroom tilesheets now
oh wait
duh the first upgrade doesnt use the bathroom tiles only the second does
Looks like it edited Farmhouse1 this time
either way, its still not loading in the game
But earlier when i said less mods I mean like
Just content patcher and your mod plus various debugging mods like data layers and console commands
!modgroups
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
You can separate the playing modlist from the testing list with this
I am sleep though, so I won't be able to help further for now
Log Info: SMAPI 4.2.1 with SDV 1.6.15 build 24356 on Microsoft Windows 11 Home, with 1 C# mods and 1 content packs.
what is that?
So yeah it does look like Farmhouse1 gets edited
What exactly do you see in game & what do you expect to see?
I see the default first upgraded house and I expect to see the one I made. Do you need the tmx files?
What did you name your layers?
Also take a map wide screenshot in game n send it here
I used the vanilla map and edited it so they layers should be the same name
Pls do that then 
Another thing you can do is patch export Maps/Farmhouse1
You can look at this exported version and compare it to your wip
uhhhhhhh....after using patch export maps/farmhouse1 and opening it in tiled
i got a weird picture
lemme send it
i think its trying to load both
how do i even fix that
You need to put right numbers basically
oh i used the wrong x y width and height?
dammit
You can check coords in game with debug mode
And reload in game with patch reload <your mod id>
Yeah these are very large where are you reading these numbers
Remember that 0,0 is top left corner
Yeah those r pixels
The tile coordinates are on the status bar, bottom left
I want the ?? to have the description any idea how?
but width and height are right? @lucid iron
Did you actually give your recipe a description
No
dammiit
16 and 16 is the literal pixel size of rhe tile
so the width and height of the map in pixels?
so if its 0,0 to 0,11 then 11 would be the height
No 16 is the tile pixel size
People can and do use tiled with other tile pixel sizes
The FromArea and ToArea should all be tiles, you can find out how big with select tool
FromArea and ToArea of the map that I'm replacing it with?
Hm
I realized a problem
You cannot use EditMap to extend a map to the left or top
To do what you want Load is the only option
I was trying to replace the vanilla map T_T
Yeah just do a Load targeting the Maps/Farmhouse1 asset
EditMap is usually used to put a small change into a larger map rather than replacing whole thing
The contentpatcher guide said it reccommended editmap over load so i thought the safer choice was editmap
ill try rewriting in load instead
It's about what your desire is for mod
Like i doubt you expect any sort of compatibility with other farmhouse mods so Load is fine
For mod that only want to add a shop that's like maybe 2 files large then EditMap is the correct choice
sorry for keeping you awake @lucid iron ❤️
Yes vanilla has them but do you
As in, when putting in the data for your recipe
Because i think you're just flat out missing a descr6
6
(It comes from the object data btw)
it did it again 😠
lol
"LotsOfRecipes_BaconandEggs": "666 1 -5 2//LotsOfRecipes_BaconandEggs/i18n:BaconandEggs_Name/",
doont mind me im having a moment lol
Remove the name field, you dont need it and its written incorrectly
"Cornucopia_FruitNectar": "634 1 340 1/25 5/Cornucopia_FruitNectar/none/",
i forgot to actually change the mod in the unmodded folder too
OH SHT
UM
I now don't have a farmhouse at all
Ub on
um
:wo
why did it decide to add custom tile properties to "@flip" and "@rotate"
I am... Not sure
IT MESSED THEM ALL UP
I know some of it should be for wallpaper/flooring i believe
get rid of them all and remake them?
dear smapi pls stop auto customizing my tiles thanks boo
yep
then pray
and reload
🤔 im thinking og making "useless books" aka cooks that serve no gameplay function other than just little trinkets....
But idk how fun that would actually be
and i also just want to draw books
Since i still feel like the game doesn't have enough variety when it comes to non-food gifts...
:0
A library maybe?
A LOST LIBRARY
THE MUSEUM USED TO BE A LIBRARY A LONG TIME AGO AND IT WENT TO RUINS AND THATS WHY YOU FIND RANDOM LIBRARY BOOKS AROUDN
Well we already have Lost Books in vanilla.
But I do wish for some kind of framework where you can do custom book collecting for the museum.
whats the console command for coordinates cause i found my farmhouse map after wandering the void for a bit lmao
I either need to move the cellar entrance and warp point, or readjust the whole house map
anyone online to give me a hand
Should be debug ppp.
You also may want to have this to make debugging easier: https://www.nexusmods.com/stardewvalley/mods/679
i need to figure out how to either change the coords of the cellar and house entrance or move the map i made to line up with the vanilla coords
@distant radish Cornucopia machines will now load all the i18n strings to a file called Cornucopia.ArtisanMachines/i18n, so you can refer to it like any vanilla strings file
hi, can anyone help me figure out whats going wrong with this animated well AT mod Im working on? Ive tried using the standard variation format, Ive compared it to other mods, and I cant figure out what Im doing wrong, Im sure its something silly though 😅
currently it works but it loads all the frames side by side as if they were one big texture...
{
"ItemName": "Well",
"Type": "Building",
"TextureWidth": 48,
"TextureHeight": 80,
"ManualVariations": [
{
"Id": 0,
"Animation": [
{
"Frame": 0,
"Duration": 100
},
{
"Frame": 1,
"Duration": 100
},
{
"Frame": 2,
"Duration": 100
},
{
"Frame": 3,
"Duration": 100
},
{
"Frame": 4,
"Duration": 100
},
{
"Frame": 5,
"Duration": 100
}
]
}
]
}```
(Im using manual variations because I planned on making an alt without animation) this is my first time making a mod for this game and Im still a bit lost, so sorry for bothering if this is a stupid problem
Ive tried searching for this problem and I cant find anything helpful, I even looked at how other mods do animations, have tried different formats, and it just keeps loading the textures side by side
Got it! I will change it for the next version of MPS 
What is the proper way to parse a Microsoft.Xna.Framework.Point inside JsonConverter.ReadJson? I thought that this would do the trick:
if (reader.TokenType == JsonToken.StartObject)
{
Point value = JObject.Load(reader).Value<Point>()
... // Do stuff with the parsed point
}
but I get an error saying "Cannot cast Newtonsoft.Json.Linq.JObject to Newtonsoft.Json.Linq.JToken."
Also tried this:
Point value = Point.Zero;
serializer.Populate(JObject.Load(reader).CreateReader(), value);
but it simply doesn't populate the Point: value is still Point.Zero at the end.
hey, i haven't used AT but looks like Animation is not supported for buildings https://github.com/Floogen/AlternativeTextures/wiki/Creating-a-Content-Pack#adding-texture-variation
oh my goodness, how did I miss this line... 🤦♀️ thank you so much for the help, I am sorry for the trouble
my dumbass forgot the existence of JObject.ToObject<T>
guess Ill just redraw the well as static then
don't worry about it. if it doesn't have to be an AT pack specifically i think it's possible to make it animated with Content Patcher
ohh Ill look into that then
With the unofficial update ??
Im doing this as a part of a buildings retexture mod, thought AT could do animations so I was going to do an AT addon with extra options, including the animated well, but I could just put it in the main CP pack
i'm not sure what unofficial update you mean, but i meant just that native buildings have support for animations via DrawLayers https://stardewvalleywiki.com/Modding:Buildings
When you go to the Content Patcher Animation mod page, a very kind user made an unofficial update
ah i see
I suggest simply using normal Content Patcher instead of CPA for most things though
hi, i'm currently trying to understand how mods for Fashion Sense work - i want to make an accessory and for it to be visible when player is facing the camera (basically to have front back left and right positions). is there a parameter which will draw the accessory behind the player without the whole thing showing and overlapping the player sprite, or does this work in a whole separate way?
Hello guy!, i have question
where can i modify mod src code for feature "Farm Layout Selector"?
because i want to modify insert new farm layout to this menu for android
that is the CharacterCustomization menu
might want to check the LoadFarmTypeData function
in 1.5.6 stardew for android used a very different menu though
Ah thanks, now i found it
Hey everybody. A few days ago I asked about commissioning someone to create a mod for me. Now I want to warn you about the users Alex (katanabeller) and Ella meldrum (johnjames0672_47317). I was contacted via DM, we agreed on a price, I payed in full upfront and now they want more money, don`t do any work and refuse to give my money back. Of course I will report them but I wanted to warn you guys as well.
I think you should message Bouncer to tell the moderators about this.
Will do. Thank you.
Unfortunately scammers targeting people on discord is pretty common. I've had quite a few people messaging me to try to sell me "their" artwork (including today, in fact). I'm sorry it happened to you.
I only use discord every once in a blue moon and wasn not aware of this so I guess the joke`s on me this time..
I have dm's turned off almost everywhere, they are pretty much exclusively used for scams anyway outside of the sight of server moderation
I have DMs turned on for everything and everyone but if someone I don't already know messages me I check our mutual servers to see what messages they have sent. If none or only spammy ones, I just delete the request.
Hi Hadi 
When making a mod, what's the first recommend thing to do?/genq
!startmodding Usually we direct people to these places when they start out. Familiarising yourself with the content pack you intend to use if content pack modding is probably a good start.
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.
I'm making a CP mod, I was just wonder if like... Starting with programing? Or base location? (Where the mod is going to be on the map)
Have you done any CP modding so far? Edited other people's mods for personal use or anything? If you haven't start by doing something very small. Edit a line of dialogue or a portrait or something.
Nope, I kinda been working on a personal CP mod on and off. But what you mentioned sounds like a very good idea
Yeah, starting by learning how to actually make changes happen in the game is always a good starting point. Then once you understand what a patch is, what Action to use to get your changes in game, etc, you can start wherever you want to on creating the mod itself. I am making an NPC mod and I jump around between writing dialogue, drawing portraits/sprites, map making, making schedules, writing events, scripting the events, and so on.
I have started the foundation of the mod folder, I just haven't gotten down to the specific detailing yet. I do however have a few sprites/portraits but nothing to specific done as far as tying NPCs to pathing
Whatever you do, though, I really strongly recommend that you focus on getting it working in game at a basic level before you put more work into it. So if it's a portrait, put a placeholder in before drawing the whole portrait. If it's a map, make a small change to a vanilla map and put that in game before continuing work on it, etc. It's much easier to troubleshoot small changes, especially when you're still trying to understand what each of the json bits actually do.
What do you mean by tying NPCs to pathing?
I mean, sechduling. My bad. I woke up an hour ago so it takes awhile for my brain to wake up
Ah I see. So your NPC is already in game, just doesn't have a schedule?
By placeholder you mean like... Puting a joja can as an NPC portrait?
Kinda... I got like 10 more to do
I usually take a vanilla portrait file and scribble all over it lol
Ohhhhhh
Ah, apologies! Your initial question made me think you were just thinking about starting out, not already partway through the process. So I've been responding as though you had nothing but ideas so far.
Actually I am starting out, but like... I have the basics foundation for the mods folder, username, name of the mod, version, etc things like that. I still have a a lot more things I need to get done
That's way more than most people who ask that question have lol
Most people have a thought and maybe some notes written in a word doc or something
I recommend getting all the basic parts for one NPC in place (even if just mostly as placeholders) before starting more NPCs, since once you know how to do one you will be able to do the others just by copying and pasting what you did for the first one and then editing values.
(If you aren't already doing that, I couldn't tell.)
So like, is it acceptable to copy an NPC file and kinda just look at it as an example and fiddle around with it before making my own?
!npc Yup, absolutely! We also have a bunch of resources for NPC making specifically, including Tiakall's step by step tutorial for making an NPC, Avi's NPC template, and Fireredlily's NPC builder spreadsheet.
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!
-
Fireredlily has a WIP NPC Builder Please do report any errors you get with it into the NPC thread!
Now my next question, I made a portrait too small in pixel size, how would I go about enlarging that? Would I have to redraw the portrait by hand?
You might be able to scale it up using nearest neighbour sampling but I don't know how well it will work.
Neighbor sampling?
Nearest neighbour. It's a resampling method and it's the one that works best for pixel art. What art program are you using?
Pixel studio
Hmm, that appears to have a canvas resizing tool but I'm not sure if it resizes the image itself.
Still, you can always try.
I will try and see if it works
I need to use a better pixel art program. I’ve been using procreate with pixel brushes
Is that not good for pixel art?
I don't think procreate was designed with pixel art in mind 
the best camera pixel art program is the one you have with you are comfortable using
as long as it can do single pixels and export to 8-bit RGBA .png, whatever you have is Fine

(aseprite does have some really helpful features, so if you are willing to buy that or compile it for yourself, it's pretty good! but don't worry about it as long as you know how to use your tool)
I'm sorry to hear that you got scammed, I hope that the moderators can crack down on those accounts even though you probably won't get your money back (though if you paid through Paypal or credit card, try and do a chargeback/open a refund request asap). If you decide to commission someone again in the future, I would be happy to help give advice on whether or not the person you chose is trustworthy or not, based on what I know of their previous modding history. Additionally, I cannot do the code that you're wanting, but I'd be happy to draw some pixel art for free for you if you need that for your mod idea
(For the record, you can check my nexusmods history and posting history in this server to see that I'm a real modder!)
Some of the best pixel artists we have use programs that weren't designed for pixel art
Honestly you'll find that features specifically geared for pixel art arent super helpful until you're really doing pixel art a ton
Like it's really approachable, so you dont need that much to work with. Not like some illustration styles where you might need fun brushes or filters to make your art more snazzy
Yup I started making pixel art using Piskel in Firefox
I think it’s decent when you download specific pixel brushes for it or make them yourself. But the grid/canvas guide is hard to use, even when you set it to 1 pixel grid size. My grid at least isn’t exactly 1 pixel even when I set it
I don't use a pixel grid, but if it also couldn't do a 16px or 64px grid that'd be a deal breaker for me
You are on an ipad, right? Is aseprite even available on ipad?
I tried to resize one of my NPC portraits but nothing worked
Procreate is the only ipad drawing program that I know illustrators consistently mention using
so there may not be another good option
As in it didn't resize or it resized but badly?
Pretty sure it can only do squares and not rectangles. Like 16x16, 64x64
Medibang paint used to be a good program for iPad (and free), but now it’s full of ads. I stopped using it once it started playing ads every time I opened a canvas
I believe aseprite also only does square grids?
Eh, that's all you need most of the time. I use 16x16 for NPC sprites. I did 16x48 once for wallpapers but I didn't really need to.
No, Aseprite can do rectangles
Ah, good to know
I can't even fathom doing anything other than look at my messages on a touchscreen, so doing art on an IPad is mindblowing to me.
whenever I need to do pixel art I use GIMP
I tried to use GIMP and i was completely lost everything felt so unintuitive to me
Resized badly
I saw one recently called Resprite that looks promising
Maybe you could check that out?
And the the first time i open Asesprite everything immediately made sense to me
my aseprite (slightly out of date at this point, i think, lol compiled) only does square grids for the transparent background, but the "visible grid" (outlines around regions) is a freely configurable rectangle lol nevermind found out the background grid can actually be customized, ignore me
Unfortunate, I'm sorry. What size is your portrait?
It looks like it might be some kind of Aseprite fork
But for iOS
I will, thank you! 
Hylia, if you take a picture before and after it will be helpful for us to guide you
I’ve been working on an event that starts on the farm and then immediately switches to a different location, but despite setting the starting coordinates and the NPCs in the void it was still starting on the front steps with all the NPCs standing in one spot in front of the farmhouse. I couldn’t find a solution, so just in case anyone else has the same problem I used the viewport command and set it to 1000 1000 again (like as the first command after the setup ones)
also aaaa I spent way too long trying to fix that
the farm is cursed and ignores coordinates unless you use a special event command to uncurse it (ignoreCoordinates or something like that)
(Also, popping in to say that we were contacted about this and handled it!)
(the point of doing this is so that the vanilla farm events, where somebody shows up on your doorstep, always work no matter where your house is)
That makes sense!
Is there a post limit on Nexus? FF has been stuck at 200 comments for about a week now, is this the limit or is this a cosmic event?
expanded has 32k comments so i dont think its that
200 is absolutely not the limit on posts on a mod, lol
You have a break, enjoy it 
lmao, maybe I should take this as a sign
i think casey got that many in one day when one of the SMAPI updates broke spacecore for a few seconds
thats pretty 1337
It's not a break, I have a complete rework of the parsing process on my hands 
This is one of my NPC portraits
Firefox tells me that's 160x160px which I assume is not its actual size because you said your portraits were smaller than they should be, not bigger.
Yes
It looks like it was drawn from the portrait creator too so I'm surprised that it would have been too small in the first place?
What size are you trying to make it?
64 × 64
And what size is it?
For pixels?
Yes
It's 64×64 but the image itself is a jpeg and I completely forgot it needs to be a png
And whenever I tried to convert it to a PNG it gets worse
So you dont need to resize it?
Why did you mention resizing then?
do you not have the original file open?
Because I had initially thought resizing would be the best option
I do not.
Why don't you put the 64x64 jpeg file in here in the chat
One of us can make it a png and remove the background
The 160x160 image that you posted cannot be turned back into pixel art because it's blurry now
I don't have the original file though 😔 just the downloaded file.
That's what I was afraid of
You said you had a 64x64 image?
Okay
I'm going to take the 160x160 image you posted and try and do my best to fix it, but maybe this is a sign to keep backups if you're not sure what you're doing
Yeah, I will do that for now.
Initially this was 160 × 160, but the image itself was drawn on a 64 × 64 canvas
You can't draw a 160px image on a 64px canvas.
Does the portrait creator output it as an upsized scale of 160x160?
I have a question! Not sure if I'm just missing something incredibly obvious. I'm trying to use console commands in the SMAPI window, but none of the commands from https://stardewvalleywiki.com/Modding:Console_commands are working. I tried typing help but the only commands it says I can do are these:
You don't have console commands the mod
That's one of the 2 default mods that comes with smapi
Ahhhhh. It must have gotten taken out when I was splitting off my main mod load and I missed it. Thank you!
With that you can do debug <whatever debug command listed>
To use the game's own debug commands
Makes sense. Just tested with the mod added, it's working now. Thank you!
noob question, how do I go about using TextureOverrides in my mod
Is there a clean and quick way to remove the game's flag of "You did X thing" so I don't need to restart days to make sure each variation of something is working correctly? In this case it'd be to test multiple dialogues with the same NPC. (I want to make sure the gendered language is working correctly and also that when using branching dialogue via responses that all of them work correctly as well)
So in content patcher, load the texture first
Then do an EditData on spacechase0.SpaceCore/TextureOverrides
TargetTexture is the target of your load
TargetRect is area to put texture
if the texture is loaded in another mod do I still need to load it?
Well u need the hd version right
yes
You need to Load that
Yup.
- To just play a particular dialogue line repeatedly you can use
debug loaddialogue NPCName Characters/Dialogue/NPCName:key. - To remove a dialogue answer it's
debug action MarkQuestionAnswered <player> <answer ID> [answered]. - To undo a trigger action it's
debug action MarkActionApplied <player> <answer ID> [applied]. - To remove a mail flag it's
debug action RemoveMail <player> <mail ID> [type]. - To remove a CT it's
debug action RemoveConversationTopic <topic ID>.
Basically with debug action you can run any trigger action action lol
I think in that case your TargetTexture is whatever the other mod loaded to
SourceTexture is your texture
yep
That's a very useful answer, thank you! Gonna copy it into my notes so I don't have to look it up in chat again/lose it.
TargetRect would be 64x64 rect while SourceSizeOverride would be some 256x256 vector
I don't recall a mod example offhand but that's how it goes I think
so for example, if I'm doing HighlandsDwarf_Vendor from SVE
it's looking like...
"Action": "EditData",
"Target": "spacechase0.SpaceCore/TextureOverrides",
"Entries": {
"ModID.HighlandsDwarf_Vendor": {
"SourceTexture": "{{InternalAssetKey: assets/HD/HighlandsDwarf_Vendor.png}}",
"TargetTexture": "Mods/FlashShifter.StardewValleyExpandedCP/HighlandsDwarf_Vendor",
"TargetRect": { "X": 0, "Y": 0, "Width": 64, "Height": 64 },
"SourceSizeOverride": { "X": 256, "Y": 256 },
},
},
"When":{"HasFile:assets/HD/HighlandsDwarf_Vendor.png": true,}
},```
am I doing this right
!codeblock It's easier to read when in a code block
You can embed code in Discord using a series of three ` :
```
Your code can go here
Even if not a haiku
Just an example
```
For syntax highlighting, add the language code on the same line as the first
``` (with no space, like ```json).
The usual codes are cs (C#) and json.
ty
@thin lake This is the most I can do to save your portrait without redrawing it and without seeing the original, and I spent 30 minutes on it, so please use it lol
Tysm! I appreciate your help😭
That looks about right though did u want {{ModId}}
That's right. Though if this is your own mod, you don't really need that When field.
Er, thank you. 
tysm for the idea of using Spacecore for vendor HD portraits
I was losing my mind everytime I use HD portrait mod and then the vendor portrait popped out in 64x64
😭
Oh! I'm guessing you took a look on the HD Portraits part of my Portraits for Vendors mod as template?
I looked around yes
Yar, I use When there because my HD folder is actually empty. So SMAPI would not give an error if it coudnn't find the portraits.
But since you'd include the portraits yourself, the When field shouldn't be necessary.
(Also what chu said about you may want to use {{ModID}})
I like your approach of making a HD patch in the mod structure to give room for more flexibility of swapping between low res and high res so I left that When there
oh gdi
Yeah, I'm guessing not many people know about SpaceCore/ScaleUp 2 feature...
Oh, then carry on. 
With "When" conditions, if you add two entries does it act as an AND condition or an OR operator?
ty @lucid iron you've been very kind and helpful, hopefully I can make this work 
If it's like this it's AND
"When": {
"Thing1": "value",
"Thing2": "value"
}
If it's like this it's OR
"When": {
"Thing1": "value1, value2",
}
You didn't acknowledge chu or Dolphin mentioning {{ModID}} so I am going to suggest it as well lol. ModID. is not a guaranteed unique prefix.
yes, that was my bad
I got overly excited
No worries I just didn't want you to have missed it and then wish you knew about it later haha
I thought so, thanks.
Not a fan of the token?
more like don't know how to use tokens
literally just do {{ModId}} with the funny brackets
Well if u put a thing between {{ }}
that is what people are saying
Dats a token
Content Patcher resolve it to sone actual value at runtime
(I'm not a fan of the token because I'm easily confused when I want to patch an asset with another mod.)
Not everything can take {{ModId}}, but most things can.
I am a fan of the token because I change my mod's ID a bunch of times before I release xD
.....I feel really dumb rn, but also kinda relieved
seems like I gotta go back to reading CP Readme
You can do a lot of cool stuff with tokens
I enjoy manually typing my mod id a lot so i can pat myself on the back for being a mod author whenever I see my own name
(trying to brag) well I can type 6480 even faster
xD
ive been working on an external program that parses a set of content packs and dumps all the data after applying all their EditData changes. and lemme tell you. tokens are a nightmare. content patcher is too complicated.
Only caveat with the tokens, is that if you are using them in a Loaded file, CP won't turn them into actual values. (This is a reason to load blank.json files for some things and then use a separate EditData action elsewhere to add the data in them)
yes i did infact have to reimplement OrdinalIgnoreCase in rust, yes there is infact zero documentation on the exact unicode specifics of what OrdinalIgnoreCase actually does, yes i ended up reading the c++ source code for .net to figure it out, next question
I think content patcher is less too complicated and more too dynamic
What exactly r u gonna do when the Target has tokens 
can they make a static tokens system
There is a CP command to parse tokens
currently i resolve the tokens if i can, and if i don't know the value of the token then i either turn it into a set of changes with when conditions (if the token has a fixed set of possible values) or just die and display the token verbatim in the output
Ig it just depends on goal here then
when conditions are unified sorta kinda 😅
the output data is fortunately mostly for human consumption so its not too bad
Normally people just do patch export <target> n get the actual current state of the asset
When i mentioned i wanted to commission art of an npc i got spammed with DMs.
(Content Patcher is essentially a light programming language, not just a data format. If you can create a generic parser that can find every possible output of any given content pack, you're well on your way to solving a P vs NP problem.)
hey, it's not too bad!
Can I check for the size of a map in a When conditions?
the occasional edge-case where the output just has verbatim tokens is acceptable for my purposes
Im baaaack
this is the most annoying part btw. why does c# have zero documentation as to what this feature actually does beyond "it uppercases the strings" what does uppercasing the strings mean
i gots just two itty bitty issues
Not that i know of, what's the goal here?
I don't wanna talk over anybody thou so Ill wait 🤐
You should ask anyways
girlll im talking offtopic nonsense go ahead
ok ok so
there's no "talking over" here, it's more like conversation weaving
actually that's a cool visual concept
Well, I'm wanting to check what size map Fostoria is using, right now I'm using CMCT, but I don't want to use it cause I only need to use it with Fostoria.
Questions! (I'm trying to understand the limitations of what I can and can't (or shouldn't) do.)
- When telling the game to use a portrait, my understanding is you can use $0, $1, $1 etc (or $u/h/a but I find the numbering system more intuitive to my brain) at the end of a dialogue chunk to tell it what section of the portrait sheet to use. It goes from top left across then down. Do you have to use portrait sheets in the typical format or is the space of the file split evenly and assigned number values based on the chunks? Ex: A portrait sheet containing 10 different faces, but formatted in a way that'd be 5 faces wide and 2 faces high. Would it know how to handle that? (Trying to understand the limits of what I can do here.)
- When telling it to load a portrait can you load multiple at once? The potential use case would be things like if X NPC was injured you could have a bandage placed overtop if said event happened using dynamic tokens (or when statements, but I feel like a dynamic token may be more useful?) and a portrait sheet containing just the bandage in the correct position. So having it have Abigail loaded and Abigail_Bandage at the same time and then when calling on $1 it'd be showing the $1 positioned portrait from both files at the same time. If this is possible, what would load order look like? Would the first one loaded be on the bottom layer and then the second loaded be on top or vice versa?
- Can you load multiple portraits at once in a dialogue chunk itself? So if I typed "Hey @! I haven't seen you in ages! $1$3" Would it load both $1 and $3? If so, would it load 1 first, then place 3 on top?
- What results in a better optimized mod for SDV, a bigger image file or multiple smaller files? Does loading more files regardless of file size result in a longer load time or is there no difference?
problem 1: When I reenter the farmhouse, I'm too the left of the doorway. Not a big issue, just not sure how to fix it. 2: The cellar entrance is visually off a small bit and I'm not sure how to line it up with my farmhouse map :I
Does fostoria have a configurable map size then?
It does.
gimme a sec and ill get screenshots of what im talking about
But I can only access their map size configs via CMCT.
2: just editimage the portrait spritesheet with your bandage on every sprite
CMCT is the correct answer here
Then I'll just make it an optional mod to use.
Cause I don't wanna add unnecessary requirements to the main mod.
As long as you gate the patch accessing any CMCT tokens behind hasmod then you fine
And make ur own matching config in case ppl not using cmct and just want to set it manually
- Did you update the warps to match your adjusted farmhouse
- Did you also patch the cellar renovation to match
4: not an expert on this, but it's usually better to have stuff in a single sprite-sheet to avoid loading multiple textures, except if it has to be invalidated often (frequent patch updates because of conditions)
- I believe ichor said you can make portrait sheets wider if you want to, yes
- No, you want EditImage overlays like Leroy said
- Nope. Your one portrait (either as originally loaded or with however many overlays you have edited onto it) is all you've got.
- one bigger file is better than many smaller ones but unless you're going up into the hundreds I don't think it makes much difference
- The game expects a specific portrait texture layout. You can extend the portrait texture downwards to add more portraits, but portraits past the expected right edge will be ignored.
- No, a dialogue box can only show one portrait.
- It's a tradeoff. Loading one large image is more efficient than loading many small ones if they'll always be loaded either way; but if you only need a few parts of the image, it can be more efficient to load the few small ones you need than the whole thing.
actually, I don't see any situation where you would invalidate your own images, so big file it is
Ooh interesting, I'm sure ichor said he went wider. Was he wrong, did I misunderstand him, was that all a dream???
pretty sure you can go wider if you're loading, but content patcher won't let you edit wider
both in Tiled?
(the usual layout is definitely better to follow if it's not a custom NPC though. maintains compat)
I'm looking at the drawDialogueBox logic, and the positions are hardcoded for the named values like $u:
case Dialogue.dialogueHappy: portraitRect = new Microsoft.Xna.Framework.Rectangle(NPC.portrait_width, 0, NPC.portrait_width, NPC.portrait_height); break;
case Dialogue.dialogueSad: portraitRect = new Microsoft.Xna.Framework.Rectangle(0, NPC.portrait_height, NPC.portrait_width, NPC.portrait_height); break;
...
It does fallback to dynamic calculation for numeric indexes, but if you go wider that'll change the meaning of the standard portrait values (e.g. $u and $3 will no longer be equivalent), which will mean a lot of dialogues will show the wrong portrait.
oh like an editmap in the farmhouse content json?
Thank you everyone for the answers! One thing I want to double check to make sure I'm understanding, for 2) when you say EditImage overlays are we talking like an edited version of the OG with the bandage added or a file with just the bandage and pure transparency beyond?
the latter
In that case would it be wise to make sure that my $u etc positions line up to ensure wider compatibility?
If u look at your unpacked content there's a tmx that has only the cellar stairs
You need to edit that
Or Load it if u want
Yes, I would recommend using the standard layout. Even if you always use numeric portraits in your custom dialogues, the game injects dynamic dialogues in a lot of places (e.g. gift tastes) which often use the named portraits.
That's good to know, thank you!
gift taste portraits are at least overridable still
(I'm not disagreeing with the rest, just making sure he knows he can change those)
it would be a lot of stuff to change just to make the sprite-sheet more square-ish
Those are in 1.6, but I imagine there's other dynamic dialogue which isn't. (And even if you could override every single dynamic dialogue for an NPC, that definitely seems like a lot of work just to use a different texture layout, particularly given future updates may add more dialogue you'd then need to override.)
Yeah I plan on trying to stick close to standard for compatability reasons, it's just useful to know how these things work so I know what I can and can't do. I understand things best when I know the 'why' not just the 'what'. Thank you everyone, that clears things up a lot! 😄
if there is other dialogue that isn't then I'm putting those on my feature request lists for 1.6.16 
As long as u don't need more than 128 portraits it's fine
Searching $h in the game code. 
(tbh if the named portraits are the only problem, it seems quite easy to make those be dynamic with a mod than play dialogue line whack a mole)
Although i wonder if u can do it like
The special $h are where they ought to be as if 2 columns
But u extend to side anyways
are all those instances of $h in lines where you're completely unable to change the portrait with custom dialogue, though?
should i just add editmap at the end of the tmx file for the cellar
No, because the game also uses numeric indexes to refer to them. For example, the game uses $5 to show an angry face, but you edited it so now $5 is a clown face.
yeah ive got it open in notepad++ just dont wanna mess it up siince its not my code
(I'm not going to individually check over 10,000 matches to see which ones can be overridden. Sorry! :P)
You mean we aren't getting automatic atlasing of all loaded textures and rewriting of source rect co-ordinatesin the next update? /j
I didn't think so! More just rhetorical way to say that I don't think all of those are the same case as gift taste were pre 1.6 
Im confused about what you are doing now 
thats not a good sign if ive confused the person im asking help from lol
In that case, would the game understand it if I've extended an NPC's portrait sheet? Example, I'm trying to make typically non-romanceable NPCs romanceable so I'll need to add the expected blushing and other potential unique potraits depending on events. Are all of the $X positions hardcoded? I'm trying to make the mod using Content Patcher's functionality, do I need to somehow tell it where my $4 is so it can load properly? (Willy's portrait sheet for example only has 4 different faces unlike the typical bachelor or bachellorette)
your farmhouse looks 1 tile taller than it should be
yep just doont know what to change
so you also need to make a version of this thats 1 tile taller with the cellar thing 1 lower
oooohhhhh
The portrait logic isn't NPC-specific, so you can extend the portrait texture downward and it'll work fine (e.g. $l will work for Willy if there's a portrait at that position).
Oooo that's really good to know, thank you!
So I've been playing around with the new internal ID field, and it looks good in general!
I don't really like having it at the top though, since it's not the most relevant info for most players. So I'll probably move it to the bottom; if you just wanted to avoid scrolling to see it, have you tried enabling full-screen mode in the Lookup Anything options?
"a1000 Forest 7 35 3 \"Strings\\schedules\\{{Honeyfuggle}}:{{ModId}}_Wizard\"/1500 Forest 10 35 2/1800 Forest 22 86 3/2400/2100 {{ModId}}_Tent 3 2 3 {{ModId}}_pillows/2400 {{ModId}}_Tent 1 4 3 {{ModId}}_sleep" is anyone able to see at a glance what's wrong with this schedule? it is failing for some reason log
Log Info: SMAPI 4.2.1 with SDV 1.6.15 build 24356 on Microsoft Windows 11 Home, with 13 C# mods and 1 content packs.
Total sidenote, ive not upgraded my farmhouse yet so i cant test version 2 but how difficult is it to have the bath in the bathroom regen stamina? Is it simply just adding in a swimsuit change tile or is it more complicated
It's a bit easier to see if you multi-line it:
a1000 Forest 7 35 3 \"Strings\\schedules\\{{Honeyfuggle}}:{{ModId}}_Wizard\"/
1500 Forest 10 35 2/
1800 Forest 22 86 3/
2400/
2100 {{ModId}}_Tent 3 2 3 {{ModId}}_pillows/
2400 {{ModId}}_Tent 1 4 3 {{ModId}}_sleep
The first schedule for 2400 is missing the required fields (and is out of order).
(I'm increasingly tempted to add XML support to Content Patcher. The vanilla events and schedules are so much easier to read now that they're multi-line in the base code.)
XML support meaning? :o
You could have content.xml instead of content.json, or do stuff like...
{
"Action": "Include",
"FromFile": "events.xml"
}
I thought that was just gonna scale it up 
So instead of having schedules like this:
"rain": "1000 SamHouse 15 13 0/1100 SamHouse 17 15 2 sam_guitar/1500 SamHouse 8 6 3 sam_gameboy/1700 SamHouse 17 13 0/1830 SamHouse 22 16 1/2000 SamHouse 22 13 1 sam_sleep"
You could do this:
<Item>
<Key>rain</Key>
<Value>
1000 SamHouse 15 13 0/
1100 SamHouse 17 15 2 sam_guitar/
1500 SamHouse 8 6 3 sam_gameboy/
1700 SamHouse 17 13 0/
1830 SamHouse 22 16 1/
2000 SamHouse 22 13 1 sam_sleep
</Value>
</Item>
(Technically you can multi-line with JSON too, but every text editor will panic about it.)
woah
But hm how do you feel about decoupling the flavor linked field from the internal id setting?
Never would I have guessed that one day I would hear Pathos speak positively on xml
Or xnb
Rn it's both under that if block
(I removed the config option in the PR, both are now always shown.)
Ah ok 
do i do this through map resizing? Cause it didn't work...
Well you need to make it bigger first yes
Speaking of schedules
The game's syntax is all built for XML content, so it fits more naturally.
Like all that quote escaping we need to do in JSON? The base game doesn't do any of that:
<Item>
<Key>marriage_Mon</Key>
<Value>
800 SamHouse 8 5 3 "Strings/schedules/Sam:marriage_Mon.000"/
1100 SamHouse 3 13 2 "Strings/schedules/Sam:marriage_Mon.001"/
1500 bed
</Value>
</Item>
Content Patcher looks explicitly as Dictionary and List for data types to edit
But for...schedules actually
I once wanted a Sorted Dictionary
"When": {
"HasMod| contains=Lizzie.Stoffton": true,
"HasMod| contains=Fostoria.Stoffton": false
}
This would only work if Stoffton is installed and Fostoria is not, right?
Is there a reason why CP looks to Dictionary/List and. Not IDictionary/IList?
Yep.
Thanks Pathos.
Smh use single quotes (jk jk)
(JSON is way nicer when you don't need to deal with multiline strings and nested quotes though.)
why is the warp point different when I enter the house? Exiting the house is fine, its lined up, but when I reenter the house I'm a couple tiles left?
ooohhhh i made it worse fk
Hm so most farm buildings do the 1 tile north of first warp trick
I don't recall farmhouse having special hardcoding but i could be wrong
Theoretically it could support interfaces, but it'll add some complication and may not always work intuitively.
For example, let's say you have this field in your data asset model:
public class SomeDataModel
{
public IDictionary<string, string> Schedules = new OrderedDictionary<string, string>();
}
And then a content pack does this:
{
"Action": "EditData",
"Target": "Data/YourDataAsset",
"Entries": {
"Schedules": {
"X": "Y"
}
}
}
Content Patcher needs to create an instance of IDictionary<string, string> to replace the field. It can't construct an interface, so it'll need to map it to a concrete type somehow:
- If it just uses a default mapping (e.g.
IDictionary->Dictionary), then it's no longer an ordered dictionary after a mod replaces the field. - It could try to guess the type based on the currently assigned value, but that fails if it's null. That also leads to all sorts of edge cases (e.g. one content pack sets the field to null and the other replaces it, so now it's gone again).
So tl;dr:
- it's theoretically possible;
- there's a lot of code paths and edge cases we'd need to look into;
- not sure how many mods would actually use this?
(It would be easier to add another supported concrete type like OrderedDictionary.)
Oh I meant using a SortedDictionary (I hope that is the class name) as a concrete type
adding this to my knowledge bank. i thought the named portraits were just aliases for indexes and they all calculated the source rect the same way (like sprite index, so any source image width would be fine). good to know it's much more cursed than that /lh
Ie, my class looks like
class Data
{
SortedDictionary schedules =[];
}
(it is! there is also SortedList. source: used them last night for a mod im making)
The low-level DictionaryKeyValueEditor does actually use IDictionary<,>, so in theory it wouldn't be too hard to support other dictionary concrete types. Might just need to edit KeyValueEditorFactory.TryGetConstructorWithoutCache.
I'm confused because when I made the map, I didn't move the entrance at all. I built off the vanilla
if you expanded the map to the left that would shift the coordinates
?
gotta put the wall on the Buildings layer yourself!
Bottom walls like that usually need a black tile on the Building layer to prevent passthrough
Under it
The other walls work fine, but the wall between the entrance and cellar is fake apparently
Farmhouse is cursed 
LOL
(Farmhouse modders are pretty brave, given all the farmhouse dynamic changes like renovations and spouse rooms and special warp logic.)
my best advice for messing with renovations of any kind is "good luck"
mirroring the farmhouse was hell on earth
You know i wonder if you'd have a better time if you make your little change a renovation in and of itself
im doing it out of pure spite, not bravery lmao
Although it looks like it's already overlapping with where the dining room normally is
I thankfully didn't have too much trouble implementing the bathroom reno once the walls and floors issue got found xD
yall i need all the luck cause i only started learning all this coding sht 24 hours ago and im astonished its even IN THE GAME LOL
So it's a matter of scale
I think the particular cursedness is from the attempt to extend left
Extend right is much easier
Actually I could probably adjust the map so its more adding on rather than expanding?
Depends on what you desire
Ppl have made farmhouse mods that completely change the whole thing and they (mostly) work
If I want a patch to apply 80% of the time, does this work (as a when condition), and is there a better way to do it? "query: {{Random:1, 2, 3, 4, 5}} >= 4": true
One option is to add a little door/warp which just leads to a different room, which you can place off-screen at Y=100 or something.
the main reason Im making my own farmhouse mod is because I want everything in one screen like on one floor, theres only like two mods thats only one floor and the layouts are funky
looks like 40% odd
im including the cellar bc the cask recipe
I think u can do "Random: 1,2,3,4,5 |=contains=1": false
I suggest avoiding query if you can, which is more expensive and less validated.
"Random: {{Range:1, 10}}": "{{Range:1, 8}}" // 80%
I could shave a row of tiles or two off the left side and try it out?
If you gonna do that, start over from the vanilla farmhouse tmx again
And only extend map right or down
dont have to give me an excuse, designing it was so much fun
Whenever I get around to it, may I give it a shot?
should I avoid moving the entrance so I don't have to deal with warp coordinate problems?
I feel like it could have been made to work but it would have been pain regardless
Sure!
So yeah just leave it alone and keep it simple
Honestly all I want is seperate kid rooms, a large storage/machine room and have it all one floor lol
Unfortunately my schedule is now shot through the end of fucking JULY so I'll try 
oh Pathos, as long as you're here, this is a very minor thing but something i noticed last night: should ArgUtility.TryGetOptionalRemainder also include a field label (the [CallerArgumentExpression("value")] string name = null bit?) i noticed its the only one in ArgUtility that doesnt
Once the kids get to child beds, theyll sleep in whatever room i put the child bed in though right
They sleep in the crib as a baby so if u are fine with them being in the void for that sure
This is an extra mod that will let you move the crib's position
The field label is used to build errors, but there's no possible error with that one. (It only returns a boolean so you can use it the same way as the other methods, it'll always return true.)
honestly all i did was move the crib tilesheet tiles and the overlay tiles with the action: crib property
It doesn't really work like that
dammit
The crib is a renovation
then why does it have an out error param 
And it's position is hardcoded in vanilla
Trust Chu they're the one who made the mod that lets you move the crib
Back to the drawingboard WOO
I live for the drawing board not actually making it a thing lmao
the two worst locations to choose for a first mod to edit are farmhouse and the communitycenter
im just the one with ideas and fine tuning not actually putting them into action lol
Yeah sad times 
hon im only learning this because i cant find a farmhouse layout im content with lol
its annoyiing me
so i finally said fk it
im not saying you shouldnt do it!
just, yknow. you chose the worst option unfortunately 
sounds like something i would do lmao
My first mod was also farmhouse woo
Temperamental maiden that one
i have a habit of prefering the expensive stuff too
(thankfully worst doesnt mean impossible, a lot of it is really just being spoiled on how easy it is to edit everywhere else)
always gotta be high matience unintentially 💅 lol
hey that just means once i get this layout ironed out and done other mods will be easier to make
I remember being very puzzled when I left my bathroom map and arrived at the front door of the farmhouse
You can maybe do a shed mod first that thing significantly less cursed
nah im determined now, im running off pure spite and caffine
(Fun fact: you can put a bed in a shed and sleep there.)
Oh well, that's enough modding for me today, I still have to fix that SMAPI patch I have. 
I never bothered doing anything about it though lol. Magical bathroom door.
slurps pepsi
My spouse has Banished me to the garden shed 
(And the mines, if you force it to happen... but don't.
)
mod where you can sleep on couches
The mines: #making-mods-general message
(But what if I yearn for the mines)
Then you can do that and wake up in a limbo version and exist there for eternity.
I think u just make a bed that's couch shaped right
(When you yearn for the abyss, the abyss yearns for you.)
Maybe it got messy blankets
(It's the next logical step of staring into the other, after all.)
alternatively: bury yourself in couch cushions
Hmmmm
Will sitting on a chair trigger furniture tile properties
Like is your farmer's actual tile location over the chair now
i was summoned
Sleeping is I think 3 lines of code in the debug command, so honestly... probably pretty easy.
Well yes but I'm trying to do this with existing toys
Spacecore furniture tile properties basically
once again we are back to coding
time to figure out how to run the functions in my keypress
brief q
if i just add swimsuit change tiles to a bath entrance, does it make the water stamina regen or is that another can of worms entirely?
Aww, I was hoping furniture would have a doCollisionAction equivalent to make that easier.
stamina regen happens whenever the player is swimming, no matter where the swimming may be
and no matter what they are wearing
You just put an TouchAction tile property
I have to admit, I was getting the impression it was still a mystery, so I just ignored the obvious things like those. 
Hence why i wonder if the farmer actually moves onto furniture during the sitting
Enough to count for touchaction
I did need to make collision maps work on furniture separately for things that aren't rugs
oonce child is out of crib and in a bed, theyll sleep in the bed if its in a different room, right?
Yeah the child bed is just furniture
You can move it normally in vanilla too it works the same
just wanna know if theyll change rooms or if theyre hardcodded to the crib room
There's no concept of "rooms"
alright, struggling to parse the getRequired from the old mod into my new version because mine doesn't take two arguments
basically i just want (from the old one) for it to do this (get the blueprint, and the amount of wood needed and make sure its greater than zero)
if (GetRequired(vanillaBlueprints[currentBlueprintIndex], woodObject) > 0)
{
ingredient = woodObject.getOne();
ingredient.Stack = remainingWoodReq;
}
but my GetRequired doesn't take two args, it takes one
Well if you used getOne
private static int GetRequiredWood(List<BuildingMaterial> buildingMaterials)
{
var counter = 0;
foreach (var material in buildingMaterials)
{
if (ItemRegistry.QualifyItemId(material.ItemId) == "(O)388")
{
counter += material.Amount;
}
}
return counter;
}
It'll become 1
the first thing is the old 1.5 code or whatever this guy did
i just want to mimic that same functionality(?) i guess, of getting the required ingredients from whatever bloopy is on the screen
Oh i see it's the part where it's making the wood to sell to the player
Yeah that's a later step 
You are trying to find out how many wood the player owns right now
Nop then u are done with that
So now you gotta subtract the Stack field from the ingredients item by the number player owns
which i did in GetPrice
Then u can do this part
But only the getOne and Stack = however many you need part
i just don't know how to format that part is the thing. i never know what to pass through constructors(?)
Item.getOne is a method on item that gives you a copy
So it's not a constructor per say
method is what i meant. yeah
Your ide should have hints for these things though
i dont know what to pass through GetRequiredWood because it asks for buildingMaterials, and i. bweh
At least the type
i dont think it does
We aren't using the original mod's code at all
like this meant hoopla to me idk what it wants lmao
i barely understand whats going on bro im gonna be real 😔
private static int GetRequiredWood(List<BuildingMaterial> buildingMaterials)
{
var counter = 0;
foreach (var material in buildingMaterials)
{
if (ItemRegistry.QualifyItemId(material.ItemId) == "(O)388")
{
counter += material.Amount;
}
}
return counter;
}
like. ?????
does it want me to put material there? does it want an item id? i dont know. i think i know, i do something, and then it doesn't work, so i don't actually know 😭
But CarpenterMenu.ingredients is a List of Items
Why did you write it like this is my confusion perhaps
You didn't call it yet tho
But anyways I'll explain what implementation I had in mind 
(sobs quietly)
i make progress and then i ask questions, then i get rerouted to a different way LMAO
- CarpenterMenu has a field ingredients, it's the list of ingredients (List<Item>) of the current active blueprint
- Because they are Item, you can get the count needed just by accessing Item.Stack, no reading blueprint entry required
- Compare this number with number of wood in the player inventory, and do "purchase" (subtract appropriate money, add wood) in a ButtonsChanged handler
Using the Blueprint entry is valid way too, I just felt this way saved work cus you need it in Item form in the end
😔 do i just scrap all of this
Naw but let's look at it from another angle
You know the button press -> log message mod?
yeah
Let's do that but make it give you one wood everytime you press W
And take away 10 money
hm. there's no method to check the sale price of the object i just created is there
pweh
or should i just do - 10 for simplicity
or minus equals 10 my b
I'm not sure what you're doing, but why not do this since you're already creating the item?
if (Game1.activeClickableMenu is not CarpenterMenu)
return;
Item wood = ItemRegistry.Create("(O)388");
Game1.player.Money -= wood.salePrice();
i actually just did that before you said that lmao
private void OnButtonPressed(object? sender, ButtonPressedEventArgs e)
{
var counter = 0;
if (Game1.activeClickableMenu is CarpenterMenu)
ItemRegistry.Create("(O)388", 1);
counter += 1;
Game1.player.Money -= wood.salePrice();
// print button presses to the console window
this.Monitor.Log($"{Game1.player.Name} got {counter} wood.", LogLevel.Debug);
}
chu :D
i wanted the counter to increase as u pressed the button more nodnod
just. for fun
Now that u understand how to sell yourself wood we can hook it up to the things that tell you how many wood you need
i assume you meant to put braces { } around the three indented lines after the if
You can foreach (Item item in carpenterMenu.ingredients) yep
C# is not a meaningful-whitespace language where indentation controls which things are scoped
yes ichor
(and thank goodness! i don't need any more python in my life /lh)
foreach (Item ingredient in ingredients)
{
if (ItemRegistry.IsQualifiedItemId("(O)388"))
{
counter += ingredient.Stack;
}
}
``` bweh
i think?
oh for the player side
oh. lmao
Game1.player.Items.CountId("(O)388")
this helper function does basically what you want already
> 0?
it counts up total number of wood (O)388 in your inventory across different stacks
uh okay
so for each ingredient, i compare how much the player has versus how much is required
but i dont do a >= statement, or i do?
or do i need to do a math problem instead, rather than an if statement
you need to assign the return value so you can use it elsewhere
int playerHasThisMany = Game1.player.Items.CountId("(O)388");
name of variable up to you
oh remainingwoodrequired
okay yes ok
OH okay
int playerHasWood = Game1.player.Items.CountId("388");
int remainingWoodRequired = ingredient.Stack - Game1.player.Items.CountId("388");
nyehehe
but i probably shouldnt do that in the foreach statement huh
the remainingwoodrequired thing
hm ok
inside of that foreach statement?
no
tbh i do want to let you figure out on your own some more but considering ppl already gave you whole ass snippets ill do the same 
this pastebin has a "right answer" https://pastebin.com/59eEiEj7
giving it to u for u to browse as needed cus im doing other things now 
@lucid iron I got the mod to work, tysm for your help, I love you
no way you can condense the entire function down to that tiny foreach thats nuts
toml support when
😆
YALL I JUST REALIZED YOU CAN ROTATE AND FLIP TILES IN TILED
i know its prob common knowledge but
im excited now
(This code doesn't check if someone can actually afford the materials though... just takes away potentially more money than the player has, and also might do weird stuff if the player's inventory is full.)
fixing those is an exercise left to the reader
-# Also if I want to be nitpicky, I doubt the sale price is the same as Robin's shop sell price, but we can pretend it's because of bulk pricing...
oh it actually is cus
robin shop doesn't set a price for wood/stone
the y1/2 behavior is fun bit of hardcoded
Of course it is...
but yes lani u should add checks for actually having enough money 
in an actual mod, i'd probaby try to do some shenanigans where i alter the blueprint's cost on the shop
maybe this can migrate to pricemodifiers as part of 1.6.16
so that it's absorbed
Stardew debt mod goooooooo
Realistic stardew mod
- Crushing student debt
oh khloe since you are here
i had a thought about making a machine rule based crafting station in better crafting
what's this T vs T^2 notation on the map properties wiki page?
my understanding of BC code is "i looked at it for 20mins" but ig the idea is like
- transform machine rule into IIngredient/IRecipe somehow
- let ppl designate a bigcraftable machine as "can have crafting station"
snail sashimi will become real in 20
2 is tooltip
or uh, footnode
its not a thing you actually put
are they just saying "stick T here by convention but technically you can do whatever you want"
the footnote is incredibly hard to find on that page lol
yea thats what the 2 footnote says
no link 😔
yeah this is what i was planning
thank u chu
usually for these the game just check doestilehaveproperty
i have never touched maps I am just finishing wiki migrations and I don't want to put incorrect info in 
appending the additional price to the cost of the building to make New Price :3c
and if u cant buy it then GET OUT /j
Ohhh that's a good shout
Huh
That's actually easier
So... a way to convert machine recipes into crafting recipes the player can do in a crafting station menu?
It should be... fairly easy with a C# mod, but I'm not sure why you'd bother?
(Or am I interpreting that wrong and you want to make a machine that performs a craft based on a recipe the user selects?)
so i think im going to blow up my house if this keeps not working
im gonna go back to my c# learning book 😔
Please don't blow up your house
the machine would remain a machine on the inside
i.e. you are essentially putting things in and then fairy dusting it immediately
its just changed from you dropping something in to you picking from a menu, and i thought BC would be nice for this since you already got all this infrastructure for a menu that take ingredients and produces Thing
the particular usecase i had in mind is for wildflour's altelier goods, which has a number of machine recipes for producing basic components (e.g. kitchen mortar turns tea leaf to macha powder), if a feature like this is made the definitions are all still Data/Machines but wildflour can do a configurable edit to add the "can be a crafting station" tag, then people who want a different experience can use the kitchen mortar as a crafting station to make macha powder
just learned how to make a calculator in my console. this is epic bros
if statements who? i am a switch god
Well it should be simple enough to create a mod using the BC API that adds a recipe provider that automatically converts all machine recipes, and then people could just create a custom crafting station definition using existing tools. I'm not sure about the performance implication of converting every machine recipe though. Would need to test it. 🤔
Hello, I've got a question regarding custom pets. I've looked into other modders' custom pet mods, and I've looked into the pets file in the game itself. I THINK I might be making progress, but one part of the code has me absolutely feeling like a deer in headlights; Behavior. My custom pet is currently just a turtle resprite (same dimensions, same sprite placement, etc) for learning purposes, so can I be lazy and just copy the whole code from the turtle section of the pets data, or do custom pets require more than just a quick copy paste in that regard?
The other thing that is ??? is how u can have GSQ based outputs
I can't imagine that playing well with bulk crafting
I shall investigate "separate mod add on to BC" then, thank
So if you just want pet to behave like cats or dogs or turtles you can just add a Breed
BC does every step of bulk crafting separately and stops if it can't stack the crafting output
you can just add your turtle as a new breed for the Turtle pet
A custom pet is needed only if you want them to do something else, and it is a Whole Thing so i only know one wip mod that does it
Is there a guide on how to update mods? Moving from pre 1.6.0 to 1.6.14
The big change is 1.6.9
I understand that I could just use a new breed, and technically I could've just done an AT texture pack if that was the goal, but this is building up to making an actual new pet that isn't a turtle. I'm just using the turtle as a base to start.
Egg Festival Winner Randomized
theres a 1.6 of that though
Doesn't work
Updated last feb
I know. I tried using it and it didn't work at all. Abigail would always win.
It doesn't work with SVE afaik
It's the only mod I run.
yeah the comments say it doesnt work at all now
That's unfortunate wondering what changed
nothings even changed since february though
My guess is that the script to determine random winner is ignored and it defaults. I checked the console and it does say that StringsFromCSFiles gets updated but nothing else is mentioned.
Sorry if that doesn't make sense. Completely new to modding haha.
And you don't have a y3 egg festival right
Nope. Year 1.
this is just a CP mod editing the script, i cant see anything that would have broken
are you sure it didnt just happen to randomize to abigail every time you tested? she does have a higher chance than the other contestants
Ran it 10 times
in the same year?
Yes.
I'd create a new save for each attempt
If terrible luck is the case, could I remove her from the winner pool to avoid it?
worth trying probably
you can just remove her names from the EFWinner dynamic tokens in the content.json
Yup. I should never play lottery as that was all bad luck.
Removing Abigail made another character the winner.
😄 No I just created a new save, slept for 12 days and attended it year 1.
wait egg festival winner?
Yes
I literally follow around Abigail/Jas+Vincent and grab the eggs in their path before them
Then I get winner lmao
The game is coded to always make Abigail the winner unless the player gets like 8. That mod makes it random if the player isn't the winner.
Thank you for you help, I would never have thought it was a bad luck issue.
wait what it is??? I've won year 1 before and other years by following her pattern and learning it, then zipping around and grabbing the ones in her and Jas/Vincent's path
Wins every time
By that time you probably had the required number for the game to count it as players win. You can take the route completely opposite of her and win.
ah i dont really know any coding ways thats just what I do 🤷♀️ thought id throw in my two cents in case it helped
It's alright
ILL GET IT RIGHT EVENTUALLY @lucid iron LOL
I DONT UNDERSTAND
WHY IS THE WARP POINT DIFFERENT WHEN YOU ENTER THE HOUSE THAN WHEN YOU LEAVE
IT SHOULD BE THE SAME SPOT RIGHT
yeah its replaced with one i made, but ive been working on it with chu for the past day or so
the changes ive made are minimal
okay, so you have to edit the warp on your Farm map to have the updated coordinates of the interior
if you're doing a Load you can edit the tmx, and if you're doing an Edit you have to do it in your json
gimme like 30 mins, gotta go pick soomething up
the Farm map itself doesnt contain a warp to the FarmHouse interior. it wouldnt be able to, bc you can move the farmhouse. the farmhouse itself sets its entryposition through some property iirc (otherwise hardcoded based on upgrade level)
(listen to button, button knows much more than me)
hey, I want to make an AT pack that will enable me to change the texture for the greenhouse changed by Greenhouse Sprinklers (https://github.com/Bpendragon/GreenhouseSprinklers/blob/main/README.md) if I'm reading this correctly, the new ItemName entry should be "GreenHouseLevel0" (through 3), did I get that right?
dont think so
these are upgrades via Data/Buildings entries, so you need to find the internal ID of what they're called
(also consider adding skins via CP instead of AT)
I'm sorry idk what I'm looking at here 
GreenhouseSprinklers.Upgrade1, and 2 and 3
ah, ok, thank you
oohhh ok it's this bit dict.Data.Add("GreenhouseSprinklers.Upgrade3", bd3); that says it I see now
sorry i donut recognize the language this is written in, I've only ever messed with jsons as far as sdv modding goes
(also, huh, instead of changing the greenhouse upgrades' Texture field it invalidates Building/Greenhouse on saving/save load/Robin menu opened depending on the upgrade level)
(like, why)
(idk but it frustrates me :'D)
(okay, it's a 1.5 mod and custom buildings are not a thing back then so I'll chalk this up to "quick 1.6 migration code")
ah, that makes sense 
(when you look at 1.5 mods that only got quick and minimal code changes to get it up and running in 1.6 you'd see some rather... cursed code)
AtraCore still lives in our hearts
-# it doesn't in mine
👀 Object has an isPassable method you can override
I wonder if anything in vanilla uses that
torch







shouldn't you know what it wants