#making-mods-general

1 messages Ā· Page 517 of 1

hallow prism
#

that sounds cool! i'm glad to see you around šŸ™‚

scarlet warren
#

Here's the kicker, your mod works but you should still rewrite the code.
Don't ever "Load" vanilla assets to replace existing vanilla assets,
use "EditMap" and "PatchMode": "Replace" instead.
A mod author of a texture mod told me this. Could someone explian what they mean?

I assume its in rerfernce to my Content.json file, with me using "Action": "Load" in Changes.....

autumn tide
#

afaik, 'Load' creates a space for an asset to be, and EditMap/EditData/EditImage/(whatever they're called i don't remember) edits/adds said asset

#

i may be wrong though, i am still new, so take this with a grain of salt LOL

ornate locust
#

That is my understanding of it

autumn tide
#

(yayyy i might be right)

lucid iron
ornate locust
#

Chu knows the code way more than me though, I just content patcher stuff

#

I defer to the code wizards

lucid iron
#

The main practical issue with using a Load on a vanilla asset is that if 2 mods do Load to the same asset (vanilla or modded) they both don't get to do the Load

#

This is because the default priority is Exclusive

autumn tide
#

yeah as a code criminal chu gets the higher authority here LOL

lucid iron
#

If you change it to priority Medium or something this is no longer a problem but instead you might unexpectedly "lose" to the hypothetical other mod

#

But like if your mod says "i replace the farm" and user goes "i used 2 replace the farm mod and it errored :(" i think that's their problem

scarlet warren
#

and as ususal I have no clue what code does or works

autumn tide
#

-# (also cool user inkubus)

lucid iron
scarlet warren
lucid iron
#

Only for development

#

When you release you should take them out

autumn tide
#

nope! maps are.. eugh..

scarlet warren
latent mauve
#

Never publish your mod with vanilla tilesheet assets packed in, that's technically redistribution also

scarlet warren
#

Ohhhhhhhh

lucid iron
#

If you use the tilesheetinator tiled plugin u can avoid this entirely

ornate locust
#

Or you can use ~Tilesheetinator~

lucid iron
#

It lets u work on maps without copying the sheets very qol

scarlet warren
#

Well, how do I link to the core files tileset?

autumn tide
#

wait i think there's a command for this?

#

!tilesheetinator

ocean sailBOT
#

You can use the Tilesheetinator tiled extension to create Stardew Valley maps that work in-game without having to copy vanilla and modded tilesheets back-and-forth, rename files with a . in front of their name, edit maps only in the unpacked content folder or make symlink workarounds.

See the mod page for full installation and use instructions.

autumn tide
#

YESSS

lucid iron
#

But the traditional means is

  • work on the map with sheet in same folder
  • when release only include the tmx
#

They will error in tiled but work in the game

latent mauve
#

You can edit with the files there but you have to remove them before publishing. As long as you don't reopen the map file after moving the tilesheets, it won't break

upper forum
#

So follow-up question to the stuff I posted earlier about custom HD portraits. Can I use the condition IS_EVENT when setting up my tokens? Or is that only useable in the appearance system?

scarlet warren
lucid iron
#

Your tileset would have the right info

#

You can inspect this by opening the tmx in a text file

scarlet warren
#

Cuz rn its image/source is pointing to the asset folder in the mod itself

latent mauve
#

The tilesets have a relative path to begin with, as long as you are Loading your map to the same place as the vanilla tilesets (/Maps) then it will pull them just like it was from your mod folder

lucid iron
scarlet warren
#

The MAP just knows which tilesets to use????

lucid iron
#

What game sees should be you got Maps/inkubusmap and it asks for spring_outdoors let's say

latent mauve
#

Your source should never have all the extra stuff before it, it should be a relative path to avoid tile sheet climbing

lucid iron
#

So it goes looking for that in Maps/spring_outdoors

#

And if that is an asset which exists, it will be set as the tilesheet source image

scarlet warren
#

gimmie a few minutes here. need to clean stuff up rq

autumn tide
#

take your time! modding can be confusing and it takes a while to learn SDVpufferheart

scarlet warren
#

but I guess my main questions are, if I copy the tilesheets into the asset folder just so I can use them quickly without having to fid the originals, then how do I change the image source back?

lucid iron
#

Just take them out when you publish

#

Tbh i think u might as well just try it?

#

It sounds like you did everything right except for the "take them out on publish" part

latent mauve
#

If you are saving the file while the tile sheet is next to your map file in the folder, then your paths will be relative and work just fine in game without them there as long as you load to /Maps/something

upper forum
#

bweh, I don't think this is something I can make this work, huh? I tried to use it like a token but it just does nothing. I'm guessing conditions like IS_EVENT are only useable when you use Appearance?

lucid iron
#

They are called GSQ so yeah only some fields support them

#

Which hd portrait thing are u using anyways

upper forum
#

Oof, would I be able to set up a dynamic token using that? Or would that run into the same issues I'm running into here?

upper forum
# lucid iron Which hd portrait thing are u using anyways

Do you mean which custom portrait mod, or what HD mods? I'm making my own custom portrait mod, so this is all my attempts at code lol. For the HD portrait mod, I have Portraiture installed. It still accepts tokens using the HDPortraiture framework, which is how I can get seasonal outfits and stuff

lucid iron
#

Huh interesting

#

I was slightly confused mainly because i figured if you are in content patcher what if you just edit the appearance entries

upper forum
#

I don't think Appearance can use HD portraits without some kind of framework, right?

lucid iron
#

But I'm guessing portraiture targets are special

lucid iron
upper forum
#

Yeah

#

Portraiture is funny in that you don't actually need to code anything. You can just drop your HD portraits into a folder and it replaces them for you. But then it doesn't work with most tags like say, seasons and such. So that's why some folks still make their own content packs for Portraiture using HD Portraits' old framework, which Portraiture supports. The issue there is that it can sometimes run into this kind of situation lol

lucid iron
#

Yeah i guess there's no way to actually check is event atm

#

I was looking for a cp token and didn't find one

upper forum
#

Custom HD portraits are in a really weird state atm with HD Portraits deprecated and Portraiture not really working well with custom tokens

#

Portraiture+ is one option but I've found it does weird things to custom NPC sprites for some ungodly reason lol

lucid iron
#

Duruznik how do u feel about just using something else for ur mod?

#

The 2 options i mentioned previously basically

upper forum
#

I'd be happy to if they work haha! But if the spacecore thing you mentioned needs a pull request, I'm not sure what that means šŸ˜… Would it be useable for users downloading my mod?

lucid iron
#

They'd have to download an alternate version of spacecore until the PR is merged but casey said i can make that

#

And idk what iro's timeline is, maybe sooner maybe later

upper forum
#

Do you know what the timeframe is on the PR being merged? Because my mods are def still WIP lol, it's gonna be a minute

#

But if it's probably gonna be merged in the coming weeks, that could totes work

lucid iron
#

I will bug @next plaza harder about it Sleepden

upper forum
#

Oh def no rush! I was just wondering haha

lucid iron
#

It does help if u test it now though, in case something needs fixing

upper forum
#

So this would mean my portraits mod would need spacecore instead of portraiture?

lucid iron
#

Yeah

upper forum
#

and it'd handle both custom portraits and HD ones?

#

oooh

lucid iron
#

I'll help u with the spaget part dw

upper forum
#

I'd be happy to try it tbh!

lucid iron
#

Ok let me make a build then

upper forum
#

This custom Quinn is just for personal use- a quick and messy Talkohlooey-style edit I'm using for my personal save, so I'm not as fussed about it being foolproof. But I'm also working on a proper HD portraits mod for just the vanilla NPCs in my own style with plans to eventually do modded NPCs too, so future-proofing that mod would be kinda great haha

scarlet warren
#

This look correct?

#

@lucid iron

#

okay so

#

Removed the maps, didnt touch the imagesource path.

#

changed it from Load to EditMap

#

suppenly Vibrant pastorial Mod no longer conflicts

lucid iron
scarlet warren
#

So more than likely, it was cuz I was forcing it to use a specific tileset over the original it was a copy of

scarlet warren
#

difference*

#

ALSO ALSO

#

STILL CANT PLANT ANYTHING RAAAAA

lucid iron
scarlet warren
#

You're not editing the tiles on the tilesheet, you're only changing how the map handles them (the animation is coded in the .tmx file).
This is also good knowledge to have.

#

I thought the tilesheets themselves saved the animations

scarlet warren
# lucid iron yep

And what happens if one mod loads the same map that another is replacing?
Or when two try to replace the same map?

lucid iron
#

There can only be 1 Load, but there can be multiple EditMap

ornate locust
#

A lot of mods only replace parts of maps.

#

with EditMap

scarlet warren
lucid iron
#

Well that's just loading entirely new map and separate flow than this Dokkan

