#making-mods-general

1 messages · Page 386 of 1

stuck thunder
#

Wait
Am I dumb

latent mauve
#

Cursors.png is located in LooseSprites

stuck thunder
#

I am dumb

#

I just found it

round timber
#

not dumb, just learning!

stuck thunder
#

Thanks :3

tender bloom
#

we all learn the depths of cursors one way or another

ornate locust
#

Hey so does anyone know why a move (not an advanced move, a normal move) would fire twice in a row even though it's just once in an event?

#

It worked fine on a previous test, but the farmer walked twice as far as they should, which I seem to have fixed. I THOUGHT I just set the farmer to walk too far, so I lowered the number, but now I am worried it was doing the same thing

#

The farmer didn't face a different direction at the end, so it really could have just been running the farmer's movement twice

#

and I can't even hypothetically understand why

latent mauve
#

If you add a /faceDirection after the move to force a longer look left, does the movement duplication stop?

ornate locust
#

I can sure try it

#

Nope

#

He does a split second look left down by Shane and then continues on into the building and finally stops looking left

#

The farmer walking on the X axis worked fine too, it's the Y that seemed to mess up

#

Oh hey Shane also doubles his movement on the X axis in my other event, kill me

#

but not the Y axis!

#

WHY.

#

makes a bunch of random changes to where pauses happen well, KICKING IT REPEATEDLY hasn't fixed it

hard fern
#

SDVpuffersweats events cursed again

ornate locust
#

If I can't get "take one step" to work, how am I getting anything else to work

latent mauve
#

I wonder if you can replicate the behavior on a vanilla map, or if you are somehow getting collision-based weirdness

ornate locust
#

Yeah, the main town map

#

it is the vanilla town map

#

I put a new building in it, but it's... it's just the town

latent mauve
#

But not a vanilla building, you patched it

#

So it could still be collision from your patch maybe

ornate locust
#

What am I colliding with though? I'm just walking in a space that is also open ground in the vanilla map

latent mauve
#

No chance of any invis tiles on a building layer where they are walking?

ornate locust
#

That's something I can check at least

#

But it's been working for a while now and I ran over every inch of it to make sure I could walk over the path and such

latent mauve
#

If that's not it then I unfortunately have no other ideas

ornate locust
#

There's a chance the X axis one is too close to the building, but the other one sure isn't

latent mauve
#

I just remember that move commands behave VERY weirdly if you accidentally path a NPC into a wall with the move command

ornate locust
#

Yeah nah, it's all clear

#

Loaded in and walked all over the area

latent mauve
#

Hmm

#

And you said you had already tried lowering the number of steps

urban patrol
#

i’ve had NPCs walk farther than intended when only moving them one tile

ornate locust
#

I did. But since it's doubling the movement, I get this weird turn in the middle even if I just halve d it

#

The problem is, it's doing it on a one tile move AND a like... five tile move

urban patrol
#

cursèd indeed hmmm

ornate locust
#

god I've got five heart events to go after that, why is event making soul-crushing

latent mauve
#

Does it happen with advancedMove?

urban patrol
#

have you tried adding a pause after the move

ornate locust
#

There is a pause after the move

#

And I don't know, because I haven't used advanced moves before, but I guess making ALL OF THE MOVEMENT advanced moves is gonna be next on my list after looking at the code doesn't make me want to die

latent mauve
#

I saw a speak immediately after the move, not a pause, unless I read the wrong event

ornate locust
#

Well I've edited it like five times since then trying to figure out anything to help, sorry

#

But putting a pause there was one of the attempts

latent mauve
#

Haha, no worries

ornate locust
#

and it didn't work

#

Was just throwing anything I could htink of at the wall and seeing if it stuck

ornate locust
#

If anyone figures out what's broken in my stuff, ping me. I'll get to it tomorrow.

dusty scarab
#

Hey, is there any simple way I can retrieve a player's vanilla save data specifically hair color if possible in a relatively simple way? I've looked through both Content and Data and I can't seem to find a way to access the save file using a c# mod

lucid mulch
#

Game1.player.hairstyleColor.Value

dusty scarab
#

also thanks you!

brave fable
#

have you decompiled the game code? you'll find all player properties in the Farmer class

subtle galleon
#

Hi everyone ! I joined a group of french translators yesterday and we thought that a glossary of translation (for items/locations…) would be cool to have.

Do you know if something like this exist ?

I know that there’s the official and mods wiki for quick reference but having a unifying tool would be better, I think.

#

Something like this.

gentle rose
#

the wikis reference the official files for everything anyway

#

the one possible drawback is that mods and vanilla are in separate files but that's also kind of a good thing since different translators work on different mods and there may be multiple things with similar names in different mods that have been translated differently

lucid mulch
# dusty scarab guess I'm blind, is there any list or a wiki that has all of these values?

trying to list everything would be to pretty much be the codebase anyway, but as blueberry said, having a decompiled codebase or using ILSpy and exploring is everything you would need.

In terms of "players vanilla save data", everything in the SaveGameInfo file will be on the farmer instance (Game1.player) and when viewing the property list, the xml attributes on the properties will say how it maps back to the xml file, though its pretty much 1:1 mapped with same names for most cases anyway

dusky sail
#

A centralized translation spreadsheet sounds cool in theory, but it'd be incredibly hard to keep it up to date and including everything. I don't think one exists right now

#

When ive done translation work i just keep any relevant i18ns open on the side to reference

hard fern
#

Mmm yeah it would be hard 🤔

nova ember
#

can u get money by making stardew mods?? like on mexus mods do they get money from it??

gentle rose
#

barely any

#

even for the big modders

nova ember
gentle rose
#

nobody is making a living off of it

lucid mulch
#

with the possible exception of flashshifter

#

but in general, its a hobby not a job

#

and trying to turn a hobby into a job is dangerous

gentle rose
#

who is literally like, top two most popular mod authors in sdv

lucid mulch
#

Pathos also does to an extent, but Pathos also has some of the largest costs in the space and not 100% if he even breaks even

subtle galleon
# gentle rose the one possible drawback is that mods and vanilla are in separate files but tha...

That’s the drawback for us. We try as a group to unify the translation. To give an exemple, I make the french translation for More Warp, which in its recent update, include Sunberry’s Warp. I don’t play this mod so I don’t know what are the locations mentionned. But Mazoout translated Sunberry so using the same references would be more accurate. Otherwise, maybe I will translate something different. (maybe she will call an inn "Inn A" and i will call the same location "Hotel A").

And we don’t want to open each mod and each file to verify what’s the name for THIS object or THIS location. Having a glossary would be much easier for us.

gentle rose
uncut viper
#

I mean that sounds like somethin that'd be useful within your translator group then but probably not applicable to the wider Stardew modding discord

vital lotus
#

with CP, is there way to track if player owned certain items? want to send letter after some items r owned (like deluxe scarecrow from the scarecrow society)

dusky sail
#

You can still make the glossary, no one can stop you from doing that, we're just saying why it doesn't already exist

subtle galleon
#

Ok, I thought that asking would be better anyway. I see your points but I’ll try to make this glossary, at least for our group.

And maybe, in a second time, if it is working and some translators in other language are interested of it, will propose it.

gentle rose
#

I wonder how the deluxe scarecrow one is done

uncut viper
#

you've got repo access don't you. why wonder when you can receive knowledge

subtle galleon
#

Thank you for your answers ;).

gentle rose
lucid mulch
#

ilspy is my best friend

uncut viper
#

don't look at me I'm on mobile

gentle rose
#

I don't think it's android compatible unfortunately

lucid iron
#

Amen

lucid mulch
#

Farmer.dayUpdate()


    if (Game1.random.NextDouble() < 0.905 && !this.hasOrWillReceiveMail("RarecrowSociety") && Utility.doesItemExistAnywhere("(BC)136") && Utility.doesItemExistAnywhere("(BC)137") && Utility.doesItemExistAnywhere("(BC)138") && Utility.doesItemExistAnywhere("(BC)139") && Utility.doesItemExistAnywhere("(BC)140") && Utility.doesItemExistAnywhere("(BC)126") && Utility.doesItemExistAnywhere("(BC)110") && Utility.doesItemExistAnywhere("(BC)113"))
    {
        this.mailbox.Add("RarecrowSociety");
    }
uncut viper
#

anyway it just checks the whole world for- yeah

#

i just got back to my desk to check too

#

up until now i didnt know it wasnt a 100% chance

#

what an awfully inefficient check lol

#

why iterate over every item in the world once when we can do it 8 separate times for no reason

lucid mulch
#

predates having good code primitives to check multiple things in the one trip

#

the fact the "is scarecow" logic is still "does the items name contain arecrow", but also has a optional context tag mode that isn't used for vanilla afaik

uncut viper
#

