#making-mods-general
1 messages · Page 319 of 1
With CP, is it possible to have 2 machine rules that make the same item but with different ingredients for the "additional consumed item"? I don't see a way to do an or on the wiki page (https://wiki.stardewvalley.net/Modding:Machines), so I assume you need 2 patches. When I tried this out, the second rule is overwriting the first.
Is it not possible to simly make 2 OutputRules with different IDs? Shouldn't talk out of my ass
You need Extra machine configs
Every machine only has one consumed item/fuel for the whole machine
cornucopia has many examples if you need a link
AdditionalConsumedItems is outside the output rules
aha, I have that installed, I'll check that. Thanks!
fixed it with better crafting cool
anyone know where the slingshot minigame backdrop is located? i can say it's not in cursors....
I'll have a look at it later. Thank you!
I currently don't have access to the files, but I could swear there's "festival" image in the unpacked files.
If I have a JObject that can contain either
{"X": 1, "Y": 2}
or
{
"key_1": {"X": 1, "Y": 2},
"key_2": {"X": 2, "Y": 1},
//...
}
where key_1 and key_2 are not known, how can I know which one it is? I'd like to have a general solution where what's inside can be a Rectangle or a Point without having to list all their fields
from some testing I did, it seemed like JObject.ToObject<Point> would return Point.Zero in the second case, so I'm pretty sure I can't use that
what are some good area's that'd be handy to warp too from underground?
I'd say areas that aren't easily accessible otherwise
Like Cindersap, the secret woods, the railway, maybe the sewers
Hello, I'm trying my hand at making a farm map, and I want to put the pet bowl a few tiles higher than it appears ingame, but I don't know how to do it. I looked at the wiki, but I don't know what to do with this "PetBowlLocation <x> <y>". Can I just load the "Pet Bowl" tilesheet and place it where I want and the pet will spawn there?
Hi! I'm currently editing character dialogues using my mod's content.json, but I'm unsure whether I should use a single file for all the edits or if I can have one content file per character 🤔
You can organize it however you find the most helpful for yourself!
You would use the "Include" function listed in Content Patcher's documentation. For example you can have a file called dialogue1.json, dialogue2.json, etc. Or have another folder inside your mod with something like sam.json, jenny.json, etc and write the filepath in the Include function
Ohh, so the Include function in my content.json would "summon" any sub-file when needed?
Yes exactly
Awesome, thanks! I'll go check that out ✨
The sub-files will not have some stuff that goes in the content.json, such as the configschema and dynamictokens section, and the CP format. But other than that, the format is the same for them

