#making-mods-general

1 messages · Page 152 of 1

hallow prism
#

you have a max spawn per day/per week but i'm not sure how much the farm uses it

gaunt orbit
#

so the way farm data works is there's a default "Farm" entry, which will be used UNLESS the specific farm type has its own Farm_farmtype entry in location data

#

I think all the vanilla farm types have their own, I'm not sure how many custom types use their own. probably not that many

hallow prism
#

it's just that forage spawn and such aren't that common in most farm so i'm not sure much will spawn with just a number increase

gaunt orbit
#

a lot of custom farms, particularly older ones, use FTM for forage instead of location data (bc that's a 1.6 thing)

oblique meadow
#

What is the acronym FTM?

frigid hollow
#

!ftm

ocean sailBOT
oblique meadow
#

Aha.

#

Thanks

rugged epoch
#

how do content packs use folders like "/Tilesheets" for tile sheets when maps are in "/Maps"? For me Content Patcher expects the tilesheet images to be in the same folder

brittle pasture
#

You indeed cannot use tilesheets outside of Maps/ for maps

gaunt orbit
rigid musk
#

👀 oh that would be good for compatibility with recolors...

brittle pasture
rigid musk
#

specifically for the furniture tilesheet cause I yoinked that when doing my maps

gaunt orbit
#

oh I see I think you're confused

#

TileSheets does exist in the vanilla content, but it's not accessible from map files unless you have button's mod installed

#

TileSheets/Furniture is only for placeable furniture objects, it's not used for interiors

#

all the town furniture is in TownInterior

rigid musk
#

Oh no I know that - I'm saying that the mod that Button has would be able to load those as tilesheets no? (I know they aren't normally available due to the whole map restriction thing + generally what they're used for)

#

I used the furniture tilesheets because the furniture available from the tilesheets in Maps was not ... matching the vibe so to speak

#

I think I have images of what the room i designed looked like without the furniture assets...

#

as you can see.. very different vibes

#

My primary hesitation from doing it was just the fact that people like recoloring the furniture but I realized that I... do not care :)

placid beacon
#

cute

#

wtf how do you put that starfruit

uncut viper
#

(definitely do not look at Graveyards as a good example of how to do this, its incredibly sloppy and not so good and comes with bugs SDVpuffersquee)

velvet narwhal
#

Wdym you got all the bugs SDVpuffersquee

uncut viper
#

i got all the ones that would be visible in a contest period of time

rigid musk
#

I used the 'spring objects' tiles tilesheet in maps :)

slim gorge
#

Hmm... with .NET 6 I can rewrite the SIMD stuff to use the true generic vectors instead of AVX and SSE2...

#

since .NET 6, IIRC, adds the specific operations I need

teal bridge
#

I know AVX2/AVX512 have a ton of problems but why would you want to avoid AVX?

slim gorge
#

More portability using generic vector types than intrinsics directly.

calm nebula
brittle ledge
#

inb4 people panic over that and remove it

opaque cobalt
#

aerobics file and token is only needed for characters that exercise in Pierre;s store correct?

brittle ledge
#

presumably yes

granite bluff
#

hellllo : )
in a custom farmhouse indoor map, how do i make the spouse rooms appear properly in case of marriage? is it some tiledata or config coding?

opaque cobalt
# brittle ledge presumably yes

okay, just confused as when comparing to Seasonal cute characters, saw the line " "Portrait": "Portraits/Penny_{{Aerobics}} " which was confusing as their is no Penny files with the name aerobics in them so I'm stumped

pine zenith
#

Hey all, I'm trying to write the part of my content patcher json for a custom wine and jelly and I wanted to ask if someone had an example or reference for what I'm supposed to do here? I don't know how to write this part but I want to give it some buffs (it's supposed to be a slightly OP endgame crop). Here is my content.json
https://smapi.io/json/content-patcher/7f4425db0568476daede83d5e7987b69

tender bloom
#

It looks like you have the objects down, but you’ll need the machine recipes that produce them

#

Separately, buffs are a field on the object

#

Look at some of the foods, for example

#

In the unpacked Objects.json

pine zenith
#

I JSONAssets form buffs and such go under "Edibility", I'm assuming it's the same or am I wrong?

tender bloom
#

Do you have the game unpacked?

pine zenith
#

I have the Data folder unpacked by SDXMB

tender bloom
#

Ok cool

pine zenith
#

But just that so I can see the data

tender bloom
#

There should be Objects.json in there, right?

#

Or something similarly named

#

Pop it open and show me Dish o the Sea’s entry for an example

pine zenith
#

Uhm....I don't see objects but let me check

tender bloom
#

ObjectInformation?

pine zenith
#

OH inside Data okay I see objects.json

tender bloom
#

Yeah!

#

That one

pine zenith
#

Dis?

tender bloom
#

Yeah so you can see how there’s buffs right?

pine zenith
#

Yes!

tender bloom
#

You should probably actually be thinking of coffee, not wine as an example

#

But that’s how you do buffs

#

The reason I say look at coffee for an example is because wine is a flavored object

#

Coffee is just a normal object

#

So it’s simpler and more like what you want

pine zenith
tender bloom
#

If you want a different kind of buff, just find an object that has that kind of buff and copy the buffs field out of it

pine zenith
#

Okay, so I can kinda copy/paste this into my content.json for the wine and jelly and tweak where necessary?

pine zenith
devout otter
#

I've been having reports that SMAPI says TDIT - Dialogue Box for Mariner (The C# component for my "Portraits for Vendors" mod) can be updated, but its manifest doesn't even have a Nexus ID? Also, SMAPI gave no such message yesterday and I did no update so what could have happened overnight?

calm nebula
#

Lol, the magic of the compat list

#

Once you've been added to that, it checks by uniqueid

#

Even if you don't add to the manifezt

#

I would just keep all version numbers on lockstwp

tender bloom
#

In contrast, coffee is just coffee

#

To actually produce anything from a machine, look at Data/MachineInformation

#

Pre-1.6 this would be PFM, not JA, for context

devout otter
slim gorge
proud wyvern
#

These mods are extremely based. You need to keep them installed.
all of Shockah's mods

pine zenith
tender bloom
#

So you’ll add the buffs into your existing patch on Objects.json, and the MachineInformation stuff needs to be a new patch

#

I gotta run but hopefully someone else can help explain

devout otter
proud wyvern
#

i know you're joking, but you should NEVER change your unique ID

pine zenith
#

Having issues visualizing what this is supposed to look like CattoSadKitty

drowsy pewter
#

Did you check out the Witch Hazel mod code?

calm nebula
#

When I could make another hat

pine zenith
rancid temple
#

A patch block is generally each block of

{
  "Action": "",
  "Target": "",
  "Entries": {}
}```
accounting for whatever you happen to be doing with each patch, some of them won't use Entries, etc
pine zenith
#

This is what I'm looking at so far, am I moving in the right direction?

rancid temple
#

I'm actually unsure if seeds can be edible, though I think they certainly shouldn't be

pine zenith
#

Oof, well I'm going to change the values to be proper, it's more the structure I'm unsure of

rancid temple
#

It's more of a gameplay feel issue, I'd be pressed if I ate my crops before I even had a chance to grow them SMCKekLmaoDog

#

Oh I just noticed this is a wine, okay

#

I saw the Type first and then the Edibility and Buffs

pine zenith
#

Fixed lol

#

Ye, I'm trying to make a wine with hella buffs

rancid temple
#

!json you can share code more easily with the validator, but assuming you have all your closing brackets after the screenshot cuts off, this should be fine I think

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.

rancid temple
#

If you have a mod like CJB Item Spawner, you can check in there to see if your items are in the game

pine zenith
#

I normally am I just didn't want to save if something is terribly wrong just yet

rancid temple
#

Save the json?

pine zenith
rancid temple
#

Even without a way to get the wine in game, as long as your Object code is good, it'll still show up in CJB

pine zenith
# rancid temple Save the json?

Yeah incase I'm horribly confused and have to get rid of code I have it saved at the point before adding all this extra stuff to make sure I don't bork my file beyond repair

rancid temple
#

Ah, could save some back ups

#

I use VSC so mine just autosaves whenever I make changes lol

pine zenith
rancid temple
#

Also CP is generally simple enough that I'm not miffed about restarting a section

pine zenith
#

I'm just not secure in it yet so I worry a bit much

rancid temple
#

I scrapped a lot of early projects

#

I still make a lot of things that are just quick tests that get renamed and stashed away for never

rugged epoch
uncut viper
#

keeping your tilesheets in the same folder as your map, removing them before loading the game, or adding them back when you need to edit, is unfortunately the way to do it

rugged epoch
#

ok, thanks

uncut viper
#

unless you want to manually edit the .tmx files in notepad++ or something after

gaunt orbit
#

Unfortunately maps are Just Jank

rugged epoch
#

will probably also write a script for this in the future

rugged epoch
granite bluff
#

one question : )
in a custom farmhouse indoor map, how do i make the spouse rooms appear properly in case of marriage? do i add specific tiledata or via config coding?

gaunt orbit
#

Position is hardcoded IIRC

#

I think there's a mod that lets you change it?

granite bluff
#

so i just make shure to not cover it?

#

ooh wich mod?

velvet narwhal
#

i would just keep the spouse room position the exact same as vanilla, npcs can actually set their spouse position in the farmhouse but there aren't that many that differ from vanilla positions

#

if you're really curious, it's this list as part of the data/characters:

                        "MapAsset": null, //null for vanilla, set to loaded filename for custom npc
                        "MapSourceRect": {
                            "X": 0, //this is if you're wanting to move it to a different spot in the farmhouse
                            "Y": 0,
                            "Width": 6, //the custom spouse tmx width
                            "Height": 9 //custom spouse room tmx height
                        }
                    },```
