#making-mods-general
1 messages ยท Page 385 of 1
weโve all made mistakes like that haha no worries
TYSM!
I'm positive this has been asked before but I forget if any frameworks had come about to allow it, but: is there a way to prompt or mimic the floating leaf animations/ambience in the Woods map on a custom map without me having to use C#?
I'm 89% sure that's in MMAP
I will take a look at that, thanks Selph!
Would it also handle stuff like fireflies?
that i did make
Nice!
Really nice. I was so disappointed that I couldn't get fireflies to happen in some of the events in OlderSeb
for events you can use the traction version 
my docs are the main thing i pride myself on so thank you
I also wanted the "weather debris" during an event primarily, if that impacts anything, chu.
Hello all! I have a quick question. I am working on a mod that will have quite a few items in it. I would like to add Gift Tastes for modded characters, especially SVE and RSV. In general, do those mod authors need to be contacted to assign gift tastes in my mod? I am.not sure of the etiquette and permissions in this case.
if you make a temp map with the map prop it should work 
could make a traction version tho
I'm cool with the effect being persistent, but it's that's easier to manage just during one event and there's another way I can do that instead
Will "--" work to disable a condition in a triggeraction for testing, btw?
put TRUE
So... instead of Weather Here Sun, Weather TRUE Here Sun ?
or just remove the Condition line
Oh. I could just delete it at that point. I just wanted to see if I could disable it without removing it so that I remember to put it back in later xD
or make it null
My brain likes to keep things in comments
(Speaking of documentation, how do we maybe feel about a page on the modding wiki listing everything MMAP, BETAS, MEEP, etc. add?
Pros being we can add features to our respective mods without worrying about doing something that's already been done, and mod authors can find the features more easily.
Cons... well, someone has to write the wiki page. And we'd ideally need to keep it up to date.)
would that be much different from the current frameworks page?
I feel great about you doing the work DH
Honestly, I'd be up to making the page.
The difference being is that this idea will list features from each, and link to the documentation/mod page for the specific framework. Feature first, rather than framework first.
can anyone help me figure out why my NPC isn't showing up? T.T https://smapi.io/log/18e5bfea98534efbbfcaf626a3e07e91 here's my most recent smapi log
Log Info: SMAPI 4.3.2 with SDV 1.6.15 build 24356 on Unix 6.8.0.65, with 31 C# mods and 15 content packs.
Suggested fixes: One or more mods are out of date, consider updating them
i think it'd be pretty hard to keep it up to date
and personally i never worry about doing smth already done 
thatd be a very large list... BETAS alone adds 157 different features currently
I also have my content.json https://smapi.io/json/none/3c87b1a891a2493c80ebb0c2541de807
I suppose if we all just don't give two cares to reproducing effort, then it's definitely unnecessary. 
it'd be nice to have a basic overview of maintained frameworks, but yeah, there's not a good way to succinctly describe all the features 
I mean... I've been a little embarrassed to find out that I replicated work in from one framework or another. But at least I learned a little more each time I did.
(there already is the main wiki thing, though)
imo if it make sense for someone to use a feature from my framework with a thing from different otherwise unrelated framework nearly 100% of the time then i might as well add it to my framework
i also feel similarly, i think if a feature makes sense in your framework then it doesnt matter if its a duplicate
when they are completely or mostly unrelated is when i would direct someone to the other framework
but otherwise its fair game imo
otherwise i would just add a ton of trinket related stuff and steal chu's possibilities /j
can you steal karma? asking for a friend
does stealing karma give you bad karma, thus offsetting the karma you stole?
I feel like the best way to make this work wouldn't even be feasible on a wiki page. It would be some kind of Stardew mod framework feature search engine, and that's just a tiny bit more work than a wiki page. 
idk i guess so
just load up everyones docs as an iframe and do one big Ctrl F 
even if it's at a loss, just the idea of inflicting negative karma on someone else is concerning 
(the other problem, i feel, would be how do i know what someone else calls a feature?)
like the BETAS GSQ for checking the gold clock is GOLD_CLOCK_ACTIVE, but could just as easily be called FARM_TIME_STOPPED or something
also sometimes the features have slightly different quirks
theoretically people could edit in links/mentions of similar/equivalent features too, but yeah, it's a fair amount of doc work
like say being an event command vs a traction
i think event command vs traction wouldnt even be listed in the same category
but i do still agree that even two tractions which do similar things can have similarly different quirks
relational database
anyway I'm off to check the feasibility of a specific crime
which crime
analysing the unpacked content maps folder and using it to get a version of the vanilla tilesheets with all the props and animations for easy importing
that seems like community service not crime
seems easy enough, though im less sure of that when it comes to Tiled plugins
so instead of finding a map that has it and copying from there, you can just import and everything will work
all just xml innit
ye
there is one main issue, which is the possibility that people have destroyed their unpack folder
but I feel like most people making maps will leave the vanilla maps mostly untouched so that they can work from them
like, edited it into oblivion
I don't want to checksum it but it does mean garbage in, garbage out
well as long as they didnt edit and save the vanilla stuff its fine, and if they did, id definitely call that user error
yeah, seems fair to me
also I feel like most edits wouldn't be to the tilesheets themselves
I'd probably have a script extract the metadata once and probably store it somewhere for future use, with an option to reextract it
just run stardewxnbhack from ur tiled plugin then
"List every mod that allows adding map actions to furniture"
ERR_INT_OVERFLOW
no thank you 
in ancient chinese lore 3 means "a lot" and 9 means "all the stuff"
that's very close to ancient baby iro lore, where 4 meant "a lot"
so what you're saying is i should release BETAS 9.0.0
(tbf to baby iro, 4 in hebrew is ARba and "a lot" is arBE)
i am hoping game can just eat this tbh
(In Turkish, 100 means also "face" or "swim" depending on the context
)
at least for the simple building action case
@uncut viper Just a heads-up, WEATHER_FOR_TOMORROW wasn't working for me. When I changed all of the WEATHER calls to "Spiderbuttons.BETAS_WEATHER_FOR_TOMORROW Mountain Sun Wind" (for example), the patch just wouldn't apply. I recognize this is probably use error. FWIW, I made BETAS a required dependency in the manifest, and also tried a "HasMod" check when including all of the letter trigger actions
well im gonna need something a bit more specific than "the patch just wouldn't apply"
No worries. What I mean is that when I did a patch summary, the applied box wasn't checked
What can I get you? A log file?
GSQs dont have anything to do with cp applied though
were you using a token in that EditData
ah wait, WEATHER_FOR_TOMORROW takes a location context, not a location
That would do it! So just "Here" ? or something else? (not very clear on the context vs location thing yet, sorry)
no like a location context as in, Default, Desert, Island
Data/LocationContexts
you want Default
Thanks! I'll try it
Multiple weather looks like it's ok to use though?
it is yes
It's perfect now, thank you!
And BETAS just rescued me from token hell, so I really really appreciate it
i appreciate you usin it 
Been tearing my hair out for a week xD I can't tell you how happy I am to finally have a working solution to this
Now I just need to add the random timing people have been asking for
But at least I have an idea for that
@latent mauve do you care about obeying the normal woods debris rules? ie debris only spawn when no rain and not winter
It wouldn't matter for this particular location, no
ill just make it behave exactly like vanilla then
Sounds good!
pls try it
taking a look to figure out what I need to apply to my location/map to get the effect and test it out
found it in the examples so I'll add that and check it out!
Hmm, doesn't seem to be doing anything visually.
Lemme make sure I don't have anything weird in my map properties that's preventing it
you have to enter the map for the leave spawning to happen
I did
also not raining not winter as mentioned
Yep, it's Spring 4, and not raining.
And the actual Woods has the leaves
My patch export is littered with "tile flip" and "rotation" values on the Objects layers, but the actual map property is showing as present.
(I added it via CP)
does the Backwoods example work for you
{
"Action": "EditMap",
"Target": "Maps/Backwoods",
"MapProperties": {
"mushymato.MMAP_WoodsDebris": "T"
}
},
like this one
Yeah, I did that example but with my custom map's target, I'll try it targeting Backwoods now just to check
@gentle rose
ambient lighting happened but no leaves. Lemme try swapping weather conditions and sleeping just in case
so there's an animation of 3x3 1px x 1px frames?
Backwoods did this:
it looks like you put mushymato.MMAP_WoodsLighting not mushymato.MMAP_WoodsDebris

I've just commented out the lighting to try again.
but in case my code is somehow wrong, there's a screenshot
leaf
leaf
https://smapi.io/json/content-patcher/9f691bd26be7488797e8f07bcc9a7446 hey all, trying to adjust the garbage chances bc as i started playing with my mod i felt i was getting boxes a bit too often, and i was following this template from the wiki and i'm not sure why i'm getting this error
I think it's the schema complaining that BeforeId is not BeforeID (the correct form)
ohh gotcha
I don't think it matters?
if you're getting them too often you can reduce the chance
previously you used ignore base chance right? so getting them too often makes sense
yes it was ignore base chance previously
(if ignore base chance is true the item has to pass a 15% check before its own check)
yeahh, i'm gonna test it with automate real quick and if i still feel like they're too common i'll lower the random chance too
on the file i made i was on spring 12th of year one and already had like almost 10 boxes so i felt like that was a bit too much
Hey everyone first question here. I'm wondering the best route to take to make a placeable object/big craftable passable (no collision) and maybe be able to place it in the same spot as another object. Is this a CP, JA, or C# thing. I'm currently brute forcing extending the Object class which has been proven difficult so I wanted to make sure there wasn't an easier way.
Legitimately- why
I want to make a craftable node you can place next to a machine to get info about that machine but with limited space it would be nice to be able to walk through it.
What about making it a moddata tag on the machine instead
(also the game stores placed objects in a dictionary keyed by the Tile its on, so...)
Make furniture?
Personally i was lazy and just let people press a button lol
You can perhaps make a tool item to act as the "button press"
What kinda info are you gonna give people 
I mean there is an overlay dictionary for stuff like quest items but seriously don't it's not worth it
Furniture maybe
(Rug?)
rug is cool
mayhaps even path
in one of my WIPs some 'machines' are actually paths with passive effects
The idea was to emulate the autocrafting feature from applied energistics MC if you're familiar. A central hub that can pass requests to "connected machines" (machines with a node on them) and as part of the display see the time left on each craft and how much its crafting
I will try the moddata tag as well as the furniture idea! Thank you
Oh automate then
4th cake 
Bakery
So it sounds absolutely like a C# mod yep
As for doing stuff I don't think it matters what you use since ultimately you gotta do a draw to show the info you want
The rug or the moddata is just for you to keep track of where draw
look this bug,the players real maxhp is different to it shows in skill page,so if i wanna fix this bug,am i must use harmony?
it is indeed a bug (only "real" combat levels grant max health)
in fact, bonus combat levels (from food/buffs/etc.) does nothing (well, aside from monster spawning conditions)
if anything that seems like intended behavior if you ask me?
the "bug" is that the level menu shows +75 max health
even though it's only +50 from the 10 real levels
you should have your buffs do something else other than giving combat levels
Does anyone have a link to a guide on Content Patcher config files, I'm only seeing C# config files
Nevermind, I'm blind
how are yall
so do you make your own sprites or just recolor them? I'm asking for your opinion
I use the spritebashing method, I take vanilla textures and cut out bits and bash them together with other bits, then I go about recolouring them if needed, I hate making sprites from scratch myself, i find it so boring but thats just personal opinion (Mostly because I am not very good at it at all)
ouh its been so long since ive done anything mod related.. how do I do two versions of an event again? As in - if I want one version of the event to play before y3 and then another one to play after y3 how would I do that
[keeping the same event ID]
I used to do a lot of the spritebashing method myself using vanilla stuff, but more recently I kinda just make my own things (or was making my own things before my hiatus)
iim just learning how to make my own things its really complex
dont be afraid to use reference images, even if youre doing something from scratch. a lot of people/beginner artists think you have to be able to just create something perfectly from your brain without using reference images but that isnt true
i dont have the best hand eye and im a complete noob to making pixel art
!anyonecancook
Same here but this was my first ever building I made and my first complicated thing i've made, made using a reference of an abandoned greenhouse, church glass windows, a brick wall thats outside my window, and an image of cast iron poles from a hardware store near me, references can be anything and can help a lot
well in fact,i wanna make players maxhp+25 in this mod buff,but buff cant add maxhp to player
thanks anywhere to start
also i have trouble with art i need pixel art software i think i need ot know how make stardew pixels
Ooo stained glass, pretty!
!pixelart and as for format it's just png
Where to Start With SDV-Style Pixel Art
If you've never done pixel art before, don't stress! It's easy to pick up the basics - the key is to start small, ask for feedback, and incorporate that into your work.
To start, you'll want an art program. See a list of recommended programs in the !software command.
Here's some good beginner tutorials!
http://pixeljoint.com/forum/forum_posts.asp?TID=11299&PID=139322
https://medium.com/pixel-grimoire/how-to-start-making-pixel-art-2d1e31a5ceab
To start off, try opening an existing portrait and changing the outfit. Start small: edit a shirt pattern, change a jacket collar, or remove a scarf and draw the clothes underneath. Ask for feedback too! The best way to improve is learning how to identify what's wrong and why, so then you can work out how to fix it.
Here's more good tips from the artist of "Celeste":
General pixel art 1: https://www.patreon.com/posts/pixel-art-1-6971422
General pixel art 2: https://www.patreon.com/posts/pixel-art-part-2-11225146
Outlines: https://www.patreon.com/posts/outlines-14106192
Shading: https://www.patreon.com/posts/shading-13869731
Portraits: https://www.patreon.com/posts/portraits-8693396
SDV has a few quirks to remember too:
- Colour limits: Limit the number of shades you use - stick to six including the outline.
- Hue shifts: Rather than making shadows and highlights lighter or darker versions of the base tone, SDV shifts the hue too. Eg. a base orange will have yellow highlights and red shadows. This goes for skintones too!
- Light source: SDV uses a top-right & slightly forward light source - check the vanilla art for reference.
Most importantly, don't hesitate to ask questions and get advice from people. Have fun!
I need to find a way to incorporate some stained glass into my builds
I used photopea, it's free, entirely online, and easy to use, an interface almost exactly like photoshop (Many basic features I used were in the same place as photoshop)
Thank you! not quite as grandiose as I originally planned but I quite like it
hey cheetos
how difficult would it be to edit monster drops to remove an item from the loot pool....
i assume not very unless im missing smth obvious

some drops are in Data/Monsters (in annoying string-delimited forms)
others are hardcoded
uh oh...
which drop are you looking to yeet
YESSS MORE STAINED GLASS
i want slimes to stop giving me sap bc im losing my mind every time i go do sc runs
good news, sap is in Data/Monsters (all four slime variants)
whew!
Why do you mind sap btw?
it clogs up inventory space
Is there an auto-discard mod?
There is, doesn't have a lot of downloads either
thonk
I've decided to tackle the config scheme for a Content Patcher mod, does it allow hyphenated options like Auto-Detect?
that does seem kinda neat, but i'd honestly just rather make a quick edit to remove the drop from the pool myself
uuh
i dont see why not
?
Wasn't sure if it wouldn't like it or not, I grew up with programs not accepting spaces in file names so just wanted to make sure
if you want a hyphen for stylistic purposes you could put that in the i18n instead
and then the actual config name is smooshed together
I really do need to make an i18n so I think that's what I'll do
I remember someone made an i18nifier, I can't seem to find it, any idea where I can get it to see what it does?
can you use photopea to save your sprites in a file that downloadble? Sorry if I didn't word that right
Yep, for the use in game you click File>Export as> PNG (or something similar to that) to save it so that it has layers intact you can click File>Save As
Oh perfect! looks like it does exactly what I want it to, thank you!
np!
Is there any way to list these downward 
https://smapi.io/log/f896a184617a446b8f7cef77848f8866 I cannot for the life of me seem to actually get my NPC to show up. https://smapi.io/json/none/e3ee1530297844ee9934ea06788f4f60 bonus content.json - I've looked at several other NPC mods for comparison and can't figure it out. This is my third time rebuilding the folder T.T
Log Info: SMAPI 4.3.2 with SDV 1.6.15 build 24356 on Unix 6.8.0.65, with 31 C# mods and 15 content packs.
Suggested fixes: One or more mods are out of date, consider updating them
i could be totally wrong, but maybe it's an issue with the order of the patches? i think all the blanks would have to be loaded before being edited
I will literally try anything at this point lol
I'll reorder them and see if that does anything
i'm still not entirely clear on when order of patches matters and when it doesn't, but that would be my first thought, so worth a try!
giving this a bump to see if anyone knows :3
you are just missing commas after each line
you don't need a trailing comma on the last one, but it's technically just a style choice 
I'll try it and see if it's just the editor being mad
Hey Everyone! Just finished a new update for Level Extender! Fixed minor bugs, added a new config format (current config will auto update) as well as some new config options. Look forward to more updates! https://www.nexusmods.com/stardewvalley/mods/1471
^^ If some beautiful orange named person could get this into #mod-showcase for me that would be epic โค๏ธ
donezo
ty ty
i would do a conditional edit of the same location but with one condition being is year one or 2 and the other condition being is year 3 or more
ah.. yeah I know I can do that, I just thought there was another way instead of having to have another entry
thank you though :3
there may be! that was just my instinct :)
Nope it just needs to be one long line I guess 
You need the quotes around each one if it's supposed to be a string value
when making sprite what called when i make them in aline one next to the other like with sprites is their a background think that makes this easier?
"Value": [
"JackRivers.VampireFarming_BloodBerry",
"JackRivers.VampireFarming_BloodBerryWine",
"JackRivers.VampireFarming_BloodBerryJelley",
]
etc
that's not valid json 
It being one long line isn't giving me any actual issues it's just annoying to add to is all lol
the short answer is you can't. the long answer is 'turn on word wrap'
you cant do that either ItsDan, it doesnt take a list
forgot brackets, my b, updated my reply
you cant just give a different type to something that is not expecting it
you can't make a json array for it?
most image editors have grid options
it takes a string. it only takes a string
oh, I suppose I haven't had to do that for C# in a while. Too used to javascript for my day to day. my b
as someone who also does (too much some might say) javascript i do miss the type unsafety sometimes
CP could do it if it took objects instead of strings. it just doesnt
which is for the best, loathe as the javascript demon in us all is to admit it
tbh, I haven't even used CP
im sure iro is somewhere wondering why they feel a disturbance
i
was sitting here like WHY ISNT STARDROP DETECTING THIS MOD
i forgor a comma.
๐

