#making-mods-general
1 messages Β· Page 547 of 1
purple tree? 
in-game midnight
maybe u can just use the spacecore hud message trigger
as long as everyone install it it's basically the same
oooh, that could work, we already have Spacecore installed for another mod.
Hi I keep getting this error in my smapi log https://smapi.io/log/aa3b2c69953f4ddda768cf7304f912aa and here is the MachineData.json
https://smapi.io/json/none/bddc8a4f30ca4b7aa83aa4ddb98903c1
where am I missing setting the action field?? I feel like I'm going a little crazy
Log Info: SMAPI 4.5.1 with SDV 1.6.15 build 24356 on Unix 6.17.0.14, with 61 C# mods and 55 content packs.
Suggested fixes: One or more mods are out of date, consider updating them
at the risk of sounding like a moron... Is that a map property? Tile property? How do I... do that?
oouugh i just need to write 2 more events and im done omg
Water tile on back layer. Tile property Water T
but what to write this si the uestion
its a tile property and u can put it in either ur tileset or object
im confused why u dont have it tho

did u bake the tree on the water tile 
Tiled got mad about my filepaths so I reconnected them via TiledSheetInator but I. May have gotten rid of the forest behind it in the process and remade it manually
https://stardewvalleywiki.com/Modding:Maps
look up Water on the back layer. Explains how to set Water T
ty!!
outside of context this sounds funny
i like barely know how tiled works I am so bad at it still
i appreciate the help so much yall
I think you defined your target incorrectly
Im not a great coder so im not fully aure
I think itd be like
"Target": ["Entries", "Charecters" or something
its okay, 2 head more better than one haha
i see, lemme try
I just opened Data/Weddings.json from my unpacked files and I am wondering if the fact that the tree goes EventScript -> default matters?
i have try that, but this the error i get when trying any except Entries, default
EditData Data/Weddings > text operation #0" to Data/Weddings: an 'Entries' path must have exactly one other segment: the entry key.
Have you tried ["Entries", "EventScript", "default"] specifically? In the text operations part, not the target above that.
I recently started learning it too!
Its not that hard, hope you will learn it fast
I already managed to publish a custom map thanks to tiled
Btw is there a tiled guide specifically for sdv?
@sweet niche alternatively, you could create a custom wedding event for Abigail specifically rather than changing the default, which would just mean copy/pasting the default entry and changing what you wanted.
The game only uses the default script if it can't find one that has the NPC name as a key
sorry i dont know how to do it, i read from this
https://github.com/Pathoschild/StardewMods/blob/develop/ContentPatcher/docs/author-guide/text-operations.md#replacedelimited
yea i think for the event's i need to copy pasta and add what i want to
My specific ask was if you had tried this:
{
"Operation": "ReplaceDelimited",
"Target": ["Entries", "EventScript", "default"],
"Search": "faceDirection Lewis 0",
"Value": "faceDirection Lewis 0/emote farmer 16",
"Delimiter": "/"
}
]```
oh yea i have tried that, it show the error 'Entries' path must have exactly one other segment: the entry key
gotcha, ok.
Repeating question for context: how do I hotload a C# plugin, if at all possible?
thanks for the help guys, almost 4 AM maybe i need sleep soon
I feel like it's been talked about before, but I am blanking on the equivalent of patch reload for a C# mod.
Thanks! Now that you mention triggers and states, I did something like that for AbigailHairDye, totally forgot about it...
I spent crazy hours mucking about with this one mod and its reaching completion and Im sad bro this is my baby Im not ready to let you go yet
does anyone know where i can find a list of conditions for the trigger actions
All conditions are GSQs (or true/false)
thanks!
there's a command that might help
!reload
- Content Patcher pack: enter
patch reload <your_mod_id>in the SMAPI console window. This will reload and reapply all your patches (but won't recalculate theConfigSchemaorDynamicTokensections if you use them). - Translation files: enter
reload_i18nin the SMAPI console window. If it's for a Content Patcher pack, also runpatch reloadafterwards. - C#: see the Visual Studio hot reload or Rider hot reload feature.
Is there a way to reverse When: { HasMod: " " } ?
My tree building needs to be in a different spot when SVE is loaded, but I then need the vanilla patch to, yknow, not load, so there isnt multiple houses and all
Or am I going about this completely the wrong way
yknow I should probably stop fing around without knowing what I'm doing huh
"HasMod|contains=SVE.ID" : false
(I'm a dumbass who needs to do valid json(
anyone know why replacedelimited not work for CFE?
"Format": "2.9.0",
"Changes": [
{
"Action": "EditData",
"Target": "Characters/Dialogue/Abigail",
"TextOperations": [
{//"Introduction": "Oh, that's right... I heard someone new was moving onto that old farm.#$e#It's kind of a shame, really. I always enjoyed exploring those overgrown fields by myself.$9",
"Operation": "ReplaceDelimited",
"Target": ["Entries","AcceptGift_(O)109"],
"Search": "my collection.",
"Value": "my collection.$15",
"Delimiter": " "
},
{//"FlowerDance_Accept": Hey, sure. Let's do it. We can be embarrassed together.$h",
"Operation": "ReplaceDelimited",
"Target": ["Entries","FlowerDance_Accept"],
"Search": "$h",
"Value": "$15",
"Delimiter": " "
},
{//CFE_Abigail_GoldPumpkin": "No way! Is that-?$7#$b#You actually found the gold pumpkin!$h#$e#@, you are so cool. I mean it!{{LovePortraitsHappy}}
"Operation": "ReplaceDelimited",
"Target": ["Entries","CFE_Abigail_GoldPumpkin"],
"Search": "pumpkin!$h#$e#@,",
"Value": "pumpkin!$15#$e#@,",
"Delimiter": " "
}
]
}
]
}```
and is this the only way to do it properly just for change or adding stuff to all dialogue lines from base or other mods?
yeah i dont know what I'm doing here im super out of my depth
https://smapi.io/json/content-patcher/6518f5457d9a486e8e6e44eca00ea912
Log Info: SMAPI 4.4.0 with SDV 1.6.15 build 24356 on macOS Unix 13.4.0, with 13 C# mods and 3 content packs.
Suggested fixes: SMAPI is out of date, consider updating it
.... i really should actually update smapi
hey! just bumping this
try RGBA string like "227, 109, 103, 255"
it works!!! tysm :)
we need to know what the problem is to help
For those who saw my post the other day about the backpack chat messages, I did in fact successfully personal-mod my way into a fix by actually adding the entries to Strings/UI since the mod wasn't doing that in multiplayer xD
Ah right sorry omg
Basically:
I want VaelExterior to load in one spot of the forest if the player doesnt have SVE, and a separate spot if it does. Seems to work fine in vanilla, but once I add SVE, the vanilla location still loads and the SVE version doesnt
Was this the thing you needed HasMod|contains for?
yeah :')
SVE's ID is FlashShifter.StardewValleyExpandedCP (youre missing the CPat the end)
AHHH Thank you ill try that asap
To like track certain player actions would that need to be written in C#?
finished the dialogue for the most part just gotta finish the 10 heart days of the week ones but guh!! i dont get errors now but i still can't talk to my npc :/
im gonna finish my events and such first before i really complain cause its prob just a mistype somewhere
fixed it
it Depends
Like how many items have been purchased or something like that? Im curious about adding some sort of like vendor npc that you can build affinity or something with by purchases
if you control the vendor as in you made the shop, you could probably use action on purchase to do this
have it increment a stat
after that you can check stat for other purposes
this is doable in content patcher (and in c# if you just edit the content)
That worked! Thanks so much :D
Oh thats really smart thank you
for some reason my events arent working but theres no errors =-=
wait maybe i fogort a pach thing
hm, i need some input. I got a good chunk of tillable soil on my map you can hoe where artifact spots can possibly spawn. obviously i added to those spots via CP. Now i am wondering how to go about the fact that vanilla wont have much spots naturally without making things too complicated.
this area is reachable the moment central station can be used. I was thinking to either simple recommend the increased artifact spots mod or maybe rarely sell one of those artifact totems? if i go with the selling totem route what do you think would be a fair enough price and rarity
i know i could try spawneables via spacecore but i wanna think of something possbly simplier stuff first
is it possible to remove a markaction after triggering an action while its on true
i cant trigger my action anymore even if i set markaction to false now
i was testing if the game would give me an mail while i have a certain item in my inventory. It worked. Then i tested it again after changes but it didnt work anymore because it had an actionmark
Are you using content patcher? I had the same problem and it was just because i failed to map it out for cp so it just ignored it but left no errors
i am testing my mod on a random save
try making a new save then
@unique sigil hey, are you the same dev who made the Kisaa's Rustic Cellar mod? someone basically copied your map and posted it as their own by adding your optional room onto the main map, I thought you might like to be made aware
https://www.nexusmods.com/stardewvalley/mods/30070
vs
https://www.nexusmods.com/stardewvalley/mods/43048
ill worry about this another day because im about to flip my desk and eat it
i cant delete the mark? right now i can just make a new save but maybe for some other time it is needed if possible
There is a trigger action action to mark a trigger action as not applied
Iβm honestly not sure (I think thereβs an action for it?), but we recommend testing on new saves regardless
There is an example on the trigger actions page on the wiki that changes whether or not MarkActionApplied is true or false based on the presence of a mailflag set with a separate trigger action
ah thanks ill try and look into these things π
i think ik what i did wrong now but i will fix it later as i do not feel like messign with it rn
im gonna take a breather and maybe fix it tomorrow
currently trying to modify the crop planner (https://github.com/nmanzi/crop_planner) to work with cornucopia and sve crops, does something like this exist already before I get too deep?
not exactly a mod but I wasn't sure where else to put it
this damn tree right infront of my npc house event π
Not really sure how to phrase this question - but is it required to load some assets with the 'targetwithoutpath' thing (via CP) ? could you theoretically just load everything like that and then reference it the way you do when you load the asset instead of directly referencing its directory? I dont even know if that makes any sense
Im sorry for The Horrors TM
im kinda confused but the "targetwithoutpath" can be used if your Target (sans path) matches the file name in your mod folder
Does the make invisible command work
I have not tried, but will imediately ty
like if i had "Target": "Maps/BleepBlorp", "FromFile: "assets/{{TargetWithoutPath}}.tmx
this will work
so in assets i will have a map called BleepBlorp.tmx
you can also use {{Target}} if where your file is/named matches the path you put in target
okay so like... for example i have this right.. so when I make the actual animals i would reference Mods/{{ModId}}/[insertchosenanimalpnghere].png
(please ignore comic sans)
so yeah this will look for ex: Blueberry_dog.png in the filepath you have in fromfile
it's handy if you need to load a large number of files at once
But sometimes you dont actually need to load the assets ... but you can? like.. i cant think of a specific asset i havent loaded but there are a few that i just have to reference the actual file directory - like 'assets/sprites/animal/blueberry_dog.png' instead of 'mods{{modid\blueberry_dog.png'
and im wonder why sometimes i dont have to do that
now that i think of it, it might be because of whatever specific action im doing with content patcher 
Loading an asset means other mods can access it
So if you have a building and another mod wants to recolor the building to match a specific recolor, the building tilesheet needs to be loaded for this to work without having to paste the new texture over the old one
I see i see... like my tilesheets/sets/whatever
if someone wanted to make compatibilities for a recolor for them having them loaded is useful 
Technically we can get around that with the newest SMAPI with some extra steps
time to test my mod and watch it explode
Which is how I patch Haley's Bakery without screaming now
i cant wait for things to go wrong
I love when everything explodes
/sarc
(The tilesheets weren't loaded, so I couldn't make a patch that moved the building. I couldn't reference the tilesheets)
I'm completely reorganizing the entirety of my mod files so i expect everything to blow up when I try to launch it later
well. doesn't exactly move the building, you know, just puts stuff behind it.
already forgot a dependency
Speaking of, I don't know when I forgot to put shadows under my little free pantry
but it now has them 
even though im an artist i forget s hadows exist when making stuff in stardew im ngl
its so cute O:
Sebastian/Robin's garage is a pro reference for roof slanting, the lightened bits on the bottom of the roof help the slant effect so much
i fucked the i18n.
i do that constantly
scandalous
I released my mod over a year ago and im still having people complain about broken dialogue keys π
broken dialogue keys will haunt me till my grave and to the next life im sure of it
why do you do this
ah
yes...
you are right...
i am stupid
.......
i forgot to actually Mail
i wrote it, it's been Included
forgot to send the damn thing...
can a value in the translation file reference a different line in some way? like {{translation1}} from "translation-2"
I'm making furniture that opens shops, I'm already using Calcifer to do so but I just wanted to confirm there's no way to do it with Content Patcher. Wouldn't want to use another framework if I didn't have to.
u can also do it with spacecore, but no tile actions on furniture is not vanilla
bringing this up again in case someone got input for me(ping me cuz i gotta go to bed now in case ya got something for me)
and nowwww my npc has no schedule. whyy........
for the record here are my jsons top is schedule bottom is content
i slept for a day too
the schedule simply isn't showing up with lookup anything, and my npc refuses to go to work
your saturday beach schedule is missing the facing direction
yes, you'd use translation tokens for this, see any other here:
https://github.com/Pathoschild/StardewMods/blob/develop/ContentPatcher/docs/author-guide/translations.md#format
substituting the {{DayOfWeek}} token used in the example with the {{i18n:translation1}} as required
not sure if thats the issue but the first thing i spotted lol
well i'll see
If one wanted to have a custom animation when you use a totem (like the rain totem) how might that be done?
also, are you loading no blacks for your stuff? O:
(for me? or)
blacks......i meant blanks
facing direction is optional if not followed by any other fields, like schedule animations and dialogue, so it wouldn't prevent the schedule from loading
yeah i mean you forsy
inch resting, smapi always killed my schadule when i had none. then again, i always have more than one issue...
man i am typoing worse than usual i really should go to bed
you know maybe a blank would've been nice.
always load blank π
Sleeeeep 
Sleep is good
npc shedule still nonexistent
could you try using the debugger?
#1378384399883698236 message
sure
note: i do not know what the debugger does πββοΈ
(neither do i)
note: i do not write schedules
(yet)
New quote added by atravita as #7543 (https://discordapp.com/channels/137344473976799233/156109690059751424/1477826365721149532)
did you sleep
when testing your schedule that is
because if you try to load in on the same day it will still have broken schedule from before cached and being used
yes i am sleeping so much
good life choice
fun fact: all of those includes can go in one thing
i know i can nest includes
this is all so i do not explode trying to remember where everything is
thats so fair actually
also did you... did you load it to a blank.json yet? if so can you send an updated one please
windows what the hell are you doing
it's not nesting, more collating into a single Include call using a comma-separated Target list
is the appropriate place to ask where i can get my smapi log to upload in the modded help section?
New quote added by atravita as #7544 (https://discordapp.com/channels/137344473976799233/156109690059751424/1477827038537846865)
if you just paste your SMAPI log in chat it'll auto-upload to the site via the Governor bot 
ah. yeah right. forgot i could do that too.
otherwise you can upload it to https://log.smapi.io
how do i do that ππ
!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.
thank you!!! very much thank you
just found out one of my pet events has been checking for "adoptionLetter" instead of "MarniePetAdoption"
adoptionLetter is for a human adoption
No wonder the event wasnt triggering holy
does smapi.io/log not strip pii ? wouldn't that be easy to do
it strips the only guranteed pii, being your OS home path
ah
it strips some userprofile paths down, but there's nothing stopping mods from logging your other data
yeah that makes sense
did you send the updated json
do you have a gendered warp? oddly it's checking for female versus Female
i uh. dont think so
it always says that when the schedule is borked
ah. spacecore oddity then
yeah it did that with me when qi's schedule was weird
Anyone know how to set Robin's position in a building while she's doing an upgrade? (C# mod specifically)
i used to
search the decompile for netWorldState.Value.builders
alas no decompile on hand
well nothing has actually changed about the content.json and the schedule.json aside from me adding a blank load
so i assume the issue is with my map
i cant help you unless i can see the updated json so
i dunno what to say other than that
i'll fix it on my own, it's fine
i was just complaining lol
i was going to send it but
not sure what to even send
this but with the load you added
also did you actually make a blank.json in your mod files, you do need that too
https://www.nexusmods.com/stardewvalley/mods/27753 you can check the source
{ "Action": "Load", "Target": "Characters/Dialogue/{{Yumemi}}, Characters/schedules/{{Yumemi}}", "FromFile": "data/blank.json" },
what is the name of your NPC in your NPC's disposition.. thing whatever
{{ModId}}_Yumemi
im thinking that should be '{{ModId}}_Yumemi' - yeah
there's a dynamic token
not {{Yumemi}} but what i put there
doesnt matter
you reference that in other things not this
uhh
you also dont need a dynamic token for the name afaik
unless you want it to change in specific circumstances in game
i use dynamic tokens for all my npc names. it's a useful shorthand
yeah
this is what im doing
and it's directly copy and pasted from another npc mod ive made
so i know it works
interesting ive never done that
easier to read, easier to write
new thing i found out but its pretty cool
did you make a blank.json in your data folder?
yes
if you switch from your custom location to the bus stop or anywhere in vanilla does it work/do they move?
thats a good way to see if your location is the reason its borked but i cant see much info on your locations so i dont know
(also thank you for teaching me about the dynamic token -> name thing, very cool)
who was gonna tell me none of these count
i hate marriage dialogue actually i have just decided
god i feel you so hard π i had to redo how i did dialogue to account for that because of the limitation
don't look at me, marriage stuff is one NPC thing I do not understand
im going to eat my quiche and think about this later 
can't you simply tokenise it like {{i18n: funReturn_{{Random:xxx}}?
i hate schedules with a passion LOL
oh to have a modding quiche
love of cooking has a modded quiche...
sweet thanks
i did this
if you can even READ that
ignoring all of the tokens it would be exact ly like what blueberry suggested
a perfect day really

uβll probably need to patch Object.rainTotem() or Object.performUseAction()
Ty ty, is that doable with CP?
Appears to be a C# thing and i dont know any frameworks that support it
Oh no, not the C# 
Cloudy Skies framework
forgot that exists (<- has never once made a weather mod)
Does that let you have an animation for the custom weathers totems?
Like what do custom weather people do in this situation
still not sure how to add multiple npc warps but at least it works now. and the introduction line changes based on if you talk to her inside the store vs outside it. abby has donated her body to science until i finish the sprites
They just use the same animation.
what's going on with your events ?
adore the portrait btw absolutely wonderful
That did it, now Robin is in a sensible position
no longer in the glass
im not getting any errors that I have things written out wrong but when i try to trigger my events nothing seems to happen, the first event should be as simple as just walking into town at any time at 2 hearts but no errors or anything
what are the preconditions for your event? like c an i see them
Sounds like a precondition thing yeah
sure let me put them in the parser thign again so i can link you
Ahh ok, thank you! So just confirming, thereβs no way to change even the color without C# then?
anyone know where the wedding event is located
like... weddings in general?
no the script for wedding
Not if Cloudy Skies doesn't offer it.
i want to edit it but idk where it is
(@ Mailia; I forgot to hit the reply button)
your preconditions are in the wrong place
eh!
Alright, ty for the help button! 
are they supposed to be in the blue section?
Yeah like this
oooh ok
i sent an example
ok thank you!
-# sadpiano
(sadpiano is up there for worst vanilla track names. it doesn't sound sad, and the instrument does not really sound like a piano /lh)
maybe its sad because it doesnt sound like other pianos
the other pianos are bullying him like punch the monkey
me with my 13 thousand saves to test my mod:
i have been blessed with the information that i can make things glow with spacecore, i would like to make a mushroom tree glow
this is my goal in life now
I ended up narrowing it down to three - one with SVE/Ridgeside, one with SDS, and one that's vanilla
What about SDS + SVE
i did break them all many times, it was fun to watch everything be completely and utterly dead-
because that's a thing too, god knows I did patches for that!
well... i would just add sve temporarily to the SDS save :)
i had to as well it was a nightmare i hated every second of it
did you accidentally do what I did and put an entire building in the same place as an SDS building
that giant stall with the bunny ghost thing at it
sds' overwrite of the oasis caused me nightmares
no but i tried to put Qi's room in the casino and accidentally deleted half of it :D
this was my favorite screenshot from when i was editing stuff because i was editing several things and broke literally everything
i dont even want to know
"I'll just scooch the stall- WHY IS IT ON SO MANY LAYERS"
circled: where the stall used to be
like I just squashed that baby
amazing, i like where your building sits though its really cozy
Thanks. I guess they thought so too LOL
There used to be a cliff there in vanilla, so compatibility for where people stand is easier.
the patch i made for SDS' casino was only this big btw i dont know how i broke half of it. i wish i got screenshots though it was kinda funny
Maybe the wrong type of patch? Replace instead of overlay or something
confirming something for harmony:
Prefix patches run before the patched function. Can they completely block execution of the patched function by returning early? (I need to block something from running in a very specific set of circumstances)
how do you do viewports? do you use both x and y twice for each corner?
No, because the view may be bigger or smaller based on what zoom someone is at
I think it's centered?
i do not understand hopw to make sure the viewport is looking at my characters
because obviously that doesn't change no matter someone's zoom
yes, you can make a prefix skip the function (prefix return false). however, if multiple mods prefix the same function it's generally not possible to know who prefixes first, so there can be some wonky behavior.
The coordinates are the center of where you want it to view
aah ok
prefix return false is a bit more invasive/can have weird effects more generally so it can be worth it but it's worth thinking about other options to make sure it's what you want
To add on to this, Postfixes and non-skipping prefixes on the same function are not skipped, if that possibility matters to you
Also you can set a priority on your patch to be reasonably sure you prefix first
go the viewport to work but my farmer just continously walks off to the distance oops lmao
events do be like that sometimes
sometimes it's using move after positionOffset (broken in many cases, causes movement to never terminate and breaks the event)
sometimes it's messing up the arguments, like using coordinates instead of distances
best one is STILL that one alpha NPC saying the grocery store was too crowded for her and then walking off into space
Social anxiety queen
Button (the right one, sorry other button) and @tender bloom
More context that might help:
I need/want to over-ride the GameLocation.AddDefaultLocation function for adding a greenhouse if and only if a special Bpendragon.GreenhouseSprinkler.GreenhouseX (where x is 1, 2, or 3) exists. Normally my mod reverts the building type on the user sleeping the next day after upgrade/construction is finished. BUT if the user closes out of the game before it saves again the value is not updated, so on next load the game believes it's missing the greenhouse (a default building)0 and creates a new one.
Alternate might be patching whatever the "onupgradecomplete" function is (I have yet to figure that one out) to immediately change it from the special mod version to the regular version.
(Wrong Button)
my npc doesnt even show up to the event b ut i have her set to stand in the right coords
π€ͺ
Is Bpendragon.GreenhouseSprinkler.GreenhouseX a class?
I ilegitimately know like 3 people IRL that also go by Button in some contexts so you'd think I'd learn.
I'll admit I'm not totally sure I understand what you're trying to do with that explanation, but why does them re-opening the save not lead to the same result as them waking up?
can you not set npcs to do animations in events because my npc is not showing up :/
Because of this line in my on OnDayEnding event listener:
if (gh.buildingType.Value.StartsWith("GreenhouseSprinklers"))
{
gh.buildingType.Set("Greenhouse");
}
(correction I guess the building type isn't bpendragon...)
It has to be set because a building upgrade must always change the building to a new buildingType once it's done. But because a standard Greenhouse is required I reset the special building type and have a BuildCondition that runs some other checks including against the ModData key that is also attached to the Greenhouse
!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.
I think that the difference between sleeping and exiting and reloading is that AddDefaultBuildings which calls AddDefaultBuilding(buildingType) only runs on initial game load.
When is it getting set back to GreenhouseSprinklers (if at all? I assume it is)
Just OnDayStarted?
Never. I use the ModData dictionary to store the state required for the main functionality of the mod.
The only time it gets set to GreenhouseSprinklers... is when it finishes upgrading each time. (there are 3 upgrades)
which event?
first one
you can animate NPCs in events, but not like that
Ah
you need to declare all characters in the same event command
idk what that means
you want farmer 54 30 1 Kandi 63 24 <direction>
ah
you can look at vanilla events for an example
(you also want to modid-prefix your npc's internal name, but that's a discussion for maybe not this second)
I think I'm still confused why it matters when the save loads because the buildingType should be getting saved anyway, but that's probably more on me than your explanation or anything. But it might sound like you could have some luck if you try out a LoadStage event as well to set things up during save loading? One of those might be before the AddDefaultBuildings
can you make a mushroom tree glow with spacecore (this would be very cool
)
How hard is it to get a piece of furniture added to an NPC's house? Say adding a portrait of Kent to Jodi's house?
im angry so im going to take a break now
ill work on this stupid thing tomorrow
kicks my events
Relatively easy!
Yo uwant a map patch for it
i understand, events were awful when i first started out lmao
yea
i typically give up once i start physically crying from anger at modding something at least for the day
breaks are always good
Figure out what layer you want it on, make a map patch that's just the picture, place it via coordinates, use patch mode "overlay"
never worth making yourself beyond upset
frustrated is my most despised emotion
if you want you can ping me when you're working on it ag ain tomorrow and i can try walking you through stuff
thank you lily
i hate events but ive coded like 30 of them now so im a pro ... id like to think anyways
if you want an example, I've got some in my mod, let's see...
"LogName": "Municipal Fire Safety Map Patch - Saloon",
"Action": "EditMap",
"Target": "Maps/Saloon",
"FromFile": "Assets/Maps/FireSafety-WallB2.tmx",
"PatchMode": "Overlay",
"ToArea": {
"X": 19,
"Y": 15,
"Width": 1,
"Height": 2
},
"When": {
"HasFlag |contains={{ModID}}_Municipal_Open": true,
"FireSafety": true
},
"Priority": "Late + 1"
},```
The WallB2 file puts the thing I add on layer "Buildings2". The when is just referring to a config setting and a mail flag, you can do what you like
that might work.
And yeah, It's a pretty confusing state diagram ngl, so also possibly on me for not explaining it well.
Buildings2 lets something be on a wall without you being able to walk "behind" it, if it's low enough that's a worry.
All else fails, I doubt anyone else is gonna be patching that function really
Yeah.
Thank you
Looks like loadstage with newstage of Preloaded might be what I'm looking for. I'll mess around a bit and if that doesn't work I'll go nuclear and start patching stuff.
Hey! Iβm trying to let my machine hold multiple Objects.
Before I was saving item data manually in modData (id, stack, preservedParentSheetIndex, etc.) and rebuilding the items myself. It works, but seems to break compatibility with other mods, especially ones that add custom flavor data / moddata to items.
Should I subclass and add NetRef field? (I heard it's complex) Whatβs the cleanest way?
you could try using a global inventory? you can save its id in your moddata instead of the item fields
Quick question so ik how many portraits to have, can you have a different portrait for flower dance day event?
As many or few as you need
Like for when you ask an npc to dance/talk to them day of
and yes
You probably shouldn't and there's no reason to
Ok, thanks
I just have a bunch of assets in one folder, and wanted to make the names look as short as they can
Your Mod Id has one, and it should have that, so it's not like it will break anything
But there's always the chance of some other mod parsing it wrong because its expecting file extensions or something
So it's more of a "yes but why" thing
Not to say the odds of that are high or anything. They're probably very low
ok. my asset names don't need to be unique do they as long as the have a mod id in the content json, right? I remember Aba and Dolphin disagreeing over that.
The mod ID is what makes them unique
Ok, I'm not going to make them as long then
I don't know the context of the discussion between Aba and Dolphin
I don't remember it that well honestly
I don't think Aba and Dolphin disagreed, one of them just said that yeah technically you can make it whatever as long as it's unique, but using modID is easier
Using modID also makes it identifiable
If you're curious I could find the conversation
i disagree with anyone who says ModId is optional. it's not up for discussion πββοΈ
But I need to get back to naming all these assets
I also personally disagree with it being optional
The point was very much a "technically yes"
I do love technicallys
you are able to do it and not cause problems. You just shouldn't, ModID is easier to ensure it's unique
and has other advantages
This is how it should look right? "{{ModID}}_Fall Orange Scarf": { "Id": "{{ModID}}_Fall Orange Scarf", "Condition": "SEASON Fall, {{Fall Orange Scarf}}", "Portrait": "Portraits/Krobus_Fall_Orange_PK", "Sprite": "Characters/Krobus_Fall_Sprites_Orange_PK", "Precendence": "1", "Weight": "1" }
the odds of two Zaynes walking into a modlist are low, but never zero
For similar reasons to above, I would recommend against putting spaces in asset names and IDs
Except with the addendum that spaces are more likely to cause issues for various things and is much more understandable when it breaks someones parsing (not entirely, but not not entirely)
Ok, I'm in a pinch there then, because that's also what shows up in the config
when in doubt, consider the mighty underscore
Is this not your mod?
It is. I guess I should make an i18n?
that is generally a plus
To be clear I'm talking about the ID, not the token
"noone is going to do that" unless you're one of the leagues of people making licensed characters and simply using their full name
whoops, more than one fan of Mega Blorbo Reincarnation is making stardew valley mods
That said you can and probably should i18n your config
Zayne didn't exist when Zayne was made, but the Double Zayne problem still happened
you never know when there'll be another Zayne

But no other mod is gonna see your token so if it works in content patcher then its fine if the token has spaces however i will personally be a little sad because its broken CMCT in other cases due to my bad parsing
i should really get around to uploading cmct 2.0.0
I've just been at this for hours, and I'm so done with it, but I don't want to stop until I'm finished with my goal.
you can unwind for a while and get back to it, it's not going anywhere without you
I need to be done with it, and I need it not looming over me anymore
this may have been a discussion on putting mod id in your filename for purposes of using {{TargetWithoutPath}}? i feel like i vaguely remember that conversation
oops meant to turn off @
maybe i've been living in the looming shadow of half-baked mods for too long 
It's amazing how much time I have wasted working on this
It really does feel like a waste too
The art actually
My mod took a year and the progress really came easier when I just... made peace with taking big breaks hwen I needed
I'm talking about the art
Me doing the art for my mods and not touching code to make them real-
I mean, I made a NPC's sprite sheet that will never be used/exist 
i've thrown out whole locations with their own art. you're good hahah
I have made a thousand stupid memes that took at least an hour to make for exactly one joke (and some less, but some of those took work...)
Art is never a waste
a lot of the time you'll try an idea and you won't know it doesn't work until it's done. just part of the creative process
My files for my portait mod are such a wreck
The art files in my program, (not in the actual mod)
Yeah it was the first stardew art I ever created. IN my defense though- I had hoped to give them to someone, but they abandoned their mod idea
New quote added by atravita as #7545 (https://discordapp.com/channels/137344473976799233/156109690059751424/1477865134285389887)
sounds like a clean idea
wait I just thought of something When the machine gets stacked into someoneβs inventory it loses its modData. If Iβm using some kind of global inventory system, would that mean i have to manually clean up those global entries when the machine is removed from the map? otherwise, I guess there could be ghost inventory id left behind Iβm not super familiar with how itβs implemented but feels like that could happen
I just can't wait to be done and work on a mod I actually want to make, so I'm going to go back to naming my assets.
Thanks for the advice by the way
not sure about cleaning up old inventories (i'm not too familiar with them myself). i could see that being an issue
as for losing them in your inventory, i would probably try to prevent the player from collecting the machine with an active inventory (for example, by dumping contents when it's pickaxed)
just like how vanilla won't let you collect a chest when it has stuff in it (chests use global inventories to hold their contents)
I'm trying to learn how to mod. Does anyone know how I can do that?
!startmodding
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.
I've been reading that but have been very confused because the edit I did isn't working
Well those are the resources for learning. If you're having trouble though, you can ask for help in here and people will try and help you figure out what's going wrong
Can I ask if you guys like the names Seaglass or Seafoam better to describe an asset color?
Seaglass doesn't get a space for reasons button listed
what the color look like
Oh hey lily!
hoi :0
Long time no see!
I'm trying to edit the bathhouse entry, but when I load the game the bathhouse doesn't load when I go through the door
lily!!!

ive been really sick
I am still really sick but i wanted to do some modding so here i am
Does the normal chest use Global inventory as well? I thought that was only used for things like the Junimo Chest or player inventories.
that reminds me of the Dresser β I think that one can be picked up without forcing you to dump everything
oh it cant be stacked
well not really modding right now, mostly just lurking in this channel to see what folks are talking about
Like this
Oh, I'm sorry to hear that. Hope you can get better
One day perhaps
its okay i cant do nothing to change it so might as well exist as well as i can right
!json I myself am unfortunately not able to help right this moment but if you post your json (I'm assuming you're using content patcher?) other people can take a look at it
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 could take a looksee to see if i can help
ive patched places before on some occasions
in what world is glass softer than foam 
maybe i should switch to packaging glass for my delicate belongings
I'm trying to do it without using content patcher
imeant color wise u3u seaglass feels more transparent and lighter if that makes sense
@rigid musk Btw, I've been meaning to ask, did you get rid of the mr Qi lite version of your mod?
glass does let more light through than foam
oh, you're right. the standard chest inventory is just on the instance and doesn't live in the global inventories. my mistake
nyope it exists still why?
Oh, I guess I missed it. It is a separate file right?
(Player inventories are also not global inventories. Junimo chests are though. Global inventories are very handy though, any mod can make their own)
yeah its a separate mod page because i did not feel like making an entirely new section on that already massive mod page for the lite version ... or dealing with update stuff between the two of them being out of sync and what not
that reminds me that id have to update the lite version of my mod too 
Oh, ok, thanks for explaining
ill pretend it doesnt exist for now... its fine its so fine
This is how I feel just updating my mod at all currently
I'm trying to avoid using content patcher and instead just editing the files directly, but that doesn't seem to work how I thought it would
Definitely absolutely do not do that
uhh there was a few minor updates to some stuff but there will be when i release the newer version of it... at some point... eventually... one day
Why not?
right now ive completely reorganized my files and im rewriting all of the dialogue and stuff so ... yes big difference
Content Patcher can replace assets pretty easily and without causing compatibility explosions
There is zero reason to be XNB modding in this day and age and people will not advise you on how to do it.
My laptop isn't powerful enough to use SMAPI. I've already tried it
xnb modding is sort of like using content patcher, but less convenient, less powerful, and less compatible with other mods
smapi is.. not... it shouldnt require even an itty bit more from your pc than regular stardew on its own
It would require an itty bit more. But a really itty bit
When I use it it keeps crashing
if SMAPI is the straw that broke the camel's back, your laptop can barely run Stardew unmodded, and I do mean barely
mm stardew (vanilla) but i get 3 fps
I'd be worried that just running a save too long would also cause crashes on that
I can run stardew for hours with no problems
Our tech support forum could probably help you if you wanted to make a post in there regarding your SMAPI issues, but RE: XNB modding, it's not done anymore and people in here do not do XNB modding. All of the resources and help you can find would be for SMAPI and Content Patcher et al.
im guessing its user error then, not to be like rude about that or anything but generally SMAPI can run on potatoes with lightweight mods
I don't even know where to go to get an xnb repacker. I'm sure it's probably still somewhere on the wiki, but I don't know where
Possibly if you have 4GB ram??
if it can run on a phone im 100% certain it can run on your pc unless your pc has like ... yeah 4gb of ram
But at that point youβre really pushing it for vanilla iirc
^ you definitely couldnt run it for hours in that case
I mean for long enough ingame, like ingame multiple years. You should really get tech support to help you with that problem, it sounds like something's installed wrong maybe
4GB of ram can barely run an OS these days. it's a pretty sad state of affairs
How do I look that up?
How many decades old is this laptop?
You should post in support, not here β I donβt want to get too off topic
#1272025932932055121 for SMAPI help
it... is barely a difference (this is without mods on one of my long term vanilla saves)
miniscule difference
It's new but it's a school provided one so sort of low on processing power I'd bet
Wait, lily, I just realized because of my name there might be some confusion lol. You did recognize me as Parcy right? π
:D i literally did not
π
i just assumed i forgot your name or you changed it honestly 
Then it's absolutely not a computer power problem. nothing newer than the laptop I used in college is going to have that.
And I am nearly 40
you should head to tech support
if you make a post in modded tech support i can walk you through smapi stuff and see if i can figure out why it was crashing, and then you can come back here and i can help you do a contentpacher mod for what you want
No, I literally just stole chocolatte12's name because several other people were doing it and it looked like fun
because in no way should you ever, and i mean EVER use an xnb mod
thats so funny actually
I'm not sure what to post there
{
"buy": 240,
"harvest": {
"extra_chance": 0.1,
"level_increase": 5,
"max": 6,
"min": 2
},
"id": "cranberries",
"index": 493,
"name": "Cranberries",
"regrow": 5,
"seasons": [
"fall"
],
"sell": 75,
"stages": [
1,
2,
1,
1,
2
]
}```
this is the json I have for vanilla cranberries (from <https://github.com/exnil/crop_planner>), it lists `extra_chance`, `level_increase`, `max` and `min` under `harvest`, but I have no idea what `level_increase` could mean other than it relates to farming level of some kind. any ideas? or where to look to find this info? wiki has nothing on it and neither does lookup anything in game
just the explanation of what's going on is good!
I understand every other part of what's here but level_increase is lost on me, also not every crop has this
Sorry for the dumb question, but I can use & in an asset name right?
it looks like this is super outdated. up to date crop data can be found by unpacking your files (we have a tutorial for that) and by cross-referencing with the wiki
ugh why did it not @meager ginkgo
it probably is super outdated π thanks I'll look at unpacking them
!unpack
Follow this guide to unpack the game's content files in order to see and explore how the game data is structured.
It's helpful when making your own mods, or just to learn about how the game works!
is there such a thing as unpacking stardew with mods running so I get all the data or is that the same as just opening a mod folder
unpacking is to view the vanilla assets
if you want to view mod data you can go into the mod folders, or use commands like patch export to see the output of assets after mods have modified them
perfect I'll try that
You ever read your own debug log and die a little inside because you know you have to do something painful?
I have to HarmonyPatch in the middle of a save file loading
if that ain't asking for trouble I don't know what is.
...why do you have to do that 
i must say that does sound painful, and i suspect there is a way to avoid doing it
Is it possible to launch the arcade game journey to the prairie king at the intro sequence when the farmer is at the desk about to read a letter
Log for reference: https://smapi.io/log/66d181aa873c406cab3b6bb8b60bb0c7?Levels=trace~debug~info~warn~error~alert~critical
if a player uses my mod to upgrade their greenhouse and if they exit the game without saving the day after it finishes upgrading it exists as a special type of building, and not a "normal" greenhouse. But the game doesn't like this, the game wants there to be a normal greenhouse, so if this happens the game tries 2 seperate times during file load to force the existence of said greenhouse before it loads mine in.
If the player plays through the first day after the upgrade this doesn't happen because I change my special greenhouse into a normal greenhouse.
I want to interrupt the start of the game
Log Info: SMAPI 4.5.1 with SDV 1.6.15 build 24356 on Windows 10 (10.0.19045.0), with 9 C# mods and 0 content packs.
Suggested fixes: One or more mods are out of date, consider updating them
Note: Out of date mod not a problem, it's one of my other ones.
This doesn't explain why you can't just patch in entry, though?
of course it's possible, just transpile the GrandpaStory minigame at a select point in the IL to set the menu to a new instance of AbigailGame
wait, if the player exits the game without saving?
why does that change anything in the save at all
The AddDefaultBuilding ID: Farmhouse are from a patch that just intercepts when AddDefaultBuilding is called and logs the request before continuing. Note that it appears twice before GH 0: GreenhouseSprinklers.Upgrade3 makes an appearance which is the earliest I can Fix my GH type.
Right, but... you can still apply the patch in your entry function.
just keep track of how often it was called, or what the current load stage is
You kinda have to anyway, because what if they exit the save and re-enter it again?
Because AddDefaultBuildings is only called on file load, not on a new day. So it is saved into the save file in the special case, but then I overwrite that on the next save. So if they quit out after the save where the upgrade occurs, but before the next save when I fix the problem then they can end up getting a duped greenhouse.
sorry, it's late here for me, but you're saying you're patching the save logic too, right?
oh wait no you're saying the game is calling it
That's where it is yes. It just runs it's patches during the file load routine which is always a "fun" time to be making changes.
Okay, that makes more sense, I (and I believe iro and ichor too from the sounds of it?) thought you meant you were literally calling harmony.Patch during save loading.
(no I was just generally 4am confused)
oh hell naw
Go to sleep!
I choose life over angry pitchfork mobs because I irrevocably broke the game.
Hey wem
[Content Patcher] Ignored (CP) Tilly, the Tea Loving-Librarian NPC by strawhatwem > Character Load Tilly > assets/Characters/Tilly.json > Include assets/Events/eventsTilly.json > Tilly's 6 Hearts 2: one of Entries, Fields, MoveEntries, or TextOperations must be specified for an 'EditData' change.
yeah its fine
guh ill update the files rn in case other people begin reporting too
oh no. I was afraid that might happen.
Naively patching out all instances of AddDefaultBuilding(Greenhouse) means that the ruins are never even spawned in.
So I have to patch around file creation.
ty for reporting btw! if i sound annoyed its just bc im sleepy and actively fighting it instead of giving in 
Why not just remove the greenhouse after its added on daystart?
Might screw up someone's "multiple greenhouses" mod. I have recieved feedback that mine does work with those. (this is an older mod that I just haven't had time to fix this bug in for like a year and a half, but with the 10th anniverseray stuff I decided to get off my butt)
Well, messing around with the save loading like you're doing also might screw up things, too
Yes, but I feel like "Keeping an unwanted greenhouse from spawning" is better than "possibly accidentally destroying a wanted greenhouse"
Wait, I just realized, this would be an incorrect way to use a mod id because I'm aiming for base game krobus to be edited right?```
{
"Action": "EditImage",
"Target": "Portraits/{{ModID}}_Krobus",
"FromFile": "assets/Krobus.png"
},```
this will edit an NPC named blueberry.LoveOfCooking_Krobus, which doesn't exist
right. krobus's internal name is Krobus and does not have your mod id in it
Right, I thought so
I'm trying to mod id my own sprites, so I'm working on that right now
"LogName": "Krobus Appearance",
"Action": "EditData",
"Target": "Data/Characters",
"TargetField": ["Krobus", "Appearance"],
"Entries": {
"{{ModID}}_Krobus": {
"Id": "{{ModID}}_Krobus",
"Portrait": "Portraits/Krobus",
"Sprite": "Characters/KrobusSprites",
}
}``` Would this be correct?
How do green houses logic even work? Is there some tag that effects the interior of one to say "any crop can grow here"?
are you trying to replace krobus' default look or add a new appearance?
then you probably just want to EditImage the png. right now you're adding a new appearance
Oh, I have an edit image
krobus doesn't have a default entry in appearances
you only need to add your mod id to original assets you add to the game, such as a new NPC
presumably you can't have two mods that both edit how krobus looks by default, and it's natural to conflict
actually you could even Load his portraits if you wanted
Oh, ok thanks.
IsGreenhouse map property
worth noting that GI also ignores seasons, but the GI behavior is hardcoded into IslandLocation IIRC
IsGreenhouse is how the greenhouse does it nowadays, since the greenhouse interior is no longer a special location type like it was pre-1.6
up
So, none of my assets can be found because they each have a FromFile which matches non-existent file in my assets folder, apparently :/ Also my Santa red token can't be found? This is my json
https://smapi.io/json/none/a374834452894bdd8974b3b84f1d8fab
And this is my asset folder:
you didnt load your targets the same as you have them in appearances
you loaded them like this, but the mod is looking for this
so only SantaOrange exists, not Portraits/{{ModId}}_SantaOrange
Every custom target should have a modid in it, and every custom entry key/ID in your appearances should also have your ModId in them.
I don't know if {{TargetWithoutPath}} plays nice if there is no path to begin with
thanks
there is
Can I use OnAssetRequested to somehow give multiple instances of the same type of building different textures?
Or is there a smarter way to do that?
you have a custom type already, right? why not override one of the relevant texture or getdata methods?
simply return a different asset name based on whatever conditions you need
does the building skins system not do what you want
or gods forbid just AT
dont tell chu I recommended AT
I have a key in the ModData dictionary for a greenhouse. The greenhouse is still just a vanilla greenhouse otherwise.
you could just have your Load Target be "Portraits/{{ModId}}_SantaRed, ...", don't remove the mod ID from the asset name.
anybody uses StardewUI, ive a question. How do I define a fallback case when the *switch doesnt define match to any *case values?
question about map patches, when applying a .tmx file as a map patch for like a bridge or simmilar, is there something specific i need to do to properly remove the building layer 'shore' tiles so the bridge can actually be used?
since currently thats the only issue im having with this unlockable bundles bridge is that it can't actually be used once its placed.
Set it to passable T
Im not home but search that term on this site for more explanation https://stardewvalleywiki.com/Modding:Maps
i mean. that'd make it work. but assumedly it'd leave the tile visually there
Oh the image didnt load for me earlier lol
since the bridge itself is on back2. and i have tiles on the buildings layer for the island visual that i need to remove for it to be properly passable. (and some stuff with layering.)
I guess a sol
Solution would be to embed an invisible tile on the building layer then via properties make it passable
I don't think that's supported
thought so. havn't see anything in the docs, thanks for confirming
Need some help with a small SF recolor I'm trying to get to work. I was targetting some assets from other mods using CMCT but I'm not really sure if I've been doing it right as the patches don't apply
manifest: https://smapi.io/json/manifest/241bbf90844b4338af1feeb30d11a362
content: https://smapi.io/json/content-patcher/e21ecf0f2e904339b4719bb2d07fe419
SVE patch: https://smapi.io/json/none/339f437f7a3d4e4fa2b244cbc5bcfb2a
do you have a log?
Log Info: SMAPI 4.5.1 with SDV 1.6.15 build 24356 on Windows 11 (10.0.26100.0), with 17 C# mods and 19 content packs.
Okay, found one error I made, used the wrong fromFile, let me see
Still nothing
I'm guessing I screwed up the load order somehow
I don't think what you are trying to do is legal
huh :o
I'm not all that familiar with CMCT, but from reading the nexus page I would at the very least try setting the dependency for Hitme.SVESimpleFoliagePatch to true. don't know if it will change anything, but worth a try maybe?
I would simply do an even later edit on whatever Hitme.SVESimpleFoliagePatch is editing
I wasn't reading careful and thought you meant against the law
here i thought i was doing something morally wrong rather than technically
breaking the law by inflicting physical harm on all of you with my questions
Okay so does that mean I can't edit the assets of a mod using CMCT and will rather have to target the according coordinates on the tilesheets instead? 
is there any place i can listen to all audio ids in the game, instead of extracting all the xwbs?
yes on youtube
although im not sure if that is considered pirating? i dont know about the specifics
Yeah I think so
You don't have to depend on this other patch in that case
hey there! i'm planning a mod but since i'm new to modding from scratch i'm still collecting docs and such. if i wanted to add a cat to a space and have it operate like a pet cat (petting + seeing the name), but not have it counted as the player's pet, is there anything special that would need to be done?
sounds like an NPC, im unsure about the ability to pet though
i downloaded foobar with the xsb extension
makes it easier to go through all audio files
Hiii guys, I'm new to modding and need help.
I'm adding heart events for Harvey, and want to add a special dialogue line after one of events, based on player's answer in quickQuestion where a Flag (addMailReceived) was given, and I don't know how to. Anyone maybe knows? T-T
oof idk if u can add an action inside a quickQuestion
if u are then i'd add a conversation topic
How would that work?
you can add commands in an event and one command is addConversationTopic
a CT sets a topic for other NPCs to talk about, provided you add the appropriate dialogue lines for them
so that is half of what u want solved
i don't know if you can incorporate it with unique quickQuestion answers, i've just never done it
Okay, either way, thank you for trying to help.
Would it be better to change quickQuestion to something else? So it works based on, idk, answer IDs or something? Is this a possible option?
hmm i'm really not sure about conditionals in events like that, i've barely used it and it was a while ago mayhaps someone else will know !!
Thank you anyway!
that makes sense, thank you... i guess I'll have to look into whether there's some sort of existing on click behavior for npcs to use
Stats for March are gonna be fun!
oh yea
omg I found a working solution! Maybe it's not logical (or maybe is, idk), but works just fine!
If anyone also has a problem like me, there's my solution for addMailReceived + quickQuestion combo in event
simply use addConversationTopic or action addMail after the (break) as one of the commands
or that works too!
It's probably one of the easiest ways and my brain was looking for something more complicated just because
oh hey! that's great
i will file that away in case i need it :3
okii!
How can i make villagers change their schedule temporarily for a day? and that day/moment is randomly triggered so i cant preconfigure it for a specific day
most of the NPC guides are about making new NPCs
like completely randomly triggered?
yeah, my C# code should be able to trigger this schedule change for the day
and the C# trigger is random within some day range and day time
In C# you can directly manipulate the schedule points to do what you want
The schedule is calculated one time in the morning though, so if you get the data to update before then it'll also work
Relevant mod https://www.nexusmods.com/stardewvalley/mods/31271
thanks
can i temporarily make NPCs deviate from their schedule?
like walk to location x,y and wait there for 1 minute or something like that
You would do this
Or you could take over their pathfindcontroller
I don't know your usecase so it's not clear which approach is best
I am planning a weather&disasters style mod and for the earthquake event i want the villagers to panic and rush towards the town center and stay there for an hour(if event is triggered while player is in town), after that continue their usual schedule
The quake event is randomly triggerred
Taking over the path find controller makes sense
Make sure to increase their speed, flip the ignore schedule thin, and uh figure out how to restore the schedule 
Does this??? Work in tiled??? I've just been doing the same thing with a content patcher EditMap but the wiki seems to imply you can just add them in here?
i could totally be understanding wrong though tiled confuses the ever loving shit out of me
https://smapi.io/log/bc42585663ec447a964baf3cf78d7cc5 here is my log and here's the machine data json
https://smapi.io/json/none/61bee1899fd54808a52ae7c82916ac43 feeling kinda lost on these errors. Also. My caramel apple pig walks sideways, but my candy apple pig doesn't even though they're set up the same way?
Log Info: SMAPI 4.5.1 with SDV 1.6.15 build 24356 on Unix 6.17.0.14, with 61 C# mods and 55 content packs.
Suggested fixes: One or more mods are out of date, consider updating them
Quick question: The game is translated to Chinese, but is it actually simplified or traditional? I'm translating my mod (the ac plushies), and some names are written differently between simplified and traditional chinese, and unless I missed an info where both are available I only see one "zh" i18n file
Edit: I seem to have found the info, it's Simplified Chinese (if anyone wondered)
You could use the mod soundboard by spiderbuttons instead. Itβll be a lot easier
It'll work minus the {{ModId}} token part. That will need to just be the mod ID as-is.
Thanks! Thats good to know
is it possible to explore joja office before the player opens the desk letter from grandpa?
That office just exists in a cutscene, and probably not any more of it than you can see in the scene

not possible methinks
it's in minigames or something
if you're doing C# anything is possible obviously; the question is how much of your own sanity you're willing to sacrifice patching/recoding the minigame
There's no actual map associated with the office, yeah. It's just a series of illustrations that get panned through for the cutscene.
New quote added by atravita as #7558 (https://discordapp.com/channels/137344473976799233/156109690059751424/1478139547396210770)
I know it's possible for farmhands to have a null currentLocation, but is it also possible for NPCs to have a null currentLocation? 
Like if they are in the characters list but have null location for some reason?
I ask cuz I got a comment about an NRE on this line so I feel like it has to be either a null currentLocation or a null NPC, but I have no idea what kind of situation results in me getting those from a Utility.ForEachCharacter() call, as I've never gotten a report about this before.
Could it be null rawNpc.Name
I thought you had to give them a name to even construct them
Yeah but it's not read only is it
I mean I guess not, but what reason would there ever be to set an NPCs name to literal null?
The thing is just I don't think the npc itself can be null here, gotta be some field on it which is null
It'd have to be either the location or name, because the NRE happens specifically on this line, not inside the NpcCacheData constructor
Mysterious...
Or well
If it was name, then it would mean the NPC itself is null
Since name is the first time it tries accessing the NPC
I guess u would have to just check for either
I don't remember if the location is actually set if u just add something to characters maybe go look for the on change handler
Naturally no log to try and investigate further to see if I recognize any mods that might be makin fake NPCs or somethin 
If there's nothing then maybe some mod is doing it
Does the characters list have an onchange handler?
Seems like it uses OnValueRemoved but not OnValueAdded
I'm just gonna wait for a log and hopefully remember to add in a bunch of random null checks soon, I guess
I vaguely remember issues if NPCs went into the movie theatre like sve Claire but that was 1.5
This UpdateCharacters function happens at least once every 10 seconds so I feel like I would've gotten a lot more reports about it before if that was still the cause here
Unless you mean it was like in the transition between town to movie theatre and not just them being in the theatre, in which case this'd be some seriously unlucky timing, if so 
You have three layers of cache
That's awesome
Anyways, people have before inserted nulls into the character list
Wanted to cache as much as possible instead of sending data about potentially hundreds of NPCs every second 
Inserting nulls in there sounds scary why would they do that and cause problems for me specifically
how dare
And why has it never blown up on me before
Hello, is it possible to get a CP mod's config to show a block of text like this, or is that something only done in C#?
C# only iirc
Awwwwwww dramatic sigh
I think my whole personality grates against config option limitations tbh
You can make it so that it has text if you mouseover the option though
just not underneath it like that
Yeah, I know the "Description". I'm trying to work around needing lengthly explanations that get cut off in my UI at least.
How would I line break in the mouseover text?
Hm. Not sure if that works, maybe someone else knows
you could try \n
I'll give it a go. I've seen line breaks appear in them, but the example I saw also failed to wrap on the lines that were not broken. Also that was probably C# too.
I intercepted the desk letter scene and added a dialogue prompt now that it works I was able to play the prarie kiing game from here. I'm trying to figure out if I can add any more features to this...
start with cowboy hat if you beat the game 
I'd like a little help, if anybody could. I've made up a new farm, and I'd like to put some bridges on it that need to be repaired (like the beach bridge.) I've got the broken bridges set up with an Action object set on each of them in Tiled, and I've coded the event in my json, but I can't get the game to let the player interact with the bridge.
oh that would be cool if the player got something for playing the game before the game actually starts..
Replace the grandpa letter with a pink slip for playing video games at work
The beach bridge is done via hardcoding, but you may want to look into Unlockable Bundles
Is there an easy with with Tiled to see the X and Y locations that cause warping?
I added a gameboy sprite hidden beneath the desk
now maybe I can add a special item cowboy hat is perfect
hopefully it's not too difficult
Ah. I have that installed, I just thought it was more for the community house and those.
creating the existing hat is easy, adding a new elite cowboy hat is also quite easy
I need to add it into my C# code
should be as simple as ItemRegistry.Create("(H)0")
Thank you
is the prarie king game difficult? Stage 1 should allow for a normal hat maybe and then better hats for completing final stages....
After a lot of trial and error and a few hours of work
I understood how to make and customize my custom building and map and teleport in and out of it!!! Accomplishments xD
Hey all. I must have misunderstood something with the advice I was given yesterday, because all of my assets are still nonexistent. https://smapi.io/json/none/a6596108ad6d4380bc918d4de026bfd5
Is there a wiki page or CP doc I should look at too?
Ohhh
Wait
My values!
They need to be mod id-ed too don't they?!
I thnk someone mentioned that and I didn't get it then lol
I'm... going to go try that π
imo prairie king is quite luck-based, you can cruise if you get a lot of coins early, or completely fail because you weren't able to get a damage upgrade ahead of stage 2
Sometimes asking for help pushes you to look at and think about your problem one more time lol
a lot of runs are decided by whether you can actually kill a mummy lol
Reporting back on line breaks in config descriptions. Using \n inserts a line break -BUT- prevents the normal text wrapping behaviour.
It's still broken lol
Oh, wait
I may have realized another problem 
uh oh
i wonder if it expects line breaks all throughout in order to "wrap" the text (sorry not sure how to word this)
Nvm 
Yeah it looks like that - but if you don't use ANY line breaks it does the wrapping automagically. But if you do use one, it expects you to do them all manually.
Did you fix it? My theory is you have to load to the target Portraits/{{ModID}}_SantaRed - you're missing the Portraits/ part. It's been a minute though so I'm no longer super confident.
I have not fixed it yet. I guess I could try loading it
thanks I have added some logic in time to see if it works
you're correct this is the issue
yes the issue is that you haven't loaded anything into either Portraits/{{ModID}}_SantaRed or Characters/{{ModID}}_SantaRed (+ others)
the target needs to match the texture
Oh π€¦ββοΈ
Yay I still got it
Technically you can also just remove the Portraits/ part from your Appearance data but it helps to stick with convention where possible
heresy
Button I have a stupid question
Which is more important
Junimo role or 10th anniversary role
Junimo!
I'm going to petition aquo to get you a special slitherlegs-junimo role
i kinda wish i were purple
like regular slitherlegs
π but it would mean forfeiting my pufferchick
Would this be correct?{ "LogName": "Load Krobus Clothes", "Action": "Load", "Priority": "Low", "Target": "Portraits/{{ModID}}_SantaRed, Characters/{{ModID}}_SantaRedSprites, <etc. the rest go on like this>", "FromFile": "assets/{{TargetWithoutPath}}.png" }, Because I'm still getting errors π
Do your assets include the {{ModID}} in the .png file name?
Still a lot of FromFile which matches non-existent file errors
No, I didn't think they have to?
Well, it is part of the targetwithoutpath
{{TargetWithoutPath}} basically takes everything in your Target field after the last / and uses that as the file name to look for
And it does this after evaluating what the token is, so your ModId gets turned into the actual modid from your manifest first
(If you want you could do Portraits/{{ModID}}/whatever)
Could do
I'll try this, thank youuuu
So, Portraits/{{ModID}}/SantaRed?
As long as you then plan on looking for assets/SantaRed.png
And then updating all of your Appearance entries to look for e.g. Portraits/{{ModId}}/SantaRed
Ok, I'll try that
The customs are showing now and no errors!! I also changed the values to do the same{ "Name": "Santa Red", "Value": "{{ModID}}/SantaRed" }, But did not change the config schema: ```"ConfigSchema": {
"SantaRed": {
"AllowValues": "true, false",
"Default": "true",
"Description": ""
},``` It still works though! The only thing not showing now are my custom default sprites:``` {
"Action": "EditImage",
"Target": "Characters/KrobusSprites",
"FromFile": "assets/KrobusSprites.png"
},``` I'm guessing I should load these in, even though the default portraits work just fine with the edit image? Thanks so much for the help you've all given!!
load vs editimage is a personal choice; the issue is your target is wrong
Krobus's default sprite's asset name should be just Characters/Krobus.
Oh, didn't realize the asset was named wrong. I did that because I had them all in the same folder, and couldn't use Krobus twice. I'll change all the paths and make a separate sprites folder I guess. Thanks!
you're fine to simply use ```json
{
"Action": "EditImage",
"Target": "Characters/Krobus",
"FromFile": "assets/KrobusSprites.png"
},
Ohh I see what you all meant now
you'd only need to also change the FromFile value if you were using {{Target}} or {{TargetWithoutPath}} in the FromFile value, since then it'd be relative to the Target value
or rather derived from
Unless you went {{TargetWithoutPath}}Sprites.png
I forgot about targets being different from file paths π€¦ββοΈ
I remember knowing the difference, and somehow just didn't see it here
Thanks for pointing it out
targets are arbitrary asset names, they just happen to match with filepaths in the base game
As a mod user I prefer conventional file names, as it makes it easy to search my HD for stuff.
The characters/ is what specifies that they're sprites too anyway
as a mod author my only concern is making something that works, if the users want to look at files they should probably sign a waiver
Thank you for the explanations!
ive just started formatting my mods the same as vanilla's files
Yeah, I put everything in the LooseSprites folder.

If i formatted events like vanilla does, I think I would actually die
Especially if I have to do it without the help of any VScode extensions
Just remembered I need to add an i18n now lol, and I thought I was nearly done π
OK! Compression will be used
Also, will encrypt
Decryption keys will be provided to those who write me a letter
Oh no, I just realized my santa orange just looks like a warm red lol π¦
I mean, I knew it was on the border, but I don't think it makes a lot of sense in a config. Guess that's what the i18n is for
Is it bad I don't even like my non seasonal portraits anymore? Outside of a couple of expressions, the sprites, (and the seasonals), I don't think I even want to use my own mod anymore lol.
Guess those are enough reasons to keep using it, but I feel like he needs outfits for every season now.
i multilined my events then decided i wanted them on a single line again
so uh 
Whyyyy, I need to know!
ehe :3
(idk the real answer is i got tired of looking at it
much nicer in the Giant Event Block
Interesting. I know that way does save space. I think like multilining makes it feel more modular., personally
Technically you're still open source if you promise source available on request
You know
I only accept carrier pigeon
i actually prefer carrier snail
π€ mod refuses to function properly... i have no idea why? all the tiledatas for the exterior of the house refuse to Exist https://smapi.io/json/none/4fc3d0a51ff0439b9a460204a9ce636d
is there a reason why ur doing the actions in the json instead of in tiled? /gen
typically you'd do it either to use CP conditions or CP tokens, such as {{ModId}} in the action value
ohh right fair
to be clear, the 'tiledatas for the exterior of the house' covers lines 127~227 for the Backwoods edits, right?
uhhh yeah near the bottom
my reason is i got tired of opening tiled
Have you double checked that you do have tiles on the Buildings layer there? I notice that your tile positions for the TileData are pretty far away from the spot on Backwoods that you're actually patching the map onto - which might be on purpose but I bring it to your attention in case it's not.
Ugh yeah thanks π how did i not notice that
What am i gonna do with an action warp at like. The top of the map...
Confuse players xD
running a transpiler inside another transpiler, what could go wrong
what does this mean 
Wren, if you are "just" figuring out what to patch, look for PatchProcessor.GetOriginalInstrictions and the similar function that gets the modified instructions
hey, it works
SDV Mods are still .NET 6 right? Not 8 or 10? (asks the man currently upgrading a huge project at work from 6 to 10)
oh can you grab IL outside of a transpiler?
That's what i do for similar stuff....to find the function I actually want to patch
Yeah
that is better
Yes. .NET 6 must be your target.
;_;
Hopefully 1.7 upgrades that now that 6 is no longer in support.
I would personally assume that to be very unlikely (based on nothing but vibes).
Sinz was fiddling with getting SMAPI to run on net9+
u can bump the C# language version for some but not all newer features
I don't actually need the newest language features. More it's been the fact that IRL I've been migrating a ton of projects from 6 to 10 to make the it security team happy.
I enjoy having field and thing?.prop = value