gaunt orbit
granite bluff
velvet narwhal
#

oh wait the source rect is probably indexing thonk

uncut viper
#

im pretty sure the MapSourceRect is if your spouse room is on a tmx that contains more than just the room

velvet narwhal
#

i think it might be embedded into the farmhouse map properties for spouse room positionings

gaunt orbit
#

It's hardcoded in c#

uncut viper
#

i dont believe there is any vanilla way to change the spouse room location

velvet narwhal
#
(valid in farmhouse)    The top-left position at which to place the spouse room.```
![SMCHellmoBurnitall](https://cdn.discordapp.com/emojis/966737980230369331.webp?size=128 "SMCHellmoBurnitall")
gaunt orbit
#

When did that get added?

velvet narwhal
#

i'm not crazy meow_awauu

#

no idea

#

probably 1.6?

gaunt orbit
#

Probably a 1.6.9 thing

uncut viper
#

then i stand corrected, though it is then up to the map and not the npc

granite bluff
velvet narwhal
#

no that's a map property

granite bluff
#

aaah i see : D

velvet narwhal
#

same ways as you did your warp

granite bluff
#

thank you all for the input

pine zenith
#

How do I create the machine json I need to make my wine a custom item produced when I put my Indifruit in a keg or preserve jar?

velvet narwhal
#

i'm back on the random bs again thonk

#
          "Id": "{{ModId}}_Marriage0",
          "Trigger": "Spiderbuttons.BETAS_NpcKissed",
          "Condition": "ITEM_ID Target Maru, SYNCED_CHOICE day {{ModId}}_RandomSync 1 4 1",
          "MarkActionApplied": false,
          "Action": "Spiderbuttons.BETAS_SetNewDialogue Maru \"{{i18n:Marriage.{{Season}}_{{Random:{{Range:0,5}}}}}}\" true"
        },```
