#making-mods-general
1 messages Β· Page 494 of 1
Hey everyone! Iβm working on a Content Patcher mod for Stardew Valley to add seasonal and generic dialogue for Willy
I currently have each line in its own patch, using a "When": { "Random: 1, 2, 3": "3" } condition to give each line a 1/3 chance of appearing
Example:
{
"Action": "EditData",
"Target": "Characters/Dialogue/Willy",
"Entries": { "Mon": "{{i18n: {{ModId}}_WillyDialogue_Generic_Monday}}" },
"When": { "Random: 1, 2, 3": "3" }
}
This works, but it feels very verbose, and I was wondering if thereβs a cleaner or more efficient way to do this (I had to make 20+ of this same snippet but different, filling hundreds of lines)
Specifically, is there a way to add a single "When" for multiple entries at once while keeping each entry in the patch uniquely randomized? Or a way to randomize lines without creating dozens of separate patches?
π
(ty willow!)
Has anyone ever experienced this bug where buildings suddenly disappear while moving it? Idk if it's my mod that causing it, I don't have a footage but the building literally just disappear. Maybe a mobile only thing?
For context(see video), my mod allows the player to access any shop, as well as moving, constructing, demolishing buildings. So idk if that's causing it
Is there a size limit for map dimensions in Tiled
i think you'll hit practical limits before technical ones, tbh
generally speaking 200x200 but even that is iffy for performance
if memory serves there is a maximum Y dimension beyond which the draw code gets fucky but i forget what it is. several hundred tiles at least
ah
what i mean is by the time you hit technical limits you will have made a map too big for players to enjoy
is it simple enough to make a specific area/map a specific season throughout the year like if i wanted a just snowy area?
i wanna make a christmas themed mod but realized it would be weird if it was like not snowy all the time jfkljsdf
you can do it with location context like how ginger island is always summer
oh awesome
ill worry about that when im setting up the map then thank you!
i wanna make a little santa's village lskfaf
just be prepared to receive bug reports from people confused why it's snowing in summer
(this happened to VMV)
oh true X3
Hi everyone!
Can anyone confirm whether, when using the SYNCED_RANDOM game state query in two different Content Patches but with the same key, the result is consistent and remains the same for both patches?
yes that is the purpose
Great, thanks!
Dang, it's actually a bug in vanilla mobile, and my mod is making it easier to happen. Apparently, if you move a building while theres an entity Infront of the door, the building will disappear. Now idk what to do to my modπ
@rancid musk Discovered an issue with the mod manifest generator- dependencies seem to be cached somehow even after they're removed
I had an alternate branch with different dependencies to my main branch, and when I switched back they remained in my generated manifest, even after a version change and a full rebuild. I had to delete the manifest.json file manually to get it to remove the extra dependency.
Oh there's an option to start from a manifest base
Need to use that if u want the manifest to get wiped every time
Otherwise it uses any existing as base
Yeah, if you don't wipe the manifest every time, it will assume any dependencies in the file were added manually and should remain there.
I got tripped up by this several times b4 
oh, I thought default behavior was to rebuild from csproj every time
It would be nice if that was just a prop in csproj yes
You can set it to start fresh every time, but that's not the default.
I will do that then, thank you
Thank you!
You can set <BaseManifest>new</BaseManifest> and it will fully regenerate it.
aaah that was added in 2.0, that's why I didn't know about it
I read the docs the first time I used it and then just copied csprojs from my other mods every time since :x
writing events right now, and man, it's really a tough choice to make an npc romanceable or not
romance allows for deeper story, but also then you have to waste precious event time building up that level of emotional connection
anyone else who's made an npc, how did you decide whether or not they were a marriage candidate?
i dont think that counts as wasted time
I wish vs would give you a little notification bubble when you have updates for packages
I feel like I only ever find out about updates from other people
and looking at it as wasted time will probably hold someone back when trying to write it
but you also dont have to write it if you just dont want to
If romance like wasted time then they should be romancable right
building up an emotional connection is like... a big part of the draw of romance
true and true... I guess I'm trying to figure how to 1. introduce the story and context, 2. establish all of her backstory and motives, 3. develop her growth to a satisfying final event, and then 4. Also add a romantic connection in??
it's ok for npcs to not be romanceable if it's too much to figure out
without making players get stuck in event cutscenes for a huge amount of time
there is also no limit to the number of events you can write
you dont have to squeeze everything into 5 events only, spaced 2 hearts apart
Do you want emails over this
you can decide later to add it in an update, if you feel inspired or want a challenge
my thought is they should have that connection anyways. friends should be just as deep.
IMO the difference is just... whether you think they'd be interested in a partner, and whether or not there's a story to tell there
hell no, I hate emails
hmmm.... true, and that's kind of where I'm stuck, like how do I pull this off in 4 events
do it in 5, or 6, or 10, or 20 
but thank you for offering lol
you can do as many events as you want
this is excellent food for thought
Shane has multiple events for 7 hearts. So no reason not to use as many as you need.
i do like to take time to figure stuff out when i'm stuck
i can always add stuff later once my idea reached maturity
usually the reason people don't do more events is just because event-writing is a lot of work
no event time is "precious" event time bc its not a limited resource
so it is impossible to waste something that doesnt exist
Multiplayer struggles a bit in vanilla with longer events (since it can hit 2am while you're in an event in multiplayer), but that can already be mitigated by mods that pause time during events. β€οΈ
current WIP
yummy
those are adorable
thanks π now i need to figure what to do since most of the recipe would need a specific pack of cornucopia
To be fair, one character having dozens of events kinda shifts the balance of the game, so I do understand people not wanting to add more events to the game than the other characters have.
It kinda becomes its own thing then, which is of course also nice, but I do understand players not wanting that, and I do understand creators trying to limit event time in order to create a more "Vanilla Plus" mod.
while it may be true, keep in mind that not all events are centered on one character and this can be a great way to make the character blend, while still progressing the story
If/when it becomes feasible, I do plan to do some 'combined' NPC events that have multiple characters involved for my LoZ NPC mod.
Very true. In the end everything is about balance and what your goal is.
personally as a player i never mind and in fact enjoy when a character has a lot of enjoyable events, even if they have more than others
that is true, but I think it can be somewhat mitigated by spreading the events out in ways other than just heart progression, like time of year, weather, years played, and so on
it's interesting because vanilla events feel super memorable and impactful, and characters don't tend to monologue their stories or anything, but you still get a sense for characters. Most events are less than a minute long!! So when you're trying to recreate that it's almost less about writing than about whittling it down, editing it all the way down
as long as your events dont go against my player agency, i am all for any and all events a mod might add. i installed the mod/NPC because i was interested in them, after all
I love events! My only thing is I don't like getting bombarded with like 6 in a row. (but that's what Event Limiter is for)
oh yeah player agency is a big one
true, thank you that's actually good to remember
I don't like events that put dialogue in the farmer's mouth. either give me a choice or don't have it in text
to add on to this bc of a specific event i had in mind when saying it, please also dont assume that the player necessarily IS trying to be romantic with your NPC just bc they got to like... 5 hearts lol
I've got things planned like Purah and Groose tinkering with contraptions together, Mipha and Sidon hanging out at the beach, and more with the kids (Leo/Aryll included) playing. xD
i feel like i once got an event that felt weirdly out of place because i wasn't even pursuing the npc but the heart event felt like a date lol
... Midna?
Midna's Krobus in my mod.
I'll gladly play-test it when you're ready for that.
in my case i also barely even knew the NPC existed because i just passively gained friendship with them via other mods lmao
Well, I'm at the point where once I get the last few sprite sheets done (fixing Wolf Link, and adding Urbosa, Riju, and Daruk sprites), I'm making completely new NPCs, events, and locations rather than the replacements that the main cast is taking on.
So it'll be in a state for limited testing soon, I hope!
Riju will end up being a fully custom social NPC and Urbosa will be a custom romanceable NPC, so they are a bit more work. π
late but the vanilla villagers, and especially the bachelors/bachelorettes, are, for better or for worse, have exaggerated and very stereotypical personality traits that make their 'deal' more or less apparent, and this applies to their heart events as well
them being just part of the game also means they get more mindshare by default
if you feel your character is a lot more nuanced than that and they need more events to flesh out their character, it's totally fine! I (and I'd wager most mod users) don't go out of their way to install story expansion mods and complain we get too much story, and for those who already like your NPC via their design or personality, more events are just more treats
thinking about that, there are certain elements of gameplay that you just plain can't predict haha
i would say one thing to avoid is using other npcs as ... faire valoir, i'm not sure of the english expression for that
like using vanilla npcs as a way to make your character look more good than them
wikipedia seems to think the equivalent term is "sidekick", which is probably not quite correct but I get the gist 
!startmodding @rugged flax
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.
Mary Sue
i'm not exactly sure what a foil would be
Fwiw I have strong opinions on writing
its kind of foil-esque but not strictly comparable i think based on my googling of faire valoir
but possibly! sidekick can work in some context too
(and i have strong opinion on the use of mary sue π )
maybe you could also call them "unintentional wingman" 
A foil is a character who sharply contrasts with another (usually a protagonist!) to make the protagonist either look distinctly different and sometimes better or worse by comparison.
so there is a bit of that yes
ive always been taught that a foil is not necessarily to make someone looking better or worse but simply to emphasize the difference
Yep, it isn't always to disparage or elevate the protagonist, sometimes it's just to highlight differences.
but there is indeed this idea in "faire valoir" about how to make someone (usually the hero) look better in comparison
I'll be your foil, Laertes. In mine ignorance
Your skill shall, like a star i' th' darkest night,
Stick fiery off indeed.
Hamlet
That might be the origin.
Very possible
Hype man? 
Like, in my mouth, right, should I put some pasta on it first or something
Are all of your randomized lines a choice of three or does the amount vary?
Wait, I misread this, it's not three lines, it's a 1/3 chance. In that case I'd put them all in the same patch because random should re-randomize at the beginning of each day.
Someone please help. My NPCs schedules arent doing anything- there are no smapi errors and i have them all loaded
omg excited about urbosa and riju
Hi
When I am making a mod and I am running it from my visual studio, it says my dll file doesn't exist.
What can I do?
have you slept a day?
Have you tried these steps? They might help! https://stardewmodding.wiki.gg/wiki/Troubleshooting:_NPCs#My_NPC_doesn't_follow_their_schedule!
Having NPC troubles and overwhelmed by the amount of work that goes into making sure they work? No worries, this guide can lead you through some common mistakes of creating custom NPCs and hopefully get them working!
Before we dive in, here are some helpful links for creating NPCs:
Tiakall's NPC tutorial...
testing now
Yeah it's easy to forget, reset the game, panic and then wonder whats wrong lolol
How do I get a dll in my mod folder when I am making a mod?
Question. What type of mod are you making
this is my first time, I'm confused.
I am just trying to set it up so I can start developing
I am using the dummy code from wiki
There's C# mods which have dll and there's content mods which are usually just json
using Microsoft.Xna.Framework;
using StardewModdingAPI;
using StardewModdingAPI.Events;
using StardewModdingAPI.Utilities;
using StardewValley;
namespace YourProjectName
{
/// <summary>The mod entry point.</summary>
internal sealed class ModEntry : Mod
{
/*********
** Public methods
*********/
/// <summary>The mod entry point, called after the mod is first loaded.</summary>
/// <param name="helper">Provides simplified APIs for writing mods.</param>
public override void Entry(IModHelper helper)
{
helper.Events.Input.ButtonPressed += this.OnButtonPressed;
}
/*********
** Private methods
*********/
/// <summary>Raised after the player presses a button on the keyboard, controller, or mouse.</summary>
/// <param name="sender">The event sender.</param>
/// <param name="e">The event data.</param>
private void OnButtonPressed(object? sender, ButtonPressedEventArgs e)
{
// ignore if player hasn't loaded a save yet
if (!Context.IsWorldReady)
return;
// print button presses to the console window
this.Monitor.Log($"{Game1.player.Name} pressed {e.Button}.", LogLevel.Debug);
}
}
}```
I don't know, thhis is the dummy code.
When I load what I have in, it says the mod isn't loading because the dll isn't found
you need to compile it
I see.
what are you editing this code in?
It helps if you actually explain what you want to do with the mod too
So people can tell you if you actually need C#
(unless you just want to try c# for the sake of it, which you're absolutely welcome to)
I am not doing anything with visuals, and I want to change some game rules. Do I need C#?
which game rules?
Stuff like time
can you please tell us exactly what you're trying to do
Slowing and speeding up time
are you doing this because you want to figure out how to do it or just because you want the mod to exist?
because TimeSpeed does exactly this afaik
I am making something more personalized.
I just want to try to make something so I know how to do it.
Are you saying that it is difficult to make this kind of mod?
this would need c# but as a word of warning, messing with time in stardew can be finicky and have unexpected results
but without getting an actual answer from you about what the "more personalised" part is, we can't help you further tbh
I see.
Why?
I'd probably just start with forking and building timespeed
Is it because of a flaw in game design that links fps and time and ticks?
That is a problem but not related to this exactly
Main jank is npc pathing
If they don't have enough time to reach where they need to be they go ??? and wander off into the void
I see.
But yeah you got a existing open source time changing mod right here
Clone + compile it then tweak for your own needs 
But idk how to compile\
(well, gpl, so if you publish anything you make using it your code also has to be open source and gpl)
!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.
The getting started with C# explains most of it
People use different means of compilation im personally a dotnet cli
I see, thanks.
Is it easy to pause the time in the game? And it applies to multiplayer?
To make a mod to pause time
Say, someone with a mod does an action that triggers a time pause
Pausing time in single player is easy and happens often in vanilla (anytime you are in a menu)
Multiplayer needs extra handling so there's a separate mod for that yes
I'm not sure if that one allows a single player to pause the time on their own though
Pardon?
You need the similar sort of mp messaging
To tell every client involved to pause time
Do you mean that everyone on the server needs to have it installed, or is it even more complicated?
everyone having the same mod is a given
But what I'm talking about is that you must have the client triggering the time pause broadcast a message to all other clients connected
To tell them to also pause their time
I see.
Stardew does not have concept of a server, it is peer to peer
Yeah, I just forgot the word "client" for a split second
The host player does more processing of the world but they are simultaneously a client so not exactly it
you aren't trying to do something without other people in the save knowing, are you?
no
I'll look into this one
But what does that mean?
that the mod chu linked only pauses the game when it's meant to be paused for everyone in the save, not when one person does something
So all players need to be in the menu at the same time for it to pause?
Thats the problem I am trying to avoid by making my own code. Its what I meant by "personalized"
Personalized can mean literally anything but im glad you explained it now
it would probably help if you tell us exactly what you're trying to do tbh
you want the time to pause any time anyone is in the menu?
I don't know tbh, but I think it would be annoying? your time will get paused any time someone else opens a menu
your friend opens a menu at 7:50 so you can't go into Pierre's until they get back and close it
Yeah, I just want to know how to do it
It will only happen under certain circumstances, not just having a menu open.
then how difficult it is will depend on those circumstances
I understand.
I don't really get the secrecy tbh but good luck making your mod, hopefully you figure it out
Yeah, but that makes all of them randomize, I want each one to have a chance of 1/3 to randomize, I did this earlier and all of them randomized, hence, same patch
so all of my dialogues need a 1/3 chance, like
out of lets say 20, 7 may have changed into mine
or else, all 20 out of 20 changed, which is if you apply that into a single linear-entry list with the random condition
at least from what I have attempted myself
an npc only picks one dialogue per day, why does it matter that they are randomized individually or all
That's my point - if they're all daily dialogue for the same character, you're only going to see one anyway
Yeah
Or what selph said 
The way I'd do it would be to split into a group of 3
I am dumbo! : D hahahahha...hahahahh!!!!hahahahahahahhaha
oh wiat
hold on
the reaosn is because
does this apply every day? or not
or is it everytime you load stardew
It should re-randomize every day.
tokens reset every day (unless otherwise specified) yes
oh? thats unique, good to know, ty!!
is there wiki about tokens
(im new to em)
That would be in the Content Patcher documentation 
Do dll files work with mac?
Yes
Oh, so if I make the mod on my windows it would run on someone's mac or other os?
Most of the time. Be careful with directory moving, though, it varies from Windows to Linux (Mac is UNIX based, so similar to Linux)
I doubt you'd come across that issue, but I believe if you get to those crossroads, you can always ask here
But regardless, your fine 
with CP mods, it's pretty hard to break compatibility with a specific OS, as far as I know
C# mods mostly need to normalize file paths, which is done with some content helper methods or this generic utility:
https://www.stardewvalleywiki.com/Modding:Modder_Guide/APIs/Utilities#File_paths
(Android doesn't count because it's a significantly different game
but it's still safe for most CP assets)
Worth noting that this only applies when using c#'s built-in file API, which 90% of the time is not what you want. Also, you can use Path to create valid platform-compatible path strings
right, dealing with files through the SMAPI helper is a lot cleaner and covers most mods' uses, at least
Thanks!
C# apis generally are forgiving and would fix \ vs / for you.
easiest way to break OS compat is case sensitive errors
Great to know
Oh god don't remind me
Becomes fun once you start doing it all yourself
Python is thankfully more leniant, but if you want it to work on Windows, Mac, Linux, FreeBSD, and other kernels
It's best to play safe 
typically i just keep like
If I want to make something happen for a set amount of time, like pausing time for 5 seconds, would I need to write the code as x amount of ticks?
a list of directories with environmental variables
Python is weird because the answer to the question "how do I do x in python" is 50/50 "just import this library!" and "write your own 1000-line janky implementation that breaks when you look at it funny"
dont forget to do the most convoluted list comprehension possible so its one expression
flashbacks to manually assembling zip files with custom file flags
Python can be like that, mostly recommend doing yourself unless its long.
If you think thats weird, in C, using Win32 on Windows 95, I had to bundle a .exe, into my .exe, since it was 12k+ lines of code to actually zip a file, since C doesn't hae native zipping, and all modern libraries, and old ones, are no longer available on the internet, or work.
That is called fun!
LOL THIS BUT IN C its a nightmare
I had to use a literal zip exe (handled all zip logic) bundled almost 30 years ago and connected it internally into my app
that is messy but somehow worked
in theory yes, but SMAPI has various events like "one second update ticked" and "time changed" (in-game time, which changes by 10 minutes every ~7 seconds while unpaused), etc
https://www.stardewvalleywiki.com/Modding:Modder_Guide/APIs/Events#Game_loop
Okay, thanks.
Everything I read about C makes me glad I don't write C
Not the language itself so much as compiling woes
It's a savage..performant...but performant for scary reasons, you end up building it all yourself
hmm didnt have much issue, but I was compiling on 95, as a beginner, I did get it to where it overwrote the win32 native library so I had to reflash windows 95
instead of actually referncing the internal lbirary
I am close to releasing an update to my extension, but I did this today and thought it was cool. It will parse i18n strings and show their translations
That looks awesome!
woah!
I just have a few bugs to work out
is that a vsc plugin? rly neat!
sure is
Oh neat does it handle language folder i18n?
are there versions of the game's tilesets that come with the properties saved?
The tilesheets themselves don't have any of that data, no
You can export tsx files from maps though
And then embed those tsx files onto another map to get things like animations and tile properties
yep, it detects all the language files in that folder
so go through and define each tile once and then save that as its own file for future use?
Make sure to actually pick a map that has the props you want
You could do it that way, it would be tedious but at least you'd have all the properties you want.
Or like chu suggested, to just pick a map that already has the properties you want
ohhhh yeah that seems a lot smarter π
thank you for your patience, very new to this
Sometimes there just might not be maps that have all the properties you need though
So you'll have to fill those gaps in yourself
@lucid iron here is a good example
To initially snatch that .tsx would i just select the desired tilesheet and do the "export tileset as..." to keep the properties?
Mhm, and save it as a tsx
nektar 
https://smapi.io/json/none/80056b2098ee4b208a3411351457c8fa
What tag should I use for required tags in irish moss fish pond?
nvm i figured it out
how do i use > in dialogue without it turning into an arrow symbol??
you cannot without a custom font
oh 
Log Info: SMAPI 4.3.2 with SDV 1.6.15 build 24356 on Microsoft Windows NT 10.0.26100.0, with 7 C# mods and 1 content packs.
Suggested fixes: One or more mods are out of date, consider updating them
needs a little more debris
yeah
it looks like u exploded the data objects
Can you check to see if it works? I am worried about how the timing works.
And you warned me about the potential problems. I haven't been able to test it myself because I would need a friend.
the best way to test is to do it yourself 
you can coop with yourself
no you start 2 instances of the game
and join yourself via LAN, leave ip blank
Do i launch the other one not through steam?
tho hrm i guess your mod is specifically hard to test like this bc it's time related 
need to make sure to turn off pause game in background
I see.
you can launch game just by running it from the folder, there's no DRM
From what it seems, will it at least make time slower?
10 minutes in the game should be 7 seconds irl, right?
Yes, except for Skull Cavern which is 9 seconds
It has zero effect, I need to do some editing.
I am so confused guys, this is my first day modding.
I bet its something to do with the way stardew valley handles time
Keep at it, your harmony patch looks fine, you've got a clamp for milisecond scaling, just test and debug
Guys
I cooked
It worked
If something goes wrong I can always change it again
Its because harmony wasn't enough to change the timeflow of the game. I had to take extra steps
Do you guys know what I mean?
Is there a size limit for map dimensions in Tiled
asking this again but clarifying context:
I want to add tiny mini-farm maps off to the edge of a big farm map so in multiplayer everyone can have their own tiny space to decorate and then work on the big farm together for cooperative capitalism. However, as far as I understand, the cabins need to be on the main farm's .tmx and the pets only go there (unlike other animals that can be shoved into PIF rooms)
* other options for how to go about accomplishing the minifarm goal also very very welcome - current Big Map we chose was IF2R
in newer Stardew builds that method often uses other time values (e.g. GameTime.ElapsedGameTime, TimeSpan.TotalSeconds, Milliseconds, etc)
Thats the lesson I learned from this
Ah so like, UpdateGameClock was touching multiple time values so it might have scaled the wrong one or scaled more than once
They seem to change it between updates
It will break at some point again and I will need to fix it
they would all need to be within the same actual Map/Location but you can add intra-map warps between them or minecarts or somethin. i think people mentioned the possible rendering issues around 150 or so tall iirc? but you can always just try it and see how it works
Yes I was going to create warps in the paths
my concern was the rendering issues. IF2R is 163x156 already
@inland crater Not to sure about time but yeah there is some info on 1.6 changes, not sure if you need to do like a GameLocation to adjust for different locations like Skull Cavern?
Cool 
I think giga farm is right at the limit
The actual problem has nothing to do with tiled and more to do with how game deals with updates
There's an open world mod that raises the limit significantly by chunking the map
thank you that helps
Is that the procedurally generated one? Have you tried it? Is it any good?
Yes, nope, not qualified to answer
Haha, I haven't played in a while and was curious about that one
It works by set pieces i think not sure of it do any waveform collapse shenanigans
Interesting, it doesn't have monsters or creatures or anything spawning in it right?
OH wait, it does have monsters
I need to look at this lol
Thats weird though, my mod does not cover that
I don't think it does, at least.
Because in skull cavern, time is different for each player.
How does that even work, what does the world time default on
Yeah that's what I was getting at haha
?
But its not like the mod slowing time down would stop slowing time down
It will still have its time slowing effect, I just don't know which time it uses as the base speed
Maybe I should test, lel
Honestly I am not sure on that one, it looked like some kind of "every player has their own time in skull cavern" deal
skull cavern's time difference is disabled in multiplayer
It follows the 7 seconds, and the time slowing still works as normal,
says the idiot here timing every 10 minutes with stopwatch
Thanks I didn't know that
I always played skull cavern on my own 
Can this be used to insert icons in a dialogue?
yes, it should let you add support for any unicode character
Yay, thanks chu!
you can also use it to lie and use whatever character you want for anything, but try not to do too many unicode crimes with it /lh
oh but ichor can u make it so that a font is exclusive to a particular npc
for the undertale mod ofc
not directly
hold up, what are you talking about?
you could make a whole separate character set and use that exclusively for a particular character, but there's no tying to NPCs or whatever available in it right now
it is joking claim that there will be an undertale mod ft sans and papyrus with faithful reproduction of their speech
i am not making an undertale mod
(i did also make an unpublished framework that would support their sound effects)
Hello, been a long time.
I was one of the modders who made the Toshinori Yagi NPC mod, and I started work on my new NPC about a year ago. I am wanting to pick up where I left off, but I have a feeling that the game has changed singificantly in a year since I started my old NPC.
Has anything huge changed that I need to be aware of? Would anyone like to look at my alpha build to make sure it's functional in the current game version?
I also forgot like... a LOT of how to write events. Has anyone created any up-to-date guides on heart event writing, perhaps?
Thanks for your time.
!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.
-
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 game has not even updated in nearly exactly a year
im not sure what your frame of ref is but here's some 1.6 tutorials
Oh excellent there's a 1.6 guide, this is great news
it depends on if you stopped before or after 1.6.9 mainly
Yeah Toshinori was an extremely complex NPC at the time I made him; it was before 1.6 though. I delved pretty deep into modding various systems, even had some custom scripts involved, but that knowledge has long left my brain
Do people still use MFM (mail framework mod) or is there a better way to send letters now?
most letter-related things can be done vanilla
MFM has some extra features still so its not obsolete
sometime Soonβ’ we're supposed to get a patch update with some new features, but then however far down the line is 1.7 where we might get The Good Stuff
you can send letters with trigger actions
Oh ok! yeah I used MFM for Toshinori and I did like its features, so if its up to date then I'd like to keep using it
mfm has some fancier timing stuff and it still works so
no problem if u wanna keep doing it
I used letters a lot as triggers for events
people might ask why you're using it, though
it's got content patcher integration too so that u wont need a second mod
can letters still be used as event triggers without MFM?
yea
yes
Ok, great. That's something I'll definitely need for my new NPC, i used them a lot as preconditions for Toshinori as I recall
its been years since I've done this stuff tho, so I'm extremely rusty
u might not actually need these anyways cus
i think game state queries can be directly used as precond
they can yes
yeah you could even use PLAYER_HAS_RUN_TRIGGER_ACTION and skip having to set a mailflag entirely
I'm already a little bit lost, but I'm sure it'll make sense to me once I find a place to dive right in again
(trigger actions and game state queries are two of the major 1.6 features that i really like and am glad we have)
i like trigger actions and GSQs a normal amount
and triggers right
The main goal I have with this mod is integration with Pacifist Valley. Its always been a fascination of mine to have a character associated with the Adventurer's Guild that cannot stand violence and would potentially reward the player for not killing monsters.
https://www.nexusmods.com/stardewvalley/mods/5464
Is this mod still up to date/working with the game as of its current build?
no triggers suck actually
Oh it has a continued- ok, didn't know that. Also I forgot about this mod compatibility page, ty for the link
https://www.dropbox.com/scl/fo/ni99fffcsuy74kovm7uce/AAau8QDhgdQKNZBPlOD368A?rlkey=hointx12eu3dpbb68h2ec9rhc&st=xrdacsm8&dl=0 this is my alpha build, if anyone wants him. I have done very little beyond adding a character to the game however, my next goal is getting all his events working before I start integrating more complex things (like him recognizing if the player has Pacifist Valley installed and rewarding them for becoming less violent)
My main concern is like- remembering where I was when I left off and making sure that nothing I had previously designed is now irreconcilably obselete
i don't think game really changed that much 
people did make more toys ofc u can check the framework page
Thanks! I'll take a look around
Is there documentation on how to add mail with CP?
hm i dont recall one off hand, maybe?
it really is just a particular application of trigger action tho
using AddMail
yes, on the trigger action page itself there is an exact example of using CP to send mail and add a CT
OK, thanks! I think at this point I just gotta sit down and start trying to remember how to do events and mail, and come in here if I run into any specific problems . thanks for helping get me back up to speed ^^
hm what type of framework is monster variety 
between item/map/misc
same question for grass variety i suppose tho i think that one's a map/location 
is there a SMAPI command to set player access to be able to go into the sewers on day 1? I feel like this is possible, but I forgot it and I would like it for testing purposes
debug warp sewer will probably do it, if the map is named well
That might work! I added a custom area in the sewer that I want to be sure still works
not the same as unlocking the door, but the result is the same 
debug seenmail OpenedSewer will work as well 
Thanks! Yeah, the warp worked fine for my testing purposes- I was just making sure my mod still worked after all this time, and he does! It looks like all the content I made originally is still accessible as intended
Now its down to making events and turning him into a full-fledged NPC.
My second question: I wanted him to give him Room Mate code similar to Krobus, where you can become his room mate instead of marrying him. Is this more feasible to code than it was in the past? Is it as simple as looking at how Krobus is coded and doing some rough copying of that?
oh, it's pretty straightforward now. i don't know exactly what it is, but it's dehardcoded, so you just set up the roommate-proposal item and connect it to them with character data fields or something simple
its a context tag on the thing and usage of the roommate dialogue asset
Thats great news, I remember wanting to do this in the past and it was so hardcoded I got intimidated
Kieran is ace/doesn't want children, but he's VERY lonely (he lives in the sewer with Krobus, haha) so being roommate coded is perfect for him
you can make an NPC not ask to have kids even if theyre marriagiable
this is super stupid, but why can't I figure out what font size my nexus mod description is? It says small when I put my cursor on it, but when I highlight it and select small, it gets smaller, but when i select normal, it gets bigger?
welcome to nexus's wysiwyg mod description editor (a crime against humanity)
it's best just to smack the BB button in the topright and edit the bbcode directly
this is why i always just make my descriptions just boring 3-5 sentence descriptions π
the only reliable way i know to get sane results is to--- yeah that, edit the bbcode directly
and never use ctrl+z or ctrl+v
Oh bless
i always just copy it from one of my other nexus pages, not even in edit form just from the public page, paste it in, and fix the linebreaks
it does help that all my descriptions follow the same format
what is bbcode? this feels like some weird mashup between markdown and html
short for bulletin-board code, it really is just a similar style of markup/markdown for formatting text
its almost as old as HTML
hm interesting thanks. I'll definitely just be using the bbcode editor in the future
nexusmods is at its core just an ancient bulletin-board forum with a very warped presentation over the years
i think they're trying to sanitise it these days (read: make it sane) but i'm sure it's like trying to knit a sweater out of cooked pasta
Lol imagine if the sewing skill mod had spaghetti as a cloth type
Or even just base game tailoring
you can feed spaghetti into your sewing machine to get a spaghetti-soaked shirt
which is a very novel feature in gaming
it'd be nice to have spaghetti in the spool and the feed though
Finally converting my mods into actual projects
so I can continue to work on them, almost one down after 5 hours... may this be a reminder to really reflect on the depth of the hole you are digging yourself when making anything in a way you know isn't gonna last.
Oh my sweet summer child
nexus bbcode scares me so i simply pretend it doesn't exist
oh r u use ilspycmd to do it
Was using DNSpy for like a year for everything, but since like 2-3 months ago it stopped really working on account of how archaic it is .net wise. (It was on and off giving up but seems like it officially kicked the bed)
I did experiment with ilspycmd (at least its latest version) though it cant quite get a perfect decompile down of the entire stardew codebase and has a decent amount of manual tweaks needed
I really liked how easy it was to make small tweaks and test with, but the price of it all is becoming very clear 
yea i just mean bc ilspycmd is command line u can run it one time to get something resembling a project
and then start fixing it up from there
ilspycmd -p --nested-directories -r "$GAMEPATH" -o MOD-CSharp $1 -lv CSharp10_0
put the game folder in $GAMEPATH and the mod dll path in $1
if you have the discord server level, getting access to the decompile repo is convenient as it has all the manual tweaks done
(sinz awa wrote all their mods by recompiling in dnspy)
Yeah I was able to get it into project pretty quick, it has just been the tweaks themselves that have been more intrsuvie than I expected
Or maybe it hasnt been so bad, just a steep learning curve for me
yea i did find that ilspy doesn't know what to do about harmony patches
Since this is my first experience working with this, and the new IDE
it might be something i can fix with -r?
never looked into it
maybe if i also put in the smapi-internal folder 
yeah everything harmony-wise is still giving errors
I want these wild trees on the farm to regrow daily after being cut down - they spawn in correctly, but they aren't regrowing on a new day, am I missing something? π€
That might just come down to a reference issue though since I havent resolved that
ah yes it is a lot better
ilspycmd -p --nested-directories -r "$GAMEPATH" -r "$GAMEPATH"/smapi-internal -o MOD-CSharp $1 -lv CSharp10_0
try this (but w/ ur paths)
were you using dnSpy, or dnSpy_Ex_? because dnSpyEx is still being updated to this day
its a fork of the original dnSpy
if you are on windows and thus visual studio you can have hot reload which does let you do code changes live
Just DNSpy, I heard about DNSpyEX and wasn't sure if I should be tempted into keeping my current bad habits haha
without restarting smapi
i find dnSpy decompiles some functions a lot better than ilspy personally
i also used it to learn how to write transpilers initially with its ability to edit a class in place and then see the resulting new il
i dont think dnSpy is a bad habit
when I was experimenting with automating the decompile repo I got up to
ilspycmd -o D:\Git\StardewValley\Code --nested-directories -p -usepdb --ilspy-settingsfile D:\Git\StardewValley\ILSpy.xml -lv CSharp10_0 .\BmFont.dll .\Lidgren.Network.dll .\MonoGame.Framework.dll .\SkiaSharp.dll '.\Stardew Valley.dll' .\StardewValley.GameData.dll .\TextCopy.dll .\xTile.dll
with the config file
and it has some positive changes compared to the existing decompile repo (preserving enum usage) along with changes to how structs get initialized
- if (this.m_status != 0 && this.m_status != NetConnectionStatus.Disconnected)
+ if (this.m_status != NetConnectionStatus.None && this.m_status != NetConnectionStatus.Disconnected)
-HalfSingle hx = default(HalfSingle);
-hx.PackedValue = message.ReadUInt16();
+HalfSingle hx = new HalfSingle
+{
+ PackedValue = message.ReadUInt16()
+};
I don't think these are meant to do that, they only spawn once at the start of the save afaik (probably because people like having a lot of control over their farms)
button i think using dnSpy to make mod is the bad habit discussed here
as in entirely using it to compile the dll
why would using ilspy to make a mod be any better
awa is convert their mods which only exist as dll previously to csproj + source code i think
Yeppp that is what I am trying to do currently
seems like dnSpy would work just as well then is my point 
darn, I wanted the trees to be farmed and regrow similar to how it works in cindersap. Unfortunate
yea i imagine using to do the decompile is similar, as long as you do the same reference path settings to game folder and smapi internals folder
I kinda want to document the gaps in ilcpy (via cli) and see if any are willing to be fixed upstream, because I have no idea why ILSpy decided that this nested function just... doesn't get emitted
its visible in ILSpy in one of the magic compiler hack classes that goes along with it, it just doesn't appear in the outputted C#
(Well, the function isnt actually there π )
it doesn't emit the 'true' location either though
but does emit the function calls to something it didn't emit
hey yall this isnβt exactly making a mod per se but would it be possible to find all possible dialogue for one specific character in the code or is that not something that can happen???
you can unpack the game assets
!unpack
Follow this guide to unpack the game's content files in order to see and explore how the game data is structured.
It's helpful when making your own mods, or just to learn about how the game works!
all the dialogue for one specific character is likely going to be scattered throughout multiple files though
so you'll have to do a bit of poking around
OOOH alright thank you!
Hello! I could use another brain on this. I am looking at my code and assets and can't figure out why this is happening. For some reason the tree sapling animation is not working properly and it is showing parts of the fully grown tree in the frames instead. 
Here is a picture of the fully grown tree beside a sapling:
https://i.imgur.com/mue7zbZ.gif
Also attached a picture of my asset.png
Here is my code: https://smapi.io/json/none/78c526925206458a866e8a03e0ed20a4
Here is a preview of the one section I am focused on, which is hopefully where the problem is?:
"Action": "EditData",
"Target": "spacechase0.SpaceCore/TextureOverrides",
"Priority": "Late +11",
"When": {
"Festive Tree Timeframe": "BeforeFeast",
"Day": "22, 23, 24, 25",
},
"Entries": {
"Shyzie.FestiveTree/BeforeFeastFestiveTree": {
"TargetTexture": "TerrainFeatures/tree3_winter",
"TargetRect": { "X": 0, "Y": 0, "Width": 48, "Height": 96 },
"SourceRect": { "X": 0, "Y": 0, "Width": 48, "Height": 96 },
"SourceTexture": "Shyzie.FestiveTree/CurrentSprite:0..1@40"
},
"Shyzie.FestiveTree/BeforeFeastFestiveTreeSapling": {
"TargetTexture": "TerrainFeatures/tree3_winter",
"TargetRect": { "X": 0, "Y": 96, "Width": 16, "Height": 32 },
"SourceRect": { "X": 0, "Y": 96, "Width": 16, "Height": 32 },
"SourceTexture": "Shyzie.FestiveTree/CurrentSprite:0..1@40"
}
}
},
Looking at the SpaceCore docs, and I don't see SourceRect as a field there for the animated textures?
what happens if you take out the SourceRect?
there's no sourcerect but having extra field should have no effect
you should move your sapling animation to another texture for ease of organization
the thing you are seeing is the first 2 16x32 frame on Shyzie.FestiveTree/CurrentSprite, which would be source rects 0,0,16,32 and 16,0,16,32, aka top of tree
if u dont want to rearrange textures then you need to put "SourceTexture": "Shyzie.FestiveTree/CurrentSprite:18@40,Shyzie.FestiveTree/CurrentSprite:21@40"
Gotcha! I saw that on my old DGA code but didn't know why I put it before lol
Thank you!
Just got back from doing a chore,sorry for late reply :3
Maybe it worked on dga before 
Looks like it doesn't work anymore, using the SourceTexture "Shyzie.FestiveTree/CurrentSprite:18@40,Shyzie.FestiveTree/CurrentSprite:21@40"
Might have to separate the textures afterall siiigh
could you send the image directly in the channel btw? imgur is blocked in quite a lot of countries nowadays (including the uk haha)
π€ this is the image
Hey, It's my first time making a game mod, but I'm a long time programmer. I am trying to use content patcher to add a new machine. I made it so I can use the console to add the new BC to my inventory and put it down with my custom sprite, but when I try to put items into it to trigger it, it doesn't work. I followed a tutorial I found online and can't see anything I did wrong?
Could y'all help me out? Is the best way to just paste the 3 related objects from my Changes array in content.json in here?
It's possible that i counted the frames wrong
Did you do anything on Data/Machines
Yeah, I did an EditData on the same Entry... I think?
"LogName": "Add analyzer rules",
"Action": "EditData",
"Target": "Data/Machines",
"Entries": {
"BreedSeed_Analyzer": {
"OutputRules": [
{
"Id": "BreedSeed_AnalyzeOutput",
"Triggers": [{
"Id": "BreedSeed_AnalyzeInput",
"Trigger": "ItemPlacedInMachine",
"RequiredItemId": "(O)472",
"RequiredCount": 1
}],
"OutputItem": [{
"Id": "BreedSeed_AnalyzeOutputItem",
"ItemId": "(O)472",
"MinStack": 1
}],
"MinutesUntilReady": 0
}
]
}
}
}```
Last edited by AtlasVBot on 2025-09-13 18:56:04
Stardew Valley 1.6 now natively supports machine rules, so you (for the most part) no longer need another framework like PFM, only Content Patcher. With that being said, machine data could be somewhat complicated, but once you know how things are formatted and how certain CP concept works it should...
Ah your id is wrong
Need the (BC) in front
On line 6?
Do you intend on transforming item 472 into item 472
that definitely did something
And yeah, I was just trying to give the same item back for now
more POC than anything else
BreedSeed_Analyzer has to be (BC)BreedSeed_Analyzer yes
Thanks!
If u look at unpacked all machine data use the qualified id
unpacked?
!unpack
Follow this guide to unpack the game's content files in order to see and explore how the game data is structured.
It's helpful when making your own mods, or just to learn about how the game works!
awesome
I think the frames are correct, cause they're the same in my old DGA code too
can we see your full json as it is right now?
(and preferably a non imgur image if possible)
Is there a way to keep an NPC showing the βsingleβ status in the social menu, but prevent them from being datable or marriageable until certain conditions are met?
π€ im not sure about keeping the "single" status, but i know you can just change the "CanBeRomanced": false, in an npc's character data based on condition
doing so is what removes the single status
if an NPC isnt romanceable then it doesnt show that they are single bc they are ineligible to begin with and i dont know of a way to change that, framework or otherwise
could maybe try adding RejectGift_ dialogues for the bouquet and pendant? i dont remember if those have priority
I want to keep the surprise element in my story so the removing of 'single' tag in menu would make it more less like a spoiler.
Thanks, I'll try that.
Yeah RejectItem_ dialogue seems to work, thanks again Buttons.
If I want to trigger a event by gifting a specific item, but don't want to consume that item, is there any command I can use?
I think you can use the RejectItem dialogue key with $v?
oh no
uh oh
AI mod guy released a performance boost mod. The number of those I've seen that do damn anything is slim enough...
ahahaha
is this no more lag 2
i think i havent seen any more logs with that mod in them at this point
are comments enabled
Looks like it's supposed to set the process to high priority, and for some reason the guy tagged it with "fallout Modathon 2025" and not AI
Sure are
actually he has two event/contest tags that make no sense
Not AI though
Yar, at the early days of their mods, they tagged them with everything.
Except AI and the NSFW stuff.
I guess they figure it was ~exposure~
sdv performance mod in the fallout modathon 
why do they have screenshots of their source code now
any why warn us not to do something the mod doesn't allow in the first place
i..... dunno.......
iro will you warn users to not use your tilesheetinator as a toaster
look this guy can't write a description without getting a machine to do it, I don't expect good decisions on even just how to share code
thanks, I'll try it
How do I know the coordinates of the location I want my character to move to in an event?
Cool, I'll add it on later
hm, if i want a character's dialogue to be set in a linear fashion, ex: line a triggers, line b triggers the next day, but only if line a has been seen, how would i go about that? I had a (bad) idea for a mod that would make use of something like this
but im not sure how it would go
don't think there's a GSQ to check whenever a dialogue line was seen
Maybe add a flag at the end of dialogue A?
Not sure if it's possible, but sounds likely
add a conversation topic from that line of dialogue using $t?
I got some babymode questions as I try to remember how modding works
If my trigger for sending mail to a player is HasSeenEvent, where would I put that to have mail sent to the player?
Right now this is what i have for my very incomplete mail json
"Changes":[
//Adds Mail
{"LogName": "Kieran's Mail",
"Action": "EditData",
"Target": "Data/Mail",
"Entries": {"Aeolian.KieranMail001": "{{i18n:Kieran.Mail001}}",},
}
]
}
and the i18n
//Mail
"Kieran.Mail001": "I felt it would be advantageous to stay in touch. I do not wish to burden you, so please accept this as a token of a mutually beneficial relationship. If you go into the mines often, it would assist me greatly if you could bring back some ingredients. %item money 100 %% %item conversationTopic TalkingAboutKieran 7 %%",
The event I want to use is called "Aeolian.Kieran001" and I'm drawing a complete blank on where I'd put it to ensure that this mail is sent after this event is viewed.
You would use that as a condition in the trigger action that sends the mail
There's a Condition field that you'd use a GSQ to check if the player has seen the event
Where in my code would I plug in the trigger action?
The trigger action would be a separate patch than the mail patch
I feel like this is different than how it was before 1.6 which is why I am so confused
I didn't mod before 1.6 but I do believe that was changed
@karmic gust You leveled up to Farmer. You're now a prettier shade of blue. Thanks for sticking around!
Or that I was using Mail Framework Mod to do mail in stead of Content Patcher
so I am very confused, I don't know where to put trigger actions as a separate patch
Sorry, I'm not always the best at explaining! You would do another EditData patch
It's 2 different patches because it's 2 different Target
Mail has to first exist
And then you can send it with action
Not that different from say making an item first and then adding it to gift taste in separate edit
I have a question, I'm planning on making a mod where one of the bachelorettes has a pre established child (npc like jas and vincent( father is out the picture)). Would it be possible for both npc's to move in with the player ?
Needs a soonβ’ framework
Or a multiple spouse mod and have the child be setup as a roommate
ahh okay thanks so much !
woah thanks a lot
let me see if I can make sense of it
so I would add another patch
that looks like this
"LogName": "Mail Trigger",
"Action": "EditData",
"Target": "Data/TriggerActions",
"Entries": "AddMail Current KieranMail001"
},```
and right here I want a code for "when" and "PLAYER_HAS_SEEN_EVENT current Aeolian.Kieran001", I know there's a way to add 'when' but I don't remember how π
Sorry, I know I'm like mega babymode rn and not doing this correctly probably. i'm just struggling to remember how to do this
Ah no the entries don't work like that it's a model
i do not understand OTL
The trigger action page I linked has an example of how to set it up correctly under the Triggers tab
Since vanilla mails also go through trigger actions now
We're getting a framework for that? π
"Action": "EditData",
"Target": "Data/TriggerActions",
"Entries": {
"{{Aeolian.Kieran}}_MetKieran": {
"Id": "{{Aeolian.Kieran}}_MetKieran",
"Trigger": "PLAYER_HAS_SEEN_EVENT current Aeolian.Kieran001",
"Actions": [
"AddMail Current {{Aeolian.Kieran}}_Kieran.Mail001",
"AddConversationTopic {{Aeolian.Kieran}}_TalkingAboutKieran 7"
]
}
}
},```
Does this look correct?
I wasn't sure what "Condition" meant or if I needed it in there
I've only been working on it for just under a year