scarlet warren
ornate locust
#

Farms are usually one map deals. Usually. There's mods that add small things to farms, but the variability of them means not a lot of mods do that

#

EditMap is not software

#

it is a Content Patcher command

scarlet warren
#

ah

lucid iron
scarlet warren
#

So "Editmap" can both replace the whole map, or just parts of it?

#

hmmm. I may need this info for another map Im working on, which I want MCM to be able to choose different locations for a pond

ornate locust
#

Yeah, I add a building to the town map and it just replaces a specific spot

scarlet warren
#

ANYWAY

#

How do I fix my map now that I cant plant anything

#

It has the island LocationContext and summer SeasonOverride.... Im not sure why its doing this

lucid iron
#

Did you sanity check yourself first

scarlet warren
lucid iron
#

Make sure it's actually your mod's fault

scarlet warren
#

ah

#

try planting without my mod?

lucid iron
#

See what happens when u completely remove your own mod

#

Mhm

gaunt orbit
scarlet warren
gaunt orbit
#

It's only default-enabled on the farm I think

scarlet warren
gaunt orbit
scarlet warren
#

your kidding

#

sighn

gaunt orbit
#

Dirt is hoeable but there's also CanPlantHere in location data

#

Or something like that

lucid iron
#

They are just replacing ginger island west though

gaunt orbit
#

Oh, never mind then

lucid iron
#

So i don't feel like location data is relevant

scarlet warren
gaunt orbit
#

Yeah that should work

scarlet warren
#

I have both sand and dirt as diggable T

lucid iron
#

Is the issue that you completely cannot dig or that it loses greenhouseness

scarlet warren
#

I can dig. I cannot plant.

gaunt orbit
#

Oh weirx

scarlet warren
#

No seasonals, summer or others, no pinabpples either

#

No taro tubers

gaunt orbit
#

On either side or just the left?

scarlet warren
#

Both sides

gaunt orbit
#

Hmmm

scarlet warren
#

is there a tile property that makes it farmable?

gaunt orbit
#

Should just be Diggable

scarlet warren
#

well eff me then xD

lucid iron
#

Do u want to send over ur wip mod for others to try

scarlet warren
#

yes plz

scarlet warren
lucid iron
#

Well it's probably best to just send here cus i am on me phone

scarlet warren
#

Im allowed to post it here?

lucid iron
#

I'll take a look in like an hour if no one else figured out the issue

scarlet warren
#

I appreciate the help, everyone

calm nebula
#

On my phone but try not including the tilesheet

scarlet warren
#

ah

#

Right

calm nebula
#

If does not work then take lookup anything and look up a tile you should be able to plant

scarlet warren
#

Figured it people were looking at the map file, theyd need it

calm nebula
#

Nah, like the nutcase i am I actually looking at the raw xml files on vscode

#

You may call me insane now

scarlet warren
#

Alright well I loaded just my map, CP, and SMAPI, and it still couldent plant anywhere, so its not a conflict, I think

stable grotto
scarlet warren
#

Did not know it was allowed here

stable grotto
#

you can always upload your own works

scarlet warren
scarlet warren
stable grotto
#

XD

scarlet warren
#

been using it since the first version first went up

stable grotto
#

oh, and my discord handle is on my nexus page SDVpuffermlem

scarlet warren
#

So I assume its some issue with the way the mod is loading, or from the map's custom properties

#

since i fixed the issue with it not pulling the official tilesheet

stable grotto
#

what are you trying to plant? I have no issue do so

brittle pasture
#

note the space

scarlet warren
#

Aint no way its that simple

scarlet warren
scarlet warren
vocal knoll
#

Hey everyone!! So i’m looking for help for modding! Okay… so I’m making my own NPC. The first dynamically disabled NPC. But I am having trouble getting her to move and talk. I had her follow a schedule at one point but now it’s a mess Dx

I followed this tutorial (it was the most recent from November 2025 for 1.6 and the only one that told you step by step what to do!) and for some reason, my character was still not able to talk. I got her schedule figured out but then I tried something else and screwed it up…

Running patch summary keeps telling me everything’s and meeting conditions, but nothing is being applied in exception to gifts and dispositions. Dialogue and schedule they want an XNB which I don’t think you need one through content patcher…

I only once got it to say ā€œNPC Implementedā€ or whatever, but they were still not able to talk at all…

Help???? (Been working on this for over a week including sprite art!)

https://stardewmodding.wiki.gg/wiki/Tutorial:_Making_a_Custom_NPC

I think Smapi thinks it’s a Vanilla NPC which is why it wants an XNB file and doesn’t like the {{ModId}}_Rosalie in some of the targets, but if I remove it or replace it with my actual ID her name becomes my ID name with the underscore…

https://smapi.io/json/content-patcher/7be7f28215bb49fb8b06c3e7c99ce2d5

https://smapi.io/json/content-patcher/7f523aad3e034eb1af538569d363a44f

https://smapi.io/json/content-patcher/7c731d4ef7344558b80ca0784734bdfb

https://smapi.io/json/content-patcher/8c07253d361e4d96ad97b9707f14ef55

Stardew Modding Wiki

Last edited by Esca on 2025-11-06 10:01:42

scarlet warren
#

imma throw myself in this river

stable grotto
#

speaking of that river...

brittle pasture
#

it's unclear through your post

#

I believe social NPC needs gift tastes for dialogue to work?

stable grotto
#

no bounds around the bridge XD

scarlet warren
#

I missed a building tile?

#

FEK

vocal knoll
brittle pasture
#

can you post your log? everything looks fine at a glance

vocal knoll
vocal knoll
versed sentinel
#

i swear mod making both feels like something i want to try and one of the scariest things i can attempt. and that goes with making a mod for ANY game

brittle pasture
ocean sailBOT
brittle pasture
#

strange, your dialogue file is showing that it's trying to load/edit Characters/Dialogue/Rosalie

#

did you reload and/or verify that you're editing the mod files in the Mods folder

brittle pasture
#

and is this after reloading?
im stumped lol

vocal knoll
merry river
#

the target being {{ModID}}_Rosalie shouldn't be the issue

gentle rose
merry river
#

I noticed that in both your sprite and portrait patches, the target is <characters or portraits>/Rosalie

brittle pasture
#

(pls dont change your files between posting the logs)

#

(also i noticed that in the jsons you posted prior, your NPC's id is {{ModId}}_Rosalie but you're loading into just Rosalie for their portraits and sprites)

scarlet warren
# stable grotto

Didja find any others? I think Ifound some by the boat, as well as a few inconsistant tiles

merry river
#

@vocal knoll can you try the following:

change the target in your portrait and sprite patches to the following

Characters/{{ModID}}_Rosalie and Portraits/{{ModID}}_Rosalie respectively?

brittle pasture
#

(if earlier you saw that your portraits/sprites weren't working and swapped out the NPC ID back to Rosalie but didn't change the other files, that would be the cause)

merry river
ocean sailBOT
#

Log Info: SMAPI 4.4.0 with SDV 1.6.15 build 24356 on macOS Unix 15.7.1, with 11 C# mods and 1 content packs.

pallid patio
vocal knoll
urban patrol
merry river
ocean sailBOT
#

Log Info: SMAPI 4.4.0 with SDV 1.6.15 build 24356 on macOS Unix 15.7.1, with 11 C# mods and 1 content packs.

vocal knoll
scarlet warren
opaque cobalt
#

is there a wiki page that listed all event ids for events?. Also what does "{{FestivalOutfits}}" do? Saw it in another mod when trying to see what all event ids were for festivals. They had all but Night Market and Desert Festival

merry river
ornate trellis
#

{{FestivalOutfits}} is a token

merry river
#

hope my explanation made sense lol

ornate trellis
#

and idk if theres a whole list but the unpacked files have them all

merry river
vocal knoll
# gentle rose what do you mean by "dynamically disabled", out of curiosity?

a dynamic disability is a disability that can fluctuate its severity. ADHD is an example of one, but also someone with Chronic Pain. In the case of Chronic Pain, One day they may be able to do something with minimal pain, and the next maybe not and there may not be any cause for it other than their body being like "not today!"

lucid iron
#

Ah it's a characterization thing

ornate trellis
lucid iron
#

I was like "were you going to delete your npc from the world every sunday"

vocal knoll
ornate locust
#

I think Ramp 2 is gonna be a Problem Ramp

#

I think it's gonna hit the most compatibility hell

#

Sunberry does festival stuff over there too

#

at least it's just for the egg festival

vocal knoll
lucid iron
#

any errors mentioning xnb not found can be understood as you didn't load that somehow

#

It says xnb due to monogame

gentle rose
merry river
#

ModID + her name of course, not just ModID on its own

vocal knoll
ornate locust
#

No it also need to be done there

merry river
ornate locust
#

Nono

#

