#making-mods-general
1 messages · Page 320 of 1
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.
Get Visual Studio Code. There's an important difference. https://code.visualstudio.com/
Use one of these programs
Ohhhhh
If it doesn't have "Code" in the name, it's not the right program.
Purple one for c#, blue one for everything else
(though it's green not blue for me due to insider/beta builds)
I’m trying to make a few small map edits to Shane’s room using EditMap but smapi is showing that the tilesheet I’m using to edit the tiles doesn’t exist. I used Lookup Anything in game to find the tilesheet name and the index. Originally I tried “townInterior” but that had the same problem. Where/how do you find the tilesheet names?
Log Info: SMAPI 4.1.10 with SDV 1.6.15 build 24356 on Unix 6.5.0.23, with 5 C# mods and 1 content packs.
Suggested fixes: One or more mods are out of date, consider updating them, SMAPI is out of date, consider updating it
You shouldn't have the Maps: part, just the tilesheet name.
I can't remember if it has to be the tileset name or the tilesheet name, so if one of them doesn't work try the other one.
Tileset names can vary by map, so you'd need to open the map file to double check what its tilesets are called.
that's what I tried first (just townInterior without maps:) and it had the same error
Okay yeah AnimalShop calls the townInterior tilesheet 1 so try "SetTilesheet": "1",
okay, thank you! so it's looking for the tileset, not tilesheet?
just asking for clarification on my part for the future!
If the 1 works, yes
I've got it both ways in my files and I can't remember which one worked and which gave me the error haha
But I just saw I have another instance of it that has "SetTilesheet": "indoor", and there's no tilesheet called indoor so it must be the tileset name, yeah.
aha! it worked. thank you for the help!
Yay! No problem. It's very confusing that sometimes the game checks tilesheet and sometimes tileset name lol
hey, i don't want to be a nuisance but i really want to create a mod for my npc and i don't know anything about programming any advice on how to start friends?
!startmodding Yup, start by familiarising yourself with Content Patcher modmaking. Then you can look at the resources for NPC making.
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.
!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!
thank you!
@analog flower hello brother, i have question about your mod Sunberry Village
Question regarding configs. I've got it set in my mod so that all of my custom coop animals can be configured to be enabled or disabled. With the custom Fish Smoker recipes from earlier, I want to set a config option so that I can enable/disable all the recipes added this way. I've already got functioning configs for other things, so I do know how to make them, but I haven't yet figured out where to place the "When": {"Allow Custom Recipes": "true"} lines so that it works as intended. @drowsy pewter
The When condition goes into the same "level" of the brackets as your Action line
It can't go anywhere else
Oh, gotcha. I feel dumb now lol
No worries, I used to get that confused all the time too lol
Log kept saying the json was invalid, and I knew it was related to the "when" lines. Works now, thanks again!
No prob
I'm heading off now though, so if you have more questions someone else will have to chime in!
I'm still on a kick for adding new smoked items, but I need to get back to what I was originally planning to do today; fish ponds. I want to put a vanilla item into a fish pond that is currently NOT able to be placed in them, such as a Common Mushroom, and have it produce appropriately named roe, such as "Common Mushroom Roe". I looked at "Data/FishPondData.json" in order to try understanding how ponds are set up, and I THOUGHT it would be as easy as copying one of them, but I've consistently been unable to get that to work. As I pretty much don't know what I'm doing, can someone help guide me through the process of making a custom fish pond entry?
Do I need to download the xnbhack to unpack the game files?
Yup
static field initializers are run before any class members are accessed, but there's no guarantee about exactly when they're called
I am not at all familiar with fish ponds but if you share your json and log I can have a look.
Sure, give me a minute. Want it via DM or here?
Fish ponds filter for inhabitants by context tags
So u should be able to do id_o_mosssoup
as i know, the static field it's will called before static construct
when we access on that type
such as code
- TarotManager.(somevalue)
- typeof(TarotManager)
- or any code access TarotManager
Here, so others with more knowledge can help too
Where do I find the context tags for individual items?
In their data/objects entry
id_o_blah is an autogenerated tag
The best way is to spawn item in game, hold it, and debug listtags
This will show all the tags present
I'll try the tags first before posting files. I assume I type that in the smapi console? Or ingame?
Console, yeah
kk
it will be called at latest when the class is accessed for the first time, but the documentation is very specific that there are no other guarantees about when or if the CLR will run static construction. (ie. it may run earlier, or may run even if the class is not accessed)
technically this is bad practice since Game1.content might be null when it's called, since we have no guarantee of when exactly it might be called.
usually what you want to do is a lazy loading property pattern, where you only call the loading code when the specific property is accessed
ah i think so too
Smapi tells me that debug is an unknown command. Can't seem to get tags that way.
you are missing the built-in console commands mod
if you're using vortex, don't. otherwise, just reinstall smapi to get it back
also unless you are making a mod, this is probably a topic for #1272025932932055121
They are making a mod
there have 2 bug
- Game1.content.Load<Texture2D>($"SunberryTeam.SBV/Tarot/BuffIcons");
- public static List<TarotCard> CardPool = " because they try access Game1.player is will null value
code line: https://github.com/skellady/Sunberry-Village/blob/400e038b9b2934c1dcce63b566ac72a86cbc85a8/Code/Events/Tarot/TarotManager.cs#L32
Adding on to this, will this tarot texture get edit changes 
It might be fine rn due to the special handling for Texture2D
yes, but only because textures specifically are reused when invalidated
If you move your mods around you may have removed it
Are these issues only on android or also on PC?
android sir
#2 is not an issue. if you look closely, those are delegates; they're not code that is being called immediately
it's issue on android sir 🥲
Do you have a log you can share
ah wait I see, isMarriedOrRoomates, yes, because it's being bound to a null player object
I was asking for curiosity for why it is borked but only on phone
sorry, the way you write is really hard to understand
Cus this part seems like something that would be broken on both android and PC
probably just what I was saying about CLR guanrantees
desktop CLR probably just calls it at a different time than mobile CLR
Fun 
i don't know, maybe cause from dotnet runtime
PC use dotnet 6
android dotnet 8
Does it 
shouldn't android be running on net 6 as well?
Isn't monogame locked to net 6
it should but Monogame android it force using .net 8
Do they have sekrit net 8 monogame fork or something
Alright, I got the developer stuff working. I had the non-dev Smapi installed lol. So, I ran debug listtags on the first item I had (humorously, it was Trash). It shows me id_(o)168. So, under "RequiredTags", I would place that Id?
Anyways you might consider sending in a PR
You don't need the dev version of SMAPI installed to use console commands.
That way people won't have to go out of way to get android version and can just use same one
Personally i would put CardPool in a Lazy and call it a day 
This is not your issue to fix
I pinged Sophie over in smc
Lazy<List<TarotCard>> cardPool = new(MakeCardPool);
List<TarotCard> CardPool => cardPool.Value;
It's fragile either way
Something along these lines
woo what is that
But yes, it goes in RequiredTags
Alright. Trying that now. Didn't think I'd be throwing trash in for testing, but here's hoping that's all I was missing lol
Is will call MakeCardPool() when we call get_CardPool?
Chue, there isn't an asset prop issue here because of how texture 2d is handled
yes but the static initializer using Game1.content is a problem
yes correct
and same Game1.player in static field CardPool
the issue is that when the static initializer is called, Game1.content might be null
it needs to be deferred to make sure that doesn't happen
Since we don't care about handling invalidation Lazy should cover all your needs here
Ultimately tho it should be fine to fix in general build, no need to do android specific fork
this code:
internal static Texture2D TarotBuffIcons = Game1.content.Load<Texture2D>($"SunberryTeam.SBV/Tarot/BuffIcons");
it's will bug because you have't register event for custom asset loading
well again, it comes down to CLR black-box stuff. It's a good idea to change it anyways in case future versions of .net desktop behave differently
so we should assign "TarotBuffIcons"
TarotBuffIcons = Game1.content.Load<Texture2D>($"SunberryTeam.SBV/Tarot/BuffIcons")
After this code
Globals.EventHelper.Content.AssetRequested += Tarot_AssetRequested;
it might still work sometimes but it's better to be certain
Yeah and I'm already ping Sophie
Tbh i assumed there was some automagic event hook thing but i guess not 
... stop giving me ideas for overengineering mod stuff chu
brb writing a sourcegen package that wires up event handlers based on the event parameter /jk
I keep going "i should include asset requested in my template" and then i dont do it & continues to copy paste it every time
it is so easy to get nerd-sniped while modding
why look at the event parameter, just use object e instead of the right sender type and reuse it for all of em
.. or just EventArgs i guess
i have done this
what I mean is determining which event to hook it to based on the event type in the handler parameters
so you don't have to specify it
yeah i know. i was saying just use one big function with EventArgs e and hook it to all of them
switch statement inside checking what type it actually is
God no button plz

Ah you just mark the class as a whole with [UseWrenMagics]
(i havent done THAT at least, just using EventArgs to reuse one specific function in one specific circumstance)
that's so awful
it is! thank you
so just implementing python, right? /j
I am reminded of something I did for my WIP building mod though- I used Emit to auto-generate a switch block so I could use a single ForEachBuilding instead of a separate one for every building type that needed it
i have no idea how python works, and yoba willing i never will
(well I guess it's technically an if-else chain. and using expression trees would probably be better but they're so hideously verbose.)
(i have no idea what python is like inside these days, and i don't care to find out, but i heard from a trusted friend some time ago that the main thing in python is an ouroboros-level world-spanning god function with a huge switch on what the statement is)
has anyone tried making the farmhouse texture taller? is that a thing I can do? Im trying to find resources related to changing the buildings texture sizes but I might be going about it wrong
[[Modding:Buildings]] IIRC
Im sorry if this is a stupid question, I was just wondering if anyone knew or had resources
I will look into this, thank you!
hey, no worries, that's what we're here for!
i doubt you can change the size of the textures the game expects without some C# (framework or bespoke)
but i know basically nothing about buildings, so don't trust me
the farmhouse is just a building, though, all you have to do is change the graphical data on it
the sourcerects and drawlayers and whatnot
I was planning on keeping the same structure/layout too, just wanted it to be a bit taller so I can give it a big tower
I was away for a bit, had to do something in the house. Here's my current content.json and latest smapi log. The fish pond line starts at line 71 in content.
Log found, uploaded to: https://smapi.io/log/6c49a8742bd145a19ce41a56c402c3be
!json Can you upload it to the json validator website please?
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.
Also does this mean your fish pond entry still isn't working?
should be as simple as changing SourceRect and making it taller. (and changing the image itself, of course)
Yeah, the entry isn't working. At the end of the smapi log, it's shooting out errors related to that.
ohh thank you for the info, I will give it a shot ❤️
As for the json validator website, https://smapi.io/json/none/de34ccaf5d9a411586db58a0b25e7b37
All of those warnings mean your formatting is wrong
if i had to guess it seems like you mightve put your data at the wrong level and directly inside Entries?
instead of inside an entry inside Entries
Can you show exactly where or tell me which lines I need to place the brackets? I thought it was already in brackets.
See the one on line 2 in my screenshot? You're missing that set.
"Entries": {
"Id": "Trash",
"RequiredTags": [
"id_(o)168"
],
should be something like this:
"Entries": {
"{{ModId}}_Trash": {
"Id": "{{ModId}}_Trash",
"RequiredTags": [
"id_(o)168"
],
...
not directly inside Entries
line 73
Yeah I realised I should go find an actual example from another mod and just saw it needs the ID as the key.
I still have trouble figuring that out just from reading the wiki pages.
Yeah I didn't even see I needed the modid part. I guess I should have guessed that since the last help I had gave me that exact thing for the recipes below it lol
(you technically dont need it (unless theres already one with the same id in vanilla) but its very very recommended. the thing you were importantly missing is the braces like Aba says)
Well I copypasted what was shown, so here's hoping it works now. Testing real fast.
Nah I also missed that it needed a key.
Still not working. I changed those brackets as suggested and added the modid line, but now it's telling me there's an error with line 115. https://smapi.io/json/none/9a5fcdd9c61340068471b2a734a276e6
I am not smart when it comes to coding, but it looks like I already have what it says I should have?
You've got a closing curly brace on line 114 with no comma after it
... I'm starting to hate commas lol
Added a comma, checked again, and still shows the same error
Are you using the error checking capabilities of your text editor?
And is it exactly the same error with exactly the same place referenced?
Probably not. I'm using Notepad ++, and it's showing me where brackets closed
You can use the JSON Viewer plugin to run an error checking process that will tell you that you have errors in your syntax
Or switch to VSC to have automatic error notification
Before I do that, I noticed that line 70's bracket closes EVERYTHING below it, not just my fish pond entry
yeah when still gettin the hang of json id highly recommend visual studio code
if you use an editor like VSCode, it will tell you exactly where things are wrong
line 70 in the last json you sent is correct, its an opening brace
oh unless you mean the like. when you close the section
Yeah, but in Notepad ++, when I click the orange + or -, it should contract everything in those brackets. It contracts everything, including the entries after it relating to recipes.
yeah that
all good. I'm as good at coding as a toddler, so you're fine lol
Yeah I was straight up missing a closing bracket
that would explain it
validator now says it's fine, so here's hoping
Well, no json errors, so that's a good thing. Still can't place an item in the fish pond though.
Just checking, you're trying to put trash in, right? Not anything else?
Correct. The goal is to put a non-standard vanilla item (in this case, Trash) into the vanilla Fish Pond, with the goal of said item producing roe.
Or well, any item. Just putting something that isn't a fish in the pond is the goal.
Was id_(o)168 the only context tag that the trash had?
Also it might be worth copying an entry from FishPondData and changing only the ID and context tags so you can be sure it's not an issue with any of your other fields.
The only other tags it had were "color_black" and "trash_item". As for copying an entry, that's what I did. I copied Coral's entry, but I'll try another entry.
Coral? Does that even produce roe?
Coral doesn't produce roe, no. The produce field can be editied so it does, but in vanilla, it only produces random junk.
I had to find the ID for roe for my attempt
Try copying from a normal fish.
And try using "trash_item" instead?
I'm just guessing at things to try
Oh and once you've done that, try using the console command patch export Data/FishPondData to make sure that your edit is actually being applied properly in the game.
trash_item is used by all the various trash items, including driftwood and broken cd. I'll give that a try though.
Using the id based context taf is correct i feel
But i forget if the auto rule for roe covers non fish
You might need a explicit FLAVORED_ITEM
No luck still. No JSON errors, but the game just tells me that "Fish can be placed into this pond" like normal. Running the patch export gave me this, which shows the edit is going through.
Json website please!
https://smapi.io/json/none/23ccbbe063db4f11b78127bbc0928cc0 no errors at all
I have reached the limits of what I can suggest, sorry.
"RequiredTags": [
"id_(o)168"
],
Is this right?
The wiki suggests it should be id_o_168?
both forms exist
Welp. That's what I was unsure of!
I'll take a potshot and try with the extra underscore. Can't hurt.
Oh wait, yeah, I didn't even notice the second underscore being missing.
There is no second underscore in that context tag format
I browsed the source and found the issue - your code is correct, but fish ponds are hardcoded to only allow category -4 items or corals/sea urchins
Well that would explain a lot
So I've basically just been trying to push a square through a triangle hole huh lol
lmao get aped /lh /j
you can change trash's category to fish, but that may or may not cause some other side effects
Doesn't mean it won't be possible at all, though... could maybe make a simple trash cleaner machine that take in trash and spits out a, I don't know, cleaned trash item with the correct category to go in the pond.
That would be a wonderful addition, but that's way beyond what I can do lol. Though, changing the category sounds fine if I use it on items that don't have any real uses I'd assume. Can't hurt to try and see what breaks lol. How would I go about changing an item's category?
edit the category field in Data/Objects
you may or may not need to spawn new items? I forgot if category is one of those things that are saved
Can I get an example of how I'd edit the category? I don't know how to do that. Still learning.
And thankfully Trash is easy to find, so if it does need a new one, that's easy enough to find.
also that may cause trash to spawn the fishing minigame when caught 
I would honestly love that, as dumb as that is
I don't have an example on hand, but you Target Data/Objects, use Fields instead of Entries, and set the Category field to something else inside the entry
[[Modding:Objects]] and unpack Data/Objects if you haven't already
I had it unpacked already, so I'm good there. Looking at the Objects file, I just noticed that Trash is considered a fish already lol. "Type": "Fish"
I'm probably doing this wrong just like everything else I've tried. I've set an "Action": "EditData", a "Target": "Data/Objects", and I specified Trash ("168"). I wrote "Category": -4, closed all brackets, validated the json and found no errors, then booted the game. Smapi tells me "one of Entries, Fields, MoveEntries, or TextOperations must be specified for an 'EditData' change."
https://smapi.io/json/none/fb96c54a8e5f438ea3c85b3575b15a0f (line 70 is where it's at)
My stupid is showing. How do I wrap it correctly?
you see how in your other entries you have "Entries":, and then the actual changes inside
do that
however in this case you want Fields instead of Entries
Fields is the same as Entries, but it adds "leave the existing fields the same"
sorry on phone so I can't type out an example
All good. So, Just change Entries to Fields, and pray it worked?
ahahaha It worked. Forgot I had the item spawner on to test, and when I searched "Trash", the roe and such was right there lol.
Thanks for all the help. Feels good to see progress on something that, while entirely pointless and stupid, still helped me understand the concept.
Though, now trash is categorized as a fish. I wonder if it procs the minigame... EDIT: Nope. Still instant catch. Oh well, that's a change for another day.
Looks like I can't use Sea Urchin's category of -23. Can't place it in the pond with that category, despite sea urchin working just fine.
sea urchins and corals have hardcoded exceptions specifically for them
Is there a way to make an option that is used in general but overridden if there's a more "specific" version available? Is it just about the order you place them in the Content.json?
I'm making a CP pack for Fashion Sense outfits and I'd like to make it so, if there is a Storm or GreenRain outfit created then that outfit is used during storms or green rain, but if there isn't a specific outfit for those it defaults to the Rain outfit during storms and green rain.
yes. if you don't specify patch priorities in content patcher, then the order they appear in your content.json is the order they are applied
if you are using includes, then the content of an include replaces that patch in the spot it was in
Awesome, thanks!
Huh... that's annoying 
What kind of parents name their child (LocalizedText Strings/NPCNames:Lance)? People these days
something something bobby tables
I wish Tokenizable String wiki had a section on where they actually work..
if something on the wiki (e.g. mail data) does not specifically mention tokenizable strings, it will not be parsed
Tbh I don't see anything about tokenizable strings on event and dialogue pages either
And at least for events they definitely work
Or I'm blind
Buff data
Crafting Recipe data
Dialogue
Event Commands/Scripts
Farm animal data
Building data
Some aspects of location data (e.g. displaynames)
Crop data
Map actions
Minecart data
Movie concessions and movie data
Object/BC/Mannequin/Trinket/Furniture/Clothing/Tool/Weapon data
Wedding data
Jukebox data
Shop data messages
World map data
Fruit tree data
Festival data
Powers data
Monster slayer quest data
Incoming phone call data
a very very rough glance of all the places that parse tokenizable strings
i didnt feel like looking through each of the 70 functions that call ParseText to see exactly which fields in these things support tokenizable strings, but they'll probably be the obvious things (i.e. displaynames or other text that the user sees)
Mail has a conflicting syntax with the [letterbg] stuff
Dialogue has a conflicting syntax with the [35 345 we3] stuff
%LocalizedText key%% ofc
So, I found one of those unintended side effects of changing items into other IDs. I know what I'm feeding Pierre from now on in year 2 on every run...
Anyone who knows how long it takes for Nexus to show a new uploaded file?
incidentally, after glancing at how it differentiates, it seems like theres a very very minor bug related to that too. Dialogue.isItemGrabDialogue() simply checks if there's a [ in the dialogue but the part that actually checks that when talking to them just uses bespoke code in the middle of Dialogue.prepareCurrentDialogueForDisplay() that actually checks if its a valid item ID first before attempting to create it. it doesnt use isItemGrabDialogue(), probably because that one doesnt do any sort of validation.
however, NPC.marriageDuties does use isItemGrabDialogue to see if your spouse is going to give you breakfast in the morning in order to put them in the kitchen, regardless of whether or not its a valid item or just a stray [ or simply a tokenizable string token that didnt get parsed, meaning your spouse will always be in the kitchen if your marriage dialogue uses failed tokens (or a stray [ for whatever reason)
this concludes today's random marriage duty code fun fact 🌠
Thank yooou!
(of course you can't download it to check it if you're logged out but it might show up at least)
just finished my latest quest puzzle for my mod. It was an entire month of work.
had to come and vent
never got my green rain summoning logic to only last one day though. Where have all the C# peopple gone.
Trying to figure it out by reading the machines json, but I'm at a loss. Does anyone have an example of a content patcher recipe for the keg and/or preserves jar that makes wine, juice, jelly, or pickles out of it?
You don't have to make your own rule if your item has the right context tags
So I could add context tags to an item that's not normally placeable in those, and it'd work?
Hmm... so I have to parse dynamic tokens into i18n for Mail, Special Orders, StringsFromMaps and StringFromCSFiles I guess 
Yeah
Iirc keg specifically have keg_wine rule for this
Although... why am I even making the name customizable... I don't need it 
keg_juice
keg_wine
preserves_pickle
preserves_jelly
These are special context tags for the flavored juice wine pickle jelly
If your output is a custom item then you need to add the rule normally
So theoretically, if I put "ContextTags": [ "keg_juice" ] into the fields of an edited vanilla item, that should mean I can make juice?
How do you set up an append? For example, using trash (the thing I keep using for testing, just like myself). I recently just edited it to be a fish to be put in fish ponds, so would this append need to be in the same section as the change I already made, or an entirely new section?
im finally finishing the last design for what im working on and then i just gotta transfer and begin attempting to code for the first time
TextOperations?
i'm not sure what is the purpose of appending here
out of curiosity what were you doing with adding stuff to stringsfromcsfiles
Something like this in a separate entry: #making-mods-general message
it has to be done like that otherwise you'd overwrite the entire contexttags field
Gotcha. I'll try that real quick then
Yep, that worked first try. Thanks!
(I would not drink that, for the record)
I assume I can't randomize which one is picked if, for example, I wanted the same item to provide juice OR wine?
Not exactly me, SVE added a custom death scene when you die in the highlands with Lance
You need to make a new rule to do that
Have 2 outputs where the first is RANDOM 0.5
What would the code for that look like? I've not done any recipes that have outputs yet, so I'm unfamiliar with it.
you dont need random 0.5 since machine output defaults to "pick random" instead of "pick first"
You'll need some TargetField drilling if you're adding rules to an existing machine
add an entry to OutputRules, define the Triggers (input) and the OutputItem (list of outputs)
I don't even know how to start the recipe in general. Looking at how the bone mill works has just confused me.
Take it slowly n don't overwhelm yourself
one of these days I'll write that machine tutorial (that's secretly a TargetField tutorial)
Yeah I'm trying to take it slow, but every time I look at something new, it's like I'm on a tricycle entering the interstate lol
I'm sitting here with my training wheels on, and being told to race in Formula 1 😛
you've been doing lots of the CP basics so far (editing an asset to add a new entry, or edit an existing entry). machine data is just one more asset, all you need is learn what each field does
maybe this is helpful advice maybe not lol
I'm still at the stage where I'm just looking at other mods and trying to copy what they do when it's simple lol. Actually writing this stuff out is like a jump from the kiddie pool to an olympic pool, at least to me. Hard to learn this stuff with a short attention span.
That whole fish pond thing felt like landing on the moon to me. Now I'm trying to land on Neptune or something with machines lol
how much have you read the CP docs? copying is a good approach, but I feel like at this point it's helpful to have an understanding of what CP does in general
hi, new here! I have a question if it's not too much to ask :)
!ask
Ask your question or describe your issue here, and someone will help if they can!
I've seen the link to it. That's about it unfortunately.
(/lh)
once you know how CP works you can edit any asset in the game
ive actually scoured so hard lol, the wiki, the bot, everything
i'm new to modding and ive spent days reading and watching the videos on C# coding on the wiki so this is my last resort
what do you want to make
believe me I would not interact with humans if i had to 😅
luckily the humans here are very friendly and like to help
Oh I'm making an NPC mod. Ive actually got a lot down but I'm stumped on one thing. I want my NPC to be able to have children, but the only two lines of code ive found for it are this:
I wanted to be sure because testing it in game might be really hard due to the 5% ask rate
those are fields in the NPC's data, which I presume you're editing
All NPCs want children by default, so you don't really need anything
this is what I assumed, I just wanted to be absolutely certain
SpouseWantsChildren is always true unless stated otherwise
so basically, other than that, If I don't mess with anything else I can also code children for them? (entirely separate thing I am also working on)
you mentioned C# coding and im not sure if you know that you can make an NPC entirely with Content Patcher, but if you're doing C# for learning sake or maybe bc the NPC is just one part of it, you can also decompile the game and look up fields like that and often times they will have comments attached to explain them
it can help wit hthe certainty. if the comments exist (for data assets like that, its usually the case)
/// <summary>A game state query which indicates whether the spouse will ask to have children. Defaults to true.</summary>
this is the comment for SpouseWantsChildren for example
you're kidding. Ive been learning C# for days. 😭
it's what the wiki told me to do!
!npc
Keep in mind that making NPCs is a complex process that requires learning many different aspects of Stardew modding.
Here are a few links that can help get you started on all that you need to know:
-
Tiakall has a great tutorial on making a custom NPC for 1.6.
-
NPCs no longer use dispositions, check the wiki page for the new NPC data.
-
Aviroen has put together a template that will allow you to easily create a romanceable NPC.
-
Feel free to jump into the https://discord.com/channels/137344473976799233/1277457201077813280 thread for more interactive feedback and help!
-
Fireredlily has a WIP NPC Builder Please do report any errors you get with it into the NPC thread!
the wiki doesnt really recommend any specific path to doing something unless its the entire point of a page (i.e. C# API stuff) as far as i know
the wiki has links to both C# and content modding
it does generally try to be method agnostic though and not mention CP specifically not bc you shouldnt but bc its just a general wiki and not a Content Patcher wiki
it says NPC's will no longer use dispositions, but I've been checking other NPC mods I have (to compare) and their folders are all called dispositions?
and work?
if its a pre-1.6 mod, then content patcher migrates them automatically
if its a post-1.6 mod, they probably just named it Disposition but actually are using the new format internally
thw name of the file or folder matters not at all
i see
specifically, NPCs no longer use a data asset called Data/NPCDispositions
all character data is now in a much more user friendly Data/Characters
which is what that page is warning about

rest assured i was not exaggerating or bein sarcastic when i said people here are very friendly and like helping, its a very very chill community here
looots of beginners pop in all the time
so if you ever have any other questions or uncertainties feel free to just chime in whenever o7
I understand, I just don't want to be someone who uses people just for their coding knowledge. I feel like people should be paid for their time to do that.
many people in here who offer help are actually paid for that but volunteer their time here anyway for fun
usually when theyre not being nerds about laptops in #programmers-off-topic
I've actually always wanted to code, but never found the willpower to do it. (I took some class in middle school and was quickly burned out) This is a mod I really want and looked like maybe a good starting place.
if it helps, if you feel like you've been making good C# progress, i definitely encourage you to continue! most NPCs are made mostly with Content Patcher even by people who know C#, but there are still limits to Content Patcher's usefulness and if you ever wanna do something rather customized for your NPC specifically, C# will be needed to supplement the CP part
you can leave the bulk of the work to Content Patcher where it's easy to just write jsons and do the fancy custom stuff in a C# component loaded at the same time
so itd be useful knowledge to have (and ofc goes beyond stardew too)
A big 1.6 improvement is easier content and code (c#) integration
Is there an equivalent for "HasFile:{{FromFile}}": true, that would work with OutfitID (for Fashion Sense Outfits)? Here is part of the code I'm working with:
{
"LogName": "Portrait Seasonal Weather",
"Action": "EditData",
"Target": "nihilistzsche.FashionSenseOutfits/Outfits",
"Fields": { "RequestedOutfit": {
"OutfitID": "{{Season}}_Rain_{{IndoorVariant}}"
}
},
"Update": "OnDayStart,OnLocationChange",
"When": {
"Weather":"rain, storm, GreenRain"
}
},
I want the code to only go through when the OutfitID exists, like I can do for files using HasFile. (And when the weather is storm, rain, or green rain, of course, but that's already there and working)
Because this is integration with fashion sense internals, only fashion sense can provide a token for you to do this
Technically fashion sense outfits could too
Okay, thanks!
So I figured I could just copy the code used in another file and edit the language to suit my needs, but it's telling me that multiple copies of the file are trying to be loaded, even though I edited the language?
Language?
Im not sure how to make a json file without copying and pasting on my windows computer
yeah, like instead of using "Name1" I insert "Name2"
!startmodding
Making mods can be broadly divided into two categories:
- Content packs are formatted text files, and don't need any programming knowledge. They can add/edit NPCs, maps, new items, shops, and more. To get started, see the list of framework mods, the wiki tutorial for Content Patcher, and there might be relevant guides on the tutorial wiki.
- C# mods use programming code to change fundamental game mechanics. See getting started with C# modding.
Usually it’s easier to start with making content packs, since you don't need to learn programming.
Have you looked at the content patcher tutorial?
Is it a video or text? I've honestly been all over the place
It's a wiki page, linked in the command above
I think that was mentioned above, I'll seek it out, thank you.
We don't recommend any video tutorials here, they tend to be outdated
Plus you can't copy paste
right so in every link it leads me to, it tells me to create a .json file
I have no idea how
when I choose text file and try to name it .json, nothing happens
have file name extensions visible under the view option, then you can actually rename it to a json
i see!! Thank you!!
it is now saying my manifest isn't valid when I followed the exact format shown on the wiki
I even validated it on a website meant to validate .json
it says everything is alright
I used this format, and changed everything to match.
except update keys, since I'm not uploading it (It said it wasn't necessary)
!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.
I'm proud of myself for managing to figure out what was going wrong with my FSO mod- outfits only changed when the seasons changed. But I don't understand why it's doing that... 
"Format": "2.0.0",
//DYNAMIC TOKENS
"DynamicTokens": [
{
"Name": "IndoorVariant",
"Value": "Indoor"
},
{
"Name": "IndoorVariant",
"Value": "Outdoor",
"When": {
"IsOutdoors": "true"
}
}
],
//Changes
"Changes": [
{
"LogName": "Portrait Seasonal",
"Action": "EditData",
"Target": "nihilistzsche.FashionSenseOutfits/Outfits",
"Fields": { "RequestedOutfit": {
"OutfitID": "{{Season}}_default"
}
},
"Update": "OnDayStart,OnLocationChange,OnTimeChange",
"When": {
"Season": "{{Season}}"
}
}
]
}```
I think it must be something to do with the When section but I'm not sure *why*! Shouldn't that just make sure that the Spring_Default outfit only gets used in Spring and so on? That worked just fine when I made my Wizard replacement.
well its not letting me paste it into there eheh
i tried choosing file too
nothing
does it think the file is empty for some reason?
i think it thinks the file is completely empty but i cant for the life of me figure out why
Do you have the file open in a text editor of some sort? Were you copy-pasting by clicking on the file itself or copy-pasting the text from your editor to the website?
(Also, might be a dumb question but are you 100% sure you saved your file after making edits?)
im not 100% sure i understand what the issue is but all that When condition is doing is making the patch apply when, essentially, 1 = 1. and 1 is always equal to 1. the when condition is doing nothing
when its Spring you're asking it if the Season is Spring and if so, apply the patch
when it becomes summer, you then ask it if Summer is equal to Summer
and so on
yes but every time i try to close it the entire system crashes
Also I'm pretty sure Season doesn't change when every 10 minutes or on location change (no need for 'Update')
with mods, its theoretically possible
Oooooohhhhhh, that's really obvious now.... My intent was for it to be comparing whether the current season matched the season in the OutfitID
but i would still say its unecessary
the season in the OutfitId is always going to be updated every season too
important to remember that with When conditions, the outer braces are removed, but it is still a token
Sorry, this is beyond my realm of knowledge. I have no clue how closing the file would lead to the system crashing.
Anyone know how to properly make an XNB mod in 1.6?
please do not
unless you are switch modding
but if you really must then i dont believe its any different than xnb modding pre-1.6
Yep
in that case you have my sympathies
Can't seem to get any of the tools to work with FarmAnimals.xnb
i think I figured it out. For some reason it thought the file was empty because I had so many different versions of it opened simultaneously, and kept saving those...oops.
great... Welp at least I have some free time now
it works now! says its loading in.
heeeyyyy...could someone help me with the json file stuff to make a seasonal retexture for sprinklers if its possible cause ive tried with what i could research but im struggling..
what have you got so far?
well its only partially done so im just trying to test one of the aspects which is making a seasonal retexture for the basic sprinkler and while using the json validator this is what came up from it
sorry if the mistake is dumb or anything i havent done this before and im uncertain on what im doing besides trying to follow the instructions the best i can
૮꒰◞ ˕ ◟ ྀི꒱ა
https://smapi.io/json/content-patcher/76cd37a24be5496daf59619351bf3dd8
in this case, all you've forgotten is a } that goes between line 7 and 8 here. you opened your patch with a { on line 4, so there must be a matching } to close it after the patch
(very common mistake for people new to json, so not a dumb mistake at all!)
(also not too uncmmon for people who arent new to json)
ohh ok! i didnt know that since i was copying the examples directly off the content patcher guider :]
probably just accidentally forgot to highlight the last line of an example, if i had to guess. or just deleted a bit too much
but placing that brace/bracket/whatever you wanna call it should let the patch run and load your asset every season to edit on top of springobjects
assuming you have a spring_Sprinkler.png, summer_Sprinkler.png, etc inside the Assets folder
i want to go about making animated portraits, but i want to use the cute seasonal sprites by poltergiester. They said in posts to dm them on discord by contacting them, so if i wanna ask permission to use their designs, do i just...add them as a friend? Or is there like a server I should connect to them through....?
why do i seem to always unalive this server when i enter lmao
in my case its bc i was checking the mod page and the permissions section and poltergeister's profile say you can use their designs without needing to contact them so long as you follow their permissions (no AI, credit them, no paywalls)
ah im just impatient got it lol mb thank you ❤️
however bear in mind that not every asset in Seasonal Cute is drawn by Poltergeister, but the credits section lists who made what
if it was not made by Poltergeist then you should look there to ask permission from whoever created it
(though if you do actually mean just the sprites and no portraits then those apparently were all made by poltergeister, so you're fine there)
yeah, i saw that, i dont even know for sure if this want to make is going to like become anything, but just in case i magically end up following through on a project for once in my life i wanted to know...im not using their sprites directly either, just like the outfits
<not a lawyer> thats probably fine then </not a lawyer>
lmao when in doubt i put "credit to __ __ for ____" in big bold letters at the top of page and hope thats good enough not to get sued
when it comes to independent creators and not huge megacorps i would change that to "when in doubt dont do it"
but i dont personally have doubt here
I'd be a lot more concerned if i was copying or using them directly like pixel for pixel
besides, like i said, idk if itll even get done enough or be good enough to get posted so i might not even need to worry
You should always get permission first even if the mod says it allows you to use their assets without permission. I had read permissions before and was fine to use some assets, then was requested to remove my mod afterwards, and the permission of the original mod was updated afterwards.
hey, any mappers know how the summit gets its parallax background, and how someone would do that for a map? nothing special shows up in Tiled for loading that background, so i'm curious now
hardcoded, however we have our savior in the form of MMAP
so i guess it has to be painted on manually then
well without MMAP it wont be parallax
i ran into another issue this time with image sizing
it originally said that it was to big and that cp only extends downwards or something i dont remember what it said exactly..?? so i decided to do the x y widtch height dimensions in the content json just like how i saw someone else do it and now..its kinda invisible(if needed i can provide the dimensions i wrote aswell as provide the image itself im using)
it doesnt have to be parallax, i just. wanted the background, really
wanted to know how it was loaded* correction
@outer glacier
what does resetVariable do?
unfortunately, being the only parallax background map, it's completely hardcoded and has no properties or settings to use the same background or similar effect in other maps
islandnorth?
silence
as for how it's loaded, the assets are pretty much all available already in Cursors and Clouds iirc, just it's assembled like papercraft at runtime
Like the rest of the game
say that's a good point though、i think the two are still hardcoded since the summit was added, but with a flag or two for summit adjustments in the same class?
really need to check the code out when im home
(ty for reports!)
in Background.cs there's a public Background(Summit location) method and then theres a generic one
hm hm.
DrawParallaxHorizon is in the IslandLocation.cs though
but yeah. very much hardcoded nodnod
iirc that's for the sea drawing behaviour, while the summit uses mountains
ahhh
Does anyone know of any way I could check whether an OutfitID from Fashion Sense Outfits exists?
I can target the "nihilistzsche.FashionSenseOutfits/Outfits" endpoint to make the farmer wear an outfit. And I can use the {{nihilistzsche.FashionSenseOutfits/CurrentOutfit}} token to check which outfit is currently equipped. But I really need some sort of way to check, for example, whether "Spring_Rain" is an outfit that exists and I can't figure out how to do that.
(And there's the github link, since I just discovered via getting timed out that embedded links aren't allowed, lol.)
masked links are allowed at a higher level than cowpoke, but i forget which one
anyway, if you're using Content Patcher, i don't think there's a way to do this unless fashion sense outfits provides a token you can check (i am guessing it does not do this)
for example, if it had a token called {{nihilistzsche.FashionSenseOutfits/AllOutfits}}, you could check if an outfit existed by using |contains
if you are in C#, you can load the asset and check its contents directly. but CP does not expose this sort of feature, i believe
Thanks! I had a feeling that would be the case since someone said the same thing to a kinda similar question I had earlier. But I had to ask just in case. I appreciate your help.
how do i get these photos not to be so blurry when i send myself the unpacked file :(?
It could be the image viewer you're using. A lot of them use interpolation to smooth things out when you zoom in, but it makes pixel art look blurry.
'send yourself'? how are you trying to currently?
i put the pics in google drive & tried emailing myself it
from pc to my phone so i can use it as a reference in procreate
make sure you email as an attachment, rather than embedding inline, since gmail (if you use it) may compress the image if it's in the email itself
i assume you're saving it as PNG?
yeah i am
the best solution ofc would be to tether your phone and pc via usb and drop the image on manually
that way you're not using any online hosting service that might compress the image when saving it on their end
but also as million+1 said your phone viewer might also just be upscaling it weird in the preview
If you're on android you could download Pixel Image Viewer from the app store and see if it looks the way it's supposed to when you open the image with that.
I have an idea that might be brilliant or might be terrible! I recalled someone using Fashion Sense Outfit's ability to share outfits between saves in order to export a bunch at once because it does that by creating a .json with all the information about the outfits. I found that json and, sure enough, it has the names of the outfits in there.
I still need to figure out how I can search that json for the names as part of my code. And requiring all the outfits to be shared between saves is a real janky workaround. But I still find it preferable to listing literally every possible outfit one by one in my content file so that it properly switches between them.
you cannot search that json for names with Content Patcher
NOooooooo 
Why must reality vex me so!
But I guess that answers whether it's a brilliant or terrible idea, lol
yay
New quote added by atravita as #6390 (https://discordapp.com/channels/137344473976799233/156109690059751424/1366881746913853492)
how do i unpack other mod files? i want to see sve's files for inspo
Spaces after commas don't affect lists of tokens, right? "wedding, dance of the moonlight jellies, egg festival" would work just as well as "wedding,dance of the moonlight jellies,egg festival"
You don't need to unpack anything
But also I wouldn't say SVE is the best place to get inspiration from code wise 😅
just like how custom npcs are made and stuff
if you want to know how NPCs are made I'd even less recommend sve
it doesn't follow some best practices because it was made before they were best practices
also SVE has a lot of other stuff besides NPCs, maybe looking at a standalone NPC would be a better example
Nope, any space around the commas is trimmed automatically.
@ivory plume do I have to list JsonAssets as a dependency of my mod to use MigrateIds if I'm migrating from JsonAssets items to CP?
Nope.
[Content Patcher] Ignored (CP) Walk to the Desert Redux > EditData Data/ObjectInformation: Entries > '{{spacechase0.JsonAssets/ObjectId:Old Coin}}' key is invalid: '{{spacechase0.JsonAssets/ObjectId:Old Coin}}' can't be used because it's provided by Json Assets (ID: spacechase0.JsonAssets), but (CP) Walk to the Desert Redux doesn't list it as a dependency and the patch doesn't have an immutable HasMod condition for that mod.
Someone reported this to me.
It looks like you're still using Json Assets in your content pack? You'd normally convert the items to Content Patcher, use standard item IDs, and the only reference to the old Json Assets IDs would be in the MigrateIds trigger action to map them to the new item IDs.
Well, my current version I'm writing doesn't use it, I can't remember if the old version they're using (1.3.3) does or not, but I don't think it had JA anymore.
Which is why that version has MigrateIds in it.
The error says there's an EditData patch editing Data/ObjectInformation (the pre-1.6 asset name) which has a key named {{spacechase0.JsonAssets/ObjectId:Old Coin}}.
Yeah, for that version of the mod, it doesn't have anything like that.
Looks like they have an old version of the mod then?
ok thx! are there any good npcs you would recommend for me to look at the code? i have no idea where to start so i was thinking looking at code that works could help me fix things when i run into stuff
They would have to be using 1.3.3, because 1.3.2 was still using JA afaik.
I'm not familiar with the mod, but all I know is that whatever version they have is still editing Data/ObjectInformation with Json Assets tokens.
Oh yeah, VSCode still doesn't like the way this is done apparently.
I have "$schema": "https://smapi.io/schemas/content-patcher.json", defined at the top of my content.json file.
Technically single-quoted strings aren't valid in JSON, but SMAPI and Content Patcher use a less strict parser that allows them. (The schema only controls the field structure, not the allowed JSON syntax.)
just use double quotes " and escape them inside your string with \"
(Or use single quotes if you don't mind VS Code yelling at you.)
you can colour any item if you put in the work for it
there's at least 2 mods that do it
I think this is too many flowers.
This would be perfect if they were worth $1 each.
I have no buffs currently on my player.
I'm not sure why its doing this.
your ExtraHarvestChance is 1
and HarvestMaxIncreasePerFarmingLevel being 5 is a large number
I didn't even notice that.
Well, I used the values Tarniyar used back when she maintained it.
I guess I'll need to fiddle with them.
see https://stardewvalleywiki.com/Modding:Crop_data for what those values mean
I know what they mean, I just forgot that they were there.
Harvest(Min/Max)Stack is before the extra harvest / max increase per level applies
Hadn't edited this file in a few months.
Okay cool, I only get one at a time, except a very rare chance that they multiply for skills.
I did the thing! I got my Fashion Sense Outfit mod working for seasons, weather, and festivals and I did NOT end up resorting to listing every single option as its own entry in the content.json! I needed to take a step back, think a little harder about my combination of tokens and "when" conditions, and continue to test it out like 1000 times. (Thank goodness for CJB cheats!)
This isn't a question but.... I've been fighting this code for hours... Only to realize ELLIOTT IS ELLIOTT. Not Elliot. I hate dyslexia so much 😭😭 My soul just left my body like 6 times over
I never in my life have been so mad, joyous, and despairing to have something work...
To sell crafting recipes, are they just called as Objects (O)? And I'm assuming the names of the CraftingRecipe or CookingRecipe doesn't matter?
there is a IsRecipe: bool field for the shop entry
When did they add that? I don't see that in the documentation on the wiki.
1.6 at least, and I can't even remember what 1.5 looked like anymore
(IsRecipe is a generic item spawn field; see this link from Modding:Shops.)
How do you get a frying pan for loveofcooking?
you want #modded-stardew 😉
If it makes you feel any better, everyone makes that mistake
I had it in a mod title and everything 
Thanks. 😭 Tryna convince myself it wasn't fully wasted time. I learned a lot about GSQs and dynamic tokens while trying to make a whole system to "fix" a problem that didn't even exist.
Elliot is a valid spelling so it throws people right off
one of those Katherine/Catherine kind of things
😔 i pride myself on remembering the spelling of his name the first time
though Elliot is one of those name pits where there's Elliot, Eliott, Elliott, Eliot, and even Elyot
I wondered what the most common spelling was and fell into a real Google hole
Hey anyone here familiar with making mods? (jsonassets or c# doesn't matter), i really need someone to help me on something :((
I would really love it if anyone could just give me a guideline on how to use jsonassets, i can't find a single tutorial, and the wiki seems outdated somehow?
I just want to add boots
and I want it to be at the adventurer's guild
anyone knows how to do that?
JA wiki seems outdated, because JA is outdated
you shouldn't really be using json assets anymore
youll want to be using Content Patcher instead
Edit Data/Boots to add the boots, edit Data/Shops to sell them at the AG.
oh
do you happen to have an idea or a tutorial on how i can do it with content patcher?
Here's the getting started guide for using CP. But the links I already gave you were related to doing it with Content Patcher. You use CP's EditData action to edit both assets - which you can learn how to do by following the guide I am linking in this message :)
It won't give you a step by step guide for the specifics of boots and shops - I don't think we have any - but you should be able to look at a mod that adds boots via CP to the game to see an example of that, and any mod that adds items to a shop via CP will give you an example of how to add things to shops.
what abt the ag?
Adventurer's Guild? That's the shop part linked above
Yeah, it's just one of the shops.
i thought that was the JA link
JA is not part of the equation here, its a legacy framework that is only used by mods that havent been updated to Content Patcher
I did not give you any links relating to JA at all. I did not at any point suggest you use JA. Sorry for not being more clear about that! Everything that I have said to you and linked for you is for doing this in CP.
okay thanks a lot
hey so this is a bit confusing
anyone knows how i can make it like a specific price
i want it to buy 5000g, and have +8 immunity +8 defense
if you set a specific Price in the Data/Shops entry, it'll overwrite the base calculated price
the price in the weapon data will affect how much it can be resold for though by the player, if that matters to you
er, boots data
not weapon
Data/shops also gets changed in like content.json
If you add a patch editing it, yes.
Like I said, download a mod that adds things to shops so you have an example to follow :)
You can always ask in here for help with specifics too, or to be pointed to other resources :)
yes thanks, i'll try to first do it myself but if i find an obstacle i'll ask, thanks again
@analog flower hello
@copper kestrel Hello World, do you have a plan fix bug mod Sunberry Village?
just fyi, it is helpful to describe the specific bugs you are having with the mod 🙂 saying that the mod is simply bugged in some way does not really help the devs in figuring out what they can do to help you.
I believe this is about Android compat
Atra said something about contacting sophie last time, iirc
I'm assuming you're referring to this. Yes, I'm aware of the issue and will implement a fix.
thanks god🙏
Hello everyone, is there a way to create a custom letter using Content Patcher?
I’d like to do it directly with Content Patcher without installing any additional mods, since I only need to add a single letter.
yep thats definitely possible
https://stardewvalleywiki.com/Modding:Mail_data this page has the basics of it, and you can look at other mods that have letters for examples (im certain most if not all expansions have their own mail)
I want to replace a vanilla function with my own function (to be specific, LetterViewerMenu.HandleActionCommand with an optimized version). How would I best do this? I'm seeing stuff about harmony patches, but those seem to be a) prefix/postfix [where I'm adding things that's also running and not necessarily overwriting it {and even if I do I still can't return a string like it wants? I think?}] or b) direct IL instructions which seems way harder than necessary
(The goal is to make it so that way that section of code runs way faster, as while the current method is fine for normal usecases it has O(n^2) performance when it could be O(n) performance on a rewrite; and the things I'm doing involve giving it huge inputs. so I want to optimize it to allow me to do other cool stuff)
I could also replace the line of code which calls HandleActionCommand [it is only called in one place] with code that calls my custom function I suppose?
you can do a skipping harmony prefix, it will run your code and skip the original
do run benchmarks and make sure your version is faster though, and your approach may have implications for mod compat, though I'm not sure if any mod on the market currently would be affected
(what are you trying to do?)
A skipping prefix is definitely bad for mod compat
(that needs that level of nesting in letters)
I've made games like tic tac toe and connect 4 in the mail
works vanilla, but I run into performance issues
my point is to make a mod which assists me in doing something that works in vanilla
hmm, and how does the player play out those games via mail
maybe you can just define your own single action and run that instead
I want to work under vanilla restrictions - all I want is to be able to have the same thing that vanilla does run faster
If you are in C# anyways why not just make your own IClickableMenu that looks letter like
I enter code into the game by using the fact that mails include your name and your name can have executable code - if you're a girl and you name yourself the attached file, you can run connect 4. this specific code is actually for multiplayer connect 4.
note you must be in the chinese language to copy paste this
I'm dealing with mails that are hundred of thousand if not millions of characters long
The problem is that vanilla code runs
mail = mail.Substring(0, startItemIndex) + mail.Substring(startItemIndex + substring.Length);
which means for every command it performs string operations on its entirety
when I would much rather have a string builder approach of all the text that isn't in the mail
(affectionate)
Well i mean i don't think patching mail to make this work performantly is that bad cus you are just have fun™️
But doesn't it defeat purpose of this kind of thing?
I mean saying "this code would take 20 minutes [I've tried to run something which took 20 minutes] to execute in vanilla but it's instant because of an optimizing mod" is still cool
And yeah this mod is primarily for my own messing around and having fun [and for anybody interested in the same thing], not for general consumption because of how incredibly niche the usecase is
Harmony is a framework for patching .NET code, allowing you to take any portion of the game's logic and insert or substitute your own. This gives you more flexibility and control than SMAPI helpers and events, at the cost of being typically more complex and difficult to use safely and correctly, and more likely to break with a future update of the game and/or SMAPI.
If you are trying to do something that isn't possible or practical with SMAPI alone, then Harmony is usually the solution.
For more information, refer to the following:
- Harmony Modder Guide - Intro, Use Cases, Initial Setup
- Tutorial: Harmony Patching - Types of patches and code examples
- Decompiling Stardew Valley - For finding methods to patch
But it needs to return a string
here's some guides for how2 harmony
Is this just "dig deeper into harmony"?
ah thank you then
your other idea of just replacing the method call would also work and is a similar level of effort as the skipping prefix
Harmony's got you covered
who is giving the inputs tho
(I've played around with the reference items [and in this screenshot bears won a 4 in a row, this is an older version where the item changed instead of getting iridium quality]) you read a book to place a square in that column
so in that image you would read Book_Grass to place a junimo hat in column 6
can be played multiplayer between two people each controlling one color
i still have kind of no idea how it works and opening that file you sent is a bit dizzying, but this seems fucked up in the best way and I love it, please keep it up
yep! you can only copy paste names that are maximally wide so there needs to be gendered switch blocks "hiding" newlines
this is the same code but without the newlines and without the automatic variable renaming
and this is the higher level language I actually programmed in
(I recognize that I could be using If Any and commas more to remove some of the nulls and make this slightly more optimized but that's a future me thing)
i do wonder if your bottleneck is mail parsing vs just sheer amount of actions happening
I have snake, bubble sort, tic tac toe, and connect 4
The performance is clearly n^2, and the amount of actions is n
Note that every command has two tasks:
The task it must do (consider this O(1))
Perform a string operation on a million character long string [or really O(n) long string]
When I implemented my own mail reading without the million character long string operation, it runs way faster [just as a standalone java thing]
oh i see my misunderstanding
each reading of mail is just to check board state?
not to actually start the game somehow
every time you read the mail the board state updates and shows you the board
yeah
I doubt I can post links/videos? But I can send a recording of my snake game, which has 20 second execution time that I cut out of the video
you are allowed embeds in this channel even if you aren't cyan yet
ah lovely. https://www.youtube.com/watch?v=pwy5GweArkM
This is a fully functioning game of snake, made entirely inside of stardew valley. The video doesn't show it, but you can die if you run into yourself.
ignore the cringe alexa knows all please I haven't bothered rerecording it
it is also possible to run into yourself and then you do die, which this forgets to show
this is amazingly cursed im glad you shared it with us
you are the spiders georg of when we tell people "the performance implications of what you're doing are negligible, you arent doing thousands of things needed to worry" (complimentary)
yeah no no gripes towards CA for making this code run in O(n^2) but I specifically need it to be O(n) lol
oh right I also need to optimize gender switch blocks I forgot
but also oh my lord it's so smooth and so good
so glad I decided to do this
Anyone know where the texture of flute block is? I can't find it in Craftables.png or furniture.png 
Many thanks!! Finally I find it
Made a custom barn animal that's more or less a copy of a pig, and for some reason it has an emote bubble over its head that shows what it's going to dig up that day. Can't seem to figure out why it's showing this bubble, but I'd like to get rid of that. Can anyone help me turn off that bubble?
https://smapi.io/json/none/c2223e3913e74b66b86c98c75d343883
This is the bubble it's showing, for the record
Do you have a mod which does that for regular pigs?
Nope. Normal pigs are unaffected. It's only my custom animal.
I do have that. Let me turn it off and check.
I assume you mean UI Info Suite? Just checking
UI Info Suite hardcodes the truffle check
instead of DigUp
(I should send a PR...)
Oh, it sure did. Turned off uiis2, and the bubble's gone.
Well that's mildly inconvenient lol. I like uiis2, but that bubble is distracting as all hell. Oh well.
(though given that UUIS2 is in the mids of the Great Rewrite maybe I should just ping them instead)
Well poo, this whole time I was combing my mod's files trying to figure out what was causing it. Guess that's two hours wasted lol
Okay so I took snake (1.1 million characters before gendering, 1.6 million characters after gendering) and running it on vanilla it takes my machine about 100 seconds to run and on modded it takes 1 second to run
I think I like this 100x speed boost
@next plaza Hi casey you might recall this issue with spacecore equipmentmenu locking up the game if player opened it while inventory is full and had another item on their cursor (i.e. having item in cursor and then picking up another item on the floor)
I was thinking of opening a PR to help avoid this situation and the easiest change is to just set AllowExitWithHeldItem = true;, do you have any opinions about this?
Is it possible to add tile animation using EditMap? I'm trying to move Abigail's pet.
yes but you need a tmx
So that would mean editing the whole map rather than just a small patch?
no its a small tmx
Oh okay
I'll take a look, thank you!
https://www.nexusmods.com/stardewvalley/mods/18177
Hi, I want to change the portrait of this mod using Portraiture, but it doesn’t apply the change. Is there anything I need to do besides the steps mentioned in Portraiture’s description?
your portrait is named wrong, or in the wrong place, or etc.
what did you do specifically?
-
I create the folder in Mods/Portraiture/Portraits
-
I place the portrait inside that folder (in this case, named Hat Mouse Lacey).
-
I rename the PNG to match the portrait I want to replace — in this case, it's portraits_nouveau_default.
-
I start the game, and when the dialogue box appears, I press P to choose the portrait set and select Hat Mouse Lacey.
Shouldnt you name the pngs after the npc's internal id
What do you mean by the NPC’s internal ID? Looking at other mods that use Portraiture, I only see that the images have a normal name, which just needs to match the images being replaced.
it just so happens that the vanilla npcs have internal IDs that match their normal names
many custom NPCs do not
also what a CP mod names its pngs have no bearing on what the pngs will be loaded into
Are you referring to this kind of example, where the image names seem to include the mod’s ID in their name? This example is from a friend’s mod that uses Portraiture and lists Portraiture as a dependency in order to work.
yes, though not every NPC mod follows the mod id convention
you need to see what Lacey's ID is in Data/Characters, and use that ID
ok, thamks
btw my firend´s mod is using Portraiture Plus, too
Portraiture Plus adds some more variants/syntax (seasonal, etc.)
what I said still applies
yes, however next you need to see what {{Lacey}} resolves to, it should be in content.json
I have no idea what I’m supposed to look for, haha. That’s the content.json.
in the dynamic tokens field Lacey gets defined as {{ModId}}_Lacey
change {{ModId}} to the actual mod id and you should get the final value
This? "UniqueID": "ichortower.HatMouseLacey",
how do you make a GSQ check for the state of a dynamic token? like i want the condition to be active for whenever a token has a value of true
It's kinda funny seeing how SVE still uses such a roundabout way to use a temp item in an event... by changing the soda machine into it 
just that token as is I think, assuming it can either be True or False
It didn’t work. I renamed the file by adding the ID at the beginning, and still nothing. Oh well, I guess it just can’t be done.
what's your final png name
like so?
yeah that should work
thank you!
cursed
They do exactly what I described, so you probably made a typo in the png name
(also ew ai)
oh im going to have to remove that link then 
@valid folio hello i deleted your message containing the link to that mod because it features AI. Please keep in mind we dont allow those in the server!
that's why I asked you what you named the png
In theory, I didn’t make a typo because I copy and pasted, but just to be sure, I’m going to check how that modder did it. Maybe there’s something I overlooked.
Okay, no problem, I didn’t know that.
Makes me want to really hop on Tia's suggestion and rip Lance from SVE (and rewrite the whole code) 😅
That’s how I named the PNG, but I haven’t checked the other mod yet.
ichortower.HatMouseLacey_portraits_nouveau_default.png
there is something satisfying about optimizing code
Oh definitely
Just the ID
ichortower.HatMouseLacey_Lacey.png
recall my post earlier
{{Lacey}} -> {{ModId}}_Lacey -> ichortower.HatMouseLacey_Lacey
And how does the system know which portrait to use according to the season?
by default it will use that same portrait for all 4 seasons
seasonal variations would use portraiture plus
ok thanks
Not my code, but does anyone know why the check here https://github.com/Videogamers0/SDV-CombineMachines/blob/5b9dffe2bb602297188f78eb85a00940f9323d23/CombineMachines/Patches/DrawPatches.cs#L119 isn't true for modded machines? Afaict the only things it really checks are that they're the same machine and GetMachineData() isn't null, which is true. Or is it that modded machines just won't hit this postfix in the first place?
"Combine Machines" mod for Stardew Valley. Allows combining multiple copies of the same machine into a single copy with better processing power. https://www.nexusmods.com/stardewv...
"Combine Machines" mod for Stardew Valley. Allows combining multiple copies of the same machine into a single copy with better processing power. https://www.nexusmods.com/stardewv...
Looks like that mod is made pre-1.6 and assumes that parent sheet index is the canonical item id
they hardcoded a list of em
it'd need a rewrite to switch to proper item ids
and 1.6 machine data to support modded machines
I said this before but this is why I'm wary of 1.5 mod that got updated a little too quick for 1.6
Stupid question, what is a parent sheet index? I thought it was basically just the position of the sprite in the png file the sprite comes from
which now that i think about more, my definition doesnt really make sense cuz youd probably need two numbers?
yes, but custom objects can use their own sprite sheet now
so they can be index 0 in their own sheet, while be a different item from the item that uses index 0 in the vanilla sheet
item ids is now the canonical unique identifier for objects
doesn't that mean the check is too broad? Like more things would return true than they should
the best way to check whether an item is a machine is to look at the keys of Data/Machines
previously in 1.5 all machines were hardcoded
I thought that section where they hardcoded the machines was guarded by LEGACY_CODE? I guess I don't have a way to know if it was set in the version that was released
Question! I'm trying to follow good coding habits and make sure to comment in certain areas. Is there any times I should avoid using comments I should watch out for? My understanding is they're ignored by the system, they're just for clarity of looking through your work
the non-legacy version belows still checks NonBigCraftableMachineIds.Contains(Item.ParentSheetIndex)
that check can just be deleted
and migrate every other usages of ParentSheetIndex to item ids
if someone might ask themselves what your code does or why it exists, a comment is helpful. this someone may be a future you
dont do this:
x = x + 1 // Adds 1 to x
a good rule is document "why", not "what"
if you find yourself needing to comment "what", that's a good sign to use more descriptive variable names
or less ternary operations
Very fair 😂 I guess my worry as a noob is that the comment itself could cause errors so I'm wondering if there's any situations where it could do so (Like excluding situations where it's just not formatted properly as a comment)
But it's an or? Are you talking about line 211 or should I be looking somewhere else
Just to be sure... tokens also handle multi line values, right? 
comments cant cause errors
yeah it is, hmm
important clarification: comments CAN cause errors, but not with SMAPI or the json parser it uses
dont put comments in json in use in non-stardew things unless you're sure they wont cause an error
bc comments are not typically allowed in json
out of curiosity what modded machine is this?
I only checked the heavy duty hive from honey extend https://www.nexusmods.com/stardewvalley/mods/26321 but based on the comments on nexus for combine machines, I assume cornucopia also doesn't work
That makes sense why my Visual Code Studio is so mad at them existing. Thank you everyone for clarifying. I'm still very early in learning so I want to make sure I'm not creating further problems for myself. I was paranoid it was what caused my trigger actions to be wonky.
maybe they compiled in legacy mode? I admit I've been doing all this on my phone lol
are you sure that check is the one that's tripped
if you already have the source downloaded you can try compiling it yourself with debug lines
you can change your Visual Studio Code to treat your json files as jsonc files so it'll stop yelling at you about comments
The ones in the trigger action section are redundant anyways. Now I just will keep them in the context json by the include action. Also appreciate the tip about why, not what. Will help trim the fat and keep them more useful.
you can do this by <insert process here. i dont know it. google probably does or someone else here>
!vscodejsonc
Thank you! And no worries I'm going to google it. I try to never ask questions until I've looked a good while myself. Ya'll are very helpful already, I don't want to waste your time
!vscjsonc
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.
Oh nice. I love that there's a command for that
It´s done! Thanks 😁
I never really understood what $schema actually does 
VSC has no idea what the structure of your json is supposed to look like bc how the hell does it know what Content Patcher expects you to write
the schema tells VSC what the hell content patcher expects you to write
e.g. it means VSC can now tell you "you cant put a FromFile on an EditData, silly"
(actually it might not be able to do that, but it can tell you that you cant put "Actions" instead of "Action". it MIGHT be able to do the above but idk i havent tested or ever used it)
it can tell u that yea
but it doesnt know anything about the structure of what you are editing ofc
just need someone to write schemas for every single vanilla asset 
Quick question; do you know of any tilesheets with a Halloween or horror style? Is there anything like that on Nexus for Stardew Valley?
Ah, that makes sense
I have most of the format templated into snippets, so I never really needed it I guess 😅
There's no other way to "fade in/out" an NPC aside from having 20 frames with descending opacity in the sheet, right? 
i dont think you need… 20, per se lol
but unfortunately yeah i think anything like that is limited to doing it yourself. no fancy event code for it
altho i kind of need that too now that i think about it 😐
Well.. yeah
But I'm either sticking to Lance's sheet or finding a way to don't use any additional frames 😅
could always just do a tempactor to not add to your own spritesheet ╮( ̄▽ ̄””)╭
I'm also curious why SVE used showFrame instead of animate
Unless it wasn't a thing before
no animate was def a thing
So it's another of Just SVE Things™
If someone is able to, could you look over this code and tell me why it would return an ErrorItem instead of the intended result? I thought I was doing it right, but I've yet to get the intended result of "put herring in preserves jar, get Surstromming". https://smapi.io/json/none/4154f8f5ae9a44d6b4ecb2f94bb3cffd
is it just an error texture but with all the correct properties of your surstromming?
Oh, temporaryAnimatedSprite has a fade field
Would be nice if it was a temp sprite
make it a teeeeemp actorrrrrr ;) ;) ;) ;)
fulfill your destiny
i dont know much about machines at all, but maybe try adding an (O) to the front of your ItemId in outputitem?
I'd definitely go that route if I made it from scratch (or made Lance a standalone NPC eventually), I don't care enough to change it for now 
Sadly, this didn't work. It actually broke it even more; the error item isn't even being made lol.
No no no... (yet, maybe)
Just fixing the fade animation for Lannah (since the sheet is a bit different)
unfortunately then i cannot help with machines as they are like mystery black boxes to me still as ive never worked with em
Yeah, they're a pain in the butt. Oh well. Back to bashing my head on the keyboard until it works/I give up lol
huh.. it's not outputting it if you put an O in front?
(make sure its an O and not a zero)
^
O for object, yeah. That's what I did, but the result is still unfortunate.
when you say it outputs an error item, does it say it's the name of the object but not have a texture or is it fully just 'error item'
Error Item (Campaigner.surstromming) with the description ???
It might be a texture issue then
I don't think it is. Last time I had a texture error with another item, the item was created just fine but with the red circle instead. I think the item itself is just broken somehow.
could you send a picture of what- thank you
Yeah I just grabbed a screen after posting lol
can you confirm that the item itself exists in the game
(by spawning it in with cjb cheats or something )
cjb item spawner*
It does not exist. I used the cjb item spawner to check.
ah then the problem is with the item itself let me look over that :)
The thing is, it's a direct copy of another item I already made that works, which is confusing
id start with maybe changing it to the artisan goods category? why is it an egg item rn O:
It's an egg because I copied it from an egg lol. Here's where I copied it from; https://smapi.io/json/none/3bd96b89cfd6497fbcd61892d5b4055e (line 119)
well, either way id change it since its not an egg lol
I mean, it COULD be an egg. Surstromming is basically a chemical weapon irl 😛
But yeah, changed it and testing now
I wish there was a mod menu on the console versions that games like fallout 4 or Farming simulator have, that'd be neat
with that logic you say any egg is a biological weapon xD anyway, yeah
Changing the category sadly did not fix it. Item doesn't exist still.
Hell would that even be possible
how odd... it does work if i copy paste it into my mod (ignore the fact that its a celery, i just used my object sheet)
i did just notice that in the json you originally sent, your EditData for the machines is inside your other patch
instead of its own patch
I thought there was a reason I didn't do that, but I can't recall what it was.
If it doesn't cause any potential issues that'd be fine. I'd just be wary of making sure the item doesn't disappear upon closing the menu (whether via going back to normal inventory, or another mod overriding activeClickableMenu entirely)
(Ping me for followup messages, since I'm not checking here much)
I will be the first to admit that I am definitely not a coder lol. JSON verifier said it was fine, so I just went with it. How would I go about fixing the format?
oh that could do it yeah
each patch needs its own { } block
oh yeah i am notoriously bad with putting the right amounts of brackets etc so i did not notice at al
what you have is valid json, but it is not valid data
{
"Action": "EditData",
"Target": "Data/Objects",
...
...
},
{
"Action": "EditData",
"Target": "Data/Machines",
...
...
}
like this
@lucid iron Oh, also, I'm planning on doing a merge+release round before the end of the month because of the upcoming CP update, so if it's not too much trouble a PR before then would be preferable
(Or else it might be a bit before getting released)
(would you also accept a PR for a teeny tiny bugfix/null check somewhere that has made parts of BETAS explode)
Oh wow... I think I broke a record... I had a file that wasn't included in content.json at all in my mod for... 3 years and 3 months before noticing 
https://github.com/spacechase0/StardewValleyMods/blob/develop/SpaceCore/Patches/ToolDataDefinitionPatcher.cs#L46
(this line spits out an NRE whenever i tried to pass the itemId of a GenericTool into ItemRegistry.Create)
https://smapi.io/json/none/a4d5fb31b8e64f21b5ed99a4b8dafe57
(i did not test this but this should be right i think)
(although you should also have a 'changes' field up at the top iirc)
Yeah, something like a null check is always welcome since I don't even need to worry about it working beyond just looking at the PR code - at worst, it's unnecessary 😂 (but I imagine a PR wouldn't exist in that case)
((unless that is just a part of a bigger json you have))
It's a separate file right now, mainly because my main content.json is so packed. I was planning to move things around later, but if it's easier to just dump it in my big file, I'll do that instead.
Just tried that, and item still doesn't load in.
Nope
not a single red line
here's the log https://smapi.io/json/none/13c2350023234edf83bac786afa9ea06
is this file being correctly Included?
I hesitate to say yes, considering I can't do something as simple as a new item at this point
where is your Include patch?
All are in a separate json. Did I need one for this item and recipe?
no other json other than content.json is ever looked at
unless you tell CP to look at it specifically
...That would probably explain it then
(well and besides manifest.json)
yeah..
Anyone who can help me with this issue?
I just got this bug report:
"When you've married Levi and it is right before the Spirit's Eve festival when he is dressed up, when you hug him, he briefly switches back to his default clothing."
{
"LogName": "Spirit’s Eve sprites",
"Action": "EditImage",
"Target": "Characters/Levi",
"FromFile": "assets/images/Sprites_Spiritseve.png",
"When": {
"DayEvent": "spirit's eve"
},
"Update": "OnLocationChange"
},
{
"LogName": "Festival Portraits",
"Action": "EditImage",
"Target": "Portraits/Levi",
"FromFile": "assets/images/Portraits_Spiritseve.png",
"When": {
"DayEvent": "spirit's eve"
},
"Update": "OnLocationChange"
}
You should be using the appearance ... thing (cant think of the correct term here) for NPCs
"Id": "FlowerDance",
"Condition": "IS_EVENT festival_spring24, PLAYER_HAS_MAIL Any QiFlowerDancing Received",
"Indoors": true,
"Outdoors": true,
"Portrait": "Portraits/{{ModId}}_TheMrQi_FlowerDance",
"Sprite": "Characters/{{ModId}}_TheMrQi_FlowerDance",
"IsIslandAttire": false,
"Precedence": -100,
"Weight": 1
},
//
{
"LogName": "Qi Sprite Flower Dance Male/Undefined",
"Action": "Load",
"Target": "Characters/{{ModId}}_TheMrQi_FlowerDance",
"FromFile": "assets/images/QiFDSprite.png",
"When": {
"QiGender": "Male, Undefined",
"HasReadLetter": "QiFlowerDancing",
},
},```
ignore the horrid formatting that discord did to that but
the first part is in the appearance section for the NPC and the second is actual asset loading thing... whatever (im really not good at terminology if that isnt obvious)
I'll give it another go! First time I messed with Appearance it was a pain in the butt, thank you
It can be a bit confusing at first but it's not too terrible once you get the hang of it!
your condition would be "IS_EVENT festival_fall27" I think
Are you using that for Seasonal sprites too?
I have it for his winter portraits yeah :D
(i didnt give him anything else, i dont feel like making the portraits for that since I would have to make like... six? of them?)
Maybe it didn't work for me because I didn't write Weight
Thank you for showing me your code!
Of course! I'm happy to help
you also need the other parts of it wher eyou load the portraits/sprites
So, I got it to work finally, but I didn't put it in my main file. Added an "Include" that references a "FromFile", which is what I did for a bunch of my other things. I couldn't get it to work in the main file, but it works now. Good enough for me, as I'm sick of looking at surstromming again lol
I have opened the PR as promised https://github.com/spacechase0/StardewValleyMods/pull/510
There was additional strangeness I noticed between InventoryPage using Game1.player.CursorSlotItem while MenuWithInventory has MenuWithInventory.heldItem so you could end up holding 2 things this way. I'm not sure whats the best thing to do for that so I left it as is.
SMAPI and JSON validator keep throwing me an error. IDK if I'm just too tired to think straight or what, but this is correct syntax, isn't it?
if a content patcher When condition makes an npc (temporarily) stop existing, will players lose all friendship with them?
Why temporarily stop existing?
No i think friendship persist in the save
if it's so they leave temporarily (like on a trip) you can do whatever they do with Elliott to make them vanish for a little while (or how June does it.. or Jasper)
what if they stop existing for multiple days then re-appear?
One time Lily changed mr qi mod folder structure so he was uninstalled for like 4 days in gsme
If friendship persists in the save then it doesnt matter how long theyre gone
i want the npc to be gone from the social page and i want friendship with them to reset when they re-appear
His hearts were there when i noticed so it should be fine
You can also rely on people not doing When to hide a npc most of the time cus there's UnlockConditions for that kind of usage
hm... I guess the gone from social page thing makes sense though you could use a token for that I think, and you can reset the friendship if its through an event or something with a GSQ or something similar
this should be a one-time thing (triggered by events) so i could also just change their id
What's the goal here 
... wouldn't that mean you could potentially lose one or the other?
That's kinda what I wanted to avoid.
(Also was not expecting a PR that fast, you must've had it ready to go 😛 )
If it's triggered via an event you could make the friendship reset to zero with the friendship event command, add in a conversation topic for however many days they'll be gone and use that to toggle their social page visibility with a dynamic token (I think)
npc who disappears as part of an event (implied to be permanent) and then eventually returns, acting different and not really remembering the player, as part of a different event
It was 1 line but yes I already did the investigation b4 first ping
You usually won't lose item because when you exit the menu (now that it is allowed) the equipmentmenu.helditem is either given back to inventory or dropped on the ground
Could drop it in water tho, which would be a little suck yes
you dont really want to make NPCs conditionally exist as it has potential for bad and weird multiplayer bugs


