#making-mods-general
1 messages · Page 152 of 1
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
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
a lot of custom farms, particularly older ones, use FTM for forage instead of location data (bc that's a 1.6 thing)
What is the acronym FTM?
!ftm
Farm Type Manager (https://www.nexusmods.com/stardewvalley/mods/3231) is a mod that allows content packs to spawn in ores, forage, enemies, and more.
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
You indeed cannot use tilesheets outside of Maps/ for maps
Button released a mod recently that relaxes that requirement though: https://www.nexusmods.com/stardewvalley/mods/30001
the paths in your mod folder can be anything, they just have to be in Maps in the load target
oh neat, I didn't see that
👀 oh that would be good for compatibility with recolors...
ah yeah I was thinking of the final asset name
specifically for the furniture tilesheet cause I yoinked that when doing my maps
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
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 :)
(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
)
Wdym you got all the bugs 
i got all the ones that would be visible in a contest period of time
Do you mean the stardrop?
I used the 'spring objects' tiles tilesheet in maps :)
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
I know AVX2/AVX512 have a ton of problems but why would you want to avoid AVX?
More portability using generic vector types than intrinsics directly.

inb4 people panic over that and remove it
aerobics file and token is only needed for characters that exercise in Pierre;s store correct?
presumably yes
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?
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
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
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
Okay I need to make this bite size:
What/where are the machine recipes?
Where is the "Unpacked Objects.json" that I'm supposed to use?
I JSONAssets form buffs and such go under "Edibility", I'm assuming it's the same or am I wrong?
Do you have the game unpacked?
I have the Data folder unpacked by SDXMB
Ok cool
But just that so I can see the data
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
Uhm....I don't see objects but let me check
ObjectInformation?
OH inside Data okay I see objects.json
Yeah so you can see how there’s buffs right?
Yes!
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
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
Okay, so I can kinda copy/paste this into my content.json for the wine and jelly and tweak where necessary?
Wine is a flavored object so it's different? What does this mean?
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?
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
You’ll notice there’s Apple Wine, Orange Wine, etc for all the fruits. This is the same thing underneath, just colored differently
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
Huh, so SMAPI has an internal list, and it is in that list the Nexus ID is stored?
The trick is to just patch SMAPI.
These mods are extremely based. You need to keep them installed.
all of Shockah's mods
So I should add the machine info and the extra elements from objects.json coffe under whats already there for my custom wine and jelly?
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
What... What if I changed my uniqueid instead in defiance? /j
i know you're joking, but you should NEVER change your unique ID
Can someone explain this a little further? and maybe what a "new patch " is? I'll try to put this together for what I have so far
Having issues visualizing what this is supposed to look like 
Did you check out the Witch Hazel mod code?
Why would I want to do that
When I could make another hat
Yes I have it open here
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
This is what I'm looking at so far, am I moving in the right direction?
I'm actually unsure if seeds can be edible, though I think they certainly shouldn't be
Oof, well I'm going to change the values to be proper, it's more the structure I'm unsure of
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 
Oh I just noticed this is a wine, okay
I saw the Type first and then the Edibility and Buffs
!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
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.
If you have a mod like CJB Item Spawner, you can check in there to see if your items are in the game
I normally am I just didn't want to save if something is terribly wrong just yet
Save the json?
Ah, you're right, I will create my assets file and do a machine rules to get my custom wine out when I put my Indifruit in
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
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
Ah, could save some back ups
I use VSC so mine just autosaves whenever I make changes lol
You're right I was just being a lil lazy
Also CP is generally simple enough that I'm not miffed about restarting a section
I'm just not secure in it yet so I worry a bit much
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
Ok, im now loading all tilesheets like this:
"Action": "Load", "Target": "Maps/z_Mill", "FromFile": "assets/Tilesheets/{{TargetWithoutPath}}.png".
But of course now when I'm editing maps it cant find them, as they of course arent patched-into the maps folder. Of course I could always copy them, but isnt there some elegant way to do this?
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
ok, thanks
unless you want to manually edit the .tmx files in notepad++ or something after
Copying is the best way. Usually I do it by hand but on one project I wrote a script to copy and rename for me
Unfortunately maps are Just Jank
will probably also write a script for this in the future
yea
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?
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
}
},```
Farmhouse Redone, but it looks like it hasn't been updated in a while, so I think it's dead
hmm maybe this one could work?
https://www.nexusmods.com/stardewvalley/mods/10029
oh wait the source rect is probably indexing 
im pretty sure the MapSourceRect is if your spouse room is on a tmx that contains more than just the room
i think it might be embedded into the farmhouse map properties for spouse room positionings
It's hardcoded in c#
i dont believe there is any vanilla way to change the spouse room location
(valid in farmhouse) The top-left position at which to place the spouse room.```

