#making-mods-general

1 messages ยท Page 42 of 1

uncut viper
#

every night that isnt getting a child question*

velvet narwhal
#

oh- fair

uncut viper
#

if having nothing in Aviroen.GSQBaby means you want to do nothing, then you can just return there

#

(though, that bit of code will only be reached if someone puts just "" in the CustomFields)

#

or null directly but idk why theyd do that

#

in order for it to reach that bit of code someone has to add that key to their customfields but do nothing with it except place a null/empty value

velvet narwhal
#

this is just for the weirdos who installed the mod when it doesn't do anything without author input, just as you said turn it to return i fixed it

uncut viper
#

its not checking if they added anything to Customfields

#

its checking if what they added is empty or null

velvet narwhal
#

oh, should i just yeet that

uncut viper
#

TryGetValue will check if there is a "Aviroen.GSQBaby" key in CustomFields. if that key exists, it will return true and save the value of that key to your variable

#

if there is no Aviroen.GSQBaby at all, it returns false, which means your if statement is false

#

so the code inside the if statement wont run

velvet narwhal
#

i have yeetethed the null part, i do want my code to not run if there's no key there

uncut viper
#

if theres no key then itll just skip past that entire if statement and everything inside it so thats fine just make sure you return after the if statement instead of making more changes after

#

also checking if stringName == "Yes" would work if you want the user to write exactly "Yes" as the value

#

but you can instead just have them write "true" or "TRUE" or "True" or something and just do bool.TryParse

#

that works like TryGetValue where the TryParse function will return true (and use an out bool variable) if it can turn the string into either true or false, or it'll return false if it cant figure out how to read the string as a bool

#

you can also just do bool.Parse if you want too it'll just throw an error if you pass in a bad value instead of returning false

velvet narwhal
wise berry
#

I made a C# mod that does fancy stuff SDVpufferparty

#

And I feel proud ahaha

uncut viper
#

(i didn't mean literally do checks for those three values i meant that if you use bool.TryParse then the user doesn't need to write it exactly a certain way as long as it can be parsed)

velvet narwhal
#

throws just a random .json customfield edit into one of my already made mods

wise berry
#

(Now whether or not it commits coding sins is another matter)

velvet narwhal
#

wait where, after the out?

uncut viper
#

bool.TryParse is just another function you can call

velvet narwhal
wise berry
#

value.Tryparse

velvet narwhal
#

brain empty SDVpufferclueless

uncut viper
#

You need the out variable

wise berry
#

Oooh okie

velvet narwhal
#

oh

#

i'mma just ignore the green squiggly for out string customString

#

i named it that to not confuse myself

dusty scarab
#

I just spent 15 minutes pulling my hair out wondering why my Tiled was taking my attempt to copy-paste a block of tiles and only giving me one tile of a tree no matter what I did, and realized that I accidently turned on the randomizer option at some point.

why does it even HAVE that lever and not warn you about it??

velvet narwhal
#

...there's a randomizer option?? (TIL)

dusty scarab
#

there is! it's hotkey is d (for Dice Roll, I assume)

#

I can assume I hit it because I was in-game on my map looking for things that didn't look right in game so I can fix them in Tiled, and since I use wasd for movement, I mustn't have been on the same screen I thought that I was

deep cypress
#

Does anyone know if MoopDrea, the maker of Shiko, is still around these here parts?

velvet narwhal
#

