#making-mods-general

1 messages · Page 403 of 1

autumn tide
#

(question about another topic so answer later ofc, but how could I set up an action to automatically trigger daily?)

uncut viper
#

thats what a TriggerAction is

#

if you set it to DayStarted

autumn tide
lucid iron
#

It does help a lot if you have previous programming experience and previous art experience ofc, but the most important part is motivation

autumn tide
#

uhh can you send a link?

#

nvm found it SDVpufferfush

mortal leaf
#

I can do bare bones basic programming but yeah baby steps!

#

I can follow a tutorial essentially 😛

lucid iron
#

Also remember to decompile the game

mortal leaf
#

Why is that important?

uncut viper
#

there will be no tutorials for most of the C# stuff, fair warning

mortal leaf
#

I can read the docs and ask questions tho 🙂

#

I've poked at this stuff before

uncut viper
#

there are no docs for the game code itself

#

there are docs for data classes

lucid iron
#

Well again with water spirit, do you know what it means for a crop to be considered watered?

uncut viper
#

but once you're in C# territory you're doing everything yourself, more or less

lucid iron
#

You need to find this out and reading decompile is usually fastest way

mortal leaf
#

It'll at least be a good challenge then

uncut viper
#

and reading the decompile is the closest you'll get to docs for 95% of the game

mortal leaf
#

Cool gotcha!

#

Would decompiling my copy of the game break it?

uncut viper
#

no

calm nebula
#

(Fwiw, for a new skillet, i would use thr spacecore skills api)

#

Instead of trying to yolo it yourself on the skills page

lucid iron
#

Skillet

uncut viper
#

spacecore's skillet functionality was already recommended rest assured

mortal leaf
#

I do like the skillet except that it's not an item you hold, it goes in your powers. But between Love of Cooking and Binner I've got lots of references!

#

I have my decompile ready so I can tell you what watered means soon 😉

hot gale
#

lol interesting side effect of skipping around in time

#

Snowing in spring

autumn tide
uncut viper
#

no

#

see the example on the trigger actions wiki page

hot gale
#

Also side not you can get VSCode to properly format your file for you, in terms of brackets, line breaks etc

#

!vscodejson

hot gale
#

If I could remember the command I might be able to tell you 🤣

#

!jsonvscode

#

bah

#

been too long

autumn tide
#

😂

hot gale
#

!vscodejsonc

#

!vscjsonc

ocean sailBOT
#
How to make VSCode not scream at json comments

In Visual Studio Code, go to File -> Preferences -> Settings, then search for "associations", and in the "Associations" setting, click the Add Item button to add an item with key *.json and value jsonc (see image).
If you are making a content pack for Content Patcher, you should consider using its json schema so that VSCode can tell you if your patches are valid, you simply have to add

"$schema": "https://smapi.io/schemas/content-patcher.json"

at the start of your content.json file.

autumn tide
#

YES

#

wait, i think thats for comments

hot gale
#

You can also set the formatter in VS Code to JSON, so you can hit liek CTRL+SHIFT+F and it will auto format it for you

uncut viper
#

that just makes it not think comments are errors

#

the formatter should work regardless

hot gale
#

Yeah I am realizing that now rofl different command I think

autumn tide
#

😂

ocean sailBOT
#

@autumn tide You leveled up to Cowpoke. You can now speak in our voice channels and share images in all channels!

hot gale
#

SHIFT+ALT+F in VS Code

#

You may need to install a JSON Formatter to VS Code

#

It's just infinitely easier to comprehend when it's formatted properly imo

#

Otherwise brackets just end up all like ]]}]]}}}

autumn tide
#

ye just still trying to format it , but I have a mac and for some reason they don't give macs alt keys

hot gale
#

Shift+Option+F

autumn tide
#

ty!

gentle rose
#

resharper strikes again with unhelpful suggestions (I may make this a record struct though)

autumn tide
urban patrol
#

that's still not the correct format; visit [[Modding:Trigger_actions]] to see an example like button said

autumn tide
hot gale
#

It wont fix format errors btw, just show you the proper formatting

#

Makes it much easier to track down issues and make fixes

#
{
    "Format": "2.7.0",
    "Changes": [
        {
            "Action": "EditData",
            "Target": "Data/TriggerActions",
            "Entries": {
                "{{ModId}}_OnLeoMoved": {
                    "Id": "{{ModId}}_OnLeoMoved",
                    "Trigger": "DayEnding",
                    "Condition": "PLAYER_HAS_MAIL Host leoMoved",
                    "Actions": [
                        "AddMail Current {{ModId}}_Abigail_LeoMoved",
                        "AddConversationTopic {{ModId}}_LeoMoved 5"
                    ]
                }
            }
        }
    ]
}
autumn tide
#

I'm still super new to this, it'll take me a while

urban patrol
#

do you have specific questions?

autumn tide
#

I'm trying to make it so that every night, you lose a certain amount of friendship points with krobus, depending on your heart level

#

how should I do that?

gentle rose
urban patrol
#

hmm let me think if there's a way to do that with tokens, because i'm sure my initial instinct of "make 5 different patches" isn't ideal lol

hot gale
#
{
    "Format": "2.7.0",
    "Changes": [
        {
            "Action": "EditData",
            "Target": "Data/TriggerActions",
            "Entries": {
                "{{ModId}}_KorbusLose1": {
                    "Id": "{{ModId}}_KorbusLose1",
                    "Trigger": "DayEnding",
                    "Condition": "PLAYER_NPC_RELATIONSHIP current Krobus friendly, PLAYER_HEARTS current Krobus 0 [2]",
                    "Actions": [
                        "AddFriendshipPoints Krobus -16",
                    ]
                }
            }
        }
    ]
}
#

Something like this I believe

#

replicated, of course

autumn tide
autumn tide
gentle rose
#

I don't think $query works like that in dialogue, either?

hot gale
#