simlar for the function that gets the scarecrow radius, as i recall

#

but with deluxe instead of arecrow

vital lotus
lucid mulch
#

a trigger action might be able to emulate it

vital lotus
#

i suppose i could create flag when the item purchased?

uncut viper
#

well you asked a general case but gave scarecrow as an exmaple, was that the only one you actually cared about?

#

you dont purchase the deluxe rarecrow

lucid mulch
#

dont purchase all the individual rarecrows either as a few are museum rewards

uncut viper
#

the museum rewards at least come with flags

#

however without something like BETAS you cant know if the player actually placed them

vital lotus
#

not scarecrow in particular, just wanna check general items

#

to have it as condition

unreal spoke
#

A trigger action with a PLAYER_HAS_ITEM trigger wouldn’t suffice, I assume?

uncut viper
#

then no there is no general way with CP alone

uncut viper
blissful panther
#
if (Game1.random.NextDouble() < 0.905 && !this.hasOrWillReceiveMail("RarecrowSociety") && Utility.doesItemExistAnywhere("(BC)136") && Utility.doesItemExistAnywhere("(BC)137") && Utility.doesItemExistAnywhere("(BC)138") && Utility.doesItemExistAnywhere("(BC)139") && Utility.doesItemExistAnywhere("(BC)140") && Utility.doesItemExistAnywhere("(BC)126") && Utility.doesItemExistAnywhere("(BC)110") && Utility.doesItemExistAnywhere("(BC)113"))
{
    this.mailbox.Add("RarecrowSociety");
}

Well that's a fun way to add it. SDVkrobusgiggle

uncut viper
#

if i buy a rarecrow, then immediately put it into my junimo chest, you wont detect that

blissful panther
#

Then you've discovered a game bug!

uncut viper
#

what

blissful panther
#

This is from the decompile.

uncut viper
#

im talkin to doragoun

blissful panther
#

Oh.

#

I am smrt.

unreal spoke
#

Ah, I missed the initial context. Yeah, sorry.

uncut viper
#

the game checks if you've placed them

#

but its not limited to trigger actions

unreal spoke
#

To be fair, I did say it would most likely not suffice. SDVpuffersquee

uncut viper
#

it was a good assumption!

unreal spoke
#

I guess if you wanted to get complicated (and the items you need have to be bought from shops), you could set mail flags upon purchase and then run a trigger action once you’ve got all necessary mail flags, but…

vital lotus
#

As items in context here is all custom items added by mod I think i can get away with flag because everything obtained through shop

uncut viper
#

assuming no other mod gives you access to rarecrows

#

then yes you can detect when they have purchased an item

#

if you control all the levers then its simple

unreal spoke
#

Understandable. SDVpuffersquee

uncut viper
#

thats basically most of the use case for ActionsOnPurchase

#

remember to only send and check mail on the host

vital lotus
#

is mailflag shared by all players?

uncut viper
#

if i buy one scarecrow and my partner buys a different scarecrow then neither of us will end up with all the flags

#

they are absoutely not

#

thatd be disastrous

#

but you can just AddMail to the host

vital lotus
#

oh

uncut viper
#

and always check the host with either the GSQs or the CP token

vital lotus
#

noice

uncut viper
#

then it doesnt matter

brave fable
bleak spade
#

Sorry i've just had time to see this:
So I make a new EditMap command targeting the vanilla map?

dusty scarab
balmy venture
#

excuse me ms @brave fable may I pm you about one of your mods?

bleak spade
#

I tried to add a mapproperties edit to the vanilla map behind my mod in hopes it'll stop the vanilla lights from coming through in areas that no longer have lampposts, but it's done nothing

#

I also keep getting this error whenever I load the Town map

brave fable
balmy venture
#

Ok! So I posted some time ago about compatibility with Love of Cooking and Ultra Organized chests. My husband said he might able to help with that if you allow him. Then if it's okay we can send to you. I'm sorry if it's not allowed

brave fable
#

ooh, code submissions are always welcome, especially for compatibility

balmy venture
#

oooh thank you so much!

#

I will send to you in a bit

brave fable
#

keep me posted if you need any info about the codebase, it's pretty messy hahah

balmy venture
#

he actually already did it (shy)

#

I will send it open so you can check it

#

he's not a C# coder but it seems it worked from what I could tell

#

He said your code is amazing lol

brave fable
#

that's a relief, it's agonising imagining people trying to understand it all hahah

royal stump
balmy venture
#

C# is very very unknown to him

#

but he understood enough for the compat

#

mr @tawny ore comment back then helped him a lot as well!

brave fable
#

ah, an actual professional programmer lol

balmy venture
#

if you guys are not professional I don't know who is

#

everyone's codes here are amazing

#

he will send it open to me as soon as he finishes his work meeting, I only got the closed code in my computer

#

Thank you so much!

brave fable
#

it's a day job SDVpufferthumbsup and a night job, a hobby, a pastime, ..

lucid iron
#

Blueberry is amateur coder like how olympic figure skaters are amateur

balmy venture
#

XDD

brave fable
#

no worries! i'll let you know if it needs any cleanup before it's merged

balmy venture
#

I'm always impressed at what you guys do cause I never worked with code before

#

but maybe I will one day slowly learn, It's very foreign to me so far

brave fable
#

the trick is to move to australia. once you're that foreign the code's almost legible

bleak spade
balmy venture
#

I'm brazilian so when I read code I need to process 2 languages

#

then I read tutorials and I need to process what tutorials are saying haha

royal stump
bleak spade
#

Thanks! I'll try that!

brave fable
cold marsh
#

Is there no way to override rainy weather triggering NightTiles from day start? I made cool daytime rain windows and realized way too'd late they'd go unused

lucid mulch
calm nebula
#

Understand bluebs code or

#

Understand your code

cold marsh
lucid mulch
#

tbh they don't fully understand their own code either

#

feel like at times I'm the only one that knows how debug an application

brave fable
#

it's wonderful to imagine your coworkers huddled around a monitor trying to debug my cooking

#

struggling, presumably

balmy venture
#

But it's such a cute mod, if I didn't know I'd think it's base game

calm nebula
#

No it needs more salt

balmy venture
#

I've been trying to read several mods and base game mods to slowly learn

calm nebula
#

I can read your code perfectly fine bluebs and I'm very dumb so

brave fable
#

hahah that's high praise both of you

balmy venture
#

I wouldn't do cooking in game without it

#

Of course ultra organized chests also blew my mind when I saw it

#

my OCD for organization is very happy now I can use both together

brave fable
#

always happy to hear people like my creations :') still charging up the strength to update them

balmy venture
#

You have so many I can only imagine

hard fern
#

speaking of cooking, imagine a cooking mama style minigame everytime you wanted to cook in-game

balmy venture
#

I can't code so I've been working on spritesheet compats for recolors to help a bit

brave fable
#

i like eating irl

calm nebula
#

What is your favorite?

brave fable
#

eating

blissful panther
#

I now realise I've never looked at your code...

#

To b-b-blueberry! SDVkrobusgiggle

calm nebula
#

Blues has pretty menus

balmy venture
#

ya, the animations are also amazing

hard fern
#

do i dare touch the (island) farmhouse

lucid iron
#

What are you touching

brave fable
#

but it was also cobbled together in about a week so also very much crusty

gentle rose
#

I like to pretend I live in a world where nobody else will ever read or run my code

other people who run my code may not be fans of this approach though

blissful panther
#

Honestly, even the UI code in Love of Cooking isn't bad to read at all, and that's a feat.

lucid iron
#

I assume people will read and understand my code perfectly and therefor don't need no comments

gentle rose
#

a feat? that's a miracle

#

I think blueberry might be magic

brave fable
#

the git page is extremely wobbly after years of mixing tabs and spaces

gentle rose
#

never mind you're mortal after all

blissful panther
#

I just looked at Smart Building's UI code in the longest time, and I... emergency readability update time. SDVpufferfear

#

The biggest problem is WHY DO I HAVE SO MANY THINGS COMMENTED OUT INSTEAD OF JUST DELETED?

brave fable
#

probably the biggest improvement in the history of loc was moving all of the page and inventory logic out of the main menu class. jesus that was a long file

brave fable
blissful panther
calm nebula
#

Can't stand it

#

That might be an actual brain issue with me

gentle rose
#

fixed that to spaces, right?

calm nebula
#

I also re-indent my coworker's code

lucid iron
#

Yesterday i yeeted a extra layer of PerScreen<ConditionalWeakTable<Thing, Dictionary<...>>> and my draw improved 1ms

#

Why did i do that...

iron ridge
calm nebula
blissful panther
gentle rose
#

I do that regularly but delete them before committing so I can pretend I don't

blissful panther
#

Well yeah, that I do still, but they don't survive to commits anymore.

#

Multiple working drafts of a change and all.

