#making-mods-general
1 messages · Page 297 of 1
I thought it was for Emeralds, Rubies, Diamonds and so on - but it returns 0 in an advanced save
Since they are listed on the Wiki page I thought that all of those were used
from a quick code dive that one is incremented every time you break a Gem Stone (the stone with the purple swirl)
isn't that "mysticStonesCrushed"?
mystic stones are the blue ones with multiple cyan swirls
Yeah, I think it's not actually implemented
FTM is gonna take me some time to get used to it
It's definitely a great mod but there's a lot to use and remember
question who is th creator of distant lands
@wicked gulch
Is there a way of getting a fish to spawn on a stormy day or do you only have the option of rain?
WEATHER Here Storm
Thanks!
Can you have more than one condition? I already have the SEASON Here condition
add commas between them for AND
FTM seems hard to use without have knowlege of what it actually does for Custom Monsters, I want to do something like Extra Skin with a new name ?
I admittedly don't have experience with FTM either, but looking at examples help
Why does your mod need FTM
I feel like you just need to handle people catching monsters spawned by FTM right
(I admittedly have no context as to what they are working on)
(I admittedly use the word admittedly too much)
Pocket monsters apparently #making-mods-general message
It sounds a bit like the thing in stardew druid
oh, so the whole thing is in C# anyway
im trying to figure out the best possible way of adding new monsters without people having to know how to code
so new , i bearly understand what im doing now XD
It's your C# mod the world's your oyster
But yeah in your case i don't think u need to add monsters per say
Simply having a way to save the stats, class, and textures of monsters "caught" is enough
You can take a look at various framework mods to see how to implement one if you want ofc
It's low ambition compared to FTM (all it does is change look and drops of a monster, there's nothing for spawning)
I wonder how difficult it would be to update MTF
It's too bad that never took off, I was excited to see what other might come up with
Monster data didn't change that much did it 
But it was always a demand thing, i feel like the combat system lacks depth
im trying to make something close to Rune Factory
The wiki doesn't mention much about Monsters, so doesn't seem like a lot would have changed
I'm not sure how it'll interact with a catching/taming mod, but:
- FTM is a framework that spawns monsters (or other things) at certain times of day, controlled by content packs in other mods
- those packs can use it to customize monsters in some ways, e.g. replace which skin they use, though it only customizes things those packs spawn (e.g. it can't edit things spawned by Stardew or other C# mods)
- it can spawn custom monster classes added by C# mods in the same way as vanilla monsters (see the readme section here), so if you want to give content pack users the option to spawn things with custom logic, it can do that
- all that said, FTM doesn't serialize any custom classes & just despawns them prior to saving* instead, so it might not interact well if your mod moves/respawns monster instances on its own
Yeah stardew combat is fairly simple, I also think that stardew as a game doesnt attract as many people who are super interested in combat in the game.
Content patcher question : can a separate content pack "deregister' a modded item, if for example you have Juniper Berries coming from multiple mods. And wanted to fully remove one completely in favor of the other?
I assume just setting the entry that defines item info to null like for recipes wouldn't work?
Well u can in fact edit an item into null but that's a Bad idea
Use selph mod instead
you'd need to hunt down every reference of that item in crops/recipes/machines/shops/bush bloom/FTM spawns/who knows what else
If u r make mod with this in mind tho u can also be like
If cornucopia installed use cornucopia butter else create own butter
But that gets really messy if people install cornucopia in middle of play
There's various ways to just let you use both butter for things
In this case is goal is just to not impact perfection but merge Copper Still and Cornucopias Juniper
I suppose might just be simpler to make the mod exist to add a recipe clone to copper still to use Cornucopias Juniper. Would still admittedly want either juniper to be equivalent.
Copper still juniper is used like two places, once for bush bloom mod, then again for its gin recipe. But I guess changing those places and making the copper still item not perfection tracked somehow would probably be better than yeeting it fully
if I wanted to use content patcher to change a vanilla food buff, it would be something like this right?
so like this then?
You should make the Id field and the key match
also a good idea to add {{ModId}} to both
also you have double { { there, after the key
i dont know what you mean by these terms
you say ID field and I only see one thing labeled as ID
also changing some durations. Also aren't all food buffs ID as Food so they overwrite each other? All drinks are labeled as drink
hold on, is this Food buff entry new or from another mod
this is a food entry from the base game*. I am trying to edit a vanilla item but just the fields I want so it's more conpact.
ok, so new entry
oh Rhubarb Pie doesn't give buffs. I thought it did
anyway what I meant is change "Rhubarb Pie" to "{{ModId}}_SocializingBuff" and "Id": "Food" to "Id": "{{ModId}}_SocializingBuff"
in CP, when you edit a list/dict it tries to find the appropriate entry to modify by using the Id field, what you're doing here is "find the entry in Buffs with the Id "Rhubarb Pie"" and add/edit it
since you're adding a new entry (and thus neither "Rhubarb Pie" nor "Food" exists anyway) it doesn't really matter, but I recommend following best practices regardless
actually, hmm, on second thought probably use Food for both
(if there are multiple Buffs do all of them get applied when you eat it?)
if they have different IDs under the food item, yes. If they are listed under the same ID, the game changes the existing buff to the new one
which is why (almost) all the food buffs have the ID of food
Beautiful organic hardcoding
But makes sense to me 
I know rhuharb pie doesn't have buff but in the case where there is already Food, think u should be able to target all the way into CustomFields to add the socializing custom field, then do a different edit and target into CustomAttributes to efit the vanilla skill buffs
i was actually about to ask about that
that would be something like this?
target the item -> target the buffs -> target the 'food' buff -> target the custom fields
The blahblah.socializing is the key
remove the second CustomFields block, you're already inside it via TargetField
but yes, looks good (assuming Buffs > entry with Id Food exists)
? okay tyvm for the help! would give you duckie or cookie or upvote if they existed here.
🍪

okies, tyvm for the help. Time to do some YACS editing, adding some food buffs for cross-mod skills to some vanilla items.
I'm still buzzing that I was able to make a mod with all the support from folks here
Does the "(O)" stand for object?
like the object id?
yes
see https://stardewvalleywiki.com/Modding:Items for more info
thanks everyone for helping me out today 😄 i got a lot done
I am using this way to open a chest inventory menu, however after close the menu sometime the game is stop until a button click. anyone know how can I solve that?
var obj = getNpcInventoryChest(npc);
if (obj != null && obj is Chest npcInventoryChest)
{
DelayedAction.functionAfterDelay(() =>
{
var menu = new StardewValley.Menus.ItemGrabMenu(
inventory: npcInventoryChest.Items,
reverseGrab: false,
showReceivingMenu: true,
highlightFunction: null,
behaviorOnItemSelectFunction: npcInventoryChest.grabItemFromInventory,
behaviorOnItemGrab: npcInventoryChest.grabItemFromChest,
message: null,
canBeExitedWithKey: true,
showOrganizeButton: true,
context: npcInventoryChest
);
// This ensures the player can move again when menu closes
menu.exitFunction = () =>
{
Game1.player.completelyStopAnimatingOrDoingAction();
Game1.player.forceCanMove();
Game1.player.CanMove = true;
};
Game1.activeClickableMenu = menu;
}, 1);
}
hooked to OnButtonPressed btw
It would be kinda nice if you could edit map appearance with conditions the same way you can edit NPC appearance. I guess I'll stick to patching.
I don't think you need to do any exit function
But it could be the delay action you have causing problems, do you need that 
gpt suggest that. still happen with or without tho
I have similar bit of code and it's just swapping in active clickable menu from buttons changed
Why are you asking llm for modding code lol
Another thing u might be bumping into is chest mutex
Though if it's a secret chest idk what would be holding the mutex (chests anywhere?)
I used global inventory to avoid all that
(also mods with ai-generated code/code in general that is AI generated aint allowed to be shared in here.)
lol damn even ai code
custom monsters , but it has to be hard coded sadly

content patch failed
back to the pit with meeeeee
Buff data not cache
I have it functional. Now I just need to lower that time >_>
Chests anywhere doesn't respect chest mutexs anyway
harmony and reflection crime question! suppose I dynamically generate a prefix. Harmony won't accept a DynamicMethod and asks me to "use a factory method instead that will return the dynamic method". has anybody actually done this and can point me down the right path?
Sure, go ahead! I'm curious with the questline 👀
What problem are you trying to solve?
I do not want to manually write a bunch of (nearly) identical prefix/postfix pairs
And thus i wish to dynamically generate them
What would the differences between them be?
the prefix is essentially MyManagerClass.RegisterThisThing(a, b) and the postfix is essentially MyManagerClass.UnRegiisterThisThing(a, b). a and b are supplied by me (manually).
I theoretically have a DyanmicMethod that represents these prefixes and postfixes, but harmony is upset because it is a DynamicMethod
Step1 regardless is register normal static methods as the prefix/postfix
public static void PrefixPostfixPatch(Harmony harmony, MethodInfo original, string a, string b)
{
harmony.Patch(
original: original,
prefix: new HarmonyMethod(PrefixFactory(a, b)),
postfix: new HarmonyMethod(PostfixFactory(a, b))
);
}
private static MethodInfo PrefixFactory(string a, string b)
{
var helper = AccessTools.Method(typeof(PatchGenerator), nameof(PrefixHelper));
var dm = new DynamicMethod("DynamicPrefix", typeof(void), Array.Empty<Type>());
var generator = dm.GetILGenerator();
generator.Emit(OpCodes.Ldstr, a);
generator.Emit(OpCodes.Ldstr, b);
generator.Emit(OpCodes.Call, helper);
return dm;
}
// ... more here
If you want the dynamic method craziness just invoke them inside those static methods
Can a prefix/postfix accept arbitrary parameters?
They can access static state in your class
Are you intending to harmony patch the exact same method multiple times in this class
I intend to use this patch generator to patch a bunch of different methods
I understand you may wonder why I want to do this
the prefix and postfix take no parameters
static Dictionary<MethodInfo, Tuple<string, string>>
Definitely wondering the why rn
You can do MethodInfo ___original or something to get the original method
BarleyZ, you can use the same function to patch multiple functions....
ok suppose I want to prefix two methods from the game: MethodA and MethodB. The prefix for MethodA should look like this:
public static void PrefixA() {
MyHelper.DoTheThing("someString1", "someString2");
}
The prefix for MethodB should look like this:
public static void PrefixB() {
MyHelper.DoTheThing("someString3", "someString4");
}
I want to generate these prefixes automatically by supplying the two string literals because there will be a lot of these prefixes. Am I going completely in the wrong direction?
Thanks!
As for the questline, all I'll say it'll probably be about revolution and snacks... (as you can guess, it's gonna be dumb
)
I can generate a DynamicMethod that represents these prefixes, but Harmony is upset because it is a DynamicMethod and requests that I "use a factory method instead that will return the dynamic method"
I might give this a go and just have one prefix tho
it is probably less cursed
Profiler does that approach for its content pack and Api based monitoring
ah its MethodBase __originalMethod
yes, as is ConstructorInof, etc
https://github.com/SinZ163/StardewMods/blob/main/Profiler/PublicPatches.cs has the harmony patches themselves
the caller hits PublichPatches.AddDetailsEntry to populate the data, and separately tells harmony to aim at the methods it wants
but all of profiler is 1 transpiler, 2 prefixes and 3 finalizers (the method called postfix got changed to a finalizer and forgot to rename the method)
Yeah it sounds like the bulk of my mod I can get away with one prefix and one postfix that I apply to multiple game methods
or probably a finalizer rather than a postfix now that you mention that
if all the postfix does is cleanup, you might want it to be a finalizer
yup it's a cleanup
as postfixes don't run if the method errors out, or a prefix skips the original
i'm assuming nobody can skip someone else's finalizers?
not that im aware of, short of just telling harmony to unpatch the method
i can skip ur finalizer by transpiling it
please don't 😔
but yes baring crimes like this you good
i can't believe even this time the answewr was hashmap
the answer is always hashmap /lh
I am typescript brain, if a dictionary/object will do the job I will generally lean towards it
i was on the brain of "i want my code to do this for me" and then you made me realize my code doesn't need to generate code it just needs a map
I gathered that part, which is why I ignored your original question and asked what is the problem you are trying to solve
i needed that 😔
i have written a lot of code for several different projects today and my brain is tired
i am still curious what the answer to giving harmony dynamic methods is even if I'm not going to do it
Dictionary<MethodBase, DynamicMethodWhatever>
harmony needs sane static methods to aim at for the IL to be sane, once its invoked your method call the dynamic method yolo
ah
to me the exception it threw implied that I needed a factory that gave the HarmonyMethod ctor the dynamic method and I was like "i'm doing that and you're complaining about it" haha
So is the answer maps no matter what
lookup tables solve so many problems
i'm telling u the answer is always hashmap
ur interviewer asks what your favorite food is? hashmap
@rigid oriole https://github.com/Spiderbuttons/BETAS/blob/main/BETAS/DynamicPatcher.cs
i understand you're going for a different method (i think. i skimmed my backread tbh) but if you're curious how your original want would work, i have done it
public static Dictionary<string, KeyValuePair<MethodBase, List<DynamicPatch>>> Prefixes
hashmap wins once again
i cannot belive it
Do you think there's a hash out there pointing to me
in discord for your message id, or your user identifier, yes
your social security number
@lucid comet re: compact shop inquiry (about search for descriptions) on nexus, the feature is pretty simple to do, but idm if you want to make a PR as practice
//// "Fruit": [
{
"Id": "E{{ModId}}_Pufferfruit",
"ItemId": "{{ModId}}_Pufferfruit"////
welp that's not the codeblock command lol
anyway, anyone know why this example on the wiki has that E in the ID?
typo probably
i did do hasmod but not as a token 
u just give mod(s) required for an option
hm wait
whats the behavior if a mod in requiredmods of config is not installed
rn it simply isnt visible but the config still exists, maybe it needs to revert to default value
Invisible but still exists makes sense
yea ig i just wonder if it should actually be invalid token, or revert to default value
didnt do either of these in draft
does this work ? to replace a mod's textures?
"Format": "1.26.0",
"Changes": [
{
"Action": "Load",
"Target": "Mods\\Sword & Sorcery\\[CP] Sword & Sorcery\\Assets\\Items & Crops\\BlessedTools.png",
"FromFile": "assets/BlessedTools.png"
},
{
"Action": "Load",
"Target": "Mods\\Sword & Sorcery\\[CP] Sword & Sorcery\\Assets\\Items & Crops\\StygiumTools.png",
"FromFile": "assets/StygiumTools.png"
}
]
}
ahhh okay
you have to look at S&S's loads, then do an editimage targeting the same
okay, thanks so much!! im so new to this, ive just been reading a lot of stuff online haha
I want to say unready, or require the config tokens to be guarded by HasMod.
Or have an explicit fallback value
not 100% on the usecase so its hard to say what behaviour would feel good, because unready/invalid tokens would torpedo any patch they are used in
yea hm i think it's mostly for mods that are hoping to support different mod
if its only used in separate patches to do the compat, then unready/invalid work great
but if they use it in Appearances for example directly in their main Data/Characters edit, the npc stops existing if its unready
otoh now that i made it i feel kinda ehh on the usecase, like why this instead of CMCT (besides it being built in ofc)
i do feel like a required fallback value is easier to use
and opens the possibility where the config's last human set value is saved
but always returns the fallback while mod not installed
tbh if I was proposing this to Pathos, have the RequiredMods functionality as an independent PR to the preview image and page stuff
CMCT definitely narrows the use cases now that it exists, but it could be used for when there's some kind of override you want to disable, or allow customization for some things only when specific mod is installed 
Was wondering if anyone here knows how to modify gift tastes? I just want to remove carrots and apples to Harvey's taste. Thank you.
need text operations
reading the PR, the RequiredMods functionality is unrelated to the other functionality
the pages / preview image stuff adds value regardless
the sample for it only says universal love
so im not sure how...
the operation is similar for a individual character too
so it's like?
{
"Action": "EditData",
"Target": "Data/NPCGiftTastes",
"TextOperations": [
{
"Operation": "RemoveDelimited",
"Target": ["Entries", "Harvey"],
"Search": "74",
"Delimiter": " "
}
]
}
yea assuming 74 is the thing
!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!
look at the original string
@ivory plume I added support for preview images and pages in CP gmcm integration in this PR
https://github.com/Pathoschild/StardewMods/pull/1107
Should I do the docs changes in here too?
this one?
yea look for harvey in here
"Harvey": "It's for me? This is my favorite stuff! It's like you read my mind./348 237 432 395 342/That's such a nice gift. Thank you!/-81 -79 -7 402 614 418 422 436 438 442 444 422/Hmm... Are you sure this is healthy?/-4 424 426 330 233 232 238 234 223 222 221 220 216 211 210 208 206 205/...I think I'm allergic to this./296 245 397 396 394 393 392/Thanks. That's very kind of you.//",
ah ig u actually need to add the taste to neutral
74 would be referring to a specific item (Prismatic shard)
carrots and apples are generic like?
oh so i should append apples and carrots to universal neutral?
no u just want to do it for harvey right
yes
harvey would like apples from fruit category
i'm making a replacement mod for harvey
i know it's too big for a task for a beginner 
replacement mod?
i want to replace him with another character
but i only want to change some aspects only.. 
is it really advisable to just create a new npc?
Generally, yeah, if you plan to release the mod (not trying to sound passive aggressive my apologies)
if you want to replace harvey entirely i suppose u can just replace the entire gift taste entry
cus at this point compatibility is dead anyways
the thing is just that the amount of stuff u have to edit/change for npc replace is about the same for add new npc
alright. I'll scratch this up and create a new npc instead 
thank you so much for answering all my queries
Yeah, I think I told someone this before in this chat, but if you can do npc replacement you can do npcs, and it's easy to add fun stuff to it!
!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!
here be some guides 
u can still have ur npc live in the clinic if u want, tho many ppl make new house
got it.. thank you very much 
For a Content Patcher mod that adds a craftable machine that makes a new item every morning: How do I exclude both machine and item from perfection? i.e. should not appear in the Collections menu.
i think something is off with my optional requirement stuff towards the bottom maybe
like the mizu's turkey and quail stuff
you cant exclude the machine's crafting recipe without perfection exclusions
"When": {"HasMod|contains=Mizu.QuailForAnimalHusbandry" : "true"},
but u can give the player this machine in other ways
is there more to it than just having this line?
What about the item?
the items are showing up in the store as error items (i don't have the reqs installed), i thought this would just make them not appear?
u need to have the when for the data shops edit too
Like so?
yea should work i think, assuming rest of it is valid
Sweet, thanks! I'll try it out. Weird this isn't a thing for the machine crafting recipe???
u need a mod for that
yep, worked, rad
but if u just offer the machine in other ways, like buying from shop only
then u dont have to worry
Silly question, for custom farm maps : how do I add extra initial buildings or placed objects? Sorta like how meadowlands has the coop and fencing from the start? Seems it doesn't live in map properties at a minimum
need a mod for that
i... see i assume you mean Farm Type manager?
yeah meadowlands coop is hardcoded, if memory serves
Custom farm loader can do it iirc
Thanks for the PR! It's too late for this month's update wave, but I'll play around with it for the May updates.
This change is in a bit of a gray area though. ConfigSchema is meant to be completely generic; i.e. it's a configuration schema which Content Patcher can display through GMCM or any future config mod, not a JSON representation of a GMCM menu. Introducing a Page field moves more towards a direct GMCM wrapper, since pages & page links are a GMCM concept rather than a general config option.
!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!
but if i was make config mod, and content patcher supported such a thing, i'd probably support pages too
Eww complex, challenging
(perhaps a more generic group style would work?)
Ok I give up
i don't see it as different than Section per say
Section is a pretty generic concept; any config UI is likely to support headers, while page links are a more specific concept.
(not necesaarily as just a nomenclature change, but more separation than boxing-up like pages in gmcm appear to be)
(But even Section was a compromise that was pushing it a bit, since it's not part of the actual config schema.)
Tragic
what of image then, r they more generic in some way 
I mean if I can make an npc I think you can honestly
But what’s the whole reason an npc doesn’t work in the first place due to version difference
Kind of; it's not really part of the config schema either, but maybe it could be useful enough to compromise on the purity of purpose.
Many Many changes
I don’t even understand the problem 😂 so how would I get to create the solution
(incidentally, akasaka hikawa shrine has two stonking great ginkgo trees for your appreciation. all in the name of modding field research, of course)
All of know is one of the dependencies is pregnancy roles mods which is severely outdated
By breaking it down first
Are you trying to make a new npc?
Or edit one or
Make an update to an old one
part of the reason why i thought pages would be useful is GMCM api limitations actually
it's kinda hard to indicate that an image is associated with option
without going complex options
oooh
clearly i must go there
for research
so for a seasonal outfits mod of some kind they can use pages to group the previews with the options
I'd have to figure out where this is, but i bet I can do this
You can learn pieces of it and update it that way. I.e. the basic components to an npc, then the schedules and so on
Would also reduce the need of mods that have a C# component just to do a better gmcm integration and expose it as global tokens
what would a world with 2 different configuration mods look like 
Though I do agree that the config scheme should be pure to just config.
A better big picture solution would be to have gmcm support extra page/config stuff via asset pipeline.
So a content pack can just edit data to define all the gmcm specific flavour on top
lets say i make that what kinda intergation should i PR into content patcher?
If there was a solid alternative, Content Patcher would most likely support both which would automatically mean something like 50% of mods would now support both.
there was some talk™️ about doing that but with stardewui as base
but it was unclear how exactly it should exist (gmcm drop in replace? new thing?)
Not sure how it could drop-in replace GMCM, unless you patched SMAPI to override the API it returns (not recommended please don't do this)?
(you must, i could stay here for hours. so many stones to look at. so much wood to study. moss. extremely good reference material
)
(i do have the code in my repo for impersonating other mods if they are missing)
the theory was we (royal) either steal gmcm's unique id or we do the api intercept yes
Actually I don't remember if I even do the 'if missing' step
but there r many problem with it even assuming crimes, namely being tied down to the existing api design
(stumbling into two different shinto weddings on the same day also makes me wanna look at event scripts
)
Does anyone know if there's a way in FTM to use the buried category with a spawn weight? (looking to have the buried item come from a random list)
https://github.com/SinZ163/StardewMods/blob/main/SinZationalSixSupport/ModEntry.cs I don't directly even patch or override smapi, I just have a harmony patch for timing to have code run before Entry is invoked, where I will spawn multiple instances of ModEntry which would run on the other manifests/uniqueid's and in Entry/GetApi etc I can just check what manifest is in the instance and do different behaviour
the original idea was for redundant framework mods that 1.6 replaced, this mod could pretend to be them and map their behaviour 1:1 to vanilla concepts
it is very sensitive to very internal behaviour of smapi and how the mod loading gets bootstrapped.
But the core of it was that every other mod will see in the modregistry that the mod is loaded (because it is), it would show up in console/log as a loaded mod etc
Other option to do it without any quirks is to ship a stub GMCM mod that uses GMCM's identifier that just proxies calls to your real mods api
custom wedddingssssss
now possible!
but I wouldn't advise a replacement config mod to just indefinitely use GMCM's identifier, so you can have a greenfields new api design under the real uniqueid.
and purely do backwards compat on GMCM's id
tbh I think it would be useful for smapi mods in general to be allowed to have multiple ids, or at least sub ids so you can expose multiple apis.
eg MyModId-v1 and MyModId-v2 being able to be exposed by the same mod so you can more safely do breaking changes and have backwards compat anyway
There's question of whether we'd actually want to impersonate gmcm for c# mods
gmcm has been threatening a breaking update since before 1.6 released and still hasn't happened afaik
Vs just doing specific integration for content patcher and then let C# mods choose to update over
Custom options is most likely to be unhappy
I like the idea of a custom asset defined config menu tho
Then u can toss that into include
you would still need the core of the config to be in ConfigScheme to actually be tokens
Yeah ofc
but the preview images, page structure, extra text can be whereever
The tokens should exist for when you just edit configs by hand
great... apparently ive done something horribly wrong in tiled. despite copying the tilesheet to my mod folder before importing it to the map. im also assuming the only reason the .xnb stuff is coming up is because it couldn't load the .tmx?
can't safely have config tokens defined in an Include anyway because includes can have CP conditions gating them, and CP wants quantity of tokens to be fixed 2? ticks after GameLaunched
!tilesheetclimbing
When creating or editing maps in Tiled, one common error is tilesheet climbing, marked by red text containing "invalid tilesheet path '../../..'. This is caused by SMAPI not being able to find the tilesheets needed by the map file. To prevent this error, make sure that you have a copy of all necessary tilesheets in the folder containing your WIP tmx file. Copies of vanilla tilesheets can later be deleted, but must be present while working on your map.
If you get this error with a completed map, an easy way to fix it is to open your tmx file in VS Code or a similar text editor, find all of the places with <image source=, and remove the filepaths to so that only the tilesheet names remain. For example, if the code says <image source="Content (unpacked)/Maps/townInterior_2" width="512" height="64"/>, change it to just <image source="townInterior_2" width="512" height="64"/>.
I thought it's 1
2 is when everyone can use the token/conds api
... i think. i think the solution is give up here. and pretend this disaster never happened. since again i started by copying the waterfalls tilesheet to the directory i was working in.
i thought it was 3 for the conditions api being ready though i know a C# mod cant register a custom one any later than GameLaunched
considering uh. the .tmx makes no refrence to the path in question at all. that somehow doesn't seem the case
well the loaded version says it does
look for block like this
<tileset firstgid="1" name="cave" tilewidth="16" tileheight="16" tilecount="320" columns="16">
<image source="Mines/mine_lava.png" width="256" height="320"/>
</tileset>
check the source= path
this is the only block anything to do with the tileset smapi is yelling about
i just followed the instructions on the wiki for reusing vanilla tilesets.
aaand sure enough the .tsx has the wrong path
in this case with the waterfalls tilesheet avoiding manually redoing animations felt ideal.
whatever goal is just to make it work. anything else be damned at this point
id really prefer not to.
mostly because uh. i understand nothing about any of this.
do u trust me
no
then perish
^^ will do
more seriously, tsx cannot actually be loaded into the content pipeline
The default state of most tilesheets in maps and mods is embedded, from what I can tell
there's not rly big diff between having it separate and having it embeded
they still gotta live under the same folder
Yeah it's basically just hitting a button
sorry. im realizing its not helpful to ask for help then be a jerk in response to said help.
I still just want nothing more than to set this whole project on fire. simply because i hate how it looks.
i think you should take a break and come back with fresh mind
if nothing else, sorry for wasting ya'll time and just generically being a jerk
sigh
really am just slightly stupid in my rage.
still ugly as hell. but it mostly works. lots of ghost tiles and stuff on the wrong layer. and no barn despite using the spacecore method to place one.
I think it looks good
i mean the inside is copied directly from meadowlands. so that only sorta counts.
Uhm hello, can I ask here any help for a rookie starter in moding?
its generally more fruitful to simply ask your question to ask if people here actively giving out help are willing to put time into helping you with your problem
I want to make a sprite mod for a simple skin mod and wonder if Aesprite is enough tool to work it
Sorry if my English is a mess
For Stardew, all you need for these visual mods are an art program with some pixel support (Like Asperite) and something to edit code with like VS Code or Notepad++
Don't be too scared of the code though, there's plenty of documentation out there to replace sprites of npcs
I see, thank you so much for the advise
I mean, one of my fav mods is the Anthro Furry Mod and really inspired me to learn it made a sprite mod for myself to other mods (obviously whit permission of author's mod)
beginning to wonder if its the huge stump tiles thats created the random untraversable tiles seemingly randomly around the map. some issues still needing fixed yet.
Typically random tiles you can’t walk through are invisible buildings tiles
Thanks for the advise heh
... oh. oh no
i take it 'empty' tiles on a tilesheet isnt the same as actually removing the tiles from that layer
No problem! One thing I'd also recommend is !unpack the game files so you know what to target in the mod's code
!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!
I will, tomorrow I gonna start looking into these then, i know a little basic of coding in Notepad++ so I have both programs to start
And again thanks for the help and advice 
No worries, and good luck!
correct, unfortunately you usually need to hunt them all down. one way of doing this is to use the magic wand tool which will highlight chunks and may reveal invisible tiles, or you can color in the invisible tiles on your tile sheet and then revert that after you’ve erased the tiles, or you can hunt them down yourself (the data layers mod can help with this)
https://smapi.io/json/content-patcher/7e552e6e003e40e7973e48784dcccff5
can't seem to figure out the problem
thank you
minor issue i can't descern. since these bridges are on the buildings layer. and one works but the other. stops you at only one end.
also more progress on this jank thing has been made. barn and starting cow are now functional.
im not sure i understand.
i assume by datalayers you mean the ones with tile data empty squares?
ah cool.
if nothing else on the list before an inital version can be called done is somehow configuring an initial mushroom tree, somehow modifiying the getting started quest so its not the standard parsnip quest, and is instead ideally 'milk your cow', and some cross mod stuff like specifically generating Alchemistry forage on the farm in addition to normal forest farm spawns but only if the mod in question is actually loaded, assuming setting the map flag to spawn forest farm spawns doesn't already cause something to that effect.
hmm. seems theres at least a few issues i haddn't considered.
it's best that you look at exactly how the Forest map handles these bridges in Tiled
everyone slips up on bridges with water
it's important to note that certain specific tiles are marked as Passable and Water in the original tileset properties, and you want to use those tiles in your own map
you've already exported and embedded those tilesets in your own map so the properties are there, just be sure NOT to right-click-copy tiles with the stamp tool from one map to another, since it'll add a duplicate tileset and you'll have a duplicate headache
of course, if one bridge works fine, just do exactly the same for the other.
yeah the bridges actually have invisible tiles next to them on the buildings layer, its something i only realized after running into invisible tiles i accidentally placed, and then wondering how the bridges on the vanilla maps didnt let you jesus walk onto the water lmao
if nothing else comparing between visually simmilar tiles in one section of the bridge, and also confirming that the tiles were actually different. (they were) and applying some invisble tiles to the sides of bridges to keep from walking off them into the water. we have properly working bridges. just leaves the extraneous details like getting started quest and such.
separate silly question because id nether thought about it. do the large/small bushes actually do anything? or are they just decorative/in the way
you can shake them and it goes whoosh. also some small critters spawn beside bushes
large bushes will also count for salmonberry spawns at the appropriate time
additionally, any mods that let you chop or move bushes will work on them
so probally not the sorta thing that ought be going on a farm map. the 3x2 ones also spawn salmonberry spawns? i thought just the 2x2 ones did
does anyone know which xnb i would have to convert to have the main cave map? like where the dwarf is and everything?
i don't recall which size spawns berries, sorry
fair enough.
I believe that's Mine, but ideally you should be unpacking all files with StardewXNBHack
it's quick, easy, and essentially official
goal was to have the berry spawning ones. just not sure if having the decorative bushes in the large "foraging" section of the farm thats all untillable grass is a good thought or not.
I do! thank you for reminding me! i just wasn't sure which map i needed lol
i don't see why not, it gives the world a little more life and saves you having to paint the tiles onto each layer
generally the game just avoids placing bush entities (as opposed to tiles) out of reach of the player
fair enough i suppose. if nothing else helps makes this paticular section feel more like part of the woods or kinda a forest 'edge' with over the river being the Glade/Clearing implied by the farm type title. (obviously screenshot with farm debris removed to give more forage spawn room)
i keep considering adding custom forage spawns over just using the forest farm mechanics directly. but also i have no idea the "expectation" when adding forage to the farm
holy woa
Considering this farm has blue grass and starts you with a barn + cow as a weird variant meadowlands, highly restrictive farming space but has foraging boons just kinda felt right.
gift tastes are fun to come up with but kind of a pain putting in all the IDs
🤔 can we use include to include more than one file or do we have to make separate blocks for each file
give it a try! the same as you would for multiple load targets.
Okay so after reading how GNMT works I'm ditching using gender switch in dialogue completely in favour of making all dialogue gender neutral. I thought I was being inclusive using ${male^female^non-binary}$ 😦
I made the assumption that "The non-binary value is only used if a mod overrides the player's gender" meant that this was the established method for gender neutral language mods, not a hypothetical use case that no mods actually achieve. Would there be support for editing the wiki to redirect people to the GNMT method instead?
if you really wanted to keep the gender specific dialogue, you could just do a conditional thing, like an optional toggle for gender neutral dialogue. Not saying that making the whole thing gender neutral doesn't work, just an option
it also is kinda. more work

Well, if it were my mod, I;'d consider using the tokens provided by GNMT, but because I'm just translating, so only have control over the i18n, it needs to be a token-less implementation
Also, while the tokens offer excellent customisation and granularity, man they are messy!
my favorite part about the tokens im using in my mod is just the number of dynamic tokens i have for npc names
Oh?
😔 it's not that special, i just have a not so insignificant amount of npcs which means a lot of dyamic tokens
What's your mod?
im working (read: procrastinating) on an expansion of sorts
i wouldnt say it really expands anything actually important in terms of lore in the game, but i just wanted to get Out of pelican town and the valley itself XD
I'm sure it will be a great little (or large) expansion 🙂
since i dont want to work on the art assets im doing the boring stuff (tm) like gift tastes
That's kind of the cool thing about mod making, if you're procrastinating on one sort of task, there are other completely different tasks to do as well
Hey hey im back to ask how to create a custom shop.
Also is it possible to have a dialogue action and make it drop an item in tiled?
really appreaciate the offer to try, but i dont think this is the one i'm gonna try that for - health is being unfun and thinking is hard atm 
i might come back to that offer once my brain wants to work decently again and i stumble over the next little thing of similar scope if thats okay 
Yeah sure 
Does anyone remember the id for the secret woods location? Is it just Woods? Since I also see a Forest lol
Woods iirc
not to be confused with BackWoods which is north of farm
not to be confused with BuildingsWoods which has player collisions
Hi there! So I have a bit of an issue. I created a separate SDV save (folder) to test my mods. I've noticed that some of the debug commands don't work. Like I cannot warp to characters and generate items (through debug). I want to test some dialogue when giving skill books as a gift... But Hack mod doesn't generate them and debug tell me "debug i ..." "debug f ..." are invalid commands. Anyone have any ideas how I can generate skill books or is that not possible atm?
Do you have the mod ConsoleCommands
hello.. me again XD
so i was making the new npc mod and looking at some ... on the dialogue.json I come across this. what does AcceptGift_(O)613
"AcceptGift_(O)613": "{{i18n:giftNPC_00{{Random: {{Range: 0,4}} }} }}",
Ahhhh
@ruby rapids You leveled up to Cowpoke. You can now speak in our voice channels and share images in all channels!
thanks
This is special gift response dialogue
613 is the item id?
how can i change it to something else?
i mean where can i find the data to chck the ids per item
!unpack by unpacking vanilla objects.xnb file into json
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!
Also this site has em for vanilla
This might be a "dumb" question. But if I want to add compatibility in my mod for another mod, (Like making a farmer portrait mod that reacts to RSV characters) do I need to ask permission from the original creator?
thank you so muchh.. can i know where can i see a list of commands for this server ?
Well i think the author would be interested in you doing this
But as long as you aren't using their assets no I don't think you need explicit permission
I am only asking because I am working on a farmer portrait mod that reacts too.... so many NPC mods. It would be painful to ask for all 20+ mods permission... but I would do it if it wouldn't be the thing to do.
Is there a tutorial on maping a custom shop???
[[Modding:shops]]
Thank you!
now the hardest question is giving it the ability to sell back items players lose when passing out
That would require c#
I know a little bit enough to use it
The adventurer guild already has recovery service
Ho boy okay i have been up for at least 32 hours so im probably missing it but why is this json invalid? https://smapi.io/json/content-patcher/3fdc3664348e431eb33fcab6e5a8b520#code.85
Well, you didn't properly close that whole EditMap part for the mine
!json
JSON is a standard format for machine-readable text files that's used by Stardew Valley mods.
If you need help with a JSON file, you can upload it to smapi.io/json to see automatic validation and share the link here.
When making mods, it's recommended to edit your files in a text editor with JSON support, such as VS Code, Notepad++, or Sublime Text. These programs will check for syntax errors.
May I ask for someone to showcase my extra dust sprites mod for me? It may be a rather niche QoL adjustment but surely there must be others who are tired of living in the iron levels for several days every winter Y1 to get the Burglar's Ring 
https://www.nexusmods.com/stardewvalley/mods/33489
Yeah sure, what blurb would you like
Ah, that works, thank you muchly 
Dumb question uh, what's the path of the items object file in the XNB files? (I believe it's spring objects?)
Question on game state query conditions: do mail flags fall under WORLD_STATE_ID? I know there's a separate check for literal mail PLAYER_HAS_MAIL, but if it's just a flag, is that world state?
Maps/Springobjects ?
if you want the data then it's Data/Objects though
Mail flag and world state are separate things afaik
No, mail flag are also PLAYER_HAS_MAIL
I've been looking in tilesheets the entire time🤦 Thanks mate
I've been there!
thank you both! That helps
I am once again stuck and require assistance working with the fashion sense mod 
I'm not sure how to fix this—
this is probally an obvious question, but can map properties be edited via content patcher? asking because im trying to avoid actually having a separate version of the map but still being able to have some mod config to control what starting animal/building appear on the farm map, but also need to resultingly tweak the starting gift (a map property) accordingly so if they use config to start with a sheep instead of a cow you get the sheers instead of the milk pail... now that ive written this all out im realizing this is probally a fools errand.
babystep into modding SDV. Green chickens doesn't sound like much but I've overheard their clucking about taking over the valley eventually
oh nice. thats really convienient.
also, minor understanding question.
{
"Action": "EditData",
"Target": "Data/Locations",
"TargetField" : ["Farm_Silver.VerdantGladeFarm", "Forage"],
"When" : {
"HasMod": "Morghoula.AlchemistryCP"
},
"Entries": {
{
"ID": "SpringAlchemyForage",
"ItemID": "(O)Morghoula.AlchemistryCP_LostSouls"
"Season": spring
}
},
this patch should only be applied when Alchemistry is loaded by the user, and add an entry to my locations Forage list of models correct?
@trim sand You leveled up to Cowpoke. You can now speak in our voice channels and share images in all channels!
yeah that looks fine
oh wait you're missing the "Key": in entries
substitute Key with the Id
so it should be something like this? is this just how editing a list of models needs to look? since at least my understanding was if i was doing this just from the farm map level, it wouldn't need the key at all, and i was understanding the directions for using these target field things to basically just be how youd format it when setting the whole value form and upper level.
"SpringAlchemyForage":{
"ID": "SpringAlchemyForage",
"ItemID": "(O)Morghoula.AlchemistryCP_LostSouls"
"Season": spring
}
i see.
admittadly the thing im still not really sure of is weather having set SpawnForestFarmForage : T in the map itself actually works to spawn normal forest farm forages on my map or not.
i may also just not totally understand how forage spawns work.
Does anyone know what the notesFound player stat tracks? When I run debug getstat notesFound on a save where all vanilla secret notes have been found, it tells me the stat is 20, but there are 27 of them
I know 2 were added in 1.6 but that still leaves 25
The naming is a bit confusing, but NotesFound tracks the number of lost books found (not secret notes).
(We should probably create a Modding:Stats page to document how stats work, list the vanilla stats, how to track custom stacks, etc.)
How do you feel about a stats token
I remember there being some multiplayer sync silliness around it though
Thanks! Is there a stat for secret notes?
Hi, I'm a pre 1.6 modder and I have a question about CP patching music
I'm having a tricky time understanding how to replace a track/sound instead of adding a new one 
[[Modding:Audio]]
if you target your change to an existing track it'd be a replace
There's no stat for it, but it's tracked by Game1.player.secretNotesSeen. That's a hash set of the found secret note (and lost journal) IDs, so you could also just use .Count if you only need the count.
(you didn't ask this, but i am getting on my soapbox to implore you to use .ogg files and "StreamedVorbis": true when adding or editing music. it will save your users big-time in both download size and load times!)
I did have a look at it I'm just having trouble remembering how the target string works as far as choosing an audio asset, like for example, I'm trying to replace the rain ambient track, would I target "Target": "Data/AudioChanges/rain",
?
no, Target is always Data/AudioChanges
I have no objection in theory, though we'd need to look into what those multiplayer sync issues were.
so where do I define that I want to replace the rain sound?
Can I have an example please, I can't quite wrap my head around it 
It would be something like (adjust to match the actual rain data):
{
"Format": "2.6.0",
"Changes": [
{
"Action": "EditData",
"Target": "Data/AudioChanges",
"Entries": {
"rain": {
"ID": "rain",
"Category": "Music",
"FilePaths": [ "{{AbsoluteFilePath: assets/your-custom-track.ogg}}" ],
"StreamedVorbis": true,
"Looped": true
}
}
}
]
}
Thanks pathos! also long time no see 
Hi!
bless, this is exactly what I needed, I couldn't find any examples of a replacer rather than a new song <3 (or if I did I misunderstood it 
I feel like a noob again hhh
i went in thinking i spoke spanish but it's evolved into portuguese
fwiw new songs and replacers would use the exact same code
Thanks for your work Pathoschild. Making my first mod is a breeze and I think that's thanks to you
if the ID doesnt exist it'd be a new song, otherwise it's a replacer
the problem I have is just understanding why that would be, since I come from Custom Music times xD
1.6 is definitely a change lol
the content patcher formats and tokens are really confusing to me now
I used to be able to open an existing pack and more or less learn how to do the thing that way
now I get lost in a sea of confusing tokens and formats
on the other hand once you know how to do one thing in CP you can do everything else
almost everything go through CP now
you would think so but my brain is failing me 
oh that, yes that is useful
I do love having less frameworks
Content Patcher is a bit lower-level, since it's a framework for editing any game content. The tradeoff is that it'll tend to be less simple than a specialized framework (e.g. Custom Music for music), but it's one format you can learn and then apply everywhere (instead of learning each framework separately).
Yeah, but cp is so stable and causes less conflicts
I do not miss my sea of red when I opened the console window lol
it's just a matter of relearning how to CP, but it doesn't change how awesome it is to have all these tools, so thanks as always pathos 
Truffle isn't considered an animal product? 
It's forage
i mean, that makes, some sorta sense 
Cus pigs aren't laying truffles out of their bums i guess
Truffle juice separate issue
we don't speak of the truffle juice
okay, thanks guys!
hope this works (it probably will assuming I didn't do anything dumb but that's always a factor xD)
Is it..? Cause it's category is only "sell at pierre's", not forage either
truly a category
But it gets to be iridium quality
why is that a category
Some context tags r generated u can check what the actual in game tags are with lookup anything
IIRC only two item in vanilla has that category - truffles and sweet gem berries
two items that just are™️
just things that are™️ that you can sell to Pierre
Things that are worth money 
So should probably keep it as is if I'm making a variant of a truffle
question is there a guide or something for setting up mod config? im struggling to understand examples.
much appreciated.
realizing a minor error trapping problem... technically i haven't set the mod to require pokemon ranch, but part of its config is its options allowing starting with its building and one of a few animals from it. and right now i can't figure how to filter the setting of animal/building data in the spacecore farm extension data to a default if config is erroneous to the modslist.
Gate pokemon ranch specific patches behind HasMod
im not quite sure i follow. since ive condensed the whole patch that sets buidling/animal to one patch. the reads tokens from the config. i guess somehow checking the building/animal tokens in a when condition to be sure the mod is loaded if their set to the pkr content. but also tokens are proving a bit confusing. can i include a value for something multiple times and have it fire for each or do i need to separate patches out per config option basically?
{
"Action": "EditData",
"Target": "spacechase0.SpaceCore/FarmExtensionData",
"Entries":{
"Silver.VerdantGladeFarm":{
"Buildings": [
{
"Id": "Default Building",
"Type": "{{StartingBuilding}}",
"Position": "23, 4",
"Animals": {
"{{AnimalName}}": "{{StartingAnimal}}"
}
}
]
}
}
},
So there's 2 concepts here
- HasMod is a token you can use to check for a specific other mod's existence
It can be used for dynamic tokens too, which lets you make set of animals
- Includes is a way to have multiple patches in a separate file
You can gate edits that don't make sense without specific mod that way
oh
Oh I see.
Something you can't do rn is dynamically change what values go in a config based on mod
Alas limitations
But I can opt to not respond to config value for said mod if it's not loaded
Yeah
in the same vein if multiple conditions are inside a patches When field, does it only fire if all of them are met or if any of them match like so ;
{
"Action": "EditData",
"Target": "spacechase0.SpaceCore/FarmExtensionData",
"TargetField" : ["Silver.VerdantGladeFarm","Buildings"],
"When": ["{{StartingAnimal}}": "White Cow", "{{StartingAnimal}}": "Brown Cow", "{{StartingAnimal}}": "Sheep", "{{StartingAnimal}}":"Goat"]
"Entries":{
"Animals": [
{
"{{AnimalName}}": "{{StartingAnimal}}",
}
]
}
},
When js a dictionary so u need the { }
And because it is a dictionary all keys must be unique
Does anyone know what this means??
You need to use the contains syntax here
What's that? Sorry I'm rly new to modding 
I was speaking about the early thing about When, not your problem
Noted. Will do.i appreciate all the help with what's probably basic questions
This looks like invalid json
Heckers, I'm just trying to figure out the numbers to get the hair placement right inside the coding template so itll work with the animation 
!json
JSON is a standard format for machine-readable text files that's used by Stardew Valley mods.
If you need help with a JSON file, you can upload it to smapi.io/json to see automatic validation and share the link here.
When making mods, it's recommended to edit your files in a text editor with JSON support, such as VS Code, Notepad++, or Sublime Text. These programs will check for syntax errors.
Edit your files with something that will validate you as you go
Okie, ty! :3
@sleek igloo it's nice to see you around again! hope you're doing well
do you find it better than vs code?
Honestly yes
is there a killer feature you like? im just curious since you have to pay for it right?
sublime's "trial" is infinite
ooo i didn't realise that
(it has been infinite since I last used it a cool 10 years ago. I dunno if the author is ever gonna change that lmao)
classic winrar model
I must give it a go.
Is there any syntax highlighting plugins specifically for stardew stuff for it?
Anyone knows an example of a mod adding new "recipes" to existing machines? 
Cornucopia
!vscjsonc ignore the other stuff, check out the schema thingy
In Visual Studio Code, go to File -> Preferences -> Settings, then search for "associations", and in the "Associations" setting, click the Add Item button to add an item with key *.json and value jsonc (see image).
If you are making a content pack for Content Patcher, you should consider using its json schema so that VSCode can tell you if your patches are valid, you simply have to add
"$schema": "https://smapi.io/schemas/content-patcher.json"
at the start of your content.json file.
dunno if it works with sublime tho
but just basic json highlighting (which it supports) should take you 98% of the way there
cool thanks ill take a look. I just find it super useful for writing events specifically.
to add, the most important thing to keep in mind when adding new rules to vanilla machines is to move your rule to the top so it runs before the vanilla generic rules
I might dare say that's what 90% of questions in this channel regarding adding rules to vanilla machines is about
I did not nearly as many lines as I thought...
I'm guessing it doesn't really apply to oil maker 😅
Nice
oil makers don't have generic rules, so you're safe
Hmm... how do I change the "Makes gourmet truffle oil"? 
and your void truffle is neither a fruit nor veggie so it's double safe 
patch its description; you can do it in Data/BigCraftables or in Strings/BigCraftables
editing the machine description (which may be on the recipe part), but i don't think it's really needed/suggested to change vanilla descriptions unless it's really important
Why does the desc say that when it also make regular oil
my feeling is that players will usually get that a void truffle can do what a truffle can do, and if you really are worried a letter may be read more than a changed description
mr ape forgor
Oh so it's just a regular BC description, not per item being produced
Exactly what made me think the above...
What do all these errors mean? I'm guessing it has something to do with my FishPond data https://smapi.io/log/9dc306b66ecb4c9bb1ba97f95f91dce8
probably, json pls
Hang on I think I solved it. I am testing my custom fish in the pond and I have narrowed it down to it being a problem with a particular entry. I'm ok for the minute but I might need help in a bit if i can't solve it lol
okay i cannot for the life of my figure out what Spacecore is expecting the field to be for editing stuff inside its FarmExtensionData as ive tried my farms ID, which is also what wored when refrencing the entry directly rather than trying to target it, ive tried to full field name as added to AdditionalFarms but im ultimately just not sure what im missing. sorry if its obvious.
{
"Action":"EditData",
"Target":"Data/AdditionalFarms",
"Entries":{
"Silver.VerdantGladeFarm/VerdantGladeFarm":{
"ID":"Silver.VerdantGladeFarm",
"TooltipStringPath":"Strings/UI:Silver_VerdantGladeFarm",
"MapName":"Silver_VerdantGladeFarm",
"IconTexture":"Mods/Silver.VerdantGladeFarm/Icon",
"WorldMapTexture":"Mods/Silver.VerdantGladeFarm/WorldMap"
}
}
}
is helper.ModRegistry.IsLoaded reliable during Entry?
Yes, all mods are loaded before Entry is called.
hello i was wondering if i'm doing it correctly.. on my content. json there is
a dynamic token setup
//For the internal NPC's name
{
"Name": "lr_cnt",
"Value": "{{ModId}}_ZayneLi"
}, ]```
and then on my disposition it was setup like this
```"Entries": {
"{{lr_cnt}}": {
"DisplayName": "{{i18n:CharacterName}}", ```
on a festival setup it will be like this?
```{
"Operation": "Append",
"Target": [
"Entries",
"Set-Up_additionalCharacters_y2"
],
"Value": "{{lr_cnt}} 23 5 2",
"Delimiter": "/"
},```
yeah that looks good
okieee thankies 
I feel like Im bouta crash out, I've been trying to figure out this one issue for nearly 5 hours now
All ive succeeded at is making it worse 
Here was my earlier attempt ajvdjdbskbfjf
it still looks like a bounds problem, but sadly i dont know enough about FS to know what exactly is up
This would be so easy if I just understood how the coding locates where stuff is supposed to go instead of guessing 
Sorry didn't know 😞
also it has nothing to do with their problem anyway
!decompile do this instead if you need a decompile
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
Oh okay 👍 thank you
!json can you post your json again
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.
please use the json parser
Sorry!
You have been a great help thank you 🐱
is your hair actually 65 pixels wide?
im eyeballing this to be around 32
Oh! This is the png!
if I have something like
[Notify]
public int a;
public int b => A + 1;
public int c => b + 1;
how do i get c to update in the UI?
they are variable leangth 
the problem seems to be that your animation doesn't have the same width
the first row specifically, they're going from short to long
since the biggest one is 35 wide
can you try putting them all in 35 wide boxes
u can use Offset to align the hair with the farmer's head looks like
im guessing this is stardewui, the source generation for that doesn't understand that c depends on a/A
need this other attribute to manually say it do
you can always resort to handling propertychanged by hand in a pinch too
Is there a way to tie changes to b to changes to c even though it doesn't have a [Notify]? I have like 6 a's that b is dependent on
c can't change though 
or like I'd rather not have to put [DependsOn] for all of the 6 a's on c
im kinda struggling to understand what you want here 
what i recommend doing is to look at the actual source generated
uh like I have many a's, which are a bunch of filter parameters, and b generates a list based on those filter parameters, and c is actually a bunch of properties of b, and when I change one of the a's, I want to regenerate the list b, which should change the c's. I guess technically I don't need the intermediate list b and all the properties can be gotten by regenerating the list individually or something but this seems like I would forget something easily
@brisk wedge You leveled up to Cowpoke. You can now speak in our voice channels and share images in all channels!
there is some degree of auto depends on happening, but if you want something more complex then you have to handle it
in some of my mods i have a mix of both 
so if u want u can do it like
// somewhere after getting context
context.PropertyChanged += context.SpecialPropertyChangedHandler;
internal void SpecialPropertyChangedHandler(object? sender, PropertyChangedEventArgs e)
{
if (e.PropertyName == nameof(A))
{
foreach (string depPropName in ListOfDependentNames)
{
PropertyChanged?.Invoke(this, depPropName);
}
}
}
this is meaning of can always resort to handling propertychanged by hand
the [DependsOn] attribute is basically same thing tho 
for this specific kind of usage, if your B is some kinda iterator that uses every Filter property (each of which are auto generated) it will just work
tokens question : is there a way to when using a config value as a token, is it possible to convert the value to all lower case at that time or do i just need to edit my config values so they get read properly? in this case its the config value is needing to corospond to a animal ID, which in the case of the modded animals im wanting to use are all lower case unlike vanilla which are normal
what's the action tile property called to allow a player to sit down?
There isn't one. Check data/chairtiles
nevermind this doesn't actually seem to be the problem....
so clearly im missing something important. both AnimalName and StartingAnimal are config values, Animal name works correctly. but, if the logs are to be believed its just pulling {{StartingAnimal}} as a string into the animal id end of the assignment instead of the value of the config. im not sure what im doing wrong. since it worked before assigning the values in the config directly.
{
"Action": "EditData",
"Target": "spacechase0.SpaceCore/FarmExtensionData",
"When": {
"StartingBuilding": "Barn",
"StartingAnimal": "White Cow, Brown Cow, Sheep, Goat"
},
"Entries": {
"Silver.VerdantGladeFarm": {
"Buildings": [
{
"Id": "Default Building",
"Type": "Barn",
"Position": "23, 4",
"Animals": {
"{{AnimalName}}": "{{StartingAnimal}}"
}
}
]
}
}
},
oh congrats you are second person to bump into this organically
AnimalName is a dynamic token or some kind?
yea theres some issue with token resolution when the key is a token
huh. interesting.
if AnimalName is not that important to you, perhaps just hardcode something 
i guess it'll be easy enough to just remove the predefinable name since you can freely rename your animals/
also turns out the capitalization thing is also a problem. but at least we arent passing an unparsed token to the animal ID
Hey, question for you all. I'm trying to make a custom npc that can be used to add the player into events, but I keep getting this error. I've asked on reddit already and we couldn't figure it out, so I'm wondering if anyone can help. Keeps saying its looking for an xnb file?
Error Log: https://smapi.io/log/811dc7e717bb4c8b82ad971d39f88260
Content json: https://smapi.io/json/content-patcher/92bcaf7af65a4fcd8f8e43b9ac7889f8
!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!
Add dialogue for them, I mean.
this error means you don't have a portrait loaded to Portraits/{{PlayerName}}
looks like its loaded into "Target": "Portraits/{{ModId}}_{{PlayerName}}",
Is that not the correct way to load portraits? Its the same in the wiki on making characters.
so PlayerName is actually whatever you named your player
it might be better to call this fake npc Farmer so that u dont have to deal with the token 
Yes. The png in my assets folder is named the name of my character. I've tried farmer as well, and it didn't work.
the fact that it says {{PlayerName}} in the error means you are the 3rd victim of this lmao
Oh good, i love being a victim. 😂
{
"Action": "EditData",
"Target": "Data/Characters",
"Entries": {
"{{ModId}}_FarmerNPC": {
"DisplayName": "{{PlayerName}}",
"TextureName": "{{ModId}}_{{PlayerName}}"
}
}
}
sorry to ask yet again but #modded-stardew message
Yatta
and we have config powered starting animals.
Hi! Regarding events, I would like a box to pop up on the screen because I want to add a comment during the conversation. Should I still use speak, or is there a better method for this?
WOWWWW!!!
message
Wiki should have more info
just leaves somehow figuring out how to modify the getting started quest depending on chosen farm type...
Oh wow! I love that pokemon. So cute! I just popped in and saw that, lol
thats admittadly just pokemon ranch compatibility with the farm map im making. config to choose weather you start with a regular barn or pokebarn, and which animal starts inside. invalid combinations default to regular barn and a cow. but for a regular barn you can pick cow goat or sheep, for pokebarn you can pick vulpix, alola vulpix, rowlet, miltank, or wooloo.
thx!
if you start with an animal that needs a tool you get it to start with + 5 hay, otherwise you get 10 hay.
Neat idea
Hmmmm.... still getting the same error... https://smapi.io/log/e48ec2b421c64f52bd33ab5b52843cc7
the error a little different now
A fixable different i hope?
try giving the farmer npc an Appearance entry
Will do. 🫡
make it unconditional any season indoor + outdoor
Admittedly some of those choices like Vulpix make more sense when you factor in the custom rewrite I've done so for example Vulpix finds foragables from Alchemistry when the mod is loaded. In addition to the eggs/held items that get dropped overnight normally.
But that's a whole separate project that needs a whole lot more work yet. If nothing else I can basically say I'm not doing anymore farm maps.
Did I put this in right? If I did, I'm still getting the same error. https://smapi.io/json/content-patcher/dfa4eb8188fe4bb896f457d0ee30c9fa
Even when that target doesn't exist? There is no {{playername}} in the portraits folder of the game since its a custom npc.
{
"Action": "Load",
"Target": "Portraits/{{ModId}}_{{PlayerName}}",
"FromFile": "assets/{{PlayerName}}.png"
},
you loaded it
First I've heard of this
Still happening. And I know, thats why I'm so confused why it can't find it.
https://smapi.io/log/a6e1e98ca4814d45b5c54a1e0ad234ee
https://smapi.io/json/content-patcher/cf1dadac514c4e42aa863979be1d89ab
WOuld changing the {{playername}} to something that isn't a token work, do we think?
it happened consistently back when I was trying to debug it whenever there was any combination of dynamic or config token in both the key and the value of an entry. Dynamic + Dynamic, Config + Config, config + dynamic or dynamic + config
if that info provided any sort of insight to you
does it need to be local/dynamic tokens?
does it also happen using global tokens?
Brief bit of study on how quests work later, I can see how to edit the data of a quest but that seems to need be determined before loading a save. So I have no idea how to restrict my change to only saves using a specific farm type.
Or otherwise replace what quest they get from opening the starting gift in the farmhouse.
it didn't happen with globals
just dynamic and config
Don't believe localtokens existed when I was testing so IDK if it breaks with those too
(they might've existed tbh but I didn't try them)
(Local is the internal name of config and same tier as {{ModId}})
Yeah I know I just wanted to add
I also didn't try aliased token names because tbh I forget that's a thing lol
Anyone know where player made fences are?
i vaguely suspect it's graph theory™️
this is pretty hardcoded
I vaguely suspect it's above my skill level to debug
(and by vaguely I mean I'm sure)
is the quest from the starting gift the "harvest 5 parsnips/get 5 eggs" quests?
should I use visual studio code or notepad
VSC
ok
i see.
functionally the game has two separate quests one to harvest a parsnip, the other to harvest an egg. each obtained form the starting gift.
those quests should exist in Data/Quests to edit
but also i need to only change the quest if one specific farm type is chosen
I don't remember if the quest is given on save creation or only upon opening the box, but if it's the latter, that should be easy
the hardcoded part is which quest u get
Game1.player.addQuest((Game1.GetFarmTypeID() == "MeadowlandsFarm") ? "132" : "6");
Oh, found it in loose sprites
game literally calls this when u open starter chest
You can conditionally edit quest 6 though and it's fine, once you actually receive the quest it's baked into your save anyway
ok. so which chest is given is hardcoded. conditionally editing quest 6 is the thing im not sure how to achomplish
globally is extremely easy.
I believe there's a farm type token you can use in a When condition
it doesn't need to apply before save creation, only before the quest is given
as long as u r edit data behind farmtype token then u shuld be good
oh thats actually really convienient.
Tried changing all of the {{playername}} to a non-token (minus the display name) and I'm still having the same issues. It must be something wrong with this Load, right? But what???
https://smapi.io/log/9b47b10cd94a46309b68b470ab1f4f3b
https://smapi.io/json/content-patcher/f39a01ac4860457fb1e139056de70269
are you actually referring to this fake npc in all these event loads (scary amount of them btw)
Yes, the npc was added to all of those events, and I know it isn't the prettiest presentation. 😅
well no the issue is more
u r gonna be incompat with everyone who also loads event, if thats the desire then sure 
can u post one of these event jsons for ref
Yup, grabbing it.
(FarmHouse and BusStop are the ones im interested in, as they are what are playing at the time of the error)
(also ftr that log doesnt seem to match that json, as the log says Portraits/dwe without any modid before it, but i dont see any dwe sans modid token in the json
patient zero was 6 months ago. the next case was yesterday. hours later there's another. we can extrapolate this data to find that tens of millions of people will have their tokens fail by tuesday
also since its a Load and not an EditData, the contents of those events cannot use tokens at all (like {{ModId}})
Content Patcher loaded asset 'Portraits/contentpatcher.farmerspeaks_dwe' (for the 'Farmer Speaks' content pack).
the lack of Portraits/dwe would be why it hit the xnb error
(which frameworks are ftr dwe and sans)
but Data/Characters seems fine*, so its what the event is or isn't doing that would explain the error
https://smapi.io/json/content-patcher/8c3d499ce7214d879d1702810fa47380
I see that its finding a lot of errors with the beginning event ID portions of things, but I didn't change them so not sure whats happening there...
(needs to be contentpatcher.farmerspeaks_dwe, a load cannot contain tokens)
right i forgor that too 
incidentally the mod id format is usually author.ModName
e.g. ArsonistSK.FarmerSpeaks
(you could just load a {} json file and editdata your data in to the same target with tokens as-is)
yea if switching to EditData and these r all vanilla events, no load is needed
(true, absolutely do not do that)
So if I'm understanding right, I can either use contentpatcher.farmerspeaks_dwe wherever the npc is referenced with Loads or switch the Loads to EditData and keep {{PlayerName}} token?
took some work. but we now have alternate getting started quests. just leaves rewriting my pkr stuff into its own content pack to ship first so the regular vulpix/rowlet quest show up for those who just have alchemistry+pkr.
Figured given the alchemistry/pkr compat custom names on their related quests was appropriate. The rest of the options are variants on the meadowlands one. All of them going to "Feeding Animals" the same as meadowlands
when referring to the npc it would be its internal name, not display name. so it would be {{ModId}}_dwe within EditData's
i wonder if u actually need a real npc entry
could u just fake it with changePortrait
I think I tried that once, but the names underneath the portrait don't change, so, like, Robin would suddenly be different person shaped. That being said that's basically what I did to try and get day to day dialogue working, so at this point with as much trouble I'm having with this npc buisness I might try and pivot to that...
Ahhhh... gotcha. Can you tell it's been a while for me? 😅
changeName is the other one
Ohhhhhhh...... I could definitely try to fake it then..... don't have enough time to try it tonight, but I will certainly try! Don't suppose theres a similar command for changing names/portraits in the day to day dialogue that I'm unaware of?
Making a mod. Is it possible to make an NPC spawn in a farm building lol?
i dont think so 
ok i didnt think so
sorry i was answering this
oh
this one hm, its possible to make an npc whose schedule is in the farmhouse
im not sure if u can do it for building (maybe if they aren't instanced)
well u can do anything in C#
yeah lol
its just question of how annoying it'll be
yeah i'll maybe try at some point
i think if you go through with the "antisocial fake farmer npc who exists to have a portrait and name" idea, you can use the BETAS dialogue box to make this antisocial fake farmer speak during npc daily dialogue
gonna be compat hell though
found it.
it should happen for global tokens too (as long as they aren't immutable)
When the key contains tokens (that are mutable) it will save a Setter method as a contextual so that when the token changes, it knows to replace the JProperty (newtonsoft) with a new one with the correct new name.
The problem is, the code for handling when the value contains a token does the same thing, though doesn't replace the JProperty it just sets the value.
When the key changes (i.e. resolves its first value) it will call that setter, replacing the JProperty and now the setter on the value is pointing to an unmounted JProperty and is for all intents and purposes a noop.
BETAS Dialogue Box?
once the value changes a second time you are back at the same problem
i feel like if it happens wiht globals too surely it wouldve been noticed a lot more and been far larger a problem? and i could have sworn i tested it with globals too and it didnt break, i believe i used the season token for testing. its been a while though.
either way it seems like good info to leave on the github issue at least. set blueberry free at last
Thank You! I'm gonna give that a try tomorrow. I'm done looking at this for the day. 😅
the Entry key itself doesn't count, needs to be deeper
I did it, first mod!
I made a bunch of colorful chickens and managed to post it to Nexus (which was the hardest part lol). Not sure why the download zip gets renamed to include a bunch of numbers but I'll take it.
it do be like that on nexus (the bunch of numbers). probably to guarantee unique filenames
I bet people will rename it if they don't like it. Just a bummer it happens.
Next up is seeing how far my C# "skills" can take me on a Mac for more extensive SDV modding. I read it should be doable
I need. It. Now. 
Oh sweet, am I even allowed to share links here?
Nod nod
we can do showcase on your behalf if you need 
Feel free to give me a shout if I messed anything up
Yoinkkkk
did you do it via skins btw
I don't know what it is so probably no
oh that's sweet, is that #mod-showcase you mean?
yep just say a blurb u want
chu spreading the animal skins gospel again smh /lh
i have many agendas 
Oh that's nice, and does that work with CP? I thought most of the more advanced things would be the next step and setting things up with C#
yep it is a content thing
u can look at elle's animals for example
in SDV modding there's basically 2 kinds of mod, mod that is done via editing content, and mod that is done via changing C# code
and sometimes, the changing C# code mod helps expose features to content
you can do a lot of stuff with other people's C# basically 
I did read a bunch of docs but this went to: let me try and get a green chicken in game the non-lazy way to publishing a mod in a few hours 😄
Maybe I thought it needed C# because I went on a random egg hatch with color detour.
random egg hatch with color?
Ah yes, I've not looked at any actual code (sorry JSON) yet so I'm curious to see how things are built when I unwrap those DLL's
!decompile
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
many mods are open source, for that you can go here https://smapi.io/mods and check show advanced info
check the source column
Yes I thought it'd be cool to investigate the chickens randomly dropping a color egg. Or maybe a random color hatch. But then I stuck to the basics to not get overwhelmed and leave this pack unfinished 😄
to change the chicken's produce you'd need to make them new farm animals
which is also a thing you can just do in data 
check mizu's quail for example
I will have to bookmark this chat. Perhaps I have some more time to read docs as well tomorrow. Thanks you all for being so helpful.
And regarding the #mod-showcase . How about a blurb: "Recolor your chickens, because why not?"
It was all I could come up with when writitng my manifest.json as well
hello, hello! i'm trying out a monster quest for fleurine, and during testing, the quest worked just fine up until the solution. it reverted to lewis' green slimes quest dialogue, flavor text, and reward. but i can't quite find any reason why? this is the code from her QuestData if anyone has any ideas as to why it might be happening. no errors showed up in the log, either.
"totsFleurine_BatTrouble": "Monster/{{i18n:Fleurine.Quest.BatTrouble}}/{{i18n:Fleurine.Flavor.BatTrouble}}/{{i18n:Fleurine.Solution.BatTrouble}}/Bat 10 totsFleurine true/0/1000/0/true/{{i18n:Fleurine.Reaction.BatTrouble}}"
this happened only when turning in the quest! up until then, the quest was functioning perfectly, tracking the bats etc.
isnt there a new mod that can replace pregnancy role for mods that need that dependency
it works now.
I probably should optimize it a bit, and do the delegate nonsense or whatever
Would it be possible to add a new weapon as a drop from a monster in the content patcher? If so, for example, is it possible to add data in the middle of the string in the middle of the monster's drops?
Example code for a monster
"Dust Spirit": "40/6/0/0/false/1000/382 .5 433 .01 336 .001 84 .02 414 .02 97 .005 99 .001/2/.00/4/3/.00/true/2/Dust Sprite",
How would I add elements in the middle? I imagine it would be with textoperations, but I have no idea how.
Is it not performant to check trigger actions on location change or is this okay? I have about 12 quest items and I need to be able to track when a player obtains them. I can check if they have it in their inventory on location change and use the trigger action to set the mailflag once. I could also just check when the player uses the item, but this may be a delay of days or weeks so inaccurate
"Target": "Data/CookingRecipes",
"Fields": {
"Chocolate Cake": {
"0": "Cornucopia_CocoaPod 1 246 1 245 1 -5 1"
}
}```
Heres an example of changing a slash deliminated string
Set 0 to be the position in the array
I'd need a second opinion (the decomp of that function on my computer is a mess), but the text reaction field may actually only work for item delivery quests
so you may be out of luck (until 1.6.16 comes out and you can convert that to an untimed special order instead)
(which is infinitely more pleasant to code than the quest format)
Ah
This is what textoperations to add something looks like (gift tastes). You can combine both and only target the X field you want
"Target": ["Fields", "Maru", 7],
"Value": "Cornucopia_Basil",
"Delimiter": " "```
(I said I need a second opinion because the wiki says dialogue reaction should work for monster slaying quests, but I can't find the code where that's being passed in)
i recall it being said that it was broken for monster slaying quests specifically, but when i looked i didnt see how it was broken, but i didnt look too hard
Is there a new mod that can replace pregnancy role for mods that need that dependency.
the broken quest we discussed some time ago was fishing quests
which was broken in a new, novel way

-# what tilesheet are fences in
fence sheets or fence item icon
different convo i was thinking of re monster quests
if your goal is to control whether an NPC marriage candidate adopts children when they're your spouse, you should look into SpouseAdopts, which is a GSQ field in the NPC data model
I think they want stuff like male farmer getting pregnant, which the field doesn't cover
the sprite that's actually in the world, not the icon
fair enough, but if vanilla can do what they need then all the better
yeah
actually I remember you mentioned asking this for an old 1.5 mod? If that mod used the dependency just to restrict the NPC to adoption you can just use the vanilla data
no need to use that mod
lol no
yeah I made that before remembering that you asked in modded-farmers before, to update an old NPC mod
its just an old mod required it but its outdated, im updating it now and the problem is that dependency
if it's for personal use and you just want to get it working then just remove the dependency; editing the NPC data is optional
ahhhh! thank you sm! i'll just bench this one for now!
Playground Mod updated to 1.6
https://www.nexusmods.com/stardewvalley/mods/14125
my hero 😌 ten million saved from token-broken
I'm trying to figure out why forest to farm warps are being weird... Specifically in the vanilla farm types the only one behaving as I expect it to is the beach farm. With each of the others, if the player walks from the forest to the farm, the player's position is one tile west of the tile I would expect it to be. Typically the expected tile is 41, 64 but the actual tile where the game places the player is 40, 64. In the case of the beach the game correctly places the player on the expected tile 82, 103. In the case of meadowlands (which even uses the ForestEntry map property) the game places the player at 52, 74 instead of the expected 53, 74.
Game1.warpFarmer seems to be what is handling these, but I cannot figure out the discrepancy for the non-beach farm types between what I'm seeing in game and what seems to be in the code.
I can just simply code around this for my case, but it would be really helpful to know why the game is behaving like this
hmm color_sea_green is not counted as green in the dye pot

