#making-mods-general
1 messages Β· Page 391 of 1
!log Yup
Important note: Your computer username may appear in the log. If your username is your full name, please be aware of this before uploading it.
Please share your SMAPI log file. To do so:
- Open this page: smapi.io/log.
- Follow the instructions at the top of the page to upload the log file. (Don't copy & paste from the console window!)
- After uploading, it will show a green box with a URL to share. Post that URL here.
Please do it even if you don't see any errors. This has useful info like what mods and versions you have, what the mods are doing, etc. If the issue didnβt occur in your last session, please load the game to the point where the issue occurs, then upload the log.
Same thing, please. Log and json ^_^
oki
sorry for goofing off
json for my load?
Load patch and event script
Ok gimmie a sec
IS there a way to remove the community upgrade shortcut flag?
how do i provide my log
be warned im new modder https://smapi.io/log/ac7c41926d3548a1bfac33655eced64d i have alot of mods
Log Info: SMAPI 4.2.1 with SDV 1.6.15 build 24356 on Microsoft Windows 11 Home, with 32 C# mods and 15 content packs.
Suggested fixes: One or more mods are out of date, consider updating them, SMAPI is out of date, consider updating it
@vernal crest https://smapi.io/log/20a7bea9d2504fe8b98bd0da0800b187
The event im having trouble with is the second (bottom) one
Log Info: SMAPI 4.3.2 with SDV 1.6.15 build 24356 on Microsoft Windows NT 10.0.22631.0, with 14 C# mods and 4 content packs.
Suggested fixes: One or more mods are out of date, consider updating them
I'll take a look
!json Please upload your json to the json validator :)
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.
My bad i will
Please also provide your json by uploading it here https://smapi.io/json and then sending a link
However, you appear to have tried to Load a json, not a .tmx file.
i did? i'll check
As I mentioned, you need to Load the map
Thought I did
New quote added by bblueberry as #6537 (https://discordapp.com/channels/137344473976799233/156109690059751424/1403477730858897570)
You're loading a .json file and you're loading it into Data, not into Maps.
Hm didnt notice, thanks
Oh I posted the wrong file that was for sm else
But you ALSO need a map Load
the mail flag is communityUpgradeShortcuts
it's just a regular mail flag so you can remove it in the usual ways
You really don't need a separate file that has just one patch in it, just FYI
Ok
Unless it's actually more useful for you to separate your mod out into such tiny, tiny pieces?
(to add on though, in case it matters, this means the player will just be able to purchase them again anyway)
oh it's just for my personal game because the forest > beach warp is breaking my NPC pathing
That appears to be your log again. I want to see your mod's code, please. The content.json?
yeah sorry
hold on think i found something that could fix it ill try this one more thing
Where do I look to run a trigger action that runs when a map tile is interacted with? I'm rusty with map stuff and can't find the correct tile property
You are using a token called {{Tipsyavocado}} that you have not created. I believe that you were meant to use {{ModId}}and have mistakenly put Tipsyavocado in there instead.
i dont think vanilla has a map action that can run a trigger action or traction on its own, i think you'd need either spacecore or BETAS? for arbitrary tractions anyway
That's great because my mod is using both LOL
Well I have spacecore to add the tile property to a piece of furniture, so its actually a furniture interaction, but other than that
im just embarassed it took that long to figure it out i feel like an idiot even for a beginner
both spacecore and BETAS add both touch and tile actions to run something from Data/TriggerActions with only minor differences so take your pick basically
(for spacecore the triggeraction must be set to "Manual" trigger but in BETAS it can be anything if you want it to also trigger via other means)
Let me reread the spacecore docs related to trigger actions and see if I can figure it out
Havent modded in a while because I spent all my stardew time doing comms instead π
spacechase0.SpaceCore_TriggerAction <triggerActionId>
is it normal to be this shotty as a beginner
Okay so the tile property would just be Action: spacechase0.SpaceCore_TriggerAction etc etc
beginners often make a lot of mistakes! thats just how being a beginner uis
Got it :)
i made a mod progress
don't be discouraged! this stuff is arcane and complicated and nobody is born knowing how to do it
a lot of beginners dont often make it that far, either, so its something to be proud of
im glad i found a supportive community
I need to figure out chairs
https://stardewmodding.wiki.gg/wiki/Tutorial:_Adding_Sitting_to_Custom_Map_Chairs
tada, my fave guide
[This tutorial is a WIP by Majickian and should not be considered a finished product at this time.]
This is a tutorial for adding the ability to sit on custom chair tiles place on a custom map.
Thanks, I've been procrastinating this one for ages
its a bit overwhelming but its not that bad c:
at least, I dont think so uihsafiuahs
good luck !
(also hello gang i have died for a while
hope youre all doing great)
I don't have to do a lot I don't think? Mostly because I stick to the vanilla tilesheets or Lumina's where I can
[Content Patcher] Can't apply data patch "Cornucopia - Cooking Recipes > Include data/gifttastes.json > EditData Data/NPCGiftTastes #1 > text operation #13" to Data/NPCGiftTastes: record 'Elliot' has no value, so field '1' can't be modified using text operations.
I swear to god this man needs to change his name
!elliott
It's Elliott ?
lmao
why was the picture snatched away
I have no idea lol. Gov doesn't like me b/c I've been away for too long or something. π
Maybe it's supposed to have the period at the end idk
Has CA said how old Gus is? If not, what do we guess his age to be?
not sure if ever mentioned, but i headcanon him as 45-53
around the same age as Pam
i dont think anyone is given an explicit age in stardew
aside from "old" "older" "not old"
yeahh
Concerned Ape did say Clint's age on Twitter
I missed the "Gus" part earlier and thought you were thinking Elliott was this age!
I've seen everythinf from 6 to 9 for Jas
elliot feels more 38-45 to me 
im like comically bad at estimating the age of children
i forget they're like. that large.
sigh wow... i really feel like i have nothing to do rn π€ maybe i should just finish up my map making duties for now...
iirc Jas was confirmed to be 6 at some point? but I can't remember where
Does it break anything if a manifest's Author field has two authors listed?
the only manifest text field that i know can cause problems is if you have the word "by" in your mod name, which causes the parsing on smapi.io/log to misread the line when tabling your mod list
I hope that when this mod is released someone out there will see and appreciate my very extensive trigger action + dynamic token crimes
(for certain values of problem. it's just a display issue)
Yeah looks like it's fine, thanks y'all
@uncut viper Can you think of some method with BETAS where a simple message box can pop up, and a trigger action for another message is only run when the player closes the first message?
I essentially want to imitate the QoS tv channel. So click tv > first message > second message > hud message "You learned X recipe!"
Could also use dialoguebox if thats more extensive
Set a mail flag with the same action you open the TV with, then use MenuChanged to detect the dialogue box being closed while having the mail flag
Interesting!
Grant recipe + spacecore HUD message + remove mail flag
I would have never thought of that in a million years, thank you so much
the mail flag is so that you know this MenuChanged is specifically from the TV and not another dialogue box
hm but if your QoS has a portrait
you can just use the betas dialogue box and do $action
its a radio channel so no portrait
if i used the dialogue box i'd need to draw it like the radio is talking to you
which is also fine cus the game does that for the telephone
that is fun 
i think it would be simplier cus you don't need to make entire Data/TriggerActions entries
on the other hand the syntax is quotes hell
It's pretty complex other than that so i think I need to do trigger actions anyways
not for the click tv > first message > second message > hud message sequence tho 
(the DialogueBox can be used without a portrait anyway)
if you write None for the Portrait parameter its a portrait-less box
ill multiline this for clarity, gotta escape all these ", and my dialogue syntax is prob incorrect
furniture tile action: Spiderbuttons.BETAS_Action "
Spiderbuttons.BETAS_DialogueBox "first message $action
Spiderbuttons.BETAS_DialogueBox "second message
$action spacechase0.SpaceCore_ShowHudMessage "hud message"
$action MarkCookingRecipeKnown Current <recipe ID> true
"
"
"
yea true
but yes quotes hell over here
this is where making use of BETAS features parsing tokenizable strings would come in handy
Spiderbuttons.BETAS_DialogueBox [LocalizedText YourStrings/Radio:DialogueOne]
(but with all the other parameters ofc)
so yes this is also viable i think 
maybe ask avi for the actual correct way to write all this lol
Avi knows how to do it better than I do
It seems to skip the first two actions and only display the message from the third action. If I comment out the later actions, then the first one works fine. So they're all playing at once rather than changing on menu close. I'm sure I was supposed to do something differently https://smapi.io/json/none/87343ee052ae4d67989c2cd857bca734
oh, at the start id just assumed you already were using dialogueboxes and the first and second message merely had normal dialogue syntax breaks between them, then got distracted by something for 30min and forgot just enough context to not realize the later messages about the portrait stuff meant you werent using dialoguebox
however it may still work if you reverse the order of trigger actions?
Ah wait yeah let's do that
since Data/TriggerActions is an ordered list running these from bottom to top may work
Yeah I'm trying to match the tv channel style, so message box is better
Same thing if I reverse them 
oh right, because these arent actually being fired in order from the same trigger
Maybe use a stat instead?
the message box popping up triggers a new MenuChanged
So u can increment it
which then triggers another MenuChanged
a stat could work
though
itd have the same problem of overwriting the first message box
yeah
Complicated...
its a little jank but maybe turn that AddMail into a BETAS DelayedAction?
I could buffer a blank one in between?
so the mail only gets sent after like, 100 milliseconds
also that
Tbh this is the first time learned you can leave the tv???
which will be too late for the second trigger
In between messages????
Lets try that
the only problem is if a player clicks through both message boxes within 100 milliseconds but im not sure thats actually possible
given that they have to like, pop in
If anyone reports it as a bug I'll accuse them of botting
there is also the possibility that DelayedAction timers wont tick if the game is paused, which talking to the TV may count as ? not sure
if the time is paused*
when i do mod testing im usually on frozen time (unless i have reason not to be) and during actual gameplay i only ever do multiplayer so time never pauses, so... im not sure under what circumstances time normally pauses
DelayedAction works like a charm!
oh good bc i was out of ideas otherwise
Yay
brain a bit cooked tonight
It's interesting, when the tv is talking it takes time to type out each letter, but with the message box its instant
Not a big deal
Chu... was it you who offered a few weeks ago to add an abridged farmer customization menu for my hairdresser to ES? Or am I misremembering?
but wondering if i used the wrong box
ah, Message mimicks the map and event actions of the same name, which omits the typing
Yeah
Where's the ES C# source is it on gh
wooo this radio is great
(i dont think itd be a breaking change to add an extra parameter to make it type each letter, since looking at BETAS code it seems like the text has to be in quotes anyway, so it wont shift any argument indices...)
Ahhh nobody will even notice so don't worry about adding it!
Yes but I always struggle to find it
Well I'm in me bed rn I'll do it tmr 
if I can find it I'll link it.
i will still at least consider it! if i werent so tired and brain cooked id just add it right now but the whole nexus page updating stuff feels like too much of a chore rn dfkjgh but its not a bad idea for a future version
Will let u know, iirc the request is a player customization menu that only has hair option?
It seems like the sorta thing that would not go too well on phone tbh
Hair and maybe accessories, I think atra and I discussed. Theoretically it doesn't work on mobile anyway, but it may now.
And if it was possible for me to edit the text at the top, maybe? Like the shop menu.
And thank you very much β€οΈ
(also open to suggestions on how it could look better on phone)
Atm i believe the ES C# part works on phone
Due to new rewriters in android smapi
ah cool (I guess), people keep asking on Reddit and my response should be that I've no idea, I don't play mobile and I cannot troubleshoot it so if it works, great! If it doesn't, I can't fix it.
That is good to know though because I was insisting it doesn't work. As it didn't prior.
The answer is always "well i dunhave a phone you tell me"
someone told me they had heard mixed things and I was just like... shrug last I heard it didn't.
If they do give a log then it is possible to infer what doesn't work
there's a lot of "Does this mod work with that mod" questions and really the only real answer is "Try it and see"
how do ppl usually go about recoloring to match a specific existing recolor? Like matching vpr. is it just messing with the hue and saturation or is there a more precise way to do it?
the obvious answer is colour replacement
"Query": "({{Year}}%2)=1",
Is this the correct way of evaluating in CP when conditions if a year is odd?
itd need to go in the query token itself, the query token requires an input
"Query: {{Year}} % 2 = 1": true
(if you plan on including that condition in multiple places, it may be beneficial to make it a dynamic token called OddYear or something)
Ah yeah that's it, I'm never sure with query syntax
Is there a performance difference for making it a dynamic token or not?
i dont know if CP caches inputs on queries or not
but it was like 80% for ease of typing purposes too
Maybe I could make the current date a single token thats a string to match... but I already typed them all :P
the query token itself has a cache which gets busted each day
should be fine then
the dynamic token would only get changed each year though, right
but its value would be cached
oh wait
the dynamic token would be updating whenever its read, which would be daily
not if the query cache is busted im assuming
yeah i forgot to connect the dots there
is there a reason the query token doesnt cache its inputs so it doesnt have to recalculate them?
it does, it just busts that cache daily
but is there a reason for that i mean
it would remember 5 % 2 = 1 outputs true
You never know
I think pathos has the cache busting there for memory reasons
if the fundamentals of math change thats a bigger problem than the query token not working
possibly
you may have different priorities 
but its not possible for the query syntax to do non-deterministic outputs
memory reasons makes sense i guess, though im curious just how much itd add up on a big mod list
I cant remember if I made query actually marked as deterministic or not
though it looks like it just clears it every time its UpdateContext is called
and then returns false in there
so wouldnt it re-evaluate potentially every timechanged even
looks like I did make it deterministic, yay
though I'm not sure how well dynamic tokens will respect that mechanism
6480 could always go back to the tried and true method
"When": {
"Year": "1,3,5,7,9,11,13,15..."
}
(honestly... if it were for my own mod i might even consider this and turn that into a dynamic token. how often do people even get to years 30+?)
I'm very tempted to add a PR for Range to have a |Step named argument or something, so you can do {{Range: 1, 101 |Step=2}}
thats much better than my momentary idea of "what if EveryOther token"
would make time based ones a lot less slow doing |Step=100
not that the speed of Range really matters much anymore as its deterministic so if you give it literals it will just bake the output into the parent string
but itd help for this one specific instance!
and for people who make prices of things c onfigurable too, i guess
also you could probably then do set schenanigans to make an "IsOdd" mechanism by merging a {Range: 1, 100} with {Range: 1, 100 |Step=2} and counting the occurrence of the desired number
ok. Im sure Im making a really dumb mistake here.
So im trying to send a custom mail. Based on the wiki and such I have:
"Action": "EditData",
"Target": "Data/mail",
"Entries": {
"RobinAxeFound": "{{i18n:mail.RobinAxeFound}}"
},
},
{
"Action": "EditData",
"Target": "Data/TriggerActions",
"Entries": {
"{{ModID}}_RobinAxeFound": {
"Id": "{{ModID}}_RobinAxeFound",
"Trigger": "DayEnding",
"Condition": "PLAYER_HAS_CONVERSATION_TOPIC host questComplete_100 1",
"Actions": [
"AddMail Current RobinAxeFound tomorrow"
],
}
}
},```
The mail SENDS fine but I get this:
Check if the key in the i18n file is right.
did you have an entry in your i18n called mail.RobinAxeFound
I do. This is currently the whole i18n:
"mail.RobinAxeFound": "@, ^^Test"
}```
if you added that after the patch, did you reload i18n?
i did. Yes
remember that reloading i18n requires a separate command
Using reload_i18n?
are you mixing and matching folder-style i18n with non-folder style i18n?
I closed the game and reloaded. π
...
I have no idea what I changed...but...somehow its working....
thank you all
i considered it π
My test save is on year 73 though so id be there a while
ugh, today Rosa is refusing to move
relatable 
so is Beatrice
I wonder if they're supposed to go to Ginger Island and have bugged out
their schedules are patch exporting fine, and they both have spring schedules
but Looku[ anything shows no schedule loaded
Good timezone, do we still use CP-A for animated custom furniture and is there a tutorial somewhere?
I believe you can but spacecore has better implementation and is used by more players
Does furniture framework do animations now?
You will want Furniture Framework, Spacecore, or MMAP instea of CPA
No tutorials that I know of but I just made an animated butterfly hutch using MMAP and it was very easy (there's instructions and examples on the GitHub, plus chu is very active here to ask for help).
FF also has instructions and Leroy is active and willing to help with questions as well.
Spacecore sometimes has examples but Casey is on hiatus so isn't available to answer questions but Spacecore is most used of the three frameworks so you're most likely to be able to find previous messages in here from people asking for help and getting it or being given examples.
I want my Recolor Patch support i18n, but I didn't understand the tutorial
Thanks, I'll look into those
I only know to create a i18n folder and default.json and other language.json
I don't understand how to built-in API
Which file should I use i18n token in default.json?
Do I need to crate a new file to edit content.json
You can use the i18n token to call a translation anywhere you can use other tokens. The i18n token simply looks for the provided key in your default (or other present and applicable translation) and get the translation
For example let's say you have "Translated.Thing": "This is a translation" in your default.json, you'd call on that translation by using {{i18n: Translated.Thing}}
No extra set up needed
I'll give it a try.
It seems this won't work dose this mean tokens can't use here? "ConfigSchema": {
"{{i18n:Config.Extra.name}}":{"AllowValues" : "true, false, ", "Default": "true", "Section": "Extra"},
SMAPI show this in yellow color ConfigSchema field '{{i18n:Config.Extra.name}}': the name '{{i18n:Config.Extra.name}}' can't have input arguments (: or | character).
Config schema can't use tokens, however config options automatically use the keys conig.<config name>.name and config.<config name>. description for translations if present in your i18n
Does anybody happen to have a chart or document detailing where each sprite on every sprite sheet is used? Or a way I could suss that out myself?
I usually paint some sprite in a obvious color and test in game
This only really works if I know where to expect to see it, admittedly
I 'm going to check this thank you
There's not really a comprehensive list, no, depending on what it is you could try seeing where it's sprite index is referenced, but that's as good as you can get
I'm not fully familiarized with the mechanisms of Stardew yet (I promise I am also reading the wiki and other documentation). How are sprites indexed and what files would I have to look in to find them?
You can also just, ask if anyone knows where and/or what a sprite is used for and hope someone comes along that knows
Whatcha makin'?
Also, what Tedi said
(Ender? Tedi? Which one to use when shortening?)
(you can use Tedi)
(Ty)
At this point, I'm updating an old mostly cosmetic mod from 1.4, and while they have good art, there are some gaps in the sprite sheets that they're using, and I want to make sure that the new outfits I put in the gaps (and in the winter and beach outfits, which the old mod didn't have at all) are actually thematically appropriate for the environments they'll be used in
Outfits as in npc sprites or outfits as in clothes (shirts, pants, etc) the farmer can wear?
NPC sprites
(If you're intending to publish it make sure the permissions allow that.)
(I do)
Well those can be relatively easy to figure out, either ask people if they know or find out the index of the specific sprites (indexes are 0 indexed, aka the first one is 0, not 1, and then it's left to right top to bottom) and look at either Data/animationDescriptions to see if an animation of that npc references the specific frame, or the more gruelling one if it's not there, check events to see if a showFrame or animate command does and see the context, if you were to ask me if probably ask people and hope they know what a sprite is used for
Wait, to clarify, by "the permissions", do you mean, "Mod author said it was ok" or do you mean something in the code will need modifying?
Original mod author is ok with it being published
Personal edits to mods you don't publish are always ok, permissions to publish edits/updates is required
Yup their Nexus permissions either need to be set to allow modification without permission or you need to have proof that the author has given you permission (which might be a screenshot of a conversation with them or it might be them having updated their mod description to say anyone's allowed to publish updates for their mod, etc)
Well, I can prove I had a conversation with them, at least. I'll check what their actual 'allow modification' setting is on Nexus though, in case
To add to what Tedi said: if you're just doing overworld sprites you only need what's in the Characters folder (have you unpacked the game contents?)
I've unpacked the game contents, yeah
Then look at Tedi's message for how to find where NPC sprites get used in game and the Characters folder for where all the sprites themselves are :)
Yeah, that all looks very helpful honestly. I might finally figure out where Haley uses her camera, because my memory is bad and I can't recall ever seeing it
I remember her use it in her 8 hearts plot
This is weird, I use this token set Chinese Translation and enter the game, the option I set translation all become ββββββ
My default language is Chinese
Maby I need set it in UTF8
I finally success. This have taken me a lots of effort
Oliver won't get out of bed again... lazy teenagers...
(but this may become a roblem, we shall see).
Hi, I'm a new modder. I don't know where the textures for the 3x2 tiles in front of the greenhouse come from. Can anyone give me a hint?
This is the original texture. And the configuration file does not mention where the floor tile texture comes from.
Maybe AdditionalPlacementTiles field, but it doesn't seem to indicate where the tiles come from.
Iβm almost certain those tiles are hardcoded and wonβt be found in the data
(The tiles themselves are from the outdoorsTilesheet, but theyβre draw in GreenhouseBuilding::DrawEntranceTiles in the game code)
Hi! I know Android compatibility is a difficult subject, but it doesnt even try to use my mod. It's skipped "because it's no longer compatible". It works fine with other systems. Did I miss some configuration stuff or is there just nothing I can do?
That implies something in it is broken on android (missing class being referenced, non existent methods etc), the log should have debug lines specifying why itβs broken/not compatible
Yeah, the log file itself should tell you those details. Not the in-game log.
Well I can ask an android user for it. Where can they find it again?
Finally, someone knows the details! Where can I find the source code for this part?
!decompile You'll have to decompile the game code yourself
If you want to make SMAPI mods with C#, one important resource is decompiling the game to read the game code. Here's how to do it: https://stardewvalleywiki.com/Modding:Modder_Guide/Get_Started#How_do_I_decompile_the_game_code.3F
The log? smapi.io has instructions for Android users as well.
!!! Thank you very much! This problem has troubled me for a long time.
Thank you!!
Oh! Got it. Thank you
After adding a custom location through CP, what needs to be done in order for me to be able to access GameLocation specific things for that location, such as draw in c#?
What's the purpose here? Unless otherwise specified in the location data, all locations are instances of GameLocation, only way to distinguish between them would be using GameLocation.NameOrUniqueName or GameLocation.Name properties to check the location's ID
Unless you want to subclass GameLocation (need spacecore) there's really no particular way
Only reasonable way to do it is using harmony to conditionally patch the methods when in your location checking the location's name (without subclassing)
If you want to draw specific stuff in a location, use one of the smapi render events and just do it when player current location is your location
The purpose is to do something similar to the Beach location, where I draw the Question mark cursor above a specific tile
Like the drop box ? thingy
Yes where they'd need x amount of x item to build something.
But with the animated question mark cursor above it like the Beach broken bridge
Oh that one not the special orders dropbox ok
Using this plus Game1.currentLocation.NameOrUniqueName == "yourlocationid" should work for your usecase
Thanks appreciate it.
1 more quick thing if you dont mind.
How does the game track completed quests? I noticed there's a hasQuest and addQuest but nothing along the lines of completedQuests or something of the like
ah nvm. I see a questLog. This could be it. Will test
It does not track completed quests
You are in C# anyways just store mail flag yourself
Will do
Hi! I'm still struggling with Android compatibility. There's a line of code where my mod checks if the player chose the remixed mine rewards when creating their game:
if(Game1.netWorldState.Value.shuffleMineChests.Value == Game1.MineChestType.Remixed)
Android SMAPI can't load the mod at all:
Broken code in MineTreasureFramework.dll: reference to StardewValley.Network.NetWorldState.shuffleMineChests (field returns Netcode.NetEnum1<StardewValley.MineChestType>, not Netcode.NetEnum1<StardewValley.Game1/MineChestType>).
I don't understand what it means... Is there something I can do?
It looks like the type namespace is changed how strange
I don't think you can do anything except report to the android smapi dev
@frosty hull fyi
Okay... I'll make an Android version with less features then. And make sure NRT narathip knows.
thanks chuve
anyone know where the power up icon lives?
@calm nebula: ββ (24h ago)
[blinks] what now? yeah uhhh sure thing boss (#6811675) (24h | <t:1754832038>)
@vital lotus which power up icon? Its not on TileSheets > BuffIcons.png?
ah I mean the bear knowledge, the wallet power up
special power?
LooseSprites > Cursors.png
I want to change a description of an item but i cant find the tutorial for it
We don't have many tutorials, just look at the official wiki for objects to see the fields you can edit
Very quick tutorial: make an EditData patch with a Target of Data/Objects (if it's an object, otherwise use the appropriate data asset, use Fields instead of Entries to make sure you only change the Description field without changing any other fields (if you use Entries it will overwrite all the fields you don't change with the defaults which may not be correct for that object).
EDIT: Ignore that, do what chu said below about editing the Strings/Objects entry for the description instead. You can find the key by finding the item in Data/Objects and looking at what the Description field says its key in Strings\\Objects is.
If it's just the name i recommend editing the Strings/Objects asset instead
That way the existing vanilla items get updated
Oh yes I forgot the descriptions use that too
(I do know to edit Strings, honest. I just did it for the butterfly hutch rename.)
i will have to edit both bc i want to change properties of some furniture (placeable everywhere and such)
ty
EditData Strings/furniture: the FromFile field can't be used with an 'EditData' patch
That's correct, it can't be
Look at the EditData documentation I linked you to and follow that. It has examples.
If two custom renovations target the same coordinates, does it cause one of them to go to 0,0 coordinates instead?
tbh I think the only way to find out is to try it
but I would assume they either just overlap or cause an error
That was exactly the problem I was getting - one renovation applied correctly, the other was applied at 0,0. I found a workaround, though. ^_^
Alright, I'm trying to figure out if I can simplify some code because it's gonna be annoying otherwise (though I can obviously code a lot of mind-numbing stuff). Where can TargetWithoutPath or things like PathPart be used?
Context: I have the following patch.
{
"LogName": "Reject Ticket If Stealth Flag Active",
"Action": "EditData",
"Target": "Characters/Dialogue/Flor",
"Entries": {
"RejectItem_(O)AgentLyoko.PortraitShop_PortraitTicket": "{{i18n:PortraitShop.PortraitInProgress}}",
},
"When": {
"HasFlag": "AgentLyoko.FlorStealthFlag",
},
},
I'm going to have to do this 24 times (one for each NPC, e.g. Maddie and Daia would also be two characters included), then do coding for each acceptance ones, which will have something in the i18n key like so:
{
"LogName": "Flor Ticket Rejection (Not 8 Hearts)",
"Action": "EditData",
"Target": "Characters/Dialogue/Flor",
"Entries": {
"RejectItem_(O)AgentLyoko.PortraitShop_PortraitTicket": "{{i18n:PortraitShop.Flor.Reject}}",
},
"When": {
"Hearts:Flor": "0, 1, 2, 3, 4, 5, 6, 7",
},
},
What I'd like to do is use some sort of TargetWithoutPath to replace the NPC name so I can have one patch for all 24. However, given how I've coded things in the past, I'm assuming this will bug out or cause problems.
Are you asking if you can do this?
{
"LogName": "Reject Ticket If Stealth Flag Active",
"Action": "EditData",
"Target": "Characters/Dialogue/Flor",
"Entries": {
"RejectItem_(O)AgentLyoko.PortraitShop_PortraitTicket": "{{i18n:PortraitShop.PortraitInProgress}}",
},
"When": {
"HasFlag": "AgentLyoko.{{TargetWithoutPath}}StealthFlag",
},
},
{
"LogName": "Flor Ticket Rejection (Not 8 Hearts)",
"Action": "EditData",
"Target": "Characters/Dialogue/Flor",
"Entries": {
"RejectItem_(O)AgentLyoko.PortraitShop_PortraitTicket": "{{i18n:PortraitShop.{{TargetWithoutPath}}.Reject}}",
},
"When": {
"Hearts:{{TargetWithoutPath}}": "0, 1, 2, 3, 4, 5, 6, 7",
},
},
Essentially, although I'd be doing something more like....
{
"LogName": "Reject Ticket If Stealth Flag Active",
"Action": "EditData",
"Target": "Characters/Dialogue/Flor, Characters/Dialogue/Maddie, Characters/Dialogue/Daia",
"Entries": {
"RejectItem_(O)AgentLyoko.PortraitShop_PortraitTicket": "{{i18n:PortraitShop.PortraitInProgress}}",
},
"When": {
"HasFlag": "AgentLyoko.{{TargetWithoutPath}}StealthFlag",
},
},
{
"LogName": "Flor Ticket Rejection (Not 8 Hearts)",
"Action": "EditData",
"Target": "Characters/Dialogue/Flor, Characters/Dialogue/Maddie, Characters/Dialogue/Daia",
"Entries": {
"RejectItem_(O)AgentLyoko.PortraitShop_PortraitTicket": "{{i18n:PortraitShop.{{TargetWithoutPath}}.Reject}}",
},
"When": {
"Hearts:{{TargetWithoutPath}}": "0, 1, 2, 3, 4, 5, 6, 7",
},
},
Yeah I just forgot to add more Targets.
No point in using TargetWithoutPath if you're only putting one in the Target imo lol
I need to do it for 24 different NPCs, hence me breaking down and asking if there's an easier way rather than doing the hard way for vanilla (12) or SVE (7?)
I can't tell you whether it'd work, but it seems easy enough to me to test. It's something I would attempt because I don't know of any reason it wouldn't work.
Test with a dummy patch that does something easy to check, like replace their "Mon" dialogue with an i18n key with {{TargetWithoutPath}} in it if they're at 1 heart or something
Local tokens 
(If you don't want to wait for someone who might actually know to answer, that is.)
Might take me a bit since I'm also doing some IRL stuff plus some mod updates in my usual mod stuff
...go on...
or give documentation XD
Isn't that still going to be 24 patches (of Includes) though? Or am I too tired and therefore missing the obvious?
Yeah still that many includes
It's just easier to change across all 24 includes later
Content modder yearn for the foreach etc
(I do love LocalTokens though)
Up to you how you wanna slice the cake
I am too curious about this, I am going to test it for you 
I'll give a quick example of local tokens anyhow
This include adds 4 things to an arbitrary shop (the L@Vendor local token)
https://github.com/Mushymato/TrinketTinker/blob/main/[FullMod]/[CP] Pack Possum and Critter Cages/data/opossum-hire.json
I include it 3 times from content.json
https://github.com/Mushymato/TrinketTinker/blob/main/[FullMod]/[CP] Pack Possum and Critter Cages/content.json#L50
What aba suggest should work if the thing you need is present in the target (the character name)
You don't need to do that
I can definitely get to it later today, just after thingies
Local token good if you can't fit to that case though, cus you can just define whatever you need
No I am curious!!!!
It's important R&D trust
Plus it got me to stop playing Abiotic Factor so once I do this quick check I can go to bed like I needed to half an hour ago
Chu get me
I make no promises 
I did sorta come up with a way to do a for via 2 nested includes
But it was silly and only really made sense cus i had several sets of things that contained up to 6 members each 
Ok mod made, time to see what silly mistake I have made
Do you have this around anywhere for viewing, chu?
I think i posted in smc at one point
Tada! The only thing that didn't work was putting {{TargetWithoutPath}} in the LogName, but I don't think any tokens work there anyway. I checked relationship rather than heart level because I couldn't be bothered faffing with friendship points lol
{
"LogName": "Edit {{TargetWithoutPath}}'s dialogue",
"Action": "EditData",
"Target": "Characters/Dialogue/Leah, Characters/Dialogue/Sam",
"Entries": {
"Mon": "{{i18n: key.{{TargetWithoutPath}} }}", // default.json entry = "key.Leah": "Lyoko, it works!"
},
"When": {
"Relationship:{{TargetWithoutPath}}": "Friendly",
}
},
Thank you!! I'll have to simplify... a lot of my other code too... but I'll first use DPS-RSV as a test case
Thank you for doing that! 
(Now go to sleep! D:)
You're welcome! I love doing this sort of thing. Ping or DM me any time if you want help simplifying things via tokeny shenanigans! If I can't figure it out I'll poke the other token crime lords for help.
why only this config value can't be translated? does that mean i18ntoken can't contain numbers or _ ? "Config.Water.values.WaterTexture_1": "WaterTexture_1",
?
Hi, decided to get started on the C# componant of my mod, when building it auto places the .dll into the "Mods" folder, given I use a seperate folder for testing mods called "TestingMods", how would I go about changing the file path it outputs to?
Hello. I use a modpack that resprites all the characters and their portraits (Seasonal Cute Characters), however i wish to replace the Haley character/portrait design with another mod (Haley Revised). However, the new mod only supplies the image files as PNG instead of XNB. Is there a way to convert the file or install another mod possibly that does it instead? Or am I looking into the problem all wrong as well. Appreciate any help or advice. ( I have SMAPI and Nexus and all that) I have been recommended Content Patcher ( I do have installed) but I'm not sure what it is that I have to withit. Apologies for any inconvenience of explanation.
Perfect thank you! I thought there'd be an option similar to that
you may need to install another mod to support this portriats mod ,See the mod page it always tell you what
You don't want/need XNB at all.
It might be worth noting that ModBuildConfig can also deploy content packs alongside your C# mod, so you can keep everything nicely in your IDE: https://github.com/Pathoschild/SMAPI/blob/develop/docs/technical/mod-package.md#bundled-content-packs
!startmodding not sure if this is the command but
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.
yes!! i got it right
I will read through the tutorial(s). Thank you!
You will want to make a Content Patcher mod with an EditImage patch to replace Haley's textures. https://github.com/Pathoschild/StardewMods/blob/develop/ContentPatcher/docs/author-guide/action-editimage.md
That's exactly what I was just looking for too, thank you!
The only "Haley Revised" I see is already Content Patcher but is old and might potentally need updating. Seasonal Cute Characters has a config that lets you turn off individual characters so you can use other mods for specific characters.
I will also look into this! Thank you
Ive been meaning to make a personal cp edit of this exact mod too π
What does it look like in the ConfigSchema in the content.json?
//Water
"WaterTexture": {"AllowValues": "WaterTexture_1, WaterTexture_2, WaterTexture_3","Default": "WaterTexture_1","Section": "Water"},
This Haley Revised, right? It's a portrait replacer. What you're meant to do is to take all these files and insert them into the Seasonal Cute Characters mod to replace its files.
The config option is named WaterTexture but the key in the i18n file just has Config.Water.values.<value>. It's missing the word Texture.
@subtle saffron Hi Heliax, I saw you left me a note on Jorts and Jean re: Piper compat and I can't remember if I responded to you? I'd be fine with compat!
In particular, Jorts and Jean does an edit to the "secret stash" event, if you wanted any tweaks there it might be easier for me to add it on my end.
Claws earlier suggestion of Seasonal config fixed my issue, however I will save this in the case of any other portrait issue I come across!!
The SMAPI console in VSCode (When building the mod) has every letter placed between a "?", Like this:
[?S?M?A?P?I?]? ?S?M?A?P?I? ?4?.?3?.?2? ?w?i?t?h? ?S?t?a?r?d?e?w? ?V?a?l?l?e?y? ?1?.?6?.?1?5? ?b?u?i?l?d? ?2?4?3?5?6? ?o?n? ?M?i?c?r?o?s?o?f?t? ?W?i?n?d?o?w?s? ?N?T? ?1?0?.?0?.?2?6?1?0?0?.?0?
?
Is there a setting to fix this that I have missed?
I can read it fine by filtering out the question marks in my own head but it's a bit difficult
Yar, since the Content Patcher version isnβt seasonal, the issue will probably appear when the season changes.
good ol vsc encoding problem
Ahh, no, VSCode's terminal did that for me at one point. I don't know if it still does, but my theory was it's the way it colours the text.
i dont remember how to fix
My guess on text encoding was right! woop!, does it use UTF-8 or ISO format? I thought UTF-8
Iro, one of the conditions of being re-released from modding is i...no longer crime
... what crimes are you planning, iro
dh and I just thought it sounded fun 
I've already committed crimes in Aba's thread. 
trying to change it to utf 16 using chcp 1200 doesn't seem to work, ahh well, I shall try find out what the right value is
the last time anyone brought up recursion with the intent to crime there were a lot of
s in chat
how goes the knitting, atra
how many socks
you've committed enough crimes to warrant jail anyway tbh
I do read cables and this is off topic
aba's thread makes for a fine enough cell
comfy with good company
what if the knitting is for mod research 
magic weaving, mayhaps
it actually isn't because I was going to suggest making a cable diagram map 
You have a million other places to ask me about knitting including dms
Yes. A literal million
I'm counting "skywriting outside my workplace" btw
but only one where we can discuss how to incorporate cable diagrams into a modded map
my vote is having two seasons be the diagram version and two be the knitted version
ignoring of course that cable diagrams have different proportions to finished objects because I can't resize tiles
i dread the notion of the tilesheets required for this
they'd actually be pretty simple, a cable diagram is in a chart form and has set symbols to use!
Oh yeah for sure! All I've changed for the secret stash event is the context of the stash. Now its just a memory box, filled with keepsakes of the town and from her life
I'm imagining this knitting world as part of a grand fantasy dreamscape that I will no doubt never be able to make
yoshi's woolly world in stardew form
and then you could also make stardew paper mario
and then you make the red mushrooms embiggen the farmer sprite until they look like Gulliver in Lilliput
Hm in that case I think it makes more sense for folks to just turn off my edit (it's a config). Mine turns it into a stash of handmade cat toys, Pierre gets flustered because he doesn't want Abigail to know since he's still quite allergic 
I do add a couple of CTs to Pierre but I don't change his dialogue otherwise, feel free to overwrite.
I'm new to modding, but can I make this or am I totally making this up:" {
"Action": "EditMap",
"Target": "Maps/Town",
"FromFile": "assets/Town-Vanilla.tmx",
"When": {
"HasMod": "false FlashShifter.StardewValleyExpanded"
}
},
{
"Action": "EditMap",
"Target": "Maps/Town",
"FromFile": "assets/Town-SVE.tmx",
"When": {
"HasMod": "FlashShifter.StardewValleyExpanded"
}"
@inner harbor hrm
Negative has mod check donβt work like that. Iβd recommend checking the CP docs again.
That aside, you could simply forego the first when check.
this is basically me yeeting most of the wizard's chara customize options
Not quite, the correct way to check if someone doesn't have a mod is "HasMod |contains=FlashShifter.StardewValleyExpandedCP": false,
you did get most of the way there however
Depending on what the map you're loading has in it, you may want to look into "PatchMode"
i already feel like this will not work on phones so my rec is
- i build a new tiny mod,
ESR.BarberShop, it provides 1 tile action that does the things you want - you pack this tiny mod into ESR, and if it doesn't load then whatever the rest of ES C# is still fine

I'm attempting to get my C# mod to output the item that has been added to a building chest called "AV_ASB_SortInput", so far i've got the console to output CSharp added StardewValley.Item[] to StardewValley.Objects.Chest. when any item is added to any chest, but I'm not entirely sure how to specify I only want it to register when an item is added to "AV_ASB_SortInput"
Here is the code in question:
namespace SMAPI_AtlasV_ASB
{
internal sealed class ModEntry : Mod
{
public override void Entry(IModHelper helper)
{
helper.Events.World.ChestInventoryChanged += this.OnChestInventoryChanged;
}
private void OnChestInventoryChanged(object? sender, ChestInventoryChangedEventArgs e)
{
if (!Context.IsWorldReady)
return;
this.Monitor.Log($"{Game1.player.Name} added {e.Added} to {e.Chest}.", LogLevel.Trace);
}
}
}
You need to fetch the Chest on the building specifically
Iirc the event args should say which chest changed
Might be good to get a list of all of the building chests for that building type on day start, and just compare the current chest against ones on that list to see if it's one of those? I can't see a nice easy way to figure out which building a chest is part of, if any.
Forgive me I have jumped in the deep end with no C# knowledge and generic coding principles, the wiki says the required event argument is e.Chest which is what I thought the {e.Chest} refers to
Yeah i would build a lookup for this
That part's fine
I thought I'd just be able to reference the chest ID directly as itll be the only chest with this ID?
Im just saying that you have to find the building yourself
For people who have used Spacecore's bigger animation schedules feature: Are NPCs supposed to path through solid tiles when the animation finishes and the next point in their schedule starts?
You confirmed it only happens with bigger schedule animations?
I have never seen this in 3 years of NPC modding so I'd say yes?
For your specific schedule i mean, like what happens if you just dont do the bigger schedule anim patch for spacecore
i've only seen "i'm gonn break the space time continuum" when i patch reload, but then again i don't really use the big anims for movement
As far as I can tell this patch exclusively affects draw
But maybe the change in spritewidth messed with Pathfinder
You could also hook the chests events (don't do this)
Huh... my NPC does the exact same without the Spacecore patch. Bizarre, I have never experienced this
Yep schedule shenanigans then
are you setting them on a building tile or something?
They walk into a free space surrounded by three solid tiles
Not sure if NPCs secretly don't like tight spaces or something
unless your base width is nonstandard, it shouldn't really affect it
they should just walk into a corner if you tell them to and their path is unobstructed π€
Oh, dumb mistake. I had my test schedule set to 630-2400-730 so it threw everything out of whack. 
Appreciate the answers regardless.
Well, C# isn't for me, I cannot even find how to access building data, I'll stick to CP packs from now on
Buildings are on the location (a list named buildings
C# ain't hard once you get used to finding shit in the decompile
Hey, so I have a general ettiquette question. When making a mod, is it ok to use other mods' code as reference? I'm trying to make a portrait mod, and was hoping to reference other mods' code to figure out how to make things work. So I'd not be copy-pasting anything, but would be looking at how they format their code and set mine up in the same fashion. I imagine there's only so many ways a mod can be correctly set up for something as simple as portraits, right?
Idk how things work in regards to respecting other folks' work and referencing when it comes to code. I'm more of an artist than a coder and I'm more familiar with where the boundary lies in art (referencing vs. tracing) than in code π
With content patcher often there's exactly one correct way to do things
I do recommend giving the documentation a read so you know why it's the single correct wayβ’ but it's good to start from mod that definitely works as a base
Gotcha, ty! I'm looking at the modding wiki and the documentation to learn, but will also be looking at how other mods set it up then ^^
I just don't want to be, y'know, stealing code lol. If that's even a thing in this context π
it could be but sdv modding is generally open source friendly
feel free to credit the mods you looked at though!
Heh it works! Being able to center the image or add text would remove some of the empty space, but either way, it works!
yea i can do that, i just dont know what you want 
u can make a mockup maybe?
i also vaguely remember this is supposed to cost some money
(i overall agree except when it comes to tokens, folders organisation and such, when there's different ways to do stuff)
you can do anything in C#
Thank yoy
(it is not the case here, but there's definitively mods that did stuff in pretty original (or scary, or both) way)
yea this is true, but i was thinking more like "well you gotta editimage that portrait eventually"
yeah
Any other witchy aesthetics I should do?
is there a list of "fishareaid"'s anywhere, i'm making a fish mod and i want my fish to only spawn in the forest lake, not the river but i'm not sure what to put to do so
look in Data/Locations 
ty!
does EditMap not work on custom locations or something?
it works did you target your map
i'm pretty sure i did. though tbh i don't really NEED it anymore, i managed to do everything i needed to in tiled
you can patch export <your map asset> to be sure 
doing it all in Load is fine cus it's your map anyways
Ok so I'm probably missing something big and obvious, but I'm setting up my first mod. Atm keeping it super simple- just trying to get it to change Abigail's spring portrait. I've gotten the manifest and content files to parse so that SMAPI at least opens the mod in-game (I think? lol) but I keep getting an error that the specified path doesn't exist:
SContentLoadException: Failed loading asset 'Abigail_Spring.png' from SMAPI\duruznik.portraits: the specified path doesn't exist.```
I followed some guides on the wiki and wrote this in my content file, which seems to match what should work for something this basic?
"Format": "2.0.0",
"Changes": [
///// Spring Outfits /////
{
"LogName": "Spring Portraits",
"Action": "EditImage",
"Target": "Portraits/Abigail",
"FromFile": "assets/Portaits/Abigail/Abigail_Spring.png"
}
]
}```
wait I just realized I messed up the folders oh my god
Nope, even with it fixed, getting the same error. Am I missing something basic?
You're doing an HD portrait right?
Yeah
Trying to use Portraiture as the framework. I have my manifest set up so it recognizes my mod as a portraiture content pack. That's the best way to do it, right?
What it says it's just that the path to Abigail_Spring doesn't exist, all the names are correct right?
You're trying to do it with Portraiture, not with the HDP compatibility?
Would it be simpler to use the HDP compatibility?
I do know that portraiture doesn't support a lot of custom tokens, but the appearance system should work for that, right?
And I think all the names are correct? unless I'm going senile (which I might be lol)
The appeareance system would only work in case you use Scale Up or Space Core to downsize it
And being honest in some cases I don't really recommend doing so, Space Core needs to have code for each and every face so it becomes a lot of work, and Scale Up can consume a lot of resources which leads to lag
oh dacar i wrote a script to help with the spacecore case
i never heard abot scale up to consuming resources tho that's a new one
Yeah, it's strange
Yeah I heard that scaleup is a big resource hog
But when I changed some of mine to use Scale Up 2 it ended up giving a lot of lag
so best to set this up as an HD Portraits mod then?
you mean portraiture right
most likely cause it was a lot of pngs loaded, cause it was RSV, SVE seas and Vanila seas
No, HD Portraits, using Portraiture's compatibility function to run
it prob needs more testing tbh i havent done much 
This is some C# stuff right?
this is just a python script that auotmatically generates the spacecore edits
to make it less annoying
Ooooooh, I would have to take a look at it
And see if Bigger backpacks doesn't mess it up
For some reason it messes up the vendors portraits
YEAH, I'm pretty sure that hardcoded stuff is what messes with Spacce Core but I have 0 intentions to do something about it tbh
if u got a set of pngs for some character done (ideally vanilla) i can run it for u
wouldnt spacecore be find tho, it's targeting the actual spritebatch draw
I think rn it may be the best option, at least it's what I think is the easier
so the offsets should be known 
Gotcha, ty! Do you have any resources for how to set it up?
duruznik its just up to what you would personally use in your game 
I just... have no idea what it is exactly but it does something
nice
It ends up looking like this 
is this with scale up 2 or with spacecore?
SC
Well atm it doesn't seem to be even finding the file lol, which is weird because unless I'm going blind it looks right?
Whenever you use it with Bigger backpacks
Like that's the correct path, right?
It is but it may be an error due to it being HD? I know that you can't edit Image a pixel art version with an HD one
I just added a Scale up version, cause a lot of people do not read unfortunately
Ahh, I see. So I'd need to set this up with HD Portraits support in mind? Do you know where I can find resources to do that? I'm uh, very new to modding π
I still get asked how to make my mods work when I have in big letters how to
I think there isn't any resource to that rn? I just had to figure out stuff on my own
Maybe I should add a page to the modding page with everything I know about this...
I mean that would be amazing haha, but also would be a lot of work for you for sure^^;;
It would be useful in case more people wanna do CP HD mods so I maybe will do it some day, For now you can take a look at my mods and see the code, if you have any question I can answer it
For real? That would be awesome, thanks! So it's ok if I poke around and try to set mine up in a similar way? Obviously I'd give you credit on the mod page
(I'm really new to modding lol, idk how things work regarding copying ocde, etc. Dont' wanna overstep any boundaried lol)
we should bully iro into making a better HD portraits framework
with animation support n shit
Yeah! You wouldn't be the first one to do so
I'm already having him help me with the animation stuff 
Thanks so much lol, I know my way around pixel art just fine but with coding I'm like a tiny baby. I think I took a 2-week javascript class when I was 12?
that's... basically it lol
I'm always open to help, and the more CP HD mods there are the better imo. As that let's you do more funky stuff
Thanks so much! I'll start pokeing around lol
yes therefore it is the perfect chance to extort more 
i do dislike how scattered the HD things are rn
Yeah, me too. I see a lot of just Portraiture mods and feel they are missing out 
You can add more headcannons and stuff, change portraits according to events stuff if you just tried CP 
Yeahh, and I tried getting PortraiturePlus to work but it was causing some wild conflicts with another mod's seasonal character sprites, somehow
Not even the portraits, just the sprites stopped working
something i havent really seen people explore is hd portraits via DDFC
i know a lot of the excessively large nsfw mods use these for 3/4 body portraits
I was already using HDP before 1.6 so it was the easiest transition for me
and they r at HD resolution so it theoretically should work
Also I'm afraid I would try to make full body art for that
it's not something you have to do
based on docs here i believe you can just set them to scale=1 w=256 h=256
I know, but remember I'm trying to make them talk just cause I think it's cool
Heck, Seasonal Razzy was created cause I wanted to do more Razzy
what is not very nice is that the DDFC system overwrites the vanilla appearances 
what 
like if you had a DDFC portrait entry for the npc i mean
it'd ignore the picked appearance
i wanna say you just lave it at null and then set the scale/w/h tho
might work 
It might actually, I may try it depending on how easy the transition may be
(Mostly cause ARV seems to have some event changing outfits that will possibly be impossible in HDP)
R&D 
I failed
so what i wanted to do is take the furniture.json file from Data and from Strings and edit both and just link the edited copies to my mod
sounds much more complicated than just doing an EditData patch on them
not to mention that the game doesnt even use the .json files itself, thats just a result of the unpack
i wanted to edit a bunch of details for them, like the type of furniture, inside/outside.. idk how to do it in EditData while there is a neat line
if you're replacing specific drtails for existing furniture but not overwriting the whole thing you can edit specific fields with EditData
if you're replacing enough about the existing furniture anyway t hough you can just overwrite the whole line
ok i will try the EditData but its so confusing
https://smapi.io/json/content-patcher/6f9ea204d74745f48f1fc3097ee20936 i am unable to add my custom fish to an aquarium and i'm not sure why
for the description, should i use [LocalizedText Strings\Furniture:Statue] or {{i18n:Statue}}?
is this your custom furniture or an existing game furniture
existing, im only renaming it and changing some properties
i dont see Statue tho
this is the new name i gave it
don't change the key
what is the furniture you are trying to change
also wait description 
you will need spacecore or mmap then
uhhh
all of your aquariumfish have a / not a . like the entries*
oh thats my bad, i was copying and pasting from the modding wiki so i missed that during my corrections
ty
i replaced the slashes with periods and it let me put them in the tank but theyre floating errors, any idea why?
do i need to make separate sprites for the aquarium?
I think you need to wrap each aquarium texture entry in escaped quotes, e.g.
"{{ModId}}/desertcatfish": "0/float/////\"Mods/{{ModId}}/desertcatfish\"",```
because otherwise, those slashes in the texture are interpreted as another entry

let me try that first before going to the trouble of making aquarium sprites lmao
"{{ModId}}_{{FISH}}": "{{INDEX}}/{{TYPE}}/{{IDLEANIM}}////{{ModId}}\\Sharks"
i have aquarium sprites though
uh, where did i load that
i was basing these fish off pufferfish in terms of behavior which i dont think have seperate aquarium sprites? but i could be wrong
oh, right, backslashes is probably the right way
(the wiki and vanilla don't have any examples for this particular asset)
"Action": "Load",
"Priority": "Low",
"Target": "{{ModId}}/Sharks",
"FromFile": "Assets/Animals/Pau_Sharks.png"
},```
it uh
ultimately depends ig, if you want them or not?
ignore all of my {{index}} that's just localtoken nonsense
the item sprite might not look right as an aquarium sprite w/o editing, but getting it to work first will help
well let me try adding the extra quotes first
you can just do the \\ route, idk exactly where you've loaded these assets, but just follow the same path
try avi's example first, the double backslashes in the texture target, yeah
I was going off memory
my memory is shit so that's why i have templates for everything
I've been making a gsq-ish system for a while, so escape quotes is my goto for everything 
for the FTM+CP thing? 
yeah, it uses tile queriesβ’ to pick where to spawn, with more or less that format
i assume you loaded each of these individual sprites like that though
(e.g. "TileCondition": "CAN_PLACE_ITEM, AREA 10 10 5 5" to spawn in xy = 10 to 14 and not blocked by stuff)
mine is OneHonking.pngβ’
my load action used / not \
that's fine
there's an explanation somewhere about where \\ is necessary but i never remember
if its normally using / to delim entries
the blackslashes are ignored by the "string split up by /" systems, but they're still treated like slashes in the texture
\\ = \ = still a slash that the texture finder is fine with
sometimes i load my pngs to like {{ModId}}-Blah-MyThing to dodge having backslashes at all
yeah, asset targets barely care about the concept of slashes or "folders" or w/e, it's just an old convention 
hm it'd be nice if TargetWithoutPath could take an arg for the delimiter
related to the "hell of spacecore" i am defeated, i giveth up
No this is it
It made the farmhouse go wonky like that, froze, and my smapi log was a wall of red text
You managed to load a texture now
what does your fish load look like
https://smapi.io/json/content-patcher/26ae308c81d74b1ca8460e5454fdd197 its at the top of the content.json
Do u have all these pngs on disk
on disk?
In your mod folder i mean
oh yes theyre in an assets folder in the mod folder
I guess you can confirm just by seeing if all your fishies work as objects
yeah the fish loaded as objects just fine
well the ragdollcat has one stray /
and before i started coding the aquarium data, they were appearing in the water with visible fish but they were floating around like the way trash does
Mods/{{ModId}}\\ragdollcatfish
Mods\\{{ModId}}\\ragdollcatfish
(also ensure the modid itself doesn't have forward slashes in it)
that's a fun one
...oh, aquarium sprites are supposed to be 24x24, too 
oh right they're chunky
would it just ignore it and fill the gap? just be like, a weirdly topleftmost since they're all individual pngs?
same crash, here's the crash log https://smapi.io/log/f6083ef92ca24fbabc1231f1ca4f190f
Log Info: SMAPI 4.3.2 with SDV 1.6.15 build 24356 on Microsoft Windows NT 10.0.19045.0, with 74 C# mods and 93 content packs.
Suggested fixes: One or more mods are out of date, consider updating them
yeah i might just need to make the aquarium sprites
pretty sure that's how it's reacting to the spritesheet being too small, yeah
Got it, ok back into the pixel art creator I go lmao
(looks like it's saying "okay width / 24 = 0 columns on the spritesheet; now divide frame # by columns, which is 0")
im trying to change a chair to a statue
why do i need space core for the description? I want it to just be called differently
the base game just doesn't give furniture-specific description text, it's all automatic based on the type
that's been changed in the 1.6.16 alpha, but that will probably take quite a while to come out
can i at least make it possible so the player cant sit on it?
you can change the "chair" setting to something else, most of them can't be sat on
https://stardewvalleywiki.com/Modding:Furniture
i wanted "decor"
decor should prevent sitting or any other furniture interactions, so that should be fine
i see why i was having trouble the new sprite (right) is way chonkier KJHDFKJFSDFSD
No
Tbh im confused by your goal, why change existing furniture when you can just add one 
i want it to be a surprise sorry >.<
Like do you only want the chair to become the statue on some random days?
no, always
It works!
@safe kraken thanks so much for letting me poke around your code and copy your homework lol, I think I've figured it out!
Glad to know it works!
Now to start working on the... 500 other art files I need to make lmao
Have fun!
Iβm trying to write dialogue for a new custom NPC with different themes for each day, but Iβm still struggling to come up with enough varied and interesting lines. Any advice on how to keep things fresh and fitting without losing consistency?
Some ideas i heard is to start with the npc reacting to stuff, so specific dialogue like in festival and conversation topic (CC completed) and so on. It gives the something concrete to focus and could inspire their daily dialogue along the road.
Another one is to wait till you wrote down the events as those also spurt ideas sometimes
https://smapi.io/json/content-patcher/d817548c502046f1bf2ac3a707e07eae every sprite in the aquarium is working except the ragdoll catfish can anyone spot if mispelled something or some other error bc i don't see anything
here's the assets folder in case i mispelled a file name and am just missing it
it says Mod\\ instead of Mods\\
in the aquarium data
How do I make a spouse room and patio for my custom npc?
@rigid musk I am maintaining an article on the DSV modding wiki And I think it would be neat to showcase the actual portraits with every entry. Would you mind if I use your Nyapu portraits Friendable Mr. Qi for the article?
Of course but please use proper credit for the person who did the main part of it (I edited them later on, but I didn't make the main portion of them) - if you use the Ms.Qi ones also do credit for those, I did end up doing the textures completely myself due to some issues but someone helped create a general idea for me to go off of. Credits should be at the bottom of my mod page :)
Mr. Qi: Pommello edit of Nyapu's base.``` Would this be good?
Yeah! :D
Awesome, thank you! (I actually DMβd you on Nexus too. Sorry for the double message.)
It's okay, I've kind of been avoiding Nexus due to my health so I wouldn't have seen it π
I'm so pleased to discover Rodney Deserves It Too from reading the wiki article 
Yey, Rockstar Rodney for everyone!
I thought decompiling the game would help me figure out how to read a building chest on a specific building in a location, but I still have no idea how to do that, does anyone know of a C# mod that does do this that I can cross reference to try and figure this out?
Building.GetBuildingChest
Im not seeing that in the Buildings.cs files, only Building.GetBuildingChestData which takes 2 arguments, data and chest.Name, what would i pass as the data argument? the building name?
unless I've severedly got this wrong
there should defintely be a GetBuildingChest
and another overload for GetBuildingChestData, even
I was searching for Building.GetBuildingChest, not GetBuildingChest whoops
This is the snippet I've got so far now after doing stuff to remove the errors, I'm not sure where to define the building name itself, more specifically the name of a single instance of the building
if (!Context.IsWorldReady)
return;
var Building = new Building();
Chest ASBInputChest = Building.GetBuildingChest("AV_ASB_SortInput");
this.Monitor.Log($"{Game1.player.Name} added {e.Added} to {ASBInputChest}.", LogLevel.Trace);
why not grab an actual building on the farm instead of making a new one
that blank Building isn't going to have anything
I though that's what this was doing and I just needed to add the name of the building somewhere so it knows to grab the building on the farm
so would I change var Building =new Building(); to the code to grab the building on the farm?
yes
I think this is mentioned earlier already but every GameLocation stores its buildings in a field named buildings
Is my npc data Content.json? This is my first time modding so I have no idea what Iβm doing
the only place I'm seeing GameLocation and building (not buildings, I can't find that) is in StardewValley.WorldMaps >WorldMapManager.cs, is this the right location to be able to find the buildings on the farm?
!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!
the tutorial in the first bullet point will be very helpful
but to answer that question specifically, your NPC data is... wherever you put it. you're the one who decides where it goes. content.json is just the main file Content Patcher reads
you'll definitely want to look at Content Patchers documentation too but i believe that tutorial will guide you along those sorts of steps anyway
(but still recommends the docs as supplementary ofc)
Thank you so much, Iβll try it out!
an NPC is a very large undertaking especially for a first mod but if you've got the patience and motivation its manageable
I think I've found the right part of the source code, StardewValley>GameLocations.cs > public Building getBuildingByName(string name), how I just have to find the building interiors unique name, how would I do that? is it the name set by my CP pack? or if I have multiple instances of the building on the farm how do I find the first building placed?
is moddata propagated to farmhands from the host?
as long as the farmhand can see the real version of the thing with the moddata
e.g. if the host puts moddata on an NPC, it wont be on the shadow world NPC a farmhand would see
likewise if a farmhand puts moddata on a shadow world npc it will just disappear
afaik anyway. someone can correct me if im misremembering
(and ofc a farmhand can always see an AlwaysActive location so for example the Farm's moddata is safe for this)
hmmm. I actually don't want this to propagate because there's no reason to, so I'll have to find somewhere else to put this
whats the context of this
just storing some extra textures for some npcs
storing the textures themselves?
yeah
probably just gonna stick it in a container in my mod class tbh, it won't build up or anything so gc shouldn't be a massive concern
why not store the asset name corresponding to the texture?
oh this isn't for like, long term anything, I just don't want to be reloading a texture every few frames
part of me is still confused enough to wanna know more but most of me says "i trust iro knows what theyre doing so theyre fine" so good luck 
you know enough to ask about needless netsyncing
im not worried about you doing something dumb and wildly incompatible
I'm animating something to do with portraits, I don't want to reload the portrait texture every draw call so I need to put it somewhere outside my postfix for safekeeping
(it's a postfix because I don't want to deal with prefix compat)
see you're answering why i trust you know what you're doing
the fact is after a lot of the code ive seen on nexus and in other modding communities, trusting that someone wont just reload textures every frame in a draw call is not the default state for people for me /lh
I mean I could but I don't think people would appreciate Stardew Slideshow Edition /lh
uhhh
screw it, <string, ???> dict it is
Got it
Loading all game content every frame
Also, mining bitcoin
We call this "PowerPoint"
who's we

world's least useful suggestion
It once suggested ````if DEBUG.Writeline(```
....i hope that is the right syntax for a conditional compile in c#
I forgot
Oh, and intptr<intptr<intptr
Oh and it wants me to use an AbandonedMutexException every time I try for a class that starts with an A
Which is a lot because my name starts with an a
my linter/code styler/whatever it is also wants me to use vars and half the time i just ignore it
too lazy to change it
I disabled it now
I feel like c# code is more readable to me with explicit types anyway
It's in your editorconfig
Go steal pathos's
I think it's a rite of passage to steal pathos' editorconfig
Root of the project iirc
im not clicking that, whats in my editorconfig is on a need to know basis and i dont
How do I find a building interiors unique name? Idealy I want to make it so only 1 building is able to be present in the save at once, would that mean it's just the "IndoorMap" field I set in the CP component?
if you only want one copy of your building to exist on the farm you can use the BuildCondition field in the data + BUILDINGS_CONSTRUCTED GSQ
Would that also affect extra farms mods add that can have buildings on? like east scarp and Ridgeside so that only 1 building can be placed across all the farms?
that GSQ takes a location argument, you can decide that
if you set it to "All" it checks the entire world
oh perfect, that's exactly what I want, I shall add that to the content pack tomoz, it's a much nicer solution to what I was thinking
I hate reflection
Publicizer
are you calling me a publicizer or telling me to use a tool called publicizer
most of my projects start with a publicizer in my csproj now
no more reflection but be warned... you will have a hard dependency on Stardew Valley
well this being a stardew mod
I think I have a hard dependency on stardew valley regardless /lh
ynever know. maybe you couldve reused this code for Haunted Chocolatier
(Krafs.Publicizer nuget package)
or your other publicizer of choice
but i think krafs is the most used
so it did work and it didn't 
oh right it's an hd portrait lmao
...why isn't this working
do I have to literally hard reference stardew 
did you add the stuff to your csproj
<ItemGroup>
<Publicize Include="StardewModdingAPI"/>
<Publicize Include="Stardew Valley"/>
<Publicize Include="StardewValley.GameData"/>
</ItemGroup>
ah. there's a space in th name
all this just to make a portrait shake 
wait THATS what youre doing? lmao
oh no
I'm animating something
I just had to make sure portrait shaking didn't break haha
ah
whats that one mod that allows you to make bigger trees
oh hell yes
Has anyone had issues with updating their mod on nexus? No matter how many times I try to upload a new version, the old file is still being downloaded, even after I've waited for Nexus to make the changes. I'm probably doing something wrong, but I can't figure out what.
hey there! i downloaded a sprite sheet thats meant to replace the parrot trinket, anyone know where to find the parrots location in the files?
Screwllum detected. 
The sprite sheet itβs on is called Companions iirc, but Iβm not entirely sure where it is.
Tilesheets/Companions
Nexus CDN issue, that tends to happen when you update way too fast. I suggest just waiting it out a little bit (i also mentioned this awhile back in #modded-stardew )
Thank you! Changing the name of the Zip file seemed to do the trick for me, but I'll keep that in mind for the future
any idea why this isnt working to replace the sprite? content.json:
"Format": "2.3.0",
"Changes": [
{
"Action": "EditImage",
"Target": "TileSheets/companions",
"FromFile": "assets/beellum.png",
"FromArea": { "X": 0, "Y": 0, "Width": 176, "Height": 16 },
"ToArea": { "X": 0, "Y": 160, "Width": 176, "Height": 16 }
}
]
}```
it js shows up as the normal parrot in game >.> does pixel counting not start form the top left corner?
Keeping THIS in mind as well 
!log there might be useful information in the smapi log
Important note: Your computer username may appear in the log. If your username is your full name, please be aware of this before uploading it.
Please share your SMAPI log file. To do so:
- Open this page: smapi.io/log.
- Follow the instructions at the top of the page to upload the log file. (Don't copy & paste from the console window!)
- After uploading, it will show a green box with a URL to share. Post that URL here.
Please do it even if you don't see any errors. This has useful info like what mods and versions you have, what the mods are doing, etc. If the issue didnβt occur in your last session, please load the game to the point where the issue occurs, then upload the log.
Log Info: SMAPI 4.3.2 with SDV 1.6.15 build 24356 on Microsoft Windows NT 10.0.26100.0, with 25 C# mods and 13 content packs.
Suggested fixes: One or more mods are out of date, consider updating them
my mod is beellum
11:02:06 ERROR Content Patcher Can't apply image patch "Beellum > EditImage TileSheets/companions" to TileSheets/companions: source image size (Width:256, Height:16) doesn't match ToArea size (Width:176, Height:16).
aaahh
thank youu
huh but an image being bigger shouldnt be an issue π€
if you do the from area to area thing correct

its this image took from here https://prismo87638.lofter.com/post/748081e3_2bf159368
i think its meant to replace the fairy but id like the parrot instead
Didn't know theres SDV mod inside this app
Well imma yoink this, thanks
hi guys!!! I wanna asked what is "Action: "Include"" Mean?
I suggest you look at CP's Action: Include documentation about it
Thank you very much! β€οΈ
Anyone have videos or tips/websites on info for how I can make a mod? I would preferably like to add something in the game instead of replacing something already in the game
Iβve never really modded so im a beginner
Sameeee Now, I'm figuring how to edit everything in newest changes
!startmodding
Making mods can be broadly divided into two categories:
- Content packs are formatted text files, and don't need any programming knowledge. They can add/edit NPCs, maps, new items, shops, and more. To get started, see the list of framework mods, the wiki tutorial for Content Patcher, and there might be relevant guides on the tutorial wiki.
- C# mods use programming code to change fundamental game mechanics. See getting started with C# modding.
Usually itβs easier to start with making content packs, since you don't need to learn programming.
Oo tysm
@calm nebula: ββ (24h ago)
While trying to find a way to find the unique name of a location I came across the debug command debug worldMapPositions, I thought this might've been the right command however the name of the location it output was AtlasV.CPAutoSorterBuilding_AutoSorterBuilding9e2948d8-307e-4901-a60c-b42975a8775f, the 9e2948d8-307e-4901-a60c-b42975a8775f part leads me to believe that this is randomly generated each time a the building is placed, is this true?
depends of what "unique name" you needs
if you need the name of a specific instance of a building (ex, a shed), then you need the password style id
if you want to edit generic sheds then you use whatever names they are loaded as (which, for vanilla, is shed)
Yes
Look up guid
for your building it's likely AtlasV.CPAutoSorterBuilding_AutoSorterBuilding
Or just look at the name, not the nameoruniquename