(i will throw this here incase anyone wants to slap me on the wrists with a ruler later, but i cannot for the life of me get this to work, i've already created the .json in a separate mod altogether with the appropriate customfields entry https://github.com/Aviroen/GSQ-Children/blob/facc16af595f64289da2cadd556361b2499d01c4/GSQChildren.cs#L38 but my brain is absolutely shot and i need to sleep or the walls will start yelling at me next)

  "Action": "EditData",
  "Target": "Data/Characters",
  "Fields": {
    "Abigail": {
      "CustomFields": {
        "Aviroen.GSQBaby": "true"
      }
    }
  }
}```
dusty scarab
#

this crash is showing up every time I try to load my farm map after Day 1 has passed. I can make a new farm just fine, I can load from Day 1 just fine, but trying to load past Day 1 results in this. does anyone know what happened, and how I can fix it?

uncut viper
vernal crest
velvet narwhal
#

I'm gonna yell, the one time rng didn't fail me.

dusty scarab
uncut viper
#

i like putting monitor logging statements in my code sometimes just so i know theyre even getting to those points

#

its not the ~proper~ way to do it but im too lazy for the debugger. trusty old Log("Got here") for me

velvet narwhal
#

I did read the part about logging but I didn't know where to put it

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.

uncut viper
#

if you're in your mod entry class i think you can just call Monitor.Log directly

velvet narwhal
#

I'll pin your message and get back to it tomorrow

uncut viper
velvet narwhal
#

I am now completely deflated in bed cause rng pranked me aSDVpufferrise

uncut viper
#

that'll find every class in your mod with a harmony annotation to patch with

ocean sailBOT
#

Log Info: SMAPI 4.0.8 with SDV 1.6.8 build 24119 on Microsoft Windows 10 Home, with 28 C# mods and 28 content packs.
Suggested fixes: One or more mods are out of date, consider updating them

dusty scarab
#

here's my log, let me go figure out how to get the json for you in a compact manner

vernal crest
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.

dusty scarab
#

if it helps, every other save I have on other maps, including other's custom farm maps, loads and works perfectly fine, except for the new one I've been testing

vernal crest
#

I'm not great with C# errors but it looks like there's a problem with the UpdateMapSeats method.

dusty scarab
#

I didn't do anything with C# for this mod, so I have no idea where to begin if it's a C# error

uncut viper
#

Sekundes, you didnt provide a MapPath in your CreateOnLoad model

vernal crest
#

I noticed that but I wasn't sure if that was normal for custom farm maps

dusty scarab
uncut viper
#

CreateOnLoad is an optional field but MapPath within CreateOnLoad is not

#

i assume so

vernal crest
#

It's just this: "Maps/RiftstalkerSekun.FennmontFarm"

dusty scarab
uncut viper
#

loading on day 1 is probably just somewhat equivalent to creating a save if i had to guess, which i suppose the code runs a different path when creating vs loading

#

thats just a guess though

dusty scarab
#

that would make sense

vernal crest
#

That was also the reason for my confusion, since I thought it would completely fail if the mappath wasn't included - in a non-farm map it would...I would have thought. But actually if CreateOnLoad is optional, how do you actually put the map inside the location asset otherwise?

dusty scarab
#

and that was absolutely the problem, it loads now

uncut viper
#

createonload as far as i understand it just means when you load a save it creates a new location, and then copies data from the save file into that newly created location? or something like that
so before and on day 1 there just isnt really anything in the save data in the first place

#

so it doesnt come up

dusty scarab
#

it's double weird because I could restart the game and load maps that were still on Day 1, just not anything after that

uncut viper
#

well most stuff only gets saved when you sleep and thus go to day 2

dusty scarab
#

yeah, I guess the save data would be empty, which would allow the former logic that allowed things to load initially to take over

#

thank you, both of you, for your help. I never would have guessed that on my own

uncut viper
vernal crest
#

Just a trick optional field

uncut viper
#

it seems to be used for things where their map asset gets created more directly or temporarily, like undergroundmine or fishingGame, but also for the other farm types that arent the default, presumably since you dont want them to be created unless you actually use them

#

thinking about it i dont know if you need CreateOnLoad if you're making an additional farm, since the others dont. since its the farm, i believe thats a place thats always going to be considered AlwaysActive by default

#

do not quote me on this.

dusty scarab
#

I had it set because I remember it being required for multiplayer compatibility, which I think all farms need to be compatible with

vernal crest
#

Oh yeah for the cabins

dusty scarab
#

or, at least, the wiki leads me to believe that it has to be set for custom farm maps

uncut viper
#

well, it only says for locations, not farms, so it might just mean "if you let other maps that arent the farm get cabins built on them, it must be always active"

#

i am like 99% sure the main farm is always active, no matter what

#

like. i dont think you can set that to false

#

for your custom farm

dusty scarab
#

true, but I also don't know if farms are treated special for that kind of thing. I suppose I could always comment it out and see if it loads? XD

uncut viper
#

imo its at least worth a shot, because i know fuck all about maps and dont know if theres any implications if your farm has it set but every other vanilla farm does not

#

or what that might possibly mean

dusty scarab
#

I don't remember the map I was looking at having the CreateOnLoad property set, but it was also a very small map, so I assumed multiplayer was disabled or something because it was a small map

uncut viper
#

most maps are not always active

#

it doesnt break multiplayer (unless the aforementioned cabin clause applies)

vernal crest
#

Well you have several other custom farm maps downloaded, don't you? You could have a look at their files too.

dusty scarab
#

it was another farm map, to be specific

#

yep, it does load without the CreateOnLoad part. nice to know I was a victim of overthinking myself to death

unique sigil
uncut viper
#

Optional on the wiki always is just there to tell you whether or not the game will complain/error if you leave it out or not

#

its not a comment on whether you should include it or not

unique sigil
#

ive never needed to add CreateOnLoad in my maps, unless im making a fully custom (buildable) location. for multiplayer compat in farm maps you just need to ensure the Order property is marked in the Paths data layer, afaik

#

so far no one has submitted reports about my maps in multiplayer, so id like to think ive got it correct

dusty scarab
# unique sigil honestly while the wiki is comprehensive, imo if you just started making maps yo...

honestly? I was looking off of other people's maps, but even then, I simply thought that those maps weren't multiplayer compatible because they lacked that quality. I've only ever actually opened up one in Tiled to even see what the Order property was, and while I remember them being present originally, I think I erased them when I was clearing out everything in the Paths layer so I could make my own overgrowth patterns

#

and therefore had to add them all back in, thus in my mind making the map multiplayer compatible, thus it needing that CreateOnLoad parameter

uncut viper
#

(for the record as aba pointed out if you ever make maps that arent farm maps you will need CreateOnLoad because there is no other way to set what map asset to use)

#

(its just not required on a technical level by the game)

#

or rather other Locations* that arent farm maps more accurately

dusty scarab
#

so for when I made my larger shed interior mod and greenhouse mod, I will need to use CreateOnLoad to load the maps for them? (just asking now to clarify)

uncut viper
#

unless you plan on creatin the locations with C#

unique sigil
uncut viper
#

it doesnt load the maps, you'll still need to load the maps yourself

dusty scarab
#

as someone who can barely print Hello World in java, C# intimidates me, I'll stick with SMAPI. CreateOnLoad, it will be!

uncut viper
#

as in use a CP Load action i mean

unique sigil
uncut viper
#

if you only usea Load action then there is no Location to ever go to

#

there will be a map, sure, but it wont be tied to a Location

dusty scarab
#

yeah. after I get my custom farm map finished, the mod I want to make next is buildable greenhouses with different sized interiors, using GMCM to pick and choose what sizes you want to show up (so if you don't want Mini or Macro sizes and only want Medium and Ludeonicrous sizes, those are the only ones that will available to build at the carpenter's)

uncut viper
#

AdditionalFarmMaps does its own stuff

dusty scarab
#

(the Rimworld reference for naming the largest greenhouse interior is for my own amusement)

unique sigil
#

i think ive seen some, never used any personally though

dusty scarab
#

I've seen some in the past as well, but they never really... worked out the way I wanted them to. either too small, or the layouts were weird. I know a lot of people enjoy having a bunch of seperate squares for showcasing an individual crop with an iridium sprinkler, but that's never really been my thing

unique sigil
#

have you tried messing with GMCM? this is just a suggestion, but i think your current farm map could use some options, like the animal pens having prebuilt fences/no fences

dusty scarab
#

like have one save file where it was normal Fennmont Farm, and then a second save file with Fennmont Farm Unbound

unique sigil
#

you can actually make them into one zip file with some extra work

dusty scarab
#

because I don't know if GMCM would allow something like that normally

unique sigil
#

yes it can! you have to do it via mappatches

#

youre welcome to open my nexus page and download any of my farm map mods: they all have map patches

uncut viper
#

(just to be clear its not GMCM that allows that sort of stuff either! Content Patcher itself allows for configuration, GMCM just makes it convenient, but it doesnt mean GMCM is a requirement)

dusty scarab
#

you don't happen to have a link on hand to make finding one faster, do you?

uncut viper
#

(all GMCM does is read and edit your config file from Content Patcher but you can do the sort of stuff Kisaa is describing entirely without GMCM if you want)

dusty scarab
uncut viper
#

the short n sweet of it is that you can conditionally edit maps or any of your other patches based on those config conditions in the same content.json

#

so you could have a config option for Fences Enabled and edit the map differently depending on what the config was set to

#

adding both would just be doing the same thing you've already done but copy-pasted with the different map file so that would be ezpz to put in the same file

unique sigil
# dusty scarab oh? how so?
  1. finish your main map mod, but first ensure EVERYTHING works correctly so you dont have to correct things twice
  2. copy your finished map mod, name it YourFarmName_Patches or something similar
  3. edit your patch map as needed, make sure it fits in a rectangular area (in my farm maps, i mark the corners of the patched area with a randomly named layer "1" using highly visible tiles, like the roof tiles from marnie's)
  4. create a map patch.json
  5. create an Include action with that map patch.json as FromFile in your content.json
  6. map patches is applied. if using configs to toggle patches, you should add When conditions into the map patches.json.
uncut viper
#

(different map file and different strings/displynames too i ofc)

unique sigil
#

lemme fetch a link for my mod

uncut viper
#

(When conditions are also just a content patcher thing and unrelated to GMCM. im not trying to be pedantic here im just trying to make sure Sekundes understands that they dont need to set a GMCM dependency)

unique sigil
#

okay yeah im a bit bad at describing this haha. listen to button /lh

uncut viper
#

(even though 99% of people have it installed anyway SDVpuffersquee)

dusty scarab
#

I do appreciate helping me understand how these things work under the hood. the explanations do help a lot, especially when I know I'm going to need to use these kinds of tricks later for the greenhouse mod

uncut viper
#

basically dont worry about GMCM at all just read up on Content Patcher's documentation for Configuration and Conditions

unique sigil
uncut viper
#

reading up on these two links will explain how you can pick and choose which patches to make or stack on top of each other depending on config values

unique sigil
#

GMCM beloved

#

i just never thought that you dont really need GMCM haha, but it sure does makes things convenient for mod users so i always set a GMCM config regardless

uncut viper
#

it is definitely very convenient, so long as you dont get confused and think its required to make conditional patches work at all

unique sigil
#

okay enough laying about i need to test that dang minecart network

dusty scarab
#

learning the player config options, though, looks like a job for Later Brain, and not for 3 Am Brain

unique sigil
#

ive been nursing a headache this whole day

dusty scarab
#

oof, that sucks :< I hate those, so much

unique sigil
#

but im ready to continue at least

uncut viper
#

i wish you luck with the minecarts and i wish sekundes luck with the 3am brain as i am headed to bed SDVpufferthumbsup gnighty night

unique sigil
#

who knows i would sink this much hours into a relatively small farm map

dusty scarab
#

I am also going to go to sleep, before I try to do something crazy like add forest fish to the farm somewhere

unique sigil
#

oh hey, my PIF rooms mod broke through 1k unique downloads!!

dusty scarab
#

congratulations! :D

unique sigil
#

banger. ill definitely go make some more PIF rooms soon

dusty scarab
#

you reminded me to check, my crop mod is at 358 unique downloads :D

unique sigil
#

honestly after i learned AdditionalFarms farm map making has never been easier

velvet narwhal
#

(the code haunted me, i could not, in fact, sleep)

unique sigil
#

youre just like me fr

#

instead of sleeping immediately after shutting down my laptop i ended up reading through some documentations. i have become a mod creator, but at what cost

dusty scarab
#

...I've been looking through your mod, trying to get my brain working well enough to try making patches

unique sigil
dusty scarab
#

closer to 3:30 now XD but yeah. I need to go to bed, but I am easily distracted by new things

unique sigil
#

theres quite a bit of steps to making map patches. dont overexert yourself, have a break SDVpufferthumbsup

dusty scarab
#

indeed! good night!

knotty cradle
#

I'm interested in getting into making mods. I was following along with an older tutorial series from XxHarvzBackxX, but came across a few issues like links being seemingly outdated and my VisualStudioCode app marking some things as errors when copied directly from the video. Is that tutorial too outdated for use?

vernal crest
#

Probably - I don't know of any up-to-date video tutorials. What exactly are you wanting to make?

knotty cradle
#

Content Patcher Mods, specificall maps and characters

vernal crest
#

Well, as far as maps go, the videos from Harvz should still be pretty much okay for anything in Tiled, but the stuff about how to create the location with json is unlikely to be correct (it's probably using Custom Locations, which is unnecessary now). And NPCs totally changed in 1.6 so any tutorial from before the end of March 2024 will be totally wrong.

#

!gs

ocean sailBOT
vernal crest
#

Dangit, wrong one

#

!startmodding

ocean sailBOT
#

Making mods can be broadly divided into two categories:

Usually itโ€™s easier to start with making content packs, since you don't need to learn programming.

vernal crest
#

Ah there we go.

#

There's also a command for getting started with NPCs, let me find it.

velvet narwhal
#

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

  1. Tiakall has a great tutorial on making a custom NPC for 1.6:
    https://stardewmodding.wiki.gg/wiki/Tutorial:_Making_a_Custom_NPC

  2. Custom NPCs received many improvements with 1.6. For changes made, see the migration guide:
    https://stardewvalleywiki.com/Modding:Migrate_to_Stardew_Valley_1.6#Custom_NPCs

  3. Some information on the NPC wiki page is still relevant:
    https://stardewvalleywiki.com/Modding:NPC_data
    Just make sure you're checking the migration page and tutorial first as this page still has outdated information on it as well.

  4. Aviroen has put together a template that will allow you to easily create a romanceable NPC:
    https://stardewmodding.wiki.gg/wiki/Npc_template

vernal crest
#

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

  1. Tiakall has a great tutorial on making a custom NPC for 1.6:
    https://stardewmodding.wiki.gg/wiki/Tutorial:_Making_a_Custom_NPC

  2. Custom NPCs received many improvements with 1.6. For changes made, see the migration guide:
    https://stardewvalleywiki.com/Modding:Migrate_to_Stardew_Valley_1.6#Custom_NPCs

  3. Some information on the NPC wiki page is still relevant:
    https://stardewvalleywiki.com/Modding:NPC_data
    Just make sure you're checking the migration page and tutorial first as this page still has outdated information on it as well.

  4. Aviroen has put together a template that will allow you to easily create a romanceable NPC:
    https://stardewmodding.wiki.gg/wiki/Npc_template

velvet narwhal
vernal crest
#

Lol

vernal crest
unique sigil
#

also unrelated but where do i see the governor bot command lists lol. i need to start memorizing those

velvet narwhal
#

i just dig through the mod author link

vernal crest
unique sigil
#

nice, thanks SDVpufferthumbsup

vernal crest
#

I always forget how to find it, so I go to governors mansion and search for list lol

unique sigil
#

checking the farm cave aaaand invisible tile issue again. goddammit

vernal crest
#

Unlike Avi, I find the commands harder to remember than the URLs usually lol

velvet narwhal
unique sigil
#

forgot to NOT select all the tiles for the farm cave entrance in the spring outdoor tilesheet

velvet narwhal
#

i have swapped the community around so now i'm confused and can't find the roles channel

knotty cradle
#

Much appreciated!

velvet narwhal
#

hour 6 of bashing my head against this harmony postfix, no luck

unique sigil
#

oookay is there a way i could spawn a boulder in the farm cave?

#

IsFarm T doesn't work. that's disappointing

vernal crest
#

I can't remember the exact property name, but IsOutdoors?

#

or TreatAsOutdoors or something

unique sigil
#

oh yea you're correct! mustve missed that

velvet narwhal
unique sigil
#

this is why i should not code anytime past midnight

velvet narwhal
#

not about map things, i'm just confused beyond reason

unique sigil
#

does TreatAsOutdoors conflict with IsGreenhouse or did i just enter this property incorrectly

vernal crest
#

I don't know but my guess is that they would conflict.

unique sigil
#

oh noooooo

unique sigil
#

oh my god i finally made map work and the boulder to spawn. now i just have to check the fishing spots, fix some layer issues and the map can be published

plucky reef
#

Nice!

#

How did you get the boulder to spawn? Is it just one of those things in paths?

unique sigil
#

and i removed IsGreenhouse as well, pretty sure that caused a conflict with TreatAsOutdoors, but the wiki didnt mention anything about that so i couldnt know for sure

plucky reef
#

ooh, ok. Is it a real cave? I had a problem with it raining in the cave when I tried that.

unique sigil
plucky reef
#

(I've seen some farm caves where they're outdoorsy which is very nice)

unique sigil
#

this map is intended to have little puzzles and secret stuff

plucky reef
#

oh that's fun. Excited to see it.

unique sigil
#

now another issue to guarantee there is no sequence breaking possible: is it possible to add a GSQ condition into a "When" field?

#

basically i want a warp that only works after checking a mail flag (finished ccBoilerRoom). but so far i don't think what i've written actually does anything, because i can still use the warp even without having fulfilled that condition

vernal crest
#

You don't need a gsq to check for a mail flag. CP has the "HasFlag" token.

unique sigil
#

damn it am i overthinking this all along

#

okay lemme read through that first

latent mauve
#

Just remember that if you are planning for it to be accessible on multiplayer, CC flags need to be set to check for host or anyplayer

plucky reef
unique sigil
latent mauve
#

I ran into this issue with my own mod, only the host has the flags, so only they could use the flagged feature even though the CC was completed when I used the default hasFlag

muted sable
#

Hello, I'm currently planning to add 2 version of npc portraits. One in my style and the other one in the sdv art style. I'm wondering on how to allow players to make the choice between the two?

vernal crest
unique sigil
vernal crest
vernal crest
muted sable
#

Hi aba! ty for answering :] I'm not very familiar with configs. Is there a guide or template for it?

vernal crest
#

(I'd just show you the code itself without advertising my mod but I'm on mobile so I don't have access to it lol)

muted sable
vernal crest
#

I'm also happy to explain any of it, though if I'm not around when you need help I know that most of the regulars in here would also be able to.

unique sigil
plucky reef
#

does that ".description" show up in the config.txt or only in GMCM?

lucid iron
#

i think the i18n stuff in CP config is specifically for GMCM

#

config.json just has actual token

unique sigil
#

yea it only shows up in GMCM

plucky reef
#

at this point I expect most people to be using GMCM but I was wanting to include more information in the config.txt if people still use that instead of resorting to a readme.

lucid iron
#

what is config.txt

plucky reef
#

the file made that you can edit

lucid iron
#

thats config.json then

plucky reef
#

I mean it's a json

#

my brain formats it as json for the person building the mod and txt for people using it but yeah you're right it's a json.

lucid iron
#

it is bit silly to write i18n stuff into there since its the backing data

#

README.md would be better cus github will render it for u too wew

#

assuming if u feel need to make one at all

plucky reef
#

Yeah I was just hoping the config.json could include a description for more ease of use. But GMCM showing the values is better, and for those who don't use GMCM that's on them.

unique sigil
#

oh no laptops my wifi card is acting up again.... not when im in the middle of this... SDVpufferchickcry

#

cant it wait until ive uploaded this mod please

plucky reef
#

I'm at a conference so I can't test, just curious, is there an upper limit to projectile speed?

#

Or if you need something insanely fast, I imagine it's easier to either do a hitscan (directly damage monster) or spawn the projectile inside/1pixel away from the monster and do a temporary sprites thing instead.

#

More backstory, I have a projectile that spawns itself above the monster's head and moves downward kinda like a moonbeam, but I want the spawn-in to be a little more fancy and fast monsters like the mutant bugs will outrun the projectile which I don't want. So I was doing some homing stuff to try to get it to follow the monster, but the projectile is vertical only so it looks wonky if the monster moves to the side and up away from the projectile, so I'm looking at making an animation that looks like it's hitting the monster and applying the damage more directly.

lucid iron
#

I think it'd be better to not bother with projectile in that case yea

#

The collision system in game is just get predicted location and check colliding there iirc

#

So if it move too much in 1 tick it'll just overshoot

plucky reef
#

this particular beam also gets an override to ignore all collision besides monster so it's not using too terribly much of the projectile class, unless the debuff part of the projectile will use more.

lucid iron
#

I vote for custom hitscan class that takes temporary animated sprite

plucky reef
#

dang it, that's what I was building originally too lol before deciding to go projectile since it was more 'plug and play'.
Learning experience...

lucid iron
#

Is it really plug n play if u subclassed the thing monS

plucky reef
#

well, building hitscan for this will make it transferable to the new harp attack.

#

it wasn't subclassed originally, I scope crept myself in the name of coolness.

lucid iron
#

A combat extensions kind of library mod might be nice

#

Tho it can't really be just C# api, would have to reference

dense void
#

Hi, could someone help me? I want to add a "DynamicTokens" to one of my mods, which only changes the texture of a certain thing when I'm in a specific location. The locations are: mine, desert, BugLand, SkullCave, and the volcano. I tried making a conditional, but it doesn't seem to work.

The conditional I made looks like this:
{ "Name": "Cape", "Value": "false" }, { "Name": "Cape", "Value": "true", "When": { "LocationName": "Mine, Desert, Caldera, BugLand, SkullCave, VolcanoDungeon%" } }

plucky reef
#

expanded melee framework seems to handle most custom weapons and their special attacks as long as people are using regular melee attacks. But I wanted to do something weird where you strum the harp and it creates a hitscan rectangle like a sword would.
Will get to try to finish building it this weekend.

lucid iron
#

Yeah I was thinking more about making projectiles less hardcoded

#

It's a pein that the debuff effects r mixed in with the projectile motion

#

Plus lack of ability to use any texture, gotta be that 1 sheet or an item

plucky reef
#

Also going to add the special attack to the right click, I found how to rotate the projectiles kinda twirling around each other and need to fine tune it.

tiny zealot
dense void
#

{ "LogName": "Cape - Dungeon", "Action": "EditImage", "Update": "OnDayStart, OnLocationChange", "Target": "characters/farmer/farmer_girl_base, characters/farmer/farmer_girl_base_bald, characters/farmer/farmer_girl_base, characters/farmer/farmer_girl_base_bald", "FromFile": "Assets/Farmer/Cape/cape_dungeon.png", "PatchMode":"Overlay", "When": { "Cape": "true" }, },

calm nebula
#

Which location are you checking

tiny zealot
#

dynamic token checking location, see above

calm nebula
#

(I'm asking for specifics because that fails for all mineshaft locations)

dense void
#

In all the listed locations ("Mine", "Desert", "Caldera", "BugLand", "SkullCave", "VolcanoDungeon", including the levels within the mine), since it's a visual addition to the farmer's sprite, I want it to be part of their sprite while they are inside the location.

calm nebula
#

Which location are you currently looking at

tiny zealot
#

what is the % doing for you in your string of location names?

dense void
dense void
calm nebula
#

Yeah so

#

That doesn't work

#

The location name is MineShaftXX where XX are numbers

#

You will need to use a query token

#

That said that should work in bugland

dense void
#

that makes sense. It would look something like this:
{ "Name": "Cape", "Value": "true", "When": { "LocationName": "MineShaft1, MineShaft2, MineShaft3..., MineShaft120" } }

dense void
unreal spoke
cyan hollow
#

I want to make a mod that lets you improve crop genetics, so I want to have, let's say 8 traits they can breed into their crops. But this would result in a ton of combinations per crop. Is there a way to have crop definitions / behavior differ during runtime?

brittle pasture
#

with the power of C# you can do anything

cyan hollow
#

great, I just don't want to have to do say, 2^8 variations for all the crops in the game.

tawny cape
#

Can ya'll guess Why this is an issue for me on the new update face_holding_back_tears_old

#

Concerned ape put a cave where i had my cave death

#

So now i have to move mine

tiny zealot
#

F

tawny cape
#

I havent seen anything from the new update so i don't even know what the cave does

shadow vortex
brittle pasture
tawny cape
#

Bwhaha

#

If the cave wasnt massive i might just

brittle pasture
dense void
#

"That tip was very good, thank you very much, I was lost. And for the 'levels' of the volcano, it would be something like this:
{ "Name": "Cape", "Value": "true", "When": { "Query: '{{LocationName}}' LIKE 'VolcanoDungeon%'": true } }

brittle pasture
#

Or just give them a different internal name

cyan hollow
shadow vortex
#

You could do that, but then it will take a lot of storage space for all the different variants.

tawny cape
brittle pasture
#

yeah definitely dont do that lol

latent mauve
#

Friends, does anyone know what I would need to input as the search term in Visual Studio Code to only grab lines of dialogue that include a npc name in the value without also finding all the lines with the npc name in the key for the key/value pair?

#

I don't understand regex enough to try to write a regex statement for it but it sounds like it should be possible

tawny cape
tiny zealot
next quarry
#

does anyone know the "music"-ID for the ambient sound that is playing in the joja markt?

uncut viper
#

doesn't joja use the hospital ambience or am I misremembering

next quarry
#

Oh! yeah!

latent mauve
#

Locations file says Hospital_Ambient, yep

next quarry
#

thank you! aSDVpufferparty

latent mauve
tawny cape
#

I have like 4 hours to finish porting this mod to the new version and then start working on a seperate mod

#

And i have to take a break in the middle of that four hours where i might not be โœจ coming back in time โœจ

vernal crest
#

Why the time pressure?

tawny cape
#

Collage and the second mod is a gift

#

Which vanilla tileset has the darkness for cave entrances again?

lucid iron
#

what is in your cave DokkanStare

tawny cape
#

Its where an NPC lives

lucid iron
#

mr ape's cave not very big but it is kind of odd to have 2 entrances that close

tawny cape
#

very, i made mine before 1.6

#

Such a good spot that i wasn't the only one to have the same idea ๐Ÿ˜ญ

vernal crest
#

Hey is that the ||mastery cave||? I have just decided I should try to finally get into that thing.

tawny cape
#

I have no idea what it is, i havent played 1.6

vernal crest
#

And now you have spoiled it for me Chue! ๐Ÿ‘ฟ ๐Ÿ‘ฟ /j

lucid iron
#

nou i clicked the ๐Ÿ‘๏ธ like a good chu

tawny cape
#

Has it become easier to add in head items since 1.5?

lucid iron
#

yea you can use content patcher for that

tawny cape
#

I have to add in my GF's bunny ears

lucid iron
#

head items like hats?

tawny cape
#

yes

vernal crest
#

Yeah I am just terrible because I immediately click on spoilered images without even noticing

tawny cape
#

last i recall you could only replace

lucid iron
#

Data/hats

#

just gotta edit in new entries

tawny cape
#

I forgot how to fix this issue when using the overlay patch mode

#

Hmm, think it would still look odd if i koved the cave here?

lucid iron
#

that would feel better i think

vernal crest
#

I wonder what Stardrop does with the zip files when it downloads mods

tawny cape
#

Hmm, is there a conditional flag for game version in Content Patcher?

#

For example, loading the old map location if you're on 1.5

lucid iron
#

there's one in the manifest but since this is a npc mod you are going to have to change so much

tawny cape
#

Am i?

lucid iron
#

yea npc dispositions dont exist anymore

tawny cape
#

Can't i just target 1.5 and let automigration handle it

#

Oh

lucid iron
#

!npc

ocean sailBOT
#
Creating a Custom NPC

Keep in mind that making NPCs is a complex process that requires learning many different aspects of Stardew modding.
Here are a few links that can help get you started on all that you need to know:

  1. Tiakall has a great tutorial on making a custom NPC for 1.6:
    https://stardewmodding.wiki.gg/wiki/Tutorial:_Making_a_Custom_NPC

  2. Custom NPCs received many improvements with 1.6. For changes made, see the migration guide:
    https://stardewvalleywiki.com/Modding:Migrate_to_Stardew_Valley_1.6#Custom_NPCs

  3. Some information on the NPC wiki page is still relevant:
    https://stardewvalleywiki.com/Modding:NPC_data
    Just make sure you're checking the migration page and tutorial first as this page still has outdated information on it as well.

  4. Aviroen has put together a template that will allow you to easily create a romanceable NPC:
    https://stardewmodding.wiki.gg/wiki/Npc_template

lucid iron
#

assuming this is nexus ppl can see and download older versions, i wouldnt bother making any 1.5 compat in 1.6 mod

vernal crest
#

Ooh that needs updating because Pathos has updated the wiki page for NPCs now and there's almost no info left on the migration page

#

@velvet narwhal I ping you because I am tired and don't want to learn how to edit commands right now haha

tawny cape
#

I have โœจ forgotten โœจ How to open the tileset i used for this map automatically in tiled

#

I havent touched tiled in a bit

#

Is there a button to open the paths for tilesets embedded in the map

#

NVM, i'm just an idiot

#

Tileset view was hidden

raw kelp
#

does anyone know how to remove bushes from an area in a map? i was editing a tilesheet but couldnt find anything for bushes and now there are bushes inside the building i added to the map-

vernal crest
#

Were you editing the map itself or just tilesheets? A lot of bushes are placed using the "Paths" layer + tilesheet in maps so you would need to edit the Paths layer to remove them.

dense void
#

How can I find out the name of a location within the game? I mean, is there any mod or SMAPI command for that?

raw kelp
vernal crest
raw kelp
#

hold on lemme get a ss

brittle pasture
vernal crest
raw kelp
ornate trellis
#

that red icon indicates the bush, itll appear once the save is loaded for the first time

vernal crest
dense void
raw kelp
#

yes i got rid of all the red under the building

ornate trellis
#

oh wait, its actually next to the house on the map

#

did you load into an already existing save?

raw kelp
#

mm thats it

vernal crest
#

Oh yeah good catch Void

dense void
raw kelp
#

thank you

ornate trellis
#

ive had that a lot with my old crusty test save for my new locationg for stuff like grass and trees lol

vernal crest
#

It's so annoying testing Paths layer changes and having to make new saves over and over

raw kelp
#

just checked, that was it! tysm

finite ginkgo
#

(download reset terrain features, you don't have to make new saves over and over)

ornate trellis
#

my old test save has been with me since 1.6 beta(or was it alpha i forgor which one it was called when we could dl it to update our mods pre 1.6 drop)

vernal crest
#

I was under the apparently incorrect impression that reset terrain features just yeeted them

ornate trellis
#

i also came here actually to ask a question but i forgor what it was lol

vernal crest
finite ginkgo
vernal crest
#

Yeah the name is self-explanatory but some people choose bad names for things lol

#

Thanks, I am now enlightened SDVpuffersmile

odd ginkgo
#

Hi all! I'm new to this Discord but have been modding SDV for a while now. I wanted to share a big update/cleanup of my horse mod! And see if there's any community feedback haha

#

Thanks for all the amazing work that comes out of this community!

lucid iron
#

do you want a mod showcase post?

odd ginkgo
#

is that okay?? I don't know the general community rules yet

#

but yes!

lucid iron
#

its informal but basically someone w/ mod author role posts your mod on your behalf (example #mod-showcase message)

#

and then publish it to mod showcase

#

what would you like to say in the message?

odd ginkgo
#

๐Ÿ™‚ ๐Ÿ™‚ ๐Ÿ™‚ super cool

#

Basically this is a refresh update for a mod that's been in development a long time, so it's in a much more polished state! It comes in CP and AT versions, with optional saddles. My desire was to create horses with personalities, so when you change coat colors they don't feel super interchangeable, but like, a new friend with a new temperment

#

Each coat color was made with a lot of love and a lot of details!

#

Thanks!!

lucid iron
ornate trellis
#

i remember my question!

#

its about artifacts spots and their chances

#

so i wanted to make my totem for the island a possibility and cranked the likelyhood up to 0.9 and precedence to -100 but for the whole map i still just got 2, did i do something wrong or is that actually normal, im kinda bad with this whole figuring out chances and stuff

tender bloom
#

Is this that you're getting 100% totems when you find an artifact spot, and you only found 2 artifact spots, or is it that you found a bunch of artifact spots and only 2 of them were totems?

brittle pasture
#

got some free time and decided to free us from the tyranny of heldObject

ornate trellis
#

am i missing something to even get artifact spots on my map is what i wonder

brittle pasture
#

I think compat will be fine

tender bloom
#

You can definitely change the drop rates from what drops from artfact spots

ornate trellis
#

well, its less about chance and overall wondering why i never so far got any at all on my map ๐Ÿค”

#

so i cant even check what i get from em

lucid iron
#

Brb turning all keg outputs to emc grass

tender bloom
#

How big is your maps and are the dirt tiles set up weird in any way?

#

Artifact spot chance isn't that high

#

you can use this mod for testing

lucid iron
#

In LA do u have to click through the holder item before viewing the shirt item

brittle pasture
#

yes unfortunately

ornate trellis
#

its 110x58 and all of the sand is set to dirt T and diggable T (except the direct coast obv)

lucid iron
#

But only for shirt right

brittle pasture
#

there's actually also a Chest in the middle

tender bloom
#

oh, is this so you can have 2 separate things produced?

ornate trellis
#

i think i gonna use that mod and see if i was just unlucky so far in getting a spot

brittle pasture
#

yeah I'm leveraging that feature for this
It would be cleaner if the holder item wraps the shirt directly, but

#

lazy

tender bloom
#

Neat!!

brittle pasture
tender bloom
lucid iron
#

that is bit annoying but ill live

#

you should watch out for better chests

#

this person's debris was disappearing into the enricher chest

#

because of some better chests setting

velvet narwhal
#

@vernal crest updated the npc command for you

lucid iron
#

if you submit to tyranny of heldObject and pretend it is just linked list you can dodge this blobcatgooglyblep

brittle pasture
#

yeah ok that's kinda wack lmao

#

I did ponder the linked list route, but a chest was cleaner

#

on the bright side it seems Better Chest's auto collecting feature only works for chests inside the player's inventory, and I make sure to yeet and unroll the holder chest once it enters inventory

ornate trellis
#

alright, so i managed to increase the spots, guess i really was just unlucky with getting em

#

now i also know that if i use RANDOM_ARTIFACT_FOR_DIG_SPOT i can get vanilla totems, huh

brittle pasture
#

and the original bug was because the phantom chest in the enricher wasn't yeeted properly right

lucid iron
#

i think it's more to do with better chests ignoring the playerChest=false flag

#

in vanilla if u remove a placed enricher u dont get a chest item or anything, just the enricher + any fertilizer inside

brittle pasture
#

does the fertilizer remain inside the enricher?

lucid iron
#

nop

brittle pasture
#

but the chest does?

ornate trellis
#

I also made it so the wornout hat thats fishable can be turnt into cloth via loom HuTao_EvilLaugh

lucid iron
#

not in vanilla at least

#

i will try it now just to be sure DokkanStare

brittle pasture
#

make sure to test without EMC
right now it will unconditionally yeet the chest inside any item that enters the inventory

#

after dumping its contents

#

so it may very well be the case that my mod inadvertently fixes that bug with Better Chests

lucid iron
#

the enricher chest shows as an err item actually

brittle pasture
#

yeah that happens with chests lookup in LA

lucid iron
#

yea it keeps the mystery chest when removed

#

if you have 1 enricher in inventory then it just goes poof think

brittle pasture
#

yeah about to ask what happens with stacking

#

worth a bug report ping?

#

(also brb adding "Fix bug with fertilizer inside enrichers disappearing if not removed before the enricher itself is" to EMC feature list)

lucid iron
#

oh the fertilizer has speshul bs to turn into debris

#

its just the chest not getting properly destroyed somehow think

#

despite there being heldObject.Value = null here

#

oh right its gotta be heldObject.Value.heldObject.Value = null 3sSmolMiku

brittle pasture
#

though heldObject.Value = null should still be sufficient right nvm I got it

lucid iron
#

idk if this is worth a ping since it cant ever cause issue in vanilla LilyDerp

brittle pasture
#

yeah the chest is emptied, it's fine if it remains

#

probably not then

lucid iron
#

so if emc is yeet chest by doing heldObject.Value.heldObject.Value = null then its prob fine with better chests

brittle pasture
#

it should remove the chest when the enricher enters the inventory on its own

#

(brb adding "Fix bug with Better Chest stashing items inside enrichers " to EMC feature list)

lucid iron
#

although while the chest is exist

#

i.e. enricher/machine placed

#

is better chests gonna stash stuff into there

brittle pasture
#

The mod page only mentions stashing into chests in player inventory, so I sincerely hope not

calm nebula
#

Linked lists

#

Man I thought I left linked lists in the past

brittle pasture
#

most people had presumably

#

my noob understanding is "If you have to ask whether a linked list is good for this situation, don't use a linked list"

lucid iron
#

why is my chest a fish

tender bloom
#

it's very slippery

lucid iron
#

ah it might be LA bug

#

chest and tuna are both 130

tender bloom
#

ah yes return of the fish crafting menu

#

at one point during the alpha the crafting menu was randomly full of fish

calm nebula
plucky reef
#

why does a chest have spawn times?

lucid iron
#

this is the schedule for tuna

#

(O)130

#

chest is (BC)130

plucky reef
#

oh lmao ok

lucid iron
#

do u think its fine to restrict the fish spawn field to object only bolbthinking

tender bloom
#

No

#

There's also furniture (secret woods, for example)

lucid iron
#

changing it to accept qualified id is bit more involved but possible

tender bloom
#

Plus mods may add other stuff

#

I mean it's possible to just predict fish, not anything else, but there's definitely examples in many places of non-object fishable stuff

#

Iridum Krobus, desert triangle painting, wall baskets, boat painting

lucid iron
#

hm that is true but LA doesnt seem to show spawn rules for those

tender bloom
#

Yeah, I know fish spawn was a struggle so it's possible it just doesn't show any of that

velvet narwhal
#

dumb baby question time that's unrelated:
is harmony.Patch( original: AccessTools.Method(typeof(FarmEvent), nameof(Utility.pickPersonalFarmEvent)), postfix: new HarmonyMethod(typeof(ModEntry), nameof(name of my function here)) // assumes main mod class is called ModEntry ); the same as [HarmonyPatch(typeof(FarmEvent), nameof(Utility.pickPersonalFarmEvent))]

gilded swan
#

hi

lucid iron
#

You can put your function on some other class if you want

#
postfix: new HarmonyMethod(typeof(GamePatches), nameof(GamePatches.Postfix))
#

oh actually thats the patching func oops (ok i fixed it)

uncut viper
#

that would be postfixing the function with itself

calm nebula
#

Also

#

It's sus that your typeof doesn't match the nameof

uncut viper
#

oh yeah. you're not trying to get the return type with the typeof

#

its the Type that holds the pickPersonalFarmEvent function

#

so typeof(Utility)

velvet narwhal
#

SDVpufferwaaah finally

#

now i gotta dig back into my code for that customfield thing i had

calm nebula
patent lanceBOT
#

For the lovely atravita? Why most certainly. (#6265194) (48h | <t:1727559772>)

calm nebula
#

Because for the love of God, us

#

Unnecessarily using reflection

velvet narwhal
#

i need to really just, completely wipe my mods folder, i've let stardrop just go crazy and now everything's a mess

old edge
#

It just a class that disables the watering can being used on water tiles. Still has water Tiles property. The drawWaterTile method handles the animation but it can also be done in tiled. Other than that it hooks into the performToolAction method so when the watering can is used it shows some steam and flames.

#

The hardening of lava like in volcanoDungeon seems pretty simple. Need to make the water tiles passable and place a temporary sprite and then it has some net stuff for multiplayer/online purposes

final folio
#

Hello, a question, is it possible to have spouse Rooms without dll?
For example just by editing game files

old edge
#

Yes this would be a good idea

tender bloom
ocean sailBOT
final folio
tender bloom
#

Idk if you can

#

We don't encourage xnb modding unless you have to

#

!xnb

ocean sailBOT
#

XNB mods often break the game and are not recommended. See:

For mod creators, see editing XNB files for help unpacking & editing them (including for use with Content Patcher).

old edge
#

Idk that's in the team rocket hideout where they have a sliding puzzle

vernal crest
#

Would xnb file changes be overwritten by game updates too?

uncut viper
#

yes

tender bloom
#

Also they can cause game crashes if you do them wrong

final folio
tender bloom
#

Yeah console modding is pretty difficult. Pillow has done a bit of it but anything involving how to jailbreak is not allowed to be discussed here. You'll have to make most of your own mods and repack the xnbs, which isn't something a lot of people do outside of consoles.

#

Console modding is riskier so most people don't choose to do that

lucid iron
#

are you attempting to modify a vanilla spouse room?

velvet narwhal
#

YESSSSSSSSS

#

now the question is, do i let spacecore usurp this

old edge
#

The feature I saw was don't step on twice tiles. It looks like a cracked floor but if the player steps on it twice it breaks and player falls

dusty scarab
old edge
#

Oh well the map should have cracked floors

#

I'm trying to make this in c#

#

Did the boss break the entire floor?

dusty scarab
#

also, I hate it when Windows decides it knows better than I do about when to restart my computer and I have to go back and hunt down all my opened files I was working from again...

old edge
#

Get linux

#

Stopped using windows in 4 years ago

dusty scarab
velvet narwhal
#

my pc upgrade is when i swap over to linux, and it's gonna be jarring and painful SDVpufferclueless

dusty scarab
#

...honestly, I think that makes two bosses who have a mechanic like that in FF14, the ninth boss of the Eden savage raids, and the first boss of the Arcadion savage raids. (at least, that I've fought as on-level content)

old edge
#

That's cool

#

How difficult is it to create a giant boss in Stardew?

final folio
old edge
#

I have an idea

dusty scarab
velvet narwhal
#

ftm has the capability of persistent hp SDVpufferthink if you're talking draw size, i think they removed the limits of size

final folio
old edge
#

So I can put a giant bug monster

velvet narwhal
#
    : base("Lava Lurk", position)
{
    this.Sprite.SpriteWidth = 16;
    this.Sprite.SpriteHeight = 16;
    this.Sprite.UpdateSourceRect();
    this.Initialize();
    base.ignoreDamageLOS.Value = true;
    this.SetRandomMovement();
    this.stateTimer = Utility.RandomFloat(3f, 5f);
}```
old edge
#