The circled one needs to have the modID

#

that was just a demonstration circle

#

"DisplayName" needs to be Rosalie, the one above it needs to have the ModID

vocal knoll
#

i thought I did ??? I'm so cunfuzzled 😭

ornate locust
#

yes, like that

merry river
#

dont worry, i was super confused about it in the beginning as well

vocal knoll
#

so do i remove it from everywhere else other than in the disposition?

ornate locust
#

That is the opposite of what you want to do

merry river
#

think of it like this...
your discord name is tisnessie
your display name in here is nessie
but for discord to find you as you and not any other nessie, it will use tisnessie

vocal knoll
stable grotto
vocal knoll
#

okay I totally thought I had it everywhere though originally DX

ornate locust
#

You want everything to match {{ModID}}_Rosalie EXCEPT the Display Name in that one spot in Dispositions.

merry river
#

so for the game to make sure it finds the right rosalie, you have to use {{modID}}_rosalie

#

in targets, in event commands etc

merry river
ornate locust
#

those needs the ID

merry river
#

yup, have you changed these already? the other patches seemed fine

vocal knoll
ocean sailBOT
#

Log Info: SMAPI 4.4.0 with SDV 1.6.15 build 24356 on macOS Unix 15.7.1, with 11 C# mods and 1 content packs.

ornate locust
#

Oh and this one

vocal knoll
merry river
#

if the game cant load the portraits and sprites, it will not load the character

ornate locust
#

Did you change the targets for sprite and portrait?

vocal knoll
#

I did šŸ™‚

ornate locust
#

Okay cool, just making sure

vocal knoll
#

one sec I'll reupload the data I'm looking at from that smapi log i just sent

slow bough
#

Hi everyone... I solved my earlier problem, but I'm wondering now about light sources... why does my light source not seem to take on the colour I assign it? The radius is definitely correct because its smaller than what I assign it but the colour is completely off. To make things more confusing, the colour of the light sources for e.g. fireplace in the game is blue but appears white-ish. Can't grasp what's going on...

lucid iron
#

It's green though

#

As for the why, that is just how lights work

scarlet warren
#

Alright, I think with everyones help, The new version of Modest Maps Ginger Farm is ready! Thank you all so much for keeping me humbled! xD
Gonna go post the new version to nexus now

lucid iron
#

For a green fire you'd want to make the fire texture green

#

Or the light map green

slow bough
#

Ah, I see, it's because of the texture? And the colour parameter in the LightSource constructor does nothing?

ocean sailBOT
#

Log Info: SMAPI 4.4.0 with SDV 1.6.15 build 24356 on macOS Unix 15.7.1, with 11 C# mods and 1 content packs.

brave fable
#

light colours don't work how you'd expect

#

for example, take a look at Firefly.cs, which uses a light with the colour Color.Purple * 0.8f. clearly this is wrong, since fireflies are green, but given SDV uses subtractive lighting we're actually providing the inverse of green.

lucid iron
brave fable
#

likewise, several furniture items can be found using Color.Black, which emits a pure white light, such as with fish tanks

lucid iron
#

It just does less than what u want if that makes sense?

slow bough
ornate locust
#

Hmm

brave fable
#

if you're confused about radius that's actually misleading as well, since it's a decimal multiplier applied to the size of the light sprite that's otherwise rendered at default size (the size of the source light sprite)

slow bough
#

The radius is ok thanks, I only mentioned it as proof to myself that at least something was working(:

lucid iron
stable grotto
#

@scarlet warren and the vpr map overlay for all seasons

slow bough
#

Thanks folks, I'll try setting it to the inverse and report back

brave fable
#

so in order to get the colour you want, you'd generally just subtract your individual RGB values from 255

#

oh nice, there's also a Utility.getOppositeColor() method (which does exactly that (somehow i thought it'd be an extension method on Color but utility holds the world in its hands))

merry river
ornate locust
slow bough
#

Works perfectly!! Thanks for saving me the headache

vocal knoll
# ornate locust Also does your blank JSON have {} in it?

@merry river @ornate locust Okay, update! the "apply" is still not on the smapi log, but I decided to check and see if she works anyway. She is walking around and talking (though I need to fix my portraits lol) but now it says I gave her a gift and i didn't??? haha (Thank you again for helping btw omg I've been appreciating all the help so much!!)

brave fable
#

no problem! catches everyone once hahah

vocal knoll
#

she also somehow made it onto my farm lol

merry river
vocal knoll
#

she literally stopped walking, i walked away, came back and she decided to just chill here xD

#

pronbably a coordinates issue

merry river
#

ah you probably have to sleep for a night for her schedule to load properly

vocal knoll
#

i'll give it a try!

merry river
#

funny that she shows up on the farm of all places though

scarlet warren
scarlet warren
#

Im so bad with pixel art

#

Would you allow me to add this to my mod?

vocal knoll
#

i'm not exactly sure why Smapi is saying nothing is applied still but at least she's in the game???

merry river
#

Yeah there’s still something wrong, let me skim over your files again real quick

#

at least she’s at the bus stop haha

pallid patio
urban patrol
merry river
vocal knoll
vocal knoll
merry river
#

Oh wait

vocal knoll
#

I'm gonna change her coordinates to something else for the bus stop so she can stop going to the farm lol

merry river
#

Remove the ā€œloveā€, ā€œlikeā€ etc text from the gift tastes

pallid patio
merry river
#

The formatting doesnt seem correct, let me look at my own mod for reference

urban patrol
ornate trellis
#

yeah that gift taste formatting is wrong

#

tia has an example on the npc tutorial tho
"{{ModId}}_WrenSong": "You're awesome, @! Is this where I tell you you're a goat or you slap?/444 112 122 167 403 404 440/Thanks, @! I'll put this to good use./248 279 286 287 288 334 335 336 337 338 396 399 787 917 372 428 -12/I appreciate the thought, but uh, this isn't really my thing./196 219 225 202 209 tiakall.bass.seabass/@, I feel like you really had to work to find something I'd dislike this much. This isn't appropriate to give to anyone, you know./747/Thanks for thinking of me, @./446 746 766 -7 -8 -9 -10 -15 -16 item_alcohol/",

ornate trellis
#

that said i always found the way gift taste is set up confusing ngl

pallid patio
vocal knoll
merry river
#

At least thats my guess

ornate trellis
#

could also set the nopc to non sociable for now to see if it otherwise works

merry river
#

Yeah go ahead, I doubt you want you npc to have eggplant and banana as standard gift tastes anyway SDVpuffersus

vocal knoll
vocal knoll
merry river
#

yeah dont worry about it, you can replace the entire i18n with an actual line of dialogue (just change all of them to somethjng simple for now)

rancid tartan
#

So, I might have a habit of trying to learn things much too complicated for my pea brain. If I were wanting to start learning and working with content patcher, smapi, and AT, would it be better to start making patches for other peoples work since the code is already established so I can see something already finished that just needs to be updated or tweaked (with author permission)? Or would it be better to get into this by trying to make something from scratch? Either way I’ll be reading the documentation I’m just curious where to start since I’m a baby

vocal knoll
opaque cobalt
#

Does Night Market and Desert Festival not count as festivals proper? Looking for unpacked data in the files "festivaldates" and under the folder data/destivals and found nothing for them. Moderately confused now

ornate trellis
#

theyre passive festivals i believe

#

what you need em for

opaque cobalt
#

Doing a Seasonal Outfit mod and had some outfits made for those two. Was trying to see a good way for them to be used. Maybe just use day and location instead of is_event?

vocal knoll
ocean sailBOT
#

Log Info: SMAPI 4.4.0 with SDV 1.6.15 build 24356 on macOS Unix 15.7.1, with 11 C# mods and 1 content packs.

uncut viper
#

use IS_PASSIVE_FESTIVAL_OPEN and a location query

#

(or IS_PASSIVE_FESTIVAL_TODAY)

#

the day can be changed via mods even just with content patcher so better to not rely on it if possible

#

technically the location can too but very much not as easily and i cant see why someone ever would

dusk mulch
#

(sorry just trying here since it didnt work in the other channel)

#

ok why isnt leah publishing it

urban patrol
#

you have to right click>apps

dusk mulch
#

i am

#

it's saying "The application didn't respond"

urban patrol
#

maybe she's down

dusk mulch
#

taking a nap ig

merry river
ornate locust
#

watch her wake up and it get published five times

merry river
dusk mulch
vocal knoll
merry river
#

have you actually slept after testing her again

vocal knoll
autumn tide
#

