#making-mods-general
1 messages · Page 409 of 1
The tsx doesn't matter, game only checks the source
Need to make sure you dont have the sheets in the folder
Nope, I don't have them in the folder either
Try using the season gsq
To validate that you are definitely in a particular season
debug gq SEASON Here Spring
Hopefully i spel right
I have no idea why but its working now after a game reboot despite not changing anything
Thank you again for the help and sorry for the bother. I think my first mod is basically done so i shouldnt be bothering much anymore lol
mystery! hey it just works
can i combine two image edit patches into one by combining the targets, like so:
"Target": "LooseSprites/map_{{season}}, LooseSprites/map",
oh wait no that still wouldn't work because spring wouldn't pull from the correct image
please why can't the spring world map be stored in LooseSprites/map_spring 
is that something reasonable to request in 1.6.16 or would it involve more than i think
I just wanted to share my first mod, thank you for answering my noob questions the past couple days chu√e, nic, Button, Lumina, and Bea.
https://www.nexusmods.com/stardewvalley/mods/37103?tab=description
blacksmith time
Been working on a C# tool that will stitch together 'random' NPCs with all of the available animations using the games assets - took a bit of work to get here and it still has minor bugs, but I feel like it's in a good place to showcase a little bit. I was having a ton of issues trying to accomplish this in-game to use for a mod so I decided to just accomplish it externally
Bus Stop Fence Inc. diversifies their business
did u want showcase
wow, alex looks different these days
that is not alex, it's Leon, his long lost cousin
Nah its my first one but thanks!
Is there a legend somewhere that has visual Ids of the stardew hairstyles?
Questions regarding the Projectile fields in Data/Weapons: Can I load my projectile SFX like a regular asset or do they need to go through Data/AudioChanges and can I use my own tilesheet instead of Tilesheets/Projectiles?
The wording here is a little dubious.
these take cue names, which means you must load it via audio changes if custom
you can try them out by putting in vanilla cues like "yoba"
Good to know, so one of the very few excerpts I managed to search here was wrong. And the tilesheet?
that's sorta hardcoded
to use a custom tilesheet as the bullet you need to add it as an object
here's an example of a weapon that shoots milk
Oh, I was about to go nuclear and replace an index in Tilesheets/Projectiles
That'll work perfectly, thank you
would it be possible for someone to help me out with why smapi says this even though my manifest looks fine
!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.
Specifically of the manifest.json
It's very likely you missed a quotation mark or a curly brace or something that is making the UniqueID field in ContentPackFor unrecognized
actually, can we see your entire log?
!log
Important note: Your computer username may appear in the log. If your username is your full name, please be aware of this before uploading it.
Please share your SMAPI log file. To do so:
- Open this page: smapi.io/log.
- Follow the instructions at the top of the page to upload the log file. (Don't copy & paste from the console window!)
- After uploading, it will show a green box with a URL to share. Post that URL here.
Please do it even if you don't see any errors. This has useful info like what mods and versions you have, what the mods are doing, etc. If the issue didn’t occur in your last session, please load the game to the point where the issue occurs, then upload the log.
your manifest looks correct so double check if the mod folder has right one
ohh thank you i just checked and the manifest file in the mod folder seems to be an older save i made of it
i didnt realize
I've been coding for a couple hours now and wanted to do a little test launch to see and got three errors. Have I made an error or is it because the mod is still incomplete?
well, do you have those files?
I'm pretty sure, I've made the Sprites and Portraits and named them exactly that, I've made the pixelart ontop of an existing NPC to make sure I get the size right aswell. And about the dispos file, I'm trying to fix that right now
are they in the matching folders too?
are they actually .png files, or are they .png.png files?
assets/images, right?
can we see a screenshot of what’s in that folder?
are you on Linux (or Mac maybe?) where it may be a case sensitivity issue?
re thin
Nope, I'm on windows
ahh sorry my keyboard lagged lol
sure thing*
those appear to not be named SkottPortraits.png or SkottSprites.png
they aren’t named the same thing
so, you do not have those files
Yeah, I tried changing it by removing the 'Skott' but that didn't change anything
a good idea when asking for help with an issue is to not change things between the error and screenshots of your setup
I’m not really sure how that would help tbh, but you should add that back
oh my gosh i found the error
also, you should really turn on file extensions
Ah I'm pretty new to modding so I don't really know how to or what that does lol
!fileextensions
Windows and Mac hide most file extensions by default. If you are creating or updating mods, it's helpful to show file extensions so that you can be sure all mod files are named correctly.
To show file extensions on your computer:
On Windows 10, open File Explorer, click on the View tab, then check the File Name Extensions box.
On Windows 11, open File Explorer and click on View > Show > File Name Extensions.
On Mac, open Finder, and in the menu bar, click on Finder > Settings (or Preferences) > Advanced, then check the Show all filename extensions box.
Someone may find this useful :D
Ah thank you, I'm doing this without C# though! I was told it was possible with only using VScode and Content Patcher!
Oh, that must have been weird timing I wasn't replying to you 😅
Oh😂
This npc generator paired with that portrait creator, fully custom NPCs - albeit basic - can be spun up real quick now :D
Ooh that's pretty cool!
wow that was fast lol, uhhh it doesn't actually support custom overlays at the moment since noone ever mentioned it over the last 5 years. probably wouldn't take too long to implement
what can i say ....mushrooms....they call to me 
currently simply adding objects as propagator inputs is fine, just need to add their object ID to the Mushrooms dict in the data asset. which could also probably be replaced with a list of item queries
it'll just draw the object sprite over the top as usual, rather than the growth overlay sprites
neato yeah have been on break for a bit but i had been thinking of diff ways for players to obtain the mushrooms from my mods so this is perfection
i have a bunch of them as crops atm but id prefer something more like mushroom spawn/inoculation so the logs are awesome
you'll still need the original mushroom to reproduce with the propagator log, but it does let you get more lol
yeah precisely! since i prefer having folks forage for stuff 
whenever i dont have a crop equivalent for something folks are bummed and i know i could ignore that BUT i like the idea of a way for you to obtain them but maybe works a little more like irl
regardless ty for the info / response!! hehe i am excited to try it out 
Hi! I'm making seasonal custom maps. I'm not getting an error code however the .png is not being switched out for each season and seems to be permanently in spring. Is there something I'm doing wrong?
https://smapi.io/json/content-patcher/a751820858db437b8b8b4d5d17d0b317
Do you have any tilesheets in the same folder as your map in your mod folder?
Yeah
Then the map is using the tilesheet from that folder instead of the one in the game
So even though you're replacing the one in the game with the next season, it doesn't matter because the map isn't using those.
I recommend changing the name of your tilesheets to spring_AV_OutdoorsTileSheet.png (etc) and putting them in a Tilesheets folder and Loading them from there. Having the season name at the front will make the game automatically look for the appropriate seasonal sheet without you having to do those EditImage replacements (provided the map is an outdoor one) and having the tilesheets in a separate folder from the map will let the map use the right one.
ooo okay I'll change the naming system
so even though I'm trying to switch my own tilesheet for each season it won't work because it's in the same folder? (sorry I'm still learning)
if its any help this is my maps folder
Yes, that's correct
The way it works is that it checks inside your map folder for the tilesheets first and only if it doesn't find them there does it look inside the Maps/ folder for the game.
Since it's finding yours, it's using that.
Also, you don't have apologise for learning or asking questions. That's what this channel is for :)
Okay haha thank you I feel silly sometimes. Let me see if I understand. So for my map I have the "AV_Spring_OutdoorsTileSheet.png" as a TileSeet used by the map. The reason it isn't working is because it's in the same folder as the other seasonal variants?
(oh and yeah Outdoors is true, the regular game assets are fine it's just my tilesets that are always in spring vs seasonal variant)
thank you so much! I'll go ahead and make the map again with the renamed tilesheet then move stuff around so it's not in the same place 
You don't have to make the map again
Just change the name of the tilesheets, then edit the tileSET in the map to point to the renamed tilesheet
oh you can?? how do you do that? 👀
What I do is extract all the game files, then do all of my map work directly inside the Maps/ folder of the extracted assets
Picking sheets from there just works for me once I move and test them
I used to have a mapmaking folder but iro's Tiled plugin makes it possible to use tilesheets from anywhere without tilesheet climbing so I just do that now
Moving custom sheets to the Maps/folder works as well, since they all just call to Maps/Tilesheetname.png anyway
Right-click on the tileset name and choose Edit tileset. Once you're in the tileset, click "Edit" on the Image line.
ah this is perfect!! I'm gonna go try this out
thank you both so much!

You're welcome! Now, once your tilesheets are in a different folder you won't be able to edit the map anymore unless you move the map into the tilesheets folder while editing and then move it back into the maps folder while testing in game (or vice versa with the tilesheets) OR you download iro's plugin to let you grab tilesheets from another folder.
I will grab links to the plugin now
This is the file to download and put in your extensions folder (which you can get to by going Edit -> Preferences -> Plugins -> Open...
oh perfect! is it the nexus mod or is it the tilesheetinator.js?
The tilesheetinator.js
Hi, I'm here again. This time I would like to ask, "mushymato.MMAP_CritterRandom <chance> [<critterType> [type-dependent args]]+" - how is this used?
I tried writing the following code, but the result was not satisfactory:
{
"Action": "Load",
"Target":"{{ModId}}/critters/butterfly",
"FromFile": "Assets/Image/Texture/AD.Butterfly_{{Random: FlashBlue, LunaMoth}}.png"
},
{
"Action": "EditData",
"Target": "Data/TriggerActions",
"Entries": {
"{{ModId}}_MapButterfly": {
"Id": "{{ModId}}_MapButterfly",
"Trigger": "LocationChanged",
"Conditions": "LOCATION_NAME Here CustomMap",
"Actions": [
"mushymato.MMAP_CritterRandom 1 Butterfly {{ModId}}/critters/butterfly 8",
]
"MarkActionApplied": false
},
}
}
I have tried a simpler version of "mushymato.MMAP_Critter [<critterType> [type-dependent args]]+", and small creatures can appear normally.🥲
!json you can send json with this
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.
anyways this will give you 8 butterflies at every tile on the map you sure you want that
No, I was just trying it out to confirm that this butterfly appears on the map. After that, I'll adjust the occurrence probability.

the first argument chance is a float, it is chance per Back tile so you probably want like 0.01
as for whether it's not appearing, you can try this smapi command first
debug action mushymato.MMAP_CritterRandom 0.1 Butterfly youractualmodid/critters/butterfly 8
this will verify whether you wrote the action correctly
Some minor kinks to work out, really pleased with how this turned out
Can generate as many usable NPC sheets as you want real fast
So that's how it is. I thought there was something wrong with my "condition" or "trigger", so I'm going to try it right now.👍
Is there any way to add a diggable artifact and have it not show up in the perfection screen for artifacts? In my mod I got the artifact working correctly and tagged it not donateable to the museum (because I'd prefer it didn't have to be donated), but its still showing up in the artifacts and minerals area of the menu. Was considering trying to make the game think it has been donated once the item was found, but I can't find info on if I can do that or not.
no thats just an issue with the vanilla game
I see...so I either have to make it donateable (and expand the museum?) or find another way to add my object.
you could just make it not categorically an artifact or mineral
Isn't it only possible to make an object findable in an artifact spot by making it the 'arch' type or am I misunderstanding that?
you can just add anything to the default artifact spot list
Oh, okay! That would make it easier lol
i dont recall but i thought there was even specific reason you shouldnt make an item arch
you can edit Data/Location's Default location ArtifactSpots list
Okay, I'll try that out. Thanks for the help!
this specific problem and the hardcoded gift taste for penny/dwarf are the only two that come to mind, but it wouldn't surprise me if there's a worse one
"Caution: adding custom items with the Arch type is inadvisable as it often leads to artifact spots becoming broken and not giving any items. "
this is on the wiki
i have no idea what it means. no idea what kind of broken. as far as i remember its been there since i started modding SDV. no clue if its outdated
that sounds familiar and i bet it dates from 1.5 or maybe even earlier
the ancient texts with none who yet remain to decipher their meaning
superstition passed down from one generation to the next
https://stardewvalleywiki.com/Chest "Items do not decompose in chests."
that line's still there? wow
what the fuck is decomposition
(please, no one remove this sentence from the Chest page. it is sacred, to me)
it's been there since like three months after 1.0 release or something. i cannot bear a world without it
we talked at length about that sentence months ago, good to know no one's done anything about it since
(I vaguely recall it never being the case as far as I can recall)
so whats the deal with the note then
maybe somebody fucked up their game with mods and misattributed the blame to having an arch item
afaik the chest one was just fully invented (although it is true! items do not decompose in chests). no clue where they even got the idea from, except maybe noticing that items in chests were safe and assuming without evidence that ones outside were not
or maybe it's just specifically about the jack-o'-lantern
Why does my custom crop look like this 
seems like you mightve not stuck to the correct dimensions in your texture
Isnt it also 16x16?
crops are 16x32
where the bottom half of that 32 is where you'd want your sprite to be in this case
Here's the crop template I used, it's modified from the one on the modding wiki.
thank you frieren ill fix
Wait so i can make a big one too? I thought it would require some c# ill make a party rn
big as in tall like a sunflower? yeah that should be fine, just use up the whole 32 tall

is there a way in content patcher to make something depend on the player's daily luck?
depends on what the "something" is
in this case, event dialogue
in that case i'd try the $query dialogue command with the RANDOM GSQ using the @addDailyLuck argument
CP has a luck token right
doublechecking, is it decently performant to use Game1.content.Load<Texture2D>() in a draw() method with the game content manager doing the caching for me
daily luck can, despite its name, change during the day, however
i.e. if i collect the luck buff from the truck mid day
it does cache it but as i understand it still has to do an amount of work to even check it and grab it from the cache that would be a non-insignificant improvement to move outside the draw call
it looks like the daily luck token is more what i'm looking for
that's like the only case of it changing right, quite niche to the point of not worth worrying about
Texture2D's obtained from the content manager have stable references so you only ever need to load once and just keep using that texture2d indefinetely
swapping out an entire event patch for a single luck-dependent dialogue seems like overkill to me though but its not like its a big deal in the grand scheme of cycles
well it's less a single dialogue and more several of them at once
oh i meant never caching it myself
SMAPI when invalidating a texture will load the new version of the texture in a temporary context and then copy the texture over to the reference in the main content manager
can also change if a farmhand connects (which they would do after daystarted)
or obtain the luck charm thing during that day iirc
that was mentioned just prior
but yeah, other mod interactions aside, farmhands connecting and the luck charm are the instances it'd change
that uses the Luck skill i believe and not DailyLuck
ah true
but good to point out, that if you want to account for lucky food, Cheese, dailyluck wont cut it
it's not really that big of a deal tbh. i just thought it would be neat to have the outcome of a card game within an event depend on the player's daily luck, if they change it midday they'll never even know that they got the "wrong" version of the event
is this event repeatable?
i don't think so
you have to go out of your way to make an event repeatable, generally speaking
you can decide for yourself then ofc which approach to take then, though a non-repeatable event having to be re-patched every single day even when its not being used anymore seems a shame
since the DailyLuck token will change every single day, so the asset will be invalidated every single day
its not likely to be noticed, just one of those "if everyone did it, it can add up" things, so dont worry about it too much
especially if its an event in a custom location that isnt likely to have a lot of patches needing applying to it
oh yeah it's a custom location. no one's ever touching it but my one mod
could be a lot worse then
is there a daily luck gsq
At least the asset will be lazy reloaded and only be loaded/edited post invalidation when you warp to the location iirc
yeah i assume the first time that asset would be checked is when events for it are checked, which is on warp
so it being a custom location helps thre. would be more potentially annoying somewhere like Town though
(unrelated but thought you'd also like to know that CP 2.8.0 will have a step argument for Range now)
😄
Filesize for 2500 NPC sprites is only 10mb, nice lmao
anyone know why there's a black box around the chair?
what is your png like?
i was working on a recolor and once I tried to test it, the black box appeared in game
you know, your spritesheet is also black
It's black, not transparent
what art program are you using to make your recolour?
So... Magic wand then select the black, then delete. Prolly would do the trick?
the og sheet was black not transparent, I saved my changes as a transparent png. So if i just get rid of the background it should be ok?
It should, so long as it's saves transparent
the original image would only be black if you copied the image from say, a web browser, rather than copying the file itself
the actual image would definitely be transparent
oki tyy
that said, if you did originally just copy the image from a web browser, it was probably a jpeg and you probably lost quality in doing so
the image posted above seems fine to me, quality-wise
no lossy compression or artefacts
just the black background/no transparency issue
I used a version from the files on my pc. if it was a copy instead of directly opening it, just means my brain forgot a step haha
thing is though, you'll also have to recreate the shadows
since those are now non-transparent blobs
Could just copy paste the shadow from the og tilesheet
mushrooms are stronger than usual today
cool!
Thats neat
Ive been thinking about doing something like that so I can make a gold statue of the player but I still cant really work out how best to do it.
it's pretty simple in theory, you're able to make a copy of the farmer with var fake = player.CreateFakeEventFarmer() and render them with fake.FarmerRenderer.draw()
no guarantees on overrideColor: Color.Gold actually looking good though
hmm can you apply that to items?
apply that to items?
well with c# you can do anything you like
true i just need to spend time working out how that system works
probably not too much work, just make the actual item sprite be a plinth of some sort, then harmony patch the various item draw methods to also call your fake.FarmerRenderer.draw() method on top
hi, maybe you'd like to give this a try - all the appearance values are set in Mods/blueberry.MushroomPropagator.CP/Assets/Data, keyed by unqualified item ID (only (O) types are usable anyway)
if OverlayTextureName is set it'll try and load the texture, if not it'll just use the item sprite from game data
Something here doesn't look right, but i can't put my finger on what
oh yeah also that doesn't happen in this version
just so you're sure
i mean it didn't happen in the previous version either, but now it still doesn't
is there a way to run trigger actions using the console?
it uh already triggered
i also get this warning, is my code wrong for this?
https://smapi.io/log/edab570c5c58446296e4f41c59df0d94
should only happen when you have fishmonger and also met the npc
Log Info: SMAPI 4.3.2 with SDV 1.6.15 build 24356 on Microsoft Windows NT 10.0.26100.0, with 22 C# mods and 2 content packs.
Maybe debug action?
Looks like the NPC isn't added to the game, as it is not listed in the warning (which lists all valid options, in this case, NPC's internal name)
like debug TriggerAction [id here]?
like debug action AddMoney 500
I don't have them installed, there are other modded npcs but no warning for them
ah i see, ty
Then, if that is the correct internal name of the NPC, I think it should be correct
Based on the code, it indeed is TheFishmonger
isn't it mailflags? uhh
maybe the mod id changes
wait no it is action, ok cool
i test
ok no everything is the same with id's, is it the "Relationship:TheFishmonger |contains=Unmet": "false"?
Well, it won't change anything, but in something like this (I guess when there is that contains part), you can have just false instead of "false"
https://smapi.io/log/15f091339cad4f6ead16e7d3b727f4b8 ok that, didn't work
i swear trigger actions relate to mailflag somehow
Log Info: SMAPI 4.3.2 with SDV 1.6.15 build 24356 on Microsoft Windows NT 10.0.26100.0, with 24 C# mods and 2 content packs.
May I ask what is that id? Is it a mail, a trigger action, ...?
Never added Trigger Actions, but somewhy I don't think that's true, but I may be wrong
trigger actions confuse me
Wait, I do... https://github.com/DenisSilent/Eleanor/blob/development_UNSTABLE!/[CP] Eleanor/assets/mails.json
This is how I send mail (and as long as I know, it is correct)
the id for trigger action can be anything tho
is there a way to make them retrigger without the "MarkAsApplied" being set first
Probably no?
https://stardewvalleywiki.com/Modding:Trigger_actions#Make_Data.2FTriggerActions_repeat
Of course, with C#, barely anything is possible...
there isn't a console command?
Not one I'd know of, nor can I find any on the wiki
sadge
i dont know what exactly you want but im sure it is possible
are you saying that it was already marked as applied because you didnt set a value so it was true by default?
yes
You can either change the ID of your wip trigger action (essentially making it a new unused trigger action), or make another trigger action and use the trigger action action that marks something as unapplied
MarkActionApplied false
so i tried using clearmail and it seems to have worked?
i don't want it to happen more than once, i just fucked up with rtf
Do you mean that you also set "Unmet" false conditional to other modded NPC who you don't have installed?
Dennis i know you're trying to help but when you 👆 reaction me are you saying that you agree with me. Because you just told bea it wasnt possible...
ah no, all the others just spawn at game start. Fishmonger is a GI npc
Yar, unfortunately it can't be done like that. CP will specifically search for Fishmonger if you tell it to look at its relationahip token. And then it will give an error because it can't find the Fishmonger.
ah
should i just have the hasmod condition then
Yeah, I know, I probably misunderstood, sorry for that
i did it by using clearmail i think 
i am probably gonna add the second one to just reset it for testing. thank you
Great!
If you really want to be that specific about it, you can have an Include with HasMod condition, then have the Unmet condition in the included json.
this is what the code would be like right? actually should a condition to the first one
how would i, do that? unsure sorry
Do something like { "Action": "Include", "FromFile": "patches/Fishmonger.json", "When": { "HasMod": "VoidWitchCult.CP.TheFishmongerNPC", } }, And then do your Gift Taste patch with the Unmet conditional in Fishmonger.json
Your MarkActionApplied action is unfinished. If you want it to make ClearThatTerrain UNapplied, so that it runs again on a specific day, you need to MarkActionApplied Current TriggerActionID false
Additionally
currently it will run after ClearThatTerrain runs
thank you 
so ClearThatTerrain wont run on the same day that UnclearThatTerrain runs. It will actually run the day after
I'm gonna get back to my own stuff now tho
gotchu. thank you for all the help!
if i want to share a beta version of a mod and have users be aware when the update finally drop on nexus, i can just have (plannedversionnumber)-beta ?
Like 4.0.5-beta ?
I believe so, SMAPI will detect when a version 4.0.5 or greater is available (4.0.5, not 4.0.6, fat fingered the wrong number hence the edit incase you saw it)
thanks 🙂
Neatttt I'll definitely give it a shot ! Ty!
patching out a single check in an if with harmony would be a transpiler, wouldn't it?
Sometimes you can do shenanigans to make the if false
depends what the method is tbh
Undo the shenanigans in a postfix
or sometimes you can do stuff in a prefix to force it to be the value you want, and then unset in the postfix
That's what i meant yes
not a method that icould patch sadly, it's the Game1.currentLocation is Summit here
if (Game1.currentLocation.IsRainingHere() && !(Game1.currentLocation is Summit) && (!Game1.eventUp || Game1.currentLocation.isTileOnMap(new Vector2(Game1.viewport.X / 64, Game1.viewport.Y / 64))))
but i might be able to do that (prefix change and postfix unchange)
(I do that in the portrait mod, I set something to a blank texture haha)
Oh this bit is the rain check?
you can even use __state to pass stuff between the two and make sure you're unsetting the correct thing
mhm
I transpilerd it i think
i just saw that looking at the docs, plan on doing that
ah
it's very helpful, I'm annoyed it took me so long to try it out lmao
I usually just stuck stuff in static fields on the patch class for some reason
which tbf I'm pretty sure is part of how __state works but I think they have extra checks to make sure it's only passed between matching prefixes and postfixes
On reflection this is probably another place
But at least u can see what changing is Summit might be like
(my goal in this mod is to avoid transpilers entirely, try to minimise skipping prefixes wherever possible, and prefer postfixes over prefixes in general)
i assume this is targeting if (Game1.currentLocation is IslandNorth || Game1.currentLocation is Caldera)?
Yeah
i see
It's adds a Game1.background is not null basically
ah
__state is great as it is invocation specific, but does key the data store on the prefix/suffix's class, so two different classes patching the same method wont share the state
( 👀 )
does __state have a type?
oh
It can be any type and you are responsible to initialize its value in the prefix
its whatever type you want it to be, just remember to be consistent
in Profiler its a Stopwatch
I imagine there's a dictionary or something somewhere that corresponds location names to instances of their class?
do remember to check in the postfix that the state is assigned, because if someone else has a skipping prefix your postfix can run anyway without the initialized __state
Game1.getLocationFromName() which uses a mix of Game1._locationLookup and Game1.getLocationFromNameInLocationsList()
just remember for farmhands it can grab locations from the shadow realm
under what circumstance would it only be found in the shadow realm?
every location that isn't AlwaysActive that the farmhand isn't currently in
ah
If the farmhand hasn't been in the location at all that session its entirely shadow realm, if they have been in it that session but not currently in it, it will be a semi snapshot in time from when they were last there
Wouldn't my postfix be skipped too in that case
postfixes dont get skipped by a skipping prefix
i think it should be fine unless they're warping to the summit for some reason then
Nor finalizers, which I found the hard way in profiler
Wack
Tho i usually only use __state in a void prefix
Which i understood as won't be skipped?
Profiler is a void prefix and it does get skipped
What is the point of that note on the docs then
I have no idea, but I spent ages troubleshooting it recently which is a pain in the ass because my PC is cursed and it takes like 30min to bootup stardew if the debuggers attached
best to build your mod in debug, run Stardew manually, and attach the debugger later
Oh i guess the fact that you have a ref arg makes you side effect
Didn't think about that one
profiler doesn't have ref arguments as it doesn't mutate the methods
oh so that was a bad idea
But __state has to be a ref arg i thought
public static void GenericDurationPrefix(out Stopwatch __state, MethodBase __originalMethod, object __instance)
public static void GenericDurationPrefixWithArgs(out Stopwatch __state, MethodBase __originalMethod, object __instance, object[] __args)
out is a kind of ref too right
horror movie esc
if __state makes it "side-effect", then i'd call that a flawed implementation on Harmony's side
flawed or straight up a bug
looks like it's first transpiler time then
You can with FF
can I steal some of this for FF doc? I've had a hard time explaining depth as well.
Yeah sure although idk if you used this particular SortTileOffset logic
This one's based on how buildings work
Has anyone looked at a system of giving monsters debuffs? I've implemented something for it but it feels very hacky so I was wondering if there's any better ways that people have used
Monsters are hacky period
forreal
That said, are you doing anything beyond granting them a buff and then checking that in whatever relevant harmony patch?
yes please Bea
just replace or would like addtional hairstyles on top of vanilla
Idk if monster stats natively respond to buff fields either, maybe?
whatever is easier
first one
yeah monsters don't seem to have buff fields at all from what I've seen. I think thats only on farmers actually
That does make sense yeah
my method was using the modData for the character class then updating the value and applying effects like poison damage on an interval in the monster update method
"Format": "2.75",
"Changes": [
{
"Action": "EditImage",
"Target:": "Characters/Farmer/hairstyles",
"FromFile": "nameofpng.png"
}
]
}```
but that feels awful to do, and I'm not sure how It works in multiplayer at all since I'm not quite sure where update logic is applied for clients
only postfixes are guaranteed not to be skipped
actually that would remove some vanilla ones, give me a moment
anything else could be skipped by an earlier skipping prefix
i dont mind
i mean u can make it not but if u dun care 
actually I'm using the Manners value since its unused on monsters and is a NetInt for some reason but that feels even worse. I'm unsure if I should change it to use modData cuz I'm not sure if a dictionary lookup would be too much extra load for such an important method.
i will use only 1 hairdo
and i will edit the png a tiny bit too
should i put the Replace there too?
you wanna use, 1 hairdo from all of the ones in the mod?
yea
which one
second set, last one
this one?
yeah
alright gimmie a moment
What is the actual effect of the debuff
its poison damage, every 90 frames it deals some damage to the monster
https://smapi.io/json/content-patcher/ec2c5931d90f448c913eb85147d3a2ed
it deleted my comments 
the system I have works atleast in singleplayer but it feels wrong to mess with an update method like this
"Format": "2.7.5",
"Changes": [
{
"Action": "EditImage",
"Target": "Characters/Farmer/hairstyles",
"FromFile": "hairstyles.png",
// takes the hairstyle you want
"FromArea": {
"X": 112,
"Y": 96,
"Width": 1,
"Height": 4
},
// replaces first vanilla hairstyle
"ToArea": {
"X": 0,
"Y": 0,
"Width": 1,
"Height": 4
}
}
]
}```
well things have to happen at some point right
true
my only concern would be using Ticks as a duration instead of TotalGameTime or ElapsedGameTime
if you say you're counting frames
you can have it replace any vanilla hairstyles, just gotta change x and y in ToArea
thats probably a much better system yeah
I'll have a look at that
was very sleepy when I wrote the ticks system hah
aha i get it, tysm Bea!

hairstyles are 4 height? 😮
what SDV usually does is use a counter variable and check for if (counter -= time.ElapsedGameTime.TotalMilliseconds <= 0) counter += duration or somesuch
Oh i implemented poison damage actually (in a silly way)
6 i guess for the back one too
yep 2 tiles high each
"X": 16, "Y":64
ooo thats really good
DelayedAction.functionAfterDelay is a vanilla util that does what it says on the tin
You can probably just do that
matcher.MatchStartForward(
[
new(OpCodes.Call, AccessTools.PropertyGetter(typeof(Game1), nameof(Game1.currentLocation))),
new(OpCodes.Isinst, typeof(Summit)),
new(OpCodes.Brtrue),
]
);
matcher.ThrowIfNotMatch("Failed to match summit check");
matcher.RemoveInstructions(3);
this doesn't seem to remove the check, but it also doesn't error/throw which indicates it worked?
the other checks in the if are all true, and it does rain on other maps
thats awesome, tysm!
[note to self: to and from area use tiles for editmap and pixels for editimage]
aha
worth noting that the codematcher won't necessarily crash if it fails to match, it'll just quietly become invalid. it's best to walk it through with debugger step-overs with the watch/local panel open.
so no width and height necessary?
did you also return matcher.InstructionEnumerable when you're done?
wait no
yep, return matcher.Instructions();
Pillow had the throw if not match which should throw if not match
does ThrowIfNotMatch not make it throw? the description is Throw an InvalidOperationException if current state is invalid
ah so u do
@red egret https://smapi.io/json/content-patcher/1245dd039e384915a85e5199f6909ed9
width should be 16 and height 64
i see
i hadn't read the description, figured it worked differently
i will test it
!stone
🪨 The item ID for Stone is 390.
Pillow you can print your final list of IL to double check if working as expected
as in logging matcher.Instructions()?
didn't know this was a cmd, thats very helpful
Yeah
yes, it is easier than searching the 50 different stones that aren't real stones

had to do via Console.WriteLine since smapi monitor doesn't like non-strings, (https://smapi.io/log/21de0e66a43543bd82e450b6ee4e0269?Levels=trace~debug~info~warn~error~alert~critical), what am I looking for? just checking that it did remove the instructions?
Log Info: SMAPI 4.3.2 with SDV 1.6.15 build 24356 on Unix 6.11.0.29, with 5 C# mods and 1 content packs.
okay it works! 😄 ty Bea
looks like it did remove them correctly
endfinally NULL [EX_EndException]
call static StardewValley.GameLocation StardewValley.Game1::get_currentLocation() [Label7, Label8, Label10, Label13, Label14, Label17]
callvirt System.Boolean StardewValley.GameLocation::IsRainingHere()
brfalse Label18
ldsfld System.Boolean StardewValley.Game1::eventUp
vs original
IL_02a3: endfinally
} // end handler
IL_02a4: call class StardewValley.GameLocation StardewValley.Game1::get_currentLocation()
IL_02a9: callvirt instance bool StardewValley.GameLocation::IsRainingHere()
IL_02ae: brfalse IL_03ab
IL_02b3: call class StardewValley.GameLocation StardewValley.Game1::get_currentLocation()
IL_02b8: isinst StardewValley.Locations.Summit
IL_02bd: brtrue IL_03ab
// (no C# code)
IL_02c2: ldsfld bool StardewValley.Game1::eventUp
IL_02c7: brfalse.s IL_02f9
Where does IL_03ab go
Hrm no clue then 
mhm
note to self : forgetting tree texture makes the game crash
So I'm looking at the vanilla bag config json for item bags, would it be possible (after making a back up copy) to change the set up so the bags are more like some of the mod added all-in-one bags? I really enjoy the all in one bags and there doesn't seem to be any vanilla ones... if that makes sense
is doing the operand optional and just good practice to do?
If you do it you match more specifically
ah
Idea: when you boop prismatic shard at the dessert. You get a random galaxy weapon rather than just the sword.
You could also have a rare chance of getting a infinity weapon or whatever they are called in vanilla...
✦ ❯ dotnet build
MSBuild version 17.7.6+77d58ec69 for .NET
Determining projects to restore...
All projects are up-to-date for restore.
^CAttempting to cancel the build...
Build FAILED.
0 Warning(s)
0 Error(s)
Time Elapsed 00:02:58.15
BeaSummitPatches on master [!] via .NET v7.0.410 🎯 net6.0 took 2m58s
✦ ❯ rm -rf ./bin
BeaSummitPatches on master [!] via .NET v7.0.410 🎯 net6.0
✦ ❯ rm -rf ./obj
BeaSummitPatches on master [!] via .NET v7.0.410 🎯 net6.0
✦ ❯ dotnet build
MSBuild version 17.7.6+77d58ec69 for .NET
Determining projects to restore...
Restored /home/pillow/Programming/BeaSummitPatches/BeaSummitPatches.csproj (in 140 ms).
is it normal for dotnet build to just hang
where is iridium krobus texture located? i don't remember if it's a furniture or a craftable
Craft
Iirc
i'd assume that too but it's not like it tried [and failed] to run it, especially when it had just worked before i restarted
hmm, i don't see it
funny purple krobus is in the bottom right of tilesheets/furniture.png
thanks!
oh it looks like theres a bunch of orphaned processes
yep killed them and almost instant compile
Can you use the game's own junimos in events or is the only way out to make temp actors?
If color change is restricted then it's no good, I've been dreading a new event due to the multiple colored junimo sheets I'll need
then i don't really have a suggestion
maybe look at eli and dylan how they did it, i believe one of their event is full of colored junimos
Does the event version of temporary animated sprites take a color arg
Yeah it do, it should be possible then
ah my favourite an invalid program
https://smapi.io/log/4ba20e7063fe41aa8b672d1795e9d989
matcher.MatchStartForward(
[
// new(OpCodes.Ldloc_S),
new(OpCodes.Ldstr, "Summit"),
// new(OpCodes.Call),
// new(OpCodes.Brtrue),
// new(OpCodes.Ret),
]
);
matcher.Instructions().ForEach(inst =>
{
smonitor.Log(inst.ToString(), LogLevel.Info);
}
);
matcher.ThrowIfNotMatch("Failed to match gamelocation specific flair check");
matcher.RemoveInstructions(1);
(i'm just trying to see if just the string will get matched, it's the only reference to that string in the method so technically should work)
Log Info: SMAPI 4.3.2 with SDV 1.6.15 build 24356 on Unix 6.11.0.29, with 5 C# mods and 1 content packs.
oh i probably shouldnt just remove the one instruction
how is it still dark
its definitely replacing it
summit cursed
Does anyone know what this tile is for?
I've never found out what tree its meant for
no clue tbh
It's for behind where the traveling cart sits, it has the oak foliage placed above
(I had a recolour during this patch export so it doesn't match perfectly)
mini tree
If we're talking about the one that's just a stump, I think it's for some of the oob trees? I've seen them near the mountain lake, only because I think in the starblue update for spring they forgot to recolor the grass, that bright green vanilla grass stands out a lot in it and I've been trying to find this stump. I'm probably just tilesheet blind
this is definitely the correct way to patch these, right? https://pillow-just.uploaded-files.zip/heey1LX10C
Does the state of endless fortune produce loved items of modded NPCs, or modded items automatically? or do they have to be added/it's hardcoded?
it produces the first item in their loved list, and yes it works with modded npcs
Oh perfect thank you
Howdy folks! I'm running into a bit of a strange error - "[Content Patcher] Error loading patch 'Alx's Additions > Include code/Items/Objects.json': file contains fields which aren't allowed for a secondary file (Format).."
that's my content.json
this is the objects.json file
Just as the error says, secondary files, or for a simpler name includes, can’t have the “Format” field, simply remove it from objects.json
can someone help me with my code?
the thing is that i im making a festival mod for a custom NPC to make them attend to festivals. Since the original mod doesnt make the custom NPC go to festivals. here is the JSON: https://smapi.io/json/content-patcher/b74c1ea874a04d43a29bc6d92fa9fced
you’ve closed your changes list too early. take out the ] in line 14
move it to line 47
THANK YOU FOR ANSWERING!!! 💖 💖
i will try it later since i im eating
Queeeeeestion. I want to make a compatibility patch between two mods, where one of them has "ask first" permissions and comments locked, but they're active here...where do I ask them? Do I DM, do I ping them in one of the making-mods channels? There's nothing in the rules about this and I'm terrible at inferring social norms. D=
What's the nature of the compatibility
Reskinning a single building. I'm trying to make Elle's Town Buildings compatible with Piper - A Pierre Rewrite by adjusting the sign on the Elle's texture to have the "Piper's" sign.
oh. yeah just ping her
actually is she in here
is she okay with pings? maybe a dm is better? user is Elle (junimods)
Yeah that's what I don't know. Etiquette! My nemesis!
i at least dont see a "dont ping me" in elles profile or name (personally speaking I prefer pings over dms, but i jsut dont like dms from people i dont know lol)
Well, if there isn't an explicit "don't", I guess it's ping time! Thanks folks. nervous!
I think she's like sleeping anyway
I asked her about it, will let u know what she says
Oh! Uh. Okay! Then, thank you for that, too! X)
(Experimenting with bomb radius in Data Layers, now that we have the new 'auto' layer. Still not settled on the color scheme though.)
can I dm u for the answer?
Sure sure!
I'm biased and like the pink
me likey
is that pink? what is color
(Magenta.)
good color 10/10
Is the dig radius always perfect? also I too like the colour
it's bright so you pay attention to it which is important when it comes to bombs 
Every tile within the dig radius has a pretty high chance to be dug, but it's not guaranteed.
ooh interesting
Ahh okay that's what I thought, was just a bit confused with the perfect dig area
(I just bombed twice to compare the actual radius with what Data Layers shows.)
@deep plume Hi! I'd like to create a compatibility patch for Elle's Town Buildings and Piper - A Pierre Rewrite. It just involves swapping out the sign on Pierre's store to be the "Piper's" sign from that mod. I've already asked the other author for permission (still waiting for a response), and wanted to get your go-ahead, too!
even replacing the summit check with another real location doesn't move it to the other, real, location 
the summit really is cursed, wow
Ahhhh nice to see so many people fighting the summit
I am sorry pillow for introducing you to the summit of nightmares
it just defies everything
tbh it was in theory a good introduction to transpilers if it'd actually work
So im finding that Content patcher isnt letting me do operators for time. How can I trigger something to happen only between the hours of lets say 10 and 12. I dont see it on the git or the wiki.
is this event or trigger action
also what do you mean operators for time
I'm guessing operator being < or >
"Weather": "Sun",
"Time": ">=1900",
"Time": "<2600"
},```
Throws an error saying time needs to be an integer so I cant use the operators
use {{Range}} instead perhaps
but also if it's an event then that's built in with preconditions
Im trying to trigger an editmap action between specific times only
the token docs show how to use the time token with a range
time is not unique in that regard by the way, you can't do operations like the way you wrote it for anything
if a situation is encountered where range does not suffice (or just manually writing the numbers), Query allows mathematical expressions, though should ideally be used sparingly
also, you cannot have duplicate keys in a single json object either
Why should query be used sparingly? performance reasons I'm guessing?
performance reasons, yeah. as with most performance-related concerns with CP, its not likely to be noticed on its own ever
relative to most tokens theres more work that goes into parsing a Query expression and evaluating it, and it has to redo it every time it checks the token after an update
Ahh I can see how that adds up quick
#programmers-off-topic message moving to here
Shoot lemme clarify
I should have forwarded
Nah it's fine I'm not the best at communicating lol
speaking of query, if i want that :
"Query: {{Random: {{Range:1,101}} <= {{MyValue}}": true,
Has a higher chance of happening, is
"Query: {{Random: {{Range:1,101}} <= ({{MyValue}}+20)": true,
The proper format?
(+20 is just a placeholder value)
Aye nice one! i saw the NPC generator on nexus, I just wish I had a use for it
I felt like I might be the only one who would use something like that, I attempted to accomplish something similarly ingame with C# and it did not like me touching FarmerRenderer at all
Decided to upload it though, thought maybe someone out there could use it
I remember your attempts to tame the wild wild DarmerRenderer, certainly not the most friendly this that's for sure
I can defo see use for people making seasonal outfits and custom NPCs
Will save a lot of time for developers who dont need or want anything more than a very basic npc
(I feel like I'm obligated to send a message given there's a Gohan in the channel.)
lol
I wish I had something like this for myself when I was working on my artisanal honey mead
I ended up reusing NPCs from nexus that were marked as free use ;p
The logic for this still cant be executed ingame sadly, so my thought for using the logic transposed into the game somehow would work but alas it does not FarmerRenderer is so guarded
So now, if I can get the game to translate my custom sheets will the full animation sets I can export externally..
I can use random sheets as random humanoids in Mayor's Town instead of the janky dwarf art I edited
I'll have to include like.. thousands of sheets for the mod to pull from though lmao
I want my villagers to be fully animated. Farming, eating, fishing, etc
your Random token isnt being contained here so you'd need some extra }} there, but otherwise i believe thats correct
I might end up turning this generator into a full blown framework if I can get NPCs animating properly ingame with all the actions
So users can generate these random NPCs, get their full animation sets and have a lot more possibility with what to do with NPCs
We'll see 😁
i believe i ate the }} when cleaning stuff, thanks
bumping this
Hello, does anyone know if there's a way to enable cabin construction on other maps? I've managed to enable buildings, chicken coops, barns, etc. I can build on other maps, but the cabin only appears on the farm... Is there a way to change this?
There was always the Dollmaker, which someone steered me towards. I use it for my temporary NPCs https://sqbr.github.io/browser-dollmaker/#
(Far better than using other people's NPCs, free use or not)
Hello. Is there a way to trigger an action for when the game exits? Like OnReturnedToTitle but for when closing the game. Thank you in advance.
I think you will need to do some C# for this to happen but take a look at stardew realty?
Well damn
When you close the game everything stops so nothing is gonna run, what's the goal here?
Update a discord webhook when the game is closed
It uses the Seasonal Cute model as well which is super useful for when I do my seasonal cute compat
Can you just make the web hook do periodic heart beat
To assert that game is up or down
omg thats great
What's the crediting situation for the dollmaker?
that dollmaker credits a lot of things with various levels of permissiveness that makes me feel like i wouldnt want to use it, from a licensing standpoint
Ik it's a combo of several artist's work so i was never sure what I'd write on my mod page if i used it
Seasonal Outfits alone has a bunch of artists that i didnt see proof of permission for, and Slightly Cuter doesnt allow uploading their work to other sites, so if theyre used in the dollmaker...
and Genderswap Bachelorettes has pretty strict permissions too
I don't think discord's webhooks have that feature.
Unfortunate i guess i was thinking more of a discord bot
my feeling is that, if you need placeholder, using existing npcs is enough, and if you need art that is seen by others, there are better options than farmer or dollmaker
but of course, having the option to make stuff myself is influencing this viewpoint
most commonly that action is sending a message
so yeah, they dont act on their own so cant react to lack of a heartbeat
I looked at the mod you recommended, but in the images I only saw normal buildings, and not the cabin where someone can live/sleep, and enter co-op for example by living there.
Well, thank you anyway. Just needed some confirmation. The tool is mostly done then.
Ah i guess i misunderstood what that mod did my bad
But hrm, maybe you can build cabins if the location is AlwaysActive?
I don't know if they had to be Farm exactly
Yes, I already use the AlwaysActive properties, and on the map I use the properties: IsFarm = T and CanBuildHere=T
These properties enabled the construction of buildings, but not cabins.
public virtual bool IsValidBuildingForLocation(string typeId, BuildingData data, GameLocation targetLocation)
{
if (typeId == "Cabin" && this.TargetLocation.Name != "Farm")
{
return false;
}
return true;
}
Wow, so rude of the game. /j
Definitely hardcoded to only be buildable on the farm, though. So C# town it is.
If you don't mind the webhook being spammed you could send a "game exited" message, and then use the message ID in the response to immediately delete it
and when the game exits it wouldn't've hit the delete, in theory
seems like itd be pretty unreliable to rely on the game to be closed exactly between the message being sent and the message being deleted, though.
Can webhooks respond to discord rich presence
No
and it wouldnt be useful as a "server went down!" alert if thats the goal
because you'd need to mute the alerts
No fun allowed 😔
Web hooks can't do anything, they just get sent data and do it
(or not necessarily server but yknow, general "Game closed" alert. an alert is not so useful if you have to ignore it)
Maybe the answer is just make discord bot then
I really need a native way to check when the game is closing.
I don't want to host anything. The webhook is good enough.
theres just kinda inherently not gonna be a good way to guarantee that a thing is Closed when you are relying on the thing itself to report that it is closed
I don't think anyone except the OS can reliably know about a process exiting...
the game is not in control of how it is closed or when
Are you looking for
- title screen exit button pressed
- exit to title in pause being pressed
- the window's X being pressed
- process being forcibly killed
First two definitely easy enough, third maybe - depends on how low level you can go + how that works internally, fourth definitely not
If it is forcibly killed I can let it pass, but the others should have a way to check it.
I know some malware can ignore the window X so I think that's just a standardised, but optional, response to it being clicked
Does the game just close. Does it not "pack its things properly" and then close?
SMAPI cant do that if the process is closed forcefully enough that it kills SMAPI
Depends how you kill it
and if you're not worried about force closes and are fine enough with the first two bullet points that Pillow described, then its not difficult to just look for those button presses
Yeah, that sounds good enough
Actually I would only need to check the second case, as the first one is already included in something I already control
You could at least experiment with the GameRunner.instance.Disposed event? Might not work reliably if at all, but it's worth testing.
oh boy
Hey it's nice and easy to patch
Oh hey, and it looks like it probably bubbles through to Game's Dispose() method, too.
Hmm, no, probably not.
I'm interested hear which crime works the best
Yeah, definitely ping me if you try either of them. Whether they work or not. I'm slightly invested now.
OnGameExiting did not update the webhook.
Did you try both the button on title menu and the close X
Sorry. It's late here. I'm not thinking properly XD. I tried using the return to desktop button. Let me check the close X
Same thing.
I'm going to discuss all this with my pillow. Thank you all for the help 👍
In which class is this method?
@willow nest @blissful panther https://learn.microsoft.com/en-us/dotnet/api/system.appdomain.processexit
Thank you. I'll check it when I wake up 🙂
Hi! Sorry for the delayed reply, but yes this would be fine!
how would I add a respawning hardwood stump to a farm with tiled?
No problem about the delayed reply. And, great! If Heliaxe is interested in integrating it into their mod, can I tell them that's okay, or should I have them check with you first?
Oh yeah they could go ahead, that's fine!
Thank you very much, it worked perfectly, I just had to use harmony and redo the method, removing the if, and just leaving the return true.
Hello! I need some help troubleshooting maps. I want to load a test map, but for some reason SMAPI can't load the map file once I've selected or made a new save. Could it be my content.json even when the validator finds nothing? https://smapi.io/json/content-patcher/7b34b85618e542ea8ceb921e0d5fd4f7
I tried just using the stump on the paths tilesheet but it's not showing up in game
you should ideally postfix it, not redo the method
this is not how you use the {{ModId}} token
"LogName": "Load Exterior into the game",
"Action": "Load",
"Target": "maps/[[:Template:ModID]]_NPCAiden",
"FromFile": "assets/maps/AidenHouse.tmx"
},```
take out the [[:Template:ModID]] and replace it with {{ModId}}. do so for every time you have that format in your json
same thing with your i18n on line 339
That's a modding wiki problem, there have been some changes to some templates lately and that has caused problems
I'll go fix today
How would I format it if not "DisplayName": "[[:Template:I18n: location.aiden-house.name]]",
Thank you! I feel so lost sometimes from following the guides because even the videos are outdated :(
you can add a content pack for Farm Type Manager on nexus to handle item and resource spawns on your maps 
{{i18n:Your.Key.Here}}
* especially the videos are outdated. Videos take a lot of work to produce lol
how would I do that?
you'd need to make a new mod (with a new manifest, etc) following the guide on the mod page
so your CP mod loads the farm map and adds the data, and the FTM mod spawns the stumps as you provide
I edited an existing mods map for personal use and It hink it already has ftm
i've not made an FTM mod myself, but it's very well documented, and there's plenty of mods using it if you needed working examples
It skips over the mod now since "{{ModId}}_NPCAiden" is invalid, and {{location.aiden-house.name}}' can't be used as a token because that token could not be found. https://smapi.io/json/content-patcher/dc7dba8a66c9400cbdcfd0ee00794494
that'll make it easier then, you just need to edit the FTM json file to add your new spawns
ok thx! I have no idea what to edit though... ig I'll check existing mods
for i18n you have to include the {{i18n: in the front of the token, otherwise it doesn’t know what it’s looking at
what is the exact error you’re getting with {{ModId}}_NPCAiden being invalid
[Content Patcher] Ignored Aiden - Custom NPC > Add custom locations: Entries > '{{ModId}}_NPCAiden'
oh i see line 345 you have a stray [
I'd recommend reading the actual mod documentation first since it's very comprehensive and understandable, and it'll be easier to find what you need than if you were to have to look for the right mod and look for the right code and understand it without author comments
also @winged charm where is aiden’s house located?
Its in assets/maps/AidenHouse.tmx
no sorry not the file i mean how do you get there in the game
I've been using the debug warp so far, but after making all of the fixes to content.json I get this error, [game] Failed parsing warp 'a' for location 'Aiden.Haydel_NPCAiden'. Warps must have five fields in the form 'fromX fromY toLocationName toX toY', but got insufficient fields. I would like to load into the map from BackWoods.tmx
okay, i have a few suggestions
- that error means what it says. check your warp and make sure it matches that format--it seems like you have less than 5 arguments
- if you want the house to be in the backwoods, then i recommend using EditMap instead of Load. Loading will decrease compatibility with other mods that may edit the backwoods
so I cant just use the paths tilesheet like the forest farm does? im trying to do this the easiest way possible bc I have very little experience making mods
Also just be aware that NPCs can't go through the backwoods so if you want Aiden to leave his house you'll need to set up an NPC warp that goes from his house straight to the mountain
without the codebase in front of me I can't say, but iirc all farm types have specific hardcoded behaviours per farm type to handle recurring spawns and other unique behaviours
author's note: never made a custom farm map/type
huh, should've figured someone would have made their own greenhouse entry begone replacement in the year since 1.6 broke mine
That's crazy I didn't know that. I can find a space in the mountain's for my hidden door. Also I do plan on adding a some new tiles to the map for a warp, but figure that out one Smapi recognizes both the exterior map, and the interior of the house
actually I'm surprised the greenhouse hasn't moved to using draw layers for the patio and shadow. drawing tiles by index seems rather outdated
oh, if your house exterior has its own map/location that you made, ignore what i said about loading 
I found out that in Tiled, my warp was changed to a 🤦
wonder if it's worth splitting greenhouse patio remover + farm building shadow remover into 2 mods. a bit hard to search for shadow hiding when it's on the greenhouse mod
Just so you know, if you're looking for space around that area, there's a small expansion mod called Downhill Project that adds space for more NPCs near the backwoods
I don't know how to integrate my mod to work with another one. I think I would rather use Editmap in content.json to load my little door into the map. Unless the mod makes it easier :O
integrating with other mods for compatibility is mostly "taking different actions depending on whether X mod is also installed"
in content patcher, that generally means having multiple patches or extra patches and gating some of them behind When/{{HasMod}}
unfortunately, it's tedious work and there are few to no shortcuts
Bummer, but thats okay because I've made it pretty far as is even with converting from the older formats to the new ones :)
I was able to load my 2nd map, but now I don't remember where to find the name for my first map in content.json. Is it because I have them both as NPCAiden in lines 322 and 328? http://smapi.io/json/content-patcher/340e883383284461a5e8de263ff424b4
yes, you overwrote the first one. change one of them and test on a new save
Could I do NPCAiden1 ?
you can do whatever you want. i would recommend something descriptive like AidenHouseInterior
@next plaza
Hello Casey I got enough bugfix PRs to tell you about them:
- Fix guidebook fonts in non-English
- Avoid farmer anim pause when scything crops
- GMCM revert OpenListMenuNew to OpenListMenu
The third one is pretty dire since people will get stuck, though most people just reverted to GMCM 1.14.1 for now.
Tried to minimize changes on all these so that it's not a pain to review.
@brave fable I found big tree
😄
Why must I keep getting PRs, it means I can't keep postponing a new release 
There’s other cool big trees here too
Then I'll get dragged into modding again when I wanna work on my game projects 😔
This one might be bigger
THERE'S COOL GINKGO TALISMANS IN THE OMIKUJI SHOP NEXT TO THE MAIN SHRINE BTW
THEY'RE GOLD AND SHAPED LIKE A LEAF AND HAVE A SMALL BELL
perfectly average trees
Leaf! I’ll take a look 
if i show you a cat will it come earlier
:( i wish i had a little leaf. (Where exactly is this giant tree)
Akasaka, Tokyo!
I live with a cat now that I'm with my parents, so that is slightly less effective now
:o i see
unfortunate
Apparently it feels like 108F here
THATS A BIG NUMBER IT WAS REALLY WET AND COLD WHEN I WENT THERE ALSO CHECK OUT THE MOSSY BIT DOWN THE STAIRS TO THE RIGHT WHEN YOU LOOK AT THE SHRINE
YES
I had the misfortune of experiencing summer in japan and it was so hot i thought i would die
And many many lanterns
We’ve been mostly up in the mountains or by the ocean, today is our last day so we’re in Tokyo
And man is Tokyo brutally hot
The mountains and the ocean up north was a bit cooler
ohhhh your last day, i would've recommended you a nice bar in akasaka
hie jinja is maybe 15 minutes away towards akasaka station, it's a nice but modern temple but the wisteria wouldn't be flowering atm
enjoy akasaka hikawa! definitely my favourite shrine, if you pass by tokyo tower there's also zoujouji which is huge and very concretey but with some impressive buildings and they do sermons at 4pm
We went through a park with wisteria area but it was indeed not flowering
Hi, I'm back. Critter can now appear normally on the map. But I had a problem when setting up the triggers. I wanted the fireflies to appear at night on the custom map, but the "condition" didn't seem to work:
"Action": "EditData",
"Target": "Data/TriggerActions",
"Entries": {
"{{ModId}}_MapFirefly": {
"Id": "{{ModId}}_MapFirefly",
"Trigger": "DayStarted",
"Conditions": "LOCATION_NAME CustomMap, TIME 1800 2600",
"Actions": [
"mushymato.MMAP_CritterRandom 0.04 Firefly #FF99CC 1 Firefly #80C0FF 1",
"Spiderbuttons.BETAS_Message \"Fairyflies appear\"" ],
"MarkActionApplied": false
}
}
}, ```
When "Trigger" is set to "DayStarted", players will see fireflies in the waking farmhouse. When "Trigger" is set to "LocationChanged", fireflies will be triggered whenever the player enters a new map. The "condition" is merely the time, and it cannot be triggered at the normal time. I have no idea what to do now.〒▽〒
We’re probably going to hide indoors shopping ngl, 108F “feels like” is intimidating
and the first GSQ should probably be PLAYER_LOCATION_NAME Current <the internal id of your custom location>
Oh, it seems that I made some stupid mistakes. I'll try again.
in the future you can try patch export Data/TriggerActions then you can see what data actually made it into the game
mushymato.MMAP_CritterRandom is designed to be used with LocationChanged hence why it is like this (one time check of spawn on every tile)
I renamed the interior on line 328, but now it's saying Warp to AidenHouseInterior failed: location wasn't found or couldn't be loaded. I also changed the Editdata the line above to Load https://smapi.io/json/content-patcher/1669e27bbed647edb3702a7448c3cfc5#code.328
the talisman and signature if you wanted one 🌱
you only have one location defined. you need one for each map
some wild handwriting on the red stamps
I found them! But i think I would not use one so I just admire from a distance
that's fair, i usually never collect random trinkets but this is DIFFERENT and IMPORTANT and LEAF
also HAVE FUN IN AKASAKA/TOKYO ENJOY UR HOLIDAY IT'SW GREAT THERE
Oh, so I need to copy/paste the lines from 334-349 below itself and change the data for the 2nd map?
OK, I'll be careful.
Additionally, I would like to ask: If a huge NPC is set on the map, he can speak but won't move. Should he be made into a regular NPC or just be shown as a static animated image on the map?
would you like to see an example of how i define multiple locations?
ah yea big npcs path finding is cursed rn
i think it's up to you what you want to do, there are frameworks like MEEP that let you have a big npc like entity
it's also a thing that might get fix in 1.6.16?
Yes please
honestly if your NPC is that big and immobile i'd make sure they're encased in invisible Buildings tiles to stop the player from walking through them
otherwise they'd be walking all up inside them and that's a huge invasion of personal space
https://smapi.io/json/content-patcher/3836bd5736d34a57a62bec0a417ae028 i only need one patch, and it can contain multiple entries, such as the agency and the docks
i almost made a typo that would have sent me straight to bouncer hell
Lool
This NPC is set to not move.
If using MEEP, would it still be a furniture attribute as before?
oh if they weren't supposed to move anyways just make them (animated) map tile 
i would've recommended making them a map tile but it's easier to schedule animations if they're an npc
hm
and you can fudge things like friendship and dialogue with the data
did you want to do the funny mmap thing where you have them be secretly a furniture with open anim state 
or was that something else
This character's function is to be able to communicate, but it cannot move significantly (unless wagging its tail counts). During the conversation, it deducts health points using "spacechase0.SpaceCore_DamageCurrentFarmer 10". In the future, there will be animations that carry the player to enter another map.
yea in that case i think i'd do something like this:
- big group of map tiles, tail wag animation as map tile anim
- map action for interaction where you can get dialogue stuff
since you are using mmap anyways consider question dialogue
you can make a dialogue tree with this if u chain enough of them 
I was also considering doing it this way. So, I won't be bothered about making it a true NPC anymore. Haha!
Once again, thank you (even though I have said "thank you" many times already)
Thank you!!! We had a great time on our honeymoon 
CONGRATULATIONS 🥳
🥳
(that's extra double cool & wonderful to me since there were two (2!!) shinto weddings happening when i went there the second day it's a place for MARRIED COUPLES AND TREES)
No luck, [game] Warp to AidenHouseInterior failed: location wasn't found or couldn't be loaded.. Could it be the map itself though? I got it to load at one point however, but I don't know if debug warp AidenHouseInterioris the wrong map name
is your location named {{ModId}}_AidenMapInterior? be sure to use the exact full name as it appears in your code.
debug warp is a fuzzy search i'm pretty sure so that should work
but it wouldn't hurt to try the exact name
maybe share your content json again?
and make sure to type out your mod id
also make sure you are using your actual UniqueID instead of {{ModId}} in the debug code
(nic beat me to it)
Hey everybody, I made another niche framework. This one lets you set up sounds and music to play when the player is nearby. If you ever wanted to make your own BrookSounds but you didn't know C# or didn't want to deal with all the hardcoding, this mod could be for you!
ooooh, I like it
holy fuck thank you
I forgot to share it oops :o https://smapi.io/json/content-patcher/d5f27fb836a14652b89e310d236122e9
i'm so sick of tampering with ambient sounds
Time to scope-creep myself into making the lost woods maze with sound cues.
toot
That would translate very well
yeah your warp is malformed
Oh? :o
at a glance the debug warp should still work though
10 18 AidenHouseInterior 12 5
see the issue?
the only thing i can see that might be an issue is maps vs Maps in the map path but i'm pretty sure it's not case-sensitive...
wouldnt hurt to try capitalizing it though
I do have the folder named maps. Let me try that
can you patch summary YourModIdWrittenOut and send that log
(if you don't see the issue, your location is actually named {{ModId}}_AidenHouseInterior. there is no location named AidenHouseInterior in your game)
It will save bug reports on Linux/Mac if your targets and FromFiles are the correct capitalization
i think the best approach is just use all lowercase 
everybody knows targets are TitleCase and fromfiles are lowercase. it's the law
making me realize i did that and not even on purpose
I got NPCAiden and AidenHouseInterior to bring me to the same map with debugwarp . https://smapi.io/json/content-patcher/90df9f2a24594fea963809ccb81cf5df
Do you still need patch summary YourModIdWrittenOut?
which map are you successfully visiting? interior or exterior?
well that's with debug warp, which will happily use a partial match on your location name
your actual AddWarps patch wants the exact full name though, but you've only given it AidenHouseInterior, which isn't the full name
The exterior map get loaded
then yes if you still can't debug warp to your interior map then send the log
It needs .tmx?
full location name, not full file name
Data/mail
Log Info: SMAPI 4.3.2 with SDV 1.6.15 build 24356 on Microsoft Windows NT 10.0.19045.0, with 3 C# mods and 1 content packs.
you need to type out your actual mod id. that log doesn't show any patch summary because it didn't match
whenever you're working with the SMAPI terminal or chat commands, your mod id must ALWAYS be typed out in full
by the time the game sees your content pack, content patcher has already converted all instances of {{ModId}} into Username.ModName
(more specifically, only Content Patcher uses {{tokens}} , and only in certain contexts)
actually what's really strange is that the log says you've visited both locations lol
HasVisitedLocation | [X] Aiden.Haydel_AidenHouseInterior, Aiden.Haydel_NPCAiden
sigh i feel defeated by this mod
this is the correct way to mark a location as a greenhouse right???
Theres no log besides SMAPI-latest.txt from the ErrorLogs folder in %appdata% 😥
https://smapi.io/log/171685615f0345acb762551c9262de46
Oops, couldn't parse that file. Make sure you share a valid SMAPI log.
i checked on the wiki and it matches but im still convinced i did something wrong
that is indeed the only log file smapi makes, unless you have multiple instances of the game running iirc
in any case that isn't a full smapi log, and it's also not showing a full patch summary because there's no content pack mod loaded with the unique id {{ModID}}_NPCAiden
there's probably one named Siroofsalot.MyFunnyModWithAidenInIt though
patch summary Aiden.Haydel
i believe that's your mod id, although it seems reversed
Oh so patch summary {{ModID}}_NPCAiden is not correct?
yes. you need to type out your full mod id, because SMAPI doesn't know what a token is
nope, only Content Patcher can use {{tokens}}.
you can find your mod id in your manifest
I had just put the two together 🤦
I was going to make an extremely jank version of this before I found out this was happening.
(dylan, please make sure to consult the author guide before switching to the 1.0 build, as there is one (minor) breaking change)
(a field was renamed (LocationName -> Location). it's not a big deal but don't get caught by surprise)
Noted. Congrats on the release of this.
I got the maps to load with debug warp NPCAiden debug warp AidenHouseInterior
yay!
Now to get the warp from NPCAiden to AidenHouseInterior to work forward and backwards
. Thank y'all so much for helping me out. You have no idea how much I appreciate it :)
again, use the full location name in the AddWarps entry, including the mod ID
good luck! and if it's easier, since these are both custom maps, you can just do it in tiled instead of patching it after the fact. and yes do make sure to type out the exact location name
"10 18 {{ModId}}_AidenHouseInterior 12 5" 👀 ?
Same as the reply I just put. I would have the map's Custom Properties: Warp: "10 18 {{ModId}}_AidenHouseInterior 12 5" Correct?
except for tiled can't read that token, so you would have to type out your mod id
but yes map properties>Warp
for that reason i prefer to just use AddWarps in my content.json, since you can use your {{ModId}} token in location names there just fine
yeah both accomplish the same thing so it's up to you really
but CP can't read {{ModId}} in tiled map properties because of internal magic bullshit
We love that
One last thing real quick. Do I need an entire new string to add more than one warp in a map? Or can I just add it on a new line like this?
"10 18 {{ModId}}_AidenHouseInterior 12 13"
"14 19 {{ModId}}_AidenHouseInterior 12 12"
]```
you need a comma but that looks correct to me on first glance
"this is a string", so the new line you've written is an entire new string
let me look at CP docs
but yes, they're in a "ListOfStrings": [ "like this one", "and that one" ] so you should add a comma between each string
Oh okay :)
im not sure where it is in the wiki but for the reveal taste dialogue, is that stuff random? if anyone can point me in the right direction if it is on the wiki then that would be great (i get lost on there)
it's quite hardcoded, but it's randomly picked
you'll want to look at Strings/StringsFromCSFiles:NPC.cs.4083-4182
i will tap the sign if prompted
ive only seen vanilla npcs use that dialogue line very rarely... so i can't increase the chances of it appearing, since it's hardcoded?
the game checks for r.NextDouble() < 0.025 && heartLevel >= 1 above all other dialogue (other than greenrain), meaning there's a 2.5% chance for a character with 1 or more hearts (250+ friendship) to use the gift taste reveal dialogue
the character also needs to have some FriendsAndFamily characters with defined gift tastes in their character data
why not use the %revealtaste dialogue command
the what
the
// Content (unpacked)\Characters\Dialogue\Lewis.json:
"summer_Sun": "Say, are you growing any blueberries on your farm?#$e#I do enjoy a fresh blueberry.%revealtaste:Lewis:258",
intriguing.........
makes it all the more shameful that you didnt know it
just one singular blueberry
Huh. Well it turns out they actually already did that work, and were just waiting to get permission before publishing. I'll let them know! ...And then look for something else small to try to start modding with. X)
now you mention it i think i've had this explained to me once before
but to be fair the blueberries in stardew are massive for some unknown, mysterious reason
rude
What if u r just a tiny baby forsy
:o
As in the farmer
so are we all arietty
mod that changes the blueberry crop sprite to a melon recolour (one big bloated blue berry)
scale up the maps x4 and give the player things like dandelion seeds to fly or whatever
speaking of big bloated blue berries
rude
what the hell is a qi crop
yes
can you make a 1x1 giant crop though
how many crops does it take to form such a large crop
i do think it's kinda funny that if you break a giant cauliflower you just get normal cauliflower as opposed to being showered in cauliflower florets like you should
hurts a little having to remote the 'hide farm building shadows' behaviour from 'hide greenhouse entry tiles' to go in its own mod because that's gotta be at least 90% of the code in this mod
there's..... nothing left of him
https://github.com/b-b-blueberry/GreenhouseEntryPatch/blob/master/GreenhouseEntryPatch/ModEntry.cs

