#making-mods-general

1 messages · Page 222 of 1

harsh snow
#

16x16

calm nebula
#

Good

harsh snow
#

should i be worried that the object itself is not working in the first place?

tawny ore
#

Assuming your stuff is in the right location as your screenshot shows, I can almost guarantee this would work:

{
    "Format": "2.5.0",
    "Changes": [
        {
            "LogName": "Fish as items",
            "Action": "EditData",
            "Target": "Data/Objects",
            "Entries": {
                "{{ModID}}.Goldfish":
                {
                    "Name": "Goldfish",
                    "DisplayName": "Goldfish",
                    "Description": "A common household pet.",
                    "Edibility": "10", 
                    "Type": "Fish", 
                    "Category": -4, 
                    "Price": "200", 
                    "Texture": "{{InternalAssetKey: assets/Goldfish.png}}", 
                    "SpriteIndex": 0, 
                    "ContextTags": [
                        "color_orange",
                        "fish_talk_bass",
                        "fish_has_roe",
                        "fish_pond_ignore"
                    ]
                }
            }
        }
    ]
}
#

Like that should spawn an object with the right texture

harsh snow
#

ok i'll try it with this

lusty elm
#

rooThink apparently something i am doing with this map is bugging out the greenhouse entry path

vernal crest
#

I don't understand what "there's no error but there's no sprite" means. How can there be no error icon instead of a sprite yet not have a sprite?

tawny ore
#

It might help if you enable extensions. I'm sure you're working with json and png, but having those enabled in Windows Explorer ensure you never accidentally save as something else

#

A sprite can be invisible

harsh snow
#

i enabled it thanks to everyones' suggestion

vernal crest
#

How could the sprite be invisible?

tawny ore
#

The Error Item is only a result if the item was spawned correctly and then the data for it is deleted from Data/Objects

harsh snow
tawny ore
#

You don't get an error item for a missing sprite. i.e. texture

harsh snow
#

this is what it looks like same in inventory

reef kiln
#

I think it looks great

harsh snow
#

also unfortunately changing Texture's line didn't work

#

it might be something with my computer? could permissions be affecting something?

vernal crest
#

Oh really? Every time someone has shown their sprite not working before it's been an error item, in my memory

rigid oriole
#

Is it a wrong sprite index

vernal crest
#

No, I checked the sprite index

rigid oriole
#

Hm

tawny ore
#

If it's a 16x16 picture and SpriteIndex is 0, then that shouldn't be the issue

#

Can you drag the Goldfish image into here?

harsh snow
#

it's just the png from the wiki's tutorial

tender bloom
#

Screenshot your folder setup maybe??

#

I agree being invisible is fishy

hot gale
#

Can I use Stardrop to install collections?

tender bloom
#

No pun intended

vernal crest
#

That is 64x64

uncut viper
#

this is 64x64

rough lintel
#

mfw

harsh snow
#

shoot is it

#

mb

#

i swore i set it as 16x16

tender bloom
#

You might want to make a unique sprite for testing just for fun, like a red square or a blue circle or something

#

Up to you, but practicing the creation workflow might be helpful

tawny ore
#

That makes sense, here's the part it was displaying

harsh snow
#

lol

tawny ore
#

So yeah, all transparent

tender bloom
#

(Presuming you eventually want to go from pixel art software to mod stuff etc etc)

harsh snow
#

welp that's embarassing

#

really appreciate everyone who helped

tawny ore
#

Congratulations, you've been inducted into modding. I'm sure we all have spent too much time on something that ended up being a silly mistake at one point or another.

rough lintel
#

yayyyy fletch!

#

proud of u SDVpufferparty

reef kiln
hot gale
#

Gotcha, thanks! Wondering how to easily transplant my collections from Vortex to Stardrop, its reading the entirety of my mods folder and the symlinks for each collection/profile so in stardrop I have 400+ mods instead of a collection with 130, another with 300~ etc

brave fable
#

do you have a lot of experience drawing large sprites in the sdv theme? if not, why would it ever be quick or easy haha

rough lintel
#

ok thank you you and chu for helping me, i've got the formulas i want and i'm EXCITED NOW since i got the awful part out of the way

brave fable
#

took me forever even to be a little satisfied with my take on the art

#

go easy on yourself if it's your first time

vernal crest
#

And recolouring is tedious and takes a long time

harsh snow
#

yay feesh

rough lintel
#

peesh!!!!

harsh snow
#

it still wont go into a fish tank and there's no minigame while catching it :(

lucid iron
#

for tank u need them aquarium sprites

harsh snow
#

if anyone is still willing to help me with that i'd greatly appreciate it

brave fable
#

i'm also legally required to ask whether you're recolouring a sprite pixel-by-pixel @dusk mulch

vernal crest
#

Are your aquarium sprites 24x24px?

lusty elm
#

I'm still not confident in pixelart larger than like 32x32

harsh snow
#

yes

vernal crest
#

And can you share your updated json so we can go on that instead of the older one?

harsh snow
#

sure

#

the guide said to include the base sprite too but idk if that's outdated information

#

it's not that it doesn't appear in the fish tank it's more that it just will not go inside it

vernal crest
#

IDK my fish was just a recoloured carp lol

harsh snow
#

like i cannot put it into the tank

brave fable
#

really just disable the pixel grid no matter what

vernal crest
#

Lol I always start with the grid

vernal crest
#

Otherwise I cannot stay within the space

harsh snow
#

what's wrong with the grid?

brave fable
#

16x16 or 24x24 etc is fine, just not 1x1

lusty elm
#

To be fair, more specifically the only things i've tried that are over 32x32 are buildings and trees.

vernal crest
#

Oh yeah I would never have 1x1, mine is 16x16

brave fable
#

photoshop defaults to a 1x1 pixel grid if you zoom in enough. properly nasty

harsh snow
#

best tip i've ever learned for pixel art is to just scribble on different layers to get a feel for what you're drawing

#

you can clean it up very easily just understand your outline and the general shapes you need to fill

brave fable
#

i never start with an outline, always a thick brush blob

harsh snow
brave fable
#

blob it out, cut it down, then refine the outline based on the shape you're left with

harsh snow
#

i think it's more a taste thing or dependent on what you're drawing

brave fable
#

more sculpting than drawing i think gives good results

harsh snow
#

i always blob for irregular shapes

vernal crest
lusty elm
tawny ore
vernal crest
#

I never blob, it's never been helpful for me

rough lintel
#

i like blobbing for shape

lusty elm
#

Took me longer than I expected to modify the 4 Seasons greenhouse into a new map.

rough lintel
#

and then i shave off as i need

dusk mulch
#

god i thought making a custom npc would be a walk in the park, I was so wrong

rough lintel
#

then i outline

#

custom npcs are probably one of the hardest things to do in terms of level of tedium

#

like yeah, it's mostly all CP, but you need to harness all of the skillsets to create one

lusty elm
#

There is a reason i told you earlier that they are one of the most difficult

rough lintel
#

mapmaking, writing, json coding, art

#

secret fifth power: tokens

tawny ore
reef kiln
dusk mulch
#

Art isnt too hard for me anymore

lusty elm
#

Events, dialogue, knowledge of festivals to add npcs to them.

rough lintel
#

festivals i just copy what someone else does and change the positions, too lazy for typing that out

vernal crest
#

Hold up I just realised the key is still wrong

brave fable
#

silhouetting is good since even if you're mainly chasing an outline, it's far faster to end up with a consistent and natural outline by carving a blob than it would be to manually draw and fixup one long line

rough lintel
#

plus theres like One way you can syntax it and if someone else already did it... yoink

#

oh yeah. events. haha. forgor about that.

#

Evil.

brave fable
vernal crest
tawny ore
#

In fact, this is all the game cares about when it comes to inserting fish:
return this.GetAquariumData().ContainsKey(item.ItemId);
Meaning the key exists in AquariumFish and that it exactly matches the key in Data/Object

reef kiln
# dusk mulch Lol I almost did the same

I did not need them to move (or even talk) really as they where just a shop keeper. I wanted them to feel real so I was trying to make them an NPC, but started the process and gave up with how much more work it added.

rough lintel
#

the first event i did had seven forks in it. i started off in hell but now everything else is shrimple in comparison!

ornate locust
vernal crest
harsh snow
#

i need to learn more about this syntax lol

rough lintel
#

you will as you mod more

vernal crest
#

How important is it to encourage fletch to change from {{ModID}}. to {{ModID}}_?