@drowsy pewter Hi again! Sorry to bother but I'm left with this error in the console :
Is there something wrong with my code?
is that your entire subfile
Btw make your format 2.6.0, CP 1.26 is from several years ago
(I closed the brackets correctly, if that's what you're wondering haha)
That is what I'm wondering
Oh, I'll make sure to update it then
It should be Entries: { not Entries: [ {
Entries in content patcher an object not array
that being said please use this in the future https://smapi.io/json and this for your error messages https://smapi.io/log/ so it's easier to read and we get the whole context
The error is gone, you were right! Thank you so much
Got it 👌
Just need a wee bit of help (ping me?) but heres the log. I cannot figure out why this box is here. It's a body mod i'm working on. everything else works https://smapi.io/log/147d9cd6100b42ca87dcd523ebadfca7
Log Info: SMAPI 4.2.1 with SDV 1.6.15 build 24356 on Microsoft Windows 11 Home, with 4 C# mods and 1 content packs.
did you use a fill tool (idk i don't make mods)
It's a map property
Yo guy!, how can i get method full name string
for .MapMethod("Banana.Eat()", bananaEatMethodInfo) in InstructionMetadata.cs?
like this
Is that just the literal names as they are in IL
is have method helper for convert MethodInfo to Method Full Name IL String?
Quick FS question, what do I do for an accessory to be drawn beneath hair?
Looks like you want DrawOrderOverride https://github.com/Floogen/FashionSense/wiki/DrawOrderOverride-Property
Just what I was looking for! Thanks a bunch, I'll get cracking.
What is this for?? It looks like you're messing with the smapi rewriter internals.
yes sir, i want to remap some method
Remap how, in what context?
Unless you're making a pr to smapi this is not the thing you want
There is probably another tool to do whatever it is you're trying to do
i'm try to remap some method for android
Aaaah android modding, that makes sense
In that case, what you want is ToString I think
Possibly FullName?
nvm, i fixed
MethodInfo that don't have FullName
Oh, I'm thinking of Type
@woeful lintel and @drowsy pewter to close the loop, I decided to use PFM instead of Extra Machine Configs to make the second rule for the machine to make the same item but with different "additional consumed item", or fuel. Much neater code too, 20 lines instead of 65
Thanks for your help! It's good to know there is technically A Way to do it using CP and EMC
that'd be worse for compat, but if it works for your case
It's a personal mod, the only one impacted is me 
I love your new pfp
@drowsy pewter
Hello again, is there a template for making marriable npc's or a video or something? I'm pretty basic at coding and new at it. I know about the wiki but I need something that can explain it like I'm 5 years old.
!npc
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!
not likely to be any video tutorials that are up to date enough to not be detrimental to use
Thank you
How do you guys remember all these ! links 
You watch other people use the commands a lot
Theres a lot of super common questions so you see the commands to answer them all the time
Impressive, I don’t think I could remember the right prefixes lol
There's also a list of all of them somewhere
If you do /list gov will give you a link
There's a lot though and I don't know what most of them do
Just the most useful ones
Like !stone
Ooo thanks
Hello! I'm trying to debug this error for Clara and I'm kind of stumped. Could someone perhaps lend me their eyes?
Basically Ripley is not saying saying anything in the place in her schedule where she's supposed to be saying Paddock1 and Paddock2.
Tried checking if she maybe didn't have enough time to perform the schedule (she does), she is in the correct tile where she's supposed to be, and the i18n keys match and the other schedule dialogue works so it's not a matter of anything being broken in the file... 
Heres the json with her schedule https://smapi.io/json/none/aff59a946bbf4eb0a46f99fa9d643616
and the json with the strings https://smapi.io/json/none/b7cc354ce7e7421da3297fe0a6f7a1ee
Pst you have two of same link
Where do I start making a Mod for Stardew Valley?
I want to make a mod that adds the ability to make meat by putting the animal's produce into a Machine and getting the animal's respective Meat out of it
!startmodding check the content patcher guide
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.
content patcher allows you to modify game data to add your own stuff; in this case you want to add a new big craftable (if you're not using an existing machine) to Data/BigCraftable, and then new machine rules to Data/Machines
[[Modding:Index]] has an index which points to craftable/machine data
(optionally you can edit shops or recipes to make your machine sellable/craftable)
Question; I made a custom coop animal whose sprite needed to be bigger than 16x16 for details, but it won't leave the coop. Going behind the coop to get a transparent view lets me see that they did spawn outside, but they're stuck inside the coop. Any way to work around that, or do I take the easy route and make them barn animals? They're still fairly small in size, but they just keep getting stuck in the coop door.
sound like a case for squeeze thru, selph?
If you try to patch parse the tokens in that line, what happens?
I'd also be curious as to if anything is popping up in your error log
Nothing in the error log. I’m doing some finessing and it’s definitely an rrror in the schedule (something similar happened to me with sterling when I made it so he had an entry in thr schedule of an earlier timestamp than the last entry) because after the schedule entry where she’s not saying her line (paddock) she just goes to sleep outside instead of heading inside
Let me try patch parse
It’s not upset 🤔
``[Content Patcher]
Metadata
raw value: fall
ready: True
mutable: False
has tokens: False
Diagnostic state
valid: True
in scope: True
ready: True
Result
The token string is valid and ready. Parsed value: "fall"``
I don't know if there is anything unless someone writes a C# component to overwrite Polysweet's C# component
@merry rampart
Other than the when condition of.. you know... removing the entire NPC/etc from existing if polysweet is installed
Its possible to write the c# but I fear the drama you'd be subject to if you publish the anti polysweet
tbf a mod can always patch out your patch
Like an explicit anti polysweet
I could make it REALLY not fun for the player by doing the same mail flag work around I did to make a similar event to the cheating one in vanilla
polysweet could even put in a workaround for it
And yet.. so many people would rejoice
Yeah it'd be like security arms races
It wouldn't even be a published mod because I know no one would install it (unless people made it a req for their mods)
I meant more as adding a C# component to your NPC mod
Worth noting that mods which intentionally break other mods can be banned from SMAPI
except you can't even obfuscate your code bc its c# il 😆
As someone making an NPC who isn't poly it annoys me greatly theres a mod that refuses to respect my wishes and then ppl will come to me and complain about it
It wouldn't be to break the entirety of polysweet, my idea is specifically to make it so that MY NPC (or whoever has that C# component WITH thier npc) cannot be patched by polysweet. wouldn't affect anything else it does, just doesn't let it touch my stuff
if that makes sense
If you figure that out that’d be so cool
the only other time I've seen this kind of thing, it was because the token wasn't ready, so unfortunately, I am at a loss here
The npc I’m working on isn’t poly either
I guess technically it's not mods that break other mods, but mods that intentionally break the game in the presence of other mods, which has only happened once as far as I'm aware
(I love y'all, but you were burying poor Hime's issue)
I got other things I gotta do today so I gotta duck out
You need this mod
https://www.nexusmods.com/stardewvalley/mods/33514?tab=description
(note that if it has to be big, it has to be bigger than 25px because of another bug)
until it is fixed you can make it 32x32 but add whitespace around it
Conveniently I am using 32x32 already, so that works. Nice, thanks.
they dont care enough to do that, its been proposed numerous times
- npc mod puts "when hasmod|contains=polysweet false" on their npc: arguably just a "compatibility fix" or whatever
- polysweet patches something or other to disable the "when hasmod|contains=polysweet false" condition on the npc mod: arguably their own "compatibility fix" as well?
- npc mod patches polysweet to disable their patch: probably too far tbf
The previous example was much more malicious
It was "mod is installed so crash the game"
ah 😨
I remember the incident matt
Ppl got way to petty let's just say that
ofc, but if someone were dedicated enough they could definitely make like a "<npc> polysweet compatibility mod" or something, which obv the creator of the npc might oppose
That's the only time I've ever seen it be stated that the consequence is for the mod to be banned by smapi
Made this is a very back in my day war story xD
Also sorry Hime I did take a look but I cannot figure out why the string wouldn't be working - especially if the other ones in your other schedules are working just fine too
I think the solution is a mod needs to be created called MonogamySour, whose sole purpose is to ensure that NPCs are monogamous
Why sour 😔
Sweet and Sour are like Yin and Yang
Aw man, I wasn't the first person to make that joke
Only if it's quick, I've gotta feed my cats lunch in 20 minutes
Anyone know if the person that made this mod https://www.nexusmods.com/stardewvalley/mods/21577 is in discord? I wanted to ask them a dumb question since I'm trying to make my own paths 😅
Got it, it's a self-guided, tabletop, role playing game, with no support material
this seems to be their account? not in discord anymore though #making-mods-general message
oh rip
I wont bother them then ,if they left means they don't wanna be bothered about it
They are in the Stardew Valley Expanded mod, so maybe you could message them there?
oh! I might, if I can't figure it out myself. I'm burning my braincells trying to figure out on my own
You can also ask here, it's not like they alone hold the knowledge to custom paths
No
The secret to cusrom pathos is yarizen's alone
.... I'm leaving the typi
Pathos where do I get pathos llvm
We have custom Pathos now? Oh how far AI has come.
o.O
Is that like CustomGPT?
(But in all seriousness, lots of people here know lots about the game, so you don't necessarily need to go find one specific person to get answers about something.)
It's just that I'm so into the newbie level that I feel bad for asking the channel very dumb questions XD
I'm reading the documentations but sometimes it goes over my head on what they mean
Anyone who hangs around here is typically willing to help
Otherwise, they'd be over in #programmers-off-topic instead
🥹 Thank you. I'm trying to understand the logic of adding an item id.
So Claras Ripley strings aren't working? But they are loaded, right?
The mod wiki seems to suggest you better name it unique like the mod name but I'm checking moar paths as a guide and they seta number instead. I'm trying to figure it out
it uses strings for the ones at the bottom
the mod mightve initially been created before strings were allowed
ooh
The recommendation is {{ModID}}_ItemName
literally just {{ModId}}
but I have no idea where the 13 and 936 came from lol
modid is a content patcher token
they made up the 13 bc vanilla only goes up to 12
and so 13 was next back when you presumably had to use numbers
so this?
now you can make the 13 into whatever string you want
oh makes sense
Content Patcher will turn {{ModId}} into that UniqueID yes
whatever is in your manifest.json
its basically a shortcut so you dont have to keep writing out the whole UniqueID every time
^
k let me try to take that in so I figure out both id and itemid fields
i have once again returned to try c# again
Tell us of your journey lani
its everyone giving me the answers and me not knowing enough to do anything with them
thats the journey
i try and write a check to see if the player has enough money, my entire visual studio breaks down in tears /j
Surely its game1.player.money
no i know that
but comparing it against... what... blueprint.BuildCost + requiredCount??

you find out how much wood the player needs to purchase. they need 100 wood
you find out how much wood should cost. it costs 25 per wood
100 * 25 = 2500 to buy all the wood they would need
you take the players money. compare it to 2500. do they have 2500? good to go
oh, so we're not adding it to the cost of the blueprint? because what if you cant even afford the blueprint BEFORE buying the resources?
so...am I too far from the right thing?
There's 2 ways to do it Lani
i dont know if i remember correctly but i thought you were adding a button to click thatll give them the materials they need
- Alter the blueprint entry to include wood stone cost in the price
- Give player required wood and stone then take away the money
no, it was a toggle to add the missing resource cost of a building on top of the building cost
hm
I think 2 is easier to conceptualize and test while 1 is more integrated
with option 2, do i still follow through with the building purchase?
i dont know what C_Paths is but if thats something custom you'll need to Load it, and it doesnt have to go in TileSheets, and it also needs a ModId
otherwise you're missing a Format line but everything else looks tentatively correct at a glance
Yeah cus player now has enough wood
!json use this too in the future
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.
yes it is
it's where the tilesheets are spread between seasons
I'm just following the structure of the other mod haha
are there no other more up to date/recent paths mods to look at /gen
not that I found
maybe I missed some?
all the others I found are substituting paths
my goal is to create new ones instead
many great paths out there but all the ones I use are either substitute cp or AT
unfortunately i am a bit too preoccupied to be able to explain like. the process of Loading things and spriteindexes and what targets are and whatnot but if you arent supplementing your learning with the wiki documentation for paths (i hope it exists? idak) i would defer to that instead of the mod
as it is not using the most up to date practices
I'm trying to use wiki knowledge but it's all a bit hard to understand to me. Like I said I'm super newbie
if a different paths mod just replaces the vanilla ones with custom textures but is made more recently thatll actually probably be better to follow
bc you can just do the same thing but with a different Entry key and path ID i.e. not use a vanilla, existing one
Hmmm I will try to check some then!
ok by this i more meant do i run the method to purchase the building or do i just. you have the mats now and then the player can do it themselves
Yeah
which one. lmao
Ppl can just do it themselves
But that's also why 1 is more integrated
It should be possible and safe bc blueprint entry is not the direct data entry
but you said 2 was better for testing(?)
I'm gonna check that one, thanks! I'm trying to make a simple template for myself so I can work on future paths. Even maybe convert existing paths if the mod owners allow me, of course
Have you unpacked the game files and looked at Data/FloorsAndPaths already? @balmy venture
Everything you're doing is basically trying to add to that file by matching that file's format
lmao so i tried out the mod in game, it does NOT grab the stone at all
Nope, I was under the impression that custom paths would be different from the core game method
but it DOES buy the wood
and it lets me keep. buying it. even if i have the mats now
As of SDV 1.6 most custom things are added in the game's internal formats
99% of things will be added to data the same exact way the vanilla game does it, practically speaking
I'm gonna check then
I know vanilla has tilesheets with many different paths, I was trying to add singular paths tilesheets instead as it's easier for me to edit
Yes, you can provide a custom texture with only your sprites, and the index refers to where on the sprite is your path
Or rather, X and Y
ya, 0 in this case right
Yes, 0 would be starting from the top-left of the image
yup
since it's only one path per template I left it as 0
at least that logic I understand well haha
I'm checking vanilla files, only thing I dont get is id and itemid, from the wiki it sounded like the same thing but maybe my newbiness and non native english knowledge let me lose something
ItemId I believe refers to Data/Objects. It just has to match.
question(?): so it's only letting me purchase for wood mats, and not stone. i just added in a new check for if you already have the required amount, then to ... i think it'd be continue and not return, so im gonna try that now ^^;
And you can use a friendly name now instead of a number
Data/Objects is what the player crafts and has in their inventory, Data/FloorsAndPaths is for when it's placed as a path
That helps, I'm trying to understand how vanilla does seasons so I can match my paths
ok im feeling rejuvenated
important: Id and ItemId are NOT the same thing. ItemId is like Matt says, it refers to the entry in Data/Objects. Id is just you giving a made up identifier for your entry to differentiate it from other entries that add a path
so much to learn my head is going into haywire haha
I think 2 is perhaps more immediately understandable (you are performing the actions yourself) while 1 requires you to understand CarpenterMenu more
Since it is learning project too it's good to explore different approaches
I understand they refer to different things but I'm trying to understand how they would differ when making their names
(also re: Id, typically it matches the key you used for your entry too)
you make both of them whatever you want, but they dont need to be the same as each other
when you add your path item to Data/Objects you are giving it an item id that you create, typically something like {{ModId}}_MyCoolPath
but they can right? Since I'm making one solo path template
then when you add to Data/FloorsAndPaths, you'd put {{ModId}}_MyCoolPath as the ItemId
you can make the Id also {{ModId}}_MyCoolPath but you could also make it {{ModId}}_MyFloorsAndPathsEntry
the point is just that they dont have to be the same because they are used for completely different purposes, so dont confuse them, and make sure you include both
got it
ya I will search and check other custom paths and compare to vanilla to help me understand other stuff on how to organize the mod better. After I manage these basics I can just go from there for other creations as well
does anyone know how to add a seed item for a fruit? have all the sprites for the crop and the seed packet, but the seed item comes up with an error sprite. also, all the tutorials I found about adding crops seemed outdated
sorry new at modding
welcome to my club
[[Modding:Objects]]
@lucid mulch did that smapi thing with content loading ever get pushed to the main branch?
ohh thanks ill check that out
i am so cheesed this is finally working and doing what i want it to
time to unfortunately get into HUD messages
Grats, I hope I get there too 🥹
does anyone remember/have the link to the sdv audio cue list or whatever
i cant seem to find it on google
aaand i found it.
of course.
[[Modding:Audio]] it's linked here but I've also been doing a lot of documenting on this page as well
sweet
omg it has sound effects and hud now when you already have stuff ahhh
i am cheesed!
now my only gripe is that my log prints twice if it goes to grab wood AND stone, instead of just printing once
idk if there's a way for it to guarantee it runs once per purchase, and to treat the purchase as like... one. thing. but that requires making seperate variables for wood and stone, and i dont wanna do that, so i wont
but its WORKING so im happy
now, to make it a toggle on the screen that you click rather than a button press... the real challenge time
Draw code 
honestly draw code does not scare me as much as getting the thing to work does
but im past the hard part... nyehe...
Sometimes I write draw code by just modifying something CA already did but truly I could not say why it works
nodnod
like what even is this
i'm afraid to touch it ever again and i hope it never breaks
i kept messing up the math to center things by forgetting to divide stuff by 2 lol
Lani the modify blueprint option won't actually require you to make any draw code
Bc u just modify the actual valves and let normal draw code do its thing
oh!
ok yayyy
but i did want to make it a checkbox to add the price, so i still dont use draw code?
like a lil checkbox in the menu thats like. "Buy missing resources?" and if u click the checkbox, it recalcs the price and yadda yadda new price
if u want to add that u need to at least call the draw somewhere yea
but u can make it a button rn
like a keypress to toggle between original price and adjusted price perhaps
hook up to ui later
ok!
alright lets rewrite to make it a bloopy adjusted price
thats where the struggles started, really 😔 involving the bloopies...
I love math
Math for the math gods
alright, things are starting to go wrong i think
New quote added by atravita as #6388 (https://discordapp.com/channels/137344473976799233/156109690059751424/1375230490100891648)
is there a step by step tut on how to make skirts & shirts?
i want to recreate this outfit but i dont know anything about pixel art & coding 😭
~ found it idk why that took so long to find, hopefully the wiki is helpful 😭
can you not set the description of an item to use something with [farmerStat MyStat] ? It always shows 0 when hovering the item even when I can check via debug that the stat is not 0.
alright, some questions for the csharpers.....
- how do i show the new value of the blueprint? if i set totalPrice = blueprint.BuildCost after calc'ing the new cost
int basePrice = blueprint.BuildCost;
int totalPrice = basePrice + (requiredCount * item.salePrice());
totalPrice = blueprint.BuildCost;
do i need to do anything else, or does the buildcost magically change upon me editing the value?
- i'm assuming i need to do a new function entirely if i want to start calling spritebatch stuff, since i can't do it in my ever-growing foreach statement? like display_renderingactivemenu or whatever it is
bye
Hi bye!
Descriptions might be cached yea depends on the item
You can check what happens if you switch language perhaps
Yeah when I switch language the number gets updated
any way to force it to update?
like could I set the object description to something else and then back?
Hi, anyone in here know a bit about resource clumps? (like boulders and stumps)
My mod is having trouble with them
vanilla or otherwise? if youre referring to item extensions, then that mod is a bit broken rn
The game registers the first hit, with axe.doFunction, but ignores any more hits, even though I'm calling axe.doFunction on it again
vanilla
I'm working on MultitoolMod
Blueprint uses property getters which directly reference data, so you cant assign a new value
you'd need to harmony patch the getter
oh........ (crying)
oh no what's up with item extensions rn?
well I tried setting the object properties normally in editdata -> entries and then hitting the description in an editdata -> fields afterwards, no luck : (
you cannot set the description to something else after the item is created with your patch. the item doesnt read from the data after its created
that is what caching is
BETAS has an action that can refresh any field on all of a single item id in the world
by setting it to what it would be if you spawned a new, fresh item
OK, thank you for the explanation
on the plus side no better time to get into harmony rite
https://github.com/zombifier/My_Stardew_Mods/blob/master/CustomBuilders/ModEntry.cs#L74 example code
actually
Looks like you'd need to set axe.swingTicker++;, the way Tool.endUsing does? Resource clumps seem to use it to prevent multi-hits from individual tool swings.
public override bool performToolAction(Tool t, int damage, Vector2 tileLocation)
{
if (t == null || this.lastToolHitTicker == t.swingTicker)
{
return false;
}
this.lastToolHitTicker = t.swingTicker;```
can you manually construct a blueprint entry object that references a manually created building data object
oh my god so shrexy, yay! example!
That looks promising, I'll try it and let you know
Bless you forever, this worked.
Hey guys, is there a way to add a custom stat with ContentPatcher??
use the trigger action action IncrementStat
stat doesnt need to exist to increment it
itll be created
if it goes back down to 0 it'll be deleted
Okay I thought so. I've been having one hell of a headache trying to make what I'm working on work. Thank you!
im just gonna edit the trigger actions page to say that
(nvm ignore me if you saw that msg i deleted, i misread smth)
(as I brainstormed earlier, you might be able to skip harmony if you just wholesale create a new blueprint entry object and replace the menu's blueprint with it. That approach is infinitely easier)

i shall try
SMAPI tells me this: [Content Patcher] Can't apply data patch "Romance Expanded > Include Assets/Data/TriggerActions.json > CustomTriggerEvents > entry #1" to Data/TriggerActions: failed converting entry to the expected type 'StardewValley.GameData.TriggerActionData': Error reading string. Unexpected token: StartArray. Path 'Action'..
post your json at the usual site
Will do
though that screenshot works too
That should be correct
that looks fine to me, hmm
can you post the code using the site then
Are you sure that is the version the game is loading
and/or did you save
{
"Changes": [
{
"LogName": "CustomTriggerEvents",
"Action": "EditData",
"Target": "Data/TriggerActions",
"Entries": {
"ReputationTracker_Length": {
"Id": "ReputationTracker_Length",
"Trigger": "DayEnding",
"Condition": "PLAYER_NPC_RELATIONSHIP Current Any Dating Engaged Married",
"HostOnly": false,
"Action": "IncrementStat RomLength 1",
"MarkActionApplied": false
}
}
}
]
}
Did I do that correctly, like the pasting? It told me I'm missing Format but I'm confused bc it's a file from an Include Action
Maybe I didn't save correctly?? I'm going to try and see if I'm missing something
(if its in an Included file, ignore the warning about Format)
Ahhh okay so this should work correctly. I'll fiddle about some more and see
IT WORKS. No idea why suddenly. But victory is victory
question for the C# people or people who know a lot about the multiplayer shadow realm:
for this mod im making i have a Manager class and inside that class i have a field that references a GameLocation. this has worked perfectly fine for both singleplayer and multiplayer up until now. i have code that will add some data to the modData of the GameLocation referenced in this Manager class. it only runs on the host that way i can be sure its added to the non-shadowrealm version of the location. that works fine on the host ofc and when I'm on the farmhand and check Game1.currentLocation.modData when inside that GameLocation, the mod data is there ofc even if I wasnt present with the farmhand when it was added. so its getting synced to the farmhand fine.
however, if instead of using Game1.currentLocation.modData on the farmhand, I instead look at Manager.LocationReference.modData, the mod data is not synced to that GameLocation, even though i previously thought it'd be referencing the same thing. i assumed that when things like modData and such were synced over, that it would like, overwrite stuff in the original GameLocation? is it actually creating a whole new GameLocation? is it very bad for me to be storing GameLocation references like this without requiring people use AlwaysActive? (bc it works perfectly fine if the location is AlwaysActive)
im kind of stumped while making seeds for a custom crop; i was looking at the blueberry seeds code as an example, but why is the texture set to null? also i noticed that the crop and the seed id's are the same.
"Name": "Blueberry Seeds",
"DisplayName": "[LocalizedText Strings\\Objects:BlueberrySeeds_Name]",
"Description": "[LocalizedText Strings\\Objects:BlueberrySeeds_Description]",
"Type": "Seeds",
"Category": -74,
"Price": 40,
"Texture": null,
"SpriteIndex": 481,
"ColorOverlayFromNextIndex": false,
"Edibility": -300,
"IsDrink": false,
"Buffs": null,
"GeodeDropsDefaultItems": false,
"GeodeDrops": null,
"ArtifactSpotChances": null,
"CanBeGivenAsGift": true,
"CanBeTrashed": true,
"ExcludeFromFishingCollection": false,
"ExcludeFromShippingCollection": false,
"ExcludeFromRandomSale": false,
"ContextTags": null,
"CustomFields": null
},```
The texture field defaults so maps/springobjects if not set
also yes, they are meant to be the same
In mp, locations are only synced if they're either the current location OR marked as always-sync in location data (like the farm)
The key of a Data/Crops entry must be the id of the seed item associated with that crop
(unless you're host or same computer)
ohhh okay
i know this, but the mod data is not synced to the reference in my manager class even when it is the current location
My guess js yes, you're correct
Oh, that is strange
thank you!!! that makes sense
Can you look at the memory location of each
Actually just object.referenceequals them
i will report back
Do you have it in your own netref/netroot?
dont really know what that means, to be perfectly honest!
Locations all have their own root, so if you put it inside something else it might break the tree
Do you have the location in a netfield or just a regular field?
its just a public GameLocation location field, so nothin net
No idea then
ill try the referenceequals thing first after the million years it takes to launch both my main instance and my farmhand instance
(it would help if i didnt forget to turn off AlwaysActive first...)
they are indeed not equal references
Oh dear
Not yet
well, a quick fix of just changing that field into a property that calls Game1.requireLocation works, i suppose... i guess its not the worst when most of the time thats checked, it will be the current location
how do you add something like a random, small chance for you to get something when you do an action? like a treasure chest, or harvesting a specific crop
And yes non-active locations create new GameLocation references every time when doing warps
sorry im asking so many questions! just really new at this stuff
at least i found that out before publishing 8')
you download a mod like BETAS that provides a whole ton of new triggers to react to different things that happen
There is a multiplayer map cache functionality that preserves some stuff locally, like the xtile map itself, tracked map modifications and one or two other items
ooh okay
(i am jus glad i can get away withchanging that field into a computed property that easily and dont need to refactor Everything right at the finish line)
hallo
just a few mini issues before my farmhouse mod is 100%
I've got the modding wiki open and im trying to make some walls and floors able to have changeable wallpaper and flooring but one/two of the rooms arents changeable
You need the tile properties
The wallID and FloorID?
Since you mentioned that you have some working rooms, you can copy the tile data from those and just change the id
Yeah
They have them
And they're on the right layer?
maybe i spelt it differently one secon
Make sure the capitalization matches, too. Tile props are typically case-sensitive
nope
still cant
Also a bit annoyed that....
the kitchen counter decided not to shorten like i have it in tiled
Is there a handy token from ContentPatcher that will place the name of person you're with romantically? They have one for spouse but my understanding is that it only covers if you're married. Essentially a version of {{spouse}} that shows the name whether dating, engaged, OR married.
To be clear I've been reading the tokens and conditions guide top to bottom and unless I'm totally missing it there isn't one that does that. Relationship places the type of relationship, not the name of the person you're dating/engaged/married to
one problem is that the game expects you to have only one spouse, but you can be dating as many people as you like
Tokens are already sets right
Hmmmm that's fair...
yes but if your goal is to sub in the squeeze's name in dialogue then it isn't helpful to be a set
The {{spouse}} token also covers engagement
Although it would be nice if there was a token that told me if the player was a two timing old fool
pretty easy to add one, retired modder atra
are there any step by step guides with pics for making shirts or furniture??
im reading the modding wiki but none of it makes sense and imo isnt that beginner friendly, or stupid friendly bc im lost 💀
Essentially I'm trying to get an action to fire when breaking up with somebody and I was hoping by using TextOperation, Append, and tokens I could squeeze in having an action fire within the BreakUp dialogue. My mod is trying to expand romance by adding a reputation system and one of the metrics tracked is the length of your current relationship. I want the stat to reset to 0 by having the action set a different stat (BrokenUp) to 1 and then using a TriggerAction that fires on DayEnding it can fire bc the stat is above 0 and reset the RomLength to 0. The reason I'm not just having it be a TriggerAction that fires at DayEnding if the person is single bc they could theoretically break up and get with another person on the same day. But as I'm having this convo I'm realizing the multi dating means it still won't necessarily be accurate.
The reason I was hoping to use tokens was so it could be easily slotted in with modded characters and so on
Back to the drawing board. I need to think of a modular way to track RomLength as well....
Can stats have a token attached to them?
Hey, if I ever do anything of use in the stardew space again
Okay second question now: "A query expression is an arbitrary set of arithmetic and logical expressions which can be evaluated into a number, true/false value, or text."
Does this mean a query expression could be used to output an NPC's name? Like would this PLAYER_NPC_RELATIONSHIP ever be able to output a name or is it only a True/False kind of situation?
you cannot use GSQs in a token
unless that token is Esca's Modding Plugins's GSQ token
and all GSQs are only ever true/false
they do not evero utput anything that is not true or false
or error
any way to display a short little message in the corner of the screen when the player exits the farmhouse, without fading into a whole event? would rather not use mail for this but maybe that's the only option
stats cannot have a token "attached" to them because the game has no idea what a token is and never will. it has no way of knowing you are using tokens ever
you can use tokens in your patches like you can anywhere else, and theres nothing stopping you from using a token in your Action in a Data/TriggerActions patch
spacecore has hud pop-up messages if those work for you
with C# you could make a token that has stats in them, but stats are a very fluid value which makes it a non-ideal fit for a token due to update rate
Esca's Modding Plugins also has a Stats token
if thats what you meant bittersweets then it can help you there too
That's good to know. Thank you both, I'm going to look into the Modding Plugin
if its not on the modding wiki there likely is not a tutorial for it, let alone one that is updated to 1.6, so your best bet is to just do your best and ask for help in here if you get stuck, where people will often be more than happy to help
thanks, that would probably fit the use case but I'm already adding two dependencies in my next update. I'll put a pin in it.
many people ask many questions so theres no worry about asking too many
if you're using Fashion Sense help is a lil more limited and the guides even less existant but there are still people who could help if theyre around
if you're using content patcher for your shirts then the content patcher basics will be the most helpful to learn as adding shirts is little different than adding anything else
same for furniture
SpaceCore is one of the safest dependencies due to how prevelant is anyway
approximately 262 mods depending on it, so you'd be in good company
yeah I almost did add spacecore for something else in this patch but ended up going another direction. May end up using it eventually but this is a very minor thing.
you could always put it as an optional dependency
if someone has spacecore installed, they get a hud message, if they dont, then they get nothing
Hey! I'm looking for some advice. I've been working on a series of mods that improve/polish the vanilla portraits and overworld sprites. I've finished six so far, but I'm planning on doing all of the NPCs eventually. I've been trying to decide if it would be smarter to upload each character as an individual mod, or hold off and upload them as one big mod (where you can configure which ones you want to use). I'm not sure what people would prefer, or what would have better reach. If anyone has any input, it would be much appreciated!! Thank you :3
just going off myself, i would be more likely to click on a mod that had a whole pack of NPCs available
i think users get a better experience if there's just one mod and they can configure it
but also, nexus might not like you doing one at a time either
they might also not give a shit, or they might think you're DP farming
single mod with config options, personally it always leaves a bad taste to me seeing a dozen individual pages for what's essentially the same mod
just think of the nexus hosting costs. unbelievable
if you want to build hype before release you can upload previews/teasers to the media section
SDV mods are generally pretty lightweight in filesize so you likely won't even need to separate it into optional files, there won't be much bloat from a couple of extra PNG images and text files
(do people look in there? /gen)
(nope)
tbh, i had to think for a second to remember what media section you even meant
someone must. whenever i look at it (QED, i guess) the posts have numbies
numbies...
simply use the Articles tab to build up hype for your mod with bespoke blog posts
Got it. Doing YouTube previews
(you'd probably get better reach using the mod showcase in here to build hype. as long as you arent spamming it, ofc)
||preview is just some random snippet of a visual studio window||
God I hate YouTube premeurs
HALP
i have 6 miniproblems that i cant solve by randomly placing black tiles
lol
i even made myself a list
- Walk-through Walls: Bottom left of second nursery, Left side of staircase to LargeRoom, both staircase walls to Bathroom
- LargeRoom's Front layer won't show
- Kitchen counter isn't shortened like it is in Tiled
- Staircase to LargeRoom still has room divide and shading
- Room border tiles still have notches
- Wallpaper/Flooring won't change: MainBedroom, to tiles at base of MainBedroom staircase, lower wallpaper behind crib
theyre in order of most important (i think?)
i just need help tackling them
....anybody?
Unfortunately i dont know nothing about farmhouses so I can't help
maybe some of the issue is the tilesheet order, i just noticed the wiki has a little note about it
maybe ill solve my own problems?
it solved nothing 
!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!
is there a modders resource that shows all the event names that each character appears in? im changing a characters pronouns (i am trans, its tasteful) and going thru each event file is gonna take awhile
thanks!! there’s a command for everything lol
you can search a filepath for all instances of a name
Looks like the issue is mobile formatting, try switching on desktop mode or rotate your phone
idk how you do it in anything other than notepad ++ but if you look that up you can probalby figure that out
ive alr got notepad++
tysm!!!
for example :3
and then it should pop up a window with all instances of that character being referenced
ohh thank u
ok back to reading 🫡
Not sure if you noticed when I tagged you yesterday, but there might be a solution for the missing Front layer!
If a FloorID tiledata object is on the same tile as your Front-layer wall, then the back tile will draw on top instead, so check that you didn't have a TileData object extending on those sections with the missing Front tiles in game
Alternatively, if you need the floorID tile data on those tiles, you can move your wall to AlwaysFront
- the wall behind the default crib is hardcoded, there is a mod that lets you change that
Ok, you need to move your walls to AlwaysFront on the bottom
the crib one doesnt bother me much, not as much as the other issues
Because you do have tile data objects there
the bottom row, right?
Yes
im getting annoyed that i suddenly start clipping through some walls and black boxes arent fixing it
Make sure they are on the Buildings layer
And not Buildings2 or something
The boxes, that is
oh does there always have to be an objects layer for each tile layer
No
For the primary layers, you might(?), but I don't think you need to for numbered layers
If that was the issue you would probably have an error in the log though
should i make an alwaysfront object layer for that bottom row?
When in doubt, check against the default farmhouse map
You typically never want less layers than the map you are replacing.
I'm never getting into mapping
It's not that bad if you always work from a vanilla map as a base xD
That solves most of the common issues
i figured if i defeat the hardest modding area (farmhouse map) itll make my life easier to mod other things (like i have the want to make animated portraits)
theyre on the right layer so something else isnt stopping clipping
mapping is easy until you decide to start adding floorid and shit to your stuff
its great otherwise! lol
I had zero issues with floorid after we figured out that my only issue was that it was broken in custom renovations at the time I tried it
welp it almoost worked
for some reason, its meshed both the vanilla map and mine?
Like its mine except for a few vanilla things like the room border notches and the kitchen counter is still extended
The kitchen might be hardcoded to draw a certain size based on the tilesheet but I am unsure.
its gotta be, i shortened it in each map the kitchen was included in
ive seen mods where the counter is toggleable but i wonder if they made the map from scratch because i built off the vanilla so it might be hardcoded on vanilla
Making it from scratch wouldn't change that effect
damn
When something's hardcoded in the farmhouse, it's not tied to the Tiled file so much as the actual game asset at that path
Which you have to inject your map into the same path in order to have it even show up there, sooooo
as far as changing to wallpaper and flooring....
but where do i check if its "decoratable location"
Custom renovations are automatically decoratable locations now. Farmhouse is also decoratable by default, as are sheds.
but then why isnt the attic i adjusted customizable
it wont let me change the wallpaper and flooring
maybe its the wallpaper and flooring i used to make it?
the darker version
Are the tiles you are using for the default wall and floor from a tileset with "walls_and_floors" in the name?
that's required
i thought so but i can redo them to be sure
by default Tiled makes new added tilesets named "untitled tile sheet" which won't work here.
Is it possible to get mods on switch?
example from my bathroom reno
it’s fine for my to go into the files of the mods i have downloaded right?
i think it’ll help me figure out wtf im doing but i dont want to mess anything up
Pretty sure that no, and this is the wrong channel
Not possible without hacking your Switch at least, which we cannot and will not discuss in this server.
as long as you're not saving over the modded files themselves with changes, you should be ok
(if you make changes, you need to save it as a copy or an entirely different file to prevent accidentally messing up the existing mod files)

found an issue with your wallpapers and flooring?
I promise the renovations can use changeable walls and flooring. xD
something is set wrong
lmao
i renamed the room? But i also renamed the other rooms and they can be customized?
trying to think if there's another step you might be missing
Did you include the FloorID and WallID for your attic in the Map properties?
yep, but idk what the numbers after the names refer to?
the numbers are the spriteIndex on the sheet used for the default wallpaper or floor
the numbers are optional
ah so its probably not them
Lemme see something, I bet you need to add them to the Farmhouse itself still
i copy pasted the map property Floor and Wall IDs to each map though T_T
The thing is, I already know I'll want to go into fucked-up stuff if I ever go into mapping. Also I'm anticipating having to setup Tiled on Linux
I did mine via code so I didn't have to fight with the fact that map properties do not transfer when you do EditMap actions.
would you just add that into the json?
yep
id have to figure out what to put in the values though
I only target Farmhouse2 because my renovation goes off the hallway.
i used the vanillas
The MoreWalls:0 and MoreWalls:1 thing were for my custom tilesets
again, those values are optional
"LogName": "Add FloorID for Ginger Island Bathroom",
"Action": "EditMap",
"Target": "Maps/IslandFarmHouse",
"TextOperations": [
{
"Operation": "Append",
"Target": [ "MapProperties", "FloorIDs" ],
"Value": "Fireredlily.IslandBathroom 23, Fireredlily.IslandSERoom 23",
"Delimiter": "," // if there are already floor IDs, add a comma before this one
}
]
},``` this uses the default walls_and_floors set to match the Ginger Island farmhouse floor and walls
So there's just a number with no texture name
(23)
i can make mods on my steam deck with just the on screen keyboard?
sure
if you hate yourself
Why not get a proper keyboard and moise
You can grab a USB unit from the thrift store for a few bucks
I've gotten fast enough at typing json on my phone for example on discord that I could make mods just using my phone lol
oh true didn’t think of the thrift store
im very much broke rn 
my json is missing an end piece and i cant fiigure out what it is lol
i just want to make harvey’s mustache blue if i come out hating myself it’s ok
You haven't closed your changes block or the whole field
File, I mean
You can click on each bracket and it will show you which one it's paired with
Hello World, anyone can tell me
what is menu "public class LetterViewerMenu : IClickableMenu"
and how can i open this menu
Your ending should be ] }, you have two }
thank yooouuuu
that's the letter window when you open mail
is that not a thing on Android
this menu?
yes
ok, one sec
on android
thanks 👍, i just try to add missing method for OnPageChange() on class LetterViewerMenu
@latent mauve it didnt work 
fk it ill worry about it another time i just wanna play now
your renovation exists on farmhouse 1 and farmhouse 2, so you may need to change the target to target both
Also I feel like your value is wrong
(it should match the FloorID or WallID you use in your TileData object)
Yo guy! another question, my SMAPI PC it's very slow to startup
https://smapi.io/log/79a18c8466eb463285b94664c6089305
my pc: cpu ryzen 5 5500, gpu gtx1070ti, ram 24gb, ssd nvme
that is slow, normal or fast?
Log Info: SMAPI 4.2.1 with SDV 1.6.15 build 24356 on Microsoft Windows 11 Pro, with 5 C# mods and 0 content packs.
Suggested fixes: One or more mods are out of date, consider updating them
if you JUST installed smapi, I've found windows (maybe microsoft defender?) is a hater of new smapi installs. if you wait a day or two it should speed up again
huh
This is probably more a question for #1272025932932055121 but your log only shows a difference of 7 seconds. Might need to provide more info in your question. (i.e. Did it get stuck at that point? How long you waited before closing SMAPI?)
sorry, i mean it's slow from starting
09:58:13 to 09:58:18 DEBUG SMAPI Loading mods...
@brave fable I got a couple issues with LOC's integration with Better Crafting:
- The custom seasonings don't work because of a strange issue where the dynamic token isn't filled in somehow? https://smapi.io/log/cee8e29ed8df4837ab44ca1f3dc0c86d
- Qi Seasoning do work, but each cook eats 4-5 seasoning item instead of 1, and gives an iridium quality item instead of gold. Strange part is, if you have less than 4 in the inventory they get consumed correctly. They don't cause any errors though.
Both tested with just LOC and BC. Let me know if I should post this somewhere on the mod page
(posting in here as well because that dynamic token error is fascinating. I'd look into this myself but the public repo's definitely out of date)
Log Info: SMAPI 4.2.1 with SDV 1.6.15 build 24356 on Unix 6.14.7.1, with 9 C# mods and 2 content packs.
(are you perchance loading the tokens too early?)
(no idea what's up with 2, since as I said the source's outdated
)
So, my NPC Kenzie lives in the second floor of Lewis's house with an office. I want to encourage players to visit her more, and I'm curious if it'd break anything hardcoded other than their introductory events if I were to move the prize ticket machine, and maybe the divorce, multiplayer funds and lost and found tables too? I can't see many downsides, so I'm curious if anyone else recognises them
You may want to lines that suggest they've been moved (maybe an event or a dialogue box at the location they usual are). It took me a while to even realize that there was an extra room in Lewis' house for Kenzie, but that could be a me problem.
source is no longer outdated 😌 technically develop never was
dynamic tokens my loved and loathed
Yeah, I plan on replacing the event that introduces the tickets with one where Kenzie explains them instead, and making changes in vanilla letters/dialogue referring to them
Hoping that editing the event is the only signifigant change, and I can just search for instances of the others being named and replace
patch summary would be useful to see the state of the tokens
it took me an embarrassingly long time to figure out how to use stardewxnbhack but i finally did it 
wait this is so fun i can see all the image files
does look right to me
LOC likely cached it earlier?
thk u
still dunno what's up with qi seasoning quadruple consume though
LOC has nothing to cache, the computed value is in content patcher not LOC
can you try with this ContentPatcher build (which is just latest develop, no additional changes, but does have #1108 in it)
blueberry IS the number one source of all things dynamic token errors
Dynamic tokens are very basic though, particularly ones that don't have tokens in them themselves or any conditions
Which would give them the same characteristics as config
so... i'm working on the bare bones concept for my mods before i start writing them [just so i can prepare a script and have it follow the lines smoothly]
scale 1-10, how nightmareish do you guys think this'll be to code the logic for? xD
its got a painful amount of particulars
(I was just jokes because blueberry was patient zero for the bug you fixed)
(busy rn will try in a couple)
I'm aware, but im more surprised no one hit it with config first, but I guess there's relatively low opportunities in cp to do such a deeply nested data structure in the first place, let alone one where you want tokens in both a key and value that isn't the entry key (or field key with fields)
And most of those cases would use modid, which is immutable and so avoids this problem all together
it fixes it!
that leaves the quadruple qi seasoning eating
in current stardew without other C# mods assisting, that last section isn't trivial.
Though I think OnLocationChange update rate editing of the event to swap out the later contents (preferably as a fork event) based on sebastian/sam's relationship status could do it.
everything else at first glance seems doable assuming blushing is already a standard portrait expression
so fair, thank you \o/ i might rewrite it to just have sebastian be straight up awkward and confused by the answer cause it is sam's event and sam's mod anyways
thank youuu :D
though LOC doesn't touch qi seasoning logic right
I wonder if BC is triple firing because of the extra handler...
doesn't loc replace qi seasoning with its own mechanic for the +1 quality or something
it does, but with better crafting qi seasoning is usable (likely because BC has the logic built in)
LOC changes it for the base and LOC cooking menu instances, but registers a handler to BC's seasoning seek/use events
more accurately, BC has the logic built in because LOC uses custom seasonings
yeah, I think(?) it's because BC's built in Qi handler is stacking on top of LOC's own handler, so it's being double applied
when I changed LOC's BetterCrafting_ApplySeasoning to exit if it's Qi Seasoning it works
Might be a bc bug too
(well it only goes to gold like vanilla, while LOC presumably wants it iridium while leaving gold to the super seasoning)
is BC's handler called for base and LOC menus
i wouldn't have thought so
likewise i don't think LOC's handler can be called unless BC calls the base method
is there a way to use the debug warp command to warp the second player in a splitscreen instance for me to test my mod or am i gonna have to actually add in a warp to a map somewhere to actually reach my location
can splitscreen users use chat?
never mind i forgot hot reload works with splitscreen so i can just warp myself with a buttonpressed event
they can! apparently
if so, turn on the vanilla cheat commands and do the debug warp commands in splitscreen chat
i will do that if i need any other commands
forgot i could do that, thank you
is there an issue with the screen=1 parameter?
where would i put that parameter when putting a console command into the console
debug warp farm 10 1 screen=1 ?
quote help:
When playing in split-screen
mode, you can add screen=X to send the command to a specific screen instance.
you think i actually use the help command
it's okay to need help
TIL
im part user so i cant read part-time
Please, the cdsnhelp command is the most useful one
on the bright side i dont think i need to do any more splitscreen testing anyway since everything seems to work fine 
I can't even defend myself with it being new, the help text and split screen parameter goes back to Jan 2021
i wouldnt ever blame anybody for not knowing something about split screen
its split screen
quickly finding out who tests their mods in splitscreen 📝
if I do multiplayer I do multiple instances with localhost / blank ip
thats what i usually do, but i wanted to cover all my bases here
multiplayer in a single instance is preferable imo since it gets both out of the way and you can apply code changes
didnt wanna somehow muck up a mutex bc of splitscreen weirdness
does split screen multiplayer use the netcode?
¯_(ツ)_/¯
🤷♂️
i dont know what good testing on splitscreen versus two instances does. but i know it will let me say "Multiplayer compatible (split screen included)!" on my mod showcase post
I know it does ungodly things with its InstancedStatic crap, but I assumed it didn't use netcode, which is why I test with instances
ill be honest if there was anybody i was going to ask about how split screen or split screen netcode worked it would have been you
but I don't respect split screen enough to actually go down that rabbit hole
I care about real multiplayer and have good knowledge as to how it works
Iirc yes
I suspect the only people who understands splitscreen are casey and myuu
i wonder if split screen multiplayer would have that GameLocation problem i had
that I can answer yes
myuu is the person i thought did netcode stuff too but theyre not a person i would feel comfortable pinging out of nowhere to ask a netcode question
I've had profiler logs from split screen users where they get the stutter when the other players warp
an odd beast split screen is
Well yes
the smapi asset pipeline and all of content patcher runs twice on split screen users, its fun
Stardew is still single theeaded
Yup. Also why does it run twice...
I thought game1.content was shared
Tl;dr for the love of God do not play mooded splitscreen
maps don't use Game1.content they use the xtileContent one or whatever, but all of Content Patcher is PerScreen<>
Or moody splitscreen
All of content patcher is but iirc most of the content managers are NOT instancedStatic
the xTileContent isn't a static, its an instance value of game1 and doesn't have the attributes content has
The game locations themselves are separated yeah
but how does a shared game1.content work if CP is splitbrain and doing edits separately
i just made a custom crop just for practice and my end goal is making an npc but it's really hard, is there any middle/intermediate thing to do before that to practice?
a very very basic npc isnt that hard, I think you can just start and flesh it out as you go 
with sprites, does it start a an index of 0 or 1 to count down?
0
thank u! i thought so but wanted to make sure
when youre using move for the farmer, you're good to just put move farmer x y whatever right?
or do i have to use another placeholder to refer to farmer?
farmer is correct
with all the portraits, how do i call upon a specific portrait - for example, sam's pleased one?
beyond the given $0-4 for the basics
That "dollar designation" works for all portraits, not only the first five. You can just count the portraits (zero indexed) and use the corresponding number.
is there a stardew style pixel art guide
!pixelart
Where to Start With SDV-Style Pixel Art
If you've never done pixel art before, don't stress! It's easy to pick up the basics - the key is to start small, ask for feedback, and incorporate that into your work.
To start, you'll want an art program. See a list of recommended programs in the !software command.
Here's some good beginner tutorials!
http://pixeljoint.com/forum/forum_posts.asp?TID=11299&PID=139322
https://medium.com/pixel-grimoire/how-to-start-making-pixel-art-2d1e31a5ceab
To start off, try opening an existing portrait and changing the outfit. Start small: edit a shirt pattern, change a jacket collar, or remove a scarf and draw the clothes underneath. Ask for feedback too! The best way to improve is learning how to identify what's wrong and why, so then you can work out how to fix it.
Here's more good tips from the artist of "Celeste":
General pixel art 1: https://www.patreon.com/posts/pixel-art-1-6971422
General pixel art 2: https://www.patreon.com/posts/pixel-art-part-2-11225146
Outlines: https://www.patreon.com/posts/outlines-14106192
Shading: https://www.patreon.com/posts/shading-13869731
Portraits: https://www.patreon.com/posts/portraits-8693396
SDV has a few quirks to remember too:
- Colour limits: Limit the number of shades you use - stick to six including the outline.
- Hue shifts: Rather than making shadows and highlights lighter or darker versions of the base tone, SDV shifts the hue too. Eg. a base orange will have yellow highlights and red shadows. This goes for skintones too!
- Light source: SDV uses a top-right & slightly forward light source - check the vanilla art for reference.
Most importantly, don't hesitate to ask questions and get advice from people. Have fun!
ty :)
!pixelartinfo
Here is a selection of the best entries from the Pixel Art Infographic Contest hosted in the 2024 Pixel Art Jam:
Hue Shifting by @slender badger
Dithering by @tiny zealot
Anti Aliasing by @twilit goblet
Character Animation by @faint cypress
How to Draw Stacked Stones by @lament berry
Making a Stardew Valley Portrait by @ornate trellis
thanks again!!
i have so many ideas i’m just scared my brain is unknowingly stealing something i’ve seen on nexus 😭
!twocakes :)
If you discover that someone has made or is making a mod with a similar concept to yours, don't stress! Our community promotes the idea of "two cakes", where two versions of the same idea can peacefully co-exist. Your mod will have your own unique stamp on it that makes it special.
am I right in interpreting this as an 11% chance rather than a 1.1% chance? I think there might be a wiki typo
That aside, as long as you don’t directly copy someone’s art against their permissions, I doubt you’ll run into trouble.
it is late for me and i have done a lot of math today so forgive me if i am fully mistaken
omg there quite literally is a command for everything
okok i’ll see if my art skills r even high enough to do what i want to & go through with it 
is using someone’s pixel art style as inspo ok?
NextDouble returns between 0.0 and 1.0 so yeah 11% id assume, unless there was other math being done outside the screenshot
&should i credit them or ask for permission if i’m gonna reference it
no other math, it's just part of a conditional
Yup. Good luck! You can always ask for feedback, too, so… just throw pixels at the canvas and see what sticks.
like compounding random checks
theres another random check above it that would cause that random to not even be checked
you have to pass a 10% chance and then another 11% chance after that 10% chance
how does question fork work? the wiki doesn't go into a lot of details - with the answers, how do i label what the answers are and how do i proceed the script, and define the line between the scripts for each answer?
unrelated cp question that i probably should know the answer too but its late and im also tired: if i have an asset that is a Dictionary<string, List<Thing>>, and i want to EditData a new item into that List for a specific entry, will Content Patcher create that string key in the dictionary if it doesnt already exist if I use TargetField?
like if i wanna do "TargetField": [ "someKey" ] before the Entries, so i dont overwrite the whole list, but someKey may or may not exist
You probably don't want question fork if any of your forks have more than one route, since question fork can only do two (fork or continue current event). Instead you'll want to use quickQuestion and then use switchEvent if you want your routes to have different endings.
doesn't quick question only work if the behavior of the rest of the event isn't dependent on the answer?
No, you write event script for each answer. The only thing you can't have inside an answer is an /end (and probably another quickQuestion), but you can use switchEvent for that.
afaik yes
Sorry, got preoccupied with stuff.
BC's handler is only called for the BC menu implementation, it doesn't patch its way into anything. Next time you update, you might want to set cs e.AllowQiSeasoning = false; in your seasoning handler? Just to make sure the vanilla logic never runs, though it shouldn't do anything as long as your seasoning has already affected the quality.
I'll try to do some proper testing of this tomorrow. I really have no idea why things would result in iridium quality unless it's something coming from your seasoning data model.
// apply target field
if (this.TargetField.Any())
{
var path = new List<string>(this.TargetField.Length);
foreach (IManagedTokenString fieldName in this.TargetField)
{
path.Add(fieldName.Value!);
IKeyValueEditor parentEditor = editor;
object key = parentEditor.ParseKey(fieldName.Value!);
object? data = parentEditor.GetEntry(key);
if (data is null)
{
// if we're targeting a null list or dictionary, create it
Type? type = parentEditor.GetEntryType(key);
if (type?.IsGenericType is true)
{
Type genericType = type.GetGenericTypeDefinition();
if (genericType == typeof(List<>) || genericType == typeof(Dictionary<,>))
{
object newData = Activator.CreateInstance(type!)!;
parentEditor.SetEntry(key, newData);
data = parentEditor.GetEntry(key);
}
}
}
...
}
}
oh lovely, i will give my plans a shot then. thank you 
(its mainly this bit of code that limits CP to only respect Concrete List<> and Dictionary<> rather than IList<> or IDictionary<>)
Is there a class to inherit when making a custom data model for CP to properly find the "ID" when doing an EditData on elements in a List? Or does it just search for a field/property called ID in the data model class?
Yeah just having Id is fine
Id or ID in either property or field
anyone happen to know how many ms a globalfade takes at default speed?
thanks!
everytime i think my idea is too similar to something i think back on this 
love this community
I tried looking it up but I'm not sure I even found the right bit of code let alone being able to interpret the maths. Does experimenting not work to make it the speed you need?
I did some experimenting and found something that seems to work, thanks
The first time I experimented I set it to 6 places after the decimal and it took YEARS to fade. I sat there for ages before I remembered the debug endevent console command lol
speaking of experimenting with events, I've been restarting my client every time I test a new iteration (using a mod that speeds up the game intro menu). is there a better way that still loads any changes I make to the event?
Yes, patch reload works for events
Nope but using reload_i18n first does
OK that's maybe the piece I was missing before because I thought I ran into trouble there in the past
Yeah it has to specifically be in that order, I've found. reload_i18n, then patch reload.
WHY IS THERE NO TRACEBACK?
Technical details: Exception has been thrown by the target of an invocation.
I put specific error types to make it easier to see where they happen, but noooooo, it's just "Exception" now
Do I even want to bother experimenting with question fork? quickQuestion seems superior in every way to me.
is the stack trace different log level, perchance?
I have the developper version of SMAPI, so I can see [Trace] if that's what you're refering to.
Here's the log for illustration purposes: https://smapi.io/log/c977dde2e283436c8c34e521ca769a49
My gripe is that when there's an error/exception/crash in a JsonConverter, it won't tell me anything about it
Log Info: SMAPI 4.2.1 with SDV 1.6.15 build 24356 on Unix 6.14.5.200, with 6 C# mods and 5 content packs.
Suggested fixes: One or more mods are out of date, consider updating them
I figured out the issue in this case, but this lack of information is really annoying in general
Anyone who knows what I'm doing wrong or if it's not possible to hide shadows when showing speficic frames?
/move farmer 0 -3 0/showFrame farmer 113/hideShadow farmer true/
Is your log showing an error? I'm not sure if hideShadow can be used with the farmer.
No, only error I got was because I forgot to write showFrame for something else
The method for hideShadow doesn't have the code for handling the farmer like the other methods do. And I just tested an event that did nothing but hide the shadow for the farmer and an NPC and it only worked for the NPC.
Unfortunately I can't find a command that hides the farmer's shadow, either.
Thank you for checking as well. I have been going nuts over it. No clue why I haven’t gotten an error, even restarted smapi and tested it with a simple event too like you.
I’ll just have to figure something else out
Is there a difference between how Random and Range are pulled for things?
(ping me for this cause im gonna head to bed now)
Ain’t much but it’s honest work 
i finally got this dumb outline in the game idk why i was over complicating it 😭 this is actually p easy
now comes the hard part (actually doing the pixel art 😞)
What is it...
it’s crap rn i just scribbled down something so i can see if i can put a png in the game lol
it’s a bed
Oh
If I am understanding your question correctly, Range creates a range of all the numbers within the specified bounds while Random picks one item from the list that it's given. They can't be used interchangeably.
Example to show you what I mean:
Token use = outcome
Range: 1, 10 = all of "1, 2, 3, 4, 5, 6, 7, 8, 9, 10"
Random: 1, 10 = "1" or "10"
Good thinking to test getting a placeholder in game first though! And nice job getting it to work :)
To add to this slightly, there's no practical difference in results between Random: Range: 1, 3 and Random: 1, 2, 3
Deleted my comment because we sorted it out.
is it possible to add a specific type of juice or wine to a shop? ie; pumpkin juice? Or just generic juice?
I think so, with FLAVORED_ITEM.
yeah, the flavored item query in the ItemId field should work
https://stardewvalleywiki.com/Modding:Item_queries
Aa yes, thank you! I'll edit my statement so it'd not be misleading.
I'll delete mine so it's not confusing lol
correct
though it would be Random: {{Range: 1,3 }}
I have a question, does it matter how the sprite sheet is specifically set up? Most sprite sheets I see extending from right to left, however I have one sheet that goes from top to bottom.
Also, since it's been awhile since I've worked on my mod. Do I need to update CP and tiled? As well as SMAPI?
is there any guide about animating custom furniture, custom furniture is broken so i have to change some old mods into CP but it has animation and idk how to convert them
Yes, it matters. Spritesheet positions are hardcoded for things like walking.
You probably should update, yeah. Otherwise you miss out on features and bugfixes.
So, I need to fix the one sprite sheet to extend from left to right, not from top to bottom?
Oh actually I was just assuming this was NPC-related. Is it? If it's for things like objects, it doesn't matter because you can specify sprite indexes.
Sorry I always default to NPCs lol
This is what I was referring too
Okay it is an NPC. In that case, yes, you definitely need to change that so it's left to right.
Thank you! ☺️
It's helpful to use vanilla images as a base for what you do, by the way.
That's what I kinda did, ref it off of Abigail
That way you can be sure you're doing things at the right size and position.
But Abigail's sheet doesn't look anything like that?
I mean literally open the vanilla images and draw yours on a layer above them.
Oh no, it's for my custom NPC, I was just using her as a reference for hands/feet proportions
Yeah I was meaning actually draw inside the vanilla images themselves.
I'm not sure if CP handles animated furniture... maybe Spacecore? 
(I'm just guessing here, but it sounds like a spacecore thingy)
there is content patcher animation so i think it's possible to turn CF into CP then animate it, i have been searching everywhere in google and theres nothing
my last attempt is here
is it not possible?
the mods i want to convert is very old (from 2020) so i doubt the author is active now, it's cute so i don't want to abandon it
If you're referring to the mod called Content Patcher Animations, that mod does not work anymore.
CP alone does not do animated furniture. Furniture Framework does, I believe, and so does SpaceCore.
eh this comment says it works
It works but the spacecore animation method (same author) is significantly more performant
Also I'd say it's always better to use something that's up to date, than something outdated on life support
i would also recommend spacecore, its the newer version for handling animations
do you know how to use spacecore animation on custom furniture
Just read the documentation about animations on the spacecore author guide
It works the same for furniture as it does for any image
You'll need to be somewhat OK with the CP format in order to understand things
Good morning, 6480!!
Good evening!
I hope you have a nice evening
tysm, imma try
If you need an example, my mod Iridium Recolors uses spacecore animations in its code
Friend and I had a discussion last night about seaweed. He said "it'd be funny if you could put that in the fish smoker. Smoked Seaweed lol". How would I go about editing the vanilla data for Seaweed so that it can be placed into a fish smoker and produce the "Smoked Seaweed" he joked about? Figured this would give him a good chuckle, but I'm at a total loss as to how I'd go about doing this.
Have you made any mod before?
I've just started. Only made custom coop animals and textures so far.
You'd want to make a content patcher mod that edits machine data. It's straight forward, but being OK reading CP format will be helpful since there's a lot of bracketing
Oh good! Animals also have a lot of bracket nesting so you should have some idea of what its like
One second
Yeah, bracket nesting was a hurdle for me to start with lol. Took a while to get my first coop animal. Too many commas missing/added here and there lol
!vsc
When creating content mods, it's useful to have a program that will check the validity of your json for you. We tend to recommend either VSCode https://code.visualstudio.com/download or notepad++ https://notepad-plus-plus.org/downloads/
Strongly, strong recommendation to use vsc or notepad++ with json highlight
Here's an example of me adding new items to a vanilla machine (the preserves jar) https://github.com/MizuJakkaru/Cornucopia/blob/main/[CP] Cornucopia Artisan Machines/machines/preservesjar.json The examples near the top are the absolute simplest to follow.
You'd want to do something similar but target the fish smoker ID instead. https://stardewvalleywiki.com/Modding:Machines
You just have to add that one machine rule and it'll work
Do you want it to produce the "smoked fish" item or a custom Smoked Seaweed item?
One would have the smokey particle effect and one wouldnt
if you want to make it be the same as a vanilla smoke fish then theres a second approach
Yeah, I'm aiming for the smoked effect like vanilla smoked fish
Okay then, another second lol
"Action": "EditData",
"Target": "Data/Machines",
"TargetField": [
"(BC)FishSmoker",
"OutputRules",
"SmokedFish",
"Triggers"
],
"Entries": {
"{{ModId}}_Seaweed": {
"Id": "{{ModId}}_Seaweed",
"RequiredItemId": "(O)152"
}
}
},```
It's more complicated so I just wrote it for you
This adds seaweed as a possible input to the existing smoked fish machine rule
The third option is to fully copy the existing smoked fish rule and make a second version just for seaweed
pretty much the same result tho
I want to ask, what's the different between drawing over vanilla sheets vs using the farmer sprite as a base?
I'll gladly take the simpler approach lol. For {{ModID}}_Seaweed, what does this cover? Is it like the ID for the game to reference later? Not that I plan to, but if I were to say change it, would that mess anything up? Or does the game only look for the ItemID in the recipe?
You can change it to anything, the Id is to make sure that this entry is unique inside the brackets that it's nesting in. For example the current vanilla Id to identify fish inputs is "ItemPlacedInMachine". If I had set the Id to "ItemPlaceInMachine," the seaweed would actually REPLACE fish as an input, and the machine would no longer accept fish
Well, the farmer looks like this to start with. Not a super useful NPC base.
I just put your mod id in there so that if anyone has issues using the mod, people will be able to look at their machine code and figure out what mod the additional patch came from (its more polite)
I made 9 sprites based off the farmer, now am I going to have to restart from scratch?
(for clarification it would LITERALLY be {{ModId}}, CP automatically fills that in with your mod data)
No, just open an NPC spritesheet and make sure yours fit in the right frames.
Oh, I was about to ask if I SHOULD replace it with my mod's ID, but that answers that lol. I appreciate the detailed explanation and clarifications! Time to go metaphorically smoke some seaweed lol
I did check, 16 × 32. All of my sprites fit in the frame accordingly.
Then you should be fine provided you arrange them correctly on the spritesheet.
Wait, I have to put the sprite on one single sprite sheet? I have four each in different directions
Hylia, you really need to be following exactly what the vanilla npcs look like
Yes. Please open an NPC spritesheet like I said and do it the way that they are done.
I know😭
Are you finding it difficult to find the NPC spritesheets?
A little bit... 😭
Have you unpacked your game files?
Not really
@drowsy pewter So, I think I already messed up. Just to be sure, what file should that code be placed in? I put a "Machines.json" file into my mod's data folder (path "modname/Data/"), and that didn't seem to do anything.
If you make a new file, you have to Include it in the content.json
!unpack If you unpack the game files you will be able to actually access all the spritesheets and portrait images I have been talking about.
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!
it doesnt matter WHAT file it goes in, it can just be in your content.json if you want
... Well that's egg on my face. I totally forgot about the content.json lol
but unless the content.json refers to a specific file, CP doesnt know about any other files inside your mod basically
Tysm
This whole time I've been messing around and completely forgot about the content file. I should've known better since I keep editing it for my custom farm animals lol
Trying it out now
hopefully it works lol I didnt double check my code
"Hold my beer" moment
ayyy, that worked. Friend's in for a treat later. Thanks for holding my hand through that ordeal!
Sweet!
I'd say it's probably salty rather than sweet :^)
Sorry for taking the journey away from your by just giving you the code lol, normally I wouldnt but targeting nesting fields is something that new modders struggle a lot with so I didnt want to put you through that
But if you want to make new machine rules I recommend it, it's fun
Hey, I am absolutely grateful. You gave me a template I can work with rather than throwing me down a cliff like a lion cub. I'll gladly take it lol
Had a teacher back in 2005 who was an absolute jerk, yelling at me for making mistakes he never taught the class to avoid, so this is a very welcome learning experience.
We try and be really supportive here
Well when I finally choose to dip my toes in deeper water, I'll definitely come ringing here again. Feels good to make new progress.
I don't need Microsoft visual studies when creating a CP mod, do I?
No you don't need Visual Studio. Visual Studio Code (which is a different program) is helpful though and I recommend using it.
My curiosity got the better of me, and I tried making it so Smoked Fish could be further Smoked, hoping I'd get a recurring chain name like "Smoked Smoked Smoked Smoked Smoked Smoked Salmon" or something. That wasn't what happened unfortunately 😦
Hahahaha
You might need to fiddle with a few other fields for that but I'm not sure at this exact moment
I've done it accidentally
If you manage to remember how you did it, I'll gladly take that knowledge lol. Right now though, I'm just being a kid in a candy shop, smoking all sorts of things. New toy syndrome and all that.
Thank you Aba :3
(and Dolphin!)
I wish you could edit the prices for the Joja development forms...
perhaps i'll add that to my c# in the future list
Is the same recommended version of using visual studio still 2022 edition? Or would it be wise to use the up-to-date-version
No no no don't use Visual Studio.

