#making-mods-general
1 messages · Page 97 of 1
question, in regard to getting donations as a mod creator, is that allowed to be discussed here?, ive been thinking of ending my hiatus and starting to make more mods, and I wanted to know if its worth to get donations for mods or to even add the mods to portfolio
I know nexus has a donation point system
here yeah, nexus, no
we're a weird ecosystem
what i know is :
- you can have your name listed in commission wiki page
- you can have mention of commission in your name
- listing to a kofi/patreon page to showcase stuff is ok, but not to get donation
so im making an event and as a result of that event, i want there to be consequences. is it possible for me to have a debuff (custom or otherwise) applied after viewing the event? if so, can it be done without any c# coding?
i know it's possible to consume a food item during a cutscene and i could possibly apply the debuff that way. but i dont want the eating animation to play or anything...
idk. i'm just brainstorming ideas atm
nexus allows donations as long as there is no incentive to donate beyond just pure desire to support
Okay, so I'm just going to list out my problems and hope they all get solved because this is too much for my puny brain.
Schedule Dialogue
I'm having a problem where I want my NPC to say something (randomized and once a day) when he reaches a certain place. It’s partially working, but his text gets cut off or the entire thing doesn’t work as intended. It's not randomized; instead, it’s all bunched up together. It’s just wrong.
Here's the link for it: https://smapi.io/json/content-patcher/eaee7afaf9a34251a6d46d7c8ac0e82e
Gift Tastes
I planned for the IDs to correspond with the text they're associated with, and most notably, the last one isn’t working. It automatically triggers another one rather than the one it’s bound to, 715. And before you ask, that’s the intended code (lobster), but if it’s no longer 715, then I'm not sure what the ID is now. Now I’m speculating that none of these are connected to the text they're under.
Here's the link for it: https://smapi.io/json/content-patcher/ea3ae9a40e8547a9bf6f406cd7be28a8
Dialogue
Just the dumpster diving comment isn’t working. I'm not sure if this is the right one, but it's all I could find: "Town_DumpsterDiveComment_Adult."
Here's the link for it: https://smapi.io/json/content-patcher/3a65b469a3ed4832abe19df2dec4776a
Content.json just in case: https://smapi.io/json/content-patcher/ebc09103f44b4675ad3157bd764fc752
airyn has a whole mod that adds buffs based on who you are married to, so you can try see how it's done and see if you can get a similar effect but after seeing an event. It may require something to trigger the debuff addition itself
ill get more into it, imma get into the commission wiki page, tysm
ill take a peek and see
(i mean, i don't know for others, but i like to help others in small amount, but get overwhelmed/discouraged if stuff looks too big and not really want to do handholding)
(you may get better success by :
- splitting stuff
- spacing stuff
- doing your share of this by learning and resting and learning)
oh y'know
don't events have an action command
AddBuff <buff ID> [milliseconds duration]
RemoveBuff <buff ID>```
the first one might be because i believe the Random token splits things by commas by default, and your dialogue has commas in it. is my guess correct that its cutting off where there would normally be a comma
im just learning how to make events so im not sure what exactly i can and cant do
actually i might be thinking of a different random thing
avi knows more about random than i do
i dont think there is anything stopping you from putting mod work in your portfolio right
https://stardewvalleywiki.com/Modding:Migrate_to_Stardew_Valley_1.6#Event_changes i haven't put everything from 1.6 migration into my final boss for events but yeah
as long as it is fit for the theme or whatever
h u h oh sure lemme look 
It's exactly this
but atra gave me a point up so im gonna go back to thinking its the comma thing
When people do random with dialogue they usually switch the separator to something else for their sanity
i don't actually use input separator so if that's used uh, i'm gonna give you the content patcher link 
Ah, return to the ocean of orange...
(also i recommend if you are going to send jsons in this channel you should make sure the content of the json only has dialogue appropriate for the server, filler/placeholder or otherwise)

ok, I need help because it seems nonsense to me.
I am studying Spoilage code deeper, trying to understand how it gets the data to the items.
I have this definitions:
public static string dictPath = "aedenthorn.Spoilage/dictionary";
public static Dictionary<string, SpoilData> spoilageDict = new Dictionary<string, SpoilData>();
dictPath is just called twice:
private void Content_AssetRequested(object sender, StardewModdingAPI.Events.AssetRequestedEventArgs e)
{
if (!Config.ModEnabled)
return;
if (e.NameWithoutLocale.IsEquivalentTo(dictPath))
{
e.LoadFrom(() => new Dictionary<string, SpoilData>(), StardewModdingAPI.Events.AssetLoadPriority.Exclusive);
}
}
private void GameLoop_DayEnding(object? sender, StardewModdingAPI.Events.DayEndingEventArgs e)
{
if (!Config.ModEnabled)
return;
spoilageDict = Helper.GameContent.Load<Dictionary<string, SpoilData>>(dictPath);
.
.
.
}
basically what it does is, if called this path, creates a new dictionary? that's it?
yea it just get the asset at aedenthorn.Spoilage/dictionary
but given the AssetRequest above, the asset at aedenthron.Spoilage/dictionary is a new dictionary
this one is a feature for other mods
Framework mods refers to C# mods that add new functionality to the game's code, and allows content mods to make use of them without having to make their own C# component. They usually work by reading custom data set in content mods and then apply their changes accordingly.
Game1.content and Helper.GameContent are the same when you run game via smapi
Is there some way to reload internalassetkey'd assets? Creating a Spacecore guidebook and even with patch reloads it's refusing to refresh my stuff at random
maybe spacecore keeps a reference to the old textures
ok so I think I can make a debuff happen upon seeing a certain event. seems entirely possible
Does CP natively support wallpapers wider than 16px now?
No
sad
and with aedenthorn being retired I don't think anyone's going to fix up Custom Wallpaper Framework to 1.6
I certainly can't
Testing with just CP, InternalAssetKey doesn't reload, guessing it's just cached on game launch
Maybe @ivory plume would be interested in adding that feature in a future update? Just a suggestion of course
i dont think somethin like that is generally in content patcher's wheelhouse. anyone is free to update aedenthorns mods though, someone might take it up eventually
Could always try commissioning someone for it too
has a link for this one?
wide wallpapers 
but aside from this, i suppose you could make a giant "painting" furniture?
I got this one but I don't find the 1.6 one
its not updated
thats the point, there isnt one
but u can since its aedenthorn
oh ok... I thought the 1.6 one had broken
yeap, that's what I thought
I think I know how I will do my Spoilage Plus. I think I understand how the original one works
The problem with a painting is that it goes over certain tiles that wallpapers go under
while I let my ideas settle in my mind, I think I can take another update to take it easy
I will try to update this framework
Though I could maybe make it work by having paintings for the open sections and a matching wallpaper for the rest
Oh neat, good luck!
Content Patcher is just a general framework for editing content assets, it doesn't implement custom functionality like that (aside from custom locations for legacy reasons).
I need a machine to extract my ideas of dialogue and write them out coherently for me
Also I need more screens for space o-o
i was dreading dialogue for years but it gets fun if you spend a little valuable daydreaming time to try and characterise your npcs some
ok, I am making a patching postfix to a method that receives a string var wallpaper_id. I have this entrance for my postfix method:
public static void Postfix(DecoratableLocation __instance, string wallpaper_id)
{
\\bunch of code
}
When I try to run, I get this exception:
System.Exception: 'Parameter "wallpaper_id" not found in method virtual System.Void StardewValley.Locations.DecoratableLocation::UpdateWallpaper(System.String wallpaperId)'
What is wrong?
well, this is the last decompiled I had:
public virtual void UpdateWallpaper(string wallpaper_id)
maybe it changed to now?
your decomp is likely out of date then, its wallpaperId for me as well
ok, good to know
wallpapers did get some minor backend changes iirc in 1.6.9 so
Okay, so I got my Spirit's eve Costume mod working as intended, however when I tried to get my mod that changes the Happy face on Jas's sprite it's using the wrong smile asset on Spirit's Eve so it looks silly.
I'm trying to have it be so when it's the 27th it's changes the portrait using the second edit image, and on every other day it uses the first edit image, but I clearly did something wrong, and cant figure out what
Case in point
https://smapi.io/json/content-patcher/ebd76740ce3646729e815e8c76d03a42
I'm trying to have it be so when it's the 27th it's changes the portrait using the second edit image, and on every other day it uses the first edit image, but I clearly did something wrong, and cant figure out what
Okay, so I got my Spirit's eve Costume mod working as intended, however when I tried to get my mod that changes the Happy face on Jas's sprite it's using the wrong smile asset on Spirit's Eve so it looks silly
"Wallpaper and flooring can now be applied to custom map tiles if their tilesheet ID contains walls_and_floors."
i guess the parameter changed when this happened
/speculation
you don't have to speculate if you become oragne
not all oranges have repo access!
yes, but everyone who has repo access is oragne
well, unless they have like a cooler color or smth
better to just target Portraits/Jas_SpiritsEve with a different patch for the different mouth in this case, same way you targeted all the others but on its own this time
the gist does say there can be exceptions for repo access for non mod authors
so that might not even be true either!
RE: Awsomebird27, by that i mean, just dont include it in your first patch up at the top, which you are still doing
actually, are you sure its even supposed to be Jas_Halloween?
(which has an extra comma at the end there too inside the quotes which is also probably breaking it)
thanks a lot Buttom and Selph
the game is starting now
May I DM you?
Sure but I'm headed to bed so I'll answer in the morning
ok, so you can test the updated version in the morning
I am also proud of my skills to clean the harmony patch structure now
Yeah, I changed some of my file names, cuz I was cleaning up some sloppiness. So Jas_Halloween is the asset from my costume mod which looks like this
What I'm trying to do is use an asset I made that's just the mouth of this version ↓
to replace the v shaped smile with mine
Made my first custom cooking recipe! Yum.
the three new crops are surprisingly good soup ingredients
one carrot gives +75 energy normally, don't?
but is Jas_Halloween the name of the Portrait target for that seasonal outfit you're trying to override, though?
even with the big defense bonus, since energy is the most used resorce, it seems a downgrade
I guess I could increase it I was basing it roughly on pumpkin soup, didn't think about how these ingredients give a lot of energy. On the other hand, how much energy would eating a rock give? probably negative : )
zero, but that's where comes the debuff in speed and attack, and increase in defense, don't?
I have two NPCs in my new mod, my intention is to pair this with another recipe from my other NPC for a drink which will give something like +2 speed, +5 attack, -10 defense
Theres a point when getting energy isnt really an issue
I'm working on a Seasonal Maru mod and I'm in the middle of testing.
SMAPI is no longer throwing any errors and I see her spring outfit works, but is there any way to test all of the other seasons without having to click my bed a thousand times to progress through time quickly😅
haven't decided on final numbers for anything but the idea is to make the drink risky without the soup, and make the soup cumbersome without the drink
Cjb cheats
I agree, but yet using 3 big energy given ingredients in a soup that gives less than one of them would give seems a downgrade anyway
Not if its a good trade
Ty! Completely forgot about that
You can also type debug setseason winter as a SMAPI command I think etc
Yes?, the way I did it was my Costume mod replaces the seasonal outfit, that works fine both with or without seasonal outfits installed, and my smile mod will replace the smile of both the seasonal and my costume mod
Cooking food is trading money for buff. Trading energy for buff doesnt seem a big deal
or world setseason I mean
I hope that makes sense, I'm not sure I'm quite explaining it correctly
the point is if, as it is, it is a good trade
anyway, I am just interested in knowing that one can put modData in an item...
Defense is super string so yeah it is
i actually think this should have more energy not bc of the energy of raw materials, but because they are spread across 3 seasons
Speed debuff is more annoying than losing energy would ever be
so making it would take some planning
I'm kinda with Lumina I don't think the energy matters that much. But if it bothers people I will increase it, its not a big deal to me
i may be a bit confused then. if that set of portraits is only used in their halloween outfit anyway, why do you only want to replace it on halloween itself? either way, try just removing that extra comma i mentioned inside the quotes
Sadly as a stat in vanilla it's quite poor, but +10 from a single food is not something to sleep on
I did it's still showing the wrong version of the smile
it should reflect your thoughts over the item. if you are happy as it is, good
defence is useless if you're not getting hit, and energy prevents you from getting hit
I just thrown it because maybe it was overlooked
would you mind sending the updated json for it then, as well as the json for the original halloween portrait you are trying to edit overtop of here from your other mod?
Disagree completely. I always use +5 def rings in my volcano pairs. Armor stacks flat additively so at a certain point nothing can touch you
How does energy prevent getting hit?
I dont think i ever felt that way
does swinging weapons not cost energy in this videogame
Nope
wtf
+5 defense hardly matters when monsters are doing 50+ damage per hit tbh. And eating completely nullifies all the health issues anyways
Swinging tools yes, but weapons no
Funny enough no lol, neither with the scythe
that moment we all found out blueberry never got into combat
(speed is usually the agreed upon 'broken' stat isn't it?)
Lol
luck op
longevity gives an option to make scythe and weapons to use energy to swing, but raw, nope
Someone doesn't play the game
I got a mod that gave me up to 8 bonus defense and combat was waaay more relaxing. Of course it depends of where and what you fight
90% of desperados don't play the game lol
speed and luck, but def is underrated
I made a mod that gives you buffs for getting stardrops and I still haven't found a good balance for the defense buff because just adding a little per makes me nearly impossible to kill lol
bluebs only here for the farmerrenderer chaos
i think magnet is the most fun stat though
pants of shame
I have a 0.2 hp/s heal on my boots and find it nearly impossible to die
Lmao, yeah, I thought about adding regen, seems like it would be broken though
i dont see anywhere in the costume mod that you're loading or editing anything onto Portraits/Jas_Halloween
I already have regen eating food with LoC
Even made it a float and a per second thing and it's still broken
you're still just editing Portraits/Jas_SpiritsEve
ah but love of cooking outright blocks you from instant heal other than elixirs
if enabled
to incentive you to play good and not heal
Anyway balance is hard especially with buffs and speed stuff and other mods, but i appreciate a good reference to stone soup
yeah, and I loved it
The only other thing I could think is to make it some kind of damage paused regen
(Primarily did it because atracore equips can also fire for "defeated monster" and "player hit")
And I was mimicking a vampire ring
i think the bat trinket from my halloween mod is prob a bit overspec 
I do really like lifesteal in games lol
-5def 0.2hp/s
but at least u gotta do crit build for it
That mod just replaces seasonal outfits, or the vanilla game sprite/portrait with my sprite/portrait
regardless of what its replacing, if those are the only relevant jsons, then Portraits/Jas_Halloween is not a thing that exists. you're not replacing anything with your EditImage in the smile mod
the smile is the one that's supposed to edit the costume one, only should it be installed
the only things your costume mod is affecting are Portraits/Jas, Portraits/Jas_SpiritsEve, and Portraits/Jas_Fall
it will replace all of those with your assets/Jas_Halloween.png but it doesnt change the name of what you're editing there
so in your smile mod json, when you do editimage on Portraits/Jas_Halloween, that doesnt do anything, bc nothing is there
ooooooooooh, okay, I think I see what you mean
so I need to not EditImage but instead load Jas_Halloween instead of theirs?
no, i imagine you can just EditImage on Portraits/Jas_SpiritsEve like you were doing in your costume mod
loading a different target would involve changing Jas's Appearance entries to use your new target, which is more work
I think I did do that, and it didn't work lemme try again tho
and if Portraits/Jas_SpiritsEve is only ever used on spirits eve anyway, you dont need the When condition
Unless you want her to wear it all day. If you want her to wear it outside of the spirits eve map then you would want a when condition but if you don't, then just edit the spirits eve portrait and it'll load yours instead of the base one (given that you don't have anything else overwriting what you're trying to do like SCC)
that depends on what the original mod that they are overriding is doing
iirc they are replacing seasonal apppearances, uh, Appearances
it mightve been SCC they meant i dont remember now
Well and I'm kinda jello brained so I probably should keep my attempts at aid to myself... but from my Magnus mod I know you can use the when condition to make the character stay in costume all day.
the process is different when using When conditions vs the 1.6 Appearance system
1.6 Appearances have Conditions applied to them as well as season and indoor vs outdoor, and if the original mod uses an Appearance with a Condition that only applies it during a festival (such as only in town and on fall 27), then it wont matter whether you have a When condition or not on your EditImage patch
because the original mod is only going to apply it according to its Conditions anyway
Ok. Then I'm probably fully out of date. So, Awesome should probably ignore me fully :/
Aaaand I should probably check my stuff when I'm less jello brained to be sure it still works >.>
a When condition is when you do just want to edit their base sprites and portraits, which is what you used to need to do before 1.6, but even then that wont matter bc Appearances can tell the game to use a totally different asset for their sprites and portrait and ignore the base one completely
that wont always* matter
I tried and it didn't seem to work 😦
https://smapi.io/json/content-patcher/21692d9ca3b9419b921437066cc797af
Same issue of her smile being tan rather than white to match the costume
huh... I just tested this with SDV 1.6.12 and... my DayEnding "spoilage"-like code works fine with Automate? Coffee Maker, Crab Pots, Mushroom Logs, all output fresh, unspoiled produce into a chest next morning
Weeell frig. Yea that's something for me to check when my brain is less gooey.
im trying to fix my smapi bc its jus not opening, like its not launching when i double click it. i had a thread on like the tech help chat but it closed so idk if i should open a new one or not
does SMAPI or CP show any errors or anything in the console? have you double checked the spelling of the filename you're loading from? and it shouldnt matter, but can you try removing the Portraitrs/Jas_SpiritsEve part from your first patch at the top, in the Target line?
i jus needed to update it idk what to do 😭
According to the bot in your post, if you still have issues you should create a new post
kk tyy,, i jus wanna play my game mann
would love to see it
.12? God I'm out of the loop
Is .12 the beta?
anyway I will be working on my spoilage plus tomorrow
.12 is just the currently out version of stardew
Tried that didn't work sadly same issue
I'm still on .10 lmfao
I'm clearly not paying attention to anything... I thought we just got .9!
I am also using the 1.6.12, but spoilage is yet spoiling my Automate crab pot fishes

are you sure they're not being added into existing stacks?
.9 had issues, had to be locked away
yeap, started with an empty chest
Oh... crazy I didn't even notice
I will do more tests
who will win the bet, what final version will we land on...
unfortunately i do have to go for a bit but, if you can do a patch summary in your console and then upload the log to the smapi site and then post it here someone else with fresher eyes might be able to take a look, sorry i couldnt get you to the finish line 
anyway this is what I have, it is different than how Spoilage does it
I also have a check that ensures items of different 'freshness' don't stack
static void OnDayEnding(object? sender, DayEndingEventArgs e) {
ForEachItemDelegate Handle = (in ForEachItemContext context) => {
Utils.SpoilItem(context.Item);
return true;
};
Utility.ForEachLocation((GameLocation location) => {
Chest? fridge = location.GetFridge(onlyUnlocked: false);
fridge?.ForEachItem(Handle, null);
foreach (SObject obj in location.objects.Values) {
if (obj != fridge) {
if (obj is Chest chest && chest.specialChestType.Value != Chest.SpecialChestTypes.MiniShippingBin) {
obj.ForEachItem(Handle, null);
}
else if (obj.heldObject.Value is Chest chest2) {
chest2.ForEachItem(Handle, null);
}
}
}
foreach (Furniture furniture in location.furniture) {
furniture.ForEachItem(Handle, null);
}
foreach (Building building in location.buildings) {
foreach (Chest buildingChest in building.buildingChests) {
buildingChest.ForEachItem(Handle, null);
}
}
return true;
});
foreach (Item returnedDonation in Game1.player.team.returnedDonations) {
if (returnedDonation != null) {
Utils.SpoilItem(returnedDonation);
}
}
foreach (var item in Game1.player.Items) {
// Handle better chests? Idk
if (item is Chest chest) {
chest.ForEachItem(Handle, null);
}
Utils.SpoilItem(item);
}
}
wait did that show in the full Discord window? I thought it was supposed to collapse
should I reupload that
(and with the hopefully goes without saying "pls be patient if they ask questions i already did bc they probably dont have all the context/havent been following along like i have been" clause)
Mod that let's you put a stack of bait in a crab pot
And one gets consumed per day
(Don't expect me to do it.)
I have an entire fucking design I need to review this evening
(note: this is copied almost verbatim from the game's Utility.iterateChestsAndStorage function, with minor changes)
how do you prevent different 'freshness' to stack? different items?
interesting
huh, aedenthorn's spoilage doesn't patch canStackWith, nor does it change the spoiled item's internal name
can't we get rid of checking each location to check each item location instead prior to 1.6.9? that's what I intend to change in my code
See, I would like the idea of spoilage more if it didn't mean I needed a pile of like
Chests everywhere
nope. it just changes the description and stacks them to the least freshness one
yeah... it might be the case that your crab pots are throwing the fresh items into the stale pile
try testing with an empty chest?
yeah I agree, see my post in #making-mods-general message
Is spoilage added by a mod or by .12?
oh thank god
Meanwhile I want a way for crabpots to hold a stack lol
got it, hoppers now work with crab pots
but I definitely am
It's okay thank for all your help I'm sure i'll figure it out sooner or later
it would be necessary to turn them into chests because how machine works
(You don't have to give me tips and tricks lol)
Lmao
I see everyone's colors have disappeared
Back to being able to recognize people based on their role
I am Skeleton War general no more 
My secret is I probably already have an implementation in mind
And I'm not going to do it lol
I have an entire design to review
I just peaked at crab pots code and ew
is there a line limit for jsons and CP lol im at 1119 lines and only have 1/10th of the mod done
1119 lines are beginner's talk, look at RSV's i18n
@light jasper Still getting the tabs on SpaceCore's equipment menu apparently, any chance you could look into it?
@woeful lintel Hey, just checking in, I know you had been doing a pretty serious rework, how's that going?
I swear I had did before. but now it works as intended again...
so I forgot there were going to be larger changes in the recent update...this will be fun.

oh are you a part of the guinea pigs now
now I can wait for the a-patch-alypse to pass to work on my Spoilage Plus
lol im doing my mod durring this mess ^..^ just getting the ocational patched map lines but find the issue and fix them
i think to myself, "man i sure do yap a lot for this singular npc expansion" and then i think about those before me... and i don't think about my i18n lines anymore
Well maybe they should migrate to i18n folders 😛
was very happy casey's pr got approved 
Old mods adopting new techniques? Blasphemy
I don't make PRs that I haven't at least gotten the idea itself approved by Pathos 😛
(Or whoever the corresponding author is)
(Unless it's like an obvious bug and a fix for it or something)
you will be missed for your vacation time after all of these hotfixes go out, but i'd say it's well deserved
Meanwhile I just send +1k/-1.4k
That's Automate.
SO...with the new update was there a way to stop Trinkets being active in certain maps?
nope. Atra wants to put the stack into the crab pots, not in a chest that feeds the crab pots
with just CP? probably not
Obviously I know what he said; Automate accomplishes exactly the same goal with 2 extra seconds of in game time.
I just love how Automate lets me make big machines with modular operations
And it is way more efficient to manage 10-20 crab pots that way, than to fill each of them up with bait.
i guess you could patch the C# class the trinket refers to based on location, actually
If people try to enter your location with a certain trinket in their inventory, patch a warp right next to the entrance to make them leave
I have added dialogue to make you feel guilty.
or just warp player to the outside location
No
(But what do you want?)
I was thinking within the limits of CP
If we're already going to C#, then there's no limits, just nuke the hell out of the trinket
No murdering of slimes on map: EastScarp_ToriSlimeBasement
how about a map with no exit
I thought Buttom had suggested to make a C# patch and we were going with this
(possibly set via the "data" in the C# component so I can add other maps to the list)
Make them either return scepter home or pass out lmao
can u make the slimes invincible instead
TrinketEffectClass is a field you can touch with Content Patcher. though it probably doesnt change existing trinkets
Well I think the frog just eats them right
I Think I may have made them invicincible already, but yeh, frog eats em
oh froge specifically
you could forcibly remove a trinket if they have it and then give it back again (either with the new, useless trinketeffectclass or after they leave) but i dont know if you could account for modded ones
Frog don't care about simple things like being unkillable
thats why you'd need to remove it and re-add it right
if the slime is spawned by FTM, there's specifically an anti-frog setting
"InstantKillImmunity" prevents frogs eating (tongue just goes through them), and StunImmunity affects the frost thing
https://github.com/Esca-MMC/FarmTypeManager?tab=readme-ov-file#monster-type-settings
nothing specific for other trinkets, though, if those are an issue (though I imagine giving them 999 dodge works)
this is good point though i should probably include a way to disable trinkets
besides the abilities own conditions
oh thanks! I knew I'd talked someone into it 🙂 I'll add that in now. Can set their Health high to inspire guilt but no actual murder
I did see that in the FTM notes, but my mind had shuffled it into "didn't know where I'd seen it" mode.
its okay though atra, as Esca already put the preventions in place.
I'm pretty close to being done: the rework itself is basically done, I'm currently fixing lights in slots (they never worked because I forgot), and I only have to add some simple features before writing the new documentation and test all of this. You can track the progress when I update this: https://github.com/Leroymilo/FurnitureFramework/blob/3.0.0/doc/Changelogs.md#30-work-in-progress
well, I am proud of being of no help at all
I'll try and set if for when I do the slime show too, cos it would really suck to attend a slime fanciers convention and murder all their slimes
time to ready for bed
Although.... would trinkets work in cut scenes?
vanilla ones do
well, I shall see what happens
base.Owner?.currentLocation == null || (base.Owner.currentLocation.DisplayName == "Temp" && !Game1.isFestival())
I'm thinking of making it a festival you can attend annually and trade petrified slimes for slime related memorabilia
so it is not drawn if player is in temp location thats not a festival
so temp maps are safe, that's good
would FTM work to spawn slimes on a festival map?
but that is just the visuals though, i dont think vanilla bans abilities 
unclear what exactly happens if frog not drawn
DH has added code to spawn slimes in events but he didn't put a "no kill" on them so it might. I guess we shall find out.
I'm not sure how passive festivals are handled exactly; FTM has trouble with maps that don't exist at the start of the day
passive festivals are just fancy map patches I think (actually don't quote me on this)
I think it would be a general festival map rather than a passive one. It'll be a separate map
That's hilarious
actually passive festival would be best. It'll be a new map accessible for only one day of the year via the Scarp Bus
I"d probably use the Park where the Dog Adoption event was as I"m too lazy to make a whole new outdoors map.
anyhow i'm jumping the gun
Oh nice! Thanks! ^_^ I'm trying to make some child beds but I want them to be small so >.> that way they'll be visually distinct from adult beds? but then I remembered that you're updating soon so I wanna hold off cus from what little I know about what you're up to, that might make my life a little easier with the teeny beds.
looking at it again, I think the frog doesn't update its eating timers at active festivals either
if (!Game1.shouldTimePass())
return;
/*...*/
public static bool shouldTimePass(bool ignore_multiplayer = false)
{
if (Game1.isFestival())
return false;```
shouldTimePass op
What about the shoooty trinket
The bow
so to stop something being murdered, Esca, should I set the HP high (like 10000) to avoid it being murdered?
"magic quiver trinket effect" does the same thing in its update
Can you give it 100% evasion?
so an active festival they'd be okay cos Time doesn't change, but for a passive they would be runnig?
would evasion work against the quiver?
that'd help, but giving it a lot of dodge also helps, so they can't get smacked around by most effects at all
Because we can kill a 10000hp mob eventually
iirc it's what SVE does for a couple things
yeh I wasn't sure if the quiver eliminated dodgechance
I thought I"d done it too, but I guess not on the FTM side of things
(I think I did it by locational edits in the code)
So evasion is DodgeChance?
yep
and I don't see anything obvious in the quiver code about negating that, it just spawns a basic projectile
it ignores collision, but doesn't have any parameters that mention evasion, at least
it is, though I'm not sure if any weapons reduce it, so setting to to 9999 or something could possibly help 
extremely evasive slime
"MonsterName": "Green Slime",
"Settings": {
"InstantKillImmunity": true,
"HP":"10000",
"DodgeChance":100
}
}```
I don't mind if you freeze them as that doesn't hurt them
yeah, the immunity settings were requested by Flash for bosses, since the frog would insta-kill them (possibly affecting loot?) and multiple players with stuns would just win easily
but for passive monsters, the latter won't affect much
oh right, some weapons have "added precision", which is a multiplier on "miss chance" (evasion) when attacking monsters
so in some cases, 100 won't actually be perfect
I recall someone posting about the frog 𝒄𝒐𝒏𝒔𝒖𝒎ing the peaceful shadow people in SVE
yeah, that'd be an issue
they'll target pretty much anything without patching
okay its set high, hopefully that will prevent murdering of domestic slimes
The frog will devour everything!
One day the frog eats youuuuuuy
haha, imagine that
Well, I don't know if this update will make this easier since collisions are still limited to tiles, but at least you won't have to update it if you wait a bit.
I have ideas about freely defined collision boxes, but I don't want to feature creep this update.
if you hit all the monster goals, the frog realizes that YOU, the farmer, are the ultimate monster... and thus you are its next prey.
when u get eaten you have to fight your way out of the frog
Hey, I'm not gonna complain ^_~ I still have to make the crib anyway and that will be CP since it's not a placeable item.
Okay so frog cannot eat them but keeps trying, he's so stupidly cute.
I've decompiled the source code in ilspy, but I keep getting a "System.NullReferenceException: Object reference not set to an instance of an object." error when I try to save the code. Any idea what dumb thing I'm doing?
The source of the error is inconsistent as well. I've had it hit for two different files.
what do you mean save code?
Decompiling often doesn’t make code that recompiles, as Khloe’s been experiencing recently
If that’s what you’re trying?
NREs in general are a little bit hard to track down unless you go full on nullability stuff everywhere
And sometimes the game just hands you nulls for fun
wooo finished adding stuff to the weather, gotta check it tomorrow though my pc is on fire right now
From the wiki: Right-click on Stardew Valley and choose Save Code to create a decompiled project you can open in Visual Studio.
I returned to ignoring the dialogue hellscape, its just hanging out there
what version of ilspy do you have
Interesting—that never worked for me but ILSpy liked to crash on me
I'm not trying to get it to be recompilable. I'm just trying to get it in a format so I can view in VSCode and do a diff with an earlier version. I have gotten this to work in the past (I have folders for 1.5 and 1.6).
ILSpy version 8.1.0.7455
mystery 
remind me in 22 hours to check if I broke something with pdw
😏 (#6349658) (22h | <t:1731111420>)
i can confirm that ilspycmd works at least
ilspycmd?
ilspycmd -p --nested-directories -r "$GAMEPATH" -o SDV-CSharp "${GAMEPATH}/Stardew Valley.dll" "${GAMEPATH}/StardewValley.GameData.dll" -lv CSharp10_0
its cli version of ilspy
Added it to my 1.6.9 release, thanks for the reminder 🙂
I can see the decompiled code in ilspy. It just won't save sigh
abs0rbed i hope u r survive the waves of "uiis2 doesnt work"
thankfully it wasn't too bad, mostly just a field I was reflecting that isn't private anymore
Oh. checked again and the file the null ref error is thrown for isn't even showing up in the ilspy navigation bar
did you have something unrelated loaded maybe?
...I updated to the most reason version of ilspy and it worked. Classic.
Thanks for bearing with my silliness
Mannn i want to make a merman npc mod but I have literally no knowledge of coding
So down the drain it goes
Keep in mind that making NPCs is a complex process that requires learning many different aspects of Stardew modding.
Here are a few links that can help get you started on all that you need to know:
-
Tiakall has a great tutorial on making a custom NPC for 1.6.
-
NPCs no longer use dispositions, check the wiki page for the new NPC data.
-
Aviroen has put together a template that will allow you to easily create a romanceable NPC.
-
Feel free to jump into the https://discord.com/channels/137344473976799233/1277457201077813280 thread for more interactive feedback and help!
-
Fireredlily has a WIP NPC Builder Please do report any errors you get with it into the NPC thread!
!anyonecancook
I love mermen
Create that oc
Er
Npc. Same thing
But modding stardew is actually surprisingly simple once u get the hang of it
Is that referring to the LocationOfTownsfolk.CheckSelectedBox NRE that happens on every click?
This may sound like a silly question but can I use separate json files to store options and call them in my main file with content patcher
Thank god I didn’t want to have to store a lot of location data variations in the main code
@lucid iron from what I’m reading on include the only rules I need to follow is make sure I follow change structure and I can name the new json files anything I want within reason and place them in other folders to sort them out is my assumptions correct
but is it about trinkets 
(chu meant about the trinket framework)

here's a quick example of using includes with config
includes r nice for not repeating "Config": true 10000 times
Or having to sort though 10000000 lines of code not used until special situations
love to gate an include with the config/hasmod/whatever token check. then all of the patches inside the include can just... not specify conditions
Well off to sleep I’ll start breaking my code out later
How to get the total number of fish caught by the player
Having trouble with content patcher while testing a special order: https://smapi.io/log/8c39b42e8dac4a89a38ac0372bf2c27f
Log Info: SMAPI 4.1.5 with SDV 1.6.12 build 24312 on Microsoft Windows 11 Home, with 4 C# mods and 3 content packs.
[X] | [X] | [ ] | Default | Fixup Condition Check > fixup.json > Special Orders > assets/Data/SpecialOrders.json > EditData Data/SpecialOrders #2 not sure why that line is matching conditions but not being applied
Or how to know that the player has caught a fish at this tick?
it's saying your when conditions aren't being satisfied "Hearts:Shannon": "{{Range: 7, 14}}"
are your internal npcs names just 'Shannon' and 'Russell' ?
Yes, but the Shannon check is for a different special order
the Russell check is fulfilled but not applied
I feel like smapi was just 4.1.4?
Okay I tried to see if anyone else replied to this but it's been too many hours and too many messages lol. Range doesn't check between the values listed, it just gets converted into a list of the numbers within the range. So this {{Random: {{Range: 1, 7}}, {{Range: 20, 30}} }} will be converted into this {{Random: 1, 2, 3, 4, 5, 6, 7, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30}}, saving you from having to write the entire list of numbers out yourself. (This may have been what you meant anyway when you said check but I wanted to be sure in case you thought the range token was just going to pick one number out of the range.)
And then Random will check that list to pick one of those numbers at random, yes.
*we're already on 4.1.6
*
4.1.5 hit sometime yesterday aaand I guess 4.1.6 arrived when I was gone lol
i think it just updated
I'm just adding the ||LostItemShop|| to EventTester
not sure why they're not applying, if you have the specified hearts, i assume it goes daystarted for special orders
And in three launches of the game I see
pretty sure there's a fishCaught stat or similarly named stat
4.1.4->4.1.5->4.1.6 ? 
stand by it looks like it loaded after I slept a couple days... doing more testing
"You can update to 4.1.4"
"You can update to 4.1.5"
"You can update to 4.1.6"
yeah i've updated smapi like 6 times the last few days
poor pathos
which I appreciate! happy to have the fixes going in
Next up I suspect is checking all localized data files for "(no translation)"
Or at least dialogue and events
i am currently laser focused on the fix for gender blocks in i18n files
wasn't sheku asking for that, just a runthrough of all loaded npcs to see if any keys have the no translation
Yup!
would definitely save me the trouble too considering my i18n let alone an expansion
This just means the asset wasn't requested
That asset is only requested on Sundays and if a player checks the board
TIL
Thank you for that, I didn't realize. As soon as I saw your reply I did a debug specialorder [ordername] and it seems to be working.
YAAAAAAY fixed with SMAPI 4.1.6 and CP 2.4.4 
I need help checking my code. I'm trying to put the Cowboy Boots in Sandy's Shop at the Desert.
I cannot see what I'm doing wrong...
{
"Format": "2.4.2",
"Changes": [
{
"Action": "EditData",
"Target": "Data/Shops",
"TargetField": [
"Sandy","Items" ],
"Entries": {
"CowboyBoots": {
"Id": "CowboyBoots",
"ItemId": "(B)515",
"Price": "25000"
},
},
},
]
}
I'm new to this and I am just experimenting so please kindly tell me what's wrong here if you know
try changing id to also be (B)515
(i thought Id was just an arbitrary id for the entry rather than an actual item value)
is Sandy's shop entry actually called Sandy? I thought it was "DesertShop" but that might be a false memory and I can't check rn
Will try!
my internet is acting up so i can't check the wiki, i'm on mobile casting
also yeah id doesn't matter besides being unique
afaik, it is Sandy
my trusty ol' unpack s'all i got 
is the problem that the boots don't show up in the shop at all?
Yes
It doesn't appear at all, not a trace.
So I was able to test my special order, and it sent mail as expected, which is supposed to have my custom recipe attached: "LawAndOrderSV_SpecialOrders_WinterProvisions_Mail": "@,^^Your donation of coal and cloth is greatly appreciated by us, and by the community. This should be plenty to get by this winter. I wanted to share my own special recipe as a thank you.%cookingRecipe LawAndOrderSV_StoneSoup %%[#]Winter Provisions" but the letter doesn't have the attachment and looks like this:
am I formatting the attachment wrong?
%item id cookingRecipe <key> %%[#] i think
Welp, it didn't work
Thanks though
huzzah
i don't know what the other fields default to
I just checked SVE's Sandy Shop edit and it is more or less the same, besides the item entry itself.
Can you...
- open Sandy's shop in-game again;
- enter
patch summaryin the SMAPI console window; - upload your SMAPI log (see instructions on that page);
- and post the link to the log here?
I will try
Log Info: SMAPI 4.1.5 with SDV 1.6.12 build 24312 on Microsoft Windows 11 Home, with 17 C# mods and 8 content packs.
Suggested fixes: One or more mods are out of date, consider updating them
There. SMAPI also just updated so I will do that first.
Which content pack is yours in the list at the top?
interesting, qi seasoning decreases my food's -2 attack debuff to -1, but a -2 speed debuff is not changed to -1
SVE RSV Modified Weapon & Boot Stats 1.2.0 by FjorlagRond
Scarabaeidae...
daba dee daba di
I don't see any patches which target Data/Shops:
Patches:
loaded | conditions | applied | priority | name + details
------- | ---------- | ------- | -------- | --------------
[X] | [X] | [X] | Default | EditData Data/Boots
[X] | [X] | [X] | Default | EditData Data/Monsters #1
[X] | [X] | [X] | Default | EditData Data/Monsters #2
[X] | [X] | [X] | Default | EditData Data/Monsters #3
[X] | [X] | [X] | Default | EditData Data/Weapons
Are you sure you're editing the right file (i.e. C:\Program Files (x86)\Steam\steamapps\common\Stardew Valley\[CP] SVE RSV Modified Weapon Stats\content.json)?
(is it not included?)
i was thinking scarabaeidae toilet, to make sure your mod is a hit with todays youth
^ pathos delete this one thanks
(I don't see any Include patches in that summary.)
😰
I'll be right back
i've had the uncontrollable urge to make a cursive font just for my own hell
The uppercase ones seem to have less slant than lowercase which kinda gives it a weird look IMO. otherwise 
i'm pretty sure you can just import whatever fonts if you have them, but this one's a little particular to match the usual sdv font
they're not awful when you've got a workflow setup, and probably the only valid reason to be using xnbcli for anything
does anyone know how the museum spaces work? and would expanding the artifact area need to entirely be to the right of the library?
valid museum spaces are determined by the tile you use from the tilesheet
It's working now, Thank you so much!
I feel so dumdum that I forgot that about moving it to another folder T_T
so just use the regular museum spaces and I should be good?
should be fine
kk
i believe there are mods that already expand the museum area too, if you just need that and dont want to have to do it yourself
Welcome!
Just one little suggestion: the ID for custom entries should ideally be prefixed like this (see unique string ID).
"Id": "{{ModId}}_CowboyBoots",
ah yes the real correct way 
Okay! Should I still do it even if it's a Vanilla item?
Yep.
Okay, copy.
the "Id" field for stuff like that just identifies the shop entry, not the item
so you need to make sure it doesnt clash with any other possible shop entries
(You can use {{ModId}} exactly as-is; Content Patcher will replace it with your actual mod ID automatically.)
someone else, for instance, could also add one with an id of "CowboyBoots" and break things
well not break, but overwrite, potentially just breaking yours
Makes sense
I only ever found two that do that, one adding tons of spaces, but more utility style than aesthetic, and the other adding a lot more than just expanding the museum. I wanna expand the museum for my own mod, but also release a optional download of the expansion as a standalone.
fair enough! just wanted to mention em in case you were just wanting to make it bc you couldnt find one 
(is this when i ask how far along you are in the museum framework?
)
framework?
sure! the same amount i was the day the halloween event started
i was working on a framework to allow easier creation and customization of custom museums, separate from the gunther museum
ah
it got sidetracked by the mod jam
kewl
and then 1.6.9
afaik no one's crashed and burned in the updates but i can check my modlist again
my motivation is what crashed and burned
Is it possible to edit the name of Vanilla items?
need new hyperfixation, chu stole the demonopolize-marnie
you can edit vanilla items through Data/Objects
you only want to change the DisplayName, though
Okay. Will read about that. Thank you!
if you do you'll also likely want to use Fields instead of Entries to affect only the DisplayName field
if you use Entries and edit an existing item then it will replace every field you dont specify with default values
I see. So both of them are useful in different situations then.
Thanks again.
just for you. don't mind the flowers 🤧
another victim 😌

i'd offer you this one but it's only a-zA-Z and space
fine for binomials, otherwise mostly useless
Yeah, if I do pick up an italics font it should ideally cover an extended range to be usable for more than just English players.
That is definitely a Future Khloe problem.
i was happy to do a full character set for a monospaced font since i didn't have to worry about kerning at all, but for a natural font i'm never going that far hahah
Once upon a time I was making a tool for converting fonts to sprite fonts. I should resurrect that project and also work on the auto-kerning tool for it.
that definitely sounds like the kind of project you start and never finish 
I can confirm I started it and it's not finished 😄
Though I did get far enough for it to download fonts from Google Fonts and bake them into SpriteFonts
That part was working fine.
It also has a font analysis command that measures every glyph in a font for their exact dimensions.
So in theory... I'm close to the point that I could work on auto-kerning?
is it possible to specify a specific type of roe as a cooking ingredient?
I for one appreciate the beginnings of this insect mod. may your mod be full of bugs! (the good kind!)
Looks like you could do this with SpaceCore, CookingRecipeOverrides allow you to specify context tags for the ingredient and you can make it require all the context tags instead of any and then use the preserve_sheet_index_# of the roe type and id_(o)447 or id_o_447. At least, conceptually I think this would work, I haven't tried it
Oh, my roe ID is wrong there, I was looking at Aged Roe
Would be id_(o)812, id_o_812, or even item_roe
I planned for the IDs to correspond with the text they're associated with, and the last one isn’t working. It automatically triggers another one rather than the one it’s bound to, but if it’s no longer 715, then I'm not sure what the ID is now. Now I’m speculating that none of these are connected to the text they're under.
Giftastes.json https://smapi.io/json/content-patcher/501291ee097e4ac89eaaa8ee63e92781
hell yeah, another "doesn't work in new update" post, I left a "comment doesn't help" answer for artistic symmetry
I would love reactions on Nexus, so I could answer
to every useless comment.
Make yourself a 5000% version of that, drop on Imgur and just link back - loads up as inline image in the comment (might convey the message.. or not
)
Im working on my mod with custom NPCS and i just updated SMAPI and they all disappeared haha, does anyone know why? I dont get an errors when loading the game, theyre just all gone
😔 "doesn't work" that gives me so much information on what the problem is .. totally
!log Have you confirmed your mod is still in your mods folder?
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.
yes, all my maps and items are still in game but the npcs are gone 0-0
are they gone gone? or are they just stuck in bed
completely gone, not in the social tab in game. shops still work but the vendor pngs are missing
Do a patch export of data/characters
Did you update CP as well?
Yes i did
re: #making-mods-general message
I tested it and it does work, though I'm still trying to figure out how I'm supposed to format the OverrideTextureRect field as the documentation doesn't have an example of it
Hm, I'm on latest and Lacey is still in my social tab
Looks like it's just a regular rectangle object so
"OverrideTextureRect": {
"X": 0,
"Y": 0,
"Width": 16,
"Height": 16
}```
Also of note, if you're selling the recipes they'll show the original ingredients in the shop menu
1.6.13 
(I literally just re-did my decompile and unpack lmao)
i did my decomp for 1.6.11 and im not doing it again til christmas
A relatively short break
i would admittedly be surprised if there were still rapid patches going on around then
Oof, yeah hopefully not lmao
so y'all do a full decompilation of SV? I just ctrl+click the class I want to see and VSCode opens a decompiled C# class of it.
Am I missing something
oh and I have ILSpy to check the IL version when I need to do transpilers
i use ilspy if im searching for classes and such but i have a decomp saved in case i need to ctrl shift f for strings or other things that ilspy wont catch and i wont know where to find manually
I don't really like the way ILSpy looks/feels to use, so I decompile most of the time. I'll still use ILSpy for working with transpilers though
getting a weird issue with additional farm maps - for some reason an extra fireplace spawns whenever i make a save and reload it.
i've double checked my map properties and there are no duplicates in FarmHouseFurniture (and the furnitures spawn correctly on save creation). anyone ever got this issue since 1.6.10? this happens in all my additional farm maps, including the ones i've released before this update 
fyi: i used to have build and place anything anywhere, but it's yet to be updated so i deactivated it. i don't have mods that alter item placement other than that
For April fools they need to add a changelog that says “modded farmers : added dates to folders names to show when it’s been last updated “ just imagine the chaos that would cause
This seems to be a bug, it's showing up in #1272025932932055121
huh so it's a game issue then?
good to know
for a sec i thought i messed up mod updates
much more handy to decompile the whole thing into a .csproj, so you can look at it in a familiar tool (VS), leveraging its features (like finding references)
it already does this pretty well when VSC decompiles it on the fly, but oh well
the only thing I see the use of decomp for is indeed references in other files
Had you already written anything for editing the events page on the wiki? If you have already got something to replace/edit the ID stuff then I will use what you have otherwise I will rewrite it.
Is this intended to be a shaming thing, because most people who haven't updated mods don't really care about stuff like that lmao. Either they have a good reason or they're the type of person who never updates anything ever
Except when it's broken and someone forces them to update
the type of person who never updates anything ever
Every company I've worked at so far
To be fair you turn like that when updates keep breaking your shit
Trust me no one wants to suddenly have to debug the CAD software they use at 4pm on a Thursday
no, i was on the "copy text from the migration article to preserve attribution" step and got blocked for being a new user making a big edit
Because like a fool they allowed an automatic update
Yeah, that tracks lmao
i never, never, never allow automatic updates. i turned a long time ago
i have been known to schedule unattended updates, but it is critical that i am in charge and can change the schedule. i have a thing about computers
then again, after arguing with python 3.5 for like twenty minutes on Wednesday....
How to let players get buffs made by C# after eating items made by CP
Crowdstrike
i don't know all the details of how buffs work, but if the C# mod is adding an entry to Data/Buffs (which it probably should be doing), then the CP-added item should reference that buff in its Buffs property in its data
Hey all, I finally got my mod somewhat working, but am still running into what I hope is one final issue, I got my smile mod to finally display properly on top of my Costume mod, however it seems to be using the wrong asset it should be using assets/Jas_BJS_SpiritsEve.png every fall 27th on spirits eve but instead it's still using assets/Jas_BJS.png anyone go any ideas, been stuck here since yesterday lol
Smile replacing mod ↓
https://smapi.io/json/content-patcher/1660e01b066e4040a00e301bded664cf
Costume mod content.json ↓
https://smapi.io/json/content-patcher/2987215124b642978b0792b7325060da
The way I've tried setting it up is, I would like both mods to work with vanilla and be compatible with one another, and seasonal outfits without having to mod multiple versions, so if someone downloads they can pick and choose to use whatever mods they want and it'll work out of the box.
I use Game1.player.applyBuff(buff) to create a custom buff in C#. The item added by CP is bound to the ID of my buff, but I do not get the buff after eating it.
sorry it's Game1.player.buffs.Apply(buff)
Are you doing something special with the buff that you can't just make it in CP?
nothing special, but my friend who make CP mod said that this buff can’t be made with CP.
maybe
What does it do?
just add a few attribute values such as speed, defense, etc.
https://stardewvalleywiki.com/Modding:Buffs
CP can handle most of the common buff effects
if you only want stat boosts like that you don't even need to make an entry in Data/Buffs
Items themselves have the uh, CustomAttributes under Buffs
check out how e.g. Coffee does the speed boost. that's all you need to do
sorry
Can CP do all these attribute improvements?
I see that the wiki only lists a few of them
i guess the Target in the patch is wrong "Target": "assets/Jas_Halloween"
Not all of them, not sure what the effect of some of those are either
As per the buff page I linked earlier, buffs made in C# should have a string ID associated with them
How to make an entry to /Data/Buffs, I'm not very clear
use SMAPI's content API. (AssetRequested is what you will want) https://stardewvalleywiki.com/Modding:Modder_Guide/APIs/Content
Yes, but I used the same string both and it doesn't seem to work
!json share what you did for the CP items
JSON is a standard format for machine-readable text files that's used by Stardew Valley mods.
If you need help with a JSON file, you can upload it to smapi.io/json to see automatic validation and share the link here.
When making mods, it's recommended to edit your files in a text editor with JSON support, such as VS Code, Notepad++, or Sublime Text. These programs will check for syntax errors.
(if you didn't add the buff to Data/Buffs, the Object entry won't find it by its BuffId, i'm pretty sure)
Hm, actually, seems like Buffs might have more fields than the wiki shows now
Thanks, I have one more solution to try
Okay actually, Data/Buffs does have all those fields now
Let me show you what I wrote in C# and CP
May have had them before, not sure when the last time the buffs were updated
I don't think so, cuz my costume mod loads my asset assets/Jas_Halloween.png to replace Portraits/Jas and should seasonal outfits be installed Portraits/Jas_SpiritsEve what im trying to achieve is only to have it be so that should my costume mod and my smile mod be installed which is assets/Jas_Halloween.png and assets/Jas_BJS_SpiritsEve.png respecitvely then assets/Jas_BJS_SpiritsEve.png should overlay to assets/Jas_Halloween.png
Well that's the wrong way to add the buff to the item in CP
I hope that makes sense
oh no
you've made the buff in-place in C# but you haven't given the rest of the game a way to access it. to be able to apply it to an object, you need to "register" it by adding its information to Data/Buffs (see previous link about content API)
or i guess you could finagle it from the same C# component but i would use data instead of code to the extent possible
Thanks for your help, I'm just about to try it
Yeah, I would just do it all in CP for this lol, unless there's some other reason to have a C# element
My friend and I are new to modding and our technology is not very mature. Thank you for your help!
love you guys
"Buffs": [
{
"Id": "RedPandaBazaar_ExquisitelyStuffed",
"Duration": 1600,
"BuffId": "RedPandaBazaar_ExquisitelyStuffed"
}
]```
For the CP portion, once you get the buff properly registered in Data/Buffs
i guess if you really want to boost combat level (what would this even do) or immunity, or maybe the (unused?) weapon precision etc.
Those are all available in Data/Buffs though
i'm probably not explaining this properly, but the thing with CP is that it can't target files per se (like the Jas_Halloween.png image file in your mod), it needs to target assets that are in the game like Portraits/Jas
Wiki needs update
oh, cool. my files are out of date i guess oops
I haven't checked the migration pages to see if this is already logged somewhere else either
That example will be very helpful, thanks!
anyway, if it's all stuff available to the CustomAttributes model then you don't even need to add the buff to Data/Buffs. you can do it inline like Coffee and Trout Soup do
Yeah, I would choose depending on what level of control you want over the buff time
the CP wiki has a better explanation probably https://github.com/Pathoschild/StardewMods/blob/develop/ContentPatcher/docs/author-guide.md#what-is-an-asset
Data/Buffs duration is in milliseconds and in game minutes for CustomAttributes
Okay, but EditImage allows me to overlay stuff on top of assets from other mods, which is what it does, but I want it to use a different asset only when my costume asset it loaded, is that not possible within just json?
would I have to use actual programming to make that happen?
Are your dependencies set up correctly?
I think so?
you almost certainly don't need C# to get this working
CP is good enough, just have to work out the correct internal names, proper order, and conditions for the whole task
What is assets/Jas_Halloween?
Did you Load an asset to assets/Jas_Halloween somewhere?
that's what loaded to replace Portraits /Jas and Jas_SpiritsEve is seasonal outfits is installed
should my costume mod be installed
So you're trying to overlay the source image and not the end Target? Because CP can't do that
You would do your EditImage to Portraits/Jas_SpiritsEve or Portraits/Jas, whatever end target you're trying to edit
https://smapi.io/json/content-patcher/1660e01b066e4040a00e301bded664cf#L25
This is the specific issue I'm referencing
I guess? I'm trying to have it be so if someone were to download my smile overlaying mod it would work both with and without my costume mod being installed
without needing seperate versions
You would need separate EditImages with different When conditions then
One for when your costume mod isn't installed and one for when it is
Regardless, your Target has to be the correct asset (Portraits/Jas ✅ or Jas_SpiritsEve), not the source image (assets/Jas_Halloween ❌)
that's basically what I've been trying to figure out
is there a way to set up a when statement to be an exception? so that it'd edit the image with that first action everyday except Fall 27th?
I guess with a Query
"When": {
"Query: {{Season}} <> 'fall'": true,
"Query: {{Day}} <> 27": true
}```
Maybe, untested
```json
"When": {
"Query: {{Season}} = 'fall'": false,
"Query: {{Day}} = 27": false
}```
would they? from what I understand they want their smile mod to apply anyway, so there's no need to check if the costume mod is here.
yeah im prob not explaining myself correctly lol
So you're trying to change her smile all the time?
if the smile mod is installed yes, it should change her smile all the time
I get triggered by the "Query: {{Season}} = 'fall'": false,, "{{Season}}" = "spring, summer, winter" is much more clear in my opinion
the issue is, my costume mod makes her face like bone white, so I need two asset, one her regualar skin tone, and one white to match the costume
Oh lol, they both seem fine to me
no need to check if your other mod is installed then, you just have to EditImage on Portraits/Jas and Portraits/Jas_SpiritsEve
if you make sure the smile mod is applied after the costume mod (with the link rokugin provided), the smile will be put over the assets at these target positions, whatever what put here (either vanilla or costumed)
hope that clears it out
I do target Portrait/Jas with the first action, but if I were to do it with the second if someone didn't have my costume mod installed wouldn't that have it use my costume smile asset which is inside my smile mod?
which would be off color?
Based on your When condition, it should only change that during Fall 27
Right now you're targeting nothing with your second EditImage
the idea is that the costume mod changes what is in the asset Portrait/Jas, and you can just put the smile over it. I don't really know what your sprites look like so I'm not sure what you mean when you mention that it would be off-color
If your smile mod has false dependencies on your costume mod, you shouldn't need to mess with priority, though priority is considered before load order for some reason
I can show you screenshots
sorry
so this is what it looks like as is
it has a few pixels of off color because it's using the wrong mouth asset
should it use the correct one it'd be this
the reason is priority applies per-patch and can therefore be adjusted more narrowly, instead of "all things from mod B apply after mod A", which is blunt
Oh, that's smart
so I need it to only use that second mouth when my costume mod is installed, otherwise it can literally just be ignored and the first one should be used
@tiny zealot @rancid temple I found that if the Buff made by CP has multiple improvements, several Buffs will be displayed. One Buff cannot provide several improvements. I cannot make a stand-alone buff with its own name and multiple enhancements
Is there something wrong with what I wrote?
As far as I can tell, most of the buffs in Data/Buffs have multiple effects but only ever display one icon
yeah getting the "single icon" behavior is probably a reason to put it in Data/Buffs instead of inline in Data/Objects
Thanks, that helps a lot
I tried implementing that when statement, and changing targets, and that seems to have broke it entirely lol, now im extra confused
https://smapi.io/json/content-patcher/e767659c49f747d688da25477e0669c8
The first EditImage is the all the time edit right?
yes, that's the one that overlays with her normal skin color mouth
the second is only for if she has my costume on
Okay so remove the When from the first and for the second do
"When": {
"Season": "fall",
"Day": 27,
"HasMod": "" //whatever your costume mod's id is
},
"Priority": "Late"
yeah I'm releasing that and a bunch of other PRs that have been made today
No more social page spam?
Hey guys, does anyone happen to know how I can target Leo for a new outfit on the mainland?
I'm not quite sure what you mean. Like you got it to work so that the recipe will show (for example) that it requires lava eel roe, but any roe will work?
Nah like working with the correct roe, as for what it displays, when you're using context tags you have to override everything about the recipe there
So you have to tell it what the ingredient text is, what texture to use, and what position and size the rectangle will be on that texture
Where can I find the vanilla animal descriptions?
OK if you're able to point me to an example I would appreciate it I'm inexperienced
🤔 shouldnt descriptions be on the wiki?
Did a little searching and found this, I guess what you're doing requires spacecore? I will probably skip it then, I know it's useful for mod authors but I don't want to add a dependency for just the one thing. (thank you though)
Many people use Spacecore tho. I have totally added spacecore for just one thing.
Yep, I said it was through SpaceCore like first thing lol
That said, in just CP you can't do it
Oh sorry I didn't see that. And yeah I know lots of people use it, this is my first mod though so I'm trying to keep it (relatively) simple
many, but not all, people use spacecore. i would not add it for one thing. but i consider myself an outlier
I cant do this 😦
{
if (e.NameWithoutLocale.IsEquivalentTo("Data/Buffs"))
{
e.Edit(asset =>
{
// todo
var data = asset.AsDictionary<string, BuffData>().Data;
data["RedPandaBazaar_ExquisitelyStuffed"] = new Buff(
id: "RedPandaBazaar_ExquisitelyStuffed",
displayName: Tools.I18n.Get("ExquisitelyStuffed"),
description: Tools.I18n.Get("ExquisitelyStuffed"),
iconTexture: Tools.Helper.ModContent.Load<Texture2D>("assets/RedPandaBazaar_Buffs.png"),
iconSheetIndex: 0,
duration: Buff.ENDLESS,
effects: new BuffEffects()
{
Speed = { 4 },
Defense = { 4 },
CriticalChanceMultiplier = { 4 },
WeaponSpeedMultiplier = { 10 },
AttackMultiplier = { 10 }
}
);
});
}
}```
I had not been using it for a while, but used to use it all the time
I meant in the game files, sorry
That's where the shop description is, though actually you'll have to follow that from there to Strings/StringsFromCSFiles and find the specific string it's referencing in there
IT F-ING WORKS OMG THANK YOU!
😔 stringsfromcsfiles
Thank you too!
do u think it's useful to be able to remap random sound cues in the game
Some transpiler code worked before 1.6.9. Now, it is giving a CLR error. What does this usually mean?
its meaningless without context, you will have to show us the transpiler and the target
public static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> instructions)
{
SMonitor.Log($"Transpiling FarmerRenderer.drawHairAndAccesories");
var codes = new List<CodeInstruction>(instructions);
CodeInstruction texture = null;
for (int i = 0; i < codes.Count; i++)
{
if (i > 0 && i < codes.Count - 1 && codes[i].opcode == OpCodes.Ldarg_S && (byte)codes[i].operand == 4 && codes[i + 1].opcode == OpCodes.Ldarg_S && (byte)codes[i + 1].operand == 5)
{
texture = codes[i - 1].Clone();
SMonitor.Log("replacing added origin");
codes.Insert(i + 2, new CodeInstruction(OpCodes.Call, AccessTools.Method(typeof(ModEntry), nameof(ModEntry.ChangeAddedOrigin))));
codes.Insert(i + 1, texture);
codes.Insert(i + 1, new CodeInstruction(OpCodes.Ldarg_3));
i += 3;
}
else if (i < codes.Count - 1 && codes[i].opcode == OpCodes.Ldarg_S && (byte)codes[i].operand == 8 && codes[i + 1].opcode == OpCodes.Ldarg_S && (byte)codes[i + 1].operand == 5)
{
SMonitor.Log("replacing actual origin");
codes.Insert(i + 2, new CodeInstruction(OpCodes.Call, AccessTools.Method(typeof(ModEntry), nameof(ModEntry.ChangeActualOrigin))));
codes.Insert(i + 1, texture);
codes.Insert(i + 1, new CodeInstruction(OpCodes.Ldarg_3));
i += 3;
}
}
return codes.AsEnumerable();
}
}```
I had started working on a mod to make trinket sound cues different, so that remapping them didn't change 20% of the sounds in the game lmao
(Basically, this is for the playground mod, which is my 8 year old's favorite mod.)
oof farmer renderer
I love the "reuse sounds to death" design philosophy but not being unable to change the cues
im guessing the IL changed somehow, might just need to take a look and rewrite the transpiler
btw u should use CodeMatcher it's very nice 
I had to rewrite Custom Locks Updated because the Door code got optimized lmao
What's codematcher?
its a helper provided by harmony
simplifies the process of finding a place to transpile
https://github.com/rokugin/CustomLocksUpdated/blob/main/Patches/GameLocationPatch.cs#L104-L133
Original code Abs0rbed sent me that helped me learn CodeMatcher lol
Ok! I will see what I can find! I am looking at the 1.6.8 code of Pathos's, and my own 1.6.10 decompile. it's hard to tell what's different
so this block here matches for the instructions listed, in opcode + operand format sorta, and then it replaces the instruction ad the matched index (start of the block bc i used MatchStartForward)
If you have access to the repo, you can just do a diff can't you?
The latest Pathos repo I see on his GitHub is 1.6.8, am I missing something?
the repo doesn't have IL does it 
that your decompile is 1.6.10 but there have been three updates since
should just use ilspy to inspect ur own game
(pathos is probably too busy to update the decompile repo rn. i think khloe was working on it, but also the updates keep coming)
(Khloe was talking about switching to use ILSpy 9 and before that I hadn't realized there was a version of ILSpy we were intended to be using lmao)
i think the version doesn't matter for you who is only reading
I guess the prediction of patches ending on 1.6.13 is gonna be very wrong 😅
but different versions of ilspy will emit different code and previously they prob wanted less line changes?
for less noise
Pathos decompile needs to be a little less broken and terrible I guess
I'm still holding out hope, today is .13 after all
Or perhaps it was last night, considering when patches usually happen
my ILspy of 1.6.13 has this where I want to change things:
IL_02db: ldarg.s position
IL_02dd: ldarg.s origin
IL_02df: call valuetype [MonoGame.Framework]Microsoft.Xna.Framework.Vector2 [MonoGame.Framework]Microsoft.Xna.Framework.Vector2::op_Addition(valuetype [MonoGame.Framework]Microsoft.Xna.Framework.Vector2, valuetype [MonoGame.Framework]Microsoft.Xna.Framework.Vector2)
```
i don't even normally keep my own decompile around. i use pathos's for code reference (when applicable, of course) and only use ILSpy when i need to transpile so i can see the actual IL, which fortunately is always the same no matter what ancient version of ILSpy i am using lol
Essentially, what this is for is to change where the shirt originates, so it stays on farmer's body while on the little purple spingy dinosaur on the playground
(like change the Vector2)
so i have 2 approaches i mind for the CueSwitcherUpper (name pending)
- prefix SoundBankWrapper.GetCue, inspect who is caller using StackTrace, secretly return a different cue for particular caller, challange with this is harmony changing method names but i think it's not too hard to account for that.
- obtain list of things to transpile from data, and do so (they would all be replace string const with another string const type of transpilers). problem with this is that i need to be absolved of sin
Lol, transpilers are like little secret sins, if you did it right nobody even knows
the first method also has distinct advantage of being changable while game runs
if it were me i would do something like 2, but i'd probably define the replacements in some kind of data asset for CP folks and reload ability and so on
@drowsy pewter the uiis2 bug with tokenized names should be fixed now
yea both of these methods would depend on some custom asset
to indicate where and what to replace
yeah but i mean the level beyond that. instead of writing all the transpilers to change to a new hardcoded string, i would probably indirect again and replace the const string with "load the value from this dict" or whatever. but that's me
i am fine with transpilers but i am leery of inspecting the caller/stack trace. that seems brittle and prone to surprises
(lmao look at this guy not calling transpilers brittle, amirite)
StackFrame frame in stackTrace.GetFrames() and and then frame.GetMethod() seems fairly consistent about what it is return though
but there is case of delayed sound that need to be handled separate from GetCue
cus u cant trace back up to where it queue'd up the delayed action ofc
anyways i volunteer rokugin to impl this mod \j
why not throw it in button's harmony crimes in CP mod
I'll have something ready in 3-5... years
is this what u r trying to adjust
I'm forever a JetBrains shill so I gotta mention that Rider is free for open-source projects now and comes with an IL Viewer that lines up with whatever you highlight in the IDE
not interested, thanks
fair enough lol
Oh yeah, I forgot to try that when I was fixing my transpiler
Hey so I'm trying to add a custom map to the game and I've looked all over the wiki but can't seem to do it. I've tried the "CustomLocations": [ {"Name": "example", "FromMapFile": "example.tmx" } ] thing but when I try to warp to the map it just says the location doesn't exist. Do I need some kind of framework for this? Thanks so much!
🤔 i dont think you need custom locations anymore?
CustomLocations is the 1.5-era deprecated method to add locations. you should be using Data/Locations instead
can you tell us which page on the wiki told you to use CustomLocations? we should update those instructions
CustomLocations just creates an entry in Data/Locations now lol
yeah but it's strictly worse to use it, so we should try to convert people
Yeah, I understand why for compat but my "salt the wound" mentality just wants it to kick back an error instead
Tiled is understandably one of the most unintuitive/intimidating programs to use when making maps or patches for your mod. This tutorial aims to break it down into very simple steps with pictures!
Tutorial made by skellady.
here?
Oh the outdated wiki full of outdated stuff that's not properly marked as outdated all the time
i think there was some initiative to go through and mark outdated stuff
(the official wiki also has a lot of outdated stuff on it, because not all of the migration data has been moved to the correct pages yet)
i tried to help recently and got spamblocked, so i stopped trying for the moment
I suppose, though it's a little more Frankenstein's monster with outdated pages still having updated information on it, haphazardly stitched into place
yeah I also saw that mods like Expanded and Zuzu use the same code so that's what I tried haha
yeah I modified WizardTower to make my own
Ugh, I need to stop modifying my examples lmao
so just "Action": "EditData(?)", "Target": "Data/Locations", "FromFile": "example.tmx"?
I had an example for adding a location and patching its entrance onto a map, but now it's a test bed for like 2 other mods
u can make a copy of WizardHouse as own entry then
naw look at vanilla Data/Locations.json
in unpacked
ohhh thats a lot more text
i guess these kind of two patches are somewhat standard, almost minimal way to make a new location { "Action": "Load", "Target": "Maps/{{ModId}}_your_map_name", "FromFile": "path to your map file" }, { "Action": "EditData", "Target": "Data/Locations", "Entries": { "{{ModId}}_Your_location_name": { "DisplayName": "the display name for the location", "CreateOnLoad": { "MapPath": "Maps/{{ModId}}_your_map_name" } } } }
That's awesome! Thank you!
I totally forgot to check if you responded to my comment or not (since I don't think I get notifs for replies to replies)
the wizard house has its own type btw it seems "Type": "StardewValley.Locations.WizardHouse"
"CreateOnLoad": {
"MapPath": ""
}```
yea u should use null for that
oh
until u actually want to go and make your own custom location type anyways (need spacecore type serializer)
Feel free to help us update! 😄
Eugh, wiki editing is my dispassion lol
Explaining information in a well structured and formatted way? I'm very bad at that
A wall of unintelligible spaghetti is much more my speed
speaking of the wiki, this part confuses me a bit, do I need to keep the png after doing these steps, or can I delete them?
well i think all they want help wise is like
slap the outdated banner on a page if its outdated
Aba and I have been going through and tagging stuff as outdated/trying to update it. If you see anything we missed, feel free to ping.
Ah well, I could do that lol
I would love to have the map patching tutorial updated, but I frankly don't know the new patching method well enough to explain it.
say do we have ways to indicate version
(I hate Tiled
)
You have to keep the png's in the same folder whenever you're editing your map
so that we wont have to slap the "outdated in 1.7" on things if/when that comes around
I mean for release
For release you remove them, assuming they're vanilla files or files that other mods already load
Such as a Lumina tilesheet
I am finally done with the FF rework! Now I go on a week of documentation writing, migrating and testing... (I can't even test proper yet since I have to update the example pack)
i keep 2 folders usually
the wip folder where i edit tmx in
and the actual cp mod folder
copy tmx over to mod for testing in game
There isn't a standardized banner, I usually just stick a bold note at the top indicating "X method is obsolete, replaced by Y, functions/doesn't function in 1.6"
I prefer to edit my tmx in the unpacked contents lol
ok, that's what I wanted to know. that would be helpful to have on the wiki page.
Like some kind of barbarian
well that's also a second folder
the important part is "separation from actual content patcher mod you r releasing"
anyone else interested in working with updating Custom Wallpaper Framework?
I could make it run again, the custom wallpapers show off and are put in the walls
just not as intended
so I need someone more versed in wallpaper and draw tinkering
Hm, for some reason I thought it was in that section
I am just a mechanist mod
nope, I screenshotted the entire section talking about the .filename.png
Maybe it's in a different section, technically this is just about fixing tilesheet climbing and not about release so I guess it's fine that it's not here
Oh yeah, it's a little bit above this section
Thank you all for your help! Everything seems to be working correctly now, you guys are the best!
for reference this is what's happening when applying Joja's (at left) and HarveyBallon (at right) from the author's Wide Wallpapers CP
I have the impression it's taking the icon png instead of the intended wallpaper
for reference, these are the icon and the intended
you might be drawing wrong texture yea
Is there a way to find the list of conditions? Things like SEASON, LOCATION, IS_EVENT, HAS_SEEN_EVENT, etc etc etc
I usually have to pull together bits and pieces by looking at pre-existing mods and seeing what they referenced
[[Modding:Game_state_queries]]
Ty!!! I had no clue what page it was on
I found it by clicking on game state query in the explanation for ConditionalDoor touch actions
Wait, hold on, before I commit to this, is it ok to use double square brackets [[]] for FF tokens to avoid conflicts with CP tokens? What I mean is that I want it to be possible to write a CP patch of a FF mod that uses a FF token in the editdata without triggering a CP feature.
changing the path on CP I get it to open the right texture, but without the right scaling or reproduction:
I don't think anything uses [[]] in vanilla so u might be fine
yeap, it would require more than an unofficial update, but a partial or complete rework of the framework
Unless u also support vanilla tokenized text?
no idea what that is, at least I'm sure I'm not sending my strings through something that would use that
It's the text strings that r like
[LocalizedText:Strings/Some Asset]
Forget if that's the exact syntax but vanilla uses that for display names that should be translated
yeah using square brackets may step on the tokenized strings handling
uhm, I've been asked to include i18n support, and I'm planning to do so later, would using stuff like [[ModID]] mess it up?
i18n is something entirely different
This is the game's localization system 
U can look up TokenParser in the decompile to see usage
Out of the loop, is this a feature in FF content packs or CP-added FF content packs
Alright, time to decompile .12 and .13 into my fork.
because if it's the former using {{}} is fine
so, my location patching for compatability seems to work, but something screwy seems to have happened to my walls
something screwy definitely is happening to your walls
When making a Furniture with FF, you can put {{ModID}} (or a few other tokens) in a Furniture ID, name or description to be replaced with its value, I'm changing it to [[ModID]] in the new update because it will now be possible to do a CP EditData on a Furniture Pack's content, but writing {{ModID}} in a CP patch will replace it with the mod id of the CP mod, not the mod id of the FF mod.
What's your patch mode
ah makes sense
as mentioned [] may trigger tokenized strings handling, but it's not always used, and I dunno if [[]] can allow you to bypass it
I guess we can test?
do we have any other brackets in the ASCII table
the thing is, I'm not sure tokenized strings would ever show up in FF data
maybe I don't need to worry about it
I added an extra patch layer for the broken wall parts, gonna see if that fixes it
the extra patch layer did not work
Maybe move it one tile lower so the vanilla "void" doesn't overlap? Or replace that part instead of overlay
It looks like you have black tiles from the upper room patching over the lower room
If you have any tiles in those spots, even with overlay it will still put them there
Main case I could think of is the vanilla furniture display name, idk inner workings of FF so for all I know you bypassed that