A giant lava lurk?

#

Better and easier I think

#

I noticed expanded mod has the beta behind the Patreon membership. Is this allowed while the mod is on nexus

brave fable
#

on a technical level though, it's just going to be a monster with some fancy sprites and custom behaviour states

next plaza
#

^

knotty phoenix
next plaza
#

I technically did a boss for Theft of the Winter Star

#

And S&S has a final boss - implementing it this weekend

brave fable
#

see? a whole 2 mods with bosses

next plaza
tender bloom
#

Aedenthorn used to have a framework

#

Ah Casey beat me to it

brave fable
#

not to discount the incredible pvz and gnome boss mods, but i don't remember if those released

uncut viper
old edge
#

I didn't know I could make a beta for a specific new version

brave fable
#

should i be charging a subscription for my sdv1.6 betas SDVpufferthinkblob

velvet narwhal
#

flash does give access to mod authors, so you could probably ping and ask

old edge
#

I'm going to do that but because I plan on adding the boss and this main puzzle map

raw kelp
#

so im trying to make my first mod and i know literally nothing about modding so im following this tutorial thing and ive followed it exactly (to my knowledge) but it keeps failing on the first action line. this is my error message thingie

tiny zealot
#

!json can you show us your content.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.

tiny zealot
#

(meaning follow the first link, upload it, and paste the link it creates here)