Repeating the "{{ModId}}_KorbusLose1": { entries

autumn tide
#

Oh yeah thats the i18n thing

hot gale
#

That is the basic format you would use though

brittle ledge
#

If you want an actual example of trigger actions, you could open up the one in content and check the vanilla examples kyuuchan_nod2

gentle rose
#

an actual content modder should correct me but I'm not familiar with anywhere where you would use "$query ..." as a key

oblique meadow
#

Question. Just making sure I am reading the wiki correctly. So the IsGreenhouse with a T should make this map register as a greenhouse. Yes?

urban patrol
#

i know $query is a thing but i've personally never used it so i have no idea

brittle ledge
gentle rose
#

it is used in some places but idk when it would be the key of an entry SDVpufferthinkblob

velvet narwhal
#

($query is meant for dialogue)

autumn tide
uncut viper
#

query is valid dialogue format yes

gentle rose
#

is it inside the dialogue itself, though, or as the key of a dict?

uncut viper
#

but the formatting of the rest after it is not

velvet narwhal
#

inside of the dialogue

uncut viper
#

its inside the dialogue

gentle rose
#

right, so my instincts were correct, ty guys SDVpuffersquee

autumn tide
#

okay, I think my stuff should be fine then!

uncut viper
#

its the cause of my current strife with BETAS/possibly not BETAS

velvet narwhal
#

i've been MIA lmao

urban patrol
#

i love when someone asks a question and a C# modder shows up with "yeah i know all about [feature] because i have personal beef with it"

uncut viper
#

tl;dr query not returning true when it should

velvet narwhal
#

oh i think i recall this then, the thing with lumina that iro asked me to look at

uncut viper
#

probably

#

iro was acting of their own accord though i didnt know iro asked you

gentle rose
#

well I do not recall

#

and have no idea what we're talking about

autumn tide
#

my life story-

gentle rose
#

I do remember something with lumina that I asked avi about that ended up fizzling out but iirc it didn't have anything to do with queries not returning true?

velvet narwhal
#

oh not true the "actions after a query" yes

gentle rose
#

that was yet another different thing iirc

velvet narwhal
#

god

hallow prism
#

I dont remember details on that then

#

I do still remember the annoying delay in query stuff for unknown reason

#

Likely because this was yesterday

gentle rose
#

anyway. it's my bed time (or, it's an actually appropriate time to go to sleep in my time zone and I'm actually going to follow that for once) so night

uncut viper
#

i doubt parts of that but goodnight!

gentle rose
#

it's quarter past midnight and there will be an attempt snob

hallow prism
#

Yeah same than iro but actually its past midnight

uncut viper
#

goodnight x2 then!

hallow prism
#

Like an hour and quarter past here 😄

gentle rose
hallow prism
#

^^

#

Good night! Wishing you a successful attempt iro

gentle rose
#

night!

autumn tide
#

Okay, updated it, but ik there's something wrong w/ it since the 'mod_id_lose#' is not showing up as a key for 2-5
also couldn't paste cause message was too long :(

brittle ledge
#

!json use this for posting json

ocean sailBOT
#

JSON is a standard format for machine-readable text files that's used by Stardew Valley mods.

If you need help with a JSON file, you can upload it to smapi.io/json to see automatic validation and share the link here.

When making mods, it's recommended to edit your files in a text editor with JSON support, such as VS Code, Notepad++, or Sublime Text. These programs will check for syntax errors.

autumn tide
lucid mulch
#

tl;dr you are missing commas between the entries

#

when vscode starts highlighting things in red that means you have broken the syntax and should start reading backwards to find the mistake

autumn tide
hot gale
#

Most things in JSON funcion basically as a list

#

Commas ensure the list keeps goin

sleek flint
#

Hello everyone! SDVpuffersquee
So I have a small problem here, I have these tokens, but they don't change if their values change. They only get registered when the game launches, and don't change their values after that, and when I tried to register them another time, SMAPI said that it has to be when the game is launched. So, what do I do?

_cpApi = Helper.ModRegistry.GetApi<IContentPatcherAPI>("Pathoschild.ContentPatcher");

_cpApi?.RegisterToken(ModManifest, "RandomItemId", () => new[] { _randomItemManager.CurrentItem.Id });

_cpApi?.RegisterToken(ModManifest, "RandomItemPrice", () => new[] { _randomItemManager.CurrentItem.Price.ToString() });

_cpApi?.RegisterToken(ModManifest, "RandomItemDisplayName", () => new[] { _randomItemManager.CurrentItem.DisplayName });

#

am I doing something wrong?

merry rampart
#

how do you make a custom outdoor bench something you can sit on? im not seeing a guide anywhere

hot gale
#

There is somewhere entirely separate that handles what makes things sittable, iirc

merry rampart
#

i found a thing for furniture but that's not what im looking for

#

nvm i think i found it

hard fern
#

everyone wants to make bench

#

everyone wants to make bench sit

hot gale
#

everyone always ask why bench

#

nobody ever ask how bench

ornate locust
#

Y'all all going through what I went through like a year ago now LOL

#

Welcome to HOW SIT

latent mauve
#

Data/ChairTiles for things that are part of your map and not Furniture

lucid mulch
ornate locust
#

Unfortunately, my Internet went out and I am on a phone now so

calm nebula
#

Ideally when benching you avoid dropping the barbell

ornate locust
#

My help capacity is more limited

calm nebula
#

Apparently if you do that it hurts

merry rampart
ornate locust
#

I am having severe deja vu

#

You need draw tiles. Your seat is using the default game draw tiles, which are for the original bench

#

Someone was doing this for that exact bench earlier today

merry rampart
#

i have no idea what that means

ornate locust
#

I explained it earlier, but I was not limited by my phone. Forgive me if this is slow. To start, you need to copy your bench to the right on the tile sheet. Erase the shadow of the bench on that copy.

#

This will be drawn over your character. Basically it keeps your legs from showing on this side of the bench

#

I need a sec to find the code you need for it

#

Thank God. Okay, this message I am replying to is about the previous bench, it has an example of the code you need to direct your bench to your timesheet and your new draw tiles

#

The second set of coordinates in that code is the tile your draw tile is on, the shadow-free copy.

hot gale
#

Ah yes thats what I was talking about earlier, I knew you had to define it somewhere

#

It's just been 6 months since I poked around with that :p

ornate locust
#

Doing this from a phone sucks btw

hot gale
#

yeah discord mobile search is something else

ornate locust
#

It just kept showing me my own profile

#

Not what I wanted, Discord

sleek flint
tired matrix
#

guys, i know there are animations we can use while talking w npcs using the $a, but, is there any way i can use a custom animation in dialogues?

tiny zealot
#

not really, yet. but someone is working on it

#

(you might be able to do it with spacecore but i believe it would be quite cumbersome)

placid pond
#

Question I don't know how to set a specific range of time (like, does the command line ["Query: {{Time}} >= 1500": true] stop after 1501 and then if I say ["Query: {{Time}} <= 1500; >=1700": true] would that work as one query, two or is it that I need to use a different thing altogether? And if you can point me in a direction where I can keep picking upon on this, I'd super appreciate it! I'm just starting to get into modding and it's a little overwhelming but also really fun

ornate locust
#

What are you trying to time?

placid pond
#

Asset switching to simulate a day-night schedule. I'm trying to mod the Golden Hour mod to suit my personal interest rather than just using a configuration file

lucid iron
#

You will need ontimechange update rates to use this

naive sluice
#

hello~ i modified another mod to work more inline with what i wanted, problem is i lack the means to compile it and im not willing to download anything on my crap computer atm. is there somone out there who might be willing to take my mod and compile it for me?

placid pond
hard fern
#

You need to have a line that's like "Update": "OnTimeChanged" or something like that, its somewhere in the content patcher docs

#

To tell the game to update your patch when the time changes to that specific time

#

...or something

placid pond
#

Ah, OK. I'll try that

lucid iron
placid pond
#

Do I put that as part of the same sort of grouping?

hard fern
#

Ill be real i skimmed the docs long enough to know i needed that 😔 and not much else

latent mauve
#

It's on the same level as Action and Target

hot gale
#

mayors can earn gold from their towns now :D

naive sluice
#

are any modders online who can help me with my problem?

brittle pasture
naive sluice
#

yes, it was that one

brittle pasture
#

ah apologies, I assumed you had a modding question; that specific task I can’t help with

#

but fwiw dotnet I don’t think is too taxing

#

you can download the runtime and run the build command in the command line

#

what mod is this out of curiosity

lucid iron
#

How do you know your changes even work if you didn't compile it

naive sluice
#

the mod i edited is 'crab pot jellies' i adjusted it so its more like 'crab pot other catchables'. and i dont hence why id like someone to compile it for me so i can test it

lucid iron
#

It'd be pretty difficult to fix things if you cannot compile and test yourself tbh

#

At this point you are basically asking someone else to do the mod

naive sluice
#

im happy to do the testing myself. just the compiling is the issue

lucid iron
#

Visual studio is heavy true but dotnet cli not that bad AquaThumbsup

tiny zealot
naive sluice
#

unfortunately until my main computer gets a new motherboard im stuck with a backup computer that makes school computers look high-end. so im trying to be very careful with it.

brave fable
#

mm, unfortunately developing mods is a very iterative process, and if you're starting out (or if you're not) you'll likely be doing a lot of trial and error with a lot of rebuilds and retries

#

it's not realistic to expect things to work first time, and in truth i don't think anyone's going to volunteer to be a personal CI/CD service for you

lucid iron
#

can ur backup computer even run sdv then

naive sluice
#

yes, stardew is small enough for it to handle at least that

#

i havent been able to play marvel rivals for a month though...

uncut viper
#

(also the permissions of the mod dont allow us to do what you want us to do)

naive sluice
#

permissions?

uncut viper
#

the nexus permissions

naive sluice
#

nexus?

brave fable
#

both very good questions

vernal crest
#

The mods website

uncut viper
#

assuming "Crab Pot Collect Jellies" is indeed the mod. its the only one i found when searching for "crab pot jellies"

naive sluice
#

i made my mod with that as the baseline. im not the guy who made that mod

lucid iron
#

😔 precise furniture pls

vernal crest
#

Button is saying that if your mod is an edit of that mod, you're not allowed to distribute it

naive sluice
#

oh, thats fine i didnt intend to anyway

uncut viper
vernal crest
#

Meaning you can't send it to anyone to get them to compile it

naive sluice
#

? i can make a zip file without too much issue

uncut viper
#

thats called "distributing"

hard fern
vernal crest
#

No, you're not allowed to

tiny zealot
calm nebula
uncut viper
#

you may not personally care about the licensing of the mod in question, but modders here do

#

so you're not likely to find someone willing to go against someones nexus permissions

vernal crest
#

And risk getting banned here in maincord for it

hard fern
#

Its against the rules of this server too isnt it?

lucid iron
uncut viper
tiny zealot
#

also maybe putting the cart before the horse, i can't picture anybody agreeing to be a remote compiler for somebody even with license

hard fern
#

What exactly are you doing with the puffers and why are they midair though

naive sluice
#

ok, i dont really get these strange rules on mods that have no monetary attachment but ill take your word for it. thank you for the advise

brave fable
#

unfortunately, money isn't everything

lucid iron
#

ok so i am doing some [harmony thing] to get the SDVpufferfish to stay in the tank, which is secretly a painting

#

but precise furniture is undoing my harmony thing with it's harmony thing

uncut viper
#

the code is someone else's intellectual property. it may be a mod, but its still a mod they created and they get to choose the rights that other people have to the code they wrote

lucid iron
#

thankfully it's harmony thing is also just a postfix, so this is fixable monS

hard fern
#

So like one day can i precisely place puffers into the void

hot gale
#

Cleaned up the UI a bit :D

uncut viper
#

