#making-mods-general

1 messages · Page 357 of 1

lucid iron
#

or was it rts

#

something like that

prisma sky
#

rts

#

I didnt know how to describe it lol

lucid iron
#

autochess?

prisma sky
#

maybe tower defense SDVpufferthink

lucid iron
#

sure

#

but if you have this completely divorced from regular game world zone please stop trying to use NPC

prisma sky
#

alright Im getting silly now (its a fun and ridiculus idea tho)

lucid iron
#

among the vanilla holders for this kind of thing i feel Critter is best

#

they r tied only to an location, you get an AnimatedSprite on each, they are not net sync'd for better/worse, and you can implement whatever you want in draw and update

#

Companion is quite good if you want something attached to a farmer and netsync'd

prisma sky
#

I get that, but I want to keep my hopes and dreams of making chaos with the npc's lol

lucid iron
#

then skip prefix NPC.update and be chaotic BOOM

#

u may now do whatever u want

prisma sky
#

one day

lucid iron
#

u can also skip prefix NPC.draw to do whatever anim you want without fiddling with the base AnimatedSprite

prisma sky
#

worst case scenario I will use those algorithms to implement in my own game lol

lucid iron
#

the possibilities r endless but you gotta decide on the approach Dokkan

#

and whether you care about other ppl mod compat

prisma sky
#

tell me mr @lucid iron, how chill are you?

tiny zealot
#

what

lucid iron
#

I don't know how to answer this

tiny zealot
#

please don't ask vaguely threatening questions

prisma sky
#

pff

calm nebula
#

Chue is as chill as the square root of e

lucid iron
#

It's like 23 Celsius over here so not bolbonfire i suppose

hard fern
#

🤔 how chill is the square root of e...

prisma sky
#

late hours are killing me

hard fern
#

chu is your name supposed to be pronounced "chewy"

lucid iron
#

Sure

calm nebula
#

No it's chu two point seven one.. m

lucid iron
#

There's no official ipa spelling

prisma sky
#

I love how this utterly random question brought a wave of more random things

lucid iron
#

Yeah but if you continue to ask me questions like that I'll have to politely ignore you Dokkan

#

I got enough confusion in my noggin already

prisma sky
#

dw its just my sleep deprivation speaking

lucid iron
#

Sleep is good, code more clear when awake i find

hard fern
#

i read that as "cod" not code

#

maybe i need sleep too

#

hmmmmmm

prisma sky
#

why is it so hard to add a darn animation

#

this makes no sense

hard fern
#

do i want to crash test another one of my mods before publishing or should i put it off until next week.. idk i kinda dont like uploading so many mods back to back

prisma sky
#

don't crash test it and publish it now

#

let the chaos commence

#

so @lucid iron maybe tas is the way to go after all...but how do I make it seamless with the npc

lucid iron
#

Gotta inject into update loop somehow PecoWant

prisma sky
#

That's it, Im making my own game instead

#

/j

hard fern
#

and this is why we test before publishing....

halcyon nest
#

Ah, smapi gore. Classic

hard fern
#

fun fact the two issues were completely unrelated 😔 guess who just forgot to put a tile on the buildings layer

uncut viper
#

(i should add a fix for that to my map fixer SDVpufferthinkblob)

worn oar
#

is it possible (for a beginner to modding) to make this fence from the town into useable fencing?

#

I opened another fence mod as an example but I have no idea which parts are which

#

is this right? SDVpufferchickcry

half tangle
#

!startmodding
From a little bit of looking around the wiki, it seems doable. I actually didn't know we could add new fences (as opposed to only retexturing them) but that seems possible. It might be simpler for you to retexture existing fences, but either seems doable.
Check the Content Patcher link here and then you would want to familiarize yourself with https://stardewvalleywiki.com/Modding:Fences

#

!startmodding

ocean sailBOT
#

Making mods can be broadly divided into two categories:

Usually it’s easier to start with making content packs, since you don't need to learn programming.

urban patrol
#

now that i'm more worldly (read: actually trying to understand why i'm doing what i'm doing), what's the reason that it's recommended to edit over vanilla maps when making custom ones

uncut viper
#

vanilla maps have tile properties already set up on the tilesheet typically

#

and the required map properties

#

(if there are any required? if not it still has a bunch)

urban patrol
#

ah makes sense

uncut viper
#

you could ofc set up all your animated tiles again

#

or make all the water ones have Water T or w/e

#

sounds like hell tho SDVpufferthumbsup

urban patrol
#

lol yeah no thanks

zealous grail
#

sorry, guys

fossil osprey
#

What is it?

zealous grail
#

just feeling regretful. Thought it'd help to apologize to places I hadn't been active where I wanted to be. Sorry, community in general.

fossil osprey
#

It's not the end of it to not be active, you don't have to apologise :) Instead, why don't you talk about what you would have liked to do here? Do you have a mod idea? Talking about your ideas might motivate you to dive into it - that'll be a better thing to do than apologise for nothing SDVpufferheart

dusty scarab
#

it keeps throwing the red error at every new day. I'm almost certain it's because of the mail triggers for having farming level 1, and having shipped three different mod items, but I can't seem to grasp where the problem is. can anyone else see what I can't?

#

or why the charcoal kiln won't accept hardwood to become the mod item Lye?

vernal crest
#

If you want it to trigger if the player ships any of the soaps you'll need to use ANY.

dusty scarab
#

ah, I wanted it to be once the player shipped all three of the soaps

vernal crest
#

That's fine, then it's just commas in between.

dusty scarab
#

commas, that's what I stinking forgot XD

vernal crest
#

No, you still can't do it the way you have done it.

#

You have to repeat the GSQ itself.

dusty scarab
#

so it's PLAYER_SHIPPED_BASIC_ITEM Current in front of each soap, correct?

vernal crest
#

"Condition": "PLAYER_SHIPPED_BASIC_ITEM <player> <item ID> [min count] [max count], PLAYER_SHIPPED_BASIC_ITEM <player> <item ID> [min count] [max count], PLAYER_SHIPPED_BASIC_ITEM <player> <item ID> [min count] [max count]

dusty scarab
#

awesome, I did understand you correctly then :3

vernal crest
#

The only GSQs where you can repeat parts without repeating the entire GSQ is if there are plus signs in it

#

Like this one lets you list multiple special orders in the one GSQ: PLAYER_SPECIAL_ORDER_ACTIVE <player> <order id>+

dusty scarab
#

that makes sense in hindsight

#

do you happen to know why the PLAYER_BASE_FARMING_LEVEL 1 is also throwing fits?

#

because when I made it PLAYER_BASE_FARMING_LEVEL 1 1 thinking it wanted two states like for PLAYER_FARMING_LEVEL, SMAPI extra didn't like that

vernal crest
#

Probably because you're missing the <player> argument that's supposed to come before the <min> argument lol

dusty scarab
#

doesn't it default to the current player if that argument is empty?

vernal crest
#

Nope

#

It's a mandatory argument. You can tell because it's in angle brackets.

#

Also, the game knows which argument it is based on position so you can't skip them william-nilliam or they'll all go in the wrong places.

#

There's only one thing I know of that is an exception to that which is offset/laying_down in the schedule animations.

#