raw kelp
#

i just copy and pasted exactly from the stardew valley wiki and changed what they said to

velvet narwhal
#

that very first action, on line 4, you can think of anytime you have to do "commands" that you need to sandwich it in { }
like the rest of the "Action": "Load"(s) they have the brackets to make it into a codeblock

raw kelp
#

oooh ok thanks

velvet narwhal
#

line 7 isn't necessary, so you can delete that

raw kelp
#

ok thanks

velvet narwhal
raw kelp
velvet narwhal
#

npc_data reflects only for data/characters

raw kelp
#

oooh

#

...what does that mean?

velvet narwhal
#

!unpack

ocean sailBOT
#

Follow this guide to unpack the game's content files in order to see and explore how the game data is structured.
It's helpful when making your own mods, or just to learn about how the game works!

velvet narwhal
#

i assume you've unpacked everything, but it should be a bigger warning that NPCs have possibly the most moving parts in content patcher

raw kelp
#

yeah i unpacked everything

velvet narwhal
#

okay so you see the data folder, yeah?

raw kelp
#

yes

velvet narwhal
#

and then inside of that has characters
that's what it means anytime you see "Target": "Data/Characters" // "Target": "Data/EngagementDialogue" etc etc

raw kelp
#

oh so by saying im editing that id be trying to edit an already existing character