Harmony.UnpatchAll(author.PreciseFurniture) ez

zenith sapphire
#

Guys anyone know which mod add a transforming frog npc?

uncut viper
zenith sapphire
#

Oh right sorry

uncut viper
#

no worries theyll just know better than us anyway

lucid iron
#

you can just make an invisible fish tank now in vanilla (cp) if yo want

uncut viper
#

the bounds of tomorrow... today!

lucid iron
tiny zealot
#

fine, but not randos on SDV discord for free

lucid iron
#

i think the social embarassment of sending over possibly not working code is enough to stop me

uncut viper
#

if you hire me i wont bring up that it doesnt work for an extra fee

brittle pasture
#

hey folks, friendly reminder to fill out the task tracker with progress updates before our daily standup, thank you

hard fern
#

I got scared for a moment because i thought i really forgot something

calm nebula
#

Finnnneeeeeeeeeeee

#

I curled up in a ball and meowed at someone today.

hard fern
#

Are you a cat, perhaps

modest dagger
#

that's a perfectly normal activity to do without being a cat

brave fable
#

are these sprites fine, or do you need them with the edge colouring/detail?

calm nebula
#

This amuses the heck out of me

lucid mulch
#

mild amusement coming from the bot that cant have the tag rather than a junimo

calm nebula
#

You know full well the governor can't pick favorites

#

He has to treat all his quaint little towns equally

lucid mulch
#

if governor wasn't picking favorites you would get exp boosts for having the tag be any of the other town discords too

brave fable
#

SDVcharlewis if one more person buys a joja discord server tag, i might just have to sell the stardew valley discord..

hard fern
#

whats the governor the governor of

brave fable
#

soup, mostly

lucid mulch
#

if it wasn't for the fact it would reset someone elses tag, I could make mine temporarily be joja

#

He is the govenor of the fergill republic right

#

the entire region of which stardew valley is one town of

round timber
#

ferngill is the country

#

dont think you can be governor of a country

brave fable
#

that sounds a little too formal to be schmoozing with a farmer over a bowl of soup on a beach

lucid mulch
#

why not, theres plenty of titles for head of state it could be governor

hard fern
#

i would assume he's the governor of stardew valley then

lucid mulch
#

but you dont need a governor and mayor of the same thing

hard fern
#

lewis is the mayor of pelican town

#

which is in the valley

gaunt orbit
brave fable
#

The Governor is the governor of the region that Pelican Town is a part of.
[citation needed]

round timber
#

me when the governor is the governor

gaunt orbit
#

Also isn't the region itself the titular Stardew Valley

hard fern
#

i would assume so

#

based on the intro cutscene

inner harbor
#

There's no roommate equivalent of Marriage schedule, is there? I'm talking to someone who wants to make Jas adoptable (when married to Shane) and I'd like her to leave the house sometimes, but using "marriage" in the schedule feels a little bit squick - even though it could as easily mean "when married to Shane" in my brain.

brittle pasture
#

marriage and roommates are identical in code

brave fable
#

the only official source i can find to the governor's actual role is from Sam, who pins him as 'some random old guy'

inner harbor
#

Oh I'm aware of that, its more just the use of the term anywhere in the mod that could be a bit offputting.

hard fern
#

well sam is always right

#

so

brittle pasture
#

it’s all internal anyway right, it’s not like it’s visible

inner harbor
#

Yeh, I know

brittle pasture
#

but I understand your feelings

sleek flint
#

I am re-asking this since there weren't a lot of active people when i did the first time.

So I have a small problem here, I have these tokens, but they don't change if their values change. They only get registered when the game launches, and don't change their values after that, and when I tried to register them another time, SMAPI said that it has to be when the game is launched. So, what do I do?

_cpApi = Helper.ModRegistry.GetApi<IContentPatcherAPI>("Pathoschild.ContentPatcher");

_cpApi?.RegisterToken(ModManifest, "RandomItemId", () => new[] { _randomItemManager.CurrentItem.Id });

_cpApi?.RegisterToken(ModManifest, "RandomItemPrice", () => new[] { _randomItemManager.CurrentItem.Price.ToString() });

_cpApi?.RegisterToken(ModManifest, "RandomItemDisplayName", () => new[] { _randomItemManager.CurrentItem.DisplayName });
brittle pasture
#

you can maybe petition pathos for an alias in 1.6.16

inner harbor
#

It's not so bad with Mr Ginger cos he's at least an adult cat.

hard fern
#

🤔 it's time for me to throw an npc at my mod. i can just replace the sprites with abigail for now i guess... i dont want to make side walk sprites rn

lucid iron
#

hm i guess you can make a Child version of Jas

#

adopt this Child via have more kids

#

but it'd be somewhat jank all around cus i dont expect people to use it like this monS

inner harbor
#

I think it's probably easiest overall to have her as a roommate NPC

#

the roommate proposal item can be an adoption certificate.

#

and we could make it only applicable if you're married to Shane.

lucid iron
#

yea void does that DokkanStare

inner harbor
#