Interesting 
Hm is Aeolian.Kieran just your mod id? If true you should either not use it as a token or just put {{ModId}}
Yes its my mod ID
so {{ModID}} automatically replaces what is inside the brackets with my mod ID? is it pulling that from manifest.json?
because in manifest.json its called "Unique ID"
Yep
Yeah it's a content patcher token
And it aint checking generally for manifest field names, just specifically means your mod id aka unique id
how do I know for sure it is pulling the correct name of my mod
you can look at content patcher's source code to make sure, or test it empirically. either one should work
The trigger field refers to when to apply the action, condition is a separate field
patch parse "{{ModId}}" yourmodid
This will show you the token's value
So trigger would say one of DayStarted, DayEnding, or one of the other options
patch parse?
Yeah sorry i dum
But you can also do patch export on the asset so that you know your edits worked
so the trigger could be "DayEnding" and the condition "PLAYER_HAS_SEEN_EVENT current Aeolian.Kieran001" ?
Yeah
Does caps matter? Not sure if I need to all caps everything
I just copied the exact thing from Game State Queries
That I'm not sure. I just copy the format on the wiki
so this is from my mail json, which I 'included' in the content.json. if I had this plugged in as-is, would it work the way I intend (player gets mail after viewing Kieran's first event)
"Changes":[
//Adds Mail
{"LogName": "Kieran's Mail",
"Action": "EditData",
"Target": "Data/Mail",
"Entries": {"Aeolian.KieranMail001": "{{i18n:Kieran.Mail001}}",},
},
{
"Action": "EditData",
"Target": "Data/TriggerActions",
"Entries": {
"MetKieran": {
"Id": "MetKieran",
"Trigger": "DayEnding",
"Condition": "PLAYER_HAS_SEEN_EVENT current Aeolian.Kieran001",
"Actions": [
"AddMail Current Kieran.Mail001",
"AddConversationTopic TalkingAboutKieran 7"
]
}
}
},
]
}
They'd get mail after going to bed 
Yes thats fine, it would take kieran a while to write the letter
Although hm it occurred to me that you can send mail in the event too right
I am not sure of that
Yeah you can
/action AddMail <same args>
I do want him to send it after the player leaves, or the next day
If it's just 1 day after then this is fine cus AddMail has a tomorrow option iirc
Trigger action is needed if u need more complicated condition like a week after event seen or something like that
Since I've moved the conversation topic into the Trigger Actions, I can still keep the contents of his letter to include money the way it is, right?
This is in his i18n file
"Kieran.Mail001": "I felt it would be advantageous to stay in touch. I do not wish to burden you, so please accept this as a token of a mutually beneficial relationship. If you go into the mines often, it would assist me greatly if you could bring back some ingredients. %item money 100 %%",
Yes. You can also add conversation topics in events
Ok! I think im starting to remember how things work, thank you everyone for your patience with my noob questions
in many cases, caps does not matter, but i recommend pretending that it does, because the times it does are surprising and occasionally (file paths) OS-dependent
that last bit is about doing a FromFile or any SMAPI function that takes a file path: on Windows, the file system itself is case-insensitive, so case mismatches are silently fine, but on linux (and i think macos but who knows lol) it is not and your mod will break
Interesting. That's good to know!
I just tested in-game and the mail did not work, so now I'm sure I did something wrong
MacOS is by default file paths case insensitive
is "DayEnding" when the player goes to bed and not when the day/night cycle completes?
But it is a thing you can do in setup
Yes
Ok, so I did something else wrong then π
So, in the GSQ land, caps dont matter until they do (ie, an NPC's name) so it's better to just assume it matters
But, actually, you dont need all caps because it does actually not matter in this one specific instance
So I'd debug first by patch export mail and trigger actions to see if your edits went in
how do I do that
yes, his letter is in there
it looks like it didn't read the trigger action to send the mail in the first place, so it didn't show up in my mailbox after waking up the next day
After that you can debug your condition by debug gq <the gsq as written in export>
And debug action <the action>
Did you also export trigger actions?
im so sorry im sitting here with the stupidest, vacant stare on my face because i don't know what a gsq is, or what you mean by 'export trigger action'
youre talking to an infant whose knowledge is like cheesecloth LOL
Well u did patch export mail already yes?
i assume by 'export' you mean this is a patch export, so i am writing 'patch export data/triggeractions
Yes I do see it in there, so now I know that both the mail content and the trigger actions are in the game files, but whatever I wrote is not working as intended
so I am writing debug gq "PLAYER_HAS_SEEN_EVENT current Aeolian.Kieran001" next?
based on this, it knows that the player has seen the event, but the only mail I'm getting is from Willy x.x
Something u may need to do when testing is to mark your trigger action as unapplied again
I made a new character, idk if that is what you mean
Ahh I think I see the problem. Your mail is named Aeolian.KieranMail001 but your trigger sends Kieran.Mail001
jinx
... i KNEW it would be something silly like that. Thanks for catching it
I am so, so rusty
Happens to everyone, I think lol. At least it does for me
I was lookin gat what I called it in the i18n and not the actual ID
my common mistake is to have lumisteria.lumisteria.mtvapius
This NPC is going to have a lot of events and letters, this is just my practice so I can remember how to do this before I do what i do best which is narrative writing and not coding x.x
I would pay someone to do all my code for me if I had a willing victim (and money)
His mail works now ;;
it was all just that one ID being wrong haha
Hey so I'm trying to get a custom map into the game and SMAPI gave me a lot of red text that I don't understand lol: https://smapi.io/log/25f64d00b05f4deca325e62a969cdcbb Can anyone tell me what the issue is? This is what my MapData json currently looks like: https://smapi.io/json/content-patcher/88374f525a6946f6987df79f3779c047
Log Info: SMAPI 4.3.2 with SDV 1.6.15 build 24356 on Microsoft Windows NT 10.0.26200.0, with 47 C# mods and 109 content packs.
Suggested fixes: One or more mods are out of date, consider updating them
weird, can you send your map tmx please?
Ignore the house looking weird -- it's just a stand in until I can commission someone to make custom art
Is it because I'm trying to use PlatinumCats' Cherry Lake Tilesheet? I have it listed as a dependency and loaded on the test save, but the images are pngs and tiled wouldn't let me add them to the tilesheets as pngs. I wasn't sure if they would convert with Content Patcher or what... How do I just use the pngs? @calm nebula
Trying to remember how to write events. I think I have the bones of one, but I want it to trigger when my character's heart level is at 1. I don't remember how to write this, or where to put it π
"Action": "EditData",
"Target": "Data/Events/Sewer",
"Entries": {"Aeolian.Kieran002/": "
Upper_Ambient/16 11/farmer 16 11 2 Kieran 30 17 1 Krobus 31 17 3/
skippable/
viewport 31 17/move farmer 0 11 2/move farmer 15 0 1/move farmer 0 -3 0/pause 500/message \"{{i18n:Kieran002.1}}\/pause 1000/message \"{{i18n:Kieran002.2}}\/pause 500/speak Kieran \"{{i18n:Kieran002.3}}\"/
pause 500/emote farmer 32/pause 3000/globalFade/viewport -1000 -1000/end position 31 17"},
]
}```
could you format it pls? in vs code i think it's option+shift+f to format it
I am not sure I understand D:
Oh, for us to better read it needs to be formatted the standard way
and in VS code, you can use option+shift+f to instantly format it in that standard way
Friendship <YourNPCName> 250
Put it on the precondition key, just after Aeolian.Kieran002/
what is Option on PC? Is it CTRL?
probably
It`s 250 points per one heart.
thank you!
I am trying that but all it does is bring up Search in VS Code
shift alt f, sorry!
when i copy over in discord i have been using three ` to turn it into a text box, but i dont think i know how to post it as a properly formatted code in Discord
just paste! you could also send over the json
!json
JSON is a standard format for machine-readable text files that's used by Stardew Valley mods.
If you need help with a JSON file, you can upload it to smapi.io/json to see automatic validation and share the link here.
When making mods, it's recommended to edit your files in a text editor with JSON support, such as VS Code, Notepad++, or Sublime Text. These programs will check for syntax errors.
thanks!
The first event triggers just when the player enters his custom house (that one works fine). the second one I have yet to test, but it should trigger when the player enters the Sewers at Heart Level 1
mhm! have you read the events wiki page?
events are just hard
In my first event I had it where the player could have dialogue options as KIeran was directly asking them questions. I want to do the same thing again for the second event, but I admit, reading what I wrote over a year ago has turned into Greek to me. Does 1.6 handle things differently now in regards to giving the player response options?
no clue, i'm new lol
Yes, my knowledge is just like shredded cheese because I used to build events a lot for before 1.6
I am one of the authors of the toshinori npc mod and did a lot of code heavy lifting, this was years ago
and i forgot everything
...very new, have not heard of it π
its fine! he just had a whole whole lot of content back in the day
i wrote easily 20 events or so
damn!
but now i feel like i am starting over from the beginning
i'm impressed, events are reallly hard
it's alr! take your time
I think it'd come back to you easily. There's not much change for events in 1.6 except that preconditions use full name.
My new NPC is named KIeran, and he's Krobus's friend who lives in a custom house in the sewers. so naturally he's not going to be found until the player unlocks the sewers and sees Krobus. Kieran's plot will be directly tied to Krobus and he's designed to eventually update all his dialogue/schedule if the player becomes Krobus's room mate. he also is meant to react very negatively if the player kills Shadow monsters in the mines, which i am assuming I could call up with similar code used to track the number of monsters the player has slain that the Adventurer's Guild shows you
oh nice!
these are similar things i coded for Toshinori in the past, except now, my ambitions feel impossible haha
even though I know its possible to do at least most of my ideas, because I've done it before
thanks! I'm more of an artist than a coder
Kieran is not meant to be very expressive, so his expressions aren't very extreme. He's kind of a low-key guy
OH one sec i forgot i was gonna look over the json file-
added some formatting stuffs, i kinda suck at events so idk how much i'd be able to help out there-
Thanks! I'll take a look!
I've done more Googling, and I'm not seeing how to use the pngs from the tilesheet that's a dependency in my map file? Tiled only lets me turn the pngs into a different file type for use...
i wish i could help but maps are one of my multiple mortal nemesis(..es?) 
godspeed π«‘
what exactly do you mean?
When I posted my map's tmx above, someone said the problem was that an embedded tmx wasn't included. I'm guessing that's because I'm trying to use someone's tilesheet as a dependency, but it comes as a png. But if I try to add the png as a tilesheet to tiled, it won't let me. I was only able to add it to the tilesheet if I allowed tiled to convert the png to tmx(?). But if it's looking for that tmx when trying to add the map to the game, then it won't find it because the tilesheet that's a dependency for my map comes as a png. So my question is, how do I use the pngs in tiled such that Content Patcher can pull them from the tilesheet's mod folder?
So what you need to do when you are using tilesheet from another mod is:
- Copy the tilesheet png you want to use to the same folder as your map tmx.
- Create a new tileset on your map, load the png while making sure you've checked "Embed in map".
- Make your map. Save.
- Delete the tilesheet png from your folder.
Okay, I'll try this. Thanks!
Dolphin beat me to it and explained it better than I would have anyway 
can i just say how fire this portrait looks. what a great art style
Thank you! I really appreciate that! :>
He does have a style closer to SDV option as well, but I hope people play with the realistic one, because I spent so much time on it hahaha
I am really bad at trying to imitate other kinds of art styles π
He looks like he could be a companion in bg3
awww yeah dog, now we're talking, love me some config options, might even switch partway through so the realstic portraits are used for event scenes
you're truly a pixelsmith! i love the way you drew his nose and it blows my mind that you achieved that on tiny, tiny canvases
Yeah the config is there, as well as a blood and bloodless option, because he gets beat up during his event plot
I love bg3!
Thank you! His big nose is a distinctive part of his character (I based his nose on Adrien Brody)
So I just now tried to test the event (this is the first event ive written since my years-long hiatus) aaand it does not even trigger to start playing at all π This leads me to believe its either not triggering correctly in the location, or its not triggering correctly due to his friendship/heart level? (I have a mod that lets me edit the heart level of NPCs so that's what I did to make him at 1 heart, but the event didn't trigger anyway)
{
"LogName": "Kieran Heart Event 1",
"Action": "EditData",
"Target": "Data/Events/Sewer",
"Entries": {
"Aeolian.Kieran002/Friendship Kieran 250/": "
Upper_Ambient/16 11/farmer 16 11 2 Kieran 30 17 1 Krobus 31 17 3/
skippable/
viewport 31 17/move farmer 0 11 2/move farmer 15 0 1/move farmer 0 -3 0/pause 500/message "{{i18n:Kieran002.1}}/pause 1000/message "{{i18n:Kieran002.2}}/pause 500/speak Kieran "{{i18n:Kieran002.3}}"/
pause 500/emote farmer 32/"quickQuestion #{{i18n:Kieran002.4}}#{{i18n:Kieran002.4b}}#(break)"{{i18n:Kieran002.5}}"(break)"{{i18n:Kieran002.5b}}"/pause 3000/globalFade/viewport -1000 -1000/end position 31 17"},
},
-# is it time to try to convince a portrait maker to animate their portrait
I did animations for Toshinori a while back, and it took forever and I don't think I can do it again hahaha

I'd do it if I was paid, which is a big ask since I'm putting my OC in the game out of love of the OC XD
But animations? I only animate if I am paid to do it, only insane shut-ins can animate and I have mad respect for them (I can animate, but I am not an animator XD)
I'm currently making a portrait animation (among other things) framework and trying to bully kindly convince as many artists as possible to make stuff for it so hopefully I'm able to find a few more shut-ins 
Oh well if theres a new framework coming along then I miiiight take a look. I animated Toshi's portraits before there was a framework
man how many years ago was it now... i dont remember x.x
He was an insane amount of work, I put in many months of effort
Kieran is not going to be as ambitious
it's designed to allow things like only having a mouth moving while dialogue is still typing etc, let me find some of the clips of the animations dacar made with it
has the event already triggered on your test save
Nope
Oh that's awesome
And it looks way more doable than animating the entire portrait
yup, you can do animated overlays/layers
this is a total side question, but is there a reason you start with the viewport moving? When the viewport could be set as Upper_Ambient/31 17/ to start?
just curio
I have no idea. I set it that way out of habit. It's just, on the tile where the farmer moves to
the farmer enters the scene off-camera in this event
Btw Iro, just out of curiosity.. are the packs for the framework gonna be separate or it's just patches in CP? 
ahhhh I see - I'm currently in event writing mode myself and always looking for new tricks
Clearly something's broke about this event though, because it isn't triggering upon entry to the sewers
I would be a terrible person to get your ideas from at the moment. Maybe I would have been an ok reference 3 years ago, but now? i am about as baby as a literal baby
My realm of confidenec is pixel art, everything else I'm relearning how to ride the bike
is there another event before this that loads just fine, or is this the first event?
side question, is "Kieran" the NPC's official id name? for ex my npc Koda is CC_KodaK in the code - the friendship requirement won't trigger unless it's "/f CC_KodaK 250/" for example
i (and others) strongly encourage everything you add to the game, including NPCs, to have their ids namespaced by your mod id, in accordance with convention
there are a few things left where it's not possible (e.g. secret notes), but most things take strings and it's best to use it wherever possible
(i did make a framework to circumvent the secret notes problem, though)
I'd say that's general mod etiquette (but it's not weird to be unaware of it, no shame there), but it's also useful to set a DyanmicToken in the Content.json with your characters internal name as just their written name. That stuff saved me so many issues and annoying writing
oh yeah, i support that. my npc's internal name is Not Pleasant so it's nice to have (mostly) just her name as an option
I was not aware of the etiquette, my bad
How would I go about fixing this retroactively?
No worries dude, neither was I before going in here!
If ur mod's unreleased u can just fix it
If released then it's harder, need to use formercharactername and possibly migrateids
It is unreleased
Release implies need to keep things working for existing saves
What I did was make the name (Kieran in this case) a DynamicToken thats means {{ModId}}_Kieran. Then you just need to go through your files and replace all cases of Kieran with {{Kieran}} (Not counting dialogue, where you just want it to say Kieran). Do you get what I mean or do you want a visual representation? ^^
Visual representations tend to help me the most because I often struggle to parse things without an example. But once I have an example I tend to learn more quickly
gotcha! lemme put that together for ya :)
https://www.dropbox.com/scl/fo/ni99fffcsuy74kovm7uce/AAau8QDhgdQKNZBPlOD368A?rlkey=hointx12eu3dpbb68h2ec9rhc&st=hq1ne0g4&dl=0 if it helps, this is the working draft file
thank you for helping me! i want to make sure it follows ettiquite/conventions
In your content folder, underneath the "Format: "2.8.0" you want to put in this piece of code. That tells the game that whenever you write {{Kieran}} you actually mean {{ModId}}_Kieran.
` "DynamicTokens": [
{
"Name": "Kieran",
"Value": "{{ModId}}_Kieran"
}
],`
Once that is set up, you want to go through your files and check anywhere where Kieran is "summoned" or called on. The reason it's recommended to put your modId before the characters name is incase someone else also makes an NPC with the same name, the game doesn't get confused on which character to summon
I see, I think I understand. So any time it says Kieran I replace with {{ModID}}_Kieran ?
Here's some examples of where I've used {{Skata}}, it's all places where the game internally checks names. In dialogue it should just be Skata, as otherwise the dialogue will say SpecialAgentJonson.SkataTheMagpie_Skata which is a little silly
I'm so worried I'm going to break everything if I try this x.x
Basically anytime! Just not in places like displayname and in characters dialogue. But when you place your character in events, when you check friendship levels etc etc. It's why making it a DynamicToken makes life a little easier, cus then instead of having to repeat {{ModId}}_Skata, I just write {{Skata}}
It's scary! Generally the idea is to do this from the beginning but dw I didn't do that either.
OHH so i don't write {{ModID}}_Kieran either, I just write {{Kieran}} ?
It doesn't matter in the end really, they will mean the same if you set up the dyanmictoken
if it helps, before release is the best time to undertake stuff like this 
Using the exact same code you posted earlier will work either way?
Yeah, as embarrassing as it is to admit I didn't take the advice given but genuinely, best time is to do it now so you have less names to change
For example, I plugged in your code exactly as you wrote it for me earlier, and just now changed this
{
"LogName": "NPC Sprite",
"Action": "Load",
"Target": "Characters/Kieran",
"FromFile": "assets/img/spritesheet.png"
},
to this
{
"LogName": "NPC Sprite",
"Action": "Load",
"Target": "Characters/{{Kieran}}",
"FromFile": "assets/img/spritesheet.png"
},
is that all it takes?
Yup!
OK so that's not too scary
so its any time i see his name, outside of i18n dialogue files using his name?
and log names/comments?
I want to say yes, so yes PFFFT I've only made one NPC mod so others can correct me if im wrong
Ok, so how about this case...
does dynamictokens work when its in the middle of the filename so i'd be changing these to "assets/schedules/schedule{{Kieran}}Villager.json" like that?
In that case, you're calling on a .json in your assets. The game will read that as
assets/schedules/scheduleYourModIDHere_KieranVillager.json
Which isn't what your asset is called in your map so no, you shouldn't use it there
you only have to sub out if you're giving the game his name. so you can name your files whatever you like
(but the token does work in a case like that, yes)
I will try to wrap my tiny little neurons around this
But very good question, good catch!
it requires a little bit of Programmer Mindset to grok when it's needed /lh
replacing the annoying modid thing with a dynamic token....... that's so smart. i need to overhaul my mod as well now
Here's how my portrait and sprite calls look! I'm loading them in {{Skata}}'s character stuff, but im calling on my own assets name just as theyre written in the images map ^^
ctrl shift F is your best friend
Truly
i need to overhaul mine as wellβ¦ been dreading it but i think itβs time with all NPCs released
I got the idea from Ichor so all cred to him! :)
Would someone be willing to check my work on my content.json
I'm free to take a look ^^
me too once i haul my butt back to my computer
based ichor π
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 mostly just trying to make sure I caught all the instances where I DO need to turn his name into a dynamic token
The dyanmic token looks correctly integrated! But yes, use the link cus it's a little easier to read hehe, but the GiftTaste needs to be "{{Kieran}}:" as well!
ok! and as for the events, do I need to do the dynamic token any time Kieran is called in the event, such as to place him, move him, etc?
Yup! ^^
Oof, ok
but im assuming i can't put a dynamic token inside a dynamic token (since i18n is allready a dynamic token)
You can, actually, i believe lolol
I mean {{ModId}} is a dyanmic token, and youre putting that in a dyanmictokne ({{ModId}}_Kieran = {{Kieran}})
yeah as far as i know it's possible to tokenize inside tokens
also the content patcher doc on tokens is super helpful! once you are in the mind space, i suggest reading through it
let me grab the link
always have it open lol

i won
I don't think you need to do it for your i18n if that's what youre wondering. It will check your mods default i18n, and no look into other mods so it shouldn't get confused if there's ever two different Kierans in the game
i'm on mobile rn because i was eating dinner lmao
thanks claude
LOL, dw
https://smapi.io/json/none/b604df2d4feb4a9e9c222485bf05e3b2 Does this look correct for his events?
I check the instructions cooonstantly, once youre in it, you can also come up with a bunch of fun stuff to do. I did two diverging routes for a character hehe
oh, for events the json smapi thing struggles with multilinging, could you paste the event here?
Oh yeah he's got a diverging story- one where he can be convinced to give up his alchemy project and move out of the sewers to join the villagers in the town
and one where he's encouraged to keep working on his project, but he stays in the sewers
(he's trying to come up with a 'cure' to the Shadow People in the mines, he thinks a sickness has made them violent)
oooh cool! i should try something like that hmmm...
It looks correct to me ^^
Kieran thinks hes protecting Krobus, so thats why he lives there with him
π
But if the player gets Krobus to be their room mate, Kieran is going to have a different schedule, but his motives are the same
Hell yes! I love stuff like that :)
(pls lore drop i beg you)
Hmu if you need help with setting that up, I dunno how experienced you are, you might already know how you want to handle that but I'd be happy to help if you need it ^^
Smol question.
I'm trying to convert a greenhouse interior replacer into PIF, and need the correct warp point (it's currently in the middle of the room somewhere)
How do I figure out the right one?
I integrated his plot/storyline with the way a player took Marlon's storyline in the mod "Befriend Marlon and Gunther." So Kieran and Marlon have a complicated history, and they're not on speaking terms. Kieran feels a lot of guilt about it, so he's living in the sewers halfway because he wants to protect Krobus and halfway out of shame
And the right warp point to get out. It's currently the greenhouse exit lol
aeolian, claude is the ceo of the much needed krobus overhaul, i think you two should conspire 
...i didn't know mods were capable of not knowing things wow /lh
oh! I didn't know someone was working on an krobus mod, I'd be happy to conspire
YES
I would at least like to have compatibility between our mods
We're no omniscient cheetos :D
hmm, maybe? my storyline seems differnt at first glance but conspiring would be fun 
Kieran believes the shadow people are infected with some sort of disease inthe deep mines, so he's trying to create an alchemical cure for them. Meanwhile, he's afraid the villagers will hurt Krobus if word gets out about him, so he stays in the sewers to protect Krobus and hide him from those who might do him harm. But when Krobus gets out and alerts the player, and the player comes to the sewer for the first time, Kieran begs the player not to hurt Krobus and to keep him a secret. he later keeps sending the player out to find alchemy ingredients for his project.
I'm not sure how well this would work with your storyline, but I can adjust if needed
hmmm okayyy
(Kieran does not ever succeed with his project. His diverging path will be either he goes into town and gives up on curing the shadow people, or he stays in the sewers to keep being an alchemy hermit.)
i'm still not sure about any early game lore for my mod bc my specialty is high-heart level drama and traumatic backstories LOL
...but i do have 100+ pages of lore so...
i have β¨ ideasβ¨
I am also definitely going for high drama! I have all my events essentially written, right now I'm just scripting them in the code (and failing miserably). But one event involves the player trying to stop Kieran from going into the mines to test his latest alchemical solution, only for him to get tragically beat-up by a shadow brute that he fails to cure
ooooh yessss
in this instance he will have about 7 in-game days of being in the hospital, his schedule updating to the hospital, etc
Event scripting is hell a lot of the time/lh
love ittt
That's fantastic, i love an event where stuff actually affects the character
Krobus would feel guilty about what happened to Kieran and also try to convince him to stop trying to go into the mines, its too dangerous for him, kieran is a wimpy little man
oh def- there's like a good 5% of the time where you get into the flow and it's nice but the rest is just tedious torture
I will 100% add him to my game once he comes out
pfft-
i would be honored! he is an OC near and dear to my heart
He is also going to be coded to recognize if the player has Pacifist Valley installed. I wanted there to be ambitious integration but for now I just twant him to acknowledge it like, "I see you are trying a nonviolent solution. Thank you."
most of my mod revoloves around a friendship arc for krobus and dwarf
Awww yeah! Kieran doesn't know the dwarf very well, so I don't have any plots about their relationship yet
i love themmm
i'm just plopping in a character from a chinese novel series who happens to be my bestie's favorite character, he's just vibing while i cheer you on
i have like.. i think 15 event ideas atp? i've only scripted like 4-5 and only two of those work-
Yeah my first project was a huge, ambitious fanart project for BNHA but I really want to make sure to add something purely original to the game, too
i hate event scripting. i wish i could outsource it
oh right you made the toshinori mod!
I did!
I'm learning to get quicker, and making all the small timing adjustments are fun imo because you can tell so much with so little
Or at least I made about 80% of the code. the writing was a group effort
the event timeline for up to 15 hearts β¨ (this includes lemur's The Last Smoluanu mod bc it's gonna be a requirement for mine)
I'll take a peek !
oh, and for those curious, this is Kieran's full-body illustration. Will probably try to put him on the nexus page somewhere to make him look cool haha
oh i didn't think it would be readable-
did anyone here succesfully load in a spouse patio? or is that not available for roommate npcs?
