#making-mods-general
1 messages · Page 440 of 1
the article hasnt really helped
all i know is it puts shit in the game
but like how do i make it do rhat
Hello everyone - I am working on a performance patch for my mod and trying to get rid of OnTimeChange stuff as much as possible. There are some NPC outfit changes handled this way, but switching to the appearance system doesn't seem to be working correctly. I have this entry in the appearance list: { "Id": "ProstheticBeach", "Portrait":"Portraits/{{Russell}}_ProstheticBeach", "Sprite":"Characters/{{Russell}}_ProstheticBeach", "Condition": "TIME 1810 1850, LOCATION_NAME Here sdvhead.LawAndOrderSV_AboveJail, DAY_OF_WEEK Monday Tuesday Wednesday Thursday Saturday Sunday,PLAYER_HAS_SEEN_EVENT Any 239791004", "Precedence":6, },
and when I send the condition as a debug command to test the conditions they all resolve true, but the outfit change doesn't happen. Anyone thoughts as to why?
did they arrive at that location between 1810 and 1850?
try switching LOCATION_NAME Here to LOCATION_NAME Target
Here = check the farmer's location, meaning if the farmer wasn't at the beach when Russell enters the beach he won't switch into the beach outfit
They didn't, I take it appearance changes can't happen in a location after they've already arrived?
Basically all modding uses Content Patcher. If you are reading it in an article like Event Data, it is telling you how to do stuff using Content Patcher.
no. they only change appearance when they change locations
if it's not C# anyway
(the Here/Target thing is also important ofc)
OK thank you, in that case I will probably have to keep the time change approach but I will have a mod option to get rid of it and just not have the outfit change
but where do i "edit" these in
do i use notepad and put it in the same file?
where does content patcher even go?
okay, so a quick explanation of how Content Patcher mods work:
- your manifest.json tells SMAPI that your mod uses Content Patcher as a framework (which means you can use JSON to write your content changes in content.json)
- in your content.json, you set the Format to the version number of Content Patcher you want the user to run while using your mod (usually the latest version)
- After that, while still in content.json, you list the Changes you want your mod to make, which is in the form of JSON objects (
{ }blocks) with Actions and Targets in them that tells the mod what data assets or art assets to change, and either entries/fields or FromFile field that tells which asset to use in your mod folder. For more details, you can check out the Getting Started with Content Patcher page.
when you say article, are you referring to a wiki page, or the Content Patcher documentation that the wiki page links you to?
wiki page
Content Patcher is a mod that goes in your Mods folder.
i see
have you read the CP documentation itself?
i put it there out of intuition but
!gs
If you would like a guide to setting up mods for Stardew Valley, check out the getting started guide! https://stardewvalleywiki.com/Modding:Player_Guide
ah, this one: https://github.com/Pathoschild/StardewMods/blob/stable/ContentPatcher/docs/author-guide.md
Sorry, I had to go digging for the link.
ok what does it mean by "content packs"
A content pack is a mod made to use another mod (in this case, Content Patcher!) as a framework.
ah ok
so my NPC mod is a mod
not a content pack
so I can make all of the sprites and everything
ok let me give context
A "CP Mod" or "a mod that relies on CP to run" is the same thing as a Content Pack in this case.
I'm using MissCoriel's NPC Creator for this
that is outdated
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!
She told me that I can use a new alpha version she's still making for disposition and data and slot it in
everything else works fine for 1.6
either way, your mod is a content pack
MissCoriel's will still spit out the content for use in a CP mod / content pack, IIRC.
ok
i make mod
dialogue
sprites
data
everything correct
the way I would add it is by using content patcher?
or do i just drop it in the SMAPI mods folder
You install Content Patcher in your Mods folder, and then you create your own folder in the Mods folder for your NPC mod. The manifest.json in YOUR mod will tell it to use Content Patcher, so you don't need to touch the Content Patcher folder at all once you move it to the Mods folder.
ok
so i have Content patcher in the mods folder alr
so i would literally just need to drop the complete mod in
and we good?
Assuming your complete mod is in a folder and contains both a manifest.json and content.json file with your code, you should be good.
Nice
I just wanted to plan ahead
rn I'm looking at all of her dialogue/events and seeing what sprites i need
once I've done that I'm moving onto mapping her house and an area behind the backwoods for it (yes i know she cant go in the backwoods she will use instant transmission)
and then I will make her schedule
Also don't be afraid to look at pre-existing NPC mods if you want to see how they work. Quite a lot of them are for Content Patcher or use Content Patcher to add/edit the art and data (dialogue, schedule, Data/Characters entry) assets.
thanks guys
after this if im correct i should be done and just need to do the manifest and jsons and slot it in
i think
If you try to run your mod and you get errors in the SMAPI console window or your NPC decides to not talk or something, feel free to ask for help to figure out if you missed something!
what sheet are the numbers used for your gold amount located?
probably cursors
hmm, not seeing it
isnt it these?
there are some white ones that look similar, but the oneson my recolro are red and ive eliminated it from all traces of the tilesheet
yet it still shows
what backwater mod that has no relevance to cursors is editing cursors
i think the red tint is added in code somehow
cursed
as in base game code
yeah
the uh, ui here that im trying to switch to seems to be done sloppy in some areas. things not patching like they should and still showing the old stuff underneath
vanilla events or modded events?
vanilla
I want my NPC's 4 heart event to require 2 hearts with haley
and i cant see a "has hearts with this NPC" on there
on... where?
misscoriel's NPC creator
all conditions
and I need an ID for it before i pick any
its called “friendship points” not hearts
oh
ohhhh
yeah mb
lemme see if it works for other NPCs
i was planning on requiring the farmer to see haley's 2 heart event
oh yup it works
anyway if you need vanilla event ids go to the Data/Events folder, then find the file for the location the event takes place in. then look through the list of events til you find the one you need
!unpack Because you probably haven't done this yet
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 actually have
should i just type some random ass number for the id
like 1225 or smth
no
make it a string that has your mod id at the front
Your event should use a string key instead of an integer, for best practices, AND use your Mod ID at the start of it.
(number ids are bad because it is very bad for compatibility with other mods)
the integer keys (numbers) are the old format, and run the risk of being overwritten or overwriting other mod's events
how do i check mod ids?
ah i see
yes
ahhh ok
The UniqueID you set in the manifest.json is the ModId.
Content Patcher has some special tokens (the things in the {{ }} brackets), like {{ModId}} that will autofill your mod's unique ID from the manifest file where tokens are allowed.
yh.wife
you dont need the number at all
im making heart events though
wouldnt it need to be unique
or like yhwife1
yhwife2
etc
you could actually just do something like yh.wife.2Hearts
since string keys (text) are allowed
ah ok
yeah ideally the name is somewhat descriptive
unless the NPC creator d oes not allow strings
hold on
which it may not if the only thing that has changed in the beta is the disposition
it says "numeric id (main event)"
and if i do a named id it wont allow me to add conditions
this is one of the major ways it is outdated
This might come down to MissCoriel's NPC Creator not being updated enough yet.
should i use someone elses?
there is no other creator
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!
the recommended approach is to use the guide fireredlily linked you to earlier to create your own
i meant tiakall
the guide in that command yes
You just may benefit from using the guide to make the events separately.
its a guide but not a creator
You don't have to do everything through the creator or through the guide. 😛
CP mods are JSON
you dont need C# to make events or an NPC
nothing involved here is C#
am coding noob
one day I'll progress on my debugger mod to the point it can make developing content patcher content packs more user friendly, but my tools would only properly work when given already valid json
if you know Python, you can learn json
Most of the pages on the modding namespace on the official wiki have content patcher code snippets using JSON that can help you out.
i'll learn json then
(i am not a coder at all and have made a dozen mods with JSON)
json is just a data format. its not even a programming language
Python dictionaries/arrays are almost 1:1 json, except lowercase true/false instead
so its just
if friendship = 500 AND time >= 1800 AND time <= 2000...
made the variables up
no, look at how to format event preconditions in the page you were just linked
ok
v2:
yh.wife_yh.wife.2hearts/Time 1800 2000/Friendship Wife 500
im using wife here bc i dont wanna leak her name
example code:
"Target":"Data/Events/Forest", //this tells it to add the entries to the forest events
"Entries": {
"yh.wife.2Hearts/preconditions go here": "your event script commands go here separate"
}
}```
ok v3
but this would be preconditions?
for example
im just adding the number for fun
{{ModId}} will fill in yh.wife when the mod runs, so you can use yh.wife OR {{ModId}} there.
{{yh.wife}} does nothing, because it's not a token.
i see
better?
your event key (the first part) is still a bit of a mess, but the preconditions look good.
so python
json
yeah that does not look that much different
and I'm assuming this all goes in notepad?
in your content.json, using whichever editor you are using.
@golden basin
(ignore the boosted yield I was testing something lol)
ok
line doesnt matter i assume as long as its seperate
I use Visual Studio Code, but my first three mods were all done in basic Notepad. xD
If you have multiple code blocks, you will need commas after the closing } for each
ok so
What are you showing me?
animal harvesting crops
Oooh I was curious about glowing crops
I think cyro was interested in harvesting from animals
!json this will prove invaluable to you on your journey to making valid JSON code. It will look for errors in the syntax.
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.
ty bro
oh that's a different thing from the mod I'm (not) working on
but yeah animals can pick crops now in next version of EAC
so its json time!
i only made portraits anyway so
and also the miss coriel thing made a really yummy format for my files
probably could have done a better demonstration video that doesn't involve me running away from the void chicken so it harvests crops instead of attacking me
OOOOOOH THAT REQUEST I didn't think you'd it omgosh think you
side note, but next version will allow MEEP animals to hit you as well
(the cause was that I had a check that prevented homeless animals from attacking)
stop making features that I can easily integrate in my Zelda mod or I'll never finish
here is what my assets folder looks like right now
every folder is empty
except for img which has some templates
theres also contetn and manifest.json outside the assests folder
I love you Selph, if I end up making an aggressive variant of Cucco I will let you know. xD
lmfao
I'm assuming every folder here needs a json
or several
dialogue.json for example
Nope, you actually don't have to split up your JSON files at all, they can go into content.json
so i dont need any of this
People just like to split them up if they get big to make it easier to find the specific code they want to change.
Need, no, but sorting is useful
you can organize it however u wanna
ok so its fine to have like this
yes
Just make sure you include any separate JSONs you use
It's personal preference on whether or not you have separate JSON files, just make sure that only the content.json file has the "Format" line and that the others are set up as Include files.
And never do an "Action":"Load" with a JSON file with tokens in it (like {{ModId}}) as your FromFile, or the tokens will not work.
this has dwarf-fortress-patch-notes energy
ok wait so for example
There's one other json file that you'll probably want to include, it's called a blank JSON
anim.json (include)
dialogue.json (include)
delete this folder
events.json (include)
festivals.json (include)
all of my sprites and art for mod
schedules.json (include)
outside of assets:
content.json (format)
manifest.json (format)
A blank JSON is a json file (usually named blank.json) that just has { } in it and nothing else. We use them a lot to 'create' the base JSON file for things like schedule or dialogues, so you can use EditData actions on the same Target later to use tokens.
You only need one blank.json, and you can just Load it to multiple Targets with one bit of code.
i see
I think there's a tab in my google sheet NPC creator that explains them.
I vaguely remember adding that.
saved lmao
thanks
so when i duplicate it
contentpatcher goes "hey this files cool give it tokens"
i think
not sure what you mean by "duplicate" ?
but this is why my Google sheet thing calls for blank.json:
nah, if anything, content.json is your base and you just remove the "Format" part on everything else.
oh ok
that link I sent earlier should have had an example Content Pack content.json format in it?
Oh hell yes undebatable monsters !
so content.json will look like this
uhhh ill look after i give my example that will 100% be wrong
LOL ok
(also feel free to throw your code into that JSON validator and send the link in the green box!)
we can read it that way
!json this one
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.
include dialogue.json
include anim.json
include this.json
include that.json
...so do i look at the thingy
yep lmfao
there's the example I was looking for.
i see
so wait question when will it be released im so ready to use the harvesting feature
"Format": "2.8.0",
"Changes": [
{
"Action": "Load",
"Target": "wife/img",
"FromFile": "img/spritesV3.png"
},
{
"Action": "Load",
"Target": "assets/dialogue",
"FromFile": "dialogue.json"
},
]
}```
this is what it would look like
yah rip
personally if I was going to do a content mod via cp, I would start with just manifest.json, content.json and blank.json with maybe an assets folder and thats it.
I wouldnt go further until it actually organically grew large enough to need to be split
i am an organization freak
all of SVE until relatively recently was a monolithic content.json
I personally find that keeping all the various edits separated from each other to actively inhibit understanding
some time this weekend; I’ll ping you when it’s out
if I was going to split things up, it would be entirely on semantic units, not on what asset was being edited
i both see and not see
so a "Abigail" file rather than it being scattered across a Characters file ,Dialogue file,Events file, etc
Yeah, I'm gonna end up reorganizing my JSON files for the Zelda mod because it's gotten huge and touches a lot of data assets, but most of the separation is based on config options.
yaaaaasss
i like to group things that are gated by the same content patcher When condition(s) into a file, so i don't have to repeat the conditions
I have like 2000 lines in one subjson already with new object data formats 🙈
me when funny words
Except I will have to split up the event changes so I can mass invalidate them all if/when we get an event refactor xD
+1 for splitting by topic and not asset
i gosh i know the feeling of having huge mods
even that, I would keep the object and its recipe together, the recipe is part of the object
my animal mod is 23,000 something characters at this point
Might do some when conditions later I’ve been too lazy to implement
the default json i mean
There’s so many objects tho, that file is so long
I have one JSON that is adding objects, where those objects are sold, and the gift taste reactions to those objects.
all together.
Idk the way I split makes sense to me but i definitely don’t think it’s the one true way
Gift tastes are probably going somewhere else because I have to edit by person
Which is super effin’ annoying
I desperately need food, I just looked at the clock and I meant to get dinner 2 hours ago. Will bbl.
{
"LogName": "Dialogue",
"Action": "Load",
"Target": "Characters/Dialogue/Wife",
"FromFile": "assets/dialogue/Dialogue.json"
},
example
bbl?????????
i'm also fond of saying that your organization (or comments, or other meta stuff about your mod) is for three people, in this order:
- you now
- you in the future
- others
so do what works for you and don't follow advice that doesn't work for you
Be back later
oh
this mod is just for me
i dont want other people to have my wife in their game -_-
I need to write more event for my wayfarer mod but im sjghsdjgdfsgdf yall ever just get really bad writers block but have lots of ideas?
Hilariously I tell my students it’s for them if they get amnesia; but secretly it’s also for me
like ideas are there but writing is not
i didn't mean you have to publish it; that's just the priority order
YOURE A TEACHER???
oh
the only other person that will download this is my friend MAYBE for multiplayer
YES
and they go for krobus anyway
(if you have it installed and you want to do multiplayer, they will need it)
yeah
thats why
once i mod my wife in i was thinking of making a fun gang mod
kris sussy ralsi
its 3am...
i think i should try to sleep
gn chat
can someone help me think?
my frog tank technically doesnt count as the pet itself as this one gets spawned somewhere out of bounds in the limbus, but it registers the interaction as waspet and petbowlwatered
now if I want to make it be able to receive a gift (bug meat and beans) would it be the easier way for me to make it act like A) an npc B) a machine? C) a horse (carrot/apple)
I do want to look into finding ways to doing 'inline' includes for CP, or let tokens be capable of storing more than effectively text and spread into the entry
ugh now junimo text comes out to bite me. why must font_bold and its handling be so cursed
I feel like that depends on how you want the gifting to behave?
Hey guys, why would my Monday dialogue be taking precedence over my intro dialogue?
Local tokens can help
This is a reference example of a before https://smapi.io/json/content-patcher/9bbec3b7d65d45268d498121ed1f0d10
and after https://smapi.io/json/content-patcher/a2d019fec3c84978b3b4f623dc98f338 which shrinks it by 33%
along with the template https://smapi.io/json/content-patcher/0690d5fa08ef40ef93a4b338153f0815
though does print a bunch of annoying errors for the cases where the optional tokens aren't provided, and CP doesn't have a mechanism to let a when block guard for an inherited token existing it like it can with hasmod
I think if they were explicitly populated with some known invalid value, a when could have guarded for it in a when block, but ah well
are you testing on an existing save
does your NPC have gift tastes set up?
Not yet
i think if they're missing, your NPC can't respond to CTs
one of the strange quirks of NPC interaction, if memory serves
Okay I'll try that, I had to write it anyway. Thanks ichor
i hope that's what it is, lol
hmm, maybe next time or for other parts I'll look into this. i heard about local tokens but never learned how to use them. For now, I'm actually done with all the objects 😅 so it's functionally way more work lol. I used copy/paste and a lot of autocomplete so it was surprisingly painless to do a few thousand lines.
I also used regex in Sublime to make the i18n portion less painful
I just copy/pasted my LocalizedText stuff to get all the keys
"HasToken" PR is added to my todo list, because making local tokens and templating more powerful I think is important.
I also am not a big fan of copy paste as a method of reusability
yeah it's very much "what's done is done" in this case and not really "ah yes i loved that and 10/10 would recommend"
I missed a few first go-around and had to check with CJB items
either misspellings, my own inconsistencies, or copy/paste errors
The main problem holding back local tokens, is relatively few mods use it, and people learn to make new mods by referencing the old mods that didn't use it. and by the time they might hear about local tokens, they either dismiss it as "too late" or kneejerk it as "something to learn too hard nope"
yeah, i can def see that
Hey ichor it worked! Thanks!
for me it was more of "eh, i could def learn it, but...lazy"
and i am fully cribbing off my own old notes
aka my previous mods
same thing with "dispositions" still being the defacto name for a folder for npcs despite the term being dead since 1.6 came out
can I add portrait commands directly to i18n/default.json?
like "msg": "croak$2"?
Yup
yipeppee
Where possible it's best to avoid using dialogue commands inside the i18n in case your translators translate it, but portrait commands are definitely ok and sometimes even with other commands the risk of accidental translation is still better than the alternative (like splitting up your text into many tiny i18n lines, which is both annoying and might interfere with other languages' grammar)
thanks! currently they are very simple, but now I can add a winking frog or frog with tophat to the portraits!!
Meanwhile at work I'm annoyed my toolchain changed again
What is this maestro and do i have to use it
sorry for my random monologues here, but I am so hecking excited that I got to give the the frog a gift taste!!!
he likes cookies!
@brave fable Would it be cool if I add some additional alt recipes for LoC seasonings using cornucopia ingredients? from what i see, looks like you intend for simple seasoning to be available early on, while super seasoning is available after reaching GI
I associate Maestro with the mastercard debit card branding https://en.wikipedia.org/wiki/Maestro_(debit_card)
I completely forgot where it is we are supposed to share our mods when we release new ones, because it has been about a year since my last one. Could someone point me in the right direction?
time to learn event modding for the first time 
in here or #modded-stardew , and as long as it's not NSFW or AI a user with the mod author role can send it to #mod-showcase for you
Thank you!
I've returned from a break to start creating again, in my slow way. I've published my Silo version just last night for anyone that likes Japanese architecture.
https://www.nexusmods.com/stardewvalley/mods/27097
(would you like me to showcase it?)
Please and thank you ^-^
okay this sucks does anyone want to take a commission to code some events that already have full scripts 🤦
Unfortunately since events suck no :(((
Yeah they do suck
how many and how complicated?
I did actually think about it if it makes you feel better, except if it was like one event I’d just do it for you
should I add a link to that on the Updated Seasonal Japanese Buildings mod page?
I wrote a python script once to help me event
what do you have in mind 📝 the idea behind the current recipes was to mix forage with cheap crops so you get a balanced but almost guaranteed amount
five and i dont think its super complicated but I can show you the scripts
Because I just CANNOT with the slash delimited
I wanted line breaks without my jsons screaming
And no accidental extra spaces
sure!
You can have the python script if you want though it literally just does the final smush after everything is written out on different lines
i don't mind events except for when i do something stupid and can't figure it out
Actually i think it’s in fireworks festival
Free for anyone to look at
If it’s not and anyone wants it, ping me and I’ll hit GitHub with a stick for a sec
I wrote down these ideas real quick--all of them are forage mixed with a crop or tree (or artisan good derived from)
i just turned off any error highlighting in my program, but the problem is if I try and do these events while learning how to writ eevents I can see this mod being delayed for another three weeks
And I'm already going insane being the only person working on it
Eminently reasonable
I need it out
I am on the “no release” release schedule
But I do understand the lure of the “sometime soon please let it end” release schedule
see the mod has been "coming soon" for a year and a half
I think I once released a pride mod a full year of June after I started it
My current mod has been in development since I think like 2021 but it’s never made it to “coming soon”
hey everyone ❤️
4 ingredients for a seasoning might be excessive given it's only a gold star bonus, likewise a truffle is just worth so much i'm not sure if people would use it. i do like the theming of the others though without knowing the relative value propositions
Parsley, sage, rosemary, and thyme? 😛
I'll think over it, i didnt want to make it too easy since your seasoning included ginger
but its a good point
is ginger really that hard to come by
i didn't think it was so scarce and it's not got many uses, i suppose the luck drink buff makes it fairly high value
hmmb
I think its easy, but I was seeing it as more of a "quite late game item" rather than "abundant and cheap forage"
so it was a matter of perspective
teebs the achievement unlock condition is probably even further lategame than either garlic or ginger
for making qi seasoning I'm not sure if anything would be appropriate, but I think being able to craft it would be more fun than just buying it, right?
Ahhh okay
thats good to know
since simple seasoning is cook 10 recipes and super seasoning is cook 25 recipes
that's a lotta recipes
but that's just how the base game goes, and at least with enough fluff recipes it's easier to come by
yeah with cornucopia recipes it would likely come sooner
most of my low-level cooking recipes are fairly accessible, 2 ingredients each that're pretty easy to come by, but i feel like most modded recipes i see have so many ingredients lol
they're all trying to avoid the chocolate cake / eggplant parmesan problem
i choose to call it the chocolate cake convenience
recipes can be whatever you want, players don't care that it's vaguely inaccurate, it's a video game cake. what's irritating is having to find 5 ingredients per food when you've only got maybe 32 slots in your fridge
pasta doesn't exist. chocolate is fake. follow your heart
i agree (you have no idea how many recipes I put on the chopping block because of Mizu's love for realistic ingredient usage)
I made an 8 ingredient recipe recently and I admit it could be a crime
I try to stick to 3 or less but sometimes my heart tells me more
I'm scared
Loooook 8 is a significant number is my defense
fortunately 6 of them are butter
It’s Buddha’s delight so it’s all vegetables lol
I could do “I can’t believe it’s not butter, mostly because it’s alllll butter”
I have a butter to contribute to the cause
Maybe I’ll remove some ingredients next pass through the list
if the love of cooking wasn't popular i would've added another butter and maybe le fishe au chocolat
Apparently the real dish uses between 10 and 35 ingredients
Is le fishe au chocolat actually fish and chocolate?
You could make a standalone mod and call it “LoC DLC pack”
nexus moderators squinting
“LoC odds and ends”
“Blueberry’s favorite recipes”
“This didn’t fit into LoC but you can have it anyways”
Do titles have character limits?
how can I use a custom mod provided cp token (that is either false or true) as a condition/gsq check? "Condition": "{{HasMod |contains=camiska.FrogTankFrogEgg/HasNamedFrogTankForCurrentPlayer}, PLAYER_HEARTS Current Sebastian 2}"?
would that be correct?
well first, you did weird stuff with the curly braces in here
like, that's not valid token syntax
ah I tried to mimic this
well, don't split the closing brackets then
I don't know much about GSQ, but maybe "{{token stuff}}, gsq stuff" could work
thanks, I will try this!
I am also unsure about the HasMod and if that is the correct argument for the check
hold on, is this in the camiska.FrogTankFrogEgg mod? You need a special mod to access another mod's tokens
that's for sure
even if it provides the cp token publicly and it is listed as a dependency?
pretty sure, yeah. Do you need to make these two separate mods?
so far doing it like this in my cp part of my mod
"LogName": "Include objects - tadpole doesn't count towards completion'",
"Action": "Include",
"FromFile": "data/objects.json",
"When": {
"HasMod |contains=camiska.FrogTankFrogEgg": true,
"camiska.FrogTankFrogEgg/CfgTadpoleCountsForFishing": "false"
}```
has worked fine, but I am sadly still so confused about conditions/gsq syntax in CP
bring back the carrot
mhm, I mean I could also either send the mail directly via my smapi mod and skip the cp part but I would need to read into how to do that
or I could try making a custom query in my smapi mod and check for this in my cp part of the mod, but I did only find very little info on how to actually do that
hmmmm, so your tokens are defined in a C# mod, is this correct?
yes!
and you want to do some simpler stuff based on them from CP?
exactly!
I never registered CP tokens with C#, but I feel like there's a way to make them accessible by any mod then. Just don't know how it works, or if this is what you already did
if you did/do that, anything CP when and gsq you shared should work
it's fine so long as it's a dependency or condition:
https://github.com/Pathoschild/StardewMods/blob/develop/ContentPatcher/docs/author-guide/tokens.md#mod-provided-tokens
using it with when and adding the "HasMod |contains=camiska.FrogTankFrogEgg": true, before checking for the token has worked so far
ohh blueberry, can you tell if this is a valid condition? "Condition": "{{HasMod |contains=camiska.FrogTankFrogEgg/HasNamedFrogTankForCurrentPlayer}}, PLAYER_HEARTS Current Sebastian 2", ? or do i need to do something with hasvalueat?
I think there's a cp token condition to have it work, something like "{{And {{HasMod...}},{{custom token}} }}, gsq stuff" could work
cuz that "HasMod |contains=token" doesn't seem rigth to me
oh yeah, there's an example for this exact case
I looked at that,but this has some kind of additional argument which confused me
do I need to explicitly state the value of that token is true?
do that:
"Entries": {
"Universal_Love": "74 446 797 373 {{spacechase0.jsonAssets/ObjectId:item name}}",
},
"When": {
"HasMod": "spacechase0.jsonAssets"
}
but with your mod id, token, and specific data edit obv
your token will resolve to either true or false, and and the Condition field will read that the overall logical resolution is true or false also
can't do words today. tired
but I need it for the trigger action which is a condition and doesnt accept a when
while Condition is generally a gamestatequery field, true and false are valid queries, and your token will resolve to those
obviously affecting the logical resolution/condition value
"Condition": "{{camiska.FrogTankFrogEgg/HasNamedFrogTankForCurrentPlayer}}, PLAYER_HEARTS Current Sebastian 2",
I will try this and report
thank you so much with your patience with me!
patience implies i am currently capable of impatience. i am not
"Entries/Fields": {
// otherstuff I assume
"Condition": "{{camiska.FrogTankFrogEgg/HasNamedFrogTankForCurrentPlayer}}, PLAYER_HEARTS Current Sebastian 2",
},
"When": {
"HasMod": "camiska.FrogTankFrogEgg"
}
this should work
it won't 
still won't 
damn
ah you wrote entries/fields yourself, not copied from the example
yup, since I don't know which one camiska is using
https://smapi.io/json/none/27594c2ab3ba4695a882c6c42ae473ad
here is my json now
keep in mind the speed at which tokens update, though
if the value of that token on the C# side switches from false to true during the day, it wont be ready when the day ends unless you change the update rate
(also you said your mod has a dependency on the C# mod providing the token right? you dont need the When condition)
yippee!! thanks
custom Content Patcher tokens are automatically and always accessible by any mod, so long as Content Patcher can guarantee that the CP mod in question wont try to access that token when that mod does not exist. hence, if you are dependent on the C# mod in your manifest, you can use the tokens anywhere in your mod. if you gate it behind a HasMod condition, you can use it in that patch. both of these guarantee that the token will only be checked when the C# mod that added it exists.
what you were thinking of is Cross-Mod Compatibility Tokens, which lets CP mods look at another CP mod's dynamic tokens
(as well as config tokens... kind of. practically speaking)
yeah, I got that by skimming the doc linked before
I assumed it was a soft dependency at first since they used HasMod, but yeah, it makes more sense that it's an actual requirement
There's special code in content patcher to ensure hasmod conditions always run first.
And using that, it also tracks what modids they check and if other parts of the patch use tokens from the mod, and the mods not loaded it'll just pretend the tokens do exist as it won't matter they will never be evaluated
I made some cp tokens that get updated when the configs of my smapi mod changes, some kind of budget cmct!
but thank you all for your help
tomorrow I will spend some time with creative writing and then I can ship out a huge mod update!
with frogs as pets and renaming each tank and frogs that like bug meat and soup and cake
i don't recall--does changeMapTile (event command) permanently alter the map? or just for the length of the event
i can test it but i wanted to see if anyone knew off the top of their head
taking a brief glance, I'm leaning on persisted until smapi changes the map again (unless its town without speedy solutions)
though if the event is running in a temporary location then it shouldn't propagate to the real version of the location
ok, i'll just have to change them back at the end then. thanks!
Hey all, just wanted to give updates on the RTL mod I'm working on and a question I'd like to hear y'all answers to.
Now text reads right to left as it's supposed to in Arabic (and other RTL languages) and with proper shaping but the only thing left is offsetting x position of the text to the rightmost side of its container which is simple to do and I'm very excited to publish it as 0.1 soon.
My question is what are the chances of ConcernedApe supporting Arabic officially considering that I'm working with talented localization team and their work is well received in MENA region?
I remember seeing Thai mod before and now looks like Thai is officially supported but I'm not sure if concerned ape coordinated with the mod author or done the translation differently
Thai is not officially supported last i heard
To be honest I dont think its very likely that working on a mod will lead to the language becoming official, considering the thai language mod has been one of the most comprehensive and regularly updated language mods for years now
But if you want it to become official, it would be great to send feedback to the development team via the normal channels for that stuff
Or I wonder if you want to present your rtl work in the 1.7 alpha channel and see if theyd be interested in implementing it or something like it into the main game, just to support rtl language packs more easily. It would be a far shot but you miss 100% of the shots you dont take @vocal osprey
If you want! I'm going to be building a larger farmhouse mod next and slowly replacing things from that mod with my own style.
Hi guys! I was wondering if there are any frameworks that add more commands for events? I know spacecore adds a few but is it the only one?
it's the only one i know of that is intended for other mods to use
any mod can register new event commands, and once they're registered any mod can use them, but afaik others typically just add the ones they need and don't advertise them for general use
is there any documentation regarding how to do this?
I might make a few and turn it into a framework
never did frameworks before but I could give it a shot
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
oh, it looks easy
it is easy
(it being easy is a 1.6 feature. it was more difficult before)
i have had plans for a while to do an event framework but the need has not been pressing enough
I recently started making events and noticed a lot of stuff was missing that could make events way more dynamic
it's worth asking around as people sometimes find workaround or some commands exist but are obscure
If you have c# everything looks like a nail
What do you do if everything looks like a snail
There's 2 choices here
- Add actual event command
- Add an action to be used in /action
The nuance is just whether you need the event context for anything
or if you expect to use it elsewhere. an action can be called from damn near anywhere
Does anyone know of a way to see what "category" items are in? Like if I wanted to check what items were the in "-25 Object.ingredientsCategory"
Ah it looks like Console Code might help me
Lookup anything possibly also
Code for a mod that restores stamina:
https://smapi.io/log/5fb7de42489145aeafd5768479f96d21
This code works fine singleplayer, the stamina is saved before it is spent, and after spent, it is restored.
But when trying local coop, the stamina is saved after it was already spent, and i dont know why.
Any ideas?
Oops, couldn't parse that file. Make sure you share a valid SMAPI log.
Thank you! I'll grab that next
does anyone know of a good way to get an assembly handle for another c# mod by mod id?
I know you can get the manifest, and that will have the dll file name, but Load() requires an assembly name, which is not necessarily the same as the file name. I can use LoadFrom to load by file name, but that requires me to get a path to the other mod's folder, and I don't see a way to do that with SMAPI. I can iterate loaded assemblies and match by simple name, but that has the same issue as Load()
or does the name always match the file name?
hm
I wish SMAPI just let you grab the assembly via IModInfo
I'm not sure 100% if this is what you want 
ah, smapi internal reflection
I was trying to avoid that but I suppose it really is the best way
@ pathos official api please
It works/5
are the state variables (savedStamina, usedTool, etc.) not local to the function
they are global
yeah in local coop they will be shared between players
you want to wrap PerScreen around them
will look into it thank you!
I vaguely recall there being something with harmonylib where you could add patches that targeted methods from other mods if they existed, is this a thing or am I imagining it?
Prepare?
basically what I'm trying to do is make my mod compatible with wildcat dynamic combat and my mod breaks down with the meleeweapon changes that mod does, but I've noticed it works fine if a certain config setting is disabled, which is checked in those patches. I figured maybe I could patch ontop of that mods patches to make an additional exclusion for weapons from my mod.
I'm not sure if thats a terrible idea or if thats possible though
oh i see prepare on the harmonylibs docs now lemme read that
it worked, thanks! does this works with online multiplayer aswell?
per screen doesn't do anything for online multiplayer.
it's called PerScreen because it's literally talking about the screens you have in local coop
since all those screens are running in the same game instance, their variables and such must be kept separated. that isn't the case in online coop
but if it the mod is working with that, it will also work online, right?
should do
it'll just be working with one screen, which will effectively be the same as no PerScreen at all
hmm I can't find any good examples of prepare and I'm unsure if this is even a good idea now. Patching ontop of other mods patches seems like it might end up being a bit of a disaster
Prepare is not made specifically for patching other mods but simply for doing any kind of preparation before a patch actually runs
Are you using annotations to patch?
ah, so probably not what I'm looking for then
No you still want it
I just mean you likely won't see an example for specifically that
is the ave bug possible to permanently fix forever so u never see it ever again in your entire life or is harmony just cursed
still want it as in for this specific issue or in general?
If you return false in the prepare function, the patch does not get applied
So you can use the prepare function to check if the mod is loaded on the SMAPI registry
Observe my bad ideas
hmm well that seems like it might be just disabling the mod stuff altogether though? if its disabling the entire patch
You need a harmony patch log to get any useful info about an AVE, right?
It's incredibly unlikely we can get any useful information for that ave
How unfortunate
well if you're using annotations to patch then you need them to be in a separate class anyway so you can apply them separately in the first place
none of these use Prepare?
Hmm ok. well I think I get the gist of it and honestly I think it'd be safest to just set it as a incompatible mod, I don't wanna mess around with someone elses stuff without an API right now because that seems like it could end up being a huge problem later down the line...
One question: is it possible to make mods for SMAPI using just a cell phone?
I believe it is possible, but probably with some limitations
many mods patch other mods
like... coding them?
sounds scary
i’ll be honest just get a laptop pls
I mean, you could, but please, cherish your life and happiness.
(I'm actually not sure you could compile itdireclty on the phone. 🤔 But I guess you could set up a VM with it..?)
In other words: please don't
I guess this predates me using Prepare
But also it's all patches on different mods lol
any general opinion about Fextralife's brand new mod platform? they sent me a mail (ew) about it.
isn't.. that a youtuber?
.. Ah. No. "FextraLife was founded in 2012 and was acquired by Valnet in December 2024. Fextralife has been a cornerstone of the gaming community for over a decade, building a reputation as an invaluable resource for gamers."
never heard of it lol
several people here received emails from one of their executive before too a few months ago, to try and ask us to either upload our mods there or give them permission to do so for us
my opinion of them is not great
damn I still did not get one
should've made your email easier to find :///////
i was gonna type some stuff but button said it
I know there website from the Dark Souls wiki, which are not regarded as good from the community as far as I understand
(they found mine by looking at the author info of my GitHub commits)
mine too
yeah, that's fucked up, that's not the email I use for game stuff
now that I think about it
yeah I already didn't like them but getting an email from some random executive who won't tell you how they got your personal email when you ask but wants you to give them uploading rights to your mod is too skeevy for me in and of itself
i have just checked and i also got this launch email. the big selling point of the platform seems to be that they will link mods directly from their game wikis, which is not great here considering 1. poor reputation of said wikis, and 2. stardew does not have a fextra wiki because why would it
gods I can’t imagine the fextralife page for parsnips being formatted like a typical fextralife dark souls boss page
don't worry you'll get "appreciation credits" which they have not even said have any real world value
That's weird because I'm pretty sure I stumbled upon it being in the games code while I was doing reverse engineering.
Either way I've made my changes explicit and organized in harmony so if there's any interest migration will be smooth, thanks for the detailed response 
"Exposure!" :V
lmao, their mod pages have the exact same format as curseforge's
that is very funny
You know how you can use the $d option in dialogue to reference a world state ID (e.g. "$d kent" for kent being back). Is there a way to add world state IDs? I know I can check and use mail flags in CP to include dialogue at different times, but it would be really nice to use $d some places instead
$d only works with those four predefined states
Ah well. It was worth checking!
(also fun fact, it doesn't actually check if Kent is back. It actually checks if it's year 2+)
that’s like every check related to kent in the code right
year 2+
i don't know everywhere in the code that checks for it
Probably best to just continue using flags. If the 'world state' is temporary, remove the flag when the conditions are met via trigger actions
But i imagine his unlock condition check doesn't check year 2+ 
well hardcoded I mean
Oh lol. Glad I'm not changing that or anything then
I think I'm finally (finally) getting a better handle on the $q/$r stuff. Going to have to keep myself from over-using it on this next mod
hoping for a gsq-driven switch block in 1.7
(i know about $query but that one switches the entire dialogue string and i would like a block)
$query also doesnt work quite as most people would expect either
so if the block worked "properly" then itd be better anyway
the block would likely suffer the same problem of being evaluated at parse time
actually maybe not
gender blocks are parsed at talk time right?
yeah that one just occurred to me after i said it
Need some help with a content patcher mod I am trying to fix. Its called Fantasy Weapons and is currently on Nexus. Right now the weapons are failing to drop in the mines. I also want to add the weapons to the shop in order for players to have the option to purchase them (at a VERY high price). Sadly I cannot get the weapons to appear in the shop. Can anyone point me in the right direction?
!json can you share your 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.
Yeah, should I post it here or in a thread?
please link it in here using the site governor mentioned
according to the validator, you have an error on line 261. target field takes an array, not a string https://github.com/Pathoschild/StardewMods/blob/develop/ContentPatcher/docs/author-guide/action-editdata.md#target-field
Ok, i'll fix that and test it out. Thank you for telling me about the Validator site! I had no idea that existed. 😎 👍
it’s a great site! just know you can ignore an error telling you you need a Format unless it’s your content.json
as for why they don’t drop in the mines, where is your code that does that?
I may have misunderstood this as the level for which the Weapons drop:
"MineBaseLevel": 70,
"MineMinLevel": 60,
yeah maybe you just haven’t gotten it yet?
OH! I should definitely add that to the page on Nexus!
Also, after fixing line 261, I got this in the Smapi Console after opening the shop:
[13:14:10 WARN Content Patcher] Can't apply data patch "Fantasy Weapons > EditData Data/shops" to Data/shops: the field 'AdventurersGuild' doesn't match an existing target
!unpack unpack the game and look at Data/Shops to find out how you should format your target field
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!
Is the Mine Base Level the deepest level at which the weapons drop? Or is it that they become more common at that point?
I have a random hypothetical question. Is it possible to have any kind of a c# module that applies a tile property anytime a specific tile shows up on a map?
Use case- I want to make the mushrooms on my farm glow when grown. The part of the mushroom that grows will have a specific tile id and since the glow is created by MMAP id like the mushroom to glow when grown
anything is possible with enough C#
But how much am I feasibly looking at haha. I’m not against figuring it out
highly dependent on your personal thresholds for efficiency, compatibility, and jank, likely in that order
overall, likely not very much
New quote added by atravita as #6665 (https://discordapp.com/channels/137344473976799233/156109690059751424/1423749653903446046)
hellooo trying to think of some krobus-like terms of endearment for when they're roommates with you, any ideas? so far i was thinking maybe 'my rainfall' (kinda like a reversal of 'my sunshine') and 'my beloved'
it's gotta have the hands
hmm new sprite thats just the love face with those emoji hands
Hell yeah
MY BROSKI
Why can't you just edit the map tile prop
I want the mushrooms to be growable. which would require dynamic locations.
Are the mushrooms a wildtree or a map patch
To elaborate on my confusion
- If you are setting map tile id somehow then you would also be able to set map property, editmap supports this
- If you are hoping to make a wild tree glow I think you need a different framework not mmap
hello oh great masters
i come with a humble question
i own the steam copy (and switch, but doesnt matter here) of Stardew Valley
I cannot figure this out, but, how can I play 1.0-1.3 releases of Stardew?
Google said something via steam to do, couldn't find it, and even on data preservation websites, none even have a mention on how to do so, or at least photos of it
So I was wondering, how would it be possible? Preferabbly steam, or do I have to contact a developer with my steam purchase of the game to receive older copies?
I'd love any help, ty!
lookup steam depot downloader
though obligatory “why”
literally just wanted to take a glimpse at some of the old character portraits and how the game looked on version 1.0 mainly
Iirc, the portraits looked the same as now? Ever since i played.
i saw a tiktok on haleys
was diffrent
think was changed 3-4 times?
I don't think the pre release portrait ever made it into game, cus y'know pre release
yeah they have always looked the same from 1.0 onward
It could have been a mod, some mods use the old portraits
whatever portrait you’re seeing is pulled from a mod, which in turn is pulled from senor ape’s dev logs
ahhh gotcha
Usually the wiki has images of the old portraits so you can look there
found em, ty!!
My friend, sweetpea, dear, my kindred spirit
Im thai which is why i said so, I dont think it was ever added, since I probably would have heard haha. If something was added to the game code to support abugida fonts or something that's a different story though. The translation team ELL has a discord server if you do want to ask them anything about that.
My main word of warning is just to say that if you want the possibility of there being arabic or rtl supported in the game, i dont think CA will notice a mod for that being made unless someone contacts him, cus he doesnt stay up to date on the modding community as much
aaa that's cute :)
Can someone possibly help me out. Im trying to use FTM to spawn a chest with a watering can in it. Looking at the ID the code is (T)WateringCan
Per the FTM readme a chest should be formatted like so:
{
"Category": "Chest",
"Contents": [
"Watering Can"
]
}
],```
I have tried WateringCan, (T)WateringCan, and Watering Can and i keep getting
```[Farm Type Manager (FTM)] An area's item list contains an object ID or name that did not match any loaded objects.
[Farm Type Manager (FTM)] Affected spawn area: "CommunityCenter"
[Farm Type Manager (FTM)] Object name: "Watering Can"
[Farm Type Manager (FTM)] This may be caused by an error in the item list or a modded object that wasn't loaded. The affected object will be skipped.```
strings in FTM's item* lists are assumed to be (O) names or unqualified IDs; for tools, I think this'll do it
"Contents": [
{"Category": "Tool", "Name": "WateringCan"}
]```
Ok I’ll give that a shot. Sorry if that was listed on the readme and I missed it
there's a section about "complex" items like that here, though it's not the clearest
https://github.com/Esca-MMC/FarmTypeManager?tab=readme-ov-file#item-settings
That worked. Thanks Esca
when the dialogue aint dialogueing and the schedule isnt scheduleing....but hey at least shes in the game now
oh wait i know why 
anyway, look at herr
hm, inch resting, still an unmoving untalkative statue
(meirl)
day 0 since I released a mod with an embarrassing bug that I have to fix minutes later
what mod was it? 😭
man, I am clueless
day 0 since I did it twice
I did an include for schedule and dialogue, loaded a blank for it, made a really simple schedule, slept three days
i am confusion
damn that's cool!!!
currently rereading everything to see if i have a typo anywhere
New quote added by atravita as #6666 (https://discordapp.com/channels/137344473976799233/156109690059751424/1423802134159425546)
hm
can someone tell me if an antisocial npc also needs a gift taste or not, maybe thats why she aint doing anything
If it helps, I used to use conditional compiler directives to shut off debug logging
one of these days when I don't feel supremely lazy I'll set that up lol
ok, wasnt gift tastes back to being lost
[Conditional("DEBUG")]
I have a general rule of thumb that I'll only let myself make a specific mistake once
Afterwards, I need to implement systems to prevent that mistake
heyyy uhh was making a dwarf portrait that gave them emotions, did it the exact same way as other portrait mods, got this message from console:
[Content Patcher] Can't apply image patch "Dwarf Portraits > EditImage Portraits/Dwarf" to Portraits/Dwarf: target area (X:0, Y:0, Width:128, Height:256) extends past the right edge of the image (Width:64), which isn't allowed. Patches can only extend the tilesheet downwards.
what should I do?
If the original Dwarf image is only 64 wide, you need to do a Load
oh?
Use Priority to avoid exploding other mods
I would link the cp docs but im on phone
thank you :)
I am winning
(are you making the portrait(s), NPC, font, UI or map?)
trying to get the NPC to work
I made everything in the pic tho
dialogue is working but not schedule I still call this a win
(also correction i made everything besides the font, the font is just...a font i downloaded to clear things up lol)
I wish I could use something like that, but I run all my mods in release mode for development
If I ever add ci/cd and have that compile for releases instead then I could have a flag that turns them off when it's doing the build
hi, random question from someone with near no experience trying to learn to make my own mod stuff via crash course and learning from reading other's json files, and i feel like ive got a pretty good grip on most of what goes into making a building, but i cant for the life of me figure out how to make the building layer behind the player when they are in the buildings collision map but are in front of the building, can anyone point me to a good guide or help out?
I suspect you’re running into an actual game limitation but I’m not sure
Can you send pictures of what you mean?
Like when you’re “standing inside” a building essentially?
I recall someone else having trouble getting a building with a collision map like:
xxx
xxx
. x .
To not look funky when they were standing on some of the edge bits. But I’m not 100% sure I’m remembering right.
Essentially, vanilla buildings are pretty much all rectangles
So there may not be a ton of features to support funky shapes
Stable is a horseshoe shape and would be the reference example for checking the correct layers
That’s a great point
thats exactly the problem im having. the front of my collision map is like this
OOOXXXXXXXXOOO
I was thinking like “barn, coop, well, darn it…”
MY PORTRAIT MOD WORKS!!!!!!
hell yeah, fixed my schedule issue, we are back in business
ill check out the stable, thanks for the direction i appreciate it a lot
Hi!
Question: under which circumstances will WorldMapManager.GetPositionData(location, position) return null?
is she standing in a bowl of chocolate pudding 
lol nooo shes sorting books
maybe i should make the books a diff color xD
would blue make it better
eating dinner right now but the most surefire way to find out for yourself is decompiling and reading the source code
im having trouble finding the actual files for the stable itself, all i can find are the pngs for it and the paintmask png. can someone teach me where to look for the information i'd need?
Look at Data/Buildings and find the stable entry
location being null (multiplayer will have this whenever switching locations), or the specific position is a gap in the world map data model
just wanna say yall are cool asf for being able to mod and stuff, it literally took me 5 hrs yesterday to even figure out how to install the mods and unzip the files LMAO
okay yeah that's a huge improvement lol, much more readable
That's why I'm asking.
I'm reading the code and the way I understand it is:
- If the tile is in a certain location -> return the location context
- If the tile is in a building and that building is in a location -> return the building location context.
- If something else -> return null
The thing is, is there any instance of a location not having a context or a building not being in a location or any other weird thing?
So it is posible to have certain locations not inside/defined in MapRegions/MapAreas?
sure, a mod adds a location and forgets to populate worldmap metadata
I don't think there's gaps in vanilla
debug worldmapposition true will be your friend as the code has a bunch of logging built in and will give diagnostic info as to what happened
so when running stardewxnbhack im running into this error
Unhandled exception: Microsoft.Xna.Framework.Content.ContentLoadException: Failed loading asset 'Data\Buildings'.
---> Microsoft.Xna.Framework.Content.ContentLoadException: The content file was not found.
---> System.IO.FileNotFoundException: Could not find file 'C:\Program Files (x86)\Steam\steamapps\common\Stardew Valley\Content\Data\Buildings.xnb'.
are you using an up to date version of stardewxnbhack?
In that case those location would not have a region/map assigned to be shown I suppose. (That's what I need to find, to create a map chooser when showing the MapPage)
im running version 1.1.2
is your stardew valley old (say, 1.5.6)? Data/Buildings is a 1.6 asset, if memory serves
its 1.6
not sure what i did exactly but i think??? i fixed it. would be great to know how but i havent a clue
finally have the information i need, thank you for your help
artist's rendition: character standing in bowl of chooclate pudding (note: artist cannot draw and also thought the arms were legs)
almost done with my first mod event :)
HAHA OMG
I heard that it's possible to make mods without coding, that's also a way I'm interested in making mods
What is VM?
virtual machine maybe?
yes, you can technically write content packs and make sprites with just a text editor and a pixel art program
but tbh pls just get a computer
The pixel art can be ok if your phone is big
but it's kind of painful if it's not, source: me trying it for portraits (already 4x bigger than object sprites)
I would say it's definitely doable to make content packs on a phone
i can second that it's painful to draw on phone
But I would not recommend judging whether modding is fun based on that experience
i'll write the rest of my json for my mod on my phone...
I think it's unrealistic to expect everyone to have a computer given waves hand global stuff out there or whatever, but we gotta keep expectations realistic on how it's gonna go
phones are not for doing productive things. they are for taking calls and wasting time
what about making calls 😛
while there's a very broad overlap between wasting time and making mods, the slight hint of productivity involved completely invalidates it
i once typed a several thousand word rant on something that made me really mad on my phone
my thumbs hurt afterwards
god your thumbs must be ripped
it took me like an hour of furious typing
this was like 12 years ago so no worries they're back to their usual completely not ripped state
New quote added by atravita as #6667 (https://discordapp.com/channels/137344473976799233/156109690059751424/1423842543421882421)
incidentally someone posted this error (no log) on LOC after i updated the api from the EMC compat PR
[ExtraMachineConfig] Tried to map a mod-provided API to interface 'LoveOfCooking.Objects.ICookingSkillAPI', which isn't compatible with the actual mod API.
Technical details: ArgumentException: Unhandled proxy/conversion method for info: ProxyInfo{target: TypeInfo{context: blueberry.LoveOfCooking, type: LoveOfCooking.Objects.CookingSkillAPI, LoveOfCooking, Version=2.0.1.0, Culture=neutral, PublicKeyToken=null}, proxy: TypeInfo{context: selph.ExtraMachineConfig, type: LoveOfCooking.Objects.ICookingSkillAPI, ExtraMachineConfig, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null}}
---> ArgumentException: The ICookingSkillAPI interface defines method add_PostCook which doesn't exist in the API or depends on an interface that cannot be mapped!
in the last line, is 'the api' referring to 'the actual mod api'/'a mod-provided api' above, or ICookingSkillAPI as included in EMC
I think it means that in EMC, "ICookingSkillAPI.cs" includes a function that does not exist in actual LoC but I'm not sure sure
i'm assuming it's the api in LOC rather than the api interface in EMC and they just haven't updated their EMC
nexus at least mentions their LOC version is the latest
that’s the version in the csproj which is always 1.0.0
nuget packages? builders? source generators? you must've been dreaming. come, we've got a new release ready, let's go update four semantic versions at once
anyways blube i think they just lied
i've gotta say kitchen station sets has the most normal & welcoming page banners and thumbnails but then you see the mod description and it changes to a mix of fear & ill omen
i think it was the opposite, they updated EMC but not LOC
you can check which versions theyve downloaded of LOC
it's possible they downloaded LOC 2.0.6, found it was incompatible with an old version of the game maybe, or installed it to a different device, and then ran into this issue and posted the error message leading nexus to say that's their current downloaded version
anyway it's probably solved by them just updating both mods but they haven't replied yet
alas log
also nexus would show you if they downloaded an older version again
i suppose it's also possible they downloaded it but didn't install it, or used a different mod group, or only updated the CP component, or ..
keep going please, id like to know all the possibilities
sorry i hit the word limit. need to wait a few hours before i can query some more ideas
ah, that sense of fear and foreboding on kss was true
what r u trying to do solve 
just checking out more compatibility requests with bettercrafting. specifically it has its own tile actions along the lines of leclair.bettercrafting_OpenMenu BetterCraft.SushiBar that open a new BetterCrafting menu specifically, rather than the base game crafting page, so LOC's CookingMenu is never opened regardless of whether either mod's menu is enabled/disabled to allow it
but i don't think there's a reasonable way to intercept it via the BC API, and trying to harmonise this interaction specifically sounds pretty bad
i've known about this for a long long while and my opinion hasn't changed that it's more trouble than it's worth
I don’t think BC even has code for “open vanilla cooking menu but only with these recipes” (because why would it lol)
well it has a config option to disable its own cooking menu, but apparently not for the BC tile actions (though it'd take some weird & wild workarounds to have limited recipes on the base game cooking menu)
it has the second most dependencies of any mod in the mod dump
this seems like a BC problem tbh
[revisiting my list from ages ago and how things have changed since then, all these mods living together in harmony](#making-mods-general message)
(except for Cooking Overhaul, but it’s doomed regardless)
wasn't there a mod that had infinite inventory with tabs for types of items? like i could have sworn i used to be able to just click minerals and see all the minerals
uh that's called cjb item spawner
are you thinking of ultimate storage system?
ummm something like that ? but it looked different
then you'd best ask in #modded-stardew 
how do i add a context tag into gift tastes again
like for every item that has a specific tag
idk what to do

the wiki doesnt have anything
or if it does im dumb and can't find it
just write book_item instead of -5

"Operation": "Append",
"Target": [
"Fields",
"Penny",
3,
],
"Value": "tag_Sweet",
"Delimiter": " "
},``` case 01: im overthinking this
that should be fine, for some context tag tag_Sweet
the game uses food_sweet though if that's what you're after'
🤔 would it be better to prefix the context tag with my own mod id so it doesn't get mixed up with others
depends, do you want to include only your sweet items, or any sweet items?
i checked the vanilla context tags and those use food_sweets or something so technically they're different
but i worry they're too generic
context tags are supposed to be generic. that's their deal
but if you only want your own sweet items, use a mod ID prefix for clarity
otherwise use food_sweet for any and all sweet food items
yeah, cuz these are just for like... a very specific set of items and i don't want penny to randomly start liking every sweet thing on the planet
i guess when in doubt, modid
if i just type out my modid plainly, i can use that same tag for other mods even if i don't have it installed, right?
like ModA_tag can be used in mod b's items even if i dont have mod A installed?
yeah i meant for the other mod
anyways very funny i can abbreviate my mod name into MCR
(transpilers) i need to load an optional, named argument from the method i'm patching onto the stack in order to pass it to a C# function i'm calling. what is the incantation to create a CodeInstruction that does this?
(this is for SpriteText.drawString, and its parameter bool junimoText = false,. at some relevant points in the method, ILSpy shows me e.g.
IL_0950: ldarg.s junimoText
which is not exactly helpful for recreating it)
i tried using what i thought was its index, but 1. that's gross and 2. i seem to have gotten the wrong value, so maybe my index was wrong
I'm not sure about the specific IL involved offhand, but optional args should be exactly the same as other args
they're always there, the default value just gets added at compile time for any calls that didn't provide something
that makes sense, but is there a useful way to get its index by name, like the decompile is showing me?
obviously i don't expect to just punch in the name. i could potentially get the method body and do it that way if it's feasible, etc.
not 100% sure, but iirc it's only ILSpy/etc that associates it by name, so you'd want a ldarg.s with the arg's index, specifically as a byte (unsigned int8)
ok. thanks
i also believe the way to do it is with the index, but be aware that the index to use for the arg.s varies by one depending on whether or not the function is static aka has an implied first argument of "this" or not
i dont know if that function is static or not i cant check right now
but it may be why your index was wrong
(that "this" explanation may be a bit wrong too but its something like that iirc)
it's static
ILSpy gave me an index, or a thing which looked like one, which turned out to be off by one
but since its decompile references the name i figured there might be a way to get the index by name instead of just hardcoding a 9
obviously all transpilers are brittle, etc etc but you know
I just try to find another instance of it usually
oh wait its a ldarg not a ldloc
hardcode it all the way tbh

the only reason itd change is if the signature of the method itself changes, which means if you're relying at all on the nameof() or typeof() or params of the method in order to even tell Harmony what method you're trying to patch, it will break regardless
makes sense
For Advanced Melee Framework, there are instructions for Creating Advanced Melee Framework Content Packs. However, when I clicked on the link for information about the different Enchantments; it led to some random site that looked like a scammer site. So... is there anything I can do to see what all of these do?
"vampiric": VampiricEnchantment
"jade": JadeEnchantment
"aquamarine": AquamarineEnchantment
"topaz": TopazEnchantment
"amethyst": AmethystEnchantment
"ruby": RubyEnchantment
"emerald": EmeraldEnchantment
"haymaker": HaymakerEnchantment
"bugkiller": BugKillerEnchantment
"crusader": CrusaderEnchantment
"magic": MagicEnchantment
Some I can find on the wiki and some i cant
the link likely lead to the old community wiki link
which as you know now is very much not the wiki anymore
you should be able to replace "stardewcommunitywiki" in the url with "stardewvalleywiki"
Yeah. Definitely different.
What's the Magic Enchantment? I don't see it on the wiki.
the one that shoots a projectile, i guess, judging by a quick scan of the C# class for it
(i dont know much of anything about enchantment code)
"Starburst"?
yeah, that text doesn't show up on the wiki either, it might be unused in vanilla
i was about to suggest the same, though from a quick search it appears to be implemented by at least one mod
okay yeah, the game never adds MagicEnchantment to anything, unlike all the others I've checked
(e.g. this.AddEnchantment(new AquamarineEnchantment()); for everything)
thought it might've been hidden in content somewhere, but that seems to be it
👍
Spacecore has a tool for that, so if you're using spacecore you can do it, but it's otherwise very nontrivial to implement. (spacecore uses some terrifying magic code to parse the binaries themselves and match local indexes to names)
I imagine you could do reflection nonsense & iterate over the args in the patch setup, but it's probably fine to just let patches break if they're refactored that much 
You could for parameters/args, but not locals
ah, yeah, that part sounds rough
Nowadays I usually write heuristic patches, where it looks for specific "landmarks" and then copies locals/ops from existing instructions. Less straightforward but also less likely to die horribly
I also use passthrough methods when possible if I'm modifying values, so if other people try to modify it as well, it stacks instead of overwriting or just exploding
Unrelated but @royal stump your avatar is very cute
passthrough methods are pretty convenient, yeah
though iirc I just started using them because I was afraid to remove instructions directly 
prior to knowing how labels worked
(what animal is actually in your pfp. i just assumed it was an owl since forever because of the slate hat, but.. moogle?)
I rarely need to remove instructions tbh. I think the only times I've done it are a patch in 1.5 unhardcoding giant crops from the farm (which like 3 other mods also did) and in hhd where I have this bonkers reverse transpiler for AT to adapt the draw patches for objects to drawInMenu
yeah, it's a moogle from an FFXIV website tutorial or some such (back in like the 2.0 era)
I grabbed some of the cuter images they made for it & ended up using this one since
though before that I was always using ff6 moogles anyway
yeah, generally it's not really necessary, and probably wasn't in the one I remember (overwriting something like "if movie theater, then don't do normal NPC logic" for SVE)
probably could've just passthrough filtered it
patched[x - 1] = new CodeInstruction(OpCodes.Ldc_I4_0) { labels = patched[x - 1].labels.Concat(patched[x - 2].labels).ToList() }; // replace the "Isinst" with a code that outputs 0 (false)
patched.RemoveAt(x - 2); // remove the call```
isnt this only for locals and not args?
virtual machine, yes
Yes
ichor wanted an arg, though
I may have misread the post
Button, this would only update this particular mod right?
"Spiderbuttons.BETAS_PatchUpdate \"ItsBenter.DialogueDisplayTweaks.CP\""
before I was using "Spiderbuttons.BETAS_PatchUpdate {{ModId}}"
does it make a difference?
BETAS has no way of knowing you used a token