(so you'd need Free Love)

lucid iron
#

i would prob wait for tedi poly tbh

inner harbor
#

Void?

lucid iron
#

not void but lavril right

#

she has adoption iirc

inner harbor
#

yep

#

Void's a Custom Companion.

#

For my animal companion NPCs like Valkyrie (Dale's service dog) she's going to be a MEEP animal inside the farmhouse, and I'll hide the NPC Valkyrie in busstop limbo so she can follow Dale when he leaves the house.

hard fern
#

🤔 who is ale

#

*dale

inner harbor
#

I might be able to get her to sit with him in the spouse patio too? I think I tried that with Abyss and it sorta worked.

#

Dale's one of the new Scarp NPCs, courtesy of Clown, who gave me the portraits and the brief background and also a bunch of dialogue.

hard fern
#

o i see

brittle pasture
#

or on time change if a patch specifies it so

sleek flint
#

How do I do that?

sleek flint
lucid iron
#

how do u debug urself into summit again

#

without being SDVcharmrqi 'd i mean

hot gale
#

Whats the name of the map file that has the cave entrance? Im drawing a blank :(

brave fable
#

map or tileset?

hot gale
#

the tmx

brave fable
#

Island_House_Cave for the island map patch

#

unless you mean a different cave entry map?

hot gale
#

Ahh found it it was Mountain.tmx

#

derp

lucid iron
#

ah i accidentally perfection achievement oops

brave fable
#

certainly a much simpler answer than i was expecting lol

uncut viper
brave fable
#

unfortunately, i only earned the 'cook 15 foods' achievement a month or so ago when actually testing a feature i added a year earlier

#

reader i did not cook 15 foods to get it

#

congratulations on perfection 🥳

calm nebula
#

Wow, modders really don't play this game

lucid iron
#

i have the infinity weapon achievement, from loading my 1.5 save in kyuuchan_run

#

i did have perfection in 1.5 too so i dont feel too bad about it

hard fern
#

i accidentally warped myself to GI and got an achievement for it

#

(this is what i get for textexturing warp totems)

obtuse wigeon
#

Does anyone know of a tilesheet set made by someone that has amsterdam style buildings? (tall, thin, terraced style)

latent mauve
#

I oopsed the Joja community center achievement while testing

gentle rose
hard fern
tame burrow
#

Set up a skitty companion mod via trinket tinker and BETAS this evening. Gonna probably add at least 2 more Pokemon to it before I release it

obtuse wigeon
#

Aww that's so cute!

mighty current
ocean sailBOT
#

Log Info: SMAPI 4.3.2 with SDV 1.6.15 build 24356 on Microsoft Windows NT 10.0.22631.0, with 4 C# mods and 0 content packs.

hard fern
#

!json

ocean sailBOT
#

JSON is a standard format for machine-readable text files that's used by Stardew Valley mods.

If you need help with a JSON file, you can upload it to smapi.io/json to see automatic validation and share the link here.

When making mods, it's recommended to edit your files in a text editor with JSON support, such as VS Code, Notepad++, or Sublime Text. These programs will check for syntax errors.

hard fern
#

this is a problem

#

you have your content pack for part as your unique id

mighty current
#

ah okay!

hard fern
#

it should be content patcher's id instead

#

(assuming your mod is a CP mod)

mighty current
#

it is

#

might i ask what the content patcher id is?

#

if you know it

hard fern
#

Pathoschild.ContentPatcher

mighty current
#

thanks! i'll see if that gets it to launch

hard fern
#

you can also just look in content patcher's manifest.json itself (or any mod's manifest.json)

#

to find the unique id

mighty current
#

initial error is gone, left with this

hard fern
#

send your content.json via the json validator again, but also what exactly do you have your files named as?

#

what you have in the FromFile and your file name have to match

mighty current
mighty current
obtuse wigeon
#

Just from the mod folder (without the mod folder name)

mighty current
#

WAIT i figured it out om 😭

#

the path should be assets\data\dialogue.json not assets/dialogue/Dialogue.json

hard fern
#

oop

mighty current
#

wait, nevermind. the content.json has it correct on my pc

obtuse wigeon
#

Also as a side note, if someone uses your mod on linux, the filepath is case sensitive, It won't work if you don't have the same capitalisation

mighty current
#

fixed the fromfile error, now it's just this

obtuse wigeon
#

What does your assets/data/dialogue.json look like?

mighty current
#

was initially made with coriels npc creator, did 1.6 change the formatting?

obtuse wigeon
#

I think coriels is out of date and hasn't been updated for the 1.6 changes

mighty current
#

yeah i figured as much

obtuse wigeon
#

I think you need to wrap all the stuff in the dialogue.json with the changes field, sort of like this:

{
  "Changes": [
    <DialogueContent>
  ]
}
#

replacing <DialogueContent> with the stuff in the Dialogue.json

obtuse wigeon
#

!npc Have a look at these links, they'll give you a much better guide for making an NPC for 1.6, specifically the top link

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:

brave fable
#

not quite, since Changes is a list of CP actions, not a dict of dialogue strings

obtuse wigeon
#

Ahh okay, thank you for the correction blueberry!

brave fable
#

it'd be closer to```json
{
"Changes": [
{
"Action": "Load",
"Target": "Characters/Dialogue/{{ModId}}_MyFunnyNpc",
"FromFile": "assets/blank.json"
},
{
"Action": "EditData",
"Target": "Characters/Dialogue/{{ModId}}_MyFunnyNpc",
"Entries": {
// <dialogue stuff>
}
}
]
}

assuming you've got some file `assets/blank.json` with the contents `{}`, and that your npc is named `{{ModId}}_MyFunnyNpc`
mighty current
vital lotus
#

The error spell out what's the issue...

brave fable
#

do you already have a patch that loads and edits your character's dialogue then?

#

how are you using the file above? is it included, is it a fromfile, ..?

#

and what are the actual file contents

brave fable
#

is it a fromfile to an Include action, a Load action, or an EditData action?

brave fable
#

if it's for a Load or EditData action, you won't need to redefine the actual actions inside as i've done, and you'll just want the dialogue in a single {} object

vital lotus
#

Ur entries has changes. On line 11

brave fable
#

in that case use this

#

you'd accidentally included the "Changes": [ line from your last try in the Entries dictionary

mighty current
#

ah okay!

#

NO ERROR MESSAGE IN CONSOLE!

brave fable
#

by the way, you don't need to include $0 since it's set by default on all dialogue lines without any other $999 portrait number

#

glad it didn't not-work 🥳 but did it work

mighty current
#

it be working!!!!

mighty current
brave fable
#

do we have any CodeMatchers™ in chat

why is my codematcher```cs
// if (buffIconsToDisplay != null)
matcher.MatchEndForward(
new(OpCodes.Ldarg_S, 8),
new(OpCodes.Brfalse_S));

not matching the given IL
```javascript
// if (buffIconsToDisplay != null)
IL_029a: ldarg.s buffIconsToDisplay
IL_029c: brfalse.s IL_02e1
#

i've never actually used codematcher before but it looks useful

#

buffIconsToDisplay is arg 8 on a static method IClickableMenu.drawHoverText

obtuse wigeon
#

(What's a code matcher? is there something I can search to find out more? Tried searching google and in the game code but I didn't spot anything)

brave fable
#

codematcher is a harmony construct meant to help you assemble transpilers

#

normally i just manually match opcodes and operands myself and work with the indexes on the instruction list

obtuse wigeon
#

Ahhh through the snippets of code reguarding harmony I've seen I can determine that it's basically magic

brave fable
#

but that's not particularly readable or maintainable

hard fern
#

🤔 quick q, when putting gsq in conditions can i just add as many as i want

bold schooner
#

I'm using the animal template by Aviroen, and I see some fields are optional according to the wiki.
Can I just delete the field, or should I leave it?

brave fable
# hard fern 🤔 quick q, when putting gsq in conditions can i just add as many as i want

yes and no, since there's a distinction between AND and OR when you're providing multiple queries to a condition.

this base game condition for stormy weather in summer is an AND, where all conditions must be met:
"Condition": "SEASON summer, SYNCED_SUMMER_RAIN_RANDOM, RANDOM .85"
and this condition for giving Sam his jojamart appearance is an OR, where it's true if any query is true:
"Condition": "Any \"LOCATION_NAME Target JojaMart\" \"LOCATION_NAME Target ArchaeologyHouse\""

hard fern
#

mine is just "all conditions have to be met"

#

so the first one?

brave fable
#

yep SDVpufferthumbsup

obtuse wigeon
hard fern
#

ugh i should be sleeping not playing with content patcher conditions

brave fable
#

you swine i can SEE the il right there. what've i done that the matcher can't match it

uncut viper
#

is that a situation where youhave to actually cast the 8 to a short

#

also, are you certain nothing else is transpiling the method at runtime

brave fable
#

(short)8 and (sbyte)8 both fail in the same way

#

i didn't imagine it was relevant, since i can see the target IL is still right there

uncut viper
#

is it actually not matching at all, or are the results just not being evident/perhaps overwritten?

brave fable
#

well you can see the results in the image above, the matcher just keeps going to the end (2649) and marks it invalid

uncut viper
#

and idk if its relevant do i look like ive ever used real debugging tools

brave fable
#

i should mention the program is paused on the following line, immediately after the match fails

gentle rose
#

is matchendforward the one you want to be using in this context

#

I can't remember which does what

uncut viper
#

match end forward will march forward from where your matcher is set to and, if match found, set your matcher to the end of the match

brave fable
#

this one matches (the given code) end (of the code i'm matching) forward (from the current position towards the end of the il)

#

but as i said i've never used codematcher before

uncut viper
#

what if you try:

matcher.MatchEndForward(
  new CodeMatch(OpCodes.Ret),
  new CodeMatch(op => op.IsLdarg),
  new CodeMatch(Brfalse_S)
);
brave fable
#

that does match

uncut viper
#

does it match if you make the ldarg 8 codematch into ldarg 9

brave fable
#

yes SDVpufferfish

#

new(op => op.IsLdarg() && op.OperandIs(8))

#

thank you for the suggestion SDVpufferfish

uncut viper
#

thats an 8 and not a 9 but happy to help anyway i dont know what the deal is there SDVpufferthumbsup

brave fable
#

well i wanted ldarg.s 8 but apparently OpCodes.Ldarg_s, 8 isn't it

uncut viper
#

but op.OperandIs(8) does work?

brave fable
#

yeah it was the operand

uncut viper
#

cuz i meant goin back to new(OpCodes.Ldarg_S, 9) but if the operandis 8 thing works then sure

brave fable
#

new(op => op.Is(OpCodes.Ldarg_S, 8)) also works

uncut viper
#

fucked up

brave fable
#

wisdom

mild furnace
#

seeing transpilers is so odd to me

brave fable
#

see previously i ran into this filth
op => op.opcode == OpCodes.Stloc_S && op.operand is LocalBuilder local && local.LocalIndex is 6

#

somehow i thought this would be different

uncut viper
#

i mean ive never had a simple Ldarg match like you had originally fail on me like that

#

maybe there's something to take away from that

gentle rose
brave fable
#

ah here we go

#

codematcher just suppresses the cast error, i'd tried with short and sbyte, but using int i = il.ToList().FindIndex(match: (CodeInstruction ci) => ci.opcode == OpCodes.Ldarg_S && (byte)ci.operand == 8) gives a match, and so does ```cs
matcher.MatchEndForward(
new(OpCodes.Ldarg_S, (byte)8),
new(OpCodes.Brfalse_S));

#

but at the same time this matches just fine```cs
matcher.InsertAndAdvance(
new(OpCodes.Ldarg_S, 8),
new(OpCodes.Ldarg_S, 9),
new(OpCodes.Ldloc_2),
CodeInstruction.Call(typeof(SkillBuffPatcher), nameof(SkillBuffPatcher.GetHeightAdjustment)),
new(OpCodes.Stloc_2));

#

oh to be a lone ldstr "asd" floating in a sea of il

uncut viper
#

oh that first snippet is how i thought you did it when i suggested it lol

brave fable
#

well that's what i did, i just used short (as you suggested) and sbyte (as i expected)

uncut viper
#

id be surprised if the second one matched though given that its not matching anything

brave fable
#

you right.

#

may have been looking at this for a while

vernal crest
#

Do trigger actions run in the order they're listed in the data (if they're using the same trigger)?

uncut viper
#

yes

#

unlike most other Data/* assets, Data/TriggerActions is a list, thus it has an order

#

this also means you can use MoveEntries on Data/TriggerActions entries

vernal crest
#

Will their conditions update between one running and the next? So if trigger action B has a condition based on trigger action A that stops it from running if A has run, will B be stopped in time if they have the same trigger?

uncut viper
#

yes, the conditions are checked when the trigger is checked

vernal crest
#

Thanks. I think that means I've done something wrong.

#

Ah yes of course I have

#

I have no clue why I thought this would ever work lol

#

(I have misguidedly created a trigger action that will tell the player there's no animal to photograph if any animal they own is not nearby or if they have ever photographed any of their animals, rather than only checking if there's no eligible animal nearby. Whoops.)

#

Oh no, and I just realised that if I switch to one trigger action per animal it's going to give the player the HUD message once per animal instead :/ So that's not a fix. Hmm.

#

@merry rampart Can you share your Data/ChairTiles patch code, please?

merry rampart
#
      "Action": "EditData",
      "Target": "Data/ChairTiles",
      "Entries": {
        "summitbench_spring/0/0": "3/1/up/summitbench/0/0/true"
      }
    }```
#

this solves the problem of it changing color but then my feet show

gray bear
#

is "summitbench" correct

merry rampart
#

what should it be?

#

just bench?

vernal crest
#

You haven't specified the tilesheet from which to take the drawtiles, so when seasonal is set to false it's trying to get its draw tiles from Tilesheets/ChairTiles.

#

Yes, just bench.

gray bear
#

your tilesheet is just a shadowed and unshadowed bench right

merry rampart
#

its on the same tilesheet

#

yeah

gray bear
#

yeah gotta say

vernal crest
#

summitbench is invalid which makes the game ignore it

gray bear
#

after the seasonal thing you need to specify the custom tilesheet or it will just yoink chairtiles

vernal crest
#

You need to change that true to false and then add another field next to it with your tilesheet path (which would be Maps\\tilesheetassetname)

gray bear
#
            "LogName": "Add ChairTiles for custom tilesheets",
            "Action": "EditData",
            "Target": "Data/ChairTiles",
            "Entries": {
                "spring_SummitBench_Edit/0/0": "3/1/up/bench/3/0/false/Maps\\{{season}}_SummitBench_Edit",
            }
        },```
merry rampart
#

its not in map

#

im not putting it in maps

gray bear
#

whenever it is then

vernal crest
#

It has to be so you can use it in your map though?

merry rampart
#

it's attatched to the sheet itself

#

map i mean

vernal crest
#

In order to use chairtiles, you'll need to put it in maps or try using internalassetkey

#

By "attached to the map" I assume you mean you're just keeping it in the same folder as the map

merry rampart
#

yeah

vernal crest
#

If you want it to be targeted by CP for any reason, you need to Load it.

#

Otherwise, try "summitbench_spring/0/0": "3/1/up/summitbench/0/0/false/{{InternalAssetKey: assets/tilesheet.png}}" (replace "assets/tilesheet.png" with the actual folder and file path)

merry rampart
#

that doesnt work

#

feet still show

vernal crest
#

Oh, did you fix the summitbench bit

gray bear
#

draw layers should be

#

3/0

uncut viper
#

an internal asset key will have forward slashes in it

gray bear
#

since you're using the same tilesheet as me

merry rampart
#

i did

#

but feet still show

vernal crest
#

Feet showing wasn't an issue that you had was it Bea?

gray bear
#

nope

vernal crest
#

Can you show a screenshot please Jen?

merry rampart
vernal crest
#

I wonder if just "summitbench_spring/0/0": "3/1/up/bench/3/0/false/summitbench_spring" might work

gray bear
#

did have this happen but my draw layers were not right

merry rampart
#

that just made smpai spit yellow

vernal crest
#

Did you copy my corrected one or the one I had incorrect twice by mistake?

uncut viper
vernal crest
#

(I don't have much hope that this will work, I think you do have to Load it.)

#

But Loading is not difficult.

merry rampart
#

ugh

#

i really didnt want to have to laod it

vernal crest
#

Why?

gray bear
#

internal asset key won't work?

merry rampart
#

just a bit more code to clutter up an already cluttered content.json

gray bear
#

where exactly is your tilesheet jen? exact folder locoation

merry rampart
#

i didnt even want to make a new bench in the first place

vernal crest
#

Well, you could always try Lumi's suggestion.

merry rampart
#

its in assets

#

i tried adding grass behind it but didnt like it

#

sigh

#

cant win with this

vernal crest
#

(And you can always use Includes if you want to tidy your content.json)

merry rampart
#

ill just load it

gray bear
#

assets/summitbench_spring.png ?

merry rampart
#

yeah

vernal crest
gray bear
#

"summitbench_spring/0/0": "3/1/up/bench/3/0/false/{{InternalAssetKey: assets\summitbench_spring.png}"

uncut viper
#

no, InternalAssetKey will give it forward slashes

gray bear
#

ohh

#

is there a way to get around that

merry rampart
#

alright i loaded the thing in and now it works as it should

uncut viper
#

not without putting your mod at risk of breaking in any SMAPI update and it being your fault for using undocumented behaviour
(and it might not even work anyway)

gray bear
#

understandable sweats

#

thank you button

versed wyvern
#

@uncut viper Hey there Button, does this still look like the correct syntax for using BETAS' DialogueBox action in a map tile?

"Action": "Spiderbuttons.BETAS_Action Spiderbuttons.BETAS_DialogueBox Bouncer Characters/Dialogue/Bouncer:coff None",
I was gonna do a last test of my coffee machine mod and noticed that though the mod still functions, the Bouncer's portrait is now showing even though the None parameter is set and SMAPI's got an error saying [Button's Extra Trigger Action Stuff] No asset found with name 'None'

uncut viper
#

is that something that only changed in the most recent BETAS updates?
(also while unrelated, you don't have to use the Action map action, since all BETAS actions are registered as both touch and tile actions as well as trigger actions. ergo you can use the portrait action directly)

#

(and by portrait action I mean dialogue box action)

versed wyvern
#

I'm not sure at what point it changed, I think I only last tested it when map actions were added and I successfully moved it off of Spacecore's touch action command

uncut viper
#

i don't see anything in the BETAS code checking for None so I admittedly don't actually know why the docs say that

#

I can fix that after I wake up though

versed wyvern
#

That was supposed to be the function added in version 2.9.1 by the looks of it

uncut viper
#

Non zero chance I added it, updated the docs, then broke something else and reverted my uncommitted changes not realizing it reverted the dialogue box changes

#

Remind me in 8 hours to fix the thing

patent lanceBOT
#

😏 (#6830919) (8h | <t:1755885661>)

versed wyvern
#

In the meantime I'll see if I can verify when it stopped working

uncut viper
#

January 8th, it seems, where I inexplicably changed the code so that "null" no longer removed the portrait and instead made it use the default portrait

#

No idea why I changed this or where "None" came from, which has never appeared in the DialogueBox code

versed wyvern
#

Evidently I may have never actually tested the machine again after reading the change note about None, just replaced "null" and then forgor cathuh

#

But it seems like the Portrait parameter just isn't working to begin with since putting in NPC names isn't working either

uncut viper
#

Yeah looking at the history the docs were correct up until 2.13.0 too, where I"Fixed DialogueBox action using an NPC's internal name in cases where it should use a display name instead."
nothijng to do with portraits
Genuinely no idea what was going on with me here

#

putting in just an NPC name never worked though and isnt supposed to

#

for the portrait

#

it takes a texture asset name

#

it'd be Portraits/NPCName if anything

versed wyvern
#

Ah, okay, my mistake there

uncut viper
#

I guess I just intended to change Null to default to the NPC portrait (thats a breaking change, why would I do that?) and implement the new None thing and just never did.... and no one else has noticed for 8 months

#

Which is surprising since its not like DialogueBox is a niche traction

#

but yeah Ill fix it when I wake up I need to stop delaying getting to bed now

#

thank you for bringing it to my attention!

versed wyvern
#

Sleep well! owoWave

mighty current
ocean sailBOT
#

Log Info: SMAPI 4.3.2 with SDV 1.6.15 build 24356 on Microsoft Windows NT 10.0.22631.0, with 4 C# mods and 1 content packs.

mighty current
#

any help appreciated!

obtuse wigeon
#

Can you send which ever file loads the portrait using the json thing

#

!json

ocean sailBOT
#

JSON is a standard format for machine-readable text files that's used by Stardew Valley mods.

If you need help with a JSON file, you can upload it to smapi.io/json to see automatic validation and share the link here.

When making mods, it's recommended to edit your files in a text editor with JSON support, such as VS Code, Notepad++, or Sublime Text. These programs will check for syntax errors.

mighty current
#

which file would that be?

vernal crest
#

How many .json files do you have?

mighty current
vernal crest
#

Then send through a link to your content.json and any that have to do with your NPC's appearance and/or Data/Characters info

vernal crest
#

Okay don't need any more

#

You've loaded the portrait and sprite to {{ModId}}_NPCName instead of your NPC's actual name

mighty current
#

ah okay!

vernal crest
#

The Target should be Portraits/{{ModId}}_ShirouOgami and Characters/{{ModId}}_ShirouOgami

mighty current
#

sprites are a little messed up (i'll re export them later) but he's here now

#

thank you for the help!!

gray bear
#

you can add messages to a map without using map strings right? was it edit map?

vernal crest
#

What do you mean by "without map strings"?

#

If you want it translatable, you should be using map strings I think.

gray bear
#

would just using i18n not help?

obtuse wigeon
#

(is map strings the "Action Dialogue" property in Tiled?)

gray bear
#

Action Message iirc

vernal crest
#

So what are you wanting to do if not map strings?

#

Action Dialogue?

#

Action Dialogue doesn't use the StringsFromMaps asset, you just write the desired message directly in the action. If you do that in Tiled, it can't be translated. I guess if you do it using CP's EditMap then you could use i18n to make it translatable.

gray bear
#

ooh, i see. and does it show the same as action message? (little text box)

vernal crest
#

It's a generic dialogue box, so I'm guessing it's bigger?

gray bear
#

i'll do a little experiment

obtuse wigeon
#

I think Action Dialogue also allow the command things that you can put inside dialogue like @ for the players name (If I remember that correctly)

#

(also token not "command things")

gray bear
#

is this how u do? sweats

#

just wanna see the difference really. i know i need to do it via editmap

vernal crest
#

Yes but you will need to put a real key in your Message one for it to work

gray bear
#

i got that key from the busstop map

vernal crest
#

Did you copy and paste it?

gray bear
#

oh wait i need a dot

#

should've just copied smh

#

i didn't make it interactable i think? doesn't seem to do much

#

do i like, need something there to interact with? yeah that makes sense

vernal crest
#

Yeah you need a tile on the right layer

gray bear
#

they just look the same. does @ for player name not work on map edits in tiled?

vernal crest
#

This is ringing bells for me. I think I found that Action Dialogue does not take tokens. I even made a messy mod to test them all thoroughly but didn't do the actual testing.

gray bear
#

the wiki uses tokens. is it misleading me? PensiveButtPuffer

vernal crest
#

Yes, I think so

gray bear
#

damn, well. i don't wanna use tokens, but i suppose i could do map strings since that's how vanilla does it

vernal crest
#

Yup, looks like I planned to test but didn't write down what I'd learned so far, silly me

gray bear
#

am i doing this currectly? i'll i18n later

#

block before it cause prolly important haha

vernal crest
#

Looks ok to me, is it not working?

gray bear
#

oh i haven't tested yet, im just never 100% on my formatting. i will now, thank you 💜

vernal crest
#

Surely it's faster to just save and patch reload than to ask and wait lol

#

Wait no, wrong Target

#

There's no Data/StringsFromMaps

#

It's Strings/StringsFromMaps

gray bear
#

Ah! thanks

#

im so good at words, as usual

#

does high areas make telescope do anythign special

blissful panther
#

<Insert plug for MEEP so you can actually bring up an image of the sky here. SDVkrobusgiggle>

#

I don't believe so, though? It's a distance away from the town though, so the light pollution will be lower, so more visible.

gray bear
#

i wonder what maru's telescope one is. and ooh thank you that helps

#

welp finding maru's one is hard uhh

#

would it be in mountain

#

sciencehouse aint it

obtuse wigeon
#

If it's the sprite youre looking for I think its in outdoor tilesheet

gray bear
#

nah i want the value

obtuse wigeon
#

and the map its in is mountain.tmx

vernal crest
#

Just look at the map

gray bear
#

alr i'll find it there

calm nebula
#

Technically the air is thinner

gray bear
#

oh, i couldn't find it because it doesn't, have any

gray bear
vernal crest
#

Weh I don't want to have to change my i18n key naming convention but it also seems ridiculous to add a new local token just to preserve it. SBVWaah

#

I will compromise by changing my naming convention but having a sook about it in the comments of the default.json

calm nebula
#

Good morning!

calm nebula
#

Ask the lovely Kailey

blissful panther
#

Yeah, the answer probably changes a lot depending on if it's a refractor or a reflector... and that definitely looks like the former!

nimble marlin
brave fable
lucid mulch
# gray bear does high areas make telescope do anythign special

Telescopes like mountains for a mix of factors.

  1. Avoiding light pollution from the rest of civilization.
  2. If its a radio telescope, they also like being away from all the RF noise as well.
  3. For optical, the higher altitudes mean less atmosphere between the telescope and outer space so it will distort the image slightly less.
#

The asterisk is important. ■ AD: 👨‍💻 NordVPN's best deal is here: https://nordvpn.com/tomscott - with a 30-day money-back guarantee. ■ More on the ELT: @ESOobservatory https://eso.org

The Extremely Large Telescope, in Paranal, Chile, is probably going to be the largest optical telescope that will ever be constructed. I was invited ...

▶ Play video
obtuse wigeon
#

"I'm in the Stardew Valley Discord Server"

calm nebula
#

We're all nerds here

gray bear
#

me telescope itty bitty

#

i jsut want some nice flavor text

mortal leaf
#

Okay bear with me here folks! I've been digging around a bit. I want to make a spellbook that casts both utility and combat spells - does that make it a weapon or tool? Would either work, since you can hit baddies with tools anyway?

lucid mulch
#

the factors that make large telescopes want those conditions would also affect a small one

gray bear
#

maybe clear is a better word

tiny zealot
#

"clear" is better, i think. also advocate to remove "you look through the telescope"

gray bear
#

yeah it seems clunky

obtuse wigeon
gray bear
#

gimmie editing assets all day but like, words?! no

mortal leaf
mortal leaf
#

I have a blank project and then I'm just staring at like 3 other completed mods to use as examples

#

I'm like.... I know I can puzzle this out man.

obtuse wigeon
#

Coding basically is just a jigsaw with words, except sometimes it can turn into chess at random

tiny zealot
#

all i really know about tools is to be careful about them. they're funky and if you subclass them you can explode the save serializer (although that's true of anything you subclass)

mortal leaf
#

I dunno what that means but it's totally under control I'm sure of it

gray bear
mortal leaf
#

Better idea, it's not a tool or a weapon

#

It's a fucking prop

obtuse wigeon
#

If you want an alternative to a tool or weapon, you could make it an equipable item instead, clothes, ring, trinket, and set a hotkey that works only when the magic item is equipped

mortal leaf
#

I'll write my own Stardew tool with hookers and booze

tiny zealot
#

spacecore includes a save serializer extension... thing where you register your subclasses with it and it handles the nasty part for you, but then you have to depend on spacecore

#

(most people do not consider that a downside)

mortal leaf
#

I am depending on spacecore for custom skill already 😄

#

so this will work

#

Ily spacecore

obtuse wigeon
#

Then certainly go with SpaceCore (praise SpaceCore)

mortal leaf
#

All hail Spacecore!!!

tiny zealot
#

i will not hail spacecore

mortal leaf
#

That's alright

obtuse wigeon
#

it tends to be the first framework mod i look through the docs of to find if it does something, especially because it's pretty well used like content patcher

#

I dread to think of the day where these major frameworks stop getting updated for any reason, so much could break

mortal leaf
#

Don't even dare speak it!

#

Thank you so much again guys, I'm gonna go stare at this blank doc! I'll lyk when I have something 😛

nimble marlin
#

sorry for my bad english, sometimes I have trouble trying to express myself lol

inland rain
#

I think the open world is ready for testing (still full of bugs surely)

#

grass, bushes, and forage are working

obtuse wigeon
#

Yay! is it a closed test or open to public?

gray bear
#

so it appears blue grass recolor makes the telescope into a snowman in winter

#

so now it's talking to you

#

nvm that, is vanilla

#

fascinating.

#

time to change it when it's winter

versed wyvern
#

Makes total sense, the snow was born when the skies were cloudy WoahThink

gray bear
#

i'd like to think the telescope is just, under the snowman

obtuse wigeon
#

I love the idea of a talking snowman ngl

gray bear
#

undertale moment

#

great, more words i need to write sad_panda

#

in vanilla it's just gone

#

wait

#

my edit isn't applying

#

lmao

somber canopy
gray bear
#

that's just how vanilla is. it becomes one

ocean sailBOT
#

Log Info: SMAPI 4.3.2 with SDV 1.6.15 build 24356 on Microsoft Windows NT 10.0.26100.0, with 22 C# mods and 4 content packs.

gray bear
#

wait- i see now

brittle ledge
obtuse wigeon
#

I did end up finding them in the end but they weren't quit tall enough for the end goal but they did for a proof of concept

brave fable
#

available tilesets are few and far enough between already, it's a brave ask wanting one with a specific theme

#

simple terraced houses doesn't sound too bad for practice though, i'd recommend giving it a shot and seeing how far you can get

cold marsh
#

How do you invert ANY GSQs? ! on the ANY or ! on the conditions inside?

obtuse wigeon
#

They really are few and far between and I totally get that, especially when the authors have worked hard on making them, It's a shame my program to dynamicly create them is coming along so slowly (entirely bc I can't make textures for the life of me)

inland rain
#

also I think I fixed the stutter on moving chunks! Black magic caching, building, and loading, it's kind of crazy

tiny zealot
obtuse wigeon
#

I can't wait to give it some rigorous testing!

cold marsh
#

I see, thanks

inland rain
#

one min I'll put it up now

tiny zealot
#

(you may prefer to do so if it reduces the amount of quote hell you are in)

oblique meadow
#

This game structure is so weird.
Want to turn Robin into a swearing one eyed pirate? Super simple. Want to sit on a log? It’s frustrating.

lucid iron
#

Chair tiles 3.0 the revenge

hard fern
#

I like how everyone is fighting the chair devil

oblique meadow
#

I don’t even NEED to fight the chair devil. I just want to

#

Because it makes sense on the map I’m working on

gray bear
#

fight the chair

vernal crest
#

Well you can feel free to join the parade of people asking for help with chairtiles in the last 24 hours lol

#

The info is fresh in our minds

obtuse wigeon
#

In the entire time I've been in the server I've seen maybe one person asking about chair tiles, whereas in the last day theres been a MASSIVE influx, changing seasons has got us thinking about chairs it seems

tiny zealot
#

(CP) is there a way to restrict a token to integers besides wrapping it in a {{Query}}?
i'm getting MapTiles > entry #1 > Position is invalid: invalid X: that token isn't restricted to integers.
the token is computed via Query

    { 
      "Name": "ShopTileX",
      "Value": "{{Query: {{Town X}} + 4}}"
    },```
but barfs when i use it (Y is defined similarly)
`"Position": {"X": "{{ShopTileX}}", "Y": "{{ShopTileY}}"},`
#

if i move it out of DT and just use the Query directly in Position it works fine

oblique meadow
obtuse wigeon
#

Is there a way to prevent smapi console from closing when the game closes/crashes? having an error about writing to protected memory but the console isn't open for long enough to see why and it doesn't show in the log (which is expected, it's not a smapi error but it is caused by a mod I think)

maiden wigeon
#

I’m gonna try to make an npc later 👀 specifically someone to live on that rock at the beach

brave fable
#

a crab....

obtuse wigeon
#

a star fish?

#

oh wait that's under the rock

maiden wigeon
obtuse wigeon
#

No need to be sorry at all dont worry! It's not an issue in the slightest

obtuse wigeon
#

Ahh gotcha thank you!

maiden wigeon
twilit quest
#

Good morning, my friends

#

I will attempt not to say anything silly this morning. ^_^

obtuse wigeon
#

Okay it seems my issue only occurs when running through steam.. odd

#

Morning glymr!

tiny zealot
lucid mulch
twilit quest
#

I have a question: I would like to create a mod where a player can enter a string of text via config. I'd like to be able to limit this string to a certain number of characters, and to not have to worry about things like commas. (Normally in config, it allows commas to separate values or doesn't allow them, but they aren't ignored.) I would be grateful for suggestions as to how to process the config input with these parameters in mind. ^_^

#

(I promise, this has nothing to do with chairs! XD )

oblique meadow
#

Eventually; everything comes back to chairs

tiny zealot
hard fern
lucid mulch
# tiny zealot i have a bunch of coordinates like this that are all offset from a base position...

The code thats sensitive to type and thus does the extra static validation that its the correct type isn't the biggest fan of it ever at runtime having the chance of being wrong.
the error of that token isn't restricted to integers. isn't the patch running and finding a non-integer, its during the initial patch parsing and I'm not 100% sure if a dynamic token on first load will initialize with a sane value enough to survive those checks

inland rain
#

@obtuse wigeon it's up!

stoic elbow
#

me: wants diluc in SDV. There is no diluc mod in sdv. me, with zero (0) coding experience: I'll make my own mod!

twilit quest
obtuse wigeon
hard fern
stoic elbow
#

I've already found one, but I'm looking for a way to get the json file

lucid mulch
hard fern
#

Wdym get the json file

#

Do you not know how to just make one

stoic elbow
#

i have no idea :') bro I just downloaded sublime text

hard fern
#

Well i think thats a good place to start?

stoic elbow
#

is it better to find an npc template to work off of? like another custom npc mod and then go through the code fixing dialogue and and all the other stuff. or is it better to write your own from scratch?

#

better as in easier

hard fern
obtuse wigeon
#

There exists a template already!

#

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

hard fern
#

Yep

obtuse wigeon
#

Third option is the template

hard fern
#

And i would suggest starting from scratch tbh

obtuse wigeon
#

If starting from scratch you'd get a much better idea about how NPCs work and what you can and can't do with them

stoic elbow
#

oh ok, that makes sense

#

alright, I'll start from looking at how content patcher first. Thank you!

tiny zealot
#

lmao somehow my map patch gets vincent stuck in one spot, where he repeatedly greets my NPC for about two hours. the NPC leaves but vincent never gets unstuck

hard fern
round timber
#

caught in a time loop CGPensiveCowboy

dusky sail
#

He's just people watching

hard fern
#

Hm.. do i want to start modding first thing in the morning...

dusky sail
#

Its not his fault the only person is the farmer

#

Its always a good time to work on stardew mods

humble timber
tiny zealot
#

ok it turns out i parked a truck where he likes to square walk, so that's on me

humble timber
#

LMAO???

undone fable
#

gang is it possible to make custom skintones via contentpatcher without replacing already existing ones

obtuse wigeon
#

I don't think so, I believe they're hard coded

lucid iron
#

You have to replace existing ones but you can make them configurable i think

obtuse wigeon
#

It might be a better idea to see if there's a framework that you can use to register new ones along side the vanilla ones if you really want to not replace vanilla ones, but Chu's idea may be better

undone fable
#

alright, thank you! might just go with chu's idea then, less work

inland rain
#

can't you just extend the "Characters\Farmer\skinColors" file?

#

I think you can just add pixels at the bottom

#

"hasDarkSkin" is hard coded to specific pixels though

#

oh yeah it also limits it to 24 colours

#

so extending doesn't work

gray bear
#

there is a framework

#

I think it does what u need?

forest thunder
#

guys is there a mod that shows the exp u get everytime u kill/mine/fish or something like that

obtuse wigeon
#

I think UIInfoSuite2 or Experience Bars do it?

forest thunder
#

also a mod that shows the item value

obtuse wigeon
#

UIInfoSuite2 shows an experience bar corrisponding to the tool you're holding, and when you hover over it with your cursor it gives a numerical value

#

CJB Cheats or UIInfoSuite2 shows item sell value I think, but theres also a vanilla option, a book bought from the book guy behind joja mart

forest thunder
#

k ty

obtuse wigeon
#

@inland rain I noticed the source for StardewOpenWorld (SOW) has the GMCM API file, however ingame there is no GMCM for SOW, is this intentional? I don't see it saying it does support GMCM but it does have a decent amount of configs available to be changed, (Also no major bugs so far! just nit picky ones that are more balence than bug, although I haven't tested the landmark features yet though)

inland rain
#

there should be a mod enable toggle I think? I didn't add any others yet

obtuse wigeon
#

I don't remember seeing any entry in GMCM at all? after changing a few options I'll have another look incase I missed it entirely

twilit quest
obtuse wigeon
#

Also is the source on github the entire source for the mod? I feel like I'm missing something as I can't actually find any reference to the config values (specifically the "Debug" option, just wondering what it does)

twilit quest
obtuse wigeon
somber canopy
#

I want to add the furniture item ArtPhoto to the farm house, by adding it in tiled's map properties, but it's insisting on an integer & the only source I've found that lists item IDs has ArtPhoto as its id. Is there an integer ID for this item or can I just not add it?

latent mauve
#

Currently Farmhouse furniture items only support integer IDs, that is on the list to be fixed in the upcoming 1.6.16 whenever that gets released though.

#

So for now, you can't use any furniture that has a string ID as a starting furniture in the farmhouse.

#

(you could get around this by mailing it to the player on day 1, though)

vernal crest
vernal crest
cold marsh
#

Regarding changing the values of vanilla items in vanilla shops, is this correct?{ "Action": "EditData", "Target": "Data/Shops", "TargetField": ["ShadowShop", "Items"], "Entries": { "(O)766": { //??? "Id": "(O)766", "ItemId": "(O)766", "Price": "20" }, }, }, The commented line is what's confusing me. It's meant to be MY shop entry ID since vanilla shops do not have this line and as such I can just put whatever, right?

lucid iron
#

The key is a content patcher quirk, even though Items is a list you must edit it like a dictionary, recommended to make sure it's same as the Id

#

Id is arbitrary too, so just put {{ModId}}_Whatever

#

ItemId is the actual important field for what you be selling

cold marsh
#

Gotcha, thanks.

sleek flint
#

Does anyone know where the content for Caroline's tea house is?

lucid iron
#

The sunroom?

#

Not sure what kind of content you looking for

ivory plume
#

Note that the key isn't just a quirk, it has a specific meaning. That patch means "find the entry with the ID (O)766, then add or replace it with this value".

For example, you can do things like this:

"Entries": {
    // delete entry '(O)766' if it exists, then add/replace it with (O)128
    "(O)766": {
       "Id": "(O)128",
       "ItemId": "(O)128"
    }
}
gray bear
#

Pathos your gradient role reminds me of watermelon

#

you are meant to change, why are u like this

#

why do i have a feeling strings can't have underscores

#

oh wait, I-

#

didn't set strings right PensiveButtPuffer

cold marsh
#

Another question. What's the difference between TargetField and Fields here? I see mods using either{ "Action": "EditData", "Target": "Data/Objects", "TargetField": [ 684 ], "Entries": { "Price": 24 }, }, { "Action": "EditData", "Target": "Data/Objects", "Fields": { "684": { "Price": 24 }, },

royal stump
#

In that context (a single "top-level" field), Fields and TargetField both work the same

  • Entries would be bad here, because it'd overwrite everything to default values except Price
  • Fields only edits the included top-level fields, so in this case, it just edits Price
  • TargetField lets you zoom in on a particular field to any "depth" and apply your entries/fields there; in this case, it just means "edit Price"
    (or rather, zoom into 684 and edit its fields like separate entries)
calm nebula
#

Those two are equivalent

cold marsh
#

Good to know, thanks again.

gray bear
#

why it do that

#

can i make this two lines and fix this somehow

royal stump
#

you can try \n, as in ...come for?\nWho made him?

#

I'm not sure if it works there, but it does in some boxes

gray bear
#

oh no, that's meant to be from sweats
well only one way t find out

#

thank you <3

patent lanceBOT
hard fern
#

🤔 i can't use tokens in i18n, can i

#

Like for the lines themselves

gray bear
#

nope

hard fern
#

Hmm i guess i can just make two different versions of a line and have the player's honorific change based on gender

#

But thats work

#

And i hate work

uncut viper
#

you can pass a token into the i18n

hard fern
#

Wait i can?

uncut viper
#

I'm on mobile so can't really get the link easily but check the content patcher translation docs

hallow prism
#

yes

#

you can also use tokens to have two different translation lines (like i18n : mykey{{token}} ) and have a mykeytrue mykeyfalse

gray bear
#

wowie

hallow prism
#

(for example, depends of what your token is)

gray bear
#

didn't know this was a thing

hard fern
#

wowwww thats amazing...

hallow prism
#

yeah i'm not too sure why it's not more known now

#

i use both approach depending of what i need

urban patrol
#

does this ${male^female}$ ${male^female^non-binary}$ format work for i18n?

gray bear
#

i jsut sometimes add {{season}} to make shit easier

hallow prism
#

but it's a bit unrelated to the tokens needs

gray bear
#

what time would you say it becoming evening in stardew

urban patrol
#

i assumed it might be helpful if it’s just for a word replacement (and if it worked) lol

hard fern
#

i pretty much just want to patch like the "Mr." in something like "Mr. Farmer"

gray bear
#

so this is legal?

gray bear
hard fern
#

ye

urban patrol
hard fern
#

the third one wont show though

urban patrol
#

yeah not unless the player has a gender neutral mod installed

hard fern
#

i want my lines to just work without needing it

#

so thats why im opting for token shenanigans

urban patrol
#

i see!

#

are you doing it via config?

hard fern
#

yeah, a config for just "gender neutral"

#

lol

urban patrol
#

nice

hard fern
#

cuz there's some specific things i want to do that depends on the player's gender

#

(mainly npc related)

urban patrol
#

ooh cool

#

i’ve thought about doing gender related stuff when it comes to NPCs’ sexualities but not sure i want to deal with the headache, even if the character is canonically gay

zenith robin
#

Does speed grow or agriculturist affect how long a crop takes to regrow? I am working on a mod that allows for a false speed grow to be applied to a crop on top of normal speedgrow/fertilizer and am unsure if I should also be changing how long crops take to regrow.

hard fern
urban patrol
#

yeah it’s a tough balancing act lol

brittle pasture
zenith robin
#

I didn't think so, I couldn't find anything about it being changed.

brittle pasture
#

Ultimate Fertilizer has a setting to make fertilizer speed boost also apply to regrow, and what it does is directly reducing the days upon crop harvest

zenith robin
#

Alright, thanks.

hard fern
#

for one, i want the npc's gender to be a config... and then i want them to have a slightly different relationship with the player based on the player's gender.. so with those options, a male npc x female player would act slightly differently to a female npc x female player... SDVpufferchickcry i imagine it'll be a lot of work and will probably only satisfy my heart's wish of having like 5 different relationship dynamics in one npc

#

i'll burn that bridge when i get to it (something something incorrect phrase)

urban patrol
#

i believe in you!

lucid iron
#

You can manage all that with a dt i think

hard fern
#

😔 the problem is moreso the writing/event part

lucid iron
#

Ah well the struggle continues

hard fern
#

well for now i plan to work with a teeny baby version of that giant idea

gray bear
#

writing shakes fist

mortal leaf
#

I did step one

#

I'm not sure if I can just make it a "sceptre" instead. Sword does sword things lol.

whole raptor
#

Anyone knows if the requester in Special order can be left blank or be someone that does not exist? Or maybe it doesn't matter at all?

royal stump
#

actually nvm about the friendship part; it uses the requester if it can't find "TargetName", but if you specify who gets the friendship, it should be fine

urban patrol
#

can i use the event precondition SawEvent with the ID of a fork, or is it only with actual events?

#

i know i can get around it by setting a mail flag if need be

calm nebula
#

Only actual events

whole raptor
worn oar
#

where are the crop sprites? like the growth stages. I cant find them

gray bear
#

tilesheets/crops iirc

worn oar
#

I dont see them in vpr's folders

gray bear
#

then vpr might not edit them

uncut viper
#

why are you looking in VPRs folders for the games assets

worn oar
#

bc I want to edit something

ornate trellis
#

vpr does not edit the crops

worn oar
#

oh ok ty must be something else then'

gentle rose
#

@safe kraken gave me new toys portraits to test out my revolutionary new "blinking and talking at the same time" technology

safe kraken
#

I'm basically copying Persona, where they do a 3 frame animation xD

hard fern
#

hm abigail is that you

#

really funny how abby is the default test dummy for mods too

#

this is what she gets for her name starting with "ab"

#

if not then it would probably be alex

brittle pasture
#

too bad for her a-aron isn’t a character

uncut viper
#

(Haley is my default for modding because she is my wife 😌)

lucid iron
#

I use krobus unless i need romance

latent mauve
#

Krobus in a trenchcoat is my test for custom NPCs because the assets already exist and won't get confused with the others running around town

whole raptor
#

@rapid pond Hi! I noticed that in the latest Eugene update you included compatibility with Rasmodia (thanks for that!). Ages ago I also added compatibility on my side, but tbh I'm not sure if it's fully up to date, but am I safe to assume that it's fully handled on your side now? If so I could delete it from Rasmodia itself, since rn Rasmodia overwrites 3 of the events in Eugene.

whole raptor
gentle rose
#

identity crisis

gentle rose
hard fern
#

(im about to steal abby's sprites for testing out my npc just to make sure they work lol)

safe kraken
hard fern
#

(this is a persona girl i can't quite remember the name of right now. Mitsuru?)

safe kraken
#

Yeh

#

I love her design so much (I have a weakness for readheads)

hard fern
#

XD

safe kraken
#

When I make an NPC I will make her a redhead SDVpufferwoke

hard fern
#

i think most of my npcs all have brown hair...

#

wait a second

#

SDVpuffersweats they literally all do

safe kraken
#

I think you found your type /j

hard fern
#

well, it's not one of the most common hair colors for nothing

#

if not the most common

safe kraken
#

That or black, but most likely brown yeah

#

Now that I think about it I'm torn between red or pink hair

hard fern
#

even the characters i drew who have dyed hair, their natural hair color is brown XD

safe kraken
#

I think I usually do more black as a default, I'll have to look how many characters have black hair in SDV cause rn I can't remember one

hard fern
#

sebastian, and that's it im pretty sure. idk if you want to consider shane/jas as having black hair or not. im not sure what color linus and lewis's hair was when they were young though

safe kraken
#

I guess morris

#

could also count?

hard fern
#

damn i forgot he existed

safe kraken
#

I had to look at the wiki tbh

hard fern
#

oh, and ...gunther, i guess?

safe kraken
#

Oh yeah Gunther

#

More than I thought