okay YIPPEEEE i think it works
is it worth making a curseforge account just to upload one mod?
do not lmao
(imo anyway)
good enough for me, unless someone provides a compelling reason otherwise
i think i can do this
https://smapi.io/log/30c095beba3244ef9d8970fa2368f2d9 new error log - when I try to use the validator for my content.json it just looks like this https://smapi.io/json/none/0581ab67f2094d2186d3e68d36d152fc which on my end doesn't show the whole log
Log Info: SMAPI 4.3.2 with SDV 1.6.15 build 24356 on Unix 6.8.0.65, with 31 C# mods and 15 content packs.
Suggested fixes: One or more mods are out of date, consider updating them
you dont have a Load for Maps/Custom_IggyHouse
so it doesnt exist
you have a load for Maps/{{ModId}}_IggyHouse though
would that affect the npc not showing up overall?
well, are they supposed to spawn in their house that doesnt exist?
was there a reason you used Custom_IggyHouse instead of {{ModId}}_IggyHouse for the location name?
for my first mod do you reccomend i just recolor a sprite
for their house location yeah but I have their schedule starting them in town
what do you mean halloween puzzle dreams is no longer compatible ..
I was trying to work off a template and honestly probably forgot to make sure to change it
if their home doesnt exist then the NPC probably cant exist
or maybe it does put them in town
idk
but its the cause of the error anyway
so it should be fixed anyway
oh I forgot to load the other one that goes with it because I was just looking at how it works and put it in the wrong folder
def gonna fix it anyways
ty
i would change your Location id to use the ModId
the Custom_<name> format is from the old CP CustomLocations feature that is deprecated
which is probably why your template used it
also, as for why the validator did not show your whole file: the comments at the very top
if a file starts with comments, before the very first {, it breaks the validator
but you can still see the contents of the file if you click the "edit this file" link which is how i saw it
Question, my item exists in the game but when I try to place it on the ground, it won't budge
I wanted it to be placeable on a table and the player can just pick it up (it's jewelry)
"Changes": [
{
"Action": "EditData",
"Target": "Data/Objects",
"Entries": {
"{{ModId}}_HaleyGift": {
"Name": "HaleyGift",
"DisplayName": "{{i18n:haleysgiftglhtitle}}",
"Description": "{{i18n:haleysgiftglhdesc}}",
"Type": "Basic",
"Category": -24,
"Price": 10000,
"Texture": "Mods/{{ModId}}/HaleyGift",
"SpriteIndex": 0,
"CanBeGivenAsGift": false,
"CanBeTrashed": true,
"ExcludeFromFishingCollection": true,
"ExcludeFromShippingCollection": true,
"ExcludeFromRandomSale": true,
"GeodeDropsDefaultItems": false,
"GeodeDrops": null,
"ArtifactSpotChances": null,
"ContextTags": [
"placeable",
"prevent_loss_on_death",
"category_furniture",
"not_museum_donatable"
],
"CustomFields": {}
}
}
},
{
"Action": "Load",
"Target": "Mods/{{ModId}}/HaleyGift",
"FromFile": "assets/hnecklace.png"
}
]
}```
Thank you!!! (or should I just make this regular furniture bc
)
im pretty sure you need to define it as a bigcraftable for it to be placeable
i think they want it like a coffee mug
cant you just place those on tables
or are those furnitures
what
I accidentally placed it on the ground xD I tried picking it up and it wouldnt budge
(not the coffee item but the mug. am i just making up a mug item)
It's uhh caroline sized necklace (ornate, I believe)
oh I see
remove the placeable tag if you just want it placed on furniture like tables
oh i thought you meant you couldnt place it on the groundf
like "when i tried to place it it wouldnt budge" = "it wouldnt place" in my mind
no reading ๐ค no thinking
Ah, sorry, I probably didn't word that properly. Haven't slept yet and my brain is mush (i should) 
i mean i did read it
Thank you, bluebs and button I'll go to remove that tag 
but i feel like i cant be blamed for thinking "when i tried to do x, y happened" means x did not successfully occur 
oh def xD but yeah, I accidentally placed it on the ground and when I tried to remove it or place it like regular furniture, it wouldn't budge**
Time to figure out how to make a fruit tree 
no string id support for farm type house interiors???
New quote added by atravita as #6526 (https://discordapp.com/channels/137344473976799233/156109690059751424/1401351366898618550)
how do I add this to the modding wishlist
Hang on a second
(is there a modding wishlist?)
Thereโs the mod suggestions on GitHub
^?
like this 
oh
Things mod authors want to expand modding capabilities
I may be speaking out of my ass but I think that particular thing is fixed in next
(for example, SDV1.6 was the deceptively innocent modding wishlist item of 'make int ids into string ids')
Int IDs 
Good day, my friends. I hope you are all doing well. I am having an issue with a map that is supposed to warp into the farmhouse, but not to the front door (it's a temporary cellar replacement map, but for various reasons it's a separate location from the actual cellar). When I exit the temporary cellar, I always end up at the front door of the farmhouse. I've tried editing the Map Properties Warps, and I have tried adding actual TileData warps, but I still end up at the front door
yeah im pretty sure that just Happens
sighs
I do have the Farmhouse entry edited, so I guess it must be overriding everything else
Bleah, I guess I'll have to see if I can make it work as a temporary overlay on the cellar or something
Because the actual cellar (on which this map is based!) still works just fine >_<
Just checking: vanilla events do NOT generate the automatic eventSeent_<id>memory<time> conversation topics, right?
Only modded events?
every event does
not only that, but every conversation topic does
every CT gets a memory
Hmmmmm. The wiki made a point of it being modded events that receive them, so I assumed it wasn't both
I've done something else wrong with my trigger actions then
Fun!
caveat: the CT must naturally expire
also, the game has no idea what events are modded or not
And yep, I set the wrong event ID when trying to debug, so my trigger action wasn't going
Thanks, Button ๐
hell yeah
how would one do a when condition of year 3 +
judging from the tokens guide,
"Year |contains=1, 2": "false"
you know.. i didnt even think of doing it that way
thank
I sent that before i finished typing thank you but you get what i mean lmao
id be surprised if you thought of doing it that way but then asked anyway /lh 

I was thinking of a different way but c ouldnt figure out how to do it
Alternatively - is there a GSQ and/or event for the trash bear
I'm gonna do negative years lol
going back in time
time is soup
Do i recognize the forward arrow of entropy
does anyone truly
you know, i really thought it'd be simple to get cjb item spawner's item menu to realign its components correctly on gamewindowsizechanged
Just delete and resplendent the menu
i can't even do the funny method every SDV menu does on resize where it just destroys itself and puts up a new one, since this one has state to preserve and also i hate doing that
remaking the item grab box is also hopeless since it'd take so much reduplication i may as well be rewriting the menu all over
Bluebs may I have one thing
not a chance
Cjb puts itself back as the active menu after hitting the level up button
if i have two events with the same id but one has the precondition GameStateQuery WORLD_STATE_ID trashBearDone false and the other has it set to true will they each play when whichever query is true (depending on the other preconditions)
Ie, level up button then level up menu and then cjb puts self back
i never use cjb cheats menu, i do not look at this request
You dont?
i think it will only play one time since the event ID itself is still the same
nope, last time i used it was for growing crops for raised garden beds mod page images
just whichever one is triggered first
that's fine that's the plan
I just need an alternate of the event pending on if the trash bear has cleaned or not
but i use cjb item spawner about 1000 times a day so this needs fixing for my sake
way, way, way, way, way, way, way too many keystrokes
Actually i just chat cheats lol
there's also an always-on-chat-commands mod that lets you type / ingame instead of debug in the console
STILL too many keystrokes
Yeah just about every c# has that somewhere in a debug mid
i dont use that
Smh
shame.
blueberry, you are perhaps the last person capable of making me feel shame
i didn't know there was a queue
Before I ever go back to stardew I really need to take a look at chat cheat history and autocomplete
Anyways
Bluebs, how goes archery
made it so you have to take time to aim ๐ฅณ but i don't do my own mods on weekends
Woah that looks awesome
the idea being it's a ranged weapon that takes more time and precision than a slingshot, meaning you need better positioning, but offers better damage, knockback, critical hits, etc
also a bit more commitment since you can't just fire rocks you pick up in the mines, and you can't slot the arrows into the bow so they'll be using an inventory slot
that looks really cool blueberry!
thanks
wondering if i should give it a stamina cost, would make it out of line with other weapons though
That is amazing oh my god
for realism?
wondering if i should even give it a hierarchy like with slingshots, or just have the bow/longbow be alternatives. bow can autofire, longbow cant. bow has no knockback or crits, longbow takes way longer to fire. bow has a better chance of hitting, longbow has a better reward for hitting
bow cant pierce, longbow can
i guess for realism, was wondering if i should drain stamina for holding the draw too long on the longbow
but that's probably just annoying
maybe just make it slow the player's speed while holding the draw?
ah well you can't move while aiming, same as the slingshot
i only realized the usefulness of slingshots by watching some stardew speedruns
same actually hahah
but i still cant really get the hang of them
i just club spam. my beloved
I would use them if the damage was less sucky
clearly what we need is a ranged/archery skill to improve slingshot/bow damage. mmhm
like you can do decent damage with it if you use high-value ammo, but like... a galaxy sword doesn't use ammo at all
imo it just feels like they don't give enough oomf. either let me fire quickly, or let me do damage. hence the bows hahah
They're better for bombing
unfortunately bombs do lickety squat damage
as i found out while making the rice cracker that makes your bomb damage higher
I'm a little stumped with an issue I'm having with my i18n in one of my events. All 9 of my other events have given me no issue (at least with the i18n), but all of a sudden, I'm getting this in my 10th event.
I'm getting an error from the validator, but I can't understand it. I did the same thing with these lines as all my other heart events, so I'm not sure why these specifically aren't working...
Bombing rocks
you don't have {} braces around your i18n entries in the default file. is that your entire file, or just an excerpt?
just an excerpt, sorry for the confusion, and all my other lines in the default file are executing correctly.
I do have the braces in my actual default.json
not much visible progress to show, but I did some more work on my sourcegen thing.
I've confirmed that the strategy I'm using to strip marker attributes works as expected. I did some setup work in anticipation of more features I want to add, and I added a thing that bakes a MOD_ID constant into a global using so you can just plop it in your files anywhere.
I also made it so it automatically exports all your translation data to a strings asset so it can be used with token text. (specifically Mods/MOD_ID/Strings. Might make it configurable later if I can figure out a sensible way to do that.)
next on the list: inserting entries into list/dict assets from local json files, and marking methods as editors/loaders for specific assets
after that is gmcm stuff and maybe some other frills
Hello! Has anyone had issues with .OpenModMenu(ModManifest); from Generic Mod Config Menu?
There seems to be a UI overlapping issue, does anyone know how to fix it?
the only thing i can really think of is that your working default.json isn't the same as the default.json that's connected to your game tbh
are you opening your GMCM mod menu from within another custom UI? i used GenericModConfigMenu.OpenModMenuAsChildMenu(mod: ModEntry.Instance.ModManifest); to that effect
after remaking the event from scratch, I just realized that I had copied the empty keys from the 8 heart event to the 10 heart event and then got distracted by something else before I changed them. So I had two copies of of the same key, one full and one empty ๐คฆโโ๏ธ I think that's enough modding for me tonight. need sleep
It works. Thank you so much! โค๏ธ
Is the xnb parser Microsoft.xna.framework.content.contentreader?
pretty sure, yep
working on something good?
there's some extra fluff around ReflectiveReader but i haven't looked into it
Perhaps an obvious question, but is it possible to use Contnet Patcher to send an NPC to an certain place at a certain time (basically updating thier schedule). Using something like onTime Change and toArea...or...something. Woudn't be asking if I got those to work ๐ I'd like to stay all CP and have an NPC show up at a few locations so you can catch them in action and then dialog.
anyone know a console command to quickly be able to read bundles? (i.e. skip the wizard cutscene to understand junimo?)
Generally I would recommend literally updating their schedule overnight if you want to use CP
Iโm not sure that CP has any capability to edit schedules in real time due to scheduling running overnight
(Iirc)
Ah ok so I update the next day's schedule the day before. Thanks
There might be better, but:
debug sleep
debug sleep
debug sleep
debug sleep
debug sleep
world_settime 800 (not sure this one)
debug warp busstop
Walk to town and trigger event
debug warp comm
Walk to scroll
debug sleep
Read mail
debug warp wiz
Is the best I know of offhand
The wiki page on commands doesnโt seem to have anything
https://stardewvalleywiki.com/Modding:Console_commands#clearfarm and ctrl-F for bundles didnโt get me anything promising
working on thinking about something good - debating if I should port the original xnb parser or xnbjs to c++ (for switch, I don't usually like c++)
why does smapi say there are available updates right after i just downloaded a mod
then i go to smapi.io and it directs me to the place i just downloaded from...
sorry wrong spot will go to the right spot :))
is it possible to make an AT mod where the texture is bigger than target? Such as making the mailbox larger?
I donโt think so
Longbows and their draw hold tiring you out. Compound bow superiority, get a nice let-off so it's easier to hold in place once you pull it back far enough
The absolute limit of my visual artistic abilities: marshmallows
hey i have a question as an absolute beginner to stardew modding & c#. what is the load order of stardew and how does it operate? i mean as in which files it loads first till last(or just the way the mods interrupt that order) and generally the logic behind injecting layers or editing/adding data through frameworks such as content patcher. i wanna know the logic before starting the mods if that makes sense and would appreciate any help!
Only thing you can actually rely on is that mods load after their listed dependencies
and for stuff in the asset pipeline there is a priority system you can use to override load order
but thats mostly content patcher respecting that, C# mods are less attached to mod load order as it depends on the timing they used to register the event and if they had put any priority overrides on the event for handling asset operations
๐ค is it possible to add additional produce to fruit trees or not?
i assume you want them to produce multiple different items in a day? the native fruit tree system only supports producing one item at a time it seems https://stardewvalleywiki.com/Modding:Fruit_trees#Data_format
meaning if i load an NPC's usual activity, afterwards i would load/edit/layer a change i created and then it would continue
or
it loads vanilla stuff first, then goes to the mod directory through smapi im guessing, and then content patcher does things through detecting files that command it to change stuff in the original data of the game?
or
same start as the last one but just layers on top of vanilla through smapi and content patcher each time you open the game
๐ sigh. i doubt there's a framework that allows for otherwise, is there
i'll just make my own framework then im kidding i could never
also, do i then need to change dependencies based on the priority system to override the load order?
The way the asset pipeline works (which is what Content patcher is an interface for) is that for a given asset (eg Data/Characters) there will be a single load that runs, if no load happens then smapi will fallback to trying a vanilla xnb load.
If vanilla also is missing that file then the asset load fails and an exception is raised.
If something loads, then the edits will run, sorted by priority and tie breaker is mostly done by load order, though its only since CP2.0 that cp patches even had access to priority and the world operated fine.
Within content patcher internal to a given content pack, in general the patches run in the order defined, earlier patches running before later patches (for a given asset at least)
so it goes to each folder in the mod folder individually(in some order alphabetically or not) goes through each json file and does the changes?
mods get registered in roughly that order (but as a mod author you have no real agency in the folder name or relation with other mods)
and on a different note, how do i get information in game while making the changes. for example, i want to see the hex value of the color of the hair of the player and make a new NPC have that color in their hair? meaning outside of the mod loader or do i need to do it based on a saved game, but then how will it work on a new game?
but what if the mod im creating has dependencies on another mod(of course by acceptance of the mod creator)... how would that work?
the manifest.json that all mods must have lists the dependencies
mods get found by searching the filesystem and the filesystem itself is roughly alphabetically sorted, but the dependency system can... delay your initialization until your dependencies are initialized.
there is no mechanism for a mod author* to load before something else, only after
oh, cheers!
A C# mod can read whatever state they like when participating in the asset pipeline.
a CP content pack can only access runtime state that is exposed as a token, and is limited in how frequently that data can be refreshed
can i ask what defines a C# mod and if you have a guide/tutorial/code i can reverse engineer on how to begin writing the code? i know a few coding languages but never c# and never modded before
thanks mate, appreciate it
Say, when working on a custom map, is it better to pass things such as warps - from content patcher or the map file itself?
Either is fine! Just note you can't use CP tokens in the map file
Neat, thank you!
how to add a button in game menu?
you mean the pause menu ingame? you might want to use this mod:
https://www.nexusmods.com/stardewvalley/mods/32032
though i've not used it myself, so i don't know how it works โ๏ธ
How do I go about changing what season do the crops grow in?
Content Patcher EditData, Target Data/Crops
aha ty
There's more to it but im not at my computer rn and i dont wanna specify incorrect information
np i will try what i can
is there a list of the crops numbers somewhere?
ah nvm found one
I have a question about Content Patchers "When" condition, I have this action:
{
"Action": "Load",
"Target": "Maps/zzz_AtlasV_StoneWShadow",
"FromFile": "Maps/Assets/zzz_AtlasV_{{season}}_StoneWShadow.png",
"When": {
"HasMod |contains=DaisyNiko.EarthyRecolour": false,
"Material": "AutoDetect"
}
},
Does a "When" condition like this mean this action occurs when the material(config option) is autodetect AND earthy recolour isn't present, or does it mean autodetect OR earthy recolour isn't present
both will apply
Perfect thank you
just saw the bug report on the mod page, are there no guards against bad audio files crashing the entire game?
(also, what does "tier 2 audio player" mean?)
I've updated the audio file checks to prevent crashes. As for the whole "Tier 2 audio player" thing... just clickbait for fun
Trying to do config stuff, can you use something like "When Auto Detect option isn't selected" something like "HasMod |contains=<modName>": false but for a config option?
oh, just had a look at your code - out of curiosity just because I've never seen it before, what is calling the dispose function of the ModEntry class? I'm not familiar with mods themselves being disposed
(also, why is there a using directive for your own namespace?)
"HasConfig |contains=AutoDetect": false kinda thing
The Dispose() method in my ModEntry isnโt automatically called by SMAPI. I included it in case I need to manually clean up resources like audio streams later.
The using directive for my own namespace was added by Visual Studioโs auto-import(delete later).
I use Dispose() to stop the audio when exiting to the main menu too.
where is that used?
(I'm also not sure how you're calling it manually tbh haha)
Normally i only make dispose for IDisposable impl 
you could do this with a "When": { "Material": "Wood, Stone, Etc" }
just list everything that isn't autodetect
I'm not sure about why the reaction, I genuinely would like to know what you're doing to call the method manually out of interest
theoretically, if i hypothetically wanted to make a mod that lets you add additional produce to a fruit tree upon harvesting, (so like, shaking an apple tree and getting apple + something else) how would i possibly go about that (asking for a friend)
The thing I I'm using the {{Material}} token, in a tilesheet name so won't it try to apply all of the options at once?
it'll only apply the one that's actively selected
Ohh okay, thats perfect then, thank you!
in better words (rewording for my own neuroses not necessarily bc im concerned you didnt understand) a config token can only ever be one thing, so if it's a {{Material}} token it'll replace it with the one thing. But the When condition with multiple options inside the "" acts like an OR condition. so the condition will activate if Material is any of them
Does anyone know how to make an NPC a roomate candiate instead of marriage. Can be romanced has to be set to false, I know that
you need an item with the "roommate_<Npcnamehere>" context tag iirc
Good to know, the further explanation does help understand why that works which in turns helps with how and when to apply it, thank you!
Ah, okay,\
im glad you benefitted as well then!
hm, i wonder when we will get toe UIIS2s custom tree label thing
just so i have, like, a timeframe or something
i wanna add a button in game pause menu,when press this button,open move farm buildings menu,but my code doesnt work,this button is not show,why
I'm struggling with the lampposts on my new Town map redesign. What's the simplist way of removing the vanilla light tiles and loading the new coordinates for DayTiles NightTiles and Light properties?
Because I've tried but there are still lights where the lampposts used to be, and no lights where they are now
I've tried both map properties in Tiled and in the content.json but it doesn't seem to fully work either way
(Both lampposts have been coded to light and show lit up in Tiled and content.json, but one isn't and the vanilla light placement is still showing)
Any idea where I can find a tutorial abt adding/modifying a custom npc's "help wanted" requests? Ive found things about the special requests board but not the ordinary bulletin
assuming this the quest board outside pierre's, i think u can only exclude em
Ah that's annoying. Thanks!
I feel like I've seen content patcher mods adding new ones, so if you can remove them too you could do a bodge job by removing then adding a new modified one, however that may cause issues with compat
do anyone knows how to add a new button in game pause menu,and when click this button,open move farm buildings menu?i tried to do it myself,but i met bug
is cherry blossom?
yeah
cute 
what do players even use fruit tree fruit for in most cases ๐ค cooking? gifting? or money
Visuals and cooking aswell, maybe wines if I don't have enough ancient fruit
๐ค hmm i see i see
maybe i can make recipes for these flowers... but idk if i want to put that in a separate mod or not
eh i could put it up as an optional file
oh boy more recipes!!!!
i love having a giant cooking collection that ill never complete
id say either config them to be optional within the main mod or additional file yeah
yeah, the ideas i have for the recipes is kind of... random and varied LOL
and im thinking crafting recipes/machine produce bc idk what you're gonna do eating these. you could make tea, i guess....? potpourri?
Making teas could be good, a different way of getting loved gifts for NPCs like the stardrop tea but not as over powered
You could make a crafting recipe or a machine for the flowers to turn them into something placeable on the ground for decoration, like small flower patches
Use bouquets to pair up the remaining npcs
mm yeah.. maybe even pressed flower bookmarks as a gift
well, this is totally not the mod idea i had and still havent worked on
im really good at finishing my wips i promise
(please add a config for removing them from perfection if you can, I have so much stuff to craft already
)
oh, yeah, i wont forget to do that
generally the mods i made were kinda small in scale so i didnt include a perfection toggle
but for something bigger it would be a hassle to do everything XD
If I wanted to remove the vanilla exterior light source tiles using content patcher/Tiled, how would I go about doing that?
I yearn for more jewelry 
(For instance, there used to be a lamppost somewhere but I moved it, but the light still appears at night)
Ur gonna say this without more context? Are you making jewelry Claire 
I did make jewelry yeah
Iโd love to make a jewelry mod someday but alas, my pixel art skills are 
Is there a way to split the code for my crop mod into different files or is it fine to have it all in one?
One will suffice
Jewelry does require you to get much more pixel per pixel 
You can split your content.json into multiple parts and include them if youโd prefer that, though.
I achieved my first necklace using an ornate necklace, an apricot, and a dream
if you wait 5 years i might release my jewelry mod
New quote added by atravita as #6527 (https://discordapp.com/channels/137344473976799233/156109690059751424/1401567640366878801)
โฆ was I just ghost pinged?
In here?
Itโs okay! I was just confused, ha.
I thought you were talking about lighting but then saw the post about crops
need help pls,my code is not work
You never said whatโs wrong with your code
Feel free to come back and ask again in a few hours - c# modders are rarer and catching them when they have free time is
Hi shockah!
Atra -> gym
Is there a guide on how to do that?
I don't mind it being all in one file but it's hard to read sometimes
its this
i added a "movebutton",and it should show when open pause menu,but it didnt
are you actually drawing it?
you need to draw it manually
setting .visible doesn't do anything
I don't think?
oh i know,but what is the code of drawing it?
there should be a draw method on the button
ClickableTextureComponent.draw maybe?
Quickly flip through chest colors, also copy paste, also half increments (blending two colors)
https://youtu.be/BCilsIAyaus
watch it's already a mod ๐ซฃ
Modding fiend
Also you've misspelled ModEntry, i don't know if that's a problem
nvm
add an edible_flower tag and you'll get lots of compat with WAG and VMV, for example
thats not affact anything
i just dont know the code of adding a button in game menu
by the way,i also dont know how to define what it do after be clicked,i didnt find this method
This worked, thank you so much!
You don't have to add the button to a menu, you can use SMAPI helper methods to display it and catch whether the mouse is clicked where it is. (Me I would just use Harmony patches though, bc I'm like that)
you see this tile? (spring_outdoorsTilesheet tile ID 598)
in farm_fishing, it's type dirt and buildable. in farm_combat, it's type stone
??? why...
(btw, none of the tiles similar to it in farm_fishing are dirt+buildable, they're all just stone)
Im having a weird bug where im drawing a menu OnRendered, but the mouse icon keeps flickering as if it was being redrawn, does anyone know something that could cause this?
why indeed....
there's nothing special about the way it's being used in the fishing map, either...
I put lines of red tiles to the left of every place it shows up
oh actually the one below it is dirt + buildable on fishing farm, and just dirt on all the other farms 
oh I think it's to make the area in front of the warp statue buildable in the fishing map, because it isn't recessed into the wall like it is in the other maps
hm, im trying to do MEEPs interactible tile thing to show an image but it doesnt work..
The Rendered event apparently draws over the cursor, so it may help to use another event like RenderedActiveMenu or RenderedHud. (But if you mean "menu" in the way that the game does, you might want to implement it as an instance that uses Game1.activeClickableMenu instead of manually drawing it.)
Does anyone know how to remove a light effect from a vanilla lamppost that no longer exists?
I've removed a lamp but the area still lights up at night
i might need help because i dont get any tile interaction at all 
Sorry to keep asking, but I hope someone is online who can help
Gotta edit the tile property
There's a property where the lamp used to be calling it a light source
(I think.)
Have you checked the Paths layer?
And the Map Properties?
Or the paths layer, yeah 
Those would be where I would look first
This is what shows on Tiled (the circled area is what lights up)
Check the Map Properties for a "Light" option
I've also deleted the DayTiles and NightTiles and Light properties from Tiled to see what would happen and it is still lighting up the area
Hmm
(I've pasted them in a word doc so I didn't lose them)
Which map is it and what's the coordinate that's lighting up?
oh thanks,let me have a try
Town and 17 86
That's definitely defined in the Map Properties. Have you tried it on a fresh save stripped of other mods? Another mod might be adding it
Ah good idea!
And - I've done this myself - make sure that the map version with the Light property removed is the one that you're actually using in your mods folder. ^_^;
I've updated a map and forgotten to copy it over many times ^_^;;;;;
But yeah, new save, stripped down, see if it works. If it does, either it's another mod interfering, or something carrying over - I've noticed that sometimes map properties don't reload after being changed.
love it when i find the solution to my problem moments after i posted asking for help
mood
(What was it? Maybe someone else will have the same problem later and will come trawling through here for the solution)
Humm i see, im drawing an inventory menu without it being the active one. I dont want it to be cause it will lock the player
It is clearly being redrawn but i dont think i have any other event i can use
oh, i just targetted the wrong map lmao it gets complicated when you name maps XYZ_Inside and then XYZ_Inside_LowerDECk etc
I've just tried loading a brand new save game with just my mod and nope, the light is still there
Have you looked at the map properties with Lookup Anything?
What's Lookup Anything?
!la
Lookup Anything is currently maintained by PathosChild, the creator and maintainer of SMAPI and dozens of other mods and all around cool person. Though Lookup Anything has been moved to 1.6, not all functionality is currently present. Machine logic, for example, changed drastically. A machine is NOT broken just because Lookup Anything shows no info. Once the dust settles, updates will most likely bring back these bits of missing functionality.
Interesting
I was hoping for. A link
If you enable some of the advanced options, you can look at tile properties, map properties, and other internal debug info for objects
Ooh that's interesting
u can add a link to the command
PathosChild...
I cann but Iโm on mobile
Lemme just... make a couple of tweaks to that. 
So itโs annoying to format
pathos has a child?
Could you also shorten it?

It seems long and doesnโt really actually say what the mod is
And while I agree pathos is cool maybe the command for LA isnโt the place 
Yeah, I don't think we even really need half of that information in there now, right?
Pathoschild implements IPathos
whats that
Y'know something i wanted for a while is a modifier key in LA
To enable complex lookup without going into gmcm
We need to have every command say pathos did a lot of things
Just all of them
Like !false
pathos invented that
Lookup Anything is a mod that lets you view a lot more information about items in the game, as well as helps you debug when youโre making mods if you turn on some of the extra information. https://www.nexusmods.com/stardewvalley/mods/541
Certain information may not be possible to view due to new 1.6 flexibility, such as <whatever is true>.
Good draft?

Dont need thr last sentence
Is it still true machine logic isnโt handled?
I like it! Not 100% sure what's true to go in there, though. 
I argue it should still say pathos is awesome
Haha
We could tinytext โMade by Pathos, who is awesomeโ at the bottom
Instead of the last bit about whatever is is broken
Yes
<whatever is true> is my favorite value
Yeah, is any of that information from the old command currently true?
Well, I guess the machine logic stuff specifically.
I use LA all the time and look up machines in 1.6
I'm trying to use Lookup Anything but it's only letting me search spawnable items rather than light properties
Lookup Anything is a mod that lets you view a lot more information about items in the game, as well as helps you debug when youโre making mods if you turn on some of the extra information.
Sadly missing the Pathos part. I don't know if he'd like that. 
The pathos stuff is definitely true
But also I guess sort of subjective or something
It's definitely true! Subjectively, objectively true.
New command added! You can use it like !la.
!la
Lookup Anything is a mod that lets you view a lot more information about items in the game, as well as helps you debug when youโre making mods if you turn on some of the extra information.
Much tidier. Thanks for doing basically the entire process!
Thanks for actually implementing it!
I've figured out the tile lookup thing
This is what it says
Where would I find out if there's a light property there?
Are comments supported in the config.json generated by Content Patcher?
Afaik no
Gotcha, I thought I'd check as comments aren't supported in json by default
the parser used generally does tolerate and ignore comments, but they'll get demolished if a json file is ever generated/saved
(idk if CP specifically ever saves over config.json if it exists, though)
if you're looking for the Light map property, click the blue show 10 results text
Ah okay! Weirdly there aren't any light properties in my Town.tmx on Tiled yet they're there on the Lookup
They might be in the tileset itself.
apparently tile 8 on the Paths layer gets added dynamically to the Light list, going by https://www.stardewvalleywiki.com/Modding:Maps
...except indoor and festivals only, so that's probably not why
ah, forceLoadPathLayerLights would also do it
This is what is showing
But in Tiled its this
Because I deleted the DayTiles and NightTiles and Light properties to see if that made a difference
Town just uses the map property normally and not Paths, it looks like, so your edit probably isn't loading
map properties donโt apply when you use EditMap instead of load
youโll have to do light in content patcher using text operations
because i assume you donโt want to load the town map that would be very bad for compat
Just to clarify: I've made a replacement Town.tmx that replaces the entire vanilla one (although it's mainly small edits) - one of those is I moved some of the lamp posts around. However, when I tried to put in the coordinates of the new lamppost locations in the map properties section of Tiled it didn't work and the locations of the vanilla lamp posts still light up at night
So what I wanted to try and do is remove the vanilla light properties from the map, then find a way to get the new lamppost locations to light up at night
so you ARE loading the town map and itโs still not showing up? strange
I'm assuming the vanilla light tile properties is coming through in my MapEdit town map
oh, yes, if youโre using EditMap, it doesnโt matter how much of the map you replace, it doesnโt transfer map properties from Tiled so that would be why youโre seeing vanilla lighting
if you want to remove and add to the light map property, youโll have to do it via a separate patch using content patcher
you can use replace delimited https://github.com/Pathoschild/StardewMods/blob/develop/ContentPatcher/docs/author-guide/text-operations.md#replacedelimited
I cant seem to get my closed message to work for my shop
if i were to link my shop on a json could someone take a look
which one, poppy shop or shaavarโs animal phone?
poppy shop
Dialogues is a list of models, not just a string
(also your Items is inside the Owners entry, it should be outside of it)
im not sure what that means
you can look at the unpacked vanilla shop for examples
ClosedMessage also should be on the same level of the other fields, not inside Dialogues
Would this work?
{
"Action": "EditData",
"Target": "Maps/Town",
"TextOperations": [
{
"Operation": "RemoveDelimited",
"Target": ["Light",],
"Search": "4",
"Delimiter": " "
}
]
}
no, you need to target Maps/Town
Ah, so it targets the vanilla map underneath?
yep
Ahhh!
basically all EditMap does is replace tiles on the map
Would it be Search: 4? I guessed because 4 is the light property for the lampposts
And would that have to be within a new light-remover mod folder? Or can I put this into the custom town mod?
iโve never used RemoveDelimited, but i would expect for you to remove one lamppost light, you would search for โ4 x yโ?
no, you can put that patch anywhere in your mod
Oh so put the light coordinates in Seach:
you have a duplicate Name on line 96
the ClosedMessage is in the right place now, but I think you need another entry in Owners specifying the owner for that "closed" entry to work
nic can you double check that's actually the right format for text operations on map properties, im on mobile but at a glance the target field seems incorrect (also that snippet they posted isn't even using editmap)
I have no idea if i had the problem when i started the game today, but I delieted a small mod while in game (CP) Cows, and now my cellar and spouse room are gone.
The cows have left and taken your spouse /jk
(also this looks like a pet shop added by MMAP, in which case I'm not sure how it interacts with the shop owners mechanic)
(maybe you should ping chu?)
!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).
I've put all the light coordinates to remove in the 'search' field, what do I have to put in the Value and Delimiter field to replace them with nothing and have them be removed?
whoops sorry i had to help my mom move a table lol. make sure youโre targeting Map Properties before lights with the text operations
value being an empty string makes sense to me, not sure about delimiter when removing things
if you want to see the format of the data youโre editing, i think you can open your map in a text editor and find the map properties section. thatโll show you what to target
pretty sure you just can't use text operations if the value you want is a coordinate like that
because the value contains the delimiter
so would the move then be to overwrite it entirely? i was trying to get them to use Replace so that they could just modify vanilla ones with their own
yeah IDK any other way to do it besides c#
can just overwrite the vanilla ones completely with the same lights just without the one you want removed, set your patch priority to be super early, and hope for the best
yeah that sounds like it might be best
so @bleak spade ignore my suggestion about using text operations. instead add an EditMap patch and change the map properties to have the light values you want, and make that patch happen early if you want to increase chances of compatibility with other mods
thereโs no such thing as AddLights like there is AddWarps, is there? i feel like that could be really useful, even if itโs still accomplishable using other methods
add is doable as append text operation i think
the problem is text operation limitations when it comes to removing stuff
gotcha
out of interest does anyone know how text operations (specifically remove or replace) work? like do they iterate over a string to find x, or what?
does it stop once it finds x or does it run to the end?
i am confused by the question 
theres different modes as u can see
i may not have enough coding knowledge to convey this lol. i assume the code uses a loop of some kind to look at the string
Are you asking if it replaces first or all?
it splits it by delimiter then checks every entry
ohh so not what i was imagining okay
this, but i also wanted to get a sense of the inner workings in general
so when it splits it by delimiter it checks every entry and modifies the ones that match?
oh the user sets that i see
i know nothing about C#, only python and javaโwould it be 1) possible 2) relatively easy to make a framework that lets people do text operations via iterating over a string? the way i would do it in java would be using a loop and returning the modified string (i thinkโitโs been many years since i took that class)
C# is like a Java that hates you less.
GREAT because i dropped that class ๐
the only reason ReplaceSubstring doesn't exist is because I didn't PR it at the same time I PR'd ReplaceDelimited, basically, so yeah, it'd be easy
maybe iโll dip my toe into that then! assuming i succeed, would it be better to PR it or release it separately as a framework? iโm not sure of the etiquette there
Pathos is open to the idea of it in Content Patcher
excellent 
TIL that nexus doesn't use markdown, it uses BBCode, all that nice markdown for nothing
you can use markdown with https://github.com/anotherpillow/nexus-markdown
isn't perfect but usually works
ngl I have no idea what the userscript directory is, I'll just re write it, atleast I'll get some practice in BBCode
then don't read the compilation/development instructions?
New quote added by atravita as #6528 (https://discordapp.com/channels/137344473976799233/156109690059751424/1401639135760089109)
Oh I thought I had to compile it myself to be able to use it, never mind๐คฆ
Now that I have a mod that I'm happy with, could I request the Mod Author role please?
Is there some way to use Content Patcher to add some sort of hidden variable to the game? I'm hoping to store a number related to a few specific characters without delving into any of the goopier coding aspects of modding
the answer is it depends on exactly what kind of data you want to store and exactly when you want to retrieve it
you cannot attach data to an NPC itself aside from what you can put in their CharacterData.CustomFields
An integer, similar to Hearts, probably not displayed anywhere. I'd like to use it to change character appearance, which I think I would know how to do if I could only test for the dang thing. I'd also like to be able to increment and decrement the value during certain interactions and gift givings and stuff.
That seems what I'm looking for, except for the part where the stat will be removed when it reaches 0. Seems like something I'd need to be very careful about, which would be frustrating
your only other option is mail flags, which are just binary flags
if a stat reaches 0 and becomes removed you can always just increment it again later
youโll want to @ or DM bouncer
I'll have to look closer at Content Patcher and how it handles stats, then. Do you have a recommendation for a guide specifically on that topic?
its not content patcher handling stats
Content Patcher only interfaces with vanilla data
the game handles the stats
Oh gotcha thank you, I must've missed that bit on the github or roles page
Sorry, ambiguous phrasing. How Content Patcher can interact with stats
you want to read the Content Patcher documentation to learn how to use it and the relevant asset you want is likely Data/TriggerActions, as well as Data/Characters to edit their appearances
it doesnt interact with stats directly
you add a trigger action to the game (or some other means of firing the IncrementStat action whenever you'd like it to)
via Content Patcher
Hello! I'm writing an event in the ScienceHouse and I can't get either of my NPCs to appear on screen. I'm pretty sure I have the right temporary map loaded (it triggers upon entering the farmhouse at night, but "takes place" in the ScienceHouse). Neither Sebastian nor Robin physically appear but I think I have their spawns loaded? The dialogue loads fine. Just my NPCs are invisible (and I don't think I made them invisible at any point). Edit: it seems to work fine if I put the event to trigger in the ScienceHouse and remove the temporary map version, but that doesn't work with the story I'm trying to do. ah well
Content Patcher doesnt even have a token for reading stats. it cannot read stats. but character appearances use Game State Queries, which are another vanilla mechanic and there is a GSQ for reading stats
This... might be genuinely frustrating to make, even using Content Patcher, based on your descriptions. I'll figure it out with enough asking for help and reading the docs, but I'm not looking forward to it
it should be quite simple, i think you just have a slight misunderstanding of what Content Patcher functionally is, but hopefully the docs make it clearer
learning c sharp is long but worth it
I'm in university for just that, funny enough. I've already got a semester of C# specifically under my belt. If you happen to know how to do the thing that I am trying to do in C#, I would love to discuss
I was just hoping that Content Patcher might, by some miracle, have this functionality so that I wouldn't need to turn to the dark arts
would you mind sharing your event code? It could be something as simple as when you change to the Temporary map you aren't warping Sebastian and Robin to it.
I also had some amusing weirdness in the form of invisible NPCs with shadows when I mistakenly tested an event that used the NpcVisibleHere <name> (alias was p) precondition when the NPC wasn't scheduled to be there yet. 
This definitely sounds doable, though the implementation depends on a more detailed description of what you're trying to accomplish
"2160420/f Sebastian 2500/t 600 2400/e 384882/w rainy/G PLAYER_NPC_RELATIONSHIP Current Sebastian Dating/n 21604Edit_10_H": "echos/-1000 -1000/Sebastian 6 24 0 Robin 8 18 2 farmer 1000 1000 0/changeToTemporaryMap ScienceHouse/skippable/viewport 6 20 true/pause 1000/move Sebastian 0 -4 3/move Sebastian -1 0 0 Robin -1 0 3/move Sebastian 0 -2 1/pause 200/speak Sebastian \"Dialogue.\" /pause 500/emote Sebastian 40/end warpout"
I've done other events like this (triggering in one location, loading in another) in Sam's house and it worked fine, so I'm unsure what's different here.
I'll remember to give you a poke about it once I've read some more docs and solidified my basic understanding of Content Patcher and Stardew Valley itself
oh I meant doing it with c#. it may be possible with content patcher but it will probably be a lot harder
Is it possible to mix C# and Content Patcher?
yes and no. You can't make a single mod that is both c# and cp, however
- anything you can do with CP you can also do with c#
- you can make a separate c# and cp mod, and package them together as a single zip.
both techniques are commonly used
are there any errors in your log when running the event?
I'm taking an existing Content Patcher mod and updating it for the current version. I don't think I'd want to meddle too hard with making a second mod or converting the whole thing to C#, though it might be worth looking into anyways
how did it do it previously?
nope, I have smapi on another screen as it plays and nothing comes up (or do I need to extract a log?)
Shouldn't need to extract a log if nothing red comes up during the event.
apologies I am fairly new to event coding@
Every vanilla example of a changeToTemporaryMap in an event shows warping the farmer and NPCs after it happens, but I'm not 100% sure on if that is required or if it just has to do with the positioning not being the same on both maps so it's just being used to realign the NPCs somewhere that makes sense.
I could certainly add a warp for each NPC and see what happens!
It did not. This is a fully new thing that I'm hoping to add, eventually, maybe. Honestly, this is a very low stakes thing at the moment, but I'd like to know in case I decide to implenent this mechanic
aaaaah makes sense
adding warps worked! All is well. Thanks for the help!
Awesome!
Is it possible to read the config of other mods? I don't want to change anything in their config, I just want to be able to read their config so that if theres a setting that drastically changes something I can account for that?
not without a dependency called Cross-Mod Compatibility Tokens (CMCT) which adds content patcher tokens to do so
well gus the crop file all the crops are in it all their sprite how do i recolor just one sprite and refrence it
Gotcha okay, do both mods have to have that as a dependancy or just my mod that reads the others config
just your mod
Oh that's good to know
if youโre trying to recolor a vanilla sprite, you would do an EditImage patch with the coordinates and height/width of the sprite you want to replace in pixels
while working on my mod, I just learned that the ID for Leo's Song is sad_kid ๐ฆ
I still need to finish my mod but I haven't touched it in a long time
Having very little experience coding and trying to learn c# is hard
i heard recoloring is easier
That is a somewhat confusing statement, because recoloring just one piece of a sprite sheet involves doing an editimage patch with the coordinates and height/width so it knows what part of the image to replace
I'm not sure how to word this but is there a way to remove part of the map overlay I put on a vanilla map without removing the vanilla map underneith? or is it better to split it into 2 tmx files and just not load the one that conflicts with another mod?
you donโt have to split the tmx, you can just define two different rectangles in your EditMap patch and make on conditional on HasMod being false
clarification: have two different patches with different rectangles, i didnโt word that clearly
I completely forgot I could define the area that's applied, it's even in the json just commented out, thank you for the reminder
Hi, so I'm trying to patch performLightningUpdate of Utility with harmony to obtain additional locations and not just the farm, mostly to allow lightning rods generate batteries outside farm, and its working without issues now, the only detail is that I wan't to recreate the lightning thunder effect and this is not working correctly in multiplayer split-screen:
if (Game1.player.currentLocation == location)
{
Game1.flashAlpha = (float)(0.5 + Game1.random.NextDouble());
Game1.playSound("thunder");
}
Game1.player is always obtaining the host player instead of the actual player, I guess cause this method only runs on host, so I was wondering, is there a way to check is there is an active player in the location, so no need to use Game1.player ? or obtain a second player with another method?
Game1.player will never grab only the host player. it will always grab the local player
generics are confusing as hell
but it is grabbing only host :(
no, something else must be wrong with your code. Game1.player is always the local player. no ifs ands or buts about it
yeah, thats why Im tryting to replicate the effect just with the flash and playsound, no need to access lightingStrikeEvent, as I said the generation of batteries is working fine, its only the visual and audio I want to replicate if another player is in the location of the lightning rod
Utility.performLightningUpdate is only called in mastergame (host player)
yeah I guessed it was because of that that Game1.player is always the host, so theres no way to check if there is an active player in the additional location?
out of curiosity how did you implement this? asking because I will be interested with compatibility with Machine Terrain Framework (which adds custom lightning rods), and as well as Safe Lightning (not my mod, but also one you may want to take into account)
(MTF used to transpile performLightningUpdate, but switched to a conditionally skipping prefix so it can beat out Safe Lightning's own unconditionally skipping/reimplementing prefix)
prefixing performLightningUpdate, just overriding the original behavior so instead of just checking the farm, checks for all my other custom locations
List<(GameLocation location, Vector2 tile)> lightningRods = new();
List<GameLocation> locationsToCheck = new List<GameLocation>
{
Game1.getFarm(),
Game1.getLocationFromName("Custom_MPF_Wilderness"),
Game1.getLocationFromName("Custom_MPF_Forest"),
Game1.getLocationFromName("Custom_MPF_Beach"),
Game1.getLocationFromName("Custom_MPF_Riverland"),
Game1.getLocationFromName("Custom_MPF_Meadowlands"),
Game1.getLocationFromName("Custom_MPF_Hilltop")
};
foreach (GameLocation location in locationsToCheck)
{
if (location == null)
continue;
foreach (KeyValuePair<Vector2, StardewValley.Object> pair in location.Objects.Pairs)
{
if (pair.Value?.QualifiedItemId == "(BC)9")
{
lightningRods.Add((location, pair.Key));
}
}
}
is it also an unconditionally skipping prefix 
you guys sometimes forget something about coding i do alot
if so your mod won't be compatible with Safe Lightning; whoever has their skipping prefix runs first wins
(it can be somewhat compatible with MTF, as long as MTF's prefix runs first. 'somewhat' because custom rods won't work outside of the farm without further changes on my end)
a function only running on host is different from Game1.player being the host. Game1.player is, again, always the local player
you can check Game1.getAllFarmers or whatever its called
if you want the other players
yeah I know, I just didn't know how to explain this, english is not my main language :(
thats understandable, i just stress it is bc its a very important difference that could have significant impact on your code if misunderstood
also that code wont work on farmhands anyway as non-alwaysactive locations dont have stable references
they wanted to know if they could check if a player was in another location, so if the farmhand is in the location then it should be fine
i would think
if they are in it at the time, yes, but the other calls to getLocation iirc will return shadow realm locations not null
Yeah, for the moment in the mod I have this :p
if (this.Config.Lightning_Rod == true)
{
harmony.Patch(
original: AccessTools.Method(typeof(Utility), "performLightningUpdate"),
prefix: new HarmonyMethod(typeof(performLightningUpdate_Patch), nameof(performLightningUpdate_Patch.Prefix))
);
}
First I want the mod working, then I will work towards making if efficient and adding compatibility patches
The way that other locations work in farmhand MP is a little wonky I think? Like I think when you run โdebug whereis Pamโ or whatever itโs only 100% true on host
If thatโs the shadow realm stuff
it would also be 100% true if the farmhand was in the same location as Pam or the location was AlwaysActive
unless thats what you meant by 100%
Ah yeah, I meant that on farmhand it is sometimes reliable and sometimes not
i wasnt sure if you meant "100% of the time" or "its like 90% as in itll say correct location but not coords"
I donโt remember offhand which locations are alwaysactive and my current game Iโm host, so i didnโt remember exactly how reliable
the only ones you can 100% guarantee will be are places that Cabins can be built anyway
and even then, a mod might fuck that up
Working perfectly with this now, thank you
if (location is Farm f)
{
f.lightningStrikeEvent.Fire(lightningStrikeEvent);
}
else if (Game1.getAllFarmers().Any(p => p.currentLocation == location))
{
Game1.flashAlpha = (float)(0.5 + Game1.random.NextDouble());
Game1.playSound("thunder");
}
It was working without this checks but It was annoying to hear the thunders when you were on mines or any other place outside the farm haha
and yeah, all the locations are AlwaysActive, i haven't had much trouble for now and this mod has been already up for quite a long time, I'm just doing some final retouches so all the additional locations work almost the same as the main farm
Is there a command to regenerate terrain features from/using the paths layer?
!rtf - like this, or something else?
Reset Terrain Features (https://smapi.io/mods/#Reset_Terrain_Features) is a mod that lets you reset, clear, or generate everything that spawns on a map using an in-game menu. That's especially useful when changing maps mid-save, as the debris will otherwise use the old layout (causing things like trees in the water or bushes blocking exits).
I'd prefer a command if that's possible, I just want to regenerate the bushes to make sure I've removed all the neccesary tiles on the Paths layer so I dont have bush growing out of the stone, it's not going to be a dependancy for the mod or anything, just for testing purposes
Oh wait no hang on that is what I'm looking for
I thought it was an action for the json files but nope, thank you!

Unfortunately the unofficial update crashes my game on save load no error in the log either, it just ends.
Is there another way to regen bushes?
there's an action for it in BETAS i believe
I don't really want to add it to my mod, I just want a one off regen bushes to make sure I removed the right Paths tiles
can you not load a new save to see?
yes I can, I didn't think of that, I blame tiredness for that blunder, sorry 
no worries
Does the mod id automatically get prefixed to any custom items, or are their IDs just what I set them as. I think I confused myself
yes, they are what you set them ass
you need to add {{ModId}} yourself
ok now I'm not gonna correct that typo 
good 
Thank you! Tbh no modid prefix is what i want so this works out well
why not ๐คจ
I want two different mods of mine to be able to spawn the same item basically
And i do have a prefix on all my items its just not modid
cornnucopia style I suppose
(BETAS has one for destroying, but not regenerating)
Pretty much
i wouldnt exactly call cornucopia a role model in this regard
oh thanks for correcting me! 
asset stuff for sourcegen is done! Features:
- invalidation and lazy-loading
- if INotifyPropertyChanged is implemented, will notify when an asset property is invalidated
- loading from local file
- including entries in dictionaries/lists from local file (w/ automatic prefixing for keys)
- use methods for loads/edits
- export translations to strings file
asset names starting with/are automatically prefixed withMods/MOD_ID/
@lucid iron your prayers will be answered (ignore the bugs)
(I will not do anything beyond pulling up this convenient fake shop menu, if you still want a LB-style overhaul and stare down the wacky farm warping code you're free to go ahead)
possibly newb question: what draw event do I use for stuff to appear above the active menu but still below the cursor
cursor is usually drawn by the active menu, so I don't think that's possible
may need to resort to menu replacement or harmony
harmony it is (that button's already 50% harmony anyway)
Just draw on top of the cursor and then re-draw it when you're done.
(Preferably by calling Game1.drawMouseCursor, and not by copying the draw code out of it like a certain quite popular UI mod does)
I ran StardewXnbHack, but it's not giving me the cursors folder for some reason.
I need it for a specific sprite.
I ran it twice just to make sure, and it still didn't.
I am on Steam Deck btw (I use a dock connected to a TV and Keyboard + Mouse so I can use it as a PC)