if i have those `SYNCED_CHOICE day <key> <min> <max> <choices>` and i have them across other conditions, they'd definitely sync like cp's pinned random, right? ![thonk](https://cdn.discordapp.com/emojis/1321199059612078091.webp?size=128 "thonk") so say i want to ensure that between the 4 triggers that i have, one will always win out and be active?
reef kiln
#

I think this is the right place. Why is this clocks shadow different from the base game. It is a straight up replacement of the original same shape and size. what do I do to fix it.

final arch
#

the clock has the shadow inbuilt in the sprite

#

the parts that are missing

reef kiln
#

yup, delete that part and never noticed. Fixed it thanks

faint ingot
#

I didn't care for AI's attempt at writing dialogue for my characters, but it's been quite useful for things like this:

royal stump
brittle ledge
velvet narwhal
pine zenith
#

Okay! I hope I got this correct, can someone take a look and see if this content.json is good? I need to make machine rules next so when I put my custom Indifruit in a keg the custom Indifruit wine comes out, If anyone knows what the next step to this I would greatly appreciate any help - this is my first stardew mod and I'm trying really hard to learn properly and get it right no matter how long it takes pardonsweaty
https://smapi.io/json/content-patcher/eaa37d4dd5824ced9ac9574355afbe93

brittle ledge
#

I haven't really done items or crops yet so I won't be much help but I wish you luck on it SDVpufferheart

velvet narwhal
#

i vaguely... recall... a moveentries for machine processing thonk

drowsy pewter
#

(ignore the moveentries for now, they arent at that step yet)

pine zenith
#

These entries?

drowsy pewter
#

You can as well try loading the mod, making sure the mod is registered by the game, seeing if you can spawn the items with CJB item spawner, and seeing if you can plant the crop

pine zenith
#

er, put the assets in asset folder properly

drowsy pewter
# pine zenith

You wrote {{ModId}}Indigeaux.AncientIndiFruitMod as the ID for your fruit item, but in the crop entry where you tell the game what fruit the crop makes, you wrote {{ModId}}Ancient_Indifruit or something (Im on my phone)

#

either way those have to match

drowsy pewter
#

Yeah I would recommend getting the crop to work first before adding more elements

brittle ledge
pine zenith
drowsy pewter
#

this is your item ID

pine zenith
#

I see, this is the fruit that comes off of the crop

#

this

drowsy pewter
#

Yes and you'll notice the harvest item field in the crop data does NOT match your item id

brittle ledge
#

I just mean you don't have to put this in assets/sprites in your mod folder if you don't want to (since you mentioned not knowing now to name your asset folder). But ignore me if I'm confusing you SDVpuffersquee

pine zenith
drowsy pewter
#

Yes

uncut viper
#

Line 15 needs to match Line 117

drowsy pewter
#

It doesnt match the thing I highlighted. It has to be exact

tender bloom
#

It’s that underline and space coming back to bite

pine zenith
# uncut viper Line 15 needs to match Line 117

Thank you 😅 i just don't understand all the names of things yet, is like alphabet soup a bit and i'm fluent in English but sometimes is still a bit painful for my brain - I'm sorry you guys I'm trying, but thank you for being so so patient ❤️

tender bloom
#

It doesn’t matter much what you call the thing, but you have to get every single character in its name perfect

#

Computers are too dumb to understand nicknames

#

Elizbaeth and Elizabeth and elizabeth are usually not the same to a computer

#

(The last two are sometimes the same)

tender bloom
#

And that’s not even getting into sneakiness like trailing spaces

uncut viper
#

the text you have coloured red (like "Name" and "HarvestItemId" and so on) are what people mean when they say "field" usually

drowsy pewter
uncut viper
#

or rather the field is the combination of the red text on the left of the colon : and the text on the right, the value

pine zenith
#

my folder looks like this right now

#

Should be okay for now right?

drowsy pewter
#

uncapitalize assets

pine zenith
#

Hm... this is all that comes up (I removed the JSONAssets version of the mod to test it fully - only vanilla pickles and juice are appearing?

oblique meadow
#

Vanilla pickles? That is not a flavor combination that sounds appealing

drowsy pewter
#

So it seems like the items are there, but something went wrong with their images, either the texture name or the Loading of the texture. You should double check every where you write down Texture names, to see if stuff matches up exactly

uncut viper
#

do you actually have a folder called "sprites" inside your assets folder, and a .png called "Objects.png" inside that sprites folder?

pine zenith
drowsy pewter
#

It doesnt matter how you set it up, but it has to match this part exactly. One or the other has to change to match

pine zenith
#

What folders to put, how to name things, how the code in content.json goes, etc.

uncut viper
#

there isnt actually a "proper" way to set it up, its entirely up to you how you want to organize it

drowsy pewter
#

When you Load something to the Texture called Mods/{{ModId}}/Objects, and you use the thing called {{TargetWithoutPath}}.png, that specifically makes Content Patcher look for the image called Objects.png

#

So that's one of the issues (image name mismatch)

#

If you copy the code from one mod but the image filenames/setup from another mod, there's no guarantee that they match

pine zenith
opaque cobalt
#

How does this pathing work if the mod I'm using as a guide has no Penny aerobics file?

"FromFile": "assets/{{TargetPathOnly}}/Penny/{{TargetWithoutPath}}.png"
"Portrait": "Portraits/Penny_{{Aerobics}}"

drowsy pewter
tiny zealot
uncut viper
opaque cobalt
#

okay. I thought it worked by having the token name in the file name and then token effects just flow by in the background

drowsy pewter
uncut viper
# pine zenith

that said, are these the only .pngs you have? theres no textures for the jelly or wine here

pine zenith
uncut viper
#

you can add another target, or you can put the texture for the object and the seed packet in the same .png

pine zenith
uncut viper
#

gotcha

#

it should be made clear that the two Targets you have, Mods/{{ModId}}/Objects and Mods/{{ModId}}/Crops, dont have to be called that

#

you can rename those to whatever you want

pine zenith
uncut viper
#

so you can add a target written like Mods/{{ModId}}/seeds for example, and then with that {{TargetWithoutPath}} token, it will load your seeds.png inside your assets/sprites folder

#

you can alter either the FromFile, the png filenames, or the targets according to your personal preference

#

(and the folder structure, which would also involve changing the fromfile)

pine zenith
#

Can I do something like this instead?:
"Mods/{{ModId}}/seeds, Mods/{{ModId}}/object, Mods/{{ModId}}/wine, Mods/{{ModId}}/jelly"

uncut viper
#

sure can

drowsy pewter
#

absolutely

pine zenith
#

Okay, then the FromFile is supposed to look like...

uncut viper
#

what {{TargetWithoutPath}} does is take the last part of your Target, so everything after the last /, and look for a file name that has the same name (plus .png bc you wrote .png after)

pine zenith
#

assets/sprites/seeds???

tiny zealot
#

(button thank you for fixing that error)

pine zenith
#

maybe?

uncut viper
#

you CAN make the Fromfile just assets/sprites/seeds.png, but then you would separate load patches for each of your textures

#

using {{TargetWithoutPath}} is like a shortcut to be able to load multiple textures at once with just one single FromFile line

#

combined with multiple Targets, which you currently have, separated by commas

#

both ways are correct so you can have different load patches if it makes it less confusing for you, but doing it all in one Load patch is less work

pine zenith
uncut viper
#
{
  "LogName": "Load textures",
  "Action": "Load",
  "Target": "Mods/{{ModId}}/object, Mods/{{ModId}}/seeds, Mods/{{ModId}}/wine, Mods/{{ModId}}/jelly",
  "FromFile": "assets/sprites/{{TargetWithoutPath}}.png"
}
#

this will load all four of object.png, seeds.png, wine.png, and jelly.png from your assets/sprites folder

#

you will still want to add one more for the crop though

#

for crop.png i mean

#

presumably Mods/{{ModId}}/crop

pine zenith
uncut viper
#

after you do that, you will also want to make sure to correct all of the "Texture" fields for each of your items you added in your EditData patch for Data/Objects

#

since right now they all want to use Mods/{{ModId}}/Objects as a texture, which wont exist anymore

#

(and didnt correctly exist in the first place)

#

you will also want to make sure the SpriteIndex field is set to 0 for all of them

pine zenith
#

Okay so far my folder looks like this:

#

"Target" looks like this:

uncut viper
#

(its generally advised to always send .json files via the smapi.io uploader as you did before, even for updates like this)

#

but otherwise that Load looks correct to me

obtuse pike
#

for dependencies, it's just authorname.modname w no spaces?

uncut viper
#

its whatever the other mods unique ID is

pine zenith
obtuse pike
#

ahhhh i see

#

ty

uncut viper
#

the smapi.io uploader is great bc everyone can see it easily, people can adjust the font size or colours to their liking, and it points out any syntax errors that you mightve missed right off the bat SDVpuffersmile

pine zenith
uncut viper
#

just gotta change the SpriteIndexes to 0 still i believe, for the seed packet, jelly, and wine

#

and then test again

#

SpriteIndex tells the item which sprite in the texture sheet it should use (like if you had all of your item textures in the same .png, you can tell it which specific one to use). for programming reasons you start counting at 0, not 1

pine zenith
uncut viper
#

i meant via like their browser settings or extensions and stuff

#

like dark mode or default zoom levels (im usually zoomed in higher than default on smapi.io for example)

pine zenith
pine zenith
#

Can't see xD

pine zenith
uncut viper
#

you do! you need to change it to 0

#

for all four of your items (but your first one, the fruit itself, is already correctly set to 0)

pine zenith
uncut viper
#

then if you reload your game again then they should have proper textures i believe

#

reload and look in CJB i mean. if you actually SPAWNED any old ones, they wont work still

#

(as in, JUST the old ones will be broken. you can still spawn new, correct ones)

pine zenith
light bramble
#

Is selph around?

uncut viper
#

selph has been around however selph is also on vacation i believe

light bramble
#

Ah, was gonna ask a question related to their mod Extra Machine Config.

light bramble
#

Noice!

pine zenith
#

They're HERE! Textures work!!

uncut viper
#

progress!

#

unfortunately if the next step is machine stuff, thats not an area i know too well and will not be much help any further

pine zenith
#

For some reason my fruit is a vegetable but hey xD

velvet narwhal
#

uhh i think that has to do with a context tag

uncut viper
#

no, its the category, you just used the veggie category

tardy adder
#

I has a query about query
would it be better to do
'{{Weather:Rain}}'='true'
or
'{{Weather}}'='Rain'
??

uncut viper
#

it would be {{Weather |contains=Rain}} = true but i dont know if theres really any difference at all

#

the second one might be very very fractionally better on absolutely not human-appreciable timescales

#

but thats just me guessing

pine zenith
# uncut viper unfortunately if the next step is machine stuff, thats not an area i know too we...

I want to thank you from the bottom of my heart - you have been so patient and helpful and I know you took a chunk of time out of your day explaining all of these things to me. Thank you so much - I feel i have a better understanding of how to do this and I'm grateful for all the help CatHappy
All of you, truly, you are all superstars to me and I'm excited to learn more! I'm having so much fun now even though I was so stressed trying to figure this all out on my lonesome bongocatlove pandaheart

uncut viper
#

modding is a lotta stuff to learn! very understandable to get stressed about it at the start. luckily until you get into C# land, the start of it is probably gonna be the steepest on the learning curve and it'll get a lot easier over time, compared to now

#

(which ftr, theres a good chance you will never need to get into C# land)

royal stump
calm moth
#

I'm still in the massive overwhelm stage lol. Why are there four different files for this? What does i18n even stand for? Is there a cheat sheet for all of these seemingly random strings of numbers and characters that I'm sure are actually very important? Why am I doing this to myself??

uncut viper
#

(are those real questions)

#

(not bc theyre dumb or anything but bc my immediate urge was to answer—)

calm moth
#

Uh, yeah, but I'm trying not to overwhelm the chat with my noobishness and things I'm still working on googling lol

uncut viper
#

four files: dunno what four files you mean, more info needed
i18n: internationalization. theres 18 letters between the i and the final letter n

#

cheat sheet: do you mean {{These things?}} thatd be the content patcher docs

#

why? because modding is fun

royal stump
tardy adder
calm nebula
calm moth
#

Lol, I'm working on an event editor, so I'm like there's the "default.json" that has the readable dialogue, the "content.json" that loads everything, the "Name.json" that points everything to the "default.json" i think?, and the "events.json" that I think controls movement? But all of those have like these weird $5#$b# in the dialogue or stings of numbers in what I assume is movement or timing or pauses? and I can't (yet) find a cheat sheet to tell me what those things are or how to read them lol

calm nebula
#

[[Modding:Dialogue]]

uncut viper
#

content.json is for Content Patcher mods, its where Content Patcher loads things from (and that content.json can then point to other files)
default.json, presumably inside an i18n folder you mean, is the default text that will be shown if the player's selected language doesnt have a translation available inside the mod

#

name.json and event.json arent anything and i dont know where you get those from

#

some mods might have json files with those names but they arent required or standardized

#

for Content Patcher mods, the only files that are absolutely required are manifest.json and content.json

calm moth
#

Really... Ok... I'm looking at the Alecto expantion mod, but I saw similar files in RSV (just so many more of them lol). Like in RSV it's under data/events/Events.json and in alecto it's assets/events/events.json, so I assumed that was a standard format

uncut viper
#

the only things that you need to follow per standard is the stuff in the content patcher docs

#

(and ofc the formatting of specific things like dialogue commands that the vanilla game requires)

#

anything else is just up to any individual mod author how they want to organize their files

calm moth
#

That is so the opposite of what I was expecting lol. So basically everything in these files could get thrown into the content json and everything else is just, organization?

devout otter
#

(Though if you are making and event editor, I'd recommend at least taking i18n and default.json into consideration for ease of translation.)

uncut viper
calm moth
devout otter
#

Aah, alright.

uncut viper
#

(i think they just meant event editor as in bc they were wanting to edit specific events earlier)

#

changing the requirements of RSV events and such

calm moth
#

Yup, what Button said 🙂

pine zenith
#

Is there anyone here available who would be able to help me with a machine rules page for Content Patcher to make my custom fruit work with kegs to become my custom wine? I'm not sure how making a machine rules json works

calm nebula
#

I wonder, if you "just" want to change event preconditions....

#

Whether or not it would be easier to make a triggeraction that triggers the event

light bramble
#

Ok so question, if i was to add an item (say large cheese) do I need space core for anything regarding that item?

I was given permission to revamp/take over the Dairy And Egg Product Overhaul mod, and I want to use CP instead of JA and PFM if at all possible

calm nebula
#

It sure seems like it would hold up to mod changes better

uncut viper
#

at that point since you'd be adding a dependency anyway, might as well just look for/make one that just lets you change preconditions with a custom data asset

#

there is no trigger action action to start an event

calm nebula
#

Spacecore has one I thought?

#

Easy enough to c# one for a custom personal mod

calm moth
#

C# is scary

calm nebula
calm moth
#

I took one look at it and ran screaming lololol

uncut viper
#

spacecore does have one yeah, i usually assume people wanna d o things with just CP though

light bramble
#

Well I know I can add items with Content Patcher, but I'm looking over what was done in cornucopia for references, and they do use SpaceCore for some things within it.

calm nebula
#

Make 👏 events 👏 *is booed off stage *

uncut viper
#

not always a correct assumption its just the one i work off of

calm nebula
#

Rsv already requires spacecore

calm nebula
drowsy pewter
#

feel free to steal code

drowsy pewter
uncut viper
light bramble
drowsy pewter
#

yes

#

it does the whole overhaul thing

#

just also comes with an overhaul of everything else

light bramble
#

So you wouldn't be mad if I just kinda yoinked the code (but still made it my own) for my revamp?

calm nebula
#

It mayyyy exist?

uncut viper
#

just seemed like somethin thatd be real easy to do so i figured someone mustve done it by now

drowsy pewter
#

although i guess you dont need it

light bramble
#

I'll take a look at it and see which art I like better lol XD

pine zenith
#

Does anyone have any guides or references for adding machine rules to a mod?

light bramble
pine zenith
drowsy pewter
drowsy pewter
light bramble
uncut viper
#

i wouldnt recommend EMC to someone who doesnt know how vanilla machines work in the first place

drowsy pewter
#

I mean it's fine, but--yeah thats all

light bramble
#

which is why I also linked the wiki for modding machines

drowsy pewter
#

i understand that, but a new person doesnt know what's mandatory or optional

light bramble
#

oh

hard fern
#

Extra machine configs is for adding additional things that aren't in vanilla machine rules, right?

drowsy pewter
#

yes

light bramble
#

😐

#

I feel moronic...

faint ingot
#

too much?

drowsy pewter
#

perfectly fine, just want to make sure Rei gets targeted help for what they wanna do with their mod

uncut viper
#

nothin you should feel moronic about, just somethin to keep in mind for newcomers

drowsy pewter
#

anyways I'm off to sleep. See ya!

calm nebula
#

Tbh I think we should make Rei a thread

drowsy pewter
#

good suggestion

calm nebula
#

Rei's thread

light bramble
#

Dew iiiiit

uncut viper
#

i would worry that Rei would get a lot less visibility and help in one

light bramble
uncut viper
#

since theres like 4 people here right now to even know it exists and none that can help all too much with this step

calm nebula
#

Just link the thread, I think

light bramble
#

I had a thread...I closed it

calm nebula
#

And pop into the thread to answer

light bramble
#

felt like not many people were helping in my thread and it seemed to take longer to get help...

uncut viper
#

would depend on how proactive you were at coming in here and asking people to come to your thread, i suppose

#

since no one will know the thread exists if you only ask in a thread

#

(if you have joined a thread, such as your own, then you can see it in the channel list, along with anyone else who has also joined your thread. but if someone has not specifically joined it, it doesnt show up in the channel lists. theyd have to actively check the list of threads people have made)

oblique meadow
#

So you’re saying people weren’t thready to respond?

#

I’ll see myself out

hard fern
#

😭

light bramble
calm nebula
#

Okay, I'm now suspicious this warning is just wrong

uncut viper
#

since when did smapi log about direct console window access

hard fern
#

(ive never seen this before ?)

calm nebula
#

Remind me in 15 days to look

patent lanceBOT
#

alllllllllrighty then, atravita (#6448294) (15d | <t:1736913181>)

uncut viper
#

ive also literally never seen it

calm nebula
#

(Casey if you see this I think thr analyzer is wrong here.)

#

It's just picking a random mod to pick on

#

It was save backup earlier

#

Also crap

light bramble
calm nebula
#

I meant two weeks and three days

hard fern
#

2 weeks and 3 days is also 15 days 🤔

uncut viper
calm nebula
#

17 days

uncut viper
hard fern
#

SDVpufferflat confirmed: i can't math

light bramble
hard fern
#

😭

light bramble
#

N3rd's Modding corner

calm nebula
uncut viper
#

to be fair, are you ever not tired? im not

calm nebula
#

I caught up with sleep on Christmas!!

uncut viper
#

ah, well, one day out of the year oughta do you good for the upcoming 2025 i guess

dire rune
#

Hey all new to the modding community. How do I add a new clothing item that isnt replacing anything but completely new with a custom name?

gaunt orbit
#

[[Modding:clothing]]

#

Hmm must be called something else

#

I know we have a page for it

rigid oriole
#

[[Modding:shirts]]

rigid oriole
#

aha

gaunt orbit
#

Ah, separate pages

light bramble
#

also

#

[[Modding:pants]]

gaunt orbit
#

Also [[Modding:hats]]

light bramble
#

Honestly just look at [[Modding:items]]

light bramble
#

All three will be listed there

#

And boots too

#

@dire rune

rigid musk
#

With a location name like AngelOfStars.Mrqifriendable_QiRoom would that be incompatible with location based dialogue due to the _?

uncut viper
#

shouldn't make a difference

rigid musk
#

very good >:]

rigid oriole
#

harmony on its way to tell me this doesn't match :///

#

oh those images don't crop well

royal stump
#

haven't used codematcher myself, but I think it might want 9 to be an sbyte?

rigid oriole
#

this sounds vaguely familiar

royal stump
rigid oriole
#

new CodeMatch(OpCodes.Ldloc_S, (byte) 9) and new CodeMatch(OpCodes.Ldloc_S, (sbyte) 9) both are not matching (i can match other random instructions like Sub though so it's just this opcode i think I'm not hitting)

#

I might be casting wrong, I've been out of C# land for a while

tawny ore
#

Ldloc_S probably need (short)9

proud wyvern
#

also you really don't want to match by local index

royal stump
#

it might be a pretty specific issue with the matcher SDVpufferthinkblob
but yeah, probably possible to just not hook onto that instruction operand SDVkrobusgiggle

rigid oriole
#

aight thanks yall i'll pick some other instructions

proud wyvern
#

it's fine to match by ldloc

#

but not by index

#

matching by the type of the local is fine

#

(ignoring the fact i use my own lib for writing transpilers)

rigid oriole
#

i've got a match :) we are back in business

light bramble
pine zenith
#

Hey guys, can someone help me make a machine data page for content patcher? I'm not even sure how to start this and I can't find an example of one already done that makes sense - I feel like no matter what I search the closest I get is something that explains the fields but I don't know how to format this thing to even start.

light bramble
hard fern
#

If you're having trouble formatting it, I'd suggest looking at unpacked vanilla data first

light bramble
#

^

pine zenith
#

I have converted my JSONAssets fruit mod into a Content patcher mod - it's a regrowable fruit that I have custom pngs for and I have the rest of the mod done aside from the part that lets me put the fruit in a keg/preserve jar and get my custom wine/jelly out. I'm told I need machine rules for that but I'm lost here.

hard fern
#

You looked at the wiki page for machine data, right?

pine zenith
pine zenith
hard fern
#

Well did you start with the general content patched stuff first?

hard fern
#

You cant do what you want to do until you at least set up your content.json (or wherever you're putting it) with "EditData"

light bramble
#

[[Modding:Editing XNB files]] teaches you how to unpack the stardew valley content

hard fern
#

(?)

pine zenith
hard fern
#

Sorry im on mobile rn, i take a bit longer than usual

pine zenith
hard fern
#

So you said you already have your objects and whatnot right?

hard fern
# pine zenith yes

You can copy down part of what you already have, and instead of the Target being Data/Objects, have it be Data/Machines

pine zenith
hard fern
#

In your content.json

#

One sec

pine zenith
#

This is my content.json

#

What would I be copying?

light bramble
#

You need kegs and preserves jars to work correct?

hard fern
#
      "Action": "EditData",
      "Target": "Data/Objects",

, but change the target to Data/Machines. Let me switch to my laptop...i can do that better there

granite folio
#

What and where would i have to add a stipulation to pull a different size from the portrait chart? cause I'm frankenstein-ing a couple portraits together, but theyre all larger than the normal sprite sheets, unfortunately.

light bramble
#

Ok, so you need to do an EditData on the target of Data/Machines like Shrimply showed.

granite folio
#

Also, sorry to interrupt :?

pine zenith
hard fern
#

yep

#

(just remember to keep it inside your Changes section)

light bramble
#

Someone made it for you so you have your own space

pine zenith
light bramble
devout otter
granite folio
#

Yes! Sorry, I have the sheets made already, But the px size is larger than normal portraits

#

I just am unsure of how to add whatever i need to to normalize them in the portrait window

#

they appear fine, just really zoomed

devout otter
#

You would need an additional framework like "ScaleUp 2" to do that.

#

Its download section has an example to do it.

obtuse pike
#

does anyone know where the darker tiles are located in the tile sheets? (for context, this is a modded farmhouse)

granite folio
#

Thanks!

obtuse pike
#

the color of them is modded, but im wondering where they would be in the vanilla tilesheets

devout otter
pine zenith
#

Okay I have put this here at the end

light bramble
pine zenith
#

Moved over, thank you~

pulsar charm
#

hey guys, I used to work on a mod but haven't touched it in years and want to get back to it. I used to look at a site or wiki that has a list of commands (like adding a certain code that will make something trigger during a specific event, etc) but I don't know where to find it anymore. Can anyone help me?

round dock
#

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

velvet narwhal
rigid musk
#

Does anyone know where the dialogue for the desert festival is?

velvet narwhal
#

strings/1_6? yep

rigid musk
#

strings... its in strings..

#

why is it in strings

hard fern
#

because strings 😔

rigid musk
#

so if i wanted to add desert festival dialogue it would be a string and not editing the dialogue ... 😔

velvet narwhal
rigid musk
velvet narwhal
#

iirc it goes by a strict regimen

#

<Festival>_<NpcInternal>[year]_[marriage]

rigid musk
#

I mean I get the format of it from just looking at the strings themselves but with CP could I just put it in the area where im editing the dialogue json?

velvet narwhal
#

nope

#

you have to editdata on Strings/1_6_Strings

rigid musk
#

pensiveclown thank you

velvet narwhal
#

much like how you can't shove marriage strings into character/dialogue and vice versa

rigid musk
#

thank you for your help :3

granite bluff
#

hii : ) is there a debug command or any other way to unlock pennys big house?

pulsar charm
#

How do you make the game display a specific portrait during dialogues?

velvet narwhal
#

https://stardewvalleywiki.com/Modding:Dialogue#Portrait_commands

i.e:
Abigail.json looks like:
"Introduction": "Oh, that's right... I heard someone new was moving onto that old farm.#$e#It's kind of a shame, really. I always enjoyed exploring those overgrown fields by myself.$9",
that $9 is her 9th index of her portraits, and if you look at the unpacked of the Portraits folder: she has 10 actual portraits
indexes always start at 0
so order of operations the portraits in order go:
0 1
2 3
4 5
6 7
8 9

pulsar charm
#

what if you want to add additional portraits? would it be 10 for the next one?

velvet narwhal
#

if you have additional portraits you just continue downwards for compatibility sake

pulsar charm
#

oohhh alright, thank you!

shut edge
#

anyone know how /where i use this "ReloadBuildingData" command from the migrate to 1.6 page?

#

like can i use that to force reload a CP pack?

#

i know patch reload but that doesn't seem to properly regenerate existing buildings

velvet narwhal
#

that'd be a c# command

shut edge
#

ah ok

#

lighting is still fighting me...

velvet narwhal
shut edge
#

you'd think at least one of these would make SOMETHING happen lol

velvet narwhal
#

you're trying to put lights on the outside of the building? or the inside

shut edge
#

inside

velvet narwhal
#

iirc it should just be the lightbulb on the paths layer

shut edge
#

i'll resort to the manual style if need be but i don't see why it's ignoring all these

#

yeah i got path lights as well

velvet narwhal
#

do you need lights during the day as well or something?

shut edge
#

i just set day and night to extreme values to see if either would trigger at the moment

velvet narwhal
shut edge
#

just dark

velvet narwhal
#

i wonder if it's because of the inherent cave thing

shut edge
#

might be something like that

velvet narwhal
#

i assume this is FarmCave

shut edge
#

it's a barn

velvet narwhal
#

that's all i have on my interior and the lights are just fine

shut edge
#

hmm my path lights did get nuked apparently, weird. i must have done that last night and forgot, ok

#

maybe it needs an outdoors false?

velvet narwhal
#

iirc it doesn't actually care about whatever is on the IsOutdoors bit, it just needs a value and it'll set it as an outdoors location

#

if it's not there then it's automatically an indoor location

shut edge
#

i like making maps but there's always something dumb like this that fights me i swear

#

perhaps it is time for yet another test save, this one is getting a lot of other mod errors nowadays

hard fern
#

SDVpufferflat you know it's bad when you have event dialogue written out, and the thing stopping you is that you do not want to actually turn it into a functional event

velvet narwhal
#

Just get so good at it that you can write an 18 part event without a single debug stopping point and only like a handful of bugs once you actually get to debugging, ez I promise /lh

hard fern
#

I havent even tested my mod outside of getting the schedule to work

calm nebula
#

Happy New Ywar!!

velvet narwhal
hallow prism
#

what is the setting to add so a sprite isn't entirely colored but uses mask instead?

#

by machines

#

i am using extra machine feature but i think vanilla is adding its own recoloring now

velvet narwhal
#

uhhhhhhh

#

The CopyColor field now works for any input item, even if it's not a ColoredObject (in which case it uses the color from its context tags).

#

though it says default false thonk

frigid hollow
#

does the object have ColorOverlayFromNextIndex set to true?

drowsy pewter
#

yes its that

#

irs false by default

sleek grove
#

Is it possible to make animated furnitures?

drowsy pewter
#

yes

#

spacecore can animate anything

sleek grove
eager sable
#

Hey! I want to dive deeper into making mods (I've just created some shirts and hats though fashion sense), and I wonder if I should learn the basics of C# (I just know the bare minimum of Phyton) or just start searching about mod making and learn while doing

hard fern
scarlet quarry
#

Since Lele stated shirts and hats, CP should do the job or use Fashion Sense ^^

#

These frameworks cover it

#

They don't require programming language learning, so it should be fine

hard fern
#

a lot of things can be done via CP nowadays too

scarlet quarry
#

Yeah yeah

#

Almost everything

uncut viper
#

it really depends on what mods you had in mind so yeah, id second the notion of not needing to learn C# unless you know you have to

#

i wouldnt say CP can do almost everything though, but it can do most of the common things people want

#

(unless ofc learning C# would be fun for you just to learn it, in which case i recommend it! it is fun)

blissful panther
#

There was an infographic from a while ago that showed the kind of things you can do with CP/other frameworks, and which needed C#... might be time for a new version of that!

hard fern
#

(yeah, always fun to learn a new thing)

blissful panther
uncut viper
#

ah SDVpuffersquee

blissful panther
#

I'm trying to find the thing itself, but I can't! SDVpufferwaaah

uncut viper
#

this wiki page is up to date too so it is plenty helpful

blissful panther
#

I might be completely off, but I... think @tender bloom made the infographic? I think?

drowsy pewter
#

i do think so

uncut viper
#

this'n?

blissful panther
#

That's the one!

uncut viper
#

dont know if this is the last revision of it

#

but i did indeed find it from elizabeths history

tender bloom
#

That was me

#

Half of this would be CP at this point lol

uncut viper
#

ofc she shows up after i went looking for it.. SDVpuffersquee

blissful panther
#

Yeah, it really would be!

drowsy pewter
#

Actually

tender bloom
#

I just woke up!

drowsy pewter
#

We already rewrote this page

#

Link people to that

uncut viper
#

that was linked too just now

blissful panther
#

I did link that one already! SDVkrobusgiggle

tender bloom
#

It would still be nice to lay out spacecore, calcifier, FRM etc visually

drowsy pewter
#

Oh sorry lol

tender bloom
#

FTM

#

Not FRM

uncut viper
#

wiki pages ARE nice
infographics are still fun and can provide their own value too though

steep herald
#

Guys i have two cokking skills does someone know one or the other mod that is doing this so i can take one out

uncut viper
#

i like those flowchart style infographics with a "start here" that eventually lead you to one framework (in this case) dependin on what you wanna do

uncut viper
steep herald
#

But i cant send images in there so thats why i was asking here and sry i knew it wasnt suppossed to be asked here

uncut viper
#

if you knew, then... dont do it

steep herald
#

Yeah but its what im saying i cant send images in there sry

uncut viper
#

theres an #images-and-memes channel that i think (emphasis on think) people can post in before they have the rank you can link to

steep herald
#

Ok

eager sable
#

Thank you so much, that really does makes sense that the mod frameworks help a lot and different mods need different levels of knowledge

uncut viper
#

but generally its not recommended to bypass rules or role permissions by using loopholes such as other channels

eager sable
uncut viper
#

i do not unfortunately!

#

but also, the point was that that infographic is outdated

#

dont pay attention to it

crystal coral
#

Is there a video I can find that explains how to get mods for stardew valley on the switch ?

uncut viper
#

!switchmodding short answer is not really

ocean sailBOT
#

Modding on the Nintendo Switch is technically possible in a very limited capacity, but it requires jailbreaking your Switch, which is only possible on select models or by physically altering the hardware of your Switch, and can run the risk of bricking your console and/or being banned by Nintendo. Only visual texture and dialogue replacer XNB mods can be installed. Due to these limitations, we do not provide guides on how to mod the Switch and it is up to the individual if they want to take these risks.

drowsy pewter
#

I have a bunch of trigger actions that have the same condition and are hooked up to run when a specific item is used, via spacecore. Unfortunately, all of the trigger actions run simultaneously when the item is used, rather than one happening the first time it's used, one happening the second time, and so on.

I can't set each trigger action with a precondition that the previous one on the list has been run, because I'm using a random MoveEntries to shuffle the order of the trigger actions on the list. Does anyone have ideas?

Here's the json if anyone feels like staring at this madness, but I dont think its helpful https://smapi.io/json/none/b5b24123a0024bd0bc28eb72afb49a49

blissful panther
#

Aside from the ol Linux-on-Switch method, but that's not even slightly close to my area.

#

Pillow on the other hand...

uncut viper
#

you'd think with how much ive been working with them i woulda realized Data/TriggerActions was a list already

#

how quickly do you want to let people use these items to cause a TriggerAction to fire? once a day/week/etc? or as many times per day as they have items?

drowsy pewter
#

As many as they have items

uncut viper
#

hmm

iron ridge
#

i hath been summoned

drowsy pewter
#

Yeah

#

I'll puzzle over the issue today

hallow prism
#

my suggestion would be to give up on the random but it's obviously not a satisfactory one

drowsy pewter
#

At first I had coded one where each consumable item was actually a different individual item, which solves this issue, but has problems in multiplayer since I have to control how many of each item is spawned depending on how many players there are

uncut viper
#

upcoming BETAS could do it but im similarly unsure of how to do it with just vanilla + spacecore but i will also puzzle it i think bc its a fun puzzle

#

actually hm

#

make every one of your trigger actions for it set a stat or set a mail flag or whatever

#

have each one dependent on NOT having that stat or mail flag

#

put a trigger action at the very end of the list that will always run that removes that stat/mail flag

#

(and also make that stat/flag removing trigger action "false" for markactionapplied)

vernal crest
#

Can you just have one trigger action with a random action? I thought I did that for Apollo but it might have been an action that just gives a random item...

uncut viper
#

vanilla doesnt have a random action or random item trigger action action!

vernal crest
#

I was about to say that whatever it was, it was probably something of yours button lol

uncut viper
#

BETAS does tho

#

that could also potentially lead to it choosing a recipe you already have anyway though

drowsy pewter
#

I thought of setting a flag but couldnt figure out what to do with the flag afterward

#

I think this would be perfect

#

Thank you Button!

uncut viper
#

tbf i wouldnt have ever thought of that if you hadnt made me realize TriggerActions is a list

drowsy pewter
#

:P

calm nebula
#

That's Amandine

#

Amazibg

hard fern
#

amazing....

uncut viper
#

its ok take your time atra

drowsy pewter
#

buttons extra list stuff

uncut viper
#

needs another L in there so i can call it BELLS

#

then i just need another mod i can call WHISTLES

calm nebula
#

Bells and Whistles is my favorite namespace

uncut viper
#

the namespace of animals and bridges

hallow prism
uncut viper
#

perfect

hallow prism
#

('this wasn't worth a ping, but well, here we are)

uncut viper
#

i think it was worth it

hallow prism
#

if i pinged you maybe 😄

uncut viper
#

i think people would start to hate me if i actually put my name in another mod title though

hallow prism
#

well

uncut viper
#

BETTER Extra List Logic Sorted

hallow prism
#

if you have a mod like "push buttons and trigger" maybe they would accept it

#

nooo, another better mod /j

uncut viper
#

Redux

slender badger
#

Some people around here have their name in a lot of their mods, right Lumi? SDVkrobusgiggle

hallow prism
#

better redux button

calm nebula
#

I'm naming all future mods after Button

hallow prism
#

(wild too, but it's less the case now 😄 )

calm nebula
#

Heavens knows I've added like 14 console commands under sinz's name

uncut viper
#

as long as you get the bug reports and not me

vernal crest
#

With how awful Nexus's search function is I'd actually like it if every mod author put their name in their mods actually so if I can only remember who made it I can actually find it.

#

Actually

uncut viper
#

id accept that but only if they put their dang acronyms in their titles first

#

(which is thankfully more common nowadays i feel)

vernal crest
#

Haha yes that too I always rejoice when typing BETAS gets me to your mod page

hallow prism
#

i don't feel people would really look for my mods with acronyms except maybe VMV which hasn't my name in it

hard fern
#

acronym every mod i make now, got it XD

calm nebula
uncut viper
#

VMV was actually the first acronym i can remember seeing in this server and thinking "i wish i knew what that was but nexus cant find it" months ago

calm nebula
#

I'm retired, remember?

uncut viper
#

thats why you've been doing more modding lately than half the people in this channel

hallow prism
#

i wish nexus would improve search but well

uncut viper
#

maybe their improved quick search UI coming soon will help. dunno if its JUST a UI change or will actually search things better too

tender bloom
#

Me: not retired, has released 0 mods or updates recently
Atra: retired, 1 recent mod and several updates

calm nebula
#

Wdym one recent mod?

tender bloom
#

Event tester? I feel like that one is recent

#

I should be better at keeping track

#

Given that I get all the motifs

#

But here’s a secret

#

I don’t check my nexus notifs

rigid oriole
#

I get few enough notifications that I wish I could actually get an email or something when I got a new one

drowsy pewter
#

6480's random fish pixel mod

calm nebula
#

See the way I think of it there hasn't been a proper Atra mod since may of last year

royal stump
# calm nebula Okay, I'm now suspicious this warning is just wrong

speaking of your work, though SDVkrobusgiggle
ilspy says Save Backup and GMCM do reference System.Console in the dll for some reason, which I guess is what SMAPI checks here? it might be because they import SMAPI.Internal and SpaceShared, which use WriteLine in a few methods each, idk

// direct console access
yield return new TypeFinder(typeof(System.Console).FullName!, InstructionHandleResult.DetectedConsoleAccess);```
<https://github.com/Pathoschild/SMAPI/blob/develop/src/SMAPI/Metadata/InstructionMetadata.cs#L320>
#

it definitely does have the problem of "picking one arbitrarily and not mentioning any others" too, I tested by referencing it in another mod last night

reef kiln
#

Can someone with a save that is near the end of the game test I mod I just made. All it does is change the recipe of monster musk to be configurable. I don't have a save at that point in the game though to test it.

oblique meadow
#

I can

reef kiln
oblique meadow
#

standby

uncut viper
#

you can also just look at the recipe with Lookup Anything

#

or give yourself the recipe

reef kiln
#

By default it is set to 30 and 30 which is vanilla. you just need to change it in the config to what you want

reef kiln
oblique meadow
#

you can also type debug craftingrecipe Monster Musk into SMAPI

reef kiln
#

great thanks

oblique meadow
#

went lower and higher to check both :p

uncut viper
#

upside to adding a bunch of new things in the next BETAS update: adding things is fun! i want to add even more
downside: oh god i have so much new documentation to write i dont wanna add anything else ever again

oblique meadow
#

meh. No documentation then! Make it a lawless land

uncut viper
#

the mod is literally useless without it and itd make adding the new things 100% pointless

#

since it is a framework

oblique meadow
#

Well I suppose when you put it like that........ :p

gentle rose
#

time to try to diagnose random lag s_sigh I play with my mod enabled all the time and have never had the issues this person is having

#

I'm scared I'll have to start making fixes blind without ever being able to see the lag myself 😭 bc my pc will NOT survive the amount of mods this person has in order to replicate their issue directly

reef kiln
oblique meadow
#

Anytime 🙂

uncut viper
gentle rose
uncut viper
#

navigating the tabs on the GameMenu does not count as changing the menu

#

so OnMenuChanged only happens once if you open it

#

and if you dont open directly to the map, then you wont be on the map tab index, so you set PendingEvents to null

#

but then if they switch to the map tab, you will be calling GetPendingEvents every frame

#

which loops over every location in the game and does some stuff, every frame

gentle rose
#

interesting, thank you

#

I'll have to figure that out, you saved me a LOT of searching

uncut viper
#

probably would be fine to just assign to your PendingEvents variable at the end of GetPendingEvents

#

or make PendingEvents a property with a getter that will call GetPendingEvents if its null

tiny zealot
uncut viper
#

that was the intent, i believe

#

it DOES cache it if you open directly to the map

gentle rose
#

map pauses the game so it really doesn't need updating while open

tiny zealot
#

ah, i see! that's only occurring because of the null. carry on

uncut viper
#

but i cant blame someone for expecting MenuChanged to fire when you change tabs since that does, yknow, switch to a different Menu class

gentle rose
#

I knew the map worked in a strange way to the rest of the menu tbf, I just expected it to work the same regardless of how you opened it

uncut viper
#

its just a menu class that was instantiated when you first open the GameMenu and then swapped to via ~ways~

tiny zealot
#

expecting stardew to make sense is often a fool's errand, it's true /lh /pos

calm nebula
#

That's life in general tbh

tiny zealot
#

my favorite change in 1.6.9 is getting consistent emote bubble position in vanilla. before then there were two different calculations, one for normal gameplay and one for events. they're still handled in two different spots in the code but they call the same function now

gentle rose
#

stardew is the most legit life simulator bc of that. nothing can be known for certain /lh

rancid temple
#

I've got a custom data asset that I'm editing with CP, but when I do a patch reload on my mod that edits the asset it doesn't appear to be actually making the changes

#

If I do a patch export on the asset, that causes it to be requested and applies the changes

uncut viper
#

is this custom asset in your own C# mod

rancid temple
#

Yeah

uncut viper
#

what changes are you trying to make appear, are you caching/using the data anywhere that you arent updating when an asset is invalidated

rancid temple
#

I'm changing a bool currently, for testing, I cache the data on AssetReady

#

Do I need to cache it on Invalidated?

calm nebula
#

Weird

brittle pasture
#

You generally dont want AssetReady for that

uncut viper
#

i wouldve thought a patch reload would both invalidate and then re-request it, which would then be caught in AssetReady

rancid temple
#

Yeah, I assumed it would be too, the main wiki suggests that's the case as far as I can tell

#

Under making an asset editable by others

gentle rose
# uncut viper or make PendingEvents a property with a getter that will call GetPendingEvents i...

am I right in thinking that changing OnRenderedActiveMenu to

        private void OnRenderedActiveMenu(object sender, RenderedActiveMenuEventArgs e)
        {
            if (!Context.IsWorldReady)
                return;

            if (!Config.Enabled)
                return;
            
            int mapTabIndex = Constants.TargetPlatform == GamePlatform.Android ? 4 : GameMenu.mapTab;
            if (Game1.activeClickableMenu is not GameMenu gameMenu || gameMenu.currentTab != mapTabIndex)
                return;

            PendingEvents ??= GetPendingEvents(); // <- change here, used to set a new variable to PendingEvents || GetPendingEvents() instead

            if (PendingEvents.Count == 0) return;
            
            foreach (GameLocation gameLocation in PendingEvents)
            {
                DrawMarker(gameLocation);
            }
        }

should also work? (though I will likely change it to a property like you said)

uncut viper
#

probably i think

light bramble
brittle pasture
#

does it, I vaguely recall putting logging in my asset data load and patch reload doesn't always call AssetReady immediately

uncut viper
#

the PendingEvents wont be nulled as long as you dont close the map so that should only run on frame 1

rancid temple
gentle rose
#

yeah, idk why I was doing it the other way in the first place

uncut viper
#

i guess it would depend on what exactly the custom asset was

#

or where it was used rather

brittle pasture
#

yeah I remember if an asset isn't used immediately it'd just sit there

rancid temple
#

Well, I didn't want to spam loading it hence the caching, so the asset itself is only ever loaded on Requested and Ready

uncut viper
#

im not sure what you mean by that

rancid temple
#

Like I'm not using the asset directly anywhere, just caching it so I can use that elsewhere

gentle rose
#

does OnMenuChanged get called when a menu is closed?

uncut viper
#

but you shouldnt be doing the loading in the AssetReady

#

or in the AssetRequested depending on your interpretation of the word loading

brittle pasture
uncut viper
#

the Elsewhere should ask for it and you should handle the creation of the asset in AssetRequested

brittle pasture
#

I was trying to find where ppl said AssetReady wasnt recommended

#

found that instead which is 100% better

rancid temple
#

This is from the main wiki, what I'd been basing it off of

gentle rose
# uncut viper yes

ty. So at least it always gets nulled when the game is unpaused when the main menu is closed

rancid temple
#

In Requested I load from my mod files, in Ready I load to my cache from the pipeline

brittle pasture
uncut viper
#

selphs understanding is also my understanding

#

AssetReady happens after every mod has edited it via AssetRequested

brittle pasture
#

though changing that to AssetInvalidated is probably a quick enough fix

uncut viper
#

like i guess that Load call might grab a cached version maybe?

brittle pasture
#

someone logged into the wiki pls fix it, my mobile password vault isnt working for some reason

royal stump
#

I think normal changes to the asset via CP conditions will invalidate and reload an asset, having tested it recently, but I'm not sure it works for stuff like patch reload (or C# changes that don't do the same thing)

gentle rose
#

if you tell me exactly what to update the wiki to, I can fix it if nobody else can

royal stump
#

I kept meaning to rewrite EMP's AssetHelper to use that format, but it seems kind of odd in some way, admittedly

uncut viper
#

even with that grabbing a cached version in AssetReady i would also find it strange to do it like that instead of just, directly assigning this.Data to that asset name. theres no reason to do it in AssetReady

#

if the asset isnt ready then it goes through all the AssetRequested stuff when you do that anyway. if it is ready then it just. loads it

#

so like i dont think the example is wrong its just.... why

#

(wrong in the sense that it wont literally function i mean)

rancid temple
#

Yeah it seems to function okay for what it's offering, just apparently not with patch reload

uncut viper
#

it would work with patch reload if something immediately requested the asset again

#

but if it's a custom asset, odds are that's only gonna be you

#

(which is why AssetInvalidated is better)

glossy cargo
#

@ivory plume I tried restarting my PC, updating visual studio, running VS as admin, reinstalling stardew entirely, this problem keeps coming up.
I can't think of anything other than the automated ModBuildConfig package doing something funky when using external nuget packages that need copying to the mod directory. It works fine for the mod dll itself, just not that secondary packaged dll.

Any ideas?

teal bridge
#

There's no point in complaining to Pathos about what is clearly a bug in the Microsoft toolchain. We all have this happen to us, hot reloading makes it worse.

ivory plume
#

The mod build package shouldn't have any effect on file locks in theory, it uses pretty standard MSBuild stuff.

light bramble
glossy cargo
#

Last I asked, people told me they do not have this problem, or at least, only once in a while. Mine happens over half the time, which is massive.
None of the assistance I found online for non-stardew related instances of this issue made a difference.
It also started very recently (SV 1.6.9 I believe), it wasn't always like this

teal bridge
#

We definitely all have the problem. IME it got worse with the latest updates to VS.

glossy cargo
#

You need to restart VS on every second launch of your mod?

teal bridge
#

Sometimes, if I'm doing a lot of hot reloading. Other times it might last for 10-20 restarts but eventually it will flare up.

glossy cargo
#

Which is what makes me suspect that something might have changed on the stardew side of things. I also imagine that very few mods actually use external nuget packaged dlls like I do (I could be wrong on this?)

rancid temple
#

I have it happen when my computer has been on for too long but I also don't use external nuget packages (at least not ones I need to copy)

ivory plume
#

I've been noticing the same issue with TMXTile when building SMAPI itself (which doesn't use the mod build package); there does seem to have been a recent change in Visual Studio or Windows.

teal bridge
uncut viper
#

one of my mods uses an external package and I believe i recall it happening once

tight rivet
#

(welcomeback from vacation, Pathos?)

teal bridge
#

You've already confirmed (as we have) that it is Visual Studio itself that is locking the file; therefore, not a Stardew issue.

glossy cargo
#

Alright, then alternatively, does anyone know a way to set a referenced nuget package to "copy only if newer" instead of "copy always"? I can do it with other assets, but can't find such a setting on nuget package dlls.
Since it's always the same dll that does it, and that dll changes very rarely, that would entirely fix my issue

ivory plume
#

(I'm on vacation until January 14th or so, but I'm still online sometimes!)

teal bridge
#

How is NuGet involved here?

light bramble
#

Pathos is always watching

uncut viper
#

you mean to tell me NYE isn't the perfect day to travel home on vacation

glossy cargo
teal bridge
#

You are deploying third-party DLLs with your mod?

glossy cargo
#

My mod dll isn't the one being locked. It's a referenced nuget

glossy cargo
light bramble
#

Honestly, Pathos is like an overlord...always watching over the baby modders and adult modders.

glossy cargo
#

but it's referenced as a third party, yes

light bramble
#

Idk if I fall under baby or adult modder

glossy cargo
#

but it's not a stardew mod dll, it's a generic C# dll

tight rivet
#

(Well, I hope you enjoy y our vacation!)

light bramble
#

I've only made one code based mod and it sucked...kinda. It just gave me a cookie each time I hit a button

unreal fjord
#

New to the server, but not to moding or Stardew. Looking into making mods for this wonderful game 🙂 I heard that this is a place for documentation, information, and lovely people.

fading walrus
#

Hello, welcome in!

#

We have some resources to get you started if you need

light bramble
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.

fading walrus
#

AND

#

We have a modding wiki that's run by a bunch of lovely people from this community

#

Which is linked in the command

#

(it's the embedded link in the words "tutorial wiki")

unreal fjord
light bramble
fading walrus
#

Yee SMCPufferSquee

rancid temple
#

There should be a link to CP's docs if you decide to go that route as well on the wiki

light bramble
#

or the other one? XD

#

Cuz I know of two wikis XD

fading walrus
fading walrus
light bramble
#

:3

tight rivet
#

The CP documentation on the github is very complete

#

but you can also download a CP mod and see how they did it

#

which is what i've been doing a lot of

calm nebula
fading walrus
#

I need to read the documentation for adding items again, it's all new to me since I haven't made any mods since the JA days

#

Happy New Year and Happy Solstice e, Atra!

ivory plume
rancid temple
#

Can you still wrap masked links in <>?

uncut viper
#

yes

light bramble
#

I highly recommend bookmarking the github CP guide. The amt of times I will referr to it on an almost daily basis...

uncut viper
rancid temple
#

Cool, I dunno if I'll ever get in the habit of using them, but good to know

calm nebula
#

I'm disappointed that wasn't a Rick roll

light bramble
#

Y'all never ever wanna see my bookmarks for modding...

uncut viper
#

the <> just has to be within the parenthesis

light bramble
#

So so so many pages...

rancid temple
#

I'm a heathen, I have the index bookmarked and just trawl through to where I need every time

light bramble
#

also this is just ONE of like 3 chrome windows I have open...

uncut viper
#

only a matter of time til discord finds a way to disable that too for even better avenues for hiding scam links

fading walrus
fading walrus
#

I'm hyped

light bramble
fading walrus
#

Yeah! I also have a lovely set of friends that are willing to help me if I get truly stuck

light bramble
#

if you want I can send you a few?

#

like a few mods I am referencing for ideas

fading walrus
#

I'm okay for now, but I'll take a rain check in case I do get stuck!

#

I like mucking about on my own before looking at other stuff, if that makes sense

light bramble
fading walrus
#

Thank you for the offer, though!

gentle rose
#

hmm, testing the unfixed version of my mod with opening the map both ways still doesn't really show a reason for the person to have "massive" lag, though looking at their profiler log they only had a cumulative ~300ms time reported by my mod per map opening... I wonder if the number of mods they have is also having an impact

uncut viper
#

if they have a lot of modded locations, it would

unreal fjord
#

So, I previously created scripts for a private UO Server: we always used to use a test environment for testing mods/scripts. Does anyone recommend that with Stardew? I ask because I wonder what a test environment of Stardew would entail and if it would be at all worth it. How does the community recommend testing mods?

uncut viper
#

or a lot of modded events

light bramble
#

btw Quill...not related to modding at all but am I annoying to the staff?

tight rivet
#

Me: I should figure out how to alter this..

#
 int astroTwN;
 int dayOfYear = SDate.Now().DaysSinceStart % 112;
 double lat = MathHelper.ToRadians(NightConfig.Latitude);
 //23.45 deg * sin(2pi / 112 * (dayOfYear - 1))
 double solarDeclination = .40927971 * Math.Sin((2 * Math.PI / 112) * (dayOfYear - 1));
 double noon = 720 - 10 * Math.Sin(4 * (Math.PI / 112) * (dayOfYear - 1)) + 8 * Math.Sin(2 * (Math.PI / 112) * dayOfYear);
 double astroHA = Math.Acos((Math.Sin(angle) - Math.Sin(lat) * Math.Sin(solarDeclination)) / (Math.Cos(lat) * Math.Cos(solarDeclination)));
 double minHA = (astroHA / (2 * Math.PI)) * 1440;
tight rivet
#

Me: .. Past me, LEAVE MORE NOTES.

hallow urchin
#

Hi... it's me again :) I'm experimenting with drawing custom menus and having a bit of trouble with Game1.drawDialogueBox. It's like it's being drawn backwards for some reason? Any idea what might be the cause?
Left and right are drawDialogueBox, middle one is just DrawBox. Same arguments. So weird!

gentle rose
#

yeah, I think they have like a massive amount of expansions. ngl can't really fix that being slow

uncut viper
#

well, you can fix iterating over them every single frame

gentle rose
#

oh yeah, that I'm fixing

calm nebula
#

You can also shard but it's probably unnecessary

#

(Divide the work across multiple frames)

gentle rose
#

I just can't replicate the extent of their lagging with or without the fix

calm nebula
#

Hi esca!

tight rivet
#

So anyway, I wanted to ask people's opinions. Right now I'm calculating sunrise and suntime based off that equation

hallow urchin
royal stump
tight rivet
#

whI'm thinking about is just making a set time-scale instead of well, dynamicing it up to this extent

royal stump
#

Beyond that, though, the game is pretty quick to load and pretty consistent about how it works with a given mod set

tight rivet
#

it'd probably b e quciker

unreal fjord
uncut viper
#

if the sunset/sunrise is only calculated once per day anyway i dont think the speed difference will really matter at all

rancid temple
#

Just as long as you're not testing "how many expansions can I load at one time"

tight rivet
#

oh this isn't for speed, although

#

it's called every single tick

#

one thing I am doing with DNT is caching it

uncut viper
#

i assumed when you said quicker you were concerned about cpu time
i dont see anything in that code snippet that relies on per-tick information though

calm nebula
tight rivet
#

I mean quicker in going

#

"Times osccilate between 1600 and 1800"

calm nebula
#

Oh, the mod also goes Threading.sleep (6000)

tight rivet
#

Becaues I'm also getting this a lot a lot "Yes exactly I had the same observation. Full orange sunset at 3:30pm in the middle of the FALL is just too early."

#

and I want to say at default lat that's.. actualyl what I'd expewct

#

so rather than using a latitude system, I could just simplify it

rancid temple
royal stump
#

pathing logic aside, has anyone put a teleporter maze in a mod? SDVpufferthink

calm nebula
#

It's just the Pokémon gym puzzle

brittle pasture
calm nebula
#

(Please do note I have not played a Pokémon game so I know they have puzzles and that is about it.(

royal stump
calm nebula
#

So I don't know which Pokémon game has a puzzl3

royal stump
#

I've, uh, played the first one, blue edition

#

it was pretty much walking around and pokemon-ing

lament berry
#

a lot of the gyms in blue have puzzles

tight rivet
#

all games have a puzzle lol

#

like some have multiplke just to annoy you

#

but every pokemon game ever has a puzle

royal stump
#

I may have forgotten the puzzles aside from "get lost in the woods for a bit", tbf SDVkrobusgiggle

lament berry
#

like the ice gym has tiles that basically slide you until you hit something to stop you then you pick a new direction and that's how you get your way to the gym leader

royal stump
#

oh, right, I've seen that replicated in some romhack streams SDVpufferdizzy

#

not a popular mechanic

lament berry
#

or you need to unlock the right combo of switches to pass through things (similar to some stuff in the volcano of ginger island)

gentle rose
#

honestly warp mazes seem like the appropriate reaction to people using data layers to cheat through mazes /lh

rancid temple
#

Didn't blueberry come up with a way to punish people for no clipping lol

royal stump
gentle rose
#

just fill the inaccessible areas with monsters that take 100% HP per contact /lh

tight rivet
#

I vaguely think punishing people for cheating is kinda silly

#

but also: warp mazes are fun puzzles, so

uncut viper
#

well in blueberrys case the entire mod was "solve these mazes"

rancid temple
#

I mean, the entire point of the mod was the maze, so cheating at it is entirely pointless lmao

#

Like if you didn't want to do a maze, don't download the mod