#making-mods-general

1 messages · Page 392 of 1

obtuse wigeon
#

the decompiled code says

<summary>Get a building by the unique name of its interior location.</summary>
<param name="id">The building interior location's unique name.</param>

Looking for guid I've found public Building getBuildingById(Guid id) wouldn't that return the building guid and not the interior locations unique name? or is the building guid and the interior locations unique name the same?

calm nebula
#

I meant more...look up the concept of guid

obtuse wigeon
#

Ahh gotcha okay, I shall

lucid mulch
#

any building interior that isn't guarenteed to only exist once will do that so there can be more than 1 of the building at a time and not share the location interior

#

with the one real exception being cabin cellars that have even more cursed logic powering them

#

in Data/Buildings there is the NonInstancedIndoorLocation field to make the first building use that name instead of the one with a guid suffix

obtuse wigeon
#

I want this building to only ever have 1 placed, I've got a GSQ condition in the content pack to only allow 1 to be placed at any given time using the "BuildCondition" Field. I'll have a look at the NonInstancedIndoorLocation field and see if that will solve my issue

lucid mulch
#

its what the greenhouse uses, and the description will cite it

lucid iron
#

But it's not that bad to handle multiple instances i feel

#

You gotta iterate the locations to find the buildings anyways and then u can getindoor

obtuse wigeon
#

the description says "The name of the existing global location to treat as the building's interior" do I have to do anything special to have the location treated as global?

obtuse wigeon
lucid mulch
#

iirc I think you might need to make it an actual location with Data/Locations not 100%

#

Greenhouse is the textbook example of it, though Farmhouse kinda uses it, but farmhouse is much more... bespoke

primal spruce
#

What’s the difference between the Content Patcher docs and the Stardew Valley Wiki modding guide?

obtuse wigeon
#

The Content Patcher docs go into a bit more detail and list more things that can be done, in my opinion if you're making a mod that isn't like a simple replacment you should take a good look at the CP docs

primal spruce
#

thanks!

lucid iron
#

Content patcher is a mod

#

So it's about how to use itself

#

The wiki docs are about the game's structure

#

Which is relevant bc content patcher edits stuff according to game content structure

lucid mulch
#

the content patcher docs will describe the mechanisms of how Content patcher works (EditMap vs EditData vs EditImage etc, along with tokens)

stardew modding wiki will talk about the data models, and due to the prevelance of CP will use it for example purposes only, but not go into token patterns other than {{ModId}} for best practices

obtuse wigeon
#

Looking at the Data/Locations unpacked file and data:locations wiki, I'm not seeing anything specifically relating to making a location global, I have seen "CreateOnLoad" > "AlwaysActive" which syncs the map to farmhands, Is just registering it into Data/Locations using "EditData" that makes it global?

lucid mulch
#

locations are global by default.
the closest thing to a non-global location is a building interior, but in many ways they are for all intents and purposes global anyway

obtuse wigeon
#

Oh okay perfect thank you!

steel beacon
#

If I am making a mod that adds items, if I wanted to add Gift Tastes for modded NPCs, do I have to contact the mod authors first? I am not sure how etiquette would work in this case, or if I am overthinking it. Thanks in advance!

hard fern
lucid iron
turbid urchin
#

Hello peeps, I wonder if anymore is able to help me out here but I am using the very old "Starry Night Interface" which apparently never has been updated and as far as I know even got removed by the author(SpringTHZ and ManaKirel) at some point.
So besides updating it without permission or getting in contact I thought about making my very own HUD and was wondering if someone maybe can either guide me trough this or maybe even has a collection of all the necessary files that would need to be adjusted for usage via Content Patcher.
All ofc if it is allowed within the rules, so I'd rather be asking beforehand :).

lucid iron
#

Properly context tagging your stuff is useful too

crimson kettle
#

i have a question about dynamic token, if i already written randomise value for that texture, do i still need to write config to choose that texture? i mean the "fairy" linePika_think

steel beacon
steel beacon
lucid iron
# turbid urchin Hello peeps, I wonder if anymore is able to help me out here but I am using the ...
Stardew Modding Wiki

UI recolors are one of the top ways that players can customize their game. There are many options out there, but perhaps you haven't been able to find one that perfectly clicks with your aesthetic. Making your own UI recolor can be a fulfilling experience, allowing you to achieve the exact vision you want for your game. But you may have noticed ...

#

This guide is wip but it covers the basic assets

#

Which is good example imo

turbid urchin
lucid iron
#

Well i think vinilla wanted to write down the actual slices of things eventually

#

You also have to account for mod compat but that can be later SDVpufferthumbsup

crimson kettle
#

idk if i should delete that line or just go onbcaGuiltySweat

lucid iron
#

I mean are you using that config token

#

I don't think cp lets you have a config token and a dynamic token with same name does it

crimson kettle
#

so it's a choose one case right

#

thanks

turbid urchin
obtuse wigeon
#

After registering the location i still get a building with a map that has the guid suffixing the interior name(AtlasV.CPAutoSorterBuilding_AutoSorterBuilding153fcc55-a701-4c6c-a660-57761384037b) Do I have to remove the "IndoorMap" and "IndoorMapType" aswell? surely they have to still be there as a fallback?

lucid iron
#

I think u should just make it work for any number of buildings

#

Restrict the construction later

#

But implementing C# in a restricted way is probably more troublesome imo

obtuse wigeon
#

I cant make it work for any number of buildings if I can't even get the name of one though,
the GameLocation.getBuildingByName needs the unique interior name, unless I'm using the wrong thing in this snippet

Building ASBInstance = GameLocation.getBuildingByName("<UniqueBuildingInteriorName>");
Chest ASBInputChest = ASBInstance.GetBuildingChest("AV_ASB_SortInput");
lucid iron
#

Iterate the locations on day started and then the building list on each location

#

Check just the type

#

Make a lookup based on this so that you can map chests back to building

#

That's the proposed approach i been saying yesterday

obtuse wigeon
#

I'm defo not understanding this, to add the building on each map to a list i need to match the name "{{ModId}}.AutoSorterBuilding" to a building in the location, but I can't find a way to get the name of the building on the map as it's different due to being suffixed by a guid. <-- Evidently this is wrong, I'm not sure what part of it is wrong though

lucid iron
#

There's a list called buildings on GameLocation

#

It contains all the buildings on this location

#

And to iterate all locations you can go Utility.ForEachLocation

#

And the name is the unique id but there's also a string that's the type

#

It's what building.GetData uses

#

So you don't need to know exact id at all only that it's a building you be checking for

obtuse wigeon
#

Ahh okay type is sperate to the building name, How would I find the type? is it what I defined under "Entries" in the Content Pack?

lucid iron
#

I believe it's a net string

#

The type is the key to the building data

#

Which is why i say go check GetData

#

Cus I don't remember the spelling offhand Sleepden

#

Rather than checking for an exact id tho, maybe you can just add custom field to mark this building as for your thing

#

Then u building.GetData()?. CustomFields?.TryGetValue

zenith venture
#

Hi! I'm trying to make an alternative texture mod for Line Sprinkler Redux, but can't seem to make it work. Could someone help me undestand what am I doing wrong, please?

My Folder:

  • [AT] Line Sprinkler Retexture
    - manifest.json
    . Textures
    - Quality Line Sprinkler
    - texture_0.png
    . texture_1.png
    . texture.json

And the texture.json code is:

{
"ItemName": "Quality Line Sprinkler",
"Type": "Craftable",
"TextureWidth": 16,
"TextureHeight": 15,
"Variations": 10
}

lucid iron
#

Patch export data/bigcraftables

#

To find the actual name of it

zenith venture
#

Sorry for my ignorance: how do I do that?

lucid iron
#

It's a smapi console command

#

Comes with content patcher

zenith venture
#

So I should write "Patch export data/bigcraftables" on the black window?

lucid iron
#

Yeah tho i might have spelled it wrong

#

patch export Data/BigCraftables

zenith venture
#

Oki, I'll try!

#

I got this:

"Name": "QualityLineSprinkler",
"DisplayName": "Quality Line Sprinkler",

#

Should I be naming the folder and the ItemName in the texture.json as "QualityLineSprinkler" instead of the spaces words that I have?

brittle pasture
#

yes, I believe AT uses either the Name or the unqualified ID

zenith venture
#

Oki, I'll change it. Thank you!

obtuse wigeon
#

What do I do with building.GetData()?.CustomFields?.TryGetValue? I can't find it in the game code so I don't know what it returns so that I can store it

lucid iron
#

CustomFields is a dictionary for mods to put whatever in

#

you can put "CustomFields": {"AtlasV.AutoSorterBuilding/Enable": "T"} on the building data and then be able to access that from C# side

