#making-mods-general
1 messages ยท Page 18 of 1
I did the maps just for fun, so I won't pay for the mod design anyway
Compared to the fare system, I prefer to introduce the time-lapse mechanism first
Yeah, sorry tired, forgot my tone indicator (/j)
are any events transferring those args? I guess "DayEnding" happens before, so that doesn't?
What args?
You now travel to anywhere without consuming time. That's pretty unrealistic
the profit variables, like farming, total etc.
to be fair, stardew isnt a very realistic game to begin with 
Yeah, most of the game opts away from realism
That's my preference too, when it comes to games in general
Minecart warp but you have to beat junimo kart to go anywhere
As part of the day ending screen the total is added to the stats I think, but the rest of the stuff is only important on that screen
You can have real-time travel in game using totems and warp towers. The minecarts, bus and boat should not be such a convenience
I'll walk
And by walk I mean, speed 10 buff forever
At least minecart warp is all in a particular function, in GameLocations
U can patch that to do whatever
is "anecdote" a common enough english word?
Yeah
Yeah, I think so
Anecdote like a story right 
I'm not a native speaker and I know this word. Common enough.
(one day it told me the equivalent of french "angine" was english "angina" and people were super worried!!!
(i had a sore throat)
yes, like small facts about something or short story
English has a big ol using <francais> on top so if u sneak in a french word I would never know
English loves to steal words and twist their meaning
there's definitively cases that went "you used word X, but i think you meant word Y" because i used a word like "reunion" but it has a slight different meanting/no one use it in this context
(Yeah, angina in English is heart attack.)
(In French it's sore throat.)
I wonder how we fucked that up so bad, the root of the word is Latin and Greek for "choke" and "strangle" and at some point we were like "heart pain"
luckily you were around to say "lumi i believe you mean another word" because you had enough knowledge to be "hmm, wait a minute"
hello! does anyone know the right way to add "percentchancespawn" to "Loot" in Farm Type Manager mods?
{
"MonsterName": "slime",
"Settings": {
"SpawnWeight": 2,
"RelatedSkill": "Combat",
"MinimumSkillLevel": 2,
"Loot": [
"ShipsAhoy_Poultry"
],
"ExtraLoot": false
}
}
I have this which all works
(I actually don't have to wonder, I know it was a white man that saw someone die in a way that looked like choking and decided to call it that)
!codeblock
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 a space between, like json). The usual codes are cs (C#) and json.
It's this I don't understand how to format in relation to the poultry
and still be able to add other drops
I don't know how to do either one
Is there any framework or something I can use to create a custom collections page?
No
isnt it from the latin angor which means unease/anguish 
Anyway, i came here originally to ask if i wanna add hats to hat mouse do i do it like any other shop(with conditions n shit)
I wanna add my traffic cone
It would take C# to create a new collections page page
It's 1000% possible that google lied to me in it's results so maybe
I'll try again later. I already did this but I had too many issues. I DMed someone that has done it before, maybe they can help me a bit
Should just be in Data/Shops under HatMouse, add stock as you would any other shop yeah
Hm do you have to just make multiple versions of the monster 
I was trying to find an example, I can never remember which mods have the packs of examples but I guess FTM isn't one
Or make a separate item setting entry
And use the name of that entry in the loot list
Lumi do you have example of random chance monster drop in vmv 
I think you just create a model with the choices you want
no
because there's no random chance for monster drop
the only way to emulate that is to have the monster weight and have some of the variation drop stuff and other don't
"Loot": [
{
"Category": "Object",
"Name": "ShipsAhoy_Poultry",
"PercentChanceToSpawn": 50
}
]
Woops, that's gotta be the item ID (I guess it can be the name too, that seems like a bad way to match the item though)
Esca knows its not the most convenient stuff, but it's not easy to change because lot of stuff in FTM would need to be reworked and it's an exhausting task
nice....one step closer for traffic cone hat
Anyways, my example is based on an example directly below that table
That's literally for adding things from this table to the Loot of a monster
Lumiii how did you make your mines?
(Looks like the Notes in the table will tell you which types of things it can be used for as well)
hmm, it is strange, i'm pretty sure there wasn't that when i did my monsters (otherwise things would have been easier), but i don't see when it was changed in changelog
Silent update /j
can you elaborate what you mean?
which part of them?
as far as I know, percent chance should work on monster loot lists, and I think it has since I added those
I was looking through your mod page just now and I was wondering if you made a custom area that functions like the mines
i havent actually played through yet ๐ญ I dont have time to sit down and play :( so I kind of just guess from images uighdsfiugsf
hu. weird, then, i really don't remember that feature at all, but to be fair not a lot of mods did stuff with monsters, but.. Still. It would have been way more convenient than how i did it. confused
it's a serie of maps with monsters and nodes, but it's "static"
I was trying to think how you could use CP and FTM to make a vanilla-like random mine system and the amount of work required is making me tired just considering it
That one is more like volcano I think?
I try not to think about dynamic levels too much, but generally my conclusions are "clever randomized map patches" or spacecore's new thing, yeah 
(i definitively am, but it'll requires some mental preparation because it's lot of things to process)
Fixed floors that u draw as tmx
As with most things SpaceCore related, I look forward to the new docs lol
can you, theoretically, reskin the dungeon levels to be more like the forest instead of caverns? (spacecore)
it's already in the docs
my next project when I get time to mod again is adding trigger action controls to FTM, which will be similar but not as "set piece" oriented as spacecore, at least from what I've seen
and there's an example pack
so for dungeon stuff, figuring that out would probably help anyway
oh! yay example pack
Example pack is very nice. Walls of nearly unbroken text trigger my fight or flight
You can make them look like anything, doesn't even need to be a cave, could be a bustling city or an open forest clearing if you so wanted, the dungeons feature doesn't affect how they look, the look is part of the map itself
that is nice to know, thank you EnderTedi 
oh, now i remember what the issue with loot was. Sorry for mixing things up! What happened that needed me to multiply monsters entry was that the new loot erased all classic loot (which i believe is still the behaviour ?), but i have no idea how it works with randomised stuff.
ah, yeah, if you set "Loot" to anything, FTM clears the monster's vanilla loot list
(but not the "extra loot" generated by other code, so that became a separate toggle
)
I have the JSON schema checker in VS Code โ canโt figure out why itโs upset with my version number. Having a similar issue with update key. I know it doesnโt really matter that much but it bugs me lol
Introducing new stardew combat zone: walmart on a black friday
Will you make it out alive with your new 55" TV?
Ignore it, schema is wrong here
well, i'm relieved i know why i got into complicated stuff, at least (i could have copied the vanilla loot but then it's less update proof) but i had the wrong answer on stuff earlier which was confusing
For manifest, I usually put the schema in there, set up my manifest, then remove it so it stops complaining lol
Thank you!
Just keep in mind what Esca and Lumina have said and that if you're editing a vanilla mob you'll lose the vanilla drops
(sometimes it IS a good thing, depending of what you want)
(i'd just wish there would be a "inherit vanilla drop" thing or something)
Best option would be if there was a way to use the append text operation to add rather than it completely replacing for monster loot :/
Yeah, append is a CP thing
and while it may work for some cases, i was a bit wary in VMV of using it in fear of having a lot of reloading of assets (even if it's likely fine if it doesn't change too often)
re: FTM at least, I've made a note to add an "OriginalLoot" setting or some such to allow custom loot while keeping w/e the monster's original drops were
pokes head in with the PLAYER_HAS_SEEN_EVENT GSQ, are you able to put multiple event IDs after it to check any of the events, or do I need to use ANY for this?
it'll be a but unintuitive for backward compat, but it's pretty simple to add either way
stepping out for a sec, but I think the event GSQ only takes one event ID, glancing at the code
Couldn't you just default it to false for backward compat?
wiki would probably say if there's an <ID>+ option
mehhhh okay
the original loot will still get cleared unless the new option is toggled, yeah
thanks esca for considering that ๐ and to be clear, i love FTM and what it allows
grumbles about it a little, then gets back to coding the minor stuff needed to do a few days of play hopefully followed by ideas for modding
being a content modder is all about mastering workaround anyway so i am grateful for all the cool feature framework modders add
(see with pathos for 1.6.9?)
I'd need a better example than "Lyoko wants a music cue that would otherwise be lost in migration" for that, I think XD
(okay back, can confirm "player has seen event" only looks at 1 ID and ignores everything after the space
)
You'll only take emotional damage if Pathos says no
hmm, honestly i don't believe it's really about the usefullness of one example but if it's a change with risk of regression or not
if it has regression risk, then no amount of usefulness will make it happen if it's mod only
if the risk is low then it can happen even if your current example is minor
... I guess you're both right
@ivory plume would it be possible to let the GSQ PLAYER_HAS_SEEN_EVENT allow multiple arguments for 1.6.9, assuming it has extremely low to zero regression risk only? Running into a case where a song is heard in multiple previous events with different preconditions in a mod update, so making a migration trigger action's a little annoying with basically needing to do an ANY. A similar use case would potentially be a mod with multiple paths to get something done via trigger action, if that's helpful.
(by the way pathos thanks for the answer about the debris stuff! i understand why it can't be done)
Sure, I'll add that in the next 1.6.9 beta patch.
I'll take a look soon. Thanks for reporting it!
I want to display the duration of buff, however, if all values under CustomsAttributes are equal to 0, then the duration will not be displayed. How to solve this?
Or don't use BuffId and it will use the Duration from Data/Objects
(also ้ๅฃฐ -> ้่บซ
)
To make the player character use an emote (https://stardewvalleywiki.com/Multiplayer/Emotes), is doEmote the correct method for that?
.doEmote(int emoteIndex)
่ฐข่ฐข:)
It doesn't work unless one of the "effects" is non-zero. In fact, this buff has no effect and its actual functionality is implemented in C #.
have you tried Effects=null? might work
It still doesn't work. Perhaps I should provide the duration of the buff in the object description instead of letting it automatically display.
ah but when you do get the buff
the icon works and shows duration?
you may just have to transpile IClickableMenu.drawToolTip to remove the effects.HasAnyValue() check
Does the wiki not have an example of a event script?
Content Patcher doesn't have one
Can I have a link to that?
That page does not have what I see in that image
Oh
I'm dumb
It's collapsed
Is there a way to make a link that has it unfolded automatically?
no
This is for a mod-author-facing example.
not just for me
I'm not being picky for no reason.
I found a better link instead.
https://stardewmodding.wiki.gg/wiki/Events_for_Everyone#Content_Patcher_%2F_Set-Up_Templates
This guide attempts to provide a more in-depth explanation to modding events as a reference for both beginners and experts.
So... when it comes to using other modder's assets (in this case a harp sprite)... the mod is on a copyleft license, but I assume it's still required to request permission from the mod author. But what if the only reference to the mod is the redux version and the person who ported it forward?
You are unable to make that other mod a dependency?
I don't want the other mod as its core function is mutually exclusive to mine (probably maybe). And it's broken.
Well if it's copyleft (open permission to use and modify assets) then asking is a courtesy, not requirement
If I need to make my own harp sprite that's fine, was just wondering if that's uncommon to use assets from other mods in that fashion.
That or I need to sift through all the tilesheets to see if the cutscene with the harp is something usable.
Is that cursors 
aha yes, farmer_base.png
would work except it has the farmer's hands all over it
but easy enough to pull out and modify
I need to find a way to isolate the modding stuff into another desktop that I can fold down to free up resources, between all the tabs and tools and two copies of VS22 (one for the mod and one for decompiled base game lookups) and 10 tilesheets open...
Minor nitpick here, but copyleft is not open permissions, it's a different form of closed permissions. Open permissions would be MIT or Apache license; the GPL series are copyleft.
the distinction that copyleft requires that any subsidiary/modification is also copyleft?
Yes, more or less, although "copyleft" is a broad category and the actual license usually has more specific restrictions.
While it's mostly only a concern for businesses, you do have to be careful even with hobbies and personal projects because if you somehow end up depending on GPLed code, you not only can't release as closed-source, you can't release as completely open source either (like MIT/Apache).
It's a headache which is why (as far as I know) we basically all use MIT here. I don't think I've ever run into a GPL mod.
(coincidentally i did just yesterday)
Mystical Buildings, Harp of Yoba Redux, BetterMeowmere, all have GPL.
Ick. You could probably make the argument that copying their API into your project (assuming they have one) does not constitute a true derivative/source dependency because the API is just a specification and does not even contain any executable code. But, it's dicey.
Huh what's the details of "not completely open source" per gpl?
If they don't have APIs then it's pretty much irrelevant anyway.
i looked at better meowmere out of curiosity just now and apparently its not just GPL but "Affero GPL" that i hadnt heard of before which adds a network use clause that i dont fully understand (or at least not understand how it'd apply to a stardew mod)
I don't think they do... mystical buildings is the only one that acts as a framework for creating things and doesn't create any buildings itself anyway.
Each version of the GPL is more restrictive than the last, but in general it's what I said: you cannot use GPL in anything closed source, literally no individual part of the project can be closed source no matter how small, and you cannot include it in any project that has a less-restrictive license either (i.e. that would permit your code to be used in something closed-source).
my guess is the network bit is that the meowmere projectile uses Netcode?
There've been a lot of cringey legal battles over this stuff, GPL authors suing companies because their frontend used an open source library but their backend code is closed-source (like, obviously, otherwise they don't have a business).
"When a modified version is used to provide a service over a network, the complete source code of the modified version must be made available"
thats what github has to say about the network clause, so i guess a multiplayer server would count?
It's an area you don't want to get into unless you're a lawyer. Even if you are a lawyer.
oh i been interpreting that as "if you use GPL your whole project has to be open source"
making GPL more open sourced than MIT
Yes but it's not just about your project, it's about your project's license.
GPL makes statements about how you can license your own work that depends on the GPLed thing.
it means you cant let other people use the parts YOU made in your project with something like MIT to do with as they see fit, bc your project is nmow all GPL
Right. I had to change one project from MIT to GPL because I didn't realize one tiny component was GPL.
GPL and copyleft is "viral".
i was about to ask what the term was for those kinds of licenses again, read my mind
I don't think viral is an official legal term, but it's the most descriptive one to me. If it's anywhere, it's everywhere.
i doubt it but its also the one ive always heard
just couldnt remember it in the moment there
An API itself (i.e., just the function declarations) is permissible fair use under US copyright law according to https://en.wikipedia.org/wiki/Google_LLC_v._Oracle_America,_Inc. (2021).
Well it sounds like I need to change my license to MIT and make sure I'm not using any GPL components from other mods, which I don't think I am but it does bring up a question.
Mod A adds, say, a projectile. I look at that code and use it, with various changes (change number of arguments, use different variables, different art, different override behavior but same general template), to make my own projectile. To what extent does it need to change to be considered "mine"?
I do not believe that anyone running my mod at its completion will make any connection to any other mod.
Projectile is maybe a bad example since stardew base has the template as well.
Or I add a weapon, but the method of doing so is using the asset requested thing so that doesn't count since it is literally fill in the blank.
as always take this with a grain of "i am not a lawyer" but to my understanding no amount of changes will remove the original copyright holder's claim to it
That's fair.
maybe if you changed literally every line so that it was indistinguishable (but at that point, why use theirs at all?) and also did it in one single commit so that none of the original showed in your commit history, then probably no one would notice. but you would be, technically, still transforming the original work
at that point its probably more a matter of enforcement
We r in big grey area with modding anyways
I'm not feeling pressed about it at the moment because right now, I have made some api calls, added a projectile that's been rewritten five times and at some point I deleted the project and grabbed the base game bits, and added a weapon through the assetrequested function, so not really super novel code.
On rethinking regarding art, I'll just do all custom art.
As a major fan of FOSS software I release everything under GPL
i was honestly just going to dig into content packs for if people wanna replace art
i make base ones and go, "if you don't like it, make a content pack"
I've been finding mods that do a small component of what my end product will to understand how it's doing what it's doing but most of the time it's, write in the bits that are useful, run it and iterate until there's no errors, which hopefully gets me to a level of understanding that I can do my own, strip and rewrite to my own desire, add in other functional bits.
Basically the same way I learned sql.
yeah gray area of copyright because there's a lot of innovative ways to do things but you could also just do a bunch of if:else statements until it works properly so i mean 
Would probably use a switch statement instead of if else ๐
listen if toby fox can do it --
Smh just use goto
One of my teachers gets mad if I don't use switch statements lmfao
i did an entire randomizer in if:else to prove a point
christ though chu the IMinigame is a pain in the ass 
Btw anyone wanna help me write a mod that adds a collection tab for hats ๐
The moment I have to do things with UI I give up ๐
finally got my code to work somewhat. I am implementing a custom rescue event that occurs when the player is swimming in water and they are defeated. So far I got a dialogue box to appear and they are warped but not before the game freezes a bit and spits out logging rapidly for a few minutes.
I have a question)) I don't like the appearance and localization of several flowers from SWE. How can I make changes using my mod so that the image and localization do not change with each SWE update? Should I just create the same objects in my mod or should I make a link to the change in the SWE file (if such a thing is even possible)?
dependency=false, iirc, it will load the dependency then yours will overlap *in manifest
Textures you can just patch over, inspect the SVE content patcher part to see what the targets are
I am not sure about localization, don't think you can patch i18n
Would it require replacing the i18n key?
Neither, technically.
Ok cool 
If we're talking about Flower names, you'd just edit the display name field
so I could make it a non-i18n thing and it'd work perfectly, as long as it's not, y'know, public
yeah but existing i18n doesn't matter if you're not changing it in-mod
I feel like replacing the name field would remove all existing translations, tho I suppose that's unimportant
Example. My (theoretical) dialogue patch to Characters/Dialogue/MarriageDialogueAbigail uses "fun_Leave": {{i18n:Abigail.FortuneMarriage}}. If I'm changing it in-mod, you edit the Abigail.FortuneMarriage key. But if it's outside the mod? Screw it. Just edit it as "fun_Leave": "Huh, I guess this is a dialogue key!"
The same applies for display names of items
For translation I will put my own key, the main thing is that my mod runs on top of SWE
you'd field edit the display name with "DisplayName": "Pufferchick Statue", or w/e while having a true dependency on SVE*
* edit due to your mod requiring SVE
All u need is the dependency
Set that up in manifest
It tells smapi to load your mod after smapi
That'd be correct. Once you have the dependency, the rest is irrelevant - translations are up to your mod, not SVE's keys
Dependencies my beloved
Thanks, I'll try it))
I think this situation means it's a required (true) dependency tho
If your mod otherwise does nothing without sve
....yep. One sec, I'll fix
My mod is essentially a CP-based assembly of my objects and objects from other mods. Just to minimize the number of downloaded mods and for convenience)) And yes, it looks like dependency is what I need))
hm, quick question but...did I do something wrong to this edit? I wanted to add my hats to hat mouse (conditioned // cuz I jsut wanna see if they pop up before I do them)
{
"Action": "EditData",
"Target": "Data/Shops",
"TargetField": [ "HatMouse", "Items" ],
"Entries": {
"{{ModId}}_FishmongersHat": {
"Id": "{{ModId}}_FishmongersHat",
"Price": 2000,
// "Condition": "HAS_SEEN_EVENT <ID>",
},
"{{ModId}}_MermaidCirclet": {
"Id": "{{ModId}}_MermaidCirclet",
"Price": 2000,
// "Condition": "HAS_SEEN_EVENT <ID>",
},
"{{ModId}}_TrafficCone": {
"Id": "{{ModId}}_TrafficCone",
"Price": 2000,
// "Condition": "HAS_SEEN_EVENT <ID>",
},
"{{ModId}}_PearlCirclet": {
"Id": "{{ModId}}_PearlCirclet",
"Price": 2000,
// "Condition": "HAS_SEEN_EVENT <ID>",
},
"{{ModId}}_FishmongersFishHat": {
"Id": "{{ModId}}_FishmongersFishHat",
"Price": 2000,
// "Condition": "HAS_SEEN_EVENT <ID>",
},
"{{ModId}}_FishmongersFlowerCrown": {
"Id": "{{ModId}}_FishmongersFlowerCrown",
"Price": 2000,
// "Condition": "HAS_SEEN_EVENT <ID>",
}
},
}
I used the fishshop example from the wiki
Good evening. Is there a way to apply EditImage to an array of images? I.e. multiple FromFile?
You didn't specify ItemId
ah, frick
is the line Join us. Thrive. in any other file besides 1_6_Strings?
Can you specify a bit more?
I.e. give us an example of what you're trying to do
{
"Action": "EditImage",
"Target": "[Array]",
"FromFile": "Recolors/{{Recolor}}/{{TargetWithoutPath}}.png",
"PatchMode": "Replace",
"When": {
"HasFile:Recolors/{{Recolor}}/{{TargetWithoutPath}}.png": "true",
"Recolor |contains=(None)": false
}
}
Would this work?
it's on town buildings image
I should specify, Luke. What do you mean by [Array] in this instance
the rest is normal to me, but [Array] isn't valid syntax so I need whatever that is specified.
You can specify multiple targets by separating them with a comma, Ie "Target": "Target1, Target2"
That'd be a bunch of Maps/[Loaded Tilesheet]
then what Ender said
you can specify multiple targets e.g. "Target": "Portraits/Abigail, Portraits/Leah" and then {{TargetWithoutPath}} would be Abigail first, then Leah, and all would apply at the same time
that I know; I meant as in any other text reference?
trying to swap the German Macht mit. Entfaltet euch. with Tritt bei. Gedeih' (cause that one fits on the Joja sign)
Hell I think I have an example in my personal mod or in the SCA code I did
Okay, great. That'll cut the number of Includes way down.
"LogName": "Load Abigail's (DSV and SCA) Closet",
"Action": "Load",
"Target": "Portraits/Abigail_BlockParty, Portraits/Abigail_DesertFestival, Portraits/Abigail_EggFest, Portraits/Abigail_Ember, Portraits/Abigail_Fair, Portraits/Abigail_Fall, Portraits/Abigail_FallPyjamas, Portraits/Abigail_FallPorchPyjamas, Portraits/Abigail_FallRain, Portraits/Abigail_FallWind, Portraits/Abigail_FashionFestival, Portraits/Abigail_Fireworks, Portraits/Abigail_FlowerDance, Portraits/Abigail_Gathering, Portraits/Abigail_IceFestival, Portraits/Abigail_Jellies, Portraits/Abigail_Luau, Portraits/Abigail_NightMarket, Portraits/Abigail_NightMarketOutside, Portraits/Abigail_Pyjamas, Portraits/Abigail_Snowy, Portraits/Abigail_SnowyIndoor, Portraits/Abigail_SpiritsEve1, Portraits/Abigail_SpiritsEve2, Portraits/Abigail_Spring, Portraits/Abigail_SpringRain, Portraits/Abigail_SpringWind, Portraits/Abigail_SquidFest, Portraits/Abigail_Summer, Portraits/Abigail_GreenRain, Portraits/Abigail_SummerPyjamas, Portraits/Abigail_SummerRain, Portraits/Abigail_TroutDerby, Portraits/Abigail_Winter_Indoor, Portraits/Abigail_Winter_Outdoor, Portraits/Abigail_WinterPyjamas, Portraits/Abigail_WinterStar, Portraits/Abigail_Island, Characters/Abigail_BlockParty, Characters/Abigail_DesertFestival, Characters/Abigail_EggFest, Characters/Abigail_Ember, Characters/Abigail_Fair, Characters/Abigail_Fall, Characters/Abigail_FallPyjamas, Characters/Abigail_FallPorchPyjamas, Characters/Abigail_FallRain, Characters/Abigail_FallWind, Characters/Abigail_FashionFestival, Characters/Abigail_Fireworks, Characters/Abigail_FlowerDance, Characters/Abigail_Gathering, Characters/Abigail_IceFestival, Characters/Abigail_Jellies, Characters/Abigail_Luau, Characters/Abigail_NightMarket, Characters/Abigail_NightMarketOutside, Characters/Abigail_Pyjamas, Characters/Abigail_Snowy, Characters/Abigail_SnowyIndoor, Characters/Abigail_SpiritsEve1, Characters/Abigail_SpiritsEve2, Characters/Abigail_Spring, Characters/Abigail_SpringRain, Characters/Abigail_SpringWind, Characters/Abigail_SquidFest, Characters/Abigail_Summer, Characters/Abigail_GreenRain, Characters/Abigail_SummerPyjamas, Characters/Abigail_SummerRain, Characters/Abigail_TroutDerby, Characters/Abigail_Winter_Indoor, Characters/Abigail_Winter_Outdoor, Characters/Abigail_WinterPyjamas, Characters/Abigail_WinterStar, Characters/Abigail_Wedding, Characters/Abigail_Island",
"FromFile": "assets/Art/{{TargetPathOnly}}/Abigail/{{TargetWithoutPath}}.png"
},```
that's a super long example but still
heck yeahhh hats ingame...just need to write down to do conditions once i did the events that are supposed to unlock them
Yeah, I see what you did there.
Making it conditional by checking if the file exists won't hurt?
i think 1.6 strings is it as far as i can tell
As in, it'll do the check for each file?
I mean it won't hurt to do but I'd be more concerned if the files DNE when you upload it
I start by loading a vanilla tilesheet, and only edit the ones that actually have a recolor file available. That's the idea, anyway.
Uhm
How can I turn something I post into a code block?
you're loading a vanilla tilesheet?
I don't know if that's advisable
editing it, sure
Loading.... concern.
and you use three backticks
Ah, I mean a tilesheet provided by a mod
"Changes": [
{
"Action": "Load",
"Target": "Maps/AbandonedStore",
"FromFile": "assets/.AbandonedStore.png",
},
{
"Action": "EditImage",
"Target": "Maps/AbandonedStore",
"FromFile": "Recolors/{{Recolor}}/AbandonedStore.png",
"PatchMode": "Replace",
"When": {
"HasFile:Recolors/{{Recolor}}/AbandonedStore.png": "true",
"Recolor |contains=(None)": false
}
}
]
}```
there ya go
That's an example
yeah that's all good then
But I want to do all tilesheets in one fell swoop
Seems doable with the right naming conventions
It'd be even better if I could pass Replace or Overlay as a variable, but I guess that's not happening.
I think you could use dynamic token there, maybe
But I'd need some way of knowing if a recolor tilesheet that was included wants to replace or overlay
an outside include? or from your own mod?
Hypothetically, if someone else also wants to throw a recolor into the mix
This is equal parts doing and learning
Took me long enough to escape InternalAssetKey, now I'm trying to see how far I can take it
Hi, me again. Does anyone know how to put any egg and any milk into a recipe?
-6 for milk, -5 for eggs
aka, use the category (doesnt work for all tho, I believe)
eggs, milk and fishes i believe are the one supported
I understand, where can I see the category?
Interesting. If I have a map file and a tilesheet with the same name, loading the map and then loading the individual tilesheet works - but when I try to batch load the tilesheets, I get crashes.
Does InternalAssetKey not care about different types of assets having the same filename?
Game assets don't have file extensions, so if you give them the same name you're essentially trying to load 2 assets into the same slot
Yeah, that's what the would-be crashes are telling me.
I recommend not using InternalAssetKey in this case because it will make it easier to see how it works and understand what's broken
I'm not using it, I'm trying to work around a mod that does
Ah sorry my bad
This mod has Airport.tmx and Airport.png, for example
The Airport.tmx gets loaded into Maps/Airport
But I guess InternalAssetKey ensures that Airport.png gets used without being loaded
Oh so in that case loading replacement tiles won't work anyways
Well, I found something of a workaround
Because it's using the png directly
Prefix the tilesheet with a dot and then load said file
Yeah, exactly
You can edit the tmx in a text editor to change the name of the sheet
But that's pretty much your only option here
Yeah, I've had to do that for several maps already
There's also a mine.png - the implications are pretty obvious
I wish you luck, that sounds like a headache
It is, but it's also fun to figure out how much I can do without touching the original files
But it's starting to look like I'll have to fix the tilesheet naming in the .tmx's directly
I wanted to avoid that to make updating easier
I have concluded that InternalAssetKey is about as compatibility-unfriendly as it gets
InternalAssetKey just loads it in the background and then gives the place it loaded it to
All maps and tilesheets have to be in Maps/ though
So it's... not quite as useful there
I meant in game assets not in the mod paths
Oh, right
@wanton pebble it might not be mastery extended, or it could be regular luck also patches the level cap. Dunno, will continue to look through the code. Might be worth it to test without mastery extended
@indigo yoke https://github.com/Pet-Slime/StardewValley/pull/37/
It has been slurped up and combined with the mod. ty. Sad better crafting hasn't fixed it yet tho.
Just finished the stuff (so now I'm back on keyboard and mouse rather than mobile) so I'll be testing that first
If it doesn't work, I'll let you know in a mo
I see you are using the SVE 1.5 beta, got a list of patch notes? I just want to peak
Don't quiiiite think I'm allowed to share that XD I'll definitely test w/o that too if this doesn't work
I just want the patch noteees, not the whole modddddd
(I have had to be fairly careful with any screenshots I've been taking, which is why I didn't provide visual proof earlier)
....it's mastery extended.
gonna go scream in something for a second, then collect myself to make a hopefully normal comment
mood
(my approach : write the comment now, do something else for a couple of hours or longer, read it once calmer, see if it needs adjustement)
If you want to test it, DM flash
Also from where I was able to download it I only was able to get the files, not a patch note list
T_T I just want to know what's changed
yeah but it's understandable that people can't share such info publicly if flash didn't yet
you can just ask him the changelog and if it's ok to share it
Flash usually provides beta files for other modders for compat testing, yeah ๐
Any idea where to access these emote indices? I decompiled Farmer.EmoteTypes and got the first 12
new EmoteType("happy", "Emote_Happy", 32),
new EmoteType("sad", "Emote_Sad", 28),
new EmoteType("heart", "Emote_Heart", 20),
new EmoteType("exclamation", "Emote_Exclamation", 16),
new EmoteType("note", "Emote_Note", 56),
new EmoteType("sleep", "Emote_Sleep", 24),
new EmoteType("game", "Emote_Game", 52),
new EmoteType("question", "Emote_Question", 8),
new EmoteType("x", "Emote_X", 36),
new EmoteType("pause", "Emote_Pause", 40),
new EmoteType("blush", "Emote_Blush", 60, null, 2, is_hidden: true),
new EmoteType("angry", "Emote_Angry", 12),
new EmoteType("yes", "Emote_Yes", 56, new FarmerSprite.AnimationFrame[7]
but further down it seems to give "sick" the index of 12 (which is "angry" already)
new EmoteType("sick", "Emote_Sick", 12, new FarmerSprite.AnimationFrame[8]
that is not the same kind of emote
you are looking at the "event" emotes on the first list
and the second i believe is the emote you can do when pressing y?
(bless the person that finally added that to wiki rather than a link to reddit)
Oh so you can't use the latter ones with
farmer.doEmote(emoteIndex);
?
i have no idea
doEmote works with Game1.emoteSpriteSheet which points to TileSheets/emotes. Unlike some sheets, the index here is not exactly a "sprite index" so much as a "row index".
The difference between "sick" and "angry" seems to just be in the animation frames; angry has none, sick adds what I think are these two animation frames from the farmer base.
(Emotes, unlike emojis, are a bit complicated and do more than just display the icon)
I see, thanks for the input! I was actually only looking to display the icon above the character ๐
yeah the 'extra' ones like 'sick' and 'taunt' also adds additional farmer frames. doEmote only handles the bubble ahead
Ty
A friend helped me by making the json files so I could see what it looks like. I tried to replicate them for another similar mod (a cooking recipe) but... everything blew up when SMAPI loaded the mod... Because of the time difference I don't want to bother you now...
I'm really sorry to be so annoying but... could you help me? I have a screenshot of the error in SMAPI and if you need it I can send the files.
!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.
it's how you share the files. Usually, you may even SPOT the error yourself (maybe not be able to understand it the first time), and fix it
so it's really good practice to do that
Hi all! Does anyone know of a way to see the full list of categories in the game? (fish, flower, seed, etc.)?
i think i do? hold on gimme a sec
I have a vague idea of โโwhere the error is (objects.json) and the line where I'm supposed to look but I can't figure out what the error is
Also, I'm still having trouble understanding what it is or what I should put as ModID
the wiki?
I'm wondering if there's a modifiable .json, but maybe not
I made meat, I want a way to tell recipes "any meat is fine" ๐คฃ
ok so we have objects, big craftables, tools, weapons, furniture, boots, pants, shirts, hats, trinkets, mannequins, flooring, wallpapers, and within objects we have litter, basic, minerals, quest, crafting, arch, fish, cooking, seeds, ring, and misc
it wouldn't work with category, you can't add new ones without risking big issues and game only accept a few specific category asvalid input for "any" ingredient
but you can have a context tag (like meat_item) and use spacecore for that
im not sure so sorry if im wrong
spacecore?
yes, it's a framework, search on nexus
remember it's a bit advanced modding
so don't rush things
i got it from this just to let you know https://mateusaquino.github.io/stardewids/
thank you!
its very useful for item ids and things like that
I hadn't seen the link, I'll do that and share it.
yw~!
In theory, the error is the last part that refers to the language. In the mod that my friend gave me that was there but it referenced another i18n file, what I did was change it to the one that corresponds to this mod.
There's a rogue " in line 32
you don't put the token between quote in this file
it's not a problem of language
it's having the " in "{{i18n:flan.DisplayName}} (you need the closing one, because it closes the whole string)
but basically, here
you have "stuff": "whatever/fields/you/need"andextrastuff" and because you already closed the opened ", it can't process the whole andextrastuff"
Ok I undertand
OK, Iยดm goin to test it. I'll let you know if anything explodes again hahaha
if I use OnAssetRequested to add a weapon/object, and another mod does that as well, and we use the same location (the end of the tilesheet we're targeting), does SMAPI take care of that?
What do you mean by "end of the timesheet"? Do you mean for the texture? No it wouldn't, ideally though you'd load it to a custom asset instead if it's a sprite for a custom weapon/object
For now the mod has loaded well, now I have to look in the game, this may take a while because I have to wait until Friday when the traveler will come
are you adding new images to the vanilla tilesheet or patching over existing sprites? the former's very not recommended
if the latter then it's fine, the mod that applies it changes later will take precedence
Smapi handles same target edits as overwrite
so I do not want to do this because it will cause conflicts with other mods that add weapons
Again, if you're adding a custom weapon it's most recommended to load the texture into your own asset instead of patching a vanilla one hoping no other mod will touch that area
weapons take Texture field 
Hello, this may be late already but you can download this:
https://www.nexusmods.com/stardewvalley/mods/4
It lets you fast forward time
There is also this:
https://www.nexusmods.com/stardewvalley/mods/541
this one lets you search if your item loaded in the game without even having to wait for the shop/traveler (But seeing if your menu is working if your item is in the menu is good for double checking)
wait i mightve linked the wrong mod for 2nd link HAHA
there u go
ok that was... easy...
probably doesn't need namewithoutlocale since my own mod is unlikely to have other languages of it.
ยฏ_(ใ)_/ยฏ I just always use it, haven't found a disadvantage for not yet (unless you do have assets for alternate locales)
not yet.... and then i18n won't come until later and won't require new assets, just descriptions.
So far everything is going well, I'm just surprised by those ??? but now to prepare the dessert
I was more thinking things like the billboard, which has text in the sprite, i18n is handled by smapi
ah I don't have anything fancy like that, they'll be jumino script if anything.
Almost, but well, I think I know what the error is.
what's your current cooking recipe code wise?
Monthly mod stats time!
Streamlined mod dumps
Previously I maintained two 'mod dumps':
- A full dump containing every mod from CurseForge + ModDrop + Nexus (maintained using a few scripts). You can download this one below under 'see also'.
- A smaller dump containing C# mods on the mod compatibility list, including downloads and source code. This was used for manual testing to update the compatibility list, and to let anyone perform searches and analyses across all open-source mods' code.
Unfortunately that second mod dump took a lot of effort every month to keep up-to-date, so that one is now discontinued. The scripts for the full mod dump now include info used to maintain the mod compatibility list instead.
Stats
Milestones
- This is the first monthly report after the [mod dump rewrite last month](#making-mods-general message). That means hidden, deleted, and republished mods are now reflected immediately in the stats below instead of having occasional dump rebuilds.
Mod compatibility
72.6% of SMAPI (C#) mods are compatible or have a workaround, up from 72.1% last month.
Unique mods by type
We have 363 more mods this month.
A few observations:
- That's closer to the pre-1.6 monthly numbers, probably due to a combination of the post-1.6 wave starting to settle, and some mod authors returning to school after summer vacation.
- Since the 1.6 update, many frameworks have been losing content packs each month as mods migrate to the new Content Patcher capabilities. This is the first month with almost none lost, possibly because the frequently-updated mods which were going to migrate have mostly now done so now.
- Custom Music survived another month, with just six content packs above the minimum to be shown in these stats.
That 363 includes:
- +243 Content Patcher;
- +37 SMAPI;
- +27 Alternative Textures;
- +16 XNB;
- +14 Fashion Sense;
- +3 Custom Furniture;
- +3 Farm Type Manager;
- +2 Json Assets;
- +2 Producer Mod Framework;
- +1 TMXL Map Toolkit;
- 0 Better Artisan Good Icons;
- 0 Custom Music;
- 0 Mail Framework Mod;
- 0 Shop Tile Framework;
- -1 Dynamic Game Assets;
- and +16 for frameworks with <100 content packs.
Content Patcher packs
We have 8,842 Content Patcher packs.
The top six Format versions are:
- 2.0 (2,995 โ 3,078) for Stardew Valley 1.6;
- 1.19 (577 โ 575) for Stardew Valley 1.4;
- 1.3 (461 โ 467) in old unofficial guides;
- 1.28 (394 โ 393), latest version for a while last year;
- 1.29 (400 โ 398) for Stardew Valley 1.5;
- 1.23 (354 โ 360) for mysterious reasons.
Open source
- We have 2,912 tracked C# mods, of which
- 1,853 (64%) have a source-code repo, with
- 1,048 (57%) in a multi-mod and 805 (43%) in a single-mod repo.
Web costs
And finally, web hosting costs for the SMAPI.io site, update-check server, and API dropped a bit from US$237/month to $189/month with the leveling off of post-1.6 traffic. (The graph is always a bit behind due to billing cycles.)
See also
- [Stats for August 2024](#making-mods-general message).
- Raw mod dump (54GB download) and scripts to analyze it.
And that's it for this month!
rip smaller dump i enjoyed looking for examples
I might be able to create a new repo which uses the data from the full mod dump to generate the Git commands. Then you could just run the Git commands locally to download all the open-source mods, so you can browse through the code like before.
many frameworks have been losing content packs each month as mods migrate to the new Content Patcher capabilities
You don't need a separate CP mod for a C# that adds lots of stuff?
Not necessarily. You can edit the game assets directly from your C# code, without having a separate Content Patcher part. The changes we've been seeing are due to mods migrating from more specialized frameworks like Better Farm Animal Variety to Content Patcher though.
+16 XNB; 
Apparently, Content Patcher is the Borg.
1.23 for mysterious reasons my beloved, picking up 6 more content packs this month somehow 
I am sorry to interrupt. I need some help on figuring out why my CP mod that I am making isn't working.
It's a mod meant to change the crib (a personal mod, really, because it's only a recolor to match the Cozy Chocolate furniture).
However, I am getting the following script in SMAPI upon booting up the game and I am not getting the config in GMCM.
!json Can you share your content.json please?
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.
Yes! I was grabbing it โค๏ธ Sorry, my son came in and distracted me a second TuT
It might be failing because you have a default value that's not in the list of allowed values?
I just noticed that TuT Let me try that
It's working perfectly now. I don't know how I missed that. Thank you!
No worries, it happens!
Thanks for your patience!!! You guys help me a lot! I'll mention a general greeting to the discord community when I publish the mod.
I'm going to explode. Does anyone know how to hide THIS in tiled so I can work on the stupid map ๐ฎโ๐จ
Ah, thank you! I'm still learning to use tiled
does anybody have any experience/ knows what the alcohol_item context tag does?
thanks i couldn't find anything on the wiki
I believe it is modder convention to tag your alcohol items with it
my NPC uses it. please don't do anything silly to it 
so deleting it on items wont be a problem?
wow how could you
If you make them nonalcoholic sure.
cant roleplay as alcoholic now
not sure if sarcasm here, but it will cause problems for NPCs that check it in their gift tastes
no its not sarcasm thanks for letting me know
I would rather role-play as a workaholic
yeah noticed that some NPCs now have accept gift dialogue for alcohol_item
what's the context of wanting to delete alcohol_item
removing alcohol items in the game and replacing them with other things
it won't cause any visible issues, however some other mods may rely on that tag. can't think of any though
okay then
if you're turning them into non-alcoholic things, then you should remove the alcohol_item tag
but i still want npcs to like those items
the point of context tags is to give labels to items in a freeform way, so compatibility is easier to manage.
for example, you can make an NPC like mine with a gift taste specified for alcohol_item, and we get compatibility for free with any item existing or in the future that uses that tag
I would say more npcs use it as the negative vs the positive
Ie, this npc should never drink, they are Muslim, recovering alcoholic, no fun, etc
yeah mine is set to dislike, and in the next update she'll refuse them too
yeah either they love 'alcohol_item' or hate them, and if the tag is removed it almost certainly defaults to a universal like for artisan goods
so removing it is fine? im confused
if you are removing the alcohol from something, and an NPC is set up to like or dislike alcohol, then their opinion of the item will necessarily change
(Pam Tries does this weird thing where her opinion of alcohol depends on her mood. If she is in a bad mood, it's a liked gift. Good mood, it's disliked. Neutral mood, it's hated.)
if you are making the item non-alcoholic, then you should remove the tag
like in a reverse fashion or will all npcs just like it
it will depend on the NPC and the item
default for artisan goods is Like. but the item may have another tag (or its specific ID) which the NPC checks, so who knows what will happen
trial and error got it
Did you make the Lacey and Nightshade mods? Lacey the hat seller? I love that mod and I saw that the Spanish translation is incomplete, I plan to make it from scratch and complete it, as for Nightshade, it was a very useful mod for my visual disability, thank you so much!
yes, i did! i'm so glad to hear that
you are most welcome
I'm happy about your mods hahaha, it's going to take me some time to translate everything because I have a lot of mods to translate but I'll do it
Okay so i've been working away with trying to solve that bug in that mod i mentioned yesterday, i'm pretty sure i found the problem but idk how to fix it as my knowledge is VERY limited
Do you have link to the repo
That's... not really finding the problem, that's just breaking at the line that throws. Finding the problem would entail determining why it is null at that point, or alternatively, why the code expects it to be non-null when it can be null.
A simple workaround is just to check for null and skip the loop, and that would prevent the crash. But it's not necessarily going to be correct behavior.
@tiny zealot Ok I've tested giving wine to npcs with the alcohol_item tag removed. As far as I know the alcohol_item tag does Nothing of use regarding gift tastes. I gave Sebastian and Penny the special wine and they still hate it. I gave Pam, Harvey, and Shane the special wine: They still like it. So maybe I didn't understand something or don't know how to test but that's what I got.
As far as I know the tag is simply used to sort/categorize the alcohol items/ some other reason I'm not knowledgeable enough to know right now.
adding or removing the tag doesnt do anything if the NPC doesnt have dialogue or gift tastes specific to that context tag
if they dont check for it, then it doesnt matter if the item has that context tag or not
however custom NPCs may check for it
and Jas and Vincent have custom dialogue for it
apparently there's a tailoring recipe that takes that tag too, so that recipe will stop working
the reason, as i mentioned before, is to allow easy, broad compatibility with classes of item without having to code for them all specifically and without needing to put out updates.
if my NPC rejects alcoholic gifts, i don't have to put a list of all the alcoholic items. i just put in "alcohol_item", and they all work, and most importantly it works with any other mod that adds an alcohol_item, even into the future, and i don't have to do any more work.
so it's important to classify items correctly. if they aren't alcoholic, they shouldn't have the tag
Speaking of gifts, I know the code is kind of a mess, but does anyone have a good handle on the general "rules" for when a given item can be gifted to a given NPC? From what I can tell it seems to be some combination of:
- The item has to be an
Object, i.e. you can't gift furniture, craftables, etc. - They must not have received a previous gift that day, unless some special condition ignores that (like a quest)
- They must not be at the gift limit for the week (with same exceptions as above)
Is there anything more to it? I know there's a method CanReceiveGifts, but when looking at methods like tryToReceiveActiveObject that appears to only be a rather small part of it. Like this alcohol thing, where is that even checked?
alcohol_item isn't explicitly checked, but somewhere in that nest of functions it checks all the context tags on the item for matching tastes/dialogue keys
If that day is their birthday, even if the one week limit is reached, gifts can still be given to them
@whole raptor Hey Nomori! Had a quick question about your i18n-ifier - I was chatting with Elle earlier about how the config section of a content.json can also be i18n'd but most people don't know how to do it or even that it's possible, so do you think it'd be difficult to add it to the i18n-ifier?
Yeah I know the birthday rule, that's the "special conditions" I mentioned and I think it's covered by CanReceiveGifts.
It'd be pretty helpful for a lot of people if it was possible, I think ๐ Though no pressure if it's too difficult, of course! (also feel free to ping me on reply, I probably won't be around in chat later)
I'm looking for the context tags and it seems to be a quasi-hardcoded search for RejectItem_{tag} dialogue?
GetGiftReaction() has the ones for AcceptGift
RejectItem happens if they reject the gift entirely, AcceptGift (and the GetGiftReaction()) happens if they still took it. they just might not like it
Those happen after the gifting, though.
just saying thats where the alcohol thing is checked
getGiftTasteForThisItem/CheckTasteContextTags is where it looks for tags in the gift tastes string
if you wanted them to reject alcohol outright then it would be in the tryToReceive function as long as you gave them RejectItem dialogue for it
It's this dog's breakfast, right?
Dialogue dialogue2 = TryGetDialogue("RejectItem_" + activeObj.QualifiedItemId) ?? (from tag in activeObj.GetContextTags()
select TryGetDialogue("RejectItem_" + tag)).FirstOrDefault((Dialogue p) => p != null);
if (dialogue2 != null)
{
if (!probe)
{
setNewDialogue(dialogue2);
Game1.drawDialogue(this);
}
return true;
}
but Jas and Vincent dont, they will acceppt it and just hate it
It seems to be a way of short-circuiting all the other receive logic. Tied directly into dialog. ๐
pretty much yeah
I've skimmed back through the alcohol_tag convo and I'll put my two cents in as well that several DSV characters rely heavily on that tag, so please don't remove it for no reason
i think Tai is turning the items into non-alcoholic versions, but got confused about what the tag means/does and whether to remove it
Ahh, okay
Sigh, SDV logic can never simply be a straightforward "check if you can do that thing, then do that thing", always has to be some Lovecraftian horror of spaghetti code that gets the "check" and "do" tangled up in fourteen different places. Same as Object.performUseAction.
the current state is a result of trying to turn the older, worse version into what you said without breaking the world
the reason there's a probe flag is that the logic was already byzantine, so the most reliable way to get the correct result from "check" was to run the same code and just return a boolean instead of acting
Yeah, I guess the probe is the most reliable way to run a check. Too bad the probe won't accept an Object but rather the actual Farmer giving it.
(Obviously it would be impossible to modify it to take an Item/Object, given what it does right now.)
Mind you, the rejection logic I mentioned above still returns true for a rejected gift, so the return value seems less than reliable. It's apparently less "can NPC receive this item" and more "will something happen when giving this item".
so this is off base game, projectiles.cs. Does this mean I can never override this and the travel grace period must always be at least 100 (I assume milliseonds)?
Just do ignoreTravelGracePeriod.Value = true;
It's a net field so the real value is inside the read only object
is there a way to make a ColoredObject have a drop shadow
or
i remember hearing something about how they don't have them and i don't remember if it was resolved.
Will try ty.
Having trouble getting my projectiles to get destroyed and was wondering if that's why but they're doing damage and displaying the explosion animation so maybe that's not it.
Maybe I need to define pierces left as zero instead of not mentioning it.
yeah they dont. its kinda funny
i was wondering for 10 minutes why my mod wasnt working when i realised.. it's not in my mods folder. goddamit.
It's fixed in 1.6.9
(reported by me!)
that's why i remember seeing it! great to hear :)
okk so this doesn't work in game any idea why? i playtested it and my sweet gem berry still sold for 3000
did you spawn new berries in to test?
existing items won't have their price updated
no i harvested them from gi
actually you have a syntax error, missing { before the Action lines
and also missing a lot of closing brackets
oh no wonder ๐ญ
Every Action block must begin with {, and every matching { must have a closing }
I recommend switching to an editor with built-in JSON syntax highlighting and checking
(Notepad++, Sublime, VSCode are 3 common choices)
i think i have notepad++ installed i'll try using that one :3
minute 1: sure ill use an out var for this method with the usual TryGet pattern, those are fun
end of hour 1: WHY IS MY VARIABLE NULL
end of hour 2 and many experiments later: oh ive been reusing the same out var name while iterating over an empty list and thus reassigning it null. 
actually im not even sure if that was the issue anymore bc i just realized this snippet of code in question isnt even running anymore bc i commented something out. always change one variable at once folks
also dont dive too deep into reflection it'll make your head hurt
yeah that wasnt the solution. rip. ignore me
Are you not using nullable reference types?
i dont actually know what exactly it is thats becoming null anyway, i just know that something in the process of calling Harmony.Patch is throwing a nullreferenceexception
it happens at the line where i call Patch() but both the original method and the method im sending as the prefix are not null, and my prefix method runs without returning null
You don't get a stack trace?
i am doing some weird reflectiony stuff and returning DynamicMethods instead of actual prefixes but if i do (as far as i can tell) the same thing in the modentry class, it works fine. just isnt working when im trying to do it in a loop in a different class
[Special Power Utilities] Failed to patch prefixes: System.NullReferenceException: Object reference not set to an instance of an object.
at HarmonyLib.MethodPatcher.EmitCallParameter(MethodInfo patch, Dictionary`2
variables, LocalBuilder runOriginalVariable, Boolean allowFirsParamPassthrough, LocalBuilder& tmpObjectVar, List`1 tmpBoxVars)
at HarmonyLib.MethodPatcher.<>c__DisplayClass37_0.<AddPostfixes>b__1(MethodInfo fix)
at HarmonyLib.MethodPatcher.AddPostfixes(Dictionary`2 variables, LocalBuilder runOriginalVariable, Boolean passthroughPatches)
at HarmonyLib.MethodPatcher.CreateReplacement(Dictionary`2& finalInstructions)
at HarmonyLib.PatchFunctions.UpdateWrapper(MethodBase original, PatchInfo patchInfo)
at HarmonyLib.PatchProcessor.Patch()
at SpecialPowerUtilities.DynamicPatcher.Initialize(IManifest manifest) in J:\
Stardew Mods\SpecialPowerUtilities\SpecialPowerUtilities\DynamicPatcher.cs:line 95
(it says postfixes in there bc i was trying both)
wait how do i get a rectangular area from a Texture2D i don't remember
So what's on line 95? It looks like the prefix has something wrong with one of the arguments.
DynamicHarmony.Patch(orig, postfix: new HarmonyMethod(prefixFactory));
DynamicHarmony is just what i named this harmony instance, prefixFactory is a method in my class that returns a DynamicMethod and takes a MethodBase as a parameter
(again it says postfix but only bc i was seeing if it was specifically prefixes that wouldnt work but the error is the same either way)
nevermind!!
DynamicMethod testMethod = new DynamicMethod($"{method.Name}_Patch", typeof(void), paramTypes, declaringType.Module);
testMethod.DefineParameter(0, ParameterAttributes.Out, "__result");
ILGenerator il = testMethod.GetILGenerator();
il.Emit(OpCodes.Ldstr, "Hello, IL!");
il.Emit(OpCodes.Call,
AccessTools.Method(typeof(Log), nameof(Log.Warn), null, new Type[] { typeof(string) }));
il.Emit(OpCodes.Ret);
this is the dynamicmethod that prefixFactory constructs, grabbing the paramTypes and declaryingType from the function im prefixing (through the parameter that Harmony gives my prefixFactory function)
this works fine in my modentry class
but even when i copy it over directly to my other class, it just doesnt work ยฏ_(ใ)_/ยฏ
I don't think I've ever seen HarmonyMethod used directly like that. Looks like the signature takes a Delegate? Is it possible your delegate is not static?
wait how do i get a rectangle of a spritesheet by spriteindex
i could write it myself probably but i know it already exists
it takes a MethodInfo, and if the function whose methodinfo you use returns a DynamicMethod/MethodBase/MethodInfo of its own and takes a MethodInfo/MethodBase as a parameter, Harmony will use your function to grab the actual function
my prefix factory is also a static method
and also public
that code snippet i posted does work with the same Harmony.Patch call in my modentry class, i can verify that the postfix does actually get applied in game
i dont think it should be anything to do with my loop stuff in my other class either, bc while trying to debug this i removed like, everything to do with it. im grabbing a function with AccessTools like i would normally and generating that empty DynamicMethod and trying to apply it, and not caring about anything thats in my other lists
Is it a prefix or a factory?
i just named it factory bc when trying to look up how to do this people named it a factory by convention bc its not really one but kinda acts like one
okay, well. i changed it to be trying to patch a property getter instead (bc i realized thats what it was doing in my modentry class too) and... it worked. but it wont work when patching an ordinary method?
getSourceRectForStandardTileSheet finally
AccessTools.PropertyGetter(typeof(Farmer), nameof(Farmer.DailyLuck)) works fine
AccessTools.Method(typeof(Game1), nameof(Game1.OnLocationChanged)) does not work
Far as I can tell from Harmony's code, that exception can only be thrown if the fix (prefix or postfix method) is null. Definitely strange, since it would throw much earlier if the patch itself was null (the fix being a wrapper around the patch).
You mean AccessTools.Method itself doesn't work, or it returns a MethodInfo that fails later on?
using AccessTools.Method to look for that method gives the same stacktrace error as before, but let me try patching it normally just to make sure
I mean, is it literally AccessTools.Method that throws/returns null, or do you just mean that the whole thing put together doesn't work?
oh right duh. sorry, brains getting a bit fried at this point lmao. gimme a sec
AccessTools.Method isn't returning null or throwing anything, and patching it normally works. lemme try commenting something else out real quick that i didnt think should matter but honestly idk anymore
Yeah I'm finding it kind of hard to follow what you're attempting, but I'm tired myself. Maybe put up a MRE and I'll look tomorrow if no one else gets to it first.
i commented something out and it worked. i uncommented it again and it still worked? i feel like i changed nothing but why does it work now
Too many blanks to fill in. Prefixes and postfixes work normally for me, obviously. But I haven't tried this reflection-based thing passing in a MethodInfo directly. Could also be something odd about Game1 in particular. But my hunch is not.
oh wait i know what i changed
I guess it could be a race condition if it's intermittent, but... that's also unlikely.
Type[] paramTypes = method.GetParameters().Select(p => p.ParameterType).ToArray();
Type declaringType = method.DeclaringType;
this is how i was getting these variables taken from the MethodBase for Game1.OnLocationChanged, so that i could use them like so:
DynamicMethod testMethod = new DynamicMethod($"{method.Name}_Patch", typeof(void), paramTypes, declaringType.Module);
this works for the dailyluck getter just fine, even though that doesnt have parameters (or i guess it might have the instance as the 0th parameter or w/e)
but changing it to this:
DynamicMethod testMethod = new DynamicMethod($"Patch", typeof(void), new Type[] {}, typeof(Game1).Module);
it now works
i dont know which one of those two things made it work yet though bc i changed them both at once, but is there something about DeclaringType vs just, GetType or ReflectedType that im just not aware of?
GetType is only for object instances.
DeclaringType is the type that declares the member.
well, it wasnt that anyway, bc putting declaringType.Module back in and it still works. so... the parameter types?
yeah, using that paramTypes breaks it
i havent the faintest why
Hey guys, I lost the page that explains how to make the custom warp for my location
What does the debugger show paramTypes is at runtime?
Is it an empty array or... not?
Also, what is declaringType exactly?
Oh I see it, never mind... sorry, it's hard to follow when everything is split up like this.
according to the debugger paramTypes is an array of size 2 with the two parameters that OnLocationChanged expects
Does your patch method have those two parameters?
The original does, but that DynamicMethod is a wrapper around your patch method, the original method.
hold on, lemme test somethin real quick (related to what you're saying, im not ignoring it)
Again there's just a ton of missing information here, it's hard to follow which method method actually is. If that's pointing to the original method and not a patch, then I think using declaringType.Module is wrong, you can only emit IL to a dynamic assembly.
okay well, you might still be right and i might still need to specifically define the parameters (even though i assumed that since i was generating a patch function that the parameters were optional, like they normally are) but adding these two lines:
testMethod.DefineParameter(0, ParameterAttributes.In, "oldLocation");
testMethod.DefineParameter(0, ParameterAttributes.In, "newLocation");
is not sufficient
method is whatever Harmony is sending to my function via new HarmonyMethod im not the one defining it
its a MethodBase, that's all i know, and its the methodbase of the original function that i am patching
but im not emitting to it
Well you definitely can't define two parameters at the same position.
i copy-pasted wrong bc i was lazy and didnt feel like copying the other line 
i pasted it again and changed the name at the end but forgot the index
they are at 0 and 1 in my code
but besides, setting the parameters of my dynamicmethod to an empty array manually makes it work
declaringType.Module is just telling my DynamicMethod what type its supposed to be apart of
or well, the module
of that type
Maybe something would jump out at me if I was doing Harmony stuff 24/7, but trying to piece together a mental image of exactly what this is trying to do and how from bits and pieces of chat isn't really working, I'd need to see the whole code.
So yeah, post an MRE tomorrow, or go with your workaround if it's working I guess. (It just means your dynamically-generated method can't take any params.)
can you refresh my memory on what the E in MRE is. if i cant hack at it enough tonight its just gonna be pushed to my repo for SPU before i go to bed, ill clean it up before i do so the code is actually readable albeit broken
Minimum reproducible example
gotcha, thank you
one last bother as i think i get this now, especially with harv's tutorial, but how (and im gonna suck at wording im so sorry), but how can i make my locations bus locations
so, i figured it out.
the parameters for my dynamicmethod can be empty, thats fine, bc if Harmony detects a patch method that has no parameters, thats just fine
adding the parameters from the original method to the dynamicmethod alone wont work though, bc the parameter names in the array from the original method are strings like StardewValley.GameLocation oldLocation and not just oldLocation. if you put a parameter into a patch method, Harmony expects it to either match one of their injections or match an argument name exactly. obviously the former of those two names will match nothing
but wait! theres more! you can strip out the class name from the parameter name easily. and fortunately, each ParameterInfo in the list also gives us the position of the parameter in the param list. so oldLocation is the first parameter, thus its position is 0, which we can use in the dynamicmethod DefineParameter() function
unfortunately, when using the DefineParameter function, positions start at 1. i presume this is bc the 0th parameter is the this instance or whatever yada yada. so i have to take the parameter position from the original method... and shift it one when i redefine them. that, combined with fixing the name strings, lets Harmony accept it as a patch finally
the NullReferenceException was bc when i was not shifting the parameter positions by 1, Harmony was looking for parameter names starting at 1. so if i had two parameters, it checks params 1 and 2, not 0 and 1. the 2nd parameter was not defined (well, it was, but its Name was null bc i didnt set it). thus the exception
any idea why this isn't working? i sold my sgb but it's still 3000g.
are you getting any errors in your SMAPI log? it doesnt look like you have a comma before that patch at the end of the other closing brace above it
wait which patch? sorry im slow
the one you're showing in that screenshot
OH
okay okay i see
thank you!
i checked with the file validator, im kinda confused
(unless this isn't where im supposed to plop the file..)
need a comma after the closing brace
formatting kicks me in the butt once again
โ๏ธ i missed that one initially but yeah, most closing braces will need commas. you should really use a text editor with json validation built in
Good Morning. Can I use "Fields" to edit a single entry within an array? I.e. "Location" within "Home"?
im using notepad++, how do i get it to check that?
Data/Objects doesn't have the (O) in the keys, so it should be 417, not (O)417 etc
A demonstration of scope creep:
- Start working on a mod to add a single tool to do something pretty simple
- Oh, this other tool would be pretty neat
- Oh... this other other tool would also be pretty neat
- Now you have a mini framework to add tools with custom C# functionality by specifying the method to patch in CP so nothing is hardcoded

theres plugins you can download for N++ to validate files for you, or you can use VSCode which should do it out the gate
OHH THANK YOU
(i blame ender for my current scope creep, "create a tree they said, it'll be fun they said", i am now waist deep in jsons because i wanted more than just trees 
The funny thing is I believe Ender knows of the tool idea that started this. 
7th time's the charm let's hope this time my "code" works
dont know what it's called in cp 
hard to say without context, remember you can share json and log if you still have issue
!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.
!log
Important note: Your computer username may appear in the log. If your username is your full name, please be aware of this before uploading it.
Please share your SMAPI log file. To do so:
- Open this page: smapi.io/log.
- Follow the instructions at the top of the page to upload the log file. (Don't copy & paste from the console window!)
- After uploading, it will show a green box with a URL to share. Post that URL here.
Please do it even if you don't see any errors. This has useful info like what mods and versions you have, what the mods are doing, etc. If the issue didnโt occur in your last session, please load the game to the point where the issue occurs, then upload the log.
I am uploading my mod to nexusmods and now I need to upload my mod file. However, I have not yet filled out the UpdatingKeys in manifestion.json. What should I do?
manifest.json (just in case)
once you filled the first page of the nexus mod form
you'll get a number on the url at the end
this is part of your update key
"UpdateKeys": ["Nexus:9600"],
(verify it's also UpdateKey and not updatingkey)
I found it, thank you!
If you have your mod uploaded on 2 different websites, like forge and nexus for example, do you just add a coma between the nexus update keys or do you have to choose only one? Now that I think about it, are there even a forge update key?
[[Modding:Modder_Guide/APIs/Manifest#Update_checks]]
basically it's a list separated by commas, e.g. ["Nexus:key", "CurseForge:key"]
Ok I will check it out, thanks. 
json validator claims there's nothing wrong with my files but they're still not working in game 
if you want help you need to do the steps needed
see this message and read what is said in the two following message from governor
if you want other to read you, reading them is important
Log Info: SMAPI 4.0.8 with SDV 1.6.8 build 24119 on Microsoft Windows 11 Home Single Language, with 43 C# mods and 81 content packs.
Suggested fixes: One or more mods are out of date, consider updating them
i already updated the museum mod btw
i assume your mod is (CP) ์ฒ์ ๊ด์ฐ, ๋๊ตด ๋ฆฌํ ์ค์ณ ?
if yes, i believe you need this mod installed :
https://www.nexusmods.com/stardewvalley/mods/4736
(you have other from same author, but i believe, not this one)
uhh no thats not my mod but thank you for that :3
ok
what is your mod then? and your issue?
just to let you know, i don't really like playing 20 questions when doing debugging, so if you don't provide the info needed (like the json asked earlier), i'll step out
(which just mean you'll have to wait for the next person ready to help)
uh so im still making it and it basically increases the price of crops when they're out of season and im just trying to figure out why it's not working
uh hold on
it's called produce price increase
(sorry if im being stupid im very new to all of this
)
No big deal, it's affecting how soon you yourself get help but as you troubleshoot more, you'll get the hang of what info to give at the start
i don't believe it's being stupid, but when i tell people the step i need to help them and they don't (like you didn't provide the json asked twice), there's a problem i will not try to solve by repeating. people can reread discussion and ask questions at any point.
As said, i'm stepping out ๐
Reiterating Lumina's point, you'll only help yourself more if you read what others are asking of you carefully 
But yes, I can keep providing support
I'll go back and read what your issue was
thank you thank you i might reply slowly because im multitasking rn but ill try to be quick!! and thank you for the advice!!
!json And of course, do send over your json at the link (don't just validate, share the link here too)
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.
It's probably possible and I was thinking about it a while ago, but it's definitely the hardest to implement, since it's way less schematic... but I can look into it later this month
https://smapi.io/json/content-patcher/0ebd9da91e57466eb8620179c16e9f6c here's the one for the prices and this is the one for the triggers https://smapi.io/json/content-patcher/6d4a65b22069406490bd68ca60fd2987 
Excellent, so what's the problem you're concerned with right now?
Awesome, thanks Nomori! 
okay so i feel like it may be a formatting problem, but whenever i playtest my mod it just doesn't work at all 
for example i sold my sgb which is supposed to go up to 3250g in spring / summer, but it still sold for the usual 3000g
Alright, we can try pinning down the location of the problem (figuring out exactly which thing is going wrong) by testing without the When fields (so the patch should take effect all the time). If it works in that case, it would mean something's wrong with the conditions; but I do also have a few other questions
okay i'll try that with a different crop this time because my sgb is all out
I remember catching a bit of the conversations you were having with others about changing crop prices between seasons, and there was something about the prices not updating for already harvested crops
When was the crop you tested with harvested?
i think it was harvested during winter
It's not the best idea to switch to something else in the middle of testing ๐
(unfortunately im going to bed right now so i cant help too much, however i did notice cryztax that your Trigger Action does not have the MarkActionApplied field there (it should be present and set to false) so if you've been testing with the same save file and already went through some months to test, it wont do it again)
ah okay time to open cjb 
Indeed, CJB will be your best friend
(and if you're using the same save file, its not as simple as just adding it now, bc that Trigger Action is already marked as applied. you'll either need a new save file or mark it unapplied again with the debug action console command for it)
((also for more context Silicon theyre using a custom trigger action I made that will update the prices (or any other field) of already spawned items to match what a newly spawned item would be, in this case the price))
Understood! I'll go grab that debug command now (so please head to bed and have a good sleep!)

(if it turns out in the end to be an issue with my action tho dont be afraid to ping me and ill see it when i wake up
)
Should be in your case debug action MarkActionApplied All {{ModId}}_ReloadItemPrice false (you'll need to fill in ModId here)
But don't test and don't save over your game yet, we're gonna add something to your trigger action first
If you're interested, cryztax, this is unrelated to your problem but you should be able to combine your field edits into two code blocks (one for all the spring/summer edits and one for all the winter edits) instead of needing a separate block for each crop:
https://smapi.io/json/content-patcher/5c76cf8c975549f8adaa363fd386fe47
Then we'll put that command in your console once we are testing
Can someone tell me why this doesn't work? { "Action": "EditData", "Target": "Strings/Characters", "Fields": { "MovieInvite_CantInvite_Buddy": "{{i18n:Characters.Buddy_MovieReject}}" } }
okay i added the MarkActionApplied thingy and made a new save for mod testing, just to check before i test is this correct?
Almost! You'll need a comma after the closing bracket on "Actions"
okay done i always forget those
do i test it now? also i dont know how to spawn items with cjb..
fields is used for nesting, so an example from something else:
field >> "DisplayName": "[LocalizedText Strings\\StringsFromCSFiles:MapPage.cs.11066]",```
Ah. So how do I update a single entry?
Go ahead, and test in instances where you spawn the item -> switch seasons -> sleep -> ship the item to make sure it's working
you can just make it entries
That won't overwrite everything else?
Because that's how I understood it
i'm not the most well known for remembering fields vs entries, but since it's not a.... dictionary.... of an item, you won't be wiping the entire file unless you quite literally blankload the file
Okay, much obliged.
Glad I don't have to take a shot every time I forget a closing comma
okay so i did what you told me to with the sgb, but it's still 3000g 
i feel like i forgot to do something you told me to do 
ah hold on i think this is what i forgot.. i put this in my triggers file right?
Nope, run that in your command window
If you're using a different save file though, it shouldn't matter
yeah im using a new one for the testing
Hm, hang on
You haven't included your other file by the look of it
So your trigger actions haven't even been running
OH MY GOD THATS WHY...
i feel so dumb now im gonna fix that 
Include files also shouldn't have the Format line at the top
The validator will bug you about it but it's lying in that case 
oh so do i just remove it and keep the Changes line?
Yep!
okay i updated the file im gonna test again ๐ค
Here's the Include action documentation by the way https://github.com/Pathoschild/StardewMods/blob/develop/ContentPatcher/docs/author-guide/action-include.md
i am now realising i wrote the wrong "FromFile" thingy wrong because past me copy pasted it from another mod im making..
My type of mistake to be honest
Can someone help me with my fruit trees? I cant plant them and idk why...
FruitTrees.json: https://smapi.io/json/content-patcher/30d3a607d986497fb70edebba6a27dd7
Sapling/Fruits from my Objects.json(ignore error its just a snippet): https://smapi.io/json/content-patcher/2aed35a5149e41c1a1f8999cb494ce46#L4
and I did do the include too in my content.json...
hmm i already changed the abi dialogue thing to the proper (i think) files.. https://smapi.io/json/content-patcher/777af4eb333f4845a3781dca2a4ad7de
Mind sending a picture of your files so I can see their names and the file path?
I used the wiki as an example and yall know by now that I am in a constant state of confusion
the issue was because I copy-pasted the wiki example WHICH HAD FORMAT IN IT
okay here you go!
Hmm, can you open the folders and then take pictures?
i just got it to work-- what now
I also want to see pictures of the Abigail dialogue files that are throwing errors
So I want to see inside the "data" folder and inside the "NPCs" folder that's in that one
here's the abi one from my other mod
when I plant my saplings theyre all messed up
oh is your sprite index off 
and inside the crop ones
idk man i did my best to go the right way.....
the saplings are right but i feel like the trees...somehow..idk i made sure to originally edit the vanilla fruittrees sheet to align them right
i wonder if it's because the other text files are empty..
I think I get it now, if this is supposed to be your other mod. Your crops mod is trying to load the Abigail files (botched copy/paste probably) and it's throwing an error because it doesn't (and isn't supposed to) have them
so should i rewrite the file that includes them all?
Yeah....when I copy-paste the vanilla sheet oveer my fruit trees they align on top of each other, huh...
what is going on..
wait...
where did i start with my sheet index...
(also make sure you save your changes after making changes)
you started at 1
yeah that was the issue..
but I still cant plant my second tree
ok found that issue too
alright, i'll do that tomorrow.. bye bye and advanced goodnight! 
BWAHAH
I mean
error fruit tree does sound like a funny idea but
what did I do wrong this time..
My guess: either you had the prefix (like (O)) where you shouldn't have it for the tree produce, or you didn't have it where you should have it!
Which way around they go... I have no idea.
ding ding ding, it's the take a break bell, ringing for you
lookup anything the fruit
found the issue, i had 'sapling' in the fruit name for some reason
:B
look at my trees and fruit!
i'mma hit you with it
๐๐๐๐๐๐๐๐๐๐ good shit goเฑฆิ sHit๐ thats โ some good๐๐shit right๐๐there๐๐๐ rightโthere โโif i do ฦฝaาฏ so my self ๐ฏ i say so ๐ฏ thats what im talking about right there right there (chorus: สณแถฆแตสฐแต แตสฐแตสณแต) mMMMMแทะ๐ฏ ๐๐ ๐ะO0ะเฌ OOOOOะเฌ เฌ Ooooแตแตแตแตแตแตแตแตแต๐ ๐๐ ๐ ๐ฏ ๐ ๐ ๐ ๐ ๐๐Good shit
that is a good idea i should actually eat something
evrytime i do a silly mistake I go "how dumb is too dumb to be making mods" 
is ok, everyone makes silly mistakes
it's not about being dumb, it's about being tired and missing stuff. What's the difference between lumisteria.mtvapiusmyitem, lumisteria.lumisteria.mtvapius_myitem, lumisteria.mtvapiusmytem and so on and so on? or having (0) instead of (O)?
you're not dumb for making a typo and not spotting it, the brain is ignoring lot of details.
BUT when you are tired and tried various stuff and you still have issue, it does help to take a step back, go drink a bit of water, or eat something (i try to physically walk away of computer, even for a sec, or play a quick game or anything that isn't looking at the json), and when you return, the brain is ready to spot more details because everything is more fresh
it's not about not asking for help here, it's about learning to know the sign of your saturation, and when you are close to that stage, try (because i fail at that too) to apply one of those (or whatever is working for you). You can do a quick "here's my issue+json+log" drop here before doing that so when you return you may have some nice solutions to try ๐
ur so sweet lumi
I am one. ( อกยฐ อส อกยฐ)
Watch the stream here:
https://piratesoftware.live
#Shorts #PirateSoftware #Twitch
Very relevant
that does make me feel a bit better lol
That looks so wonderful void !! im glad you resolved your issue
pls get ur well-deserved rest and snackies
I did make myself something to eat
probably will try to do more today tho, its my last day in freedom lol tomorrow i start working fulltime again so probs no time besides sunday to work on stuff
good luck with work tomorrow then 
thank you!
would it be possible to render the color of the player and npcs shadows? i never noticed till now but it's tinted blue and it looks bad on all my black floor tiles. id like to make it black. ik it's hardcoded but wondering if there's a quick fix for it
Does anyone know of a simple mod that only makes it so you can use bone swords on bone mills?
If you're asking because you intend to make one if it doesn't exist, this is the right place to ask. If you're asking because you just want to use it, then #modded-stardew is the right channel for you as this channel is only for discussions about making mods.
(And either way I don't know the actual answer to your question, sorry.)
Ah that's fine, I would be willing to make it despite not having any modding experience but it doesn't sound like something that would be complicated to do but then again I do have no modding experience
Thank you though!
i found a shadow sprite. so i guess its not hardcoded then ;o
okay so this is silly. im not finding where the crop items are. ik there's the crops png in tilesheets but im not finding the actual items -.- ive looked in maps, and in tilesheets and in loosesprites and havent seen it
Try spring objects
it wasnt in there ;o
maps/springobjects
let me look again
Okay, this is starting to drive me up the walls. Sigh.
Look. I need sugar. And I mean a damn lot of sugar.. buying sugar for 100g a pack at Pierre simply won't do, and Beets alone in Fall aren't exactly a feasible way to sustain the sugar flow for a full year.
So.. on to Cornucopia I hop. They have Sugarcane in summer and Sugarbeets in spring. Great! All the sugar I could ever need.
Exceeeept.. Sugarbeets are year two only.. and need the expanded pack, too. I'd rather not get buried under dozens of seeds I have no need for when all I need is some sugar, man..
So, browse the files, find the entry.. format looks.. pretty understandable? Or so I thought...
Find the sugarbeets item.. slash the price by half, no issue..
Find the seed settings.
Rewrite the pack from expandedcrops to essential.. change the rarity from rare to common. Seems to be all in line with the format of the other crops!
Except.. it's not working. Even item spawner says the seeds don't exist. So I assume I need to switch some other line somewhere to make it a non-extended item.. and I simply cannot find it.
So someone who knows these things better than me be so nice and point a finger? Or just tell me that it's more complex than that so I can just surrender and flip the extended mode on.
At this point I'd be happy with either outcome. And maybe an aspirin.
i mean, hu, i wouldn't start modding by editing a mod like cornucopia JUST to get a bit more sugar, but
rarity has nothing to do with making stuff available, so changing it is pretty much irrelevant, i believe
Editing for personal use is a good tool for learning how things work though.
i have no idea what "rewrite the pack from expandedcrop to essential"
yeah it's not what i said at all
i said editing a big mod like that is overwhelming, which is kinda proven by the fact you're overwhelmed
there what?
you just changed the tag?
Couldn't you just make the prices for sugar cheaper at Pierre? It'd be easier ๐
Buying the sugar still feels a bit against the point.
And yeah, based on the format of the other crops..
It seems there's only two variables.
"extendedcrops" and "essential".
(what does "snicker" means?)
As well as "rarity_common", available as first year..
And rarity_rare, available year 2 and onward.
I think like sniffing up your snot LMFAO
... I could also write giggling, good grief..
wow ok well
if i'm not allowed to ask question, it will make debug complicated. Good luck
(nope that's snuffle)
You gotta remember that not everyone's first language is English and Brogio your comments aren't exactly funny tbh
And getting snapped at after correcting someone's misinterpretation, geez.
That ain't my day.
Fine, I'll just get back to it the old fashioned way.
Wasn't meant to be funny, just thought I knew what the word meant ๐
the context tags section does nothing functionally
--which is why lumina had no idea what you were pointing at with the screenshot
you want to literally move the entire entry for that item to be next to the entries for the base items
You get served what you dish out but in generally I don't get what people get like this when coming in here with questions. But anyway, good luck, I sadly wouldn't be able to help you with your matter.
hey guys, I need a little help. I'm trying to create a new mod, I follow the instructions on stardew wiki to create an example that will print every key pressed. The mods works but whenever I Alt + Tab the game crashes without any error message, any tips?
Can you share the code you're running?
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using StardewModdingAPI;
using StardewModdingAPI.Events;
using StardewModdingAPI.Utilities;
using StardewValley;
namespace BetterFridge
{
internal class ModEntry : Mod
{
/*********
** Public methods
*********/
/// <summary>The mod entry point, called after the mod is first loaded.</summary>
/// <param name="helper">Provides simplified APIs for writing mods.</param>
public override void Entry(IModHelper helper)
{
helper.Events.Input.ButtonPressed += this.OnButtonPressed;
}
/*********
** Private methods
*********/
/// <summary>Raised after the player presses a button on the keyboard, controller, or mouse.</summary>
/// <param name="sender">The event sender.</param>
/// <param name="e">The event data.</param>
private void OnButtonPressed(object? sender, ButtonPressedEventArgs e)
{
// ignore if player hasn't loaded a save yet
if (!Context.IsWorldReady)
return;
// print button presses to the console window
this.Monitor.Log($"{Game1.player.Name} pressed {e.Button}.", LogLevel.Debug);
}
}
}
Oh this really is just the starter code
yep
does it crash without your mod?
are you on windows?
start SMAPI via terminal and check the output when it crashes
it does not crash without the mod and I just noticed that if I comment the print statement of the key, it does not crash
so I believe that's the problem?
weird
whats the error msg when it crashes?
no msg
the game just freezes and after some time windows tells me that the game stopped working
make sure you havent clicked the console
if you mark smth in the console window itll freeze the game when it tries to print smth
running normally, via steam
lol
that was it
I cant click on the console
lmao, I would never guess that, thank you
you can, just hit "enter" after and it should be fine
yeah I tried unselecting the terminal, it works now
Wait you can run the game via vs?
if you are on windows, modbuildconfig is setup to run debug as well
can someone help me with the smapi like update thing
So I've been opening and closing via steam like a dumbass?
are you try to make mod? if not u want #1272025932932055121
wdym?
#1272025932932055121 is the usual place for that
thank you
you could have been using hot reload and the debugger all along yes, unless you're on mac or linux
well u can still debugger
in which case, microsoft's language, you are second class citizens, sorry
theres just more hoops
yea doomed 
but u can jump through separate set of hoops to run unit tests with game directly now
Yeah no I'm on windows. I wanted to switch to Linux but I need a visual studio for school
is there an easy way to find tilesheet locations or do I need to do math and counting? Trying to find a spot on the animations tilesheet and I think I have the wrong scale.
oh these are 64x64, not 32x32?
Yeah I don't think there is way better than looking at the draw function and deriving the rect
ok and then is it....
new Rectangle(128, 320, 64, 64)
The 128 is the column and the 320 is the row?
No those are x y width height
well in pixels, so 128 is 2 over, 320 is 5 down, and it should target this one (except it isn't in game so I'm doing something wrong).
Yeah the x y is top left point of the rect
oh arrays start at 0
I usually open image up in gimp
yes
x = horizontal offset from 0
y = vertical offset from 0
ok sick that is working as expected now, ty
ok the next one that was stumping me last night is why the projectile hits the monster and then keeps on trucking. I thought it was because the animation wasn't working (because my math was way off so it was targeting a spot on the sheet that doesn't exist), but now the animation plays when it hits the monster and the projectile keeps flying. So it's calling explosionAnimation fine but ignoring the destroyMe part.
also can't get travelDistance to work, I put it in the constructor and it only accepts ints which is fine but doesn't seem to do anything.
intellisense wants to make it ExplosionAnimation but I don't think that would make a difference.
I have no references to the pierce value or bounce value and assumed that would make it zero.
For DefineParameter, position 0 refers to the return value: https://learn.microsoft.com/en-us/dotnet/api/system.reflection.emit.dynamicmethod.defineparameter?view=net-8.0#remarks
The parameter name doesn't include the type, so I'm confused about that. But yes, we overlooked that Harmony does parameter matching on the name, so you do need to DefineParameter for every argument to make sure it has the name Harmony expects and not a default generated name that won't match.
Anyway, kind of expected it to already be resolved by the time I got back online; glad you figured it out.
so........I wanted to test and spawn a fruit tree on my map and I got a palm tree :( how do i put my custom one there....
Hi all! Question: I'm using Farm Type Manager to put wild game in my mod, and I tried inputting a vanilla sound effect using this code but it says it doesn't exist. Was I meant to input the sound file somewhere or am I just using the wrong code?:
"SpawnSound": "00000082"
pig 00000082 Pig snort Pig sound
I got that from this list: https://docs.google.com/spreadsheets/d/1CpDrw23peQiq-C7F2FjYOMePaYe0Rc9BwQsj3h6sjyo/edit?gid=239695361#gid=239695361
You need to use "pig", the first column value
oooh okay thank you!
omg this looks gorgeous
my eyes are just feasting on those colors holy crap ๐
Are there any/many existing mods that change interaction with the mailbox? I'm thinking of making one and wondering what compat issues to expect.
As long as you don't break mail framework mod it's probably fine
Ah, that one actually would be incompatible with what I was thinking...
What is "mail framework mod"?
It adds features mod authors can use to mail, still used in 1.6
So what exactly makes a good abbreviation
Crystal Clear was a good name, but the abbreviation confuses with vanilla obviously
I don't think it should interfere with MFM, then; it would be adding an alternate action when interacting with an empty mailbox.
Adding Toni in front of it makes an abbreviation that isnt very pronounceable
I don't know why someone said TCC isn't pronounceable. I'm not seeing the problem.
What would it do when empty mail 
I hold the opinion that TCC isn't very pronounceable because it lacks a vowel
But that is only for saying it like a word
The plan is to be able to send a gift. I thought there were already mods that did this, but I only found one and it was kind of meh.
Oh yeah, it's not a catchy pronounceable word like SpaceCore or maybe BETAs, but we have CP, FTM, and so on.
Ah okay
Oh I see, make sure it doesn't break this mod ig
I do wonder if it should be it's own object though
I see your point but at the same time its not really something you have to spell out like that, each letter rhymes
Like a stationary desk to mail your friends on 
Mail Services also allows you to send a gift, but the menu is a teensy bit clunky
If I come up with something else, Iโll let yall know but otherwise TCC stays
Okay, didn't find the Mail Services mod, but yeah, that is sort of the same thing.
Bye!
To clarify: I have like 100 villagers, and the way to send a gift is to go through several sequential menus in alphabetical order




