#making-mods-general
1 messages ยท Page 30 of 1
thanks 
The prismatic effect in game is just a color tint, so the base sprites would have to be grayscale
which would be fine, but I understand that it's not hardcoded to apply to anything other than like, farmer clothes or slimes
I think it's kind of considered expensive to render too
so you want a bug that changes colors in a rainbow
Since it requires changing the color 60 times a second
You can just make an animated bug with Spacecore
mod?
spacecore provides a framework for animating any texture via the CP format
no need to bother with draw functions and overlays or whatever
ooh
thanks, i'll look into that
that would actually be better too because I have them set as forage in the Woods but a static butterfly looks bad
Is there a way to tell Lookup Anything to put machine recipe inputs in a different order (perhaps enforce Fuel being first)? Im experimenting with adding new ores and it looks pretty silly to see Chrome Ore x5 + Coal when every other recipe is Coal + Some Ore x5
i wish i could auto sync between translation files for any new things i've added without deleting preexisting, had to manually compare
is it not based on the order the ingredients are in the data?
I'm getting this error when trying to add an interior to a new building MissingMethodException: Constructor on type 'StardewValley.AnimalHouse' not found. does anyone know how to fix this or what I could be doing wrong?
It looks like they are going in alphabetical order, rather than based on the order in the data
I'm trying to make a FTM pack, is there a file or something I can see the iridium ore spawn settings to reference?
how would one go about loading in new textures for certain areas in the map? example, i want to edit the textures in spouse rooms but they use some shared textures from other indoor places. this here shows the spouse rooms and on the right is a house having been effected by the texture change which i dont want.
You can't patch the base sheet only for some places in the same map
if it cant be done i will just have to sacrifice some of the changes i want. i figured with modding tho that anything is possible
You would need to make your own sheet and patch in your changes over the map you want to change in the spots you want to change
No, just create a sheet with all the tiles you want. Create a copy of the spouse rooms tmx and edit it, add a tileset using that sheet, make sure to embed it
Make your changes and then move your tmx and tilesheet into your mods folder and create a patch that patches the base game spouse rooms and loads your tilesheet into Maps
i think ive seen something like this done before. so like copy the entire png, and cut out everything that's not included right?
Loading your tilesheet is optional if you want it to be able to be recolored
Uh, I'm not sure I understand what you mean, sounds like you're talking about creating an overlay patch for a base tilesheet for recoloring
Which, no not that
bare with me as i can be a bit slow with learning and understanding these things. so make the png, load it into the spouse rooms tmx and save it?
So I took care of my Robin issue with the greenhouse but just making the map space bigger lol... Now I just have to figure out how to get crops to move from the regular greenhouse to the upgraded version.
can you make the dirt tiles match in coordinates
So this is my custom tilesheet for a map I made, it's like additional tiles that have my own edits but that I don't want to overwrite the original tiles everywhere
ah so it can just be small and simple then.
In your case, since you're editing an existing map, you wanna make a copy of it
Of the map I mean
So copy spouseRooms.tmx and name it something else, I usually still put z_ in front of all my maps so they're grouped together near the bottom
Then open that in Tiled
Well, I placed them in the same area, which gets larger, but that shouldn't matter since it's still dirt, i think.
okay. got it. so i just need to make the png for the spesfic tiles now rq
Yep
Oh right, I was thinking about making a mod to set custom locations for Robin to show up when working on a building
Good morn
hewwo
Do it
I was able to move her without harmony transpiling, so that was nice, just trying to decide what the best way to get her desired location would be, buildings data has a custom fields
you'd have to be able to add it in right?
Yeah, ideally I want it to be something that is just already part of the CP process
yeah, would be super nice for people like me who can't/won't learn C#
So when making your buildings data, my idea is that in the custom fields you'd put something like "rokugin.robinlocation 5 5" and my mod would look for that in the buildings data and set her position based on it
Though I need to make sure custom fields works like that
maybe a way to select if she's on a scaffold or not would be nice, if it isn't not too big of a pita
That's in the shed right? I don't think I've ever built one of those lmao
u can use TryGetMapPropertyAs
Oh interesting, the Self Serve mod is broken in 1.6.9 when Robin is building something
theres an overload for point and one for vector
Hm, yeah, I could do that though I'm not sure if that's less obtuse lol
For the user I mean
idk i feel having map position thing associated with the tmx makes the most sense 
plus theres cp stuff to edit this without tmx too
im making the png and honestly these are so tricky to work with because its hard to tell a lot of the time what parts are used where.
open tiled and right click with the stamp tool
You could take your recolor set up and just copy the tiles into a new png
Though, I assumed you would already have something like this for doing a recolor
Maybe with more blank spaces or something
Depending on your patch mode
this is what it looks like so far
yo ty. i will check that out. i may end up having to watch a tutorial on it
This is your new png or the recolor one you'd been using?
thats the new one
Well, as long as you're okay with the placement of those things, I tighten my tilesheets up because I don't like a long travel time to find the tiles I want
right yeah. well im not sure how placement and such works so thats why i just copied the original and cut out what doesnt belong.
im sure this needs work tho as im missing things and prob have some things that might not go there
Placement doesn't matter for a custom sheet
so if I have the code do this for the upgrade, the map doesn't change. JSON "NonInstancedIndoorLocation": "Greenhouse", "IndoorMap": "{{ModId}}_IGH",
If I do this JSON "NonInstancedIndoorLocation": null, "IndoorMap": "{{ModId}}_IGH",
the map applies, but the plant's don't transfer. and if I try JSON "NonInstancedIndoorLocation": "{{ModId}}_IGH", "IndoorMap": "{{ModId}}_IGH", smapi get angry.
You're basically creating your own stamp pallet
okay
You just want to avoid making changes to a sheet you're already using
Unless you like redoing entire maps
well first im gonna have to edit the original png to having the original textures back
nah im not gonna redo entire maps. thats too much lol. i just like to edit some textures here and there
So I'm guessing I need to make my map apply as a "NonInstancedIndoorLocation" just not sure where I should targt for that.
Yeah, I suggest always making backups of things before editing them