rough lintel
#

well, pathos said _ is convention

#

so i'd say follow convention

brittle pasture
#

LA needs the _ to work

uncut viper
#

i mean, uniqueIDs have . in them already, so its not critical

brave fable
#

fairly important, since LookupAnything uses the _ delimiter

uncut viper
#

but it is helpful to encourage

vernal crest
#

Ooh LA needs underscore? Yes, change it immediately lol

brittle pasture
#

me looking at my old content mods that use dots, mourning the fact it's too late to change

rough lintel
#

its never too late

vernal crest
#

Just break all your users' games, Selph

#

It'll be fine

brave fable
dusk mulch
uncut viper
vernal crest
#

Looks like you are never getting a reply from Person, bluebs SDVpufferpensive

dusk mulch
#

Hm?

#

I mustve missed the message

vernal crest
vernal crest
#

Pixel by pixel?

#

Not using the paint bucket/fill tool?

#

Not using the magic wand tool?

dusk mulch
#

No I learnt an easier way to do it after the... second one...

#

hm.

rough lintel
#

?

#

you paint bucketing with contiguous off or what

dusk mulch
#

Oh no I meant I learnt to use the bucket tool after the second one

rough lintel
#

so you did the first one,,, how

dusk mulch
#

Pixel by pixel, I had to get the colors just how I wanted them

harsh snow
#

also the fish works! i'll have fun spamming a bunch of random fishies into the game

rough lintel
#

oh god

dusk mulch
rough lintel
#

well you got your answer blue

#

yeah you willingly inflicted that on yourself dawg 😭

#

i cannot even fathom doing that. i would've been five pixels in and gone "there has to be an easier way"

#

but you just.... did all of that?

brave fable
#

sometimes you gotta learn how not to do it in order to learn how to do it

calm nebula
#

Tbh at this point I just don't ask when it comes to Person

#

Tbh

reef kiln
#

Are you giving it fish pond data? or just not letting it go in ponds.

calm nebula
#

Their process sure ain't mine but that is okay

harsh snow
#

i just disabled fish ponds for now

dreamy cedar
#

I'm writing a C# mod and what I want to create a ball, which bounces for a bit then zips to another position and stays there until something happens. Is TemporaryAnimatedSprite the way to go with this? Anybody know mods that do something similar that I can crib from?

rough lintel
#

next issue: i need to make the tiered seeds result in... that crop tier, or above. so silver seeds will grant silver crops (at the lowest), and higher.

#

THAT is a c# patch now, right?

calm nebula
#

Yes

rough lintel
#

thank you, had to make sure

brittle pasture
#

yes, and a particularly fun™️ one to make
enjoy

rough lintel
#

dont lie to me 😔

harsh snow
#

just wanted to thank everyone again for helping me make my first mod even with all the troubleshooting you're all awesome!

rough lintel
#

if i just make it like a fake fertilizer, i dont think it will be too bad

brave fable
harsh snow
#

i'll let you get back to your advanced modding now

brave fable
#

if you want a more complex controlled clientside sprite i often just use Critter as a base

uncut viper
#

can you just copy the dustsprite class and make the ball a monster

brave fable
#

critters won't be synchronised between players, though

tawny ore
#

You can override HoeDirt.GetFertilizerQualityBoostLevel to return 1 if the seed was Silver, 2 if the seed was Gold, or 3 if the seed was Iridium which would make the seeds functionally behave like Normal, Quality, and Deluxe Fertilizer.

dreamy cedar
rough lintel
#

how flexible was i looking for. i repressed the previous hours of this convo because i fried my processor chip

rough lintel
#

ah yes

#

but that would still grow regular crops (cringe)

#

unless i use deluxe

tawny ore
#

Yeah, if you want to make it a guaranteed thing, it might be more like a transpiler patch on harvest

rough lintel
#

mmmm

#

or i look at atra's more fertilizers... heehee

uncut viper
#

it would be a simple transpiler if you did it that way

rough lintel
#

nod nod

dusk mulch
#

For the NPC portraits do they go like a sprite index would? Top left is $1, top right is $2, ect?

rough lintel
#

i am shlooking at it now

dusk mulch
#

Oh, right

rough lintel
#

like button said

dusk mulch
#

Alright, ty!

tawny ore
#

@rough lintel I just thought of a different, maybe even easier way. You can postfix GetData() because of this:
cropQuality = MathHelper.Clamp(cropQuality, data?.HarvestMinQuality ?? 0, data?.HarvestMaxQuality ?? cropQuality);
If I'm reading that correctly, then you can adjust the Min/Max quality to be exactly what you want it to be, and the clamped value will be exactly that.

#

So cropQuality = (a number between 4 and 4) would guarantee you get iridium by just setting data.HarvestMinQuality and data.HarvestMaxQuality both to 4.

rough lintel
#

so long as the seed is iridium... nya.... i see...

acoustic summit
#

@weak pulsar Pinging to let you know that all that documentation stuff is now usable 🙂 It took a while since I was limit testing my current optimization capabilities SDVpuffersquee[Sorry chat for the big(ger) message]
TLDR of main feature changes:
You can release creatures wherever now so that they act like they would in the insectarium
Creatures can optionally have a soft "following AI"
Creatures can have specified health and/or damage and can be specified to be only caught once "defeated"
Creatures have optional DRUL idle animations
Creatures can play sound effects when you're nearby
4 GSQs, 2 Actions. Fixes to how the GSQs, Triggers and Actions interacted to make them work correctly.

rough lintel
#

i am now pleased as cheese, thank you matt

#

to make this mod viable, though: i'll have to nerf the impact farming level has on harvesting, which feels lowkey bad

#

or ... what would i even do.

#

unless i do it so regular seeds can only grow up to silver at highest, silver can grow gold at highest, and gold can grow iridium at highest

#

which locks qualities behind seed tier

reef kiln
rough lintel
#

crop quality is affected by farming level though

#

it says here

#

unless thats just not right anymore?

uncut viper
#

farming level does affect crop quality yes

rough lintel
#

nodnod

reef kiln
#

Quality yes, I thought you meant the field in the crop data. It needs to be 0. One sec I will get the name of entry I am thinking of

#

This "HarvestMaxIncreasePerFarmingLevel": 0.0,
It needs to be 0 or you get a ridiculous amount of crops

uncut viper
#

that's just a Json assets thing

#

you're correct though it will do that

brittle pasture
#

you might be thinking of ExtraHarvestChance, which rolls repeatedly until it fails

reef kiln
#

I just know i have downloaded multiple mods that had it set above 0, and it make it so you harvest a ton of crop with each harvest.

uncut viper
#

you have because it's listed in the common bug solutions channel as a Json assets thing

reef kiln
#

it is broken. I have fixed my copies and report it to the authors

#

not so much anymore. but before

brittle pasture
#

and they're CP crop mods?

reef kiln
#

yes. I don't have any JA crop mods anymore. I phased them out. again, I have not seen if recently with any mod I downloaded.

drowsy pewter
#

well

#

the reasons JA had the issue is because it used to only allow whole numbers in the field (and the field was broken before 1.6 so nobody noticed). Actually the intended behavior is that you set a decimal like 0.1 per level

#

a CP mod can still have the same issue if they use whole numbers

#

its not that a non zero number causes the issue. Its just that the number is too big for what the field does

rotund elm
#

does anyone know if there is any NPCs with pathing in this section of the dock? I am not really sure how to check all the pathing

lucid iron
#

you can't predict that no mod paths in here

#

what is your actual desire

rotund elm
#

add a small vending machine that is 2 tiles tall and one tile wide

lucid iron
#

i als feel like willy checks that bucket

rotund elm
#

Dont want npcs to walk through it

#

He does but I think he is infront when he does that

#

I was thinking closer to the back since the player can already walk back there

rare orbit
#

anyone have luck using multiple recolors? mostly asking since for vanilla i'd like to use stardew foliage redone unofficial 1.6 update and for the mods, east scarp and luminesteria, i'd like to use vpr

lucid iron
#

replace the bucket?

rotund elm
lucid iron
#

ig that would cause potential lore problems though Dokkan

rotund elm
#

Oh true

rare orbit
#

was told to do onlocationchange patches but idk how to

lucid iron
#

my next npc mod bucket admirer admirers the bucket on the docks every day

dusk mulch
#

Now I have to make my own custom portrait, lets see how I do...

rough lintel
rare orbit
#