calm nebula
#

I still do that regularly because svn sucks

brave fable
lucid iron
#

Reinventing html/css

calm nebula
#

I think my favorite mod code was the era where everything i did was IDisposable

#

You'll see.

#

There was a lot of IDisposablr

brave fable
#

my home is a workshop for new, incredible wheels i've invented. some of them even turn

gentle rose
#

my workflow for this tiled extension is awful and I won't even try to pretend it isn't. I've yet to set up a git repo and am doing the file_old file_old(1) file_new file_final form of version control

lucid iron
#

Atra's renewable recycling phase

calm nebula
#

Over shit the GC wouldn't have saved me from b/c of events being hard references

lucid iron
#

Actually i do wonder about the threshold where instead of record i should actually make a proper pool n all

calm nebula
#

internal abstract class AbstractScreenshotter : IDisposable

brave fable
#

at this point it's only a blueberry mod if it's got a new Pool implementation

#

maybe a couple just to be safe

calm nebula
#

internal abstract class AbstractFriendshipMonitor : IDisposable

#

Why have a custom pool?

brave fable
#

boat cutscene has one, desert bus has one, like two other things

#

passing decor, mostly

lucid iron
calm nebula
#

Pool for what?

brave fable
calm nebula
#

I'm so confused

balmy venture
brave fable
balmy venture
#

that hud is so cute haha

brave fable
#

thanks so much for the submission!

balmy venture
#

No thank you!

brave fable
#

what is a pool if not a list with extra steps
😌

dusky sail
#

....a man-made body of water?

#

im confused. maybe i should go to bed instead of trying to keep up with programmers at a higher level than me

lucid iron
#

Dw atra is just bullying blueb again/lh

royal stump
# cold marsh Is there no way to override rainy weather triggering NightTiles from day start? ...

It may be a bit complicated, but you could probably use CP's EditMap -> MapProperties to add those windows to NightTiles on days with rain or storm weather:
https://github.com/Pathoschild/StardewMods/blob/develop/ContentPatcher/docs/author-guide/action-editmap.md#edit-map-properties
But directly speaking, no, there doesn't seem to be any control over how NightTiles works. And no, they should actually care about time on snow days.

lucid iron
#

maybe u can use dynamic map tiles for this yggy

#

it's got a whole thing right

royal stump
#

idk about that personally, but maybe SDViconghost

#

seems like it could but would be similar to just patching the property* (at a glance)

calm nebula
#

Dont worry chue can bully me too

#

All my mods share the same stringbuilder instance

dusty scarab
#

Is there any way to replace an asset during runtime other than editing the data and invalidating the cache?

calm nebula
#

No safe way but this sounds like an xy problem

dusty scarab
calm nebula
#

Absolutely use the asset edit system

dusty scarab
#

yeah, but it needs to happen during runtime in case the player starts a new save or changes hair color

lucid iron
#

That's fine

#

Assets get invalidated and reedited often in a modded game

#

Are you in C#

dusty scarab
#

yes

brave fable
#

editing the data is how you replace the asset, invalidating the cache is how you do it during runtime SDVpufferthumbsup you're doing fine

calm nebula
#

Yeah, the system is kinda complex and very easy to screw up if you try to yolo it

lucid iron
#

You good then just do the editimage by hand AquaThumbsup

#

In AssetRequested ofc

calm nebula
#

(Yolo - directly editing the image asset outside of AssetRequested)

dusty scarab
lucid iron
#

If u need like prismatic eyes or smth then maybe consider patching npc draw

dusty scarab
#

I really want to thank y'all I'm new to modding as a whole and everyone here are just so awesome!

#

❤️

lucid iron
#

yea patching in C# context usually means harmony here

dusty scarab
brave fable
#

