#making-mods-general

1 messages ยท Page 522 of 1

fossil osprey
#

Dw, you're definitely not the first to mix these two x)

uneven lake
#

WHY ARE THEY NAMED SO SIMILAR?

#

I thought I could use VSC since I noticed a mod I had already installed had code in it, but I dunno

fossil osprey
#

Same company, and VSC was supposed to be an "easier" VisualStudio

#

You can definitely use VSC, but that'll be way harder to make a C# mod

#

Because you need to complie things, and VSC is really not good at it

#

But you can still use VSC for Content Patcher mods, it's enough

uneven lake
#

What's the difference between content patcher mods vs other ones?

fossil osprey
#

Content Patcher is a framework that allows you to make a wide variety of mods without coding (it's just JSON files)
A majority of mods today are made with CP, there are even framework for CP to allow you to make even more things without code
When we talk about C# mods, we mean mods that are made using SMAPI and are written in C#, they can do more thing (anything, really), but require knowing or learning C# to do so

uneven lake
#

Ah, I see. Welp, time to learn to code C#, it seems. Thanks a lot!

fossil osprey
#

Yw ^^ From what I understand you're wanting to do, adding dialogues can quite easily be done using CP only, but everything going beyond vanilla mechanics would indeed require C#

uneven lake
#

Wanted to try my own hand at a Shane mod, along with some other stuff, so yeah

opaque field
#

Hello! If one wants to attatch the monster compendium to a letter, would you use book_void?

#

or should I use the name?

brittle pasture
#

you use the item ID as reported in Data/Objects

#

which in this case is Book_Void

#

(note the capitalization)

opaque field
#

Awesome okay thank you ๐Ÿ˜„

dusty jackal
pale river
#

how do I load a custom texture for a custom building?; just add the png to buildings folder right?

lusty halo
#

It turns out the most difficult thing about the new Patchmode: Mask is how to arrange the spritesheet's textures so that things don't accidentally overlay each other, while writing as few patching paragraphs (or however they are called, I always forget) in the json as possible, which I believe would require a rather large spritesheet which is mostly a blank space, with textures sprinkled on it seemingly without sense or reason other than my own. Oh well, I made my bed and I will lie in it. Or rather, the Italian equivalent is more apt, as it says "You wanted the bycicle, now ride it", and heck, is my brain doing a workout right now.SDVpufferchickcry

royal stump
royal stump
# pale river how do I load a custom texture for a custom building?; just add the png to build...

You'll need to use a Load action in CP, generally. If the building itself is already set up in Data/Buildings, then for example:

  "Junimo Hut": {
    "Name": "[LocalizedText Strings\\Buildings:JunimoHut_Name]",
    "NameForGeneralType": null,
    "Description": "[LocalizedText Strings\\Buildings:JunimoHut_Description]",
    "Texture": "Buildings\\Junimo Hut",```
To load a texture for that, you do something like this:
```json
{
    "Format": "2.9.0",
    "Changes": [
        {
            "Action": "Load",
            "Target": "Buildings/Junimo Hut",
            "FromFile": "assets/your_new_texture.png"
        },
    ]
}```
dusty jackal
royal stump
#

have you tried sleeping to test it? DayUpdate might happen overnight but not after loading

dusty jackal
#

Ok, Which event is called during the loading of the file?

royal stump
#

I'm not sure for Harmony targeting, usually things are done around loading with SMAPI events

#

Item has methods used when items are in the inventory or used by the player, etc, and Object probably has some others too

spice inlet
#

Hello!
Unlockable Bundles goes to round 4.2.0 with yet another cool update ^^
Featuring a new FloweryBook theme by @elfin palm it also contains various fixes and improvements, but mostly specifically requested features like improved page completion customizability and disallowing contributing previously contributed items.
The DEMO and Android release got updated alongside it.

https://www.nexusmods.com/stardewvalley/mods/17265

dusty jackal
#

@royal stump If found a work around. Thank you alot for the help

pale river
#

no idea how to do action tiles

royal stump
#

or the unique building ones like BuildingChest Input/Output, etc

ivory plume
#

(Quick proof of concept: SMAPI integration with Generic Mod Config Menu, for the settings most likely to be changed by players.)

pale river
urban patrol
#

You can use an Action: MinecartTransport [network ID] [exclude destination ID] map property to open the minecart menu.

opaque cobalt
#

for appearance modding, if I include weather types from a mod like say weather wonders, does that then require the mod to have that as a requirement, or would it not effect someone if they didn't have that mod installed as it is just a condition that would never trigger?

urban patrol
#

no [], on the wiki [] means this arg is optional

pale river
fossil osprey
urban patrol
#

no comma

uncut viper
pale river
fossil osprey
#

It's here to tell you "replace with the thing you want"

opaque cobalt
urban patrol
#

you can't have two sets of "" on the same line, json is yelling at you about it

uncut viper
opaque cobalt
#

yep, that I can check and not bork it... hopefully

ivory plume
ocean wave
elfin palm
ocean wave
# ivory plume Yep.

oh pathos i havee a question for you!!
were you a moder before becoming a dev?

gaunt orbit
#

Pathos still is a modder

ocean wave
#

i know-

#

or a dev before a moder

#

modder

#

x3klee always intrested me

gaunt orbit
#

Pathos was brought in for 1.6 and started maintaining SMAPI before then

ivory plume
ocean wave
#

oooo NOTED

autumn tide
#

ooh fancy!

ocean wave
#

thats super cool x3klee

#

Catpls anyway
i found 2 mods that arent compatible in 1 ascept, and i want to somehow fix it, for personmal use. may i get some help

gaunt orbit
#

C# or json?

fading walrus
#

(It's def C#, UI Info Suite 2 and Binning skill)

gaunt orbit
#

Ah yeah that is c# for sure

ocean wave
#

TheVoices i got all day so

gaunt orbit
#

Have you done any procedural programming before?

ocean wave
#

Catpls wheres the learning c# doc

#

i did python !

gaunt orbit
#

Oh, c# shouldn't be too bad then

ocean wave
#

it will come back to me

fading walrus
#

That's what everyone recommended to me when I asked about learning C# in here once

#

Plus my mom's personal rec of w3schools

ocean wave
#

eating it [reading]

pale river
#

I keep getting an error even though the json checker doesn't seem to find anything wrong :')

ocean wave
#

oh thats just one page

ocean wave
fossil osprey
#

There are a bunch of videos to learn C#, it's just that the book is the reference

ocean wave
#

OHHH

calm nebula
#

And couldn't figure out why they were backwards

fossil osprey
#

You can probably find an openclassroom course or something

ocean wave
#

TheVoices i hate having troublw understand things oriruuyhjd

calm nebula
#

Tbh if you have a local university try takinf a class through them

ocean wave
#

im in school rn

calm nebula
#

Then take a class!

ocean wave
#

Waaaa i cant sadly day packed

#

peepoSitti is yter programing w mosh good

fossil osprey
#

If you can't take a class because your day is full, then you definitely can't learn C# today /gen

ocean wave
#

today , tomorrow, n monday is free [snowday 4evil ]

#

found a video gonna watch that me thinks

dire mesa
#

I'm tempted to make a mod. I've never done it before, but I want a skill tree mod.

fossil osprey
#

Skill tree?

#

Something like Vanilla Plus Professions?

#

!vpp

ocean sailBOT
#

Vanilla Plus Professions is a professions and talents mod by KediDili. It expands on the vanilla professions by adding new profession choices at levels 15 and 20 and adds a new talent tree for each skill where players can earn talent points to purchase perks that improve various gameplay aspects.
It can be downloaded from Nexus: https://www.nexusmods.com/stardewvalley/mods/20054

dire mesa
ocean wave
#

is DLL the c# part?

fossil osprey
#

Ok, so vpp is a good example then ^^'
That would most definitely require C#

dire mesa
#

That's where things get difficult. I don't know how to code.

calm nebula
#

It's doable

dire mesa
#

I can make the skill tree, but I'll have to find someone to implement it

calm nebula
#

!comms

ocean sailBOT
dire mesa
#

Hopefully I find someone who I don't have to pay simply because they like the idea

fading walrus
#

They do have reading on w3schools but I recommend doing practice exercises for sure

ocean wave
#

arruu is the dll the c#

fading walrus
#

The dll is the compiled code

#

To view the code itself, check the source repo of the mods on github - I'm pretty sure they're both open source

fading walrus
ocean wave
#

TheVoices time to find how to open it on mac

fading walrus
#

... Does ILSpy exist for Mac

ocean wave
#

looking

lucid iron
fading walrus
#

Because if so you can decompile the DLLs with ILSpy

lucid iron
#

if you want a no UI approach though, you can make use of the powers tab

#

which does let you just light up whatever icon conditionally

#

however the actual implementation of the powers is also very likely C#

fading walrus
#

Why am I the one doing the walkthrough here, I'm a lawyer not a programmer ๐Ÿ˜ญ๐Ÿ˜ญ /lh

dire mesa
#

I also refuse to use AI for my code

lucid iron
#

no one said you should ConfusedAnime

dire mesa
#

I'm avoiding someone making the suggestion

lucid iron
#

dw there's server rules against that

fading walrus
#

Is indeed against server rules

#

Plus there's the pin for further detail!

hard fern
#

well even if you did use ai for the code i doubt it would work XD so no point even bothering

pale river
#

u need to use the terminal to run it tho

ocean wave
pale river
#

!decompile

ocean sailBOT
pale river
#

download ilspy, open terminal run these two commands

xattr -l /path/to/application.app```
blissful panther
#

Ooh, that should really have the VSCode plugin added as an option.

ocean wave
#

downloading the .net n ilspy

pale river
#

also I never got C# to work on macos so that's where I can't help you from there. The SMAPI packager wouldn't install on VSC, so I can only make C# code on my windows computer

ocean wave
#

am i fucked,,,

blissful panther
#

You can 100% do C# on a Mac!

pale river
#

how did you get the package to download on VSC? Without it, you can't run your code

dire mesa
#

I love how you can mod Stardew Valley so much on a low end computer but can barely play base Minecraft

fading walrus
#

Hang on my mom has a different IDE lemme ask her what she uses

#

... Hopefully she's still awake

ocean wave
#

i downloaded it to my macook itself,,

fading walrus
#

(Not jetbrains, which is why I don't remember what it's called)

ocean wave
#

TheVoices should i move to offtopic programing?

#

just to get this set up

hard fern
fading walrus
fading walrus
#

If VSCode doesn't do the job I imagine this works

#

... I hope it's free

blissful panther
fading walrus
#

She got the thing from work, of course

fading walrus
pale river
blissful panther
calm nebula
#

Rider is free now

fading walrus
fading walrus
calm nebula
#

And is the same company as idea iirc

ocean wave
#

okay wait

#

i downloaded ilspy and .net

#

already had vsc

#

opened and downloaded both

#

ilspy isnt showing that i downloaded it wuh

hard fern
#

did mac eat it...

ocean wave
#

i did not install it,,

#

whar this mean,,

#

like HOW do i do

hard fern
#

use git

ocean wave
#

github?

#

+wheres the repo arruu

hard fern
#

mm yeah so you know when you open github and click on that green button

ocean wave
#

i see it

hallow prism
#

you can google stuff to find more about what it means

#

sometimes there's tutorials

hard fern
#

there should be some kind of quick guide for this kind of stuff yeah

#

im not really good at explaining any of it myself

fading walrus
#

Youtube should work for this stuff tbh

hard fern
#

while unreliable for stardew modding, pretty reliable for things that don't change constantly lol

#

hell i'm following 7 year old youtube guides for things XD

ocean wave
pale river
hard fern
#

oh jeez lol

ocean wave
#

i forgotmy uncle knows c# AINTNOWAY

#

tysm for getting me started guys!!!!

#

oh nvm hes busy AINTNOWAY

patent lanceBOT
#

@calm nebula: look (5d ago)

ocean wave
#

modcheck lookin

#

oh okay

#

okay how do i find game path, output path?

hard fern
#

Ah. Uh... I think mac is trying to eat it

ocean wave
#

no i got it working

#

but where do i find game and output path

pale river
pale river
ocean wave
#

Awkward i said i fixed it, but how do i find my outpath

#

just in macos folder?

pale river
#

ive never used the ilspycmd before but id say the folder that says stardew valley

ocean wave
#

is where the stardewvally.dll is

pale river
ocean wave
#

it isnt ?

#

do i make the outpath folder there?

#

TheVoices so loast

#

TheVoices where is outpath

#

TheVoices where is outpath

#

oh why did it send late, and twice

haughty charm
ocean wave
#

OH MY GOD AAAA

#

savior

#

yea let me find it

ocean wave
#

with just one part

#

im just trying to download rn then get there

haughty charm
#

You want to make them compatible with what exactly, each other?

ocean wave
#

just this part

haughty charm
#

Ah. I'm definitely not the person to help you with how exactly to do that, but the outpath is where you want your mod code to be saved. Your development folder. It can be anywhere.

pale river
sleek flint
#

Which name for my shopping channel do you all think is better?
The Zuzu Shopping Network or The Belmond's Exchange

haughty charm
pale river
#

basically my problem with VSC is that I can't pack up files or run without debugging, I don't have any problems with VS on windows though

haughty charm
plucky mirage
#

hi hi

haughty charm
ocean wave
#

sorry got sucked into plaiyng a mobile game lmao

but like could it be in mods folder?

haughty charm
#

So I'm now in the same position as you.

#

Thanks Microsoft

ocean wave
#

AINTNOWAY so in other words i cant on mac now?

plucky mirage
#

is it possible to change multiple descriptions in one go under Target for TextOperations? such as "WhiteEgg_Decsription", "BrownEgg_Description", "LargeBrownEgg_Description" etc etc

pale river
haughty charm
#

Sorry to have given false hope SDVpufferflatbread

ocean wave
haughty charm
#

I've heard good things about VSCodium

ocean wave
#

downloading

#

oj its just bouncing

haughty charm
ocean wave
#

is up now yay

autumn tide
#

๐Ÿ˜ญ

ocean wave
#

okay no it doesnt waan to work

#

i might just comm someoen since its actually going insane

hallow prism
#

sometimes it is the solution, at least for a time

ocean wave
#

esp if it doesnt even work on your device

pale river
# ocean wave yea,,

I already sent this before but
here's how you unpack the game cs files on macos

  1. download ilspy avalonia
  2. open terminal and run
    xattr -dr com.apple.quarantine /path/to/application.app if you cannot find /path/to/application.app, then you just drag the file onto the terminal window
    then run
    xattr -l /path/to/application.app
    then run the application
ocean wave
#

which one?

plucky mirage
#

x64 is windows is it not

ocean wave
#

i only see exe for arm64

#

TheVoices am i actually blind

bold cairn
#

There aren't any existing mods which increase the chance to find ||Golden Animal Crackers|| from various sources, are there? So far I haven't found any.

I think I see where in the code the % chance for them being found from various sources are, in StardewValley.Utility.getTreasureFromGeode(), StardewValley.Utility.trySpawnRareObject(), StarDewValley.Locations.MineShaft.getTreasureRoomItem(), and StardewValley.Tools.FishingRod.openTreasureMenuEndFunction()

However I'm assuming that the only way to really edit those would be with a Harmony Patch? Which always gives me a bit of a headache to work through... ๐Ÿ˜›

plucky mirage
#

@lucid iron @vernal crest would appreciate your guys' help since you helped me a lot until now and nobody is atm haha

ocean wave
#

stare "nobody is here"

plucky mirage
#

i'm essentially looking to edit all instances of egg and milk and cheese in one go

#

?

#

i didn't say "nobody is here" if you're talking to me

ocean wave
#

i am actually blind "nobody is atm" idk how i got here

#

sorry klip

plucky mirage
#

no worries

#

that's probably the last help i'll need with this before i'm finished

#

i'm reading the documentation and it doesn't say i can use multiple instances after "Entries"

ocean wave
#

btw DH is typing,, scary

plucky mirage
#

so i'm wondering if i can do smth like "WhiteEgg_Description", "BrownEgg_Description" etc

#

without having to copy-paste the entire EditData entry like 5 times

blissful panther
# ocean wave

What you're looking at there is the ILSpy GUI, which is only for Windows. The only up to date options for ILSpy on Mac or Linux are:

  1. ilspycmd, which I think you already installed?
  2. The ILSpy plugin for VSCode.

There are no real guides for option 2, but the wiki's decompile section goes over option 1 here. Just instead of the game assemblies, it would be the mod assemblies.

(Now AFK for... maybe 10 minutes. Responses after! SDVkrobusgiggle)

ocean wave
#

oh, it told me its corrupted

pale river
ocean wave
#

klip PLEASE stop with the passive agressice emoji reactions when its towards me h_negstim this is the 6th time in the last 5 ddays i asked you to stop

plucky mirage
#

bro what

#

you never asked me to stop anything? and it's not passive aggressive?

bold cairn
plucky mirage
#

i didn't react to any of your shit either lmao you don't get to ask me not to react to other people

ocean wave
plucky mirage
#

i pop in to read current chat and pop out

#

didn't even speak

fading walrus
hard fern
#

What is even happening here lol

plucky mirage
#

no idea lmao

#

trynna get help with my stuff

fading walrus
#

I don't know
But what I do want to know is if you're tomato soup specifically or a different soup, forsy

hard fern
#

Hm

#

I had potato soup today

fading walrus
#

Mmmm

hard fern
#

And tomato soup yesterday

#

I just like soup

fading walrus
#

I'm gonna make dumpling soup tomorrow

hard fern
#

Mm sounds good

fading walrus
#

I hope I can do the recipe justice!

hard fern
#

Ive wanted to make dumplings for a while

#

But never had the chance

plucky mirage
fading walrus
#

They're so good

plucky mirage
#

i am specifically doing TextOperations and looking at the examples, i don't see an instance where multiple tokens are used after "Entries:"

#

do you wager it could work?

ocean wave
#

h_negstim i give up for now

hard fern
#

Ive also thought of making soup dumplings... But

#

So much work lol

pale river
ocean wave
#

thank you

hard fern
#

Hmmm. Dumpling mod...

ocean wave
#

same thing h_negstim corrupted

fading walrus
#

That's quite odd, that it corrupts more than once

ocean wave
#

each artifacts

plucky mirage
#

@whole aurora do you think this could work?

#

oh wait who did i ping

whole aurora
#

idk

plucky mirage
#

@bold cairn meant to ping you ๐Ÿฅถ

#

pinged your brother by accident lmfao

autumn tide
whole aurora
#

๐Ÿฅน

ocean wave
#

TheVoices im sorry i wasted all your time

pale river
ocean wave
#

TheVoices it wont let me even open it anymore

#

i am

#

zsh: permission denied:

#

as well when anything

pale river
fading walrus
bold cairn
# plucky mirage do you wager it could work?

I believe so.

For example, in my mod I set a "Smoked Fish Quality" Token in the config through content.json like so:

         "AllowValues": "Regular, Silver, Gold, Iridium, Preserved",
         "Default": "Preserved",
         "Description": "Makes Smoked Fish from the Fish Smoker always come out at the specified Quality. Selecting Preserved makes it match the quality of the raw fish, the way it works in Vanilla."
      },```

Then in another .json asset, I reference that Token in the Description for an item like so:

```{
         "Action": "EditData",
         "Target": "Strings/1_6_Strings",
         "Entries": {
                "FishSmoker_Description": "Place fish inside with a piece of coal to create smoked fish, which is worth double. The quality of the smoked fish is {{Lowercase:{{Smoked Fish Quality}}}}."
            }
       },```

So the text string set in the config for "Smoked Fish Quality" (regular, silver, gold, iridium, or preserved), gets inserted into the Description for the Fish Smoker item. You could do a similar thing where the entire Description is just a single Token in your case.
ocean wave
#

thats not worknig either.

fading walrus
#

I've been using Windows machines all my life and will be shortly getting used to Linux, so yeah

pale river
ocean wave
#

and if i do both

fading walrus
ocean wave
#

TheVoices i hate this

fading walrus
# pale river yeahh lol

C'est la vie
You get a nice looking system but the damn thing assumes you're stupid

What a trade-off

pale river
# ocean wave

" if you cannot find /path/to/application.app, then you just drag the file onto the terminal window"

ocean wave
#

permission denied again

pale river
#

xattr -dr com.apple.quarantine is to remove the quarantine on the app you're trying to run; giving you permission to run it

urban patrol
plucky mirage
#

i tried both separating the entries with quotation marks and putting them all in one

pale river
ocean wave
#

please

plucky mirage
urban patrol
#

okay then yeah don't use fields, i've never used it but i thought it could be used for things like that

plucky mirage
#

so far i didn't have to reference the exact same items and recipes, but when it comes to eggs/milk/cheese (which are all "Any" in recipes) i want to avoid duplicating shit as much as possible

urban patrol
#

you might SOL, CP doesn't have any sort of foreach or iterating it can do. one by one might be your only option

ocean wave
#

boxo do you want to dm me?

urban patrol
#

local tokens may be able to cut down the amount of copy paste but that's another thing i've never used

plucky mirage
#

i got help with the rest for the most part

bold cairn
fading walrus
urban patrol
#

the tradeoff with CP's ease of use is its lack of flexibility sadly

plucky mirage
#

yeah that's fair

ocean wave
fading walrus
plucky mirage
#

i didn't see it set up like this in the documentation either

fading walrus
#

(If you somehow don't have perms I'll do it for you)

plucky mirage
#

it's always Entries and then one instance of something

fading walrus
#

Hey soup, mind taking things over to the thread to keep everything consolidated as a sort of resource for the future?

#

Who knows, maybe other Mac modders will need it

ocean wave
#

i made it AS SOON and they sent it

pale river
fading walrus
#

Yep SMCPufferSquee

fading walrus
pale river
fading walrus
#

I'll head out now, I'm having exhaustion fever symptoms so I'm gonna hit the hay before I actually get the fever

autumn tide
#

aww :( take care of yourself!

fading walrus
ocean wave
#

go sleep niow!!!

fading walrus
#

If you're comfortable with wiki editing, you should definitely consider making a resource or tutorial for the modding wiki with common Mac troubleshooting steps, so we can also have an external resource anyone can access!

#

Wikiwikiwiki...

#

But yeag

#

Goodnight! RSleep

fading walrus
pale river
fading walrus
#

Yeeee

#

Byeee chickenrun

bold cairn
plucky mirage
#

oh interesting okay

#

or wait, where would i put all instances of egg? inside "Value", separated by a comma?

#

or inside "Name"?

#

okay, i am reading the documentation - if i understand this correctly, i need to put each egg instance into its own block like the above?

urban patrol
#

if you want to use a DT to add the same description to every egg, you'll still have to have one patch per egg, but you could shorten the thing under Entries to WhiteEgg_Description": "{{Egg Description}}"

plucky mirage
#

so if i create a Dynamic Token that lists each egg, instead of "Target": [ "Entries", "WhiteEgg_Description" ],, it would be something like "Target": [ "Entries", "{{AllEggs}}" ],?

#

sorry, my brain is struggling to retain information at this time of night

#

i am very inexperienced

urban patrol
#

no, dynamic tokens can only be one thing at a time

#

what you're wanting is some kind of variable or list to iterate over, which i definitely understand, but which isn't possible

ocean wave
#

gave up h_negstim laptop crashed when opening the decompiled dll

urban patrol
#

a token is shorthand for "replace {{thing in braces}} with the value it's set as elsewhere"

#

are you editing entries in Strings/Objects? i'm wondering why someone else said you can't use Fields SDVpufferthinkblob

plucky mirage
#

yes

#

we tried using Fields before and i believe it didn't work

urban patrol
#

do you have a link to that convo so i can learn why?

#

so i don't recommend it for someone else haha

plucky mirage
#

yeah let me get it for you

urban patrol
#

okay yeah i just read the convo and refreshed myself on entries/fields/targtfield

#

fields wouldn't work because it's just a string:string dictionary, no models involved

plucky mirage
#

i don't know what any of that means but i'd trust you with my life ๐Ÿซก

#

nah i just don't wanna have to redo the same EditData for each of like the 5 egg types lmfao

#

and the like 4 cheeses and all the milks

urban patrol
#

i don't recommend this but it would technically be possible to use Fields if you edited Data/Objects instead and didn't use text operations. but you'd be overwriting everything instead of just appending your text

urban patrol
plucky mirage
#

yeah i'm just adding a few words to each vanilla description

urban patrol
#

a model is when the data would be like

    "field1": "value",
    "field2": "value"
}```
plucky mirage
#

but it's based on having the recipes so i can't just replace the entire description each time

#

it adds more the more recipes you have discovered

urban patrol
#

yeah append is def better in every way for what you're doing

bold cairn
#

If you want all Egg descriptions to be identical, and all Cheese descriptions to be identical, you can make a Dynamic Token for egg descriptions and a Dynamic Token for Cheese descriptions so you only need to have each description written out once.

But then yes you would still need to actually make the change to each item description individually, they could just all reference the same {{Egg Description}} & {{Cheese Description}}

plucky mirage
#

so that would just be a roundabout way to do what i'm already doing no?

elfin parrot
#

hi everyone! I know my way around code but I'm new to modding - I am making my first mod intending to add the ability to lock/unlock signs so you don't accidentally change the item displayed.

I've found out how to use harmony to stop signs from being changed. But now I'm trying to add some sort of "isLocked" property to the sign. Would I add some metadata to the object, context tag? Can't find anything that looks right in the docs. Thanks!

urban patrol
plucky mirage
bold cairn
#

Could also come in handy if you expect to ever want to change things down the road, so you don't need to do a "Find & Replace All" to change all the descriptions if you ever want to reword them.

plucky mirage
#

but with the method above, that would just be editing the description itself to be consistent

#

i'd still have to input it manually into each egg and milk and cheese type

#

with all of the above written out

#

am i misunderstanding?

urban patrol
#

yeah dynamic tokens cannot help you with needing a patch for every single item

plucky mirage
#

yeah

#

alright so the Find & Replace All isn't the issue

#

i just don't want to have to redo this for every type of egg

#

and later cheese and milk

#

but sounds like it's unavoidable

urban patrol
#

yeah afaict your options are C# or this

#

on the one hand though, i don't think this would be difficult C#?

#

just a loop for "add this to these, thanks"

plucky mirage
#

i was told to do this in C# every time i asked which has been about 4 times by now, but i don't know any C# and i'm already too invested in the CP method lmao

#

it's whatever

#

i haven't noticed any performance issues in-game so far

#

it's just my time that's going to waste and i have a bunch

urban patrol
#

oh yeah i meant for your own sanity not for performance or anything. but if that hurdle is going to frustrate you more than copy pasting 103472 times then go with what feels good

plucky mirage
#

if i was doing this in C# i would've added a bunch of features that the CP method doesn't allow

plucky mirage
#

might as well finish up

#

the real issue with this is lack of compatability with pretty much anything but i'm doing this mostly for my friend and i and we don't have any content mods

#

this is my first mod and i don't have prior experience so i have to make some sacrifices

#

last time i was hunting a missing bracket for 20min lmfao

#

such is life

#

i don't know if dino eggs can be used in regular recipes, if not i'm just finished with the eggs, didn't take too long

#

just gotta do this for milk and cheese

#

ah nevermind they are used as any other egg

#

welp

plucky mirage
#

according to a reddit post from 3yrs ago it works

#

not just reddit ig

bold cairn
#

Oh wow, TIL

#

I definitely would be surprised and a bit disappointed ingame if I accidentally turned a Dinosaur Egg into an Omelet ๐Ÿ˜…

plucky mirage
#

yeah well now i'm truly done with the eggs

#

it's not too bad to copy-paste all that shit, i was just thinking there has to be a more optimal solution, but turns out that solution is knowing C# lol

#

whoever has to read my syntax is gonna hate me ๐Ÿฅถ

hard fern
plucky mirage
#

hi soup

#

i was just as surprised

hard fern
#

i doubt it's true but i can't rest otherwise lol

plucky mirage
#

i also somewhat doubt it but that's 2 sources now ๐Ÿชซ

#

if it's wrong i copy-pasted for naught ๐Ÿ˜”

bold cairn
#

I just tested and at least in my game I can't make Dinosaur Egg Omelets

#

Probably for the best ๐Ÿ˜…

bold cairn
calm nebula
#

yeah the eggs are artfavts

plucky mirage
#

they're "hardcore gamers" surely they're right

#

i don't have a dino egg to test

bold cairn
plucky mirage
#

yo what void eggs count for recipes too?

#

got me fucked up

#

i gotta copy-paste some more it turns out

#

what is the give command i'll give myself a dino egg to test rq

#

someone posted it for me here last time

urban patrol
#

debug fin dinosauregg

bold cairn
#

Ah I'm not sure, I always just use the CJB Item Spawner & CJB Cheats Menu mods for testing things out

plucky mirage
#

yyyyeah dino eggs don't count for recipes

gentle rose
#

just tested and I also canโ€™t make dino omelet

plucky mirage
#

i feel like a boomer who cannot distinguish between a real image and an AI one

gentle rose
#

void eggs should work though iirc?

plucky mirage
#

yes

#

what are these """hardcore gamers""" on about

#

so for cheese recipes, all types of cheese are accepted yeah?

#

the wiki is very inconclusive about what items are part of the "(Any)" and which aren't

brittle pasture
#

nope, beef cheese only

plucky mirage
#

that's crazy man

#

i'm glad i'm making this i would never remember ts ๐Ÿฅ€

brittle pasture
#

if it doesn't say then assume it doesn't

hard fern
#

i guess anything not an animal product won't work

plucky mirage
#

ong my mod should be a vanilla feature ๐Ÿฅถ โœŒ๏ธ

#

finna ping CA to hire me

bold cairn
#

Not vanilla, but I think you can get a sort of similar info with the Lookup Anything mod to activate it on an ingredient and it gives a popup with detailed info, including a list of what cooking / crafting recipes use it as an ingredient

plucky mirage
#

yeah that's what i was told initially lol

#

but i'm too stubborn for that

bold cairn
plucky mirage
#

i don't want an entire UI overhaul for one feature

gentle rose
patent lanceBOT
plucky mirage
#

i think typing in "mlik" into the wiki searchbar and not understanding why there are no results is my cue to go to bed

#

have a good one folks

hard fern
#

mlik

elfin parrot
rare prawn
#

Heyy, quick question. I updated my (CP) Medieval Tiny Greenhouse with a new ambient lighting - nothing big. I had a player add a comment saying that all of their furniture and machines were deleted after the update. I tested and wasn't able to replicate the issue, and honestly I don't see how that would even be possible, but I checked anyways. In what instances would an update cause all the furniture/machines to disappear from a custom shed??

elfin parrot
#

the other method i can think of is storing a isLockedMap which stores a true or false for every Sign instance in the world, but doesnt seem ideal

brittle pasture
brittle pasture
#

no

#

just the field modData on the object instance

elfin parrot
#

ahh

brittle pasture
#

most types in the game have it

#

to make it easier for mods to attach data to object instances

elfin parrot
#

Found it in the code, thank you!! this points me in the right direction

ivory plume
bold cairn
#

Just double checking one more time whether I'm right about changes to the % chance of finding ||Golden Animal Crackers|| in those methods requiring Harmony to do:
#making-mods-general message

If so, I may shelve the idea for right now, as the idea of going back down into the Harmony transpiler mines is a bit daunting after mostly forgetting everything about them over the past ~2 years ๐Ÿ˜›

final arch
#

havent looked at all of the functions but pre/postfix should work too for most/all of them?

royal stump
#

seems like it'd be messier and involve awkward math to account for the existing chances, but technically, yeah

final arch
#

ok the fishing rod one needs a transpiler I think

royal stump
#

they'd be decent practice transpilers if the goal is just to swap a baked-in float to something else

#

(but if the goal's not to use Harmony at all, it'd be even messier SDVpufferdizzy)

brittle pasture
#

the fishing rod one you can postfix it and modify the just-opened item grab menu

final arch
#

how would you tell its opened from the fishing rod tho?

#

check stacktrace or set a variable in a prefix?

brittle pasture
#

the source of the menu is set as the constant 3

#

which is ItemGrabMenu.source_fishingChest

final arch
#

oh neat, missed that one SDVpufferheart

brittle pasture
#

hmm yeah you dont need to postfix it even

#

just a menu changed event

bold cairn
#

Yeah I'm just looking to basically increase / decrease the effective chance of that particular item dropping.

In some other similar cases I did a non-Harmony workaround to e.g. detect when a particular fruit tree sapling appears as a reward from a golden coconut and immediately swap it for a different one, but in this case there seems to be multiple different scenarios with different menus (or in some cases no menu) being open

brittle pasture
#

the only one left that's dicey is trySpawnRareObject; my vegan transpiler-less solution would be set a static var in the prefix, unset it in the postfix, and then a postfix on createItemDebris that logs whether it was called when that static var was set

bold cairn
#

I have tinkered with Harmony transpilers for adjusting friendship amounts gained/lost in various circumstances, but that was doing an unofficial update for a different mod, and around ~2 years ago ๐Ÿ˜…

summer spoke
#

Does anyone know how to put "complete community center bundle" as a requirement for seeing an event? All I can find is one that requires for the entire community center complete.

summer spoke
#

thank you

bold cairn
#

If non-Harmony/transpiler workarounds are likely to take as much effort anyway, I may wait until I work up the willpower to go through the process of setting one up from scratch.

This guide seems to be relatively recently updated, unless any others are more recommended? (I actually skipped most of the setup part for the transpilers I've worked on before as it was editing an existing mod)
https://stardewmodding.wiki.gg/wiki/Tutorial:_Harmony_Patching

Stardew Modding Wiki

Last edited by AtlasVBot on 2025-09-13 18:57:28

royal stump
#

that looks correct at a glance, and not much has changed about Harmony itself in a while, it's just a matter of accounting for future changes in the targeted SDV methods

calm nebula
royal stump
#

(though I've never personally tried CodeMatcher stuff like that example, just manual list-of-instructions changes)

bold cairn
#

Hmm is there any simple way, possibly even through Content Patcher, to require an item of a particular quality level for some sort of interaction (like how certain Bundle items require items to specifically be Gold star quality)?

As far as I know the default systems for crafting / cooking / or item trades (like with the ||raccoons|| or ||island trader||) are all quality-agnostic, right? Unless I'm missing something, would requiring an item be, say, iridium quality for a crafting/cooking recipe or item trade require a bit of tinkering to make possible?

#

(Trying to think of a way to craft / cook / or trade for ||Golden Animal Crackers|| that requires the player to use iridium-quality Sweet Gem Berries, etc. to do)

elfin parrot
#

Hi, this may be a dumb question, but how do you log within harmony patch methods? I can't access Monitor so I can't log to SMAPI console

gentle rose
#

you can make a static field on the modentry class for your monitor

#

or make a static logging class and store the monitor as a static field there

lucid mulch
#

a common pattern I have in my mods is the static class housing the harmony patches has a static Initialize/Init method that accepts the harmony and monitor instances from ModEntry.Entry and stores them in private static fields

elfin parrot
gentle rose
brittle pasture
#

with crafting you can use spacecore's craft recipe override

bold cairn
#

Thanks, I'll look into those!
I hadn't realized that machines can specify quality for the input, although using a machine may be a more cumbersome process for the user for a single recipe than I was envisioning.

bold cairn
#

Hmm now I'm wondering if there are any convenient Events to tie into to allow me to do something like give a 1% chance anytime any crop is harvested or any animal product is harvested, for a ||Golden Animal Cracker|| to also appear?
Possibly would differentiate between player-harvested or Junimo / Auto-Grabber harvested?

brittle pasture
#

you either have to roll your own solution with transpilers or rely on other mods
BETAS have a crop harvested CP event (though it doesn't give you info other than the produce), Extra Animal Config has an animal harvested SMAPI event (though it has a quirk I kinda wanna fix eventually)

#

(Machine Terrain Framework also has a crop harvested SMAPI event, but it has many quirks that I kinda maybe wanna fix eventually)

autumn tide
#

hellooo! back with more questions- how should one organize object layers for map actions in tiled? do the names matter? is there a possiblity of getting map actions 'stuck' under tile layers and therefore inaccesible in-game?

brittle pasture
#

(I made those two events (EAC and MTF) solely for my own use, namely to modify a produce instead of changing any world state, that's why they're so scuffed)

#

I would apologize for my bad coding but the only person who is affected currently is myself

bold cairn
#

Thanks for the context! I think I'll stay in the brainstorming phase for a bit longer.

I guess it suddenly just really bothers me that the most effective way to collect lots of ||Golden Animal Crackers|| is by fishing, apparently? Looking to somehow directly or indirectly tie it back into Farming somehow.

brittle pasture
#

consider: roll a cracker drop every time the player gains farming XP

autumn tide
#

oh, and generally speaking there's little need to spoiler vanilla stuff here :)

royal stump
#

yep, we're only told to use temporary spoiler blocks around new game version releases

autumn tide
bold cairn
#

Ah sorry, I guess the last time I was active here was right around the 1.6 drop and that's what I'm remembering ๐Ÿ˜…

royal stump
brittle pasture
royal stump
#

in general, the game looks for each tile property on a specific layer like that

royal stump
#

action = buildings, touchaction = back, etc

autumn tide
#

aaa makes sense

brittle pasture
#

(the quirk is that in both cases the crops/animals events may fire even though there is no harvest and the item is discarded; just modifying the item itself is fine)

royal stump
#

also for the record, the properties won't exist in-game if that layer doesn't have some index on it, like an actual Buildings-layer sprite on the blue one

brittle pasture
#

(but you definitely don't want to grab 3 mods just for that one feature)

royal stump
#

so buildings tile + a property on it, for an action

autumn tide
#

gotchaaaa

brittle pasture
#

maybe i can merge them into selphcore like spacecore (chue dont ๐Ÿ—ž๏ธ me pls)

bold cairn
vernal crest
#

In terms of organising the object layers in Tiled, please keep them all at the top with the tile layers below them rather than interspersing them between the tile layers for the sake of people who might want to select all the tile layers at once lol (or all the object layers, to hide them)

brittle pasture
brittle pasture
#

so earning 1xp 10x times doesnt mean it's 10x better than earning 10xp at once

bold cairn
brittle pasture
#

how to set up the math for that is an exercise for the reader

bold cairn
#

Haha I don't feel too bad about working out the math for a decent base % chance (will probably record how much Farming XP I earn on a few "typical" days of a "typical" sized farm post-Mastery and work backwards from there).

I just need to brush back up on how XP gains are handled by the game and by the Levelling Adjustments mod in particular, and then look up how to spawn an item appropriately.

But I am liking this potential solution a lot more than most of the other options I was considering earlier. Would make a nice method directly tied to the relevant activity when done naturally, not really a specific way to "grind" for it outside of just doing the stuff that Farming Mastery tends towards anyway (potentially just disincentivizes using Junimo Hut and possibly Auto Grabbers if those don't grant XP)

So it's actually a good thing that those earlier options were too intimidating for me to tackle at the moment ๐Ÿ˜›
Thanks for the ideas!

Although still a bit of stuff for me to look into that I've forgotten

tiny zealot
#

i am picturing reading the farming exp book and getting a decent to high chance for a cracker drop ("every copy comes with a free cracker" /lh)

bold cairn
#

Ah that could be a snag...
Although, do the XP books always have a limited stock at the Bookseller?

If it's just being able to buy 2~5 books per month on top of whatever is randomly found from mystery boxes / fishing chests / prize tickets / etc. that's probably fine.

brittle pasture
#

mayhaps you can disallow drops inside the readBook function with the ol' set global var trick

bold cairn
summer phoenix
#

Hey gang, I'm learning to use Tiled to make custom Stardew maps at the moment and every tutorial I find have me copying over tilesheets into my mod files. Is copying over the tilesheet pngs the best practice or is there a way to get Tiled to directly reference the tilesheets in Stardew Valley's content files?

#

Also, wouldn't copying the tilesheets into my mod make it incompatible with mods that replace Stardew's textures?

#

I'm brand new to modding Stardew so sorry if this is a stupid question ๐Ÿ˜›

pale river
ocean sailBOT
#

You can use the Tilesheetinator tiled extension to create Stardew Valley maps that work in-game without having to copy vanilla and modded tilesheets back-and-forth, rename files with a . in front of their name, edit maps only in the unpacked content folder or make symlink workarounds.

See the mod page for full installation and use instructions.

summer phoenix
autumn tide
#

HMMM where might one find the strings for the books in the library/museum? read through StringsFromMaps and Strings/Locations and the like but I can't find it SDVpufferwaaah hmmm I should go to bed now anyways, but I'll check here for responses later LOL

vernal crest
# summer phoenix I'm brand new to modding Stardew so sorry if this is a stupid question ๐Ÿ˜›

It is not a stupid question at all. Until Tilesheetinator, we did have to copy tilesheets into our map folders (or, as many people did, make a mapmaking folder containing all the tilesheets and move your map in there) but then the tilesheets would be removed before the mod was published. Now that we have Tilesheetinator you can keep everything where it is because the extension handles Tiled's ability to find the tilesheets.

royal stump
summer phoenix
royal stump
#

(took me a minute to even re-learn that the museum/library map is ArchaeologyHouse)

brave fable
#

tilesheetinator is magic. it just tilesheets

urban patrol
#

speak {{ModId}}_NightNurse \"Your silly little escapades in the local caves are nothing compared to the psychological and physical torment of literal Hell.#$b#But if I cannot stop you...\" why is it breaking the word literal in half??

finite ginkgo
#

...I'm just as confused as you are I wasn't aware dialogue boxes could split words

pale river
finite ginkgo
#

\n doesn't work in dialogue

devout otter
#

And a clean split too. You'd think it'd be

liter
al``` or something.
urban patrol
#

yeah like it doesn't go all the way to the end of the line even

#

i guess i could remove the word literal? the last word should fit on that line

proven spindle
#

Does it still split if you replace 'literal' with a different word? Like 'actual' or something?

urban patrol
#

let me test

#

looks fine like this at least

pine elbow
#

Hey, does anyone know how to make an NPC disappear from the world just for a few hours, so they donโ€™t show up in it? Or maybe if thereโ€™s a tutorial?

pine elbow
#

Okay, thank you!

urban patrol
brave fable
#

dialogue parser merely saving you from the prevalence of overused vocabulary in contemporary vernacular SDVpufferstonks

urban patrol
#

dialogue parser should take it up with the writers of the show!

hallow prism
#

Is the ) on map target intentional?

urban patrol
#

ough that would be it

#

thank you

hallow prism
#

Sure

#

Typos are the worse

urban patrol
#

ikr and they're invisible to me whenever it's my own stuff lol

hallow prism
#

I didnt notice it right away

urban patrol
#

it works now! <3

elfin parrot
vernal crest
urban patrol
#

hmm true

summer phoenix
#

Can anyone figure out what's wrong with my Paths tile layer in Tiled?....

#

My custom map has all the appropriate layers and I've been importing the vanilla tile sheets using Tilesheetinator. Everything from the spring_outdoorsTileSheet has been working as expected, whereas anything from the paths tilesheet is ignored entirely.

vernal crest
#

Paths layer items are only generated at the beginning of a save

summer phoenix
#

Here's the tileset properties

vernal crest
#

Are you making a new save to test them?

summer phoenix
iron ridge
#

you need to make a new save for them to exist

vernal crest
#

Although I believe you can use Reset Terrain Features to generate them?

summer phoenix
vernal crest
#

I've never actually used it

urban patrol
#

(it's too late now, but in general we strongly recommend making a copy of a vanilla map for your custom maps and then editing it)

#

they come with tilesheets and map properties already handled, including some animations

summer phoenix
urban patrol
#

is there a good reason why the event command changeMapTile edits the location and not the map? i'm dying here

#

pro tip: if you ever want to learn the difference between locations and maps intimately well, make a dungeon out of setpieces ๐Ÿ˜ญ

#

i fear, unless i can somehow get that changed or come up with some other bullshit, my only option is to cover the map in invisible Front and passable Buildings tiles

atomic bay
#

does somebody know the cp id for the loom?

atomic bay
#

thanks

vernal crest
#

(There is no such thing as a cp id though.)

atomic bay
#

idk how to call it

vernal crest
#

It's just an id

#

Also for future, that site Nic linked is very useful but you can also check inside the data files yourself

atomic bay
#

ok, thanks

urban patrol
#

in case anyone was wondering, tile properties are ALSO LOCATION-SPECIFIC. i'm gonna tear out my hair

#

adding invisible tiles made the "no tile on layer z at x y" error go away, but the changeMapTiles doesn't actually appear to have happened -_- if anyone has suggestions i'll take them. here's my event script as is, with the important information that it takes place inside a dungeon (location) but i'm using a temporary map (map)

https://smapi.io/json/content-patcher/371affc055854f88a67572a826862c51

#

i'm headed to bed for now though, good night

inland rain
final arch
urban patrol
#

๐Ÿคฆ thank you for the sanity check omg i bet that's the issue

#

i got so preoccupied with making the error disappear i didn't consider the obvious

golden basin
#

I cant get my mailboc or chimey smoke working on my custom building

#

can someone help me figure this out

#

heres my code

#

its the first building farmhouse

final arch
#

elaborate on "not working" pls

#

is the fireplace inside lit?

#

do you have mail but the mailbox doesnt open? the mailbox only opens if you have mail

golden basin
hallow prism
#

smoke will only come out if there's a lit chimney inside according to the wiki

#

hence sheku's question

golden basin
#

i know i have a chimney inside that is lit the smoke will not come out the top outside

hallow prism
#

it's good if you know, but we don't know if you don't answer?

#

to my knowledge, this wasn't a widely tested feature, so i don't know if there's other factors involved

golden basin
#

I thought i did answer

#

is the coords im supposed to be putting like tile coords or image coords?

#

thats where im getting a little confused

#

yep its image coords that would explain the chimney

stark spindle
#

cool i didnt know about this

hallow prism
#

it must be relative to the building since you don't know where the player will put it

golden basin
#

yeah its like the coords on the building picture but there are tile coords and image coords on a picture too i just got the two confused

#

this thingy i got confused by which to use

#

I still can't get that mailbox working though and ive no clue why. Ive tried both image and tile coords and its just not functioning hmmm

hallow prism
#

i don't know what's going on

golden basin
#

what do you mean?

#

When I click on my mailbox for my custom farm building. the mailbox doesnt display any indication of there being mail and does not have mail or show a dialogue box that says you have no mail

hallow prism
#

that i can't help you

golden basin
#

I dont know what information you need from me because I am giving all the information I know to give

hallow prism
#

i don't need more information, i am saying i can't help

golden basin
#

oooh okay thats fine

#

I was talking to shekurika in the beginning though. idk where they went hehe

#

I always get nervous @ people too i know it says I can on their name but jfldgds

vernal crest
#

Hmm, have you got an ActionTiles entry for the mailbox?

golden basin
#

yep! need to see it?

#
      {
        "Id": "Default_OpenMailbox",
        "Tile": {
          "X": 6,
          "Y": 6
        },
        "Action": "Mailbox"
      }
    ],```
#

ive tried both the image coords and the tile coords on the image and its just not wantin to work

vernal crest
#

Have you tried enabling noclip and running around inside the building texture to see if the action is sitting somewhere unexpected? I usually have to do that for building stuff because I always miscount

golden basin
#

ooo let me try that i need to get that mod anyway

golden basin
vernal crest
#

It's in tiles from the building's top left, but I always get confused about whether it's the top left of the image or of just the impassable tiles when it's placed on the map

#

Ah, it's its size on the map

#

So you have to start your count for the Y not from the very top of the building, but from its first impassable tile

#

So my guess is that you have your Y set too low. It looks like a pretty tiny building, so its size is only 6, 2 or 6, 3 I'm guessing?

golden basin
#

its 7,2

#

the uhhh size i mean

vernal crest
#

Oh yeah of course, an X of 6 means it has to be 7 tiles wide

#

So your mailbox should be 6, 1

golden basin
#

You are a genius

#

its working

#

now i just need to figure out why the mail box icon isnt there

#

or would it be hiding behind the house...

hallow prism
#

i think i mainly need two events and a few spawn data for my update to be mostly ready

#

but the last steps are always the hardest (it's why they are the last to add, after all)

final arch
#

I dont think the mailbox icon works

golden basin
#

oooooo that explains it

final arch
#

as its just an Action and not a mailbox

golden basin
#

could i add a trigger action that displays a message you think?

vernal crest
#

No, it won't update fast enough

#

Unless you just want it to trigger first thing in the morning, but I can't think what condition you could use. I don't think there's a way to check if there's unread mail.

sleek flint
#

Wouldn't Esca.EMP_TimeChanged work here?

#

What exactly are you trying to do?

vernal crest
#

How do you check for the unread mail?

zealous lodge
#

Hey everybody, could someone point me in the right direction for how to get tilesheetinator to work in Tiled? It's in my extension folder, but it's not showing up in Tiled...

sleek flint
vernal crest
vernal crest
zealous lodge
vernal crest
#

You may need to restart Tiled and you definitely need to make sure your Tiled is up to date

#

It should be version 1.11.2

zealous lodge
#

I did already restart tiled, but I'll go check for updates, that may just be the problem...

vernal crest
#

You can check the version in the Help -> About Tiled window

zealous lodge
#

Aiii it's an outdated version, I've got 1.10, I'll go update now, thank you!

sleek flint
#

Spiderbuttons.BETAS_MailReceived? SDVpufferthinkblob

#

If I understood what she wants, they want to check if the player received any mails to display an icon above the mailbox right?

zealous lodge
sleek flint
#

oh nvm this is for received mail

vernal crest
vernal crest
sleek flint
#

I tried looking, but that doesn't look like it would be possible with JSON.

golden basin
#

I can do it with spacecore showing a hud message and i have an idea of how i just cant seem to get it actually working hehe

sleek flint
#

Not unless a framework makes it possible.

golden basin
#
"LogName": "YouHaveMail",
"Action": "EditData",
"Target": "Data/TriggerActions",
"Entries": {
"{{ModID}}_YouHaveMail.Trigger":{
"Id": "{{ModID}}_YouHaveMail.Trigger",
"MarkActionApplied": false,
"Trigger": "DayStarted",
"Condition": "PLAYER_HAS_MAIL Current {{ModID}}_FoundYamay.Mail Mailbox,PLAYER_HAS_MAIL Current {{ModID}}_GiftTilly.Mail Mailbox,PLAYER_HAS_MAIL Current {{ModID}}_UnlockTheZootShop.Mail Mailbox",
"HostOnly": false,
"Action": "spacechase0.SpaceCore_ShowHudMessage \"You've got mail from Yamay Village.\"",
"Actions": null,
"CustomFields": {}
}
}
},```
zealous lodge
golden basin
#

im showing the hud message only when my mail is in the mailbox

#

but its just not quite working ive gotten the hud message working before though

sleek flint
#

Yes, but that won't work for other people's mail, right?

dusty jackal
#

Hi, is it possible to simulate the harvest action of a player via code?

faint blade
#

Hi guys, long time no see

golden basin
#

no just mine....

faint blade
#

I am wondering if there are modders that would want to talk with me - long story short, I am writing an article about modding and ethics to one of Polish gaming websites, thus, who's best to talk about modding ethics than modders right?

sleek flint
# golden basin no just mine....

Also, I didn't check, but like is there a tile property for the mailbox or something, or is it fully C#? I don't know much about map editing, and I don't have tiled so I can't check myself.

golden basin
#

there is im using it the icon just doesnt work

#

you can get mail but theres no floating icon notification

sleek flint
#

Oh ok, will atleast it's functional

golden basin
#

i figured it out!

opaque field
#

Ahhhhh that's so cool Fellowclown โค๏ธ

golden basin
#

i ned a trigger action for each mail when its deliver

opaque field
#

(high key love seeing when you post stuff )

winged finch
#

Hey!
I found some function that could make my character walk to a certain location:
StardewValley.Pathfinding.PathFindController();

and I think it should have an overload that tells the character to do a certain action when it reaches the end location but I can't really figure out what it actually and how it does things.

Is there a documentation for this kind of thing?

#

hmmm

#

wait a minute

sleek flint
# golden basin i ned a trigger action for each mail when its deliver

Just to be clear, do you want it to only display the icon when any mail or when only your mail is delivered? Because in an effort to procrastinate on both my studying and my own mods, I was gonna take a look for you if doing it in C# wasn't hard and do it myself, but if you don't want all mail anyway then there is no need.

golden basin
golden basin
winged finch
#

Yeah I have no idea how this endbehaviour and the endbehaviourfunction works

golden basin
#

okay so now that I have my custom buildable farm house working completely, with a mail message too. I can move on to fix the other buildings

winged finch
#

Oh Based on what the google AI says (since I can't find a single thing about any of this in any docs) it uses Event data to make something happen to a specific character

opaque field
#

I don't know about using C# for that sort of thing but I th ink at least with Content Patcher it's animations specified in their schedule?

jaunty shuttle
#

Have you checked the modding wiki? Thatโ€™s usually the best source as it gets updated by people very quickly

winged finch
#

but there are certain things I can't seem to really find

#

using ILSpy was way more helpful than the wiki itself

#

it takes a lot of time to find what I'm seachign for though

vernal crest
golden basin
#

i just want ppl to know the mailbox works

#

you think theyll check regardless?

vernal crest
vernal crest
winged finch
vernal crest
winged finch
#

Basically my goal is to make a bot for the game because it was a project idea of mine a few years back, and I thought this would be the mot suitable way to do it.

vernal crest
#

You can still use C# to use schedules though.

#

It's often easier to use CP for a lot of things even when you're a C# modder but you can do everything with C#.

I ask just because if they'd achieve your purpose they'd probably be easier since it's already a game mechanic but if it won't meet your needs I don't intend to try to force you.

winged finch
#

Well my purpose rn is to make an automatic watering bot of some sort.

I gave up on writing my own path finder since the game has one so that's done.

Rn my goal is to figure out in which way I can get the watering can from my inventory, select it, refill it and use it on the selected tile(s)

#

Technically I'm seacing for a way to use an item on a specific tile (which would give me the ability to refill/water plants)

#

Not sure if it can be done through schedulin, I saw there are something to do with animations, and that certain states seem to be affecting player behaviour, but I didn't think it's the right method.

vernal crest
#

Unfortunately we have passed the bounds of my knowledge and my guesses would be nearly as unhelpful as AI. Perhaps looking at sprinkler code for how to identify tiles that need watering might be a start?

winged finch
#

The thing is a few years back I already figured out most of the things, I just never documented it or saved it :/

hallow prism
#

we didn't either

winged finch
#

lol

lucid iron
winged finch
#

I could dod that but

#

I want to make it... realistic?

#

I will probably do that for the time being though

#

I want to do a garden planner of some sort because..... I once did a mockup version and why not...

lucid iron
#

Shrug it's up to u really

#

It is perfectly possible to just call the tool dofunction

winged finch
#

Oh... I can just select an item from invontory and call dofunction on it?

lucid iron
#

But there's often implications with animations

#

In C# you find the item from the player's inventory array (or elsewhere like chest) and probably use some flavor of Tool.DoFunction

#

I don't have decompile open rn so forgive me if i spel wrong

#

I wouldn't bother doing any of this and instead just set the thing to wet and track the water level in the bot myself elsewhere

undone fable
#

psst.. is it possible to make custom eyes (like change the eye-white colour) using fashion sense?

vernal crest
sleek flint
near imp
#

Maybe a complicated question, but Alternate Textures cant handle swapping out specific parts of a tilesheet in a similar way that Content Patcher can, right? I was playing with making a modular collection of fence sprites, and swapping the sprites for the various parts of the fence using Alternate Textures. But from what I could tell, AT needed the whole fence tilesheet swapped, so I end up with a bunch of tilesheets where only one of the fence elements have been changed, and the rest not. Does this make sense to anyone?

hallow prism
#

not really

#

do you have screenshots maybe?

near imp
#

yeah give me a few minutes and ill show what i mean. thanks for taking an interest SDVpetduck

lucid iron
#

AT needs the whole fence sheet yes, what's the goal?

near imp
#

The goal would be being able to swap out (for example) various textures of just the free standing sprite of a fence post, without having to have a duplicate entire sprite sheet for each alternate texture for one sprite. hang on, pictures are coming that will probably make more sense

vernal crest
#

I understood what you meant

#

So like if you want different gate options, you have to duplicate the entire fence rather than just having different gate textures

near imp
#

this is the vanilla fence and ive added numbered labels. when placing just one fence, the game will use the sprite ive labeled 5. ive been using alternate textures to swap out the sprite for number5, but every time i do theres the whole rest of the sprite sheet that isnt needed

zealous lodge
#

Hey guys, I've been looking all around the wiki and moddingwiki, but I can't find the error SMAPI is giving me when I try to load in the interior of a house I'm patching into the map. It's giving me this (I believe this is what's causing it to go wrong): ---> System.Exception: Unable to load map with file path 'C:\Program Files (x86)\Steam\steamapps\common\Stardew Valley\Mods[CP] Blood and Water SDV[NPC]\Assets\Maps\EmilyHouse.tmx'
---> System.InvalidOperationException: There is an error in XML document (45, 27).

near imp
#

so the AT textures end up looking like this; where the chicken sprites represent unneeded and empty duplicates around the actual individual fence sprite that is wanted changed

gentle rose
near imp
#

especially for the fence texture i labeled 5, i end up wanting way more options for it than any of the other fence sprites. and if AT needs the entire fence tilesheet each time, it adds a lot of duplicates or blanks (duplicates if i put the default fence textures in with the alternate one, or blanks if i put something like my errorchicken there)

vernal crest
#

So you could use a CP mod with config options to change a fence style within a spritesheet rather than having to change the entire sheet

near imp
vernal crest
#

Yes that's what happens with CP configs when users have GMCM installed

near imp
#

the default tilesheet is set up right now so that the sprite variations that are likely to be used the most is located there as default, and then AT is used to manually change for example an end of a fence, if you want to extend it all the way over the tile so that it meets up with a building, for example.

vernal crest
#

But AT users aren't used to having CP integration, so you'd have to be very explicit on your mod page about it and also expect confused users to come into the comments anyway, having not read the mod page

near imp
#

but the configuration needs to be for specific and individual parts of a fence, and not a global setting for all fence parts of that type, if that makes sense

zealous lodge
vernal crest
#

Yes, I know

#

You'd use CP to target specific areas on the sheet to change according to the config

#

To use your chicken pictures as an example, you could edit just the second row, third column sprite to swap between those two styles without affecting any others

near imp
#

hmm. how would CP distinguish fencepost 5 between two machines from the other fencepost 5, next to the building, that i want two different textures for, though?

vernal crest
#

Do you mean the exact same sprite index used in different contexts in game?

#

So again using the chicken images, do you mean for example having that second row, third column fence part changing depending on whether it was used against the side of a building or not?

near imp
#

two secs, im mocking up an image to show you

#

(please note, some of the (very nice) sprites are from Shardust's fences, just so thats clear, i cant take credit for their sprites)

vernal crest
#

Okay, no, you can't change that

near imp
#

in this example image, you can see fence type 5, in a use case where i would want four different textures for it, all at the same time. currently done using AT, but leaving those duplicates

vernal crest
#

Not if they are all using the same frame

near imp
#

I think Alternate Textures would need to add support for niche use cases like this, if the dupes/blanks were to be avoided

vernal crest
#

There's no way it can be done at all if they're the same frame

#

Because how is it supposed to know which texture you want to use in which situation?

near imp
#

Oh it wouldnt be dynamically determined, thats for sure. Manually changed

vernal crest
#

When you say "fence type 5" you don't mean an entire spritesheet type, do you? Like iron vs wood vs stone. You mean sprite index 5 of the spritesheet?

near imp
#

it can be done currently by overriding the fence tilesheet using AT, its just not really set up for it, hence the errorchickens

#

ah no sorry, i mean fence part 5, as labeled by me (so a very unofficial number)

#

yes, the index

vernal crest
#

Ok thanks, just wanted to be very sure.

#

No, you can't use CP to do that because all CP can do is change sprite index 5 separately from changing 3 or 4, for instance. It can't change the texture for each instance of fence.

near imp
#

Thats what I thought too.

vernal crest
#

And if those instances of index 5 were connected to each other, AT couldn't do it either.

#

So yeah if you want people to have such granular control, you will need to continue as you have been.

#

It's a cool idea. I would download it going "that's so cool" and would then get too confused in game as to how to set it up and would never use it xD

#

I do that with modular stuff all the time

near imp
vernal crest
#

Does AT let you individually change each tile of fence?

near imp
#

yep!

vernal crest
#

Oh, okay. I didn't know that, sorry. I thought it would be one instance of connected fence tiles.

near imp
#

Its actually pretty cool how far this half-baked idea has gotten using the AT framework, since it doesnt seem like it was really designed to do this. But it kinda sorta works

#

its entirely possible this modular fence idea would stay an unpublished mod i suppose. might be too user unfriendly as you say

#

each fence sprite variation is labeled in AT using its naming feature, so that helps a bit with selecting the right texture, but it might not be enough

#

this is how it looks in the AT menu currently when i go to change one section of the fence

vernal crest
#

Nice, that's some good naming

#

That would help a lot

near imp
#

so it tells you that its for a gate on the east (right) side for example

vernal crest
#

Yeah that's really good

near imp
#

there you see my "errorchickens" in action, they each represent a tilesheet that changes a different form of the fence

#

it would be for the hardcore decorators / aesthethiciologist i think, its not plug&play in the sense that the fence will look quite right when first plopped down.. but its more or less a one time effort to change the fence alternatives and get things set up looking quite nice (at least in my opinion). having more alternatives for how the fences look makes them seem a lot more purpose built

vernal crest
#

I think it's very cool and worth publishing if you feel up to it

lucid iron
#

what if u use connected textures Bolb

#

instead of making fence

#

(yes i am once again peddling

vernal crest
#

What are connected textures?

lucid iron
#

it's the thing for making modular countertops automatically pick the right variant

vernal crest
#

Ah yes I remember that

lucid iron
#

the main difference is that unlike fence you can actually just have 2 different furniture connect with each other

near imp
#

I need to reach out to Shardust first and foremost, seeing as the fenceposts are based from their textures. They have been edited a bit sure, but my editing skills are better than my "making sprites from scratch skills", so it wouldnt look at all as good without some of their fence sprites as the original framework. honestly im a little nervous to do so, what if they tell me to go shove it or something SDVpufferweary

vernal crest
#

Will it work for stopping animals wandering?

lucid iron
#

i think animal path finder checks the passable

#

the main thing you can't do is add a gate tho NotteThink

near imp
#

oh ๐Ÿ™

lucid iron
#

but i suppose u can make a piece that is NPCPath banned via the tile property

#

and passable to players

vernal crest
#

No gate opening logic, just always open

lucid iron
#

there is a manual toggle open thing on draw layer actually

#

tldr u can do it but it's gonna be somewhat complicated Dokkan

zealous lodge
#

Hey guys, I was hoping on some advice on how to go about an aspect of the mod I'm trying to make. For 2 characters, I want to heavily change their schedule and dialogue (Emily and Sandy), would it be better to patch all that change into the game or to "disable" original Sandy and Emily and add them as a new NPC?

lucid iron
#

Are they still supposed to be Emily and Sandy storywise

zealous lodge
#

They are the same in looks and character, but not much else. Emily for example, I want to give her a new house and schedule as well as making her not-dateable so that's already changing like 50% of her character right?

vernal crest
#

Hmmm. Disabling the originals is probably safest because other mods will still be able to edit their schedule, sprites, portraits etc but as long as they aren't unlocked the player won't see any of that. You'll still need to do huge amounts of changing the base game to remove them and add your replacements instead, but the incompatibility with other mods will be smoother, imo (your mod will be so incompatible with so many mods).

If they aren't meant to still be Emily and Sandy, don't touch either of them at all and just make new NPCs.

zealous lodge
#

Hmm, honestly I hadn't even considered that if my mod works decently other people may be interested in testing it out lol... Inspiration just kind of struck me so I've been making characters and storylines and houses and stuff... Maybe I'll leave Emily be and just change Sandy (and give her an OC wife haha)

vernal crest
#

If you want other mods to still be able to affect them both, just edit them rather than disabling them. You'll have to do a lot more individual mod compatibility to allow some mods to make changes but not others, but it'll be usable with other mods.

#

Oh if you were just planning on doing this for personal use then definitely just edit them rather than disabling and making new NPCs

#

Nooo how will Sandy marry Emily then /hj

near imp
#

making mods for the public is definitely a whole nother thing than just something for yourself. theres so many more considerations when a bunch of people might use a mod with all their different mod setups

zealous lodge
#

haha, I made Emily and Sandy a kiddo, I felt like their friendship/storyline was always way more interesting than Clints slightly creepy crush storyline.

zealous lodge
#

:)*

vernal crest
#

(Clint is only fixated on Emily because he's struggling to accept that he's gay but don't worry he will fall in love with Harvey one day... Mod by Aba coming one day before the heat death of the universe probably)

near imp
zealous lodge
vernal crest
lucid iron
near imp
#

i may cough doth be projecting a smidge with my going on 10+ assorted little CP mods that change a minor thing here and there and that only i will probably ever see though SDVpufferdead

lucid iron
#

It's going to be annoying as hell to install midsave if they are a new NPC entity and thus have a different friendship tracked

vernal crest
#

Excuse me chu I actually recommended both thank you very much xD

#

But also anyone who installs a "this massively changes a vanilla NPC to be nigh unrecognisable from their accepted canon" mod midsave is a fool! A fool, I say!

near imp
vernal crest
#

(I would totally do it but I would not complain to the mod author about it breaking things.)

near imp
#

"no -sensible- person would install this in their current situation"

#

meet: the general public

vernal crest
zealous lodge
# vernal crest Go for it! I'd definitely be interested

I mean I definitely am a waaay way beginner. I once made another custom NPC+house, but that was just adding my sister to the game as an NPC, but this does give me a bit of self confidence that I should just see if I could make something share-worthy!

vernal crest
#

I enjoy having users report errors with my mod only for them to not have my mod installed. I am unfazed by users lol

lucid iron
#

As for what u need to edit it'd mainly be

  • character data entry
  • portraits and sprites
  • daily dialogue
  • schedule + associated string assets and animationz
zealous lodge
near imp
vernal crest
lucid iron
#

Stopping a mod like CFDE from adding dialogue is a little annoying though, if that matters then you'd have to do your EditData late and then just overwrite every key by hand

near imp
lucid iron
#

But i guess it's down to question of "if they are this different from vanilla maybe they should just be OCs?"

near imp
vernal crest
#

That being said, Kantrip made a vanilla NPC mod that significantly changed the NPC (Older Sebastian) so it is possible

#

You just have to be aware of the ramifications, including lower popularity because people will be less willing to try a mod that clashes with their already beloved mods

lucid iron
#

Yeah it is also kind of not that different from gender swapping vanilla character kind of mod

vernal crest
#

Oh yeah like Pierre to Piper

lucid iron
#

If another mod calls piper pierre then that's their problem

vernal crest
#

Man I am having to make so many personal edits to deal with that

#

SO MANY

zealous lodge
# near imp Thats what I was thinking a bit too. At some point do they just share a portrait...

That's my wife you're talking about! I mean, the main change for Emily would be that because she's married to Sandy, both live together, which means the schedule changes since they come and go to a different home. So at the core, neither character really changes, but practically it means rewriting like 50% of their code, so it was more from the technical side. You are right though, I could just as easily add a new character instead, I'm just a bit worried it might feel kind of detached?

lucid iron
#

Sometimes the point of a fan work is that this is a conversation with canon material so u should do it even if compat woes

vernal crest
#

I don't know why I decided that my error-free playthrough was going to be the one with Piper in it PufferSob

lucid iron
vernal crest
near imp
#

what is an error-free playthrough? SDVpufferblargh

vernal crest
#

Uh oh I have reached the "Aba is nonsensical" time of night lol

vernal crest
lucid iron
#

I'll have u know i drop everything in game to fix any red error logs MikuBear

zealous lodge
#

OH my God am I bothering you guys at night!? It's just evening over here, this question wasn't that important

lucid iron
#

Timezones

#

It's cold as hell out so im in bed at noon on me phone

near imp
#

its 16:25 here

vernal crest
stable crater
#

Changing Emily very throughly might be problematic since she has significance in the vanilla story, like getting the sewing machine and allowing you to use the sewing machine in their house. You gonna just yank those away?

near imp
#

wait no, 17:25

vernal crest
#

It's 2:25am

vernal crest
stable crater
#

18:25

lucid iron
#

So the sewing machine thing gets text changes at most

near imp
patent lanceBOT
vernal crest
#

You quote the weirdest things sometimes Atra

near imp
#

Oh no I forgot about Finland, please forgive me SDVpufferwow

zealous lodge
calm nebula
lucid iron
#

Eh only 1/4 of the time

#

And it's selection bias cus I obviously play with all of my own mods installed Sleepden

near imp
#

thats a pretty good percentage i think

lucid iron
#

It basically matches the % of C# mods on me list that r my own mods

near imp
#

hang on a minute, are you Mushymato?

lucid iron
#

Yeah