#

other keys too ofc if u need anything else

obtuse wigeon
#

I've got the custom field in the building data (albiet like this: "AtlasV.CPAutoSorterBuilding/AutoSortBuilding": "true") but how do I define what it should look for? I thought it would've been:

if (ASBInstance.GetData()?.CustomFields?.TryGetValue == true)
{
    // add something to an array or dict
}

But I get the error 'method group' cannot be made nullable. on .TryGetValue

finite ginkgo
#

Try get value expects an argument of the key and an out argument of the value

#

.TryGetValue(“AtlasV.AutoSorterBuilding/Enable”, out string value) is what you want, I assume

brittle pasture
#

(how much of the C# yellow book have you gone through? I feel like you'll benefit a lot from a better grasp of the basics)

obtuse wigeon
finite ginkgo
#

(The c# yellow book… might be nice to read it sometime)

brittle pasture
#

seems like it does teach you every part of syntax, but only that
the yellow book is that and more
(also last I checked w3schools' tutorial has the reputation of being rather, erm, inadequate. it was a long time ago though and they apparently made an effort to clean their shit up)

obtuse wigeon
obtuse wigeon
#

now I'm getting the error "Cannot implicitly convert type 'bool?' to 'bool'. An explicit conversion exists (are you missing a cast?)", I can explicitly convert it to a bool that's not an issue, but where on earth has 'bool?' come from? I don't see it anywhere

calm nebula
#

What did you type?

#

Oh yeah

#

Add ?? false

stuck thunder
#

How would I change this code to randomly select a death sound?
The mod was made using CM2CP btw

iron ridge
royal stump
#

I'm pretty sure audiochanges doesn't support changes in general, though

iron ridge
#

[[Modding:Audio#Audio_data]]

You can add or edit cues by editing the Data/AudioChanges asset
wiki says yes

royal stump
#

(could be wrong, I haven't tried that particular edit)

finite ginkgo
#

FilePaths is a list, pretty sure you just list all of your options in it (might be wrong haven't personally done much with adding/changing audio myself)

calm nebula
#

Add to the list

#

That's why files is a list

royal stump
#

ah, yeah, the list there specifically supports it, I see

finite ginkgo
calm nebula
#

Later edits are fine

#

Just slow

#

Morning y'all

obtuse wigeon
#

add ?? false after the out string value? or else where in the if statement? I've tried putting it after the out string value and get 2 errors, first Syntax error, ',' expected so I tried with a comma and it got rid of that error, the second error is invalid expression term '??' what is "??" supposed to do? I can't find anything about it on google (It filters out the '??' even when quoted)

royal stump
#

removal doesn't work (per the wiki anyway), but yeah, sounds can be added or overwritten (once?) whenever

stuck thunder
#

So I add just more entries?

finite ginkgo
#

Yeah

royal stump
#
"FilePaths": [
  "{{AbsoluteFilePath: assets/sound1.ogg}}",
  "{{AbsoluteFilePath: assets/sound2.ogg}}"
],```
etc
stuck thunder
#

Nice

#

Thanks

#

I got like 15 sounds lined up :3

finite ginkgo
calm nebula
#

building.GetData()?.CustomFields?.TryGetValue(key, out str value) ?? false

obtuse wigeon
#

Ohh okay gotcha, thank you

calm nebula
#

It's one of the null operators

#

I can never get the names straight

obtuse wigeon
#

time to google more errors, yay!

royal stump
#

ig ?? and ??= are null-coalescing but I never remember

calm nebula
#

I had to Google

stuck thunder
#

The bots are wild today (their messages are auto deleted but they are there)

undone fable
#

dumb question but it is possible to make the fairy trinket taller than 16 pixels?

calm nebula
#

I've not seen a bot

royal stump
#

flashed a bunch of scam screenshots a second ago, but yeah, deleted SDVbouncerstare

stuck thunder
obtuse wigeon
#

spam bots are fast, but the Governor is faster

iron ridge
#

bouncer

obtuse wigeon
#

no, Bouncer not governor

stuck thunder
obtuse wigeon
#

getting my bots confused already

calm nebula
#

Oh, so exactly when I tabbed away to google

stuck thunder
gentle rose
royal stump
#

the "companions" spawned by some trinkets do have width/height values, just not controlled by the text data

#

...actually, for some reason they have height only SDVpuffersquint but yeah, C# thing
(ig it's for floating effects and not the texture size)

lucid iron
#

but it wouldnt be the fairy box item specifically

obtuse wigeon
#

This has become such a mess of errors and colours, it's like blackpool illuminations in vscode

undone fable
lucid iron
undone fable
#

thank you!

lucid iron
#

But I'm not super sure about the numbers you should put

#

Just go by vibes i guess

obtuse wigeon
#

bit confused about foreach, I'm going to loop through all locations using the foreach loop but theres also a Utility.ForEachLocation, and example is this:

Utility.ForEachLocation(delegate(GameLocation location)
{
  foreach (Building current in location.buildings)

Looking at the StardewValley.Utility class ForEachLocation functionally works the same as foreach but just with extra arguments.

To loop through all locations should I use ForEachLocation then to loop through all buildings should I use a foreach loop?

woeful lintel
#

Is there something specific to target cabins skins with AT? Do I put "Log Cabin" etc or "Cabins" in the ItemId field?

brittle pasture
#

it's a helper for if you don't want to write the foreach code yourself

obtuse wigeon
#

Good to know, that does make it quite a bit easier

royal stump
#

the utility foreach syntax is a bit confusing at first, but it's helpful because locations and such aren't stored in a single place

calm nebula
#

Yeah, delegates are fun

#

Are you a pythonistia?

obtuse wigeon
#

I'e found 2 functions for ForEachBuilding which seem to search each location too so I don't think I have to go through each building too

obtuse wigeon
#

(Whoops sorry forgot to turn off ping)

royal stump
#

yep, those are more specific for a building search (one targets a specific building type, the other is just "do this for every building")

calm nebula
#

Delegates are like function objects yeah

#

If you've ever passed sort a function

#

Or used map, it's kinda like that

obtuse wigeon
#

good to know, I don't think i've used them but a quick google tells me what they are, I'll have to keep them in mind when writing python

#

(Also just found out i can search for things in all files instead of one by one in vscode 🤦 )

#

I've elected to with ForEachBuilding<TBuilding> which requires an action to preform for each building, but that's what my if statment is surely? This is the code block now:

Utility.ForEachBuilding<AtlasV.AutoSorterBuilding>(<ActionToPreform>, true)
{
    if (building.GetData()?.CustomFields?.TryGetValue("AtlasV.AutoSorterBuilding/AutoSortBuilding", out string value) ?? false)
    {
        // Log when an item has been added to any chest called ASVInputChest which is attached to any AutoSortBuilding building
    }
}
royal stump
# obtuse wigeon I've elected to with `ForEachBuilding<TBuilding>` which requires an action to pr...

It's a method that takes another method* as one of the arguments; you need to call the method with a method (or valid method name) in place of <ActionToPreform>. One way you can format it is like this:

Utility.ForEachBuilding<AtlasV.AutoSorterBuilding>((building) =>
{
    if (building.GetData()?.CustomFields?.TryGetValue("AtlasV.AutoSorterBuilding/AutoSortBuilding", out string value) ?? false)
    {
        // Log when an item has been added to any chest called ASVInputChest which is attached to any AutoSortBuilding building
    }
}, true);```
Alternatively, you could create a separate method somewhere else and call it, like this:
```cs
private bool LogBuildingStuff(Building building)
{
  if (building.GetData()?.CustomFields?.TryGetValue("AtlasV.AutoSorterBuilding/AutoSortBuilding", out string value) ?? false)
    {
        // Log when an item has been added to any chest called ASVInputChest which is attached to any AutoSortBuilding building
    }
}

//and then where you're using the foreach:
Utility.ForEachBuilding<AtlasV.AutoSorterBuilding>(LogBuildingStuff, true);
obtuse wigeon
#

Ahhh okay I understand the ForEachBuilding loop now, that make a lot more sense and fits into what I already know, thank you!

woeful lintel
#

Is "Season" not supported inside a "ManualVariations"? Is it necessary to make a folder per season?

#

AT question btw

twilit quest
#

Correct, @woeful lintel, my understanding is that "Season" is not a sub-category of "Manual Variations"; you would need to have a different folder for each season.

FYI, I have noticed that certain types of AT items, if "season" is not included, will cause the texture chooser not to show the correct range of available items in some cases. I recommend including "Seasons": [ "Spring", "Summer", "Fall", "Winter" ], for non-seasonal textures to ensure they work correctly.

opal tendon
#

with my witch laundry mod should it be "color" "alignment" "domain" "coven" "type" or "theme" for picking the different ones I made?

gentle rose
#

-# what if I ignore portraiture compat and put a skipping prefix on DrawPortrait--

#

ugh fine I won't SDVpufferwaaah

lucid iron
#

Taylor's version

gentle rose
lucid iron
#

Then why care about portraiture

gentle rose
#

because I assume people who want modded portraits usually also want to use other packs at the same time SDVpuffersquee

lucid iron
#

Provide a Portraiture mode then

#

Let ppl drop in the stuff

gentle rose
#

no thank you. don't want to framework

#

I just switched to a non-skipping prefix instead SDVpuffersquee

lucid iron
#

Aren't u already framework given that you made hd portraits 2

gentle rose
#

yeah but I'm not providing any documentation for how to use it snob

lucid iron
#

Smh my head

gentle rose
#

also rn it's fixed at 256px

lucid iron
#

Smh my head 2

gentle rose
#

nice it worked with my non-skipping prefix

#

uh

I'm gonna ignore that

obtuse wigeon
#

is comissions for C# mods a thing here?

wraith aspen
iron ridge
ocean sailBOT
iron ridge
#

although be aware you'll probably get scam dms for asking that question lol

obtuse wigeon
#

I rarely ever look at my messages unless someone tells me too so it basically no different bahah

wraith aspen
#

just want someone to proofread to see if i missed a step anywhere with my coding that i can fix

royal stump
#

(supposedly they'll work without qualifiers, though, it's just recommended)

wraith aspen
#

lookup anything showed them only producing roe, while my intent was for the nyan catfish to have a chance to produce prismatic shards, the lucky catfish a chance to produce treasure chests, and the desert catfish a chance to produce artifact troves

#

the normal catfish all showed the correct produce (roe AND some animal products)

#

i'll see if adding the (O) qualifiers helps

gentle rose
calm nebula
#

May need to change order

gentle rose
#

who happened to be testing on a dialogue that used abigail's special portrait, and the portraits I'm using don't have one pffft

wraith aspen
#

yeah the special fish only still show roe, compared to the correct produce from the nomal fish i added

#

(this being after i went in and added (O) qualifiers to all the objects)

brittle ledge
#

SDVpufferthinkblob The only difference I see between yours and mine is that I spell out my fish IDs instead of using {{modid}}

wraith aspen
#

i'll try doing that as well

brittle ledge
#

wait, so it's only that one fish that's acting up? Not all of them?

royal stump
#

I'd recommend using patch export Data/FishPondData in the SMAPI console and looking at the output; I wonder if the automatically generated IDs for ProducedItems are overlapping because none were specified

calm nebula
#

Shouldn't

#

But roe is the default entry

#

So you need to move yourself above the default entry

wraith aspen
#

its 3 fish, the desert catfish, nyan catfish, and lucky catfoish

#

catfish*

brittle ledge
#

But black, calico, orange and the rest are working?

wraith aspen
#

yes

#

could the water color code be wrong?

#

because the only difference in code for the normal fish and those 3 is i gave these 3 special colors

brittle pasture
wraith aspen
#

oh good to know will chance that

brittle ledge
#

SDVpufferthinkblob Does the ID for the water need to match the ID for the entry?

#

Or does it have to be unique (compared to the fish pond rules)

wraith aspen
#

maybe? i can try that after running the command esca posted

royal stump
#

in general, those IDs are just so CP can reorder lists if needed

#

they should be unique within the list but not matter otherwise

brittle pasture
brittle ledge
#

Selph, can you elaborate? I don't cover that in the fish tutorial because I didn't run into issues with that.

wraith aspen
ocean sailBOT
#

Log Info: SMAPI 4.3.2 with SDV 1.6.15 build 24356 on Microsoft Windows NT 10.0.19045.0, with 74 C# mods and 93 content packs.
Suggested fixes: One or more mods are out of date, consider updating them

brittle ledge
#

The patch export will produce a file that should be in the same folder your Mods folder is in (wherever you have your game.) That's what you want to look at.

brittle pasture
#

oh yeah it's the invalid water color that's tripping up the entire object

royal stump
#

yeah, sorry, I should've mentioned it creates a separate file

#

but also yeah, it's just not loading your data because of the error

wraith aspen
#

oh let me look for that

brittle pasture
#

and those default entries are already low precedence

brittle ledge
wraith aspen
brittle pasture
#

WaterColor is a list of objects

wraith aspen
#

yeah i used that page and colors from the color property names list

brittle pasture
#

right now you have it as just a single object

wraith aspen
#

so how would i fix that?

brittle pasture
#
"WaterColor": [
  {
    // stuff here
  },
]
#

the reason it's a list is so you can add multiple entries and have multiple conditional colors

wraith aspen
#

ohhh so i just need to add square brackets to each one then?

royal stump
#

pretty much, yeah, e.g. this for the nyan one

"WaterColor": [
    {
        "Id": "{{ModId}}.nyancatwater",
        "Color": "Pink",
        "MinPopulation": 3
    }
],```
wraith aspen
#

ok i'll do that, hopefully that'll work

#

and then i can get on with actually testing the ponds and my quests lol

royal stump
#

SDVpufferthumbsup watch out for any other yellow CP text, it'll just ignore the whole edit when formatting issues happen

wraith aspen
#

good to know! ty!

brittle ledge
#

(didn't pond color become a thing in 1.6.9+ somewhere? I don't think it was a thing in early 1.6)

brittle pasture
#

yep

hard fern
#

Did 1.6.9 let you make any fish pond color instead of only the select fish pond

lucid iron
#

ye

wraith aspen
#

thank you all so much it worked!

lucid iron
#

thats what the WaterColor edit do

#

now make them output KittenFish Juice

wraith aspen
#

omg,,, SDVpuffergasp

#

demetrius is interrupting me bc i cheated in money, but even on a test file i always am team mushroom cave lmao

brittle ledge
#

wine for the more sophisticated fish

hard fern
#

😔 are we juicing the fish again

wraith aspen
#

it seems so SDVpuffercry

fading walrus
#

cold press fibsh

calm nebula
#

(Sorry! Sometimes I recall what the asset was like some random point of 1.6 alpha and never updated my priors)

lucid iron
#

.choose content patcher, data layers

patent lanceBOT
#

Choose result: content patcher

lucid iron
#

@ivory plume hello pathos happy sunday how do you feel about adding support for farm animals and buildings to Pathoschild.ContentPatcher_MigrateIds Bolb

ornate trellis
#

i am getting bitten in the butt rn for never really paying much attention to heart levels for bachelors/ettes cuz i cant freaking remember if you are engaged if the rest hearts up to ten get unlocked for the ones you dont marry or not pufferpensivebutt im a very mod maker

hard fern
#

romanceable villagers stay at 8 hearts

#

unless you decide to cheat on your spouse and date them, i guess

#

since the 10 heart events are romantic by nature

ornate trellis
#

whew alright, i was getting crazy trying to look it up lol

#

that means im almost ready to start working on romanceable stuff after i finished some more events :B

robust eagle
#

hello there

#

is there a mod in here

lucid iron
#

do you want a moderator or a game mod?

robust eagle
#

I want to take permission

#

a moderator

calm nebula
#

Dm @outer glacier

robust eagle
#

ok got it

scenic pecan
#

Does anyone know how to mod the game

torpid sparrow
#

looks around

#

possibly

#

by mod do you mean download mods or make mods

oblique meadow
#

Stardew can be modded?

torpid sparrow
#

who knows

lucid iron
#

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

wraith aspen
twin wadi
wraith aspen
#

yes that'd be awesome!

scenic pecan
opal tendon
#

Is an article/guide a good place to write about a theme of a mod series you are making?

gentle rose
#

depends what you mean and whether you need people to read it?

opal tendon
#

like I have a mod series for a cottage witch theme and I wanted to write like a little thing on what cottage witch is and what my inspiration is with pictures and text and link it under each mod and also have it link to each mod I make and some others I like for the theme

brittle pasture
#

personally I'd make a collection and link to that collection in every mod

opal tendon
#

can you do text and photos with a collection too?

brittle pasture
#

yeh

opal tendon
#

okay perfect ty!

steel harness
#

I had a question! When making an npc mod what should I start off with? Rn iv been making the overworld sprite and the walking cycle and then I realized to make other sprites, i'll have to figure out how the heart events are gonna look. So is there somewhere specific i should focus on first?

calm nebula
#

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

calm nebula
#

Get the basics into the game. Add sprites when you need them

opal tendon
steel harness
torpid sparrow
#

I’m sure it mentions it in the wiki but you’ll have to unpack the game first

jolly swan
#

Hi!! So I don’t know anything about modding, but I need a new hobby and would like to make a dialogue expansion mod- can anyone give me tips or send some resources? Ty!!

urban patrol
#

!startmodding take a look at content patcher (you very likely won't need C# or another framework) and the resources to get started!

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.

urban patrol
jolly swan
#

Thank you so much!!!

winged charm
#

Hello! Could anyone be able to help me format my content.json file to load a custom NPC house? I don't know if "CustomLocations" is the correct way to reference the map, or if it needs to be ordered differently in the file

iron ridge
#

customlocations doesn't go inside of changes

lucid iron
#

this is a really old format

#

what is the guide you looked at?

winged charm
#

I'm using Miss Coriel's NPC Creator since I've never messed with this before. I was able to get the NPC to load in fine with the old format

uncut viper
#

that creator is very outdated

#

it only works because Content Patcher is able to migrate old formats to the new one

#

however you will not have access to anything new added in 1.6

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:

lucid iron
#

take a look at 3rd link

ivory plume
round dock
brittle ledge
wraith aspen
#

thank you!

ocean sailBOT
#

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

wraith aspen
#

and i'll keep that in mind for a quick update later, i already started another mod haha SDVpuffersquee

#

oh yay i leveled!

vivid dragon
#

hi i am gonna ask this because I am making sure this is the right place, is this the area where i can ask for help on making a mod (I am extrally new to this and wanna make sure this is the right channel if I get stuck and stuff.)

dusky sail
#

it is, yes!

rigid musk
#

@brave fable Apologies for the ping but did you ever post that update for LOC? I'm still getting reports about incompatibility w/ the recipes and what not and am wondering if I have to tell them to update or not (they still have not sent me a log so I have no clue)

vivid dragon
#

Okay cool

#

Uh question would this be correct for an ncp mod or no? I am reading the wiki but it just fried it hard so I am gonna ask to make sure because I really don't wanna do goose chases again.

lucid iron
#

this is a manifest, and while you probably want MinimumVersion 2.0.0 this is alright

latent mauve
#

^ this would be your manifest.json file

lucid iron
#

you intend to have 2 authors yes? you + Masked Astro

vivid dragon
#

Alright cool, oh yeah Astro was the one who wanted this. I just doing the coding and making into the game while Astro does the spirtes and writing.

lucid iron
#

something else is perhaps make ur unique id shorter forconvienance

#

averyastro.Bronco Dokkan

rigid musk
#

here's (part) of mine for example (the only thing about mine that's different as far as this section goes is i don't have a min version for content patcher since i specify that elsewhere)

brave fable
lucid iron
#

while you have ModId you still gotta type it in many places while testing

vivid dragon
#

Ah okay

brave fable
#

if it's spacecore category recipes i don't even have that on the roadmap

placid moon
#

Hey modder friends - need to pick your brains a little. I thought that adding in code for "rain" events so that my building would pull a different image during rain events would include "any" weather events that fall under the Rain or Storm tags. But it looks like green rain isn't included in those, and I don't know what the specific coding for that would be if I wanted to make sure that any type of poor weather would trigger this other building image. So far I have this
"When": {
"Weather: |contains=Rain, Storm": true }
I do use Weather Wonders, so that's a little bit of a separate issue because I haven't tested all their weather events either, but green rain is an OG event to SV, so I'm starting there. Thoughts? What should I include in the When tag to trigger the change for all bad weather?

vivid dragon
#

This is all extrally new and very inserting to learn

rigid musk
#

making an npc is very interesting indeed

#

I've learned many things I never thought I would

brave fable
#

alas

#

you'd think people would eventually stop posting bug reports SDVdemetriums

rigid musk
#

they asked me to remove/add a toggle for the recipes to my mod :')

#

I will not be doing that, I loathe to think about doing that

#

(the recipes are tied to a lot of mail, id have to edit the gift tastes, id have to toggle so much... absolutely not)

#

esp not right now when I feel like exploding every day

rigid musk
placid moon
rigid musk
#

Happy to help, I had it open because I was checking something in the documentation

#

unfortunately the contains doesn't count for part of words, it still applies to the value

#

(in your case the value of "rain")

#

you can just add GreenRain to that though

placid moon
#

Got it, good to know. I wonder if there is a way to reverse trigger it instead of listing out all the weathers... like making it so instead of contains the weather tags, it doesn't contain Sun?

obtuse wigeon
#

I think you just set the contains to false, rather than true

#

"Weather: |contains=Sun": false, I think that should work?

placid moon
#

So place Sun in there, and set to false

#

I'll give it a try!

#

Thank you again both of you

rigid musk
#

i think that would also then apply to windy days and snowy days then

placid moon
#

That's ok, I have season specific tags also for the building changes

calm nebula
#

A @lucid iron has a pretty name!

placid moon
#

My building has closed windows and doors on it during bad weather

obtuse wigeon
#

Oh I absolutly love that, tiny bits of immersion like that make such a big difference when you notice thhem

lucid iron
#

atra reminding me that i slither right over grass again

rigid musk
#

Hi chu

placid moon
obtuse wigeon
#

Thats why most of my mods rely on overlays and hue shifting, it makes life so much easier

steel harness
#

So i'v been trying to look up how to make a JSON file and i'm getting mixed results. Are Json files just simply word files you write code in like notepads or are they a specific type of file I have to create then put code in it

lucid iron
#

They are a kind of plain text file

#

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

lucid iron
#

Notepad lacks a lot of features nice when working with json so pls use something with actual support

dusky sail
#

as someone who used notepad for a while, it's definitely possible but oh god why put yourself through the extra difficulty when you could just get notepad++ or vscode

steel harness
#

Okay I think you guys just saved me thank you T0T I thought i was using the one everyone was using based off tutorials

brave fable
#

where do people find these mythical tutorials and why are they always wrong hahah

steel harness
#

Let's create our first Stardew Valley mod together! In this video, I take you through a detailed process of how I added Boris and Conny into the game, focusing both on the art and the coding.

DOWNLOAD MY MOD!
https://www.nexusmods.com/stardewvalley/mods/28376

Want a personalized drawing in my style? COMMISSION ME!
https://vgen.co/froggyjoestar...

▶ Play video
#

I'v been following this one and

tired matrix
#

Trying to make an npc mod and make a 128 portrait using portraiture? But it shows like this… what did i do wrong

twin wadi
dusky sail
#

have you done all the standard portraiture steps (putting it in a folder in portraiture, pressing p in game, etc)

#

just eliminating possible causes here

brave fable
#

honestly this feels more like a vlog than a tutorial

twin wadi
#

yeah seems like its the person's first time, it might be better to reference a tutorial instead

tired matrix
torpid sparrow
#

!npcmodding

#

darn

#

!customnpc

#

darn

#

i dont remember the command

brave fable
#

!help

ocean sailBOT
#
please get me off discord
dusky sail
#

ive only ever used potraiture for sds so im not necessarily an expert 😔

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:

torpid sparrow
#

oh

#

lmfao

tired matrix
tired matrix
torpid sparrow
#

i dont think a lot of people use portraiture so its not in the standard tutorial

#

plus i think portraiture probably has its own documentation?

twin wadi
#

yeah, it normally wouldn't be included in a custom npc tutorial

tired matrix
#

If i reduce the pixels to 64x64 standard it looks ugly asf SDVpufferwaaah

torpid sparrow
#

yeah i'd not recommend resizing

#

draw from scratch (if you want 64 x 64)

lucid iron
#

Does portraiture let u do 128x128

undone kelp
tired matrix
#

Still looks ugly 😭 image has a lot of pixels

lucid iron
#

Anyways there's not really a guide besides name your folder inside portraiture correctly, it isn't a framework

brave fable
#

(those portraits are each 256x256 though, the image size is 512 wide for 2 portraits)

#

(not 128x128)

lucid iron
#

Oh then it's normal usecase

undone kelp
tender bloom
lucid iron
lucid iron
tired matrix
undone kelp
#

could be a wrong file name situation maybe?

lucid iron
#

Most likely yea

undone kelp
#

what's the name of the custom npc?

tired matrix
#

Xavier

brave fable
#

(if you're on windows you can take a screenshot with the snipping tool (win+shift+s) rather than taking photos with your phone)

undone kelp
undone kelp
tired matrix
lucid iron
tired matrix
#

Wait

undone kelp
#

then it's either portraiture is being stinky poopoo or bc it's a custom npc, do some code magic, but considering you're using portraiture idk anymore

tired matrix
#

Should i put Portraiture/portraits/Xavier?

brave fable
#

i don't see why custom NPCs would be treated any differently to any other

undone kelp
#

ive only ever had that same problem when it's involving mods that add portraits to npcs that dont

brave fable
#

they're all the same npc data.

brave fable
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.

undone kelp
#

like a custom?

tired matrix
#

Yeah

undone kelp
#

ah

twin wadi
#

also for good practice id recommend adding {{ModId}} in front of like uh the target and internal name and such to avoid compat issues

brave fable
#

they have done, but not consistently. they're adding the character {{ModId}}_Xavier but targeting Xavier elsewhere

#

hard to know where else it's gone wrong without having the whole json file shared

undone kelp
#

dont quote me on this but does anyone know if it'd work by adding hdp dependency into the manifest (or another json file i dont remember names) work and let portraiture do the work? also put the portraits into the assets file for consistency

tired matrix
#

I mean i can send the whole file

#

Let me just show the mod folder

twin wadi
#

Oh i think you just need to have the modid added for the portraits, i might be incorect but they need to be the same as your internal npc name?

undone kelp
#

the problem is that the portraits do work, just not in the intended size

tired matrix
#

Maybe i put smth in the wrong place of forgot something? Im a newbie 😭

brittle ledge
tired matrix
calm nebula
undone kelp
#
If you download an want to use a HDP content pack with this, put it into the regular mod folder, NOT the Portraits folder.
If the manifest.json file of that pack has hdp in it's  dependencies, but you do not have hdp installed, remove the dependency and select HDP when picking a portraits-set in game, to have it show up as intended. (This will still work with HDP installed, it does not require the dependency to be set)```
tired matrix
#

whats even hdpybrofl

undone kelp
#

the words arein my head but i cant. i cant explain it hangon

undone kelp
tired matrix
#

ah i didnt know how to use it

undone kelp
#

hm

#

try

#

putting the xavier portraits from the portraiture folder into the assets

tired matrix
#

how? do i just put in mods?

undone kelp
#

holds your hand......we will figure this out.... together

#

also i legit have nothing better to do rn lol

tired matrix
#

omg ty sister😭 please hold my hand

undone kelp
tired matrix
#

I take it off portraits and put it together w portraiture’s mafifest and config?

undone kelp
#

honestly i think it'd be better to just put that portraits folder into the assets

tired matrix
#

Into the mod’s assets?

undone kelp
#

yes the assets folder

crimson kettle
#

You can make a blank portrait then let portraiture load the real one

tired matrix
#

Alright

#

I did

undone kelp
#

man this is making me wanna make a custom npc at some point lol

tired matrix
#

My npc is cute 😔 his face that doenst wanna load

#

Let me see if it worked

#

Checking

undone kelp
#

catto

tired matrix
#

Dammit

undone kelp
#

dammit

#

where are the custom npc folks when you need them

tired matrix
#

Bro pls help me help u

undone kelp
#

i think at this point it'd be better to do the blank portrait trick

tired matrix
#

How is this done 😭

humble timber
undone kelp
#

bc i think the problem is that vanilla simply doesnt support hd portraits, so it'd be better to just have a 64x64 portraits first and THEN use portraiture for the hd ones

tired matrix
humble timber
#

never too late to learn!

tired matrix
#

The nerve to say that it loaded

undone kelp
# tired matrix How is this done 😭

dont quote me on this but i think u basically just have a blank png that's the same size as your intended portraits but in 64x64 size, put that into your Portraits folder, and THEN put your actual hd xavier portraits into portraiture frfr this time

tired matrix
#

Lets pray

#

Hmmm

brave fable
#

(are you allowed to say 'dont quote me on this' while instructing somebody on exactly how to fix an issue)

humble timber
#

lmao

undone kelp
#

so maybe have a blank png thats 128x384 in the portraits folder, for exact sizing purposes

torpid sparrow
humble timber
#

sorry. get quoted. SDVkrobusgiggle

patent lanceBOT
undone kelp
brave fable
#

if your advice is liable to destroying my pc when i ask for help i am not taking your advice lol

patent lanceBOT
calm nebula
#

Anyways, I recommend carefully disassembling the pc and applying a vaccuum cleaner

undone kelp
#

DO NOT VACUUM THE PC?????????? ?? ???? ?

tired matrix
#

Did it

#

Lets see if it eorks

undone kelp
#

and just in case, im gonna go hide in a ditch now

tired matrix
#

Ill jump off a bridge

#

Eh… hm

#

He disappeared

#

Wait

brave fable
# tired matrix

so judging by your video here, and working with the instructions on the Portraiture page:

  • Create a folder in "Mods/Portraiture/Portraits" that you name however you like, for ex. "DCBurger Hi-Res" and extract the portrait files inside it.
    (If done correctly the file for Abigail would be located at "/Mods/Portraiture/Portraits/DCBurger Hi-Res/Abigail.png")
    i'd say the reason your portrait files aren't working is because instead of adding the images to the existing Portraiture mod folder itself (Stardew Valley/Mods/Portraiture), you've made a new one inside your own mod's folder (Stardew Valley/Mods/[CP] lads stardew/Portraiture)
#

ah no you just have two folders

#

hate working with videos

lucid mulch
#

(I still hate the fact that Portraiture does that and is why I refuse to use it)

brave fable
#

have you renamed the image in Portraiture/Portraits to include your mod's unique ID?

#

in the video it's simply named Xavier, which isn't his full name

#

as always, everywhere referencing your NPC must use their full name

tired matrix
#

Will try this too ty

#

Ok lets see if it works now

#

Its just blank now

tired matrix
dusky sail
#

iirc you should find the spot in portraiture that has a txt file saying "content packs go here" then put a folder there with your mod's name, then a png with your npc's full name inside that folder. And then also have the blank png in your actual own mod

#

Maybe youve done all that already. Ill admit im having trouble following a little

tired matrix
#

Its appearing its just not working 🤣

dusky sail
#

Hrmm 🤔 and what happens when you try to cycle through the portraits with the hotkey (default P)

#

This is a gathering information question sorry if im being bothersome

dusky sail
#

Hmmmm

#

Content patcher part of your mod loads the blank png to an asset. Portraiture contains a png with the exact same name as the initial png. Beyond that itd be code i cant access to reference rn bc im confined to mobile 😭

#

I wanna figure this out at the very least bc i love a good mystery.....

undone kelp
#

honestly same but im unfortunately on my work laptop...

brave fable
tired matrix
#

i just figured out its the portraiture that isnt working

#

cuz images i put on the default mod are working

cobalt lance
#

okay so im currently trying to get 3 characters to move and then warp out of a building simultaneously, but not exactly.

/move Sebastian 0 2 2 true/move Sam 0 3 2 true/advancedMove Abigail false -1 0 0 3 2 5/proceedPosition Sebastian/warp Sebastian -100 -100/playSound doorClose/proceedPosition Sam/warp Sam -100 -100/playSound doorClose/proceedPosition Abigail/warp Abigail -100 -100/playSound doorClose/

What ends up happening is that all 3 take off at the same time (desired behavior), move into place, and then all end movement at the same time and warp out simultaneously (not desired behavior, i want them to warp out one at a time as they walk into the door threshhold)

karmic gust
#

Would adding pauses between warps work?

rigid musk
#

^ pauses between their warps yeah

zenith robin
#

How might I go about making a custom shadow for a building?

zenith robin
#

Nvm, I got it

cobalt lance
brave fable
#

funny that the xml docs for Array.Length state that it returns the total number of elements in all dimensions, but in reality it only returns the length of the first dimension for some array T[][]

#

e.g. T[5][5] should give a length of 25, but it returns 5

uncut viper
#

is that bc theres a difference between a multidimensional array and a jagged array

#

where multidimensional is T[5,5] and jagged is the T[5][5] form

brave fable
#

mmmm you're right, i never remember that c# has an explicit multidimensional form

uncut viper
#

i also always think of T[5][5] as multidimensional i only know this bc i happened to learn that theres a difference literally yesterday

#

i dont even remember why i learned it

brave fable
#

you've probably run into it a lot when dealing with xtile, layers use a true multidimensional array for tiles

#

annoys me every time hahah

uncut viper
#

the only time ive ever dealt with xTile directly is for edoM rorriM

#

and for that i just iterated over layerwidth and layerheight in the classic x y niested for loop

#

so i didnt know it used multidimensional arrays

brave fable
#

oh you would've run into the layer.Tiles[x, y] syntax doing that though

#

anyway glad i'm not alone in not caring about real multidimensional arrays

uncut viper
#

i just forgot/didnt realize

#

bc i was using locations ig

brave fable
#

well i never knew you could index a tilearray by location

#

that's new lol

#

pleased you're using the scuffed c# swap syntax as well

uncut viper
#

ive blacked out most of my mirror mode memory

#

i think thats the only time ive ever used it probably bc i had recently learned how to at the time and thought "neat. why not use it for no real reason"

brave fable
#

yep that's probably the only reason hahah

uncut viper
#

its at least quicker than writing temp variables i guess

#

but by the time i remember i can do it ive usually already written the variables

brave fable
#

pity sdv uses vector2 for tiles, we could be using location everywhere

#

oh what could have been

uncut viper
#

it uses Location for GameLocation.checkAction SDVpuffersmile

#

it then turns that into a Vector2

zenith robin
#

Is there a way to have multiple different buildings upgrade to the same one down the line? Think a forked path that combines at the end.

hallow prism
#

i believe several buildings can be upgrade of the sheds, BUT i am not sure you can have several buildings sharing an upgrade

dusky sail
#

You could fake it maybe with an upgrade for each of them that looks and acts identical 🤔

vernal crest
dusky sail
#

Huh. I woulda thought the original file being loaded or maybe the targeted asset wouldve been the thing that needed to match not the npc's internal name

#

U learn something new every day

hard fern
#

portraiture goes off of internal name and stuff

#

which is why if you have a portrait called <CharName>_Beach, then it'll activate at the pelican town beach and not the island resort

crimson kettle
#

mylittlestar is unique id right

vernal crest
vernal crest
#

Princess Leah is using the {{ModId}}_ prefix for Xavier's internal name (as is recommended), which is how the internal name ends up being mylittlestar.xavier_Xavier.

dusky sail
#

I hadnt gotten far enough in npc making to know the png name had to match oops

safe kraken
#

Thought so too, the name thing. I just had no idea it had go be the exact internal name (only used Portraiture for Vanilla and SVE SDVpuffersquee )

brave fable
#

if you never actually give portraiture your npc's name, how is it meant to draw their portrait?

dusky sail
#

This is true...

gentle rose
#

pssst preview of the talking npc animations (Rasmodia animation and the entire idea are thanks to Dacar!)

hard fern
#

i was just about to say.. abby? XD but you're just using rasmodia as a placeholder?

gentle rose
#

I don't have rasmodia installed on my test mod group so I put rasmodia's portrait on abby SDVpuffersquee

brave fable
#

abigail is truly the 'hello world' of available bachelors

gentle rose
#

purple hair, close enough

hard fern
#

the perks of being first in alphabetical order

gentle rose
#

abby did make me chase down a non existent bug for a whole hour yesterday though because it turns out her second dialogue on day 1 of a save uses her special portrait, which for this animation is blank SDVpuffersquee so I thought the code was breaking

#

(this also ends up being another "HD Portraits" mod lmao)

plush helm
#

I'm looking for the file location of a particular temporary sprite (linusLights) called in Linus's first heart event. Any idea where to find it?

left nova
gentle rose
#

yeah, when it's eventually out it will

left nova
#

Though it maybe harder to do mouth movements with pixel art.

gentle rose
#

I mean, I'm not about to draw mouth movements in either pixel or HD art SDVpuffersquee I'll leave those decisions to actual artists

left nova
#

Does this also have an idling state which NPCs only do the blinking?

#

Or we need an entirely new code for that?

gentle rose
#

she isn't blinking?

left nova
#

I didn't see it in the video?

#

Is it there?

gentle rose
#

exactly, she isn't blinking, idk what you mean

safe kraken
#

Only the mouth moves rn

left nova
#

I mean like after talking, she will stand blinking until we end the dialogue.

#

Is it already a feature?

safe kraken
#

Im so hyped and also really worried cause when this gets out I'll have to redo all my mods to have this cause I'm dumb and want this for all my mods

gentle rose
#

I can add an option for an after dialogue animation, but right now since she isn't blinking while talking, it would be weird for her to start blinking after she's done

safe kraken
#

It could be something like she starts blinking after a while of the dialogue being done typing?

#

This could also work if a character has a crying face I think

gentle rose
#

I could definitely add an option for a non-talking animation and an "after x amount of time" animation

plush helm
#

I'm trying to find this sprite so I can use it as a reference point when I add lighting to night-time heart events in a mod I'm making. Any idea where/if I can find it in the game's content files?

brave fable
#

oh, those don't correspond to any specific game assets, they're arbitrary names to trigger equally arbitrary behaviours in events

#

it's all hardcoded in C#

plush helm
#

great, thanks! I will have to see if there's a way to include lighting in a heart event without messing with c#...

left nova
#

Though I'm not sure where to find it though

#

Could be in TileSheets or LooseSprites folder.

plush helm
#

it looks like there's an "addlantern" command so I may attempt to try that

#

thanks for the help!!

brave fable
#

i was just about to suggest that -- it looks like you can use addLantern 23 x y radius to pick sprite index 23 in Maps/SpringObjects, which happens to be blank, so your lantern is essentially just an unmotivated light source

scenic pecan
#

Does anyone know how to look at the game's code

finite ginkgo
#

!decompile

ocean sailBOT
whole raptor
undone kelp
vernal crest
undone kelp
vernal crest
#

No it was thoughtful of you to think of it SDVpufferheart

undone kelp
#

Also no one cares but i decided ill release my portrait mod in small batches and just have a manifest file for updates LMAO

#

Basically the download would probably just have the veeery base romanceables without any extra outfits like beach and or winter or hospital or joja or whatever fuckin else they have, in a folder people would put into portraiture, as well as a manifest so i can just. Release the others in small updates

#

I'll figure the rest out eventually

undone kelp
dusky sail
#

Plus now i know the secrets to making portriature mods for modded npcs SDVkrobusnaughty

undone kelp
#

It IS code magic after all

vernal crest
#

It is identical to making them for vanilla NPCs lol

#

I guess the part that trips people up with things like this is the fact that the vanilla internal name/ID for an NPC is the same as their display name.

undone kelp
#

Yeahhhhhh probably that

brave fable
#

(well, unless you're part of the exclusive club of non-english speakers, anyway)

hard fern
#

gonna start naming my npcs stuff like "NPC 009283" and have their display name be jeff

inland rain
#

working again on an open world stardew valley, a game location 100,000x100,000 tiles or more in size

blissful panther
#

Good to see this experiment back!

inland rain
#

thanks! I finally got the grass to show up properly, you can walk around and it looks right. it caches 9 chunks of 100x100 tiles around the player

#

because otherwise I think the game wants to create Tile arrays 100k by 100k

#

the grass is generated randomly based on the save id

scenic pecan
#

Does anyone know why ILSpy says "PE file does not contain any managed metadata"

brave fable
#

are you targeting StardewValley.DLL?

blissful panther
#

Yeah, that sounds like you're targeting the "launcher" type deal modern .NET uses for executables.

scenic pecan
#

StardewValley.exe

blissful panther
#

Yup, you need the DLL. The code doesn't live in the EXE anymore!

scenic pecan
#

I found .DLL but it's not showing the game i don't think

#

Does anyone know what the next step is?

brave fable
#

!decompile

ocean sailBOT
brave fable
#

here's all the steps in order SDVpufferthumbsup

lucid iron
#

What kind of mod are you making?

scenic pecan
#

i wanna make enemies outside of cave

#

and they sometimes spawn when u harvest crops

#

on the crop itself, the crop goes away, u dont get the crop, it spawns on the crop

lucid iron
#

That's fun DokkanStare

#

Implementing whole new enemy is pain but spawning existing not so bad

scenic pecan
#

can you not copy paste old stuff but give it a new spirite?

scenic pecan
#

Sure

dusky sail
#

oo lemme know if you figure it out! id love to add compat with my crop mod

scenic pecan
#

Okay

lucid iron
#

By new stuff I meant new behaviors

scenic pecan
#

Is Stardew C#?

brave fable
#

yep, you can target up to .net 6.0 SDVpufferthumbsup

brave fable
#

can't we?

lucid iron
#

I thought we had to target 6

#

Can use newer lang version tho

brave fable
#

darn you're right

scenic pecan
lucid iron
#

No this is my mod which changes monster sprites

scenic pecan
#

Do i need it?

lucid iron
#

No i linked it for example

scenic pecan
#

Oh okay

scenic pecan
lucid iron
#

Not easily? Depends on what you mean by this

scenic pecan
#

say monster 1 jumps on the player, monster 2 vomits lava. can i not grab monster 1's code and then add on monster 2's lava mechanic on the side?

#

i'd end up with monster 3, can jump on player and also vomit lava

#

but like you could change the vomit lava sprite or animation to make it gun lazer acid or something so it doesnt look like you stole it from another enemy

lucid iron
#

Monsters are very hardcoded, you can do these things if you just manually implement the update and draw loops obviously

#

But there's no magic fusion system

hard fern
#

would it be better to just use FTM to spawn my fruit trees over making them static map tiles 🤔 since i'll be using ftm to spawn forage anyways...

blissful panther
#

I suppose it comes down to whether the placement of the fruit trees will be a part of the map design or not?

hard fern
#

uh, yeah tghey are aprt of the map design

blissful panther
#

So in that case, you might want them to always be in the "right" place maybe?

hard fern
#

but static trees means i cant collect fruit from them :(

#

so im kinda torn

blissful panther
#

Oh, you mean like that kind of map tile!

#

You can spawn fruit trees with a tile property.

hard fern
#

wait i can

blissful panther
#

SpawnTree <type> <ID> [stage on spawn] [stage on regrow]

Spawns a tree when the map is created, where:
<type> is wild (spawn a wild tree) or fruit (spawn a fruit tree).
<ID> is the tree's key in Data/FruitTrees or Data/WildTrees.
[stage on spawn] is the preferred tree growth stage when first populating the save (if applicable).
[stage on regrow] is the preferred tree growth stage when regrowing trees on day update (if applicable).
The tile must have Paths tile index 34.

hard fern
#

hurrah

#

welp i'll just evict my trees

scenic pecan
#

is "--framework net6.0" related to stardew?

lucid iron
#

Yeah we have to target net6.0

hard fern
#

🤔 huh.. i have no idea what the fruit tree stages are

#

like where do i start counting

hallow prism
#

i believe fruit trees are 0 5

#

maybe 1 5

vital lotus
#

so I have this shop entry, which I hope mean that the two item will only appear in the specified season randomly, however I just encountered in game that the two item appeared on fall. What did I miss? I thought GSQ work as OR when there's ANY at front?

{
            "LogName": "Add stocks to Travelling Merchant",
            "Action": "EditData",
            "Target": "Data/Shops",
            "TargetField": [
                "Traveler",
                "Items"
            ],
            "Entries": {
                "{{ModId}}_NauticalRarecrow3": {
                    "Id": "{{ModId}}_NauticalRarecrow3",
                    "ItemId": "(BC){{ModId}}_NauticalRarecrow3",
                    "Condition": "RANDOM 0.5 SEASON fall winter",
                    "Price": 2000,
                    "ActionsOnPurchase": [
                        "AddMail Host {{ModId}}_NauticalRarecrow3"
                    ]
                },
                "{{ModId}}_NauticalRarecrow5": {
                    "Id": "{{ModId}}_NauticalRarecrow5",
                    "ItemId": "(BC){{ModId}}_NauticalRarecrow5",
                    "Condition": "RANDOM 0.5 SEASON spring summer",
                    "Price": 3500,
                    "ActionsOnPurchase": [
                        "AddMail Host {{ModId}}_NauticalRarecrow5"
                    ]
                }
            }
        },```
blissful panther
#

(There isn't a framework that allows you to spawn a building on a farm by default like the Meadowlands farm, is there?)

vital lotus
#

I think spacecore has something about that

calm nebula
#

(There is one)

calm nebula
#

Random x, Season y

vital lotus
#

oh dear everything is wrong then....

#

lol

lucid iron
iron ridge
blissful panther
#

I was thinking about it if there wasn't one already! SDVkrobusgiggle

lucid iron
#

I think there's 3 different mods that can put buildings on the farm

vital lotus
#

hooo what r those?

calm nebula
#

And a 9th

lucid iron
#

I used to do this until i switched to the AUR version

iron ridge
#

ah ty

lucid iron
#

Personally i hope esca do it too for the traction update of farm type manager

blissful panther
#

Then in that case, it's probably going to just be a teeny custom thing living in the C# component for this farm. It's simple enough, and the C#'s going to be there anyway, so...

calm nebula
#

I really want a mod that is a teensy farmhouse and a million overlapping renovations

#

Says ex modder who is headed out the door for work, lol

lucid iron
#

What r the fun c# features DokkanStare

blissful panther
#

Very secret for now until it's all complete enough I can record a video showing it all off! SDVkrobusnaughty

hallow prism
blissful panther
#

This project is an example of perfect commit messages, though. /s

calm nebula
#

I'm a traction hater, tbh

#

Not against trigger actions

#

Just the word "traction"

#

It's unnecessarily confusing

hard fern
#

start calling them TAs instead SDVpufferlurk

lusty halo
#

I was today's years old when I learned I could add an actual "Section" in the Config Schema to properly separate the various options (in this case, the "Main Farmhouse" in bold, there will be an "Island Farmhouse" and more below that). The way I did it before finding out was orrible to look at. At least now I can make it pretty but heck, I feel foolish for not looking it up earlier...SDVpufferdead

lucid iron
#

Remember that you can i18n these too!

lusty halo
#

Oh lord, I know but my brain needs to recover from this, first. SDVpufferdead

lucid iron
#

I have some example actually hold on

lusty halo
#

oh thanks!

lucid iron
#
  "config.section.General.name": "General",
  "config.section.Buildings.name": "Buildings",
  "config.section.Craftables.name": "Craftables",
  "config.section.Decorations.name": "Decorations",
  "config.section.Furnitures.name": "Furnitures",
#

The General/Buildings/Craftables/Decorations/Furnitures is the true internal name of these sections

#

And you just add these i18n keys, nothing to do on the configschema side

tired matrix
#

This portrait took so long to draw it would break my heart to have to make another one

lusty halo
lucid iron
#

These go inside your i18n/default.json Bolb

#

But yeah u can just ask me or anyone around again once you are ready to deal with em

vernal crest
#

What chu wrote is the whole thing.

#

You just put those keys into your default.json (but with your config option/section instead of "Furnitures" etc)

lusty halo
#

...Aaaaand the translation notes are right below the section part in the content patcher document. I just needed to scrool down.SDVpufferdead But thanks you so much, once this heat goes away I will look into translations properly, need to finish some updates first. SDVpufferheart

#

Just to be clear, mine is a content pack, so uh, can it have a default.json? I assume so?

torpid sparrow
#

yes

lusty halo
#

okay thanks much!

scenic pecan
#

What's this?

hard fern
#

????

hallow prism
#

red lines too tiny to see

scenic pecan
#

is it suposed to be text?

hallow prism
#

maybe! it's you posting that so if you don't provide context, we can try playing 20 questions but it may not lead anywhere

lucid iron
#

It just looks like you are having a struggle with your c# environment tbh

scenic pecan
#

I think i coded wrong

#

im trying to connect Class1.cs to SMAPI class i think

#

and i did it wrong so it's giving me errors

hard fern
#

cant tell what the errors even are

scenic pecan
#

how to check?

calm nebula
#

Stupid question time: are you particularly attached to using vscode

#

Or can you use visual studio

lucid iron
#

Do you have prior programming experience? C# or otherwise

calm nebula
#

( you don't need experience! But it helps us to know roughly what you already know.)

gaunt orbit
#

Did you install the nuget package

mighty quest
#

Can anybody tell me where in the code does the game decide MinutesUntilReady for Casks?
They have MinutesUntilReady = -1 and DaysUntilReady = -1, and that doesn't seem to be handled in the same place as literally every other machine (Object.OutputMachine)

gaunt orbit
#

If not, you can run this command in terminal in your project folder
dotnet add package Pathoschild.Stardew.ModBuildConfig

lucid iron
#

It's in the custom output method

#

OutputCask or something like that

mighty quest
#

didn't notice Cask was its own class

#

thanks

lucid iron
#

It's not it's own class for this thing

#

The outputmethod is like a thing u can set on data

#

And then game will fetch it to use over the normal machine rules stuff

scenic pecan
mighty quest
#

but Cask is actually its own class now that I searched for OutputCask

scenic pecan
#

This is how it looks

lucid iron
#

That's for the draw iirc

#

OutputCask is a static method right yggy

mighty quest
#

yes you're right

gaunt orbit
gaunt orbit
#

Also make sure you're using net6 for your project, since that's the version the game runs on

scenic pecan
#

no errors anymore

scenic pecan
gaunt orbit
#

Yeah that looks right

#

Your IDE should tell you if you did something wrong though

scenic pecan
#

IDE?

#

What does "0 reference" mean?

gaunt orbit
#

Integrated Development Environment, the thing that you use to write code

scenic pecan
#

the color is blue now

#

i dont think there's any error

obtuse wigeon
#

Often VSCode or Visual Studio, or other (Like jetbrains etc)

gaunt orbit
scenic pecan
#

Do i have to run the game so it starts seeing references?

gaunt orbit
#

It will never see them because smapi doesn't hard-reference your code

#

Reference counting is only for things inside your own code

scenic pecan
#

does SMAPI have it's own code that it hard-references?

gaunt orbit
#

???

scenic pecan
#

there has to be a reference with it's counter going up somewhere

#

so im guessing SMAPI's own reference is going up

gaunt orbit
#

I think you're getting confused

scenic pecan
#

cause its getting my code and it thinks it's his

gaunt orbit
#

It's not about memory reference

#

It means your written code doesn't use it internally, that's all. Nothing to do with the compiled program

#

It's not a warning or error, it's just a useful metric that can help you find where things are being used internally within your own mod

scenic pecan
#

Do you know when will the reference use something?

torpid sparrow
#

not sure if anyone has experience with this, but is there a way to include an adopted pet in an event?

scenic pecan
hard fern
#

I think you can use your pet like an npc

scenic pecan
#

example "1 reference" "23 reference", in general

gaunt orbit
hard fern
torpid sparrow
hard fern
torpid sparrow
#

im using a custom pet

#

i'll try the pet id

#

reads it like an NPC

#

grrr

#

ill figure it out later

inland rain
#

I added the entire town map to the open world, but now my farmer is nekked

lucid iron
#

How would events work in open world pelican town

inland rain
#

the plan isn't to convert sdv into open world, it's a separate area

#

I'm just testing adding maps

#
{
    "Format": "2.7.0",
    "Changes": [
        {
            "Action": "EditData",
            "Target": "aedenthorn.StardewOpenWorld/dict",
            "Entries": {
                "{{ModId}}_Example": {
                    "MapPath": "Maps/Town",
                    "MapPosition":{
                        "X":50000,
                        "Y":50000
                    }
                }
            }                  
        }
    ]
}
#

so you can add a custom landmark to the open world using content patcher

brittle pasture
#

for a moment I thought you forked xtile to support negative coords

inland rain
#

something wrong with the Front layer, if I omit that layer the farmer gets her clothes

brittle pasture
#

it's a wild dream I know

inland rain
#

I was originally using something like negative coordinates, but yeah that's too much trouble

obtuse wigeon
#

I was just thinking what an open world stardew would be like a few days ago, I think it would be pretty fun! (Laggy but fun)

gaunt orbit
#

Not necessarily laggy, you could use a chunked map system to only load the area around the player

inland rain
#

it's not laggy at all!

#

if I stand here I have clothes :/

#

draw layers are so weird

#

terrain features and objects might be a challenge

zenith robin
#

Is there a way to remove farm buildings via code?

inland rain
#

Game1.getFarm().buildings.Clear();

iron ridge
#

use vortex

#

select installed mods

#

whats so difficult with the instructions there

opal tendon
#

oh

#

is it possible to make without vortex?

lucid iron
#

If you just want a list maybe just do it in media?

#

Should be able to link stuff in description

blissful panther
#

Maybe make it as a Stardrop mod list and export that? I think Stardrop can do that?

opal tendon
opal tendon
gentle rose
#

or if you just want a list, Shareable Mod List by barley could also work

opal tendon
#

oh true

opal tendon
iron ridge
#

why is specific game an issue? are they not just stardew mods?

opal tendon
#

its going to be a mix

#

I guess I could make one for each game individually

#

I was going to put lots of art from my pinterest board and explain what the aesthetic is and then link my stardew mods + some of my favorite mods for the aesthetic from other creators + some of my favorites for other games

gentle rose
#

a mod collection is a list of mods to install all together

#

it doesn't really make sense to include mods from multiple different games at once because you can't use them together

#

I would just make a google docs page and share it around with anyone who's interested tbh, that's what most people with curated mod lists have done

opal tendon
#

okay ty!

bleak spade
#

I'm now playing using my modded maps and I've broken the egg festival

#

The map worked fine up until the egg hunt started, but then no eggs appeared. The eggs are in the Tiled map (on the Paths layer) but don't show up when the egg hunt begins

royal stump
#

are the egg's sprites still from a tileset named "fest"? it needs to start with that to be recognized by the game

calm nebula
#

(And to confirm- you don't have the tilesheet in the same folder as the map asset)

bleak spade
calm nebula
#

Remove it

bleak spade
#

Why? I thought if the tilesheet isn't there then the asset will be missing

hard fern
#

Thats why you need to embed them in your map

#

So that the game wont yell at you thinking its missing

plush helm
#

I'm trying to get a heart event to fade to black in the middle of the scene but atm it just jarringly cuts to a black screen. Fading back in works fine. I've tried with 'globalFade 0.007 true' which also didn't work. i'd appreciate any advice!

wanton pebble
#

Why not just use globalFade?

#

You're using a lot of extra arguments

#

globalFade with no extra arguments shouldn't cause an issue - assuming you're patch reloading anyway - so I'm wondering what you're using the extra arguments for

plush helm
#

i'm new to modding lmao so my event here is just held together with hopes and dreams lmao

wanton pebble
#

Got it. Try using /globalFade/viewport -1000 -1000/

plush helm
wraith aspen
urban patrol
wraith aspen
#

will try that, thank you!

urban patrol
#

keep the {} inside the []. list = [] of models = {}

wraith aspen
#

ohhhh

urban patrol
#

you may also need a key for the model but i’m not positive on that one

wraith aspen
#

[Content Patcher] Can't apply data patch "Pusheen Plushie Blind Boxes > EditData Data/Machines > entry #1" to Data/Machines: failed converting entry to the expected type 'StardewValley.GameData.Machines.MachineData': Cannot deserialize the current JSON array (e.g. [1,2,3]) into type 'StardewValley.GameData.Machines.MachineLight' because the type requires a JSON object (e.g. {"name":"value"}) to deserialize correctly.
To fix this error either change the JSON to a JSON object (e.g. {"name":"value"}) or change the deserialized type to an array or a type that implements a collection interface (e.g. ICollection, IList) like List<T> that can be deserialized from a JSON array. JsonArrayAttribute can also be added to the type to force it to deserialize from a JSON array.
Path 'LightWhileWorking'..

got this error when loading it up after adding {}

urban patrol
#

have you looked at unpacked data like for a furnace that creates light while working? i ask because i haven’t and am on mobile

#

ah yeah i thiiiink that error is saying you need a key

#

hold on while i format this

wraith aspen
#

ok, thank you for your help!

urban patrol
#
                "Action": "EditData",
                "Target": "Data/Machines",
                "Entries": {
                "(BC){{ModId}}_MagicPusheenCrystal": {
                "WobbleWhileWorking": false,
                "LightWhileWorking": [
"PusheenCrystalLight": {
                    "Radius": 1.5,
                    "Color": "Pink"
}
                ],```
#

pardon the wacky indentation

wraith aspen
#

thank you! will add that and hope it works

#

all good lmao

urban patrol
#

i think this should be it, and if not check unpacked data

wraith aspen
#

yeah i looked at the unpacked stuff and it only showed the radius and color part so idk lmao

urban patrol
#

hmmm

wraith aspen
#

hopefully the key works opening the game now

urban patrol
#

!hotreload are you restarting the game every time? there are console commands if you weren’t aware

#

governor :(

#

!reload

ocean sailBOT
#
How do I reload my changes while I'm still in game?
  • Content Patcher pack: enter patch reload <your_mod_id> in the SMAPI console window. This will reload and reapply all your patches (but won't recalculate the ConfigSchema or DynamicToken sections if you use them).
  • Translation files: enter reload_i18n in the SMAPI console window. If it's for a Content Patcher pack, also run patch reload afterwards.
  • C#: see the Visual Studio hot reload or Rider hot reload feature.
wraith aspen
#

i did not know this omg thats a life saver

urban patrol
#

oh wait maybe no :

wraith aspen
#

so just "pusheencrystallight" { then?

urban patrol
#

i think so? i shouldn’t code on my phone i can’t remember

wraith aspen
#

let me try that

#

nope still an error

urban patrol
#

then i must have been wrong about the formatting :(

wraith aspen
#

thank you anyway for trying to help! its much appreciated

urban patrol
#

no problem! i hope someone who actually works with machine data can help you lol

wraith aspen
#

lmao yes, and worst comes to worst the machines just wont glow i just thought it'd be neat to add

urban patrol
#

it sounds cool!

wraith aspen
#

ty!!

urban patrol
#

watch machine glow be something that’s secretly incredibly hard coded lol

wraith aspen
#

that would be so sad SDVpuffercry

brittle pasture
#

the key value format is for dicts (curly brackets)

wraith aspen
#

like just the square and curly brackets

brittle pasture
#

can you post your code when you made that change

wraith aspen
#

yes i'll change it back and then send it

#

if it means anything the errors showing up in yellow on the smapi log, not red

urban patrol
#

maybe radius and color each need their own set of {}

raw viper
#

Can anyone help me get smappi in Android?

wraith aspen
urban patrol
ocean sailBOT
#
Android SMAPI

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

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

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

brittle pasture
#

LightWhileWorking is just an object

wraith aspen
#

damn SDVpufferpensive

brittle pasture
#

try removing the []