#making-mods-general

1 messages · Page 367 of 1

ashen urchin
#

Ouch, looks like I need to change the map offset to get the big rock back in place🤧

#

Is it possible to do it this way?

uncut viper
#

after a save is created the rocks will not move

pale pecan
#

Hi! So follow up to a previous question, when an NPC hasn't been unlocked yet, can you still modify their data?

#

Like let's say you want to spawn in an NPC with a starting friendship based on how many Qi quests you did prior to them arriving or something. Can you change your friendship with them even when they're not unlocked, or would you have to apply that AFTER they're unlocked?

#

(example)

uncut viper
#

if they are not unlocked then they do not exist

pale pecan
#

Gotcha, ty!

wanton rivet
ocean sailBOT
urban patrol
#

!tilesheetclimbing

ocean sailBOT
#

When creating or editing maps in Tiled, one common error is tilesheet climbing, marked by red text containing "invalid tilesheet path '../../..'. This is caused by SMAPI not being able to find the tilesheets needed by the map file. To prevent this error, make sure that you have a copy of all necessary tilesheets in the folder containing your WIP tmx file. Copies of vanilla tilesheets can later be deleted, but must be present while working on your map.

If you get this error with a completed map, an easy way to fix it is to open your tmx file in VS Code or a similar text editor, find all of the places with <image source=, and remove the filepaths to so that only the tilesheet names remain. For example, if the code says <image source="Content (unpacked)/Maps/townInterior_2" width="512" height="64"/>, change it to just <image source="townInterior_2" width="512" height="64"/>.

urban patrol
pale pecan
#