im gonna have to get back to this as i need to do somethings rn
im just glad to kno its not too complicated of a process
So NonInstancedIndoorLocation can only be used by a single location at a time
Setting it to Greenhouse doesn't work because Greenhouse is already in use by a location
I'm not sure if you'll be able to move plants between maps with just CP
There's the IndoorItemMoves field, you could try that
You would need to set up an entry for every single tile
Oh wait, there's a Size field
Yeah, so you can try that, but if it doesn't work then I'm pretty sure you'd need C# in order to move the crops
Do crops count as items in that sense though? In the other building entries it's like the incubator in the coop.
That's why I'm not sure if it'll work, I don't really think they do
Sadly.
Only really one way to find out though
crops are terrain feature
That's what I thought, especailly the digdirt part or however it's actually called.
there is a "CustomFields" section, i'm just not sure how that would apply.
Custom fields doesn't do anything on its own
Right
A C# mod can read it and do something based on what it finds there
hmmm
i feel like you should just make sure the new dirt area entirely covers the old dirt area
I don't know if that'll work, upgrading is changing locations entirely isn't it?
It does
make sure u dont extend the map upwards n stuff
So the crops that exist in the first location won't exist in the second location
i have no clue really, possible that u just lose all crops yes
which is preferable to crops growing out of bounds at least
If it were a map patch then it would be fine
But it's through the building upgrade system
yeah
it goes from this with the highlighted corner at 29 11
to this with the highlighted corner at 27 9
so that smaller area would be entirely in the new bigger dirt area
making the top one the greenhouse map also made it so you don't see Robin working.
but yes, i think because it's an upgrade it becomes an entirely different area.
I may have to have the letter Robin sends just have a warning about the upgrades making the crops get removed or something
can I do a knockback effect without having it attached to a weapon?
You'll probably want the warning in a few places just so that you also still have to explain to people who won't read your warnings
Yeah, I'll put it on the mod page whenever I add that, and in the letter I have her mail after you get the greenhouse.
Not sure where else I could put it.
u can call GameLocation.damageMonster directly
it takes a knockBackModifier param
Stickied post in your Posts tab if you have one I guess lol
sick ok.
Funny that I started this trying to decide whether to do a damage field or a projectile, and now I'm trying to decide whether to do a damage field or a weapon swing.
I was doing art for the harpsword and can't get it look right, so a friend suggested a "play the harp and soundwaves hit the monster" and that sounded really cool.
Oh also, there's a file description you can set on the download page lol
Hm, if I use CustomFields I can also change her position on the outside of buildings
Farmhouse is separate from even all that nonsense lol
Same for community upgrades
trying my hand at pixel art for the first time, making a mustard seed crop
The game is severely lacking in winter crops, especially given how many crops apparently thrive over the winter. Depending on how it looks when it's actually growing I might add some blue in there to mimic frost
Hello! I'm new to the discord and new to modding and have an 'idiot question'
If I was to replace the meadowlands map with a smaller map do I have to do anything special to ensure the coop appears? IE would I have to delve further into the game code rather than the basic map.tmx content patch that the wiki shows?
Coop is hard coded to appear at the position it does on the Meadowlands
Ah, so if there was a clash or the map was too small it would explain the errors I'm getting that I don't understand?
Perhaps, hard to say without seeing the error (and I'm at work so can't look into much at the moment)
SpaceCore lets you add a coop to new farm types (or other buildings) - there's another framework too but I'm forgetting the name at the moment
No it's fine, I think I halved the map size from default so it definitely explains it and gives me a place to re-start from ๐
My brain reading this as co-op the entire time wondering what the hell is wrong with multiplayer on a smaller map
Haha sorry! I'll re-do the map, look into spacecore for a new ๐ฃ coop then have the mod switch a different map out so I don't clash with the hardcoded location in Meadowlands. Thank you so much ๐
Is there a reason to avoid just adding a new farm?
You don't have to override any of the vanilla farms, you can add your own
In fact, Meadowlands is already an entry in the additional farms data lol
I'm just making the map for me and I'm lazy/switching seems easier than writing the minimal additional lines of code
and I don't use the river map
If I was to ever put it into Nexus etc I'd abolutely learn how to do it properly
Well, as long as it's a choice and not just because you think it's the only way
Back when I did my custom map it required overwriting one of the originals, can they just be added on now?
Yep Data/AdditionalFarms
You've been able to make new farm types since 1.5.5 I think
You can do a mod folder located swap, then just . out he mod when you want the original one back
I need to update that then, I should publish it.
Thank you again!
It is sorted alphabetically yeah, which makes sense for crafting/etc but not so much for machines. I actually have a pending pull request to LA that makes the primary trigger item always the first in the list
hi! does anyone know a mod that automatically craft something?
it would be DOPE for an Automate gameplay session, since i wanna start a resturant, but im lazy
#modded-stardew would probably be a better place to ask, this channel is generally for the creation of mods
oh ok thank you
hey whats the command to see ppl to commission for coding? im so iffy about looking up commission stuff with how many scammers there are
!commissions
If you're looking for people who do mod commissions (either art or code), here's a wiki page with a non-comprehensive list of people who do them: https://stardewmodding.wiki.gg/wiki/Stardew_Mod_Commissions
tysm
I think Kedi's the main person doing C# comms but she's well regarded in the community. Non-C#, Aster I believe is on hiatus but Ark and Thylak are also well-known.
I have been summoned 
I'm attempting to add a new production rule to the Preserves Jar, and it includes AdditionalConsumedItems. Does anyone know if it's possible to make this input-specific rather than machine-wide?
You need extra machine config for that
Extra Machine Configs may be allowing that, but I'm sure not possible with vanilla
If vanilla then u just gotta make new machine I think 
Yeah, making a new machine would probably be easier, but it seems silly just to have a machine that only makes mustard
Oh my god I could add other condiments I'm so stupid. Tomatoes exist too.
Mushroom ketchup 
Looks like Extra Machine Config is exactly what I was looking for, thank you!
Trying to decide what would make more sense for a user. For buildings with an interior, Robin's position is set based on tile coordinates, so that's really straightforward. Buildings without an interior, her position is set based on pixel coordinate offsets. Currently have it so a positive X value goes right and a positive Y value goes down. This feels wrong to me, but I think it makes sense if you compare it to tile coordinates
i think the consistency with the rest of the game (and most 2d games i believe) would make it better than going against the grain there, bc odds are the hypothetical user is not going to only be using your mod in a vacuum and doing nothing else with SDV modding ever
Yeah it's also designed as a companion to normal building modding, so hopefully they already know what they're doing lol
I do wonder where 0, 0 is in pixel coordinates
Most drawing applications have 0x0 in top left corner I think
So positive -> go down makes a lot of sense
Yeah, the tile coordinates work like that, that's how I had the math originally because I figured it made the most sense compared to the tile coordinates
positive Y going up in a 2d game would be the weird one out for me
I just hate it when I'm thinking about the math behind the scense lol
so I'm getting this, but I don't see any field labeled action on the wiki modding page for machines
[Content Patcher] Ignored Yumiko's Artisan Update > Include data/Machines.json > invalid: must set the Action field.
The Action field is content patcher
top left corner as the origin makes sense bc thats where CRTs would start their beam
Just a quick check before I get into coding to make sure I'm not wasting time on a weird solution, is there a way to turn off the animation for swinging a sword? Is that Harmony? Can I keep the damage portion as if there was a swing but not the animation of the swing? I know I will probably have to dig around in source files.
I had felt that your harp should be a subclass of meleeweapon
You avoid a bunch of harmony shenanigans in exchange for a spacecore dependency to register your new type
it is getting to that point
a journey of discovery
Basically all graphics works that way
and spacecore is already a dependency
Tell the mathematician in you to shut the fuck up
i think thats always the recommended course of action
Nah
The mathematician in me never took calculus ii
The mathematician in me is needed rn for work
I'm more used to working with a grid in Unity where I don't have to start in the top left, I just go wherever I want in the x, y, or z directions
It's an abstraction but I'm psure it's still draw with 0, 0 top left
Monogame just makes u call the draws
unity i think does start in the bottom left from a user-facing standpoint as loing as the user doesnt care about what the GPU is doing
Top left 0,0 is a standard from OpenGL I think?
Admittedly, I don't have to care what Unity does in the background lol
But uh, follow the rules of the house or whatever that saying is, so positive is down
you could try harmony patching monogame to draw it in a different direction if you want
In my trinket mod u put negative offset y for floating 
I could just invert the math, but it's less about what I want and more about what makes sense for others for this project
The rest is my personal gripes with math
Hm, I was gonna figure that out but I forgot to, one sec
(half the width of the building + the top left X, half the height of the building + top left Y) and then with a built in offset of X + 16 and Y - 32
So I guess it's the middle? (plus half a tile to the right and 1 tile up)
Farmhouse has its own different math
At least, it looks like 16 equals half a tile
Or is it 1/4 and 1/2?
Since the scale is 4x
It's funny that the outdoors position is so granular but indoors is just flat tile positions
Is there any tutorial out there/can anyone assist for making tilesheets for indoors I think I did it right but I'm getting spammed with errors about a missing animalHouse constructor and finding the file
God I'm so close I can feel it. The preserve jar now makes mustard with 5 mustard seeds and 1 wine. It no longer makes anything else it should.
Sounds like you overwrote the entire outputs instead of just adding to them
yup
Did you use TargetField?
Nope, I did it this way (obviously wrong, but also, obviously more digging required)
Are you trying replace a coop or barn interior
I would link TargetField but I'm not at my computer, it's in the docs I sent you earlier
Going to be making a new barn interior with a new exterior basically a new animal building
Just checked the cads I have access too
Positive down to the right
!json
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.
Look if my math brain can accept the damn y axis being upside down lol
I'll begrudgingly accept it eventually, it's just new to me lol
Sorry should have specified I'm getting the errors once I build the building and when I attempt to enter it. New to all this
Sure! And I don't care for debugging code I cannot see
what is the actual error you are getting? on the same smapi.io site on the left side theres a link to upload your error log too ("Log Parser")
(when you're loading the adultSprite for the Mammoth, is it supposed to say Adlut instead of Adult in the target and fromfile lines?)
Can animals even be this big?
Animal is working fine the buildings not
i think it might be cus you made a custom location
rather than simply loading the tmx as an asset
CustomLocations is deprecated right
deprecated but still works
It should still work, but I don't know jack about it for anything outside of loading a location
I've tried it both ways but I'll try the asset way again
you should really send your error log
probably shouldn't be making rapid incremental changes to my mod with the only version I have of it huh.
Not popping up with the error it spams
Like I don't know if you can use a CustomLocation to load a building location
i dont know what you mean popping up. if you're getting errors, if you're getting anything in the console, you're getting a log saved to your computer
Probably not, though CP is easier to recreate
https://smapi.io/log/18f65182f6f64e4c9d284798f162404a Sorry about that it's in there now! I know a ton of mods but it's the stuff at the bottom that is erroring
Log Info: SMAPI 4.0.8 with SDV 1.6.8 build 24119 on Microsoft Windows 11 Pro, with 112 C# mods and 207 content packs.
Suggested fixes: One or more mods are out of date, consider updating them
In the realm of things I wish were different, why are we still using the blueprint data page for buildings
Ignored Mammoth > custom location 'Jonbow.tent_indoor': the Name field must be prefixed with the mod ID (like 'Jonbow.Mammoth_') or 'Custom_' to avoid conflicting with current or future vanilla locations.
we do?
ah i thought you meant in game
Ah nah, that's all right and fine
While I'm on break - in terms of Winter Star gifting, you can only give dialogue based on ID or category and not Gift taste presently, correct?
im not even sure if you can use CustomLocations for this now anyway, I think you need to load the .tmx directly to Maps/
Yeah based on the buildings data, you're not giving it a location you're giving it the map
It creates the location itself
i did check another animal building mod, and they did use custom location so it'd work
but i think u only need to load the tmx here?
seems.... stange, but i guess i know nothing about maps
location should get instanced
Yeah I based this off a few working ones
from what i understand 1.6 custom location just makes a Data/Location in the back right 
beats me ๐คทโโ๏ธ
I mean, I think that's true
i am curious why the error itself says it cant find "Jonbow.tent_indoor.xnb" though if neither the customlocation nor the animal building entry have "Jonbow." in front of it
would try just doing
{
"Action": "Load",
"Target": "Maps/{{ModId}}_Tent",
"FromFile": "assets/testing.tmx"
},
and "IndoorMap": "{{ModId}}_Tent"
remove CustomLocations
(maybe name the tmx something other tan testing 
Changed that inbetween sorry to test if it would fix. I saw that error when checking before and saw that could be a solution
ah, well, thatd explain it lol
It is funny that CustomLocations ignores when you try to load in a location without proper protection against conflicts but Data/Locations will just let you do whatever you want
i assumed the game itself would throw some sort of error or warning if you tried to load two locations with the same name, right? whereas CustomLocations was all Content Patcher
Thank you all for helping!! Still broken here is the updated code and log with the changes suggested.
https://smapi.io/json/content-patcher/9b74d4cdd53241ee8291a56d055f1310
https://smapi.io/log/f741b3c89bfd4c978b29790bc2a11612
Log Info: SMAPI 4.0.8 with SDV 1.6.8 build 24119 on Microsoft Windows 11 Pro, with 112 C# mods and 207 content packs.
Suggested fixes: One or more mods are out of date, consider updating them
are you sure your file is named tentMap.tmx in your assets folder (which should be in the same folder as your content.json)?
you should really turn on file extensions, cause that might be the other kind of Tiled map extension im not remembering atm
!fileextensions
Windows and Mac hide most file extensions by default. If you are creating or updating mods, it's helpful to show file extensions so that you can be sure all mod files are named correctly.
To show file extensions on your computer:
On Windows 10, open File Explorer, click on the View tab, then check the File Name Extensions box.
On Windows 11, open File Explorer and click on View > Show > File Name Extensions.
On Mac, open Finder, and in the menu bar, click on Finder > Settings (or Preferences) > Advanced, then check the Show all filename extensions box.
.tml? I cant remember
Seeing them off gives me big anxiety lmao
.tbin thats the one
Sorry
Even if it's all working right, my first instinct is that something could be wrong
oh, wait
your tent map has xml errors
are you using a tilesheet from a different mod?
did you also make the Reptile Hut mod and are trying to use the same .tsx?
was testing one out from a different mod to try to get it to work
it died on load 
Can't apply patch Mammoth > Load Maps/{{ModId}}_Tent to Maps/Jonbow.Mammoth_Tent:
StardewModdingAPI.Framework.Exceptions.SContentLoadException: Failed loading asset 'assets/tentMap.tmx' from SMAPI\jonbow.mammoth: an unexpected error occurred.
when you load a file from a different path like that in tiled, it will try to look for the tilesheet like "i want the one thats two folders up and then inside this other foldeR"
But when the game loads it, the game cant look "two folders up"
So it breaks
ty will give that a go!
btw u can test with a much smaller set o mods
the problem isnt with what tilesheet you used just that the way the info is saved in your .tmx the information about where to find the tilesheet is in a format the game cant understand
See this link for how to load different mod groups: https://stardewvalleywiki.com/Modding:Player_Guide/Getting_Started#Can_I_have_different_mod_groups.3F
it wont work if you just load the tilesheet from the unpack directly either
because it will still be relative to your .tmx
unless you put your .tmx IN the unpacked maps folder, then open it and load the tilesheet from that same maps folder, and then move it back into your mod folder when you're done
basically when you're making a .tmx map f ile the easiest way to prevent that sort of error is to only load tilesheets that are in the same folder as the .tmx you're working on
so you could also do the reverse and copy a sheet from the unpacked Maps folder into your mods folder and then delete it before release
I thought we had a command for that but I can't remember what it would be
!tilesheetclimbing
When creating or editing maps in Tiled, one common error is tilesheet climbing, marked by red text containing "invalid tilesheet path '../../..'. This is caused by SMAPI not being able to find the tilesheets needed by the map file. To prevent this error, make sure that you have a copy of all necessary tilesheets in the folder containing your WIP tmx file. Copies of vanilla tilesheets can later be deleted, but must be present while working on your map.
If you get this error with a completed map, an easy way to fix it is to open your tmx file in VS Code or a similar text editor, find all of the places with <image source=, and remove the filepaths to so that only the tilesheet names remain. For example, if the code says <image source="Content (unpacked)/Maps/townInterior_2" width="512" height="64"/>, change it to just <image source="townInterior_2" width="512" height="64"/>.
thats for a similar error and explains how to fix it manually after the fact though, idk if theres another one
Probably what I was thinking of, the bit about having a copy of all the tilesheets in the folder containing your tmx
pretty sure this is the same genre of error just in this case it cant find the .tsx (Which would then not be able to find the tilesheet)
Failing just before the tilesheet climbing lol
If you want to make mods that add or edit maps:
- Use Tiled (https://www.mapeditor.org) to edit .tmx or .tbin files.
- Refer to the Maps wiki page (https://stardewvalleywiki.com/Modding:Maps) for details on how maps work in Stardew Valley.
- Use Content Patcher to load in new locations (https://github.com/Pathoschild/StardewMods/blob/stable/ContentPatcher/docs/author-guide/custom-locations.md) or make specific map edits (https://github.com/Pathoschild/StardewMods/blob/stable/ContentPatcher/docs/author-guide/action-editmap.md).
I mean, the maps page has a lot of useful info on it
That's where I got most of my info about how to do map stuff
I added logging to help me write some code and debug everything but now I guess it's flooding the console. hmm.. by default does smapi hide Trace logs?
one day when i get back to making my NPCs map ill start remembering the relevant commands but that aint today
SMAPI does hide Trace logs by default
in the log file you can see everything
This all is so helpful thank you everyone!!! Makes way more sense now
(though really you should remove unnecessary debug logging before release anyway)
If I have something I need to debug that's gonna spam, I usually set up a config setting for it in GMCM
But anything informational I generally keep in trace or if I think it would help me debug an issue later I also will strap to a GMCM option
oh you mean the log in the errorlogs folder?
Yeah
yeah that saves everything
hmm so I just need to remove all the logging stuff once I'm done?
like Roku there are some things I keep in Trace even on release if I think it would be useful to debug someone elses error log later if they report a bug
but generally I remove most logs that arent errors/warnings
I'm getting this but I'm not sure still very new to C#. [19:18:51 TRACE CapeStardewCode] Player state - Swimming: False, Health: 154, Stamina: 276.4502
I probably leave too much in trace, but if it's gotten to the point that I'm trying to figure out why my mod isn't working in trace I really have fucked up
if its not gonna provide any useful information and is just for you to debug to make sure the mod works then it's just gonna make log files unnecessarily larger, but also, its usually a moot point most of the time, just kinda good practice to not leave debug code in release
how do I post code here?
I've seen pastebin, uh
if its a big chunk of code then maybe pastebin i guess
there was one other i saw recently but i forget it but it was just for code
There was one Pathos was denoted as using
Just logging "meow" randomly
Gonna spin up a second thread for it
I think I saw one of your commits was just "meeeooow"
can we embed scripts here?
You can embed code in Discord using a series of three ` :
```
Your code can go here
Even if not a haiku
Just an example
```
For syntax highlighting, add the language code on the same line as the first
``` (with no space, like ```json).
The usual codes are cs (C#) and json.
I should probably add that "not too big" caveat to this
i dont know if that command is meant to explain how you should send code here though
just explaining the discord syntax
Yeah, I guess that's true
i think if you said "not too big" in it people would assume that it just literally wouldnt work over a vaguely defined size limiut
Hmm. Well my mustard crop grows... but it seems to be using the parsnip texture.
hmm
Looks more for uploading files in general though
Ah, there's also litterbox.catbox.moe, that's what I was originally thinking of
but thats for sending files, i coulda sworn there was- oh yeah
Still for sending files
thats also the one i was thinking of but i was misremembering it
Just temporary storage and much bigger allowed
i thought it was just text
but i remember that link bc i got timed out for trying to put it in a markdown link in here
bc i saw pathos do it once
and i didnt know better
Mods are bad influences
theres also github gists
For some reason I do remember a somewhat recent link to a different code sharing site
But my stupid lizard brain won't shut up with pastebin
well that's not right
Spooky
Too long I guess, got converted to a text document lol
Generally code embedding is more for snippets of code
I see
Yep it was the tile set thank you all!!!
Are you using the dev version of SMAPI?
My console doesn't log trace, so I'm wondering if you've either got that or have a setting changed somewhere
using StardewModdingAPI.Events;
using StardewValley;
using System;
namespace CapeStardewCode
{
public class CustomEventHandler
{
private readonly IMonitor monitor;
private readonly IModHelper helper;
private bool passoutTriggered = false; // Flag to prevent repeated execution
public CustomEventHandler(IMonitor monitor, IModHelper helper)
{
this.monitor = monitor;
this.helper = helper;
}
public void OnUpdateTicked(object? sender, UpdateTickedEventArgs e)
{
// Ensure the game is ready and the player exists
if (!Context.IsWorldReady || Game1.player == null)
return;
// Prevent further execution if the passout event has already been triggered
if (passoutTriggered)
return;
Farmer who = Game1.player;
// Hide this trace log by default
monitor.Log($"Player state - Swimming: {who.swimming.Value}, Health: {who.health}, Stamina: {who.Stamina}", LogLevel.Trace);
// Check for swimming and health/stamina conditions
if (who.swimming.Value && (who.health <= 0 || who.Stamina < 0))
{
// Keep important log at Info level
monitor.Log("Player needs to pass out or be rescued due to swimming exhaustion or defeat.", LogLevel.Info);
passoutTriggered = true; // Set flag to true to prevent further execution
PerformCapeStardewPassoutEvent(who);
}
}```
here's a snippet of the file. I haven't been getting the log flooding it's another player
they probably have the dev smapi installed then, or turned on verbose logging
```cs
<code here>
```
(FYI)
smapi-internal has a config.json, you could check if you have anything in the VerboseLogging field in there
Also DeveloperMode literally says it enables trace logging visibility lol
PEBKAC error
ok the player did say they are also a developer.
so they might have unknowingly enabled trace logging?
I had to look that up the first time you said it lol
I mean, if they downloaded the dev version of SMAPI these things are probably already on
so is it necessary for me to make any changes to the code?
nope
iirc you can setup macros in C#
It would be wild to unknowingly go into the config json and change these settings but people do be wild
entirely their problem, though you can let them know
to build with and without logging statements for debug vs release
You can do those #if directives
its got simple ones i think
I ran into one with AchtuurCore the other day
cant put a whole mini func but can do yay nay
Ah, by macros I assumed you meant the functions since that's what I normally hear for that
I use #if DEBUG in some of my stuff
yea idk the c# specific name for these 
I think this is one of those things that people call a bunch of different things
Yeah I've never heard them called symbols
Just preprocessor defines... though those work differently in C++ since you can actually use them in code
i do wish for c/cpp style #define so that i can stop writing whatever * 64
In Unity I've seen people call them directives
If only we had user defined literals like C++ does: https://github.com/dotnet/roslyn/issues/4971
The questions until OP gave up lol
hi all, anyone know, can you not mod bundles in content patcher?
Data/Bundles?
"Action": "EditData",
"Target": "Data/Bundles",
"Entries": {
"Bulletin Board/34": "Bug Catcher's/BO 25 1/{{ModId}}_Dragonfly 1 0 {{ModId}}_Butterfly 1 0 {{ModId}}_StagBeetle 1 0 {{ModId}}_AtlasBeetle 1 0 {{ModId}}_RhinocerosBeetle 1 0 {{ModId}}_HeraclesBeetle 1 0 /6///Bug Catcher's'"
}
}``` modifies the dye bundle entry but doesn't reflect a change in the game
New save? Existing save?
existing save but I could try making a new game
preprocessor directives?
That explains everything
Yeah, you can set certain builds of your mod (like Debug or Release, or for different platforms for other types of C# projects, etc.) to have certain symbols defines. Then use #if to do things based on it. For example, one that VS has by default is DEBUG for Debug builds only, which I'm using here:
if (Content == null)
{
if (cp.IsConditionsApiReady)
{
Content = new PatchContentEngine(ModManifest, Helper, "assets/content.spacecore");
#if DEBUG
Content.OnReloadMonitorInstead("assets");
#endif
Content.Reload();
}
else return;
}
should I change all of the LogLevel.Info to LogLevel.Trace?
Then the line between #if DEBUG and #endif gets excluded in Release mode
#if stuff also handy for making dotnet templates 
Only if you don't want to see those logs in the console but still want them to show up in the error log
(still won't solve that users issue, that's still on them)
Though if those logs are only to determine if your mod is working and serve no function of debugging your mod, you could just remove them
I keep forgetting to switch my mods to release mode
I think all my mods on Nexus are still compiled from debug lmao
yes I just needed them to help me check if it's working
pretty sure all of mine are too
I think it's fine unless someone tries to use reflection on it
what does debug vs release mode do for reflection?
My repo is set up to only do the packaging from modbuildconfig in release mode (I think Shockah did a PR for that for me?)
Not sure if it actually does anything, just saw someone mention they were asked to switch to release for that once I think?
Oh that's cool
There's a lot I could be doing to make my mod releases better/less work
I need to get that automated build upload stuff working again
Currently still just zipping up my mod in the Mods folder and deleting the config lmao
At the risk of blatant decision to advertise my own stuff: If you use ModManifestBuilder, it will append -Debug to your version automatically when building a debug release, which also makes it very obvious that you didn't use Release mode. https://github.com/KhloeLeclair/Stardew-ModManifestBuilder
I use both that, and disabling .zip for non-release builds.
This actually causes me problems when I have mods relying on SpaceCore:
<Version_AppendConfiguration>false</Version_AppendConfiguration> <!-- Otherwise mods get confused about having 1.13.0-Debug, but needing 1.13.0 or newer -->
Probably from switching to release to build, then switching back to debug and not immediately incrementing the version
Yeah, it can be a detriment when developing multiple mods simultaneously
And when not incrementing your version, as you said
It's not necessarily the wrong behavior, but it does make it harder to be lazy which is its own problem sometimes ๐
Final question for the day. Do you think the sprites for these should be wider/taller to seem more full when planted in a field?
Size is probably fine, but I think there's something off about the color?
Yeah, I think I'm going to darken the base a bit, and add some frost/snow to the flowers themselves to make it blend in more. Maybe some more texture to make it seem like a bunch of small flowers instead of one weird shaped one.
Vanilla has plenty of weird sprites, I think it's just the lack of very specific shading that makes it stand out
Yeah, that makes sense. I'll go through and try and modify them more based on vanilla flowers
Learning and using CA's shading is its own trial
Yeah, I think it could use some darker colors in your palette
what plant is that?
Mustard!
oh ok well it has the mustard color
If you wanted to make them wider, I'd do it more at the base and make it a bit triangular shaped?
FWIW, I'm no artist but I think the sprite looks good, just the colors stand out a lot to me
yes because it seems to have a tint of green no?
Oh I'm definitely no artist either. This is my first attempt at making any pixel art, and I figured people here would have plenty of opinions on it
That might be fine, if that's what you're going for
Actually I take that back, I'd make the top wider if anything, looking at pictures of the actual plant
(also if you'd like art feedback you can also post in #making-mods-art !)
Yeah, that makes sense. I think the monitor I made the art on was a bit darker looking than the one I play on
Oh!
any tips for npc programming/creating in stardew? iโm making mods to add some characters i like but i only know basic python :(
I would add some lighter yellow shades?
well, python specifically is not really going to help you here, but not being totally new to programming will help make concepts easier
!npc
Keep in mind that making NPCs is a complex process that requires learning many different aspects of Stardew modding.
Here are a few links that can help get you started on all that you need to know:
-
Tiakall has a great tutorial on making a custom NPC for 1.6:
https://stardewmodding.wiki.gg/wiki/Tutorial:_Making_a_Custom_NPC -
Custom NPCs received many improvements with 1.6. For changes made, see the migration guide:
https://stardewvalleywiki.com/Modding:Migrate_to_Stardew_Valley_1.6#Custom_NPCs -
Some information on the NPC wiki page is still relevant:
https://stardewvalleywiki.com/Modding:NPC_data
Just make sure you're checking the migration page and tutorial first as this page still has outdated information on it as well. -
Aviroen has put together a template that will allow you to easily create a romanceable NPC:
https://stardewmodding.wiki.gg/wiki/Npc_template
!startmodding to look at content patcher stuff, and im sure someone has the NPC command ready
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.
ohhhh omg thank u!
(I couldn't remember if it was just !NPC or like !npcmodding
)
tee hee
(i just saw ichor typing and figured i had a 50/50 chance that it was either gonna be the startmodding command or the npc command. i guessed correctly
)
A programming background will definitely benefit even with CP (which is just JSON formatting) cause you'll take to the harder stuff like queries and dynamic tokens easier
awesome!!
i have 2 yrs of comp science experience + currently in college for cybersecurity so hopefully it pays off ๐ค
using my 3 years of knowledge so far for stardew mods is the best lol
it will definitely help. you will be able to understand instructions like "add an item to this array" without just blindly guessing the syntax
tysm!!!!
I mean my 2 years of compsci went to webpage making, Stardew mods, and Excel spreadsheets so 
I started modding but knowing absolutely nothing about programming or modding in general. I mainly have a background in illustration. Though I started tinkering with Linux and studying python and at the same time getting into stardew valley. Now I create my mods on my linux machine only.
Didn't someone use python to actually mod here though? lol
pytk is lua, so i mean
I think pillow?
hell nah I won't study for the linear optimization test tomorrow, I want to make mods for the farming game!!!!
someone was working on a pytocp converter I think but I don't know if it was finished
I was using python to automate some portions of mod making at a certain point. but for content patcher code
That was pillow too, I think 
(it was aloe)
Ah aloe, I don't hear from Pillow much, so I was certain it was someone else
Technically I've taking at least one coding class eh
(i'm aboutta drop kick this assignment and call it a day tbh)
thatโs so real tho! spreadsheets suck to learn :((
Ya'll making me second guess wanting to go to college
grumpy voice Back in my day, we didn't have a non-programming option for making mods. It was C# or nothing!
(Let's ignore XNB mods, shall we?)
(Happily)
thatโs really cool! when i was younger i had no programming experience but i liked art, so i made a visual novel. it made me happy and gave me a lot of motivation to pursue comp sci
Enroll in SDV108 at ur local colleg today
exactly!!!!!!!
there should be an sdv class at every college
I was programming for 7 years when I started modding the game 8 years ago
my uni just went around going, "why do YOU think cs majors have the lowest graduation rate?" and i said, "because one teacher teaches all the required classes and he doesn't explain anything"
yeeeeeep
I assumed it was the classes specifically designed to be hard just to make people quit
Instead of key bind
comp sci college is a fun loop of hard topic going too fast > โwhy do you not understand? itโs gonna get harderโ > harder topic going too fast
Alternatively I figure out how to put a button in gmcm 
Hack GMCM 
To open unrelated menu rather than page
i think i'll have an easier time doing that karaoke minigame now, i'm quite literally fed up with this assignment
Become another casualty of the inevitable GMCM update
i've done this. one sec
Technically I've taking at least one coding class eh
Weed out classes
My understanding is that these are rarer now
Thats the phrase I was looking for
Hm, they were still a thing a few years ago when my brother was going through, I guess that was about 5 years now though
it's called discrete math
Discrete math was fun!
I can't really speak for the normal college experience
example here: https://github.com/ichortower/Nightshade/blob/dev/src/GMCM.cs#L79
it's a bit scattered around this (short) source file but you make a complex widget with your own draw function, and just check for the click in there since i'm not sure where else you could check for it
Partially.
Thankfully my specific professor was like a father to the class
both of these things can be true. i loved discrete 1 and also the attrition rate was huge
And happened to also be in bjj so we became grappling buddies
Is this a joke btw? I am concerned that you sent it twice lol
But he purposefuly went lighter on the harder part od the discipline
we lost about 20% of the class by the early drop deadline, and another 30% or so by withdrawal time
maybe more. it was brutal
we're on week 2, and my cs2 class is down to 10 people
out of 68
Decrypting messages by hand
Damn
so someone's gonna make a mod to teach discrete math via stardew, right. to make learning fun or whatever
Your Uni might want to considering hiring someone else lmao
Phone lag
I didn't mean to
i'd much rather make a GUI in stardew for a matrix than do this class
where can i find the item fields thing when you can see the minstack quality and such?
I definitely think C# makes more sense to me now just by learning this modding
I genuinelly dont see how you could ever gameify that
Just make a videoplayer and play an actual lecture
I think Dr. Elizabeth MathPerson was interested in a university mod for SDV lol
there's already a videoplayer mod iirc
frog fractions with sebastian
thanks, i had objects AND gsq and what i needed was the overlap of them obviously
i still have my discrete math textbook, although i only saved it for the single paragraph in it that explained quicksort. (in a previous CS class, a not-so-effective teacher spent a whole week trying to teach us quicksort and i think we all left more confused than we came in)
I think you mean, monitor riser /j
the desk stabilizer /j
then in this book it was like "here's how it works, done" and my face was 
(it had also been a few years since the debacle, so)
Sometimes I think it's amazing we have any competent people anywhere with how many bad teachers we have
Hey
yeah they quite literally got a guy off the street for my husband's ODE class 
I've always had great professors
Or at least half decent ones
The worst just read off his paragraph long slides tbh
(though, the uni talk is probably off topic at this point)
Only at this point? :P
hey I tried to salvage it with the Stardew discrete math joke
yeah-- now i interrupt this scheduled programming to go, "what the hell do i do with modentry" i am lost in the wiki sauce
modentry just has your entry function and whatever else you want in it
doesn't even need to be called modentry it just needs to extend mod
(and obv have the entry function)
IAmSuffering : Mod
no I indicates interface
f
HelloIAmSuffering : Mod
To the one who reacted with SDVPufferpain - how often do you really need SMAPI's Mod class instead of your own?
i like the IHaveModData interface from the game
Yeah, that's a fun name, I've done similar stuff before
Only the once I suppose, fair enough
I still haven't moved away from naming mine ModEntry, feels right
I feel like it doesn't make sense with how I organize my mods to call it ModEntry
Since I do more than just set up - a lot of the mod lives there too
mine just gets renamed to the mod name
Lol, I have way too many mods where I'm doing everything in ModEntry 
me too, i should really name it something else
and do new class for encapsulation or whatever
inb4 modding will help me understand this damn encapsulation and inheritance lecture because my brain is smooth
I mean, you could do what some people do and do multiple files, but all of them are partial class ModEntry
sufficiently small mods i just put in the one class/file. i have moved away from calling them ModEntry though
i turn everything into a new class for my two main mods cause then I can use reflection to iterate over every class to do things automagically for me
that seems like chaotic evil 
I've been meaning to make myself an abstract base class for my mod to do magical things
it's not chaotic evil until you're using reflection to iterate over your harmony patches
Like being able to subscribe to events like from MC Forge rather than the C# way
I mean, isn't that PatchAll does? (I know some people here don't like PatchAll...)
Nah
Use exec
Use the old pointer math overriding method of patching
probably, but i read the advice about the annotations setup being Not Recommended and i took it literally
I think that's mostly legacy from the days of separate assembly names for Windows and Mac/Linux
i read that same advice and said "ok but it's so much easier"
Will it not be true when Android updates?
(my patches were also set up in a different class structure than PatchAll expects and i didn't want to reorg them)
As someone with a magical abstract base class, it's nice.
I like to pretend Android modding won't exist until it actually does
It sorta is, there's nobody maintaining the 1.5 version right now
what does the magical abstract base class do
Magic
The entire mod
Just magically
No, it's a way to have code reuse
Look at stardew hack
oh like one of those common things 
i think i been doing this mono repo thing entirely wrong by not having one 
it is a psychology thing i feel
making a whole new git repo feels like higher amount of commitment and vision
i contemplate throwing in the language change for the karaoke mod but i don't know if i care to have text on screen of lyrics
so, I have a general question about how spouses work as far as the outdoor areas and scheduling them to use it. Is that just a built-in behavior that happens when they are given the appropriate status for CanBeRomanced, or is there more to it?
I peeked at a few custom NPC tutorials and didn't see any mention of scheduling them to use outdoor areas, so I was curious.
I think that's just one of the hardcoded spouse specific schedules that can be chosen
There's actually a lot about spouses that are hardcoded as hell
engagement dialogue eats everything and i'm too lazy to do input separators 
{
this.setUpForOutdoorPatioActivity();
return;
}```
yeaaaaaah
Oh, Saturday only huh
Kinda rude they only get one day to enjoy their outside area
one day, can't be rainin, can't be winter, can't be krobus
can't be happy /j
yep. hardcoded. paturday saturday
Poor krobus
I was considering working on a mod to make spouses interact with the farm more, but spouse behavior on the farm is a hard-coded mess.
button has the machine activator and i was contemplating it 
1 keg, randomly, just to put everything off sync
I wouldn't want them to wander around
I don't need my fucking chests scooted about willy nilly
it's bad enough some of them plaster wallpaper/flooring
"You have bad taste, here's a random choice from this list that I think is better"
Or a hard set choice I guess, I can't remember
you can set a list
i think the only less annoying feature i'd do is making tappers ready at random
i have a feeling people would get mad if i did only like, a handful of kegs/casks just because they kept their spouse happy
What if spouse did planting with you
Day 1 of thr season
More immersion
Always more immersion
reskin a junimo to use the spouse sprite
drowns in immersion
Would be great to have them run around if they didn't collide or if the pathing system was redone to actually fully avoid running into things
If I play with another person and they walk in straight lines everywhere, using their tools to knock my chests out of the way, I'm going to prison the next day
sleeep
I don't remember setting these, and some of my mods don't have it, some of them are opposite values
I was so distracted I only just saw this, cursed lmao
make it just their head sprite but with tiny arms and legs attached
can i report chu for making people look at me weird for suddenly laughing at that
Alright. Now I just need to extract mustard from the mess of all the other random crap I've added so I can upload it as an actual mod
Which I'm now realizing means I'm going to need to test everything again
Thank you everyone that helped! Couldn't possibly have done this without you!
sometimes i wish i would eat more mustard, i love flavored mustard but it's so sad to never finish a jar
Honestly I mostly use it to season burgers before I cook them. Sometimes steak too.
i use them mostly in hot dog, which i don't do that often
anyway, you made a crop AND it has french reference, so, good work
I think it might need some balance changes, but I'm pretty proud of it for now. Specifically, requiring a whole bottle of wine for a single jar of mustard seems excessive.
I'm not gonna lie, I totally forgot vinegar was even in the game.
ok! i wasn't sure if it was that or wanting something the player can produce (lot of people don't know you can make vinegar with rice now)
I just saw that Dijon is often made with wine and jumped on that. My biggest issue with the whole bottle of wine is that with the same amount of crop space, you can produce way more mustard seed than wine.
Even buying vinegar for 200 though, you're still making solid returns.
Something for 1.1 I guess.
Could probably just add a second Preserve Jar recipe that uses vinegar instead for a cheaper mustard type.
you should possibly be able to require one wine and several seeds
and give several jars
and that sounds fair too
Ultimately the simplest solution is to reduce the number of seeds that drop per crop
Not gonna lie, making stardew mods is not what I thought I would be doing with a premium Jetbrains subscription
you'll have time to consider your option anyway
(devilled eggs??)
added to the notpad of future ideas
Thinking 3 eggs, 1 mayo, 1 mustard makes 6 deviled eggs.
maybe vinegar too. Include another use for that.
alright, finished up the readme in stuff for my lil project. i also like this thing i added
and tbh im liking it more as an external utility, strictly a me thing but having a CLI feels nicer than wiki-ing everything
you inspired me
So glad you published something!
Mmmm deviled eggs
Now the real question is what the stats should be for it
grats!
@next plaza: do this (24h ago)
Remind me in 24 hours to look into marriage schedules with my 0 schedule fix
You're a meanie...but okay, kittycatcasey (#6238409) (24h | <t:1726270536>)
I am getting confused at the custom object stuff in spacecore... for making a custom weapon type like chu/e was saying to try, do I make it an object so I can use UseForTriggerAction, or do I make it a weapon using weapon data?
Right now both are in C#, would I need to export them to JSON/CP and then add CustomFields?
Is there maybe a mod that has used this I can crib off of?
the api you need is RegisterSerializerType
Hey guys
How are things
This piffle is exhausted
If you want a 1.5.6 example, shovel
which let you properly save your new MeleeWeapon subclass
alright
u also need to do stuff to make ur harp actually take on the subclass ofc
not sure where is best place for this 
Anyone know where to find the list of possible sounds?
Thank you!
tfw you not only can't remember why you wrote that code, but can't even figure it out after an hour of staring and stepping.
Past me was far too clever for present me. Or present me is too daft for past me. One of the two. I hate that guy.
Me trying to remember why I have two different simplify functions in my content engine stuff that're almost identical
Guessing one's not an overload
The current iteration does, and then I got the bright idea to make it not swing anymore but do a quasi equivalent, and the special action is getting overwritten as well, so the only thing left of it is that it isn't held over your head, and the special attack cooldown that does nothing.
The thing is, the entire code is maybe 30 lines, and I had the foresight to write a 20 line comment explaining it to future me. And it still MAKES NO SENSE FFFEHJWRHJN
Don't drink and code, kids.
I don't think I could stand to read my own 20 line comment, that sounds like something I should have made a fully formatted documentation page for lol
Well it was supposed to be an implementation detail... I don't normally write full documentation pages for my own self.
did I mess this up somehow? Everything except for the beach sprites work.
Well, the part where you have to tell others what it is and how to use it lol
I think what's happening here is that the fundamental assumption was just wrong, so very wrong. Like reading a physics proof that starts with "Step 1: Assume the speed of light is 38 feet per second." In what freaking universe?
your target just says Harvey_Beach and not Portraits/Harvey_Beach
(Aside: I fucking hate it when things are in imperial units and I do often have to use them)
https://frinkiac.com/caption/S06E18/211627 "My car gets 40 rods to the hogshead and that's the way I likes it!"
Doing something at work today where my coworker was giving me measurements in um and vendor was giving me measurements in inches
Inches
I'm a fucking engineer why am I dealing with inches
Ooh fun
Ok looking at the shovel this is making sense, was in the general range of what I was getting towards. Lots more reading of base game stuff to do to put in my desired changes but it'll look way cleaner at the end.
My modentry was getting very sloppy.
im confused -- is carp supposed to have the season_winter context tag twice? I thought these corresponded to seasons they can be caught in
Got any mods that are patching fish?
thats from the unpacked folder, carp just has that
As a proud burger-grillin', fire-crackin', beer-drinkin' 'murrican, I have to agree that it's a pain in the ass when actual code or math formulas aren't in SI units.
Pretty sure we got the "life-terminating, multi-billion dollar disasters" lesson in like, week 1 of year 1 of engineering school, if my foggy old memory is correct.
welp dammit. guess ill have to use my other method for getting seasons :v
so close yet so far
what do you mean? why does having it twice prevent that?
it also doesnt have season_summer
er
yea
I want to get the seasons a fish is catchable, I have a method for doing that but its kind of a minor refactor to use, so i figured i may as well just nab contexttags
i think the actual spawn conditions are handled in the location data anyway but i doint look at fish stuff too much
Yeah, you have to look at location data not fish data, I think the context tags are used more for quests, like when Willy wants you to catch a particular fish.
yeah, just going to have to go loc by loc and get whether the fish name is a key in the composition with how i do things
it is an odd bug that it has a duplicate winter instead of a summer though still
not too much of an issue and probably the inevitable thing anywho but like. idk. path of least resistance
yeah
Then again, maybe one of the season_winters was really supposed to be season_summer and no one's ever noticed it til now.
if im the first one to notice this im honored, but surely not?
it would have been in here for a while
in any case, ill just stick to adding a little blurb for the fish with catchable/freq per location it appears in
are you sure you dont have other mods interfering--and are you also sure this code is being loaded/included
and 2) ancient fiber isnt from us
yeah I just tested in game and it works?
run patch export Data/Machines to see whether your changes are applied correctly
haha i was just about to ask if you meant patch export
You saw nothing
/s
there truly are many many mods which add new rules for juice/wine/etc or fully replace the rules to make one small change
I think I just didn't have extra machine config (forgot to put in the folder)
I don't think that matters in this case
I just posted additional silly content for my mod ๐
I just need to ask, because I'm a little confused in my testing. are there different conditons for weather on and off ginger island I need to be aware of? Or will when I make my fish show up with rainy weather will it automatically detect that it is on the island but isnt in the valley?
Doesn't weather query take a location param?
it does yes
It's just what you put in the param. "WEATHER Here" is the current location.
that answers the general question thank you, which I just realised is not actually my confusion
but rather the weather entry in the fish data specifically
I think the fish conditions are just normal GSQs.
which means its at least "fixable" if the fish data weather only takes into account the valley because I could use a condition instead.
It's not only in the valley, it's in whatever location the condition specifies.
"Here" is wherever you are right now.
specifically the sunny/rainy here
I know the seasons dont work in this bit, but the weather does.
I see, but I think the answer is still the same.
it just checks wherever "Here" happens to be
Checked what the fish spawner does and it checks location.IsRainingHere()
So it's equivalent to a "Here" GSQ in the fish spawn data.
thank you!
(note that those particular weather conditions are ignored with magic bait)
So I didnt do anything wrong, thats a relief. still need to figure out why the fish in particular isnt showing up tho but I can look into it myself
Did you add the fish to spawn data? To locations?
yeah
only idea is I might have typed the IslandSouthEast location wrong or that that doesnt point where I think it does
Not sure if this is an issue, or maybe qualified IDs aren't used in CP, but normally those fish IDs should be qualified with "(O)"
Weird things can happen when trying to spawn items without a qualifier.
i dont think it can be Fall on the island
and rsv doesnt add an 9O) to the fist one which is the stylkeguide I am referencing
hmm, I think I need to look into how other fish mods do seasonal island fish then
There are seasonal island fish?
i might be wrong though i might be confusing it with a season context thing
Island has no seasons at all, at least in vanilla, unless there are mods that add seasons somehow.
I know at least the Fishmonger mod has, so I'll check its code now
Ah, yeah, I was going to say, you could implement "seasonal" island fish by querying the season in a different location.
(or the entire game's "season")
LOCATION_SEASON specifically takes into account things like the island having permanent summer
just SEASON checks the valley then?
I think SEASON is attached to the save data itself, it's a global.
thanks
Like what shows on your calendar HUD.
SEASON checks the games overall season, which could be the valley or a modded location context
WorldDate
I'll use that then
(for future reference the Desert also has its own season override too, also set to summer)
I was going to ask if theres any other vanilla locations like that thanks
is it a good idea to make a local in il 
why not
im unsure of the best way to determine the number
i dont think you need to
you just declare a local and pass that localbuilder as an operand to stloc_s (or stloc? one of the two. cant remember which is better. ive used both i think)
the use case is that i need index to a foreach emumeration
i wonder if i should bother keeping track of a local or just do a find index in the C# func that i patched in 
what do you mean, like, you need to store an enumerator?
no there's a foreach like this
foreach (MachineOutputTriggerRule trigger2 in rule.Triggers)
{
// call to my func patched somewhere inside
}
i need to know index of trigger2 as it loops
rule.Triggers is on average 1 item, maybe 2-3 if a modder was feeling lucky
so not huge cost to just go index for 
very sad that MachineOutputTriggerRule.Id isnt guarenteed to be unique
you could do that. it wouldnt be hard to declare a local, but i guess its probably better not to if you dont have to in case someone else codes a transpiler that expects a local with a specific index. i dont know if declaring a new one would possibly reorder the others
i wonder how content patcher handles that
yea the reordering is what im worried about, which is why i was thinking of somehow determining the last local index used 
yea wheres my enumerate(arr) i miss it
I abuse this scoping rule
I'm a bad person
I admit it
Anyways yeah you can declare locals
i dont know how you would determine the last local index that was used or how it would help
Button will supply an example
unless i misunderstand what you mean
uhh uhh
here
bad example
but its an example
why did you call instructionsToAdd.Add 3000 times
i know ive declared a local other times too i just remember this one (un)fondly bc its hard to forget stupidly writing an entire foreach loop with IL
this was like, my first transpiler
before i realized i didnt need to loop over every farmer in the IL and that i can just call a function to do it for me
this was also before i used codematcher so i was adding an array of instructions to the original instructions list
so instructionsToAdd is a list i created that i was adding instructions to
and laying it out line by line made it more readable for me
fair nuff
this is putting me off the idea though 
the other annoying thing about this partcular foreach is that theres 4 continues in it
ill give it a shot tho 
its also fun to see how much you can avoid declaring a local by just making sure what you want stays on the stack and is at the top when you expect it to be
not as fun when theres like 500 lines of code between when the value is made and when you need it though so locals are better there
probably
that sounds perilous lol
but is there really other way to know where you are in the list 
not in a foreach loop i think
this is not a thing the original function cares about
this is fun for sure but sometimes it leads to things that Feel Cursed like adding extra dups and throwing away values
hmm i also have to deal with people adding mods in middle of save that patches in new trigger rule 
to me those are just part of the puzzle! case in point: i have two Dups in that last example i sent to make it work alongside the local
a good programming rule of thumb is probably not to try and make your transpilers cute
All my code must be adorable, that's non-negotiable
my better rule of thumb for myself is that if coding something one way makes it more enjoyable to me (within reason. no breaking things!) then i should do it that way
besides, if they work, it doesnt matter if theyre also cute
Nah, you should be making your work assembly cute
on the other hand, prettying-up a transpiler is like putting a ribbon on a forklift
the forklift just needs to work and also the safety of everyone else in my work environment (read: other mod authors) depends on it
what is a transpiler? and what is a assembly?
A transpiler is when you do it for fun
assembly is when you do it for rollercoasters
assembly is when you do it for honour
Or money
uh what?
for a more real answer: assembly code is basically writing computer instructions at the byte level. transpilers use an intermediate language code thats a little bit more abstracted out than that but not by too much
In college I took an assembly course, which convinced me to only use the highest level languages I can.
in uni i took two years of c++ and java, which convinced me to only use c#
valuable life lessons learned
lol. I learned Java as a Junior in high school, where all of our tests were handwritten. I learned Java on hard mode.
compliers and transpilers
in any case i also think any forklift is better than a bool false prefix, bow or no bow
so as long as those still exist i will never feel bad about my transpilers
i will feel bad about the one bool false prefix i have instead
i use paper as my text editor kind vibe
"omg mr. insert name writes assembly on paper1!1!1"
Pretty sure I'm the youngest person at my office that uses paper for anything. Things just make more sense when you write them down sometimes. Especially if I'm pre-planning some wierd logic.
office?
for a genuine answer, an office is a sort of building where idiots go to push buttons on a keyboard and push paper
You write what you're supposed to on it, and you push it to the next guy for him to sign it
tysm!! you guys are so helpful 
"{{ModId}}_AlwaysPettableAnimals": {
"Id": "{{ModId}}_AlwaysPettableAnimals",
"Target": {
"Type": "StardewValley.GameLocation",
"Method": "CheckPetAnimal",
"Parameters": [ "Microsoft.Xna.Framework.Vector2", "Farmer" ],
"IsGetter": false, // Optional, only needed if it's a property getter
"IsSetter": false, // Optional, only needed if it's a property setter
"Assembly": "Stardew Valley" // Optional, defaults to "Stardew Valley"
},
"PatchType": "Postfix",
"Condition": "SEASON winter", // Optional
"ChangeResult": { // ChangeResult is entirely optional
"Operation": "Assign",
"Value": "true"
},
"Action": "spacechase0.SpaceCore_PlaySound crystal local", // Optional
"Actions": [ "spacechase0.SpaceCore_PlaySound breakingGlass local" ], // Optional
}
not to interrupt the office talk but this isnt too bad of a model, right... obviously ignoring the fact that "a CP only mod maker probably isnt gonna know what method to target or what the types of things are" because thats irrelevant. if i cared about that this feature wouldnt exist. i dunno if i should keep the IsSetter/IsGetter fields or combine them into one field somehow (i separated them bc i figured it made it more clear what you wanted)
i feel like you should just keep the fields how they are
what if you want to patch a constructor 
ngl i did not think of those at all
Quick question, what looks more uhm, normal here. This (let's call it 18,) or this other one, (we'll dub it 19, i gotta take a screenshot of 19 just gimme a second)
18
why does he sit on the chair arms like a cat 
Normal goth behavior
seriously though 19
Yeah, i'm gonna go with 19.
Now i just gotta ask the dev of this mod if i'm allowed to upload this...
off to the nexus
im a total idiot so i though the difference between the images was the brightness
... you should ask permission for a mod before making it
I don't intend to share this...Did i do something wrong?
i'll delete this if so
wasn't my intention
the police have already been notified 
oh no you're fine? i'm not sure what this is based off of etc.
regardless, i'm not planning to upload this until i get approval
and if i don't i will NOT upload it
you can do whatever you like for personal use, it really is just uploading and sharing you need permission for
there's just been issues recently with like, people basically reuploading assets without permission
Really? damn.
you're alright!! good on you for asking first :)
I'm orange!
Sorry Button


