#making-mods-general
1 messages · Page 294 of 1
Alas, there are legitimate bugs sometimes
Tbh I feel like if the general consensus becomes "just hit through the allow button" it's not secure either
But also like
SMAPI cannot fix issues between the keyboard and the chair
It’s at least helpful for people to occasionally read
Like if it’s really out there
i support transparency tho
I have a mod that (through user consent only) accesses the internet and while it is obvious that it is going to upload something to a server, it'd make me feel even more responsible to have SMAPI explicitly tell people about it. but i also don't want people to be afraid of downloading my mod
i don't think a security mode is a good idea at all, considering the nature of modding. fearmongering users will only lead to people constantly panicking about mods, because they use Harmony or (oh no!) a dumb extensions nuget library or something
Speaking of SpaceCore comments, throwback to this fun time: #making-mods-general message
Since I want to start understanding modding better, (and stop bothering you all with very ignorant formatting errors, etc.) I'm thinking that I should go through every relevant pice of CP documentation, as I keep running into blind spots on the wiki. It is better to read a lot of the documentation before relying on the wiki, right?
Because I'm guessing not doing that earlier is the reason why I just can't figure out how to do certain things.
i almost never look at the wiki for CP besides the data model format (but that's not CP-specific anyway)
only the github docs
the wiki and the documentation for CP serve very different purposes
The content patcher documentation (on github) describes how to use content patcher to load and edit things
The "things" is documented on the wiki
personally I just look up stuff I need when I need it
they are used together
I don't try to memorise EVERYTHNG
public string Id;
public string Condition;
public ModificationType Modification;
public float Amount;
public List<float> RandomAmount;
Inside GameData.QuantityModifier I found these variables..
Do I need this Modification?
no you don't understand. rather than just +1-ing an existing bug report, we must make another, identical one
You need at least Id Modification Amount i believe
Ok, so I should have both pages open when trying to fix an issue then, (like figuring out how to load in music for a custom location)
Condition is a game state query if you only want your rule to apply sometimes
Maybe that was my punishment for disabling bug reports on all my mods and having a single comments tab only
I wish i could automatically bonk people for putting bug reports in the comments tab if i have a bugs tab
How do I make a certain sound effect play when a player walks on a tile? I'm guessing it's TileData, but I can't see anything on the wiki
You can move them
Do you want standard footstep sounds or something else
i realized this after I already dealt with the bug 😔
something else
you'd also need to suppress the original footstep sounds somehow
or want to, maybe not need to
I was looking at TouchAction but there don't seem to be any that would play a sound effect
you can use spacecore for it
{ "Id":"example", "Condition":null, "Amount":0.5, "RandonAmount":[0.2, 0.3] }
Modification << this is function
obviously the answer is to make a combined waveform that cancels the original out /s
{
//
// Resumo:
// Add a number to the current value.
Add,
//
// Resumo:
// Subtract a number from the current value.
Subtract,
//
// Resumo:
// Multiply the current value by a number.
Multiply,
//
// Resumo:
// Divide the current value by a number.
Divide,
//
// Resumo:
// Overwrite the current value with a number.
Set
} ````
well it's obvious when you say it 
I think that if tons of mods use harmony (I think this is true) and harmony is automatically flagged (sounds like Pathos’ plan), that probably is something that could use some additional thoughts on how to make it better in some way
For things like Internet access and networking and such I do think warning about that is a good idea, personally
Mods like “we will check the wiki for you” or “this button uploads a log” obviously need that!
But “I edit some conversation topics” certainly doesn’t
When you see an enum in the decompile you can use string name, like "Add"
I have exactly one C# mod that doesnt use harmony 
Like there’s just so much that I feel isn’t possible without harmony — I’m not computer person enough to know whether we could analyze the harmony patches somehow to apply additional scrutiny, but if it’s only patching game code with code that doesn’t use weird libraries that seems fine to me from a security perspective
i think as long as even 1% of popular mods get flagged for something, it will make people panic and keep asking about it in the server
(not counting the ones that exist only because I cant do loops in CP)
they already do for serializer warnings
I hesitate to make claims of any strength on what is and isn’t secure, but it sounds like the checks for various .NET packages would probably be a similar level of security?
I used to have 3 no harmony mods then I decided to fix a vanilla bug 
I wonder if it'll lead to authors adding more content to existing core mods rather than post new mods that need verification/consent again. would users need to verify again if the mod updates or a hash doesn't match?
If I made some popular mod then decided to be evil and add a keylogger the user should probably know
I’ve read a lot of mod source code and I feel like most of them don’t use any extra stuff and don’t touch random files, so a targeted check probably could be developed. But maybe the devil is in the details here.
Like there was one Cat mod that did things with colors and fonts I didn’t understand that I think interfaced with the OS
(New permission requirements would lead to a new-permissions-needed UI similar to Android.)
I do think if harmony is one permission, then it would incentivize what blueberry said re harmony
Like I could just make one mod for all my harmony patches and let the other mods turn them on and off
if you made a popular mod that used reflection, then decided to be evil, then you could avoid any further permission warnings with your previous reflection permission, so it's pointless
(Keep in mind this is just an idea at this stage, and it would be off by default for literal years before most players see it, so we'll have time to streamline it and help avoid questions.)
harmony is vital enough that we should see if we could do something via the smapi harmony fork first yea
I wouldn’t do this, because I don’t really make many mods these days and because that sounds annoying, but if I was a new modder it might occur to me as a thing to do
I’m not really good enough at C# to understand the harmony problems—is the issue that you could target non Stardew code with harmony?
You can already do that
Or that the patches themselves could use packages that are security risk?
Pytk does
(i even Harmony-patch Harmony itself in my Nickel mod loader for Cobalt Core)
yeah but very few people do, so if that could be checked that seems maybe useful?
Like most Harmony patches I’ve read are like, yet another objectdropinaction you know?
Harmony/reflection make it very hard for smapi to enforce any kinda check because i can just patch smapi
I mean maybe not anymore
Hmm that makes sense as a difficult loophole
I’ve had cases where I pretty much had to use reflection tho iirc
Weird little bits of the code that are private but I needed
But a lot of security stuff is like
well given the checks are done before your mod is loaded then it wouldn't have a chance to patch smapi, would it?
Assume person has root access
I do think pathos has a good point about having time to think this though, just doing some thinking in here rn
How can we at least make the crimes harder
hire private security?
Tbh if I wanted to do something nightmarish I probably could and I probably could justify myself
Boncher...
But also like
We could generate a full list of all functions in the game, right? And then check if the harmony patches target one of those?
(I wasn't expecting my quick offhand mention of an idea to lead to a whole discussion so I'm out at the moment, but I'll be reading through all the comments when I get back!)
Is it worth my time? Would it make a good mod? Neither is true
Anything you say is interesting when it might touch all mods! You’ve poked the nerds’ nest
(Maybe it would be worth a thread at this point, even early on in the brainstorming process.)
how many actually malicious mods did we ever have for Stardew?
does "malicious but says so in the description" count
I don’t think we’ve had anything serious but that one super sketchy mobile MP mod comes to mind
Like are the mods that delete your saves malicious?
Presumably they say so in the description
the example oft brought up is sundrop intentionally crashing if SVE was installed?
if i download a "i will delete your save" mod and then the mod deletes my saves, i argue the mod is not malicious
The mobile MP mod I’m thinking of a) was distributed on google drive b) multiple separate reports claimed it added advertisements to the game c) a couple reports claimed it was a virus (not clear to me how true)
that's not something the system would catch anyway
It was also Android only
(All it takes is one malicious mod to permanently reduce player interest in installing mods.)
SMAPI mod security brainstorming
(It used a SMAPI API which was stripped out after that happened.)
SDV doesnt seem to have a "crypto mining mod" incident like some other games
the community is, more or less, chiller
that's bc half the ppl running sdv probably don't have a computer that can mine crypto i won't lie
And it would be nice to keep it that way. With the community getting larger and larger...
destructive yes, deceptive no, malicious arguably not
(the skyrim mod dramas can fill entire history books)
Yeah, I would agree w that, but it’s the sort of thing that seems reasonable to warn about
wait. what API?
I mean, just allowing pre/postfix would allow for a lot. But transpilers are still pretty important, especially for compatibility
(We should probably move to the new thread.)
And also you'd need to warn for unsafe code, since otherwise people will just use the old method of method overriding like I did before we knew about Harmony
i'm just interested in the API itself that was removed, regardless of the security mode
The Monitor API is so-named because it originally did more than logging. One method it provided was an emergency exit feature, for cases where a mod knew the save was about to get corrupted or something. It was stripped out after a mod abused it.
Anyone know where I can find a guide on adding new craftables? I'm going through this page and don't see one, maybe I'm blind:
https://stardewmodding.wiki.gg/wiki/Category:Tutorials
Interested in making a mod for Stardew Valley? Then you've come to the right place! Check out the list for step-by-step tutorials to make your very own SDV mod.
Have you made a mod before and want to share what you learned? Awesome! Just create a new page on this wiki, call it "Tutorial: How to do a thing," and put in your advice, screenshots ...
Oops, I hadn't scrolled down far enough to see that we got one 😛
...couldn't you just do Environment.Exit(0); anyway
[[Modding:Big_craftables]] best bet is this probably
Don't forget minecraft modding
That's the sort of API that would be covered by the new security permissions being discussed in the thread, yep.
I mean, it won't be big...but I suppose the principles would be the same
are they going to be placeable objects?
It’s basically the same as:
- add an object (there’s probably tutorials that cover that)
- Add a recipe
if I use OnTimeChange for a map patch does it cause lags
yeah if it's a 1x1 object that can be crafted then it's just Objects + a recipe
in any case check out this page for the rest of what you want
https://stardewvalleywiki.com/Modding:Index
61×96 (px) so ya, if objects and recipes is the same then that works. I wasn't sure if recipes was like, just cooking and such
Goes on a tree, like a tapper
Ok, in theory how would you make a tapper-like item
for tree placeable craftables like the tapper you have 16x32 to work with
Ahhh thanks for that!!
those are covered by big craftables
It might, but it’s hard to say for sure because lag is inherently pretty variable from machine to machine
also if you need your tree BCs to output stuff other than tapper produce you need this framework:
https://www.nexusmods.com/stardewvalley/mods/22975
Yep! I know about that framework
I just finished up drawing the asset and looking into the code now, although just resized it based on your advice (thanks for that)
Hi, I was looking though the wiki and CP docs, and put this together, wondering if this is how to load in location music. It is inside the editmap action along with other data that I have already tested. Does this look right? "Music": [ { "Track": "Upper_Ambient" } ],
Sorry if this is very wrong, I'm still struggling to figure out what to do.
Music is set on Data/Locations
Oh, so would this work if moved in that place?
This is at a game data level so refer to wiki docs about data locations
Ok, I'll go and try that out. Thanks
My example sets the farm cave music to volcano ambiant by default
Then 20% chance to play that dungeon song
you cant flip sprites in the animation descriptions, can you
i know you cant but maybe you can and im insane
Hi, I'm not new to this whole mod thing. I wanted to add a new NPC and either have him live with the player on the farm or use the Sunberry Village mod to place him in one of the "empty" houses, but I have no idea where to start.
well for Sunberry, I believe all those empty houses are claimed
Are you in the Sunberry discord
or at least a lot of them are
My strong, strong recommend is to join it and discuss your plans there
thank you
If it's an NPC you want other people to use you're better off with the suggestion above, if it's private use, put them in any house you want.
Also having npc live on the farm is possible but sucks a lot
Bella has a schedule that takes place in farmhouse, as such she's -2 compat with any custom farmhouse
if it is for private use
I understand, thank you
I was going to put it in Athanaeri Corner but the TMXL Map Toolkit mod doesn't work.
tmxl is deprecated
There's also a mod that adds apartments to the second floor of the saloon
!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!
Before even thinking about where npc live i recommend taking look at making npc in general
mine doesn't actually "live" anywhere
If you decide to use the Pelican Valley Loft NPC Apartments, there's also a linked Google Sheet to try to mitigate NPC overlap in the rooms.
There's 70 rooms though, and I don't think even a full floor (10 rooms) is claimed yet, so, still plenty of space available.
the old Boarding House never became full, but again if it's just personal use then it doesn't really matter about overlap
The music now plays in my custom location! Thanks, chu
I feel like this should be obvious, but is there any way to have the viewport follow the farmer during an event?
Yeah, I don't think the apartments will ever get fully filled up with that many rooms, but I wanted plenty of space just in case so it could outlast some of the more limited spaces to handle overflow.
There is but I forgot
It's in the viewport command somewhere
I do wonder if there should be a date added to the claim. Not that it will be a problem for a while, but I can imagine some claims become claimed but never actually released/used.
It looks like viewport <x> <y> [true [unfreeze]|clamp [true|unfreeze]] isn't fully explained on the wiki yet
i tried to look at the code for it recently and i was unable to parse it entirely, so, good luck. sounds like a job for atra
hmm okay, I'll try a pan and then freeze the viewport where I want it
are you sure? i thought clamp prevented it from going outside map bounds
Or tomorrow
I thought clamp was to stop the viewport going wonky around map edges too
thank you!!
I changed the music id after realizing I had picked the wrong song, but now the new one won't load in because it doesn't exist? It was the junimoKart_mushroomMusic
I even tried it's Display(?) name GlowShroomGrotto which popped up for the above id when I was using that music checker mod. I'm not really sure what to do
anybody here proficient with custom companions :o
what r u hoping to do
I've used the mushroom music once before, how did I plug it in...
my CC wont spawn, and im not sure why. thats all lol
it should definitely be the junimo kart one not glowshroom, but idk why yours wouldn’t be working
like i can force spawn it in the console, but the map patches im doing are just not working
Is it for an event or a map?
just on a map
Did you close and reopen the game after changing it? Audio stuff works differently to other things and stays the same all game session iirc
like, it loads my CC pack, its just the map patches that seem to be...????? not? applying.
Sorry, just saw this as I stepped away for a while. I'll try it again and see if I still get the same issue
HAHAHA thank u!!
So, I did have a new session, though I actually didn't close all the other smapi windows during it. I still got this error: [game] Can't get audio ID 'JunimoKart_mushroomMusic' because it doesn't exist.
lowercase j
sorry4ping, was there an answer to this? I saw this message right when I eeped, and I'm very very interested in the answer (evil code warning)
the id on the wiki is junimoKart_mushroomMusic
no selph no one answered and it did not work
Oh, maybe that is the issue! I'll try that out
but i realised that custom bush patched isteabush and used that
Yep gotta start with a lowercase!
@gaunt orbit wren can u explain how to do the dynamic load from content pipeline
Yes! It worked! Finally have another important thing done!
my naive attempt was this which didnt fly 
Game1.content.Load<Dictionary<string, dynamic>>
What error did you get?
can't cast to type
i don't have the exception on hand but i can reproduce it real quick
Ah, okay
the specific thing i attempted to do is load custom bush's custom asset
Do you need to edit it?
i did not care about the model, only wanted keys
for selph's usecase the model is needed
mtf wants to insert entry into perfection exclusions
[Custom Bush] Mod crashed when loading asset 'furyx639.CustomBush/Data'. SMAPI will use the default asset instead. Error details:
InvalidCastException: Unable to cast object of type 'System.Collections.Generic.Dictionary`2[System.String,LeFauxMods.CustomBush.Models.CustomBushData]' to type 'System.Collections.Generic.Dictionary`2[System.String,System.Object]'.
at StardewModdingAPI.Framework.ContentManagers.GameContentManager.ApplyLoader[T](IAssetInfo info, List`1 loadOperations) in SMAPI\Framework\ContentManagers\GameContentManager.cs:line 163
since its this error i wonder if i just did load too early
hm no it does the same thing even if i spawn and plant a custom bush first
If you only want keys, you can load it as dynamic instead of a dictionary, and then use the keys property
If you need pairs, then IEnumerable<dynamic>
If you want to insert, then you'll have to use the asset events and use the type metadata from the event args to create a typed version of a generic method as a delegate.
new attempt and new error
dynamic customBush = Game1.content.Load<dynamic>("furyx639.CustomBush/Data");
Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: 'object' does not contain a definition for 'Keys'
at CallSite.Target(Closure , CallSite , Object )
at System.Dynamic.UpdateDelegates.UpdateAndExecute1[T0,TRet](CallSite site, T0 arg0)
this doesnt matter too much to me cus i found better way than loading data, but it is something that always troubled me 
Right ok, I'm trying to use the beach tilesheet and the waves are frustrating me. Most of my waves are fine and the collision is there but there are some spaces that you can just walk through. Is some of this hardcoded? I've tried looking at the vanilla beach map and I'm using the same layering 
ideally i would like other C# mods to have power to read my custom asset without too much hassle, but perhaps opening API is the way
check Passable props
Vanilla beach map uses invisible tiles on the building layer
yeah I think I tried all these methods in the past, but I couldn't get away from reflecting into a reflected field inside a reflected type
if dynamic works then I probably still need to do some reflection, but less
Ohh that makes a lotta sense
Ah, so newtonsoft just doesn't know how to handle it
if this is the tapper automate thing someone made an unofficial fix in the comments
(side note, I was personally responsible for the breakage, so, uh, sorry?)
In that case try loading it as a JObject and then using Properties() to get the keys
Terror
That....shouldn't work tbh
This is usually when I resort to emitting delegates but I think Pathos may want to take that away
@half tangle #dynamic-content-load interest 
Dynamic delegates is definitely the better way
I'm gonna stop fiddling for now since i don't need it
I will be very sad if they get taken away
Oh well.
I ended up not using dynamic for my data collection
I can kinda get why but also like, I do think it will mean people will hesitate about releasing certain mods
Even if it is fine, do I really want to deal with users for a tiny performance improvement only I care about?
I just recreated the model and then loaded it with Helper
worked great (still working on that, though)
huh...
im surprised that didnt explode everything
are u sure u can still use CS to go to places after that?
I'm surprised that works tbh
The asset cache keeps separate instances by type
As long as nothing in the pipeline explodes, you're safe
Yeah, but the original load is a concrete type
(and cp does things in a dynamic way that doesn't care about backing your)
this would be good news for the chuTAScore thing
In Event Tester I make a new temporary content manager
Yeah but a c# mod is doing the load...
That is somewhat puzzling
i wanted to be able to share this extended temp anim sprite definition between my mods
without actually making a chucore cus i hate that
It should be a concrete type if it's load-backed by c#
before i was just gonna build that into both mods as shared project and make ppl use separate assets
If you're asking me, what I did:
var CentralStationDataAsset = StaticHelper.GameContent.Load<Dictionary<string, CentralStationStopModel>>($"Mods/Pathoschild.CentralStation/Stops");
where CentralStationStopModel is my version of Pathos's StopModel
(I'm only slightly around here rn so I'm not exactly following this conversation, though... busy elsewhere)
but if i could somehow load over same asset with both mods that'd be nice 
That's...
I have no idea how that works.
Well, central station is pathos' mod
Pathos told me to do that... so I did
It's probably using the same shared code as cp to be type agnostic
It...hmm
yeah, might matter that it's Pathos's mod specifically? idk
Important note: Your computer username may appear in the log. If your username is your full name, please be aware of this before uploading it.
Please share your SMAPI log file. To do so:
- Open this page: smapi.io/log.
- Follow the instructions at the top of the page to upload the log file. (Don't copy & paste from the console window!)
- After uploading, it will show a green box with a URL to share. Post that URL here.
Please do it even if you don't see any errors. This has useful info like what mods and versions you have, what the mods are doing, etc. If the issue didn’t occur in your last session, please load the game to the point where the issue occurs, then upload the log.
Crap mobile github shcks
I mean anyone can do it, it's not super complicated, it's just that most people don't bother because it's a bit of a niche usecase
I gotta go do some stuff for a couple hours, if you need me ping me and I'll be back later
Only tangentially related but sometimes wonder if the dp algorithm restructure on nexus actually promotes keeping a single "core" mod for an author rather than splitting it up because I remember nexus saying people splitting one mod into 20 parts was a dp-farming problem
yea but they also said --dp for dependencies
Dependencies on my own stuff or anyone's
dunno how exactly thats expressed in the algo
but it was said that pathos casey etc got dms about how their dp will go down (and they did)
I don't make enough dp for it to actually matter to me, but it was a musing I had
i hate it for personal code style reasons
I like splitting stuff up within reason (don't want to install more than a couple deps for a mod if I can help it)
I see I see
if it comes down to it and i can justify i'd like
This is why it works with central station
make a TASEverywhere kind of framework mod with api for myself
Because the load is here in a CP mod
You'd think because so many other ppl use mods like spacecore, it shouldn't bonk down the payout for them because it's clearly a useful framework not a dp farm
there was some kind of secondary hand picked dp for frameworks
Oh the bonus rewards or whatnot?
yea
its prob more like, whatever math they did to cutdown my-dp-farming-mod-of-configs also impacted spacecore
missed this to do stuff, so I'd have to do whatever CP does for my own asset to be loadable lilke that?
People publish mods of just config files???
yea its a real problem with collections
Huhhhh
Tbh and this is me being honest: I think the MGM method is fine
what does mgm stand for
MGM/delegate emit
Dang u cant split out shared functionality for good software practice but u can do that
Make generic method
yes
the author of, as of this time, the 3 most popular SDV collections, has a DP-enabled "mod" that are just config.json files for their collections
airyn or someone raised the issue some time ago to Nexus, but it was allowed so
i thought the intended way is to bundle artifacts with collection
not this kind of config mod
Remind me to make an example mod sometime of the approach
This is what Event Tester does to check for gsq but it's fully uncached here because no one cares about performance in a console command
Contribute to atravita-mods/StardewMods development by creating an account on GitHub.
(Also, see flagrant use of the System.Reflection API)
(its actually not that bad, its what i did for Searchable Collections Page WRT Secret Note Framework too)
would that be similar to what I did in MTF)
the MGM thing I mean
Basically yeah!
ah glad to know it does work 
Except I tend to want to cache reflection into delegates when I can
the response was (in this instance, was raised bc plagiarism not DP farming) this lol
but you're earning extra DP off it because of people using your mod through the collection!
popping back in here briefly... interesting, but that does makes sense - and very convenient for me!
im not saying im pro-dp farming config mods/collections, but i wouldnt say that counts under plagiarism, so it makes sense to me that nexus would allow it
Yeah a config file isn't plagiarism
how do i create a mail flag without the actual letter appearing in the player's inventory?
add to received directly
the player wouldn't be able to go into the menu to view it in their past mail if i bypass the mailbox?
it wont show up if it doesnt have a data/mail entry
oh, i do have it in data/mail. in that case how do i add a mail flag without it being in data/mail?
just send the mail without it being in data/mail
Just to clarify: it's called a mail flag, but not all mail flags have associated Mail/letters
delete the data/mail entry basically
the asset's only for user viewable mail, a mail flag doesn't need a data/mail entry to be sent
interesting, okay. that seems counterintuitive to me (how does it know what to set if i don't define it?) but i trust you guys lol
The trigger action should create the mail flag itself if it doesn't exist when it's called, IIRC? Data/Mail can be completely ignored if you don't want to send a letter.
I might be wrong, but I've never made a letter for my mail flags
"received mails" or "mail in inbox" are just a set of strings
"send mail" is "add this string to the list"
diagramming logic flows is annoying, Every time I do a sequence diagram I feel a flow chart will be better, and now im doing it as a flow chart a sequence diagram might have been better 😦
are there pros/cons to a trigger action to send a letter vs sending mail via event command?
well, why are you doing it by event command?
if you have a real event then sure do it
yeah it's a real event
if that event command is the X precondition, then don't and use a trigger action.
if its a real event then sure
makes sense, thanks
before 1.6, people used to do dummy events as bootleg trigger actions
it'd cause random pauses
yikes
but u have real event so it's fine
watch out for ppl doing the skip button tho, iirc theres a thing for that
(vanilla was included in 'people' there, though vanillas was mainly the X precondition that didn't actually run an event, but did send mail anyway)
yeah i haven't set these ones to skippable. watch my events, boy
the heart events are but these are "plot" so
there's currently setSkipActions to handle skipping, and in the next update there's some goto feature to handle it
(generally, you should let players skip your events if possible, and it's almost always possible)
note theres mods to make them skippable anyway, anything very important to happen should be in ^
oh okay
yeah this is the chain of events to unlock an NPC so that's why i didn't want them to be skippable in case they locked themselves out of ever having her
but i can put things in set skip actions
follow up question: if i want to add a mail flag but it's not real mail, i can't use the event command and have to use a trigger action, right?
You can use the event command fine
event command still can happen
the only difference between a mail flag and mail is whether there is a Letter defined for it
oh okay so the event command can still raise a flag without a letter
sending mail/setting mail flags works the same no matter how you do it (except some ways may predefine which bucket the mail goes into)
yeah i see that there's mail for tomorrow, mail for received, and mail for now
yes. each one is just a set (no duplicates) of strings (IDs)
man i'm so sorry for spamming you guys with mail questions lol but if this is a broadcast event, who gets the mail? everyone?
this is for the event command mail
broadcast event makes all* online players play the event locally, so they should set their own mail iirc
has one worked on mod for auto harvesting in the greenhouse? I'm using Greenhouse Gatherers, but it's got issue with fruit trees.
great thanks
Better Junimos has an option for that I think
I use automate's paths option for fruit trees, works pretty well if you've got it installed
i use automate, didn't know it could work for fruit trees
First draft of my asset pipeline diagram, only done the load half of the chain, will do the invalidate flow later.
I probably need a simplified form of the diagram that just shows the various event / mod code execution temporally, and add extra ContentPatcher specific details, as this is the pure SMAPI view of the land.
hi hi! i'm trying to make a mod to change NPC names with content patcher. SMAPI isn't throwing errors, and it seems like it should be working, but there's just no change. is there anyway to see the resulting patched data files after content patcher does stuff, so i can verify i actually changed the values i meant to?
@calm nebula would like feedback on if I over simplified, or if there's a better way to diagram a method with 4+ short circuit flows (not including the Localization running this up to 3 times)
I'm seeing a tiny image on my phone 
No promises in taking a look in reasonable time but I'll try
Feel free to yell at me if ihavenr by Saturday
hopefully by then the invalidate half is added, which is where some of the spicier logic is anyway
run patch summary in the SMAPI log
thank you!
and if you want to see specific files, patch export filename
patch export <asset name> will dump the asset to disk that the game got after content patcher (and others) did its thing
what is the correct syntax for a GSQ where 1 AND 2 AND 3 are true?
in this case i want to check that 3 mail flags have all been raised
"(GSQ 1), (GSQ 2)" I believe
thanks!
Hi, I’m wondering about how getting fourteen hearts with an npc is possible without marrying them or having them live with you.
I remember seeing a new npc that came out which apparently had that as the case. I’m pretty interested in how this might work, and whether it is achievable through a framework or just CP.
Interesting. I guess that mod had some c# coding then
When you say trivial, how much c# experience would potentially be relevant?
Single harmony patch
Something a non coder could potentially figure out with the existing documentation?
Depends on how much they want to fuck around and find out
Probably something I shouldn’t waste my time wondering about then. I probably couldn’t organically figure it out
i think it's not so bad to do it for 1 npc but ig u gotta ask yourself the gameplay questions
do u want ppl to do more gifts?
The reason why I find it interesting is because I had some unique alternative game play ideas for a non romanceable character
i think u just postfix this then Utility.GetMaximumHeartsForCharacter
Damn
Postfix?
That one is gonna get me trouble haha
!harmony
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
All y'all have to say is "smd" at me
||this might even be in scope||
I was also thinking of doing flavor specific buffs
Shhhhh
parcy you should understand that when atra says it's easy, atra really means something lile "it's easy if you already know how to make a C# mod and can at least get the button press mod from the wiki up and running"
for people with programming background, this is a low req, but we all start at different places
Anyway, I guess my ideas keep getting ahead of me
in this context, atra is working ("working") on a mod called Slightly More Dehardcoding
Ok
it also means surface mounted device
Yeah, I was trying to find the context that might make sense
I did start that yellow c# coding book
I have not currently gotten very far though
Is Slightly More Dehardcoding something Atra is interested in finishing anytime soon?
finish is a strong word
well more than 1 person is waiting for it 
who knows, if I add the memory dehardcoding to it it might need to be renamed to substantially more dehardcoding prior to release
What memory dehardcoding
leo memory
Oh that dehardcoding
Sorry
You got me after work brain, if you say memory I literally think "RAM"
I mainly optimise for speed, not memory utilization anyway
I have 128gb ram and I want stardew to use as much of it as possible if things run faster
"How do I dehardcode memory allocate" <- my dumb ass
exposing pointers to content packs would be fun
Lol
new triggeraction memset 
Might turn out badly
cheat engine being reimplemented as a content pack would be an odd turn of events
I guess I’d better ask, so I can get my dreams crushed early, is it possible for me to make a special ‘roommate' item that doesn’t force the npc to live in your house, with something like spacecore?
While also specifying 'housemate' with a different name. I think I have seen different mods do these things or least something similar, but I’m wondering if I could apply all that to do exactly what I want here.
Possibly!
I hope so! I’d love to implement a unique freindship mechanic with a special reward to go with it
i don't recall any mods that do this off hand
For one npc, of course
so no spouse patio or spouse room, and they keep their original schedules?
No farmhouse at all!
when an npc become spouse/roommate their original schedules get bonked for spouse duties
it sounds like what you actually care about is the title on the social page
Spacecore has a way to have spouses do normal schedule iirc
so what i'd do is have their internal status be "dating"
I think I heard the character hector from DestyNova’s mod has marriage mechanic which does something similar
I thought about that! One problem though…
If the internal status is dating, a spouse npc could get jealous
jealous of you two being good friends 
That wouldn’t make sense for what I’m thinking
The spouse shouldn’t even know that we know this npc, so…
(Fwiw, there are a handful of things I want to do wrt memory but in general I assume infinite ram as well)
tbh i think jealous is less important than like
if player dates multiple they'd all be (SPECIAL FRIENDSHIP) on the npc screen
Uh oh, would that apply for everyone?
i would absolutely just patch SocialPage.drawNPCSlot to draw the unique status 
but that is once again a C# solution
Patching the get max hearts ks easy enough tbh
I think when looking inside different mods I found one that had a special title for a spouse or dating
it is perhaps better for you to focus on just expressing the relationship between farmer and npc in the narrative first
Remind me in 6 days to ...
Oh okay, atravita (#6645286) (6d | <t:1745812546>)
SinZ I see your
then you can do the flavor
tbh I would bootstrap off dating and then harmony patch the parts of dating (like jelousy) that you want turned off
Yeah, I personally dislike the stuff that like
at that point you'd feel more motivated to make this happen, or maybe atra would have done it 
Older mods that have like, one item per flavor
Like this is just my opinion but I hate that
I don't want to make 45435 individual cider and 358392 individual soda for perfection
Would that apply a universal eraser of jelousy though?
its your C# code, you do the check to target only your npc (or only npc with customfield=whatever)
The way ive started doing perfection things is even with 20 varieties of the same item it's tied to a config so you don't have to ship all 20, only 1
writes down "jealousy immunity"
So, let’s assume I am not the kind of person who is predisposed to easily understand the concepts of coding when starting. How much of the yellow coding book and any other material would I need to get through, before I would be able to implement these basic c# concepts to stardew valley?
i don't know, everyone learns at different paces
Yeah… that’s true
that is why u should do what you can first
this feature is not a blocker for the overall mod you wanna make, lots of npc busywork to get through first
unfreeze might work, in the viewport command, but you can also try setting your initial camera position to follow instead of coordinates, if i'm reading the event code correctly
I can still make the npc I want to create. I’ll just have to hold off on the extra bells and whistles for now I suppose.
In related news, I'm upset by this 'line' of code (reformatted by me)
Ooo, what are you trying to achieve here?
decompiler funkiness?
i wonder if it just is a horrible tertiary in source
Sexy
or if decompile decided it was a horrible tertiary
Try to transpile that one
Yeah
and its got very direct ldstr
also the fact that none of these have consistent string keys forcing this 5 layer deep journey
if it was Relationship_{title}_{gender} most of this would be deleted

Either embrace the scope creep and get another rug removal mod that disarms napalm rings, or make a small family of mods
but I feel it, I mainly mod in the shadows and do performance tweaks directly to smapi / content patcher, but forced to have a standalone mod to do some of it due to the scope issue
Btw SinZ I've been bouncing around the idea of ModContentLoader.LoadAsync
to do offthread loading?
tbh I've 'accidently' made any image load on ModContentLoader.Load be cached anyway
Yeah, I like the caching thing you did I just also don't want to make an in memory copy
So the difference is "make an in memory copy" or "use the cached value directly"
I know I should probably stop now… but, what if I used spasecore to make it an internal 'marriage' but to also cancel out the 'spouse' actually acquiring a schedule that involves living at the house, so the non marriage dialogue and schedule can still come through?
I know that would cut off players from actually getting married (We could say, sorry, my bussiness partnership is too important right now for distractions or something) and it would absolutely break it for anyone trying to collect multiple spouses, but maybe this could be a solution?
the main roadblocks to async loading, is the rest of the codebase not being thread safe, and for existing uses of the asset pipeline, what to show/return/use while its not currently loaded
Yeah,
The idea would be to return a wrapper object that gets populated....eventually
(Hence doing it for modcontent first)
I can see it for audio easily, but can you async load the map when it gets invalidated while you are currently in it (i.e. 7pm time to change the map property for lights)
You're right that it doesn't play well with the asset pipeline
being a spouse has a bunch of terrible implications for dialogue too, thats why we were saying dating
I was just wondering if spasecore could bypass that…
See, in theory a lot can be pushed to a background thread if we are willing to let a few frames slip
In practice I'm not sure I want to touch that yet
for split screen moving the loads off thread while fade to black is active would help performance for the other screens
there's a different mod for it, but spacecore doesn't solve the relationship title on social page problem either
the feature is "give spouse back their schedule" iirc
not "mask spouse relation as something else"
Ah, ok. What would be the other mod?
I've always planned to split up appearance loads for the appearances optimization mod across frames so you don't take the hit of a bunch of npcs changing at once but also I would love it if I could push the actual image loading, up to the point of texture generation, off the main thread somehow
*other mod for making spouse dialogue less hardcoded
but I'm already seeing corner cases even in the synchronous asset pipeline, where the AssetReady event for Data/Objects cant safely use the ItemRegistry because you are interacting with vanilla code before the asset propagation finished.
My first goal is to have SMD stable and out
this is the mod in question, but i really don't think it suites your usecase
https://www.nexusmods.com/stardewvalley/mods/33353
Huh, yeah, it doesn’t look like it
Ironically textures should be the easiest to off-thread load/edit and hotswap in, as SMAPI already does reference preservation for textures
I'm not going to lie, I've rarely found AssetReady useful EXCEPT for evicting members of a failed-to-load cache
Textures yeah
I also want to take a look at maps
Like, AssetReady either doesn't get called when I want, or it is easier for me to just do a cache evict on AssetInvalidatw
Etc, etc.
I feel like AssetReady should be moved to after propagation
nope
its mid-propagation
(I've never used it except as a "remove flag about asset failed to load")
Weird. That's annoying tbh
this log is me trying to use an item query in assetready without checking for save loaded
for any 1 liner propagation its a distinction without a difference, but anything that does anything after the load call would run after assetready
and its only ok after saveloaded cus i would have an old objectdata to use
hate to bug but, really silly item query/GSQ question. double checking some core logic, when this query is checked, it will check the conditions on each block to determine weather that value can be returned, then picks randomly from the ones rolled for selection + the default. (please ignore the extra animal config added GSQ. not really core to the logic question.)
or would it always produce the default for some reason im not aware of.
"PerItemCondition":"ANY \"ITEM_ID Target {{ModId}}_gummitreasurebox\" \"selph.ExtraAnimalConfig_ANIMAL_FRIENDSHIP 300, RANDOM 0.5, ITEM_ID Target {{ModId}}_bowtreasurebox\" \"selph.ExtraAnimalConfig_ANIMAL_FRIENDSHIP 500, RANDOM 0.5, ITEM_ID Target {{ModId}}_candytreasurebox\" \"selph.ExtraAnimalConfig_ANIMAL_FRIENDSHIP 700, RANDOM 0.25, ITEM_ID Target {{ModId}}_deluxetreasurebox\" "
Masking the dating might not be worth doing, because it wouldn’t be an actual romance, and it would muck up dating other characters for the player.
I guess if I specified 'if you team up with this character, dating others will look and be a little weird' I could get away with it still being a feature, but Idk if anyone would even appreciate using it because of that.
doubling up on the 0.5 ones should work
Is Random_Items seeded, chue?
not unless the passed in random is seeded Random random = context.Random ?? Game1.random;
short answer is uh. not aware of that being an option. and its supposed to produce the lower three less often. the query itself only even gets called 25% of the time since the animal produce slot this is for has a random condition to it so it doesn't come up consistiently. of the 25% chance of the 'default' is being accounted for elsewhere
now i think your thing will actually work kinda, it'll just be awful to debug
is this for farm animal produce?
(Also instantiating one of each item in the game every time this is called is gonna be funnnn)
Specifically dug up produce. Query is to randomize output when called upon.
Trying to fix up Pokemon Ranch's mostly not functional treasure digging mechanic, this was previous just in the main produce slot deluxe produce. I've moved it to an extra animal config extra slot so it doesn't interfere with standard produce.
it would be ParsedItemData / ItemQueryResult until one actually wins afaik
animal produce is a list so, can you just have more stuff?
Item Query Result holds an item instance iirc?
I swear I implementation an item query at some point
(I feel like I should release that "item queries override" feature soon huh)
ah yeah it does 😦
Oh hi Selph.
the problem with dig up animals is that once they pick an item they will only dig up that produce for the day. EAC's item query override feature allows different digups, but right now you can only provide one item query (instead of a list where you pick from)
it only resolves items so it can do price checks, even if it didn't need the sale price check 😦
Thanks for humoring me guys! I’ll need to determine what to do later in the development process, but I appreciate the discussion!
btw if u r updating pokemon ranch, there's unused custom locations in there
and also one of lechonk's produce item is error
(I can release it right now, but I want to bundle a C# API with the release, including the ability for mods to add listeners to modify the animal produce, hence why it's taking some time)
(and also occupied with playing games but shh)
Playing games? What's that
will there be api to get the item queries
(Please ignore the record amount of xp I have in duolingo)
I'll expose an API to get all the extension fields, including the queries
Lechonk is a weird one, that felt very well suited to queried dig up mechanics instead of drop overnight.
Much of my tweaks to pokemon ranch are about separating egg drops so happy pokemon don't entirely stop producing eggs. Separating treasure digging so it doesn't disrupt standard produce.
And trying to give more distinct mechanics to each pokemon family, as opposed to being extremely cookie cutter down to slightly bugged sell/buy prices.
Locations are on the list to figure out.
Eventually this whole project of mine is gonna get converted to a separate patch pack rather than building directly inside pokemon ranch.
Project has also mostly fixed the animals getting stuck in the structure doors issue the original dev claimed to fix in the last patch
oh i meant it was literal erroritem (wrong item id)
Yeah that was an easy one to catch. Already dealt with
i hope new project moves to {{ModId}}_ convention 
Is it possible to have it so that an npc won't let you through an area until you've paid a fee? So basically I want it so that stepping on certain tiles prompts an npc to say "You haven't paid" or something like that.
boncher 
so what bouncer and henchman do?
is it a onetime thing or a reoccuring toll
Not really, more like there will be open space, they aren't blocking just one tile. And it will be a reoccuring toll
maybe do an event then
spacecore has tile action trigger + start event trigger action
I've never used spacecore but I know it can do some cool stuff so I'm tempted to look into it
should be able to do a reoccuring event whenever u step on the tiles, and then have the event put player back
Assuming I can get the tools supplied by extra animal config to do the thing I need it to the hope is to be able to share this data patch that started as being written for myself. Due to a number of annoyances using the mod. still really need to figure out the cause of animals getting stuck in the door of the structures
I'm thinking that making it work like bouncer might work better for my use case. How would I go about that?
Ah ok, that's a shame
is it possible to make an event where the npc present changes depending on who the player invites, kind of like the movie theater?
ummm i could potentially see you doing it with when conditions or tokens? can you use tokens inside of events?
yes, but it won't update in time
you'd have to do it as "invite so and so to do thing tomorrow"
how would I use the tokens? like set it to an npcs name?
I feel like to do this you need c#
alternatively u just have N versions of the event
perhaps preferred if u actually want to write different dialogue
Giving them a special item is the classic
yeah i was thinking a special item
Do you just...put in a gift taste to set a CT for every npc?
ah okay i was imagining like event setup being "music/viewport/farmer x y {{TokenNPCName}} x y/" etc etc
yes, but token won't update immediately
Yes but how do you set the token in the first place
the jank i had in mind is that u mailflag day 1, dynamic token day 2
Gift taste CT is my only idea and that sounds like a faff and a half
isn't there a way to trigger an event upon gift given, or am i mixing up spacecore/BETAS documentation with vanilla?
hmm quite the conundrum
Gotta remember that vanilla movie is elaborate event metaprogramming
Lol yeahhhh in multiplayer too
Tbh part of the problem with the c# folx. Or perhaps me only. Is that because I can see exactly how I would do x, y or z in c#
how about one event, 30 forks, one fork per NPC /j
I don't consider the archane art of stringing together weird behavior with content pack framework
you can see beyond the matrix
Well you could set a token that checks for a CT and use AcceptGift_YourSpecialItem tbh
memo to self - generic item responses
But isn't that limited to X characters again
The content modders yearning...
The bright part of a CT is it is automatically time limited
And AcceptGift would let you set it fine
ok ty
Oh no
Like uh
MarriageDialogue yesh
Characters/Dialogue/defaults
I wanted to make something like that for the kids mod actually
Home for the rejectItem you need
Tho ofc it'd be for kids
The only issue would be that I think I would also want a way for npcs to not have the generic dialogue
If only b/c wellllll
Today i gave Kyle (ornithologist's guild) a birthday gift and he spoke perfect english back at me
(Also while I hope people would use a generic dialogue responsible...)
You know exactly what would happen
I guess for this theoretical mod that I'm not making it'd just be a field on the character
Wait no i don't what do u mean
Yeah. And make it clear that the generic is meant for things like "every npc but one should reject this item"
Hmmm will workshop more
It would be pretty bad to get another situation like the mod that made any npc flirt at u when u wear a bikini
Tho when u r framework there's not much u can do to stop nefarious usage (whatever you deem nefarious to even be)
welp, I expected it, but migrating data models from fields to properties explodes my DLL reference mods
welcome to the difference between api and abi compatibility
back to individual API functions for every field, weh
actually, hmm, I can just make a copy
Why does my game hate it when I'm using the mine tilesheet 
Won't load my custom map
I'm guessing it's because it's within a folder within Maps in the game files?
within the tmx file tilesheets need to be in the same 'folder'
I've looked at the tmx and it just says mine
installed better junimos, but when i tried to build the hut this message came up in SMAPI
What should I change it to?
fellow modders, does length matter?
old code from 1.5 exploding I think? this line specifically: https://github.com/hawkfalcon/Stardew-Mods/blob/c1048b67c18a6f109ef93d33eefd1e9bd8cfea1e/BetterJunimos/BetterJunimos.cs#L246
CarpenterMenu.MagicalConstruction is a public property now so you can just remove that reflection code
cast the menu to CarpenterMenu and just access it normally
do what now?
if (e.OldMenu != null || e.NewMenu is not CarpenterMenu carpenterMenu || !carpenterMenu.MagicalConstruction) return;
I tried just loading a vanilla mine map with a new name and it still errors
oh its reflectioning into it, that would explain why it got past smapi's rewriters saying the mods broken
Apparently there's an invalid tilesheet path but I didn't even change the vanilla map yet
Yup
Your map always looks to smapi if it's in the root maps dir
You have to actually use like, mines/<whatever> as the tilesheet
It's weird
I'm trying to figure out how trinket rerolling is seeded, specifically the magic quiver. I can see all the numbers here that match up with the wiki, and I can see it's making an object of the Random class seeded with the generationSeed of the trinket itself. But Trinket.cs isn't helpful, I'm not sure when in gameplay that generationSeed is actually set.
I'm a bit confused as to how to fix it though. Do I include the tilesheet in my mod? Surely there's a better way
so, i'm changing or deleting something in the Json file? I don't understand
Selph was giving advice for how to fix the error in the mod by editing its source code. Doing so requires familiarity with C# though (which maybe Selph thought you have?)
Just make sure your tilesheet path is Mines/mine rather than just mine (or whatever tilesheet it is you used). Edit the tmx with a text editor and add Mines/ to the image source line.
I think it happens in CreateItem in TrinketDataDefinition.cs
Thanks Aba 
which i do not.
!mh I recommend heading to the tech support forum then, since this channel is not the right place for getting help using mods :) Although at a guess from looking at the comments on the mod page, if you have a mod that affects Robin's carpenter menu they may be incompatible.
For help with modding issues, please ask in #1272025932932055121! When asking for assistance there, sharing an error log will help others identify your issue (see https://smapi.io/log for instructions).
(sorry, you asked in making-mods so I assumed you were doing C# stuff)
(especially because you posted a stack trace)
Ah, that's it, thanks.
feeling really dumb wrt the formatting for content.json
can someone tell me where i screwed this up? https://smapi.io/json/content-patcher/b7b544abf2b14cdda6c73a8a4ba75237
nevermind i just fixed it and i have no idea how
i think it was the two opening brackets and two ending at the end, only need one set
yeah, i think that's what i deleted
between that and writing my saloon event to the seed shop, it's not been my best outing
oh!
didn't remember that being a thing, thank you
i finally got my heart event to run and, while it's full of errors, at least they're things i can fix. probably.
Of course you can ^_^
I had an item that I didn't want anyone to accept except the right person, and I added in a generic line for every NPC I could think of (plus specific ones for selected NPCs, so you knew to offer it to East Scarp NPCs). Ofc, that list is now outdated and I suspect you could quite easily give the item to the wrong person now... but ah well.
If I could set it to only be given to the right person (like the PIrate Wife quest) then I would set it up as a quest. Is that possible?
If I make it a quest item?
this is my first time doing animations/custom animations and w h e w. the rest of it's not bad
I think an item quest yeah
Item delivered quest like Robin hammer
but what stops anyone else taking it? Is that C#?
I have not ventured near animations other than temporaryAnimatedSprite but they look much less scary to me than simultaneous movement lol
It becomes a quest item and then only the receiver of the quest can take it I think
I believe both Robin's axe and Linus's basket
its labelled as "Quest" in the data. I do have unique dialogue responses for some folks when it's offered to them to give hints as to whom it actually belongs to etc. The Pirate's Wife quest, does something similar.
Pirates wife is hardcoded i think
While Robin's axe/Linus basket are fully in data/quests
Hmm, I can try it. I got really disappointed when I set up all sorts of stuff for if you give Victoria a prismatic jelly, only to find that you cannot gift it to anyone while the Special Order is active. (You can gift it outside of that - it was the first thing I tested)
Yeah, that item is hardcoded
I need a bit of help here:
1: how can I get rid of the shadow?
2: How can I made it so that the area in the video is walkable and doesn't act like a barrier?
Are you making a CP pack? Because I think changing the farmhouse hitbox is C# territory
You can disable the shadow in Data/Buildings
I'm so sorry, but could you explain?
"Action": "EditData",
"Target": "Data/Buildings",
"Fields": {
"Farmhouse": {
"DrawShadow": false
}
}
},```
I kinda want to make an animal companion FS pack. How would I go on about those? Sprite size, how many frames for the animation etc
I'm unsure if this is the right place to ask. I want to create a mod that changes the name of specific items and NPCs to swear words. Is that something that would be considered nsfw for nexus and other mod hubs?
You'd have to ask nexus how their rules work.
Or wherever you plan on uploading them.
I believe nexus does have an option to tick for "swearing and profanity"
I don't remember it exactly but it would count as something that users could probably filter out in the tags
Oh yeah, there would be tags
Based on Skyrim and how many NPCs swear like a sailor and I don't think have the NSFW tag, I doubt they put profanity behind it.
An optional tag makes sense
I think nsfw in terms of nexus is pretty much sexual/skimpy stuff.
Having a disclaimer about profanity wouldn't harm though
is there a way to detect if you have max pet friendship?(pet adoption unlocked)
check that the farmer has the mail marnie sends
where she announces she has pets for adoption
or if you want something a little earlier check the "petLoveMessage" mail flag (which causes said mail to be sent the next day)
!json upload to the json parser here and you can show us the actual mod text with some helpful suggestions
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.
Most likely you just need to update the format on the CP packs, but it depends on how old your mod is
Hey, Long time no see SDV friends, I'm debating getting back into making some mods, any changes or advice I should keep in mind with the recent updates?
There's a lot of really cool stuff we can do with content now!
Content Patcher has added a whole lot of functionality due to the game de-hardcoding a bunch of stuff
also some turnover in frameworks — things breaking, new things coming out, the usual. 1.6 was a really big update so there's a lot to get excited about!
any advice on where to get started
as far as what I've done in the past I made a small mod which added vinyl record inspired decor to the game
If it's a custom NPC, chances are it is going to need some substantial changes to adapt it to 1.6
!NPC the tutorial here covers some of the changes from 1.5 to 1.6 in the Changes from 1.5 section, including some tips for converting!
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 official wiki's modding section has a page about migrating to 1.6 which covers a lot of the major game structure changes!
NPCs are complicated and almost everything about them was updated (read: improved) in 1.6, so to update one, your best bet is to more or less remake it. the tutorial and the wiki should have you covered, but there is a lot. just take it one step at a time
Hi,
I'd like to ask, is it possible and correct to use "When" inside of a TriggerActions entry? Like done here: https://smapi.io/json/content-patcher/f5490bb093094b7c909eaec5eb813126
Or is it necessary to use "Condition" and GSQ? And if so, how would it look if I wanted all the conditions to be true to apply the action? Like "DAY_OF_WEEK Monday DAYS_PLAYED 10", would that be correct?
you can't use When inside the trigger action entry itself, but you can use it on the content patcher patch that applies the edit, if you want.
(if it helps, When is a content patcher feature, and the game never sees it. it only helps content patcher decide whether or not to apply your patches)
Well, that might be why my mail doesn't work as I want it to...
broadly, if a game feature (like Trigger Actions) supports GSQ in its data model, i recommend using that instead of content patcher's When, since it's part of the game itself and CP won't need to do any work about it
although it is sometimes a tradeoff, as described in the GSQ docs
https://stardewvalleywiki.com/Modding:Game_state_queries
for your formatting question, queries should be separated by commas, so you want
DAY_OF_WEEK Monday, DAYS_PLAYED 10
this will return true only if all queries are true
Oh, good. I thought so, because there is that ANY thing I'm kinda scared of right now. Thanks! 
yes, ANY is designed to change the "all true" behavior by creating an OR. but you have to escape quotes and not separate with commas, so it can get messy
(many queries support OR behavior inherently, like SEASON which can take multiple season arguments and returns true if any of them match)
How do I make a body of water contain fish? It's in a custom location and i want it to contain fish I've made and some vanilla ones also
you can check Sunberry Village for an actual example btw
Thank you both!
(or just vanilla locations
)
thanks selph i always forger about that fact lmao
Hello, I'm very lost and I don't know what to do anymore. I'm trying to put my custom NPC in the Pelican Valley Loft (NPC Apartments) mod and I get an error when loading maps, since I want my NPC to live in one of the houses in that mod, but I don't know what else to do to make it work. When I get my NPC to go there, it doesn't even appear. If anyone knows how Pelican Valley Loft (NPC Apartments) works and can help me, please contact me privately.
it looks like you’re trying to load a map from png files in those errors. i don’t think you should even need to load the apartments at all—if you have that mod installed, it should be taken care of already, i believe
it looks like you just didn’t lo- yeah
As such, I have it installed, what I want to do is have my NPC live in one of the apartments. I may have programmed the content incorrectly, but I don't know...
JSON is a standard format for machine-readable text files that's used by Stardew Valley mods.
If you need help with a JSON file, you can upload it to smapi.io/json to see automatic validation and share the link here.
When making mods, it's recommended to edit your files in a text editor with JSON support, such as VS Code, Notepad++, or Sublime Text. These programs will check for syntax errors.
yes, This is what I have
you should remove all the loads related to the loft. you should also remove your edit of data/npc dispositions
you don't need to load in any map, as you're using another mod as a dependency
a user will need to download the apartments mod
to use your mod, and then you just spawn your NPC in that map
also npc gift tastes takes a different format now. let me try to find a wiki link for you
I'm going to try
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!
I already removed the Pelican Valley Loft related thing.
I could see something but it's confusing to me
Ok so I've added a fish to my game and added it to the location I want it in but I want to know; does the game automatically know that the water will contain my fish or do I need to mark a fishing area?
If you so not mark a fishing area is all waters on map
If you have no fish data you will only fish out trash,so whatever fish you have added to your location will be those fish, if you have different areas of fishing on the map you have to be more specific with the data
what’s confusing you? do you have specific questions?
I do have fish data, so does that mean I won't fish up trash?
And how do I mark a fishing area?
I meant if there was 0 data you'd only get trash.
Does your map require different areas? Like the forest has a lake area and the river area.
No, it won't need different areas for this map
ultimately the best test is to just fish and see if you're getting what you're supposed to
True lol
if you're fishing out lewis's lucky shorts.. something went wrong,..
I think there are some mods that will also just sample the fish pool and tell you the distribution. It's been a while since I used them (pre-1.6) so idk for sure if they've been updated
I caught my fish in the water but I also caught some trash. Is it possible to remove the trash spawn or is it hardcoded?
Trash is from fishing skill level iirc
Ahh that makes sense, on this save I'm Fishing 3
i wonder if you just need to put the fish's rate to 100%
How would I do that?
What should a content have? How would my NPC be in the Pelican Valley Loft map because the files inside the house are only tmx files, that the dialogues work, that it can move, that it has events and that it is a character that you can marry?
We need to see your mod's json.
otherwise we are guessing blindly at what you have done
Should I send the files? Because I can't fit everything in one photo.
your content.json should have all of the patches you want to make, unless you’re using the include command, in which case you can put patches in other jsons for organizational purposes and the include command in your content. all of the NPC features you mentioned will be done through patching various vanilla files or a blank json (for example, loading a blank json to your NPC’s schedule and then editing it with a patch). there are wiki pages and/or tutorials for each feature you want your NPC to have
!json you should upload your json(s) to the smapi site in the message below this one
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.
then share the link here as mentioned
Adjust Chance and Precedence
thank you, i’ll take a look at it. you’re trying to migrate from pre-1.6, right? or am i mixing that up
Inside my mod is the manifest.json and the content.json then the assets and data folder, inside assets I have dialog with a .json suchedules with another j.son and inside data an events folder and two other .json
Yes, because it gave me an update error or something like that.
have you used AI on this????
okay, i just wanted to make sure i knew why you were formatting it the way you were. most of this has changed—events don’t take conditions and a script like that anymore. visit the events page to learn how to format them. here’s the general migration page that will walk you through changes you need to make https://stardewvalleywiki.com/Modding:Migrate_to_Stardew_Valley_1.6
i think the weirdness is just pre-1.6 (although someone else would have to confirm)
it looks like made up AI stuff
none of this looks like pre-1.6 weirdness to me
yeah i hope it isn’t, because @potent vigil AI generated content isn’t allowed in this server
oh hmm :(
(also a waste of your and everyone elses time)
yeah look at the event scripts
yeah i know it’s weird and wrong lol i wanted to give benefit of the doubt and that it was just pre-1.6 😭
yeah no event formatting is the same as 1.5
pre 1.6 wasn't that different
Does Nexus have some kind of support for tables in mod descriptions? 
dont think so
code block and ascii art? 😛
+----------------------------------+---------+------------------------+----------------+
| Col1 | Col2 | Col3 | Numeric Column |
+----------------------------------+---------+------------------------+----------------+
| Value 1 | Value 2 | 123 | 10.0 |
| Separate | cols | with a tab or 4 spaces | -2,027.1 |
| This is a row with only one cell | | | |
+----------------------------------+---------+------------------------+----------------+
i wish nexus didnt use bbcode but at the same time…
good luck getting nexus to keep that formatting
I wonder if the day when Nexus adds an option to use markdown ever come... probably not...
it's "planned"
beg picky and he might
whether it is "prioritized" is another quesiton
First, I didn't know that AI couldn't be used, I apologize, but I also want you to understand that this is my first time making a mod (I clarify that it is for personal use) and being new to this I relied on AI because I didn't know how to start and what the structures for modeling were like.
sorry
AI will (and has) lessened your understanding of how to mod stardew
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.
and it's also wasted your time.. rather than helped you
I know, I am aware
Another question.. can I put gifs in mod description? 
The modding wiki will really help you out. No need to use AI, it doesn’t understand the format for the game anyways and will generate crap like that stuff you posted. I recommend scrapping that and starting fresh
I think so
yep
Nexus says you can't use gif but that's a lie
considering that Avi made a romancable npc template it shouldnt be that hard to restart tbh and tias tutorialin my opinion is documenting things well and is easy to understand
Nice, thanks
I just tried an animated-png, It all animated fine.
Gotta make some promo for Seasonal Razzy on the mod page then 
I wonder where I'm hosting the existing images on my page... it's been so long 
I wasn't here earlier because I was working, so thanks to everyone who fielded the questions about the Pelican Valley Loft NPC Apartments! I can confirm that it loads all the required maps and blank event JSONs for the mod's related locations on its own.
The only thing a NPC author should need to do to spawn a coded NPC there is get their bed coordinates for their chosen room (also found in the Google Sheet for convenience) to set as their NPC's Home.
and patch the room to become an illegal den of sin, which has to get raided in a 6 heart event
The location name and coordinates are included together for easy reference
Haha, patching rooms goes behind the bare minimum, and is explained in the sheet as well 🙂
(as is updating the door tile for conditional locking)
"You'll never take me alive Lewis!"
Anyway, thanks for guiding me and sending me the links. I'll try to do it right this time.
If you run into any issues with the apartment mod once you've updated your NPC code, feel free to ping me or drop a message in the thread here. I'm the author of that particular mod. 🙂 https://discord.com/channels/137344473976799233/1345618559727833088
you should add the bouncer to stand outside the door as "security"
I don't have a landlord NPC yet, Limey, so there's room for lore expansion there. LOL
Bouncer's employed, add the Boncher
The landlord is a corgi
Not a talking one but she comes look at you sad if you don't pay rent
There's an office for the landlord but it's always locked
the landlord is secretly Linus
He would never... Betrayal
Betrayal would be making Morris secretly the landlord, but seeing as Morris Redeemed has him live there, Pelican Town is safe from that universe
This made me think of Boncher as a dog... now I wanna see it 
Thanks, I will first modify all the corresponding files and then try to implement it in your mod.
bonched dusty
For a few seconds instead of Dusty I saw something that could qualify as NSFL 
I don't know what you saw but I can't see it
You're lucky, my mind is just messed up 
Yep...
looks very professional
nyall, how do i make whatever music is playing outside continue when i enter a house?
currently it's dead quiet in my npc's house and i do not want it to be lol
Have you set a Music, MusicDefault, or MusicContext in your location data?
(alternatively, "MusicIsTownTheme": true should let the outside music continue playing when you walk inside, though I am uncertain if that is for any track.)
hm, ill check
i have not added one
ill put music context default i guess
but it doesnt seem like any other location does this. bweh
Well it should be defaulting to MusicContext: Default
(in sunberry anyways)
yeah i realized that after typing LOL
ill just. leave it be! i suppose. but good to know this exists
Does Sunberry use the SubLocation MusicContext for its outside map? I know that can kill the music when you leave the space if your destination doesn't match it.
i dont think it does. i dont see it mentioned anywhere
alright.
Well in the interim, you could just manually set a "Music" track ID to prevent the dead silence in your map
all the tracks are listed here: https://stardewvalleywiki.com/Modding:Audio
onto a different issue: my mail is not adding a quest like i want it to, and im not sure why
wait i may have just fixed it
yatta
"Action": "EditData",
"Target": "Data/ChairTiles",
"Entries": {
//chairs
"z_lanihousetiles/8/34": "1/1/up/couch/-1/-1/false"
}
}
any way to make it.. so that the couch draws in FRONT of the farmer? i thought i had it right but hrhhhhgh
do i have to specify something on a non-sittable furniture piece
or like
in vanilla, i see no use of up/couch so im not sure what to do i guess
just down/right/left
Have to use the front tile layer
ok, ill try that
Oh the back of a couch works different
You have to do it as a highback chair from the back
"MidnightsMisc/0/32": "1/1/up/highback_chair/0/34/false/Maps\MidnightsMisc", Here's oine of my couches from the back
i actually have it set rn as a highback chair
"z_lanihousetiles/8/34": "1/1/up/highback_chair/8/33/false"
but i am not sure if the 8 33 is correct (its the tile i want to draw over her i guess)
so what is the thing after the highback_chair then
i guess idk what to put there
do i have to link it to my tilesheet for it to do th- AHHHH
@analog flower padon the ping, i'm just trying to dm you x3
"z_lanihousetiles/8/34": "1/1/up/highback_chair/8/33/Maps\\z_lanihousetiles" hmmmm
i try now
no dice
soo you all wanna hear something funny? My cat peed on my PC last week and killed my Video Card xD
That's the tilesheet's asset name, right? It's tied to that
yeah
okay just checking, I made that mistake starting on couches
the sit, and the tile i want to draw over her... i guess
its (grid) 8,33 in the tilesheet
but do i not. summon it that way
Oh I do see one problem