(again, that's an if based on whether you need something continuously changing, rather than just refreshing once in a while)

lucid iron
#

yea prismatic meaning the cycling rainbow gamer rgb color

dusty scarab
lucid iron
#

if u just need it to be blue just like farmer then u dont need it

hard fern
cold marsh
#

"but you could probably use CP's EditMap -> MapProperties to add those windows to NightTiles on days with rain or storm weather"

#

This would require OnTimeChanged, right?

lucid iron
#

no you add the NightTiles for the day, and then let normal night tiles logic happen

cold marsh
#

Ah, I see. Thank you

#

Glad to know I can get rid of the EditMap patches

#

This will preserve animations as long as the weather-conditional tiles I'm targeting in my CP patch are the ones I have animated in Tiled, right?

royal stump
#

I'm not sure how NightTiles (or most things) interact with tile animations, personally SDVpufferthinkblob

brave fable
#

all that NightTiles seems to do is change the tile index. i wouldn't assume it would change a StaticTile to an AnimatedTile

grizzled rain
#

is it possible to do an android patch for a custom NPC mod to make it work on android?

lucid iron
#

depends on what's not working

grizzled rain
#

I think its the files? the comment i got on my mod said that they were having trouble with the files

#

maybe installing mods is different on android? idk

lucid iron
#

it's not different and tbh this sounds like user error

#

just direct them to the android smapi discord AquaThumbsup

#

!androidsmapi

ocean sailBOT
#
Android SMAPI

We are not able to provide support if you run into trouble or compatibility issues with Android SMAPI; please use the discord linked on the Android SMAPI github.

IMPORTANT: This is a highly experimental build and may be prone to glitches, bugs, or incompatibilities. Please see the wiki instructions for more information regarding installing the unofficial Android port of SMAPI for Stardew Valley 1.6.

Do not harass mod authors to make Android specific compatibility patches.

lucid iron
#

something that might have happened is the file names, android is unix which cares about casing in paths

obtuse wigeon
#

Unix caring about casing has both been my bane and my boon, great for somethings, terrible when transfering to windows

mortal goblet
#

Hi everyone, I need to know which json has the Grandpa event at third year

torpid sparrow
#

errr check Farm

bleak spade
#

Hooray I've managed to remove the vanilla light mapproperties!

torpid sparrow
#

if not farm maybe farmhouse i cant really remember if it plays when you wake up or step out

bleak spade
#

Now I've got a new problem: I've tried to do a EditMap command to put in new lights and day/nighttiles into my custom map but it's not working

round dock
#

it’s in Data/Events/FarmHouse

torpid sparrow
#

rats almost got it

hallow prism
#

if it helps, wem, i believe the game adds the event to every existing locations

#

(probably using farmhouse as the source of it, still)

bleak spade
#

How do I impliment DayTiles, NightTiles and Light properties for a custom map using Content Patcher (EditMap)?

lucid iron
#

you need to target Maps/Town

bleak spade
#

Oh, I thought I could apply it to the custom map I had

#

Also I have an action telling it to Null all light map properties in the vanilla Maps/Town so it's discounting the new properties, so it cancels it out

lucid iron
#

you can just do overwrite with new props in one step

#

remember that when you edit something its changes being applied to asset directly

red egret
#

@latent mauve my mod has the context tags now so you can use them. When i used 'true' for the thing before it, the portraits were gone from the catalogue so i left it empty as you said.

bleak spade
lucid iron
#

no it's no different than you putting in null

#

simply put in your new values

#

now for greater compat, you can consider doing 2 edits with different priorities

#

one is a Low prio edit that takes out the vanilla map prop

#

and then a High prio edit that appends your new values

bleak spade
#

Finally! Thank you so much that works perfectly

violet valley
#

hi guys! if am making an event where an NPC comes to the players doorstep, what do I put the camera tile thing to? 0, 0?

karmic gust
#

Yeah that should work. When I was making one I think every coordinate I set started at the front steps anyway

violet valley
#

Ok. ThanksSDVpufferthumbsup

#

One more thing. What do I put the farmer and NPCs starting tile to?

gaunt orbit
#

The farm cave and adoption events are probably in the game files, you could just unpack them and see what they're doing

violet valley
#

Ok

#

Thanks for the help; Ive never made events before

gaunt orbit
#

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

brittle ledge
grizzled rain
bleak spade
#

Does anyone know what this error means? I put it through the json parser and they said there were no issues

grizzled rain
brittle ledge
grizzled rain
round timber
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.

grizzled rain
obtuse wigeon
# bleak spade

Something is wrong with the content.json, seems it can't convert the "Target": "Maps/Forest" to the format it wants, is this your mod? if so paste the link to the smapi json parser, it may be just a formatting issue

round timber
#

json parser fyi mostly just checks to see if its a valid json, it cant see whether youre using the right format for the right thing (i dont have the techincal words to explain, but basically it can give no errors even if there are in fact things wrong with the json)

obtuse wigeon
#

adding the content patcher schema to your editor if it supports schemas (VSCode does for sure) can help find issues too

latent mauve
#

If you have somehow left out the quotes around the Target, that would cause that error, but I would expect the validator to catch that if you have the schema selected

gentle rose
round timber
#

ye thats why i said mostly blobnod

blissful panther
#

It can give you a definite no, but not a definite yes.

gentle rose
#

are there any formats it doesn't support at all yet? maybe I'll write some schemas. I'm in a schema kind of mood

latent mauve
#

That reminds me, do we have a handy link to the event code validator somewhere? I feel like I remember something existing.

obtuse wigeon
#

The only ones it supports rn is Content Patcher, I18n, and Manifest (That I can find)

round timber
#

theres an event code validator?

lucid iron
latent mauve
#

I think there was a plug-in or a script or something but I may be misremembering

lucid iron
#

E.g. fit the format of Data/Characters under cp Entries

gentle rose
#

so like specifically if it's patching Data/Characters?

lucid iron
#

Yea but that's just example

gentle rose
#

yeah that's possible, there's already a basic version of that going on for warps

obtuse wigeon
#

I'd love one specifically for furniture, I mess that up so much because its a slash delim string

gentle rose
#

that's the whole reason I messed with the schemas in the first place SDVpuffersquee

lucid iron
#

I would like to be able to extend the cp schema to cover my silly custom assets in general

#

But we should begin with the vanilla assets

gentle rose
#

but the problem is that once there's a token in a field that supports tokens, you can't validate any further because it could contain anything

tiny zealot
obtuse wigeon
lucid iron
#

I forgor if it validated fields actually didn't check yet

gentle rose
lucid iron
#

But yeah it's okay if u dont statically check all the way down the values

gentle rose
#

the entire reason I was messing with them before was to make it so if you put a token in a warps patch it disables the warps format checking

lucid iron
#

Just telling ppl that hey this field doesn't exist is pretty good

gentle rose
#

oh that's definitely doable

lucid iron
#

But while I can badger u into things do u know what broke FromFile

gentle rose
#

but since I don't do much content patcher I would need to be told what to add SDVpuffersquee

gentle rose
#

hmm. vscode doesn't give the correct errors, try putting it in the online validator

lucid iron
#

Appeared on 7/28

#

It's valid online afaik

#

But u can check, this thing happens on any Load with a FromFile

blissful panther
#

Huh, weird.

#

VSCode complains, but Rider doesn't.

gentle rose
#

that's around the time my update was pushed but I didn't touch anything close to FromFile...

lucid iron
#

I blame you anyways ukimasu

gentle rose
#

hold on it wasn't even accepted SBVLmaoDog github was misleading me

lucid iron
#

Must be brought to justice etc

gentle rose
#

definitely not me then SDVpuffersquee

#

(why did github even show me my fork's history when I'm looking at the original repo...)

obtuse wigeon
#

Which schema is this issue occuring for?

lucid iron
#

Content Patcher

obtuse wigeon
#

I'm not getting it at all weirdly, on VSCode too

lucid iron
#

You need to actually use $schema

round timber
#

ive been getting it on VSCode

obtuse wigeon
#

I am, "$schema": "https://smapi.io/schemas/content-patcher.json", unless this isn't the correct one

lucid iron
#

What if it's actually vsc nonsense

gentle rose
# lucid iron You need to actually use $schema

does it happen with this schema too, chu?

https://raw.githubusercontent.com/Pathoschild/SMAPI/26a66cc20abf81e57028b7390a20a1471f192fc4/src/SMAPI.Web/wwwroot/schemas/content-patcher.json

gentle rose
lucid iron
#

I shall try in like 10min

round timber
#

i still get it

obtuse wigeon
#

I'm thinking one of the many extensions I have installed stops it from happenening, the only schema issue I come across is the lack of a "Format" field in include files

#

No error here when using your schema iro, defo think I have an extension stopping it

gentle rose
#

it's caused by the part that prevents directory climbing

obtuse wigeon
#

I was on VSCode version 1.101.2, just updated to 1.102.3 and I'm getting the same issue now

blissful panther
#

Remember when I said it was fine in Rider? That was a lie!

violet valley
#

Is there a game state query to check if the player has visited a location? (i figured it outSDVpufferthumbsup )

calm nebula
#

Hi DH! Long time no see

blissful panther
#

Okay, never mind. I cleared the cache, and it still doesn't complain on this one.

blissful panther
gentle rose
#

figured it out, idk why it just started recently but there was a badly escaped backslash SDVpuffersquee

round timber
#

how dare...

violet valley
#

Nvm figured it out

ornate locust
#

AdvancedMove fixed my problem from last night btw

gentle rose
#

(I think I figured it out at least)

blissful panther
#

What I don't get though is why Rider is happy with it...

round timber
#

rider is no thoughts head empty

gentle rose
# blissful panther What I don't get though is why Rider is happy with it...

my guess is that the way that bacslash was handled used to be "not ideal but we know what you mean" and now vscode is checking it more strictly?

because the issue is with the part of the regex that's supposed to say

[/\\] (so character group of / or \ )
but the json also has it as [/\\], which means that the actual regex becomes [/\] after json escaping

#

but if that is the case, that's strange because it would mean being unable to escape the ] character so you could put it in a character group?

blissful panther
#

I remember when I was going to be making a schema for the JSON checker for VAF...

gentle rose
#

anyway my fix was just making it the correct [/\\\\]

calm nebula
#

Four of them lol

gentle rose
#

it should mean FromMapFile is also broken, and possibly a few others we haven't spotted yet (plus I found a mistake in Target)

#

idek what FromMapFile is tbh

#

oh it's CustomLocations

obtuse wigeon
#

I was going to say I don't see any mentions of it

#

That'll be why

gentle rose
#

@blissful panther can you check what happens in rider if you make a localtoken with ] in the name? I don't have it installed rn

#

(specifically a closing square bracket)

#

oh ig there's some kind of smart checking that prevents the regex parser from getting confused between [\]] and [\] because the online validator is fine with it, but vscode must have done something to break it SDVpufferthinkblob

blissful panther
#

Yup, it hates this at least.

gentle rose
blissful panther
#

Yup, also hates that!

#

Also hates just the opening.

gentle rose
#

cool, then it's just vscode being stupid (typical)

#

right, I'll fix that and the target and throw it in the same PR as the previous update SDVpuffersquee

bleak spade
#

Thank you to everyone who've helped me over the past few weeks fixing my custom map, I'm basically finished!

#

Only problem I have now is that I accidentally deleted the blacksmith garbage can tile detail thing and now I can't get it to work

#

I made a new object tile and put "Action: Garbage Blacksmith" in the custom properties but it doesn't do anything when I interact with it

gentle rose
#

can some of you try this schema in various editors and let me know if it works as expected?

https://github.com/irocendar/SMAPI/raw/refs/heads/cp-schema-fix/src/SMAPI.Web/wwwroot/schemas/content-patcher.json

obtuse wigeon
#

Sure

calm nebula
#

Why would you use [] in a local token name

#

Just plz

gentle rose
obtuse wigeon
#

VSCode 1.101.2 works with it as expected, no errors besides the ususal missing "Format" field in include files

gentle rose
#

didn't you update to 1.102.3?

obtuse wigeon
#

I did, but downgraded so I dont have to deal with yellow lines everywhere

gentle rose
#

I'll have to wait for someone to try it with a version that was broken in the first place then SDVpuffersquee ty though

blissful panther
#

Using the new schema in VSCode.

#

In 1.102.3?

gentle rose
blissful panther
#

Looks good!

gentle rose
#

excellent

I also fixed Target while I was at it (it had two problems, one was that it was assuming there was only one target, and the other that [cC][oO][nN][tT][eE][nN][tT] made me sad)

obtuse wigeon
#

Nice fix, means I can update VSCode now, woop!

uneven spindle
#

Hello! I'm new to modding and I was trying to bring the mod Seasonal Outfits - 6.0 Code Fixes to SVE. Is there any way to quickly test the beach sprites? I don't have a save with SVE and ginger island unlocked

obtuse wigeon
#

You can use CJB Cheats to cheat the prequisits for the island and the money required for the golden walnut parrot

#

Without a savefile with them I don't think theres a quicker way

uneven spindle
#

thanks! i'll give it a try

clear sedge
#

Can someone help me with translating an Enum value. For GMCM?

fair locust
#

chat i’m afraid

#

i wanna start making mods… but the cheeto curse scares me 😞

#

but i can’t turn back now either. it’s too late. the voices have gotten to me.

naive wyvern
#

what kind of mods are you planning to make?

fair locust
#

i have literally 8 ideas that i’ve written down in detail. they’re mostly ui utilities that will analyze data and present it to the user

obtuse wigeon
#

I am always up for more info on my screen, what kind of data will be analyzed?

gentle rose
fair locust
#

i’m still working on the specifics. but given that i have a background in mathematics, data seems like a perfect niche for me to work in

