#making-mods-general

1 messages · Page 454 of 1

uncut viper
#

then in that case use a stat

#

and then use a tokenizable string

autumn tide
#

oh yeah!! stats exist

uncut viper
#

you wont be able to use the stat in When conditions (again though, Esca's Modding Plugins can allow that) but if you're only using it in dialogue and not conditional patching thats no matter

autumn tide
#

huh, okay, little confused but I'll look into that

hallow prism
uncut viper
#

then you're back to hardcoded checking for every year

autumn tide
#

..very confused rn one sec

uncut viper
#

if you increment a stat called MarriedToSpouse every year then you can put [FarmerStat MarriedToSpouse] in dialogue and it'll be replaced with what the stat is

uncut viper
#

yes

#

see the IncrementStat trigger action action

autumn tide
#

hmmm interestingggg

#

my brain has most unfortunately been turned into a blob of tapioca, but I will save that for when i regain the ability to think!

#

thanks so much buttons!

autumn tide
uncut viper
#

yup SDVpufferthumbsup

autumn tide
#

perfect!

brittle ledge
#

!2020

ocean sailBOT
#

That was five years ago, mate.

oblique meadow
#

I think I have the power to make commands at my level and such. I just refuse to acknowledge and confirm that power because I know me

toxic wind
#

Hi everyone. I've a short question about Priority and Dependencies. Let's say I want to change the value of the apple object. Mod A now has a priority of Default+2. Mod B has a priority of Default+1, but also a dependency on mod A. Which change wins? (I'm assuming a higher priority means later in the load sequence, please correct me if that is wrong)

devout otter
#

The Priority change will win.

autumn tide
#

sorry to keep asking dumb questions lol, but how can i trigger mail to send when a convo topic expires?

autumn tide
uncut viper
#

if you just set it to fire when the player did not have the CT, then it'd fire immediately because they dont have the marriage CT at the start of the game, ofc. you also need to know that they did at least get married

jaunty moat
#

hey, quick question, can I force a fishing minigame with a legendary fish speciifcally?

calm nebula
#

Isn't there a debug command

uncut viper
#

if you dont want to support divorce you can also just check that they have a spouse, too, if you want

#

in 1.6.16 you'll be able to check a players previous CTs specifically though which can replace the need for that tracker mail flag, but thats obviously not released yet

autumn tide
#

gonna send my code here eventually!

jaunty moat
#

it says there's no output

#

oh well anyway

brittle pasture
#

that's normal, go back to your game

jaunty moat
#

yeah it doesn't start fishing the fish I want

#

it's called just legend right?

brittle pasture
#

do you have the fishing rod

jaunty moat
#

yeah it starts fishing a random fish

brittle pasture
#

it probably wants the item id, which for the Legend is definitely not Legend

jaunty moat
#

aw shucks

hard fern
#

163

toxic wind
calm nebula
#

Cat tax??

hard fern
#

cat...

brittle pasture
#

(am on phone, thanks forsy for the quick answer)

jaunty moat
#

alright so I can't input that if the image it's being replaced with is 19x19 instead of 19x20 right

"ToArea": { "X": 615, "Y": 1841, "Width": 19, "Height": 20}

brittle pasture
#

do you mean the source image
can you post the full code for context

calm nebula
autumn tide
# uncut viper for now you'll need to also set another mail flag at the same time you start the...

ALR I FUCKING DID ITTT
the dialog code thing:

    { //CS FILES
      "Action": "EditData",
      "Target": "Strings/StringsFromCSFiles",
      "Entries": {
        "Krobus_AfterWedding": "{{i18n:i18n_Dialog.Krobus.Special.MovedIn}}$t {{ModId}}.Topic.NewYearRoommated_Krobus 112#$t {{ModId}}.Topic.KrobusMovesIn 5#$action AddMail current {{ModId}}.Letter_FLAG.KrobusMovesIn received",
      }
    }

my trigger action code:

    { //YEARS ROOMMATED
      "Action": "EditData",
      "Target": "Data/TriggerActions",
      "Entries": {
        "{{ModId}}.Trigger.YearsRoommated_Krobus": {
          "Id": "{{ModId}}.Trigger.YearsRoommated_Krobus",
          "Trigger": "DayStarted",
          "Condition": "PLAYER_NPC_RELATIONSHIP current Krobus Roommate, !PLAYER_HAS_CONVERSATION_TOPIC current {{ModId}}.Topic.NewYearRoommated_Krobus, PLAYER_HAS_MAIL current {{ModId}}.Letter_FLAG.KrobusMovesIn Received",
          "Actions": [
            "IncrementStat {{ModId}}.Stat.YearsRoommated_Krobus 1",
            "AddConversationTopic {{ModId}}.Topic.NewYearRoommated_Krobus"
          ]
        },
      }
    },```
calm nebula
#

I legitimately thought a message of just "163" was a cat

autumn tide
#

aww :)

calm nebula
#

And not an item id

autumn tide
#

they're helping you code

jaunty moat
#

I see relationship_krobus

#

Can we kiss the shadow creature?

calm nebula
#

That's Casey and her cat

#

I am catless

autumn tide
jaunty moat
autumn tide
autumn tide
#

aroace quing

#

NO ROMANCING THE SHADOW CREATURE!!

jaunty moat
#

Aroace

#

Well guess its alright

#

I'd prefer just ace though, but it's me yknow

autumn tide
#

..what were you gonna do to the shadow creature /lh

#

how could you /j

#

i take this as a personal offence /j

hard fern
jaunty moat
#

I dunno I was gonna like pet it and maybe cuddle it or smth

#

Nothing vulgar

autumn tide
#

👀

jaunty moat
#

I'm a prude yknow

autumn tide
#

but i am making krobus pretty physically affectionate lol

jaunty moat
#

Thats cute

autumn tide
#

you're doing a fish mod right?

jaunty moat
#

I mean I just wanted to replace the fishing bar fish so that it doesn't look so traumatized

autumn tide
#

honestly good i use easy fishing bc i'm lazy but yeah i support that SDVpufferthumbsup

jaunty moat
#

And unfortunately the fishing bar fish is like 19x19 pixels, and all the other fish sprites are 16x16 and don't even take all the space they're given

#

So yeah some fishes look really smol

autumn tide
#

eughh

jaunty moat
#

And also the legendary fish sprite is 19x20 for some reason

autumn tide
#

huh

jaunty moat
#

Cuz of the crown

#

It has an extra pixel

autumn tide
#

oh are you making the game fish sprite match the one you catch?

jaunty moat
#

Nah, just the one you pick in config menu

autumn tide
#

idk how the fishing game works lol

jaunty moat
#

There's already a mod that changes the fishing fish to whatever you're catching

autumn tide
#

huh

jaunty moat
#

But I like the intrigue

autumn tide
#

innnntersting

autumn tide
jaunty moat
#

Anyway what's that bot command to remind me to do things

autumn tide
#

i think it's just remind me

iron ridge
#

remind me in 10 hours to be an example

patent lanceBOT
#

okay but only if the mariners get at least 1 playoff win in 2025 (#6927229) (10h | <t:1761641324>)

autumn tide
#

idk ive never done it

jaunty moat
#

Remind me in 12 hours to fix my fish sprites and upload the mod

patent lanceBOT
#

yeah whatever. leave the request on my desk. i'll get to it. maybe. sip (#6927230) (12h | <t:1761648544>)

autumn tide
#

huhh

jaunty moat
#

Yeah it's convenient

#

I like that this command doesn't require any special symbols

#

It's immersive lol

autumn tide
#

hmm i wonder what the time limits are

#

remind me in 200 days to do something idk

patent lanceBOT
#

sssshshsssfhsfs (#6927232) (200d | <t:1778885457>)

autumn tide
#

goddamn alr

#

heh 2026 me will be so taken aback-

autumn tide
#

hmmmm is there a way to add a suffix to a stat in a dialog? i wanna make it show up as like '2nd' '3rd' '4th' etc.

#

my dialog line btw
"Reminder_Krobus": "Hello, @! It's only more one week until the [FarmerStat {{ModId}}.Stat.YearsRoommated_Krobus] 'anniversary' of my moving in with you!$1#$b#It's very sweet how humans celebrate such things.$7",

#

the line's for Kantrip's Wedding Anniversaries mod btw!

gaunt orbit
#

Hmmm not sure if there's a token for number plurals

#

There is not, at least not in vanilla

#

That said I'm not sure if you can use tokens with dialogue anyways?

hard fern
#

what if you wrote it as " x year anniversary"

#

that way it wont need a suffix or anything

#

and works with any number

#

2 year anniversary, 53 year anniversary, 99999 year anniversary....

autumn tide
brave fable
#

0 year anniversary, e year anniversary, ⅓ year anniversary, √-1 year anniversary,

hard fern
#

nth year anniversary

#

anyone know where the desert food data is stored?

autumn tide
#

for the fair, right?

#

festival*

hard fern
#

yes

uncut viper
#

then the answer is: it isnt

hard fern
#

💀

#

ah ok.

uncut viper
#

hardcoded

autumn tide
#

noooo

hard fern
#

i had a bad feeling it mightve been

#

it's ok i'll just... squint at the sprites and pretend i know which one is which

#

or i can just look at the wiki.

#

what do you reckon the "rare fruit" is

hard fern
uncut viper
#

no, any user-visible text is always going to be localizable and thus stored in the content folder now

#

in this case Strings/1_6_Strings

#

look for Cook_ stuff

hard fern
#

thing is there's no description

#

so does that mean i'll have to write one myself?

uncut viper
#

im not sure what you mean

hard fern
#

the names are there, but there is no description

#

so if i want to make an item i'll have to write my own, it seems

uncut viper
#

oh. yeah, there is no description because you can never see it anyway

autumn tide
uncut viper
#

but the displayname is not hardcoded

hard fern
uncut viper
#

(but since you can never see the description from the chef g uy anyway, it doesnt matter if you make up anything, since the player wont be able to see an "original" one anyway)

hard fern
#

(i know, i'm going to make them real objects, so they need a description)

#

(so they're going to not even be the ones from the chef guy at festival, rather their own separate "bootleg" items)

uncut viper
#

thats what i figured, im just sayin it doesnt matter that the description (or lackthereof) is hardcoded, which is nice in this case

devout otter
#

Oh, making a vendor like your concession vendor? SDVpuffersquee

hard fern
#

yep

autumn tide
#

oooh cool!

autumn tide
uncut viper
#

are you sure the player is guaranteed to see the AfterWedding dialogue?

autumn tide
#

uh hopefully? if they talk to krobus on the day they move in

uncut viper
#

but they dont have to

autumn tide
#

yeah, true

#

i just figured most would

uncut viper
#

no reason to settle for most when you can go for all

#

just set up a different trigger action for the first DayStarted where they have krobus as a roommate

#

and change the second trigger action to DayEnding, mostly because i dont know the exact timing for when Krobus is considered your roommate

#

if the change is made overnight, then when the DayStarts Krobus might be your roommate before the wedding is over and you dont have the CT

#

so it'd fire too early if that happened

autumn tide
#

huh, alr

#

there's no wedding for krobus tho, they just break in

#

no cutscene at least lol

uncut viper
#

the relationship change happens in either the overnight stuff or the start of day stuff, i just dont know which

#

same deal i believe

patent lanceBOT
#

@next plaza: try the above (22h ago)

autumn tide
#

alr! I'll screenshot that to do

uncut viper
#

so axtually i would also change the CT giving trigger action to be DayEnding too

#

but BEFORE the second one in your content.json

patent lanceBOT
#

@next plaza: think about this too (22h ago)

uncut viper
#

Data/TriggerActions is a list so they will be checked in the same order they are written in your json

#

so you need to make sure the CT is given first ofc

autumn tide
#

oh i didn't know that

uncut viper
#

they should basically have the exact same condition i think just the second one checks for Not having the CT

brave fable
#

engagement and roommate status is set immediately on proposal, but marriage (and by extension actually rooming) is only set immediately before the wedding event itself

autumn tide
uncut viper
#

in that case then the DayEnding on both should indeed be the safest. i will file that detail away in my memory banks

#

thank you booberry aka blueberry aka bluebs aka blbry

brave fable
#

(formerly rhubarb)

uncut viper
#

aka (formerly rhubarb)

gaunt orbit
#

oh dear, something went wrong with hot reload. For some reason it now says one of my types doesn't exist now

#

oh vs's cache is just broken

autumn tide
#

oh phew

gaunt orbit
#

probably because I killed all of the dangling devenv processes bc they were eating up like 3gb collectively

#

seriously why does it not shut off when you close it like half the time

brave fable
#

(vs' orphaned processes are really irritating, especially with the build error from them holding a lock on the dll)

autumn tide
#

uhh having an issue with nexus, tryna upload a mod and I keep getting this message? attached my mod name too, idk why it's rejecting it??

brave fable
#

it says brackets, but it means parentheses

autumn tide
#

oh shit okay

#

ty

#

..got the spinny cog of death okayyy

#

IT WORKS

#

ty booberry SDVpufferheart

tiny zealot
#

"brackets" is british for ()

autumn tide
tiny zealot
autumn tide
#

god i love wikipedia-

vernal crest
#

I also did not know that Nexus only accepts parentheses and not square brackets. I was extremely cross when I found out.

hard fern
#

ok modded stardew is chaos so im gonna ask here as a mod author XD

🤔 shld i have recipes for my items be an optional file or should i make it part of the main file, but as a config option instead?

latent mauve
#

Might have something to do with square brackets being used for BBCode? (for why Nexus won't take them in the name)

tiny zealot
hard fern
#

oh... hm yeah ok

tiny zealot
#

other than that, if i were doing it i'd probably do a config. anecdotally, users prefer fewer downloads

gaunt orbit
#

does the decompile repo on github include the android version of the game, or desktop only?

tiny zealot
#

you could also bundle it as a separate file in the main zip, i guess, but then you need more readmes and so on and it's probably not worth it

gaunt orbit
#

although I suppose the source is not very useful without the il anyways

autumn tide
uncut viper
vernal crest
#

It says it's only the Windows one, yeah

gaunt orbit
#

that is, InventoryMenu.rightClick on desktop

hard fern
#

😅 i forgot how to math... so the "Duration" for buffs on objects is measured in in-game minutes, but like... how. will putting a duration of 1 mean it last for one in game minute?

uncut viper
#
if (slot is Tool tool && (toAddTo == null || toAddTo is Object) && tool.canThisBeAttached((Object)toAddTo))
{
  return tool.attach((Object)toAddTo);
}

this the part in question?

#

(from the PC decompile)

gaunt orbit
#

I'm adding my own check but yeah, that bit

#

just before that if

#

this, roughly

if (TryCombine(ref slot, ref toAddTo))
  return toAddTo;

if (slot is Tool tool ...)
uncut viper
#

hm main difference in android seems to be that it never creates that slot local and just keeps calling this.actualInventory[num] (where num in android is slotNumber on PC)
do both MUS and Happy Home Designer use the same transpiler for this

gaunt orbit
#

pretty much

uncut viper
#

HHD doesnt have source linked smh /lh

gaunt orbit
#

IT IS LINKED in information for modders

uncut viper
#

the article? i dont see any link there

#

(also ill admit i dont know what MUS stands for)

gaunt orbit
#

huh? let me double check

#

oh you're right, I thought for sure it was on there

#

I'll have to add that

calm nebula
gaunt orbit
#

that or people have just never tried using the feature and thus have never broken it

uncut viper
#

ILSpy is telling me that it is

#

InventoryMenu.receiveRightClick calls it

#

which is called from various update functions

gaunt orbit
#

hm

#

oh well, I'll chalk it up to a mystery

#

so in theory this should work fine

uncut viper
#

is your transpiler failing to match or just spitting errors when a user tries to attach

#

or just. doing nothing

gaunt orbit
#

(also MUS is Machine Upgrade System, the drop-in upgrade thing used by Nach's mods)

gaunt orbit
#

NRT ghosted me when I asked if it worked

uncut viper
#

if its the version on nexus and i dont need to compile anything myself i could test it rq

gaunt orbit
#

I have a zip just gimme a sec

#

in theory all of the patches applied on this should work

uncut viper
#

ill report back soon after i figure out my mess of cables

gaunt orbit
#

thank you very much

livid kite
#

I'm back reading a bit, but this is for Android modded sdv? I play the on my phone modded, I can test it for you if you need help

gaunt orbit
#

please do! the more the merrier

livid kite
#

Ok give me sec

uncut viper
#

oh i cant even launch with it cuz the manifest needs a higher SMAPI version than exists for android lol

#

(i know i can change that myself rq but figured you'd wanna know that, too)

gaunt orbit
#

oop

#

I'm using the manifest builder, I'll have to tweak that

uncut viper
#

what do i need to do to test it? just attach anything to a fishing rod?

gaunt orbit
#

try to "attach" a catalogue to a furniture catalogue

#

if it works it should combine them into a new item

#

(though even if that doesn't work, I'd be happy with "runs at all on android")

livid kite
ocean sailBOT
#

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

livid kite
#

It said it failed to load

uncut viper
#

i can attach a bobber to a fishing rod but trying to attach the Joja Furniture Catalogue to the Furniture Catalogue does nothing but swap inventory places

#

oh i do see an error in the log actually one sec

ocean sailBOT
#

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

gaunt orbit
uncut viper
#

i blame unclear instructions 😛

#

but that error appears after game launch anyway

gaunt orbit
#

Hmmmm

real agate
#

MOD number 2 reworked and back to working state with 1.6. Only a few more to go. 😄

uncut viper
#

tried combining the other catalogues anyway and yeah, nothin

gaunt orbit
#

not sure why it thought the opcode was invalid but I swapped the stloc_s for a stloc

#

and fixed the manifest

low marlin
#

I made a check in my IUCT fork checking if any child's name is any out of a list of names set in the ConfigSchema - But instead of checking for children with those specific names, the loops checks for ANY children regardless of name!

(The check is intended to have the Wizard's children using a different set of dialogue (to check for who is the Wizard's children, there is a list of config-able names in CMCM (that I set up via the ConfigSchema)

#

How to fix?

ocean sailBOT
#

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

low marlin
#

The condition is:

"ChildNames": "{{WizardChild2}}, {{WizardChild4}}, (...), {{WizardChild12}}"

(In my case with the config-able names, even-numbered names (e.g. "WizardChild2") are meant to be the names of MALE children with the Wizard, and odd-numbered names suggest otherwise)

gaunt orbit
#

how bizarre

#

I

#

I will investigate further another day

uncut viper
#

if you push your most recent changes to your repo i might be able to take a look if i have some time before you get to it, if you'd like

gaunt orbit
#

thanks! I'll do that

#

pushed

low marlin
livid kite
gaunt orbit
livid kite
#

Let me get

ocean sailBOT
#

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

gaunt orbit
#

Okay so the same error as button

#

The rest of it seems to work though

livid kite
gentle rose
gentle rose
#

!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.

gentle rose
tired relic
#

Can someone help?

gentle rose
#

with?

tired relic
#

Its doing this when I open my sprites to edit on my tablet

gentle rose
#

what is “it”? what app are you trying to use?

uncut viper
#

@gaunt orbit can i ask what you're intending to match on here? whats ret supposed to be in the PC decompile?

// find return point
il.End()
  .MatchStartBackwards(new CodeMatch(OpCodes.Ret))
  .MatchStartBackwards(new CodeMatch(i => i.operand is LocalBuilder));
ret = (LocalBuilder)il.Operand;
il.Start();
finite meadow
#

does it require to create a whole mod to execute smapi commands in a starting file? or can this be done within an already existing mod, like a built in feature? for instance, a custom farm and have the player start with a custom amount of hp/stamina ?

tired relic
#

And it's the sprites

#

For any of them

vernal crest
#

Iro was asking what was happening

#

It looks like they're duplicating

#

Try downloading another app

gentle rose
#

that doesn’t look like pixel studio tbh

crude agate
#

关于 NPC Map Locations 这个模组 我下载了N网源码 然后尝试打包发布 控制台老是弹出跳过模组信息 , 而且也是最新版本3.4.4 ,所以请教各位专家帮忙看看到底是什么原因 谢谢!!!

tired relic
#

I have both medibang and pixel studio and it's doing it to both

hard fern
#

Tablet cursed...

vernal crest
tired relic
vernal crest
tiny zealot
#

@hard fern this is what the desert festival food guy uses:
600 * Game1.realMilliSecondsPerGameMinute, i.e. 600 * 700

tired relic
#

I can try when he goes to work on Wednesday

tiny zealot
hard fern
#

Hmmm

tired relic
#

General question 🤔 do i have to code what a new furniture piece does? Or say i wanted to do pet clothes that u can change on pets or would I just use the mechanical structures of what hats do

hard fern
#

The wiki doesn't say anything about what units "duration" is even in

#

For buffs

#

It just says "in in-game minutes"

#

But that's really confusing

vernal crest
#

Why not just try setting a buff duration of 1 and see what happens?

tired relic
#

Don't know if that helps?

ivory plume
#

(In-game minutes is the unit. If you get a 10-minute buff at 6am in-game, it'll expire at 6:10am.)

hard fern
#

Oh

#

So I'd been doing math for like.. an hour

#

For no reason SDVpufferflat

vernal crest
tiny zealot
# hard fern Oh

ok so you want 600 for 7 irl minutes (matches desert festival food guy buffs)

crude agate
hard fern
#

SDVpufferflat im never making food with buffs again

woeful lintel
royal stump
# finite meadow does it require to create a whole mod to execute smapi commands in a starting fi...

Having discussed it a few days ago, I don't think any frameworks offer CP access to console commands. But:

  • There are frameworks that can spawn buildings, though I forget which one(s) do that offhand
    (Edit: Spacecore can add new farm buildings at creation: example)
  • BETAS adds trigger actions here that set current health and stamina, though I'm not sure if any frameworks let you directly set maximums

(PS Sorry if I misread; if your question was just doing it without any separate mods, then no, I don't think anything offers that)

woeful lintel
crude agate
vernal crest
vernal crest
crude agate
crude agate
gentle rose
#

client side, as in you’re a farmhand in multiplayer?

tired relic
hard fern
#

?

tired relic
#

What i wanna do is use player clothes and add them to animals

gentle rose
#

that’s definitely c# territory

vernal crest
#

You could make new hats, but I don't think you could control where on the animal they would go

tiny zealot
woeful lintel
tired relic
#

Omg 😲 thank u! I just basically use that frame work and give credit

crude agate
vernal crest
uncut viper
# uncut viper <@91568447212769280> can i ask what you're intending to match on here? whats `re...

@gaunt orbit update on this: the reason i asked is because on Android, the instruction you were taking the operand from was an ldloca.s 0 which seemed incorrect to me, and it was the reason Harmony was yelling at you since thats not a valid thing to Stloc to. on PC, it takes the operand from the 2nd to last instruction, an ldloc.s 4. on android however that second to last instruction is ldloc.3, hence there is no LocalBuilder operand to grab because its not using the .s version, so your MatchStartBackwards was going back to the ldloca in the finally block of the enumerator. I did make changes to fix this so the transpiler is properly patched on both PC and Android accounting for this, and I could submit a PR for that for you if you wanted, however the issue now is that the fusing still doesnt work and it beats me as to why 🤷‍♀️ the TryCombine function aint being called
but also all that said... are you sure this even needs to be a transpiler? since you're returning if TryCombine is true anyway, surely this could just be a prefix?

gentle rose
vernal crest
vernal crest
# tired relic What do u mean?

If you want to make clothing for animals, you have to download that Pet Clothes mod and make a content pack for it. In your manifest, you would list Pet Clothes as a required dependency. Then when you upload your mod to Nexus, people download your content pack and Pet Clothes.

crude agate
vernal crest
#

So you certainly can give credit to Erinthe (aedenthorn) for Pet Clothes, but your mod page would also link directly to the Pet Clothes page in the pop up that lists the required mods when people tried to download your mod.

tired relic
#

So I would use the listed json for cp and use them in conjunction?

crude agate
vernal crest
tired relic
#

Or the manifest

vernal crest
tired relic
vernal crest
#

No, there is not a manifest for each sprite. There is a manifest for each mod, even mods that have no sprites.

tired relic
#

Uh then im confused then?

vernal crest
#

Yup me too

hard fern
vernal crest
#

(But don't click on any of the links in the box on the right hand side of the page - they're all for C# mods and will further confuse you)

ivory plume
#

Each content pack has one manifest.json file (which describes the whole mod) and a content.json file (which specifies the changes you want to make, like custom sprites). The Modding:Content Patcher page has an intro to the general concepts specific to Content Patcher.

tired relic
#

Yes. Doesn't mean I understand any of it other then me my brain going ah I can reverse engineer this thingy to get this output

#

Brain worky backwards.

naive wyvern
#

i mean, i guess you could study other mods that do similar things to what you want and have the wiki pages aba and pathos linked to cross reference

vernal crest
#

Unfortunately there aren't any mods on Nexus using Pet Clothes yet lol

#

But Erinthe made an example content pack so you can just download that

#

And change the values to what you want them to be

naive wyvern
#

oh real <--did not backread

#

(hii aba hiiii)

vernal crest
#

(Hi Pau!!!!)

hard fern
#

do local tokens work with data that's in strings? Like recipes/furniture

uncut viper
#

im not really sure what you mean but the only major difference between local tokens and any other token is that local tokens only work in the patch you put them in

#

but otherwise theyre literally just tokens like any other

hard fern
#

ok

#

sorry im like

#

very sleepy

#

i'll try them and see how it works

crude agate
#

I'm wondering if the source code can no longer be used for packaging and testing purposes.

vernal crest
ivory plume
#

There are no restrictions on the source code; the released version is just a compiled version of the public source code.

#

If you upload your SMAPI log file to https://smapi.io/log and post the link here, we can see why it's marked incompatible.

vernal crest
trim sand
#

This is probably a silly question but it's been a while, but is changing festival dates something that can be done with just content patcher? I know there's a data file that holds them I'm just wondering if that's actually alterable in a meaningful way or if it has to be harmony all the way down.
Trying to make a mod that adjusts festival dates to better match settings from the longer seasons mod though I guess month settings in there wouldn't really be accessible with only content patcher.

ivory plume
#

Kind of. You can change festival dates with just Content Patcher, but the festival date is also the festival ID (e.g. spring13); so that'll break all the hardcoded logic for the festival that's not strictly in the festival/map files.

trim sand
#

hell
painpika

#

So it's a mess of harmony not matter what... Oh joy.
I was hoping this would be easier than it's turning out to be.
Whatever more important that I get it figured out. Festivals are the biggest issue of the longer seasons mod the choice of Moonlight Jellies twice, or before the actual end of summer is just kinda sad, and let's hope passive festivals don't end up requiring altering everyone's schedules if moving the date.
I guess maybe I can settle for something less configurable than I would like.

uncut viper
#

(they will)

#

(passive festivals will require editing schedules*)

trim sand
#

hell

#

This is a hell of my own making.

uncut viper
#

dont forget dialogue that references vanilla dates

trim sand
#

We suffer for the asthetic of a fall start with extended seasons and thusly shifted festival dates.
painpika, dialog...

#

Add it to the pile.

#

I'm going to make this work, but I also understand why nobody has yet ^^

crude agate
vernal crest
uncut viper
#

im assuming also you dont care about compatibility with many other mods

trim sand
#

Ideally the onus is on festival adding mods to integrate with longer seasons.

uncut viper
#

not festival adding mods. mods that check the dates of vanilla festivals

trim sand
#

oh yeah.

uncut viper
#

for things like schedules or trigger actions or other checks

#

aka like all NPCs

trim sand
#

Odds are I'll hit the big name expansions (SVE, East Scarp, Sword and Sorcery) and probably not individual NPC mods.

#

Though I'll probably try and make it easy for other devs to supply me the info to integrate such properly I'm just not willing to the digging

uncut viper
#

its not just NPC mods, i just singled those out bc those are quite important. any number of C# mods can do things based on whether its for example specifically spring 13 or not

crude agate
uncut viper
#

im not saying you have to care about compat either, i dont think many people care about compat for longer seasons, i just was assuming you did not care either SDVpuffersquee

#

(by that i mean i think if you install that mod you kinda probably know what you're getting into. though admittedly, your mod would be changing more things about it)

vernal crest
ivory plume
crude agate
vernal crest
vernal crest
trim sand
# uncut viper (by that i mean i think if you install that mod you kinda probably know what you...

Goal of the mod is to polish the play flow with longer seasons so it plays more like normal just on an extended time scale, extra NPCs are sorta out of scope, but considering I usually play with East Scarp and Sword and Sorcery, and some others. So I'll probably intergrate the stuff I'm using myself which makes it hard to excuse not handling the occasional specific request.
Basically compat isn't a big priority but I'd like to avoid breaking stuff with big names if I can. (This is rapidly turning out to not be the quick cute cozy fall start project I was trying for.)

crude agate
vernal crest
crude agate
vernal crest
crude agate
vernal crest
ocean sailBOT
#

Log Info: SMAPI 4.3.2 with SDV 1.6.15 build 24354 on Microsoft Windows NT 10.0.22621.0, with 5 C# mods and 0 content packs.

vernal crest
#

"Broken code in NPCMapLocations.dll: reference to System.Runtime.InteropServices.CollectionsMarshal.SetCount (no such method)."

ivory plume
#

Also interesting that the assembly version is 1.0.0 instead of 3.4.4. Looks like you recreated the project, possibly with a different .NET version?

vernal crest
#

Would seeing their csproj help, Pathos?

ivory plume
#

Well, you shouldn't need to edit the project to build it. So I'd be curious to know why they needed to, or if that was a mistake?

crude agate
vernal crest
#

I had to edit mine because of my non-standard game and mods paths, so maybe they did the same given that they have a very weird install path?

vernal crest
lucid mulch
#

Wait the method that it's attempting to use that's not compatible is only in .net8+, how did NPC map locations which should be .net6 use it

ivory plume
#

Yeah, I suspect they recreated the project with a newer .NET version. We do need to use .NET 6, since that's what the game and SMAPI use.

vernal crest
#

I just downloaded it, opened the csproj to add my game and mod paths, and then pressed this button to build it and run the game.

lucid mulch
#

Might be worth adding some logic in modbuildconfig to guard against the target framework having a mismatch

vernal crest
#

(I did, in fact, forget that you can build a mod without running the game from VS lol)

lucid mulch
#

Particularly as .net6 sinks deeper into end of life, more people will try to use newer versions to get warnings to disappear just for problems to show up

crude agate
vernal crest
lucid mulch
#

You can use newer language versions (12) without the target framework bump

#

Not all of the shiny stuff will be available, but most is

vernal crest
#

Although I am a little hazy on what part you can change. Is it this part in the project setup that has to be net 6 but then you can put a line in your csproj to let you use language version 12?

#

I've never tried because I don't know enough C# to understand the differences in framework version or language.

crude agate
lucid mulch
#

Framework version is all about the libraries that are available, and some runtime behaviour available.

Language version is about governing the language syntax that the compiler understands

proud wyvern
#

the other way around

#

C# is the syntax

#

but yes, you can use C# 12 with .NET 6

#

it does suck that Stardew/SMAPI is stuck with .NET 6, especially with .NET 10 on the horizon

crude agate
#

Those guys, simply changing the framework from .net 8.0 to 6.0 should solve this problem, right? I wonder if there will be any grammar errors.

proud wyvern
#

it should be fine

lucid mulch
#

I do have on my to-do list to revisit my old poc of smapi running on a newer .net build than what stardew ships on.

I had it mostly working ages ago back in the early 1.6 modding alpha which was running on .net 7, and mostly everything worked except audio

vernal crest
#

(I still have no clue why they are even trying to build NPC Map Locations from source instead of downloading the already built mod. Maybe they want to edit it?)

crude agate
#

Why isn't .NET 9.0 compatible yet? Guys, isn't it supposed to be the latest version?

trim sand
#

Because games old and physically cannot be made compatible

proud wyvern
#

.NET 6 is what Stardew Valley is built with

#

SMAPI uses that same .NET, it does not bring its own

#

(this is the thing SinZ was talking about - it could potentially bring its own, newer version)

#

.NET 7+ removes support for some older versions of Windows, and ConcernedApe wants to keep it

trim sand
proud wyvern
#

most notably SMAPI download would get huge, or need to be split on a per-platform basis

#

actually i'm having a hard time understanding your message Silver lol

#

interpunction would do wonders for it

crude agate
#

The main SMAPI should not be updated too frequently. Otherwise, constantly having to go to the official website to download the latest version would lead to various incompatibility issues and errors.

lucid mulch
#

.net major updates that bump the framework version are released annually in November, with every even version (and by extension every odd year) being the LTS version

trim sand
crude agate
#

Microsoft has abandoned it.

lucid mulch
crude agate
#

It was because I saw this that I upgraded to version 8.0.

proud wyvern
#

you can still have a newer .NET installed for mod creation purposes

#

but your project has to "target" the old version

lucid mulch
#

With .net versioning, the executable assembly sets the upper limit of version and everything needs to match it or be a lower version.

Ie vanilla is .net6 so libraries like xtile could be .net5 or .net6 but can't be .net8

In modded stardew, smapi is the executable and currently for simplicity it's .net6 which is loading stardew and it's dependencies.
But also loading the various mods, so the mods must also be .net6 or lower to function

#

So for executable projects, you ideally want to be the largest version possible that you are comfortable with to have the highest performance and best support available.

While library projects want to be on the oldest version they can get away with to maximise compatibility
(Mods are in the library case)

crude agate
#

This means installing two SDKs, one with the lower version 6.0 to maintain compatibility, and the other with the higher version 8.0 for later expansion and maintenance purposes.

lucid mulch
#

You only need the newer SDK, the newer SDK knows how to compile to older target frameworks

#

Same with the .net runtime itself, the newest runtime knows how to run older code expecting the older version

crude agate
#

However, many current mods use C# 12.0 syntax. So, we would have to upgrade to .NET 8.0. Otherwise, the C# syntax in 6.0 would cause various errors.

lucid mulch
#

No

#

C# Language version, and the and the .net target framework are independent variables

proud wyvern
#

you:

  1. install .NET 8
  2. set your csproj to .NET 6
  3. set your csproj to C# 12
#

and that works

#

<TargetFramework>net6.0</TargetFramework>
<LangVersion>12.0</LangVersion>

#

and your installed .NET 8 can compile that just fine

crude agate
#

OK, I understand. Thank you all for your opinions and suggestions. Thank you very much. I'll be testing now.

hard fern
#

🤔 is it possible to nest local tokens? Like i want to have {{BASE}} and {{SAUCE}} and then say {{BASE}} is {{BEANS}} that'll then turn into the actual value i want... or

#

should i just skip the first set of local tokens and go straight to {{BEANS}}

lucid mulch
#

I think you can, but I don't think you can nest them if they are defined at the same scope

hard fern
#

hm...

vernal crest
#

You can have a local token that's a config or dynamic token though

#

If that's helpful

hard fern
#

oh, that might work

#

i can have my {{BASE}} local token that then i can put {{BEANS}} which is a dynamic token

crude agate
#

Successfully solved the problem. Thank you all, esteemed colleagues.

vernal crest
#

Yeah

low marlin
#

!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.

fickle lichen
#

hi there! i'm trying to create a hat content pack, and i currently created a ribbon (it's still a wip so for now the only finished part is the front part) but whenever i try to test it in-game, it looks extremely misaligned, it's not even on top of the farmer's head. could someone please help me? i'll leave the json file here.
https://smapi.io/json/none/fb0924dc50ad43af82df77595b5c7f04

#

in case more files are needed, feel free to tell ^_^

low marlin
#

And the config schema

#

Is there anything wrong with the child name checks?

indigo yoke
#

are there any vanilla sounds that might make for a good sizzle / fizzle sound effect?

#

looking for a good "this spell failed to cast" sfx basically

crude agate
# vernal crest Yeah

Where is the folder for the background music of this game located? I haven't found it yet. I want to replace the background music through the script test.

vernal crest
vernal crest
fickle lichen
vernal crest
fickle lichen
#

also, sorry if this sounds silly but does this seem somewhat correct?

#

i'll test it in-game, and see if it works

vernal crest
#

I don't know. I don't know what your sprite looks like or what its dimensions are so I have no clue if changing those values would help.

#

Also do you remember how I said change one number? But you've just changed two?

#

It's going to be hard for you to identify what each field is doing in game if you're changing more than one of them at a time.

fickle lichen
#

...yeah these values didn't help at all, the ribbon isn't even visible anymore

fickle lichen
#

also, if it helps, the sprite is a 64x64 image..

vernal crest
#

That's gigantic!

#

The farmer's only 16px wide

drowsy pewter
#

i hear oversized clothing is in fashion now

#

to be honest i think you should try and find someone elses hat mod and like copy the exact same positioning they have on their image and code

#

you can tweak from that

#

If the issue is getting even in the ballpark in the first place

vernal crest
#

(Also I think I've told you this before, but it's going to be much easier if you use a proper text editor like N++ or VSC instead of Notepad)

woeful lintel
fickle lichen
# vernal crest That's gigantic!

no no i don't mean like the sprite itself, i mean the PNG, like, the image, not the sprite itself. the sprite is 22 pixels wide, and 12 pixels tall

#

man i don't know how to type

#

💔

fickle lichen
#

i'll try with some other hat content pack, because the one i used seems like it didn't work with me

vernal crest
#

Did you use the same size canvas?

#

If your image isn't the same size, then you will get different results from the mod you're copying from

fickle lichen
#

also, that goes in HatSize, right?

vernal crest
#

Either way, to get the hat where you want it, you'll need to keep experimenting with the positions until you understand what each field is doing and can move it into place

fickle lichen
#

...okay

vernal crest
#

Why the ellipsis? This is a normal part of modmaking

#

For any kind of mod

vernal crest
# fickle lichen also, that goes in HatSize, right?

I can't tell from the FS docs if HatSize is meant to be the frame/image size or the sprite size inside the frame/image. You might be able to work it out by comparing the HatSize value in other mods to the frame sizes of their spritesheets.

fickle lichen
vernal crest
#

Ah okay. I interpreted it as hesitation, sorry

#

I've never made a Fashion Sense mod by the way, which is why I'm not able to give more specific answers to any of your questions and am instead guiding you to find the answers yourself

low marlin
vernal crest
#

I've considered trying, given how many people I try to help with FS, but I can never think of anything to make lol. I am not inspired by tiny, hard-to-see-properly clothing

fickle lichen
lunar otter
#

Hey one question can i simply delete The Love of Cooking mod or would this be an issue?

patent lanceBOT
hard fern
#

SDVpuffersweats is writing out grammatical rules for a language a necessary part of modding i wonder

fossil osprey
devout otter
vernal crest
uneven spindle
#

Hello! Sometime ago I received advice here to not conditionally load assets, can someone elaborate why that is preferred and if there are any exceptions to that rule?

hallow prism
#

me, waking up :"why is my gsq RANDOM 0.{{tokenchance}} isn't working 100% of the time when my token value is 100?"
me : "wait..."

drowsy pewter
#

lmao

hard fern
#

I think numbers are posing a problem though lol

gray bear
#

numbers angry_dog

vernal crest
uneven spindle
#

even if you manage the conditions to ensure it is ready when it asset is requested? are there any drawbacks to loading assets that are not needed? e.g. i have a config setting to enable certain assets

devout otter
#

What's the asset you want to load?

uneven spindle
#

in my case its a portrait and spritesheet

vernal crest
#

You can never be certain that your conditions will be ready in time, because different mod combinations change the timing of when things happen

#

Wow that was speedy

#

I've never seen maincord get hit before

gray bear
#

-# yikes

devout otter
# uneven spindle in my case its a portrait and spritesheet

So the greatest advantage is compatibility. Say that there's another modder who wants to make a portrait mod for your mod. If you conditionally load your portraits through config, Now they'd need to have their own config too to match yours.

vernal crest
#

Your NPC should have a base portrait and sprites even if you have multiple. For instance if they have different portraits for all seasons, they should still use one of those season's portraits as their default, non-seasonal portrait.

devout otter
#

Then user would need to set the config for both mods.

uneven spindle
#

i see, thanks for the explanation guys! you got any more compatibility tips? i haven't found any docs in regards to that subject

gray bear
#

wdym by compatibility tips?

#

if you're making an npc, make sure to use a unique internal name to avoid conflicts, for one ig

vernal crest
#

I don't know of any collated information about compatibility, but that would be a good resource on the modding wiki SDVpufferthinkblob

uneven spindle
#

ensuring a mod is compatible with others, in my case i'm doing Appearances so using the defaults when a certain asset is disabled like @vernal crest said

gray bear
#

actually when making a new anything, unique names is a good way to avoid conflicts

vernal crest
#

There's an old page on the modding wiki but its info is much more general

#

What you're after is kind of a modding best practices cheatsheet

#

And right now I can't think of anything even though I know a bunch xD

gray bear
#

all i know is {{ModId}}

vernal crest
#

Hmmm try not to use OnTimeChange update rates for patches ever, try to minimise your use of OnLocationChange, don't make a million tiny edits to Cursor or springobjects

uneven spindle
vernal crest
#

Don't use InternalAssetKey for anything you want any mod to be able to edit

devout otter
#

I can list three things that I often wish other mods do when I'm trying to do compatibility with them: 1. Use appearance system for NPC. 2. Load their custom tilesheet as asset. 3. Use loaded strings for their event dialogues.

gray bear
#

(stares at my appearance code)

vernal crest
#

Oh yes, definitely loading tilesheets instead of keeping them in the map folder with maps

gray bear
#

have this one default appearance thingy

#

id's should usually have {{ModId}} to avoid conflict. ignore my other tokens

#

what i do, since mine are seasonal, is have spring as default

uneven spindle
vernal crest
#

Never use an exclusive Load patch for anything vanilla

#

(Unless it's intended to break if any other mod Loads that same asset, in which case it might be more useful to keep it exclusive so the user gets an error in their console rather than someone else's mod silently overriding yours)

gray bear
#

i'd also say put every dialogue in i18n from the start but i mean that's not required

vernal crest
#

None of this is required Bea lol

#

But yes, i18n (or LocalizedText) every player-visible text. And like Dolphin said, ideally you'd Load your event strings so other mods can edit them more easily.

gray bear
#

you can add "LogName": to your code blocks for better troubleshooting, i find that useful

vernal crest
#

Hmm I should add something about local tokens to my local token patch lognames so they're easier to identify

uneven spindle
#

i find it easier to just edit the existing asset but i'm not using the appearance system then right?

gray bear
#

EditImage

vernal crest
#

I would do the Appearance edit personally

#

With my own asset Load, no EditImage

gray bear
#

does... vanilla use the appearance system

uneven spindle
vernal crest
#

It does, but only for winter and Jojamart

gray bear
#

when it comes to assets that already exist, editimage is the best option

vernal crest
#

I dispute that claim

gray bear
#

actually yeah this isn't true

vernal crest
#

Depends what you want to achieve

gray bear
#

if ur just replacing sprites, editimage is the best option?

gentle rose
#

appearance is very flexible, supported by vanilla and used by a bunch of mods like DSV

gray bear
#

eh im being too general

devout otter
gentle rose
#

I also recommend it personally

uneven spindle
gray bear
#

that's a regular load

vernal crest
#

If you want to make a change to vanilla that you want to be exclusive (like swapping Sebastian with Barney the Dinosaur) then you're not likely to have any issues if you Load a new portrait for Seb

vernal crest
gray bear
#

(ah, inchresting)

uneven spindle
#

i believe its exclusive by default

gray bear
#

so using load would make it so this is portrait that loads for abigail all the time?

#

even when there's other mods

vernal crest
gentle rose
gray bear
#

that what he wants u to think

#

anyhow, i never knew about this

vernal crest
# gray bear even when there's other mods

Nope because a user might have another mod that also tries to exclusively Load a portrait for Abby - result: error message in SMAPI and neither mod loads the portrait

Or a user might have a mod that replaces Abby's portrait using EditImage - result: ALP's portrait loads and then is immediately replaced with the Abby from the other mod

Or the user might have a mod that uses a non-exclusive Load and so does ALP - result: whichever has the higher priority will load

Sometimes your only option is to bop a user over the head 🤷 /j

gray bear
#

i was so shocked the notifs are spooky

#

yeah that makes sense. best option is to just yell at the top of your lungs b_nod

vernal crest
#

IMO the first step in compatibility is figuring out what sort of compat you want. Sometimes the answer is "this should not be compatible with other mods of the same type".

devout otter
#

Also imagining what kind of user would download your mod.

vernal crest
#

(Modmakers. Only cheetos may download my mods 😌 )

gray bear
#

yeah haj_nod and sometimes it's "user needs to use the config if they want to use two mods so therefor i might suffer"

devout otter
#

I imagine anybody who downloads bald Elliott mod would appreaciate if their Elliott suddenly has hair from another mod, so use EditImage with late priority for that.

gray bear
#

he should stay bald >:(

uneven spindle
gray bear
#

when it comes to editing portraits/sprites in a certain way i'd like to think most users understand the basic truth of "two mods that edit the same thing will conflict" but perhaps i am simply, living in denial

uneven spindle
#

but this is just theory, i still have to test it

gray bear
#

it's possible, just more troublesome

vernal crest
#

I love config settings. I love making them and I love using them.

hard fern
gray bear
uneven spindle
#

code definitely is more complex but i hope its worth the effort

vernal crest
#

Just put your config setting into the Appearance edit

#

In the Condition field

gray bear
#

i see a lot of requests in SCO to have sprite only options and it's like,,, weh

vernal crest
#

"Condition": "{{CT_Portrait}}, DAY_OF_WEEK Sunday" etc

gray bear
#

how does that work? thonk

devout otter
gray bear
#

the classic "your farm mod broke my interface"

vernal crest
# gray bear how does that work? <:thonk:1032532145635344464>

The config token will resolve to true or false, which is what a GSQ resolves to as well. That's all the Condition field looks for. So if CT_Portrait is ticked (true) and it's Sunday (true), the condition will be true and that appearance entry will apply.

#

And if you have a config token that doesn't have true/false as its options, you can do {{CT_PortraitStyle |contains=funky}}

uneven spindle
#

problem is that both portraits and sprites need to be specified, if the user disables portraits i still need to apply the sprite of that appearance

gray bear
#

so it'll be like
"Condition": "TRUE, DAY_OF_WEEK Sunday"?

#

they aren't both needed

uneven spindle
#

what i'm trying is setting the portrait to the default asset instead and manually setting it with my custom asset if the config allows it

vernal crest
#

But then you're not using Appearances?

devout otter
vernal crest
gray bear
#

so true true would load it and true false won't? cool

uneven spindle
gray bear
#

wait do u need to specify both portrait and sprite??

devout otter
#

Yup.

gray bear
vernal crest
#

I'd just do more Appearance field entries

uneven spindle
gray bear
#

~~i am now confused about Appearances thonk ~~

patent lanceBOT
jaunty moat
#

Yeah yeah I am

gray bear
#

if i don't specify both a sprite and portrait, will something break? wiki says that is they aren't there is just uses default

vernal crest
#

Doesn't that give you the answer?

gray bear
#

yes but Dolphin said u need both nekoconfused

vernal crest
#

Ah right I missed that. Well, either the wiki or Dolphin is wrong.

devout otter
#

I didn't say you need both?

gray bear
#

oh u were saying Yep to ALP weren't you-

#

sorry

devout otter
#

Aaa, I see how that might be misleading. Sorry.😅

jaunty moat
#

ah yes, reloading my 210 mod SMAPI because I misspelled "Lava Eel"

hallow prism
#

can't do a patch reload?

vernal crest
#

Are you aware you can use the patch reload <mod id> command to reload your mod without restarting the game?

#

...well, since I am not testing that anymore I guess I will just tidy my random test mod instead lol

uneven spindle
# vernal crest But then you're not using Appearances?

with have this appearance entry:

"{{ModId}}.AbigailSpring": {
    "Id": "{{ModId}}.AbigailSpring",
    "Portrait": "Portraits/Abigail",
    "Sprite": "Portraits/Abigail",
    "Season": "spring"
},

the user sets Abby's config to SpriteOnly. then you write the patches:

{
    "Action": "EditData",
    "Target": "Data/Characters",
    "TargetField": ["Abigail", "Appearance", "{{ModId}}.AbigailSpring"],
    "Entries": {
        "Portrait": "Portraits/Abigail_Spring"
    },
    "When": {"SlightlyCuterAbigail |contains=PortraitsOnly, PortraitsAndSprites": true}

}
{
    "Action": "EditData",
    "Target": "Data/Characters",
    "TargetField": ["Abigail", "Appearance", "{{ModId}}.AbigailSpring"],
    "Entries": {
        "Sprite": "Characters/Abigail_Spring"
    },
    "When": {"SlightlyCuterAbigail |contains=SpritesOnly, PortraitsAndSprites": true}
}

the portrait remains the default "Portraits/Abigail" since the config option disables portraits

vernal crest
#

So is Portraits/Abigail vanilla?

uneven spindle
#

sorry could you elaborate? i don't get what you're trying to say

vernal crest
#

The image that's at Portraits/Abigail in your AbigailSpring appearance entry. Is that vanilla or is that your portrait?

uneven spindle
#

thats vanilla

vernal crest
#

I see

#

My approach is similar to yours, it's just using those tokens inside one single patch instead of separate ones

uneven spindle
#

another mod could edit that and be compatible with my spring sprites in theory

vernal crest
#

I should say hypothetical approach since I have no mods with configurable appearances lol

uneven spindle
vernal crest
#

Sure, hold on

gray bear
#

so do u add that appearance block to data/characters thonk

uneven spindle
#

at the very beginning before i load my custom assets

{
    "Action": "EditData",
    "Target": "Data/Characters",
    "TargetField": [
        "Abigail",
        "Appearance"
    ],
    "Entries": {
        "{{ModId}}.AbigailSpring": {
            "Id": "{{ModId}}.AbigailSpring",
            "Portrait": "Portraits/Abigail",
            "Sprite": "Portraits/Abigail",
            "Season": "spring"
        }
    }
}
#

then apply the edits to "Portrait" and "Sprite" as needed

gray bear
#

can't u just use that block for everything instead of editing it later? thonk also remember one of the entires should be non conditional

vernal crest
#
{
    "Action": "EditData",
    "Target": "Data/Characters",
    "TargetField": ["Abigail", "Appearance"],
    "Entries": {
        "{{ModId}}.AbigailSpringPortrait": {        
            "Id": "{{ModId}}.AbigailSpringPortrait",
            "Portrait": "Portraits/Abigail_Spring",
            "Sprite": "Characters/Abigail",
            "Season": "spring",
            "Condition": "{{SlightlyCuterAbigail |contains=PortraitsOnly}}"
        },
        "{{ModId}}.AbigailSpringSprite": {        
            "Id": "{{ModId}}.AbigailSpringSprite",
            "Portrait": "Portraits/Abigail",
            "Sprite": "Characters/Abigail_Spring",
            "Season": "spring",
            "Condition": "{{SlightlyCuterAbigail |contains=SpritesOnly}}"
        },
        "{{ModId}}.AbigailSpringBoth": {        
            "Id": "{{ModId}}.AbigailSpringPortrait",
            "Portrait": "Portraits/Abigail_Spring",
            "Sprite": "Characters/Abigail_Spring",
            "Season": "spring",
            "Condition": "{{SlightlyCuterAbigail |contains=PortraitsAndSprites}}"
        }
    },
}
gray bear
#

v cool

uneven spindle
gray bear
#

see what aba sent ^

vernal crest
#

They're not Loading any assets as part of their appearance edits so no, none of them need to be unconditional

uneven spindle
#

ooh i see

vernal crest
#

Their Abigail_Spring load (which, by the way, should really have your Mod ID in it) needs to be unconditional

#

I think that ultimately there's probably not much difference in the two approaches so I'd go with whatever makes more sense for you

uneven spindle
vernal crest
#

It's not evaluating a condition that's going to change frequently

vernal crest
uneven spindle
#

aah okay, yeah that makes sense

#

i'll update my assets with that prefix, thanks!

devout otter
#

This is how I'd do it. ```{
"Action": "EditData",
"Target": "Data/Characters",
"TargetField": ["Abigail", "Appearance"],
"Fields": {
"{{ModId}}.AbigailSpring": {
"Portrait": null
},
},
"When": {"SlightlyCuterAbigailPortrait": false}

}
{
"Action": "EditData",
"Target": "Data/Characters",
"TargetField": ["Abigail", "Appearance"],
"Fields": {
"{{ModId}}.AbigailSpring": {
"Sprite": null
},
},
"When": {"SlightlyCuterAbigailSprite": false}
}```

uneven spindle
#

i see, its like the inverse of "{{ModId}}.AbigailSpring": {"Sprite": "Characters/Abigail_Spring"}

devout otter
#

Yar, personally I just find it neater when the base patch is the one that contains all the custom assets

#

(Would take less space too.)

uneven spindle
drowsy pewter
#

does anyone know if there is a flag or anything I can check for whether the player has repaired the wooden bridge to the beach tidepools?

vernal crest
#

Yes....I think so...hold on

devout otter
vernal crest
#

I think it's a world state flag

#

I have a memory of roku and I finding it...but this was shortly after I joined so trying to find where it is...

uneven spindle
#

maybe take a new save and repair the bridge, then check the save file for the flag manually?

vernal crest
#

Nah, it's the modding wiki you want for all of this

uneven spindle
#

wait there's a separate wiki?

vernal crest
#

Yep

brave fable
uneven spindle
#

tysm!

vernal crest
#

Thanks bluebs

brave fable
#

thanks button aka spiderbuttons

vernal crest
#

I did finally find myself saying it back in June last year

drowsy pewter
#

Thanks buttons aka spiderbuttons

vernal crest
#

Why isn't that on the mail flag list >:(

vernal crest
brave fable
#

because it's not a mail flag ☀️

vernal crest
#

I know it isn't but we don't have a net world state page and even if we did, there are only 7 of them that I can see so that's pretty small to have to have their own page

#

And you can check it with the HasFlag token

#

But I am tired so I make no decisions at this time

low marlin
#

For instance, this is the dialogue if (and ONLY if) a female child has one of the names that are assigned as "WizardChildrenx" (where x can be an even number (for male children's names) or an odd number (for female children's names))

But in this situation, a child born of a previous relationship (and DOESN'T have a name listed in that list) still say the line!!

Can you please help troubleshooting how I code this logic? (logic in second image):

gentle rose
low marlin
#

!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.

vernal crest
low marlin
vernal crest
gentle rose
gentle rose
#

when we brought it up previously, you seemed to say that your IUCT fork has some way around that, so I recommend using whatever that is

low marlin
#

Yeah, although IDK how the "ChildNames" token work exactly

#

I know adding config token value support to certain actions is a thing - But not sure if it works for a token like "ChildNames"

gentle rose
#

your config works fine

#

the issue is what we told you all along, that it's only checking if you have ANY child with that name

low marlin
#

I do have a female child called "Yukina" - But they haven't grown to Stage 4 yet

gentle rose
#

what does that have to do with what I just said?

low marlin
#

I think this is it:

  • The mod checks for any child with that name, but does not check if that child is specifically speaking - so the dialogue would apply to EVEN previously-born and all-grown children.
livid kite
#

Based on some back reading, this is what irocendar and Abagaianye, having been saying to you, over and over.

low marlin
#

I forgor that by far there is no super-specific child checks in Content Patcher

#

There's only a check for children's name and gender

vernal crest
#

Wow, twice in one day

livid kite
#

Spammers are on the clock SDVpuffersquee

livid kite
low marlin
livid kite
# low marlin How can I do that?

I'm pretty sure it's by adding dynamic tokens. But I highly recommend looking at the wiki's to get a better understanding of coding

finite ginkgo
#

Not really, no way to tell through CP which child it is you are currently talking to

livid kite
#

Not evening with DTs? I thought you could pondering

drowsy pewter
#

dynamic tokens check for the same conditions that any CP patch checks for

#

its not possible

livid kite
#

This is what I get for not having my code cheat sheet next to me hide

tiny zealot
#

no, CP doesn't update its tokens with enough fidelity to check the current dialogue box speaker (plus there's no token for it)

ornate drift
#

has anyone made a custom base NPC that people can use???

tired relic
#

Like a blank pc for people to use

indigo yoke
#

hmmm, trying to inject more flavor but I think the School description at the bottom of the page (left half) is just crowding up the UI.

tired relic
static seal
#

How should I add Green Algae and River Jelly to the water? I followed the tutorial at https://stardewmodding.wiki.gg/wiki/Tutorial:_Adding_a_New_Fish to add fish to the map, but I don't see Green Algae and River Jelly appearing in the water with the Visible Fish mod.

Stardew Modding Wiki

Last edited by AtlasVBot on 2025-09-13 18:56:18
Adding a new fish to the game has never been easier than in 1.6; nowadays, fish are a simple set of patches via Content Patcher. There are four required steps: you need to load sprite images, define the fish (as an item, and as a fish) and add it to locations. Optionally, you can add aquarium spri...

vernal crest
vernal crest
ornate drift
#

No i mean like a whole NPC base in general

tired relic
ornate drift
#

Something that people can work off of

tired relic
#

I mean I can grab something but I dont recommend it?

ornate drift
#

as someone who doesn't know much about JSON coding I'd rather try and find a base first

vernal crest
ornate drift
#

So that i actually know what to do

vernal crest
#

!npc

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:

ornate drift
#

Hmmm

vernal crest
#

I recommend looking at Hat Mouse Lacey because I trust ichor to use best practice

ornate drift
#

won't i be needing a lot of stuff like creating a house, a place for the NPC to live and whatnot?

vernal crest
#

You can use Lily's apartment mod or the saloon upper floor mod for a house

fossil osprey
#

You don't have to technically, it's only if you want

tired relic
indigo yoke
fossil osprey
tired relic
vernal crest
tired relic
#

I should be sleeping... but... that's what coffee and migraine meds are for.

vernal crest
#

There are naked NPC spritesheets around. They're just made by modmakers rather than being in the game files.

#

Huh, what happened to the link to the NPC template

tired relic
vernal crest
#

An NPC spritesheet...?

tiny zealot
#

honestly my advice remains to start from an existing vanilla NPC as a template

#

obviously it's best if, by the end, it's not obvious which NPC it's based on, but there's a wide variety of character heights/sizes to choose from, and they're already laid out in the correct format

vernal crest
#

For sprites, I totally agree to use vanilla NPCs as bases (you can frankensprite them too!)

tiny zealot
#

oh sorry lol, yeah i was literally just talking about the sprites 😅

#

i don't always backread /lh

tired relic
#

So I dont need to make a sprite sheet?

vernal crest
gaunt orbit
gaunt orbit
vernal crest
crude agate
ocean sailBOT
#

Log Info: SMAPI 4.3.2 with SDV 1.6.15 build 24354 on Microsoft Windows NT 10.0.22621.0, with 5 C# mods and 1 content packs.

static seal
#

How should I add Green Algae and River Jelly to the water? I followed the tutorial at https://stardewmodding.wiki.gg/wiki/Tutorial:_Adding_a_New_Fish to add fish to the map, but I don't see Green Algae and River Jelly appearing in the water with the Visible Fish mod.

Stardew Modding Wiki

Last edited by AtlasVBot on 2025-09-13 18:56:18
Adding a new fish to the game has never been easier than in 1.6; nowadays, fish are a simple set of patches via Content Patcher. There are four required steps: you need to load sprite images, define the fish (as an item, and as a fish) and add it to locations. Optionally, you can add aquarium spri...

tired relic
vernal crest
tired relic
vernal crest
static seal
#

That website doesn't seem to have tutorials about adding Green Algae and River Jelly. How should I add them? Should I use the same method as adding fish in the tutorial? I don't even know River Jelly's ID.

gaunt orbit
#

Just add it to the location fish list

#

Make sure to qualify it with (O)

static seal
#

I feel little perplexed,just like this image?

gaunt orbit
#

You can look at the vanilla location data for examples

#

!decompile

ocean sailBOT
gaunt orbit
#

Wait wrong command

#

!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!

gaunt orbit
#

Use the second one

static seal
#

Okay,I will check it

ornate drift
#

i know this sounds batshit insane but can ai tools like chatgpt make jsons for you to work off of?

tiny zealot
#

!chatgptcode no

ocean sailBOT
#

We don't recommend using generative AI (such as ChatGPT, Copilot, Claude, Grok, etc.) to write mods for Stardew Valley. There are a few reasons.

  • AI-generated content is not allowed to be posted in the server. If you need help with your code, you won't be able to post it.
  • Large Language Models aren't trained on enough Stardew-specific information to give reliable, accurate output. They also have no concept of what they don't know, and so cannot tell if they're incorrect. In short, they don't know if they're hallucinating a solution that simply feels like it makes sense or not.

This holds true for both SMAPI/C# mods, and mods for frameworks such as Content Patcher.

There's no shame in being new to Stardew modding, and you won't be talked down to for not knowing what you're doing. We strongly recommend consulting with other mod authors in the appropriate channels as a first step if you're completely stuck at step one.

ornate drift
#

Got it

devout otter
#

Hi @ornate drift . Would you mind if I DM you?

whole raptor
#

Jsons are very... templatic..? Is that a word?
You can make templates in something like VS Code and quickly add the needed stuff, there's literally no reason to use ai for it. And it'd spout bs whenever actual sdv data is needed

ornate drift
#

currently reading the wiki right now

#

i think I'm getting an understanding of most of the stuff in it Xev_Think

elfin kindle
#

Does anyone know better how using temporary change map works in event? how... Do I change back to the original one, if youre even able to?

vernal crest
#

You could try using changeLocation to switch back to the original map?

elfin kindle
#

If you do that, do you just continue on the same string or do you have to make a new event? Cus the plan was to have like a flash to another location and see what happens there, then come back to the original location

gaunt orbit
#

continue on same string

vernal crest
#

I have an event that switches location twice but both commands are still a bit of a mystery to me tbh. I just fiddled around with them until I got what I wanted to happen, so I think I use changeToTemporaryMap for one and changeLocation for the other.

elfin kindle
gaunt orbit
#

the game does scary things to shift the current event to a new location but script-wise it's seemless

indigo yoke
#

new spell WIP. make a healing zone that heals you and allies inside it yeah not so useful solo

elfin kindle
vernal crest
#

Yup I do use both commands in the same event and I can't tell the difference between them lol

elfin kindle
#

Phenomenal PFFFT

vernal crest
#

And they do definitely continue with the same script that's in the file for the original location

elfin kindle
vernal crest
#

I think if you do a switchEvent after using changeLocation you have to put the new event into the new location but not if you do changeToTemporaryMap? But don't quote me on that.

elfin kindle
#

Hmm.. sounds like theres some logic to it, but it should be a simple one line script

vernal crest
#

Noooo use multi lining

#

(Still one event, just has each command on its own line. Much easier to read and write imo)

quartz flame
#

Hello. I'm looking inside the crops template for json assets. Is there a way to make the crops drop multiple items (Not like blueberries, more like sunflower where when harvested it drop both flower and seeds)

elfin kindle
#

I was proud when i managed to change so it wouldnt get mad at the comments

vernal crest
elfin kindle
#

aaaah, okay i'll keeo that in mind! Thank you!

vernal crest
#

But there's a lot of errors you can make while doing events that VSC wouldn't pick up anyway

elfin kindle
#

Seriously SDVpufferwaaah

vernal crest
vernal crest
elfin kindle
#

Yeah, it just catches the most basic which was very useful when I didnt know wtf I was doing but now i can usually figure out the basic formatting by myself

vernal crest
#

Yup exactly. The only error checking I ever need from vsc now is adding commas between patches because if I move them around and grab one from the bottom of my file and move it higher I always forget the comma lol

elfin kindle
#

Y e s, always the commas dude

vernal crest
#

So I will happily forgo the error checking in order to have events I can actually read lol

elfin kindle
#

Yeah, it's been getting more and more confusing so im thankful I finally learnt why it wasnt working lolol

tired relic
#

Which eye should I use?

woeful lintel
#

I could make a tutorial for this SDVpufferthink

vernal crest
vernal crest
woeful lintel
#

I guess there's not an insane amount of structure in CP, but it helps a lot for FF

vernal crest
#

I always just yeet the FF people to you rather than trying to help them xDD

woeful lintel
#

lmao, not a bad idea

vernal crest
#

I know you're very hands on and that you like to see what's happening with modmakers who use FF

#

But if you ever get sick of it please do let me know!

indigo yoke
#

did some tweaks. the effect no longer has animation over blocked tiles / respects objects in tiles. Also set effect depth so it only ever covers up the bottom half of taller sprites, so it's like dust on the floor.

woeful lintel
tired relic
vernal crest
#

Hehe it has big surprised eyes

autumn tide
tired relic
#

Im doing this eye for the perfection chicken

autumn tide
tired relic
#

Im also collating with someone to make pet clothing

golden basin
ocean sailBOT
#

Log Info: SMAPI 4.3.2 with SDV 1.6.15 build 24356 on Microsoft Windows NT 10.0.26100.0, with 77 C# mods and 143 content packs.
Suggested fixes: One or more mods are out of date, consider updating them

vernal crest
#

I think it means that the texture field for a pet is invalid. The game doesn't have a fallback for that the way it does for most other textures so it explodes.

#

So maybe either you've accidentally got an incorrect texture field for one of the pets or you've got some kind of conditional texture (config options maybe?) where the condition wasn't met for some reason so the texture didn't load.

vernal crest
fathom hound
#

Hi guys, I got a silly little mod idea, and was wondering what would be the easiest way to follow through with it? I had this idea of giving shorts SDVshorts to pets and once I gave it to them, they'd equip it themselves and be able to wear it, like a hat, but as pants instead lol

devout otter
#

You'd of course need to draw the sprites overlay for every pet type.

tired relic
#

This answers my question

#

So do we just draw the clothes on the sprite or just the clothes?

woeful lintel
#

just clothes

gray bear
#

use the pet sprite for reference

tired relic
#

Well damn i did this

#

Luckily I remembered layers!

#

So I can just delete the reference

autumn tide
#

hellooo im back again lol, do mail flags have to be defined with data/mail entries?

drowsy pewter
#

no

#

if they are defined in data/mail then they will be added visibly to the player collections

autumn tide
shut edge
#

EAC still not clicking for me, anything obviously not correct here?

#

the error the validator is giving is because it's a code snippet i think

#

the animals are digging up cactus but i was hoping they would change to the alt texture and have the cactus sheared from there

#

jade and topaz are correct, but the cactus should be doing other things

uncut viper
golden basin
#

"I can't load it in, the log says that it's an empty folder despite what's in it"

uncut viper
shut edge
#

ok guess part of it was that my texture changes were using a qualified ID when they shouldn't, so skins happen now, that's a start

gaunt orbit
#

thanks, that should be enough to fix it

uncut viper
#

you may be interested in knowing that you can just do i => i.IsLdloc() for your predicate match

gaunt orbit
#

yes, I'm going to use that and change how the local is saved

uncut viper
#

in my fix i changed ret to the entire instruction, not just the operand, and then did this in the // return held part at the bottom:

new(OpCodes.Ldloc, held),
new(ret.opcode switch
{
  var op when op == OpCodes.Ldloc_0 => OpCodes.Stloc_0,
  var op when op == OpCodes.Ldloc_1 => OpCodes.Stloc_1,
  var op when op == OpCodes.Ldloc_2 => OpCodes.Stloc_2,
  var op when op == OpCodes.Ldloc_3 => OpCodes.Stloc_3,
  _ => OpCodes.Stloc_S
}, ret.operand),
new(OpCodes.Leave, leaveTarget)
#

since ret.operand will either be the localbuilder if it was the .s form or null which is what you'd want for the numbered form anyway

#

but like i said though this doesnt actually fix the fusing. it still doesnt work. it just stops the transpiler from failing to patch

gaunt orbit
#

actually does harmony have a helper method to get a stloc corresponding to a ldloc or will I just have to hardcode the index

uncut viper
#

that is why i made that switch statement lol

#

it does not

#

that switch statement IS the helper method

gaunt orbit
#

ah, jank, how I loathe you

#

well, I have plenty of dumb little helpers already

uncut viper
#

tbf thats just doing what a helper method on its own would be doing anyway

shut edge
#

there we go

uncut viper
#

no other way to identify it unless you want to .toString() the opcode which seems even jankier

shut edge
#

so the texture data needs unqual item IDs, the produce spawn needs unqual, and the harvest tool bit needs qual

gaunt orbit
#

actually I think I'm going to match against Value so I can use constants

#

and just grab them from the opcode table on wikipedia

shut edge
#

lot of my animals seem to be digging up twice a day, odd

#

maybe it's leftovers from previous EAC days

hard fern
#

🤔 hm.

shut edge
#

at this point it seems to be just one guy digging maybe endlessly so shrug

hard fern
#

if i want to make a shop sell only recipes with x context tag, i'll need an item query with a condition that all the items have x context tag?

#

typing that out makes my question sound a little stupid now

fervent horizon
#

If it follows the vanilla pigs, high friendship gives extra chances to dig stuff up

proven spindle
#

You can use peritemcondition and ITEM_CONTEXT_TAG Target contexttagnamehere

rigid musk
#

how many total crafting recipes are there in the base game

#

i think it's 149 but im not sure

proven spindle
#

That sounds about right (wedding ring will add one in mp saves)

#

If you need an exact number you could load up the stardew progress mod in an otherwise vanillaish save, it shows the total number