velvet narwhal
#

tia's guide assumes you've done at least some other content patcher mod, whether it be replacing a portrait or a sprite of a vanilla character, just to understand the semantics of content patcher

#

and no, you're editing the file when you're targeting it with "EditData" action

#

it doesn't have to be an already existing character, that's what specifies the "Entries" part of it

raw kelp
#

ahhh ok

velvet narwhal
#

when you do want to edit a specific character, that's when the "Fields" comes up, because some .jsons have model formats

#

ex:

  "Action": "EditData",
  "Target": "Data/Characters",
  "Fields": {
    "Abigail": {
      "CustomFields": {
        "Aviroen.GSQBaby": "true"
      }
    }
  }
}```
raw kelp
#

ok i think im kind of getting it?

#

im still getting an error message tho

velvet narwhal
#

reupload your json

#

SDVpufferthinkblob i think i'll nuke the unnecessary jsons from my "working example"

raw kelp
#

nevermind i was able to figure it out myself >:D

#

ill probably be back here in another 10 minutes when i cant figure out the next step-

velvet narwhal
#

SDVpufferyikes i hate dealing with github readme

raw kelp
#

thank you!

velvet narwhal
#

do i.... make a core for myself now....? SDVpufferthink i have no idea what else i'd even want to use harmony on except for child.cs

raw kelp
#

and im back with โœจ another error messageโœจ

#

it says it cant find my portraits and sprites even though its a png named exactly what it told me to

velvet narwhal
#

have you loaded them to the appropriate space?

            "LogName": "Load Base",
            "Action": "Load",
            "Target": "Portraits/EdelweissSeung, Characters/EdelweissSeung",
            "FromFile": "assets/{{Target}}.png" //target means that it will dig into my Assets -> Portraits folder, and find "EdelweissSeung.png"
        },```
raw kelp
#

i think?

#

when i load it into the checker it says no errors

velvet narwhal
#

the check can't see your files, it only checks your code

raw kelp
#

yeah i assumed so

#

the sprites and portraits are right there

velvet narwhal
#

i cannot tell if you're in your assets folder or not

bright panther
#

is the actual code any better than the decompiled or is this really how it manages depth values ๐Ÿ˜ญ

velvet narwhal
raw kelp
#

yes im in the assets folder

lucid iron
#

i wonder what the 9.9999e-5 float looks like in original code think

calm nebula
#

Almost certainly 1e-4 lol

next plaza
#

I'd guess decimal form

dusty scarab
#

so I'm populating the paths layer of my map, and all I can say is... I feel bad for whoever thinks they can just mow right over the top of all this grass. there's so many rocks hiding in there...

shadow osprey
#

i'm building my first CP mod to make Robin dateable. Everything is working fine except for GreenRain dialog & schedule. She says the default game dialog instead of the custom dialog, and doesn't follow any schedule changes during GreenRain. All other dialog & schedule changes in the same json files work fine, and there are no errors in the console. Any tips on things to try?

tiny zealot
#

try a new save, or resetting time back to the previous day and sleeping (assuming you are loading a save on green rain day to see your changes).
some schedule stuff gets lined up at the end of the previous day, so your changes won't really stick unless you sleep into the day you are testing

shadow osprey
#

I've been exiting to desktop, making a change, and loading the game to the save with the green rain day & trying again. I'll roll back a day, exit to desktop, make changes & reload. does that sound right?

calm nebula
#

Are you y1

shadow osprey
#

Yes, Y1.

#