Is there a best-practice recommended way for a mod to check if it is 'new' on a save (is being loaded onto a save that didn't have the mod previously)?

#

Not necessarily the 'first time' it's been on a save, just if it didn't have it the last time that save had been loaded.

#

The way I was thinking was just have a mailflag on the player for "this mod has been loaded" that is applied if the player didn't have it already, but idk if mailflags disappear from the save when the mod providing them is removed (which would be ideal in this case).

outer verge
#

how might one make a custom npc animation with a sprite who goes out of typical bounds? I want to do an animation but it the sprite is like 3* the length of a normal sprite

pale pecan
# outer verge

(the humble green slime when you deliver 33550336 damage)

tender bloom
#

Mail flags can mean anything

#

You can see if there’s a SMAPI event OnGameClosed maybe??

#

It wouldn’t work for force quits though I think

pale pecan
#

Another thought I had was basically making use of Stardew/SMAPI error handling so that loading a save without the mod breaks something in the file in a way that doesn't get it removed but ALSO doesn't let it work when the mod is added in again, so that OnSaveLoaded can check "hey if this bit of data is either broken or missing, consider this the first time the mod is being added"

#

or storing the last in-game date the save was loaded with the mod every night, and if it's either nonexistent or any day other than the previous day, count it as a new mod addition

#

That approach seems maybe more intuitive, was just wondering if there was some built-in way to track the mods a save was loaded with previously.

urban patrol
outer verge
#

spacecore? I’ll look into it, Ty

urban patrol
wanton rivet
vernal crest
vernal crest
ocean sailBOT
#

Important note: Your computer username may appear in the log. If your username is your full name, please be aware of this before uploading it.

Please share your SMAPI log file. To do so:

  1. Open this page: smapi.io/log.
  2. Follow the instructions at the top of the page to upload the log file. (Don't copy & paste from the console window!)
  3. After uploading, it will show a green box with a URL to share. Post that URL here.

Please do it even if you don't see any errors. This has useful info like what mods and versions you have, what the mods are doing, etc. If the issue didn’t occur in your last session, please load the game to the point where the issue occurs, then upload the log.

outer verge
ocean sailBOT
#

Log Info: SMAPI 4.2.1 with SDV 1.6.15 build 24356 on Microsoft Windows 10 Enterprise, with 4 C# mods and 1 content packs.

pale pecan
#

(gl with your mod!!)

vernal crest
vernal crest
outer verge
#

sorry if this is obvious, but what does this mean? I actually had a 'changes' but ended up removing it because everytime SMAPI would tell me there was an error with it lol

gentle rose
#

could you send your json?

#

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

outer verge
#

nothing actually lol, i was following with a custom npc guide and they didn't have one

gentle rose
#

I think we'll have to see your json to figure this out tbh

#

also, can you link to the guide you're using?

outer verge
#

uh oh json content patcher is mad at me LOL

#

this is the template

gentle rose
#

oh that's very out of date

#

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

outer verge
#

ooh, thank you!

#

hopefully my npc will stop getting stuck in walls then

gentle rose
#

I'm honestly not convinced what you're doing would have worked in 1.5 either but if you follow one of these you should have the correct setup anyway

outer verge
#

'coding' is quite difficult lol

spice inlet
#

Owing to @lucid iron we might be getting PIF furniture buildings. SDVpuffersquee
Crazy to think about

#

(the castle is from Pink Sweety Amusement Park btw)

wanton rivet
brave fable
#

is it possible to determine whether a player just used a totem warp in OnWarped SDVpufferthinkblob

#

for the purpose of skipping a method call if they did

slow basin
#

might go check myself wonder if that mod would look cute in me list lmao

wanton rivet
ocean sailBOT
#

Log Info: SMAPI 4.2.1 with SDV 1.6.15 build 24356 on Microsoft Windows 10 Enterprise, with 4 C# mods and 1 content packs.

wanton rivet
slow basin
#

for mod help we have a section in server for that, this is more for making mods

fresh prairie
#

Hej
I am making an Esperanto translation mod for Stardew Valley. I already translated the most important things (all items, all letters, some dialogues and events, ...). However I still have the problem that Stardew doesn't have the Esperanto letters: Ĝ Ŝ Ĉ Ĥ Ĵ Ŭ. I have tried to add my own font several times but never succeded.
I can't even succed with adding the Russian font (the most simple non standard font the game includes) as the Esperanto font to my mod. I followed the wiki step by step and also tried a few variations but it never works. Smapi is looking for the following .xnb file in ...\Stardew Valley\Content\Fonts\Esperanto_0.xnb

TLDR: I am trying to add a font to Stardew, but it is looking for a .xnb file in the game files instead.

Can anyone help me?

ocean sailBOT
slow basin
#

for help share the mod log using the log checker thing!

#

i dont think they like if you embed the log into discord

iron ridge
slow basin
#

aa ok

gentle rose
spice inlet
slow basin
#

😭

#

oh well super cute

gentle rose
fresh prairie
gentle rose
fresh prairie
ocean sailBOT
#

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

finite ginkgo
#

Adjust the FontFile in your AdditionalLanguages entry

wanton rivet
ocean sailBOT
#

Log Info: SMAPI 4.2.1 with SDV 1.6.15 build 24356 on Microsoft Windows 10 Enterprise, with 4 C# mods and 1 content packs.

wanton rivet
#

Why can't I enter the NPC house that I created?

fresh prairie
hallow prism
#

then possibly you need to target the same thing with your loads?

#

{
            "Action": "Load",
            "Target": "Fonts/{{ModId}}/Esperanto",
            "FromFile": "assets/Esperanto.fnt"
        },
        {
            "Action": "Load",
            "Target": "Fonts/{{ModId}}/Esperanto_0",
            "FromFile": "assets/Esperanto_0.png"
        },```
Like that ?
hallow prism
wanton rivet
#

I've added warp but when I right click on the door, nothing happens.

hallow prism
#

no error in log?

wanton rivet
fresh prairie
hallow prism
fresh prairie
hallow prism
fresh prairie
hallow prism
#

i dont know! i'm not sure exactly of what you tried and the different results

wanton rivet
hallow prism
#

!json of how you're adding the location

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.

wanton rivet
#

Content.json file?

hallow prism
#

if it's where the info are, yes

fresh prairie
#

But yeah. It kind of works now.🤩

#

The thing is that it is now changing the font for all text for instance "Tago 8 de Aŭgusto, Jaro 2" uses a different font and it doesn't show the ŭ correctly.

hallow prism
#

!json pls

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.

hallow prism
#

(i prefer no pings)

#

ok hum

#

i honestly don't remember how CustomLocations are working, since it's deprecated (basically it works but isn't the suggested way of adding things)

wanton rivet
#

So is there something wrong?

hallow prism
#

i can't tell, because i don't remember!

#

i suggest moving to up to date practices

#

    {
      "Action": "Load",
      "Target": "Characters/Cataline",
      "FromFile": "assets/NPC/CatalineSprites.png"
    },
    {
      "Action": "Load",
      "Target": "Portraits/Cataline",
      "FromFile": "assets/NPC/CatalinePotraits.png"
    },
    {
      "Action": "Load",
      "Target": "Characters/Cataline",
      "FromFile": "assets/NPC/CatalineDialogue.json"
    },```
Here you load twice in Characters/Cataline, which cause another issue (unrelated to the map)
```json
    {
      "Action": "EditMap",
      "Target": "CatalineHouse/Cataline",
      "AddWarps": [
        "19 7 Custom_CatalineHouse 12 23"
      ]
    },

Here i'm not sure what this patch is doing/supposed to do.

wanton rivet
hallow prism
#

ok! i prefer no ping on reply

ocean sailBOT
#

Log Info: SMAPI 4.2.1 with SDV 1.6.15 build 24356 on Microsoft Windows 10 Enterprise, with 4 C# mods and 1 content packs.

gentle rose
#

shouldn't it be Somero?

fresh prairie
#

Sorry, I mistyped. It is actually Aŭtuno, meaning fall.

#

Thanks a lot for your help. I tried to at these dam Esperanto letters for two years now.

wanton rivet
ocean sailBOT
#

Log Info: SMAPI 4.2.1 with SDV 1.6.15 build 24356 on Microsoft Windows 10 Enterprise, with 4 C# mods and 1 content packs.

hard fern
wanton rivet
#

Where can I add fields?

rotund blade
#

!SMAPI

ocean sailBOT
#

SMAPI is the mod loader for Stardew Valley. It loads mods into the game, provides APIs for mods to use, intercepts errors, and backs up your save files automatically.

See the player's guide to using mods for more info.

rotund blade
#

!CJPcheatmenu

iron ridge
harsh radish
#

Hi! Is it possible to animate a house tile at a specific time using only Content Patcher?

drowsy pewter
#

hi, no content patcher is not designed for that

#

Or, it might be possible if you use CP to patch the map itself to change the tile out for an animated one. You can give that a try but I'm not sure if it will work

#

If not, then you can animate using spacecore and use CP to set which time it's animated at

stark spindle
#

Hey so I just released my first mod and rather instantly got asked about putting it on youtube / translating to chinese. I cant think of a reason why this would be a bad thing but Im just suspicious of the speed at which that was asked. Is there some downside to this I dont know?

whole raptor
#

Translators often ask quickly (farming downloads), nothing bad with that really (unless it's fully machine translated/ai)... first time seeing anything about youtube tho...

winged crow
ocean sailBOT
#

Log Info: SMAPI 4.2.1 with SDV 1.6.15 build 24356 on Microsoft Windows 11 Pro, with 138 C# mods and 290 content packs.
Suggested fixes: One or more mods are out of date, consider updating them

stark spindle
dusky sail
#

You can also check the translator's nexus page to see if they have previous work that's been well received

#

Just as an extra way to quell anxieties

harsh radish
drowsy pewter
#

CP can do patches at specific times, and it can also change map tiles, so yes you can combine both features

harsh radish
#

ok thx a lot for the help!

gentle rose
fossil osprey
#

It's probably a key code conflict

fresh prairie
#

But for the other font it is working. I think it could be fixed if I also load an Esperanto version for that one, right?

royal stump
#

(or they need to be on the Paths layer specifically, if that's the issue)

winged crow
#

Yes, I made sure that was the case

The tile 34 is on the paths layer, and the object has the custom propertie, also in the paths layer (for objects)

#

there are a couple of trees that do spawn, what I do not get it's the inconsistency of the issue

royal stump
#

SDVpufferthinkblob I'd guess some of those tiles have the issue and some don't, but the log doesn't specify which tiles have issues, so it's hard to check

winged crow
#

indeed

gentle rose
winged crow
#

can I share the .tmx file? I'm checking every tile and property with no luck, some trees spawn, some don't, I'm at a loss

tribal ore
#

Late to this, wem, but I added this in MarryMe. If you can't find another solution, I could maybe release SweetActions (breakup, dating, engagement actions) as a separate mod

torpid sparrow
tribal ore
balmy valve
#

AAAAAAHHHHHHHHHHH

#

PEOPLE LOOK UP TO ME!!!!

#

I HAVE RESPECT!!!! IM INSPIRING PEOPLE!!!! OH MY GOSH

#

THIS HYPERFIXATION MIGHT BE THE BEST THING THAT'S EVER HAPPENED TO ME!

gaunt orbit
#

> SVE
> on android
I'm going to have nightmares about seeing those together in the same sentence /jk

crude plank
#

it's just missing multiplayer

lucid mulch
#

I don't want to think about the fact that android does have multiplayer now and doing multiplayer modded mobile

crude plank
#

it is truly nightmare fuel

slow basin
#

question

#

ik this is like this so the game C# game auto recolor or something, but is that hardcoded or can i change the shape of the white flower head

crude plank
#

the second one is a mask and yes you can change the shape of the mask

slow basin
#

oh thank goodness

#

ty scarlett 🫶

winged crow
slow basin
#

wrong channel le excuse moi

tribal ore
#

Alright, can I add a file that is editable by other mods via content patcher (e.g. data/NPCNames.json) without registering it as a dictionary via C#?

#

I have a token (supported suitors) that is just declared in my content.json. It would be really nice if other mods could edit this, so perhaps I could read the values in this token from a file instead

brittle pasture
#

loading it as a string/string dict should work I think

slow basin
#

im gonna go see what all counts as a resource in another mod and finish those up so i can finish my first half of me mod

brittle pasture
#

if that doesn't work you can probably hijack Strings/StringsFromCSFiles/etc.

craggy goblet
tribal ore
#

I'll see if I can figure out the trickery. StringsFromCSFiles is a fun idea

#

Thank you

slow basin
#

id make edits for earthy and other mods but imma prob just purt "you can edit this for your preferred recolor if you'd like i do not mind" in my permissions thing

#

the only other recolor resource redo i plan on doing after this is a personal edit for blue grass so its cuter llamayawn_ani

wanton rivet
#

Heelo guys i want ask , Why can't I enter the house I built?

torpid sparrow
#

did u add a warp

slow basin
#

you have to add tiledata

#

if you didnt

#

if you did you might have missed a word

wanton rivet
#

Yes i did but When i klik the door , The Indoor can't be load

torpid sparrow
#

!log

ocean sailBOT
#

Important note: Your computer username may appear in the log. If your username is your full name, please be aware of this before uploading it.

Please share your SMAPI log file. To do so:

  1. Open this page: smapi.io/log.
  2. Follow the instructions at the top of the page to upload the log file. (Don't copy & paste from the console window!)
  3. After uploading, it will show a green box with a URL to share. Post that URL here.

Please do it even if you don't see any errors. This has useful info like what mods and versions you have, what the mods are doing, etc. If the issue didn’t occur in your last session, please load the game to the point where the issue occurs, then upload the log.

torpid sparrow
#

whats the error

slow basin
#

omg theres not as many resources as i though

#

and yet

#

i havent done any of them somehow

#

😭

#

i dont wanna draw more grass/weeds

#

begrudgingly begins

#

theres so many rocks idk which one is the right rock omg

ocean sailBOT
#

Log Info: SMAPI 4.2.1 with SDV 1.6.15 build 24356 on Microsoft Windows 10 Enterprise, with 4 C# mods and 1 content packs.

torpid sparrow
#

!json can you send wherever you loaded your custom location

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.

torpid sparrow
#

I dont think you loaded the actual house as a location

#

you added "Custom_Cataline" but not the house

wanton rivet
#

So, what should I do

torpid sparrow
#

{
"Action": "EditData",
"Target": "Data/Locations",
"Entries": {
"Custom_Cataline": {
"CreateOnLoad": {
"MapPath": "Maps/Custom_Cataline"
}
}
}
}

You have to do this for the house as well

#

i dont see the warp to the house, so i assume you have the warp in the TMX file. But it doesn't look like the names are matching up either

#

you have both CatalineHouse and Custom_CatalineHouse

gaunt orbit
lusty halo
#

I have a Content Patcher question. I have this Overlay code for decorations that can be optionally turned off inside buildings, otherwise it shows both outside and inside, and I'd like to know if I can combine it in a single paragraph, for example with Dynamic tokens, instead of two separated ones (one for outside, one for inside) I've tried things already with Dynamic Tokens but nothing worked (I am bad at coding). Here's the revelant lines of code:

Section one: "When": { "FoliageOverlay": "True", "IsOutdoors": "True" }, Section two: "When": { "FoliageOverlay": "True", "FoliageFlowersIndoors": "True", "IsOutdoors": "False" },

gaunt orbit
#

What is your update rate set to?

#

For the patches that use the token

wanton rivet
half tangle
winged crow
#

I've created a text box with a simple message, the text displays, but the heart emoji kinda works, it shows as a heart, but followed by a 3, how could I make it so it only looks like a heart?

urban patrol
#

remove the 3

#

< is one of the characters that gets automatically replaced

winged crow
#

oooh just with a < it will display as a heart?

urban patrol
#

yep

winged crow
#

awesome thanks!

lusty halo
# gaunt orbit What is your update rate set to?

Mine? it's on LocationChange, so it only work when the PG move in and out buildings. The main problem I would like to solve is giving the -choice- of having the Foliage shows up indoors to the player, while keeping it to one single paragraph, not two, otherwise I'd just set up a permanent DynToken like I did with the Seasonal Foliage in my old mod.
Ugh, I fear I am not explaining myself very well, sorry, English is hard enough without the code-talk...

torpid sparrow
#

does anyone know where the flower sprites are

gentle rose
torpid sparrow
#

flower crops

gentle rose
#

are they not in the same place as other crops?

torpid sparrow
#

err i dont think so

slow basin
#

i think their on spring objects if you mean poppys and stuff

torpid sparrow
#

yaay

#

thanks

slow basin
#

yw 🫶

gentle rose
#

oh right they're forage, not crops haha, my bad

slow basin
#

it happens to the best of us

torpid sparrow
#

god the springobjects sheet is a nightmare

#

found them but my eyes hurt

slow basin
#

truuue

#

im trying to retexture everything

#

and im slightly overwhelmed every time

obtuse wigeon
#

I appear to have come across an issue where my paths added by content patcher allow me to pick up artifact spots? I think its cause by my mod anyway cause I don't remember any of the other mods causing this?

hallow prism
#

how are the paths allowing that?

#

when you pick them you pick artifact spots instead? else?

obtuse wigeon
#

I'm just looking for other artifact spots to see if vanilla paths do it, finding them is kinda hard

blissful panther
#

It shouldn't let you place it there at all...

obtuse wigeon
#

I think it's Happy Home Designer actually, both vanilla paths and my paths replace artifact spots when a catalogue is open, I tried both my custom catalogue and a vanilla catalogue and it does that same for both

#

when the catalogue is closed however, it doesn't allow me to place paths on there

old edge
#

hello

#

If I want a map patch to always apply late so that it won't be overlapped by another mod is it "Update

#
"Priority": "Late + 10",
tribal ore
#

"If you need a more specific order, you can use a simple offset like "Default + 2" or "Late - 10". The default levels are -1000 (early), 0 (default), and 1000 (late)."

#

It doesn't explicitly say that 1000 + is bad, but it also doesn't show an example of adding to that number so... idk

stark spindle
#

for loading blank jsons should you be loading them early?

tribal ore
#

Since Events/Bathhouse_Menslocker doesn't actually exist in vanilla. You need to create it as an asset (by loading from blank.json) before you can editdata on it later. If that makes sense

stark spindle
#

ok but for compatibility do you need set the priority on them so i dont blank out other mods?

uncut viper
#

you can use Late + Whatever

#

@old edge

slow basin
#

does anyone have a link to or know how to force a meteorite

tribal ore
uncut viper
#

that said if someone does Late + 11 you will be overwritten SDVpuffersquee

tribal ore
uncut viper
#

not without C# anyway

stark spindle
slow basin
#

oh i thought there was a console commmand

uncut viper
#

also yes always Load blanks with Low priority

#

oh, meteorite for testing? im not sure then

slow basin
#

ah its ok ill find it somewhere :3

uncut viper
#

apparently there is debug setFarmEvent meteorite

slow basin
#

OH thank you sm

#

🫶

#

oops caps

uncut viper
#

means its like most console commands

#

most (all?) of them dont output to the console. they just work

slow basin
#

Oh ok thank you

#

i was worried i unputted wrong

proper jolt
#

Excuse me AA_Yor_Wave . The last line in the picture. I looked in the manifest I was updating and couldn't see where there was a Shop |[shopID] to change Keqing_Think . For context, it was a mod allowing different items to be bought at the normal shops (like prismatic shards from Clint). Am I missing something?
(It looks like the conversion went okish but a bit rough going KEKW)

uncut viper
#

that seems to be referring to TileData in maps

#

if the mod previously added a map patch to add a tile to click on to open the shop, it needs to be updated

proper jolt
#

Ok Noted

raw oxide
#

hello when making a content patcher furniture pack do i need a front png ?

proper jolt
#

ty \o/

slow basin
#

woohoo it worked it did not land in the perfectly cleared patch i made for it though, because its a very rude space rock (i had to go hunting)

lusty halo
#

Here's a screenshot of the code as it currently works (as writing it down in the chat would look weird since it's kinda big). To repeat myself, I want to give players the choice of having the decor show up inside buildings or not. First one only shows the decor outside, second it also shows inside buildings when the players choose "FoliageFlowersIndoors": "True" in the settings. I wanted to see if I can combine the two paragraph blocks into a single one with different tokens (like Dynamic ones), but it's either impossible, or I am just bad at Tokens. 🥴 (For some weird reason I like to have as fewer code blocks as possible.)

uncut viper
proper jolt
#

Alright. I'll take a peek. Thanks again AA_Gabriel_Bow

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.

uncut viper
#

(particularly, the smapi.io link in there for uploading entire json files)

lusty halo
#

Okay, I downgraded the json so it only shows the important bits (yes it still works I checked). Can I combine these two code blocks into a single one, perhaps using Dynamic Tokens, or it's better if they stay separated? If it looks like a foolish idea, feel free to tell me not to bother with it, I am bad with coding so I glady accept constructive criticism. SDVpufferthumbsup https://smapi.io/json/content-patcher/729775cff0304d3c80c7a70b83c939a0

uncut viper
#

if you use the Merge token i imagine it should work fine if you do "Merge: {{IsOutdoors}}, {{FoliageFlowersIndoors}}": true as that means the condition will be true if either you're outdoors or they have indoors enabled. if both of those things are false then the When condition will not match

#

im confused why you have a UseMod config at all though?

lusty halo
# uncut viper im confused why you have a `UseMod` config at all though?

It's so the mod can easily be turned off without having to turn off every single choice. I have several mods that can work together or can work with other people mods (like the decor mod can be used with other craftable retextures) so it's easier if there's a global off switch for my mod(s).

uncut viper
#

there is already an option for turning off an entire mod though, it is called uninstalling it

harsh radish
#

Hello! I'm totally out of ideas for dialogue lines, any tips for getting creative again?

hallow prism
harsh radish
#

That's great, Thx a lot!

lusty halo
#

Anyway I'll test the Merge option after dinner, thanks for the suggestion!

slow basin
#

i need to add a config for my individual items later for my resources huh

#

ill remember to do that later

chrome temple
#

So I'm making a mod that's basically a stripped down SDE, with just Claire, Susan, Dusty and some food/fish/recipies
I don't have much modding experience but I've come a good way in it, but hit another snag
I've gotten Emerald Farm exterior to work properly, but neither Susan or Claire are present in the game yet (I've also synched up all the code and assets I have a hint of needing, so that should be working)
Also the interior of Emerald Farm doesn't load when I try to walk in, which should be possible even on day one with NoClip activated to get there
Also neither Claire or Susan show up in LookUpAnything, unlike day one of SVE where they do, so they aren't loading in for some reason, but I'm also not getting an error.
Here's my SMAPI, complete with patch summary:
https://smapi.io/log/3cdb0e72c99444bf8fd449633903622d

ocean sailBOT
#

Log Info: SMAPI 4.2.1 with SDV 1.6.15 build 24356 on Microsoft Windows 11 Home, with 9 C# mods and 1 content packs.

chrome temple
#

This is just my modding setup 😅
And yeah I need to do something about the festival Json's too, and I'm not sure what to do about those yet either, but those festivals are far enough off in the save I'm playing now that they're low priority

urban patrol
#

the festival fix is easy, it tells you you need to specify an Action

chrome temple
#

Yeah, I just need to poke around for how and where
I could just compare it with another festival to figure that out and it'd probably be like 2 seconds, I've just been poking at trying to get the characters to work

uncut viper
#

no its literally just saying you have no "Action" field so content patcher doesnt know what you're even trying to do for the patch

#

theres no Load, no EditData, nothing

urban patrol
#

it’ll likely be “Action”: “EditData”, but i don’t know since i haven’t seen your code

proper jolt
#

Sorry. One last thing. I'm using Notepad++ to look at the .tmx files. Is that right or is there another way? Cuz I'm reading the wiki and it seems different to how I see it monkaHmm

uncut viper
#

i mean, you can, but a tmx is a map file. you're meant to use Tiled when doing actual map editing

proper jolt
#

Ok 😂 . I think I'll rest and look later XD

#

Thanks again happypeepo

chrome temple
#

{, then "Changes": [
then it's just a very stripped down version of the start of the SVE file

chrome temple
#

Oh gdi, thanks

uncut viper
#

and the one at line 60 has no action field, as the warning says

#

or target, for that matter

chrome temple
#

Ooh okay, so it should be there before the append operation like above

#

(above that, that is)

chrome temple
urban patrol
#

outside and inside will be different maps and different locations in the game data

#

[[Modding:Maps]]

urban patrol
#

take a look at this to get a general sense of how maps work

lusty halo
#

@uncut viper The Merge code works perfectly, thanks so much! SDVpufferparty SDVpufferheart I spend most of my time drawing the animated hair for Fashion Sense so I often forget how Content Patcher works, ahah!

calm nebula
#

(We love your hair!)

lusty halo
#

(Thank you so much!)

gentle hemlock
#

Hello my lovely people, I have a few questions for anyone who might point me in the right direction :3

So, I have all the required things setup (ive previously modded for a different game with json and c#) Im just a little confused on how i would start by making a simple accesorie (Like a Cat Ear Headband or Mask Etc.) I'm new to Stardew Modding but not new to the coding languages given. So any help would be apreciated! and thank you ahead of time.

whole raptor
#

You probably want to take a look at Fashion Sense framework

gentle hemlock
#

Ah yes i have heard of that. I will check into this! Thank you.

brittle pasture
#

if it doesnt go beyond vanilla dimensions it can be a content patcher mod

#

but tbh most people probably consider being available via the FS mirror a plus

gentle hemlock
#

Hmm, I do not plan on making anything beyond the vanilla dimensions. Well not yet at least...I would like to start small.

#

Another question: Does it matter how i have the sprite sheet setup? For example, the object in a different order then it would appear in game?

brittle pasture
#

in most cases no

tardy adder
#

Hewo I have an inquiry...
[game] Failed parsing condition 'WEATHER Target Rain GreenRain': no location found matching 'Target'

-> why?

This is a Condition for NPC Home entry, and it has a normal default... and I can't get it to happen in my saves just others ><

brittle pasture
#

(stuff like furniture rotations/etc. will expect the sheet to be ordered in a certain way)

chrome temple
#

(apparently the solution is not "try to load it in like a tbin or tmx file in the content.json", I did try that)

urban patrol
#

you shouldn't be working with XNBs, for maps you should be using .tmx or maybe .tbin

urban patrol
chrome temple
#

SVE has all three

brittle pasture
#

SVE is an old mod and does some no longer best practices stuff

urban patrol
#

i would not recommend looking at how SVE does things because it's very complicated

brittle pasture
#

(CP can load xnbs if you feed it)

chrome temple
#

I mean I'm aware of this, but I'm working directly with assets from SVE, which is the problem

uncut viper
#

i would also absolutely not recommend trying to trim down SVE into a smaller mod without understanding how to make a mod normally in the first place

gentle hemlock
#

Seems i have done something wrong oops

chrome temple
#

So I have to work with what it gives me

tender bloom
#

Are you trying to edit sve?

#

If so, which part?

chrome temple
tender bloom
#

Well, the choices in that case are a bit unfortunate—either learn the old, no longer used SVE format to understand how the original assets work. Or convert it to a newer format that other people know and can give advice on.

brittle pasture
urban patrol
#

as it exists in your mod folder

tender bloom
#

Otherwise check the manifest

uncut viper
#

think the actual problem there is the typo in the uniqueid

#

unless it really is spacechase0r with an r at the end?

chrome temple
brittle pasture
#

(obligatory do you need JA in 2025)

uncut viper
#

(the answer is no you dont)

gentle rose
#

need a c# sanity check please, are the possible values of levelsDown 3,4,5,6,7,8,9,11,13,15? (no 10, 12 or 14)

uncut viper
#

seems right to me

gentle rose
#

ty

tardy adder
brittle pasture
#

it's probably safer to check the farm weather

uncut viper
#

i dont believe you can use Here/Target for conditions on things that may be read before the player is actually in game, otherwise the player does not have a "current location" to fall back to

royal stump
#

some checks of Home data provide the NPC's current location as a "target", but during initial creation, it uses null rather than dig the location out of the home entry or w/e

tardy adder
#

Target Here or even Town always says no location found matching 9-9

chrome temple
#

This isn't my first foray into modding

#

There's just some new stuff

uncut viper
#

the problem is actually that you are trying to work with very very old stuff

chrome temple
uncut viper
#

and even if you werent, trying to pare down a huge mod like SVE is a tough undertaking anyway and a lot of people may not want to touch that with a ten foot pole

chrome temple
#

Yeah, I know

royal stump
#

I think Home is checking during loading for initial NPC creation, which may mean that a lot of GSQs don't actually work in its condition field SDVpufferdizzy

chrome temple
#

(The universal opinion when people hear I'm doing anything with SVE, regardless of server, seems to be "omg holy shit whyyyyyyyyyyyyyyy please just don't")

royal stump
#

you could arrange for their day 1 home not to matter & then I think full context would always exist? not 100% sure though

uncut viper
#

you should always have one conditionless home anyway

tardy adder
#

Yeah there is a conditionless home

royal stump
#

you'd probably want to have a top listing that's just "if day 1, use this" too, so the others aren't checked

#

or CP/GSQ to make it use something else on day 1, etc

urban patrol
harsh radish
#

How do I make my NPC change their sprite sheet and portrait when they're at the resort?

royal stump
#

(for context, it loops through Home entries in order, then stops if it finds a valid home; it won't even try to read the other conditions)

urban wigeon
#

Using CP, is it possible to separate content.json into smaller files? I'm at the point where I have more than 1k lines haha, I've already worked with POO before but i'm not sure whats the correct approach with content patcher

tardy adder
gentle hemlock
urban wigeon
brittle pasture
gentle hemlock
#

Okay i was meant to use Fashion Sense. But instead i used the wrong json file.

urban patrol
#

will i screw up every NPC schedule if i make circular maps? i.e., i have a map that branches off the beach, what would happen if i made one to connect that map and the town map?

chrome temple
wanton rivet
#

What the 265 meaning guys

hallow prism
urban patrol
wanton rivet
urban patrol
wanton rivet
#

I want add day tiles and nighttales on TMX map

urban patrol
urban patrol
# wanton rivet I want add day tiles and nighttales on TMX map

select the tile you want to change it to (for example, if you're doing daytiles for a window, select the yellow lit up window tile), stamp it onto your map temporarily, then hover over it. in the bottom left corner where it displays coordinates like 113, 34 [256] the number in [] is the tile index

chrome temple
urban patrol
#

yeah custom locations is old and i don't know anything about how to use it unfortunately. your options are to learn how SVE does it or update it to work with 1.6

chrome temple
#

Wouldn't be the first time I did that for this mod

#

Oh wait, name/action/target/fromfile is the current thing
I already changed it to 1.6 from customlocations

chrome temple
#

I just need to... I guess make a new map? Or somehow unpack the old assets? (the wiki says I can export into tiled from file, export, but it's grayed out)

hallow prism
#

can you show a screenshot of what's greyed out?

urban patrol
#

were you able to open the tbin after enabling extensions like lumi said?

chrome temple
hallow prism
#

ah yes

#

did you enable tbin extensions in tiled?

chrome temple
#

My brain clearly wasn't working when I said that 😅
I can't find that
I've had tiled for basically a few minutes

hallow prism
#

it's somewhere in preference/extensions if my memory serve

#

but if anything, you may be able to google it!

#

and maybe answer people when they ask

chrome temple
urban patrol
chrome temple
#

Like, google was my next step

chrome temple
hallow prism
#

it's rather a question of taking the time needed to read answers!

eternal hemlock
#

What do you put in a "when": { } argument to make it check for specific seasons?

hallow prism
#

see here! there's the whole set of default CP condition listed

eternal hemlock
#

ty

#

I was reading thru the documentation

#

but I guess I never checked that page

pale pecan
#

Does anyone know any way to manually/force-unlock an NPC loaded in via Content Patcher with C#?

gentle rose
#

what do you mean by unlock?

pale pecan
#

Like this sorta stuff. Spawning an NPC in where UnlockCondition is set to false.

urban patrol
#

just curious, why does it have to be C#

uncut viper
#

you can just change the unlockcondition whenever you want by editing the same asset

gentle rose
#

out of curiosity, what are you trying to do?

pale pecan
#

Efficiency, mostly. I have a C# component that scans once to get a list of characters that are ready to be added into the world from a roster, and then edits that character's data once they are spawned in based on previous player activity. Their UnlockCondition is currently a custom GameStateQuery that iterates across a list of entities, and I'd like to avoid having EVERY currently-locked NPC iterate across every entry every night if possible.

chrome temple
pale pecan
#

(The second part - editing that character's data based on the preexisting entities - is why I'd like to have it mostly C#-handled, bc while I COULD use TriggerActions for that it feels like moreof a workaround than anything so I was curious if there was a more direct way to not ping-pong between C# and Content Patcher)

hallow prism
#

that sounds right! now you can take the time to set stuff and say if it fixes the issue

uncut viper
#

editing a characters data without going through the asset pipeline sounds like a recipe for invalidation related disaster

pine elbow
#

hi yall

uncut viper
#

especially since in multiplayer the NPCs arent synced all the time

#

and are constantly being recreated

gentle hemlock
#

It seems my Custom Accessorie isnt being loaded?

#

I mean i get no errors

#

but it seems the actual item isnt showing up...

gentle rose
pale pecan
#

The goal is to unlock them. I just want to unlock them, and then update them with some modded data tags. And having Content Patcher's conditions unlock them would mean I'd need a C# component to activate on unlock (hence triggeractions), and the sequencing's just a little tidier without that lol

uncut viper
#

your modded data tags will be lost as soon as any other mod invalidates Data/Characters

#

or as soon as a farmhand goes to a map without that npc

calm nebula
#

I suspect you could re organize your mod so you don't have to iterate the world

#

Then make the custom gsq a simple dictionary lookup

#

This feels like you're trying to get out of an architectural issue

wanton rivet
#

I want to ask, when SMAPI and Content Packer update, do I have to update my mod too?

calm nebula
#

Unlikely

brittle pasture
#

it's mostly game updates you have to worry about

pale pecan
pale pecan
#

Or, custom fields in this case

uncut viper
#

ironically, i believe moddata would be fine here, but customfields is not, as its read from their CharacterData

#

any time Data/Characters is invalidated and refetched your CustomFields get wiped and replaced with whatever is in the content pipeline

pale pecan
#

Goootcha

uncut viper
#

but neither of them will really solve the multiplayer problem, as theres no guarantees a farmhand will have the same moddata on their NPC that the host does

#

not impossible to work around, just something to keep in mind

pale pecan
#

Noted! Ty!

uncut viper
#

also, a farmhand cannot write to the moddata unless they are in the same location as the NPC, for the same reasons

#

it will just be lost

#

(the same goes for location mod data, as well, unless it is an active location like the Farm)

pale pecan
#

Makes sense! It's storing info into the save file from host rn so theoretically that won't be an issue?

uncut viper
#

whether its an issue or not entirely depends on what you're trying to do and what your intentions are and what code you've already written

pale pecan
#

yeah fair

#

XD

uncut viper
#

i hope you're not trying to write to the save file when the player is a farmhand

pale pecan
#

I shouldn't be but I will make sure I do not lol
(A simple check for if(Game1.player != Game1.MasterPlayer){ return; } should do the trick yeah?)

gentle hemlock
#

okay...I seem to not understand what im doing wrong with making a content pack for FS

#

Im following the Github wiki and yet the Hat does not load in.

#

So far ive seen no errors other then it does not appear

harsh radish
calm nebula
#

Or is it smth like

#

Their outfit when the game (not you) selects them to go there

pine elbow
#

If I’m comparing dates to the stardew calendar, would Spring be January, February, March, and Summer be April, May, June?

gentle rose
harsh radish
# calm nebula Their outfit when the game (not you) selects them to go there

Yes, I was expecting them to change outfits when they entered the changing area, but they never do. I assumed the issue was with the code, not with the game's random selection, since I know some NPCs, like Lewis, don’t always change either. But I've tested it five times on different days, and my NPC never changes their appearance.

calm nebula
#

By default if the assets exist correctly they will change

#

Can you please show all your code

urban patrol
#
Stardew Modding Wiki

If you want to add seasonal outfits for your NPC, there's two ways you can do this: the token way or the Appearances way. Appearances is a new code structure added in SDV 1.6, so if you're looking at an older NPC's code for reference, they'll most likely be using the token way. The main difference between the two is that the token way is simpler...

brittle pasture
#

also yeah show your code

wanton rivet
#

How do I make the lights only turn on at night?

urban patrol
#

you need to set both day and night tiles

ornate locust
#

Maybe a silly question, but never hurts to check

harsh radish
#

Sorry if this is a really nooby question, but I just want to be sure, is there a specific code or patch needed to make the _Beach sprite and portrait work for custom NPCs? I thought just naming the files with _Beach would be enough, but now I'm wondering if I need to add something else to make it trigger. Thanks for your patience!

harsh radish
twin wadi
#

anyone know where the bulletin board quest data is stored?

brittle pasture
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.

urban patrol
brittle pasture
harsh radish
#

oh sorry

brittle pasture
#

anyway the issue is you only loaded into Characters/Julia and Portraits/Julia

#

you want to load into Characters/Julia_Beach and Portraits/Julia_Beach

#

and no When conditions

uncut viper
brittle pasture
#

the game will handle that

wanton rivet
twin wadi
brittle pasture
urban patrol
uncut viper
ornate locust
uncut viper
#

or rather its not always item delivery but when it is, thats hardcoded

harsh radish
#

Thanks a lot @brittle pasture !

wanton rivet
urban patrol
#

you can use the same technique i showed you earlier where you stamp it temporarily and then hover over it

twin wadi
wanton rivet
ornate locust
#

oh wait I've messed with those, lemme see

uncut viper
twin wadi
#

tysm button!

uncut viper
#

not something you can edit if you want a specific combo

#

nor doable if you want a specific string for a specific npc

ornate locust
#

Ye there they are

wanton rivet
#

[469] Those are tile indices?

ornate locust
#

You're not looking for something labeled "night tiles", by the way. You are looking for that window but darkened.

#

If you look at the index of that tile as shown, it'll be the day tile still

urban patrol
wanton rivet
#

I see thanks you guysSDVpuffersquee

glossy cargo
#

Okay I'm running into an extremely weird issue. Does anyone have spacechase0's @ so that I can discuss it with them? It seems to be some sort of mod interaction

uncut viper
#

casey is on modding hiatus here

brittle pasture
#

what's the issue anyway, perhaps the c# knowers can help

glossy cargo
#

I am trying to hook into Crop.Kill(), with a prefix patch. The intent is to notice when a crop is being killed, and tally up the number. I do it with a prefix, because I want to check if the crop was already dead before calling the method

#

What I do exactly matters very little. The logging line you see there is all that matters for this problem

#

When I play the game with just my mod, this works fine. I can tally up all crops that die on season change

#

But when I play it with JsonAssets and SpaceCore, suddenly, this patch is not running at all

#

I originally was testing with the debugger, but eventually switched to just logging it, for convenience

#

It appears something in these mods is fighting with my code. I'd like to fix it, but also, I'd like to not be overbearing in my patching in a way that would impact the other mods negatively

#

Hence the desire for a discussion 😐

uncut viper
#

it sounds like a harmony priority thing, but are you ever returning false from that prefix?

glossy cargo
#

No, I always return true in this method

uncut viper
#

why is it a bool prefix at all then?

glossy cargo
#

I do it with a prefix, because I want to check if the crop was already dead before calling the method

uncut viper
#

why is it a bool prefix at all then?

calm nebula
glossy cargo
#

You mean to just make a void prefix?

uncut viper
#

a bool prefix, when returning false, skips the actual function

#

it also means it has to deal with the priority of OTHER bool prefixes

glossy cargo
#

Yeah I can change it. But I don't see how that would fix my problem

uncut viper
#

if someone ELSE returns false before yours, your prefix is also skipped

calm nebula
#

void prefixes always run

glossy cargo
#

ohhh

uncut viper
#

however, if its a void prefix, it is considered side effectless

glossy cargo
#

I did not know that

uncut viper
#

and will never be skipped

glossy cargo
#

Alright, then I'll try this

#

I've been getting into the habit of making void postfixes and bool prefixes and never thinking much about it

brave fable
calm nebula
#

Lol

uncut viper
#

this way is actually not even at all mysterious

calm nebula
#

It makes sense if you're willing to sit down and read the code

brave fable
#

it's unexpected at least. maybe even mysterious

glossy cargo
#

i've been digging through the JsonAssets and SpaceCore code and couldnt find an existing patch on Crop.Kill() though. That was my first suspicion, but then when I found nothing, I started to believe it was something else

brave fable
#

just a little mystery as a treat

brittle pasture
urban patrol
#

does prefixing seasonal tilesheets with my mod id prevent them from automatically being used by my map? (i suspect yes, just confirming that's my issue.) is there a suggested different target to load them to, if so? this is how i'm loading them rn:

"Target": "Maps/{{ModId}}_finchhouse, Maps/{{ModId}}_FRL_Elevator, Maps/{{ModId}}_tongueandtail, Maps/{{ModId}}_furniture, Maps/{{ModId}}_furniture_2, Maps/{{ModId}}_furniture_3, Maps/{{ModId}}_wizard_furniture, Maps/{{ModId}}_fall_Lighthouse, Maps/{{ModId}}_spring_Lighthouse, Maps/{{ModId}}_summer_Lighthouse, Maps/{{ModId}}_winter_Lighthouse",
"FromFile": "assets/maps/tilesheets/{{TargetWithoutPath}}.png",```
#

the lighthouse ones are where i'm seeing an issue

calm nebula
#

Yeah

#

Do spring_{{MODID}}_Lighthouse

urban patrol
#

okay thanks!

glossy cargo
#

Nope, switching to a void prefix did not help

#

still not running

gaunt orbit
#

Is it being applied? And to the correct method?

royal stump
#

SDVpufferlurk judging by that screenshot, you're checking that dead.Value is true in a prefix on a method where it's set to true

#

so it may just not be dead until after the patch

#

oh, sorry, missed the text above it & ig that's intended

gaunt orbit
#

You're using breakpoints right?

uncut viper
#

it sounds to me like something you have installed is just skipping the call to Kill() entirely

glossy cargo
#

What I have installed is this:

#

And I've confirmed that removing either JsonAssets or SpaceCore makes it work fine

#

So yes, it seems the Kill() call is skipped

#

I'm just not sure why or how

gaunt orbit
#

That's odd

glossy cargo
#

The crops do die though. They dont magically survive. So whatever is skipping it, is killing them properly anyway

royal stump
#

(and I guess HoeDirt.performToolAction if that's a case you're testing, the other Kill caller)

glossy cargo
#

harmony_summary
I'm scared it'll list hundreds of patches. Any way to make it list only the patches from a given mod? SDVpuffersweats

royal stump
#

looks like you can word search for the method names

help harmony_summary
[SMAPI] harmony_summary: Harmony is a library which rewrites game code, used by SMAPI and some mods. This command lists current Harmony patches.

Usage: harmony_summary
List all Harmony patches.

Usage: harmony_summary <search>

  • search: one more more words to search. If any word matches a method name, the method and all its patchers will be listed; otherwise only matching patchers will be listed for the method.
lucid iron
#

I usually just do all and then grep through the file

calm nebula
#

Spacecore patches crop.newday iirc

glossy cargo
#

I see this as the most suspicious

   StardewValley.Crop.newDay
      - spacechase0.JsonAssets (transpiler)
#

I'm not a transpile guru, but it did not strike me as breaking the Kill() call

calm nebula
glossy cargo
#

Plus, I'm not sure if this is outdated or something, but it says this:

// The only reference to 90 is the index of the cactus fruit for checking if it is an indoor only crop
if (instr.opcode == OpCodes.Ldstr && (string)instr.operand == "90")

And I see no reference to 90 in the actual decompile

calm nebula
#

This is what I was trying to remember

glossy cargo
calm nebula
#

How long is Crop.Kill

glossy cargo
royal stump
#

could just be an inlining issue, if that's still a thing
(nothing I patch is that short SDVpufferlurk)

calm nebula
#

Yeah okay

#

Inlining is a possibility

glossy cargo
#

Would it get inlined with other mods, but not inlined in "vanilla"? SDVpuffersweats

#

because if so, yuck

#

time to patch NewDay instead

calm nebula
#

Inlining is done by the jit heuristically

glossy cargo
#

I did run into inlining issues for the traveling merchant days in the past, but only on Mac. That was fun to debug

calm nebula
#

It depends on what gets called when, tbh

glossy cargo
#

I'll switch to patching this:

#

I'll test for the same conditions and run my code if I expect it will go in this if

lucid iron
#

What if u just not patch anything and do stuff in daystarted

glossy cargo
#

What would that improve?

lucid iron
#

Less usage of harmony and transpiler reduces the chance for that one AVE bug

#

But it does depend on what you intend to do with the patch

glossy cargo
#

AVE?

#

btw I'm genuinely interested in your reasoning, but I think I'm way beyond the point of getting my harmony under control SDVpufferchicksweatsip

uncut viper
#

AccessViolationException

#

sometimes Harmony just decides You Can't Do That

#

that is one i would call a mysterious way

lucid iron
#

Eh dw about what you did previously it's more just making a choice to not use harmony when you can

uncut viper
#

(though its also possible to get AVEs randomly without Harmony too, so who knows)

lucid iron
#

Like if u need newDay to not do something and that something isn't easily reversible in daystarted

#

Then yea harmony go brrr

#

However i wouldn't patch newDay just to do something i could do in smapi day started

glossy cargo
#

Just fyi, I believe this code runs on day ending, not starting, as it happens before the save. But your point would still stand regardless

lucid iron
#

Common sense thing in the end

#

There's a day ending smapi event too

glossy cargo
#

Yes I know, that's why I said your point still stands

#

Yeah I think this is more a case of, I have a nice architecture that works well and is organized, for the patches, but my actual Event hooks are kinda messy and generally do meta-game stuff, not in-game stuff, so I'm a bit wary of diverging from the pattern. Not sure how justified that is. Just a preference probably

lucid iron
#

well u can have multiple event hooks if u want

glossy cargo
#

Yes I know that

lucid mulch
#

Specifically you can listen to the same event multiple times

glossy cargo
#

Someday I might do a big refactoring and actually set myself up for it

lucid iron
#

What is it that you want to do with crop kill exactly

glossy cargo
#

I just never spent the time

glossy cargo
#

I tally them per type too

ivory plume
#

You could Harmony patch the SMAPI events instead of hooking into them, just for fun.

uncut viper
karmic gust
uncut viper
#

you could even do it with Content Patcher with BETAS Harmony

lucid iron
#

Ah u need to count up how many crops are there before and after newDay then

lucid mulch
glossy cargo
lucid mulch
#

It's the core of Profiler

uncut viper
#

you shouldf spend more time in here

lucid mulch
#

They are transpilers too for extra points

glossy cargo
calm nebula
#

Like profiler!

glossy cargo
#

I'm curious to see what this profiler does. Specifically, what it does, that Resharper (DotTrace) doesn't. I've been using that, and it has served me well

lucid iron
glossy cargo
#

like when I noticed suspicious intermittent lag on bundle menus, and realized I was querying the network every few seconds on the main thread
blusho

#

and I was doing that, even if you weren't looking at the network-based bundle lmao

urban patrol
#

"niko_sleep": "19/19/19//laying_down/offset 0 -4",

she doesn't appear to be proply using her sleep animation--it's hard to tell behind the covers, but that looks like it might sprite index 0 or something, not 19

lucid iron
#

Profiler is mostly useful to give to other ppl to install

#

Then you can look at their log n see what's up

#

It is ligher than full c# profiler i think

lucid mulch
#

Also profiler works on measuring the time of discrete events, not doing CPU samples of where the thread(s) are

glossy cargo
#

Alight so it worked fine, thanks all who helped!

#

My release is now out, and people can now do the Bad Farmer Bundle and Joetg Bundle even if they use SpaceCore and JsonAssets prayge

lucid iron
#

Tbh u dont need to support json assets in 2025 kyuuchan_run

glossy cargo
#

Pretty sure I need it for one of the mods we're integrating

lucid iron
#

Has that mod not moved to just cp yet?

glossy cargo
#

I would need to figure out which lmao ill look into it

brave fable
#

does anyone want to test a mod SDVdemetriums

iron ridge
#

how much effort does this testing need

brave fable
#

very low effort ☀️

#

oh yeah use 100% zoom since i need to fix that

twin wadi
#

ill test rl quick

brave fable
#

beloved

#

admittedly i don't think everyone's going to get it lol

latent mauve
gaunt orbit
urban patrol
brave fable
latent mauve
urban patrol
twin wadi
brave fable
#

wow spoilers

latent mauve
brave fable
#

wdym IMAGE you can USE YOUR KEYBOARD

#

and MOUSE

gaunt orbit
uncut viper
#

do i have to tap left every so often for 8 hours to get to the desert festival?

glossy cargo
hard fern
#

Wait you can press buttons on the dash?

brave fable
uncut viper
#

i cant spare 8 hours right now SDVpufferpensive no hope for me

brave fable
#

i mean the element of surprise is gone but it's about the journey not the destination

urban patrol
brave fable
#

i should make you repair the bus again

uncut viper
#

so whats the deal with DrawUserPrimitives then

outer verge
#

any idea why my npc is doing this? Ive been struggling with this issue for a good bit, lol

twin wadi
latent mauve
uncut viper
#

in this case actually its case sensitive to need lowercase

urban patrol
#

i was going by this

twin wadi
latent mauve
urban patrol
#

cool, thank you!

torpid sparrow
#

Oh wait I just made my own sleep animation

#

I mean that also works lol

urban patrol
#

sometimes with the wiki i'm like "but what if i'm jared, 19" and doubt myself

brave fable
#

it makes sense when you're playing lol

uncut viper
#

why not do math on the raw pixel data of the texture2d

latent mauve
#

I mean, the wiki is not infallible but it's usually pretty close to correct

brave fable
#

i think you just sold me on why not

calm nebula
#

It's just a convolution

uncut viper
#

being jared, 19, would actually imply the wiki being correct but the jared incorrectly reading it. we are all jared sometimes

latent mauve
#

(thank you, I did not get that reference)

uncut viper
#

("whats up im jared, 19, and i never learned how to read")

brave fable
#

i couldn't even work out matrices for forcing perspective on primitives. i'm not about to apply them on array convolution

uncut viper
#

it cant be that convoluted

brave fable
#

i have a degree in this but that was. a long time ago

uncut viper
#

what do you have a degree in now then

lucid iron
#

I'm surprised monogame doesn't come with convolution

brave fable
#

temperature

uncut viper
#

not even using kelvin? kinda cringe

lucid iron
#

Is blueberry an SI unit

brave fable
#

i'm glad kelvin has the most nerd name possible. very apt

#

i'm an absolute unit

calm nebula
#

Lord Kelvin

#

I remember he was an absolute shit when it came to the age of the planet and evolution

gaunt orbit
#

I mean wouldn't a fragment shader be easier and faster than editing pixel data on cpu

uncut viper
#

is it as fun though

calm nebula
#

It is

#

It's a convolution

uncut viper
#

you're not a modder

brave fable
#

is it as fun as driving the bus

calm nebula
#

We love matrices and math in this house

patent lanceBOT
brave fable
#

i went with whatever got me to driving the bus faster

calm nebula
#

Yayyyyy

uncut viper
brave fable
#

70mph 😌

calm nebula
#

What about backyards

brave fable
#

how about you play it and FIND OUT

calm nebula
#

Actually I'm not allowed to play video games

uncut viper
#

bc im trying to figure out how/if i can do something with git i dont have time for busses

calm nebula
#

It's in the contract

gaunt orbit
#

I do like math but transform matrices I don't understand from a practical standpoint, especially since you need a 3x3 for 2d and 4x4 for 3d

uncut viper
#

its off topic so i will be in the off topic zone

calm nebula
#

The only games I'm allowed to acknowledge are like rock paper scissors and tag

#

||this is a katseye reference||

gaunt orbit
#

In the old days it was just rock, rock, rock and everyone always tied

harsh radish
#

Hello, again! How can I make an NPC use a specific sprite sheet and portrait during a specific festival? Are there any tutorials or guides on how to do this?

calm nebula
#

Appearances

#

And use IsEvent....uh

gaunt orbit
#

Appearances are what you want! Let me see if I can find the wiki page

brave fable
#

in any case though transforms wouldn't have helped a whole lot, since the 'texture' still needs to scroll, and it's easier just to make a whole slew of new triangles for the road stripes and lerp them from vanishing point to the bottom

uncut viper
#

i do enjoy a good lerping it has to be said

gaunt orbit
#

Something I have found myself using a surprising amount is a method to map a value from one range to another

#

Like a smoothstep into a lerp

brave fable
#

ofc my code for actually doing that is despicable & rotten but given it's all done in a weekend i'm fine with it

brave fable
#

supposedly:

#

hm, although this example had the two maps only circular between eachother, not with other maps

urban patrol
#

hmmm

#

i mean i suppose i could load a dummy map to test it. i just didn't want to get all excited about map design for no reason lol

#

related question, what's the reason for banning NPCs from backwoods? is it the circular pathing, or is it because of inaccessible warps?

gentle rose
#

not contiguous (inaccessible warps)

urban patrol
#

aha

gentle rose
#

I think farm is blacklisted from pathing so that prevents the circular pathing

urban patrol
#

oh that makes sense yeah

#

does SVE do anything special in regard to its NPC pathing/maps? i'm just now remembering that for SVE compatibility i did technically create circular maps (Town -> Beach -> Lighthouse (mine) -> Blue Moon Vineyard -> Town)

calm nebula
#

Circular pathing isn't terrible

eternal glade
#

So I'm making a greenhouse redesign mod, and i cant move the entrance and exit point? Its not a tiledata tile like the water trough

tiny zealot
#

i thought circles were A Bad Time(tm) for the DFS pathfinder

uncut viper
#

i thought they just lead to inefficient pathing

calm nebula
#

I mean yes

urban patrol
#

ah i see

calm nebula
#

Inefficient pathing and probably a slow pathfinder

urban patrol
#

i know spacecore somehow fixes pathing--is that just within one map, or would that impact circular maps

#

bc i do have that dependency

#

(if the answer is "this is technically possible but not recommended", that's fine btw)

gentle rose
#

for true DFS, cycles lead to it never completing

#

iirc

calm nebula
#

No, dfs can take cycles fine iirc

urban patrol
#

(what does dfs stand for)

calm nebula
dusky sail
uncut viper
#

depth first search

calm nebula
#

Depth first search

#

Smh

uncut viper
#

name of an algorithm

calm nebula
#

I stopped for capitalization

urban patrol
#

thanks

uncut viper
#

for trees and stuff

#

you might also see BFS mentioned which is breadth first search

brave fable
# eternal glade So I'm making a greenhouse redesign mod, and i cant move the entrance and exit p...

judging by the decompiled game code handling WarpGreenhouse, you can use Warp Farm x y to override the default warp position of 10 23:

GameLocation greenhouse = Game1.getLocationFromName("Greenhouse");
int destination_x = 10;
int destination_y = 23;
if (greenhouse != null)
{
    foreach (Warp warp in greenhouse.warps)
    {
        if (warp.TargetName == "Farm")
        {
            destination_x = warp.X;
            destination_y = warp.Y - 1;
            break;
        }
    }
}
Game1.warpFarmer("Greenhouse", destination_x, destination_y, flip: false);
#

which is essentially using your exit warp to override the entry warp

urban patrol
gentle rose
#

ah it depends on if you track visited nodes or not (but if you do track visited nodes you also don’t have an efficiency problem)

#

there’s no situation where cycles cause DFS to be inefficient but not hang

calm nebula
#

Spacecore entirely rewrites how the map to map scheduler work yeah

urban patrol
#

awesome!

brave fable
#

(this really feels like something that Shouldn't Be In Spacecore)

uncut viper
#

i feel that way about much of spacecore

brave fable
#

(and absolutely not in an upscaling/smoothing mod (even with legitimate reasons about corporate contractual obligations))

urban patrol
#

every time i learn something new about spacecore i only hold it higher and higher in my esteem

calm nebula
brave fable
#

eight-legged race? absolutely not

eternal glade
dusky sail
#

you don't need to do any fancy code

#

you're using tiled right

eternal glade
#

Yes

dusky sail
#

at the bottom of the "map" tab at the top of the program. there's something called map properties

eternal glade
#

But the tiledata tile isn't there

dusky sail
#

click on that, then on the left there'll be a list of things

#

the last one, "warp" has two sets of x y coordinates

#

just edit the first one to the coordinates of your door

eternal glade
#

Im going you kiss you on the mouth

dusky sail
#

hehe no worries ive just done two of my own greenhouse mods so i knew the trick to it

#

you do need to use code if you wanna make the door wider than vanilla. but that's not too difficult either

eternal glade
#

Ok thats good bc its a two wide now

dusky sail
#

ok one moment

#
{
    "Action": "EditMap",
    "Target": "Maps/FarmHouse2, Maps/FarmHouse2_marriage",
    "AddWarps": [
            "x y Farm 28 16"
        ]
}
#

with x and y as the second door coordinates

#

and. the correct map target. sorry i took this directly from my code and forgot to edit that part

calm nebula
#

I've been attempting to get this scheduler into the vanilla game since about 2023

#

I've given up

eternal glade
dusky sail
#

correct

lucid mulch
eternal glade
#

Ok, sick

dusky sail
#

the one in the map file will be the one you spawn on when you enter, if thats important

eternal glade
#

After i finish it could i send it to you to take a look at?

dusky sail
#

im about to leave for work im afraid otherwise i'd say yes

eternal glade
#

Its not but i like to know that

#

Dang

#

Ty for the help tho

dusky sail
#

ofc~!

urban patrol
#

(Optional) The NPC's closest friends and family, as a dictionary where the key is the other NPC's internal name and the value is an optional tokenizable string for the name to use in dialogue text (like 'mom'). Default none.

This affects generic dialogue for revealing likes and dislikes to family members, and may affect inlaw_<NPC> dialogues. This isn't necessarily comprehensive.

for an optional tokenizable string, how do i set it to the default? empty quotes, or null, or having no value?

#

i had "friend" in there but that appears too vague in the actual dialogue, so i want it to say the name

latent mauve
#

I just nulled it when I changed the vanilla NPC's data, I think

urban patrol
#

ok thanks

calm nebula
#

Empty string

latent mauve
#

Defer to atra, they would know better how it works in the code

urban patrol
#

people keep reporting a "bug" to me that i'm 99% sure comes from SVE. it only happens when users have both mods installed. here's an example log: https://smapi.io/log/dee64994d95240768e9200bfb882a566

my NightTiles don't contain (20, 64) at all. my map patches Town from (6, 62) for a width and height of 16 and 15. am i correct that the order of what's happening is that SVE adds NightTiles, and then i patch the map, and then the NightTiles can't find 20,64 since i removed it? how do i remove the NightTiles that SVE added?

ocean sailBOT
#

Log Info: SMAPI 4.2.1 with SDV 1.6.15 build 24356 on Microsoft Windows 11 Home, with 122 C# mods and 322 content packs.
Suggested fixes: One or more mods are out of date, consider updating them

lucid mulch
#

looks like empty string and null will do the same thing

relativeTitle = TokenParser.ParseText(relativeTitle);
if (string.IsNullOrWhiteSpace(relativeTitle))
{
    relativeTitle = null;
}
cold marsh
#

I read you shouldn't use queries in When: conditions if you can help it due to performance concerns (?). Is that true and HOW true?

calm nebula
lucid mulch
#

Queries are more computationally expensive relative to other mechanisms to do the comparisons

#

it still has value as it can do weird permutations of comparisons that you can't do otherwise, but if you can do it without query, that's preferable

cold marsh
#

Now that I think about it, you can have an OR condition for two mods by using Hasmod *without* |contains, right? If so, that removes the bulk of my query usage

lucid mulch
#

"HasMod": "ModId1, ModId2" is an OR

uncut viper
#

so is HasMod |contains=Mod1, Mod2: true

cold marsh
#

Great to know, thank you.

lucid mulch
#

its mainly when you want to mix AND's and OR's simultaniously that you start needing to lean on query

#

but you can avoid it more often than you think

uncut viper
#

even then, a lot of people forget about merge

cold marsh
#

"When": { "HasMod |contains=mod1": true, "HasMod |contains=mod2, mod3": true }, Does this resolve to requires mod1 AND either mod2 or mod3?

lucid mulch
#
"When": {
    "query: (({{season|contains=winter}} ) OR ({{Weather|contains=Rain, Storm,GreenRain}}) OR ({{HasValue: {{DayEvent}} }})": true,
    "Merge: {{season|contains=winter}}, {{Weather|contains=Rain, Storm,GreenRain}}, {{HasValue: {{DayEvent}} }} ": true
}

would do the same thing

uncut viper
#

{{Merge}} my beloved

eternal glade
#

Can someone explain making a chair work on a building layer of a map to me? I read the wiki and im only kinda getting it

#

I wanna use those cute little green stools

urban patrol
#

when you broadcast an event in multiplayer, does the game pause time?

#

i have an event that happens at night and i don't know what will happen if the event goes longer than 2am

tender bloom
#

I don’t think time pauses but it’s hard to tell—usually we trigger these during the day

#

My guess is that the event would finish and then everyone would pass out where they stood

#

But this is only a guess

urban patrol
#

hmm not ideal i don't want to make players angry

#

what if i use spacecore OnEventFinished to warp everyone home

#

oh nvm that's for C#

#

what if i used a trigger action with BETAS to warp the farmer when the event ends

torpid sparrow
#

like straight from the towninterior tilesheet

vernal crest
lucid mulch
#

but as a mod author for events and such, I wouldn't take that into consideration too much, multiplayer people that want time pausing will have a mod that does it

urban patrol
#

okay sounds good

#

i designated my event map as PassOutSafe anyway so

urban patrol
#

https://smapi.io/log/de820ad5b40645fc85cc59205876c673 why would my {{ModId}} be missing the first letter according to the log? i searched all my files for CuringNiko and none of the occurrences have my mod id typed out which is where i'd expect something like a typo

ocean sailBOT
#

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

urban patrol
#

this is the item delivery quest that's supposed to add the quest {{ModId}}_CuringNiko as the next quest

uncut viper
#

oh thats unfortunate

#

so, quests are a lil funny

#

if a "next quest" starts with h the game assumes you mean it to be host only, and then removes the h

urban patrol
#

that's fucking hilarious omg

uncut viper
#

so... you'll need to make the quest id start with something other than h

urban patrol
#

is it acceptable just this once to not use my mod id? 😅

uncut viper
#

you can still use it

#

just put something in front of it

#

literally any letter except h

urban patrol
#

okay

uncut viper
#

or reverse them, so like CuringNiko_{{ModId}}

urban patrol
#

oh true

uncut viper
#

prefixing it with an underscore would work and might still work for mods trying to parse unique ids, maybe?

#

but probably not

urban patrol
#

reversing it sounds like a good option

#

typing it like that does feel wrong for muscle memory though haha

uncut viper
#

tbh im surprised this hasnt come up more often

#

i imagine if Quests are moved into a data model with the next update this will no longer be an issue

urban patrol
#

fingers crossed 🤞 don't want to have to change either my username or all my quest names just to be safe lol

uncut viper
#

it only happens if you put it in the "next quests" section at least

urban patrol
#

yeah, i haven't encountered that issue with any other quests which is good

#

and now i know to watch out for it!

uncut viper
#

it IS on the quest data wiki page too but given how like.... unexpected it is i cant blame someone for missing it

urban patrol
#

i was convinced i had somehow screwed up i18n and forgotten a letter or something

#

even though that makes no sense

uncut viper
#

im 99% sure its a case-sensitive check too so you could actually just uppercase your mod id

lucid mulch
#

looks like case sensitive

#
string[] array = nextQuests;
for (int i = 0; i < array.Length; i++)
{
    string nextQuest = array[i];
    if (nextQuest.StartsWith('h'))
    {
        if (!Game1.IsMasterGame)
        {
            continue;
        }
        nextQuest = nextQuest.Substring(1);
    }
    q.nextQuests.Add(nextQuest);
}
urban patrol
#

what's even the use case for that? is it common to start quests with h to designate them host only?

#

mostly a rhetorical question

uncut viper
#

well dont forget quests used to be ints only

#

but yes there are some host-only quests in vanilla

#

i.e. the new save quests like building a coop or getting eggs or w/e

tribal ore
#

Does |contains only work on CP provided tokens? I was trying to use it on a mod-provided token, but I don't think CP likes that very much

#
    "LocalTokens": {
        "Suitor": "{{Random: {{Kantrip.SweetTokens/MaxHeartSuitors:type=custom}} }}",
        "ModdedSuitors": "{{Kantrip.SweetTokens/ModSuitors}}"
    },
    "When": {
        "ModdedSuitors |contains={{Suitor}}": "false",
    },
uncut viper
#

(interestingly, it looks like the quest for crafting a scarecrow is allowed for farmhands normally, but host-only if you use Meadowlands farm)

lucid mulch
#

|contains should work on all tokens

tribal ore
#

Hmmmmmm. Probably syntax error in there somewhere then

uncut viper
#

can you use a localtoken as a When condition in the same patch it is defined in even?

lucid mulch
#

should

#

it was available for internal to the patch prior to working with inheritance on an include iirc

tribal ore
#

I've also tried just using the mod token straight. It doesn't have to be a local

#

I just tried that to see if I could make it work

lucid mulch
#

if cp doesn't like it you should be getting warnings in the log

tribal ore
#

Well, the list token doesn't. The random one does.

#

The error isn't helping me much :/

Error parsing 'Kantrip.SweetTokens/ModSuitors}} |contains={{Suitor}}' as a tokenizable string

uncut viper
#

doesnt seem like its actually parsing the localtoken as a token when the localtoken value is a token

lucid iron
#

Missing {{?

tribal ore
#

But I'm able to grab the value of the ModSuitors token and store it as a dynamic. So I know the token itself works

uncut viper
#

you're not supposed to have {{ on the outside in a when condition

#

but that is the error you get when you do erroneously use the outer braces in a When condition

#

which Kantrip didnt

tribal ore
#

Let me reload the whole thing. I was playing with braces a lot, so I might have pasted an old error. Let me double check so I don't confuse us al

#

all

uncut viper
#

but it suggests to me that CP thinks Kantrip wrote

"When": {
  "{{Kantrip.SweetTokens/ModSuitors |contain={{Suitor}} }}": "false"
}
lucid mulch
#

@tribal ore what editor do you use normally?

tribal ore
#

XCode

#

Ok, a reload cleared that error, so sorry for pasting an old error. I'm still not getting expected behavior, but at least it's not choking on the braces anymore

#

I'm going to sleep and come back at this tomorrow though. I've been asked by a couple of people for a way to add mod-supported proposals to MarryMe, and am about 90% of the way there. I just need to disable the default proposal when they've added their NPCs name to the mod-supported npc asset. But if I do anymore tonight I'm just going to make more mistakes

#

Thanks for the extra eyes 🙂

urban patrol
#

mail flags don’t need an entry in data/mail, right?

lucid mulch
#

correct

urban patrol
#

how often are event preconditions checked? on location change?

#

i can’t figure out why mine isn’t triggering after setting a mail flag

half tangle
#

pretty sure events are loaded on day started, in which case you would need to sleep for new event preconditions to register

uncut viper
#

event preconditions are checked on location change but patches will not update til the next day by default

half tangle
#

or, not SMAPI's on day started, the game's own overnight update cycle

uncut viper
#

how did you set your mail flag?

urban patrol
#

via a trigger action

#

whose condition was “has mail” x3

uncut viper
#

yes but how, what does your trigger action look like

#

did you add it to the correct mailbox

urban patrol
#
    "Id": "SeanceIngredients",
    "Trigger": "DayEnding",
    "Condition": "PLAYER_HAS_MAIL Host SeanceIngredients1, PLAYER_HAS_MAIL Host SeanceIngredients2, PLAYER_HAS_MAIL Host SeanceIngredients3",
    "HostOnly": true,
    "MarkActionApplied": true,
    "Actions": [
        "AddMail Host {{ModId}}_SeanceIngredientsComplete received",
    ]
},```
#

i've been checking the host for everything in this long chain of quest/event/mail

uncut viper
#

lack of modid aside, are you certain this trigger action ran at all and that you actually have the flag?

urban patrol
#

let me check that, what's the debug command?

uncut viper
#

debug gq PLAYER_HAS_MAIL Host handwrittenhello.dba_SeanceIngredientsComplete or w/e your unique id is written out

#

however i said lack of modid aside bc i was looking at your trigger action id, but i do now also see that the mail you're checking for does not have your uniqueid in it

#

but the mail you're sending does

#

are you sure you are consistently using the uniqueid in all your relevant checks

urban patrol
#

yeah i see it said false

#

i'll go check that everything has my mod id

#

ah yeah the three quests send mail with my mod id but the trigger action doesn't have them, that'd be it then

#

let me go redo the quests again real quick to check