#making-mods-general
1 messages · Page 434 of 1
i don't think so, i've tried a few
this map i did before, that left side does work
so maaaybe building layer stuff is invovled but so far no dice
only other thing I could think of is that maybe you accidentally have a tile on a layer over where the painting would show up, yeah
The wiki does call out wall furniture here
You can enable Wallpaper, Flooring, and wall furniture (windows, paintings) in decoratable locations like farmhouses, cabins, or sheds by adding these map and tile properties. The location must have or be subclass of StardewValley.Locations.DecoratableLocation
right before the wall and floor ID sections
i did that, i think
"CreateOnLoad": {
"Type": "StardewValley.Locations.DecoratableLocation",
"AlwaysActive": true
so may be worth temporarily replacing your not-working wall with something from a walls_and_floors sheet just in case?
just to try
that's a good idea
might as well rule it out if you can!
does patch reload put in map changes or do i need to do a fresh load of the game?
patch reload does but you may need to exit and re-enter the location
I've personally had to reload the game to see changes before, especially with map properties involved, but others have sworn you can just patch reload.
yeah it feels hit or miss with that kind of thing
I don't know what makes it work or not, so I reload just in case because I know that works as intended.
yeah like i know for a fact light and day/night tiles require exiting and re-entering
just going back to title and back into the save after patch reload is usually sufficient, no need for a new save
yeah gonna do that now. changing rooms didn't work, nor did making a new PIF door
one or both of the things i did this time...should....work
can I dynamically add a Flag through an Action/Trigger?
HasFlag is the best way for me to check if a player has ever purchased a stardrop seed and disable it
yeah, just set up a trigger action to send mail but make sure the mail ID doesn't actually exist in Data/Mail
just make sure you can have a GSQ for having purchased the seed
note to self: hiding a layer when you save doesn't actually save it without that layer
guh
Also if you're intending to have it purchaseable from a particular shop and disabled there, you could set it as an ActionsOnPurchase action for the shop item?
also, if you're worried about this being a super rare once-in-a-lifetime crop and need to consider interactions with other mods, take it from me, the person who accidentally made people billionaires with their flower: ask players about mods that add random seeds etc (like MES, for example)
things i need to do today
- fix content folder for first 20 items
- add in 20 more items
- look into sending mail to player (i think i need an additional mod dependancy for this right)
- set up practice pedastel in museum
Really just depends on the use-case for the block/flag once the seed is purchased once
yeah i was assuming it was for the "only available once during a save" feature
i wish i could just poof my mod into existence like a piece of furniture in the sims
depending on the complexity of the mail being sent, sending mail can be done with just Content Patcher
OO
it mostly just needs to explain that you CAN donate cards to the collection and thats it
You can edit the Data/Mail asset to add new letters, and then use trigger actions to send them.
Awesome!
Oo ok id love to look at it :0 is your user the same on nexus?
here, mail should be towards the bottom
awesome sauce!
wait if i recall correctly the way Passable works is that it's passable no matter what you put, F or T
lol, that'd be why
what layer, and are you intending it to be impassable?
Passable changes its behavior based on the layer its on
i did it on building objects
oh weird ok
Tiles on Building are impassable by default, so putting Passable on them makes them passable
There's a few properties that work like that.
that's what the little superscript 2 means on the wiki
yep
do i need to specifically also make a z_walls for this or should this be working?
as long as your tile there is from something with walls_and_floors, then it should be working for that particular test.
ok
What is your furniture placement property, in the furniture data?
the furniture i've been trying to use is just vanilla stuff
i just...cannot wall
omg i found out what hapepned to my cards :L
i skipped like 11 of them on accident so I have more to make now actually
would it be mad that i have the animated fans there on the front layer?
not if the fans aren't hitting your painting's bounding box
I'm baffled that Vanilla doesn't have the action PlaySound, I had to use spaceCore
It's not something silly like your map having the Outdoors property and the vanilla paintings being Indoor furniture only, right?
Outdoors is another one where if the property exists, your map is outdoors, so as long as you don't have that property, it's an Indoor map..
hm can build here is an outdoor location thing
IsFarm may also be forcing outdoors treatment
alright, i'll try
and IsGreenhouse is yet another subscript 2
looks like i have all those same ones on my other one that did let me place stuff....shrug
You don't have any other tile properties there, right?
like overlapping ones?
yes
the passable and column walls are currently
you can enable the description hint too in the museum data, which means the item description of the cards will also tell players that they can be donated
i should say specifically the error ingame is that it "must be placed on a wall"
this is how my bathroom is set up, if it helps at all?
(should also answer your fan question, as I also have a fan on Front and it does not care in the slightest about it, the wall replaces under it just fine)
I've been able to put paintings on that wall just fine
oh thats awesome! thanks for letting me know 🙂↕️
yeah that's what i would expect it to do
it does? it's playSound
however, my wallpaper is on the BACK layer, except for the bottom most part of the wall.
Opened it up to try to compare to yours
i have been playing around with that and so far they aren't behaving differently
hm does that work?
guess so
if anyone cares to poke at that for issues, go for it
it's kind of in a state of disrepair anyway graphically until i figure this out
all the walls except for Front4 work, or are they all broken?
so, something interesting... if I patch export the fishfactory file once it's in game, the Tile Properties are completely lost for the wall and floor IDs
well that's suspicious
would explain the issue. but what the hell would cause that
i'm gonna try another thing in a few here, maybe that'll help
thanks for peekin at it
ok no that didn't do it either, hm
what was the command you used to patch export?
wanna see something on my end
patch export and then whatever you loaded your map to as a Target
so for me, that was patch export Maps/fishfactory
yeah i'm having trouble tracking down where it's at i guess then
It'd also be whatever your MapPath was in the Data/Locations edit?
PIF does things a bit different maybe
probably, I'm trying it outside PIF for now, because if it doesn't work outside PIF, it won't work in there either
makes sense
I dropped floor and Wall IDs down to just one value
and renamed it so it wasn't Front4
and it works
It's FishFactoryFront4 now
I think there might have been a bad character somewhere in there, because as soon as I recreated the string properties, it was fine with the single entry
that is possible
that or it like...demands floor tiles too?
i'll remake em and see if i get new results
Well, I made the floor first to check that
thank you
and the floor worked immediately but the walls still didn't until I recreated it
I do tend to put my ModID or an abbreviation in front of the wall/floor IDs when I make my maps, not sure if that's necessary or had any impact
i would imagine? no but that's probably wise anyway
I can add back the other wall IDs to see if they all fix this way.
just to make sure it's not something that happened when multiple were introduced
ok, i'll try putting them all in as just wall on my end
oh boy it's embarrasing isn't it
I did that instinctually when I recreated them, so of course mine worked. xD
"I don't know what's different about mi--- oh."
that will fix your issue
i wonder if i can feature request a warning about that for the tiled addon lol
thanks again
hahaha
proof of fan behavior
hah
i doubt there's a terribly elegant solution for that?
like i could just make smaller wall TileData
Not putting the fan on Front
The wallpaper will try to fill in the Back layer where possible, so unless you force a column or pillar in front of that section of wall where the fan is, it will be included in the wall area for that wallID.
You could also intentionally put a non wall_and_floor tile on that column in particular, which just wouldn't be replaceable with the wallpapers.
hm
maybe it'll be a while before that release then after all, i'll ahve to mess with this
on track now tho so thanks again
A spot marked with WallID TileData objects that isn't actually using a tile from walls_and_floors will "take" a wallpaper but won't actually change the tile visually.
Meaning you can consume a wallpaper on it but nothing will happen.
so what will happen if i have the fans and vents and levers on the building layers and the back layer gets wallpapered?
will they just still be there with their grey tiles and all
i suppose i could make transparent versions
I thought they are just not walls
they weren't, cuz i forgot to add TileData
When i wanted a wall that could take paintings but not wallpaper I had to hide the wallpaperable layer underneath
And put the actual tiles on Buildings1
I'm trying a trick
The column is on Buildings
and the grey wall is on the same layer as the wallpaper
i suppose if i put the vents and levers on back, they would get overwritten by wallpaper
complex stuff kinda
Back1 would draw over the wallpaper still.
Fun times
would vents on back1 make sense?
cuz i could just use building for the sides and non-passable blocks for the wall collision
er, fans on back 1 rather
I also removed all your Passable tiledata and turned them into invisible tiles on the Buildings layer for my file testing, LOL
the classic method
yep, works just fine
like just any blank tile or does it need something more specific?
as long as you "paint" it in anyway
any blank tile works, I used the tile on the first row and 4th column on the bathhouse_tiles sheet since it was right there.
the important thing is that it's a "solid" tile but you can't visually see it so it won't interrupt your wall's look
right
that's cool
so i'm thinkin i put all the standard wall and details on back, so it can be totally replaced by players if they want
then the vents on building 1 so they stay on top of any changes?
or do i want them under wall decor, hm
Back1 would keep them under paintings and such.
But it would make sense for the pipes and vents to not be replaceable
and not be able to have paintings over them
true
easiest way is probably to make transparent versions of your pipes and vents if you don't have them, and put them all on front.
that way the wallpaper can be swapped out, but the 'functional' parts of the fish factory are left in place.
you would still be able to put paintings UNDER them, but you could always put them on Buildings instead (or block it with invis tiles) to try to avoid that?
or just use the "NoFurniture" tiledata on the back layer where those pieces are
well at that point that's just player choice i think
as long as it makes some degree of sense
do we still need to do the z_ stuff or does that get handled now?
It will try to automatically prepend the names, but I do it myself anyway to be safe.
ok
prob take a break and come back and fix these up later and release yet tonight hopefully
then go fix up my joja warehouse lol
guys how do i strike things out
pitch well
just jokin
like this u mean?
yes
~~ around the txt
lol
sorry, I went to go see about food once I figured out cryo's issue xD
is there a way to perform actions when people harvest a crop? the same way players trigger actions we purchase items
something like ActionsOnHarvest
i think that requires C#, unless button added it to BETAS. let me check
it is in betas
I think what you don't have access to is the crop position
yeah you only have item and location
if you do need crop/position for whatever nefarious reasons (though I assume applications outside of C# or extremely specialized triggers are limited) you can use Machine Terrain Framework’s version of the trigger
what on Earth is Button?
is like the beta for next version or smapi?
Oh, it is a mod
Button is the author
Button should make a mod where you press a button and it gives you in game buttons
Call it “Button’s button button”
the sequel to button's bebber bobbers
I kinda unironically would like a Buttons Button mod that added an ingame button in the qi nut room that opened GMCM config or something 4th wall like that
Erm, how? If I pick up something at one end of my museum and want to put it at the other end, I have to scroll to get it there.
CropHarvested is possibly the first trigger I ever added to BETAS, back in August of last year
in the context of that original discussion where one map is made to look like two but is secretly one map, a user wouldnt think they even could rearrange an item into the other map, so they wouldnt even try to put it at the other end. however, you can do the same menu centering with the argument on the MuseumMenu action inside the Rearrange action in CMF
i would probably have it directly open the config for the Button mod itself, where you can disable the button mod with the button
I know you can, I was using it for rearrange, not donate. But I also didn't know if Candy was planning on doing a "this is definitely two separate museums despite being the same museum" or "this is the same museum across two 'floors'" thing and my point still stands for the latter.
if its across two "floors" and the floors are actually 1000 tiles apart in Tiled so the second floor was far to the right, then you would not need to scroll all the way from 0 to 1000 to rearrange something on the right side
I am still not understanding how. I can't do anything once I've picked my thing up except put it back down again.
I am meaning if I have picked something up on the left side that I want to put on the right side.
Not if I want to rearrange things only within their respective areas
if they are made to look like two different maps though that idea shouldnt even pop into a players mind, though
if you have to warp to the "other floor" and it looksl ike you're actually going to another map, then you wouldnt think you could scroll back to the original one
Yes but that doesn't negate the fact that it happens which is all I was trying to inform Candy about
@uncut viper ,
Is this particular patch could be a cause of freeze up when dialogue box opened?
"Action": "EditData",
"Target": "Data/TriggerActions",
"Entries": {
"{{ModId}}_HideInfoBox": {
"Id": "{{ModId}}_HideInfoBox",
"Trigger": "Spiderbuttons.BETAS_DialogueOpened",
"Condition": "!Spiderbuttons.BETAS_ITEM_MOD_DATA_RANGE Target BETAS/DialogueOpened/Friendship 1",
"MarkActionApplied": false,
"Actions": [
"AddMail Current {{ModId}}_HideInfoBox received",
"Spiderbuttons.BETAS_PatchUpdate {{ModId}}"
]
},
"{{ModId}}_ShowInfoBox": {
"Id": "{{ModId}}_ShowInfoBox",
"Trigger": "Spiderbuttons.BETAS_DialogueOpened",
"Condition": "Spiderbuttons.BETAS_ITEM_MOD_DATA_RANGE Target BETAS/DialogueOpened/Friendship 1",
"MarkActionApplied": false,
"Actions": [
"RemoveMail Current {{ModId}}_HideInfoBox all",
"Spiderbuttons.BETAS_PatchUpdate {{ModId}}"
]
}
},
"When": {
"HasMod": "Spiderbuttons.BETAS",
"InfoBox_HideForNonSocialNPCs": true
}
},```
i have no idea but im assuming from you asking me that it does? nothing immediately pops out at me besides maybe just some weirdness with patch updating from an asset that would be updated from it, i guess
thats a complete guess though
also depending on when exactly friendship is added via social interaction these Conditions may not work as expected
There's report of a freeze when opening dialogue box but it didn't happen on my end (maybe I'm just used to slight load time). Is it problematic that this patch is part of the patchupdate or wouldn't it be an issue?
when adding a warp to a new map im supposed to put the location name in as GummiGecko.Cardshop_(Mapname) right in the tiledata
just checking its been a long time since i messed with maps
I tested on Morris and Henchman, it seems to work
it must be whatever the location's id is, exactly (and if it's in the tmx itself you cannot use content patcher tokens). if that's GummiGecko.Cardshop_MyMapName, then yes, use that
is it something that requires the patch update to function? if it doesnt freeze for you and you're not able to recreate it then i wouldnt even be 100% sure its your mods fault in the first place
would need a log and reproducible steps
back to the fish factory
somehow walls are STILL giving me some shit
floors and building are mostly working, although the floor ate the flooring without changing graphics, hmm
I wish I had a huge inheritance so I could just make mods all day
mood
I have so much I want to work on
holy guacamole harmony is the devils work
Hello guys. 👋
I'm making a custom food item in CP/json. Is there a way to make the item not consumed when I eat it or maybe to execute a player_add when it's eaten?
I got all my code tidied up, and nothing ran. set up a brand new postfix, with the exact same layout and syntax as the original, with a warning log to alert me if it ran- log works. copy-paste the old code into the new postfix (which is identical to the old one), everything works. WHY
That'll probably require making a SMAPI mod
at best i believe you can use spacecore to give the player a copy of the same food after its eaten
but there may be a small moment of them not having the item before the trigger action happens
or alternatively there may be a small moment of them having 2 of them
I think you mean fairy dust magic
regardless we so back
what if you gave the food a buff (of your own making) and gave the buff an ActionsOnApply
sounds like you wrote it wrong and then fixed it
it's not magic, the devil is a perfectly logical fellow
i always forget buffs can run trigger actions
that would also work though there'd be a bigger gap of no-item i think
not the most important but can have some minor consequences sometimes
same timing problems, of course
but less dependency 
eat the food, buff duration, then it pops back out of you
sadly i don't think there's an ActionsOnExpire 
unfortunately there is no ActionsOnBuffRanOut
dang
also thatd be a much longer period of time without the item
during which the player may fill their inventory
a wild dependency appears
is there a video or something for doing wall and floor IDs in tiled? i must still be missing something
So actual advice time:
Let's say you've got an old mod, it's garbage, you want to supersede it with something new entirely. What's the best way to update the old mod's mod page and mod update keys to point to the new thing?
you can hide that mod page and set it to point to a new page
but you can just write whatever numbers you want in the manifest
then you'd need a new update key yes
I was planning on a new mod page entirely, the new stuff exceeds the old in original scope to the point where the original mod name is a misnomer now
i am considering doing something similar in the maybe near future
-# farm type manager moment
literally tho
there's nothing stopping you from having a Machine Terrain Framework (and Aquatic Crops - formerly Custom Tapper Framework) moment
the manual way would be to just put a big link in the mod desc and slap a DEPRECIATED on the name
deprecated*
which has the benefit of staying there for players that want it
truly the most aesthetic of options
that said, there are some people who do still play on 1.5 who may want your old mod
make an acronym mod and change what it stands for monthly
so i dont know if id recommend hiding the page completely
is yours a content mod, a framework mod, or a system/feature mod?
now we're cooking with fire
system/feature mod, it's definitely not robust enough to call it a framework (yet)
EMT: emergency medical tool. ethical midnight troutfishing. elaborate mechanical teddybear
have you checked the vanilla maps, e.g. shed? it should be as simple as appending your new IDs to the map property and assigning the tile properties to each wall/floor tile
i agree that it should be as simple as that, lol
it seems to disagree
i'm loading up with literal copied from vanilla tiledata now so if that doesn't work i suspect PIF
your location does inherit from decoratablelocation, right?
yeah at this point i feel it must be my json or PIF itself
what's the syntax for a codeblock in here again?
!codeblock
You can embed code in Discord using a series of three ` :
```
Your code can go here
Even if not a haiku
Just an example
```
For syntax highlighting, add the language code on the same line as the first
``` (with no space, like ```json).
The usual codes are cs (C#) and json.
"Target": "DLX.PIF/Farms",
"Entries": {
"{{ModID}}_FishFactory": {
"DisplayName": "{{i18n: FishFactory.name}}",
"DefaultArrivalTile": { "X": 15, "Y": 20 },
"CanPlantHere": false,
"ExcludeFromNpcPathfinding": true,
"CreateOnLoad": {
"Type": "StardewValley.Locations.DecoratableLocation",
"AlwaysActive": true```
is that the correct method for doing that?
couldn't find much documentation on DecoratableLocation
i think that should be fine
it's weird tho cuz PIF is targeting it's folder...
so i dunno if this is doing things different or what
not sure what you mean
seems like PIF doesn't actually edit the usual location data
Note that CreateOnLoad.MapPath is being replaced by PIF.
CreateOnLoad.Type defaults to DecoratableLocation to allow for the seasonal paintings.
hm so it does it by default anyway
oh damn is it the walls_and_floors thing again after all
looks like i'm not the first to have this problem then
at least i'm not going insane (about this) (this time)
guess that'll be break time then lol
how would one write the patch / i18n for a piece of dialogue that i put a key in for on my map in tiled, i cant quite find the exact info i need yet
for more info i put in GummiGecko.CardCollector_(characterspeaks)
with character speaks being the key but im a little lost on what to do next im afraid
You need to edit Strings/StringsFromMaps like I said here #making-mods-general message
ah lemme reread it
How did you go?
i think i understand
cant test it rn because im talking to someone irl tho 😭
(back at comp now but friendo wants to dbd so i need to wait longer lmaoo
working on a more simplistic custom npc and i have a question... is it possible to make an npc dateable but not marriageable??? like a "oh we can go out and stuff but i dont believe in marriage" type of person... 
Have you tried reject_item on marriage pendant? I have some fuzzy memories of this being possible
Yup that's possible with reject item
Would that work for the poly mods, too?
i wonder if it'd be possible to make the marriage pendant have the same effect as the wilted bouquet... im trying to stay in line with my oc that im turning into an npc and i just think that'd be really Really funny
I think polysweet can force marriage upon an NPC? If so, I am planning to give Hiria marriage dialogue that just says "Hiria isn't supposed to be marryable and has no content."
damn...
i mean i would like to give my character an item that could make him move in as a roommate similar to krobus... but not marriageable and 0 adopting or kids 💭
If I'm making an NPC, I'd go futher and make their sprite and portrait a black box.
Yeah, making them roomate with a special item should also be possible with Content Patcher. Not sure about 0 adoption, though.
OK YAYYY ill figure out a way to make it work.. maybe i can look at krobus's files and see whats going on there

Some aspects of Krobus might be a little special but the roommate stuff iirc is mostly dehardcoded
I think his spritesheet is a special size
I just started modding and I think the first hard lesson I learned was that a simple missing or extra comma can break everything.
I was trying to put a letter in game and it wouldn't work and I spent like 5 hours trying to figure it out before I realized it was all because of a missing comma. 
Also hi hello!
Polysweet has their own additional set of marriage/roommate items (something about a bug with the normal ones sometimes? Not sure on the details) but you can also reject item them, otherwise if it has some kinda config to force it further not much you can do other than mention that the mod is not meant to be played with it
ok im able to see if i wrote ir right now, is it like this?
"Action": "EditData",
"Target": "Strings/StringsFromMaps",
"Entries": {
"{{ModId}}_Caltalk": "{{i18n: dialogue.Caltalk.hello}}"
},
"{{ModId}}_Arthurspeak": "{{i18n: dialogue.Arthurspeak.hello}}"
},
{
}```
just with the 'hello' replaced with the actual dialogue i want?
You have an extra few brackets there that you need to remove (the one after the Caltalk like and the { on the second to last line) but otherwise, yes. Except you don't replace the "hello" with the dialogue you want. That dialogue.Caltalk.hello is an i18n key just like the i18n in the other places in your mod. You write the dialogue that you want in the default.json file like this "dialogue.Caltalk.hello": "This is the actual dialogue!".
@teal bridge not urgent but I noticed that the stickied posts on Star Control's mod page about the radial menu -> star control breaking update still mention Sword & Sorcery as potentially not working with Star Control without an update when we've had star control support for a while now;
If you wouldn't mind could you potentially edit the post to remove the specific mention of S&S to avoid any confusion on mod users' side (we recently had someone who was confused about it because of it is where I'm coming from)
focustense has been kind of awol for months
Ah, couldn't hurt to try anyways
hoy, what's the process to use i18n in a C# mod? The goal is to allow Furniture Pack authors to provide translations for their furniture name and description, but there are still some CP style tokens to replace in the strings once the translation is applied
does changing language reload assets or should I reload it manually?
im trying to add a simple mail to my content json and the text to my i18n and i followed the tutorial and im looking at examples but im not sure i did it quite right is it like this?
"Action": "EditData",
"Target": "Data/Events/Farm",
"Entries": {
"012344667/u 2/d Mon Wed Thu Fri Sat Sun/x CardCollector_mail_1": "null"
}
}```
im p sure my custom mail is written right so i wont send that/ im gonna use my nexus id once im ready to publish like it says on the wiki nw about that part btw
What tutorial are you following that it's telling you to use the deprecated method of sending mail?
You should be editing Data/TriggerActions to send mail, not adding an event
(I want the link to the tutorial so I can fix it or make it more clear that it's deprecated)
i'm fairly sure The Tutorial is outdated, since you're using the old aliases for event preconditions. you can use the modern keys per the list here:
https://stardewvalleywiki.com/Modding:Event_data#Built-in_preconditions
It's really, really, really easy to send a letter in Stardew Valley thanks to Content Patcher. In fact, it's so easy it's usually just bundled into the information about events, and it's hard to find a mod that just sends mail - usually the letters are part of a mod for more dialog, events, getting recipes, new NPCs, etc. But today, we're going ...
There is a giant notice on that page saying not to do it that way
actually do you even intend to have an event here, or is it just for sending mail?
You want to edit Data/TriggerActions: https://stardewvalleywiki.com/Modding:Trigger_actions#Data.2FTriggerActions
how would I do the i18n part of mail wait maybe its on the i18n thing imma check
are you aware of nomori's i18n converter?
hmmmm.... either I invalidate Data/Furniture to change furniture name when the language is changed, or I patch whatever part of the code gets the Furniture's name, which might be actually impossible since Furniture.Name is just a public string...
Is it realistic to use the internal translation system of the game? Like, the way vanilla Furniture have a translation token in their data?
i dont see an option for mail but maybe i can figure it out by seeing how this works :3
i believe you just use dialogue
oh really :0
Just put the entire mail message into the i18n and then put the i18n key into the Data/mail entry
🙂↕️
Also, changing directly Furniture.Name will probably cause issues because of stuff like drawHeldObjectLow.Value = Name.ContainsIgnoreCase("tea"); in the vanilla code
Maybe I can just bet on the game properly using Object.LoadDisplayName
do you need to split it up like {{MailText}}[#]{{MailTitle}}?
I wouldn't even bet money on that though
ok it said to use this as the key but should i put 'dialogue.' in front of it?
"CardCollectormail"
You can but don't have to. I prefer to split them up because I like to leave as few dialogue/mail commands in my i18n as possible but some people don't bother.
ok that's what i do as well but i wasn't sure if it was actually mandatory
It doesn't matter. There is no required format for i18n keys, they just have to match between the i18n token in your data/mail entry and the i18n key in your default.json. Like I said in my note in your files, I just wrote your keys the way that I did because that's the format I use for my i18n keys to make them easier for me to read. You could make yours "AHHHHHAEHRWAILFJODSNGFESPFREAS" if you wanted to 🤷
The title is part of the format of your data/mail entry. You should already have one in yours if you followed the mail page on the wiki.
oohh
ok now i can test to make sure i did it all right phew
no red or yellow upon bootup woot
um
ok actually
let me test with a fresh save
i tested on my original testing mods save and got mail but couldnt open it lmao
it just poofed
guh it still poofed
but no errors yet
Did you make sure that your Data/mail entry is exactly the same as the mail ID in your Data/TriggerActions Action AddMail Current <mailID>?
Entry key*
lemme check
ok i think i forgot to change the name back after undoing a mistake oops
oh wait i just noticed, i can put an item in the mail?
ooh
it says its supported in the text so id add it like i would the title?
thats so cool
i thought id need something else to do this
yippee
ok quick q
are custom items possible to send through mail
forgot to hit send
like with just content patcher
aah ok hm
ill double check my syntx on it then
my friends keep asking me why ive launched sdv like 10 times in a minute
Patch reload, and the i18n reload commands are your friend
You're just with people that really know how all this works, that doesn't mean you're not smart too ^^
im following the mail thing to send items but i think i put it in wrong?
Pretty much everybody restarted the game to test their updates before someone told them about patch reload
We can't tell if you don't show us lol
%item id (O){{ModId}}_Boosterpack 5 %%
hmm, so if i want a when to match a location do i need this whole thing? DLX.PIF_MINE_cryomancer.fishfactory_FishFactory
I restart the game to test my updates but I live in c# land
"LocationName": "{{ModId}}_FishFactory" was working before...
i wanna learn C# one day but im so intimidated by it lol\
If it's your own mod's location and you're checking it in the same mod, you can use the mod id token
!json Can you share the whole data/mail patch please?
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.
i guess since it's PIF it's actually DLX.PIF_MINE_cryomancer.fishfactory_FishFactory_8370164760804875645_cryomancer.fishfactory_fishdoor1
maybe that breaks some stuff
Doesn't PIF do instancing so you can't know its actual ID in advance?
https://smapi.io/json/content-patcher/0c8f678e0dbc48f6a99c84502e503805
this is the patch and this is the i18n:
"CardCollectormail": "WELCOME TO PELICAN TOWN, now you may be wondering to yourself, 'why have i recieved this flyer?' WELL! I am here to INFORM YOU my good friend that I have created a Card Shop to display only the HOTTEST CARD GAME released by Joja funded by the Governor and collected by YOU, now, if you are so inclined I have a bit of, uh, bad luck actually getting said cards, BUT I am willing to PAY HANDSOMLY for my collection to be completed by a DELIGHTFULLY HELPFUL stranger such as yourself! To donate to the collection just go to the Bus Stop and take a short ride to my corner of the woods! CHEERS FRIENDO!%item id (O){{ModId}}_Boosterpack 5 %%[#]Mysterious Card Collector Flier"
I can't see anything wrong with it. What is happening in game? Unrelated, why does your file have a format field? Did you just add it because the json validator said it was needed?
oh i thought that was needed
XD
and in game basically you know the no texture item im getting that when recieving the mail but when searching the item it pops up as normal in item spawner with texture
You can't have more than one format field in your mod
i only have one i just cut eveything else out so it wa s easier to read the patch
That seems most likely that you are using the wrong item ID then.
i didnt think json would read it without it
hmm ok
🙂↕️
i will double check the item id
Ah okay, that's fine then. But nah, you can put an include file into the json validator. It will complain about the format field being missing but if you know you have one in your content.json you can ignore the warning.
oo ok thanks aba
yeah wtf my reskins are just not even happening anymore
maybe i should stop looking at this for today
feels like i'm doing things correctly at this point and it's just PIF bugs happening maybe
ehh i'll try one more thing
yeah no dice, tomorrow problem
ugh
i still cant figure it out
i swear i have the same id :L
(From i18n)
"CardCollectormail": "WELCOME TO PELICAN TOWN, now you may be wondering to yourself, 'why have i recieved this flyer?' WELL! I am here to INFORM YOU my good friend that I have created a Card Shop to display only the HOTTEST CARD GAME released by Joja funded by the Governor and collected by YOU, now, if you are so inclined I have a bit of, uh, bad luck actually getting said cards, BUT I am willing to PAY HANDSOMLY for my collection to be completed by a DELIGHTFULLY HELPFUL stranger such as yourself! To donate to the collection just go to the Bus Stop and take a short ride to my corner of the woods! CHEERS FRIENDO!%item id (O){{ModId}}_Boosterpack 5 %%[#]Mysterious Card Collector Flier"
try taking the action out of i18n
you can't use tokens in i18n
Oh dear that is on me, I'm sorry Candy!
(so {{ModId}} basically)
I should've picked that up
fresh eyes always help, dw 
ik eventually this stuff will be at least like aprtially memorized but wow i hate feeling so silly
ty irocendar!
You can either split your i18n up so the action isn't in i18n (so one key for the message text and a second for the letter name) or you can pass the mod id token through. In this situation I recommend splitting it up so there's no risk that translators will translate the item id
I agree with nic though, behaviour doesn't go in i18n, everything in i18n should be something that needs to be translated
ty nic
You didn't even know that tokens couldn't be used in i18n, so don't blame yourself!
there's so much to remember and basically none of us know all the "basic" stuff in various corners of modding
this could be related to why my stuff isn't lining up right lol
Rowanrowanrowancontinues
yea lol
it's def doing (cryo) multiple times in my save so perhaps that's mangling the location data too much or such
are those the names of the rooms youve been working on?
nah that's someone else's screenshot
aa ok
mine is fish factory
trying to!
it's a good mod, has some issues tho it seems
it's just a place to put a bunch of fish ponds tbh
thanks tho
tbf that sounds useful to me for if i want my farm to be designed a certain way so i might use sometime, especially on the smaller maps, v cutieful but i like stuff lol XD
yeah fish ponds bug me cuz they eat up a lot of space
(also: it worked ty guys sm!!)
woohoo on to phase 2 of testing, making sure my maps work
then its phase 3 and 4 adding more cards and setting up the museum to test XD
maps need fixes some places but the first interior works yippee
Is there a built in way to access i18n of content packs made for my mod with SMAPI?
the wiki page only account for IModHelper.Translation, but the i18n files will be contained in the individual content packs' files, not in my mod's files
if i want to make it where my character can go between 2 interior maps like no door to click, would that be a touchaction or just action
i have it set as action warp rn but i wanted to double check cause theres 2 options
not builtin, no. translation data is private per-mod
it's also a little brutal to reflect into it
Usually you'd use a map property warp, not a TileData one. If you want an NPC to be able to use it, it has to be the map property because TileData Action Warp requires the player to click on it but TileData TouchAction Warp is player-only.
if the content pack is literally made for your specific mod as in you are the contentpackfor and can get the IContentPack, you can get its translation helper
aaa
map property hmm i can use that or just do touchaction since idk if im gonna have any npcs interact with my collections mod tbh
oh, thanks, I was expecting it to be in IContentPackHelper, not IContentPack
Bear in mind that if people like your mod you might get NPC makers adding your museum to their NPCs' schedules
that'll learn me not to make a mod with content packs
is a map property something thats already on the maps we edit or is it a thing i can create
the reflection is actually quite easy if that's more palatable, blueberry
it's a lot easier if you reflect into SMAPI to get it's internal registry rather than reflect into your registry helper
now I gotta find a way to get the IContentPack to where it's required...
oh i did lol
Assuming you used a vanilla map as a base for yours (which is recommended) there are probably already map properties present. Either way, look at the map properties section of the maps wiki page and find your map properties by going Map -> Map Properties in Tiled
hehe, glad I made static readonly Dictionary<string, IContentPack> ContentPacks = new(); at some point
dang it
i think i deleted that
i see it in map properties but cant find it on the map
i cry now
If it's in your map's map properties, it's not deleted?
oh thank goodness
ok
I wish GMCM had a way of specifying field dependencies so you could hide those that aren't relevant when a certain option is selected
i am getting a weird thing when i try to check the dialogue for StringsFromMaps it just says 'strings/stringfrommaps"
😔 can you elaborate
with a log or screenshot or whatever
or a json
you should always share your code
preferably all idk
ill grab it
its at line 25
am i supposed to also load it or something? i have the i18n put in in my default folder already
sorry to interrupt the convo rn, i'm facing a slight error (? it's simple yellow text) that doesn't allow me to load an asset for my mod, here's the log https://smapi.io/log/944677f55ea84291995456262a775fd6 and the line i was describing
Content Patcher Error loading patch 'Yandere Shane 1.6 IU Version > Load Mod Default': file contains fields which aren't allowed for a secondary file (Format)..
Log Info: SMAPI 4.3.2 with SDV 1.6.15 build 24356 on Microsoft Windows NT 10.0.26100.0, with 19 C# mods and 12 content packs.
Suggested fixes: One or more mods are out of date, consider updating them
only the content.json file is allowed the Format field, and for your others would need to see Data/DynamicChanges/ExclusionChanges.json
OH lmao okay thanks a ton!

Can you provide a screenshot of the tiledata in the map?
Could you also take a screenshot of what it looks like when you interact with it in game, please?
You've capitalised your mod id differently between the two tiles and it might be case sensitive. If it is, one of them should work while the other doesn't (unless they're both a different capitalisation from your actual mod id).
yea 😭
im so embarrassed
i checked cal and he spoke and then arthur didnt and i checked and saw captilization and was like "noooo"
Don't worry
I wrote some of my dialogue syntax wrong four times in a row tonight
yippee its working and so is my map (i had the warp written wrong)
now the final chapters
adding in the other cards + setting up the actual museum part
and then after that ill be working on collectible CDS + Comics 😄
oop scratch that sigh it cant find the location

oh it might also be ccaps
ksdfjdskf nvm i forgot to change the id when i edited the target
or i mean
I forgot to change the target when i changed the name of the tmx
How would one transpile a new "case" in a switch statement? Does it require handling branches?
usually I think of transpilers just in term of IL tbh, not in terms of changing the original C# version
what does the IL look like for the switch statement?
Hoy, I just made a version that supports i18n! ping me if you want to try it, it's not released yet
gonna take a look
damn, I can't find the person who originally asked for i18n in FF on this server, maybe a Nexus comment?
The IL has a bunch of
call bool [System.Runtime]System.String::op_Equality(string, string) /* 0A000456 */
brtrue.s
so I'm going to just make a prefix that checks for the specific value I want to add a case for
the brtrue.s would have a label presumably pointing to the relevant block
if there's no actual switch opcode in the IL it's probably that simple, yeah
(I misread; transpiling is easier if the switch statement is optimized out, but a prefix can circumvent it either way)
sometimes that exists & I'm not sure how to parse the operands/labels with harmony, e.g. switch Labels0,1,2,3
the important part is that the transpiler I made doesn't have branch and label logic, so I'm not doing any of that if I can avoid it
actually, yeah, it does have switch instructions, I think it's checking the string length to go faster:
IL_0014: ldloc.0
IL_0015: call instance int32 [System.Runtime]System.String::get_Length() /* 0A0002D0 */
IL_001a: stloc.1
IL_001b: ldloc.1
IL_001c: ldc.i4.7
IL_001d: sub
IL_001e: switch (IL_012d, IL_011e, IL_00fd)
IL_002f: ldloc.1
IL_0030: ldc.i4.s 17
IL_0032: sub
IL_0033: switch (IL_010f, IL_0195, IL_008b, IL_0195, IL_0195, IL_00a0, IL_0074, IL_005d)
if you can just prefix around it, it shouldn't matter, but yeah
there's some jump table™ logic in switch statements I'm not familiar with
https://learn.microsoft.com/en-us/dotnet/api/system.reflection.emit.opcodes.switch
Made progress in my GC tracking feature for profiler
this log was fairly clean and only had 2 blocking GC pauses > 0.5ms and were both during early startup that were 1.5-2ms each.
I'll probably need to add config for tuning sampling though because in this 4 minute log had 1916 gc events with only 26 being >0.1ms and 16 being >0.5ms
I noted the user who wanted customizable dresser condition as "@B" but I can't find anyone with this name on the server does anyone know who that is?
cuz I managed to make a new Storage special type with no condition on what items go inside, but adding tabs and conditions is going to take a while so I wanted to know what they wanted in the first place
I think @latent mauve was also interested at some point?
Making a fully new custom tab system seems to be much easier than what I'm trying to do now: adding conditions to the Furniture Catalogue's existing tabs
It seems like the IL for inline functions is not on my level
i am once again struggling with GSQ
Like, no, I'm not touching that
IL_00db: ldsfld class [System.Runtime]System.Func`2<class StardewValley.ISalable, bool> StardewValley.Menus.ShopMenu/'<>c'::'<>9__61_1' /* 04002EC9 */
IL_00e0: dup
IL_00e1: brtrue.s IL_00fa
IL_00e3: pop
IL_00e4: ldsfld class StardewValley.Menus.ShopMenu/'<>c' StardewValley.Menus.ShopMenu/'<>c'::'<>9' /* 04002EC6 */
IL_00e9: ldftn instance bool StardewValley.Menus.ShopMenu/'<>c'::'<UseFurnitureCatalogueTabs>b__61_1'(class StardewValley.ISalable) /* 06004498 */
IL_00ef: newobj instance void class [System.Runtime]System.Func`2<class StardewValley.ISalable, bool>::.ctor(object, native int) /* 0A00094B */
IL_00f4: dup
IL_00f5: stsfld class [System.Runtime]System.Func`2<class StardewValley.ISalable, bool> StardewValley.Menus.ShopMenu/'<>c'::'<>9__61_1' /* 04002EC9 */
Yes
"ALL" is the default behavior of GSQs
i see, ty
If you want to patch this you have to find the inline function
great
But since this is that bit in shop menu which add tabs
You can just postfix and add another tab right
Don't actually need to break into the switch i feel
Spacecore has custom shop tabs through this route if i wanna go look
When making a mod that expands upon an NPC what is a good amount of events to add? Also I'm toying around with the idea of the events being item locked to keep pacing normal so people aren't bombarded with back to back cutscenes since I'm pretty sure a lot of people would have already maxed friendship with this NPC.
Not sure if I'm making total sense, this is all new to me 
The goal is not to add tabs but to change the Filter condition on the Catalogue Furniture tabs
I think I found it with ILSpy at ShopMenu.<>c.<UseFurnitureCatalogueTabs>b__61_x(ISalable) : bool With x at the end from 0 to 5
no idea how to target it though
(answering an orthogonal question) the right number of events to add is the number that you think are missing
Timegating events is possible, Sword & Sorcery 2 does it (though I believe they've removed it for 3.0). I'm doing a form of timegating in that I'm restricting the NPC's friendship level until certain things happen and that will slow the events. And similar to what ichor says, the right number of events is the number you want.
Iterate all methods of this class and match on name
i love doing the art for my mods so much more than every other step but its so addicting to watchs tuff start to work
You may be able to replace the delegate if it's actually something stored somewhere but i dunno
even though it's a method from the subclass <>c?
I am the opposite lol. I rarely enjoy doing the art but I love doing the json
You can try yourself (iterate and print class names) and see if it works
It doesn't look like ur thing says display class so maybe it is just on ShopMenu? Not sure
Either way some reflection nonsense is gonna happen
Ah okay! I've already have the initial starting event that kicks off everything properly timegated to:
Must be at least Year 2
Must be Married to NPC for one year
Must have 14 friendship hearts
I made the first event too so that's all set up to trigger after receiving an initial letter as well as meeting the previously stated conditions.
I'd be lying if I said I wasn't nervous about the whole thing, my brain with the coding feels like it's mush.
damn, I would have to manually do that. I already have a system where the patcher matches the class method name in the game to the prefix/transpiler/postfix method I wrote, but I can't create a method with this name...
Just gotta expand ur system to do fuzzy searches i guess
Wow I'd never see your events lol. I've never been married to an NPC for a year.
Have you been testing as you go along?
There's no much ways around it
Yes! That's the first of things I made sure to do with every change. I'd cry if I put in all the code and none of it worked 
Also it's meant to tie to the Wizard specifically so it's being married to him directly. 
Oh! Right important question! My mod also surrounds Morgan, do I need to ask permission to make a mod for them? If so, how do I go about doing that 0-0
Ah well I'd never see your events anyway because I'd never marry the wizard lol.
And that's good that it's working! You'd be surprised how many people come in here and go "okay I have made the entire mod, time to test it" and then of course it's full of errors.
Morgan sve right
Yeah
That one is open perms no need to ask 
You can check perms on the nexus mod pages
Ooh! Good to know! I never knew that!
In general the etiquette is to check even if perms are open if you're going to be doing something as much as adding new content for an NPC but in the case of SVE it seems Flash is fine without being asked
Where would one find the perms on a mod page? 
I also have concerns since my mod is inspired by another mod RRRR. I tried to get in contact with the mod author but their discord is locked down. I'm concerned since it's inspired by it, I made sure to include hecka credits too but I didn't wanna overstep.
The permissions drop down lol
If you're not editing RRRR in any way nor using its characterisation or anything then you don't need perms just for inspired by
But if you're using the RRRR characterisation or assets, check the mod page and then ping the author here (if they are in here) or DM them on Nexus if perms are needed.
If you do need perms and can't get in contact with them, that's the end of your mod I'm afraid
At least in a publishable form
Nomori's not RRRR, right? He's Rasmodia which is...female RRRR?
Jellonip is RRRR
correct, nomori is just assorted patches into various wizard mods to do the gender swap
(in the event that you publish your mod, you may wish to reach out to nomori about that anyway)
About what? Oh using the original mod as inspiration?
Nah I think ichor meant about Rasmodia compat
Sorry, like I said this is all new to me, apologies for the silly questions 
hello, does the stardew immersive family mod for the children also work for player to player children
i mean nomori's female wizard mod is very popular and they (or you) may want to offer compatibility
#modded-stardew but psure that mod is specifically for player kids
Oh!!!
I understand
They aren't silly, we always appreciate when someone comes in to ask about permissions and etiquette rather than just go ahead and publish a mod that violates Nexus perms
oh I'm sorry i thought i was in the correct channel i mis clicked...
I have a follow up. What if there is a code another mod made that does what I wanna do already? I've seen some mods say Borrowed from and then input the code. Is that normal etiquette?
It Depends™
It usually depends on how bespoke it is
Is code considered an asset?
If it's something really complex that the person put a lot of work into, you risk them getting miffed if you yoink it without asking. If it's pretty bog standard stuff that every mod of the same type has to have, nobody is even going to know where you got it.
it depends on how much "authorship" the stuff in question represents, the amount of copying, and the license on the mod
(I'm assuming we're only talking json here?)
see here #making-mods-art message for a more detailed explanation
i had someone asking to use my code as a base for their mod that did a similar thing, and i mean, it does depend but asking always nice
Like, I enjoy using a 32 portrait system rather than the traditional one due to freedoms of expression. Which was also done by Jellopnip in their config file but I wasn't sure if it was an asset since it says on permissions to not use any assets without permission but I'm having trouble contacting them.
Just wanna make sure because I can prolly maybe make my own version of the code? Aw jeez I feel weird typing all this out loud lol but getting different view points is so helpful to me.
there's only so many ways you can do something
More portraits than vanilla is very normal
yeah lots of mods do that
having 32 portraits is not something you can "own" so there's no need to ask permission for that
You do not need any special json for it outside of the additional portrait commands in dialogue
(quill do not @ me about patent law, kthx)
So if RRRR has a bunch of extra json for it, it's not normal
No it's just in the main content.json
No I mean there shouldn't be any
Using the ${{e5}} token for example
rrrr sure does do many things
Except in the dialogue calling $19 instead of $4 for example
the what token
Yeah that's weird
oh wait is that just a dynamic token
Yeah
I assume so but it's weird that there's a dynamic token for it
it's gonna come down to "could someone tell by looking at your json that you copy-pasted it from the other mod", and likewise "will the other author be okay with that"
Overthinking intensifies
i wonder if that has anything do to do with the config which i assume rrrr has
Goodness I love that mod though, it's what got me into modding to begin with 
see the link above re:boilerplate, which attempts to explain how some things are necessary structure and you can't get in trouble for copying them
If you download a bunch of NPC mods and find json that's only in one of them, it's probably more of a "check about this" situation
Does anyone have any idea what in particular is preventing me from setting PathFindController endPoint(s) that are near the edges of maps? In particular, near the edges of the standard farm map currently. The npcs just don't move at all when the destination is too close. Works normally otherwise though.
very few people work with SDV's pathfinding code, but that said, it might be due to the NPCBarrier tile properties around all the farm exits?
I should look into the farm map im using and see if they put in the npc barrier, cause my dog (if considered an npc) runs off to the bus path never to be seen again for days
that and farm animals might be why it's there, yeah
I keep getting this error, not sure what's wrong with my code to keep reproducing this error 0-0
[game] The social page found conflicting NPCs with name Morgan (one at Custom_Morgan_WarpRoom {X:2 Y:3}, the other at Custom_Morgan_WarpRoom {X:2 Y:3}); only the first will be shown.
That means you have a clone Morgan. You didn't necessarily cause it since clones happen for nebulous reasons. If you do debug killnpc Morgan hopefully it will get rid of one
Ah ty, trying to configure and code a spouse and housemate being active simultaneously is making my brain fizzle 
Yeah that seems quite complex for someone new to modding given that it's not possible in vanilla
"Action": "EditImage",
"Target": "birdb.CP.Donkey/donkey",
"FromFile": "assets/Donkey/{{Color}}.png",
},```
this should work right?  trying to figure out why im not getting a change when its identical to how another mod makes changes to a different mod, aside from the {{token}}
Try doing a patch summary on the asset to see what's happening. patch summary asset "birdb.CP.Donkey/donkey"
I mean I can throw in /asset/donkey, but Idk why i would need to when other mods don't target through asset
in this format
There is no Load patch for that asset so I don't know if the donkey is being loaded for you to be able to edit it
If it is definitely there, try using Lookup Anything to confirm you have got the right asset name for your edit
which is weird because referencing one that changes cornucopias stuff (and works) it doesnt have a load
lol
You mean doing a patch summary on another asset?
I don't mean that it should have a load patch from you
I mean that I would expect that doing that patch summary would show the original mod's load patch and then your EditImage one, so the fact that it doesn't could indicate that you have the wrong asset name (or that I'm wrong to expect the load to show up in the patch summary)
should the target then be the id? birdb.CP.Donkey/Donkey and I just misunderstood? 
I don't have a great deal of context but I would usually expect your Target to be whatever is in the Texture path for the animal if you're doing EditImage
if you mean further up, I mean it could be but every time I do a patch summary it seems to load so much stuff that it only gives the bottom half of my list? like, I scroll all the way up in smapi and it doesn't even show all the start up stuff from when i launched anymore lol
If this is in response to me saying that I would expect the original mod load patch to be present, we can see that it's not present because of that screenshot. If it was going to exist, it would've been in there.
but the asset names are definitely correct, since I looked at the original asset name while typing it up
in what way do you expect it to be loaded, just to clear up my own confusion. because I mean.. it's loaded? In the way my brain defines that as I'm looking at the original mod's donkey in game atm
Anyone know where exactly I can find the sprite sheets for the buildings in the game for a building retexture mod? As well and the sizes? Specifically town buildings and houses? Pretty much everything besides the farm buildings
If this is the Donkeys mod by birdb, that is what your Target should be
Maps/townoutdoors I think?
generally in the Maps folder, e.g. spring_town/summer_town/etc for the town map; you can open the maps themselves in Tiled to see which images they're using
ah yes lets just make the target a completely different name than how ill actually name the file
(╯°□°)╯︵ ┻━┻
I would try esca’s thing first 
looks like the town naming scheme is [season]_town and townInterior, yeah 
That is completely normal behaviour and you should always be looking inside the data for Targets, never at file names.
guess I've just been getting lucky till now 🤷🏻♀️
I guess so, but now you know for future
where am I getting outdoors from then
I swear there was something
season_outdoorsTilesheet is one of the other big ones
ah, that explains it
that does have most of the not-town buildings on it too
For future reference, this is what I mean when I say I expect the original asset to be loaded. You can see that unlike in your patch summary, there is a load patch present for the initial creation of the donkey sprite. If you were correctly targetting the same asset name, your EditImage patch would be present underneath this load patch (in your game, obviously I don't have your mod in my game).
Random question. Just verifying. Producer Framework mod is still necessary. Content patcher hasnt replaced it yet. Correct?
Er
depends on what you are talking about
main feature of adding machine rules: you do that in CP now
PFM has additional special mechanics, but EMC also covers those
EMC is an extra framework that adds onto CP content packs, while for PFM you make a PFM content pack
I want to add the ability for a placed BC to spawn items. Ive been googling and results are pointing at PFM but... it also may be outdated
for a placed bc to spawn items?
I have no idea what that means exactly
like the worm bin?
or literally spawn items around it?
spawn items around it
I dont think PFM can do that, its only for machine stuff
but feel free to read the docs first, its usable
I'm pretty sure you need to do own C# for that
yeah i honestly dont think theres any framework for that but who knows idk maybe digus was cooking something crazy behind the machine stuff
Though you could make a day update machine that just produces whatever
But it kind of boils down to like. "Would anyone else have ever bothered to code this mechanic before"
And it may be fun to do a standalone c# mod that looks at that item and then try to place it "nearby"
(controlled by a custom field etc)
Garfield cat
FTM will be able to do that when my 2.0 alpha stuff is ready, but I'm not quite ready to commit to a release date for it
either placing items around the BC or throwing debris items from it, if I remember to add the latter action
I'm pretty happy with how nonsensical the tile query feature can get 
stuff like "TileCondition": "IS_NEAR_OBJECT <ID> <MinTilesAway> <MaxTilesAway>" + whatever settings for the items to spawn
not that I've written "near object" yet, but it's straightforward
So i need that today. If you could work on that. /s /jk
currently refactoring some stuff but it's in progress
famous last words /lh
People need to stop creating fun toys I can take and run with 😜
example of my current test pack shenanigans, with the existing actions SpawnObject and DespawnObject
"Trigger": "Esca.EMP_OneSecondUpdateTicked",
//...
"ExampleEntry_SpawnObject": {
"ActionType": "SpawnObject",
"TileCondition": "AREA_CIRCLE 30 30 20, ANY \"!AREA_CIRCLE 30 30 17\" \"AREA_CIRCLE 30 30 14\", ANY \"!AREA_DIAMOND 30 30 11\" \"AREA_DIAMOND 30 30 8\", ANY \"!AREA_DIAMOND 30 30 5\" \"AREA_CIRCLE 30 30 2\"",
"ItemList": //misc objects
"MinTimes": 10000,
"MaxTimes": 10000
},
"ExampleEntry_DespawnObject": {
"ActionType": "DespawnObject",
"TileCondition": "AREA_CIRCLE 30 30 15",
"ItemMatchData": null,
"MinTimes": 300,
"MaxTimes": 300```
what happens if you're standing on an item when it spawns in
Whelp. I kinda love that
you get stuck, but stardew has a built-in thing that destroys items if you right-click them while clipping into them
ah ok
there're some less silly tile conditions to make sure the tiles are clear
("NOT" stuff is ! because caching stuff is easier that way)
(also other mods can add actions/queries if they want)
yay \o/ thanks @vernal crest
I decided to take a break from frying my brain with my ModEntry.cs and I just finished my first event cutscene 
yay congrats!
I'm currently trying to spawn a monster i made as a subclass of the monster class using FTM. The problem is that FTM can't find it when it tries to spawn it, although it does show up using FTM's list_monsters command.
Right now the subclass is essentially a copy of the Monsters.Skeleton subclass with a few edits to string names and a few code changes to fix bugs that FTM mentions in its skeletonFTM code.
My only guess is that the subclass isn't being generated in the data/monsters directory, but I don't know how to check the modified version of it. Does anyone have an idea what might be going wrong?
Do you have to make ftm do the spawning?
It sounds like you are in C# which means you can just add the monster to location.characters yourself
I suppose I can try that, but it'll take more time to figure out
Remember to get rid of them when player leaves ofc
FTM mostly offers that for auto-serialization (also handled by spacecore) and so content packs can use them
it's pretty rarely used so I'm not sure what the issue could be off-hand, looking around the code now 
Does your monster class have a default constructor and Vector2 constructor, e.g. public Draugr() and public Draugr(Vector2 tile)?
yes. I based it off the skeleton.cs code from the base game
ah, that doesn't actually count as a Vector2-only constructor; the compiler just automatically fills in isPriest every time
FTM's list command doesn't filter properly for things it can spawn, just the* Monster subclass, but the actual spawner can only use the Vector2-and-nothing-else constructor
adding* something like this should work if you do need that constructor, though FTM can't toggle the bool itself
public Draugr(Vector2 position)
: this(position, false)
{
}```
(edit, should've been false instead of true)
I'm not overly familiar with c#, and i only know basic coding to understand how some of the values are handled for sprites and damage values, etc. Does adding that code not interfere with the first vector2 constructor
now that you mention it, yes, the constructor I posted would probably take the place of any references to your optional argument
the result would be the same, but the optional argument wouldn't really be used, it'd just take the matching constructor
(iirc anyway, it's a bit weird about those)
I'd probably just remove the = false and make that constructor explicit, and have the Vector2 one use whatever default value you prefer
like this, to be clear
public Draugr()
{
}
public Draugr(Vector2 position)
: this(position, false)
{
}
public Draugr(Vector2 position, bool isPriest)
: base("Draugr", position, Game1.random.Next(4))
{
//etc```
alright. thank you, i'll give it a try
Hey! I’m trying to make an engagement event for krobus, and I think I have that part down (using BETAS!), but how would I prevent the normal engagement with a void pendant? Would giving them the RejectItem_808 (void pendant) line work, or is it more complex?
as far as I know that should work, but if not, you could remove the context tag* propose_roommate_krobus from the item or try the RejectRoommateProposal key(s)
yep, it's explicitly attached to it in Data/Objects, so CP should be able to
oh sweet! tysm :)
somehow this fish factory of mine keeps developing confusing new problems
the tiers aren't upgrading properly now
should I just change the context tag area to null then?
I think you can set the specific tag to null like the second example here:
https://github.com/Pathoschild/StardewMods/blob/develop/ContentPatcher/docs/author-guide/action-editdata.md#edit-object-context-tags
so like this then?
{ "Action": "EditData", "Target": "Data/Objects", "TargetField": [ "Void Ghost Pendant", "ContextTags" ], "Entries": { "propose_roommate_krobus": null } },
also, tysm for all your help! 
"TargetField": [ "808", "ContextTags" ], instead, it needs to be the ID
Goby just happens to use a text ID because it was added in 1.6
and yw 
hi everyone 
I have been considering making a mod where after farmer marries Shane there’s a possible optional event where the farmer (if they also have enough hearts with Marnie) and Shane could adopt Jas and Jas could live with them on the farm
however I have no idea how to mod or where to start with that
could I have some ✨advice✨ pretty please and thank you
!startmodding Here's a starting point
Making mods can be broadly divided into two categories:
- Content packs are formatted text files, and don't need any programming knowledge. They can add/edit NPCs, maps, new items, shops, and more. To get started, see the list of framework mods, the wiki tutorial for Content Patcher, and there might be relevant guides on the tutorial wiki.
- C# mods use programming code to change fundamental game mechanics. See getting started with C# modding.
Usually it’s easier to start with making content packs, since you don't need to learn programming.
You want the content patcher tutorial
In addition, check the Events tutorials on the modding wiki here
thank u ur an angel

People more knowledgeable about events than I can help you with finer details later if you get stuck
Me: Makes their .cs and sees 0 errors
Notices, its not open in the .csproj and loads it in
Over 70 errors found

Cosmic, what are you making that requires c#?
I was trying to make a mod that lets you have a housemate and a spouse
Its a Morgan mod I'm working on thats strictly tied to them and the wizard so I'd only need to have Morgan and the Wizard capable of living with the farmer 
It's like this whole story mod and stuff
Nothing too... fancy 
sounds fancy!
I'm learning as I go so all this is really new to me
hmm is there a way to do locationname but like...fuzzy
wildcard ish
like the location contains this string but maybe more too
in debugging?
in content patcher
ah hmm
what i am trying to do is change the graphics on some vanilla things, but only when inside my PIF room
but PIF uhhh...does things
maybe use contains?
do you have an example?
well before i recommend it to you, what do you want to use it for? i’m not sure if it works outside of When conditions
"Target": "Buildings/Fish Pond",
"FromFile": "assets/Fish Pond.png",
"PatchMode": "Replace",
"When": {
"LocationName": "{{ModId}}_FishFactory"
},
"Update": "OnLocationChange"```
this was working, previously
but i think PIF gets wacky with locationnames internally
and they don't stay terribly consistant or something
oh yeah if CP has a location name token you could totally use contains
let me check
yeah, I think |contains= is an exact match in a list, so at best it'd specify multiple names
"Query: '{{spouse}}' LIKE 'Abig*'": true can use wildcards before or after the string, but not in the middle
will not work
ah
my bad
Query: '{{LocationName}}' LIKE '*_FishFactory'": true
I think, I've never tested queries
contains looks for values in a set
e.g. looks for one flag in the entire set that HasFlag returns
LocationName returns a set that has just one thing in it, the location name
doesn't SEEM to be working
but maybe it's needing a full reload or somethin
you have the right Update rate right
"Update": "OnLocationChange"
iv'e done this same thing before for animal barns but not PIF
test it in the console while you're there with patch parse "{{Query: ...}}", I guess?
it seems to work for me with {{Query: '{{LocationName}}' LIKE '*house'}} in the farmhouse
what does it return in your factory with just {{LocationName}}? you might need {{LocationUniqueName}} instead depending on how the internals work
though that may just add weird UUID/hashes instead
Parsed value: "DLX.PIF_MINE_cryomancer.fishfactory_FishFactory_3128846940094110487_Spa'"
yeah PIF does shit to location names like that
ah, yeah, that's not gonna work unless you switch to a prefix or look for another end bit
could i have it check for the current map file directly?
I don't think CP keeps track of that, but someone might know better
if this part is always consistent, you could switch * to the other side, e.g. DLX.PIF_MINE_cryomancer.fishfactory_FishFactory*
worth a shot
"Query: '{{LocationName}}' LIKE 'DLX.PIF_MINE_cryomancer.fishfactory_FishFactory*'": true
or similar
it's a bit messy, but CP (and a lot of game code) isn't really made with dynamic locations in mind
query and string trickery aren't ideal but I wouldn't expect it to cause slowdown by itself
I'm getting this warning message:
Dereference of a possibly null reference.
I'm not exactly sure how to... fix it... unless I don't even need it at all? Any insight is greatly appreciated... 
thanks for the help Esca
now to massage my other graphics into their correct places
one odd side effect i won't bother addressing
when you are building from robin, you are somewhere else, so it has the vanilla art
yeah, more complicated tokens could enable it at her shop, but I wouldn't worry about it 
Technically you don't need to do anything. I think you've got null safety enabled (probably the default nowadays), so it warns you if anything could logically be null, e.g. that API method's output. It might have some suggestions if you right-click and select "Quick Actions and Refactorings" at the top of the menu, I'm not sure.
You can also edit the C# project file and disable Nullable like this, apparently:
<Version>1.25.0</Version>
<TargetFramework>net6.0</TargetFramework>
<EnableHarmony>true</EnableHarmony>
<LangVersion>latest</LangVersion>
<Nullable>disable</Nullable>
</PropertyGroup>```
someone else might know more, all my projects are too old to enable nullable stuff on me 
put a ? on it
alternatively, wherever you're defining your SEhelper, initialize it as null!
as long as you're sure you're assigning your helper in your Entry function
im assuming you have a like, public static ModHelper SHelper; in your file or smth
yeah this should be pretty cool
too bad the walls and floors won't behave but that seems to be a PIF side problem so shrug
what issue are you running into with the walls? 
they refuse to be counted as walls for decor purposes
probably because it's not from the walls_and_floors sheet i guess
maybe i could duplicate them onto another one with that name tho
the floors act like they work but just eat your flooring with no visual change
i will just wait for potential updates i think
mind sharing your project?
you want the tmx?
it'd probably be better to have the entire project to test