I tried resetting time back to the previous day, no luck. Do you see any issues in this code? I also tried the commented lines during testing and they didn't work either:

calm nebula
#

It needs to target her normal dialogue file

#

Just do a "When" : {"Spouse": "Robin"}

shadow osprey
#

ok, cool, thanks! I'll give that a shot.

#

Targeting the normal dialogue file did the trick. Thanks for the help!

vernal crest
# raw kelp the sprites and portraits are right there

You don't appear to have file extensions enabled so I think your files might be called "portraits.png.png" etc. Try removing the ".png" (and if you want to be kind to yourself, Google how to turn file extensions on).

wise berry
#

!fileextensions

ocean sailBOT
#
Hidden File Extensions

Windows and Mac hide most file extensions by default. If you are creating or updating mods, it's helpful to show file extensions so that you can be sure all mod files are named correctly.

To show file extensions on your computer:

On Windows 10, open File Explorer, click on the View tab, then check the File Name Extensions box.

On Windows 11, open File Explorer and click on View > Show > File Name Extensions.

On Mac, open Finder, and in the menu bar, click on Finder > Settings (or Preferences) > Advanced, then check the Show all filename extensions box.

vernal crest
#

Wow we have a command for everything. Thanks silicon

teal bridge
#

For anyone curious about the mad-scientist project I was talking about the other day.

#

(Don't mind the crappy syntax highlighting, that's just Notepad++ being stubborn)

next plaza
#

Ooo, that looks fancier than my UI XML loader

teal bridge
#

I'm not familiar with that project. It is pretty fancy, though; this is how I plan to make StardewUI into a totally standalone mod. (Yes, those data bindings do update; and yes, those assets do track invalidations and hot-reload.)

#

So you did some XML language? (I guess it was not used in GMCM, SpaceCore, etc.)

next plaza
#

Yeah, the loader is in SpaceCore. Not sure anything uses it yet

#

I don't think SpaceCore has any custom menus (not counting the skills menu, since it's based on vanilla)

#

I originally made it back when I was adding the MiniScript stuff for content packs (that I later canned)

teal bridge
#

Neat. Guess it should be no surprise that the idea's been around for a while.

#

Hopefully, this requires no scripting, since everything is bound to the object you give it in C#. I used a custom markup language and 0-allocation parser so it is (or appears to be) very fast as well.

#

And most importantly it has access to the entire layout system, meaning you get flow layouts, controller support and all that fun stuff.

#

(Still got a lot of work ahead, though)

next plaza
next plaza
lucid iron
#

wow StardewUML DokkanStare

teal bridge
#

This is mostly intended for C# authors, although I'm planning for the idea that content authors can add patches to edit the markup and restyle the menus, even completely change the layout if they want.

lucid iron
#

can people add scripting to this if they wanted

next plaza
teal bridge
#

I dunno - maybe? It's going to take a while just to get all the markup and data binding features done - the thing I posted is actually working but there are all sorts of important things missing like conditional (if/switch/case) elements, repeaters, includes, etc. So a custom scripting language would take... months, at least. Unless someone else wants to make contributions.

lucid iron
#

oh i was thinking just binding a C# function to some dom element

teal bridge
#

Yes, that's going to be part of the binding system. Haven't decided if I want to use Angular type syntax or just something like on-click={{DoThing}}

#

Only thing that's slightly tricky to figure out is the argument-passing method.

lucid iron
#

if its just onclick=something then people would just have the sender and the event args right

teal bridge
#

That's the bare minimum, yes, but keep in mind that this has to cross an API boundary so I have to be very conservative about the types involved.

lucid iron
#

ah ig react style components r no go

teal bridge
#

I don't want users to have to copy all the EventArgs types (and for me to have to figure out how to marshal them).

lucid iron
#

the easiest impl i can imagine is just storing all unrecognized attributes in a Dictionary<string, string>

teal bridge
#

I like React, though I don't think it's the best fit here necessarily. This should be something that fits in smoothly with SMAPI's content pipeline and API system.

lucid iron
#

the user can decide what do with the dict when they get it LilyDerp

teal bridge
#

I'm not sure what role unrecognized attributes would play. You'd have access to the context data in the event handler, because the event handler is in the context data.

#

The main thing that might need to get passed is, say, you have a list of buttons/item slots/etc. in some repeater and the handler needs to know which item was clicked. That's an argument.

#

It looks like HTML (by intent) but it isn't HTML; there should be no need to fiddle with DOM nodes because the binding system is built in.

lucid iron
#

ah it is the object? sender that is hard to pass then DokkanStare

teal bridge
#

Sure, it can pass a sender. But the caller has no idea what the sender is. It can't cast it to anything useful. It doesn't have IView or anything descended from it.

#

Hence, argument passing. Ideally the markup goes something like:

<button repeat-for={{Items}} on-click={{OnItemClick(ItemId)}} />
lucid iron
#

so unregonized means not one of image's props in this case

teal bridge
#

Custom attributes are just going to come from the context, though.

#

The roundabout route doesn't seem helpful - dumping something from the context into a custom attribute, then having to read the custom attribute back in a handler - when the handler already has the context.

#

It's primarily a data binding system so you don't want to think in terms of "elements", think in terms of context and data.

#

(Basically, like XAML, not React)

lucid iron
#

yea makes sense Bolb

teal bridge
#

I don't want to call it MVVM because WPF/Avalonia/etc. are not strictly MVVM, they're agnostic of your architecture, but it's that kind of system. Or intended to be, anyway. (But, you know, without all the nasty XML boilerplate)

lucid iron
#

im unsure if i would use this over shared project though think

teal bridge
#

I'm guessing you would not, since it offers less control than using the UI library directly. It's my thinking that there are a decent number of other modders out there who just want to whip up a quick UI and don't want to have to write a ton of code (or want to make their UI themable, etc.).

#

And importantly, having an actual mod entry point means I can (a) push critical bug fixes, (b) store actual assets for things like button prompts and localized text strings, and (c) have a convenient hot-reload system for experimenting with UI.

#

But don't worry, the submodule isn't going anywhere, this is a separate mod/project being built on top of it.

lucid iron
#

exciting DokkanStare

teal bridge
#

Hopefully others agree. I'm excited that this is actually proving to be possible; last week it was just a wild idea that I thought might fail utterly.

lucid iron
#

i did look over my spaget now and the main thing needed extra class for was controlling the scale and position of a bunch of Image in 1 panel

#

for some reason i used FixedSize layout calculated from image size * scale rather than Sprite.SliceSettings think

teal bridge
#

ยฏ_(ใƒ„)_/ยฏ

They do different things. Scale in the slice settings allows scaling up the borders of a nine-slice as well, since that's required to look the same as the game when displaying Cursors sprites at UI scale.

lucid iron
#

yea these were item/big craftable sprites

teal bridge
#

It does also affect the "native" size of an image when you use content-based sizing. Though we shouldn't be allergic to px sizes in Stardew; it's bad form in HTML but Stardew doesn't have variable UI scaling.

#

Calculating the layout size is indeed kind of weird, I've never had a need to do that. Usually the layout itself should take care of it.

lucid iron
#

i wanted the smol icons to go in particular positions in the panel

#

but the content align is parent controlled i think?

#

since the big icons r known size i just mathed what padding the smol icon should have

teal bridge
#

Yeah, if you want to align a bunch of different elements to different edges of a single content container then the (admittedly kind of awkward) way to do that is to have a Panel with a bunch of sub-panels. The Panel.Align helper is to make that a bit easier to write.

lucid iron
#

there was also some jank around the width of the container

teal bridge
#

It's a hacky thing where all the panels actually stretch to the parent, but each align their (single) content in a different place, essentially the same as aligning all those different views.

lucid iron
#

css float at home PecoSmile

teal bridge
#

A lot of the time you should just use fixed sizes, though. No reason to torture yourself trying to force everything to be flow layout; if you need a pixel size or a pixel offset, then write a pixel size or a pixel offset.

lucid iron
#

yea but i really wanted to balance the columns blobcatgooglyblep

teal bridge
#

Why wouldn't a fixed size do that, though?

lucid iron
#

the columns arent fixed size

#

like this

teal bridge
#

Ah. And you didn't like the left column being slightly wider than the right?

lucid iron
#

nah this is the desired look, which is minimize whitespace blobcatgooglyblep

#

but i did want the columns to contain similar number of items

teal bridge
#

It looks to me like something that could be done with normal layout and not requiring weird math hacks... but I'm sure you had a good reason.

lucid iron
#

i think it is just me being dum dw about it kyuuchan_run

#

the goal is to minimize amount of scrolling used i think

teal bridge
#

Well, if nothing else then it's a reason to be excited about a hot reload capability. I mean, you can kind of do it with the VS debugger but it's extremely persnickety about it especially when any generic type is involved.

#

Can try out a lot of different layouts very quickly.

lucid iron
#

for these 2 machines i'd have mathed out a different height and width based on number of rules and screen size

teal bridge
#

I see. You're trying to set columns according to the number of entries that can appear. I probably would have just let it scroll, but I can see why you might prefer to avoid it.

lucid iron
#

if i have it scroll some machines will have like 10 things in col 1 plus 1 thing in col 2

#

this is very niche though, grid is what most ppl will use

teal bridge
#

I suppose? That just depends on how you distribute the items into views. You've got 2 lanes, so you add the first item to lane 1, second item to lane 2, third item to lane 1 again, fourth to lane 2, etc. Just interleave.

lucid iron
#

hm

#

then ig it'd actually have to be horizontal lanes think

teal bridge
#

At least, that's how I assume you laid it out. I thought it was 2 vertical lanes each with horizontal lanes per item.

lucid iron
#

displaying machine rules in order is important

teal bridge
#

Same deal if it's a Grid though, it would distribute them automatically.

lucid iron
#

no i mean, if i was to do round robin

#

while keeping the real ordering up->down left->right

#

since that is order of machne rules getting checked

teal bridge
#

Well everyone's going to be finicky about their mods in different ways; as a user I'm not sure I'd notice a difference between "in order" being from left to right vs. from top to bottom.

#

So what's the idea, that the priority goes from top to bottom in the first column, then top to bottom in the second column? Everything in column 2 has lower priority than anything in column 1?

lucid iron
#

yep

teal bridge
#

Sure. Nothing wrong with that. Though, you could still easily do that by interleaving the list, just using a midpoint offset instead of round-robin.

lucid iron
#

since this is a turn off rules mod, having a rule off sometimes means you get a different rule's output (bc the rule it would have gone to is off)

lucid iron
#

i can definitely see how interleaving would werk, but alas maffs was more intuitive

teal bridge
#