When did that get added?
Probably a 1.6.9 thing
then i stand corrected, though it is then up to the map and not the npc
is it that simple, adding this command to the config will do?
no that's a map property
aaah i see : D
same ways as you did your warp
thank you all for the input
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?
i'm back on the random bs again 
"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?  so say i want to ensure that between the 4 triggers that i have, one will always win out and be active?
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.
yup, delete that part and never noticed. Fixed it thanks
I didn't care for AI's attempt at writing dialogue for my characters, but it's been quite useful for things like this:
I'm really just going by the wiki, but yeah, if you have SYNCED_CHOICE [...] 1 4 1 like that in one condition, SYNCED_CHOICE [...] 1 4 2 in another, etc, only one of them should be active at any given time
Nomori has a converter which is much better at making i18n strings than AI: https://nom0ri.github.io/sdv-i18nifier-app/
i've actually opted for "the dumbest possible solution" and tacked on some mailflags to the "neutral" and "seasonal" marriage conditions to force the good/bad dialogues to take priority
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 
https://smapi.io/json/content-patcher/eaa37d4dd5824ced9ac9574355afbe93
I haven't really done items or crops yet so I won't be much help but I wish you luck on it 
i vaguely... recall... a moveentries for machine processing 
Your ID specified in your fruit entry and the ID of the fruit you wrote in the crop data are different. This means when you harvest the crop, it wont give you the right item
(ignore the moveentries for now, they arent at that step yet)
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
I haven't learned how to name my assets folder yet so I have to do that before I test, I want it to be regrowable and I haven't figured that either
er, put the assets in asset folder properly
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
Gotcha, fixing now
Yeah I would recommend getting the crop to work first before adding more elements
If you mean the one inside your mod folder, you can organize it however you want, as long as you're pointing the right relative link to the right vanilla spot.
Relative link, vanilla spot? What does this mean?
this is your item ID
Yes and you'll notice the harvest item field in the crop data does NOT match your item id
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 
Yes
Like this?
Line 15 needs to match Line 117
It doesnt match the thing I highlighted. It has to be exact
It’s that underline and space coming back to bite
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 ❤️
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)
And that’s not even getting into sneakiness like trailing spaces
the text you have coloured red (like "Name" and "HarvestItemId" and so on) are what people mean when they say "field" usually
That's good at a glance. You should test it ingame now
Okay I understand
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
Okay I will load it in and see what happens, I have CJB etc
my folder looks like this right now
Should be okay for now right?
uncapitalize assets
Okay
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?