son of a

dusk mulch
#

Also I just realized, why does safari guy have 2 sets of eyebrows?

rough lintel
#

because that lower set is his eyelid, not his eyebrow

dusk mulch
#

oh

rare orbit
#

if vanilla's dirt didn't hurt my eyes i'd be cool ;-; but noooooooooooooooo that'd be too simple for my brain

acoustic summit
drowsy pewter
#

no prob

vernal crest
rotund elm
#

Yes! I will double check the maps before I do anything

dusk mulch
#

ok thats it im making a mod list

versed wyvern
#

It should be possible to make a mod for Love of Cooking that makes it teach vanilla cooking recipes as you skill up, right? ThinkO_O

#

Was thinking that lots of recipes in the base game don't really get unlocked at any point where you could use them because of the Queen of Sauce being timegated, having LoC unlock them might make for a more natural progression

stiff holly
#

Does anyone know the name of a mod where it adds winter fruit trees as well as fruit trees/crops for other seasons including wisteria trees and yuzu?
I am trying to refind it, it was very aesthetic

brittle pasture
stiff holly
brittle pasture
#

you may also have been thinking of PPJA (of which Cornucopia is the direct successor)

#

they have Wisteria and Yuzu among other winter trees

ivory plume
#

(Reliable source links on smapi.io/mods are back!

The open-source stats dropped over the last few months due to mod descriptions not being in Nexus' export API. That was fixed a few days ago; so I rebuilt the mod dump, added a script to detect source link discrepancies between the mod dump and compatibility list, and fixed all detected discrepancies.

So essentially:

  • The percentage of SMAPI mods with a source link rose from 59% to 66%.
  • When a mod adds/changes source links on a mod page, it'll now be reflected in the monthly compatibility list updates.)
rough lintel
#

yatta pathos

lucid iron
#

say is the 66% of all mods or of all compatible mods?

latent mauve
#

Friends, is this actually in use in the game? (Farm Perfection stuff under the spoiler) ||"Farm_Perfection_Description": "Waterfall Farm_Grandpa left you a magic lamp that grants a powerful bonus. However, you've also inherited his 1,000,000g debt to JojaBank, and must pay it off in seasonal installments...", "JojaGrandpaIntro_0": "???: Very touching... Now, just sign the paper here...", "Joja_Debt_Notice": "NOTICE:^^At the end of the season, {0}g will be debited from your account.^^Failure to pay will result in a negative balance.^^Thank you for your patronage.^-JojaBank",||

ivory plume
rough lintel
#

idk

#

may have been added in 1.6.9+

latent mauve
#

I found it while editing strings for my mod, it's in 1_6_Strings

rough lintel
#

oh neato

ivory plume
#

Nope, those are unimplemented content.

rough lintel
#

oh?!

latent mauve
#

I've seen zero mention of it on the wiki so wanted to check

rough lintel
#

implement it and be funny

latent mauve
#

I wouldn't know how to implement the owed money portion, and I am not a C# modder

rough lintel
#

quest, no?

#

special order?

latent mauve
#

The "negative balance" is the part I wouldn't know how to do, mostly

#

Otherwise it'd just be like the pass out mails

lucid iron
#

well theres existing debt mods

rough lintel
#

nodnod

lucid iron
#

dewb is not c# iirc

hot gale
#

Is there a like template somewhere I can find for adding some decoration items via content patcher? I downloaded a couple to try to reverse engineer the method to add my own stuff but I'm having a little trouble understanding i18n, is it worth learning/understanding it so I can add to and eventually expand a catalogue of fall decoration

rough lintel
#

oh mmy goodner tomorrow at work im gonna read harmony documentation to know how to do a … postfix

lucid iron
lucid iron
rough lintel
#

i18n is generally used for translations in the case of your items (probably, anyways) but it can be utilized many ways

#

!i18n

ocean sailBOT
#
Creating Translation Capability

So you'd like to stop writing all of \"your strings straight in your content.json?\" and/or you'd like the capability to see all of your strings across all of your .jsons?
Introducing i18n!

  • How to make your mod compatible with other languages: stardewmodding.wiki.gg

  • The file where you can put all of your strings is called default.json, and it sits in a folder at the same level of your assets, named "i18n".

  • If you're converting from an older version of the game, there's a converter for ease-of-access.

Not to be confused with {{DynamicTokens}} since these require the specific {{i18n:<KEY>}} modifier

rough lintel
#

oh shit its a command

#

but yeah pretend its just Text

latent mauve
hot gale
#

So what would be the best way to simply add a catalogue with some deco items, is there a template or example mod somewhere that isnt a convoluted i18n mess 😅

latent mauve
rough lintel
#

not really. whatever examples there are would be on nexus, and most probably have i18n

lucid iron
rough lintel
#

there is no template idt

latent mauve
#

You'd need to look at H&W furniture mods for the example as listed in the mod description, at least to work with Cacifer

rough lintel
#

(hxw is guaranteed to use i18n however, so …. )

#

you kinda just gotta tough it out man

hot gale
#

gotcha

rough lintel
#

hxw is probably the cleanest example youll get

#

if you just want to add furniture items, there probably is a template for that floating around somewhere

vernal crest
latent mauve
#

The i18n in H&W is fairly straight-forward, it seems to mainly be used for the description text and item names

rough lintel
#

anything in brackets is just one entity if it makes u feel better

vernal crest
#

It appears the i18n command doesn't actually link to the CP docs about i18n which is a pity because I think that's the most straightforward and easy to understand explanation and examples of it.

rough lintel
#

good point

true coyote
#

soooooon 👀

calm nebula
#

real talk: how many of you guys have seen a parsnip irl

rigid oriole
#

I ate one last weekend

#

Got brunch. It was in a hash of some kind

calm nebula
#

I've only ever seen them in fancy food stores or in csas

rigid oriole
#

I'm not sure I've seen them in grocery stores really tho

gentle rose
#

looking on google, I have decided that they’re just Weird Carrots

uncut viper
#

i have eaten parsnips and parsnip chips

acoustic summit
gentle rose
#

Weird Carrots and Weird Carrot Chips, you mean

acoustic summit
#

They are... not very good

calm nebula
#

where I come from, a different form of large white root veggie is prefered

uncut viper
#

cauliflower

gentle rose
#

god this is what happens when it’s 4am, I can’t sleep and I have a headache pffft

acoustic summit
#

Cauliflower is evil brocolli, my mind is made up on that

gentle rose
calm nebula
#

cauliflower is not a root veggie, I love caluiflower

uncut viper
#

it's a root to me

calm nebula
#

daikon

#

daikon is the english japanese word for it

gentle rose
#

the best root veg is potato

calm nebula
#

sweet potato is better

#

fucking love sweet potato

#

especially the purples

uncut viper
#

pretty sure those are flowers

gentle rose
#

I am fascinated by the taxonomy on your planet, Button

true coyote
#

Parsnip puree is pretty good when you know the secret ingredient

uncut viper
#

thank you!

calm nebula
#

Button, I want to see a crop mod from you rn

true coyote
#

Clarification I went to culinary school

The secret ingredient is a little bit of white chocolate in parsnip puree

hard fern
#

i think i would kill for radishes

calm nebula
#

I don't fucking believe you

true coyote
#

Balances out some of its acrid-ness

uncut viper
#

my crop mod will just be recategorizing potatoes to flowers

true coyote
#

It's true! We did it all the time in our college setting

calm nebula
uncut viper
#

is there cauliflower in vanilla?

patent lanceBOT
uncut viper
#

i don't know how to take this

gentle rose
#

button when was the last time you played the game pffft

#

(yes. yes there is. and no, it isn’t new to 1.6)

uncut viper
#

recently, with a bunch of crop mods installed, as with all my playthroughs of the past 3 years except one

#

i actually can't remember the last time I played without a bunch of modded crops aside from right after 1.6 dropped, and that playthru didn't last unmodded for long

south hemlock
#

Im new here obviously and don't know where to ask this, but i just got a pc and I want to add mods to my Stardew valley. So far I've gotten only one to work big_sob pls help

brittle pasture
#

!mh

ocean sailBOT
#

For help with modding issues, please ask in #1272025932932055121! When asking for assistance there, sharing an error log will help others identify your issue (see https://smapi.io/log for instructions).

gentle rose
uncut viper
#

!gettingstarted probably actually

ocean sailBOT
gentle rose
#

then again I can’t talk, my personal choice is currently vanilla (…balatro)

uncut viper
calm nebula
#

my personal choice is a vanilla sock!

gentle rose
#

vanilla ice cream might actually be good rn

#

though my headache is right where brain freezes are, so maybe not the best idea…

lucid iron
#

i did a 1.6 playthrough with only lookup anything my beloved

uncut viper
#

besides, I don't think anyone should play vanilla Stardew at this point. they need extra books, after all

gentle rose
#

a totally unbiased opinion

uncut viper
#

as long as they add about 30 extra books it's fine by me

brittle pasture
#

I still have my saves from when I first played; my 2nd one is also my last pure vanilla one

gentle rose
#

I still have the save I moved from 1.4 on ipad to 1.5 vanilla on pc to 1.5 modded on pc

uncut viper
#

i have like 2 dozen actual playthrough saves on my drive still

calm nebula
#

Tbh I only have 4 real gameplay saves

uncut viper
#

depends how the 1.7 alpha goes

vernal crest
#

@tawny ore Thanks for the teaching today by the way! SDVpufferowo

gentle rose
#

wait atra you might know this actually. Has anyone ever brought up the fact that the code controlling the hands on the gold clock and cc clock is wrong?

brittle pasture
#

can't wait for clickCraftingRecipe refactor

gentle rose
brittle pasture
#

welp literally unplayable, I'm refunding now

calm nebula
#

Close enough

hard fern
#

im fascinated that the clock is practically an hour behind

gentle rose
#

I expect 1.7 to be rushed out to fix this

calm nebula
#

!officialbug

ocean sailBOT
gentle rose
hard fern
#

oh yeah

#

i can read clocks

#

i promise

#

i know what a half hour is

gentle rose
#

…why did I reply to governor

vernal crest
#

Too much time in support, iro

gentle rose
#

the only reason I’m back looking at screens is because I’m bored, with this headache I should really be staying away pffft

calm nebula
#

I keep benadryl on hand for insomnia emergencies

rotund elm
#

Heyo, would anyone know specifically how I am supposed to set an item to be purchasable only once like a recipe, without it actually being a recipe, I see the Fields for limiting stock, but it doesn't say anything about non replenishing stock, only stuff that will refresh every day?

uncut viper
#

set a mail flag on purchase

#

use the mail flag as a condition

rotund elm
#

Ok, I wasn't sure if that was the only route. Thank youuu

rare orbit
#

i ate them before

#

parsnips i mean

vernal crest
#

What sorts of things does the Linux case sensitivity affect in Stardew mods? Is it only for file names (like in FromFile or InternalAssetKey)?

uncut viper
#

file paths/names

#

assets/ =/= Assets/

tawny ore
#

SMAPI is pretty good about making things case insensitive as much as possible

lucid iron
tawny ore
#

Anything that uses AssetName for comparison is case insensitive

ivory plume
#

(Content Patcher normalizes paths accessed through its own tokens and fields, so things like FromFile and InternalAssetKey are case-insensitive. It's mostly C# mods accessing files directly that tend to be affected.)

lucid iron
#

wait really

#

there was this animal mod that was definitely borked for me bc the sound cue paths were wrong casing

calm nebula
#

I suspect {{AbsoluteFilePath:}} isnt' doing that

vernal crest
#

Oh that's good to know. I always worry that I might be introducing problems (with my CP mods) for Linux users if I miss getting any capitalisation anywhere in the mod exactly correct but it sounds like I don't have to be as concerned.

tawny ore
#

Sounds might be one of the things that is an exception since it has a reference to the absolute file path

lucid iron
#

but i also remember fixing FromFile problems sometimes think

tawny ore
#

Rather than using the IAssetName wrapper

lucid iron
#

aba if you want to be safe u can just lower case everything (or install gentoo)

calm nebula
#

XD

#

sings

#

W-S-L

vernal crest
dusk mulch
#

Is there a dialogue key for when you first talk to the NPC? I cant see one on the wiki

vernal crest
#

I was actually asking because I wasn't sure if there'd be a difference between AddMail Current {{ModID}}_BoughtSword received and AddMail Current {{ModID}}_BoughtSword Received for Linux users.

calm nebula
#

no

#

(that's parsed case-insensitive)

#

BUT

vernal crest
dusk mulch
#

Alright, ty!

calm nebula
#

AddMail Current lowerCase received and AddMail Current lowercase received are different

lucid iron
lucid iron
uncut viper
#

thatsa what atra is saying

#

dictionary keys are case sensitive

#

(that said i dont know if they are case sensitive when working in e.g. Content Patcher Entries)

tawny ore
#

But that probably has less to do with Linux and more to do with how dictionary keys work in C#

uncut viper
#

correct

#

you can make a dictionary case-insensitive but the default is not that

tawny ore
#

For all of my mods I tend to use case insensitive Dictionary keys and HashSets by default

dusk mulch
#

Welcome to, Let's see if this JSON works or if the console gets flooded with errors!

tawny ore
#

Come to think of it. How would you make Newtonsoft Json deserialize into case-insensitive dictionary keys?

calm nebula
#

for all my mods I use the german locale's case insensitivity

dusk mulch
#

WHAT- I GOT NO ERRORS WHEN LOADING IN!? I DID MY CUSTOM NPC RIGHT FIRST TRY?

uncut viper
acoustic summit
#

Out of curiosity, what effect would that have on look up times? My mind is thinking it would kind of "tolower" both the key and input string.

tawny ore
#

At least not without getting into the Json Converter stuff

uncut viper
#

maybe specific JsonSerializerSettings

calm nebula
#

It's actually very fast if you're doing it with ascii only

tawny ore
#

Dictionary lookups are O(1) complexity, and they are still O(1) even using StringComparer.OrdinalIgnoreCase. Any possible difference is negligible.

#

It's like if you're trying to optimize, there are a million other places to start before you worry about dictionary lookups

acoustic summit
#

Very cool 🙂

uncut viper
#

(HybridDictionary is pretty neat though)

calm nebula
#

Isn't hybrid dictionary a list at low n and a dictionary st high n

uncut viper
#

yep

#

well

#

yes. theres one other one very similar too

#

that i forget

calm nebula
#

Anywyas, the difference between uppercase and lowercase is very much just bit 6

uncut viper
#

i double checked and HybridDictionary is actually a ListDictionary at low n

calm nebula
tawny ore
#

There is possibly the tiniest bit of overhead when it comes to computing the hashcode

uncut viper
#

i was experimenting with these collections when i was working on the CMCT rewrite

#

thats why its better until about n = 10 i believe

#

the ListDictionary that is

tawny ore
#

It's why one of Nick Chapsas videos shows you how to unsafely combine lookup/update into a single call to save on that slight overhead

calm nebula
#

I'm surprised

uncut viper
#

however you do lose some efficiency if you start with a HybridDictionary but dont give it a predetermined size

calm nebula
#

I've seen (rust) benchmarks where hashing is slower at n=32

uncut viper
#

bc the process of swapping from ListDictionary to Hashtable involves some work

calm nebula
#

But Rust has a fairly slow hash

uncut viper
#

you can initialize a HybridDictionary with a minimum size to avoid that but then im not sure what the benefit over a dictionary is

calm nebula
#

It's perfectly safe, i do it all the time

tawny ore
#

It's so small that no one should care about it unless you're literally handling millions of lookups per second

uncut viper
#

(since if it detects a minimum over the ideal itll skip straight to Hashtable)

#

i wanted to use them with CMCT originally for the actions registry bc, why not, free optimization

#

but they dont implement the TryGet pattern so i abandoned them

tawny ore
#

Check out my workshops and use code WORKSHOP20S for 20% off: https://bit.ly/4jmXbpI
Subscribe to my weekly newsletter: https://nickchapsas.com

Become a Patreon and get special perks: https://www.patreon.com/nickchapsas

Hello, everybody. I'm Nick, and in this video, I will show you how you can fix an issue with the Dictionary class' performance...

▶ Play video
uncut viper
#

i like the TryGet pattern

calm nebula
#

I wouldn't say millions, millions is ns range

#

I would say thousands. If you do thousands of hashes per second you may want to do something about that

tawny ore
#

The video summed up

calm nebula
#

Yup, I regularly do that lol

#

It's not even unsafe tbh

dusk mulch
#

Sometimes windows spawn on the wall even though they arnt in the map, any idea why?

calm nebula
#

As long as you don't mutate anything while you have an object checked out

tawny ore
#

As an alternative to if (!dict.TryGetValue(key, out var val) { val = value; dict.Add(key, val); }

vernal crest
tawny ore
#

Since TryGetValue and Add both require the overhead of hashing key twice

tawny ore
#

For once Nick talks about an optimization without actually demonstrating the Benchmarks

#

So disappointing

dusk mulch
#

Buddy, get off the damn wall.

#

I mean I got him off the wall... he isnt very talkitive though...

vernal crest
#

Does he have gift tastes?

dusk mulch
#

I just used the example from the wiki and edited it to what I wanted

#

But yeah

#

Well I got him to talk

#

But he wont follow his schedule...

vernal crest
#

His schedule that you made for him to just stand in one place?

dusk mulch
#

I moved him across from where he is supposed to stand so he should move to stand there

vernal crest
#

Have you slept in game since editing the schedule?

#

Or made a new save?

dusk mulch
#

Yes

#

Both

#

I think I may have to make his name a bit shorter...

dusk mulch
vernal crest
#

Not unless you're on Linux but you should try to always match case anyway

brave fable
rigid musk
dusk mulch
rigid musk
#

I wish...

brave fable
dusk mulch
#

how did anyone even learn to start modding stardew

brave fable
#

replacing game files has been a thing since games have had files

#

it just evolved a lil

dusk mulch
#

but stardew valley is the best at it

rigid musk
vernal crest
rigid musk
#

Pff

dusk mulch
#

No error

brave fable
#

even now there's nothing stopping you from just replacing random windows .wav and .ico files with whatever you like, go wild (don't)

rigid musk
#

Hi Aba b_wave

versed wyvern
vernal crest
#

Just patch data/recipes to re-add every recipe with blueberry.LoveOfCooking_ at the start. Seemples!

dusk mulch
#

OMG HE MOVED

#

HE FOLLOWED HIS SCHEDULE

#

I HAVE NEVER BEEN SO HAPPY TO SEE SOMEONE MOVE

hard fern
#

uve eatied a parsnip... as ive said it's the lovechild of turnips and carrots

brave fable
#

i'm sure part of the reason why i made it this way is because LOC originally did incredible and stupid things like including campfire/cookout/egg/trail snack recipes as cooking skill level-ups and i vowed never to do that again

#

wish CA would've added a chocolate bar in 1.6 so i could've removed the last random object in the mod

versed wyvern
#

Oh yeah, regarding how vanilla Cookies and Chocolate Cake both take the exact same ingredients and chocolate just materializes out of nowhere?

dusk mulch
#

now to go fix the dialogue 😭

brave fable
#

ah yes chocolate cake. ingredients: flour, egg, absence

vernal crest
#

There's a chocolate cake I could enjoy

dusk mulch
#

How do I make it so the dialouge instantly goes to the next string, so like

"spring": "blablabla$0#etman" but when you click on blablabla it instantly goes to etman

rigid musk
#

#$e#

#

You don't need the $0 btw

#

If you're doing it to remember that's okay I was doing that too lol

dusk mulch
#

The $0 is for the portraits?

rigid musk
#

Whenever you have neutral portraits you don't need to use the indicator

dusk mulch
#

Oh

rigid musk
#

It'll automatically use that one

dusk mulch
# rigid musk #$e#

I dont want to end the dialogue though I want it to go to the next bit of the dialogue

rigid musk
#

Oh sorry #$b-

#

YeH

#

I mean e will also do that you just have to click on them again

dusk mulch
#

Ah, ty!

#

So this would be a good dialogue?

Introduction: "A customer?!$1#$bHow did you get into the area?$bThe bridge is repaired? Well that is wonderful news!$1",

#

(In terms of the commands)

vernal crest
#

You're missing the hashes around the second line break command $b

rigid musk
#

^

#

You also need another one at the end of the first one

#

#$b#

dusk mulch
#

So the commands have to be encased in "#" and seperated with "#"?

rigid musk
#

A fair few yeah

#

At least that one does

uncut viper
#

every command needs to be separated with #

#

its only encased because "$b" is itself a command

#

and must be separated from the next command

#

or dialogue

dusk mulch
#

Alright, ty!

vernal crest
#

Oh yeah I missed the first one nice spotting Lily

versed wyvern
#

thonking Hmm... I'm examining Harvey's schedule to see where I can make some changes and... am I reading this right that he only works half a day on Fridays, and the local hospital just has no one staffing it on Saturdays?

lucid iron
#

seems accurate to irl PecoSmile

versed wyvern
vernal crest
#

I think calling it a hospital is really a stretch

#

It's a miniscule GP clinic

#

(I realise it's not your stretch)

versed wyvern
#

Well it's where you go when you get your butt handed to you and Harvey's licensed to perform "emergency surgery"

dusk mulch
versed wyvern
#

But now that I talk about it, I guess in a small town it's not a huge deal for someone to just go fetch the local doctor from the museum or the saloon or wherever he is at the moment

#

But from a gameplay perspective the Clinic sure is useless compared to the Saloon

dusk mulch
#

yall i really want to make a plotline for the campsite but idk how to do it, i could maybe do an event or a dialogue...

lucid iron
#

if you die on saturday you die in real life

dusk mulch
hard fern
#

Just like real life

#

The clinic isn't open

ornate locust
#

I say this as someone who just had some damn medical problems: the urgent care closes at 5 on weekends. You deal with it or find a real hospital

#

hope one's nearby!

#

but they've got one doctor, he cannot be on 24/7, that is not fair to him. You're heading to Zuzu or something if you really need it

orchid glade
#

Is it possible to call on another mod's config in your When conditions?

ornate locust
#

It is, I've actually done that. lemme see

orchid glade
#

(yay finally I have an idea that might work!)

ornate locust
#

"When": { "HasMod |contains=FlashShifter.StardewValleyExpandedCP": false, "HasMod |contains=Rafseazz.RidgesideVillage": true, "Rafseazz.RidgesideVillage/ExpandedFestivalMaps": true, },

#

ah shoot- Well, you can see it anyway

#

You do it like a path

#

That's me changing a festival map only if Ridgeside's festival map expansion setting is on

lucid iron
#

you need a mod for this (obtaining config tokens from another CP mod)

ornate locust
#

You do the HasMod and then do it like a path

lucid iron
orchid glade
#

so thats, they dont hace SVE, they do have RSV, and the important part is: "Rafseazz.RidgesideVillage/ExpandedFestivalMaps": true,

ornate locust
#

Yeah that's right

#

And I didn't need CMCT to do how I did it...

#

I didn't think anyway

lucid iron
#

it depends on how RSV provided the token too

ornate locust
#

It's just part of their settings, the bit that turns their maps on

lucid iron
#

if it's straight up a C# mod using content patcher api to provide a token

#

then you don't need cmct

#

hence obtaining config tokens from another CP mod

orchid glade
#

let me look at the one I want to reference

#

it's a CP pack, and it starts with "ConfigSchema":

#

does that mean i don't need CMCT?

#

or I do because it's CP not C#

#

?

ornate locust
#

My mod's not any C# either

#

heck, let me find where I was told how to do it.

orchid glade
#

but is RSV C#

ornate locust
#

Sorry, thought it was a simple answer since I managed to do it pretty easily, but there appear to be hidden speedbumps

dusk mulch
#

Can I have multiple dialogue entries for the same key?

vernal crest
#

It's RSV having a C# component that matters for this

#

Not your mod, Midnight

#

So yes bezajel you would need CMCT

orchid glade
#

ok, so I can use CMCT - does that mean it becomes a requirement for users of my mod?

vernal crest
#

Yes

ornate locust
lucid iron
#

that said, there may be alternatives?

#

it kinda depends on how the og mod is structured blobcatgooglyblep

dusk mulch
vernal crest
#

How do you want the game to choose between your different lines?

#

Chu is there any way I can scrape data/fish for a list of fish IDs without C#? For use in flavouring bait. (Or anyone else, not specifically chu)

dusk mulch
#

Randomly, there is a chance that you get A line or B line

unreal spoke
#

You can just throw a randomization token in the i18n token, right?

vernal crest
#

Yes

vernal crest
orchid glade
dusk mulch
lucid iron
#

you cannot directly do "get other mod's config token" without CMCT

#

however, depending on the details, you may have another approach that bypass the need all togther

#

this is why when you ask questions it's important to give context

vernal crest
# dusk mulch No

Definitely recommend changing that. But if you don't (or even if you do, actually), you can use $query RANDOM 0.5#<if true>|<if false>

lucid iron
#

The XY problem is a communication problem encountered in help desk, technical support, software engineering, or customer service situations where the question is about an end user's attempted solution (X) rather than the root problem itself (Y or Why?).
The XY problem obscures the real issues and may even introduce secondary problems that lead t...

dusk mulch
vernal crest
#

You just plop an i18n key where you'd normally have user-visible text, then write that user-visible text in the i18n file.

dusk mulch
#

I am using BETAS to display a message with a touchaction

orchid glade
#

it's the thing I was talking about yesterday, one mod uses load to change vanilla portraits (selectively and according to complex config settings), and I want to get anime portraits working with it

lucid iron
#

isnt your problem the exclusive loads the 2 authors are both doing

#

you can't fix this even with CMCT

vernal crest
orchid glade
#

no anime portraits uses edit image, but it overwrites the other mod's loads

lucid iron
#

what exactly do you want anime portraits to do then?

#

do you have matching alt portraits made

orchid glade
#

yep i've made matching alt portraits for the mod that uses load

lucid iron
#

then yes, you can use CMCT to match the load

orchid glade
#

so i want to use a mix of the original anime portraits (ohodavi ones) and the versions i made for this other mod

lucid iron
#

are you sure the one mod is not using appearances though?

#

helps if you link it Dokkan

orchid glade
#

sorry i'm being a big vague because the mod in question is nsfw 😅

lucid iron
#

fair enough, the thing you need to confirm then is

orchid glade
#

this look like load not appearances to me:

#

{
"Action": "Load",
"Target": "Characters/Alex",
"FromFile": "assets/Characters/Alex.png",

lucid iron
#

is it actually all Load to the vanilla Target and not using 1.6 appearance system (which just let mod load portraits to multiple targets and use GSQ to control them)

orchid glade
#

oops that's the characters, but its the same for portraits

lucid iron
#

slightly cuter aesthetics is example of appearances mod, as well as the vanilla winter outfits

vernal crest
#

Unless they're knowledgeable about InternalAssetKey wouldn't they need to Load/EditImage the assets to be able to use Appearance anyway?

lucid iron
#

yea

orchid glade
#

i'll look at SCA see what that looks like in comparison

lucid iron
#

hence why i said vanilla targets

orchid glade
#

or isn't appearances set up in character data somewhere?

lucid iron
#

yep Data/Characters

#

u can check unpack to see

lucid iron
orchid glade
#

no changes target data/characters

lucid iron
#

but maybe suggest to author of one mod to use appearances lol

#

its more effecient

orchid glade
#

that would be an even bigger change than going to EditImage SDVpufferdizzy

vernal crest
# lucid iron hence why i said `vanilla targets`

I just assumed that mods that used Appearance were still loading their custom portraits to (e.g.,) Portraits/Alex for the base portrait rather than leaving them as vanilla, hence my confusion.

orchid glade
#

they are pretty busy i think so i don't know that i'll be pushing too hard

lucid iron
#

if you want to take advantage u would load to {{ModId}}/Alex_RelevantVariantName

vernal crest
#

I know it does

#

I meant I was confused about why using Appearance would circumvent modifying Portraits/Alex and it doesn't inherently do so, but it can.

#

And I assume you were suggesting doing so

lucid iron
#

prob could have emphasized >multiple targets

#

but basically if u were to mod SCA, and it does have multiple targets where portrait variants go

#

to match you just editimage those

#

won't need to know about SCA's config

vernal crest
#

I have not managed to grasp what the issue actually is for bezajel (too busy thinking about how to get fish IDs) so I have no actual thoughts on that anyway lol

orchid glade
#

yeah sasdly it doesn't use appearance

lucid iron
#

the issue is desire to add ohodavi style portraits that go with mystery nsfw mod Dokkan

orchid glade
#

it just plain loads new versions of vanilla portraits

vernal crest
#

I assume this is not just for personal use

lucid iron
#

and the mod analogous to SCA here just uses config tokens to conditionally Load over the vanilla target from the sounds of things

orchid glade
#

i'd like to make a mod for it

lucid iron
#

so theres no {{ModId}}/Alex_RelevantVariantName to target

orchid glade
#

as in i'd like to share a mod for it 🙂

lucid iron
#

hence need to do CMCT to obtain their config, and do EditImage that match the Loads

orchid glade
#

permission pending, just working out what's possible

#

thanks for the help! I may be back with questions about CMCT but i'll see how I go!

lucid iron
#

you can take a look at rasmodia for example of doing this stuff

#

not quite same problem, but it has to match the various wizard romancable mods

orchid glade
#

cool, i'll check those out

vernal crest
#

I don't know if it's possible to do that without C#

lucid iron
#

category_fish?

#

thats all bait maker checks for

vernal crest
#

It's for selling

#

So it looks like the item query needs to be repeated for every individual fish "Id": "FLAVORED_ITEM Bait (O)129|FLAVORED_ITEM Bait (O)131|FLAVORED_ITEM Bait (O)132|FLAVORED_ITEM Bait (O)136 (this is pulled from FishShop)

lucid iron
#

hm this is a limitation i believe

#

there is no item query that generates a list of FLAVORED_ITEM

#

need to write your own item query that does this

vernal crest
#

I was thinking if I could grab a list I could use a dynamic token to make it "Id": "FLAVORED_ITEM Bait {{FishID}}

#

I don't even know if it's possible to use dynamic tokens in item queries

lucid iron
#

well you could but it'd be fixed with dynamic token refresh

#

and also u cant generate list o fish according to mod list Dokkan

vernal crest
#

So I can't grab the info from data/objects after it's been populated? Is that specifically for dynamic tokens because they run earlier?

#

(How often do dynamic tokens refresh?)

lucid iron
#

well you cant put a item query inside dynamic token afaik, that thing only supports CP tokens right

#

unless someone's made glue for it i dunno

vernal crest
#

Yeah I thought it only supports CP tokens

#

But I didn't know if it's possible to get the info with CP tokens or not

lucid iron
#

not as far as ik

#

what kind of shop is it anyways

vernal crest
#

Fish shop

lucid iron
#

it prob make sense to have limited selection tbh kyuuchan_run

vernal crest
#

Actually I assumed it's Goat's vending machine

lucid iron
#

where the heck is willy getting planet fish bait from

vernal crest
#

Yeah he wanted to have a random choice of a few different flavoured baits every day

#

But with any fish as a possibility of flavouring the baits

lucid iron
#

i did think it would be very useful to have like, nested item query somehow

vernal crest
#

I was about to ask that lol

uncut viper
#

the content pack modders yearn for the foreach

vernal crest
#

Because then I could maybe combine FLAVORED_ITEM with ALL_ITEMS or something

#

Maybe I will just your harmony for CP Button (I joke, because I have no idea how to use harmony)

uncut viper
#

it wouldnt help here anyway !

vernal crest
#

I could just break the user's game so they wouldn't notice there was no flavoured bait

#

GSQs are all bools, right?

royal stump
#

yep, GSQs are all basically input values for bool CheckConditions

uncut viper
#

yes and no

vernal crest
#

And item queries return item IDs instead? (Button's reply was not to this message)

royal stump
#

yep, those narrow down a set of matching IDs

#

IEnumerable<ItemQueryResult> in code, though that's not as clear as bool SDVkrobusgiggle

vernal crest
#

Thanks ^_^

rancid musk
#

Well, it makes item instances not item IDs but there isn't a ton of difference

#

If it was just IDs it wouldn't be able to do flavored items, since those are special

royal stump
#

ah, fair, I'm not really familiar with how the item part works internally

rancid musk
#

I think technically it returns ISalable instances even, not Items or SObjects. Though I'm not sure any item queries would return non Items

uncut viper
#

SHOP_TOWN_KEY returns a non-Item

#

also MOVIE_CONCESSIONS_FOR_GUEST

royal stump
#

yeah, ItemQueryResult basically contains an ISalable and related data; ISalable implements IHaveItemTypeId, but ig that doesn't technically mean it's an Item

uncut viper
#

if there was a query for house renovations too that would also be a possibility, but there isnt one

#

but one could be made

royal stump
#

SDVpufferthink i guess that counts as an ID

public string TypeDefinitionId => "(Salable)";
public string QualifiedItemId => this.TypeDefinitionId + "PurchaseableKeyItem." + this.id;```
rancid musk
#

Right I forgot about those queries

uncut viper
#

the black sheeps of the query resolvers

lucid iron
#

i guess im writing this instead of sleep now

rancid musk
#

And mods can register their own query resolvers that return any ISalable instances they want

lucid iron
rancid musk
#

I Can't Believe It's Not Roe

uncut viper
#

broken xmldocs smh

rotund elm
lucid iron
#

Im gonna have to find someone to take custody of this probably

vernal crest
#

Give it to me and then I'll be one of those people who uploads a mod to Nexus that they don't understand enough to support SDVkrobusnaughty

#

Or give it to button and she can release BIQS

lucid iron
#

It seems kinda useful in general but I don't know anyone with an item query framework

#

I guess I could just make one

rotund elm
#

It is and I can use it for my fishing mod and for the furniture store one

#

You just saved me so much pain, I can never thank you enough XD

lucid iron
#

That's for chu in like 14hrs gn

uncut viper
#

im not sure what the value is for furniture? is there flavoured furniture?

brave fable
#

unmilled rice bed..

rotund elm
#

Oh is it just for flavored items thats fine because with permission I could make it work with some effort I believe, unless Chu did it himself

lucid iron
#

Technically you can next any 2 item query

uncut viper
#

its for nesting queries in general but

#

i dont know why you'd wanna nest any other two

lucid iron
#

There's just not much value beyond flavor item niche case

uncut viper
#

im not sure how it helps for furniture

rotund elm
#

Idk what nesting is tbh so I can't really answer that fully X|

uncut viper
#

i mean what do you have in mind for a f urniture shop that you cant do already

rotund elm
#

I need to pull a list of furniture based on type to have seperate areas in the store you go to for that type of furniture

lucid iron
uncut viper
#

nesting queries wont help with that

lucid iron
#

Nested item query does nothing for you here

rotund elm
#

Ohhhh i seeee

#

kinda

#

idk what nesting is but thats ok XD

lucid iron
#

Although actually i remember someone else wanted this

#

But it was also flavored items

uncut viper
#

do you know what a russian nesting doll is

rotund elm
#

Its gonna be so useful

#

yea

uncut viper
#

thats nesting. putting something inside a something

#

this is putting an item query inside of an item query

rotund elm
#

Thank you! Everything makes sense now XD

weak pulsar
versed wyvern
#

Would anyone happen to know where cooked dish sprites are located? yugu

vernal crest
#

Maps/springobjects

#

Where else lol

versed wyvern
#

Of course, how silly of me to look anywhere else, ty

fossil osprey
#

At least it's not in Cursors

rigid musk
#

If food was in cursors..

hard fern
#

found food in cursors

latent mauve
#

Those are the heart event meals, those don't count xD

versed wyvern
#

Close enough, the unholy prophecy has been fulfilled

versed wyvern
#

Would there happen to be any way to make an NPC not have collision with the player? Like say if they're supposed to be a ghost

brave fable
#

with C# sure, i don't believe so otherwise

iron ridge
iron ridge
#

oh the c++ tbin parser is mit anyway

#

i could've just ported it without worrying about gpl

#

oh well this was fun anyway

dry flicker
#

Ciao, i'm making an NPC mod and I would like to know how to modify the 'Concession' and 'MoviesReactions', by adding my NPC in them. Anyone got a tip?

brittle pasture
dry flicker
#

yes yes, i tried editing it by adding entries in the 'content' npc file, tho it gives me problems.

brittle pasture
#

!json feel free to post your code so we can look

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.

dry flicker
#

let me get it wait

#

I've added this in my content file

#

I didn't edit it yet, as it gives me problems to being with

brittle pasture
#

"Entries" has to be a dictionary that looks like

{
  "YourUniqueIdHere": {
  // one block
  }
}
#

just wrap what you have in another block with an ID

dry flicker
true coyote
#

uh

#

I think I broke my test save lmao

#

spring snow...

true coyote
#

oh there we go

tame orchid
brittle ledge
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:

dry flicker
iron ridge
vale stream
ocean sailBOT
#

Log Info: SMAPI 4.1.10 with SDV 1.6.15 build 24354 on Unix 5.15.0.130, with 11 C# mods and 1 content packs.
Suggested fixes: One or more mods are out of date, consider updating them

lucid iron
#

Are you reusing a label?

#

Oh is the goal to replace the opcode/operand without yeeting the labels?

vale stream
#

yeah, i copied the labels just in case (but there's none) SDVpufferthinkblob

i'm replacing tryToPurchaseItem by my own method, but apparently there's invalid code somewhere

calm nebula
#

What is the method you're replacing

lucid iron
#

can do matcher.Opcode = whatever and matcher.Operand = whatever

calm nebula
#

I think you forgot the implicit this

lucid iron
#

Assuming you are using code matcher

calm nebula
#

But I'm not at my computer and therefore can't check for sure

lucid iron
#

The labels stay if u do that

rancid musk
#

There's also extension methods for copying labels and blocks from another code instruction in Harmony

vale stream
#

I'm transpiling ShopMenu.receiveLeftClick, specifically replacing this: call instance bool StardewValley.Menus.ShopMenu::tryToPurchaseItem

calm nebula
#

Add ShopMenu instance as the first parameter to your replacement function?

vale stream
#

Let me try

#

It's not crashing anymore!

calm nebula
#

Yup. The labels weren't your problem

#

Instance methods always have an (implict) first param of this

#

Or is it self in c#

lucid iron
#

R u trying to do smth for mobile DokkanStare

vale stream
#

Ohh, I see. I'll keep it in mind for next time, thanks

vale stream
lucid iron
#

It is admirable but man I don't want to have to test on me phone

vale stream
#

so far, i need to fix this code (now that it works) and then find what this little window is in android

brittle pasture
#

how are you doing that btw, do you compare against the android code base you decompiled yourself

blissful panther
#

That's pretty much how I did it!

lucid iron
#

How do u decompile tho yggy

brittle pasture
#

(not that I'd do it SDVkrobusgiggle but good to know)

#

(though now that all 7 of EMC's recent comments are about Android I might have to care eventually)

#

(cant believe my mod is entering the big leagues)

vale stream
#

ooh which mod? 👀

brittle pasture
#

Extra Machine Config

blissful panther
#

Export the APK from the installed game, extract everything from that, extract the assemblies from the Xamarin blob using https://github.com/jakev/pyxamstore, and... decompile as per usual!

lucid iron
#

Soon you will be on TV right next to queen of sauce

vale stream
brittle pasture
#

thanks!
no one's using that feature yet, you could be the first

tame orchid
#

That's so specific

#

I'll be using that immediately

vale stream
#

hmm...i do have a WIP mod that could make use of it SDVpufferthinkblob

#

it's just GI extra locations redux lol, though i'm pretty proud of some features I added

#

(coming...someday, whenever i finish jackie's backstory)

rancid musk
brittle pasture
#

yeah thatd be very useful

blissful panther
#

Really, yeah, the most difficult part is getting pyxamstore to work.

calm nebula
#

You can ask him

blissful panther
#

...you know, I forgot that exists.

lucid iron
#

Is it also just lv50 mod author invite or separate ask Bolb

blissful panther
#

I imagine it would be the same level requirement, but you definitely don't get added to it automatically when you request the main one.

lucid iron
#

I will ask later then DokkanStare

blissful panther
#

No reason not to just ping and ask now!

lucid iron
#

But it is updated for 1.6.15

calm nebula
#

Probably not tbh

lucid iron
#

Yea but im at work so presumably pathos also at work

calm nebula
#

Also keep in mind mobile updates more

lucid iron
blissful panther
#

Hoo boy, it is not updated for anything past 1.5.

calm nebula
#

I'm very glad that when I was active atracore was dead in the water for mobile

#

Tbh I've also not seen Pathos around lately

lucid iron
#

Ah unfortunate, but it'd be good to have it exist

#

I'll probably try doing it on my own first

dry flicker
#

Ciao, anyone got a good tutorial on how to modify the spouse room and outside area?

lucid iron
#

I understand why menu code is probably very different

#

But why is sound cue exists gone on phone

#

Also wonder if these types of differences could be handled by rewriters instead of each individual mod

calm nebula
#

Tbh when I found out about the sound code I was like "myuuu please bail me out hereeeee"

blissful panther
#

I wonder if anyone's ever toyed with the idea of integrating FMOD...

calm nebula
lucid iron
#

Oh interest

calm nebula
#

👏 thread 👏 safe 👏 audio 👏 engine 👏 when

lucid iron
#

Could i just like, copy the little bit of code that checks sound and have it work™️

blissful panther
#

Thread? Sounds like a job for the knitting expert. SDVkrobusgiggle

rancid musk
calm nebula
lucid iron
#

No i mean just replace with my own method

#

That does the same thing

calm nebula
#

Oh yeah that is what I'm gonna do

#

Just in IL emit to make it fast

lucid iron
#

The item grab menu feels very doomed though

calm nebula
#

Oh god a picross

#

Whyyyy

dry flicker
#

SDVcharkrobus Anyone here knows how to make an NPC custom spouse room and outside area? i'm new to map edit

stable grotto
lucid iron
#

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

lucid iron
#

You basically need to have a tmx for SpouseRoom and SpouseaPatio

true coyote
#

thanks everyone who helped me get my mod out SDVpufferheart SDVpuffersob

shadow pagoda
#

sorry for the late reply, but what does the if statement looking for exactly? Is it saying that it can't find the Shops asset?

ivory plume
ivory plume
fathom hound
#

(Hi pathos aSDVpuffercaramelldansen )

ivory plume
# shadow pagoda sorry for the late reply, but what does the if statement looking for exactly? Is...

The AssetsInvalidated event is raised when any assets get invalidated, which can happen anytime with any asset. For example, if another mod does this:

this.Helper.Content.InvalidateCache("Data/Machines");

Then your OnAssetsInvalidated handler will be called with Data/Machines in that list. So the if checks whether Data/Shops is one of the assets that got invalidated.

That said, in most cases you should use AssetReady instead of AssetsInvalidated if you want to read the new data after it changes.

blissful panther
shadow pagoda
# ivory plume The `AssetsInvalidated` event is raised when _any_ assets get invalidated, which...

Just to make sure I understand (I was reading this https://stardewvalleywiki.com/Modding:Modder_Guide/APIs/Content#Cache_invalidation), invaldating an asset is used in modding in order to "change" and possibly inject a modified version of that asset into the game? But in my case, it can be used to change the items in a shop in the vanilla game. Then whenever an asset is invalidated, it will then be reloaded when it's requested through the AssetReady event?

brittle pasture
#

I assumed hawker wants to read it as soon as possible for the caching thing they are doing

shadow pagoda
#

yes, I am trying to cache as soon as it changes. But I don't want to load it too frequently

vale stream
#

"let's add android compatibility" i said, unaware of the horrors,
(aka this is how earlier's thing is going)

ivory plume
# shadow pagoda Just to make sure I understand (I was reading this https://stardewvalleywiki.com...

The general process is:

  1. The game code requests an asset. For example, it requests Data/Shop when you open a shop to get its data.
  2. The content manager checks if it's in the cache. If not:
    1. SMAPI loads the asset from a mod, else it's loaded from the Content/<asset>.xnb file.
    2. SMAPI applies all edits to the asset.
    3. The final result is cached.
  3. The content manager returns the cached value.

If Data/Shops is requested a second time, it just returns the cached value directly without reloading it or reapplying edits. However, mods often want to make changes after the asset is first loaded; that's where SMAPI introduces two concepts:

  • Cache invalidation removes the asset from the cache, so step 2 will run again next time the asset is requested.
  • Asset propagation is an automatic process where SMAPI will immediately reload the asset and update all references to it (for supported assets only).

So in many cases, you can just listen to AssetReady (since it'll be reloaded immediately). That said, Data/Shops is only requested on demand when you access a shop, so you'd need to use AssetsInvalidated and a one-tick delay to properly read the updated data.

tawny ore
rough lintel
#

OH matthmaticus while you are in chat: for my postfix, i can just do a switch case that is like if (seed context tag quality_silver) then clamp the min/max at whatever values, right?

#

or do i have to somehow store a variable about the quality of the planted seed

tawny ore
rough lintel
#

i was dreaming about this last night i need to write code while im in a fugue state

#

ah okay!

#

so i will create a lil tag for it of some kind ^_^ somewhere

#

when you say “in mod data” is that a field in seed data or you just mean i have to add my own var in my project that checks and stores this

tawny ore
#

@shadow pagoda
This is your cached copy of ShopData:

private Dictionary<string, ShopData>? data = null;

This is how you access the cached data. It automatically reloads the data whenever your cached copy is null:

public Dictionary<string, ShopData> Data => data ??= DataLoader.Shops(Game1.content);

This is how you "forget" the cached data whenever it changes due to invalidation:

public override void Entry(IModHelper helper)
{
   helper.Events.Content.AssetsInvalidated += this.OnAssetsInvalidated;
}

private void OnAssetsInvalidated(object? sender, AssetsInvalidatedEventArgs e)
{
    if (e.NamesWithoutLocale.Any(static assetName => assetName.IsEquivalentTo("Data/Shops")))
    {
        this.data = null;
    }
}
tawny ore
rough lintel
#

oh yes! ok!

tame orchid
#

I have a question about mod compatibility using CP: If you're making a mod that replaces an NPC and you want to make sure that the events added by another mod for the original NPC don't get triggered, do you just make sure the other mod is listed as a dependency in the manifest and write the new events using the same event ID so it overwrites? (That doesn't feel right)

lucid iron
#

Can you just make your own npc?

#

It'll be easier

rancid musk
#

Unfortunately, as it's a paid app, it's not archived on apkmirror or sites like that and I don't really want to pirate it and assume the pirated copies are untampered.

tame orchid
latent mauve
#

Honestly, if you are replacing a vanilla character, all compat for other mods with expansions for that vanilla character go out the window anyway

#

(I say as someone who is replacing all the vanilla characters with Legend of Zelda characters)

tame orchid
#

(Oh that's cool lol, also a daunting task!)

#

I was hoping to make it play nice with Expanded and not worry about any others for now

lucid iron
#

Yeah i think if i was making say

tawny ore
#

Yeah, it's probably considered poor taste to do things that affect other mods depending on the changes. You can just be incompatible with that mod. Creating any unexpected behaviors could lead to bug reports going to them that really shoudn't be.

lucid iron
#

Mod that replace Sam with Goku

#

I would expect people who care about immersive to not install further Sam mods

brittle pasture
#

I assume the schedule's unchanged
economy so bad goku's working at jojamart

ivory plume
latent mauve
#

Replacing a vanilla character involves a lot of things to provide immersion, up to and including changes to every dialogue or event from OTHER characters that refer to them by name or relationship. It's simply not reasonable to try for compatibility with other mods unless you are limiting it severely.

lucid iron
ivory plume
#

Same as requesting access to the PC repo, just need to ask here!

rancid musk
#

(And be level 50 and a mod author.)

brittle pasture
#

and I want to echo matt's post that changing another person's mod, especially one that touches on events and dialogues, is very frowned upon

calm nebula
#

(Hi Pathos! Long time no see)

#

Tbh I also don't backread so

ivory plume
#

(Hi! I'm always here, just sitting in the shadows until I'm summoned.)

tawny ore
#

I heard if you say his name three times he appears

lucid iron
#

Pls gib access to Android sauce, github: mushymato

#

Also Khloe last time for 1.6.9 your fork didn't inherit the parent repo's ACL

#

If you are do PR it'd be good to remake fork first, or somehow sync that bolbthinking

ivory plume
rough lintel
#

wait, if you’re always here in the shadows, who is your employer……. mr. qi?!

tame orchid
rancid musk
#

I've never actually forked the android repo yet. Though, me updating that is kind of a weird thought since, again, I don't have access to old versions of the game for android.

brittle pasture
#

(me as well
github: zombifier
thanks a lot!)

calm nebula
#

Just do latest

tawny ore
#

Yeah, android repo is most beneficial to modding, and up until the latest version Android Modding hasn't really been a thing

ivory plume
#

Yeah, latest is fine. The full history is in the PC repo; the Android repo is mainly just to see what's different for compatibility fixes.

ivory plume
rancid musk
#

Ah. Well if we don't care about history then I guess it's time to poke this

teal bridge
#

Please ban me permanently from the Android repo so that if anyone asks for Android support I can say my hands are tied.

rough lintel
#

🤣🤣

rancid musk
#

Gonna just commit all my android updates using focus's email address

teal bridge
#

That's OK, I never check my email.

tawny ore
#

I'm going to exclusively become an Android modder so that I never get those questions, but instead people will ask me to support PC