(I am not saying you should change it; I think what you've done is fine. Just that I, personally, would probably have taken the lazy way through, make a scrolling UI, and just do round robin but instead of A->1, B->2, C->1 and so on, it would be A->1, A+(N/2)->2, B->1, A+(N/2)->2, etc.

lucid iron
#

i also wonder if there was better way to align stuff at the caret

#

atm i just check the max width of a column before making any entries blobcatgooglyblep

teal bridge
#

All the screenshots I see have the caret in the same place.

#

I'm guessing you mean something like having 1 inputs vs. 2 inputs but always having the caret after where the 2nd input "would" be? But that's not apparent from any examples here.

lucid iron
#

yea bc these machines happen to have 1 in 1 out

#

its possible to have different number of in/out due to emc

#

like this

teal bridge
#

The way to do that is:

  • Horizontal lane with fixed width (column width)
    • Horizontal lane with stretch width
    • Fixed-width caret
    • Fixed-width output
#

Since about a month ago, it understands how to do "stretch to remaining available space after accounting for all fixed/percent width stuff"

#

You could also be lazy and use a spacer element when the second input is not present.

#

Though that's really probably more work than what I spelled out above.

lucid iron
#

well that is still "knowing about max width/items in rule" in a column

teal bridge
#

Yeah, that's why I said the spacer version is more work. Stretched child is essentially no work.

lucid iron
#

oh yea the thing i wanted to try and add b4 getting distracted here is lookup anything compatibility

teal bridge
#

The inputs go in one lane that's stretched. The caret and output item are fixed-width elements.

lucid iron
#

at least for the real items

teal bridge
#

Indeed... well, I assume LA has some kind of API you can use to request it to look up an item. If it depends on ClickableComponent or whatever that junk is then I'm afraid you're SOL.

dense void
# lucid iron

Sorry to jump in out of nowhere, but is this from a mod you're working on? It looks really beautiful, like, fantastic!

lucid iron
#

well u should heap ur praise on focustense's excellent ui library AnnelieStare

teal bridge
#

Of course, if the author (is it Pathos?) would like to collaborate on a solution to make LA work natively with StardewUI then I'm happy to hammer something out.

lucid iron
#

it looks like a bunch of factory methods to obtain a subject from a screen point think

#

and yea its pathos' mod

teal bridge
#

Yerf... well you can certainly get the IView at any given point through the ViewMenu and related APIs. And you can attach arbitrary data, such as a qualified item ID or even ParsedItemData, through the view's Tags.

#

So there is certainly a way to express the idea of "get the item that is being displayed at screen position X,Y" and it is not even that hard. Whether or not you can make it work with LA is another question entirely.

lucid iron
#

alas it is menu specific

teal bridge
#

It would be nice if that just worked. I suppose all my mods except AFS would benefit too (Pen Pals, GIG, Starlog, etc.). But, this is another wart of having a shared-library/submodule deal, I can't really write mod integrations directly.

lucid iron
#

oh there's a mod support entry blobcatgooglyblep

#
/****
** By convention (for mod support)
****/
default:
    {
        Item? item =
            this.Reflection.GetField<Item?>(targetMenu, "hoveredItem", required: false)?.GetValue()
            ?? this.Reflection.GetField<Item?>(targetMenu, "HoveredItem", required: false)?.GetValue();
        if (item != null)
            return this.BuildSubject(item, ObjectContext.Inventory, null);
    }
    break;
#

maybe if u make a ItemImage following this

#

there's a similar bit of reflection in CharacterLookupProvider

teal bridge
#

Yuck, GetField and not GetProperty. But you can add it to your derived Menu class if you like, seems easy enough to do locally (not a great long-term addition to the library though imo).

lucid iron
#

idk if i want to add this since it wants an Item and i was trying my best to use ParsedItemData only

teal bridge
#

It is icky, but there's not really much in harm in just creating a 1-stack item. Just having the Item exist doesn't do anything to game logic.

#

It's only if you add the item to inventory, to the world, etc. that it starts affecting things. If it's just a random property field on a menu somewhere then it's not doing anything.

#

I think it is kind of expensive, frame-wise, so you'd want to only recreate the item when the hovered view actually changes.

#

But well, if you want a cleaner solution then you'll have to convince Pathos to open something up. (My PRs on the other mods are still pending...)

lucid iron
#

ill slacc on this PecoSmile

teal bridge
#

Can't say I blame you.

lucid iron
#

that said i do think there is value in a ItemImage class

teal bridge
#

You mean like... Sprite?

lucid iron
#

no it should take a qualified id and draw it

#

as long as ItemRegistry.GetData is not null

teal bridge
#

Like my 1-line Sprites.Item helper?

dense void
teal bridge
#
    /// <summary>
    /// Gets a <see cref="Sprite"/> for an in-game item, given its ID.
    /// </summary>
    /// <returns>
    /// The item or error sprite.
    /// </returns>
    public static Sprite Item(string qualifiedItemId)
    {
        var itemData = ItemRegistry.GetDataOrErrorItem(qualifiedItemId);
        return Item(itemData);
    }

    /// <summary>
    /// Gets a <see cref="Sprite"/> for an in-game item, given its item data.
    /// </summary>
    /// <returns>
    /// The item sprite.
    /// </returns>
    public static Sprite Item(ParsedItemData itemData)
    {
        return new(itemData.GetTexture(), SourceRect: itemData.GetSourceRect());
    }

lol, the docs are longer than the code.

lucid iron
#

ya basically this Bolb

#

where is it though...

teal bridge
#

In my mods. I always have my own Sprites class per mod and just copy it in there.

#

There's also an overload that takes an Item, sometimes.

lucid iron
#

yea it seems useful for many mods

teal bridge
#

It is, it's just also rather trivial, and of I'm of the old-school Microsoft mindset that very trivial things aren't always worth adding to the API.

#

(But feel free to copy that verbatim if you like. All open source, of course!)

#

The shmancy new StarML also supports binding a sprite directly to ParsedItemData.

lucid iron
#

say is there anything for styling a tooltip Bolb

#

or more broadly speaking, having hover over views

dusty scarab
#

can someone please help me with understanding how to make a mappatch.json for a config file? I am trying to determine how to properly fill in the FromArea and ToArea.

Kisaa is letting me look at her mod to see how she did it, which is why FromArea and ToArea are already filled in, but it looks like the FromArea and ToArea are the same coordinates? since I want to alter, for this example, everything from (starting from top left) coordinates 19, 14 to 73, 29, does that mean my FromArea ToArea would be 19, 14 with a Width of 54 and a Height of 15?

cyan hollow
#

does anyone know why this part in the mod making tutorial - doesn't show these options in visual studio?

lucid iron
#

what do you mean?

#

you dont have to use any of these templates really, since the mod build stuff is in a nuget package (ModBuildConfig)

cyan hollow
#

this is what i see.

uncut viper
dusty scarab
#

oooooooooh! that makes sense! thank you!
just to double check, I put my top left-most coordinate in, and then it calculates the Width and Height to the right and down, correct?

uncut viper
#

correct

dusty scarab
#

awesome, thank you :D

uncut viper
#

depending on what your patch .tmx looks like the PatchMode may be important too

#

Overlay vs Replace for PatchMode is like the difference between pasting a transparent .png on top of anothre picture and pasting a jpeg pretending to be a transparent .png on top of another picture

dusty scarab
#

the patch .tmx looks just like my farm, only with the fences removed and the pre-planned crop area set to all light green grass. otherwise, the maps are exactly the same

uncut viper
#

if your map patch has no tiles in one spot but those spots are within the rectangle, Replace will replace the Maps/Farm with empty tiles too. Overlay will just do nothing with the empty tiles

#

if the patch is with fences removed then yeah you want replace

#

which is what you have, just explainin so you know why you have it

dusty scarab
#

excellent. I thought I wanted replace, but I appreciate the explanation of the differences so if this comes up again, I will know what I need

uncut viper
#

(as far as i understand it in this case its not empty tiles you're replacing with, but rather the "emptiness" of not having fences on, say, the buildings layer, so its that tile on that layer that is empty)

#

(that is not the best explanation but at least you understand i hope SDVpuffersquee)

dusty scarab
#

I do understand it, no worries!

velvet narwhal
#

god it's been so long, but you're supposed to install packages for vs22

cyan hollow
#

I just didn't see any step that shows how to do that, to get the right stuff

velvet narwhal
#

you can ignore the install monogame part

lucid iron
#

oh you didn't install net 6?

velvet narwhal
#

does vsc already come preinstalled with the packages or is it the same thing SDVpufferthinkblob

cyan hollow
teal bridge
# lucid iron say is there anything for styling a tooltip <:Bolb:431907793688068106>

Not unless you want to use an overlay (which won't follow the cursor). That's one of the few things that simply uses the built-in IClickableMenu menu functionality, so it would be possible to add some of the things it already supports (title section, item icon, currency info, etc.) but not to do a totally custom style without a bunch of extra work.

#

Re: this Visual Studio stuff, the installer takes care of all that unless you select weird options during the install. I'd do a reinstall at this point and make sure it's actually set up for C# development.

lucid iron
#

yea fair, it'd be annoying to interact with on gamepad anyhow

teal bridge
#

Well, tooltips really shouldn't be interactive, period. The gamepad isn't a huge concern on its own, but from a UI design point of view I'd caution against hiding too much important information behind a tooltip; the most important things should be discoverable from just looking at the UI. It's the same with mouseovers on other platforms, it's considered bad design to hide anything interactive behind a hover state.

#

What does work fine design-wise is a modal or overlay that shows up when you actually click on something.

dusty scarab
#

if I want my config to be compatible with GMCM, do I need to add GMCM as a dependency in my manifest, or does GMCM automatically grab config files as it finds them? I don't see a dependency in the manifest for other mods that I know have GMCM settings, but I wanted to double check and make sure first

lucid iron
#

yea that makes sense bolbthinking

teal bridge
#

You need a GMCM dependency for SMAPI mods that use its API. Don't think you do that for Content Patcher.

dusty scarab
#

ah, this is a Content Patcher mod, so I should be good to go, then. awesome!

cyan hollow
#

I uninstalled and am looking to reinstall visual studio. but I have no idea what options I am supposed to select. the first time, I used all defaults and that's how I wound up with nothing, I guess. I couldn't find anything in the documentation to tell me what I should select.

teal bridge
#

Make sure .NET desktop development is ticked.

cyan hollow
#

Thanks

teal bridge
#

There might be a more granular setting somewhere in there, and you don't need WPF or Windows Forms but that will implicitly install everything else that you need for this stuff.

cyan hollow
#

I appreciate all the help. I'll download that and see if that fixes it.

uncut viper
teal bridge
#

It's better to have one. I learned the hard way that load order can be different on Linux.

#

Having at least an optional dependency guarantees a correct load order.

uncut viper
#

they'll all be loaded by game launched anyway though

#

you put your API grabbing and config setup in whatever you added to the game launched event

teal bridge
#

Sure, if you code defensively and don't depend on actually having that API when you request it. I think most modders who write GMCM configs tend to just assume that the API will succeed. Which means if they hit that 1% of users without GMCM installed, and don't declare a dependency, it'll simply crash with a cryptic error.

#

If you truly do not depend on GMCM then sure, don't make it a dependency. Many if not mods do genuinely depend on it.

uncut viper
#

all the mods I've personally seen check if the API returned null before doing anything with it

#

the SMAPI API grabber I mean

teal bridge
#

I've seen quite a few that don't check. Particularly common among the modders who don't enable nullable warnings.

uncut viper
#

i'd probably rather fix that than add a dependency, feels like fixing a symptom rather than the cause

teal bridge
#

You should do both. Add it as an optional dependency. That's what the optional setting is there for.

#

Just because it doesn't crash doesn't mean your mod should have wrong metadata. It's eventually going to make someone's life harder when you don't declare your dependencies.

rancid temple
#

Makes me wonder where they learned how to set up GMCM, because the documentation for it literally provides the null check

uncut viper
#

what benefit does doing both get me if I only ever do anything after all mods are loaded and I'm checking for null anyway? genuine question

#

or if it doesn't benefit me, what benefit for someone else

teal bridge
#

The same benefit as any implementation that follows a specification instead of relying on implicit implementation details. Forward compatibility and not helping to create a tragedy of the commons.

#

I'd ask the reverse, what does it cost you to add an optional dependency to the manifest? Like literally nothing?

rancid temple
#

Couple seconds

cyan hollow
teal bridge
#

(Also I am aware that Hyrum's law is probably very relevant to this particular question since I'm guessing hardly anyone actually declares optional dependencies, and Pathos would have a nightmare of a time trying to change the implementation to follow that spec strictly. Still, I'll choose to be a good citizen especially when the cost is so insignificant - at this point it's just part of my template.)

dusty scarab
vernal crest
old edge
mighty ginkgo
#

the smapi log can show the problem, if not, patch summary probably will

#

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

mighty ginkgo
#

!patchsummary

ocean sailBOT
#

Can you do these steps to provide more info?

  1. Load your save and view the content that should be patched.
  2. Type patch summary directly into the SMAPI window and press enter.
  3. Upload your SMAPI log to https://smapi.io/log (see instructions on that page).
  4. Post the log link here.
dusty scarab
uncut viper
#

Nexus does not allow any sort of solicitation for donations or promise of mod updates or content in exchange for donations of any kind

dusty scarab
mighty ginkgo
#

the messages are not necessarily printed to the console

#

there's a lot more on the log itself

old edge
#

Expanded does it but they said they don't have a link to Patreon there right?

vernal crest
#

Your map is "Maps/RiftstalkerSekun.FennmontFarm" not "Maps/AdditionalFarms"

uncut viper
#

i said that because i didn't see any patron link on there. if you're not using Nexus itself to solicit the donations, then it's (somewhat) fine

round dock
#

Just wanna add that if you do format it to 2.3.0, just indicate that it is on the reqs cuz I had some mod users go โ€œitโ€™s not working??โ€ only to realize their CP wasnโ€™t updated haha SDVpuffersquee

old edge
#

Yeah I suppose I just need to delete any links on nexus

uncut viper
#

(i say somewhat because one of the rules on Nexus is a bit vague and I imagine probably there to back up their "we reserve the right to take action anyway if we decide we have reason to" clause)

dusty scarab
uncut viper
#

the last bullet point in the non solicitation section can technically be used for off-site occurrences like the expanded patreon I'm sure, but whether they will or not if you're not soliciting on Nexus directly, that's not anything I can guarantee one way or another obv

velvet narwhal
#

yeah it wasn't announced on nexus, so i don't think they really care

uncut viper
#

if they got complaints about it they might care, or they might not. or they might give expanded a pass because it's a big mod, or maybe not. who knows. up to the individual modder how much they wanna risk it

velvet narwhal
#

the one bullet point made me laugh tbh, "$100 i release an update"

uncut viper
#

sounds like the Skyrim Nexus community to me

brave fable
#

oh what noone told me i can hold my mods ransom

#

this could be the start of an incredible business opportunity

#

please tell me i can charge for comments too SDVdemetriums

velvet narwhal
#

charge $1 per bug report that isn't an actual bug

dusty scarab
#

yay, it's working as intended now!

#

just need to get my farm house into shape and stop borrowing someone else's. does anyone know if there's a coordinates map that already exists for the default farmhouse? or do I open it up in Tiled and make my own?

vernal crest
#

Coordinates map?

dusty scarab
#

yeah, that shows what the coordinates are so I know what to tell the game to place what furniture at. so I'm not putting the TV on the wall or something

vernal crest
#

Oh. Yeah just open the farmhouse map(s) in Tiled.

#

Or go into the vanilla farmhouses in game and use Debug Mode or Lookup Anything to tell you the coords.

dusty scarab
#

fair enough. is Debug Mode another mod, or is it part of SMAPI?

vernal crest
round dock
#

Itโ€™s a mod but you can debug with the console

uncut viper
#

keep in mind though people might have custom farmhouses

#

unless you are also making the farmhouse and not just the map

#

in which case carry on

vernal crest
uncut viper
#

(in fact i did miss you said "farm house into shape" and not just "farm into shape" bc i was only thinking about your farm and the fences, so ignore me)

round dock
dusty scarab
#

yeah, I need to make sure that I put down stuff like the bed, tv, a dresser, fireplace, a table, and something on the table for people using the map's default farm house. I'm not changing the inside, just decorating the existing inside

velvet narwhal
#

(i will take uber's advice, and look for other things instead of the child thing for now to get my raccoon fingers used to harmony, but i've run out of ideas on what to shove into the customfields for npcs SDVpufferthinkblob )

vernal crest
#

I did actually also assume that Sekundes wasn't planning to make a custom farmhouse because why would you need to find out coordinates without opening the map if you're making the map anyway.

round dock
#

Iโ€™m planning on debugging my dialogue this weekend so I donโ€™t have to keep CJBing my conditions SDVkrobusgiggle

uncut viper
#

how are you adding furniture to the inside of the existing house?

vernal crest
#

Is starting furniture hardcoded?

uncut viper
#

and does the default house not already come with those things?

velvet narwhal
#

i thought because additionalfarms, you get to determine the interior layout

uncut viper
#

is that so? i dont know much about additionalfarms

dusty scarab
#

I borrowed someone else's farmhouse for the sake of testing the map itself, but now it's time to make my own. I was planning on following this format, though

uncut viper
#

ah, i see

velvet narwhal
#

me either, but i do know that when i play meadowlands it do got a different starting layout

dusty scarab
#

the starting layouts are different for every map! each one has a unique set of furniture on the inside

vernal crest
#

Huh. I have never even visited the Farm data page of the wiki before.

velvet narwhal
#

(what if i coded the heart lockout for aba in my c# mod)

vernal crest
#

Ah, look. CreateOnLoad is not allowed for farm location data. (Just harking back to our confusion about it earlier.)

uncut viper
#

i also did not know it said that there, i was looking at the page for locations in general. good to know!

vernal crest
# velvet narwhal (what if i coded the heart lockout for aba in my c# mod)

I...probably wouldn't use it if you did, I'm sorry! SDVpufferheart My motivation to keep working on Hiria is in large part that she's a learning project for me so I am being pretty stubborn about only using my own work (where it's something I can achieve - I am not intending to try to recreate Spacecore lol)

velvet narwhal
#

i do think the reject all categories is probably the best way to do it

uncut viper
#

heart lockout?

vernal crest
uncut viper
#

i will wander my way into the threads

vernal crest
velvet narwhal
#

button already crushed my dreams of a simple idea but it's more pain

uncut viper
#

would you rather i responded to the heartlockout thing in here or in your thread

vernal crest
#

Thread please!

lucid mulch
#

hmm, where will the most common places people will have invalid GSQ

vernal crest
#

A GSQ that isn't parsing properly, like the "summer" one that prompted you being asked to check for them?

lucid mulch
#

There's 100+ different places its used in 1.6.8 and I don't want to hook into all of them

vernal crest
#

Trigger actions, dialogue, events is my guess

lucid mulch
#

I've got the logic for working out what the original GSQ and logging it in addition to whatever the error had access to

#

but I kinda want to log the origin of the GSQ in addition to its literal text

#

but that will be a whack-a-mole of the most common locations

#

and I'm pretty sure I'll have to redo this for 1.6.9

#

I'll do dialogue first because it would the the most annoying to find probably

uncut viper
#

the most common places id expect to have an invalid gsq would be the places that just get the most GSQs in general i think, so maybe shops or characters

round dock
#

Ik I already asked this w Avi but the 2-kid limit is hardcoded right? Unless frameworks (?)

lucid mulch
#

Can events even access GSQ?

dusty scarab
lucid mulch
#

yeah theres a handful of locations that bypass the "traditional" location loading mechanism, which CreateOnLoad doesn't actually know exists

#

Farm,FarmHouse and Cellar are all in that list, along with the generated levels for mineshaft/volcano

vernal crest
# lucid mulch Can events even access GSQ?

Yes, the action command is available for event commands and If <query> ## <action if true> is an action...so it's roundabout but it does end up with the event using a GSQ. I have never used it though so I am just going off wiki reading.

lucid mulch
#

Ah it indirectly uses GSQ via a soft backdoor in the TriggerAction logic

dense void
#

Can someone tell me what the difference is between these two, when to use one over the other, or if I did something wrong (context: they are dynamic tokens of a conditional):
{ "Name": "SummerOverwrite", "Value": "true", "When": { "LocationContext": "Island, Desert" } }
->
{ "Name": "Cape", "Value": "true", "When": { "LocationName |contains= Woods, Mine, Desert, Caldera, BugLand, SkullCave, WitchSwamp, WitchHut": true } }

lucid mulch
#

welp that increases the surface area of potential GSQ to check

dusty scarab
#

there doesn't happen to be a list of furniture ID codes anywhere, is there? StardewID only has items, and a cursory google search didn't turn up anything

lucid mulch
#

top is invalid json, no value for the first key in the When block

#

but if the question is "LocationName": "Island, Desert" vs "LocationName |contains=Island, Desert": true...