Vanilla pickles? That is not a flavor combination that sounds appealing
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
On it!
do you actually have a folder called "sprites" inside your assets folder, and a .png called "Objects.png" inside that sprites folder?
No I don't - I said earlier all I had in the assets folder, but I'm searching the internet and my other mods for how to properly set up my assets folder
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
What folders to put, how to name things, how the code in content.json goes, etc.
there isnt actually a "proper" way to set it up, its entirely up to you how you want to organize it
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
Okay so according to this I should make a folder inside "assets" called "sprites". Then in my content.json file change "Objects.png" to "Seeds.png" for example so I can put my Seeds.png in the "sprites" folder.
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}}"
You can do something like that. I think you're on the right track
{{Aerobics}} is probably a dynamic token or config setting, so you'll have to figure out what it resolves to by checking content.json of the guide mod
if you just make the "sprites" folder and then put two .pngs in there, one named "Objects.png" and one named "Crops.png", it will work. you're not loading anything called Seeds
okay. I thought it worked by having the token name in the file name and then token effects just flow by in the background
Compare the code that's written at the top of this file to the actual image names in this mod https://github.com/6480k/6480-Stardew-Mods/blob/main/[CP] Mouse-Ear Cress/content.json
that said, are these the only .pngs you have? theres no textures for the jelly or wine here
Then how do I get the seed packet PNG to load for the seeds of the fruit?
you can add another target, or you can put the texture for the object and the seed packet in the same .png
I have those textures, they are just still named the same as other pngs so they aren't in yet
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
I would like to keep them all individual pngs to keep them separated
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)
Can I do something like this instead?:
"Mods/{{ModId}}/seeds, Mods/{{ModId}}/object, Mods/{{ModId}}/wine, Mods/{{ModId}}/jelly"
sure can
absolutely
Okay, then the FromFile is supposed to look like...
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)
assets/sprites/seeds???
(button thank you for fixing that error)
maybe?
(i always fix actually important errors if i catch em!!)
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
I would like to do all in one Load patch - if a load patch is what I'm thinking, I'm just trying to figure out how to write in th content.json
{
"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
Thank you
I'm going to correct the content.json now one sec while I put the textures and rename things
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
(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
for dependencies, it's just authorname.modname w no spaces?
its whatever the other mods unique ID is
Ah, sorry, I'm a prntscrn spammer, I'll get better about it 
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 
Okay, here is the content.json right now: https://smapi.io/json/content-patcher/9e41ffa9dfaf43cd8e21600dfd4342e2
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
Ahh you can? I'm finding the I guess default colour/size difficult on my eyeballs so I will find that and make it easier to read for me
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)
Ah, i'm on OperaGX, I hope I can adjust it too
yesss the writing is like cats drawing stars 
Can't see xD
Looking for the "SpriteIndex", I have it at 1?
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)
I found it - it is fixed to 0!
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)
Okay, I will double check and save then boot my game to see what's going on! I hope it's visible now 
Is selph around?
selph has been around however selph is also on vacation i believe
Ah, was gonna ask a question related to their mod Extra Machine Config.