(also sleeping irl can be helpful if you've been at it a while LOL)

merry river
vocal knoll
vocal knoll
autumn tide
vocal knoll
autumn tide
#

yay!

merry river
#

damn claude found me

autumn tide
#

i stalk the server at all hours SDVpufferthumbsup

blissful berry
#

heyy, i'm trying to figure out how to add sound effects to a schedule animation so i'm looking at the game's decompiled code for reference. i found this for when clint is hammering at the forge, but i'm having trouble figuring out what the line before the break is referring to

        case "clint_hammer":
            base.extendSourceRect(16, 0);
            this.Sprite.SpriteWidth = 32;
            this.Sprite.ignoreSourceRectUpdates = false;
            this.Sprite.currentFrame = 8;
            this.Sprite.CurrentAnimation[14] = new FarmerSprite.AnimationFrame(9, 100, 0, secondaryArm: false, flip: false, clintHammerSound);
            break;
vocal knoll
blissful berry
#

i'm not sure what the 14 is for, and i also don't know why it's looking at Farmer animations

autumn tide
autumn tide
vocal knoll
autumn tide
#

aww SDVpufferheart

merry river
#

nessie can you send me the schedule json again??

#

i hereby declare claude the modding channel's mascot

vocal knoll
merry river
#

i have no real sway over this server i dont even get mod publisher roles, but i do declare that anyway

autumn tide
vocal knoll
autumn tide
#

I'm cultivating my one-liners so I can finally be quoted in here-

merry river
#

"spring" is the default for everything you don't define

autumn tide
#

oh yeah i think you're gonna wanna change that to spring?

blissful berry
autumn tide
#

heh you won

brittle pasture
vocal knoll
# autumn tide aaa love seeing rep in SDV :)

I'm hoping that people will love Rosalie and her story as much as I do, but also, I'm hoping my ADHD will allow me time with her long enough to will her into existnace... and that Yoba will allow me to let it happen with the Smapi and CP gods xD

brittle pasture
#

so that line of code is "replace Clint's animation frame 14 with the same frame (9), but with the sound added (the last parameter)"

vocal knoll
autumn tide
#

also relying on my AuDHD to finish this mod for me SDVpufferwoke

#

not a very reliable worker but it's fun

brittle pasture
#

(it's a lil bit of hardcoding since animationDescriptions doesn't support sound)

merry river
#

also do delete the default key in your schedule and try reloading the patch

reef creek
#

When using the code
"Action": "EditData",
"Target": "",
"Entries": {
you don't need to include everything from the original file right? you only need to include what you changed or added right?

brittle pasture
#

yes (and indeed you shouldn't since that means you're telling CP to also edit those entries)

reef creek
#

okay cool thank you

#

if you're replacing everything in that file what code do you use?

ornate locust
#

It can do that and bigger schedule images (also like Clint's hammering)

brittle pasture
#

oh yeah SpaceCore supports bigger schedule animations + sounds

autumn tide
#

god i love frameworks

blissful berry
ornate locust
#

Spacecore is so handy

brittle pasture
#

are you using C# for this SDVpufferthink

blissful berry
#

unfortunately, i had already started playing around with C# and making extended animations myself for my mod before i learned about spacecore

ornate locust
#

Like the defeated feeling I had when realizing I couldn't just copy Willy for a fishing animation, poof, gone, Spacecore had me

brittle pasture
#

otherwise I'd just use SpaceCore yeah unless you don't want a dependency

vocal knoll
blissful berry
#

since i already took the trouble to make the code myself, i figure i might as well stick with it and keep trucking forward the hard way lol

ornate locust
#

Fair enough

merry river
vocal knoll
autumn tide
#

all hail framework modders ✨

urban patrol
#

do we have a guide for setting up terrain sets in tiled? i'm hoping to automate drawing one thousand ceiling tiles

vocal knoll
ocean sailBOT
#

Log Info: SMAPI 4.4.0 with SDV 1.6.15 build 24356 on macOS Unix 15.7.1, with 11 C# mods and 1 content packs.

merry river
#

wait whats the issue then

vocal knoll
#

she's not in the right pose (doing pose 8 instead of pose 0) and Smapi is still saying stuff isn't being applied DX

merry river
#

what is pose 8

vocal knoll
#

Pose 0 is her facing us, Post 8 is her turning around on my sprite sheet lol

uncut viper
#

poses arent a thing like that. did you put 0 for her facing up?

vocal knoll
#

so according to the tutourial i found the format for schedules is "Time MapName Xcoord Ycoord Facing Animation StringDialogue"

#

0 is her facing down

merry river
#

ohh in the schedule coordinates you use 0,1,2,3 for the directions

vocal knoll
#

yes xD

uncut viper
#

0 is up

merry river
#

it has nothjng to do with the sprite indexes

#

so the way you defined it, shes doing the right thing

vocal knoll
#

waaaaaaa??? cause on all the sprites i saw it was always 0 DX

#

ooooohhhhhhh

#

weird

uncut viper
#

it has nothing to do with the position of the sprites

vocal knoll
#

when do i use those numbers then xD

uncut viper
#

a 0 for the facing direction just means she will be facing up. so it will use her facing up sprites

#

but you're not choosing which sprites to use, the game just knows which ones to use bc it knows which way shes facing

vocal knoll
#

doi the tutoural says it too in the description lol

merry river
blissful berry
vocal knoll
#

blast the audhd DX

#

okay, last mystery, why the hell does SMAPI not apply my stuff DX

merry river
#

uhh not sure about the dialogue
does she say anything

uncut viper
#

stuff is not applied unless it needs to be used. did you attempt to talk?

vocal knoll
#

she does! so no idea why it says it's not, i'm too scared to change anything for her dialogue just in case now DX

ornate locust
#

There, Person, Leah lives and the mod is published

cedar turtle
#

Slow Leah.

uncut viper
#

slowleah but sureleah

vocal knoll
#

Well, in any case, thank you my fair modders... i MAY also be making a walking animation for Dusty since Rosalie MAY become Dusty's dog walker so i'll probably be back after all this... and she may become a mermaid for the night market... and may have multiple paths for love interests... I'm way over my head 🤣 but thank you again, may Yoba smile upon you this fine day SDViconstardrop

#

(unless someone already made the dusty animations and I need to chat with them xD)

merry river
#

just started making the mod and is already being scope crept

#

good night it's almost 2 am here and if i dont go to sleep, claude will find me

ornate locust
#

A couple mods have made Dusty a real NPC

#

so he has a walk cycle

autumn tide
#

i will SDVpufferwoke

vocal knoll
devout otter
#

Hmm, Adopt Dusty mod. SDVpufferthinkblob

vocal knoll
ornate locust
#

one sec lemme dig up links

vocal knoll
#

She won't adopt Dusty but she's gonna walk him since Alex is too lazy clearly xD

merry river
vocal knoll
#

i debated having her related to Alex but i REALLY don't like him šŸ˜…

devout otter
ornate locust
#

There's a mod that lets Dusty move in if you marry Alex IIRC

#

Don't know if it still works though

vocal knoll
autumn tide
#

ooh that is so fun!

ornate locust
#

This one's got open permissions and a full walk cycle

devout otter
ornate locust
#

I have used them both at points, though I never married Alex, I just used it for the other stuff

vocal knoll
merry river
devout otter
ornate locust
#

Yeah, two cakes, of course. Just for now if anyone wants that feature

#

always love a good option

autumn tide
#

void i will find you, as per your statement

merry river
#

okay i'm going to sleep for real now SDVitemblobfish

devout otter
gentle rose
#

+1 on recommending hmk purely because of how easy it was to write renaming integration for it (which means the code is good and you should use it)

ivory plume
#

(Update: I have an automatic build workflow for mod repos down to only 48 lines of YAML, once I publish the custom GitHub workflow actions.

That includes automatically...

  • setting up reference assemblies;
  • setting prerelease version numbers for non-release builds (optional);
  • building the mod projects;
  • uploading the release zips as build artifacts;
  • and creating attestations for them.

See example build run, with downloads at the bottom.)

lucid mulch
#

Nice, outside of attestation (and by extension the remaining permissions) that could also be used for running on PRs to test that it compiles and test passes

ivory plume
#

(Updated to support PR branches!)

soft lance
#

hii, did you ever get to say hi in dms : (

reef creek
ocean sailBOT
#

Log Info: SMAPI 4.4.0 with SDV 1.6.15 build 24356 on Windows 10 (10.0.19045.0), with 7 C# mods and 2 content packs.

autumn tide
#

!json uh, I think we'd have to see your .jsons for that!

ocean sailBOT
#

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.

gaunt orbit
#

yeah seems like your json is malformed

tiny zealot
#

---> ContentPatcher.Framework.Lexing.LexTokens.LexFormatException: Reached end of input, expected end of token ('}}').
you have forgotten some closing braces in your tokens i think

autumn tide
#

also, NSFW mods are not allowed on here, if that's the sorta mod you're making (judging by mod ID lol)

gaunt orbit
#

am I missing something? dark romance doesn't sound nsfw to me

uncut viper
#

(could be yandere though which falls under the server's nsfw rule)

reef creek
#

hmm do you think it's because of this
"Action": "Load",
"Target": "Maps/WoodsTemp",
"FromFile": "assets/WoodsTemp.tmx"
also no it's not NSFW you don't have to worry it's pg

uncut viper
#

you would need to send the entire json uploaded via the link in the governor command

#

not a json snippet

gaunt orbit
reef creek
ocean sailBOT
#

Log Info: SMAPI 4.4.0 with SDV 1.6.15 build 24356 on Windows 10 (10.0.19045.0), with 7 C# mods and 2 content packs.

tiny zealot
#

we won't be able to help you more unless you give us the link to the json so we can see it

reef creek
#

I might've figured it out but if I didn't I'll send over the json

#

I fixed it but thank you for your guyses help

opaque cobalt
#

How does this look for an ooutfit for the desert festival. Using advice given by Button but want to make sure not missing anything. Json validator didn't throw any errors which makes me nervous

"TargetField": ["Penny", "Appearance"],
"Entries": {

        "{{ModId}}.Penny.DesertFestival": {
            "Id": "{{ModId}}.Penny.DesertFestival",
            "Condition": "IS_PASSIVE_FESTIVAL_OPEN, LOCATION_NAME TARGET Desert",
            "Sprite": "Characters/Festivals/Penny_Desert_Festival",
            "Portrait": "Portraits/Festivals/Penny_Desert_Festival",
            "Precedence": -1100,
        },
uncut viper
#

you haven't told the gsq what passive festival you're trying to check

lucid iron
#

the dialogue stack empty issue continues to haunt me SDVpufferpensive

uncut viper
#

but also quickest way to find out if it works is to see if it works

lucid iron
ocean sailBOT
#

Log Info: SMAPI 4.4.0 with SDV 1.6.15 build 24356 on Windows 10 (10.0.19045.0), with 104 C# mods and 227 content packs.
Suggested fixes: One or more mods are out of date, consider updating them

uncut viper
#

does this log at least imply you can reliably reproduce it or is this another person's log

lucid iron
#

in this log i can see that

  • the game rolled having kid with Wizard
  • HMK loaded a question (in russian) and pushed it to the dialogue stack
  • 9s later the actual dialogue draw starts
  • HMK sees that Game1.currentSpeaker.CurrentDialogue is empty and tries to push a new Dialogue to the stack to attempt to avoid crash
  • it doesn't work and the ThrowForEmptyStack happens anyways
lucid iron
#

my hope was that if it was empty stack i'd at least push something to make it not die but now i have no idea what is even throwing anymore blobcatgooglyblep

uncut viper
#

do you have a link to the relevant code handy for a mobile-bound lass such as myself

lucid iron
#

yea which part r u interested in? or i can link all the bits i mentioned thus far

uncut viper
#

The patch of yours that's highest up in that stack trace

#

I can probably find my way around from there just too lazy to navigate to Nexus and then the repo and then search from my phone

lucid iron
#

this wasn't actually there in hmk 1.0.0 (where radical had the problem), i added it in attempt to mitigate and debug the issue

#

the reason y i hope this would mitigate is cus inside the method there is a currentSpeaker.CurrentDialogue.Peek()

uncut viper
#

ok never mind mobile sucks for this and I don't have the decompile anyway

lucid iron
#
    protected void drawDialogueBox()
    {
        if (currentSpeaker != null)
        {
            int val = (int)dialogueFont.MeasureString(currentSpeaker.CurrentDialogue.Peek().getCurrentDialogue()).Y;
            val = Math.Max(val, 320);
            drawDialogueBox((base.GraphicsDevice.Viewport.GetTitleSafeArea().Width - Math.Min(1280, base.GraphicsDevice.Viewport.GetTitleSafeArea().Width - 128)) / 2, base.GraphicsDevice.Viewport.GetTitleSafeArea().Height - val, Math.Min(1280, base.GraphicsDevice.Viewport.GetTitleSafeArea().Width - 128), val, speaker: true, drawOnlyBox: false, null, objectDialoguePortraitPerson != null && currentSpeaker == null);
        }
    }
#

i patched this thing

#

but yea idk ill move on to force closing the dialogue (which may not help given that pushing new also didn't help seriousblep )

nimble karma
#

So, no spoilers as to what I’m doing yet but I’m commissioning art for my first mod!

uncut viper
#

alternatively are you sure that CurrentDialogue itself is not null?

nimble karma
#

I’ve got a few weeks to think up ideas for the mod and I was wondering: is there any way to make trees kinda function like a paddy crop? As in, grow a bit faster near water or something?

#

Or even generate water in tilled soil around it

lucid iron
nimble karma
#

I only ask because I believe Kaya had a mod like that yeeeeears ago where a scarecrow made paddy crops

uncut viper
#

im actually not sure it would be

#
public static IEnumerable<T> AddItem<T>(this IEnumerable<T> sequence, T item)
{
    return (sequence ?? Enumerable.Empty<T>()).Concat(new T[1] { item });
}
lucid iron
#

but mitigations aside, im still unsure why this is even happening in the first place

vocal knoll
scarlet warren
#

Can someone either explain/tell me the code I put into Content to replace these, or link me somewhere I can learn how?

uncut viper
#

CurrentDialogue can be null in some cases

vocal knoll
#

@nimble karma so sorry I didn't mean to hit Reply!!

uncut viper
#

it should become not-null when you try to use it but it may not be

uncut viper
#

due to some other mod interaction perhaps?

lucid iron
#

yea since i have not been able to reproduce i guess it's gotta be due to some other mod right NotteThink

vocal knoll
nimble karma
uncut viper
#

and since i think that Harmony AddItem extension method wouldnt NRE if it was null i think thats why your fix just isnt doing anything

#

i cant think of another reason

vocal knoll
lucid iron
#

ah u mean this bit then, i wasnt sure what to look for

vernal crest
uncut viper
#

(though im also not sure how Concat works necessarily under the hood, i dont know if you're supposed to be doing CurrentDialogue = CurrentDialogue.AddItem(thing)

lucid iron
uncut viper
#

since that extension method returns the enumerable itself

#

but concat'd with the other thing

lucid iron
#

it do look like game uses Push for this so ill change that

uncut viper
#

if concat changes the original collection reference itself thatd work regardless but i dont know if it does

lucid iron
#

i still wonder why it is become null at all since im positive i pushed something to the stack SDVpufferpensive

uncut viper
#

there are some times even within vanilla code when it becomes null

#

its supposed to never be null when you call its getter though, so im unsure

vocal knoll
vernal crest
vocal knoll
lucid iron
#

but would null CurrentDialogue lead to ThrowForEmptyStack

uncut viper
#

(i think its probably also worth at least testing chu whether AddItem does actually need you to reassign it to itself, not just call it)

vernal crest
uncut viper
#

maybe if somehow between your code and the games code its make-not-null code stuff ran? idk

vocal knoll
lucid iron
#

well again this additem bit didnt even exist the first time i encountered this problem

lucid iron
#

so while it is indeed not fix anything i dont think it's root cause

uncut viper
#

im not saying the additem caused the problem i meant for checking why it doesnt fix it

#

bc if changing it does mitigate it then that would imply currentdialogue is null to me

#

which would be good info to have for debugging

#

bc at least then you'd know what to look for

vernal crest
uncut viper
#

its not much but do you have a better lead

lucid iron
#

hm so do u mean find out like
Stack? something = null;
something.AddItem(...);
// is something null here???

#

ill go try it bolbsun

uncut viper
#

i just meant like do a quick unrelated test with some random Stack you made yourself just to see if calling stack.AddItem(thing) to it, and then looking inside the original stack, to see if that new thing is there

lucid iron
#

it is indeed empty

uncut viper
#

because if you need to reassign it to CurrentDialogue and not just call it as an extension alone, then that means you're just creating a new Stack and leaving it dangling

lucid iron
#

skem

uncut viper
#

which means CurrentDialogue is then going to be null after your prefix still

#

which is when it would then become not-null, but empty

#

because whatever it loads when its getter makes it no longer null returns an empty stack

lucid iron
#

if Game1.currentSpeaker.CurrentDialogue is null though

uncut viper
#

its null at the time of your prefix

lucid iron
#

shouldn't Game1.currentSpeaker.CurrentDialogue.Count die first

uncut viper
#

hm

lucid iron
#

given the set of load/edit beforehand, i do think it made it into the return Game1.npcDialogues[base.Name] = loadCurrentDialogue(); branch

uncut viper
#

okay then yeah its probably not null then

#

were you using AddItem elsewhere to do the original adding though

lucid iron
#

hmmm

#

no i used game methods

spouse.setNewDialogue(dialogue);
Game1.drawDialogue(spouse);
#

originally i thought i was determining the dialogue wrong and getting something empty but im fairly sure that is not the case at this moment

#

i think it is the invalidation actually

#

cus i seen that in other cases where it die too

uncut viper
#

well it cant be empty after your drawDialogue

lucid iron
#

what probably happened is

  1. HMK has night event, does setNewDialogue which itself does CurrentDialogue.Push
  2. In the 9s between, CP requested invalidate, which yeets Game1.npcDialogues, the backing field of CurrentDialogue
  3. dialogue tries to draw, dies
ornate locust
#

3 is just me doing art, I try to draw and then die :V

lucid iron
#

if i use TemporaryDialogue it might not die??

uncut viper
#

why does it take 9 seconds to go from calling Game1.drawDialogue(spouse) to it actually trying to draw

lucid iron
#

probably bc content patcher wanted to invalidate a bunch of assets

uncut viper
#

this mod list didnt seem big enough for a 9 second stutter

#

thats a long time

ornate locust
#

Nine second stutter??? I missed that, jesus

lucid iron
#

it could also be quirks with farmEvent?

uncut viper
#

it also only invalidated 10 assets, half of which are just dialogue assets

lucid iron
#

i do in fact wait 1.5s before doing anything bc thats just how the original night event worked

opaque cobalt
ocean sailBOT
#

Log Info: SMAPI 4.4.0 with SDV 1.6.15 build 24356 on Windows 11 (10.0.26200.0), with 39 C# mods and 44 content packs.
Suggested fixes: One or more mods are out of date, consider updating them

lucid iron
#

meaning here is setUp is called first and then tickUpdate is called at some unknown time later

uncut viper
#

that much was true just from lookin at the stack, where the error stems from the base draw loop and not your setup function, which also uses peek and so would crash there if it was empty there

#

(or would throw i mean)

#

(drawDialogue(NPC) uses peek in it)

lucid iron
#

yea hm

uncut viper
#

does the vanilla game use the Spouse for holding the adoption/birth question?

lucid iron
#

nope this is specific to hmk

uncut viper
#

how does the vanilla game do it

lucid iron
#

vanilla doesn't show a portrait

#

so it uses drawobjectdialogue and none of this is relevant

uncut viper
#

just a generic question box with no owner?

#

gotcha

lucid iron
#

i thought it would be cute if your spouse asked you SDVpufferpensive

uncut viper
#

may i ask why you are using the spouse itself though

#

and not just creating a dialoguebox that uses their portrait

lucid iron
#

i think it was just "well i have them" kinda deal

uncut viper
#

smapi asset propogation: like hell you do

lucid iron
#

thats ok i suppose

uncut viper
#

i think the easiest way is a dummy speaker yeah

#

just use a different drawDialogue() overload

lucid iron
#

well i can make them and then use TemporaryDialogue without worrying about cleanup right

#

since i discard them very quickly after

uncut viper
#

probably

#

im not familiar with TemporaryDialogue so i wont give it my blessing

#

but you have my blessing to not need my blessing

lucid iron
#

how can i reproduce this hrm bolbsun

uncut viper
#

set some kids dialogue entry to {{Day}} or w/e

lucid iron
#

maybe i just call invalidate asset myself to see what happens

uncut viper
#

you wanna make sure you reproduce it with the CP timing though

lucid iron
#

true enough

uncut viper
#

i guess this would be the spouse dialogue not the kid

#

kid who doesnt exist yet

vocal knoll
lucid iron
#

yea it'd be ur wife/hubby/spaghettimonster

vernal crest
vocal knoll
uncut viper
#

at least you also learned about AddItem chu SDVpuffersquee

lucid iron
#

harmonylib skems

uncut viper
#

yeah ngl as soon as i thought "wait where is AddItem even from" and saw it was Harmony i was a bit dubious

vernal crest
#

Open a vanilla asset, set your grid so that it evenly encapsulates the entire image with one frame per grid square, and then you will know that's the grid size for you to use as well.

tribal charm
#

Hello

lucid iron
#

hrm the reproduce attempt didn't work

#

as in i didnt get a cp invalidate at this timing

uncut viper
#

maybe theyre using TimeChanged?

lucid iron
#

they do have a lot of dialogue related mods

#

not impossible that one of them invalidated

devout otter
ornate locust
#

Ridgeside and mountain ramps done, with appropriate variants and SVE, Paved Valley, and Downhill compatibility. Because those were the easy ones LOL

#

(Downhill shows the Ridgeside cable car area in an inaccessible area to tie it together, I put the ramp over there too)

spice nacelle
#

I stare at IL for 8 hours and realize
I can just edit Stardew Valley.dll file manually with hex editor
Thanks for talking to me
I know that there will lot more issue in the future
But it works for now
I use this mod alone anyway

I completely give up on transpiler

dusk mulch
#

Do I need to specify if I claim something on the mod idea list? If so do I just leave a comment or do I ping tiakall?

hallow prism
#

i think a comment is enough, and then a link if you release something

#

this way, other people interested are aware, but i don't think there's exclusivity of any sort on the ideas anyway

merry river
#

oh where is the mod idea list? is it the one on the modding wiki? šŸ‘€

latent flame
#

!modideas

ocean sailBOT
#

If you have a mod idea that you aren't planning to make yourself, you can put it in the mod ideas github: https://github.com/StardewModders/mod-ideas

However, this does not mean anyone is guaranteed to work on your idea—modders who are looking for ideas sometimes go through and work on what they find interesting off this list. If you want to pay someone to make your mod idea, there are a few people who do commissions (mostly art, sometimes code); you can ask around, search usernames for the word comms, or see !commissions.

dusk mulch
#

i’ve got so many mod ideas but i’m going away for a week so i can’t do any of them SDVpufferwaaah

jovial dirge
dusk mulch
weary sail
#

anyone know of other good resources for learning to mod sdv with smapi/c#? the wiki is just not doing it for me. i need more examples, and hopefully less ambiguity between the content patcher and the smapi guides.

#

i've been able to do a few things but i'm hitting a wall and would prefer not to constantly ask for help

woeful lintel
#

There isn't much to know about SMAPI other than what the API reference lists in the wiki, since it's in C# you can do whatever you want, a guide doesn't make much sense since it won't guide you to make what you want to make

weary sail
#

looking at other mods has helped, but it doesn't really teach me why certain things work, and often what i'm actually trying to learn more about is buried under so much other stuff

woeful lintel
#

yeah, looking at other C# mods is not very helpful outside of very specific features

#

don't hesitate to ask around about stuff btw, asking more question when I started making FF would have saved me hours of useless refactoring

weary sail
#

i've seen some of the lists youre talking about, i think, but they don't cover everything and oftentimes i have no idea how i can use them

#

like currently i'm trying to figure out how to define a new item. the item wiki page tells me how to do that with content patcher, and how to create an instance of an item, and lists a few item categories. i have no idea what to do with this information. i'm assuming i need to add an item to the registry then create an instance of it, but i have absolutely no idea how to do that first step ajasdfkldfhkdlf

weary sail
#

is it just becuase i'm inexperienced with c#?

weary sail
#

ive seen the content api but still dont understand arhgjghk

golden basin
#

is there a custom quest board framework?

vernal crest
woeful lintel
#

to add an item, check the Content part of the API, that's an easy thing to start with

jovial dirge
woeful lintel
#

this is the important section: https://stardewvalleywiki.com/Modding:Modder_Guide/APIs/Content#Add_a_new_asset
Basically, adding an item means adding its data to the correct asset, the idea is that when the game needs to load the list of items, SMAPI intercepts the list when it's being read and lets mods (and Content Patcher) edit stuff into it, so that when the game receives it, it has new/modified items in it

weary sail
woeful lintel
#

to know what to put in the list of items, that when you need to look at what the item data looks like, so you can look at examples in the game's content files (if you extracted them with stardewXnbHack), and cross-reference that with the wiki page that explains what everything means in the item data

woeful lintel
#

it's true that the wiki doesn't show this properly

weary sail
#

can i just

return new Dictionary<string, string>
  {
    ["Key 1"] = {
      ["Key A"] = "Value A"
      ["Key B"] = "Value B"
    }
  };

or is that stupid

woeful lintel
#

it's not stupid, but it's not the way to do

weary sail
#

like .. <StardewValley.Object> or something maybe i dont know

woeful lintel
#

you want to use Dictionary<string, Item> and actually define an Item instance

#

actually, it's probably not Item directly but its data, and I don't know about that, so lemme check the wiki

calm nebula
#

That's just what json did with them

woeful lintel
#

oh yeah, it's ItemRegistry in this case, right?

#

I'm just used to Furniture and ShopData which are much easier

calm nebula
#

No, Item Registery spawns them

#

Here is a ring

weary sail
#

ive been able to use itemregistry to spawn items

lucid mulch
#

DataLoader is the easy way to find the types for most stuff in the content Pipeline, with Data/Objects being Dictionary<string, ObjectData>

calm nebula
#

You can...and many do...make all their items in CP and just define the special behavior in c#

lucid mulch
#

and for the most part, when it comes to stuff that you can do via content pipeline, learning how you would do it via content patcher is a good first step towards knowing how to do it in C# anyway directly via the AssetRequested event

weary sail
#

aw i rly didnt wanna use content patcher

woeful lintel
#

tbh it's seems that the part rue is struggling with here wouldn't be helped by knowing how to do it with CP

weary sail
#

i have also already used cp

#

i think its a combination of minimal c# experience and not understanding the given documentation

#

i always do this to myself ughhhhh

weary sail
calm nebula
#

There are a million more examples for CP

weary sail
woeful lintel
#

Here's how you'd add a generic item with SMAPI, with the wiki's example and what I did for FF as a base:

    private void OnAssetRequested(object sender, AssetRequestedEventArgs e)
    {
        if (e.Name.IsEquivalentTo("Data/Objects"))
        {
            e.Edit(AddObjects);
        }
    }

    void AddObjects(IAssetData asset)
    {
        var editor = asset.AsDictionary<string, ObjectData>().Data;
        editor[$"{Manifest.UniqueId}_my_item_id"] = new ObjectData() {
          // Define your object' fields here
        };
    }
#

for nested fields in the object data, you need to use other SV data classes, I find that the best tool to know what to use is intellisense/autocomplete: if you setup your IDE correctly, it knows what the properties of ObjectData are and will tell you what classes to use in the right place

weary sail
#

thank you so much, that actually makes sense

woeful lintel
#

happy to help! it's going to be a bit of a trial to get used to how everything works, but once you get it, it's pretty easy to get stuff to work.

weary sail
#

thank you :)

#

need you on the wiki team

lucid iron
#

Remember to prefix your item

vernal crest
#

Anyone can edit either wiki

lucid iron
#

$"{Manifest.UniqueId}_yourthing"

woeful lintel
#

might add a section listing which data asset are which data type, it might help

weary sail
weary sail
hallow prism
weary sail
woeful lintel
#

yeah, it's a lot of trial and error, but a good code editor will save you a good chunk of the "error" part

#

FAFO as they say

lucid iron
#

Remember to decompile the GameData dll

#

It's a different dll than base

woeful lintel
#

VSC's "Go to definition" is often enough for me for data tbh

lucid iron
#

I like having it in a folder to ctrl+p

merry river
#

speaking of which, as someone who has never dabbled in c# before: how complicated would it be to add custom behavior to a custom item that has already been defined in CP? There is one item I added that I wanted to have similar effects as the stardrop tea but I shelved the idea because said effect has been hardcoded into the game
I was wondering if that's a good starting point for learning C#? or am I underestimating this

hallow prism
#

item extension and spacecore (and probably others) are having custom effects for items, so they may provide some examples/guidance

#

depending of what you want to do there's a bit that can be emulate in CP and gift reaction, or you may want to look at how the code deals for the unlimited gift part

merry river
hallow prism
#

i'm not suggesting you add them as dependancy but that you learn from their code about how to add feature to items

merry river
#

and... i quoted the wrong message. way to go

lucid iron
#

What if u just add some custom accept item that give more hearts

#

It's not gonna be stardrop tea ofc but it is similar idea

#

Also I think it's getting dehardcoded?

hallow prism
#

yeah it's what i meant by custom reaction

#

at least this is the angle i would have since i can't do C# šŸ˜„

merry river
hallow prism
#

no

lucid iron
#

Yeah new context tag ignore_gift_limits

#

But that's 1.6.16

merry river
lucid iron
#

The thing we r talking about is the accept item dialogue keys

merry river
#

Ah! good to know. that makes my quest easier

#

ooooooH

#

I yearn for "ForEach" again

lucid iron
#

Well that is something C# can help with

#

You can do data edit asset requested and use foreach as desired

dusk mulch
#

i would be able to make so many more mods if i could simply draw pixel art, the tilesheets are so restrictive

hallow prism
#

there's some people providing tilesheet resources

#

and commission of course

#

doing some basic assets is also not too hard if you use vanilla as a base, depending of the goal

merry river
#

but I am kind of confused now because skimming through the wiki, I don't remember what exactly defines how many friendship points you get by gifting an item
was it the price (plus quality)?

hallow prism
#

it's gift taste (loved/liked/etc)+quality. There's a bit of code considering edibility and price but only for specific cases that aren't covered by usual gift taste

#
Stardew Valley Wiki

Friendship can be earned with Pelican Town's villagers. As friendships deepen, the villagers' dialogue lines become more friendly, cut-scenes called heart events occur, villagers are more likely to send gifts in the mail, and marriage is possible with one of the datable villagers.

merry river
#

ah yeah, gift taste, obviously

#

alright, thanks for the information!

weary sail
#

lol forgot to build and was so confused as to why nothing changed

hard fern
#

Happens to the best of us XD

opaque cobalt
# devout otter IIRC NPC appearance data only fires when the NPC changes location. So presumably...

oddly that did not work either. Desert festival does happen in the map location "desert" correct?
Running this for desert festival:

"{{ModId}}.Penny.DesertFestival": {
"Id": "{{ModId}}.Penny.DesertFestival",
"Condition": "IS_PASSIVE_FESTIVAL_TODAY DesertFestival, LOCATION_NAME TARGET Desert",
"Sprite": "Characters/Festivals/Penny_Desert_Festival",
"Portrait": "Portraits/Festivals/Penny_Desert_Festival",
"Precedence": -1100,
},
and this for regular outfit
"{{ModId}}.Penny.Spring_Sun": {
"Id": "{{ModId}}Sun_Outfit1",
"Portrait": "Portraits/Penny
{{Season}}Sun",
"Sprite": "Characters/Penny
{{Season}}_Sun",
"IsIslandAttire": false,
"Precedence": -150,
"Weight": 1
},

hard fern
#

I forget to save and then go "why is my mod not working"

hard fern
vernal crest
opaque cobalt
#

Thank you. That is probably the case.

hard fern
#

šŸ¤”

#

seems separate?

golden basin
#

I cant seem to get my dropbox working is the id supposed to be a id for the drop box or a id for the speical order thats active? im a lil confused

royal stump
#

the dropbox ID just needs to be unique per dropoff tile, and the Buildings-layer tile property needs to match IDs
e.g. in the first vanilla one here

"Data": {
  "DropBox": "WillyBarrel",
  "DropBoxGameLocation": "Beach",
  "DropBoxIndicatorLocation": "37 32",
  "AcceptedContextTags": "item_bug_meat"
}```
#

(as far as I know, anyway)

hallow prism
#

doesn't desert have a location context that could be used instead? since festival would likely inherit that

golden basin
royal stump
#

Data/SpecialOrders

hallow prism
#

checking documentation on stuff is a great step if you're stuck!

golden basin
#

thank you thank you so much

#

I checked the wiki thats why im here

hallow prism
#

wiki is just one of the steps šŸ™‚

golden basin
#

Yee thats why i checked it first

hallow prism
#

yes i read you the first time

pulsar tangle
#

If I want to add an "image" to an event (like the Caroline tea cutscene for example) do I have to load it as a map? Or is there another way?

golden basin
hallow prism
#

you can look at TAS

#

like temporary animated sprites

#

however it depends a lot of how CA made the cutscene, and if it has hardcoded elements

pulsar tangle
#

Gotcha. Thanks!

hallow prism
#

but yeah, TAS would be my first attempt, because they are flexible enough to allow a lot of stuff

#

(however they also have a lot of parameters, so they can be overwhelming at first)

#

(someone gave me some basic TAS template to use at a point, which helped a lot with figuring the fields)

vernal crest
#

Oh, I made a TAS generator actually

#

It's very rough and nobody has given me any feedback but I found it handy lol

royal stump
vernal crest
royal stump
#

I don't see anything wrong at a glance, fwiw
which part of it isn't working? any warnings/errors in the log about it?

calm nebula
#

Do u have another special order with a Dropbox in that area

hallow prism
#

it's also hard to say without seeing the map

#

if the property is written properly (or at all)

weary sail
#

i keep getting a cannot load ... asset doesnt exist error .. what steps should i take to figure out the issue?

#

loading it in the imodhelper entry .. should i .. not be doing that?

worldly wadi
#

Hey! I'm trying to add a custom item to monster drop. By which I mean, when the monster dies, it has a chance to drop my custom item without modifying the monster's normal loot. Anyways, is this code correct?

calm nebula
#

almost!

#

two things

#

1 - I strongly suspect (need to double check) that it's actually 0 indexed, so you would want your target to be "6"

vernal crest
#

There is no shadow guy monster in the game though

calm nebula
#

the second is that the value should be a pair that is item and chance

#

so "{{ModID}}_CannedMeat 1"

#

oh

calm nebula
#

maybe you want "Shadow Brute"?

#

patch export Data/Monsters to double check

vernal crest
#

There is shadow guy in the data, but it isn't used anywhere. Unless you have a mod which spawns it.

worldly wadi
calm nebula
#

(you're really close though!)

worldly wadi
#

Tyyyyyyy <3

royal stump
#

(iirc the shadow guy/girl cause errors even if you spawn them with C# SDVkrobusgiggle might be thinking of some other types though)

calm nebula
#

I think a lot of that was cleared out in 1.6

royal stump
#

double-checking, yeah, brute/shaman/sniper are the ones that exist/work

calm nebula
#

morning, esca!

#

I'm freezing so I assume you guys have snow

royal stump
#

morning SDVpufferchickmorning

calm nebula
#

takes the coffeee

royal stump
#

we've been frosted over here for a week or two and it's like 9F out

#

nothing bad enough to shovel/plow at least

calm nebula
#

it's 20F and I need to run more.

weary sail
#

asdgljs;a i cannot get these textures to work

#

keeps saying the asset does not exist

royal stump
royal stump
#

but in abstract, you'd usually load an asset when you plan to use the data from it, rather than in Entry

weary sail
royal stump
#

(or draw a texture in w/e game object that uses it through the usual pipeline)

woeful lintel
weary sail
#

i just opened the chat as you sent that haha

#

anyway

#

one moment

weary sail
woeful lintel
#

I'm going to bed then, don't hesitate to ping me if you need help and nobody's around, I'll answer when I come back online

stable grotto
pine elbow
#

Hi, I'm trying to make a mod to lock the players' houses, and the host's house, so that only the owner can enter. My code worked for the players' cabins, but I couldn't get the logic right for the host's cabin. Can anyone help me?

harmony.Patch(
    original: AccessTools.Method(typeof(Building), nameof(Building.doAction)),
    prefix: new HarmonyMethod(typeof(ModEntry), nameof(Before_DoAction))
);

public static bool Before_DoAction(Building __instance, Farmer who)
{
    if (__instance.indoors.Value is FarmHouse farmHouse && __instance.indoors.Value is not Cabin)
    {
        Game1.showRedMessage("Trying to open host's house?");
        if (!Context.IsMainPlayer)
        {
            Game1.showRedMessage("The host cabin is Locked.");
            return false;
        }
        return true;
    }
    if (__instance.indoors.Value is Cabin cabin)
    {
        Game1.showRedMessage("Trying to open the player's house?");
        if (cabin.owner != null && cabin.owner.UniqueMultiplayerID != who.UniqueMultiplayerID)
        {
            Game1.showRedMessage("You are not the owner of this cabin.");
            return false;
        }
        return true;
    }
    

    return true;
}
red egret
#

number is just an example

#

I want to rename items

pine elbow
#

It doesn't work because Entries modifies the entire value of the key you enter; to do it that way you should use Fields.

red egret
#

Could you give me an example?

pine elbow
#

It's the same code you posted, but replace "Entries" with "Fields".

red egret
#

oh okay that simple XD

#
Stardew Modding Wiki

Last edited by AtlasVBot on 2025-09-13 18:58:05
Welcome to creating your first Content Patcher Pack. I wanted a quick and easy way someone could copy, paste, and run their first content patch to prove to themselves everything's working as expected. I always find that creating my first, simple, working code gave me the confidence that I could tin...

hallow prism
#

does someone knows which flag is set when spouse gives you a stardrop?

pine elbow
#

There's much more documentation there.

scarlet warren
#

Right. I gotta replace Action with Patchmode!~

reef creek
#

Hey do you guys know if theres a content patcher code that will let me add a location only for part of an event? I used this code "Action": "Load",
"Target": "Maps/WoodsTemp",
"FromFile": "assets/WoodsTemp.tmx"
but it didn't work and I'm not sure if theres anything on just content patcher or if i have to use a different template

scarlet warren
#

I get it now

#

wait... nooo

scarlet warren
scarlet warren
#

I think... this is... correct now?

royal stump
#

ah, I see, there's also spouse dialogue where they give it to you, the giftbox seems to be for multiplayer marriages*

scarlet warren
stable grotto
stable grotto
#

just make sure you target all seasonal maps not just spring "Target": "LooseSprites/map, LooseSprites/map_fall, LooseSprites/map_summer, LooseSprites/map_winter",

scarlet warren
#

oh, i have to mark each season, and it wont just hit any that start with map?

stable grotto
#

nope

scarlet warren
#

lame

#

Figured if I type something like "outdoors" it'd hit ALL the outdoors maps

#

Bummer tho. But this should be good now, right?

stable grotto
#

yes

scarlet warren
#

You're a saint. Thank you so much for helping me learn this stuff

stable grotto
scarlet warren
#

Truuuue

golden basin
royal stump
#

that looks correct for your json, assuming it's on the Buildings layer

golden basin
#

yep it is there

#

idk why its no working cause it all strikes me as correct

royal stump
#

I'm not sure if special orders have weird caching like quests, but it might help to test on a new save

golden basin
#

ill try that

royal stump
#

like atra mentioned, having another order active with the same box tile can also be a problem, but I imagine you'd notice that

golden basin
#

i did yeah i noticed right away

#

AYYYYYY

scarlet warren
golden basin
#

my error was a extra space in the property oops

#

now i gotta figure a way to add them to the player without using the order board in pelican town

gentle rose
brittle pasture
#

you can set Condition to FALSE and just give the special order manually

hallow prism
#

another question, if i use || there is no point in having more than 4 options, right?

royal stump
hallow prism
#

so setting the flag would prevent someone to obtain the stardrop from the event?

#

(or dialogue or whatever)

golden basin
#

though honestly now that i think of it i think my custom quest board is good enough

hallow prism
#

well, rather, would prevent it to trigger?

golden basin
#

QUESTION THOUGH is there a custom quest board framework

hallow prism
#

(use case : i want a npc to gift it to player once condition are met, while preventing player to obtain it twice)

royal stump
#

I think setting that flag will prevent the stardrop, yeah
the hardcoded spouse dialog check only happens if they don't have the flag yet

if (friendship != null && friendship.Points >= 3125 && who.mailReceived.Add("CF_Spouse"))
{
    this.CurrentDialogue.Push(this.TryGetDialogue("SpouseStardrop") ?? new Dialogue(this, "Strings\\StringsFromCSFiles:NPC.cs.4001"));
    Object stardrop = ItemRegistry.Create<Object>("(O)434");
    stardrop.CanBeSetDown = false;
    stardrop.CanBeGrabbed = false;
    Game1.player.addItemByMenuIfNecessary(stardrop);
    this.shouldSayMarriageDialogue.Value = false;```
#

("add" is false if they already have it, if I remember right)

hallow prism
#

wonderful

#

thanks

scarlet warren
calm nebula
urban patrol
royal stump
gentle rose
golden basin
#

right now its a anti social npc that gives quest daily

royal stump
#

EMP lets you add one of those boards, and just has it look for a different OrderType than "" (or "Qi" like the other vanilla board)
plus a ! notification on a tile you specify

golden basin
#

is the mod on nexus too

royal stump
#

the full modder readme's only on github, but yeah, the mod's there and moddrop

golden basin
#

hmm id ont know if this what i need though my regular quest board is a special order board

#

isnt*

#

its just regular quest

royal stump
#

yeah, those are two really separate mechanics, you'd probably want a separate tile for an SO board

#

not sure if there's a clean way to mix them together, barring like a custom UI

scarlet warren
golden basin
#

i dont want to mix them im just talking about a so board right now

#

i mean wait

#

im getting vconfused

gentle rose
brittle pasture
#

I feel like outside of Crafting and unlimited duration is there anything quests do that special orders don't do already

golden basin
#

this board i wanna make this thing but custom for custom quest

gentle rose
golden basin
#

not a speical order just regular quest

brittle pasture
#

and the UI I guess

royal stump
#

yeah, if you've got something that gives out actual "quests" from Data/Quests, that's separate from a Data/SpecialOrders board

golden basin
#

i know im asking if i can make a board like the one next to the seed shop

royal stump
#

EMP's SO thing is basically just an "open the SO menu" tile action, so you could use it over w/e tile you want

#

that and you specify which tile has the floating ! while new orders are on it

golden basin
#

and i can add regular quest? not speical orders

royal stump
#

not with EMP's feature, I'm not sure how you'd implement those personally

brittle pasture
#

IMO I'd just convert them to special orders

blissful panther
#

It's pretty surprising if there isn't an existing framework option for a regular quest board!

golden basin
#

rightnow i have it added via a anti social npc, its just a board that gives quest via dialogue triggers

#

and theres not one DH i looked everywhere