(Which isn't to say that's the only exception but rather that you should always assume the arguments' positions are important unless otherwise specified.)

dusty scarab
#

ah, okay. so then I want current as my argument for that, so that it takes the local player into account, correct?

does that have any repurcussions if someone is playing with friends if I don't use host as the argument?

drowsy minnow
#

i figured out gift tastes on my own this time SDVpuffersquee now i just gotta write it all out and then move onto configs

dusty scarab
#

gift tastes are a lot of typing

drowsy minnow
vernal crest
#

So yes, use current

dusty scarab
#

awesome, thank you!

#

just one more question, then. I know I screwed something up on getting the charcoal kiln to accept hardwood to create lye, but I can't see what it is. do you know off the top of your head?

vernal crest
#

The fact that your required item ID has an extra parenthesis at the end probably doesn't help.

dusty scarab
#

mmmm, yeah, that's probably true

vernal crest
#

I've never done anything with machines so other than that I am just comparing it against the wiki

dusty scarab
#

let's see if trimming it helped!

#

hmmm, it worked for the charcoal kiln, but not for the oil maker, and I would have sworn that it would have been the same fix for both

#

I know that the oil maker works in general, because it's making sweet almond oil from the modded-in almond right now

#

oh wait

#

it's a zero, not an O

#

I'm illiterate! :D

#

eyyyy it works now XD
now I just need to make sure that the trees grow and fruit properly, and everything sells and turns into what it should.

thank you, Abagaianye, for your help with the borked GSQs :D

vernal crest
#

You're welcome ^_^

dusty scarab
#

hokay, had a few more things that needed to be cleared up concerning old names that I forgot to update when I changed them to make more sense, but the real playtesting can now begin! hopefully nothing else will need changes and I'll be able to post it soon :D

proven narwhal
#

Hey im trying to make my area that i added in appear on the menu map but im trying to follow the tutorial on the wiki and im not sure if im following it correctly since im not really familar with how the game works that much

hallow prism
#

are you adding your own area map, or editing the existing vanilla map to show your area ?

proven narwhal
#

(or at least trying to 😭

hallow prism
#

ok i'm not super familiar with that so i suggest finding another mod editing that and looking at how it's done

#

you possibly need to use targetfields too

royal stump
red egret
#

Anyone free to help me with my house?

#

I'm trying to make a big one and made the sprite huge but it didn't like it so i made it only 272 px wide and it still doesn't like it 😦

#

Outer farmhouse

vernal crest
red egret
#

Nope

#

Is it for content.json?

vernal crest
#

It's wherever you have your patch written. Which is most likely in the content.json but if you're using Includes it might be somewhere else.

red egret
#

Ok i will try something

vernal crest
#

"Try something" sounds like you might be just guessing what to do?

red egret
#

With tutorials xD yes i don't know what i'm doing, really.

vernal crest
red egret
#

Some of it but ty, i'll have a look

vernal crest
red egret
#

Ah awesome thank you

swift crown
#

Hey, so I’ve been having some reports of my mod not working on android (Harmony patch failing.) Is there any way for me to debug/fix this without owning an android copy of the game?

hard fern
#

SDVpufferwaaah ive got someone commenting on my mod if i can increase the sell prices of the cooked items for the recipes i changed... i don't like touching sell prices...

swift crown
ocean sailBOT
#

Log Info: SMAPI v4.1.10.3 - 1735840167 with SDV 1.6.15 build 24354 on Android Unix 33.0.0.0, with 23 C# mods and 15 content packs.

lucid iron
#

Ah does your mod patch daytimemoneybox

#

It's doomed then that UI bit is completely different on phone

swift crown
#

Rip

calm nebula
#

Ask Pathos about the android decompile

#

Either that or find a friend with the android version and repeatedly send them builds until you've figured it out

prisma sky
#

ello ello finally woke up, I'm gonna try hooking the animations with an updateTicked event, is that a viable idea?

whole raptor
#

Huh... June is interesting (DP wise on Nexus) SDVpuffereyes I had basically the same amount of UDs as previous month... but almost twice the DP, wonder what happened

lucid iron
#

Is it new maffs

#

Yeah same here

#

I hope this means the various charities get more money Dokkan

turbid pawn
#

I'm having trouble with the mod I'm making. I'm trying to replace an image, and when I get the image path wrong, there's an error message, as expected. When I get the image path right, there's no error message, but the image doesn't change

whole raptor
#

Maybe we got a bonus from the company sale SDVpuffersquee /lh

vernal crest
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.

turbid pawn
#

*You, and config.json or manifest.json?

vernal crest
#

I don't know what you mean by the "*You" bit. And neither, your content.json please.

turbid pawn
#

I mean you didn't type My preferred pronouns, and I corrected you
I don't have a content.json, I have a ModEntry.cs

vernal crest
#

Oh, You're using C#. I'll leave it for the C# modders then.

lucid iron
turbid pawn
#

*You, and the player's body sprite, Characters/Farmer/farmer_girl_base

lucid iron
#

Ah it's probably the whole FarmerRenderer's special content manager deal

#

Gotta invalidate that i think

calm nebula
#

I thought smapi did that for you

#

It should automatically propgare

lucid iron
#

You definitely did the whole AssetRequested bits?

#

Easy way to check is patch export Characters/Farmer/farmer_girl_base

turbid pawn
turbid pawn
lucid iron
#

Yep

#

Assuming content patcher is installed

turbid pawn
#

Sure is

lucid iron
#

Once it's exported check the png and see if it's expected

turbid pawn
#

...huh.
The exported image is the one I changed, but the image I see in the game isn't

lucid iron
#

Yeah just FarmerRenderer things

#

I don't have much more knowledge about it besides it's weird™

turbid pawn
#

Damn. I'm making a framework to modify farmer textures at runtime

lucid iron
#

Should check the decompile and see if it's getting cached somewhere

#

And do whatever u need there to make sure your texture makes it in

turbid pawn
#

*You

#

*Your

lucid iron
#

Yeah sorry i am on phone

gaunt orbit
#

Aren't textures updated inline though?

#

Shouldn't matter if it's cached

lucid iron
#

But it is a different content manager right

turbid pawn
#

I ran this.Helper.GameContent.InvalidateCache("Characters/Farmer/farmer_girl_base");

lucid iron
#

What if that but on the FarmerRwnderer content manager

gaunt orbit
#

Oh, it has its own? That's weird

calm nebula
#

No, you shouldn't need to do that.

#

It has its own but invalidate should hit all of them

turbid pawn
#

Y'all got any FarmerRenderer documentation?

calm nebula
#

Nope

lucid iron
#

!decompile

calm nebula
#

FarmerRender is fun

ocean sailBOT
gaunt orbit
#

!decompile

ocean sailBOT
lucid iron
#

Gotta peruse the secret words

turbid pawn
#

Yeah okay I'll boot up ILSpy

lucid iron
#

It's not obsfucated, very straightforward

gaunt orbit
#

I dunno if I would say "very straightforward" but it is human-readable

lucid iron
#

Just rmbr, gotta fight fashion sense and win eventually

#

Did fashion sense allow changing body in middle of game?

turbid pawn
#

Yes

#

But only based on config values, not on game actions

lucid iron
#

Is doom then, prepare to harmony patch it Dokkan

#

It's open source at least so not that bad to inspect and figure out where patch

#

Could perhaps even leverage it's features and add power to change body on a trigger action

turbid pawn
#

FashionSense's source code is harder to read than the base game's

lucid iron
#

It do more things after all, base game quite hardcoded with farmer stuff

#

Imo, fine to just say "not compatible with FS" on mod and not worry about it. Depends on goal of mod Bolb

dusk terrace
lucid iron
#

I think it's ok until it do any draw

turbid pawn
#

But I'm inspecting draw code 😭

lucid iron
#

Then it's time to figure out which SpriteBatch.draw overload and wtf is this layerdepth maff

dusk terrace
#

to be fair, the code isn't the part that isn't straightforward, it's the architecture that's sketchy at best

#

at least for dialogue and farmer draws yea

lucid iron
#

Dialogue syntax is hit hard by the string switch decompile shenanigans

proven narwhal
lucid iron
#

I always feel like it's simpler in the real source

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.

dusk terrace
#

oh I just meant the dialogue interface draw calls, but I imagine the string syntax must be its own ballpark

proven narwhal
#

it said it was all fine

lucid iron
#

Please show us the json so we can help look

proven narwhal
#

alright alright

lucid iron
#

You can share the link of validator

#

That's my actual intention

proven narwhal
lucid iron
#

Line 42 "Texture": "assets/Maps/sidetownmap.png"

#

It either needs to be Internalassetkey just like 20 or get a separate Load

#

Besides that, i recommend not using custom location

turbid pawn
#

Found it

public void textureChanged()
    {
        if (baseTexture != null)
        {
            baseTexture.Dispose();
            baseTexture = null;
        }
        Texture2D sourceTexture = farmerTextureManager.Load<Texture2D>(textureName.Value);
        baseTexture = new Texture2D(Game1.graphics.GraphicsDevice, sourceTexture.GetActualWidth(), sourceTexture.GetActualHeight())
        {
            Name = "@FarmerRenderer.baseTexture"
        };
        Color[] data = new Color[sourceTexture.GetElementCount()];
        sourceTexture.GetData(data, 0, data.Length);
        baseTexture.SetData(data);
    }
sweet wharf
#

so I've got my custom npc in the game, his schedule works, he reacts to the player digging through the trash, but his dialogue won't work when im just trying to talk with him

torpid sparrow
#

what does it show

#

or does he not speak at all

sweet wharf
#

he just doesn't speak at all

torpid sparrow
#

can u upload ur content json !json

#

!json

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.

torpid sparrow
#

if you have a separate dialogue one maybe that one too

finite ginkgo
#

your dialogue target is incorrect

torpid sparrow
#

I think you need to Load instead of editData

#

you're editing something that doesn't exist (i think)

sweet wharf
#

Okay

torpid sparrow
# sweet wharf Okay

in your content json, load your dialogue Json and you wont have to do any editing in ur dialogue json

sweet wharf
#

Okay I'm doing that now

prisma sky
#

anyone know why VS is throwing me an ; expected error for a specific line no matter what I do? I even removed the entire code and it still existed

sweet wharf
#

so i just got a message from smapi that says i need a fromfile path to load the dialogue

torpid sparrow
#

yes

#

that file should be ur dialogue json

finite ginkgo
#

Correct, load takes a from file, not entries, however the way you had it before is fine, your original problem is that in your edit data for the dialogue you're targeting Characters/Dialogue/Jx, while I assume your NPC's internal name is {{ModID}}_Jax

torpid sparrow
#

the "load" patch is in the content json

sweet wharf
#

do I need to make another include for my dialogue?

finite ginkgo
#

Loading it again is unnecessary, please keep the dialogue file as EditData and fix the target

vernal crest
torpid sparrow
sweet wharf
turbid pawn
#

Yo can I just do this?
Game1.player.FarmerRenderer = new FarmerRenderer(newBodyFile, Game1.player);

torpid sparrow
#

I load in Content, then just do all the dialogue keys in the dialogue json

#

im not entirely sure what you mean by tokens though sorry i still get mixed up with terminology

vernal crest
#

Content patcher tokens. So for instance you can't use i18n if you Load it and i18n is strongly recommended for easier translating.

calm nebula
#

Lifetime management around textures is a pain enough

vernal crest
turbid pawn
hard fern
#

ive found that i18n is easier to use in general, it keeps every line of text i write in one place XD

sweet wharf
hard fern
#

i cant believe i never used it before

torpid sparrow
vernal crest
latent cape
#

Quick question, i observe some of other people's NPC event.json that all of them used numbers for their event ID, but the ones in wiki recommend putting other than numbers

Should i follow the wiki or should i figure a numeral unique ID for the event.json?

hard fern
#

😅 i have a bad habit of making random folder and stuff to put files in, and next thing you know i have too many... even for modmaking, i can never find them afterwards because i dont know which folder titled "mod wips" my file is in SDVpufferwaaah

vernal crest
hard fern
#

SDVpufferwaaah you typed it faster than me

vernal crest
vernal crest
calm nebula
torpid sparrow
#

btw sorry Hazel if i confused you more initially...i was going off my experience 😅

calm nebula
#

My recommendation is trying to figure out why asset propagation isn't updating the texture like it is supposed to but 🤷

#

I can't give a more useful recommendation than that because I don't have the code in front of me.

sweet wharf
#

does anyone have any good lists of music for the heart events? I can't find a good one while i'm writing my heart events and I just need a list of the music that i can use in game for my heart events

hard fern
#

there's a music id spreadsheet

torpid sparrow
#

i think theres a wiki list too

#

i was using it yesterday

#

one sec

torpid sparrow
vernal crest
#

There's also Button's soundboard!!! To play them in game!!!!!

gentle rose
#

is that music, sounds or both btw? I was gonna mention it but then didn’t remember which lmao

vernal crest
#

I'm pretty sure it's everything

sweet wharf
torpid sparrow
sweet wharf
#

okay

fathom hound
#

Yoba bless Button strayPraycat amazing mod

torpid sparrow
#

"EventId/precondition/precondition": "musicId/viewport coords/actor positions

sweet wharf
#

so would the music id be like AbigialFlute?

vernal crest
#

You should be using the event page on the wiki for event writing. They're very complex to attempt to do without the wiki page to help.

vernal crest
sweet wharf
torpid sparrow
#

Even after writing events for hours i check the wiki every 10 seconds

vernal crest
#

I've written part of the events page and I still refer to it constantly when writing events lol

torpid sparrow
#

endless gratitude to you for your contributions i dont think ive looked at single wiki page more

wind basalt
#

Hello! Anyone got an idea how to add a new sword using CP ? Can't find any documentation (github and wiki do not have that specifically), and every example content pack for a sword that contains Content Patcher uses format 1.1...

south plover
#

If any of you want to translate your mods I can help you to translate your mods from English to Spanish

tribal ore
#

Yeah I believe so. I'm not an items person, so I can't help v much 😦

#

One thing you could do is grab a mod from nexus that does what you want, and see how they did it

#

That's how I usually start out, when I'm trying to do something completely new

tribal ore
#

Definitely uses CP, and is fairly recent.

torpid sparrow
#

Does that one add new weapons or just retexture

sweet wharf
tribal ore
#

I think it is just a retexture

torpid sparrow
#

timestamps are in the desc

#

yesterday i just kept changing the code and running the event

tribal ore
#

Those are most of the music tracks. If you want the sound effects, you'll have to reference the wiki a lot

urban patrol
#

i’m also here to plug button’s soundboard mod, i’ll never use anything but that again when deciding sounds and music to play

#

most useful tool i’ve found as a mod author yet

urban patrol
#

it’s 1.6 compatible which is the big thing

vernal crest
#

2.0 is recent enough that it's fine

uncut viper
#

anything format 2.0 or higher is good enough

#

you can change it to 2.6.1 (or w/e it is currently) and be just fine

sweet wharf
#

i'm currently writing my four heart event for my character and i was wondering about the question fork1, if i have more than just one would i put like question fork2 and so on if i have more options for the user to choose from?

vernal crest
#

I recommend just don't use fork

wind basalt
vernal crest
#

question fork is fragile, difficult to use, and less useful than quickQuestion

sweet wharf
vernal crest
vernal crest
sweet wharf
wind basalt
#

not specifically one, but it just looks nothing alike, and i'm sure my pov here is poorly backed but that's how a guy with little knowledge sees, so i think that counts for something

vernal crest
# sweet wharf yeah, it's a bit confusing to me

I'm on mobile so it's hard for me to write anything for you but here's a very simple example event using a single quickQuestion with two routes.

"QQ1x2": "
                continue/
                16 29/
                farmer 12 32 2 Penny 12 28 1/
                skippable/
                pause 1000/
                speak Penny \"I shall ask a quickQuestion now.\"/
                quickQuestion Question?#
                Farmer answer 1#
                Farmer answer 2
                (break)speak Penny \"You chose answer 1. I will jump. Then the event will continue with its shared script.\"\\jump Penny(break)speak Penny \"You chose answer 2. I will spin. Then the event will continue with its shared script.\"\\faceDirection Penny 2\\pause 200\\faceDirection Penny 3\\pause 200\\faceDirection Penny 0\\pause 200\\faceDirection Penny 1/
                pause 1000/
                speak Penny \"The quickQuestion has ended. The event will continue.\"/
                pause 1000/
                jump farmer/
                pause 1000/
                end"
vernal crest
wind basalt
#

why don't the guys in this server with knowledge about smapi modding make videos? this is all so gatekept, little documentation, no tutorials, absolutely no examples, etc..

#

it would help more mods appear

vernal crest
#

That's a bit rude

wind basalt
#

no no not in a rude manner

vernal crest
#

We actually do a LOT of work to create tutorials and update the wiki

torpid sparrow
#

i would say this is pretty accessible

#

i think the wiki does have tutorials

wind basalt
#

I was talking about youtube videos

torpid sparrow
#

they usually have examples

vernal crest
#

There's way more documentation than for many games

urban patrol
#

unfortunately video tutorials get made redundant so quickly, and it’s a lot of work even just to update the text resources

torpid sparrow
#

^

wind basalt
#

fair

torpid sparrow
#

no one gatekeeps anything ill tell anyone who wants to commission me that doing it themselves is possible due to how much info there is SDVpuffersquee

tribal ore
#

I mean... if video formats are your jam, you can always make them yourself and upload them when you have the time/knowledge

calm nebula
#

(YouTube videos are a lot of work for something you can't copy and paste from.)

tribal ore
#

Speaking of knowledge, I have a quick problem. I have a set of lines in i18n that I would like to patch under certain conditions. Normally, I would just do dialogue patches, but these lines are parts of events. I don't really want to load different versions of the same event to change one or two lines

#

Is there a way to patch i18n gracefully?

#

If I load the base i18n, and then load another one on top, would that work?

#

like "default-patches.json"

vernal crest
#

Use a dynamic token to change which i18n key gets used

tribal ore
#

I wasn't planning on having two full default.json files. There are literally hundreds of lines of dialogue, and I only need to change like a dozen

uncut viper
#

if you're just using the i18n token you dont "load" the i18n in the first place
dynamic tokens is the way to go

#

i18n is not a Content Patcher system. it cannot be patched and cannot be altered. CP just has an i18n token that hooks into SMAPI's i18n system for your mod

proud wyvern
#

"little documentation, no tutorials, absolutely no examples"
glances at the wiki

uncut viper
#

yeah the main wiki is insanely documented and the modding wiki has a ton of tutorialage

#

also every CP mod can be used as an example bc you can just read their jsons

tribal ore
uncut viper
#

and 66% of all C# mods are open source

uncut viper
#

you're just changing which i18n token is chosen

tribal ore
#

Ohhhhhh wait. Yeah.

uncut viper
#

if you want, you CAN use the tokenizable string system, but that requires more setup

#

but here instead of doing like "Mon": "{{i18n: MyToken.1}} you do "Mon": "{{DYNAMIC TOKEN}}" and Dynamic token has its value set to either {{i18n: MyToken.1}} or {{i18n: MyToken.2}} depending on conditions

tribal ore
#

It's alright, I think I know what to do now. Thanks for the sanity check, guys

uncut viper
#

(for example)

vernal crest
#

So the line is speak \" {{i18n: line.{{playerChoice}}}}"

And the DT is:

"playerChoice": "default"

"playerChoice": "no"
When: {
HasSeenEvent: PlayerChoseYes
}

And the i18n is

"line.default": "bla bla default",
"line.no": "bla bla no"
#

Please excuse the most atrocious DT syntax in the world

tribal ore
#

Alright, got a little rejiggering to do, but I think it will be worth it. I've been head in the sand for a month on this mod

#

Looking forward to being done with it

vernal crest
#

I was typing frantically trying to get this done fast enough to still be relevant for the conversation while on mobile lol

tribal ore
#

LOL xD

#

mood

pine elbow
#

I'm trying to learn that modding shit but I can't even start damn

vernal crest
#

Are you starting with C# on purpose?

pine elbow
#

eeeee just because of that

vernal crest
#

You're starting with C# because of the Stardew Valley wiki header?

uncut viper
#

the wiki talks about both C# and Content Packs. Content Packs are not C#. in fact, Content Packs have higher placement on the modding index for the wiki

vernal crest
#

(Am I too literal sometimes? Yes, yes I am.)

brittle pasture
#

what do you want to make?

pine elbow
vernal crest
#

Then you picked the wrong one by mistake.

pine elbow
#

what should I do

sweet wharf
blissful panther
#

You might still want C#! What exactly is it you're wanting to make as a mod?

pine elbow
#

I want to write a character but I can't even start the damn project page

vernal crest
#

You don't need C# for an NPC

vernal crest
sweet wharf
#

i can send the .json if you want to look at how i have it currently

torpid sparrow
#

you add it like any other event command

vernal crest
#

If you're asking if you'd need to remove any existing question fork commands, yes you would.

#

Just rewrite what you've got but with the quickQuestion format

pine elbow
lucid iron
#

C# is used to enable content stuff

#

Content Patcher is a c# mod for example

pine elbow
#

ohhhhh okay

lucid iron
#

It's also used to add new behaviors

vernal crest
# pine elbow so what c# is exactly used for in modding

Doing new stuff that the game doesn't already do. Adding a new NPC is just using the existing game systems to add new data, so no C#. If you wanted your NPC to - I don't know, run onto the map the player is on and give them a fairy rose every three IRL hours you'd need C# because the game can't already do that.

(C# modders don't criticise my example just give better ones SDVkrobusgiggle )

lucid iron
#

But npc is already a exposed to content behavior and thus don't need whole new c#

#

If fancy stuff needed then toss in the c# later AquaThumbsup

pine elbow
#

thanks for informations, everyone 😭

vernal crest
ocean sailBOT
#
Creating a Custom 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:

calm nebula
#

.....agghhggv

uncut viper
#

have you noticed we have an npc command by the way

vernal crest
#

Atra you owe me another drink!

round timber
#

yoink

pine elbow
#

now I'll try that json thing like you said and maybe after a few months could try c# things before college starts, thanks for the command too

sweet wharf
wind basalt
#

hello uh

#

one sec i'll share my code

vernal crest
torpid sparrow
#

!json

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.

torpid sparrow
#

put it in here

uncut viper
#

pls do not send giant jsons in here

wind basalt
#

ok one sec

torpid sparrow
#

and paste the link

wind basalt
#

yes yes soghi soghi didn't know

uncut viper
#

however im guessing you forgot to set the DisplayName field

wind basalt
#

oop lemme check

uncut viper
#

Name =/= DisplayName

wind basalt
#

ohh

uncut viper
#

the Name should be the same as your entry key, its an internal name for game code use only

wind basalt
#

and for the effects, are they crrectly implemented?

uncut viper
#

DisplayName is whats shown to the player on the screen

#

i dunno. seems like it but i dont know how weapons work exactly

#

it has your correct min and max damage

sweet wharf
uncut viper
#

i just assume the other stats have some sort of Calculation applied to them

wind basalt
#

like the mods.DH.PaleReaper or smth

uncut viper
#

name should be Mods.DH.PaleReaper_PaleReaper

#

literally exactly the same as your entry key

wind basalt
#

also what size should the pic be

uncut viper
#

then add a DisplayName line with whatever you want the user to see when they hove over the weapon i.e. Pale Reaper

wind basalt
#

32x32 is weird

uncut viper
#

16x16 if i had to guess

wind basalt
#

the pics on the shop for the other items look pretty well defined and sharp though

spiral lion
ocean sailBOT
#

Log Info: SMAPI 4.1.10 with SDV 1.6.15 build 24356 on Microsoft Windows 11 Home, with 23 C# mods and 53 content packs.
Suggested fixes: One or more mods are out of date, consider updating them, SMAPI is out of date, consider updating it

torpid sparrow
#

!json

uncut viper
#

those are furnitures

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.

uncut viper
#

furnitures are bigger

vernal crest
torpid sparrow
spiral lion
#

the json does not find any errors

tribal ore
torpid sparrow
uncut viper
#

ive never worked with weapons before, so i may be wrong. they might be 24x24 or somethin for all i know

wind basalt
#

good idea!

#

alright thanks!

#

i'll find the unpacked files somewhere in the stardew valley folder right?

vernal crest
#

You need to unpack them first

spiral lion
vernal crest
#

I'm avoiding doing the command so we don't get a repeat of before lol

uncut viper
# spiral lion the json does not find any errors

the JSON validator will only find syntax errors aka if you typed something wrong or theres an invalid character. it will not tell you if there are errors in what the json is actually trying to do, bc it has no way of knowing what the data you're trying to edit is supposed to look like

wind basalt
vernal crest
spiral lion
#

OH THANKS ❤️

uncut viper
#

(thats not somethin you coulda known so dont sweat that one)

uncut viper
ocean sailBOT
#

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!

spiral lion
#

my idea is to make it work kind of like pennys event

wind basalt
#

yea yea i found out how!

#

thanks

#

16x16 for anyone wondering

uncut viper
#

(i dont know if you can use regular dialogue question syntax inside dialogue in an event? <----- thinking out loud in the hopes an event expert will chime in/correct me)

vernal crest
#

You can use regular dialogue question syntax in an event.

uncut viper
#

what happens if you use $e

torpid sparrow
#

it doesnt work

#

im pretty sure

#

$b and $e

uncut viper
#

(i typed that before aba edited their msg SDVpuffersquee)

torpid sparrow
#

oh ok!

vernal crest
#

Yup sorry missed a word

torpid sparrow
#

i rmb trying to use $b so many times and my dialogue shows up with the little gold symbol and then b

uncut viper
#

in an event or regular dialogue, bc if you mean regular dialogue that just means you did somethin wrong

torpid sparrow
#

event

spiral lion
#

oh okay intresting about the friendship

uncut viper
#

i woulda thought $b would be fine SDVpufferthinkblob
one of these days maybe ill actually Write an Event and find this stuff out SDVpuffersquee events are a pretty big blind spot for me

#

them amd machines, mostly

vernal crest
latent mauve
#

I had the $b issue before but it was because I forgot to put the # around it in my dialogue entry

vernal crest
#

Machines are basically unknown to me but I have explored a great many event things

torpid sparrow
sweet wharf
spiral lion
#

omg thank you!! ❤️

The SMAPI log says this?
An error occurred in the base update loop: System.Collections.Generic.KeyNotFoundException: The given key 'event_drunkcaregiver1' was not present in the dictionary.
at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
at StardewValley.Dialogue.chooseResponse(Response response) in D:\GitlabRunner\builds\Gq5qA5P4\0\ConcernedApe\stardewvalley\Farmer\Farmer\Dialogue.cs:line 1623
at StardewValley.Menus.DialogueBox.receiveLeftClick(Int32 x, Int32 y, Boolean playSound) in D:\GitlabRunner\builds\Gq5qA5P4\0\ConcernedApe\stardewvalley\Farmer\Farmer\Menus\DialogueBox.cs:line 353
at StardewValley.Game1.updateActiveMenu(GameTime gameTime) in D:\GitlabRunner\builds\Gq5qA5P4\0\ConcernedApe\stardewvalley\Farmer\Farmer\Game1.cs:line 5082
at StardewValley.Game1._update(GameTime gameTime) in D:\GitlabRunner\builds\Gq5qA5P4\0\ConcernedApe\stardewvalley\Farmer\Farmer\Game1.cs:line 4269
at StardewValley.Game1.Update(GameTime gameTime) in D:\GitlabRunner\builds\Gq5qA5P4\0\ConcernedApe\stardewvalley\Farmer\Farmer\Game1.cs:line 3454
at StardewModdingAPI.Framework.SCore.OnPlayerInstanceUpdating(SGame instance, GameTime gameTime, Action runUpdate) in /home/pathoschild/git/SMAPI/src/SMAPI/Framework/SCore.cs:line 1094

does anyone understand?

tiny zealot
uncut viper
#

!log

ocean sailBOT
#

Important note: Your computer username may appear in the log. If your username is your full name, please be aware of this before uploading it.

Please share your SMAPI log file. To do so:

  1. Open this page: smapi.io/log.
  2. Follow the instructions at the top of the page to upload the log file. (Don't copy & paste from the console window!)
  3. After uploading, it will show a green box with a URL to share. Post that URL here.

Please do it even if you don't see any errors. This has useful info like what mods and versions you have, what the mods are doing, etc. If the issue didn’t occur in your last session, please load the game to the point where the issue occurs, then upload the log.

latent mauve
#

#$e# works the same way

spiral lion
#

hmmm didnt know i had to, will try...

prisma sky
#

I got the animations working using a static queue... at least I know what I'm doing now to convert it into instances for multiple npc's

#

shouldn't be that hard right..?

torpid sparrow
uncut viper
#

thats just dialogue syntax

#

its on the Dialogue wiki page

torpid sparrow
#

what i learned from the dialogue wiki page is that # separates two commands

uncut viper
#

it does

torpid sparrow
#

but $b is one

uncut viper
#

$e and $b are commands

torpid sparrow
#

and usually in dialogue i dont have to surround it by #

uncut viper
#

the dialogue itself is also a "command" for splitting purposes

#

you do

#

you must always separate it with a #

vernal crest
# sweet wharf so is what you showed me just the quickQuestion, or is there a whole event side ...

That's an entire event. Penny's dialogue explains which part is the quickQuestion. Also since I write events multilined but quickQuestion doesn't work in multilining, you can tell them apart by looking for the bit where all the commands are on the same line.

However, if you can't read what I shared, you might need to slow down a bit and focus on understanding events at a more simple level because being able to read and understand each part of an event is pretty important for being able to make working ones. Like have an event that's just the starting commands, one move command, and then an end command. Then add one more command to it, and so on.

torpid sparrow
#

oh i just checked my past dialogue stuff yes ur irght

#

nvm

#

ignore me

tiny zealot
#

{ TODO. Stands for "breakSpecialCharacter".
one of these days i'll fix this one and explain that this is what $b is doing

sweet wharf
torpid sparrow
#

so in regular dialogue $e indicates you have to speak with the NPC again for the next line to trigger

#

in an event would $e just close and then open the dialogue box for the next line?

tiny zealot
#

i think if there's an $e in an event speak the following text just doesn't appear. use a second speak command to get a new box/animation

tribal ore
tiny zealot
#

(move can send a character into the void if you have previously used positionOffset on that character, because the detection of when to stop is a bit fucky)

torpid sparrow
urban patrol
#

better to end the speak command and use a pause imo which has the added benefit of you being able to control the beats of the conversation

tiny zealot
torpid sparrow
#

yeah thats what ive been doing, i was just curious

spiral lion
#

THANKS EVERYONE ❤️ it works noW!!!!

torpid sparrow
#

interesting

sweet wharf
urban patrol
#

move is picky in several ways. things i’ve found that have caused errors:

  • mixing move and advanced move
  • not allowing the actor enough time to finish their move before another command happens
  • trying to move them only one file
latent mauve
#

I have had /move send characters to the void before when I had the number of tiles moved too high without a pause after

#

Which would meet the second bullet point there

#

/move seems to ignore collision in my limited experience, so if you send them too far, they will go past the wall of the room.

sweet wharf
#

so after i move my farmer, i should put a pause or should i do individual moves like 1 0 2, then 0 3 1?

tiny zealot
#

if you don't give the optional true to avoid it, move blocks the event loop waiting for the move to finish, so normally you do not need to pause afterward

latent mauve
#

Then maybe something else was messing with me there, ichor

#

All I know is that reducing the number of tiles I moved fixed it

tiny zealot
#

(move is at least moderately cursed and i avoid it in favor of advancedMove whenever possible)

latent mauve
#

Without adding a pause

vernal crest
#

I never ever use move except where advancedMove is the one being cursed and then move mysteriously works.

tiny zealot
#

note that unlike regular move, advancedMove does not block the event loop, so you must pause or do other things to allow time to pass

sweet wharf
tiny zealot
#

sure, anything you like

prisma sky
#

anyone has any idea why my custom animation which is mostly working (using npc.Sprite.setCurrentAnimation, and in the event hook animateOnce to check for finished) with cleanup back to base sheet sometimes bugs out and snaps instantly back skipping the animation?

sweet wharf
tribal ore
#

The last is equivalent to:
/advancedMove Sam false 5 0

#

The "false" in the advancedMove call is to prevent him from looping that advancedMove call over and over

#

The "true" in the "move" call was to basically allow action to continue while the move is being executed

sweet wharf
#

so putting true would make them pace, essentially?

tribal ore
#

Not quite. He'll keep moving right

#

If you want him to pace, that would be:
/advancedMove Sam true 5 0 -5 0/

#

Or something like that

#

(Move 5 right, move 5 left). True to loop

#

Probably good to put a pause in there as well:
/advancedMove Sam true 5 0 1 1000 -5 0 3 1000/
(Move 5 to the right. Look right (1) for 1000 miliseconds. Move 5 to the left. Look left (3) for 1000 miliseconds. True to loop)

sweet wharf
#

okay

#

so, i want to animate my character and i don't necessarily know how to do that? do you have any advice besides a wiki?

tribal ore
#

Animate how? In an event?

sweet wharf
#

yeah, in an event

rough lintel
#

you use /animate

tribal ore
#

Unfortunately, that's all about frames and numbers. It really is a good idea to look through the vanilla events for "animate" calls to use as examples

rough lintel
#

^

#

wiki is pretty self explanatory unfortunately, not gonna get better than that

sweet wharf
#

what if i just want to use a certain sprite for the event?

tribal ore
#

For example, look at Shane's 2 heart event in the forest. There's an animate loop of him drinking a can of beer

#

Or Seb's 2 heart event in his room. Pretty sure there's a loop of him typing on his computer there

ornate trellis
sweet wharf
#

i ran through my event, it was working fine, but it didn't show up as a dialogue box with the portrait, how do i fix it?

half tangle
#

I'm no events person, but if you put your code into the json validator and share the link here then someone who knows events better can help debug that

#

!json

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.

latent mauve
#

Is Jx the full internal name of your NPC?

sweet wharf
#

yeah

latent mauve
#

Okay, so it's not {{ModId}}_Jx or something in your Data/Characters file, it's just Jx?

sweet wharf
#

no, it's the {{ModId}}_Jx

#

i didn't understand what you were asking

latent mauve
#

Your portraits are loaded to Portraits/{{ModId}}_Jx so you need to use {{ModId}}_Jx in your speak command

#

Because that is your NPC's internal name/the identifier that tells the code what NPC the portrait is attached to.

#

/speak Jx doesn't find a portrait because there is no NPC with that ID 🙂

sweet wharf
#

okay, thanks!

spiral lion
#

thanks everyone for the help with the event :)))

karmic gust
#

Her portrait is beautiful! SDVpufferheart

sweet wharf
torpid sparrow
#

To add a conversation topic after an event and for it to work, do i just need to include the addConversationTopic event command in the appropriate command and edit in the appropriate dialogue?

calm nebula
#

Yes

torpid sparrow
#

ty!

spiral lion
#

Yes!! thank you so much ❤️

tribal ore
#

Anyone know if it is possible to pipe more than one token into i18n at a time?

{{i18n:Default.action |Token1={{Token1}} |Token2={{Token2}} }}

red egret
#

I want to ask, for the "Format", is it 2.7.0 or 2.4.0?

brittle pasture
#

latest version of content patcher

sweet wharf
#

if im making an event like heart event, am i supposed to use $b to have the dialogue continue on another box, and if so, how do i format it? Like "It's a nice day today.$b I wish I had some shade to sit in."?

tribal ore
#

"It's a nice day today.#$b#I wish I had some shade."

#

The # are needed

sweet wharf
#

okay, thank you

red egret
#

still getting the error message

#

[Content Patcher] Can't apply image patch "Mega House > EditImage Buildings/houses #2" to Buildings/houses: target area (X:256, Y:96, Width:272, Height:384) extends past the right edge of the image (Width:272), which isn't allowed. Patches can only extend the tilesheet downwards.

brittle pasture
#

that sounds like your houses picture is too wide?

red egret
#

yes but im trying to make it big

brittle pasture
#

then you probably need to Load it as a replacement

prisma sky
#

are there smapi commands that can control the game update loop? Like for example minecraft did where you can freeze ticks and advance them by specific amounts or speed/slow the tickspeed

brittle pasture
#

EditImage wouldn't work

red egret
#

oh okay ty

lucid iron
#

I'm suspicious about whether farmhouse replace texture would work but if u do try it then you need to do editdata to swap both texture and sourcerect

red egret
#

well

#

i had a partial success

brittle pasture
#

next step is Data/Buildings

lucid iron
#

Farmer lives in a big ol church

brittle pasture
#

it may work, it may not - a lot of farmhouse bits seem somewhat dehardcoded in 1.6

prisma sky
#

are you trying to turn stardew valley into graveyard keeper

sleek flint
red egret
#

im trying to make myself a castle and the church was about the right size so im using it as a placeholder

sleek flint
#

I wanna see the whole buildings.

red egret
#

me too 🤣

lucid iron
#

Yeah i think it may be possible to keep footprint the same, but make the texture much bigger

#

Dunno how it'll work across upgrade levels tho

red egret
#

i would keep it the same XD

prisma sky
#

hi @lucid iron, Ive got the animations working except sometimes they get skipped and snap back to the default sheet, Im suspecting that animateOnce is returning true instantly for some reason

lucid iron
#

I'm glad you are having fun

red egret
sweet wharf
#

does anyone know how to make options in heart events raise or lower the friendship points?

brittle pasture
#

[[Modding:Buildings]] + unpack Data/Buildings

brittle pasture
#

Size + CollisionMap are (some of) the relevant fields

red egret
#

ty!

urban patrol
#

it can take a positive or a negative number

lucid iron
#

That will make it look big but keep footprint same

red egret
#

you mean the collision area would be still small?

sweet wharf
urban patrol
#

in a quickQuestion?

#

or are you using fork

red egret
#

still better than nothing i guess

sweet wharf
lucid iron
#

If the goal is actually make the collision big too then change Size

#

My consideration is just compat

red egret
#

alrighty im just struggling with the correct syntax

urban patrol
vocal shadow
#

Hey y'all! Does anybody know how can I modify a custom map/interior to make it seasonal and recolor compatible? ><

lucid iron
#

Are you using any custom tilesheets?

vocal shadow
#

As far as I know, they are all vanilla (outdoortilesheets). I'm modifying a mod for personal use but I'm having trouble figuring things out cause it's my first time

lucid iron
#

If it's all vanilla sheets then there's nothing you need to do SDVpufferthumbsup

#

Just have to make sure to not put the sheet in the mod

#

So that it loads from game content

sweet wharf
urban patrol
#

you can put it anywhere you like, it doesn't really matter. the player won't receive any notification or be able to check the heart level until after the event is over

sweet wharf
red egret
#

Can you please look at this code

    "Action": "EditData",
    "Target": "Data/Buildings",
"Entries": {
    "{{ModId}}_farmhousebig":
          "Name": "{{i18n:Building.Name.FarmHouseBig}}",
          "Description": "{{i18n:Building.Description.FarmHouseBig}}",
          "Texture": "{{ModId}}/FarmHouseBig",

          "Size": {
            "X": 28,
            "Y": 24
          },
    "CollisionMap": "
    XXXXXXXXXXXXXXXXXXXXXXXXXXXX
    XXXXXXXXXXXXXXXXXXXXXXXXXXXX
    XXXXXXXXXXXXXXXXXXXXXXXXXXXX
    XXXXXXXXXXXXX00XXXXXXXXXXXXX
    ",
        
    },
#

json says its not valid

brittle pasture
#

pls use the validator

red egret
#

like this?

urban patrol
brittle pasture
#

(also note that what you're doing is adding a separate building to Robin's)

red egret
#

.< i found some guide..

brittle pasture
#

missing { on end of line 39

#

(and corresponding } to wrap the entire thing)

brittle pasture
small anchor
#

guys i need some help, i have my mod mostly contructed and i wanted to run it in the game to see how its looking but i keep getting the same error. '[Content Patcher] Could not load content pack 'my mod's name': content pack doesn't specify the required Format field..' I'm not sure what the problem even is at this point lol. i am new to this so maybe its something simple?

red egret
#

i guess im attempting something too hard, idk what to do

prisma sky
#

I'm assuming eveyrthing async and while loops are a no no with the game loop system?

brittle pasture
red egret
#

just a little

urban patrol
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.

small anchor
#

okay thank you!!

lucid iron
brittle pasture
#

start by looking at Data/Buildings and identify which fields in the existing Farmhouse entry you want to change

red egret
#

😭 im too stupid for this

brittle pasture
#

as chu mentioned you probably want to edit the draw position fields (SourceRect and DrawOffset)

red egret
#

ty but i will leave it for now, its too advanced

brittle pasture
#

I suppose you can start small
make a patch that uhh changes moss soup's description while keeping everything the same

#

that's basically what you'll be doing with content patcher's edit data actions, to edit data

red egret
#

i will stick to my furniture for now

brittle pasture
#

retextures are easy yes

#

but once you learn the rest of CP literally the entire game opens up to you

#

well maybe not the C# bits

#

tl;dr you got this, if not now then eventually

lucid iron
brittle pasture
#

fear

red egret
#

ty for all help, Selph

lucid iron
#

I do wanna find out if this would work

red egret
#

🙂

brittle pasture
#

the big house dream is real

lucid iron
#

Time to yoink big castle from spriter resource

#

YuniHappy i shall report back in few hours

#

Incidentally i wonder about legality of stuff on spriter resource most of it is just unpacked from other games right

uncut viper
#

the legality is "dont be noticed"

red egret
#

i planned to draw my own graphics afterwards

#

so far i just tweaked the church if you want to use that

#

it was surprisingly colourful

prisma sky
#

I'm at a complete loss, I have no idea what causes the animation to be considered finished and snap out of existence after just a few ticks irregularly, it happens only sometimes

visual dirge
#

is there a .net wrapper type that just stores a struct in a class? (e.g. for the purposes of satisfying : class bounds)

#

if there is one i can't remember what it's called

gentle rose
red egret
#

there is a whole section for SV

gentle rose
#

yeah, we don't recommend using it for practical reasons (you have the actual files right on your computer ready to use haha) but regardless, the legality is probably very sketchy SDVpuffersquee

red egret
#

only as placeholders

lucid iron
#

it draws funny

#

upgrades fine tho

gentle rose
#

I see no issue with it. 10/10

sweet wharf
#

i got an error when i try to load in my character and im a bit confused what it needs me to fix

half tangle
#

the lakes of blood are a nice touch

lucid iron
#

*cranberry sauce

#

so something i dont think is changeable is the mailebox position

#

oh nvm its an action ez

red egret
#

haa what a huge house, or a part of it

#

maybe the mailbox can be on the left?

lucid iron
#

well u can draw it however u want im doing this for the bit

pine elbow
lucid iron
#

hm nvm mailbox position slightly hardcoded

#

the action can be moved, but not the actual bubble

gentle rose
sharp marsh
#

hello, i dont suppose anybody knows how i would go about changing hairstyles 1-56 so that they look for a unique left sprite do they? hairstyles 57+ have this functionality in HairData.json but i'm not sure where to find the first 56 of them

twilit quest
#

@lucid iron Quick question for you. In the description of MMAP, one of the bullet points is: "Trigger when farmhouse is upgraded". Does this mean, "trigger something when the farmhouse is upgraded" or "trigger the actual upgrade of the farmhouse" ?

lucid iron
#

do you know about trigger actions

twilit quest
lucid iron
#

yea, it is that timing specifically for moving furniture

twilit quest
sharp marsh
#

i figured there'd be a mod for it already but i couldn't find it... so i thought i'd try my hand at modding

dire kestrel
#

does it have to be in character menu? you could import them to fashion sense and do it there

uncut viper
lucid iron
#

no it hardcoded

#

Building.getMailboxPosition

uncut viper
#

Farm.draw calls Game1.player.getMailboxPosition which calls Farm.GetMainMailboxPosition

#

(it does not do that for Cabins)

#

and Farm.GetMainMailboxPosition then looks for a map property (if it doesnt exist it becomes a default) and then overrides that position with the ActionTile

#

(if the action tile exists)

sharp marsh
#

i also have no experience modding and am new to stardew valley so sorry if im a tad inept

lucid iron
#

very nice LilyDerp

uncut viper
#

looks right to me SDVpufferthumbsup

twilit quest
#

Is it possible to set the farmhouse upgrade level without going through Robin?

prisma sky
#

uhm, what does it mean if a tas displays as a bunch of green-orange squares?

lucid iron
#

debug hu 0/1/2

sharp marsh
twilit quest
uncut viper
#

not with CP

lucid iron
#

i dont think anyone's made that trigger action

dire kestrel
lucid iron
#

can vanilla hairs have 4 sprites normally

uncut viper
#

not wanting a dependency isnt always bc of a worry itd kill a mod

dire kestrel
lucid iron
half tangle
#

HairData.json defines if a hair style has a unique left side so it might be necessary to edit that to get a hairstyle to accept an added sprite

sharp marsh
# uncut viper not wanting a dependency isnt always bc of a worry itd kill a mod

i'd rather my mod not need to depend on anything, i've played skyrim where half the mods require a ui overhaul mod just to access mod config options, but i dont want to use that ui overhaul mod 🤷
i understand there are some times where a dependency is definitely recommended but the option seems to already be there, just for only half the hair styles

uncut viper
#

(i was on your side of that)

lucid iron
#

yea it looks feasible DokkanStare

#

job for text operations Fields

uncut viper
#

if its feasible with vanilla and CP then an FS dependency is definitely overkill

sharp marsh
lucid iron
#

hm theres no hair data page on wiki

sharp marsh
#

i could probably figure out how to duplicate the hair styles to give them a 4th sprite and add them in, but then there would be like 130 hair styles to click through

lucid iron
#

yea i mean, never moved to standalone page

#

i believe if you just edit in the right index game will try to use it

#

you know how2 EditData with cp?

half tangle
#

yeah, so you'd have to edit HairData to include whichever earlier hairstyle so it also had an entry in there

sharp marsh
#

again im new to modding

lucid iron
#

the Target is just Data/HairData

lucid iron
#

do editdata targeting Data/HairData and add entry "58": "slash delim hair data here"

red egret
lucid iron
#

Entries is how you can add a new key to a existing asset

twilit quest
# uncut viper not with CP

Oh shoot. Because it's a Global Token? So it's not possible to say "when X condition is met, set Farmhouse Upgrade Level to Y" ?

lucid iron
#

you don't need to duplicate the existing entries

uncut viper
#

its not a token at all and has nothing to do with it being global

#

there just is not anything to make it happen

#

there is no "set farmhouse upgrade level" thing you can do

#

(clarification: there is a token for it, but the actual variable that holds the upgrade in the vanilla code is not a "token")

#

you cannot set a token

#

a token is just a thing that reads data from the game/a mod/whatever

#

its not something you manipulate. you read from it, thats it

lucid iron
#

i wonder if it is as easy as add trigger action to set Game1.player.daysUntilHouseUpgrade.Value

#

Set to 1 so that it upgrade overnight

#

Otoh it is probably easier to just change robin house upgrade dialogue to like

#

Ill cleanup your house for 10000 money

brittle pasture
#

ah yes, grandpa left me with his old dilapidated farm... and a mega church taller than every pelican town building stacked together

red egret
#

Robin and Lewis will still comment it's a bit rickety

lucid iron
#

ominous grandpa

urban patrol
#

my new mod, grandpa's underground cult,

tame orbit
#

hi friends, how does one open a .dll file?
I tried opening it via "Visual Studio Code" as well as "Visual Studio 2022"
I get this error

twilit quest
lucid iron
#

checkmark heir moves into the ancestral land
checkmark a dungeon
checkmark town with saloon church hospital
checkmark grandpa is final challenge of the game

brittle pasture
lucid iron
#

It all fits trust

brittle pasture
#

you either need ilspy or (much much more preferable, if possible) hunt down the source code

uncut viper
#

you cannot open a .dll to edit it*. however you can use ILSpy to view a decompiled approximation of what the code was

#

(if the source is available then yeah as selph says, use that)

tame orbit
#

I was hoping to take a look at someone's code for an example
I also want to look at the game's code (but it's possible I'm looking in the wrong game file) (I want to add a mod)

uncut viper
#

dnSpy is also an alternative to ILSpy

#

!decompile

ocean sailBOT
lucid iron
#

Can u tell us what kind of code u want to know about

twilit quest
tame orbit
#

I want to add events, items, new gameplay storyline, character events, and quests (I was under the impression I would need C# for this)

uncut viper
#

you do not

#

all of that can be done with Content Patcher

lucid iron
brittle pasture
#

(well depends on what you mean by 'new gameplay storyline', since that's rather vague)

lucid iron
#

!startmodding

ocean sailBOT
#

Making mods can be broadly divided into two categories:

Usually it’s easier to start with making content packs, since you don't need to learn programming.

brittle pasture
#

(but yes, it's all possible with just CP)

lucid iron
#

I'd say start with just content patcher, when you are familiar with what can and cannot be done you can do the c#

forest path
#

Hi all, question: to get doors to swing in an interior map, is this the only thing I need to do? set it up in tiles as custom properities: doors? I kept testing it and it wasnt swinging, and my coordinates are correct. Wasnt sure if I was missing something else...

urban patrol
# forest path Hi all, question: to get doors to swing in an interior map, is this the only thi...
Stardew Modding Wiki

This is a mildly advanced guide for modders that assumes familiarity with Tiled, Content Patcher, and map modding fundamentals such as the difference between Map Properties and Tile Properties.
Interior doors, such as the one in Figure 1, are interactive map elements with hardcoded behaviour (see InteriorDoor.cs). There are three types in the b...

forest path
#

thank you!!

tame orbit
#

I'm essentially tacking on a whole game to the game lol
The storyline would be along the lines of creating quests to unlock different temples of each element to gain power from them to learn different weapons that I would be adding. all new maps and a mini town as well

lucid iron
#

yea i'd say 90% of what you want can be done via content patcher

#

10% is the special weapons stuff

sharp marsh
uncut viper
#

(and 5% of the 10% of weapons can be done with CP)

#

(maybe 10% if what you want is not actually all that special, code-wise)

lucid iron
tame orbit
#

oh that is such a relief to hear
I also was hoping to change the mechanic in the sense of not passing out, but I was informed that there is an existing mod for that

lucid iron
#

i should specify that i made 58 up and it's probably not the right number

half tangle
sharp marsh
#

ah... so i just need to set the index to the hair i want to overwrite with my own sprites

brittle pasture
lucid iron
#

yea thats the theory

uncut viper
#

i would say using another framework is not CP SDVpuffersquee

sharp marsh
#

mm alright, ill see how it goes, ty for the help

lucid iron
#

yea do let us know im curious

tame orbit
uncut viper
#

Advanced Melee Framework lets you do more stuff with just JSON

#

cant give accurate number guesses without knowing exactly what you want to do

#

(and i dont know all of what AMF can do anyway)

tame orbit
#

oh yeah was just continuing to use the example of 5% to keep track of convo

lucid iron
#

i'd say focus on the 90%

#

so thats making npcs, making maps, adding quests/special orders, writing all the text stuff

tame orbit
#

would I be able to create a new projectile weapon as well? like a magic wand or something

lucid iron
#

oh thats vanilla

tame orbit
#

ohhh I didn't realize they had magic weapon spells in vanilla game

#

ooo okay yeah I definitely take on too much all at once sometimes, I just try to prepare for what I'll need since I'm not very familiar with C#
I'll keep working on those aspects first SDVpufferheart

lucid iron
#

the projectile feature is funny i have no idea why it's added and vanilla never uses it afaik

half tangle
#

wait wut... I obviously have not looked in any detail at your bagged milk mod (shame on me)

uncut viper
#

do they use it for ||the meowmere||?

harsh bobcat
#

I mean there's clear signs that ^ was supposed to do more but that it ultimately wasn't I thought

brittle pasture
#

that's hardcoded funnily

half tangle
#

I don't think it shoots projectiles (in Stardew)

lucid iron
harsh bobcat
#

oh wait killing enemies with it actually does sparkles huh that's more than the 0 special things I thought it did

lucid iron
#

or if they did they didnt tell me

harsh bobcat
#

why is it [leaf]

half tangle
#

canada

harsh bobcat
#

oh canada bagged milk

#

yep yep yep

#

incredible

lucid iron
#

i wanted to see if smapi is ok with emoji and it work just fine Dokkan

#

alas pathos said no fun allowed in the unique id

torpid sparrow
#

Hello, when I'm doing animations during an event, I'm looping the animation with the same start and end frame but in between the end and the next loop, there's another frame not part of the loop

lucid iron
#

i added the trigger action mushymato.MMAP_FarmHouseUpgrade

#

it makes house upgrade overnight just like in vanilla

twilit quest
#

Oh my GOSH

twilit quest
#

Thank you thank you thank you!!!

sharp marsh
# lucid iron yea do let us know im curious

no luck, i was able to find the IDs for the hair styles in save game data upon starting a game with said hair style, but couldnt get the changes to appear ingame when setting the entry to that ID, of course it's very possible, if not likely, that i'm doing something wrong, but not really sure how to go about making it work 🤷

#

i'll probably try again tomorrow

lucid iron
#

in this example it used the first sprite from the hair 1 row below cus i didnt do any image changes

#

if u replace Characters/Farmer/hairstyles entirely with ur new texture arranged like this it should work i feel

#

perhaps better to do new texture tho (which will work as long as you load to Characters/Farmer/blahblah

patent lanceBOT
#

@wanton pebble: if you're still on the hunt, to look at Stardew UI for UI options for things (150d ago)

pine elbow
#

hey guys

#

You believe in me right

hard fern
#

uh?

hard fern
pine elbow
#

mod

hard fern
halcyon nest
pine elbow
#

just need to hear that every once in a while is all been a rough day for me in genera

halcyon nest
#

I feel that tbh

wanton pebble
patent lanceBOT
#

oh my goooooooooooood agentlyoko fine (#6759759) (150d | <t:1764550646>)

halcyon nest
#

Keep ur chin up! Fall down seven times get up 8

pine elbow
#

i thoug we used c sharp to make mods not java

uncut viper
#

SMAPI uses C# yes

pine elbow
#

just want to find and exmaple of where to start

dusk terrace
#

SDV was also originally made with XNA, a C# library

uncut viper
#

(it still is)

dusk terrace
#

it uses monogame now

#

a different framework for C# SDVpuffersquee

pine elbow
#

sorry jsut dont know enough about code yet]

uncut viper
#

either way there is no java so im not sure where you got that from

#

there is javascript object notation, though, which is json

#

!startmodding

ocean sailBOT
#

Making mods can be broadly divided into two categories:

Usually it’s easier to start with making content packs, since you don't need to learn programming.

uncut viper
#

the majority of mods do not involve coding at all and only need json and Content Patcher

pine elbow
#

well im new to jsut c sharp and modding in genreal

#

but trial and erro are backbone so

forest path
#

Hey all, is there a way to test out if a new NPC I created works late-stage? like, testing out its 8-heart event, other events later in the game with them? im assuming yes, just didnt know what the resources are

half tangle
#

you can test any event using debug ebi [event id here] in the console window

#

that ignores any preconditions

forest path
#

Thank you!

half tangle
#

(without the [], to be clear)

forest path
#

Oh thank you! Appreciate it. Added it to my bookmarks on stardew resources haha

half tangle
#

you may also like the mod Fast Forward for fast forwarding through an event and CJB Cheats Menu and CJB Item Spawner for quick access to cheating lots of stuff for testing. I think that's all that comes to mind right now.

forest path
#

good to know!

half tangle
#

Oh yeah, Event Tester, too

pine elbow
#

so how did you all learn what a code of stardew game migth say for example food prices

vernal crest
#

Don't need fast forward if you have event tester, too

vernal crest
pine elbow
#

what about your own spirte what about c sharp langauge

vernal crest
#

What are you asking specifically about the sprites?

#

The C# is the same. We look at the decompile - but that's only for the people who want to do C# mods which is the minority.

pine elbow
#

im new to modding so i dont know how to decompile soemthing

brittle pasture
#

you dont necessarily need C# to make mods
what do you want to make

vernal crest
#

I recommend you don't try to start with C# then

pine elbow
#

then waht do i do to decompile thigns

vernal crest
#

Like Selph said, what do you want to make? Knowing that can help us guide you better

pine elbow
#

i wanted to amke an avocado mod

vernal crest
#

!startmodding Then have a look at the Content Patcher/json resources listed below (ignore the C# stuff)

#

Uhh, governor?

uncut viper
#

.. thanks gov

#

its the command i posted for you earlier, venus

ocean sailBOT
#

Making mods can be broadly divided into two categories:

Usually it’s easier to start with making content packs, since you don't need to learn programming.

vernal crest
#

There were go

half tangle
#

you've asked about this before at least once - have you worked on the sprites or referenced the resources folks have shared before? If you're having trouble with some aspect, feel free to ask for clarity about it

vernal crest
#

Like me, gov is just waking up

pine elbow
#

Hello! Can anyone help me figure out how to get my npc to dance at the flower dance? "FlowerDanceCanDance" doesn't seem to be working.

urban patrol
#

there's a tutorial or a template, let me find it

pine elbow
#

i dont know how to make my own sprites

slow basin
#

im doing npc schedules atm for my npc, how do you get them to do a repeated section of sprites for an animation would i have to put the number of the sprite section similar to the facing direction numbers and then type them all in the order of how i want them played?

EX, if a dancing sprite is on number 12 13 14 15 would i go
"12 13 14 15" for the schedule section for like the facing category and would it repeat this animation?

brittle pasture
ocean sailBOT
brittle pasture
#

a good way to get started is downloading an art software, unpacking the game files and just making edits on it

#

recolor the apple to be green for example

#

(ignore the second half of that Governor message)

pine elbow
#

unpacking game files i dont know how to do that you mean just dig around in game folders

brittle pasture
#

!unpack

ocean sailBOT
#

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!

pine elbow
brittle pasture
#

follow the instructions and all the game's image files should be in a "Content (unpacked)" folder for you to play around with

slow basin
#

(another question is how do you make a specific portrait show up while talking to someone doing an action at the moment)

#

or if thats even possible

hard fern
#

uhh i dont have the wiki pulled up rn

halcyon nest
#

The biggest takeaway is that the first (default) portrait is labeled 0 in the list

slow basin
#

ooo i would have messed that up lmao