Noice!
They're HERE! Textures work!!
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
For some reason my fruit is a vegetable but hey xD
uhh i think that has to do with a context tag
I has a query about query
would it be better to do
'{{Weather:Rain}}'='true'
or
'{{Weather}}'='Rain'
??
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
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 
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

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)
{{Weather |contains=Rain}} resolves itself into true or false, so if you can avoid a query entirely, it's preferable to do that 
but {{Weather}} itself probably isn't notably faster or slower than the contains version
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??
(are those real questions)
(not bc theyre dumb or anything but bc my immediate urge was to answer—)
Uh, yeah, but I'm trying not to overwhelm the chat with my noobishness and things I'm still working on googling lol
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
{{tokens}} like that are generally explained here if you're using CP, yeah
(also the "Action": "Thing" keywords, etc)
https://github.com/Pathoschild/StardewMods/tree/develop/ContentPatcher#for-mod-authors
It's caz I am doing a rain or saturday
'{{Weather:Rain}}'='true' OR '{{DayOfWeek:Saturday}}'='true'
sorta thing
I18n stands for internationaliza
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
[[Modding:Dialogue]]
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
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
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
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?
(Though if you are making and event editor, I'd recommend at least taking i18n and default.json into consideration for ease of translation.)
correct. there is nothing stopping you from having a content.json that is thousands of lines long
This is just a me personal mod atm, I doubt I'd ever publish
Aah, alright.
(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
Yup, what Button said 🙂
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
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
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
It sure seems like it would hold up to mod changes better
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
C# is scary
Or this I guess
I took one look at it and ran screaming lololol
spacecore does have one yeah, i usually assume people wanna d o things with just CP though
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.
Make 👏 events 👏 *is booed off stage *
not always a correct assumption its just the one i work off of
Rsv already requires spacecore
You likely won't need spacecore for that
my mod Yet Another Quality Goods Mod does htis
feel free to steal code
they were talking to someone else
come to think of it, is there really not a mod that does exactly this already?
It adds large cheese?
yes
it does the whole overhaul thing
just also comes with an overhaul of everything else
So you wouldn't be mad if I just kinda yoinked the code (but still made it my own) for my revamp?
I haven't checked Nexus in ages
It mayyyy exist?
just seemed like somethin thatd be real easy to do so i figured someone mustve done it by now
Please go ahead. You can take the art too
although i guess you dont need it
I'll take a look at it and see which art I like better lol XD
Does anyone have any guides or references for adding machine rules to a mod?
Hey just a quick question, what does all this mean?
"(BC)16",
"OutputRules",
"Default_LargeMilk",
"OutputItem",
"(O)424"```
Thank you!
editing the vanilla largemilk rule to change it instead of adding a newo ne
Why EMC?
has extra rules that can be added?
i wouldnt recommend EMC to someone who doesnt know how vanilla machines work in the first place
I mean it's fine, but--yeah thats all
which is why I also linked the wiki for modding machines
i understand that, but a new person doesnt know what's mandatory or optional
oh
Extra machine configs is for adding additional things that aren't in vanilla machine rules, right?
yes
too much?
perfectly fine, just want to make sure Rei gets targeted help for what they wanna do with their mod
nothin you should feel moronic about, just somethin to keep in mind for newcomers
anyways I'm off to sleep. See ya!
Tbh I think we should make Rei a thread
good suggestion
Rei's thread
Dew iiiiit
i would worry that Rei would get a lot less visibility and help in one
I mean that kinda happened to me....
since theres like 4 people here right now to even know it exists and none that can help all too much with this step
Just link the thread, I think
I had a thread...I closed it
And pop into the thread to answer
felt like not many people were helping in my thread and it seemed to take longer to get help...
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)
😭
STAY THAT WAS GOLD
since when did smapi log about direct console window access
(ive never seen this before ?)
Remind me in 15 days to look
alllllllllrighty then, atravita (#6448294) (15d | <t:1736913181>)
ive also literally never seen it
(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
I guess I did have that issue...I just don't wanna be annoying with "Hey guys come to my #thread and help me"
I meant two weeks and three days
2 weeks and 3 days is also 15 days 🤔
no different from just asking in this channel directly really! people can always leave a thread after theyve joined it to help
17 days
shrimply are you tired right now per chance
confirmed: i can't math
15 days is two weeks and 1 day...
otay.
😭
N3rd's Modding corner
Is it just assumed now that atra is either tired or dumb :krobusgiggle:
to be fair, are you ever not tired? im not
I caught up with sleep on Christmas!!
ah, well, one day out of the year oughta do you good for the upcoming 2025 i guess
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?
[[Modding:clothing]]
Hmm must be called something else
I know we have a page for it
[[Modding:shirts]]
aha
Ah, separate pages
Also [[Modding:hats]]
Honestly just look at [[Modding:items]]
With a location name like AngelOfStars.Mrqifriendable_QiRoom would that be incompatible with location based dialogue due to the _?
shouldn't make a difference
very good >:]
harmony on its way to tell me this doesn't match :///
oh those images don't crop well
haven't used codematcher myself, but I think it might want 9 to be an sbyte?
this sounds vaguely familiar
or actually just a byte, unsigned int8 is what that instruction uses
https://learn.microsoft.com/en-us/dotnet/api/system.reflection.emit.opcodes.ldloc_s
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
Ldloc_S probably need (short)9
also you really don't want to match by local index
it might be a pretty specific issue with the matcher 
but yeah, probably possible to just not hook onto that instruction operand 
the reason my stuff broke in 1.6.9 fr
aight thanks yall i'll pick some other instructions
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)
i've got a match :) we are back in business
so I have a question, I posed it in my thread #1323499944321224715 could I get some help with it?
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.
what exactly are you looking for with regards to the machine data?
If you're having trouble formatting it, I'd suggest looking at unpacked vanilla data first
^
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.
You looked at the wiki page for machine data, right?
I am looking directly at that, I don't know how to set up my vscode page to start making changes
Yes, I still don't know how to start typing on this blank page, I don't know what goes anywhere - I can't find an example that makes sense for this anywhere and I feel like I'm not getting something. I don't have a start
Well did you start with the general content patched stuff first?
Start what??
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"
[[Modding:Editing XNB files]] teaches you how to unpack the stardew valley content
(?)
Already unpacked and looking directly at it I said above
Sorry im on mobile rn, i take a bit longer than usual
Content.json is done, manifest.json is done, assets folder done.
So you said you already have your objects and whatnot right?
You can copy down part of what you already have, and instead of the Target being Data/Objects, have it be Data/Machines
Part of what I already have where?
You need kegs and preserves jars to work correct?
Yes
"Action": "EditData",
"Target": "Data/Objects",
, but change the target to Data/Machines. Let me switch to my laptop...i can do that better there
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.
Ok, so you need to do an EditData on the target of Data/Machines like Shrimply showed.
Also, sorry to interrupt :?
I would add another action at the bottom of my content.json
I'm gonna move Rei into #1323497562132582410 so we can organize it all!
Someone made it for you so you have your own space
Thank you, sorry for taking so much space >.<
No no not taking space at all! it's just so things are organized for your ease of use!
Do you mean you want to make a mod with NPC portraits larger than 64 x 64?
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
You would need an additional framework like "ScaleUp 2" to do that.
Its download section has an example to do it.
does anyone know where the darker tiles are located in the tile sheets? (for context, this is a modded farmhouse)
Thanks!
the color of them is modded, but im wondering where they would be in the vanilla tilesheets
(Also it says that it's for 1.6 alpha, but it still works.)
can you not type in #1323497562132582410?
Moved over, thank you~
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?
!startmodding
Making mods can be broadly divided into two categories:
- Content packs are formatted text files, and don't need any programming knowledge. They can add/edit NPCs, maps, new items, shops, and more. To get started, see the list of framework mods, the wiki tutorial for Content Patcher, and there might be relevant guides on the tutorial wiki.
- C# mods use programming code to change fundamental game mechanics. See getting started with C# modding.
Usually it’s easier to start with making content packs, since you don't need to learn programming.
if you're scripting heart events:
https://stardewvalleywiki.com/Modding:Event_data
trigger actions if you're not scripting an event but depending on whatever conditions you require
https://stardewvalleywiki.com/Modding:Trigger_actions
Does anyone know where the dialogue for the desert festival is?
strings/1_6? yep
because strings 😔
so if i wanted to add desert festival dialogue it would be a string and not editing the dialogue ... 😔


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?
thank you
much like how you can't shove marriage strings into character/dialogue and vice versa
thank you!
thank you for your help :3
hii : ) is there a debug command or any other way to unlock pennys big house?
How do you make the game display a specific portrait during dialogues?
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
what if you want to add additional portraits? would it be 10 for the next one?
if you have additional portraits you just continue downwards for compatibility sake
oohhh alright, thank you!
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
that'd be a c# command

you're trying to put lights on the outside of the building? or the inside
inside
iirc it should just be the lightbulb on the paths layer
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
do you need lights during the day as well or something?
i just set day and night to extreme values to see if either would trigger at the moment

i wonder if it's because of the inherent cave thing
might be something like that
i assume this is FarmCave
it's a barn
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?
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
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
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

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
I havent even tested my mod outside of getting the schedule to work
Happy New Ywar!!

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
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 
does the object have ColorOverlayFromNextIndex set to true?
Is it possible to make animated furnitures?
ooh will check that out thank you
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
i would say you only need to learn C# if you want to get into making mods that fall outside the scope of pre-existing frameworks
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
a lot of things can be done via CP nowadays too
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)
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!
(yeah, always fun to learn a new thing)
I can't find it, but this might be useful: https://stardewvalleywiki.com/Modding:Content_pack_frameworks
is there a command for it? ive never seen it but im curious what it looked like
ah 
I'm trying to find the thing itself, but I can't! 
Sounds very nice
this wiki page is up to date too so it is plenty helpful
I might be completely off, but I... think @tender bloom made the infographic? I think?
i do think so
this'n?
That's the one!
dont know if this is the last revision of it
but i did indeed find it from elizabeths history
ofc she shows up after i went looking for it.. 
Yeah, it really would be!
Actually
I just woke up!
that was linked too just now
I did link that one already! 
It would still be nice to lay out spacecore, calcifier, FRM etc visually
Oh sorry lol
wiki pages ARE nice
infographics are still fun and can provide their own value too though
Guys i have two cokking skills does someone know one or the other mod that is doing this so i can take one out
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
this isnt the place to ask, you want #modded-stardew , but one of them is probably just called Cooking Skill
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
if you knew, then... dont do it
Yeah but its what im saying i cant send images in there sry
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
Ok
Thank you so much, that really does makes sense that the mod frameworks help a lot and different mods need different levels of knowledge
but generally its not recommended to bypass rules or role permissions by using loopholes such as other channels
Do you have any of this infographics(really liked the last one)?I'm a very curious person and don't have any objective in mind besides learning
i do not unfortunately!
but also, the point was that that infographic is outdated
dont pay attention to it
Is there a video I can find that explains how to get mods for stardew valley on the switch ?
!switchmodding short answer is not really
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.
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
Aside from the ol Linux-on-Switch method, but that's not even slightly close to my area.
Pillow on the other hand...
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?
As many as they have items
hmm
i hath been summoned
my suggestion would be to give up on the random but it's obviously not a satisfactory one
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
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)
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...
vanilla doesnt have a random action or random item trigger action action!
I was about to say that whatever it was, it was probably something of yours button lol
BETAS does tho
that could also potentially lead to it choosing a recipe you already have anyway though
Ah this is smart
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!
tbf i wouldnt have ever thought of that if you hadnt made me realize TriggerActions is a list
:P
amazing....
its ok take your time atra
buttons extra list stuff
needs another L in there so i can call it BELLS
then i just need another mod i can call WHISTLES
Bells and Whistles is my favorite namespace
the namespace of animals and bridges
button extra list logic sorted
perfect
('this wasn't worth a ping, but well, here we are)
i think it was worth it
if i pinged you maybe 😄
i think people would start to hate me if i actually put my name in another mod title though
well
BETTER Extra List Logic Sorted
if you have a mod like "push buttons and trigger" maybe they would accept it
nooo, another better mod /j
Redux
Some people around here have their name in a lot of their mods, right Lumi? 
better redux button
I'm naming all future mods after Button
😄
(wild too, but it's less the case now 😄 )
Heavens knows I've added like 14 console commands under sinz's name
as long as you get the bug reports and not me
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
id accept that but only if they put their dang acronyms in their titles first
(which is thankfully more common nowadays i feel)
Haha yes that too I always rejoice when typing BETAS gets me to your mod page
i don't feel people would really look for my mods with acronyms except maybe VMV which hasn't my name in it
acronym every mod i make now, got it XD
You don't have to worry
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
I'm retired, remember?
thats why you've been doing more modding lately than half the people in this channel
i wish nexus would improve search but well
maybe their improved quick search UI coming soon will help. dunno if its JUST a UI change or will actually search things better too
Me: not retired, has released 0 mods or updates recently
Atra: retired, 1 recent mod and several updates
Wdym one recent mod?
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
I get few enough notifications that I wish I could actually get an email or something when I got a new one
6480's random fish pixel mod
See the way I think of it there hasn't been a proper Atra mod since may of last year
speaking of your work, though 
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
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.
I can
standby
you can also just look at the recipe with Lookup Anything
or give yourself the recipe
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
I did not think of Lookup anything
you can also type debug craftingrecipe Monster Musk into SMAPI
Works as intended
great thanks
went lower and higher to check both :p
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
meh. No documentation then! Make it a lawless land
the mod is literally useless without it and itd make adding the new things 100% pointless
since it is a framework
Well I suppose when you put it like that........ :p
time to try to diagnose random lag
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
thanks, I just put it on nexus. thanks for checking for me.
Anytime 🙂
question: do you usually press M to open your map?
yeah, is it different if you open it directly?
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
interesting, thank you
I'll have to figure that out, you saved me a LOT of searching
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
unless you expect the list of pending events to change while the menu is open, you can probably safely cache this the first time it runs
map pauses the game so it really doesn't need updating while open
ah, i see! that's only occurring because of the null. carry on
but i cant blame someone for expecting MenuChanged to fire when you change tabs since that does, yknow, switch to a different Menu class
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
its just a menu class that was instantiated when you first open the GameMenu and then swapped to via ~ways~
expecting stardew to make sense is often a fool's errand, it's true /lh /pos
That's life in general tbh
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
stardew is the most legit life simulator bc of that. nothing can be known for certain /lh
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
is this custom asset in your own C# mod
Yeah
what changes are you trying to make appear, are you caching/using the data anywhere that you arent updating when an asset is invalidated
I'm changing a bool currently, for testing, I cache the data on AssetReady
Do I need to cache it on Invalidated?
Weird
i wouldve thought a patch reload would both invalidate and then re-request it, which would then be caught in AssetReady
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
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)
probably i think
stupid question asked in #1323499944321224715
does it, I vaguely recall putting logging in my asset data load and patch reload doesn't always call AssetReady immediately
the PendingEvents wont be nulled as long as you dont close the map so that should only run on frame 1
Thanks though, I'll give this a go 
yeah, idk why I was doing it the other way in the first place
i guess it would depend on what exactly the custom asset was
or where it was used rather
yeah I remember if an asset isn't used immediately it'd just sit there
Well, I didn't want to spam loading it hence the caching, so the asset itself is only ever loaded on Requested and Ready
im not sure what you mean by that
Like I'm not using the asset directly anywhere, just caching it so I can use that elsewhere
does OnMenuChanged get called when a menu is closed?
but you shouldnt be doing the loading in the AssetReady
or in the AssetRequested depending on your interpretation of the word loading
the Elsewhere should ask for it and you should handle the creation of the asset in AssetRequested
I was trying to find where ppl said AssetReady wasnt recommended
found that instead which is 100% better
yes
This is from the main wiki, what I'd been basing it off of
ty. So at least it always gets nulled when the game is unpaused when the main menu is closed
In Requested I load from my mod files, in Ready I load to my cache from the pipeline
yeah that example seems wrong, because my understanding is AssetReady is called by that Load call
selphs understanding is also my understanding
AssetReady happens after every mod has edited it via AssetRequested
though changing that to AssetInvalidated is probably a quick enough fix
like i guess that Load call might grab a cached version maybe?
someone logged into the wiki pls fix it, my mobile password vault isnt working for some reason
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)
if you tell me exactly what to update the wiki to, I can fix it if nobody else can
I kept meaning to rewrite EMP's AssetHelper to use that format, but it seems kind of odd in some way, admittedly
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)
Yeah it seems to function okay for what it's offering, just apparently not with patch reload
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)
@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?
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.
The mod build package shouldn't have any effect on file locks in theory, it uses pretty standard MSBuild stuff.
more questions in my thread #1323499944321224715
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
We definitely all have the problem. IME it got worse with the latest updates to VS.
You need to restart VS on every second launch of your mod?
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.
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?)
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)
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.
It's not possible for this to come from the Stardew side. And illogical to try steps like reinstalling Stardew.
one of my mods uses an external package and I believe i recall it happening once
(welcomeback from vacation, Pathos?)
You've already confirmed (as we have) that it is Visual Studio itself that is locking the file; therefore, not a Stardew issue.
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
(I'm on vacation until January 14th or so, but I'm still online sometimes!)
How is NuGet involved here?
Pathos is always watching
you mean to tell me NYE isn't the perfect day to travel home on vacation
well the problematic DLL is a nuget package
You are deploying third-party DLLs with your mod?
My mod dll isn't the one being locked. It's a referenced nuget
Yes. Well, "third party". The nuget is from myself, as it consolidates a lot of my mod code from various games together
Honestly, Pathos is like an overlord...always watching over the baby modders and adult modders.
but it's referenced as a third party, yes
Idk if I fall under baby or adult modder
but it's not a stardew mod dll, it's a generic C# dll
(Well, I hope you enjoy y our vacation!)
I've only made one code based mod and it sucked...kinda. It just gave me a cookie each time I hit a button
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.
If you would like to mod we are happy to help a new modder!
!startmodding
Making mods can be broadly divided into two categories:
- Content packs are formatted text files, and don't need any programming knowledge. They can add/edit NPCs, maps, new items, shops, and more. To get started, see the list of framework mods, the wiki tutorial for Content Patcher, and there might be relevant guides on the tutorial wiki.
- C# mods use programming code to change fundamental game mechanics. See getting started with C# modding.
Usually it’s easier to start with making content packs, since you don't need to learn programming.
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")
I'm at work, but its a slow day so I am reading the Wiki as we speak 🙂
Is it the stardewmodding(dot)wiki(dot)gg? XD
Yee 
There should be a link to CP's docs if you decide to go that route as well on the wiki
I believe the CP documentation is linked on the official wiki
There's the wiki.gg one + the official wiki, yeah
:3
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
Merry New Year and Happy Solstice!
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!
(The item docs were recently overhauled, so they should be much easier to read now!)
Can you still wrap masked links in <>?
yes
I highly recommend bookmarking the github CP guide. The amt of times I will referr to it on an almost daily basis...
Cool, I dunno if I'll ever get in the habit of using them, but good to know
I'm disappointed that wasn't a Rick roll
Y'all never ever wanna see my bookmarks for modding...
the <> just has to be within the parenthesis
So so so many pages...
I'm a heathen, I have the index bookmarked and just trawl through to where I need every time
also this is just ONE of like 3 chrome windows I have open...
only a matter of time til discord finds a way to disable that too for even better avenues for hiding scam links
(Yayy! That'll help me with coming off hiatus for sure!
)
Ooo yeah that's a good idea

I'm hyped
I've been using that plus some other mods that add items to help me figure out the format a bit better XD

Yeah! I also have a lovely set of friends that are willing to help me if I get truly stuck
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

Thank you for the offer, though!
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
if they have a lot of modded locations, it would
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?
or a lot of modded events
btw Quill...not related to modding at all but am I annoying to the staff?
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;

Me: .. Past me, LEAVE MORE NOTES.
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!
yeah, I think they have like a massive amount of expansions. ngl can't really fix that being slow
well, you can fix iterating over them every single frame
oh yeah, that I'm fixing
You can also shard but it's probably unnecessary
(Divide the work across multiple frames)
I just can't replicate the extent of their lagging with or without the fix
Hi esca!
So anyway, I wanted to ask people's opinions. Right now I'm calculating sunrise and suntime based off that equation
I relate to this so bad lmao
It can help to set up multiple Mods folders for Stardew, which is explained a bit here:
https://www.stardewvalleywiki.com/Modding:Player_Guide/Getting_Started#Can_I_have_different_mod_groups.3F
But honestly, I just move mods in and out of certain folders to disable them when testing. SMAPI will ignore folders in Mods if they start with ., so I have a setup like this:
whI'm thinking about is just making a set time-scale instead of well, dynamicing it up to this extent
Beyond that, though, the game is pretty quick to load and pretty consistent about how it works with a given mod set
it'd probably b e quciker
Oh, this looks like what I was looking for thank you!
if the sunset/sunrise is only calculated once per day anyway i dont think the speed difference will really matter at all
Just as long as you're not testing "how many expansions can I load at one time"
oh this isn't for speed, although
it's called every single tick
one thing I am doing with DNT is caching it
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
Okay! Making seventeen maps that all warp to each other 
Oh, the mod also goes Threading.sleep (6000)
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
Also incredibly cursed and actually should be illegal
pathing logic aside, has anyone put a teleporter maze in a mod? 
It's just the Pokémon gym puzzle
does the RSV magic woods count
(Please do note I have not played a Pokémon game so I know they have puzzles and that is about it.(
(oh, hi
)
So I don't know which Pokémon game has a puzzl3
I've, uh, played the first one, blue edition
it was pretty much walking around and pokemon-ing
a lot of the gyms in blue have puzzles
all games have a puzzle lol
like some have multiplke just to annoy you
but every pokemon game ever has a puzle
I may have forgotten the puzzles aside from "get lost in the woods for a bit", tbf 
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
or you need to unlock the right combo of switches to pass through things (similar to some stuff in the volcano of ginger island)
honestly warp mazes seem like the appropriate reaction to people using data layers to cheat through mazes /lh
Didn't blueberry come up with a way to punish people for no clipping lol
sounds like it would? I'll find out if I ever get around to playing again 
just fill the inaccessible areas with monsters that take 100% HP per contact /lh
I vaguely think punishing people for cheating is kinda silly
but also: warp mazes are fun puzzles, so
well in blueberrys case the entire mod was "solve these mazes"

