#making-mods-general
1 messages ยท Page 598 of 1
having a lot of dt can be a perf problem but the "a lot" in here is pretty high 
(though it's always better to reduce tokens that update constantly in general if possible, but its not always possible)
Higher than airyn high?
(plus what chu said)
its potatoes compared to editmap/editimage tbh
Great!... Still gonna need to move a bunch of things around though ๐
u would need to have a lot in total
in a way that makes updatecontext notably more expensive
then combine it with something unfortunately forcing a time changed update context
So in theory, I could make "ShopThemeY" a token in C# instead of a dynamic token in a json file?
yea
Dope. It'll be annoying to update things, but it's way better to do it now!
i do find this annoying myself so i just do me data edits in C# now 
Oh, I absolutely despise how clunky all these DTs are ๐
Especially since comments are marked as errors
its a little tedius but shrug it is same data to write out in the end
In Visual Studio Code, go to File -> Preferences -> Settings, then search for "associations", and in the "Associations" setting, click the Add Item button to add an item with key *.json and value jsonc (see image).
If you are making a content pack for Content Patcher, you should consider using its json schema so that VSCode can tell you if your patches are valid, you simply have to add
"$schema": "https://smapi.io/schemas/content-patcher.json"
at the start of your content.json file.
OMG YOURE A LIFE SAVER
If I have 2 different map patches end up patching in the same coordinate area (for sake of laziness basically), will that cause any issues?
I'm trying to follow these instructions, but I'm getting an error in VC stating that the namespace "Framework" could not be found.
I can post additional details later (I just now realized how late it is, and am gonna make some dinner ๐ )
TIL adding a condition to a building output (e.g. mill) doesn't make the mill deny the item if the condition isn't satisfied, it just makes the mill swallow the item without producing anything
this complicate my plans just a little bit
that seems like vanilla bug 
hmm the mill still holds the item, it's just waiting for the condition to be true, eventually
jank
i'll submit report once I have min viable content pack 
the fix is probably make GetItemConversionForItem also check that there's a viable output instead of just the input condition
The mill is hungry and demands sacrifice
nuked at the speed of sound
or light
or
whatever is fastest
turbo the snail
new mod idea, adding a tim hortons drive through to the jojamart
well i guess there are no cars
hmmm
walk through..
@lucid iron I sanity checked this and SDV reroutes outputs automatically using pipewire.
Windows tho.
Well, SDV isn't doing anything. It's the OS I imagine.
@gaunt orbit I would be interested in this mod still. It would be a really good to have.
I do not understand the deep magic of soft_oal.dll.
Or how any of this would even work.
I dont have time to do this today but based on C code from stackoverflow and the monogame and OpenAL decompile, I should be able to do something like this
private static Func<string, bool>? SoftReopenDevice;
public static void Initialize(IntPtr ____device, int[] attributes)
{
if(Alc.IsExtensionPresent(____device, "ALC_SOFT_reopen_device"))
{
var fn = FuncLoader.LoadFunction<Func<IntPtr, string, int[], bool>>(Al.NativeLibrary, "alcReopenDeviceSOFT");
SoftReopenDevice = (s) => fn(____device, attributes, s);
}
}
public static void Reload()
{
SoftReopenDevice?.Invoke(null);
}
public static void Switch(string device)
{
SoftReopenDevice?.Invoke(device);
}
NOT tested and would need harmony and other things, but I think this would make the correct openal native calls
Is this not how you add a config menu via C#? No matter what I try doing, it doesn't show up
that adds a json file for your config into your mod folder. users can edit it with any text editor.
Generic Mod Config Menu is the framework that allows users to configure mods via menu. If you want your mod to show up in GMCM, you have to use that mod's API to tell it that your mod config exists, and how to represent it in the menu
I think I'm gonna call it a night, but I'm making slow but steady progress. I may need to ask about registering tokens again, but rn I just need some sleep ๐
Hi, how do I use a delegate in an API method? Basically I want to clean this monstrosity by using a delegate: https://github.com/khanshoaib3/stardew-access-local/blob/45f37433eb6a31097ba7fc3d77ac4a3a847263f3/stardew-access/API.cs#L293-L300
Hey all. I have a question regarding modding assets. Content Patcher has these Update conditions: OnLocationChange, OnTimeChange, OnDayStart
How would I make this more instant, like swapping sprite sheets in real time in response to flags etc? I can get flags to apply straight away when conditions are met, but content patchers fastest asset update is OnTimeChange and the delay is a problem.
I tried calling Helper.GameContent.InvalidateCache("Data/ObjectInformation"); within a method but it didn't seem to do anything.
You cannot.
The only way to make it instant is to do the edit in C# instead of Content Patcher and watch for the change you want to invalidate your asset. But you cannot make Content Patcher do its updates before it wants to.
(also Data/ObjectInformation is no longer a thing after 1.6)
Sorry, I worded that poorly. I started in content patcher, which worked but was too slow. So I shifted to C# where I could get faster changes. I can get things like instant flags etc to work, but I have gotten confused as to how to get the asset to change instantly.
I saw Helper.GameContent.InvalidateCache("Data/ObjectInformation") on some documentation so tried that using the asset path like I would if using content patcher, in the C# method where I was setting some flags, but it didn't work. Is it as simple as something like that, or telling it to load x instead of y like content patcher seems to?
you would need to register your own C# load/edits via the AssetRequested event and do your realtime aware edits in C# on the asset
@next plaza not urgent but I have a PR to fix a bug in SpaceCore: https://github.com/spacechase0/StardewValleyMods/pull/577
(note that this is not tested because even after the capitalization changes I cannot get it to build on Linux, and honest to gods I don't know if it's a Linux problem, a me problem, or a problem in the code. If you/someone can build it and send me the zip I'd appreciate it)
(EDIT: Got it working thanks to chue)
the log if it helps
ok I think the issue is I shouldn't be building against develop?
actually no that's the right branch, hmm
so iv'e been having a problem getting my sprites to work i made sure it was a .PNG but I'm not sure if i may have done something wrong i did fallow the guide i was given but they still don't seem to be working
Selph did u yeet the mlem and fix the capitalization
hmm I was under the impression SC needs that code somehow, guess not lol
will try tomorrow 
Yeah let me make a patch for you
can you confirm your images are in the right location (assets/images/cherrysprites.png)
if you can, post a screenshot of the file explorer
(the NPC data is also wrong, per the warning, but we'll get to that)
this is where the guide said they should be placed
your folder is named img
whereas your code is images
you can rename the folder to match
oh.. i did not think that effect it mm ill fix that
computers are dumb; everything needs to match
ok i fixed the folder name -m-
anyway your image should load, but you still need to fix your NPC data
SDV 1.6 moves to a new model now
!npc you can see up to date tutorials here
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.
-
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!
i have two different things for that one info it says is wrong... but they look much different and idk if it will effect that part badly... both r based off of two different guides
that is the one i did fallow for making this one ... i still need to fill out some parts.... i think i get a bit confused over some things... like when it says ID like is that the mod name or the name i set for the NpC in the coed ... once this is filly fixed i feel i should move it to the content.jaso IN place of the other one correct?
you just put in {{ModId}} as is, Content Patcher will transform it into your mod ID for you
and yes that Data/Characters code replaces the old disposition code
OK! thank you so much :> i really appreciate your help!!!
Is it possible to basically "resumeAdvancedMoves" after stopAdvancedMoves?
I added some advancedMove commands for winter25 to make it less dead but for Secret Santa cutscene I had to use stopAdvancedMoves, so when the cut scene ends nobody resume moving. Or there is no way to do it without Set-Up and MainEvent etc?
no. using stopAdvancedMoves completely deletes the pathfinder that makes them go. it doesnt just pause them. they would need to be remade
anyone ever used the JP's Small Fruit Tree Framework to add more fruits to their trees? trying to get it working but it doesnt seem to work
Can I do a EditMap triggered by an event and have it happen straight away after the event is done, not the next day?
So ah, is there a way I can make the game update all characters dialogues? I was trying to set flags where the dialogue will change based on which flag is there, but I wanted it to be more real time sort of thing rather than waiting till the next day.
Best I managed was this in C#
foreach (NPC npc in Utility.getAllCharacters())
{
Game1.npcDialogues?.Remove(npc.Name);
}
Which is stronger than I wanted lol. It causes characters to repeat dialogue if they had been spoken to before
Also tried this, but it just clears the dialogue, including dialogue that hasn't been seen
foreach (NPC npc in Utility.getAllCharacters())
{
npc.CurrentDialogue.Clear();
}
woops
you can probably find the part of the game code that decides each NPC's daily dialogue and either call it directly or duplicate it. but you're likely to get the same results on the same day unless you have changed something in their dialogue assets or if randomness is involved (it usually isn't)
Idea is to set things like mailflags, and then conditions some dialog on that. Then If the dialog can be refreshed it should be changed by the conditions set during the day
have you considered conversation topics for this
Can't wait till after work to get back to whatever it was I was working on last night.
I believe I was in the process of learning how to define a GMCM config + tokens in C#, but I was also basically working while half asleep ๐ .
Honestly that would probably be easier. I wanted to subtly change dialog based on multiple flags.
I decided to mark what books I've added logic for, and I'm about 50% complete. Of the remaining books, I believe only 1 to 3 more will require C# (granted, I need to redo a lot of CP once I figure out the aforementioned config and tokens in C#).
The real question will be if I can figure out how to do the pig book
hmm
I want the book to let you feed golden animal crackers to pigs. I know there are a few mods that do this, but I haven't found any that are open source.
In time I could probably figure it out, but I'm perpetually busy
maybe make pigs produce even if its raining/snowing?
or just in winter cause i think they simply do nothing
Maybe ๐ค
I've also been actively dreading figuring out the logic for my next Money Sinks mod, as I'm almost certain it'll require me to make a GUI via C# โ ๏ธ
That coupled with a myriad of compatibility issues ๐
i mean u can C#
i just hit things with a wrench
the wrench is content patcher but the point stands
why not next update for money sinks be sink furniture item that u right click and it gives you a random range of g everyday. low chance to hit the jackpot and get 10000g
The reason why I don't want to do GUIs is bc I do that pretty much full time for my IRL job, despite having a masters in Quantum computing and the job title of "systems security engineer" ๐
As much as I think that's a hilarious idea, my goal with Money Sinks is to add very costly end game content for when you are making oodles of money ๐
GUIs are like, menu things right
Yes, Graphical User Interface
i see i see
well money sink... maybe like, collectibles
than again that requires like, sprites of stuff
or like, buy a random planet somewhere
that used to be a thing
The first mod in the series added 2 statues for each NPC in the game that you could purchase!
subscription services that gets you more recipes or something
hmmm
you can't cancel, only subscribe more 
nice
My plan for the next mod in this series is probably going to be more community upgrades from Robin. But first I want to finish v2 of my most recent mod in the series!
I have a list of plans somewhere. About half of them are solely cosmetic features. The big issue is going to be compatibility with mods like SVE
simply,,, don't do itโข
Plus it'll force me to learn how tf NPC schedules work
is there a way to set a mail key or event id once a given building has been built? I want an event to play only after a certain special order has been fullfilled and a custom building has been built
npcs schedules are mostly "go here at x time" and that is itโข
But then I wouldn't be able to use it in my current SVE playthrough
ah, well
IDK if there is in content patcher. But you could definitely do a C# harmony postfix
ooh, I may have found it, i can set the special order to trigger with a GSQ on buildings_constructed so you don't get the special order until after the building has been built
Though I do suppose I could replace at least one of my planned upgrades with unlocking the garden SVE gives you in year 2 ๐ค
then the special order sets the mail flag that will trigger the event
There is a gsq for buildings built so you can set a mail flag
Or use the active conversation topic
Is there a tool or script that makes BMFont directly to SDV's XNB?
Hey guys. I am testing my custom farm mod and I noticed something strange. When I use lookup anything to inspect the Woodskip fish, it says it can spawn on my farm but I haven't added it to the fishing table in data/locations. Any idea why it's saying that?:
i thought woodskip was able to be caught at the farm in general?
albeit a low chance?
ah when it's a forest farm, it's able to be caught
not sure if your map has anything that would have caused that same outcome
yeah maybe you've used some of the forest farm properties on your water body?
I'm not sure how or where I would have done that. When I check with fishing info mod it doesn't show it can spawn on the list:
very strange anomoly
there's also some ocean fish on there
I made this custom fishing table
does your custom farm replace the forest farm? if it does, there's a decent chance woodskip showing up there is hardcoded
No it's a completely new farm
In what ways is priorities in mods handeled? Specifically with content patcher stuff. Im trying to add a power that increases an items price after i complete it and it works for vanilla items but not getting it to change Cornucopia items.
there is a priority field
you can also use dependencies, but I'm not knowledgable on that front
i think it's overall better to use patch priority rather than dependency/load order, but it's still less than ideal (since you have to use an absolute priority and can't just make it relative)
anyway, you'll have to check cornucopia's files to see what priority they are using for their items. since they are mostly adding new ones, it is likely they are not specifying one, so it should be default
and for your edits you'd add
"Priority": "Late"
as a field at the same level as Action/Target/When
Something like this?
yeah, but don't forget the comma
Fork i just noticed that, it started screaming red
your Target is wrong
that's probably why your edit isn't applying
should be Data/Objects like all object data
It was giving me error before saying cant apply patch etc
showing the actual error would help
question how would i replace the 1st with the 2nd without making the problem worse .... i tried to replace the paret that did not seem to be working right with the new updated way of making that info and it had a bunch new things that i could not fully understand
Weird i cant replicate the error but changing the target makes it work! Thanks very much for all the help 
you've inserted a "changes [ ]" into your existing changes [ ]
you don't need that
it's just and editdata action patch
changes [] contains all the patches/edits you are doing
it's also very difficult to read screenshots
!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.
ok you have a block of old data outside of your changes [ ] not an additional one
it's invalid json
so would i replace that part of that or just not use that part
I've not checked to see if the Data/Characters part is missing anything, but it's valid in terms of json
see if i replace that data that was gicing me a small problem b4 with this part
it does this
Log Info: SMAPI 4.5.2 with SDV 1.6.15 build 24356 on Windows 10 (10.0.19045.0), with 13 C# mods and 13 content packs.
Suggested fixes: One or more mods are out of date, consider updating them
what is your content.json?
u dont need multiple formats and changes
I think you need to understand the basic formating of a patch
:( I'm trying i was fallowing the guide
this was it b4 added the chaged part but it says it is not working
{
"Format": "2.9.0",
"Changes": [
{
"Action": "Load",
"Target": "Portraits/Abigail",
"FromFile": "assets/abigail.png"
}
]
}
this is a single patch for a very simple mod
changes contains all your patches and edits
if you wanted to do a new action/change you add another inside the changes
{
"Format": "2.9.0",
"Changes": [
{
"Action": "Load",
"Target": "Portraits/Abigail",
"FromFile": "assets/abigail.png"
},
{
"Action": "EditImage",
"Target": "Maps/springobjects",
"FromFile": "assets/fish-object.png",
"ToArea": { "X": 160, "Y": 80, "Width": 16, "Height": 16 }
}
]
}
there a 2nd patch/edit has been added after the first one
this is your block
{
"Action": "EditData",
"Target": "Data/Characters",
"Entries": {
"{{ModId}}_WrenSong": {
"DisplayName": "Cherry Fudge",
"Gender": "Male",
"Age": "Adult",
"Manner": "Polite",
"SocialAnxiety": "Neutral",
"Optimism": "Neutral",
"BirthSeason": "Spring",
"BirthDay": "11",
"HomeRegion": "Town",
"CanBeRomanced": false,
"CanVisitIsland": true,
"SpouseAdopts": true,
"IntroductionsQuest": false,
"ItemDeliveryQuests": true,
"WinterStarParticipant": true,
"Home": [
/*set this to where you want the NPC to spawn in normally. */
{
"Id": "Default",
"Location": "BusStop",
"Tile": {
"X": 11,
"Y": 16
},
"Direction": "right"
}
]
}
}
}
you want that inside your single changes [] but after the previous patch (and remember to add a comma, as it's just a giant list)
adding the new part i would want one one set of changes [ ] like where the tings starts has one at the top and bottom so would i remove the ones from that block to keep it in the single changes ? or did i not get what you said..
and fix it to not be a big list?
a mod with 0 alterations
would be just this
{
"Format": "2.9.0",
"Changes": [
\\All of your changes go inside here.
]
}
yes what i'm asking is do i remove the 2nd changes in this it has one at the top so i should remove the one in the middel ?
so it is all under only one
you want to get rid of the one in the middle and the ] } belonging to it
which is on line 54 and 55
missing a comma at the end of line 50
also gift tastes you are targetting Data/NPCGiftTastes
it loaded without a problem !!! oh thank you so so much!!!
Maaan I'm just supposed to be recoloring assets and I'm getting so horribly side-tracked by scope creep ๐ญ
How likely is this gonna create some compat issues? ๐ฌ
(I've moved the part of the cliff closest to the camera up 1 tile so you can walk back there and added a passage to a new zone)
probably not too many but patching Forest/Town/Beach is always tough no matter what
my advice to compat is just publish it and let players tell you what conflicts

Honestly really loving adding secrets. I need to finish what I actually need to do so I can take my time to add secrets ๐ญ
Anytime I touch the forest map, I assume SVE will be incompatible until told otherwise
Mainly because they completely throw out the vanilla forest map, LOL
OOP- Dang 

I'm really the only person who "cares" but replaced Central Station's postboxes with my branded ones.
Sometimes it's fine, but it's pretty common to need two patches for any changes to Forest to account for SVE's changes
maybe a 3rd if there is ever a Re-Imagined 4
Nice! I might need to make a Legend of Zelda/less modern ticket machine reskin for Central Station on my NPC Overhaul mod
I don't mind if the inside of the station looks out of place, but the modern ticket machine at the BusStop takes me out of the immersion every time, LOL
I do have these reskins of the mailbox for different retextures if they are of any use in adapting
Nice, those may be a helpful starting point if you don't mind them being adapted!
nope, feel free..
one was for wayback, one was for yellog and one was for flower valley
so 2 are semi-dead reskins
This is messy but is it possible to nest quickquestion commands in an event script? like option 4 of a qq starts its own quickquestion, and then option 4 of that one has it's own?
i don't believe so, but even if it is you'll go insane trying to escape it. use switchEvent inside the qq to break out and handle it that way
I basically want a quickquestion with 15 options and trying to break it up
I always felt like adding a troll event where vincent comes to your door and asks if you want to play a game... if you say no.. the event ends, if you say yes.. Vincent says he is going to beat you at a staring contest... and then the event just pauses for a very long time
I can work with switchEvent if that makes the most sense
1.6.16 will bring us choose/goto and free us from the yoke of the twelve different weird ways to do questions and diverging events, but that's in the future so
Just make sure to add a bit after the skippable part where Vincent celebrates winning xD
xkcd standards
fork bomb
If o have to change my events from switch eventd and questions to go to I will explode
I use it so much why did I do thatt
you won't have to change anything, except i think there's an edge case with like trailing slashes that might but probably won't apply to you
they're just adding a new way to handle stuff like that which should be easier to deal with
Hm i thought I read that it was recommended as switchevent would basically become deprecated?
just means that it could be removed in some long distant update... maybe 1.8/1.9 (if ever)..
@lucid iron I'm not sure what happened exactly but I think MMAP's farmhouse furniture mover thing broke and deleted a bunch of my furniture
get some wood glue
so I accidentally had two farmhouse interior mods installed. The morning after upgrading, the layout was fucked up, which made me realize that, so I quit without saving and fixed the mods. When I reloaded, some stuff was out of place but still there (the bed, mainly, but also a few random furniture bits), but everything I had placed before was gone
Hrm i wonder if one of the farmhouse had initial furniture props and then the constructor triggered again
the phone was also gone, even though that's a craftable
Do u have a previous day save to try with
I haven't checked but save backup is still installed so I should
Yeah i meant like a _old save
I wanna see if a normal upgrade without the 2 different farmhouse installed is still cursed 
I also wonder if there's jank if u load a save on the day of house upgrade
Also is this the single bed to double bed upgrade? That may affect things
how am i supposed to test if a specific dialogue works ingame
it is the first upgrade, single to double bed yes
do i really have to switch to specific days and years ๐ญ
and I do have _old save files, let me reload with those and see what happens
Yeah recently i did a change to retain the bed change behavior which may have broke other stuff
worth noting that the furniture was gone before I reloaded the game, so I don't think it's that. Although it may be related to having had two competing famrhouse mods installed
i do yeah
okay so some more weirdness- I loaded into my old pre-upgrade save with just the one farmhouse mod, and all my stuff is still there, but now there's also duplicates of all (?) of the default furniture, some of it clipped into walls
actually wait only some of the starter furniture got duplicated
it's the sme three things that were the only non-bed furniture after upgrading
Do I have to ask permission from extension mod creators (like ridge side and expanded) to make portraits of those characters?
double log panel, candle lamp, and house plant
sinzโ event tester has a command to play all dialogue and spit out a log with it
depends on the individual modโs permissions, which you can find on nexus or github or by asking
Ok thank you ๐ซถ
hooray!
now I don't have to switch to festivals and specific years
y
ty
okay sleeping the night and waking up the next morning and everything stuck around, plus no duplicates
festival dialogue is different
so the issue does seem to be related to changing farmhouse maps
guess I'm gonna have to switch days and years
well it's easy to do, just use cjbcheats or debug commands and debug sleep on the spot
and use mods that fast forward time
I mean I donโt test all dialogue
Just festival, movie, some marriage, green rain, and specific things like questions
I'm pretty sure there are lot of people who have dialogue for their NPCs that just never ever fires because it's so rare or impossible to actually fire
I don't test all dialogue either but I also mess it up all the time
So I tried the method of using switchEvent to break up a large number of quickQuestion responses. I have 5 groups of responses each of which have 3 options and a 'none of these' which goes to the next group. For some reason no matter which option I pick always goes to the first group of responses, endlessly. Not sure why. JSON: https://smapi.io/json/none/e5cd6e84b02b4bc3b570ea26ba5466e7
Without looking at your json (sorry!), but I've heard reports that if you do a switchEvent out of a quickQuestion the first command can be finicky
So always have pause 1 as the first command
oh you're right that's a bug with quickquestion i forgot about. i'll look at that thank you
that was it thank you! 
Can u tell me name of ur 2 farmhouse mods ill poke at it later
Why not just use world_setyear or set day?
was I muted by a mod? or is it due to this Dino message?
<@&239770080378880001> ^ (above thelimeydragon)
Discord technical issue, you aren't muted, server is half down!
scary
u ok, discord?
well this is a bad time to try to mod
but
does anyone know how to add an option to the Telephone? where you can call shops
there appears to be issues with large discord servers right now
outgoing phone calls are C#
rats
it was down, came back, saw a spam message right above me so thought there was a miss-click and then it went down again.. ๐
I'm making a mod with this currently in content.json https://smapi.io/json/content-patcher/7271d918b00144f68a8fc71686ae2c68 that changes the price of Squid Ink to 250g. It works fine when I spawn in Squid Ink using CJB Item Spawner, but if I pick up ink from a fish pond instead, it sells for the normal 110g. Any ideas why this might be happening? Not seeing any errors related to this mod in my SMAPI log. (First screenshot is a spawned-in item, second is from fish pond, on the same save)
(I trashed the spawned one before picking up the one from the fish pond, so it's not the same stack)
Log Info: SMAPI 4.5.2 with SDV 1.6.15 build 24356 on Unix 6.17.7.29, with 99 C# mods and 144 content packs.
Suggested fixes: One or more mods are out of date, consider updating them
price of existing items are not updated; if that pond produced last night before you test the mod that's the cause
That makes sense, is that hardcoded or is there a way to get it to update the existing items?
price is a property on each individual item/stack, so there's not a great way to retcon them
I recall Button's BETAS having a "reload item fields" trigger
ah, yeah, that does exist if it's worth setting up https://stardew.button.gay/docs/betas/tractions#ReloadItemField
I'll look into it, I think for now I'll just add a disclaimer on Nexus but that may be useful for future mods I make
Can someone help me figure out how to add this crafting recipe as a skip action for an event? I'm trying to make it so when you skip the event, you get the crafting recipe for ancient seeds, but I can't get the key to work. I thought it would look like this: MarkCraftingRecipeKnown All "Ancient Seeds"
But "Ancient" and "Seeds" get read separately. It doesn't work without the slashes or without the quotes and slashes either
im trying to make tilly appear in one of SVE's events but it's not working
the when conditions are the same as the ones on the equivalent SVE event
(well i mean except for the hasmod lol so there's just one condition that's the same)
i don't think you can do that with a space delimiter
Originally had Kisaa's Rustic Cozy Farmhouse and sharogg's Cozy Nooks Farmhouse, switched to only using Cozy Nooks
you'll probably have to copy the original and null it out
so just, don't add a delimiter and incorporate the spaces in the value?
idk what this means
i thought someone said they were able to textoperations an event last week
and not copy paste the whole event
oh wait im stupid
err it doesn't need a delimiter let me try again
hmm but gives me error
thinks
okay yeah idk
replace delimited requires a delimiter. my understanding is fuzzy but iirc you can't use space because it'll stop looking after every space
but there's no other delimiter to use
im confused are you saying replacedelimited is just borked
or for this type of replacement
like trying to add tilly in
it's not borked, it's functioning as intended, but i'm not sure of the exact correct way to do it
maybe append?
hrmmm
i just know you can't do it that way
rats
did you escape the quotes? posting the full code with context would help
hmmm let me see if i can fuck around and do it
HA I DID IT
although i don
i don't know how to insert her in the next part of the event.....
time to figure that out
well maybe Tilly didn't stay for the whole election or something
Yep, tried that but it didn't work either
https://smapi.io/json/content-patcher/1588ecd5c4f447cb8019daca8b9cb9d7
I think you're missing action before MarkCraftingRecipeKnown
since it's a trigger action and not an event command
alternatively you can use addCraftingRecipe but that's only for the current player
It doesn't work either way ๐ The SMAPI error says it absolutely has to start with MarkCraftingRecipeKnown
maybe post the error log as well
hmm it seems they are indeed trigger actions; is the wiki wrong I wonder
but yeah post the full log
(with or without action)
So how would I go about creating a reward boost that makes any item with the custom "Berry" category from my mod sell for an extra 1.2x gold?
Or even just how would I set up a reward boost that increases the sale prices of certain items when you have it?
https://smapi.io/log/da2c1d455e7244c3ae43768cac11091f
This is what I get with #MarkCraftingRecipeKnown All "Ancient Seeds"
Log Info: SMAPI 4.5.1 with SDV 1.6.15 build 24356 on Windows 11 (10.0.26200.0), with 7 C# mods and 1 content packs.
Suggested fixes: One or more mods are out of date, consider updating them, SMAPI is out of date, consider updating it
ok this may sound stupid but try double escaping it
anyone know how to add a line break in the new changelog
\\\"Ancient Seeds\\\"
readability is trash
or just \\" if the prior doesnt work
I would guess you might be able to create a conditional patch that changes the object's "Price" value, but I'm not entirely sure that you'd be able to target all the "berry" category items at once in a patch.
something something the content modder yearns for foreach
I didn't know you were the creator of the Tilly mod, I'm playing it now, Mond is very good.
im glad ur enjoying her :3
I wouldn't worry too much about the readability of the change log, could always make a changelog.txt file in your mods files if you want to ascii art a nicer one
Oh god that sounds like a lot of manual math ๐ญ
She has quite a bit of depth in the game's history.
it was the goal since she's supposed to have lived there for a year before u 
alternative would be to see how the special power from the Bear works, but I am guessing that is C#
d8, d8b d8b
d8P `8P 88P 88P
d888888P d88 d88
?88' 88b888 888 ?88 d8P
88P 88P?88 ?88 d88 88
88b d88 88b 88b ?8( d88
`?8b d88' 88b 88b`?88P'?8b
)88
,d8P
`?888P'
yay my seasonals are done 
now how do i add them
Good morning everyone! I came up with a somewhat crazy idea haha I want to update the โfirmwareโ of one of my machines. For the player to upgrade the wind turbine, theyโll need to create a new metal alloy, but the machine that makes it doesnโt have the data loaded, so the developer company will send an update to the machine so it can produce the alloy.
Basically, what I want to do is have a rule disabled until the player reaches a certain point in my modโs story, receives a letter, and then the rule becomes active. It felt like a good way to simulate a firmware or software update and make it feel organic within my mod, but I havenโt been able to get it to work. I can block the rule, but then I canโt re enable it except if I use HasMod, and I donโt want to do that because thereโs no simple way to implement it without player intervention.
I tried the following
HasFlag
HasMod
HasReadLetter
HasFlag currentPlayer
HasReadLetter currentPlayer
HasCraftingRecipe currentPlayer
In some cases, after receiving and reading the mail, when I try to trigger the rule the machine no longer shows the invalid item error, but it still doesnโt do anything. Before receiving the mail, it did show the error, which makes me think the rule is being injected but for some reason isnโt working. I used a simple control rule to confirm that the machine itself works.
Last Code
https://smapi.io/json/none/9a1a2d10396b4e90937139cf98d00064
it not hard at all
What about things like the skill professions? Those use item categories
you can do it right in ur character's disposition under appearance
bear, profession, they're all hardcoded
wait what about my current Manny sprites? cause he's currently wearing fall
put a condition on ur current appearance
the way you do seasonal outfits is adding conditions on them
and he has 4 seasonals unlike most npcs that have 2
Are there any frameworks that add similar functionality?
I liked that she has a similar structure to Leah, so they're friends, and it felt like we were friends with Leah.
thats fine i have 4
here ill just show u mine
Yoinks tillys patch
does it need to be a percentage or can it be a flat bonus?
none that I know of 
Percentage would probably be best but I could see myself settling for a flat bonus
also got the ginger island one in there
@ornate drift
time to entereth the c# mines
dont forget to load all of ur new images
u'll need to do that before trying to call it
Is it possible to have specific items in a shop cost a certain currency, and other items cost a different currency?
Say, for example, I'd like Pierre to sell one item that costs casino coins, and the rest money as usual?
might be able to do something with the triggers
Spiderbuttons.BETAS_ItemShipped and Spiderbuttons.BETAS_ItemSold and then the condition ITEM_CATEGORY and then your flat bonus with addmoney
what's the precedence?
\" Doesn't throw any errors, but it still doesn't give the recipe. And \" doesn't parse at all. I'll try to find another mod that does smething similar because I have no idea what to do with it at this point
determines what shows up when 2 patches apply? i think
instead of When you can use Condition in the trigger field
i just had an issue where my costume wasn't showing up when i added a fall outfit
oh do i just load them in the content after like
my first patch in content
so now my costume has a -1 precedent (lower = last to apply? i guess which means it'll show up over everything else)
you can load wherever u want
ah
can you use backticks to show exactly which cases you're referring to (Discord is eating the escaped characters lol)
also if you can show the code that's not erroring that'd be nice
By default, the Currency field is set for the entire shop, and that's what controls if it uses gold, star tokens, qi coins, etc. You can use TradeItem on an individual Item entry in a shop to mix gold and item exchanges, but I don't think you can currently mix Currencies in a single shop.
I wanted to have a private conversation with you, but please don't bother me or violate your privacy.So leave it alone.
I tried it, but it didnโt work, although thereโs a chance I wrote the condition wrong. I had only tried with PLAYER_HAS_MAIL, and since it didnโt work, I assumed itโs not possible to use certain conditions in the trigger.
Iiii think I can work with this. It's either this or setting up conditional prices for 67 different objects which sounds tedious 
post what you had
Alright, time to rewrite the entire shop menus 
thank you, i prefer not to DM whenever possible!
thanks for the answer, it's about what I thought it was, but it's nice to have a confirmation
hope it works 
also honestly there's a chance this might be a vanilla bug lmao
Give me a second, Iโll rewrite it with the condition. Messages are going by really fast today haha.
Workaround that doesn't require a shop rewrite would be a voucher item that costs Qi Coins from an exchange counter, and then have the voucher function as a TradeItem for the desired final item.
Oh that's way too complicated lmao
haha
I'd rather do a tiny bit of extra work and make it easy on users
I'm not a C# person, so the C# is probably easier for you.
I just wanted your help with my pixel art, but I won't ask anymore. I'll find someone else.
absolutely. I've still not done any content patcher anything yet, and I've been working on this mod for over 3 years
although... aaaa manually doing conditional prices would just be the best idea. How would I actually go about giving an object's sale price a when condition?
In CP: Create an EditData patch to the Target "Data/Objects" using TargetField to drill down into the specific object and then change the value of its "Price" field.
(Price is a top level field so you can get away with Fields instead of TargetFielding every object you want)
This sounds like a 4 hour coding adventure 
(good clarification, thanks)
you can always ask in #making-mods-art !
as someone who briefly worked on the shop menu code, I think you're in for a world of pain and suffering
to start, the currency is a shop-wide field, so you'll (likely) need to transpile all occurences of that field just for your one shop item
Wait so what do i put in fields if I'm not targeting individual items?
just
"Fields": {
"Item1": {
"Price": 1,
},
"Item2": {
"Price": 1,
},
}
(you're free to implement your own subclass with all relevant functionality from scratch of course, but pls dont for the sake of other mods)
I'm getting the feeling I don't need Entries AND Fields
no
I'm so used to using Entries by default lmao
this looks correct to me; double check that {{ModId}}_Test_Firmware_Update is the correct mail name?
I can check it again, itโs not a problem.
Yes, itยดs correct
{
"Changes": [
{
"Action": "EditData",
"Target": "Data/Mail",
"Entries": {
"{{ModId}}_Test_Firmware_Update":
}
},
and so the tedium begins 
and do you have the mail? are you expecting it to not work when it does, or the other way around?
Whelp, works done, I've refilled the bird feeder, and read over 200 pages of documents... TIME TO START MODDING!
I feel that, I'm in the process of switching over all my config values and tokens to C# for my most recent mod
Iโll try again with the condition, maybe I wrote something wrong the first time I tested it. If youโre saying that condition should work, then I want to give it another try.
The mail arrives, I open it, I read it, and then I go to the machine and the rule doesnโt work. The copper one works, which doesnโt have any conditions since itโs the control rule, but the other one doesnโt. Iโll try it one more time.
and you're inputting aerinite while having limestone in your inventory?
I intend to make a custom shop menu that derives from the original and overwrites the stuff I need
yeah that's lowkey not what I want to happen
I don't intend to turn this little feature into 500 harmony patches lmao
but maybe it's fiiiiiine
I did that with bundles
a lot more mods touch the shop menu than they touch bundles
it worked much better than trying to patch my way to making a bundle that contains a bundle
The vast majority of mods that interact with shops will be inherently incompatible with this feature regardless, so I don't think it's that big of a concern
I'm randomizing all aspects (currencies, price, trade items, extra items requested) of every shop item
Coward! Make ALL the harmonies and ALL the patches!!
I KNEW YOU WERE THE ARCHIPELAGO PERSON!
I imagine I probably have the mod with the most patches in all of the SV modding community. Or at least close to that lmao
possibly lines of code too although that one is much less meaningful 
I'm tempted to make a mod that harmony patches every single function to print something now just to claim that title /j
Just know that it'll take 218 years to load the game with these patches active
I'm still not looking forwards to learning how to do GUIs in stardew for my next Money Sinks mod ๐
SV, text adventure edition
You are in an old wooden shack, there is a bed a table and a chair. There is a box of parsnip seeds on the floor.
take parsnip seeds
exit
you are in an overgrown farm. there are many trees, weeds, rocks and other debris
east
you arrive at a bus stop. there is a broken down bus and a number of trees.
eat grass
yuck
hit tree
nothing happens
hit tree with axe
the tree is slightly damaged
OMG YOU COULD MAKE AN SV TEXT ADVENTURE GAME FOR THE FARMING COMPUTER
someone else can.. I have no good programming experience ๐
tiny little shell scripts are the best I can do
TBF, this would be 99% string manip
you got me flashbacking to my first text adventure game... and my first time "coding by myself" (spoiler alert, like 12 nestled if statements, endless or's in ifs due to the fact it was case sensitive and i wanted to cover all bases, if you dont type the correct thing the game crashes, and i did not tell you what the options were)
It didnโt work, or I should say it only partially works. Thereโs a generic error message that shows up before the mail if I try to put the item into the machine, but once I read the mail, that message stops appearing when I try to insert the trigger item into the machine. However, if I use another item that doesnโt have any rule in the machine, the machineโs error message does show up. The copper control rule works as well.
No, it looks like I wrote the wrong ID as the second item, but Iโm sure it was that one. Give me a second, Iโll put the limestone in my inventory. I thought I had used the Star Shard ID.
It worksโฆ Iโm going to test it without the mail to confirmโฆ God, how embarrassingโฆ
Ok wow that was not nearly as soulcrushingly tedious as I thought it would be
uhh.. seems like the condition isn't working..?
ah. I know exactly why it isn't working
wait. no I do not. that is for something else
Thanks again, Selph. Sorry for wasting your time (hides head in the ground)
Did I mess up something here? These price changes are active even on a new save file which means the condition isn't factoring in at all
oh shoot another condition thing isn't working either
Neither of these conditions appear to be functioning
your first Condition was fine you didn't need to change it 
Wha? But it wasn't working?
it's not working probably because you still need to check the item being eaten
and also you need to set MarkActionApplied to false so it can repeat
tbh I wonder where else I might need to put MarkActionApplied: false
to recap:
Whenis a CP construct; it sits on the top level of a patch (same level asEntries/Target/etc.), and it controls whether the patch gets applied and the data is changedConditionis a game construct; it's part of game data (so insideEntries/etc.), and its meaning depends on where it gets used, but it usually controls whether the entity in question will apply a certain change. and you can only use this if the game model in question explicitly have it
when you fix this you still need to either start a new save, or manually mark the action as unapplied on an existing save with a console command
I am just now realizing I'm also really not smart. I tried giving myself the mail flag using {{ModId}}_ in the console... 
real
reminds me of the time I tried to detect an event from another mod... using my mod id
Okay the berry stuff is working but the condition for the debuff still isn't. Maybe I'm still giving myself the wrong flag?
"Condition": "!PLAYER_HAS_MAIL Current {{ModId}}_CresseliaBoon Received",
That should be properly formatted, right? (I hit enter not shift enter oops)
did you read this
I did start a new save
this too
feel free to show your code
unless this applies to every item?
No, this is for a specific item ID
mmm apples
then you need ITEM_ID Input YourDesiredItemhere
also your existing condition is "if the player doesn't have the flag"
I'm aware. I want it to give the debuff if the player doesn't have the flag, so once they have the flag they no longer get the debuff
This is what the code looks like atm. The debuff applies at all times regardless of whether or not the flag is set
I guess time to double check the flag is correct
Guess so 
Do I still need to add this?
if that's supposed to happen after eating a specific item, yes, add it to the condition with a comma separator, like ...Boon Received, ITEM_ID ...
(GSQ queries that work with item triggers like that are listed here)
https://stardewvalleywiki.com/Modding:Game_state_queries#For_items_only
Ohhhhhh okay. I thought since it was within the field with the item's Id already listed that it would take from that
the Data/TriggerActions IDs* aren't involved in what they do, generally, they're just unique IDs in that asset*
{
"Action": "EditData",
"Target": "Data/TriggerActions",
"Entries": {
"{{ModId}}_NightmarePokePuff": {
"Id": "{{ModId}}_NightmarePokePuff",
"Trigger": "spacechase0.SpaceCore_OnItemEaten",
"Condition": "!PLAYER_HAS_MAIL Current {{ModId}}_CresseliaBoon Received, ITEM_ID Input {{ModId}}_NightmarePokePuff",
"MarkActionApplied": false,
"Actions": [
"AddBuff BadDreamsDebuff 150000"
]
}
}
},``` This still doesn't seem to be working?
Is this the right debug command?
And yes I've slept to the next day to try it and it still doesnt work
Is it possible there's some weird shenanigans going on with the SpaceCore trigger behind the scenes? Which I only suggest because it wouldnt be the first issue I've found relating to something from SpaceCore
testing on a new save entirely might help; if you ever save after testing a trigger that doesn't have "MarkActionApplied": false,, it'll be skipped from then on, even if you set it false afterward
anyway the debug there is correct, assuming that's the right mod ID etc
I created a brand new save after closing to desktop and relaunching to ensure things were properly reloaded
wait a minute... I forgot about this, I don't know if that code as a whole was even working in the first place ๐ญ
Cuz I also have this for the Object and have 0 clue if it's actually working because of the issue I found with SpaceCore's HealthRegeneration Attribute
But if that IS working then very obviously that's why this other thing ISN'T working 
Well, brand new save after removing the buff from the Object.. That code as a whole just isn't even working
If I had a hysterical laugh cry emote I would be using it
So now the question is how do I actually get THIS code to function normally 
Maybe I just find a different function for Cresselia's Boon to have? 
Or wait.. couldn't I make this a conditional patch where if you have the flag it patches the object to no longer have the debuff?
Instead of using this OnItemEaten triggeraction thing
that would only affect new items
Would there be no way to do a migration of sorts the next day?
not if the object has already been created
that's why when testing objects you have to make sure you're trashing all your old ones
UGGGHHHHHH
BETAS does have a "refresh data on every item in the world" action, but that'd back into the same problem
I'm so close yet so far
I finally got a GMCM menu, only for an error to occur when trying to save the config values
I've been doin that, but alright. I'll just deal with that then. Maybe give some kind of dialogue saying the boon only applies to newly created items?
i havenโt backread so idk the context of what you want to do sorry
To sum it up simply, I have this food that gives a buff and a debuff when eaten. I wanna make it so once you have a certain mail flag, you no longer get the debuff
But yeah no this worked immediately 
It wont apply to pre-existing copies of the item, and it wont activate until the next day. BUT it FUNCTIONS
I think I'll take a break for the rest of today, Thank you all for the help!
i dont know what the word is, but is it possible to have something akin to say, a scene with standees where if you walk past, the scene sort of scrolls, but not really...

parallax?
yes.. that thing
i know you can do it for a background, but i dont want it as a background
hrm well i tried having both installed and i just get load exclusive error from the begining 
removing kisaa and then doing the debug hu 1 for nook house seemed to work ok
it is prob a difficult to repro problem but ill keep eye on it
i wonder if they'll actually fix this, its been a year lol
it will be fixed in .16, only problem is .16's release date is only 'soon'
For a special order, if I want to make it that it only comes in the event, but it is not ever appearing on the board:
"RequiredTags": "NOT_IMPLEMENTED",
Then, yes, It will not appear on the board? But may in the event, if I understand correctly that which is written in the wiki pafe?
Your understanding is correct
Hello
I've been working on my first mod for over a month now, where the goal is to make spouses more attentive to the player; and I'm building the dialogues, but there are dialogues where I use an expression from a portrait that isn't in the vanilla version... for example: $20, which is a shy but different portrait that's only in a specific mod; I wanted to know if there's a way to make it so that if the player doesn't have that specific portrait, it automatically switches to $l, for example
Could someone please explain why my spawns wonโt work on a new save is it my content patcher condition is it redundant and does ftm work when using this cp logic? ```json
"UniqueAreaID": "SeaCavernDepths3",
"MapName": "Custom_SeaCavernDepths3",
"MinimumSpawnsPerDay": 1,
"MaximumSpawnsPerDay": 2,
"IncludeTerrainTypes": [],
"ExcludeTerrainTypes": [],
"IncludeCoordinates": [
"10,6/41,9"
],
"ExcludeCoordinates": [],
"StrictTileChecking": "Maximum",
"SpawnTiming": {
"StartTime": 600,
"EndTime": 610,
"MinimumTimeBetweenSpawns": 10,
"MaximumSimultaneousSpawns": 7,
"OnlySpawnIfAPlayerIsPresent": false,
"SpawnSound": ""
},
"ExtraConditions": {
"Years": [],
"Seasons": [],
"Days": [],
"WeatherYesterday": [],
"WeatherToday": [],
"WeatherTomorrow": [],
"GameStateQueries": [],
"CPConditions": {
"HasFlag |contains=seaCombat1": "false"
},
"EPUPreconditions": [],
"LimitedNumberOfSpawns": null```
hmmmmmmm, off the top of my head I'm not sure if you could look for something like is there *any* mod that edits ___ but you may be able to check for certain mods?
OMG i forgot- you can just use a toggle
๐คฆ
also cool mod idea!
...just checking if you saw this?
...I only have knowledge for CP mods and even then its limited 
;-;
the C# ppl shall come though, fear not
i need some help, my mods dont work anymore and i dont know how to remove them, any ideas on how?
!mh
For help with modding issues, please ask in #1272025932932055121!
When asking for assistance there, sharing an error log will help others identify your issue (see https://smapi.io/log for instructions).
REMEMBER to read the https://discord.com/channels/137344473976799233/1272328509683007539 first!
this channel is more for making mods :)
I posted it there, I hope someone can help me ๐ฅน
i think claude was ersponding to citlali
OH WAIT
wait yes
i read things wrong 3 times before i read them right
That condition seems to work fine on new and old saves. It should disable spawning only after someone gets that mail flag. It might help to try it again with "StrictTileChecking": "Medium" to see if it's a tile issue. Beyond that, you can edit Stardew Valley\smapi-internal\config.json like this to enable more logging, then upload the log after loading a save, and I can see if I spot something:
"VerboseLogging": ["Esca.FarmTypeManager"],
wait now I'm confused too
idk me too
twins
Roger that
You'd probably want to check whether the mod you're thinking of is installed, e.g. with the SMAPI helper's mod registry:
https://www.stardewvalleywiki.com/Modding:Modder_Guide/APIs/Integrations
e.g. Set a static field or something to "$20" if a mod exists that you know adds that, or "$l" if it doesn't. Then you can use that field in your dialogue strings. (Details really depend on how your mod works, but that's the idea.)
Yeah no it didn't load the map when I had both, that's part of how I noticed it. Still erased the furniture though which is weird and doesn't make much sense
Not sure what happened with the item deletion, but the duplicating furniture should be replicable by just adding cozy nooks to an existing save that's using the vanilla farmhouse
does it still happen if u turn off the cozy nook relocation
Not sure, config is the default still.
I will tinker with it tomorrow maybe and see if I can find a reliable way to replicate either bug
I glanced at the source for the feature earlier and I couldn't find a reason for it to do that, so the mechanics of it are a mystery to me
It could also be a conflict with another mod
yea i thought it might be the _FarmHouseFurnitureAdd stuff but cozy nook doesnt use that
It's also weird that it affects craftables, which is what makes me think another mod is involved
At least I'm pretty sure the phone is a craftable
Hmmm
i have an event quite like this. it gives you a lot of time to sit and think about what you've done
Hi, could someone help me place some coordinates in a spriteโs code? I canโt see the numbers shown in Aseprite at the bottom left when I position the mouse over a point in the sprite, and I need to fill in some values. If I send you the code and the sprite, could someone do it for me please?
Could it be this because there not showing when I start a new save but when I load my old save they do appear? Is this balanced by the way?```json
{
"MonsterName": "CapeStardewCode.Monsters.InfernoRaptor",
"Settings": {
"HP": 1600,
"Damage": 40,
"Defense": 3,
"DodgeChance": 15,
"RelatedSkill": "Combat",
"MinimumSkillLevel": 2,
"PercentExtraHPPerSkillLevel": 10,
"PercentExtraDamagePerSkillLevel": 10,
"PercentExtraDefensePerSkillLevel": 10,
"PercentExtraDodgeChancePerSkillLevel": 10,
"PercentExtraEXPPerSkillLevel": 10,
"SpawnWeight": 8,
"Loot": [
"Magma Geode"
]
}
},
those would never be selected to spawn until a player has at least level 2 combat skill, and if that's the only monster in the area's list, nothing will spawn
I'm not really the person to ask about balance, but that seems stronger than anything in the base game, if that's relevant 
yeah ok maybe I should change that so everything else worked then.
idk where to ask this correctly, is there a mod that adds further levels with perks as you get to em?
you want to ask in #modded-stardew ๐ช
You can set the grid to 16x16 under View > Grid > Grid Settings. After that, just go to View > Show > Grid and you'll be able to see the index numbers. Hope that helps
Hey guys, how would I put needing to see an event as an unlock condition for an npc? I have
"UnlockConditions": {
"HasSeenEvent |contains=3910975": "true"
}
},
But Smapi is saying it can't parse that
I think unlockconditions has to be a gsq
i think you need PLAYER_HAS_SEEN_EVENT
hello, is there a site where I can download individual walking sprites of the characters?
!unpack your game files!
Follow this guide to unpack the game's content files in order to see and explore how the game data is structured.
It's helpful when making your own mods, or just to learn about how the game works!
I forgot I still had error-lewis 'installed'
Don't suppose anyone here is an expert in the rules behind buffs and stacking? Trying to implement a buff that stacks but the rules are getting me a bit confused.
Yeah so... I have a drink that applies a buff on use and activates a trigger action, but it doesn't stack. It seems like the ID might need to be set to Drink to activate it? But then it would drop the trigger action right? And then there's two IDs for Buffs defined in ObjectBuffData?
I may be lost in the sauce but typing that out helped me kinda organise my thoughts so I'm keeping going, but if anyone has been down this route before I'd love to hear your findings
hi i am looking for where i can commission works on stardew valley does anyone knw a server where i can find good prices for my commissions
any help will be appriciated
!commissions
!comms
If you're looking for people who do mod commissions (either art or code), here's a wiki page with a non-comprehensive list of people who do them: https://stardewmodding.wiki.gg/wiki/Stardew_Mod_Commissions
:( spelling
bots won't react to an edit btw
yeah i noticed :(
i can't help with your problem, but it's better to avoid asking for "experts" or otherwise gating your question like this, because it filters out people who might otherwise help you but don't consider themselves experts or don't want to commit ahead of time. you can just ask your question directly
Thats a fair point actually
you did ask the question afterward, so no real harm done in this case 
yeee
So I'm looking up the modding page for Buildings- does this require C#?
well I got a bit of a hacky solution built atleast. I hope at some point stardew gets a buff code rework or someone builds a buffs framework. Having more control over buffs and adding stuff like enemy buffs/debuffs would be really neat. I've hacked together some ways to do these things but they're extreeeemely gross to read. Just somerhing on the wishlist
you can add buildings with content patcher
Anyone know an example I can use then? I work MUCH better with an example to start from and the wiki doesn't seem to have one. Unless the kind of example I'm looking for would be from the Content Patcher docs
hxw buildings for example, they have individual ones which you can look at
Hm.. For clarification, maybe "building" is the wrong word for what I'm wanting to do. I essentially want to make an Obelisk that the player can build on the farm
Which I only clarify because these look (awesome) like they have a lot more information than I need and might complicate things a bit 
I'll still check out one to see the file structure though, so ty
ah, yeah that's something else lol. you can look at east scarp or ridgeside for obelisks
So buffs from drinks can stack with buffs from food. However, a buff from a drink will overwrite any of your current drink buffs and vice versa
Hmm, am I misremembering coffee and triple espresso stacking? Now I say that out loud it definitely sounds like I'm wrong
Coulda sworn drink buffs could stack with other drink buffs but that doesn't sound right anymore
IDK, I dislike timed buffs. But I'm like 95% sure that's how it works (granted it's been a few days since I last dug through the buff code)
Fair enough fair enough
If your doing C#, you could look into what the desert festival does, as it stacks with both food AND drink buffs
Yeah I did some research into that but it wasn't quite what I was looking for for my purposes.
It sounds like we are in a very similar boat ๐
Perhaps, even, the same boat
Maybe? I'm working on a overheal type thing. Had a previous thing going but it was using more harmonylib patches than id like so I'm trying to cut that down.
Hoping I can work with buffs to do that. Got a nice solution going rn atleast, just gotta implement the ondamage side of things.
What about you? If ya don't mind sharing
I need to look through my notes bc its been a while. But I essentially want to modify the buff of an item at random.
One method I looked at was trying to stack buffs
Oo that sounds neat yeah
Like the item would apply a random buff on consumption? Sounds like you could do something like that with game state queries but god knows it's never that simple.
Though I've been a but preoccupied with other mods atm ๐ . I wasted basically all of my limited modding time over the past two days trying to do a super fancy thing to save me from having to copy and paste like 2 or 3 lines of code...
... I gave up on that endeavor sometime late last night and/or very* early in the morning
Faaaair hah
Buffs are the devil
Real
I remember seeing the "ObeliskWarp" action somewhere and I cant for the life or me remember where it was. I feel like it was a page on the modding wiki but I cant find which one. It's not too important, but I don't know what the Boolean is for
whether to dismount or not
A buff code rework or framework would be so neat. I know some peeps are adding like bosses and it'd totally add so much to that if buffs were easier to implement and could be applied to NPCs
You'd think it'd be easy, but it isn't. I've ran into so many errors trying to do it (it also doesn't help that it involves my very first C# mod)
Yeppp I figured hah
it's listed here:
https://stardewvalleywiki.com/Modding:Maps#Action
It's never that simple.
Ahhh THAT'S where I saw it, thank you!
a conditional buff is conceptually simple, but since nothing in the game has ever needed it, it's not implemented
What I really want is a monster framework. I have an idea for several new monsters I want to add eventually, but I've been too busy with other mods to work on it
IKR!
likewise, there's no real basis for applying buffs to NPCs, the behaviour is entirely farmer-specific
Monsters can have buffs
I think spacecore is good for monster stuff? Idk I haven't touched that stuff too much
They can apply buffs, but they can't have buffs applied to them I think
but then again, buff effects are generally extremely specific, aside from attribute changes
such as 
To be fair, I've spent all of like 30 minutes on it thus far before things got in the way. Plus, I have several other projects before then.
I had a poison like effect I wanted to add for monsters and I had to Hella hack it together. You're gonna break my heart here if it turns out I just missed something
Hm.. debating if I want to use the ObeliskWarp action but.. eh it's fine, the only reason why not would be to put in my own custom sound effect for using it
That said I'm really hoping that does exist cuz rn I patch the monster update method to do ticking damage and that's actually disgusting to do.
Does the shadow shaman not buff enemies?
Have I been misunderstanding how it works for years?
it simply heals them

monsters don't have any internal framework for applying buff effects
there's not even any hacky buff-like effects
Luckily for me, the 16(?) Or so monsters I have planned won't need buffs, it's like 95% unique attacks and projectile patterns (so... not any easier most likely)
It's so validating that I'm not the only person who's struggled with the buffs stuff
The hardest part about SV modding is learning the SV codebase. Especially when you don't have time to thoroughly look through it
Ooo gl with that. I really wanna add monsters to my mod too but I got 0 art skill and thinking of making things correctly sync in multiplayer makes my head spin
The hardest part of SV modding is looking at other people's mods and being like "oh man they're so much better than this at me I'm legitimately embarrassed by my code now"
i put about 15 minutes into LOC's lasagna slow aura debuff on monsters and decided that it not even affecting monsters that don't have legs is a feature not a bug
I don't imagine I can essentially make a 2-way obelisk
I have 0 formal art experience and ain't even thinking about multi-player ๐
Mini obelisks
Wait you're so right
I think my hacky tired as hell solution for monster debuffs was hijacking some values that exist in NPCs but are unused on monsters, like their personality stats. It's ugly as hell and ethically wrong but it saves me from having to do type casting every update cycle.
Could I apply that functionality to one custom placed object on the farm and one persistent placed object off the farm?
Probably? Though you'd probably need map actions
i'd rather spend the little extra processing power on luxuries like 'guarantee that no other mods or base game features will touch my values'
though i'll admit i did the same for a mod way back
I'd agree usually but since it's time based I'd have to apply it in the update method and type casting string to int for multiple monsters every game tick sounds like it'd lag the game so bad
That's assuming monsters have a moddata field and I honestly can't remember if they do
You can toss all that in a cwt
Cwt?
What's a CWT?
Ooo ok I'm definitely writing that down
The downside is no net sync though
while it's not ideal, it's definitely within your frame budget given how few monsters are typically in a given location
Whelp, I gtg. I've a meeting soon ๐
modData is net sync
Hmm maybe. I can definitely imagine some mods spawning in a ton of enemies, and I'm kind of hopeful that noone has done anything as stupid as hijack the monster personality values.
It's a wonderful kind of solution that has no mod compatibility issues as long as you're the stupidest mod developer in the room
noone indeed 
Wait so how would I make use of the Mini Obelisk code for a building and a stationary map object (and more importantly where would I actually find that)
well mini obelisks aren't buildings, they are big craftables
So I wouldn't be able to use the code for my purposes?
i believe the warp function of mini-obelisks is handled in C#

there might be a framework that could help, no clue tho
eh.. I might be better off not worrying about it. Would there be any other solution to having a warp off-farm take you in front of a building/obelisk on the farm?
totems?
Uhh not quite
Basically, I want to give the player the ability to place a warp to my custom location on their farm which I'm doing like an Obelisk. This warp leads to the area, of course. I then want a warp in the custom location to take you back to in front of the obelisk on your farm
Why specifically back to the obelisk on the farm?
Because it's like a portal, it would make sense for it to take you to the other side of the portal
If it's not possible I can work with that, but if It is possible (without C#) then I wanna try it first
Hope someone comes with an idea for you 
are you making a map/farm?
I've made a new location yes, but not a new farm
ohhh okay,, i sadly dont think i ahve any good advice for you but i wish you luck !!
i kinda see the vision
Well then I think I'll just add basic functionality. What's a point on the farm I can set a warp for that would persist across all farm types?
(question not specifically for Selph despite the reply)
Like could I set a warp to in front of the door of the farm house?
hmm maybe you can make it a shed-like building
probably no fancy teleport though
Would I be able to set a trigger action that has it play a sound effect?
Can I post a line of code that's giving me a bit of trouble? It's not more than a line
BETAS probably has something
!json always
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.
Oh yeah no I already have that set up with SpaceCore for sound and Betas for a warp, just wondering if I could apply those to a farm building
eventSeen is an event command, not a precondition
you want SawEvent
(and remove the [seen] part)
Right, okay, thank you. Little details like that always trip me up lol
And do you know why the comma at the end is turning up red?
you just have the precond; there's still the actual event you need to write
Right, okay, thank you
Would this actually work with taking you to a non-indoor(technically) location that can be accessed elsewhere? I feel like this would create a copy of the map rather than take you to the location but maybe I'm just reading the info wrong
buildings can have map properties on interact (including magical warps); only issue is you also need to specify a human door for warp out to work and I dont know if map properties can override that
buildings can take you to a non-instanced location (see the greenhouse)
Ohh okay
Admittedly I'm not entirely sure what I'm doing but how does this look?
And here's the action
still need to create the location but looks good so far
ignore me if it's already created
It's existed for a while :3c (It's leading to the main new location in my mod)
Also you say so far which I take it to mean there's still more I need to do?
outside of setting a builder and cost you probably got it
https://smapi.io/json/content-patcher/fd0ad2d509334b238de917a0386cdd90
Right, I think this is enough to start an event if nothing else? Am I missing anything?
Oh yeah. That ah.. requires C# doesn't it? since it's meant to be a bundle reward
With an object next to the exit in the Rift that I hoped to have let you move the building
if you're willing to add one more dependency you can set a custom builder menu
either MMAP or Custom Builders
the bundle reward can be a special item that the building requires to build
you need to set the music id before the -1000 -1000, it can also be none or continue
Hm.. y'know actually, I could very well use the Wizard and have a lore reason for it. Assuming I could still set a condition for it being in the Wizard's shop?
okay thank you @verbal glacier
sure
that's the Builder field
also like selph said remove the [seen] part
And then I just add a BuildCondition for having the mail flag from completing the bundle?
Right sorry
Alright! I think the last thing I need to know is how to set the warp out of there to take you back to the front of the building
Is this a building interior
Technically. It's a non-instanced indoor location because it takes you to another location that can be accessed elsewhere
I made a custom monster framework that works with Dynamic Map Tiles monster spawning
Well if they r normal building interior as in u define the inside map onn building data, then the first warp will take you out to the human door
This is fine even if non instanced
Wait are you saying that any warp would take you back to the front of the building?
The first warp
Not any warp
Also gotta be destination farm iirc 
I don't remember exact the details off hand
Ah no the first warp matters for where u land when inside
honestly maybe this just ain't the way to go about this ๐ญ
-# (brain no work
)
Maybe I just need to get it in game and see how what I've got works
Though it 100% wont work how it's supposed to because I don't have a warp back specified-
here's the list so far
The modding page mentions a "warp list" but idk what that means
lots of sound customization, sprites ofc, projectile customization
and all the basic stuff like damage, health, speed, experience, resilience, slipperiness
what does slipperiness do? (i don't know much about monsters)
I have no idea tbh
probably how slow they decel or smth
gliders
oh and custom drops
Friends, I can't find the damn error... ๐ https://smapi.io/json/i18n/c46c8e865afd4727a32092277778254e
you didnt close the one before
it sees the { and freaks out
you have a rather wacky block in line 477
bc its in the middle of the everything
just remove everything other than the rain dialogue line and fix the key
oh wait i get it
Now it's yelling that 'translation files can only obtain text property values' ๐ฅฒ Something something with Changes
oh
if its an i18n yeah you can't have changes
it would be just the strings
so no editdata, no actions etc.
I have a dynamic token ShopThemeY whose value is determined by the config value set in the CP mod.
I'm currently in the process of transferring over the config file to the C# mod.
How would I define and register the "ShopThemeY" token in the C# mod?
Hm...
Honestly I might give up on the whole acting like a shed thing and just find a point on the farm for it to warp you back to cuz otherwise this is going to be SO much more complicated in my head than it needs to be
My first thoughts are either have it send you to the door of the farmhouse, or have it send you to where the warp totem sends you. But I'm saying these on the assumption there's special warps for those (not sure why I think there is for the door of the house tbh)
Though tbh any location works for me as long as it's consistent across all the farm types and accounts for moving buildings (like moving the farmhouse)
looks like your texture path is wrong
also i browsed the code and if an interior location (instanced or not) has a Warp to the farm then that warp should take you back to the building's entrance
other warps are untouched
I swear, I've probably read at least 200 pages of documentations this week alone (I'm so tired ๐ )
Oh shoot really? It's that simple?
Oh sweet okay!
Just to clarify, only a small percentage of those documentation articles are related to modding. Most of it comes from government policies and/or post-quantum algorithms.
I'm so tired ๐
And its only Wednesday 
Yesterday I basically had to sift through about a 350 or so page document
Between my IRL job, job hunting, and modding it feels like I have 3 jobs a day sometimes ๐
I'm also gonna have to figure out how to limit it to only ONE rift on the farm
Does anyone have a string map for \LooseSprites\font_colored and \LooseSprites\font_bold by any chance?
Or game has it somewhere?
also BuildCondition
theres a GSQ for building count
Ohhh I know EXACTLY why I thought there's a warp that puts you at the farmhouse's door. 'Cuz of CJB's Cheats Menu, the farm warp takes you there
And the return scepter
Oh I thought the return scepter takes you to the same place as a totem. Then again I've never bought it 
Unless a mod I have changes its behaviour (which I very well might), it warps you to in front of your house
Do the coordinates have to be unspecified? Or would this be not working because I'm using BETAS to warp the farmer (as a trigger action to also have a sound play)
you probably need to specify coords for formatting purposes, but the exact values shouldnt matter
the building code will rewrite the Farm warps
Hm.. so it's probably because interacting with the building is a trigger action which triggers a BETAS warpfarmer function?
Cuz it's not taking back to the outside of the portal, and instead the coordinates I specified
Unless it's also not sending me to the location as a NonInstancedIndoorLocation and instead a regular warp ๐ค
Which very well could be
I'll remove the DefaultAction I had set and see what happens

oh heavens
I get a sea of errors that triggers every frame I'm holding right click on it LMAO
Can NPCs actually go for a swim in the Bathhouse pool? Was wondering if I can add that into my schedule 
I think if you wanted to add swimming animations they could?

I believe Custom NPC Lanni from Sunberry does that if I recall correctly
So I'm guessing I need to specifically set where in the location you're warped to?
(I thought it would use the DefaultWarpLocation value in the location file ftr)
Ughhhhh, so I've gotta download Sunberry again and have a look... ๐ฅฒ Well, anything to bring Leon to life!! ๐ฃ๏ธ๐ฅ
-# as long as I don't need C# ๐โ๐ผ
godspeed 
Hello I was wondering if I could get some help with sending mail
Been trying to get these to show up on my mailbox and its not working and idk why I've been staring at these same lines for too long ๐ซ
I've tried with both "Condition" and "When", both are in the screenshot to show how i write them. I can mark them as seen in SMAPI and the events run fine but I can't get the actual mail to show up in the mailbox aaaa
- Condition is the correct way to do it
- if the trigger action already ran once previously in your current save they won't run again
@tough osprey For Selph's second point: It means you have a create a new save for the action to run again.
I've done that as well, still not working 
you can try the debug gq command to test that your condition actually evaluates to true
also note that your trigger is adding mail to tomorrow on day start, meaning there's a 1 day delay
again maybe I just stop trying to do the indoorlocation thing and just have it warp you elsewhere on the farm because I don't know where to even begin with this error 
code?
conditions do evaluate as true and yes that 1 day delay is accounted for, thanks for helping btw 
the action code too
patch export Data/TriggerActions and check that your code is actually applying
I'm gonna need to add a regular warp to this, aren't I? I removed it cuz I thought something about it having an indoor location would like.. automatically register it as a warp or something
And the Betas warp didn't seem to function properly with what you described should happen
decompiled code, not actual code
yeah that
!decompile
If you want to make SMAPI mods with C#, one important resource is decompiling the game to read the game code. Here's how to do it: https://stardewvalleywiki.com/Modding:Modder_Guide/Get_Started#How_do_I_decompile_the_game_code.3F
tyy
your interior location would just be a regular location, so yes you need warps
woah didn't know that could be done, but I found out that no, they're not being applied
Okay so.. the human door tile doesn't work, but every other interactable tile does
But the ones that do work, then send you to the specified coordinates upon return and not outside the portal
the warps to Farm inside the location?
oh woops didnt mean to reply to that one
Yee. The tile marked as "Human Door" on the farm results in a flood of errors, but the tiles that aren't Human Door warp you correctly, but when those work, returning instead warps you to the coordinates I've specified in the other action rather than outside the building
ok yeah the exit warp has to be on the map
Rather than done through a trigger action?
yeup
there's still the vanilla LocationChanged trigger
-# I'm sure there's a way to figure out how to keep the sound with this but alas I need to be afk and put my immense intellect into doing my job for once
Ah shoot, alright. I appreciate the help!
-# my brain is registering the pieces on how to make it work but not actually comprehending it 
New quote added by atravita as #7984 (https://discordapp.com/channels/137344473976799233/156109690059751424/1499092083024330974)
I don't know why I'm struggling to grasp how this works so badly
Okay. For now, I'm just completely disregarding the whole interior and human door thing and whatever- Shit ain't workin, it's stressin me out. So I'm just gonna go with an implementation I know functions and possibly return to this later when I have a clearer mind
so whats the difference bwteeen a human door and an inhuman door

I mean you can try
Anyway, is there a way I can call on the Return Scepter or Farm Warp Totem's code for the warp home?
all the animation and frill with those is handled by C#, but I see that BETAS has a trigger action that can warp the player
(also in case it matters, the return scepter and the farm warp totem go to different places)
I'm aware, I just need it to send you to a "fixed" location that can vary
I can't just do Farm 48 7 because not every farm type has the totem point at 48 7
I wont mind a mod that allows me to use the barn gate tbh
and mb that little coop door
This is what I've got so far, and yea this works but it's not universal for every farm type
the totem location is determined by the map property (on the Farm) WarpTotemEntry, so if there's a way for you to get info about a map property then you might be able to?
Maybe I just find a way to set conditions based on the farm type. but that would mean no compatibility with modded farm types 
I definitely don't know how to call upon that map property
yeah, I'm not seeing anything helpful in the wiki or the CP docs (I live in C# land primarily)
So best bet might be to wait for someone to come by who does know how to do this. Is there a mod anywhere that has a functionality like this?
probably, but which one? no idea
is your issue that you want a traction that doesnโt use specific coords?
I just want a traction that will warp you to a consistent location regardless of farm type or building position
i once again bust in after not backreading
Most preferably on the farm
from inside a building to the farm?
From another location to the farm, so essentially yea
but you canโt use 48 7 because farm maps vary?
Yea. The place the warp totem sends you would be perfect cuz it's always a clear tile. No debris or player placed objects that might get in the way.
But the warp totem doesn't take you to the same coordinates on every farm type
gotcha
@lucid iron is a traction that warps the player to the farm warp statue in MMAPโs scope
or a tile property you could define as a landing point
you can use that with this or just this as normal
oh wait nvm you said it wasnโt a building
sorry i just woke up from a nap



