#making-mods-general
1 messages ยท Page 245 of 1
either way, like forsy said, xnbcli is just not the correct tool for the job
!unpack
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!
amazing!! thank you so much for the pointers I'll see if I can find the other version ๐
I wonder why. Maybe it's just outdated? or it's not meant for stardew and stardew is doing something weird 
Well i dont think it's meant for stardew
I also know it unpacks maps as tbin and not tmx
wow xnbhack does . . . everything . . wonderful ๐
@cyan venture I forgot to say it before, but a) congrats
and b) consider updating your mod for i18n support (it's very simple, dw!) so people can use it when playing in other languages!
Thanks you
iโll look into it
Hey guys, I'm trying to make a really basic content patcher mod and I'm a bit stuck. All i want to do is change the main menu background colour. My content.json is here but I'm sure it's wrong:
{
"Format": "2.5.0",
"Changes": [
{
"LogName": "Main Menu Background",
"Action": "EditImage",
"Target": "LooseSprites/DayBG",
"FromFile": "assets/solid_background.png"
}
]
}
sorry picky, the title screen isn't that easy haha
I don't think daybg is the asset you're meaning to reference if you're looking to change the main menu background
that's a different thing I think
daybg is this
here's TitleMenu.draw() โ๏ธ
is it not using an asset for the background, though?
it is, but not a premade texture
oh, rip
what you want is the slivers of sky gradients in LooseSprites/Cursors
around 700x 1912y
and here I was about to foolishly ask where it was
of course it's in cursors
Oh, well I am literally making a super simple mod. So maybe there's something else I can do
Ah yes the slivers of sky in cursors
you can change the sky gradient just fine! but the clouds, intro scene backgrounds, etc. won't change without separate patches
are you making an example content patcher mod for something?
oh in that case ignore my naysaying, the sky colour is simple enough on its own
I want to have one version with the sky red and anotehr with sky green
So when they test our mod manager they can start the game and obviously see which mod is working
the exact coordinates you want from the source are 703, 1912, 1, 264 for x, y, width, height
And I need to replace it with a skinny strip like this?
skipintro by pathos (iirc) is a good mod to test that with, since you'll be able to tell even earlier
Ye
Thanks but it's a specific test case. What our QA need is to install the latest version of a mod, then it gets an update and the app finds and installs the update properly.
(if you want to also change the load-game nighttime sky gradient, use 702, 1912, 1, 264)
So this?
{
"Format": "2.5.0",
"Changes": [
{
"LogName": "Main Menu Background",
"Action": "EditImage",
"Target": "LooseSprites/Cursors",
"FromFile": "assets/solid_background.png",
"ToArea": { "X": 703, "Y": 1912, "Width": 1, "Height": 264 }
}
]
}
somewhat unrelated and very unimportant for this, but do we usually recommend using the most recent patch version of content patcher in the format version, or just the most recent minor version?
i recommend whatever's shown in the content patcher author guide or examples
it says latest version but then it says that the latest version is 2.5.0
do they not upgrade with every patch update?
regardless, 2.5.0 definitely works
i expect that minor version increments in content patcher aren't ever going to include format features, just bugfixes
true
That's my thinking too. I can't see pathos being such a proponent of semver and then adding features to a bugfix version
Imagine the scandal
would he ever be forgiven by the community
Held on public trial
why is it that I have several sane mod ideas and yet the one I want to implement the most rn is a) intended for an update that isn't even out yet and b) literally the worst
Show us b)
they're both the same idea, I want to implement a turing machine entirely through events
because gotos will likely make the event syntax turing complete 
gotos will be a 1.6.16 thing though
turing machine
what
oh by the way, can you have a randomiser via CP, or at least a pseudo one?
what's turing machine
something people would talk about in #programmers-off-topic 
like, to output a random number out of an array or something
It's called every change tho
yeah but you can probably localtoken it
To get something more random it is best to see if the thing u r edit takes conditions
or dynamic token it, or do something in a way that fixes it in place
Oh i was meaning the opposite
oh wait, you wanted MORE random than every change
oh, I'll look into that
ez, use an ontimechanged patch to set a new one each time to some virtual asset (don't)
Is there a known way to make an NPC break the normal schedule and go to say an alternative one, and run from said player when attempted to speak with them? Having them just not speak, comes off as rude; while them running would show them as more afraid the player, or so I would think?
messing with schedules in these ways is very messy
I don't think it's dynamic enough for reactive thing
and also I think having them not speak comes off as less rude than running away from me every time they have nothing to say 
anything is possible with determined application of C#. i don't recommend trying this though, unless you are feeling masochistic (messing with schedules during the day is cursed)
You can story it though, like a event where they are
away and then u hide them for a day or two
(You can totally edit schedules during the day if you want.)
It's not trivial though
:pufferthink:
Or go learn concurrency in c++ with bards
The thing I don't know if u can do is get the npc to path away from the player
With only schedule
Thanks for your help with this. It's ugly as heck but you can at least see the difference!
sure. you can also advance time of day while moving every NPC to where they are supposed to be at the new time, but it's complicated
Another uphill battle, good to know; having an event mess with time does sound interesting. Eventing might be the answer, thanks for the help
Is there a good alternative to profit margin?
Are you trying to make a mod for that...?
oh soz
Hey! Does anyone know of a way to restrict a custom NPC from visiting ginger island on certain days of the week? I have 2 npcs that hang out with each other on Wednesdays and talk about it in their dialogue, so if one of them goes off to the island on a Wednesday, the others dialogue will make no sense ๐ I canโt seem to find an answer to this anywhere
The Demetrius dancing alone at the bar on Friday night effect. Because Robin is building a building non stop on the farm.
Exactly that ๐
Yup. Every Friday if Robin is building
that's pretty sad
You might be able to make that conditional, i.e., only patch in X's dialogue if Y is not visiting the resort, but I'm not sure how to check for Y's location in a When condition.
Ah yeah I didnโt consider patching the dialogue instead. Iโll have a look into that, thank you
you can edit the NPC's Data/Characters entry and set CanVisitIsland to a query that returns false on the prohibited days
Oh amazing!
There is a mod that fixes it, by giving Robin a work schedule when she is building. But in vanilla she is permanently on the farm for 2 days if building.
for the wednesday exclusion in particular it would look like
"CanVisitIsland": "!DAY_OF_WEEK Wednesday"
Youโre a lifesaver. Iโll try this out now. Thank you so much!
I didn't think this required a specific topic in #1272025932932055121 because it's such a simple question, but when debugging an individual mod, is it required to leave the two mods that SMAPI installs by default? Or can those be removed so the only active mod is solely the one in question?
you need console commands one to use the debug command
It's strongly recommended to keep both of them. ConsoleCommands allows the use of debugging commands in the SMAPI window, many of which are helpful for troubleshooting mod problems. SaveBackup is less immediately useful for the troubleshooting itself but is handy if you need to start looking into older saves or backing up the current ones. Neither of them will have any negative impact on the troubleshooting process, so there's no reason that I can think of that you would want to remove them.
I made the mistake of deleting mine >.>
You don't need either of em but realistically all players will have them
If your mod breaks console commands then im not installing your mod
It's technically not required to have console commands to use debug commands
It's like integration testing 
oh really?
But I would only do that if the point was testing sans smapi
oo
(We are at minute 20+ of this svn checkout)
I know so little and yet im making mods this is great
(Please save my soul)
Yeah you can edit your save to enable them in-game now but I've only done that when I specifically needed to check that a problem was a truly vanilla bug because it's more hassle than just keeping ConsoleCommands.
so I want to mod how ranged weapons work in SDV (I want them to not stop over buildings). I have Visual Studio installed, and I am familiar with C#. I have a test mod I'd made over a year ago, but (1) I have no memory of what I did to put together the libraries etc, (2) it's broken now because presumably 1.6, (3) it's just basic info retrieval and showing on screen, nothing like what I need
can someone please point me at, like, first steps? How do I even /find/ the code the game uses for slingshots?
As for finding the code, I usually either search the decompile for words associated with what I want and hope I get lucky or I ask someone in here lol
right, the example mod here is about the complexity I managed in my first one
gonna look at decompile now ty
Don't miss looking at the pages in the odd little "Creating SMAPI mods" section at the top right of that page. It took me a while to realise how much extra information was in all of those pages because I didn't realise it was its own sort of index page for the C# stuff as well as the getting started guide.
I think this should be as simple as setting IgnoreLocationCollision to true in Projectile
I believe the projectile collision stuff is a thing you can set yea
OMG
Does ranged weapon mean slingshot
i mean right now im using the Sword and Sorcery bow but I am pretty sure it uses the same code
now how to set it is a different question. You can do something like register an add event on the location's projectiles list to modify all incoming entries
(Can't believe you skipped the FAQs right after the tutorial section.
)
blessed be ๐ <= in the non-religious but like deeply respectful and grateful way
I didn't skip it! I just didn't realise at the time that to make a C# mod I needed to read the SMAPI reference docs (I thought it was a link to the GitHub docs) because I was too babby to understand 
Whoops sorry to ping.
(I'm always fine with pings!)
The first many times I followed the instructions on that page I didn't understand a thing of what I was doing. I just followed the instructions lol
And now I do understand! A bit.
I have found the "PerformFire" method that might or might not be relevant to what I am trying to do (I am soooo bad at figuring out other people's code ๐ญ )
I am horrified by the thought I might end up attaching something to "UpdateTicked" because that's just evil
I have heard of the mythical entity called "Harmony" before that lets one patch the game's code directly instead of just adding an on-event...
Is there a way to print out token values for a mod (debugging purposes)
I'm playing with Custom Tokens at the minute and it seems to be working, but I would really like to see the raw values
Patch summary?
I'll try
(Congrats on your mod release btw!)
location.projectiles.Add(new BasicProjectile((int)(damageMod * (float)(damage + Game1.random.Next(-(damage / 2), damage + 2)) * (1f + who.buffs.AttackMultiplier)), -1, 0, 0, (float)(Math.PI / (double)(64f + (float)Game1.random.Next(-63, 64))), 0f - v.X, 0f - v.Y, shoot_origin - new Vector2(32f, 32f), collisionSound, null, null, explode: false, damagesMonsters: true, location, who, collisionBehavior, ammunition.ItemId)
{
IgnoreLocationCollision = (Game1.currentLocation.currentEvent != null || Game1.currentMinigame != null)
});
found the relevant bit of game code to my purposes
now the question is what do I do about this...
This worked!
Patch summary usually includes mod-added tokens, yeah
Nice. I'll have an update to Wedding Anniversaries today probably
No longer need to use the Trigger Actions, so it'll work on existing save files ๐
i avoid using UpdateTicked when possible, but one big advantage the events API has over harmony is higher chance of compatibility with other mods
yeah
The suggestion is to hook projectiles.OnValueAdded
It should have one if it's a net collection
(those are not relevant)
What I would do is on save loaded and on new location added hook them up
Yep
(literally just read and that is what chu's code is doing lol)
Oh ig its not new location
Im doing it on warp
And unhook when player leaves
There is a location list changed event right, if you don't want to do it on warp u can go for that
oh my gosh this is doing so many things I had no idea I could try to do bless you forever
on save load and on warp, I see it...
the fact you can use += and -= there is blowing my mind in a good way
just make sure you don't keep doing it. it's not idempotent; it will add a new copy of your handler every time
Is it not 
I do understand that there's issues if you are doing it on a local function but that is why i did make it a static
Do you mean like += without -=
i mean if you have a thing like thisEventCondition += doMyFunction; and you do that e.g. twice, when the event fires your function will be did twice
Ah yes that i got 
oh yeah that makes sense
Though i do wonder how exactly -= work under the hood then
well, I have code that will make every projectile ignore collisions
I'm assuming the handler has a list and it goes through the list and fires each one, and -= removes... probably the first instance of the matching list item?
Yeah i was wondering by what does it match by
I don't think there are any monster-fired projectiles that ignore collisions, and this is definitely THE most universally compatible version that could possibly exist ๐ค
You can check if the projectile damages monster
I don't recall the name but it's a different netfield
ooooo
thankeee
PERFECTION
now it does everything I want ^^
hmm. the question is, is my instinct to comment on everything the devil talking, or is my instinct saying "this code is human readable and too short to be confusing" the devil talking
ok i know the answer to this question. its definitely the second one
Everything in moderation. While I've refactored 10k+ lines codebases without a single comment, having 80% of your project be comments doesnt help legibility
i think this is a reasonable middle ground ^^
Very reasonable. If I see this in my industry, I'm very happy :p
yay ^^
By the way if you have very big blocks of code but need to be within 1 file, the #region name and #endregion can help to collapse big blocks :p
ooooo thanks ill hope to remember that!
it doesnt do anything, just allows you to collapse and annotate whatever you want wherever you want
yeah i know what you mean ^^
well. now to finish the actual in-game day (i got frustrated and decided i needed a mod mid-fight, as one does) and then to. test.
my general rule for comments is don't say stuff the code already says. there's plenty of room for comments even on short, simple code, but it should be about whys and not about explaining that there's a loop
...well now that you've said it that sounds obvious
regarding the -='s, you're appending/removing from a list of delegate function references, so whenever you do -=, you just remove that specific function's reference from the delegates list and behind the interface, it just runs all the functions in that list as far as I'm aware
๐คฆ l
My rule is I don't document very well when it is modding and then forgor what this code does in a week 
also please don't @ me with examples of me breaking that rule. we all break our own rules all the time /lh
(don't do it)
i was taught to document everything back in the uni, but sometimes I look at my code and it's 50% comments by volume because next to each line i explain what it does in human language
Hey if thats what you desire then go for it
regrettable tendency of university programs to teach kids to comment in that fashion
don't do that either...
My uni projects had 0 comments LOL
tbf sometimes commenting all the code is actually a debugging method
'what the fuck was I even doing here'
Which extra sucked cause they were very complicated assignments and even a week later you gotta re-investigate the algorithm you made cause nothing makes sense anymore
'i can follow my own chain of reasoning right'
Especially when there's 700 lines of matrix arithmetics
yeah........................
i think the most complex algorithm ive written in uni was phrase syntax classification (smth like that)
something about language interpretation
i no longer remember any details except it was really complicated and i was very proud of it
and the frustration of debugging <3
We had a few classes on that and I really just couldnt do it, data representation was never my strong point
@candid stratus You leveled up to Cowpoke. You can now speak in our voice channels and share images in all channels!
then there were 3D lighting calculations but those were easier somehow i think?
I've made a graphical spherical model of the earth with which I built a flight sim, and I've also made a full-sized self-driving racecar
Took it to the world championship and got 8th which was not bad
I loved computer graphics
i learned to draw light and shadow from those 3D math lessons <3
Dumb question, but on Nexus is there a way to update the main file without archiving it? I'm worried about making an update to the version number without being able to verify that the file contents are actually new
I'm not sure what you mean, but you can
- update the version number WHILE uploading the new version
- not delete the old version
verifying the file contents are actually new sounds like a "ok i filled all the fields and ready to drop the zip, now lets quickly enter it and check the manifest" thing
Yeah. I've had issues where when I press "Upload a new version" of the file in the past, it hasn't actually done it
I come back with my issue of trying to spawn IE nodes via spacecore :( they spawn now but they don't work like I tell them to in the IE json, do I have to redo it all in the spacecore spawning or is there some other issue going on?
Which wasn't a problem when the mod wasn't published
I think you just upload new version from the file but don't check remove existing
Alright. Will try it
Depends what the mod is
im gonna take a wild guess and assume it expands the farm
Yes
that's probably a tiled thing
well, that's basically making a new mod that uses the assets of the previous one
(i guess technically maps are considered an artistic asset)
Well if it's the n3rdgirl one it has open perms
and yeah open the .tmx file in tiled and mess with it in there. Make a workshop directory, copypaste all the tilesheet files in there, then the .tmx file too, then open it in tiled and fuck with it however you want
I fucking hate that comment style tbh
I call it the brain dead comment style
My favorite comment type is "I made a weird fix and now I'm writing why so I don't look at it later, think it's stupid, and delete it"
Nvm, I'm not smart enough lol
man, not sure if the lacking "you cant mine this with your level of pickaxe" message I can live with or not. it was possible when i directly spawned the nodes via CJB but via spacecore I dont get it
Can I use a double token in file path
AbsoluteFilePath: assets/{{Voice}}/{{Voice}}_hurt3.wav like so?
Sure
My comments on my C# are horrifying. They're all stuff like // What is e.? I think it's a method but why is it just e? What does it stand for? Can I change it? Ok yes I can change it, I think it's the method argument but then the dot is calling something else? Is that a property of the argument or something? Is that even a thing? I need to google this
You put that in comments? You can also put that in chatgpt and it'll tell you :p
Some of the stuff I've done has been about 90% comments lol
Yuck I would never use chatgpt
Makes sense when you're learning though
Do you know the answer to all these questions now?
You and I have similar commenting philosophies
Just... streams of thought
I also spurn ChatGPT. It's far better to actually learn what one is doing
Kind of? Going off memory I got to the point where I was satisfied enough with my understanding of what was happening and figured I'd probably piece together more about the actual names and stuff later.
In my previous projects it's gotten bad enough that I had to write external docs LOL
(e is just the conventional name in .NET for the event arguments.)
Programming needs algorithms. If only we had some sort of... way of working and expressing algorithms.
Let's make one up. Call it math.
Yeah I got as far as figuring out the event arguments bit. Still hazy on what the dot thing is in terms of correct names for what it's doing and how to know what things I can put after the dot but I'm getting there. (I'm being so vague about this because I'm on mobile going completely off memory about what I was doing a couple of weeks ago lol)
Dont tell that to a mathematician, mathematicians HATE programmers
The . allows you to access whatever the e contains. If you have a fridge object and it has a fruit tray, a butter tray, and a general compartment, then you can access those with the . so you go fridge.fruittray to get the fruit tray object, and then that object can also contain things again
it's like a file structure. Your school folder contains maths and french, so you go school.maths or school.french
IT LIVES
Yeah that part I understand, it's figuring out what thing is a class or a method or a field or whatever that I'm still fuzzy on.
my frankenstein of four mods that I wrote for convenience
Oh, yeah that can be anything really, but a good editor will tell you what it is
That's what IDE tooltips are for.
Yes I'm learning to read them now lol
And just knowledge of what you're working with, of course. But mostly the tooltips. ๐
I've never had tooltips before
tooltips are everything hahaha
I also spent a while being very confused about where anything in C# is because you can write a method below the code you're using to call the method and that was very weird to me.
Used to python?
R
Born to Write C#, Forced to Write TypeScript
My condolensces
I'm curious to see where my preferences end up once I feel confident with C#.
Nothing is better than seeing the customs of a self-taught programmer and how wild they can be hahahah
As someone who's self-taught myself :p I used to do WEIRD workarounds
I went to school for psychology so I'm definitely not formally educated in any kind of programming lol
Makes it more impressive to be fair
How easy is it to add a recolour config for a map patch?
Hi,
I decided to try out how C# coding for SV looks like.
I followed the https://stardewvalleywiki.com/Modding:Modder_Guide/Get_Started guide, but I got stuck at the https://stardewvalleywiki.com/Modding:Modder_Guide/Get_Started#Add_the_code part. I have it copied, I changed the namespace, but my VS code is giving me 12 errors from the copied code. All of them are about "Missing references" (https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/compiler-messages/assembly-references?f1url=%3FappId%3Droslyn%26k%3Dk(CS0246)#missing-references, should be the correct link), but as I'm a 100% total programming beginner, I don't quite know what is wrong, as I think/hope I referenced the NuGet package correctly.
(my goal for now is to rewrite the example code to code that would write a message on each game launch (not save, the game itself; like SVE install checker) if my mod is installed correctly or something like that)
Would anyone be willing to help me?
Don't hesitate to ask for more info from me!
Like the user chooses which recolour they want in the config and then you use that to determine which patch to use? Very easy.
Yep that's what I mean
It could also be easily done automatically with Dynamic tokens, but honestly, config is better.
(my opinion of course)
Did you make sure to add the package with the NuGet package manager?
You just add a when field to each patch where the condition it's checking is your config token and the value for each is the different recolour option.
As I had troubles with doing it in VS code, I ran the command in a separate Windows integrated PowerShell, and it gave me the same messages like on the wiki, so I hope yes. Should I send the folder so you (or someone else) could have a look?
I would hazard to say most of the channel is self taught tbh
Oh, I missed the mention of VS Code. I'm absolutely not knowledgeable enough to help with that, I wouldn't be able to set it up myself. I can do the VS22 setup but that's it.
Is there a reason you're doing it with vscode and not vs?
The programming calls to us all
I used to be self-taught when I was 14. Now it's my job haha
I am using VS Code for the normal CP part of my mod, but I can give VS a try. However, my VS code should be properly set and should have all needed extensions (+ many more).
Oh, also I synchronize it with my github, but VS should also do that...
For CP any editor is more than enough cause it's just json, so that's good. For C# however, I really do recommend using VS cause running anything manually on windows is kind of a nightmare to set up
I was self taught even when it was my job because my boss and co-workers were also not CS-educated and we were all at the same level lol
Definitely better to use Visual Studio for C# mods, but yeah for CP json, you can continue using vscode
VS also has the option to synchronise with github yes
Installing VS right now. I knew the day would come...
It's a struggle at first, but you'll be surprised how quickly you can get a C# mod to work with VS
Much faster than getting packages to work and get a functioning C# compiler in windows
Maybe a stupid question, but can I code .json (CP mods) in VS as well, like in VS Code?
Does VSC do the tooltips? Or allow for jumping to definition or base or implementation via context menu? If it doesn't, I wouldn't try coding with it even if it was easy to set up.
Yeah you can.
You could write a novel in it if you wanted to.
VSCode can do the tooltips with the correct extensions and includes and formatting options but it's a big struggle to get them to work properly
Jumping to definitions will also only work when everything is set up correctly
I wouldn't personally because it's a resource hog and wouldn't have the extensions I want.
Definitely not for a beginner then.
IDK if you mean this on the pic as tooltips, but this is how my VS Code look like right now...
Yeah you have include issues, that'll be quite the hassle to fix
You'd have to properly set up the files in the .vscode folder and give it access to the modding nuget
Maybe that's why I wanted like 3 or more times to start C# coding but never even succeded to start writing a code or even compile the unchanged decompiled one...
recompiling decompiled code almost never works without big changes, that's usually a dead end so dont feel bad if you cant get that to work
Decompiling is only for having a look at how the original code does it
I think he meant just running the example code from the getting started guide?
And I thought it should be the easiest thing to do 
Right now that's what I'm doing, I tried compiling unchanged decompiled mod a while ago, to no succes
Don't use Visual Studio Code for C# mods.
Ohhh yeah if you mean running the example code, with VS it should only take like 10 minutes
It's not decompiled if you're just copying the code from the getting started example. It was never compiled in the first place so it can't have been decompiled.
While installing VS, do I need anything else other than VS itself?
If you can't use VSCode on your platform, then try Rider. VSCode requires a lot of extra work to get it working properly and at best you get a subpar experience.
I've never done a config with a custom tilesheet before. I'm a bit stumped with how to do a map patch config when the map patch includes my custom tilesheet. Like how can I do a recolour config with that?
Talking about this pic
Are you trying to change the map itself or is the map actually the same but using a different tilesheet? Because if it's the latter you actually just need to change your load of the custom tilesheet instead of anything to do with the map.
I don't think you need anything specific installed in VS.
Can I make a map change dependant on a purchase? Player interacts with tile, price comes up, if paid the upgrade is done the next day. I want to make an upgrade-able Greenhouse.
You might want to check .NET desktop, just to make sure.
I'm patching the Town and adding my custom shop (a separate tilesheet)
Oh I've always installed the .net desktop one.
I mean for the different recolours. Is the map actually different between the different recolours or is only the tilesheet different?
Only the tilesheet is different
Then you don't have to touch the map patch. Just change the FromFile for the tilesheet load to include the token and name your tilesheets with the values of the token. Then when a value is chosen in the config it will change which file is loaded.
I know I'm not explaining that very well, want a quick example?
Yes please, I haven't done this before lmao
With the caveat that there might be quirks from the thing you're changing being the greenhouse, I'm going to say yes.
Okay it's not going to be in a form you can copy directly in because it's quick and dirty due to being on mobile at nearly 4am lol. But hopefully it will show what I mean.
Which tools would you use? I'm trying to find something on the Content Patcher and TMXL Map Toolkit guides, but haven't found anything yet.
Code:
Config:
"Recolour": {
"AllowedValues": "VPR, Earthy, Etc"
}
Tilesheet load:
{
"Action": "Load",
"Target": "Maps/{{ModID}}_ShopTilesheet",
"FromFile": "assets/tilesheets/shop_{{Recolour}}.png"
}
Folder setup:
MyMod
- manifest.json
- content.json
- assets (folder)
-- tilesheets (folder)
--- shop_VPR.png
--- shop_Earthy.png
--- shop_Etc.png
i would not use TMXL. it's obsolete
I can't believe there are people who want to write whole mods on their phones that was AWFUL.
People who do computer things on their phones scare me
That's so helpful, thanks so much Aba 
I could never write code on my phone lmao
I have an artist friend who draws solely on their phone, it's terrifying
(I also have one who only uses a mouse but we don't talk about them either)
Writing code on my PC is already a process, doing it on my phone (especially with how organized i like it to be) sounds like an actual nightmare
I really need to learn how to display file structures better than my terrible multi-dash approach.
God, that VS took time to install! And I was already capable of closing it about 3 times...
I should delete the old C# try and start again, right?
You mean the project? Probably worth making a new one, yeah.
Come on wiki I know you've got file structure examples somewhere!!!!
Does anyone know where the sprites for the swaddled baby are (as well as the other baby - not the one that walks around but the one that's sitting)
I realize I forgot to resprite those
I'm going to guess cursors
god
This might be stupid, but where on earth is a button to create a new project?!
Yeah, but in a folder that actually exists?
Or should I create a project with that guide and then move it to correct folder?
Why do you want to put it in a folder that already exists?
If it's to combine it with the CP mod, I recommend not doing it that way.
Not into that folder, but next to it, like SVE, RSV, ES,... have it.
Instead move the CP mod folder inside the newly created c# project folder
That happens when you build if you use the content pack bundling option in the modbuildconfig.
... huh? Is that even possible to use like that? And if so, has it some pluses?
The folder you need to make now should not be in your mods folder
Maybe I found a way.....
Yes or I wouldn't have said to do it lol. Pluses are that you can use your c# project to check that your CP manifest version matches the c# version, that it will ensure your c# mod folder and CP mod folder are correctly organised into a higher level folder for your mod and it will zip them up nicely for you when it builds. Cons are that you can't edit the CP version and patch reload.
Sorry, didn't mean it that way, I was just shocked. Losing patch reload ability is bad for me, so I'll do a separate folder for it.
But if you want to just make a new folder called "YourMod" in the mods folder and plop the CP mod into there and then build the c# mod into it too you can.
I should've been more clear: you can't edit the CP version while you're running the game through VS. So it's only an issue if you're trying to edit the c# and CP at the same time.
So, finally, it should be created correctly and in a correct folder... Now to reference the package.
You can also be like Chu and symlink everything to the point where your original files may not actually exist /j
We can run the game through VS? OH NICE!
(we are able to run the game normally and through VS at the same time, aren't we?)
Yeah then you can hot reload (some) changes.
Yes if you wanted two copies of the game running I imagine you could do that.
can anyone tell me what the first one means, and how to fix the second one?
I ran 2 different SMAPI profiles at once, maybe even 3, and also 2 same SMAPI profiles, so I imagine it should be possible...
patch reload my beloved <3
Liliet did you target net6
finding out about patch reload and also about patch summary asset was great
yea i did
pretty sure i did
0.0
Oh I get that first one all the time too
Turn vs off and on again mayb
oh, vs helped me with the nullable thing, excellent
Makes no difference. Hasn't seemed to affect how it works in game though.
a classic ๐ might as well try it
It being my mod
now it's giving me the same warning 12 times! woo! ?progress?
Did you go up to tools in the menu up the top , then NuGet package manager?
(that was to Dennis)
Yeah, I did, hopefully correctly.
...do you have. do you have the developer .NET 6 installed
thats my best guess rn
And found modbuildconfig 4.3.2 and installed it?
Yes, SDK 6.0.428
Yes.
Oh and did you change the Target framework from 8 to 6?
Dennis just in case can you tell us what you need C# to do for you
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Pathoschild.Stardew.ModBuildConfig" Version="4.3.2" />
</ItemGroup>
</Project>
I think it did...
Trying to write a simple message to SMAPI - I'm learning with C#.
fair enough carry on
Same as me. He wants fun!
yay, it's launching!
Have you tried just doing dotnet build in your project folder, from the command line
...whoops, it's launching with my full mod loadout. i should have probably made a separate profile first lols
I tried it right now, I don't think it's working... (sorry, being in VS for the first time)
If you are getting an error stating The type or namespace name "StardewModdingAPI" could not be found, then it's possible that your game path is not being detected. You will need to set the GamePath property to the game's executable directory. This can be done by adding a GamePath property to the PropertyGroup in your .csproj settings.
You can paste the error you get there
Is that still the error?
It will be easier to read than VS screenshots
That's the problem - I don't get any errors. The command starts, the UI down there changes, then changes back and that's all
But you have 12 errors in that screenshot.
are you in the sln folder
Sorry, my bad. Yeah, 12 in the file, 13 in total, but the building the mod doesn't give me any error.
And I should do that where/in which file (+where it is)?
My sln is in my csproj folder 
Now it built! I have a .dll file now!
(yes, VS, I know I don't have a manifest.json)
Now, worse part - editing the code itself...
Read the wiki pages very thoroughly
That is my advice as a fellow newbie
MyMod
|-- content.json
|-- manifest.json
|-- assets
|-- shop_Earthy.png
|-- shop_VPR.png
|-- shop_Etc.png
(Don't mind me, just dropping a little teaser my upcoming FS mod, while I'm setting up preview images...)
Actual male clothing I weep
that hat! how lovely
stick a feather in my cap and call it macaroni!~
i just love how the feather is escaping reality
The style cannot be contained within the bounds
I plan to make this a very modular FS mod, so that you can put together your own Adventurer outfit out of many tiny bits and bobs.
Badass
it's so fabulous it doesn't even consider borders
I still need to implement some of the fancier hats. These are some of my favourites! (The ones without a green stripe behind them)
the tolp right one
There has been an art hijack of the non-art channel! Help! /lh
For now I'm treating myself to a mug of tea though.
Right
I kinda forgot there was one for art
is that a fur collar
Just imagine that this is that channel for but a moment!
it's okay this is a gray area i think
Yes
those are so cool. also i can't get over the single farmer back in the corner
im trying to look at the hats but i can't... stop looking at them
Don't worry about him. He helps me figure out the dimensions of my FS items-
he's your assistant. makes sense 
is it really farmer back or jsut a faceless farmer with backwards feet we will never know
I should totally add those.
I am all ears

Nah, it's his back
That top left hat is giving me .... Ahhhhhhhh nominal aphasia is the worst!!!! The incredibly flamboyant mercenaries! vibes.
shh dont break the illusion
He has a couple of friends that also offered to help me out.
OMG!!!!
If you have any suggestions for other items, let me know!
Landsknecht!
This is your (likely) only chance to suggest things!
that's a lot of pressure, literally can't think of anything
/lh
Ooh, those do have fancy clothes. Some of the hats I already finished are based on those of Landsknecht's.
You could also ping me later, I don't mind.
this is all I will say
Oh god
Do you have any chainmail?
jester items!!!
i wish to be a clown
like the fancy horned hat
can you use content patcher to make a specific crop, say flowers, have different heads
like head colors
Mayhaps.

There's not enough pixels to really show breeches, are there?
IT WORKSSSSS
me
now just to. add a config option to enable/disable it ^^
pretty sure. vanilla does it with tulips iirc
pls I felt so smart when I frankensteined 4 mods into one with config
I can definetly make that one.
That one may be a little too out of place. I kind of want to stick with the explorer/knight/medieval/cowboy theming.
Ah, to be a Landsknecht...
they invented fashion
I was wondering, you can warp players upon interacting with a tile, but is there a non-C# way of teleporting the player without it fading to black? I want to basically tp to the other side of this gate if you have a ticket
that is... a style
it sure is
Loaded my recolour config into the game. No errors, but changing it in game isn't changing the tilesheet 
It can be changed with GMCM but changes aren't being applied
"Format": "2.5.0",
"ConfigSchema": {
"Recolour": {
"AllowValues": "Vanilla, Earthy, VPR",
"Default": "Earthy"
}
},
"Changes": [
{
"Action": "Load",
"Target": "Maps/{{ModId}}_ShopTilesheet",
"FromFile": "assets/tilesheets/shop_Earthy.png",
"When": {
"Recolour": "Earthy"
}
},
{
"Action": "Load",
"Target": "Maps/{{ModId}}_ShopTilesheet",
"FromFile": "assets/tilesheets/shop_Vanilla.png",
"When": {
"Recolour": "Vanilla"
}
},
{
"Action": "Load",
"Target": "Maps/{{ModId}}_ShopTilesheet",
"FromFile": "assets/tilesheets/shop_VPR.png",
"When": {
"Recolour": "VPR"
}
},``` Does this look right?
Obv there is more code but just included the relevant parts
the only thing I'm seeing that you can do it via token, idk if thats the issue tho
it shouldn't be an issue? this looks fine
what is the issue actually? wdym "isn't changing the tilesheets"
Is there a way to move a selection in tiled? I've made this room that I just wanna move by one block without shifting the entire layer. Do I have to make the entire thing again?
I have a custom shop tilesheet in 3 different recolours and GMCM isn't changing to the different png files
ah well, it'll only change on the start of the day by default
you can change the update rate for troubleshooting
How do I make it so that the change happens immediately?
don't think you can? i suppose OnTimeChange would do that, but just gonna warn you it's not really necessary, the reason the changes are made daily is that so your mod doesn't makes the game lag due to loading something several times, y'know. now that i look at it, maybe i'll work differently when it's one block instead of three? 
You can do OnLocationChange I think
But yeah, lag would be a consideration
"Format": "2.5.0",
"ConfigSchema": {
"Recolour": {
"AllowValues": "Vanilla, Earthy, VPR",
"Default": "Earthy"
}
},
"Changes": [
{
"Action": "Load",
"Target": "Maps/{{ModId}}_ShopTilesheet",
"FromFile": "assets/tilesheets/shop_{{Recolour}}.png",
},```
I'm actually unsure it this will help with that, but it's def more efficient
you're correct
otherwise i would load earthy for all variants, heh
ty
actually the when just isn't needed
Nah, it's still not changing even when the day has changed
What's your folder setup like
Hi loves! I cannot seem to remember, is there a list for all characters? Like, Game1.AllCharacters, or something?
I can't be stopped, I just sent another PR to a C# mod.
-# This one wasn't even Better Game Menu compatibility, I just wanted to fix its performance.
Utility has a method to iterate all characters.
Iterating all characters is literally iterating all maps looking for all characters btw
Send me a PR?
Fix my performance?
can you fix me
Man i wish i had gotten into making mods for sdv sooner 
this is like the most fun thing ever
(sure i get frustarated but actually getting to each goal is so fascinating to me)
Does the folder structure look ok?
Hm it doesn't look like you are loading the tilesheet from outside content pipeline at least
Assuming your cp is something like this
Can we see your map
you mean a screenshot or the tmx?
I'm just wondering - do I need the extra shop_Earthy.png in the Maps folder... is that causing complications?
Need to see what tilesheet the tmx is trying to get
If you have the tilesheet in the same folder with the map that points to it, the map would always use that tilesheet no matter what you load via CP.
Oof!!! That's possibly not quite what I want to do, perhaps! I am trying to interate over every character the player has friendship data with (and cannot somehow recollect how to do that).
Oh! That's really good to know
Basically, I am trying to iterate over FriendshipData, and today, my mind cannot frame how to do it. The game typically approaches it with a Name, like, if who.Friendshipdata.Contains(Name). I am trying to iterate over all the names in it, not approach it with a specific name.
(And I apologize for the neediness, my brain is overloaded and functioning poorly right now, but this is when I have free time to work, so I am making as best use I can!)
it's a dictionary of npc names to their friendship data
iterating over Game1.player.friendshipData.Pairs should give you the keyval pairs
But when I take it out of the Maps folder and use the one from Tilesheets instead, I get a SMAPI error "The tilesheet couldn't be found relative to either the map file or the game's content folder"
This is what we suspected then, you were editing the tmx against shop_Earthy
Instead of the proper loaded target
Easiest fix is to open the tmx as text and edit the tilesheet name inside
I want the default version to be shop_Earthy though. I just don't understand how to fix this error now
And I'm sorry for all the questions, this is a new area of modding for me 
You are loading the tilesheets conditionally to a target named Maps/{{ModId}}_shopTiles or something like that right
I'm loading to the target named Maps/{{ModId}}_Town right now
So while editing you need to have something like
MyMap.tmx
8BitAlien.YourMod_shopTiles.png
And then remove this png from actual mod folder
Adapt the names to what you actually use ofc
Right ok I understand!
Oh, there's a SMAPI error now saying the tilesheet couldn't be found...
This is doing my head in lmao
We r still at the part where we gotta get the tmx to point to the right loaded target
It's difficult to say which part went wrong since it's all very fiddly, not your fault
(just in case since it was only answered 5 min later here's the answer: #making-mods-general message)
I'm trying to make a mod that can multiply the monsters everywhere, farm/mines/caverns/ginger island. i haven't been able to find a tutorial on something like that
if anyone could point me to one i would be really greatful
What does multiply mean
say that there's 4 monsters. i want double that, making it 8 monsters. but i also want to be able to change it to more than double
Thx so much Selph and Chue and everyone!!!
(I didn't do anything
)
Farm Type Manager can do that, with some effort, I think.
So i think the no C# way is to make a Farm Type Manager pack, otherwise you gotta do C# to change spawn rates everywhere
Oh yes, indeed, you are right, or it will not be a double of what is!
The tmx is loading shopTiles.png which I have in my Maps folder temporarily and then I take it out when I'm loading the game. Is that right?
I am going to bed before I spread any more nonsense! Good night all!!!
FTM limitation is that you would need to explicitly say what maps you want to spawn more stuff
this is good to know! i'll look into this
Can you send your json
thank you
And also note how i had to put the mod id in the file name up here
Bc that's your actual load target
hello
alright
So the Mod ID goes in the tmx file itself?
Yeah
source="mushymato.BuyAllVanillaAnimals/SewerChickens.png"
My load target in cp is {{ModId}}/SewerChickens
Ahh that makes sense! So I can take Maps/ out of my target?
Oh so my load target in CP should be Maps/{{ModId}}_shopTiles?
Yeah
(Polysweet works fine after you delete the tilesheets from the Rooms mod directory, btw)
(I've been saying this for a while)
It's still not working Chu 
This is my CP Load ```{
"Action": "Load",
"Target": "Maps/{{ModId}}shopTiles",
"FromFile": "assets/tilesheets/shop{{Recolour}}.png",
},
send ur tmx or at least show what <image says
incorrect
<image source="shopTiles.png" width="122" height="101"/>
need
<image source="yourliteral_mod_id_shopTiles.png" width="122" height="101"/>
cannot use tokens here btw
It's all working as it should! Thank you very much for helping and being so patient Chu, you're a star 
funny moments in debugging: when the shadow under your guy is almost the same color as the outline of his butt so you think you've created a new and unusual weird bug
"why is my (too-small) offset smearing his butt down to the desk"
Thatโs awesome!!!
local levitating sheriff
sheriff?
I swear I've been working on him before Law and Order SDV came out
but yes, this is Bill
this town is big enough for infinite number of sheriffs
I was trying for like an Andy Griffith style uniform/building
dw that's not what I meant
I was just curious
I'm really happy with the municipal building
even got it in a decent spot for compatibility
(Two cakes)
I still find it funny ichor joined maincord right when the hat mouse event was going on
alright bill let's see if I got your butt in your chair this time
Wait really??
ichorlore...
just about right, need to fix a little at the top of the desk. But at least the position is right
perf
how do I know it works?
i guess you need to get your special order onto the board right
isn't it random
could try this mod
toggle on infinite rerolls
I'm so glad that Nexus did proper QA before forcing us all onto the UI update.
]
hi hello i'm back with more event questions. how can i get the farmer to sit normally? before this they refused to sit at all and were just walking in place forever, but now when sitting their head turns up instead of facing right.
event json: https://smapi.io/json/content-patcher/286f4dbe48cf4f34b779b2a73fe844a2
relevant portion: speak CharlesRowland \"It's safe, don't worry.$h#$b#Come on over.\"/advancedMove farmer false 2 0 0 -4/pause 3000/faceDirection farmer 1/animate farmer false true 500 117/positionOffset farmer -48 32/pause 1000/speak CharlesRowland
(It's not just the bracket being in a silly place, but the fact that the entire area stays clickable, thus toggling bbcode editing mode if you accidentally click anywhere near there to edit text)
Do co-op farmhands have any durable identity? I'm not sure I remember correctly but I think if you quit and restart the game, skills and hearts and such are only saved for the main player?
Coop farmhands are the same as mp farmhands I thought
Game1.player.UniqueMultiplayerID?
How would you rejoin as a specific player, though?
Granted I never actually get very deep into testing since it's so painful to do, but IIRC you just sort of... join. Is it some sort of most-recently-played heuristic?
i feel like thats something steam handles right 
Huh... Steam? No, I'm quite sure it's not, since Steam isn't the only platform.
as a specific player i mean
when i test on my own with 2 smapi i can just join as any farm hand i thought
as long as i got cabin
I asked about co-op, though.
Maybe I have to slog through this again, I don't remember being asked which cabin or anything like that.
so in the top window (host) i just built a new cabin
and then in the bottom i could either join as N who belonged to cabin just off screen or New Farmer
Hello! I'm in the process of creating a custom NPC and was wondering if it's possible to add a cutscene where the NPC requests a quest from the farmer. Then, once the farmer obtains the requested item and gives it to the NPC, it triggers another cutscene. I'm not quite sure which tool I need to use for this. Any help would be greatly appreciated!
theres a homeLocation on player
that stores either just FarmHouse or the instanced Cabin interior FarmHousea5c7615a-1ce4-47de-8716-caa29b0e2ded
i just dont think game itself does any association of farmhand to client
Hmm. I guess I never got beyond "New Farmer" because that would require actually playing through a day and saving it.
You're sure it works the same for co-op though?
you can do something close by having the event giving the farmer a quest
steam is currently broken for me so sadly i cannot confirm how it works for remote
and then having the quest setting a flag once completed, flag that can be used to trigger an event
you can do this with events: https://stardewvalleywiki.com/Modding:Event_data and triggeractions: https://stardewvalleywiki.com/Modding:Trigger_actions
this is just how it goes in local lan
I don't care about remote, I'm asking about co-op.
directly triggering the event is technically possible but i never tried to see what happen if you try to trigger event with non static npcs
Thx a lot!
like split screen?
Maybe I should be saying "split screen" instead?
yea thats my confuse
Ok, then yes, that is what I meant all along.
you get this join as list o farmers in split screen too i think
Alright
Makes sense, I guess it is obvious once the game is actually saved with a farmhand in it, I had only seen the "new farmer" part before.
Pelican Town Food Truck has finally arrived! Chef Elm will visit Pelican Town each Monday and Thursday to sell her delicious cooked dishes and other treats
https://www.nexusmods.com/stardewvalley/mods/32274
you might want to post this to #modded-stardew too
Will do. Thank you for all the help in the recolour part Chu - I was going a bit mad lmao
Congrats on the mod :D
Where does everyone get that adorable scroll art for their mod pages
https://www.kdau.com/scrollish/ (though personally I think the whole in-game-banner-as-mod-art trend is getting played out)
ty! :D
(I think the scroll art is actively bad for screenreaders)
I think the scrolls and banners are a cute touch!
YMMV as always, but I have stopped using them personally and I'm probably one of the worst here at creating original art.
(Also, if you've ever seen stumbled on an old mod where the image host died or the images expired, it's just a sea of red Xs)
if u upload the image into the mod page u can then use it and trust it to not die 
i dont think people do that for scrolls tho
Yeah, I do that for essential screenshots, but banners?
If you do that then they'll actually show up in the image thumbnails which will look pretty silly unless you can bury them under 50 other images.
Now I'm curious if anyone's actually done it.
People used to host them off discord
Discord (reasonably I think) put a stop to that
I think if I were to do it I would use github
Huh. I didn't realize hotlinking to Discord was ever possible in the first place.
But I'm quite proud of my zero effort mod pages, lol
(Are you sure GitHub allows image hotlinking?)
(No, but I'm quite proud of my zero effort mod pages lol)
I'm not sure if posting it in Discord like that is a valid test, since Discord makes a copy and hosts it on its own CDN.
Have to try from an actual website external to GitHub (i.e. Nexus).
Pretty sure imgur keeps the images forever right?
As long as you've uploaded them with an account iirc
Imgur blocks hotlinking.
Maybe it's not blocked on every site (yet) but I wouldn't expect any imgur hotlinks to last indefinitely.
(If you're testing your own image then you also want to make sure it's not in cache, since a cached image will show up even if the hotlinking is blocked)
perhaps u can try https://www.nexusmods.com/stardewvalley/mods/31319
What's a better way to do it in future then?
but i did check in private mode
Anyway GitHub might actually work fine, it's just another case I wouldn't really trust since GitHub isn't really supposed to be used as a CDN or cloud storage and might not like users doing that.
Cuteeeeee
The best is to host them on Nexus itself as uploads, as stated earlier, otherwise use an image host that explicitly allows hotlinking.
i own blueberry one million us dollars in royalties for the idea
i wonder if there is way to host a scroll generating service 
would just have to make the endpoint give a image right
That's what the scroll site does... just doesn't allow hotlinking.
Well, more accurately, it doesn't actually save your generated image to its own server, as far as I know.
I just use imgur ๐คท๐ฝโโ๏ธ
yea i was imagine like
Someone has done a Spanish translation for Pelican Town Food Truck already lmao
chu.server/scrolltext=yourtext and it is give back png
hopefully without saving anything to chu.server itself tho
Is it normal for people to do this and not ask for permission 
these really fast TL r prob automation
Yea, checked their page and they have a few spanish translated mods
you can report them if you don't like it
I only have had one person do a translation and they asked fwiw
I think I will report it. How hard is it to ask for permission 
No I get it but... why. It uses just as much bandwidth, probably a lot more bandwidth because no edge caching, and vastly more compute power, while saving a trifling amount in storage (most of these scrolls are under 1 KB).
It is not required for translators to ask permission to translate and we shouldn't try to set any kind of standard like that.
i dont want to see what strange text other ppl are writing to this theoretical scroll gen
That is assuming it's a proper translation (lang.json file) as opposed to those weird BS translations that copy the entire mod.
it is true that there aint much point tho 
translations are derivative works, so the copyright owner does have the right to decide who gets to distribute them
You could always randomize the file names.
Or make it a hash of the text instead of the actual text.
wouldnt i still have the actual image tho, in this setup
i am perhaps think too hard about preserving customer privacy in an unimportant service like this
To clarify about the Discord stuff earlier: you can still hotlink an image posted in Discord, but the link automatically breaks after 24 hours.
https://dummyimage.com/
https://place-hold.it/
if its a serious idea you can look at how these sites do it. or the first oen at least. dunno where the source is for the second, but its adapted from the first
You only said that you didn't want to see them.
That's so strange. I was just going to report and they removed it themselves lmao
Hypothetical privacy concerns would be a matter of not storing any PII with the images, different issue really.
it is not a serious idea but i appreciate the links anyhow
looks like they r keep standard sizes forever and then caching nonstandard for 24hr, if i am read it correct
i didnt read it at all so. sounds correct to me or something. or not maybe
ah nope the standard sizes is just keywords to dimensions
Honestly I think the concern with these things has never been "it's hard to code" but rather "who is going to pay the hosting/bandwidth cost".
just chuck it up on aws and when you suddenly get a super high bill ask support to remove it bc you made an oopsie 
("not that I've ever done anything like that...")
yea and if me, random unaccountable internet person, suddenly take my scroll service offline
all these mod pages explode anyways
i checked where pathos put his pufferfish headers and its also just on imgur
https://imgur.com/suHzq2E
https://imgur.com/suHzq2E
i absolutely did. it was wild
It looks like imgur didn't ban hotlinking outright, they've just capriciously banned a bunch of sites from hotlinking based on unspecified rule violations. I really see them as a gray area, they are trying very hard to market themselves as a sad imitation of social media instead of a plain old image hosting site.
you crossed into the mouse dimension
the real mouseverse was the friends we made along the way
I got fishing to work too 
Spacecore made it real easy
A+
...in a schedule, I mean, not just... the thing you do ingame :V
i prefer to use imgur for hosting mod page media, if you upload directly to nexus you get a sea of base64 soup in your bbcode which is terrible
Also using the scrolls like this :D https://staticdelivery.nexusmods.com/mods/1303/images/32164/32164-1741651753-1856501389.png
Loks much better than just the image haha
definitely spurred by the nexus issue where every base64 or whatever character contributes to your character limit in the posts section and breaks the page
Editing mod pages is like pulling teeth sometimes
aaand Save. Okay, lets check the mod page... half of it reverted to zero formatting cool
definitely best avoiding the wysiwyg editor for editing and just using it as a preview, do all the work in bbcode
I thought that was only me being a totally noob at it
Nope, it has sucked for years
v2.0 posted :D Now includes seasonal variants, giant crops and special trees!
Wha? What character limits, what base64?
I didn't even know you can upload directly to the bbcode editor what
sure you can, it just bakes the whole image into text right into your page/post/comment
on the plus side it means you're not relying on any hosting services, but it also means the text content is absolutely immense if you have a lot/large images and editing turns into a huge ๐ฅ when you need to update/replace them
Do i want to know what LoC page bbcode looks like
No
well as i said i prefer imgur so it's not that bad
and since i do the bbcode manually it means there's less [size=3][/size][size=3][/size][b][/b][size] everywhere from when the wysiwyg editor had a fit over something or nothing
Can anyone tell me which property of the Stardew Valley map, for example:
private void OnAssetRequested(object? sender, AssetRequestedEventArgs e)
{
if (e.NameWithoutLocale.IsEquivalentTo("Maps/Farm"))
{
e.Edit(asset =>
{
var editor = asset.AsMap();
});
}
}
I want to access the FarmHouseStarterGift property that is in custom properties in tiled, is it possible to edit this property here or is there another way to access it?
I think this is the correct place yeah
editor.Properties["FarmHouseStarterGift"]
this should be what you want
I found out it is editor.Data.Properties
Does anyone know what "particular speed" translates to in reality?
iirc its how much more transparent it gets per game tick
It's the speed of an unladen swallow
so not a guaranteed specific time calculation, though usually predictable enough
Or what Button said
itll subtract that number from the alpha value of the fade to black per tick
(Alpha goes from 0 to 1)
ah so "at some damn speed"
Default does the full fade in about 2.5s
Congrats on the mod release! Do you mind if I DM you about something?
(Also the scrolls are cute but because Nexus doesn't have alt-text, they're not readable by screen readers. I suggest putting the content of the scrolls in plain text underneath the scrolls too so it's accessible for people with vision impairment
)
Thanks! And yea sure you can 
Hi, Iโm a beginner, I wanted to ask what type of mod would be the easiest to make?
Anything that just replaces existing content like portraits or dialogue, I would wager
i started with replacer
yeas!
a content patcher mod to replace something simple would probably be easy its what i started with
That would get you to learn some of CP's patching syntax, how jsons are set up and such
Make the mod you want to use
thats also true lol, making something you want would make it easier to get through
Even if it's hard if you really want to have it you will figure it out
People here will help

everyone here is super helpful and will do what they can to assist when you need!
lots of really nice ppl 
Thanks! Iโll probably start with a sprite mod, Iโll ask again if I have any problems.
I started with AT mod but i have no code knowledge so it's super easy
is there a way to set an item as universally hated or would i have to patch that for every villager ever
Now I'm tapping into fixing compat map bugs with the help of one if the many amazing modders here, bless their heart for their patience
It's exciting
nice!
cause like i figured gifting someone a poisonous flower tea would be universally disliked lmao
Can game state queries use tokens defined in a config file? I've got a building with different skins that show up separately in the carpenter's shop, and I was wondering if I can use the "Condition" field per skin to make them only show up if the player has them checked true in the config file or would they need to be individual EditData sets with a "When" condition?
Anyone know if there is a way to put an item in a machine and get the exact item back in return? I basically just want a machine that adds smoked_item effect and adds value over time. Using extramachineconfig
well i recommend the individual EditData way
it's a bit silly to have extra not required data 
however it is possible to use tokens in a game state query Condition field if you want
since you have a true/false token, they directly correspond to the TRUE/FALSE game state query already, so you can just put your token in the field i think
use DROP_IN
this one's a vanilla thing
I was musing on which would be better; Condition sounded interesting as it meant you could remove the skin from the shop but still have it on a building, but When does sound cleaner
well i would argue as a player it'd be confusing to still have the skin on your building even though you turned it off in gmcm
would it not break things if you had a building with a skin and then turned off the skin later, when using When conditions? why make skins conditional at all, anyway?
i think game checks itself
in BuildingSkin GetSkin
when i made a skin conditional, there was only 1 toggle and it was between "replace base building no skins" and "do not replace base building add as skin"
If I'm understanding the wiki correctly, Condition would allow skins already on buildings to stay, it's more that it turns off access to them in the building menu, while When is whether or not they're patched into the game period.
i understand that Condition wouldnt break things, i meant removing the actual data from the game itself via a When
i know what the difference is
i was concerned whether removing the data from being patched at all would break buildings that already existed with it, since its not a matter of "not conditionally accessible anymore" but as you say, n ot at all in the game
but if it does check itself and chu is right, then its fine
Gotcha, sorry.
but id still wonder why you'd want them to be conditional, since a player can simply choose not to use em
I was wondering if When would break things, I'm really not sure
So, my mod is the Alternate Sheds, which uses the various Cabin skins as skins for a new type of Shed building. Each skin shows up as their own entry at the Carpenter's shop, because if they're not then they don't keep their skin when you upgrade. But it does mean there's a bunch of them in the Carpenter's shop and you have to scroll past them if you're flipping through. A commenter asked if I could add a config condition for each skin, and I actually get it
Ah, so for anyone curious, if you turn off a skin that's already in use the game defaults the building back to the standard skin. Not a red or even yellow line in SMAPI
idk button i think selph already submitted the trademark application on that one
did they? i mustve missed it
What could be causing lumber to spawn in my maps?
selph is working on a custom builder npc mod
idk if the plan is to touch the build menu too
And it just shows an overlay graphic
say does your sheds all have same skin Id
in both tiers
Yes. Is that good or bad
As in the Beach skin for both the Shed Deco (first tier) and Deluxe Shed (second tier) are both "Beach Shed"
ig upgrade still wipes that somehow huh
unfortunate
oh hm nvm i misunderstood what you mean 
anyhow if u think configs is good then configs is good 
and you can decide how you want it to behave between using When and using Condition
I went with When
But yeah, I tested it a dozen ways across two mods, if the skins aren't separate construction entries, the upgrade turns the building back into the default skin. But as separate construction entries I do get to give them different construction materials per skin, which is fun
My other mod is the Buildable Camper, and I just kept that to one entry so that's what it does, but this one felt better as separate entries.
i fussed around with this and no matter what i try i can't get the farmer's animation right. is there something i'm missing when animating the farmer?
Ooh freaky. Are there any vanilla events where the farmer sits that you could look at for reference?
hmm good question... is there one with alex at the saloon maybe?
it's been a while since i got to high friendship with anyone lol
There's the date night one, yeah
Probably easier
I think doAction is how they're making the farmer sit? Unsure though
If you doAction on a chair tile, I think that will make the farmer sit
(doAction on a door tile opens doors, so the logic makes sense to me)
i think the game starts the farmer already sitting because the showFrame is the very first command after skippable, but yeah just using showFrame made the farmer continue walking in place on the couch, so i'll try doAction
...hmm still walking in place
speak CharlesRowland \"It's safe, don't worry.$h#$b#Come on over.\"/advancedMove farmer false 2 0 0 -4/pause 3000/faceDirection farmer 1/doAction 6 6/positionOffset farmer -60 40/pause 1000/speak CharlesRowland
replacing doAction with showFrame has the same effect, and replacing it with animate makes the farmer sit down but their head is turned up
i feel like the advancedMove is the problem somehow because it gives me trouble in other events every time i try to use it
What if you remove the advancedMove temporarily and just focus on getting the farmer to sit? You could warp them there instead or just try to make them sit in thin air.
doAction still doesn't appear to do anything when i take the move out, but showFrame does! so the problem is probably with the move then i think?
there's a StopAdvancedMoves event command too if they're trying to continue walking that might help
that worked! i also moved the faceDirection command to be after stopAdvancedMoves and it fixed the farmer's broken neck yay
I have reached the end of the day and my NPC's schedule acted right the entire day. haven't done any of the alterations based on day or anything yet, but he no longer sits and stares at his sea urchin tank
Good morning. Is there a mod that uses all of GMCM's functionality (particularly color picking) that I can look at to see how the configuration is handled?
GMCM doesn't have color picking
it's on a screenshot of it, yes
but it was never a concrete component
it must have been a custom one
Aha. I know there's mods that use it through C#, but I was hoping it could also be done through CP.
PIF uses GMCM color picking using GMCM options iirc
but that's a different component really
(and still using the custom functionality)
the screenshot seems to have been a color well that would bring up a dialog for color picking
that's how it looked like to me
did that actually ever work? no clue
since all we've got is a screenshot of nowadays non-existent functionality
imo a bit of false advertisement ๐
but yeah. GMCM Options is a separate mod and CP doesn't include its functionality
I couldn't find documentation on the full range of functionality that GMCM offers through CP... Did I overlook it?
I know I spent some time trying to figure out how to access the color picker that doesnt exist as well
Oh bugger, I've been looking in the wrong place. Cheers!
Can I use i18n keys for default values under ConfigSchema?
the above page has this info
you can't use any tokens at all, but you can use the predefined i18n keys
Is there a way to block Automate from affecting a certain machine?
How can I get an actor to open a door in an event? Would it be a DoAction?
Users can do it from the automate config i think
Is there a way to do it from the mod's side?
That i don't know unfortunately but since users can i would assume there must be a way from the mod's side too
why though?
I have a machine that errors when attempted to be automate'd, but it was never meant to be automated in the first place so I want to block it
what's the machine though?
i can't think of a machine you wouldn't want to be automated
Trinket Workbench, it turns trinkets into trinket rings(added by VPP) and back to regular trinkets
ah
i'm still not familiar with trinkets, but it does sound like something you wouldn't automate
Yep, its why I want to block it since there's no meaning and only errors to automating it
with c# i think you can define a new non-producing factory definition for your machine, but other than that automate appears to handle everything through the config rather than a data asset
Is there a way to test my codes in real time?
Or at least get the error messages without starting the game
no, you need to run the code to get error messages. If it's taking too long to run the game each time though, there are things we can help you with to make it a bit quicker?
I haven't started learning how to build mods, just wondering.
Thanks for the help : ) I'll post my questions here if I have any!
if you're making a C# mod, you get told right away if anything fails to compile. successfully compiling doesn't however mean it will work at runtime, no way around that - you still gotta run the game and check
if you're making a CP mod, the SMAPI site has a basic validator. but again, it only checks if the syntax is valid, but your actual edits still have to be tested at runtime
yes, that's a good clarification, thank you! basically what we're saying is that some errors do show up without running the game but to actually test the mod you do need to run it.
so because im trying to learn how to make The Best Mod while im doing this, I've added config - I think I get how it works - and now I'm trying to add i18n, and I'm absolutely stuck on this part
(C# mod)
I've added the ModTranslationClassBuilder package
but now I'm not sure how to. Actually add the i18n file
like. should it be in the project in a folder named something specific?
you don't necessarily need that package, i've never used it myself in any c# mods with i18n