calm nebula
#

It's possible to escape the cheeto curse

fair locust
calm nebula
#

.q 6521

patent lanceBOT
#
#6521

So I guess my hot tip is to get married to someone who likes playing stardew

fair locust
#

oh. lmfao. yes.

naive wyvern
#

thats so real

calm nebula
#

(I managed to escape the cheeto curse but at what cost.)

patent lanceBOT
#

ehhhhhhhh ok (#6804644) (7h | <t:1754357492>)

proud wyvern
#

can't you edit it via the website?

#

if it's just docs

calm nebula
#

That was nonsense when you wrote it atra, you should feel bad atra

gentle rose
calm nebula
proud wyvern
#

oh i mixed the two channels

calm nebula
#

I was looking up what I did for enums in gmcm and loke

#

What you did was nonsense, atra

#

You should feel bad, atra

#

What the hell

fair locust
#

me when i look at my projects from when i first started programming lmao

#

one of my first projects was a program that converts any image into a cross stitch embroidery pattern, written in python

gentle rose
#

oh, like stitchfiddle basically?

#

that sounds really cool

#

fun project

fair locust
#

like a much worse version of that

violet valley
#

Hi! i'm new to making events, and my event is not loading; SMAPI says it is not found. does this look written right?

{
"Changes": [
{
"Action": "EditData",
"Target": "Data/Events",
"When": {
"HasVisitedLocation": "OMEGAlinc.CSExpanded_CentralStationUndergroundShops",
"Hearts:Wizard": "2"
},
"Entries": {
"{{ModId}}_WizardUndergroundShops/t 0900 1800/": "WizardSong/64 15/farmer 64 15 2 Wizard 65 16 0/pause 325/speak Wizard "Greetings, @.$6#$b#Say.. have you been to those shops? The underground ones in Central Station?"/end"
}
}
]
}

round timber
#

you need to add a specific location to your target, like Data/Events/MyLocation

violet valley
#

ohh

#

like Data/Events/Farm?

round timber
#

yeah

violet valley
#

ok ty

round timber
#

two more things: id recommend doing the full form prerequisite commands instead of the shortform ones (Time instead of t), and hearts with a villager can be made a precondition instead of having it as part of the When condition. the visited location thing may have one as well but youd have to check the wiki for that

violet valley
#

ok.

calm nebula
#

HasVisitesLocation seems invalid

violet valley
#

i mean, the event works right now

hallow prism
#

it's possible it doesn't fail without checking that properly

#

there is a Game State Query for that if you want something more clean/stable/sure

violet valley
#

for what?

uncut viper
#

im not sure what seems invalid about it

violet valley
uncut viper
#

yeah I know, I'm saying IDK why atra said the token seemed invalid

violet valley
#

oh

calm nebula
#

It didn't used to exist

violet valley
#

oh

#

im using a game state query now though

#

It might have been added in 1.6

violet valley
# round timber two more things: id recommend doing the full form prerequisite commands instead ...

ok I fixed it now

{
"Changes": [
{
"Action": "EditData",
"Target": "Data/Events/Farm",
"Entries": {
"{{ModId}}_WizardUndergroundShops/Friendship Wizard 500/GameStateQuery PLAYER_VISITED_LOCATION Current OMEGAlinc.CSExpanded_CentralStationUndergroundShops/Time 0900 1800/": "WizardSong/64 15/farmer 64 15 2 Wizard 65 16 0/pause 325/speak Wizard "Greetings, @.$6#$b#Say.. have you been to those shops? The underground ones in Central Station?"/end"
}
}
]
}

round timber
#

nice

uncut viper
calm nebula
#

Lol I'm old and out of touch

uncut viper
#

sure grandparent lets get you to bed

calm nebula
#

Happy birthday, Button!

worn oar
#

what is the purple grass??? idk what half this grass is. is there a "this grass is for this" guide of some sort bc im dumb

pulsar fern
#

hey all, is there any alternative for questframework? I made a mod some years ago with questframework and I'd like to update it for 1.6, I've been searching this discord and internet but can't find anything

uncut viper
#

no. you use vanilla data for quests now

tender bloom
#

I believe the purple grass is dangerous mines lava level

pulsar fern
uncut viper
#

you will be using Content Patcher

pulsar fern
#

i see, are there any existing mods that I can look at to see examples of how they do this?

uncut viper
#

probably. look for any 1.6 mods that add quests

tender bloom
#

VMV has a few quests (as well as many many other things)

pulsar fern
round timber
#

yes

pulsar fern
#

alright I'll look at that, thank you!

karmic gust
#

Can I get some feedback on a couple of ideas? I'm working on house upgrades for vanilla NPCs. 3 of the maps I've made are meant to replace vanilla locations with bigger versions (Leah's house, Elliott's house, and Sebastian's room) but obviously that makes compatibility with other mods difficult. If they set events or schedules there the coordinates would be different and yeah.

I could also just patch a small staircase and an upstairs to all of them to make a separate location with the additional rooms, and not touch the base maps.

Is that a good compromise or do you think players would roll their eyes at another upstairs because currently that's what I've done for Shane and Haley (added an upstairs apartment), and Alex and Sam (did an "attic conversion")

knotty steppe
#

Hello! I'm new to this discord and trying to get a setup going on my Mac, and getting the "“ILSpy” is damaged and can’t be opened. You should move it to the Trash." warning when I try to download Avalonia ILspy.

Does anyone know if there is a known fix for this or an alternative program that works better for Mac users?

blissful panther
#

AvaloniaILSpy is...comparatively ancient at this point.

calm nebula
#

At work I had some success using the vscode ilspy plugin

blissful panther
calm nebula
#

(Admittedly in windows)

lucid iron
#

Just use ilspycmd

knotty steppe
lucid iron
#

As long as u can dotnet install nuget it should work

knotty steppe
calm nebula
#

Chue can you update the wiki

lucid iron
#

I think i wrote down ilspycmd steps on wiki right

#

! decompile

#

!decompile

ocean sailBOT
lucid iron
#

Yep it's there second section

blissful panther
#

Oh wow, you did! I had no idea. Yeah, that's going to be the best way.

knotty steppe
#

Ok sweet I was afraid of that for some reason but going to try it now

obtuse wigeon
#

(this is massively offtopic but I have to ask, Chu how on earth do you remember your username?)

floral stratus
#

chu, square root of e. All lowercase

obtuse wigeon
#

Ahh, Euler's number, it's just clicked, didn't realise that's what the e was refering too

gentle rose
#

why do you need to remember your username though

you log in with email and pings auto complete SDVpuffersquee

gentle rose
obtuse wigeon
lucid iron
#

I am just 275089066607771648

#

Can't get more specific than that

calm nebula
#

Tbh thr long chain of random numbers is how I knoe chue is chinese

gentle rose
obtuse wigeon
#

My password manager is my brain, I (thankfully) have more passwords stored in this fleshy deteriorating thing than I do accounts, well accounts that have important info tied to them

gentle rose
#

then like I said, they probably aren't long enough 😅 I will continue telling people to get a proper password manager until everyone starts using one lmao

opal tendon
#

uh oh did I need to do something to make them available for sale...

gentle rose
#

did you add them to a shop?

opal tendon
#

this is all I did

#

this is all I was helped with

lucid iron
#

Oh it's furniture

gentle rose
#

they might be available in the furniture catalogue?

lucid iron
#

They should be in there yes

gentle rose
#

ig their latest update no longer accepts unescaped backslashes in certain contexts

blissful panther
#

I guess it's entirely fine that the JSON schema format can be interpreted to work in slightly different ways. /j

gentle rose
#

technically it's the regex regular syntax that can be interpreted in multiple different ways /lh

brittle pasture
opal tendon
gentle rose
#

I rate that scam 3.2/10. Not very convincing

lucid iron
#

You can make custom catalog if u want

obtuse wigeon
#

Jumpscare

#

Very quick with it though

obtuse wigeon
opal tendon
#

also does anyone know where the png for the hatmouse is?

gentle rose
#

I think it's bouncer that deletes them which is why it's always so quick, but there's always a chance it's DH lurking or something SDVpuffersquee

lucid iron
obtuse wigeon
royal stump
#

(loosesprites/cursors but specifically the bottom right)

opal tendon
#

oh I meant his house

#

but I needed that too

#

ty

gentle rose
#

it should be a map file I think

blissful panther
opal tendon
#

wait yo is there a picnic at some point??

gentle rose
#

heart event iirc

opal tendon
#

AND A BABA YAGA MOMENT??

obtuse wigeon
blissful panther
opal tendon
#

man I need to play this game more

#

AHA I FOUND IT ITS IN THE SPRING OUTDOORS TILE SHEET TY FOR THE MAPS DIRECTION

tropic remnant
#

Maybe I'm just a greenhorn and don't understand the mechanics of it, or maybe it's not possible, but how do you add animated fire to an event? Can't seem to turn on a campfire in an event. Discord and online searching hasn't showed me anything I understand. (Trying to put a fire on top of the firepit on the beach).

opal tendon
#

this is gonna be the cutest when I am done EHEHEHEHE SDVpuffergus

halcyon ivy
opal tendon
uncut viper
#

Stardew Valley

#

mod that ConcernedApe released a while back

lucid iron
#

It was pretty good ngl

uncut viper
#

wasn't very compatible with sve so it sucks

obtuse wigeon
#

I hear it was one of the first mods released

torpid sparrow
#

Hello, how do i change the name of an existing item

obtuse wigeon
uncut viper
#

should be somewhere in Strings you can edit. Strings/Objects maybe. I'm not at my desk to check

lucid iron
#

EditData targetting Strings/Objects if they use it (vanilla objects do)

opal tendon
#

Would I just ignore the other stuff going on here and draw directly over the house?

lucid iron
#

What's the goal here

torpid sparrow
#

replacing energy tonic with Fahrenheit

violet valley
#

Yeah lol whats the goal

torpid sparrow
#

its a stupid mod

violet valley
#

oh

torpid sparrow
#

celsius = energy drink, im putting in fahrenheit

violet valley
#

yeah like buttom said, should be in strings/objects somewhere

#

*button

brittle pasture
knotty steppe
obtuse wigeon
opal tendon
#

oh no

#

that sounds harder

uncut viper
#

it's exactly the same

obtuse wigeon
torpid sparrow
#

was in strings ty for the help :3

brittle pasture
opal tendon
#

okay ty SDVpufferheart

#

hmmmm

uncut viper
#

100% meaning no transparency either or else the original will show through under it

opal tendon
#

What if I did it a lil something like this

opal tendon
#

Unless it’s fully opaque

lucid iron
#

Just do 2 rectangles tbh

#

So you don't have to think about it

opal tendon
#

Okay and still make it about the same size as the og?

lucid iron
#

Actually ig u need 3 rectangles yggy

opal tendon
lucid iron
#

What tile is that missing corner at

uncut viper
#

you cannot go outside the rectangular bounds of the original house

#

but if the smoke is within that rectangle and would be overlaid on top of empty space on the original, it's fine

#

this only applies if you do overlay like Selph said

#

if what Selph said doesn't apply to you then it doesn't matter, the transparency thing

lucid iron
brittle pasture
#

why, senor ape

#

(the disjoined chimney)

obtuse wigeon
#

The clinic and general store also do this tooSDVpufferwaaah

gentle rose
#

if it fits it sits

lucid iron
#

ft top half of shane coop

knotty steppe
#

Small update on my attemp to decompile the game code: seems like it worked for a lot, but some files like StardewValley/Game1 are coming up empty. Is that expected?

lucid iron
#

my Game1.cs file is 16k lines long

#

its pretty important bolbjed

opal tendon
#

I will do my best

knotty steppe
lucid iron
#

can u post the actual error

knotty steppe
lucid iron
#

did you try -lv CSharp10_0

#

im guessing you omitted the gamepath that was supposed to be in -r yggy

obtuse wigeon
#

Is changing the players walk speed based on the tile on the back layer able to be done using content patcher? Or is that a C# thing

lucid iron
#

i wanna say either spacecore or dynamic map tiles has this feature

obtuse wigeon
#

Oh good to know, I'll look into that, thank you!

#

DMT provides a solution to 2 other ideas I had, brilliant! Thank you

gentle rose
#

@ivory plume hi! I updated the content patcher schema PR to include a fix for a mistake I found in the Target field as well as fix an issue with the latest version of VSCode not liking some of the syntax the regex was using. Let me know if anything needs changing (also for the target field, I had it separate different paths using \b but I'm not sure if you would prefer them to be explicitly separated using ( *, *) instead)

#

had to add those brackets so discord wouldn't eat that leading space SDVpuffersquee

ivory plume
calm nebula
#

Nice colors, pathos!

gentle rose
#

no worries! it's not exactly urgent anyway

lucid mulch
#

oh pathos has fancy colours now

hard fern
obtuse wigeon
#

Using only Content Patcher am I able to add a condition that uses the actual date on the users computer? Thinking along the lines of an april fools thing so a certain thing occurs on the first of april

uncut viper
#

no

wanton pebble
#

Bit of a headscratcher going on right now. Someone gave me a custom sprite for the Portrait Ticket for Darkroom Portrait Shop, and I've been trying to see how it looks in game. I was using my Saloon Breakfast code for Fresh Orange Juice and comparing the files, so I know they're both 16x16, I did a similar load, similar patch, etc... but I can't get the image to load. I keep getting this:

Log: https://smapi.io/log/475386361fb5468d8f67e823687aebdb
Json: https://smapi.io/json/none/8beff0a2b29743ae9cbbeb5a7995609e

Anyone know what I'm doing wrong? I know I have a lot of mods out of date and if you guys think it is the problem I can work on that

ocean sailBOT
#

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

obtuse wigeon
# uncut viper no

Thats a shame, I'll see if something like SpaceCore or other library mods can do it and add it as a hidden option that isn't listed

uncut viper
#

they cant

brittle pasture
wanton pebble
#

.... ah. Since my prior code was referencing a vanilla asset, that's probably it

#

one sec

obtuse wigeon
# uncut viper they cant

Is that just not possible at all in the scope of mods then? I thought maybe with C# it might've been, ahh well, bang goes that idea

wanton pebble
calm nebula
#

It's fully possible to do, I think....Dr birds might have

uncut viper
#

it is very possible, they just dont do it for content packs

obtuse wigeon
#

Then I'll have something to look forward to when i get to learning C#

lucid iron
#

I feel the tradition is to just release the april fools mode on april fools

uncut viper
#

depends on the modding community i would say

#

no reason you cant do it early

#

Minecraft mods for example love to do so

lucid iron
#

Certainly nothing stopping u from releasing silly mode on any day of the year yes

lucid mulch
#

Having the date be updating frequently enough to be always correct isn't a thing CP supports easily.

calm nebula
#

Eh, a close enough is good enough tbh

uncut viper
#

assuming vanilla time speed itd be like 20 minutes off at most anyway and thats only if the player plays past midnight

calm nebula
#

Brb changing the system clock

#

I hear animal crossing has interest

vital lotus
#

with CP is it possible to make something like free cactus from desert festival?

lucid iron
#

yea it is

calm nebula
patent lanceBOT
lucid iron
#
"FreeCactus": "Cactus/randomized_plant/1 1/1 1/1/350/2/[LocalizedText Strings\\Furniture:Cactus]/0/TileSheets\\FreeCactuses/true",
#

the randomized_plant is the important bit but i remember the tilesheet being rather hardcoded

#

so u won't be able to make bigger free cacti for instance

calm nebula
#

When is my wife Leah gonna give me randomized statues

lucid iron
#

but u can totally make a whole new random cacti item with different sprites of same shape

vital lotus
#

Ah, as long the assets fit, it should work right?

#

as the tilesheet hardcoded, probably need all the combination?

lucid iron
#

yea

calm nebula
#

ItsBenter I'm not going to make the mod I'm just going to try to convince someone else to

#

I don't make mods anymore

vital lotus
lucid iron
#

basically just take TileSheets\\FreeCactuses, draw over it following the bounds, load tx and add new furni, and u good

vital lotus
#

very interesting, some labubu plushie perhaps?

lucid iron
#

oh no

#

(yes SDVkrobusnaughty )

vital lotus
#

I'll prolly should test how it's like when sells through shop

#

which combination and so on....

calm nebula
#

Oh dear

vital lotus
#

the cacti man just give it through dialogue and the dialogue string doesn's seem to have any command attached

lucid iron
#

it gets randomized on creation psure

obtuse wigeon
#

I'm atempting to use Dynamic Map Tiles Extended to make the players walk speed faster on certain tiles but I got this error:

[Content Patcher] Can't apply data patch "(CP) Paved Valley > Include SpeedTesting.json > SpeedTesting > entry #1" to DMT/Tiles: failed converting entry to the expected type 'DMT.Data.DynamicTile': Cannot deserialize the current JSON object (e.g. {"name":"value"}) into type 'System.Collections.Generic.List`1[DMT.Data.DynamicTileProperty]' because the type requires a JSON array (e.g. [1,2,3]) to deserialize correctly.
To fix this error either change the JSON to a JSON array (e.g. [1,2,3]) or change the deserialized type so that it is a normal .NET type (e.g. not a primitive type like integer, not a collection type like an array or List<T>) that can be deserialized from a JSON object. JsonObjectAttribute can also be added to the type to force it to deserialize from a JSON object.
Path 'Actions.LogName'..

I don't think I have the wrong array type, the brackets match the examples on the nexus page for the mod, heres the json file, could someone have a look for me to see if I've missed something please: https://smapi.io/json/content-patcher/cb426149acdb4381af8d81af1dbf453b

round timber
#

question that has probably already been asked a million times already: how do NPC rain schedules interact with location contexts? does it always obey the Default location context or do they obey the context that the NPC is currently in?

uncut viper
#

its always possible that the example is wrong

#

in fact further down on the bottom of the page is an example with the correct brackets

calm nebula
uncut viper
#

looking at the code, it checks the NPCs current location when they load their schedule

#

the exception is GreenRain, which will always be loaded first as it only checks Game1.IsgreenRain and year 1

obtuse wigeon
round timber
#

that works for me thank you

uncut viper
#

not those braces

#

the ones after "Actions"

#

"Actions" is a list of objects

obtuse wigeon
#

Ahh okay, are we both looking at the example furthest down the nexus page? bc both the brackets after "Actions" and the ones after "{{ModId}}.DMTAnimations" are different to the ones in the earlier example

uncut viper
#

(but to answer, its the type requires a JSON array (e.g. [1,2,3]) to deserialize correctly.)

#

thats because DMT/Animations is a string to list dictionary

obtuse wigeon
#

Ohhh gotcha okay

uncut viper
#

youre using DMT/Tiles

#

and the Actions field within whatever type is used for DMT/Tiles is a list of objects

worn oar
obtuse wigeon
#

I see now, got myself confused then, Unfortunatly it still doesn't work how I want but at least theres no error anymore

lucid iron
#

hm i wonder if lumi ever added these to another mod

uncut viper
#

lumi appears to have posted exactly that in the comments of this mod

worn oar
worn oar
lucid iron
uncut viper
#

well, no one here is permitted to redistribute it, so the answer is no, we cant do it

worn oar
lucid iron
#

well i dunno have you grabbed the pngs to look yet

lucid iron
#

if they are truly not there then at least 26505 should serve as decent example for how to make CP pack AquaThumbsup

worn oar
worn oar
lucid iron
worn oar
#

ohhh

lucid iron
#

you can do whatever for personal use ofc

#

as for difficulty i think furniture mod pretty straight forward AquaThumbsup

worn oar
#

oh ok gotcha ty!

round timber
#

this text means i cant put a local token in place of these coordinates right? SDVpufferthinkblob
"DefaultArrivalTile": { "X": 15, "Y": 11 },

lucid iron
#

you can do it actually

round timber
#

:o

worn oar
round timber
#

what part should i replace

lucid iron
#

im confused why you want to do it tho

#

are you making a bunch of very similar locations?

round timber
#

most likely yeah

#

still in early stages

lucid iron
#

it's a point so it'd have to be like

"DefaultArrivalTile": {
  "X": "{{L@datX}}",
  "Y": "{{L@datY}}"
},
#

u can also just not care too much about it tho, since warps in and out is what usuall controls where u arrive at

round timber
#

oh yeah true

#

its been a while since ive gotten into the weeds with location stuff kek

tiny zealot
#

defaultarrivaltile is really handy for when you are testing a lot and debug warp bleh becomes very fast entrance

lucid mulch
#

I'm not 100% sure what places are still strict in only accepting booleans or numbers, but it would be certain token inputs/keys rather than anything on a data model

tiny zealot
#

(where bleh is some substring of your location id that uniquely pulls it from the location list)

lucid iron
#

i was very sad when i can't local token EditImage FromArea ToArea

#

pathos knew if i could i would query maff it all kyuuchan_run

uncut viper
patent lanceBOT
calm nebula
#

I'm getting gasoline at Costco botto

uncut viper
#

shoulda thought of that 7 hours ago clearly

obtuse wigeon
#

I can't get this to work, I've decreased it to only change the spring_town tilesheet in any location and changed it to play a sound instead but that also isn't working, puzzled is far from describing how I feel, What are some things that could be wrong that I haven't thought about? especially given the log isnt giving me any errors: https://smapi.io/json/content-patcher/ab3aeb1af438450c8ab82f6279f8e288

#

I'm assuming it's not even starting to be applied as the "LogName" : "SpeedTesting" doesn't even show in the log

tiny zealot
#

this looks like an included file, so i would start by making sure it's being Included. if you have any Whens on the include, they might not be satisfied for reasons patch summary may reveal

#

(i cannot offer advice on the DMT format)

obtuse wigeon
#

It is an included file, with no conditions

    { 
      "Action": "Include",
      "FromFile": "SpeedTesting.json"
    },

I'll give patch summary a test to see if it reveals anything useful

#

it looks like things are being changed according to patch summary DMT/Tiles | changed entries, I'm using Tiled to get the tile Indexes, does Tiled offset them or are they also true to the game

#

Also used DebugMode with the tile setting enabled and the same Indexes are listed so I doubt that's the issue

tender bloom
#

i even think pillow maybe made guis or sth, i dont mess w guis

worn oar
worn oar
#

nvm I found the tutorial with pictures and i think I got it. testing rn

tender bloom
#

It depends on how you feel about learning furniture format vs learning how to install python

#

I assume furniture formatting is new to you, but if not then maybe it’s doable. Also depends on how many items the set has, some of Lumi’s packs are way bigger than others

#

I’m biased because I made the converter, but I feel like it’s sort of a learn to fish/give a fish kind of tradeoff except both options involve learning

worn oar
#

yeah I think the converter was a lot easier, but ive used python scripts for modding in other games so I vaguely knew what I was doing once I got going

#

can it be used to convert dga to cp or only cf?

tender bloom
#

Only CF

#

DGA has too much flexibility

#

It doesn’t come in a consistent format

#

I thought about this for a bit but didn’t come up with any good strategies

hard fern
#

🤔 hm so. i think ive encountered a problem. ive made some items that are supposed to come in different colors, but since they're a crafted item, i can't use the flavored item stuff on it since it doesn't go into a machine...

#

so i would end up having to make all the variations myslef

#

(i forgot to sent the rest of my question)

#

would there be a way to like, make crafted items also flavored? or is that not possible

hard fern
#

thats great bc i think i'd actually die if i had to make every ring band + gemstone color + gemstone cut

deep cypress
#

With Content Patcher map patching: The x, y coords in the From Area, this specifies where the patch is to be placed on the original map? what does the height and width do here?
With ToArea, the x, y coords say where the patch comes from in the new map? The height and width of the From and To, do they need to match?

#

(I am reading the documents, I am just struggling to understand the meaning).

latent mauve
#

FromArea refers to things from the source map (the custom map/your FromFile) and ToArea refers to things on the map you are patching that TO (the Target)

hard fern
#

the width/height is the size of the patch in tiles

deep cypress
#

Hold on, wife having asma attack, brb

#

Am back! She's ok now. Ok, so this explains why my patches have struggled of late!

#

So, height and width should match then, or it's all rather bogus. Out of curiousity, why is the field in both, if they need to match? Or do I misunderstand it?

lucid mulch
#

you can have a single from map that contains multiple things you want to copy from and put them in different locations on target maps

#

width/height need to match but the x,y don't

deep cypress
#

Thx so much!!!

gusty igloo
#

Hello! I'm trying to add a touch action to the exterior of a building (specifically have an obelisk teleport when walking through it as I've turned it into a portal) and I'm a little stuck on how to properly edit the tile properties. This is what I've got >.> I was hoping someone would be able to help

#
                    {
                        "Id": "{{ModId}}_EarthWarp",
                        "Name": "TouchAction",
                        "Value": "MagicWarp Mountain 31 20",
                        "Layer": "Back",
                        "TileArea": {
                        "X": 1,
                        "Y": 1
                        }```
candid veldt
#

Hmmmm...are you editing a vanilla map or a custom map? I think if I was doing it I would do an edit map action.

#
"Target": "Maps/Mountain",
    "MapTiles": [
    {
        "Position": { "X": 1, "Y": 1 }, // where you walk to initiate warp
        "Layer": "Back",
        "SetProperties": {
            "Action": "TouchAction MagicWarp <string area warping to> <destination x> <destination y>"
}
},```
gusty igloo
#
            "Target": "Data/Buildings",
            "Fields": {
                "Earth Obelisk":{
                    "CollisionMap": "OOO\nXOX",
                    "DefaultAction": null,
                    "TileProperties": [
                    {
                        "Id": "{{ModId}}_EarthWarp",
                        "Name": "TouchAction",
                        "Value": "MagicWarp Mountain 31 20",
                        "Layer": "Back",
                        "TileArea": {
                        "X": 1,
                        "Y": 1
                        }
#

Editing a building

candid veldt
#

Ah, I missed the part about it being a building edit!

gusty igloo
#

Instead of it being a clickable action I want to be able to walk through it 🤣

candid veldt
#

If it was a building on a map I would say you could first make the tiles passable by the player by targeting and editing the map tile that its on, and then adding the touch action, but if its a building that you've added to the game like the ones Robin builds I'm unfortunately not sure.

gusty igloo
#

Yeah, I managed to get the farm obelisk on ginger island sorted because that is a map. And I was hoping it would work similarly as you can add tile properties to buildings

candid veldt
#

Ah I see! I have less experience with editing buildings, so I don't know where to start with that. I think you could make parts of the building passable (I've seen some mods that add things do that) but not sure how to attach the warp to that

gusty igloo
#

I did manage to get that working. I'll just keep scrolling through nexus in the hopes that someone did something similar with a custom building ;~;

brittle pasture
#

of the tile area

#

1 and 1

gusty igloo
#

oooh, I didn't think of that. I'll try it right now

#

That fixed it! Thaaaaank you!

lucid iron
#

@golden basin mmap has some simple critter spawn features

#

You can indeed make critters that move like vanilla ones but with special texture

dusty scarab
#

Hey, is there any other guide on data storing besides the normal wiki?

lucid iron
#

Wdym storing

dusty scarab
#

Saving data into a ModData or a json file

lucid iron
#

Normal wiki is main guide for this

#

What is your usecase here?

dusty scarab
#

I want to store a value that indicates a state a map should be in, and have a switch case change the map after the value has been changed.

#

Let’s say day 5 has been reached I want the map to be edited slightly, and I want it saved across different play sessions on the same save file

lucid iron
#

Ah usually ppl (including game) use mail flags for that

hard fern
#

Everything is mail flags in disguise....

lucid iron
#

Content patcher's EditMap+When encourage this use

uncut viper
#

also why is the wiki info insufficient

dusty scarab
lucid iron
#

But if you are in C# i guess u just gotta do it yourself Sleepden

dusty scarab
lucid iron
#

Yep

uncut viper
#

everything you're editing should be in the pipeline

lucid iron
#

But since it's content patcher i was talking there's presumably a Load

#

Or they just target vanilla map

dusty scarab
#

Yeah but it’s say it’s a single play session

#

If I want the map to change several time, would I need to invalidate the cache?

uncut viper
#

you should already be applying your edits via the pipeline and invalidating the cache as necessary

lucid iron
#

Yea and in cp land invalidation happens if the context changed in relevant way

uncut viper
#

if you do not do that, then any other mod editing the map and invalidating the cache will erase your edits

lucid iron
#

You are just doing the same kind of operation but manually really Dokkan

dusty scarab
#

Understandable, thank you so much!

#

Legends!

lucid iron
#

I think having to edit a map is also my threshold to just

#

Have a cp component to mod lol

dusty scarab
#

Oh an important question, let’s say that I’ve set the mail flag, how would I do it for new players that join from Multiplayer or does it load with the world?

lucid iron
#

Set the flag on the host

cold marsh
#

Is it possible to add an EditMap patch to a spouse room kind of like Seb's frog tank? I know spouse rooms only change once when the game loads or something

vernal crest
cold marsh
#

Good to know, thank you.

bleak spade
#

Me: Finally finished my town and forest map redesign mods, and all the countless extra issues it caused, time to actually sit down and play the game...

Me 5 mins into new game: ...hmm, the path near the bus stop could look nicer... 👀

latent cape
#

Is it possible to add a simple custom mail with a specific friendship level of a certain character?

lucid iron
#

Yep trigger action

latent cape
latent flame
#

@outer glacier again:(

lucid iron
#

Are you here to make a mod

blissful panther
#

Okay, that was a whole thing. Mods, am I right?

lucid iron
#

DH I think meep animals should support skins

calm nebula
#

Someone should make a mod where random things grow in your yard

#

That too

lucid iron
#

To use as bootleg appearance

calm nebula
#

Everything should support astheticd

blissful panther
#

They... do. I apparently completely neglected that in the documentation.

#

Oops.

bleak spade
#

Just to get ahead of possible issues: If I were to make a basic EditMap action to load a basic redesign over the vanilla BusStop.tmx, will that cause any issues in terms of character paths, events or animations?

#

I'm not planning on additional NPCs or cutscenes

vernal crest
#

If you don't change any of the collisions or resize the map, shouldn't be any issues.

bleak spade
#

What are collisions?

vernal crest
#

Adding, moving, or removing tiles on the Buildings layer

#

Like if you just changed the Back layer so instead of grass, road etc it was sand as far as the eye could see - no problems. If you put a bunch of fences in new places, most likely problems.

bleak spade
#

I'm adding some benches on the Buildings layer, but I'm not changing the location of the main path or bus

#

Or moving fences

vernal crest
#

If you don't care about compatibility with other mods you're probably fine as long as you avoid the centre of the map.

lucid iron
vernal crest
#

However, lots of people want to edit the bus stop so there's lots of possibilities for mod incompat.

brave fable
#

sqeeb

lucid iron
#

I'll go update the thing i did for void then

hard fern
#

sdeeb

lucid iron
#

We should add a bus terminal

#

And have it sell expensive wood

#

We can call it the Middle Station

hard fern
#

Do... Bus terminals normally sell expensive wood

lucid iron
bleak spade
vernal crest
#

Is this a personal mod then?

bleak spade
#

Yeah

vernal crest
#

Oh then yeah your need to worry about mod incompat goes way down

#

If you wanted to be completely sure you wouldn't mess with vanilla events you could use debug ebi <event id> to run all the events in the bus stop and check where everyone goes.

bleak spade
#

Right now I've got my Town, Forest and Bus Stop mods all in different mod folders, but at some point I might figure out how to lump them all together

vernal crest
#

Why are you making a new mod for each change?

bleak spade
#

Because I'm brand new to modding and I'm scared of breaking something 😅

vernal crest
#

That is a novel approach lol

brave fable
#

you can just make a backup of what you've got and take the dive SDVpufferthumbsup

bleak spade
#

Its the mindset of... if I don't touch it, the sticky tape holding it together will hold

lucid iron
#

Usually if u have several content.json

#

You can turn em all into includes for 1 content patcher pack

brave fable
#

notice how every content.json file has a "Changes": [] list? you can just add all of your {...} entries to the same list

#

or, if you prefer, use Include actions to keep the files separate

vernal crest
#

Yup I second making a backup of your Mods folder and then just jumping in and breaking stuff

bleak spade
brave fable
#

git makes it extremely easy to try new things. commit your changes so far, you've now got a backup, go wild and rip it apart

#

(don't rip the backup apart)

bleak spade
#

Time to break stuff

calm nebula
#

Not even ModEntry. Mod.Entry

brave fable
#

i'm legally required to add that last bit

lucid iron
#

What does Mod.Entry mean...

torpid sparrow
#

where can i find the desert festival foods?

vital lotus
#

for i18n key, there's no need to have the mod id there, right? It's within one mod only?

ornate trellis
lucid iron
torpid sparrow
#

i mean the sprites

ornate trellis
#

Cant check rn since im at work but its in the folder where furniture is fosho

torpid sparrow
mighty quest
#

Can anyone recommend a scalable way to detect if an StardewValley.Object is a machine?
Is there like a context tag or other flag for machines?

#

or checking if it is in a global machine dictionary

#

hmm does this work?
@object.GetMachineData() is not null

lucid iron
#

Yeah whether they have machine data is what makes em machine

obtuse wigeon
#

I'm attempting to place a tile on the Back20 layer using Content Patcher "MapTiles" Property but I'm unsure what the "SetTilesheet" Should reference, I've tried the location that the tilesheet is loaded to, and variations of the tilesheet itself in my files. Heres the snippet I've got and the console is onlu complaining that it can't find the Tilesheet:

{
    "Position": { "X": 18, "Y": 14 },
    "Layer": "Back20",
    "SetTilesheet": "Maps/Assets/zzz_AtlasV_StoneWShadow",
    "SetIndex": "19"
},
lucid iron
#

Set tilesheet needs the name given to the tilesheet

#

E.g. untitled tile sheet

#

It has to already exist in the map

fair locust
#

the voices are getting worse. i have more mod ideas than ever before. help.

#

the curse draws nearer every day.

obtuse wigeon
lucid iron
#

Do not prefix it with anything

obtuse wigeon
#

Thats what I originally thought and what I tried first, I've moved any tilesheet replacements to after this snippet and it still doesn't want to recognise it

#

heres the error exactly

[Content Patcher] Can't apply map patch "(CP) Paved Valley > Include Maps/BusStop/BusStop.json > EditMap Maps/BusStop #3" to Maps/BusStop: MapTiles > entry 5 couldn't be applied: SetTilesheet specifies a 'zzz_AtlasV_StoneWShadow' tilesheet which doesn't exist.