#making-mods-general
1 messages · Page 300 of 1
so have to
"Action": "EditData",
"Target": "Data/Festivals/spring13",
"Priority": "Late",```
(Festival compatibility being so tricky is something I'd like to tackle in future Stardew Valley updates.)
I didn’t fully understand. I’m working with the content.json. I was about to replace this: "MapPath": "{{InternalAssetKey: assets/Maps/Map.tmx}}" with this: "MapPath": "Maps/{{ModId}}_Sunnyfield", and then add this:
{
"Action": "Load",
"Target": "Maps/{{ModId}}_Sunnyfield",
"FromFile": "assets/Maps/Map.tmx"
},
{
"Action": "EditMap",
"Target": "Maps/{{ModId}}_Sunnyfield",
"MapProperties": {
"Pathoschild.CentralStation_TicketMachine": "74 3 Bus"
}
}
because I don’t know how to do it in Tiled. I’m not sure which way you think is easier or simpler to do.
my solution has been to go out of bounds for Easter Egg/jokes :p
base game handling position conflicts? 👀
(If we can figure out how to append advancedMove at a certain point in events, I'd be a very happy camper)
i have an unfortunate section in my DynamicTokens laying out an array of default and fallback positions depending on other installed mods
I suggest leaving the content.json as-is (with just the patch we added before for the bus stop).
Then:
- Open
assets/Maps/Map.tmxin Tiled (fix any spritesheet errors the same way as before). - Click Map > Map Properties to open a panel on the left side.
- Under "Custom Properties" at the bottom of that panel, click the
+button. - Add a property named
Pathoschild.CentralStation_TicketMachine(keep the default type) and click OK. - In the value field in the left panel (it should already be selected), paste
74 3 Bus.
Then save, launch the game, and take the bus to Sunnyfield. Now you should see the new ticket machine.
eeek
Ok, I’ll do it through Tiled as you suggested.
(I have some ideas to allow automatic positioning in festivals, but nothing fully baked yet; it's on my list to maybe look into for 1.6.16 though.)
why not simply stand them on top of one-another. npc tower
The Amalgamation TM
for some reason that made me think of stacking meeples in Carcassonne
Have a little conveyer belt, so they all slide past so you can talk to all of them.
carcassonne...
idk i still like the festival parallel universes
no guff i would love it if base game could implement such a thing, so the modmaking mind worms stop trying to get me to do it
my fave tabletop "board"game
One of the missing images seems to be from the PinkStation Tilesheets mod. I should look for it and add it too, right?
Yep. You should be able to copy that custom tilesheet into the folder the same way as the vanilla tilesheets.
(If you don't see it, try checking that mod's content.json to see which file it loads it from.)
I’m following the steps, but after clicking on Map Properties, I can't find Custom Properties.
Can you post a screenshot of what you see?
Say will base game do something about Dropbox conflicts 😛
yes pls
(Dropbox, the filesharing service?)
theres 2 things
- if 2 mods attempts to add Action DropBox on the same tile one mod loses
- only one ❓ is drawn per location
I think you'll see it if you scroll down the left pane, but you can just click the + icon in the bottom-left corner of that pane:
Yes!
Well, actually, special order dropboxes
My suggestion is to treat the Dropbox indicators in data/specialorders as the click interactive, possibly?
There is a secondary issue that if two active quests use one drop box you can only turn in items to the first active quest
I scrolled all the way down the panel but it doesn’t show up, however, I do see the + button, so I’ll continue from there.
Oh, it is there; I'm just not used to that color scheme.
Is string the default type?
Yep.
Ah, it was kind of hidden because of the color scheme I use (I can’t see anything if I use the default one).
Hmm. Not sure there's any simple way to handle this in the base game without custom UI logic to choose which dropbox you want to interact with.
tbh that's basically the solution I was going to go with
a little set of arrows at the top, selecting which dropbox you want, or something like the chests anywhere dropdown
using the Name field of the special order
Alright, the moment of truth has arrived. Will everything explode? We’ll find out soon!
I generally try to avoid vanilla changes that don't apply to the base game (e.g. refactoring game code to make it extensible is fine, but adding features which the game will never use is generally out of scope). How often does this happen?
well, I got two bug reports over that issue in about three days, when I asked about it Selph immediately had examples, etc.
Hmm. Well when we eventually have a modder beta for 1.6.16, we can discuss it again then to see what the options are.
no idea otherwise, and tbh I'm annoyed enough that I will just put together a mod that changes how the dropboxes work
Is it possible to not be able to enter a specific building (outdoors) until the player has a certain letter in the mail?
The building is not their house
Everything exploded, but I think I know what the problem is. I’ll try to fix it... if I can’t, I’ll send up a flare, haha.
you should be able to accomplish this with judicious use of CP conditions to change the appropriate tile properties
can the dropbox just satisfy both special orders maybe?
hello..
what am I doing wrong with this schedule
"Tue": "800 Hospital 16 8 0 "Strings\schedules\{{lr_cnt}}:Work1"
The npc wouldn't leave their house or appear at the spot even if the time already passed.
you need more than 1 schedule point
actually it's a long string
"Tue": "800 Hospital 16 8 0 "Strings\schedules\{{lr_cnt}}:Work1"/1200 Hospital 20 12 2 "Strings\schedules\{{lr_cnt}}:Lunch"/1300 Hospital 4 6 2/1400 Beach 22 24 3/1500 Town 48 82 2/1700 {{ModId}}_CustomHouse 9 5 0/2200 {{ModId}}_CustomHouse 13 4 1 sleep",
did you sleep a day or use a new save for your test?
I also had this error
if your NPC is newly added to an existing save, they won't follow their schedule the first day
Glad it’s doable. Which conditions should I be looking at for the door?
i see. thank you so much! 
seen event/flag/relationship.. whatever you want
well someone right janked the macro warps
I understand the conditions part but I don’t know how it’s applied to the door being locked until then
you just patch the tile data to become an openable door once the condition is met
so before that.. it might just be a label "no admittance" or something.
in your tmx (the default state of the door), make it whatever Action it is to be locked (Message or something like that; consult vanilla).
in your patch, check for the flag and change it to Action Warp or whatever it is for doors that are always unlocked. i don't remember what the correct properties are offhand
Ahh so as a Tile property then! I thought I had to include it in the Location Data. Thanks both of you 
and then you can do the thing I like to do, have the NPC yell at the player if they warp to them before the door is accessible 😛
the schedule apear but he wasnt on the spot
"What are you doing in here!?! I'm going to call the police!"
Haha! Love it
The image where everything looks brown and my character is in the center is if I travel through Central Station. The other image is if I travel using the Bus Location mod. It's clear that when I made the content.json part, I did it wrong and by mistake, I traveled using the Bus Location mod when I should have traveled through Central Station. Up to Central Station everything works fine, but when I travel from the ticket machine, when my character arrives in Sunnyfields, it looks like this, as if there are no textures. It also seems that the bus stop can’t be used as a warp and that other locations need to be used. That’s what I understood from the message.
hey, just want to check to make sure my logic is sound on this. I got some complaints on EXP control that they were losing their fractional exp values so I am trying to store them.
how many sigfigs do u care about
Yeah, that's why I was confused about which map it was earlier. In your Central Station patch in content.json, change it to "ToLocation": "novaphene.sunnymap_Sunnyfield" instead to fix the first issue.
I was about to say lmao
that's a lot of precision
all of them most likely just the first three decimal places.
This way?
{
"Action": "EditData",
"Target": "Mods/Pathoschild.CentralStation/Stops",
"Entries": {
"{{ModId}}_sunnymap_Sunnyfield": {
"DisplayName": "Sunnyfield",
"ToLocation": "novaphene.sunnymap_Sunnyfield",
"Network": "Bus",
"ToTile": { "X": 105, "Y": 80 }
}
}
},
Yep.
instead of string parsing you could always do
var whole = Math.Floor(parsed)
var remainder = parsed % 1
although there might be a bit of rounding error
Do I test it?
Yep. This time you should land in the actual town instead.
I'm, tbh, fairly confused by the parsing back and forth, it's unnecessary tbh
there will be rounding error but it's less than 2 sig figs
(back of envelop says float is 7, double is 15)
or whatever it is
ik lol but I think it's funny to pretend they need it
tbh it's been ages since I've been in C#, I've been in python/verilog/worse
anyways. tbh the last time I did something like that I just used proportional round iirc
proportional random round
(It can probably be a lot simpler; just assign the floored whole number to the player's XP, and save whatever is left for later.)
decimal totalExp = ...; // calculations here
int newExp = Math.Max(0, (int)totalExp);
decimal storedExp = totalExp - newExp;
which gives you the same expected value over time anyways and involves no storage
that's the current version in which players complained. which is why I am now trying to store the fractions for later
howMuch = (int)Math.Round(ModEntry.Config.FarmingEXP * howMuch);
that's not proportional random
public static int RandomRoundProportional(this float val)
{
double below = Math.Floor(val);
return Random.Shared.NextDouble() < (val - below) ? (int)(below + 1) : (int)below;
}
I didn't see your third message of proportional random round. just the second of proportional round
Almost he he
see this is what I was originally going to go with but got confused when trying to add in the existing stored exp
Try with these values:
"ToTile": { "X": 74, "Y": 37 },
"ToFacingDirection": "left",
decimal totalExp = ...; // calculations here
if (player.modData.TryGetValue(YourKey, out string stored) && decimal.TryParse(stored, prev))
totalExp += prev;
int newExp = Math.Max(0, (int)totalExp);
decimal storedExp = totalExp - newExp;
player.modData[YourKey] = storedExp.ToString();
(couple of things - don't use modDataForSerialization, that's a specialzed thing for the serializer)
just use modData
Where should I place those values?
In your Central Station patch in content.json (this one).
This way?
{
"Action": "EditData",
"Target": "Mods/Pathoschild.CentralStation/Stops",
"Entries": {
"{{ModId}}_sunnymap_Sunnyfield": {
"DisplayName": "Sunnyfield",
"ToLocation": "novaphene.sunnymap_Sunnyfield",
"Network": "Bus",
"ToTile": { "X": 74, "Y": 37 },
"ToFacingDirection": "left",
}
}
},
Yep.
ty
just making sure I understand this.
int newExp = Math.Max(0, (int)totalExp); due to the cast, it will turn say 1.323 into just 1.
When we then take 1.323-1 for the stored exp value.
Pathos is negative xp a real thing?
But I have an error message in SMAPI
since it gave you exp based on your daily luck value *750, on negative luck days you could loose exp
(the game sure doesn't expect negative xp, I can tell you that.)
Looks like good progress. The error in SMAPI might be related to the ticket machine to get back; what's the error?
it was really funny seeing the level up screen like 2-3 days in a row for a level xD.
edit: I fixed it in the spacecore version of luck to clamp to 0
No, it seems to be an issue with a PNG file. Since it’s summer in my save and we used the spring one, it looks like that caused an error even though it looks fine. I’ll copy the error for you, give me a second.
(So that's why SpaceCore did that.)
why spacecore did what?
I think that’s the important part of the error message.
[game] Location 'novaphene.sunnymap_Sunnyfield' failed to load seasonal asset name 'SMAPI\novaphene.sunnymap\assets\Maps\summer_outdoorsTileSheet.png' for tilesheet ID 'spring_outdoorsTileSheet'.
SContentLoadException: Failed loading asset 'assets/Maps/summer_outdoorsTileSheet.png' from SMAPI\novaphene.sunnymap: the specified path doesn't exist.
@ivory plume
Yeah, that's normal. It's because you copied the tilesheets into the folder; that's why you'll need to delete the ones you added when you're done. You can just ignore it for now, it won't affect what you're working on.
Can you upload your SMAPI log to smapi.io/log and post the link here?
Would it help if I just copy the red error message? Because I have a lot of mods installed and I’m not sure if that would make it harder for you, but if you prefer, I can send you the full log.
The full log is better. I can filter the log as needed, I'm used to it.
Ok
For the default door, should it be Action LockedDoorWarp and set it to 600 2600? So permanently locked?
Hope it's ok to ping
barleyzp's field of thoughts
i think LockedDoorWarp's times indicate when it's open, so maybe you want 2600 2600 to make it unavailable? i'm not sure how strict the parsing is on it
Ahh ok, will try that. And what did you mean by patching the door, how do I do that?
I swear there was a GSQ door or smth
(also, i don't mind pings, so feel free anytime, but all things in moderation of course)
just want to make sure as well since I heard different things in the past. This part here: player.modData[YourKey] = storedExp.ToString();
I've done
if (player.modData.TryAdd("moonslime.ExpControl.CombatEXP", storedExp.ToString()) == false)
{
//Set the modData to the new stored exp value
player.modData["moonslime.ExpControl.CombatEXP"] = storedExp.ToString();
}
to make sure the key data exists before changing it, if it doesn't exist using the TryAdd will create it.
is that correct?
no, you can just straight up add a key
like, player.modData[YourKey] = value is fine if the key isn't previously there
(this is for dictionaries specifically)
That seems fine. Can you post a screenshot of the custom map properties in Tiled for the Map.tmx file?
Sure
to patch the door, you'll probably use MapTiles in an EditMap action. e.g.:
"MapTiles": [
{
"Position": {"X": 12, "Y": 4},
"Layer": "Buildings",
"SetProperties": {"Action": "LockedDoorWarp Your-Values"}
},
],```
but in the correct position, of course
Pathos, while you're here - for some reason, the spinny circle makes smapi logs at least feel slower to load 😦
like, painfully slow when I'm on mobile
like, "yeah I'm not dealing with this" slow
This?
Ah so it's not within Tiled then, good to know. Where it says Your-Values, do I put the GSQ?
(It might be slower on mobile because your phone needs to fetch the log and render it clientside. The loading indicator probably doesn't change it much, except insofar as you don't have a few seconds where it looks loaded until you scroll down and see a bunch of {{placeholder}} values.)
Yep. That seems fine; can you post the Map.tmx file here?
also ty for the help
unsure about GSQ, or in fact about what tile properties you need, exactly (i'm shooting from the hip)
the idea is you want CP to change the state of the tile property when you have the mail flag
since CP is applying the always-open state, it was probably wrong of me to use LockedDoorWarp for the example of how to format a tile property patch
there you go then! don't bother with all this stuff and just put a conditional door in your map and dust your hands
Can I do that within CP?
Oh, I see the issue. Try changing the map property's value from 74 3 Bus (which places it near the top of the map) to 74 39 Bus.
if you want, but you should be able to do it directly in the tmx
This wy?
Thanks for your help!
or this?
hmm i envy your decompile for getting a sane switch case and not the IL_0682 garbage that mine has
Everything worked perfectly; I went there and back.
Can I send you a private message for another reason? (It’s actually a suggestion for the mod.)
Don´t worry hehe
OK, message sent.
No rush to reply!
Is it ok to use 2 NPCs to check for 6 hearts with a when? Like this? "When": { "Hearts:Polly Peter": "6" },
I want the mail to only send when BOTH NPCs are at 6 hearts
No, but like this will work:
"When": {
"Hearts:Peter": 6,
"Hearts:Polly": 6
},
(this is exactly 6 hearts though)
Keep in mind that means exactly six hearts; if you want to allow any number beyond 6 too, you'll need a range or query.
fragile. You can trivially jump almost 4 hearts with an iridium loved gift
if you're sending mail, there's a gsq which is pretty easy to do a range
Ahh thanks! I actually do want to go as a minimum of 6 now I think on it
purple loved and a stardrop tea (or two, or more!) on a birthday and you can go from zero to full hearts instantly
Good point, didn't think of that lol
Would it be this as the GSQ? PLAYER_HEARTS <player> <npc> <min hearts> [max hearts]
Yup
Yep: "PLAYER_HEARTS Current Peter 6, PLAYER_HEARTS Current Polly 6".
And one last thing (before I sleep) For the map patch after receiving the mail, is it "PatchMode": "Replace",
"When": {
"HasFlag": ________ (I don't know what to put here lol)
It would be "HasFlag": "{{ModId}}_TheMailYouSent", and depends what your patch is doing (see PatchMode in the docs for an explanation of each mode).
i think you'll be better served by using the ConditionalDoor action instead of CP's When for this, as atra pointed out earlier.
i suggested the conditional patch in the first place because i didn't know about that action
Also, 8BitAlien, just gently
I've actually had a new plan for the area and this method will suit it better. I will keep the ConditionalDoor action in mind for later use!
People come in and out of the channel all the time. I'd really appreciate it if you repeated more context per post
when I'm here, I'm rarely paying attention to the channel as a whole, so if the context isn't the message, I won't know what you're trying to do
Ah ok not a problem, just didn't wanna info dump lol
no worries! It's weird, online spaces like this, especially ones that make backsearching hard.
@vernal crest: add quote marks (12h ago)
i finally finished coding my third heart event 😭
it took SO LONG
i unironically can't wait to start the next event and immediately get overwhelmed again
hmmm @blissful panther i asked you yesterday if you had worked more on the meep item interaction feature but it seems like spacecore has another feature for "guidebooks" that can also be triggered by item usage. Its possible that this would work for my purpose though it does look complex haha
"A kind of gate/toll where a player has to pay a certain amount of gold in order to pass. In order to build the toll, the player would have to pay a certain amount (high) and use certain materials to build it. And in order to destroy it, the player destroying it would have to pay a high amount as well (in order to disincentivize other players from destroying it)."
Can I do this without C#?
I can just make it a building right?
i don't believe there's any precedent for buildings that require payment to be destroyed, nor for conditional collisions in that way
dare i ask what's to stop people from walking around it
when making a custom character, is it enough to add to Characters/ and Portraits/{{ModId}}_{{NPCName}}_Winter for them to have a Winter outfit or am I missing something?
Edit: I found it, sorry (it's in the Appearance field in Data/Characters)
Hmm, yeah I'm not sure how I'd get you to pay Robin or Wizard to destroy a building
that part sounds way harder than the actual tollgate part hahah
Yeah fr
I was wondering if maybe when interacting with it, I could have it open a menu instead to destroy it?
Like the menu will ask to demolish or pay
Idk if I can do that with CP
some kind of tollpass and a gsq that checks if you have the tollpass? But that would only be part of it
new menus is about as doable in CP as adding a minesweeper minigame on clicking your building
is it possible to end an event on a different location/map than where it started?
to be in a totally different topic
Yeah idk how I could go about this then..
Not sure. Have you checked the [[Modding:Events]] wiki
can you explain more what your goal/plan is? Maybe someone can think of an alternative
This is all the info I have @golden spire
Oops. [[Modding:Event_data]]
Weird that this modding title page is different than others? Lol
Thanks, I previously used changeLocation [location]/end. But that just got me back to the first map the event started on.
and even on the Event_data modding page, there seems to not be anything for defining the new location. "end warpOut" seemd to be the closes command. But I have a feeling that will warp me out to the same map...
well it'd be confusing if all the pages had the same name
does anyone know why my custom NPC appears in "even" and "odd" year festivals normally but when I play with Expanded they only appear in the "odd" years
this is how I have it set up:
as it stands though we absolutely have mail_data, location_data, gift_taste_data
、...
try patching your patch late, SVE replaces the whole line so it might be overwriting your append
I mean Modding:Items vs. Modding: Event data
Like why wouldn't it be Modding: Item data or Modding: Events instead
it was itemdata, previously. but then item handling was completely reworked
if anything, Items is the odd one out
sadly the same behaviour 
Ohhh
Set-Up_additionalCharacters_y2 you need to put it in that for y2
you're putting the patch in the y1 setup
lol, funny that this works still for Vanilla 💀
it's because it doesn't exist in vanilla so the game just uses y1, if 1 single NPC adds a y2 then it will read that instead...
you can technically continue to y3 but you'd break every other custom NPC
if you added beyond y2
so highly advised to not do so :p
@ivory plume Hello, is there a chance for a sort of singleton List<NetRef> mod hook?
Currently the only way to use stardews networking library is to add wrapper objects into existing purposebound NetCollections, like adding custom SObjects to a locations objects (and then removing them again before saving to prevent serializing errors). If you're not conveniently intending to use one of the existing NetCollections or need a static, shared field you're a bit out of luck.
The alternative being SMAPIs ModMessages, which are great for sharing specific messages, but fall short when needing to keep large, complex objects in sync and are subject to race conditions (eg. first mod message received may occur before or after the world is ready).
In my case I am regularly sending whole lists of complex objects between players, because only the host has all maps loaded and can therefore be solely trusted, when I could ideally just have one shared and synced NetObjectList.
Wait what stops you from just making that on your own netobject
afaik it needs to be part of a NetRoot tree to be synced
I had a poc ages ago about having smapi manage a netroot per modid
but never quite finished it
Hm by maps u mean GameLocation?
they do, and its true.
farmhands view of the world is only accurate for current location and active locations, a location they aren't in thats not active is in the shadow realm.
Its why mods like NPCMapLocations, LocationCompass etc all need to network npc location data (and badly) because farmhands dont know where the ncps are and so have host use the modmessages system to just broadcast the entire thing every x ticks
you can do some optimisations like have caching layers and deterministic algorithms to reduce what needs to go over the wire, but its a very manual process compared to letting the Netcode do it for you
Yeah I did know about the whole ghost coop location problem
I was thinking if your desired data is mostly in location data or map asset you can send less things
Just send name and fetch from content on other side sort of thing, but i don't know the whole usecase here
Also the danger of just adding stuff to existing net collections, is you have made it so if host and farmhand have differing amounts of things, an extremely cryptic error will happen and crash and/or disconnect
It isn't possible to make an item universally rejected, is it? I'd have to add RejectItem keys for every character I wanted to cover?
You can set CanBeGivenAsGift to false to make it ungiftable. If you specifically want it to be giftable but rejected, you have to add keys for everyone AFAIK.
Yeah the plan was to use rejection dialogue to trigger actions without consuming the item but I guess that won't work so well 
I have a (moral?) dilemma right now: FF generates automatic config option for all Furniture made with it, but someone asked me if it was possible to disable this because they also have a CP mod under the same name (it's a mod using both frameworks), and it looks bad in the GMCM. Now the dilemma is that not having an option to disable the auto config options restricts freedom for Furniture Pack authors, but having it allow Furniture Pack authors to restrict freedom for users who would want to disable parts of a Pack.
User freedom is a big deal for me because of how most big apps/websites have no user freedom and I hate this so much.
Why can't they just rename the CP mod?
The use case is basically a Furniture mod which uses some CP features to add more config options (like a dropdown to choose some variants for specific furniture), so both mods are packed together like this: https://github.com/Leroymilo/FurnitureFramework/blob/3.0.0/doc/Author.md#content-patcher-integration
In this case it makes sense to have both mods named the same
Yeah but you said the user doesn't like that. So just instruct them on how to edit either/both manifests to name the mods whatever they want.
Oh I have just realised you may mean "user" to mean user of FF who is making a mod rather than user of a mod.
I have to admit that even naming them differently isn't really good for readability, since it just makes 2 sub-menus for the same mod in the GMCM. My "workaround" is to add "(CP)" and "(FF)" to the mod names, but it's still weird
(Some) mods that have a C# part and a CP part do that and it's not weird to me.
I'm not a huge mod user (at most 12 or so), so I never encountered that
Spacecore lets you do this. Just put a dummy NPC's name in the GiftableToNpcAllowList or something
Ooh... there might be a way to combine this with regular reject dialogue to do what I want... at least, I feel like there might if my brain was braining right now
As for the dilemma, I am not sure if I'm following properly but I think I have found the source of my confusion. Do your auto configs allow users to disable furniture in FF packs?
I think this will work, thanks for the info! 
Leroy i thought you are work on moving it to custom assets
yeah, it makes a checkbox for each Furniture added in a Pack, and it makes a mod sub-menu in GMCM for each pack (the same way CP makes a mod sub-menu for each Content Pack),
not gonna lie, I'm not sure what "moving it to custom assets" means
Moving from content pack for format into a specific target people just edit with content patcher
Ok now that I have understood the dilemma, I would be annoyed as a user to have lost out on config options because the mod author thought that it was too unpretty to have one config item in GMCM for CP and one for FF. If the mod author names the two parts of the mod clearly it should be easy to understand as a user that one config menu entry is for the FF part and one is for the CP part.
This is how custom bush, personal indoor farm etc work
I never planned to do that (I think), but everything in a Furniture pack goes through the content pipeline, so it can be patched by CP. What I plan to do is add a default pack (with a debug catalogue), which would make it possible to patch in a whole Furniture Pack with CP without making a separate mod. But this is for 3.1
Maybe person farm is what you get if you go the joja route
Hmm, hang on, another hiccup, if I make an action dependent on RejectItem dialogue, it'll be blocked by the daily gift and weekly two-gift limit, won't it? Is it possible to make an item exempt from that limit like Stardrop Tea is, with CP?
Well if you make it possible to create your entire furniture pack in content patcher then your config woes are solved 
Depends on whether the reject item dialogue gets checked before the gift limit does, I guess.
But if you really want to keep it content pack for style i think what you can do is have a section where people put arbitrary config options and you give a mod provided token to access that
Well, it's not quite possible right now, making an empty Furniture Pack filled through CP will still make its config appear in GMCM
Kind of reinventing ConfigSchema at this point but you will be able to just have 1 config
As you would have eliminated need for CP mod to setup ConfigSchema
I'm not doing that, the whole point of full CP compatibility is to not have to re-create the token and configSchema system
Then tear down more of your own config and ask people to simply use ConfigSchema?
That's still part of the dilemma: it removes freedom from the final user
It's just up to what your goal is, there's no way to know that "this content patcher mod's config only deals with furniture framework therefore i can somehow yoink it into my submenu"
I personally lean towards prioritizing the content pack mod author's freedom, so even having "the user may turn this furniture off without input from content pack" is kinda eh to me
I'm so annoyed by lack of customization that my mind is the other way around: it would piss me off if a framework has automatic customization options for users, but a mod author decided "no, you're not allowed to do what you want to your game"
Yeah that's a valid opinion too, but I guess you can also think about whether the configuration has to happen via GMCM
I feel your config situation is complex enough that rolling your own menu wouldn't be that different
Huh, that's a very good idea, thanks! It's definitely going to go to the bottom of the TODO list but I'll keep it in mind

(UI work also scares me a lot)
If u want to use the same ui stuff gmcm has u can submodule casey's repo and use spaceshared (that's MIT licensed iirc)
And there's stardewui but that would be actual new dependency
#1293051032904925255 there a thread here if u have questions
thanks!
Out of curiosity, if a player is dating an NPC is there a way to forceably make them stop dating them?
(through a mail flag/trigger action preferrably)
uhhh I just tried to download npc riley from nexus but chrome blocked it as a virus
that's unusual. it's almost certainly not a virus. i recommend telling chrome to go pound sand about it
fr
that can happen to one or two of my mods also
I dont even know why I believed it, I've downloaded that same file multiple times
✨ AI overview ✨ : "this file you've downloaded before, which was safe then and has not changed, is a virus now. you can definitely trust me"
AIchor please show me a hat
no, u show a hat to AIchor
its really a testament to smapi's error reporting that I was able to write a really complex trigger action without access to the wiki, just by randomly typing stuff into the data and correcting it based on the error message output
ah yes, error-driven development
does anyone know if this is possible 
You're asking at the wrong time of day, Lily. Ask again in a couple of hours when it's busier (speaking of which, I should leave so I am not tempted to stay awake too late when the chat starts picking up haha)
BETAS has a thing I recall
I haven't slept yet and I definitely should
, its almost 11am for me
mm i was hoping i could do it with content patcher alone ... c'est la vie if not really
it's not a complicated trigger action to write/provide, but i'm fairly sure vanilla does not have it, so you'll need BETAS or Spacecore or similar
I doubt people would be too happy if I force broke them up with the blue man
(even though i kinda wanna do it anyways)
(because its funny)
thank you for the answers though :3
Might anyone remember the debug command to insert dialogue into the game? Like, you put in a line in the console and it makes the NPC say it 🤔
Spacecore has one but it's an event command
debug loaddialogue NPC "Your/Asset:dialogueKey"
Pathos you are a life saver
completely forgot where this was located
Thank you too ichor 
you can also debug speech NPC "The literal text they should say.$h" if you want to test line flow or w/e without having to load it in
Generally the net fields need a predefined value type. For example, it'd be a NetRef<T> where T is the actual type you'll be syncing (and that type needs to implement INetSerializable); the game doesn't really support syncing a bag of arbitrary value types currently. It could potentially be something we look into, but it wouldn't be as simple as just adding an extra net field for mods to use unfortunately (unless we forced mods to serialize/deserialize all synced values as string or something).
I've applied a map patch that will only appear when the player has received a certain mail, however it seems to be patching immediately when the game loads:( I have manually increased the friendship with CJB (in order to get the mail triggered) if that makes a difference?
Are u doing the send mail at day ending
yep
how do I convert tbin files to tmx
And it's with HasFlag right, hmm
Yupp
I guess I'd try remove mailflag to make sure it isn't already there from testing
And have a day when u don't have enough hearts just to see
It could be something along the lines of a NetObjectList<NetTemplateObject>, where NetTemplateObject is just an abstract INetSerializable that mod users inherit from to create wrapper objects that get added to said NetObjectList.
The benefit being that the NetObjectList<NetTemplateObject> field would be completely independent of other game logic and if put eg. in NetWorldState singleton.
Within said wrapper mod authors could implement any NetType of their choosing
I've not received the mail at any point though, I'm so confused lol
you use export rather than save in Tiled, but what maps are you trying to convert if you used StardewXnbHack then all the vanilla maps should be in tmx
Then perhaps your condition is incorrect
No idea boss im new to this and thank you
which map are you trying to edit/alter?
They're converting NPC Riley's maps I think
ahh
Did you add an entry to data/mail?
I do like the idea of this as typed alternative to modData although i wonder if it's kind of the same thing in the back (still many tostring happening)
Because without it you are not going to be receiving the mail, just getting the flag.
what? Is that bad lol
no..
once again lamenting stardew's conflation of actual letters and world state on the altar of expedience /lh
NetObjects have binary serialization
"LogName": "Load PollyPeter Mail",
"Action": "EditData",
"Target": "Data/Mail",
"Entries": {
"{{ModId}}_PollyPeterFarmhouse": "{{i18n:PollyPeterFarmhouse}}"
}
},``` Is this right?
go to art?
ah
i dunno if that's better than just many tostrings
I see
I don't remember if an entire letter can go in i18n but if you have the letter written properly it's probably okay. What's your trigger action look like?
I mean, what it does well is only sending the diff
But what it does weirdly is....well
could someone link me to the tbin plugin
Btw atra do you recall what kind of sync issue multiplayer stats had?
You can just go to the settings and enable tbin to get the plugin. It's already installed, just not enabled.
Absolute ordering
oh okay
Their issue is they aren't in the netsync at all
I was thinking of adding a cp token to read it
They are just xml yeeted back to the main farmer every night
Ah so it's update rate need to be day update and that's it?
"Action": "EditData",
"Target": "Data/TriggerActions",
"Entries": {
"{{ModId}}_PollyPeterFarmhouse": {
"Id": "{{ModId}}_PollyPeterFarmhouse",
"Trigger": "DayEnding",
"When": {
"PLAYER_HEARTS Current Peter": "6",
"PLAYER_HEARTS Current Polly": "6"
},
"Actions": [
"AddMail Current {{ModId}}_PollyPeterFarmhouse"
]
}
}
}```
Assuming the desire is to not desync edits anyways
do you mean all stats or just your specific stat, bc if the former remember that its basically literally always going to return true in UpdateContext bc there is always going to be a stat thats changed (99% of the time)
oh, you can't use a GSQ in a content patcher When condition
You also can't use a when condition inside entries.
(they can yes! remember the game never knows you used a token in the first place, CP replaces it with the entire i18n string first)
That is true as well, but is mailflag not same way
also this!
Ig it's a frequency thing
not necessarily! with all player stats i do mean literally almost always, since "stepsTaken" is a stat 
You need to use the Condition field instead. It's not formatted the same way as the When field, there's no curly braces it's just a string.
So yeah i think between the multiplayer sync issue and this
It could just be "the token cache every stat on day update and no other time"
EMP already has a stat token too
No change until new day
it just always returns true in updatecontext, doesnt bother checking anything
This is PR to cp itself cus ik calcifer has it too
i dont think having one single token be a completely unexpected exception to how tokens work is much a good idea
Aaaa I don't fully understand
So it exists but it always bothered me that there is mail flag but not stat 
Yes you are right. I wonder if my hesitation is just coming from my belief that you shouldn't put commands inside i18n so I split my letter i18n up and that morphed into "maybe it doesn't work".
Are you looking at the trigger action page on the wiki? Do you see the condition field?
Ah I see it
The always update implementation is fine too, just throwing out options here
Both examples on the page use condition too so you can see how it's formatted
Something that i bumped into in the poc tokenized i18n is that update context doesn't have any finer grain control
For case where the token requires 1 argument always
i am not pathos ofc so im not sayin i know for sure, but i feel like a player stat token that just always updates is so obvious and easy an implementation, that i feel like if it was an acceptable compromise, it wouldve been added already
but it seems not ideal
So the whole "find out all args in a i18n" was moot
Unless it can obtain this type of fine grained update context
And be able to tell i18n:some-key needed change vs all i18n
I'd probably go with something like NetStringDictionary<NetDataModel, NetRef<NetDataModel>> so you don't need to repeatedly iterate the list to find your net field, but that could work. The NetDataModel could be useful for game logic too. No guarantees at this point, but I added it to my list of ideas for upcoming versions.
My mail isn't being sent despite me having 6 hearts with both NPCs 😦
are the internal names correct at least
for PLAYER_HEARTS do i need to put my mod ID before the NPC name or is it just Polly?
It uses the npc internal name
so if your NPC's internal name is {{ModID}}_Polly or something, you need to use that every time
Ahh that will be the problem then!
Does anyone know of a multiple spouse redux?
uh, like polyamory mod?
Yeah
this is a #modded-stardew question, but multiple spouses has been replaced several times in the years since it was current
isnt it polyamorysweet
Is there a way to give a pet more than 4 walking frames?
I have this goober here, but I feel like the jump from the 1st to 2nd frame may be a bit too sudden.
Not too bad if there isn't a way. I think I need to test how it looks in-game anyway.
I have no idea if this will work but you can try defining custom frames for the Walk behavior
Hmm, I'd have to look into that. Haven't done this before.
At least there's this page on the wiki, which makes it easier to get an overview of what I can do.
https://stardewvalleywiki.com/Modding:Pets
After a long pause with creating mods, we are back with new and fresh pig lskjd
https://www.nexusmods.com/stardewvalley/mods/33483
Hello.. i was wondering what am i doing wrong.. i haven't received the mail when i added this piece of code - https://smapi.io/json/none/01bcb7536f164c479777a167b33e359c
We don't recommend sending mail via event preconditions any more
Use trigger actions instead
[[Modding:Trigger actions]]
okiee thank you
The trigger action equivalent would be:
// add mail
{
"Action": "EditData",
"Target": "Data/Mail",
"Entries": {
"{{lr_cnt}}_IntroMail": "{{i18n:mail.intro.subject}}^^ @,{{i18n:mail.intro.body}}"
}
},
// send mail
{
"Action": "EditData",
"Target": "Data/TriggerActions",
"Entries": {
"{{lr_cnt}}_IntroMail": {
"Id": "{{lr_cnt}}_IntroMail",
"Trigger": "DayStarted",
"Action": "AddMail Current {{lr_cnt}}_IntroMail Now"
}
}
}
To add, when the action runs it will add the mail to the mailbox for tomorrow. If you want it immediately add Now to the end of the action string
noted 
(Updated the example accordingly!)
thank youu .. it worked 
(I'm half-tempted to add XML support to Content Patcher. It would make events much cleaner, since you'd be able to use unescaped line breaks and quotes.)
I haven't had time to really do anything substantial since then, unfortunately! Let me have a quick look into this SpaceCore feature, though...
Wait but that's what the yaml adaptor does
Aren't newlines and quotes meaningful in YAML too though? The nice thing about working with the original XML assets is that within the tags, everything is just content except .<> characters
I've been enjoying converting some of my config files from json/yaml to toml.
(unrelated to modding) but it's a nice format to work with
Ok, so I cobbled together a mod to break stones with a club/hammer. It breaks everything... Except for big brown boulders... Other boulders are fine, just not those. (At least in Sunberry Village mine)
Not really sure if I should post this here, or in #1272025932932055121 however im basically trying to edit a shop ledger to have more items. As a default, I just use Sophias Ledger (cause sophia is wife <3). I've added all the items I want currently, but I'd like to add a condition to one of the items I'm "selling"; the deluxe rarecrow. I don't want it to just be purchasable, I only want to be able to buy it after I've received the mail from the rarecrow society, but I don't think im formatting the code properly.
(Here is good for that!)
!json post what you have
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.
Good rule of thumb is: Are you editing code? Send it here!
Also, probably never again... I struggled... So much. And it's ductape and bandaids holding it together
i backed it out because I gave up and just left it purchasable normally
..then it felt unfair so i came here lol
I dont have the condition set, but
very bottom, the deluxe scarecrow
(post it to the site above!)
anyway just to confirm you're editing SVE in place?
ideally I'd like to make my own shop that I can interact with, but thats way beyond what im capable of, so I just use sophias ledger
so
yes
not particularly relevant to your question, but if you are thinking of releasing it or just want for your change to stay every SVE update you would make it a separate mod
but anyway
yeah
you would add something like "Condition": "PLAYER_HAS_MAIL Current RarecrowSociety", into the deluxe scarecrow block
I was using these as reference points so thats where I went wrong; wasnt sure what to use
that can also work, but if the field supports Game State Queries (ie. the Condition field) use that instead
[[Modding:Game_state_queries]]
we should probably update that page to mention GSQs
if you do want to use When you'd have to break your rarecrow change into a separate entry in Changes
I went to go test it and my power just went out. Thats great lmao
Yes but there's (several kinds of) syntax to have multiline strings https://stackoverflow.com/questions/3790454/how-do-i-break-a-string-in-yaml-over-multiple-lines
There's a event mod made using the yaml adaptor mod let me find it
Yeah, but that's what I don't really like about YAML. I like a format that's just "here's the structure, and stick whatever content you want inside it" without needing to change syntax depending on your content formatting.
this took to long -_- , had to put text above the sprite to make sure it was going in the right direction
You can kind of do that with JSON:
"Key": "Value"
"Key": "
Whatever
formatting
you want here
"
But JSON editors hate it, and you still need to escape all the quotes in event commands (especially with the upcoming choose command).
(I propose we switch everything to BSON. /j)
I definitely wouldn't be against an XML option, though.
https://www.nexusmods.com/stardewvalley/mods/30087?tab=description it looks like they went with " " block
But hm i think part of problem is like, event is sort of a script isn't it
But must be loaded as a string value in dict
It's kind of like if we had to load map tmx to a string string dict because that's just how game is
The TOML equivalent would be:
Key = """
This is a
multiline string.
"""
What if there's a {{cat: relative/path/to/my/event/txt}}
Toml's nested attributes are handled by brackets above the keys:
[relative.path.to.my.event]
Key = ...
The game's event syntax is really optimized for readability in the original XML.
For example, here's how the original event looks (with the changes in the upcoming 1.6.16):
<Key>SomeExample</Key>
<Value>
pause 550/
choose "" "It's sad, but there was no other option." noChoice "Monsters don't deserve our sympathy!" noSympathy "It's a harsh world, kid." condescending "Did you have to kill him?" blame/
label noChoice/
speak Abigail "Yeah... I did what I had to do.$s#$b#I guess the world's a pretty tough place. It was either you or him, right?$6"/
goto resume/
label noSympathy/
...
</Value>
...
But then you when you try to do the same thing in JSON, the code editor will yell at you:
"SomeExample": "
pause 550/
choose \"\" \"It's sad, but there was no other option.\" noChoice \"Monsters don't deserve our sympathy!\" noSympathy \"It's a harsh world, kid.\" condescending \"Did you have to kill him?\" blame/
label noChoice/
speak Abigail \"Yeah... I did what I had to do.$s#$b#I guess the world's a pretty tough place. It was either you or him, right?$6\"/
goto resume/
label noSympathy/
...
"
(And good luck if you need \\\"nested quotes\\\".)
I realize that toml is unlikely to ever become a thing in SDV modding, but it really seems to solve a lot of json and yaml criticisms, and it's arguably more human-readable
Out of curiosity, because I definitely wasn't around at the time, but what drove the decision to go JSON in the first place?
Just gotta make ToCP
hello is there an easy way to create events? 
JSON is a very standard, efficient, and readable format in general (just not for events specifically).
I tried to read the doc but i couldn't understand half of it...
Json is kind of ubiquitous because it has the best tooling, or that could be the other way around
So what would xml integration with CP look like
Would u just have ability to include a xml instead of a json
As long as u format Changes in similar structure
Yep, you could just reference .xml files in addition to .json.
Would that be event specific, or just universally xml is supported?
It's perhaps best to look at vanilla events, start simple
Content Patcher would just support JSON and XML as interchangeable, for any usage.
(This is just an idea currently, I wouldn't have free time to work on something like for a while.)
I suppose since it was always going to be more general user facing, it makes sense.
And it's not like our mods are going through the content pipeline (directly), so keeping the original format wouldn't make sense!
I'm curious if there would be the slightest bit of efficiency gain by converting json patches to xml
Like is reading it any faster, slower, or the same
A very fast Google suggests JSON is typically faster for parsing, at least.
Say does mail trim \n
Also, would Content Patcher be setup to do the heavy lifting, or would it be something that SMAPI is updated to support
That's another place where cat/textblob could be useful 
It would probably be a Content Patcher feature; JSON should still be the default for most cases, and I think there's a lot of benefit to having one recommended way to do something.
(Which would be my main argument against having an XML option in Content Patcher in the first place.)
Do you think event is remaining a big ol string forever
Is that your way of asking what's in scope for a hypothetical 1.7 update?
It would risk a split in terms of guides/tutorials, that's for sure.
I am always dowsing for future trends here in #making-mods-general
Isn't 1 2 modpocalypses enough?
I'm working on some fairly big event changes in 1.6.16 (like multilingual events, a new goto/label concept, fork deprecation, dehardcoded skip logic, new event commands, EventValidator, pre-compile multiline formatting, etc). But the changes so far are all generally backwards-compatible; changing the actual event data format definitely sounds modpocalyptic.
Time for Data/Events2. /j
Just start to version all the internal formats Data/Events/1.6.16/
Overall tho i feel like event being big ol string is something fixable in the text editor
(Time to move events into one big Data/Cursors asset.)
Like just configure vscode to not be angry at multiline strings and such
I've had an idea spinning around in my brain of making a Content Patcher superset that just compiles into Content Patcher, but adds some sort of templating language
It is not like newtonsoft cares very much about valid json
(You mean Data/Cursors_16, right?
I mean we need to respect the versioning.
)
I'm still upset a double comma is legal
(Technically "",, "" is just a shortcut for "", null, "".)
Yes that is what I'm upset about /lh
(Fun fact: Content Patcher has special logic to handle that by ignoring null patches.)
I think the C# equivalent of JSON would have to be something that C# could basically eval into an object
I don't think it'd be too different from the syntax which supports dictionary/list initialization
C#ON:
public static class Content
{
public static string Format = "3.0.0";
public static class Changes_0
{
public static string Action = "Load";
public static string Target = "Data/Cursors";
public static string FromFile = "assets/cursors.cs";
}
}
Very syntax, much human-readable
What does private imply in c#on
(Or less jokingly, I guess it would be something like this.)
new Content
{
Format = "3.0.0",
Changes = [
new Change
{
Action = "Load",
Target = "Data/Cursors",
FromFile = "assets/cursors.cs"
}
]
}
Is that how u write comments
That's not too bad tbh
other C#ON objects can't access the property
Where the type could be implied, you could probably even replace new Change with just new
(Inventing a whole new data format is probably not in scope for Content Patcher.)
It's like 99% the same as json anyway except it substitutes : for =
And removes the quotation marks around keys
but consider referencing the properties of other C#ON objects
this will cause 0 issues and 0 circular references
If we're imagining something that is functionally equivalent to JSON that wouldn't be allowed
(You don't actually need the quotes around keys in relaxed JSON files either.)
Since JSON has no inherit references to other objects
oh i thought we were inventing something totally new
I thought of it more like a what if instead of javascript object notation, there was a c# object notation
I kind of feel like since C# is strongly typed, it'd have to have the word string int and float in there somewhere too
How would I make a separate minecart network for my custom locations?
I know that, but I can't see an example of a custom network
My entry currently connects with the vanilla network y'see
instead of TargetField and edit the default network you'd just add an entry for a new network
Ahh
ES and RSV both got examples
Hi, I'm making a companion to the Transistor Sword and want to add "Functions" based on the cave monsters. The functions when equipped as Active will change the secondary attack (The right click). The Upgrade version changes the Active a little and the Passive grants health while holding the sword.
I have a few, but if anyone have ideas of functions to add I'll be grateful
And ideas of the icon, since I can't draw to save my life
i dont remember who all it was who taught me how to use dynamic tokens (it was multiple people) but you guys are spectacular
I have just implemented ✨✨gendered dialogue ✨✨ using them
Wow. You drew these huh?
i think those are from the other mod maybe? unless i misread that
or maybe from one of them there free packs
I extracted the 2 icons from the transistor game, I'm using them as placeholders
Surround the sord with differently colored auras
Overall I think if u just do 16x16 it'll look reasonable
Chue, what do you mean by "dehardcoding rng"
the ask is a joke, but i guess you let content packs seed things as they wish 
No, tbh
Just use the library that SpaceCore uses for it's content engine, problem solved!
(Self invented data formats are fun)
Sooooo
Re:xml
I've wondered for a while if SMAPI/CP should support editing .tsx
.tsx as in tiled tilesheets or typescript jsx
The first
i think it'd be nice but i was under impression this is xtile problem
or at least, base game should refactor into sharing tsx as an asset before this is considered for content patcher
(One day I'll document it... after I finish all the spacecore data model documentation on my new website (which isn't happening anytime soon) )
i would love to make a portrait mod that goes with the seasonal outfits mod someday but it would be so much work haha
Hello! I just released my first mod and would like to request the mod author role!! Would anyone here be able to help me with that?
you can dm @outer glacier directly, but first look at #roles for instructions
Yes, one moment!
Congrats on the publication! Can you please add yourself to the list of modders on the Modding: Community wiki page - you'll have to create a wiki account if you don't already have one.
Waitttt multilingual events¿????
Omg
Added!
Welcome cough cheeto dust to our newest Cheeto!
ough, there's not a tentative time frame for 1.6.16 is there? theres some changes in there that would be relevant to what im working on right now
Thank you!!! 
with all these cheetos around here might be time to invest in a respirator 
LOL - bunny suit here I come!
The dusting
oop
Nope, we're just collecting changes for whenever the next update is. I suggest finding a workaround in the meantime for anything you're already working on.
oh theres no workaround needed, just some stuff with the event commands that i would want to update on my end! 
where do I post smapi log and json validator
hm what are some usecases for GameStateQuery.IsImmutablyTrue
today i realized the game doesn't actually call that by default so i should really be making a TryGSQ(ref string) thing
im not sure what you mean by this but if you need help with mod here's the channel yes
oh
mod you are making at least
My content pack is failing to load because the tilesheet paths arent relative, but it hasnt been a problem before so why now?
well I finally made it to where my update doesn't get any errors in smapi log however the house and character npc are not in the game.
!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"/>.
tiled can mess these up just because you saved
you have to open your tmx as a text file (it's actually xml)
Wiki says ShippingBinLocation is only valid on the farm. Is there an alternative tile property that can be used for other locations?
Trying to add a place you can sell stuff
But it's for a custom location
iirc spacecore had thing to spawn building
And i want it to be there all the time
besides that, you can also make a shop there
True true
so I can send content parser logs right
Question: How do any of you guys usually make a custom NCP with content patcher?.
I think. Everyone does? I don't see an alternative
!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!
well C# is an alternative
cursed
Sorry, I rephrased that wrong. I meant, how do any of you guys make custom NCPs, like is there a certain formula you use, or not?
Scary 
this command is a good starting place @heady trout
i did my halloween modjam npc in C# 
to be fair they were very... bare bones
generally an NPC needs to have a few bare minimum things to function, ie dialogue, schedule, npc data (aka disposition), gift tastes... but everything else like events or seasonal outfits you can do as much or as little as you want
no errors but the npc itself is not loading nor the house they're in, I have no idea what it could be.
is this all the code in the mod so far?
because as is i dont actually see anything thats loading in the NPC itself
Does the code have heart events in it, too?
they're using the old NPC Disposition
oh i see, you should probably move away from the disposition format and into the NPC Data format
I literally just saw that from the !npc
oh ok
i cant read good today lol i was making sure
woops
Sorry, I was supposed to send in that later lol
question for those more familiar, do quests that complete by collecting a specific item, does it matter how? like for example the shears/milk pail tools should those work to complete the quest?
they're checked upon entering the farmer inventory for the first time
shouldn't matter how
ok. means my quest data is botched.
okay maybe it isn't actually botched. and its just not set how i expected with other context.
What's the best way of adding custom mineable nodes?
Item extensions
Ty!
Great animals giving me their deluxe produce and not the normal one the quest is looking for. Just trying to confirm the baseline quest code even works... Curse you blue grass and maxing out mood
Does Utility.ForEachLocation not really work on multiplayer clients?
How many dependencies is too many for an expansion mod? I currently have 4
i mean. one of my mods is just a patch on an existing content pack and its got 4 split between optional and required. honestly i don't think the number of dependancies is something you should be worried about.
make your cool thing.
I mean, I don't get bothered as a player downloading mods but as a mod maker, I am conscious not to have too many lol
There will be people who won't download your mod if you have even a single dependency and there will be people like me who would download 15 dependencies without blinking.
Right ok, I don't personally mind either but obv don't want to go overboard. I think I will try and keep it at 4 if I can 
it depends TM
SVE had 9 once upon a time
granted it was back in 1.5, people are more tolerant of deps since CP hasn't eaten everything yet, and the game hasn't been updated for a couple years so things were relatively static
Use as many dependencies as you need to get your point across, and not one more
I will add as many dependencies as Selph makes frameworks
Depends on what you need in the location.
The client does have every location, but depending on what you want it will only be correct if its an ActiveLocation or current location
even when in a flash of brilliance I decide to port Poop Framework to 1.6?
hmmmmmmmmmmmm
do it
I could work it into cornucopia somehow
I mean it makes the most sense in a mod about food
humans are animals
so after I switch from using npc disposition, how would I make sure my npc is actually spawned

with format 2.x+ your EditData on Data/NPCDispositions isn't doing anything and would need to be an EditData on Data/Characters instead
also I don't think
"HasMod": "!FlashShifter.StardewValleyExpanded"
would actually work
it should be "HasMod|contains=FlashShifter.StardewValleyExpanded": false instead i think?
Once I've made my node, is FTM the only way I can spawn it to test?
you can also spawn with spacecore iirc
i'm so curious about this supposedly unused "angry roger" dude. All his constructors are unused
what was his purpose i wonder
boss enemy is my baseless guess, and obviously the game doesnt have any boss enemies now so
looks similarish to something in journey of the prairie king
my headcanon is that you talk to the ghost pirate from the back and then boss theme plays > ANGRY ROGER <
maybe it's birdie's husband or somethin
if you fail the quest you must feel his wrath
Umm, I can't see a way of spawning a custom node with FTM, only vanilla nodes
Are the nodes counted as Large Objects?
nodes are just Data/Objects objects. You use IE to define what they drop and FTM for where they drop (though I think IE has some spawn settings as well)
Ahh ok, I was confused as I thought it would be under Ore lol
In FTM terms I mean ofc
I'm trying to look at objects in the location to create a list of all my modded objects for reference
Currently Im doing OnSaveLoaded -> Utility.ForeachLocation -> search all objects
But if the non-host clients don't have that object list then I might need to have the host send over the info to the clients
IE clumps can be spawned by name with FTM's "large objects" section, but yeah, regular ore is done under "forage"
(and iirc, IE patches itself into that without a special category, so it's just object/item)
why does a farmhand need it?
hm does foreachitem work correctly on farmhands 
also no
terrible times
operations like that, particularly on stuff like SaveLoaded scream host only actions
Okay so I would need to have that happen only on the host and then message the info to the players then
sending the item list to client with smapi multiplayer message seems fine to me, i guess it depends on your usecase
Tbh I think it might Just Work in saveloaded
Depending on where that devent is on for farmhands
It might be just after the get their bolus of info from the host lol
Haiii, well I've made a custom node. Would that be under Large Objects or Forage?
cus maybe the actually answer is u dont need whole list?
only active locations and current location are networked to farmhands
Forage, last I checked. I'm not sure what IE's data format looks like, but its ID or Name from Data/Objects should work
Aha that makes sense. I initially put it under Large Objects and it isn't spawning. Will move it to Forage now!
Yeah, looking at the spawning format again, I assume the ItemId field is the thing to use. And IE's "clumps" go in FTM's "large objects" section, while the 1x1 stuff is "forage".
(but if all else fails, export Data/Objects and find your node there)
This is server code after the farmhand selects which farmhand they want to play as, and validation was successful
Game1.log.Verbose("Approved request for farmhand " + id);
approve();
Game1.updateCellarAssignments();
Game1.multiplayer.addPlayer(farmer);
Game1.multiplayer.broadcastPlayerIntroduction(farmer);
foreach (GameLocation location in Game1.locations)
{
if (Game1.multiplayer.isAlwaysActiveLocation(location))
{
this.sendLocation(id, location);
}
}
if (farmer.Value.disconnectDay.Value == Game1.MasterPlayer.stats.DaysPlayed)
{
GameLocation disconnectLoc = Game1.getLocationFromName(farmer.Value.disconnectLocation.Value);
if (disconnectLoc != null && !Game1.multiplayer.isAlwaysActiveLocation(disconnectLoc))
{
this.sendLocation(id, disconnectLoc, force_current: true);
}
}
else if (!string.IsNullOrEmpty(farmer.Value.lastSleepLocation.Value))
{
GameLocation last_sleep_location = Game1.getLocationFromName(farmer.Value.lastSleepLocation.Value);
if (last_sleep_location != null && Game1.isLocationAccessible(last_sleep_location.Name) && !Game1.multiplayer.isAlwaysActiveLocation(last_sleep_location))
{
this.sendLocation(id, last_sleep_location, force_current: true);
}
}
note how only activate locations get networked, and if their current location isn't in an active location, send that too.
theres separate code when warps happen to network the new location just in time using locationrequests
was a fun time debugging this kind of thing in SinZational Shared Spaces where I was accidently sending farmhands to the void because this code flow doesn't handle the new farmhand case where they don't have a lastSleepLocation yet (as it assumes the value on the farmhand will be in a farmhouse/cabin which is active, which my mod was changing)

just had to manually recreate a whole file because i accidentally saved over it with output from the json validator i use instead of the intended file.
weirdly specific question, but for the scrollable component in stardewui, is there a way to reset the scroll to the top? Context is that I have a long list and I think it lagged when I tried to display the entire list at once so I decided to chunk it and add buttons to go to the next page, but now if scroll to the bottom and go to the next page its still at the bottom and I'd like to set to the top
It's my first time using IE and SMAPI is stating it can't find the texture path for my node even though I've listed it exactly
"Texture": "Mods/{{ModId}}/Assets/Items/Nodes" This is what I have,and this is exactly where the texture is
Is there smth specific I need to be doing here?
did you load into Mods/{{ModId}}/Assets/Items/Nodes?
post your JSON just in case
What do you mean?
is there an "Action": "Load" block that loads a texture into that name
Oopsie
I need to go to bed honestly lol
It's still skipping it:(
Here's my json if someone wants to look https://smapi.io/json/none/25c7a4adf7ea44cba3ac1f1152b75ce1
I still don't see where you're loading Mods/{{ModId}}/Assets/Items/Nodes
you did load into Mods\\{{ModId}}\\Objects though, so use that instead
ah, it's the asset path
but yeah, when you Load a Texture, use the Target field's value in subsequent game data
So it's the Target part I have wrong?
no, if you Load into Mods\\{{ModId}}\\Objects then you use Mods\\{{ModId}}\\Objects as the Texture field
hate to but in, but. i was wondering is it possible to have a tile that grass spreads on but can't be tilled? since in map making ive noticed you can place grass spawn nodes anywhere and they mostly work on untillable tiles
I really wish C# had a good way to do algebraic types like string | EventDataModel to let Data/Events be both old and new at the same time
might be able to do serialization magic to map it but doesn't sound fun
Heheheh
carp... wine?
CARP WINE!!!!
it works yay
Hooray!
Can't wait for my shipment of decadent carp wine
at least its not truffle juice i guess
this will pair well with snail honey
Ah. Yes. The nectar of the gods
i should probably do something to stop people from exploding lookup anything
with ALL_ITEMS
hmm I think I can actually do a poc on how to make Data/Events not be a modpocalypse and support string delimited format and a more modern format in parallel
oh i thought u can just do that with implicit
public sealed class ProcSoundData
{
public string? CueName = null;
public List<int>? Pitch = null;
public static implicit operator ProcSoundData(string cueName)
{
return new() { CueName = cueName };
}
}
basically this field used to be just a string (the cue name)
then i changed it so ppl can optionally add pitch
does newtonsoft respect implicit operators?
didnt need to change any of me mods
and tbh i still use just the cue name if i dont need pitch
what i dont know is whether this would fly for vanilla 
which doesnt go through newtonsoft
but if they decide on this, i assume they will just convert it all
tbh I'm less concerned for the xml side of the fence, ensuring vanilla is migrated is less complex than modpocalypse
but yea i feel this should work for events too
the modpocalypse aspect is more getting people onboard with this new thing
all those old event guides 
I wish it was an explicit operator, but I think newtonsoft wont use it
Just seeing that screenshot made me feel the framerate drop
carp... wine...
fun fact, the ShowUnownedGifts config in LookupAnything was added by me specifically because I had mods that did the 8k variants of wine or whatever (not as flavors but as distinct items) and it actively lagged ContentPatcher looking up NPCs
wouldn't fully stop the lag spike from calculating the gift tastes, but at least saved the fps when showing lookup anything
also saved the quantity of scrolling to get to liked gifts
pretty sure it wass raffadax yeah
turns out rendering and 1608 unowned items is a lot faster than the alternative
it is, in fact, raffadax
(i know this because every time i use lookup anything when playing my game spends a good few seconds dying)
I could tolerate the lag spike pressing F1, being 3fps trying to scroll to the liked gifts was a different story
hmmm i have been screwed by my past self
because i added clicking on the fish ponds i need more elaborate thing to add expand link
perhaps address this in another PR 
welcome to the fish dimension
Fish Dimension...
Fish
Do it 
im inflicting carp wine upon the culinary world
walks into channel
sees carp wine
slowly backs away
not without taking your complementary bottle of carp wine, and jar of snail honey
one step away from hardwood jelly
how does this rank on the haute cuisine scale
i personally think it should not be allowed
soybeans butter tho?
An explosion of flavor!
... is it a good flavor?
An explosion of flavor!
Shhh
Jail.
are multiflavored items part of EMC or a separate mod?
how many flavors can there be
INT_MAX 
smoothie mod 💪
https://github.com/zombifier/My_Stardew_Mods/tree/master/ExtraMachineConfig#items-with-multiple-flavors-and-colors for docs if you're interested
this is my first time in ur docs and this mod suspicioiusly seems to do a lot more than machines /lh
if you saw something relating to junimos or slingshots, no you didn't
selph i hate to say it but the slingshots triggered my comment
a slingshot is a machine that converts Item to Damage
ur docs r quite good
thanks! the same can't be said for extra animal config though
the neglected sibling
EMC: Literally how every single field works, with CP examples for each of them
EAC: Here's a table, figure out the rest yourself
Me: the code is the documentation
quick someone repost the "don't write comments" video
God I hate brain dead comments
also tbh chu and button's docs clear mine any time
it's hard to beat a whole actual website
well its actually a doc generator
look at that font, that tasteful background color. my god, it even has a side bar
at the end of the day what matters is that I can (a) find the docs and (b) do the thing i want after reading the docs
i used it once and was like this sure is too many effort never again
i really gotta go back and add examples 
hm so
a long time ago i did actually have a wip for adding internal ids to things
but it was on the title rather than a LA field
y/n?
the carp surprise is carp wine
no this is just common pond fish
i mean its not wrong.
hmmmm
can we not find this in the debug fields? /gen
we can its just scroll allll the way down
i think its important enough for debugging qol
i like the bolded actual name and the slightly grayer category qualifier
average content modder would use this just to verify they spel right
i like this
i would add equiv fields for the other subjects too, if applicable
idk if bold is needed if i already gray the qualifier
I like grey/normal better
Hm, it's not possible to have a gift give 0 friendship value, not without some C# magic, right?
rejectitem?
you can add a dialogue command to add/remove friendship point to cancel out the gain/loss
Hm but i still want them to take the item
u wont get exactly tho
but uh, if its an active quest item then they just take it too
For context i wanted it to be like you're giving someone something, and they accept it, but say something like "oh, so and so might like this", so it ends up not actually being a gift for the npc you gave it to
i think neutral but with gift dialogue makes sense story wise
tbh it's totally fair for that to give + friendship
Hm so neutral would probably work i guess
neutral gives like 20 right
i wanted to make this but...
sdvwingdings
Adding on, i can just like. Add context tags to items however i want right
I dont want to make like 509 AcceptGift lines 😭
Sure, that's a perfect use case
an even more important aspect of docs, is being correct and up to date.
which is why "just read the code" or "code is the documentation" is a good idea, the code can't desync from itself, the docs can.
Guys how to write code other than using this, I can't write long code here
Wait, are you making a mod?
Are there any other alternatives, if any?
You said you want to write code so I assumed you're making mods
That's not what I meant, sorry, but I wanted to say that I wanted to write some long code but couldn't if I used animal names.
This means the code is [74]
That's what I mean, but there's a longer one than that, but I can't use it.
don't speedruns already do this by copy+pasting long text into the field or something
okay, then not here then, I'm sorry 😅
you can try #stardew-valley but I think that exploit does not work on Android
Oh, you mean "code" like the thing speerunner use in their 1s speedrun
And yeah, iirc it's copy-pasting in the character creation already
Hey guys, I was thinking of making a NPC mod for the game, with their own home and everything. I have never made a single mod for any game, let alone Stardew though, so I was wondering if anyone had any tips/videos to use to help learn some stuff?
!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!
!startmodding This too.
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.
!mapmaking as well
If you want to make mods that add or edit maps:
-
Use Tiled to edit .tmx or .tbin files.
-
Refer to the Maps wiki page for details on how maps work in Stardew Valley.
-
Content Patcher allows you to create custom locations through editing Data/Locations
-
Vanilla Maps can be edited via Content Patcher as well: EditMap
Everyone has posted resources but I want to give words of encouragement! It's going to be tough but most things are pretty intuitive and I believe in you! 
thank you! I woke up one day and decided why not torment myself and learn how to make my own stardew mods
That's how it is. One day you wake up and suddenly you're consumed. Have fun!
mood
The consumption never ends :D
https://smapi.io/json/content-patcher/291489fc694b4987ade5f2e72939d78a finally see the house but cant go inside cus it doesnt exist ig
[02:57:32 ERROR game] Warp to RileyHouse failed: location wasn't found or couldn't be loaded.
yep, it needs to be made a location https://stardewvalleywiki.com/Modding:Location_data#Simple_location
does anyone know how to create a custom catalogue for a CP furniture pack?
I'm glad to finally announce that the Furniture Framework 3.0 was finally released! It now has advanced CP compatibility to patch both content files and textures of a Furniture Pack, as well as a bunch of reworks, fixes, and new features! https://www.nexusmods.com/stardewvalley/mods/23458
Ok, this image looks horrible, it was a bad choice...
Hip hip hooray!
How exactly does quickquestion work...?
quickQuestion <question>#<answer1>#<answer2>#<answer3>(break)<answer1 script>(break)<answer2 script>(break)<answer3 script>
I'm guessing the answer1 script is basically the result of choosing option 1, but is it just a string? Or a full script that happens before continuing with the event, needing /speak for dialogue for example?
Examples of whatever syntax is acceptable with it would be nice too 😅 Cause I'm guessing a lot is allowed...
It's a singular command iirc
The annoying part (for parsing it in a converter) is I don't think it needs " for the strings? 
you can do emotes and movement and showframe, npc speaking etc. you just have to use \\ in place of /
you can end the event with one answer and then continue it with another, etc
Oh, that's good to know, so something like \\speak <NPC> "<dialogue>"
as an example, this is part of an event i just wrote
quickQuestion {{i18n:skipdozerMP603C}}#{{i18n:skipdozerMP604C}}#{{i18n:skipdozerMP607C}}#{{i18n:skipdozerMP6029}}(break)emote Caroline 40\\speak Caroline \"{{i18n:skipdozerMP605C}}\"\\pause 1000\\speak Caroline \"{{i18n:skipdozerMP606C}}\"\\showFrame Caroline 19\\move farmer -6 0 0 true\\pause 500\\globalFade\\viewport -1000 -1000\\end(break)emote Caroline 28\\speak Caroline \"{{i18n:skipdozerMP608C}}\"\\pause 1000\\showFrame Caroline 19\\move farmer -6 0 0 true\\pause 500\\globalFade\\viewport -1000 -1000\\end(break)emote Caroline 28\\speak Caroline \"{{i18n:skipdozerMP610C}}\"\\pause 1000\\move farmer 0 2 0 Caroline 0 1 3\\move Caroline -6 0 3 true\\faceDirection farmer 3\\pause 500\\globalFade\\viewport -1000 -1000\\end
three answers to the npc resulting in three different replies from the npc
It'll be helpful, thanks
you're welcome! that's a really short example but you can do a lot. you can stop and start music, do animations; you just have to remember the backslashes
Okay, thankfully the i18nifier works fine with answer scripts, just gotta fix the initial question and answers
oh yeah that's really important, hahah
quick recipe modding question: I've seen recipes done various ways, like INGREDIENTS/NUMBERS?/MODID_NAME/here I see default or null a lot/i18n name. Sometimes the i18n isn't there. If it requires a friendship or other level I'll see that instead of default or null. What is CP actually looking at and reading in order for it to be a successful recipe string?
Recipes are explained here: https://stardewvalleywiki.com/Modding:Recipe_data
Right, but a lot of times I see extra information like the i18n at the end.
That extra information is the display name, which is listed on that page I just sent.
And the unlock conditions like friendship are also explained on that page.
In recipes, you can omit the display name
If you do that it defaults to the display name of the first product
(also content patcher isn't looking at anything, its just writing to the data structure and letting vanilla deal with it)
Why did I make a converter based on regex when I hate regex... 
Thank you, is there any penalty or benefit for adding the i18n display name? Is it a case if you have the file anyway you should have it or??
lovehate relationship
the benefit would be if you want the name to be different
i love quickquestion but i am looking forward to choose and labels in the next game update to free us from this
I know these may seem like stupid questions to you but sometimes you can look at a page over and over again but still not understand what's being presented because it isn't your home, it's something you're just learning still.
sadly we are probably never getting an actual data model for events, so we are stuck in giant embedded string land for the sake of not blowing up every mod lol
Hmmm
Tbh my mental model for an event is very much ticker tape
How would you structure a data model?
i mean i think just having string arrays for preconditions and commands would be an improvement
at minimum I want the 3 starter things separate
nested data structure for quickAction style thing so backslash schenanigans aren't needed
Are you telling me there's gonna be another thing I have to add to the i18n converter? 
The only thing I can really think of tbh is having a Lua like scripting language
Like fundamentally a string array and a string aren't that different tbh
but yeah it being an actual array instead of slash separated already makes it so much more nice
not needing to set fire to the json spec to make it readable
Meh, I feel like the extra "" , would be more annoying
if i could only have one thing, i would accept not embedding the preconditions into the key
"Move npc y"
This I would what but it's actually hilariously nontrivial due to variant events (see Pam house event)
Hello.. i just want to ask regarding making events and debugging it... should I really restart my game just to check my code changes? or is there an easy way to do it
patch reload
If you want the display name of the recipe to be different to the display name of the first thing produced by the recipe, you'd add the display name field. If you want it to be named the same as the first thing produced, you can omit it.
Huh, interesting... might as well add it now too
Where they're actually two or more versions with the same event id distinguished by different precondition
and debug ebi eventid
debug runtestevent (debug rte) my beloved but it's finicky so probably just do patch reload like everyone else
patch reload yourModUniqueIdHere to reload your mod like SinZ said, then debug ebi eventId like Limey said to play the event straight away without having to trigger it normally.
tbh that can be semi easily solved by an instant fork
Debug rte always seems like so much work to me when patch reload and debug ebi are so easy
the benefit of rte is it accepts it in the line separated form being outside of json
Wait did we have this conversation before and it turned out you can't just hit the up arrow to get previous commands in SMAPI, ichor?
Line separated form?
debug rte is also much faster to iterate. not having to reinstall the files, it's only one command, less typing, etc.