#making-mods-general
1 messages ยท Page 140 of 1
So you would need the internal texture names for AT
Yeah, that's the same problem I ran into
Yup. It's not very relevant for npc sprites though
Tbh, Matt, we're getting into "atra is dumb and just knits" territory
Aka "atra is tired and doesn't have the spare brain capacity to think of these things anymore."
You could target a vanilla tilesheet, but AT replaces it with something else. I wonder if fixing that issue is as simple as AT updating the texture name back to the vanilla path.
Drawing happens with the texture instance, not the texture name.
No, but when you patch SpriteBatch.draw and use the texture parameter to match it's name, then your patch depends on that name to target the correct sprite
They would break the hell out of spritemaster
Yeah, you... you can't rely on texture names once you're at the SpriteBatch level.
spritemaster is that still a thing
This is spitting false but the game behavior tells me this condition should be true (and i expect it to be true):
Ish? It's clear glasses now
I'm not sure exactly what the relationship between Spritemaster and Clear Glasses is, but there's definitely SM code in CG.
(And again, we are getting into the atra is tired territory, I'm so sorry.)
So some part of SM, if not the whole thing, is definitely still alive.
So I'm probably gonna head out, it's not something I want 6o figure out lol
I was able to reliably patch vanilla assets using the following as my condition:
var target = this.gameContentHelper.ParseAssetName(texture.Name);
That 100% returned the relative path to the vanilla asset
So if I was patching TileSheets/bushes, that value would be "TileSheets/bushes" in the SpriteBatch.draw method
What I'm saying is you cannot assume that condition will always hold true, only sometimes hold true.
For example, suppose the texture has been drawn (or is drawing to) a RenderTarget2D. Or even is a copy of the vanilla texture.
Yeah, I can only speak anecdotally in my tests for the vanilla game objects like Bushes, Plants, Crops, Floors, Fruit Trees, Giant Crops, Grass, Hoe Dirt, Resource Clumps, Wild Trees, Tools, every item in the game, Characters, and every building in the game. I'm guessing there could be edge cases, but for all intents and purposes it worked well enough.
This is guaranteed for assets smapi loads
I guess so. Like a lot of things, it might work OK on vanilla but mod compatibility would be another story altogether.
It is not guaranteed for some random Jane modder doing new Texture2d
Or Casey doing new Texture3d
Here are a few examples that were based on those tests
Or me using render targets.
And if you are changing the texture resolution then you have to deal with issues like the size of the render target, active scissor rectangle, etc. Even the origin property, and I'll bet you dollars to donuts that several of the draw-patching methods out there aren't very careful with it, because the way it works is wacky.
Again, a lot of things are fine for really simple cases and a lot of the actual drawing that happens in vanilla game is indeed really simple cases.
Yeah, there was a lot of math involved to patch sprites out of the existing bounds of the original sprite to make sure everything scaled and was positioned correctly.
Ive already updated a mod I released yesterday once for performance/ one small bug fix just to get it sorted, but two people sent in translations of my mod (one for chinese one for spanish). Do I wait a bit to update or immediately update with the new languages? I feel bad updating so rapidly
Most people who are opposed to updating frequently will just ignore mod updates anyway
If you really want to throttle your updates, you can just wait a week and try to bunch together multiple things. Especially if it's just translations you're adding.
I'm going to be honest; I only get annoyed with rapid bugfix updates if it happens to be things that "should" have gotten caught during testing
But yeah, some people bitch
Some people bitch about everything though
I enjoy bitching
In the pre ModManifestBuilder days, I've mid-day updated because I forgot to change the manifest
For example. It's entirely stupid my fridge moves the hot air out of it just to make the hvac system deal with that
And there have been plenty of times I've stepped out of a toasty car into a cold house and wondered if thermodynamics could do me a favor
I think I'll update it, yeah. I mean it saves people downloading it in the mean time from having to update it
Also can my car grow a small 1 sq yard solar panel hooked up to a fan to keep the inside cool during...is dragged off
So the longer I stall the more people will need to update
These were people that just kinda asked if they could translate it, if they had asked to make seperate pages I wouldn't be opposed. I randomly looked up another one of my mods and there was like 4 other pages in different languages without me knowing - was kinda cool to see
I've done a few of those because of stupid mistakes but I blame the learning process of publishing mods ๐ I'm like 99% sure they're sorted now and they were all to do with the publishing part of the code rather than the coding part, it stressed me out a bit but it is what it is
Yea ppl had great desire for bosses 
I'm surprised no one made translation pages for my 75k UDL mod
(granted those are debug lines that no one should ever see in regular gameplay, but still that's ez DP right there)
also I published the compatibility fix for my map event markers mod so thank you so much again for helping me guys! your patience was appreciated ๐ I've got some things going on right now which meant my head hasn't exactly been clear so I'm very grateful for your help
forgive the possibly silly question, but DP? I saw someone mention it earlier today too
tbh for maybe 1,000 DLs, making the mod page is probably not worth the max $2 effort
Doodly Poodly
Donation Points. Nexus' Reward System, where you can opt in your mods and you get rewarded depending on (roughly) how many downloads you get
when you have an NPC name that has a space in it - do you write it as "Npc_Name" or "Npc Name" in events
you use the internal name, which ideally should not have spaces
I dunno the answer, but I'd use underscores everywhere
Ideally it wouldn't but I'm working on making it so that it's using the actual in game npc Mr qi instead of my own to see how it works (for compatibility's sake)
And his NPC name is Mister Qi

Most of it is pretty easy but the event thing is what's throwing me off ... how unfortunate
It would make it far easier for me to incorporate compatibility with other mods like the gender neutral Qi mod or Mr Qi Dialogue Expansion
I usually recommend that they post their own translation mods, and if they prefer not to do that, then I post their translation as an additional/optional file instead of updating the mod at all.
Because the translation actually isn't an update to the mod. Nothing has changed in the mod itself.
the game seems to use MrQi for him in events
I prefer for people to send me the pastebin for it so I c an add it myself honestly - I appreciate people translating it but I also put in a lot of work writing stuff so it feels weird to have everything I made uploaded with another mod entirely-
it does?
not sure how that works
Weird
I was literally about to say how does that even work if his internal name is Mister Qi ...
Giving me a headache for real
a translation mod shouldnt be uploading everything you made. they should only be uploading a single i18n .json
if someone is redistributing your entire mod in order to translate it, that is the incorrect way to do it and you should tell them not to
Yeah, that's precisely why I'd rather not post an update or include the translation at all in the original mod.
Because I don't have the knowledge to update the translation when I update the English content.
Solution: never add content again ever forever /j
Ez. Just learn all 12 lang
So you end up with a mess of, first update the content in your own language, then post an update, then receive one translation, post another update, then receive a few more, post more updates, ugh.
Learn every language ever
Or, you reach out to all your translator friends before you release your update and wait 3 weeks before you can finally post it.
I'm just worried about how the event code will handle that - The space itself won't cause an issue?
I still have no idea how MrQi works, but apparently getActorByName has an option to try replacing underscores with spaces if an exact match wasn't found, so Mister_Qi may work?
I mean I can always test it, it just gives me a headache to think about ... curse me for wanting to make everything compatible
to clarify said option is flipped to true for event code
I was overjoyed when I saw that SVE didn't edit the part of the casino that I edited lmao, less fixing for me..
I will try it and see what happens
I have a backup... and a backup for my backup, so if I mess anything up it'll be okay
okay I think I found my answer - Mister Qi and MrQi are two different entities. the latter is transient and only exists in events, and the game has a hardcoded branch to draw the impostor MrQi with the real Mister Qi's texture
Qi has hardcoded spawn code in a couple of places.
Like, created with new NPC(...) and a bunch of random stuff jammed in.
I meant in quotes
Sorry.
Of course Qi has some hoodoo voodoo ghost stuff going on
Why would he not
I got rid of him once I can do it again >;[
A little (or sometimes a lot) of C# should clean that hardcoded right up
I lied I will not be doing it because that is
Not on for me
Extra work does not equal extra fun :(
No, I seriously meant try \"Mister Qi\"
No no that wouldn't be the only issue - I did a bit of a test and it does work technically - but because of the hardcoded stuff there's two Qi's and I don't want to figure that out
Maybe I will when I'm less tired but as of right now I have decided that I will not, in fact, be editing his vanilla NPC stuff - and he will be a new NPC ... because I said so
Wait a second... could Spacecore's HD texture support theoretically be used to scale up an NPC if I painstakingly used texture override on every frame of their sheet? 
Most likely that is what you would have to do
That's what you have to do for portraits so I assume same problem for sprite sheets would exist

There's no guarantee it would solve the incompatibilities I'd like to resolve but it might be worth a shot
Cutting up NPC sprite sheets into 50+ pieces though

Online sprite splitter tool
I don't think you have to split it into pieces but you do have to write all the actions yes
I thought spacecore texture override allowed recs
you also don't have to write allll the actions, I feel like this is a simple nested four loop
Atra coming in with the C# elitism \j
Ehh I made a large-ish map mod and it lags during raid 
Ig the game renders rain for the whole map, and not just the part in view
How large is it?
128 x 96
Pretty sure the Town is bigger than that
hmm maybe
I don't know how spacecore works but here's a start: https://www.programiz.com/online-compiler/5BT1YAb0JFuUX
there's also a lot of trees
i heard once that the game renders the same amount of rain no matter how much screen space it actually needs to fill
correct, rain is rendered only on the screen
I made a 5000x5000 map that was literally trees from top to bottom with just enough room to walk between them
it's not rendered [much] off screen iirc
that said
- The game's rendering is pretty slow
- The game's rendering on farm is preetty damn slow
My computer is kind of overtuned though
playing on laptop with integrated gpu 
Honestly I'm always surprised when integrated graphics even runs the operating system
i haven't used a computer with a discrete graphics card in years and i don't currently have plans to change that
Integrated graphics was the second dumbest thing done to computers, the first was Windows in general
shrug i guess, i'm not a graphics guy
I'm on integrated graphics and I do cad work on my personal computer
Vanilla Town is 129x109
or (please insert appropriate meme) I WOULD IF I HADN'T BROKEN MY UBUNTU PARTITON
Mm, with no coding experience I don't think I quite understand any of the talk about being able to simplify organizing the sprites or writing the TextureOverride actions, at the very least it seems like I need to point at individual target rectangles for every frame of the target texture, which each then need to be given a different source texture as there's no field for specifying rectangles in the source texture 
It isn't the first time either.
They must like this channel for some reason. Lol
I guess we're the cool kids? IDK
Does this look correct for the general format for seaonsal portrait with multiple per season? Pulling from wiki but want to double check.
{
"Action": "EditData",
"Target": "Data/Characters",
"TargetField": ["Penny", "Appearance"],
"Entries":
{
"{{ModID}}.Penny.Spring_1":
{
"Id": "{{ModId}}_Penny_Spring1",
"Season": "spring",
"Portrait": "Portraits/Penny_Spring_Sun_1",
"Sprite": "Characters/Penny_Spring_Sun_1",
"Indoors": true,
"Outdoors": true,
"IsIslandAttire": false,
"Condition": "TRUE",
"Precedence": 0,
"Weight": 1
},
}
}
isthere a facing direction when you add a warp?
For the actual map property, no.
Hrmm... I successfully got Spacecore to target Penny's sprite and set a 2x resolution copy of her standing frame as a TextureOverride, along with a SourceSizeOverride of 32,64, but this definitely isn't what's supposed to happen 
oh my god 
It works correctly with portraits, though... 
love how shes using her boobs as a hair accessory. now that's fashion
"My eyes are down here, bub"
Is that what that weird thing on the top left is? I thought it was, I don't know, a beige-colored ghost.
Yeah it's the breathing overlay which is still in its original spot
But either way I can't fathom why TextureOverride would do this to NPC sprites and not portraits
This is what my json for Penny's first frame looks like, if anything sticks out
Removing SourceSizeOverride or changing it to the vanilla 16x32 size instead just leaves the top left quarter of the sprite but keeps her beeg
Is there a game state query for the amount of qi gems a player has
PLAYER_HAS_ITEM
when doing the 'trade item' thing for shops- can you specify two items and if so is it just lsited with a comma or do I add another line
you cannot have more than one tradeitemid
Weee I managed to make ze specific bait for ze fishy from the non-fish item
Now how to change texture >->
That is a problem for future me
you can't, not without changing it for every targeted bait item
ouh that sucks I wanted to make an entry that uses qi gems and a weapon .... that isssssssss agonizing
๐ฆ
Ah i can set the currency - and i think the default for qi's walnut room is gems anyways so this works very well :]
you can't use currency and also tradeitemid. it's either or
shops with both tradeitemid and a price set will require both
oh. my mistake!
however you cant set currency per-item
but if its qi's shop it doesnt matter
unless someone else mods the shop to use gold, i guess. or star tokens
qi gem shop still uses trade item id
ok I misread I thought Lily still wanted this
but yeah money and trade item (in this case qi gem) should work
qi gems is specifically set to currency 4, that said qi gem shop does actually still specify qi gems in the tradeitemid]
so i guess the currency field might just cause the qi gem pop up to display in the corner
...huh
https://github.com/misty-spring/StardewMods/blob/main/ItemExtensions/docs/ExtraTradeItems.md should do it if you wanted qi gems and another item
hey everyone I had a cool idea for a mod and Im struggling to locate something in the base game files, could anyone help me rq?
what are you looking for?
the scarecrow
Textures or actual code
both would be helpful
my idea is for a super scarecrow, and seeing the original coe would be very helpful
code*
you know, I was going to use item extensions for stuff anyways so this works out, thank you
scarecrow textures are in Tilesheets/Craftables
the crafting recipes for it would be in Data/CraftingRecipes
can I call you/ screenshare? im not seeing either of those I'm really sorry :[
is that a separate dll?
!unpack
Follow this guide to unpack the game's content files in order to see and explore how the game data is structured.
It's helpful when making your own mods, or just to learn about how the game works!
oh there's probably a command for this but I don't actually - thank you button
I don't know where the data for how scarecrows works would be stored though
in order to be a scarecrow, a bigcraftable either needs to have the context tag "crow_scare" or have "arecrow" in its name
you can affect its radius by giving it the context tag crow_scare_radius_# where # is a number of tiles obv
Utilize Mr.Qi's frightening presence to scare away crows today
Just be warned if you make the size big and use mods that show their radius it will cause lag
Maybe Pathos fixed Data Layers, I can't remember
for reference im using ILspy to peek at stardewvalley.dll and I cant find any of the data files we've referenced in trying to help me
๐
follow the instructions in the unpack command i posted
follow this guide <<
is there a list of all of these commands and stuff?
it's unpacking my game right now into a folder that will make all the files easy for me to view?
xnbhack is doing this
its unpacking your Content folder
It's very helpful, I've used it for years for modding and all of that
thank you
I'm confused..... the original scarecrow (BigCraftables line 114) has no context tags, but the deluxe scarecrow (line 1916) also has no context tag? even though it has a different radius?
this would be my first ever attempt at modding with zero code knowledge
only many years of gaming
.
just to give you an idea of who is asking
oh so because the title of the item has arecrow in it it doesnt need the context tag?
them having "arecrow" in their names makes them scarecrows. scarecrows that start with "Deluxe" get a radius of 17 if there is no context tag. if it doesnt have a context tag and doesnt have "Deluxe," then it defaults to 9
!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.
you'll want to look at the first bullet point there about content patcher
as you will not need any C# code for a scarecrow with a custom radius whatsoever
I was hoping to make a brand new scarecrow (well I guess 2 different workable concepts) that I want to try and make a new recipe in order to make it because it would be pretty OP
that would be done with content patcher
but knowing how to make it function the same way was what I was hoping to learrn?
like a copy paste but with edits?
(this is one of my favorite bits of code)
the things you found in Data/BigCraftables is how they function. thats the data that the game loads (converted into json by xnbhack)
in this case the vanilla scarecrows just happen to function entirely by name
if you made a new BigCraftable with content patcher but gave it the name "Scarecrow 2" it would function exactly the same as a normal scarecrow automatically
Reminds me of how stools function
....can I copy paste the idea notes I had? maybe that would be helpful for seeing how ambitious I am with this?
if its the size of like 20+ chat messages id put it on pastebin first but sure
waves hands at atra's idea of just nuking the addcrow function
@rancid temple and i have gone through the hoops of the crow thing, i don't know if roku figured out the building to have a counter of crows scared off but i've done it through harmony:
https://github.com/Aviroen/RoenCore/blob/master/HarmonyPatching/Prefixes.cs
this is new to me XD my bad
i wouldnt recommend C# or harmony to someone doing their first mod ever when content patcher is available and plausibly closer to what they want
ah yeah i saw the "looked at ILspy" and went "do you know what that entails?"
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
There's no debug code to clear error items, right? Someone in modded-farmers just brought up a question about if it's possible to remove museum items that become error items after the mod that added them is removed
i dont believe you can make a bigcraftable have a 2x2 footprint but someone more familiar with BCs or frameworks may correct me
that said all of this would require C# i believe
Normally you just throw away error items but unless there's a way to get them out of the museum again ..
ive never considered error items in the museum before.... im not familiar with a debug command for it
you can clear the whole museum, but...
not ideal. but possibly the only way
without a custom C# command obv
go into your save file directly find the museum inventory and set the requisite slot to say empty? not that I'd know
i think you could do that too, yeah, if you knew which item was an error item, since it'll still have the old item id
I ran into a bug where we lost a whole watering can in multiplayer so I had to debug give us back one
How are weapon levels calculated 
Cause I just made four weapons that are more powerful than the Infinity ones and yet they're calculated as lower level despite having all higher stats
I would like to see where this is. would you mind pointing it out for me please? โค๏ธ
in ILSpy you can search for the IsScarecrow() function and the GetRadiusForScarecrow() functions
!!!!!! thank youuuuu
on a real note though.... hairy though it might be, I'm convinced I'm can do this. If ConcernedApe can make the entire game by himself, I can learn how to make my one idea be a thing, surely, right? and on top of that......I just found out that you guys are here to help which makes me even more confident about it
you can, if you are willing to learn C#
it's probably better as a building
that's feasible too
if the 2x2 footprint is super important then probably
I thought about that but wasnt sure which'd be easier
I just realized that the actual weapon stats are not, in fact, accurate in the Weapon Json ... why? i have no clue but alright then
I figured for a thing that covers your whole farm a single block would be mildly......broken
no wonder its calculated as lower 
Mr.Qi's face on a scarecrow could do it
Scare the crows for miles
Do I make a Qi Crow... do I dare...
also it'd give me more pixels to play with when I wanna try my hand at art-ing
float weaponPoints = 0f;
weaponPoints += (float)(int)((double)((this.maxDamage.Value + this.minDamage.Value) / 2) * (1.0 + 0.03 * (double)(Math.Max(0, this.speed.Value) + ((this.type.Value == 1) ? 15 : 0))));
weaponPoints += (float)(int)((double)(this.addedPrecision.Value / 2 + this.addedDefense.Value) + ((double)this.critChance.Value - 0.02) * 200.0 + (double)((this.critMultiplier.Value - 3f) * 6f));
string qualifiedItemId = base.QualifiedItemId;
if (!(qualifiedItemId == "(W)2"))
{
if (qualifiedItemId == "(W)3") weaponPoints += 15f;
}
else weaponPoints += 20f;
weaponPoints += (float)(this.addedDefense.Value * 2);
return (int)(weaponPoints / 7f + 1f);
Best tip for SVE pixel art is to never outline anything in black - CA doesn't really do that
Nightmare inducing thank you
if you do make a qi-crow......please help me make my eye-of-sauron-esque super scarecrow too?
I think the only thing I've encountered that was officially outlined in black was Mr.Qi himself in like one spot maybe
unless its a simple reskin
Oh no I would just make a scarecrow using C#
that'd be different
content patcher?
lit, I actually love that idea
It will make a great addition to my Qi NPC mod
did you read the idea notes I had lily?
a sub idea I had woud be to take the actual counter for crows scared....and have it make resource every tick
crows eaten -> turned into bug goo -> I think is hilarious and cool at the same time
I didn't see that no - Pff that's horrifying but also neat
That sounds like a nightmare to code though, as far as I'm aware you wouldnt be able to use CP for that
watch me become a pro in like a week and a half KEKW
pain
I appreciate you guys tho fr
I'll be back/around
Question, are books like regular items, i.e., could you use them as machine input/output?
books are just regular items yeah
their functionality is controlled by their category
sweet, I have a silly idea I'll think about tomorrow
(the reading part i mean. the item id is v important too obv)
Qi crow is just as horrifying as i thought it would be
can I request a rarecrow custom edit? LUL all 4 ninja turtles, master splinter, shredder, beebop and rocksteady
random idea I just had
I think there's a forum you could add mod requests to :3
Oh my god wait im level 25 I can get the mod author role now :O
๐ฎ woo
!modideas
If you have a mod idea that you aren't planning to make yourself, you can put it in the mod ideas github: https://github.com/StardewModders/mod-ideas
However, this does not mean anyone is guaranteed to work on your ideaโmodders who are looking for ideas sometimes go through and work on what they find interesting off this list. If you want to pay someone to make your mod idea, there are a few people who do commissions (mostly art, sometimes code); you can ask around, search usernames for the word comms, or see !commissions.
Whatt that looks really good actually
I didnt realise how much like a scarecrow mr. qi naturally looked
I think I would probably cut it off 3 or 4 pixels higher
No no not the pixel art (i think my qi sprites look nice actually which is what I took that from)
just.. i hate it looking at me
make it a machine and when you feed it qi fruit it waves its arms
what did you name it?
I named it Qi Crow but added the scarecrow context tags
apparently UI Info Suite 2 only checks for the existence of the string "arecrow" in the name to decide if its a scarecrow
and does not use IsScarecrow()
i think you should keep it as Qi Crow tbh thats a UIIS2 issue not yours
Yeah but the radius is really helpful (to myself and anyone else who also uses UIIS2)
yeah, but its something UIIS2 should fix, not you
Huh.. it still isnt working after changing the name actually
did you spawn in a new item?
I did - I thought it was just the patch reload thing not working right with the translation stuff but nope it just... did not
"Action": "EditData", "Target": "Data/BigCraftables", "Entries":{ "{{ModID}}_QiScarecrow":{ "Name": "{{ModID}}_QiScarerow", "DisplayName": "{{i18n:Aos.QiCrow.name}}", "Description": "{{i18n:Aos.QiCrow.description}}", "Price": 5000, "Fragility": 0, "CanBePlacedOutDoors": true, "CanBePlacedIndoors": true, "IsLamp": false, "Texture": "Mods/{{ModId}}/QiCrow", "SpriteIndex": 0, "ContextTags": ["crow_scare", "crow_scare_radius_25"],
you have a typo
oh my god
does it work after fixing that?
Sorry I had to take care of an issue in another server - yes it works great! And I can keep the translation name so it reads as "Qi Crow" still :D
i love this way too much, but he is just standing there... menacingly /lh
@light jasper any chance of changing ShowItemEffectRanges.cs to use Object.IsScarecrow() instead of checking for Name.IndexOf("arecrow")? currently items with non-standard names that work as scarecrows in game wont actually show their effect ranges, because the game checks for a context tag first (in the aforementioned IsScarecrow() function) and UIIS2 does not
I'm glad you like it, I hate it in a loving way, you know? He's scary
He watches over all
drives away crows through his sheer aura
Is the Qi Gem limit hardcoded 
I didn't even know there WAS a limit for those
at least not such a low one
oop i missed this reply but personally, i just publish my farm maps as either a replacement OR an AdditionalFarms one for convenience. I've moved to the AdditionalFarms format for a long while because of how in control I am of the map design 
due to the amount of farm maps out there, imo as a user custom farm types are more appreciated. If you ever want to try making a custom farm there are guides on the wiki, but the gist is that you have to learn the AdditionalFarms format and how to create a Location data for your farm. feel free to dissect and study my farm map files (that's what i did while learning!) or hit me up if you need help 
i don't remember specifically if the overflow of qi gems was fixed 
last i remembered about qi gems is that going over the limit just resets the counter
maybe it is a hardcoded limit 
also tbh i prefer the additionalfarms method because then i'm not fighting demons with all of the editmap things if something happens
Yeah it just resets itself after 999
Which is inconvenient because what on earth is the point of having a qi gem crop (that regrows) if you can't collect a bunch of them
Runing my plans >:[
maybe you can set the time in between harvests to be longer?
I mean it takes 14 days but ... still
I was adding an upgrade to the Infinity weapons using them :(
about qi gems, it seems like that's just a bug/limit with the display, but 1000+ gems should still function; there's no specific limit to them in the code
https://stardewvalleywiki.com/Qi_Gem#History
I prefer people making translation mods, so I don't need to tinker with them. They can get the DP for the translation, I think they deserve it (the sums are minuscule, anyway). And I've several times found great mods as someone's uploaded a translation and it has popped up in the list of "New". So I think people may find my original mod that way, too.
Plus all the languages having wild translations... My mods are always bilingual -- English and Finnish.
is there a mod that prevents me from destroying my crops with the axe by accident? I am constantly doing it by mistake.
sure, ask in #modded-stardew
I keep doing that. I forgot to switch channels after asking a mod making questions
is it possible to get a list of fruit trees and select the sapling of one based on what fruit it outputs using content patcher
Nope
that makes my sapling maker mod alot more tedious to implement
I mean, you can, but you can't apply a general rule, you've got to match every single ID
My mod, MPS, does this with its Seed Makers
You can use C# or do everything one by one
content patcher doesnt do lists, loops of items, or more complex functions like that (unless already supported by a gane GSQ, which sapling output is not)
c# is prolly my best bet then cause i know c#
what you can do is to implement in C# an item query
like quindao.ModName_SAPLING_BY_PRODUCE <produce qualified item id>
then u can use that in shops and stuff
that will work
Is there a way to make an NPC have a different dialogue based on a SPECIFIC item or context tag?
isnt that just done via dialogue
Like as a gift response?
yes
you can take a look at vanilla npcs for an example ?
im not sure about context tags but i know you can 100% do that for gifts
yeah, context tags might be harder
https://stardewvalleywiki.com/Modding:Dialogue#Item_dialogue
AcceptGift_<id> or <tag>
Like for example, Loved gifts for my NPC include food_sushi and coffee_item But I want the coffe items to have differring dialoge from the sushi
Oh, lol thanks roku
oh yeah that's absolutely possible
idk how i didnt realize you could do context tags ive literally done it myself
context tags my beloved
i feel like i should have just made my own context tag instead of listing out 20 something individual items but
oh well
Also...did y'all know....Mosses are small, non-vascular, flowerless plants that are part of the taxonomic division Bryophyta
Those sure are some words 
like. the moss and stuff on rocks?
Niether is the person I am making this NPC for...He just has a love of plants
i made a whole NPC and what i learned about was myself ._.
I really wish AcceptGift was AcceptItem instead. It bothers me that it's RejectItem and AcceptGift
I made (half) an npc and i learned nothing ๐ญ
But like real talk, I'm still super happy that the NPC is at least IN the game...even if not where I want him
i decided it's only a gift if they accept it and allowed myself to become unbothered
im making an npc and all ive learned is that qi scares me as a scarecrow
im still hung up on the events 
(but i do frequently make errors because they use different words, so that's still annoying)
Events are pretty hard... i dont know how many times I watched the four heart event I coded but it was a lot
I have that entire dialogue memorized
MOOD
tbh, my issue is less the technical part, and more the actually needing to write the dialogue part
do you not enjoy writing?
ehh...
You could always work with someone to help you if you don't prefer it
The dialogue was the easy part for me
im just no good at coming up with ideas
in my experience there's an extra editing pass after coding up the event. i write some shit and it sounds or feels good, but then i put it in the boxes and it becomes wrong and i have to make edits
Someone make an event builder like we have a NPC builder lol
The amount of edits I had to make just to make sure the animations worked and the npc moved just right and then the timing was perfect...
there's an NPC builder?
I run the event - i see that one thing is slightly off, i fix it, i run the event again, its still wrong, repeat 4739874974538 times
Well, considering the NPC builder is outdated, wouldn't be hard to make something equivalent
It is? I mean I'm using it now and it doesn't seem all that outdated...
Unless you mean fireredlily's
miss coriel was making an update but i don't know how far she got on it.
fireredlily has a spreadsheet version or something which probably works better
The one I am using is a google spredsheet
That's probably fireredlily's then
Ye
It is
I'm also using this guide https://stardewmodding.wiki.gg/wiki/Tutorial:_Making_a_Custom_NPC
How do I make it so that my messages don't have the embeds when I send them?!?!?!? ๐ญ
<put your link between angle brackets>
Facepalm
i don't think that's a facepalm. how would you know that in advance
Also, I noticed, the server doesn't like people trying to do tiny text
Because I forgot it
ah yeah subtitle text is verboten
I only know that because Pathos mentioned it near when I joined 
But headders are not? 
well yea, that's a emote technically
The tiny text unfortunately mimics official discord messages in some capacity
yeah, the subtitle text lets you convincingly imitate Official Discord Messages so it's an anti-spam measure on a server as huge as this one
brb crying
when i try to updload a new version of my mod, nexus loads forever. anything i can do against this issue? it persits since a few days
I can't remember the last time I saw an official Discord message lmao
same lol
Vortex or Nexus?
nexus^^
if nexus is acting up again
I can...because it happened in my server two days ago
I know there was recently some database issues for Nexus
aah
you might just have to wait for it to behave
nexus is just Like That Sometimes. depending on where you are in the world you may have better or worse results (CDN)
is it normal to take several days?
I think it imitates the โthis message is only visible to you. dismissโ thing, and ppl can replace the dismiss link with a malicious link
I once couldn't fix a mod page for 3 days
I should organize my assets folder but I truly do not want to ever forever
ou :/ okay
i'm midwest europe
(stuff like that is also why masked links are forbidden on here)
So like, I have another question. Is there update keys for curseforge? XD
Yep
theoretically there should always be a popup for external links, but Iโm guessing some people just click it automatically without thinking
SOBBING Now I have to put them in all my mods ๐ญ
You know what? no...I'm not gonna because I know CF will alert people to updates
whatโs wrong with cf?
everything
never used it so Iโm out of the loop
I was too, but a few of my friends liked my mods and didn't want to deal with the ads on Nexus and don't have money for premium so yeah...
ah, I see
i only ever used curseforge for minecraft but i gave up bc i hated the weird site layout
I mean...the company behind it (twitch/amazon) might be bad, but it's lowkey kind of easy to make dependencies auto install for people...
Oh yeah, I wasn't even considering parent company lmao
is split screen coop common enough for people to assume mods are compatible with it???
I wouldn't just assume their compatible, but I'm unsure what kind of things cause issues with split screen
I usually test my mods in split screen anyways
most mod authors i know on here ignore split screen as a concern entirely (myself included)
If I didn't just always have a controller plugged in, I would just ignore it lmao
i don't really have a controller, so it's not really available to me to test
Testing split screen is way easier than testing multiplayer by yourself
i do test multiplayer, which suuuuuuucks
Trying to deal with jumping back and forth between programs is annoying
I test, multiplayer, split screen, and controller XD
I'm still avoiding UI, so I haven't really needed to test controller
I just have a fruend help with multiplayer
luckily this mod has no keybinds so controller shouldnโt affect it lol, but I donโt think itโs compat with any kind of multiplayer
honestly im so glad that nexus has the mod author rewards thing - its nice to have premium without needing to buy it
100%
Split screen isn't that hard to support. Controller is easy too as long as you have a controller for testing.
but now I must go. Have a doctor apt
i have 3 months of premium that i havent claimed
i dont use nexus that often to justify it
Good luck!
Unfortunately I donโt :/ so I donโt put any effort in
I had just activated one of my free months when I hit 30k, had to wait for it to run out before I could active the lifetime
I had like six months but I only redeemed it whenever I would actually go on my account - now I got the uhhh lifetime one once the one i have currently runs out
dang
If someone points out an obvious thing to do for controller I will, I otherwise donโt do anything
Do you want a controller?
And sticks
Triggers too. And a d-pad.
Normally I prefer controller for games, it's just more comfortable
I didnโt grow up playing video games, so I mostly know them from occasionally playing smash at a friends house
And there I just button smashed
But something about the grid-ness of SDV makes me hate using a controller
I assume thatโs why itโs called smash
It's actually because playing it with your friends makes you want to smash their console
Yeah, I vastly prefer Stardew with mouse and keyboard.
(I was actually the turd who was too good at Smash and made it not fun for anyone but my brother)
Controller also has some weird quirks in SDV that just make it really annoying to use
I have to install SVE to test my mod with it. Wish my poor computer luck, I don't think it can survive this
Just gotta make an install that's only your mod, SVE and SVE's dependencies. Best chance of success
I don't see a reason why my mod wouldn't be compatible with it as things are right now, but someone commented that I should make it compatible and I can't tell if they tested it or not
Almost certainly not
To be fair you don't HAVE to make it compatible
being above average at smash is a bit of a killjoy, isn't it
๐ "is this compatible with sve?"
I love compatibility, it's the whole reason why I didn't want to have to make an entirely new npc for qi... but like, SVE modifies a l-
WHAT
I mean it would be nice bc so many people have it installed, but it's so weird how people assume everything is compatible with everything. The person listed like 7 mods they expect to have compat with
no. no it isn't
At least there was always tournament people who I could point to and say, at least I'm not that bad right
Again I love compatibility but like, it's so hard to thing of every single thing that needs to be done to make a mod compatible with stuff
Mods themselves are hard to make, adding compat for like, every single thing someone could ever create is ridiculous to expect
Another reason I tend to avoid maps and stuff, don't wanna deal with SVE compat 
I know damn well im going to get comments on if my mod is compatible with SVE even though im going to put it in the description because people do not read
at this point i think im just gonna say "feel free to make your own personal compatibility patch."
also it's one thing to make a mod compatible with the main way of doing things in a way that doesn't clash with other mods, but another thing entirely to have to code a new thing for each mod you want to be compatible with like I did for RSV because it does its maps weirdly
I love SVE I truly do - I wouldn't be a council member over there if I didn't - but like.. that whole 'is it compatible with-' is so infamous it makes me shiver
Does it? I didnt know that
Been a hot minute since I cracked open RSV's files, can't remember lol
I think people forget that they arent the only one asking for a mod to be compatible with something. If one person wants compatibility with Ridgeside and another one wants compatibility with SVE and so on it becomes a lot to code in
as I suspected, the mod is compatible with sve and they just didn't check ๐
Meanwhile, with SVE it's like a daily occurence
well, because the nice unified way to do world maps is new to 1.6, RSV still uses its older map which it did differently. So not their fault, just a different system
It's because of how much SVE edits ... I actually hadn't realized it edited the weapon stats for the Infinity weapons so I had to go and make a whole different set of stats for the weapon if you were using that because otherwise the trade in wouldnt even make sense
is there any part of the game that sve doesn't edit?
The skull cavern enterance map
I would wager the actual mines and volcano dungeon lol, just because those are busted to mess with
"make the mod compatible with SVE" it IS
I found that out when I was testing my compatibility with it so far 
people truly do not read
And are very entitled
tbf I didn't put that in the description because I only just checked, but they also didn't check before complaining lmao
I felt so bad for the Deep Woods mod author - I love that mod so much but the amount of horrid comments they were getting was ridiculous - idk how people expect others to just make something in .2 seconds
meanwhile i've been staring at this damn event dialogue for so long ๐ญ
Why are you just staring at it
if i stare at it long enough, maybe it will write itself
Unfortunately not u_u
๐ shame
I wish I could only do dialogue for my qi mod it would be so easy.. but nooo i had to go and add weapons and crops and a scarecrow and ten billion other things
ah yes, scope creep
No no, I have a whole list of what I want to do (though I have added a few more things once I thought of them), I just am complaining because it would be easier if I just didnt do those things. I'm gonna, and it's entirely possible, im just lazy
Is there a way to make a parameter like "MinStack" or "Amount" configurable through GMCM? For example, I change "DaysUntilReady" with "{{x Machine Production Time}}", but the same thing throws an error for those fields
the people complaining almost certainly don't understand the scope of the task. all they see is "mod used to work, game updated, mod broke, what gives", as if the update must have been minor and therefore so must be the work to update the mod
Just download the 1.6 magic compat wizard \j
get scope creeped, nerd /j
Sometimes I think "is this compatible with SVE" is a secret passcode to a club and all of us aren't in it, like an inside joke 
Depends on how the code is parsing those provided arguments
(closed) could not replicate bug: controller is out of battery.
I've definitely provided like Price with a value from a config, which parses as a string
is this message compatible with sve though
No, I am woefully uncool 
Price normally would be an integer, but because the code can convert it, it's fine with receiving a string of numbers
am I compatible with sve
๐ค
is stardew valley compatible with sve
If it's throwing errors, likely whatever your supplying the string to can't convert it to the appropriate type
"Id": "AbigailFriendship",
"Condition": "PLAYER_HEARTS Current Abigail 4",
"Modification": "Add",
"Amount": 1
}```
I want to replace 1 with something that allows people to introduce the value they want
Also me when talking to people my age

"DaysUntilReady": "{{Chocolate Bunny Production Time}}"
This is what I have for DaysUntilReady, for example
๐ญ why do i feel old sometimes talking to people my own age?
simply do as i do: pretend the comments that don't read do not exist 
im always scared of the comments on my own mod pages
Or delete them 
(i also ignore anyone who claims they have an issue but dont even provide context, aka. a SMAPI log and/or image of said issue)
to be fair, i did warn that i would ignore them lol
I feel bad rn bc my mod is so new lmao, but I'll definitely get there. There's a game where I'm the main person doing mod-type things (not quite modding but close) and I've stopped answering messages there almost entirely 
What's the error you're getting?
got one a week ago with basically no info. asked for a log, as you do... crickets
None for that one, but if I add {{Added Amount}} to "Amount", Notepad highlights it as orange (which I assume is an error)
I still love the one I got where when I asked for a log I was linked to a youtube video of a 2 hour stream of them playing with friends
i dont even bother asking for their log atp
that calls for the block button atp, that is not something any of us should be willing to interact with 
i already gave instructions and warned that i would ignore comments/reports that dont provide what i instructed. if you dont follow it youre on your own buddy
They at least provided time stamps for where the issue occured (it wasn't my mod causing the problem lmao)
that's where the (second) most cursed bugs are found
I'd recommend actually trying it in-game, though add quotes around it if you haven't, like with the other one
"Amount": "{{Added Amount}}"
I'm not sure about Notepad re:syntax highlighting, I would test it in game instead
technically those fields don't accept* strings (quoted text), but CP generally converts quoted numbers into actual numbers on its own
Got it! Let me test it out. Thank you both for your help โค๏ธ
You don't want to know how many scientific papers I have read through for mods
Including am entire book on mushrooms
Sounds like the best of both worlds
is there a guide to starting with making farm maps?
https://stardewvalleywiki.com/Modding:Farm_data
I think just this page and the Maps page
ty!
If you look at Farm_Ranching, it's the most recent Farm added to the game and is added through AdditionalFarms
Though if you want to mimic it's Coop starting mechanic, that requires SpaceCore
I think I remember another mod being able to do it, but I'm tired and can't recall which
tyty ^^
For future reference, it does work like this!
Tfw you made some 20 something npcs a piece of your personality down to the tingly feeling you get in your toes after several months of introspection 
New quote added by tiakall as #6275 (https://discordapp.com/channels/137344473976799233/156109690059751424/1319332119771615373)
any idea if someone uploded an npc portrait template? i wanna know to make sure that i am aligning the portraits right
There are really just two things to do: (1) use configurable keybinds instead of hardcoding keyboard values, and (2) don't write your own UI code from scratch unless you're actually an expert on that sort of thing.
I mean, unpacked is pretty much a template for everything 
I take vanilla portraits as the undermost layer when I'm first starting, yeah
pretty much
If you have a program that let's you have a personalized grid you'll be better off
ahhh
any idea how to reach the artist for Seasonal Outfits - Slightly Cuter Aesthetic? i am this close to editing the nyapu portraits for personal use as i cannot live without seasonal outfits ;-;
I have seen some nyapu portrait for sca outfits mods
If you setup your mod in a way that requires sca then it's fine to do whatever
it's just a color edit iirc, so it's not accurate to the actual outfits, so i think what they want is to actually match the outfits?
basically yeah. it has the winter, beach and regular outfits
but id like to match to the outfits in sca
so I'm peeking at the building data, and it says builder 'Robin' ..... can I make a different villager do the construction??? Would I have to add sprites of them all holding a hammer? XD
Robin is hardcoded to do all physical construction
Changing Builder there lets you set up other NPC's to sell buildings
(mod that makes seb step up and help his mother out XD)
As someone who codes all day and occasionally thinks they can handle minor repair work around the home, I suggest not making Seb do anything of the sort
intriguing, I love it, because I had an idea for an awesome building and tbch? I'd rather have Krobus sell this building
Bro gonna hurt himself and screw up the project
lol, maru would definitely be the better candidate, if anyone
@rancid temple here's the idea
Instructions unclear Sebastian is screwed into the light fixture
how many people does it take to sebastian a lightbulb ๐ค
Oh it's like a mean version of the Crow Feeder building I wanted to make
Well, that I did make, I just haven't finished working on it
Wanted to add in them giving you random crap
If you're doing a building though, you're gonna have to use C# and Harmony to affect the crow mechanics
Omg friendly crows bringing shinies so wholesome.....meanwhile I've just been convinced crows are the enemy
Is harmony another coding language?
my next qol mod will be one that lets you designate a category/filter (e.g. Iridium Crops) for a chest I think then has one button to put everything from your inventory that matches into that chest but I'll need to figure out some UI stuff to do that
๐ญ
pretty sure better chests does this
ooo let me check, if it does that's amazing
I know if you hit z it sends your items to the chest they have stacks in
and you can set categories
I'll have to mess around with it, ty
Can someone help me with changing the water color of a fish pond? I can't seem to target the field I want to add/change.
It's a legendary fish so the pond gets colored purple by default, I would like to change it to yellow.
"LogName": "Pufferchick Water Color",
"Action": "EditData",
"Target": "Data/FishPondData",
"TargetField": ["{{ModId}}_Pufferchick", "WaterColor"],
"Entries": {
"Id": "{{ModId}}_Pufferchick",
"Color": "255 255 0"
}
},```
Log: <https://smapi.io/log/925484000f554fcba0d7fe604b837443>
Log Info: SMAPI 4.1.10 with SDV 1.6.14 build 24317 on Microsoft Windows 11 Home, with 41 C# mods and 18 content packs.
According to the log there's no entry in Data/FishPondData for Gervig91.StardewAquariumCP_Pufferchick
Yea I haven't added any entry, it just sems to work by default, maybe because it's a legendary fish?
You can't change the color on a fish that's not in that data
LegendaryFish WaterColor CrimsonFish
It's probably just using the default value
but hm do u want the LegendaryFish produce list?
I'm okay with the default produce it has now, I just want to change the color of the pond
yea then its like this
for targeted fields
Yeah, any fish marked with the context tag fish_legendary will use the LegendaryFish entry
change crimsonfish to pufferchick's id
If you don't match one of the existing legendary Ids then it'll be default
You could also add pufferchick to that list
I didn't even know the legendary fish were in here, I don't think they were before
added in 1.6.9 i believe
I should probably become more familiar with this new stuff if I'm gonna start telling people to stop using my fish pond color mod
genuine question, how did you guys get into making stardew mods? i can't find a lot of tutorials out there or guides.
!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.
...remind me in 4 hours to make sure I put fish_legendary in the fish tutorial
Or don't, it's fine
i saw things i wanted to change. i noodled around a bit but i didn't really get into it until a reddit shitpost gave me the incurable drive to make a specific mod. then i simply never stopped
I wanted to add to or change a few things from mods I was playing with, and decided to try it out
The wiki does have a lot of good information if you can find it. Also, the githubs of SMAPI and Content Patcher help if you know code
I really like how many comments are in the code files
be the change you want to see and stuff
one very very lengthy dialogue mod got me to write my own lengthy unhinged dialogue mod, and my own curiosity has driven me to process my own expansion 
never worked with NPCs before, does ForEachVillager also include NPCs from other mods?
yes, the game doesn't know the difference
yeah the wiki is quite good for technical details (although some stuff is still a bit helter-skelter since it hasn't been fully migrated from 1.6 migration pages to the normal ones, so you have to dig a bit rn). most stuff i learned from wiki pages, unpacked assets, and a decompile to check the source
im doing this rn
in terms of learning i will not advocate for what i did, which was pick apart said dialogue mod and understand each and every process as i like to Figure It Out on my own
most of the times i just search this discord chat for keywords
hit and trial everything until it works
Is this not how one is suppose to learn to code
not if you're trying to use CP in 1.6+
there was a lot of information that i had to shed because there was a drastic change for npcs between 1.5.6->1.6
I just throw stuff together until it works, then go back and figure out how I did it
i should specify that actually
don't use a highly technical mod as your form to learn from*

ooh okay! thank you all for the advice!!
If you get stuck, ask for help. There are some very helpful people here
generally if you're open to learning this channel is open to help
(as well as being sincerely grateful to those who help you, we all love headpats here)
alright, will do. for now im just trying to get the basics re-understood. last time i attempted i pretty much ripped it from the tutorials online and i actually want to know what i'm doing lol
basics are like, change portraits/world sprites, add a line of dialogue somewhere, write a very very basic event, and you'll start to see how everything interacts
Tried doing it like this now, but it still doesn't seem to work.
"LogName": "Pufferchick Legendary Fish Pond Color",
"Action": "EditData",
"Target": "Data/FishPondData",
"TargetField": ["LegendaryFish", "WaterColor",],
"Entries": {
"Id": "{{ModId}}_Pufferchick",
"Color": "255 255 0",
}
},```
Log: <https://smapi.io/log/4d67f6bc67f54f6da4744dae409c9b34>
Log Info: SMAPI 4.1.10 with SDV 1.6.14 build 24317 on Microsoft Windows 11 Home, with 41 C# mods and 16 content packs.
Uber is dot-phobic
you forgot the condition field
Id is only for identifying
it's optional?
Remind @brittle ledge in 3 hours to put fish_legendary in the fish tutorial
hey siri remind me to remind aviroen in -- oh woops they weren't supposed to see this NOTHING TO SEE HERE I'M A REAL BOT (#6428346) (3h | <t:1734646968>)
it's optional as in "if you don't specify anything this will match every fish"
wanted to cook my own food because most farm maps out there do not fit my specific standards. i already have experience in making maps in rpg maker and while it was definitely very different on the technical aspects, it did develop my eye for design combined with user convenience, so it just went naturally from there. i simply needed to learn how mapping works in SDV 
I got into mods because I wanted to fix a broken BFAV mod and also have Bulbasaurs on my farm 
tbh it depends on the mod,, some have easier learning curves than others, some rely on your other soft skills (i.e. aesthetic mods)
I'm targeting the LegendaryFish field
the game also already has a Default field with no condition, so your entry is never checked
I feel like this is one Conditional field that shouldn't be optional lmao
let me clarify, what you need is:
- Move your entry to the top of the
WaterColorlist so it gets checked before theDefaultentry - Add a
Conditionto it so the game doesn't use your entry for every legendary fish, just yours
How do you move an entry to the top of a list?
Also the other legendary fish have conditons like: "Condition": "ITEM_ID Input 159 898". How do I figure out what that is for my modded fish?
and you gave your modded fish an id, so you use that
for game state query conditions, see https://stardewvalleywiki.com/Modding:Game_state_queries
in this case you want ITEM_ID Input {{ModId}}_Pufferchick
Can somebody help me with drawing sprites? I have no idea what I'm doing really. I'm trying to copy the game code, but the code for drawing is all over the place and I'm not having much success tracking down where/how I should do things.
This is what I have:
private void OnTick(object? sender, UpdateTickingEventArgs args){
if(Context.IsWorldReady){
for (int i = 0; i < Game1.onScreenMenus.Count; i++){
if(Game1.onScreenMenus[i] is Toolbar toolbar){
DrawToolbarNumbers(toolbar, Farmer.hotbarSize);
}
}
}
}
private void DrawToolbarNumbers(Toolbar toolbar, int cols){
for (int j = 0; j < cols; j++){
Vector2 toDraw = new Vector2(Game1.uiViewport.Width / 2 - 384 + j * 64, toolbar.yPositionOnScreen - 96 + 8);
Game1.spriteBatch.DrawString(Game1.tinyFont, toolbarLabels[j], toDraw + new Vector2(4f, -8f), Color.DimGray * toolbar.transparency);
}
}
- I'm not sure if UpdateTicking is the correct event to call this method from (does it even need to be called every tick?)
- As written I'm getting an error that says I need to call "begin" before calling "draw string," but I'm not sure where to put that.
you can only draw stuff to spritebatch in specific places
when the spritebatch is open for u to draw
maybe onRenderingHud instead of ontick
this is why i just harmony patched draw so i dun have to figure it out 
I did not see that there were drawing events, I will look at those
smapi event is an option yes, but it does look like u are draw shit to toolbar
@brittle pasture Tried this, but still doesn't work
"LogName": "Pufferchick Legendary Fish Pond Color",
"Action": "EditData",
"Target": "Data/FishPondData",
"TargetField": ["LegendaryFish", "WaterColor",],
"Entries": {
"Id": "{{ModId}}_Pufferchick",
"Color": "255 255 0",
"Condition": "ITEM_ID Input {{ModId}}_Pufferchick"
},
"MoveEntries": [
{ "Id": "{{ModId}}_Pufferchick", "ToPosition": "Top" }
]
},```
Log: <https://smapi.io/log/2d617b12d3ba4ebcb3048df68788b9b7>
Log Info: SMAPI 4.1.10 with SDV 1.6.14 build 24317 on Microsoft Windows 11 Home, with 41 C# mods and 16 content packs.
so if u do the harmony route u can get access to useful instance var
WaterColor is a list of models
You need to encase those 3 fields in a containing model, named the same as your Id
{
"LogName": "Pufferchick Legendary Fish Pond Color",
"Action": "EditData",
"Target": "Data/FishPondData",
"TargetField": ["LegendaryFish", "WaterColor",],
"Entries": {
"{{ModId}}_Pufferchick": {
"Id": "{{ModId}}_Pufferchick",
"Color": "255 255 0",
"Condition": "ITEM_ID Input {{ModId}}_Pufferchick"
},
},
"MoveEntries": [
{ "Id": "{{ModId}}_Pufferchick", "ToPosition": "Top" }
]
},
like that
here is example
most of the draw happens in the postfix via this
https://github.com/Mushymato/StardewMods/blob/main/FullInventoryToolbar/ModEntry.cs#L403
transpiler for replacing the calls
Thanks that worked!
if u dont need to change the original toolbar's drawing, u can do all your draws in prefix/postfix
Putting it in renderedhud seems to work (except that the size is completely wrong, gotta go figure out why lol)
Does tinyfont only support a small number of characters?
(Just numbers or something?)
what are you hoping to do
the tiny digit stuff in game draws sprites not text and yea only 0-9 digits
I'm trying to replace the default toolbar labels (1,2,3...-,=) with custom labels (and then use similar custom labels for other things as well, but I'm starting with this)
Yeah, that's exactly what tinyfont does. The rest is not tiny at all.
oh you shouldnt need to write any draw code then
But the tiny digit sprites used in item quantities are not tinyfont either. That's a different thing.
public string[] slotText = new string[12]
{
"1", "2", "3", "4", "5", "6", "7", "8", "9", "0",
"-", "="
};
just change this its public 
Well my mod also enables gamepad mode so it's either draw them myself or copy the entire toolbar draw function in order to remove the one line that prevents it from drawing the labels if gamepad mode is enabled lol
I will also be adding similar labels to other places that don't currently have labels so I'll have to draw stuff at some point
transpiler
chop off the check for gamepad mode
anyways u can see tinyfont in Fonts/tinyFont.png
in the unpacked
its not very tiny for most things
for your particular case it might be good to get one of those key bind icon sets
this one's free 
theres pixely ones on itch io but usually u need to buy
this one perhaps
these r pretty big but u can draw it at 1x instead of 4x (default)
I'd need one with keyboard (despite enabling gamepad mode my mod is not in fact for controller users
)
hi! does anyone know what could cause a vanilla farm to load instead of a custom one? i tried to make some small edits to a map that previously worked totally fine and now its broken :( it has all the tilesheets it asked for
Genuine question first, how hard would it be to just extend tinyfont (or make a new tinyfont) myself?
its got gdb-keyboard-2.png for keyboard
u can load ttf fonts i believe, there's font mods
@teal bridge is there a way in the Radial Menu Api for me to know whether the primary or secondary action button was pressed? I'm trying to allow different actions between the two.
Dumb question. Is there a tutorial on how to do overlays? Such as a ginger vs light brown hair version or blue/green/purple eye version? On the wiki that taught me how to do seaonsal outfit wasn't seeing anything for overlay but am unsure if it is just called something else.
If it's an NPC doing hair isn't very different from doing outfits.
Should be - that's the MenuItemAction argument. It's not "primary" or "secondary" per se, it's "select" vs. "use" because that's the usual semantic meaning, but I suppose you could use it for any purpose you wanted.
heya all, new Modder here, I'm looking for a way to do something when a big boulder is destroyed while in the mines. I learned that those are called resourceClumps. The problem is im not seeing any way to do this using SMAPI world events, the do not show up in the ObjectListChanged, TerrainFeatureChanged or the other events. I looked up the custom resource clumps mod, and noticed they do most things with harmony, is that my last resort? I can code so i'm not afraid of harmony, but if there is another way to get a hook in the right spot I would love to know it.
i think they r big terrain features?
They should be under GameLocation.resourceClumps
hm nope GameLocation.resourceClumps
you can directly use the net collection events
this example is with location.terrainFeatures, a different netcollection
but the event work the same way
Right OnValueAdded on that collection then
can I set a priority with it? Such as, for example, it has a rain cloak that would apply as well, can I make sure the cloak applies overtop the hair or do I need to do fully seperate sprites/portraits for each hair color/eye color option? Trying my best to reduce bloat
Doesn't atra always say to not use those net collection events lmao
!cp
Content Patcher (https://www.nexusmods.com/stardewvalley/mods/1915) is a mod which loads content packs to change the game's images and data without replacing XNB files. If you want to make mods using Content Patcher, start at https://stardewvalleywiki.com/Modding:Content_Patcher.
I recommend by checking out how to mod using Content Patcher. That is all possible, and it's well-documented.
atra themselves used net collection events for things. i dont think theres anything wrong with the net collection events. arent they what smapi uses too?
Not sure, atra does do a lot of things they suggest to not do 
might just have to make sure you're discarding the event handler or somethin idk
Maybe it's a "for your sanity" thing
i dont know much about things
And stuff, me too
nvm broke it even more and have to start over oops
my understanding is, atra says to use these instead of harmony but atra also says make big ol disposal class to clean up after yourself
in my case i am removing my handlers when player leave area
okay, another stupid question. how much dialogue is necessary for an npc or like whats reccomended? i'm trying to just make a basic npc to get started right now, so bear with me.
Yeah I figured this was the type thing you need to remove, like eventlisteners in JS. Thanks I got my event on boulder removal!
You could just give them a dialogue for each day of the week and call it done
Technically speaking I don't think any dialogue is necessary for them to load in the game, they just won't talk to you
okay, but like after the week would they just not talk or would they like repeat the same lines?
If you just do Sun through Sat then they would just repeat every week
oh okay! thank you!
you may also want to include an "Introduction" dialogue key for the first ever dialogue with the NPC.
ah okay, thanks. gonna look on the wiki some more ๐ซก
(to be clear thats not required, just very highly recommended. the more dialogue the better, really. as much or as little as you want to write, so long as you have the days of the week!)
okay! also, one other thing. what is an "entrydll"?
nothing you need to worryu about for a Content Patcher mod, it should not exist in your manifest
thats for C# mods
it tells SMAPI what compiled C# code .dll to load
ah, okay great.
if you're making an NPC, has someone already posted the npc command for you?
no, i dont think so. how do i even see what commands exist, anyways? would probably be helpful lol
!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.
-
NPCs no longer use dispositions, check the wiki page for the new NPC data.
-
Aviroen has put together a template that will allow you to easily create a romanceable NPC.
-
Feel free to jump into the https://discord.com/channels/137344473976799233/1277457201077813280 thread for more interactive feedback and help!
-
Fireredlily has a WIP NPC Builder Please do report any errors you get with it into the NPC thread!
im not sure about seeing all the commands though, sorry
its fine, no worries!
some CP help please!
I'm testing and changed the aquarium and object sprite accordingly, but only the aquarium one shows up in-game...? The content.json is like, sparse
https://smapi.io/json/content-patcher/de749c424cb8479395541ca9deadfe44
and I've emptied out my mods folder besides CJB and CP to double check if anything else was messing with it. Sprites are all completely lined up in the proper place too
I'm completely baffled why this isn't working, usually this works fine
is the blobfish object located on another tilesheet...? I've checked other mods and people just edit on the AquariumFish
if i had to guess you also need to change it in Maps/springobjects, since thats where most items have their sprite
aquarium sprites is just aquarium specific sprites iirc
blobfish is on Maps/springobjects near the bottom, beneath the 4 big boulders
as an aside, you should really be choosing specific areas to edit with EditImage
I dont know why the object sprite is duplicated on the aquarium sheet
is it the one drawn when you open the fish tank menu to retrieve the fish?
Oh maybe
Atra says you can use them but be careful
(i dont know why itd need to be, but, yknow, CA)
thank you!!! I was wondering what I was doing wrong. This is just a quick test, I'll be actually using from/toarea
thats what i thought but figured i should mention it just in case 
- Do not throw an exception
- Do not spend too much time in one of those events
- Do not cause a memory leak
what happens if you throw an exception in a netevent handler?
what makes it worse than throwing an exception anywhere else i mean
You may corrupt net sync is what i was told
that does sound decidedly unpleasant
just to be sure, putting in a try/catch and just silently failing if an exception happens would be fine, right
I don't think the bottom fish sprite is used anywhere tht I have been able to find. Maybe there are plans to migrate all fish sprites to the aquarium sheet at some point?
Yup! It's specifically about allowing an exception to escape
You can find a full list of commands if you go to #governors-mansion and use /list
thanks!
Can you hot load CP mods? I vaguely remember it being possible
Is there a int/dictionary that keeps track of the number of a crop the players has harvested, (not including foraging)? Ex: bluberriesHarvested would be 0 in spring year of 1. But could be 100 at the end of summer year 1
Unfortunate. Though would it be theoretically possible to make one? If there's a method when the player harvests a crop that I'm able to modify in some way, I could make my own dictionary and increment that crop's value by one.
i lied, check Farmer.basicShipped
i thought it was a simple yes/no but it seems to count times shipped
tho i also forgot you wanted harvested. im a bit distracted sorry lol
a postfix on Crop.harvest should be enough though
which would require harmony?
correct
i've been trying to avoid using that as much as possible since it seems a little scary, but if this is the only, then I'll have to dive right in
i love game state queries so much theyre so nice 
I usually recommend a daily dialogue for each of the heart level tiers (0-1, 2-3, 4-5, 6-7, 8(-9, and 10 if they're dateable), festival dialogue if they go, and as much CT dialogue as you feel like.
(Sorry, typing aroud a cat)
i'm currently doing a dialogue for every heart, season, and day + more bc i want to get into the rythm of it and idk practice makes perfect lol
obscure dialogue for things people may never even see is my favorite
theyll never know... and if they do thats cool they saw The Thing
i love that crap too. currently writing in sooooo many easter eggs only ill ever probably see 
Is there a way to see schedules happen quickly with NPCs? so I dont sit there and stare blankly at a screen while waiting for each tick to pass so that they move and i can see if I need to tweak it a little
You could change the time via cjb menu (this is what i do)
Not really. You can use Fast Forward, but like CJB or patch reloads will break their schedule
(well, CJB won't break it per se but if you go an hour beyond when their next schedule starts, it'll just start thn instead of being an hour into it)
(so it's not great for telling when an NPC will arrive)
I also have a ff in Event Tester
(And ofc gima scheduler checker)
Says the lazy person:P
(does that still work?)
I meannnnn
I need to actually fix atracore, which would take maybe fifteen minminutes
@brittle ledge: put fish_legendary in the fish tutorial (3h ago) [Requested by aviroen]
I did have the tag, but I said it didn't affect vanilla behavior because that's what the official wiki said
but apparently it changes pond color
Specifically the Default color for unspecified Legendary is 150 50 210 which is like purple-y
So it might not actually be that noticeable given the blue hue shift
it's apparently noticeable if you're trying to change the pond color
that's what sparked the convo
Well, the issue they were having was trying to change colors with a bad model
They weren't even getting to the color change part, it was failing to be able to do anything at all
I dunno what they ended up with because that didn't get fixed until the very end basically
I enjoy the royal purp
I might try changing a fish to it to see how it looks, seems nice on a website lol
Is it possible to put dynamic tokens inside i18n text?
Here's what I've done so far.
"DynamicTokens": [
{
"Name": "dynamicRyan",
"Value": "Ryan",
"When": {
"Alex_To_Ryan": "true"
}
}
EditData - Characters/Dialogue/Alex - Introduction: "I'm ryan." (WORKS)
EditData - Charcters/Dialogue/Alex - Introduction: "I'm {{dynamicRyan}}." (WORKS)
EditData - Characters/Dialogue/Alex - Introduction: "{{i18n: Intro_Ryan}} with i18n - Intro_Ryan: "I'm Ryan" (WORKS)
But as soon as I do: EditData - Characters/Dialogue/Alex - Introduction: "{{i18n: Intro_Ryan}} with i18n - Intro_Ryan: "I'm {{dynamicRyan}}". It no longer works
you need to pass the token into the i18n
Yes, you have to pass them in though
im on mobile so I can't get an easy link but it's on the content patcher docs for translation
I think I have an example on the modding wiki
I can find it then. I was just staring at content patcher's author guide.
btw Button, I'm thinking of doing a thing with books and wondered if I could add compat for your Extra Books?
compat in what way
basically, it takes a book as input and spits out a random book overnight. I don't know if all your books are designed to be one-offs or if some are rarer than others though
How would I fix this harmony error?
System.Exception: 'Return type of pass through postfix Boolean Harvest_Postfix(Int32, Int32, StardewValley.TerrainFeatures.HoeDirt, StardewValley.Characters.JunimoHarvester, Boolean) does not match type of its first parameter'
I copied the parameters straight from Crop.harvest.
ModEntry.cs
public override void Entry(IModHelper helper)
{
HarmonyPatches.Initialize(Monitor);
var harmony = new Harmony(this.ModManifest.UniqueID);
//the error happens with the line below
harmony.Patch(
original: AccessTools.Method(typeof(Crop), nameof(Crop.harvest)),
postfix: new HarmonyMethod(typeof(HarmonyPatches), nameof(HarmonyPatches.Harvest_Postfix))
);
}
HarmonyPatches.cs
internal class HarmonyPatches
{
private static IMonitor Monitor;
internal static void Initialize(IMonitor monitor) { Monitor = monitor; }
// patches need to be static!
internal static bool Harvest_Postfix(int xTile, int yTile, HoeDirt soil, JunimoHarvester junimoHarvester = null, bool isForcedScytheHarvest = false)
{
try
{
Log($"A crop has been harvested");
return true; // run original logic
}
catch (Exception ex)
{
Log($"Failed in {nameof(Harvest_Postfix)}:\n{ex}", LogLevel.Error);
return true; // run original logic
}
}
private static void Log(string message, LogLevel logLevel = LogLevel.Debug)
{
Monitor.Log(message, logLevel);
}
}
Turn the return type to void
some of them are designed to be one-offs or rare, yeah. speaking honestly id prefer if a mod didnt invalidate the requirements/methods i made to get some of them but id be fine if it was just the ones that you can get from the bookseller
that gives me syntax errors where I am returning true
you dont return true
the signature of a harmony patch does not necessarily match the signature of the method you're patching
its a separate thing
a Postfix is just a function that runs after the original method, in this case Crop.harvest
Harmony can optionally give that function the arguments that were also given to the original function as well as the original result
wrong clipboard link lmao
only a Prefix patch can return a bool
postfixes return void
got it
transpilers return an enumerable instruction list
and dont ask me about reverse patches idk what the fuck they do
let's hope I dont have to use them
Copy the instructions from one method to another
Reverse patches are a better alternative to any place you'd find yourself copying and pasting large parts of the decompiled game code into your own mod (y'all know who you are).
Okay! Copying large swaths of game1.fixproblems
Maybe that will fix my problems :pufferthink:
narrator: no it won't
i'm often tempted to reverse-patch but really anywhere i've thought 'wow... i could..... reverse-patch this bullshit..' i could just as easily transpile in some new (opcodes.call, the-rest-of-the-method) and let the game do its thing
one day i'll find a use
tbh i think the case where i copy paste some code is usually like
hm if i just do this i can yeet harmony
so reverse patch solves nothing here
or i've completely changed enough stuff in a subclass that even though i've copied some code, it's completely insignificant and anyone patching that method would have to do some crazy bullshit on mine too anyway
There are a handful of places in an unreleased mod where I carefully follow what the game does, just with new code that is...faster
I find it hard to imagine any non-trivial problem that could be solved by either transpiling or reverse patching. They are really for completely different purposes. If everything in the base game is nicely factored into functions then you might not need a reverse patch, but if it's some awful mess of spaghetti code, that's another story.
it's not that the solution is either-or, but rather i'm actively looking for places to use reverse-patch before realising 'nope it's another transpiler'
Just depends on what kind of problem you want to solve. I suppose a lot of modders are focused on the set of "replace vanilla thing with my thing" which, yeah, is always going to be a transpiler or in the best case a postfix.
But say you wanted to do something like: make a tool that performs both the axe and pickaxe functions. Or an axe you can swing as a melee weapon.
It's kind of a crappy case for a transpiler, and you don't really want to rewrite the DoFunction of all those tools.
Eh, I would instantiate an Axe and a Pickaxe, etc
And call the methods on that class etc
reverse-patch is also the same amount of effort as a transpiler but with none of the sense of adventure or reward
so very unappetising
Maybe this hypothetical omni-tool is simple enough to work that way but I think you're being a little unimaginative here.
i can imagine case where i reverse patch out some portion of the big ol Object.performAction method
but wouldnt that mean i lose compat with other mods doing postfix on that 
Yeah, reverse patching presuppose you don't want the whole thing - or don't have everything you need to call the method containing that code. Otherwise obviously you would just call the method and not reverse patch.
I thought reverse patches were supposed to happen last.
well i dont know what other ppl's postfix look like
its not that clear to me how i would grab their code too
the harmony docs on the execution flow pf patching dont even mention reverse patches
absolutely NOT