#making-mods-general
1 messages · Page 395 of 1
because I thought I needed a lot of extra space
Go to edit tileset and change the file it's referencing maybe
Also check if u got wrong path at some point good ol climbing
So that the expected png isn't the one tiled actually used
Actually...
I just scienced for you, and the solution was close the map after saving the new tileset PNG and reopen the map.
_>
Well i do spot climbing on ur paths.png
thank u i shouldve known i shouldve tried turning it on and off again uisgiufsg
Even Tiled knows the white isn't part of the tileset, it goes to 0,0 if you try to hover them in the tilesheet settings
Should probably fix that
So closing and reopening the map gets rid of the white space
yeah I havent fixed my stuff, havent put it in my mods folder yet 😔
but i will !
hmm i guess my follow up question is how do I send this to a client?
Zip file and ask them to unzip in mods folder?
and potentially like, teach them how to fix tilesheet climbing
well if theyre a client you should fix the tilesheet climbing yourself
Are you just doing the map for the client and they're loading in the content?
yes i did i figured it out just now!! tysm tho
i was planning to
but more like, what are other things i should do to ensure it goes to them with minimal problems
yeah just the map
i normally just do the art but this one asked me to do a map and a spouse room too so i was unsure 😭
Ah, I see
pau have you tried my extension yet
Well, coding it into the game is (the map/location) the most foolproof method
bby i havent yet iugfsiugs i really should 👀
But if they're gonna do the coding themselves, you can probably just send them the map and the relevant custom tilesheets, and warn them about the vanilla tilesheets being needed if they open the map in Tiled.
you could send just the map and explain that if they ever want to make any edits to it, they will need to add so and so tilesheets
thank you gang
I'll def let them know
I'm not on my pc at the moment, but would you be able to go into more detail please :)? I'm still a little lost 
Well, when you're back at your PC, check to make sure there's nothing in your SMAPI console about the schedule not parsing
If there's no error, it's possible that the Target you are using for your schedule doesn't exist, and that you're not using a Load to make it exist.
I would need to create another file called "blank.json" then load it before the schedule?
Or should I just make sure that It's not parsing first?
Check that there's no error in your log first.
Theres only an error once I load a save file, but I can look at it later tomorrow :)
That'd make sense, since the character probably wouldn't try to load until you open a save. 😛
Lool. Thank you for the feedback and help btw. I'll check what the log says tomorrow :O
But yeah, the usual culprits for a schedule not running are:
- It didn't parse the schedule for some reason and throws an error that should say why.
- Your schedule target is wrong or nonexistent.
- You changed the schedule or map warps and didn't sleep a day or load a new save to recalculate the NPC pathfinding.
I've slept in one day to Day2 after creating a new save, but nothing changed. And if the schedule was not parsing would that be a content.json issue?
If it's not parsing and is throwing an error, it'll usually tell you it's because of a specific schedule key or format error.
Could be anything from a key that isn't recognized to missing punctuation to a location that hasn't loaded yet.
Yaay!! I love trouble shooting!!! Also I've replied to my Schedule.json I sent earlier. I didn't change anything besides adding a comma behind the first schedule and removing the second one. Is there anything else missing?
And thank you again for the help :)
Try adding a second schedule point for each of those keys, it might be behaving weirdly because there is only one.
(even if it's just a few tiles over for the second location)
separate your two stops with a /
So for example "spring": "610 BusStop 15 23 3/630 BusStop 19 23 2",
yep
-# or to use my extension— sorry I’ll stop now
I recall thinking there needed to be 2 stops for a schedule key to be valid at some point and I think it was purely to avoid weirdness rather than being strictly required, LOL
Awesome, I'll give it a shot tomorrow. Y'all are so helpful in here, thank you again :)
someone made a localisation for SVE based on/recommending my vanilla localisation!!
truly I have made the big time
Has anyone ever tried switching scenes from within an event?
For example, a farmer is at a bus stop. The screen goes black, and then he appears at the beach. The event continues.
changeLocation will do that
I tried it, but it completely failed — the camera keeps moving.
its not moving at the bus stop and after you changelocation its moving around?
Are there any similar mods with such events that I could refer to? Thank you so much for your help, anyway!I'm a little slow.Because it is being translated.
The situation is actually much worse — after changing location, the character keeps moving and won't stop.
pretty sure there is vanilla event that uses it. sorry Im on my phone though so i don't have the ability to search for it.
It's okay, I really appreciate your help — thank you! There is indeed one in the vanilla game. I remember it's related to Leo, but my attempt to copy it failed.
Anyway, thank you so much. I'll try to find a similar event.
You can also use changeToTemporaryMap
!thank you!!!
However, vanilla events that use changeLocation are:
- 711130 (beach)
- 60367 (bus stop)
- 3910975 (forest)
- 471942 (haleyhouse)
- 571102 (hospital)
(To name a few)
Wow, that's amazing! Thank you so much, Teacher!
hello,
I added few custom sounds into my mod but I wonder can I stop sound effects in the middle of the effect?
I'll save this for later — maybe this time I'll actually get the event to work! Thank you so much!
Vanilla events that use changeToTemporaryMap are:
- 8 (mountain)
- 384882 (mountain)
- 5183338 (mountain)
- 528052 (railroad)
If your characters still keep moving it sounds like it might be an issue with your move command. Try switching to advancedMove instead, adding a longer pause before changing map, and/or adding waitForAllStationary before changing map.
I get it now! Thank you so much for your guidance — I'm going to try it right away!
Sorry got wildly distracted.
stopMusic
Try this?
There's no need to apologize — it's not a big deal at all. Please don't blame yourself. I'm really happy to have met you.
💯 🥰
hm. would it be better to use one of those frameworks that lets you spawn animals to make a whole duck, or is there a different way just using plain content patcher
just there for vibes, really. i want an npc to be keeping ducks
but i dont want said duck to be like. cold and unmoving.
I think meep is good bc you get to use duck skins
(And you can easily give it portraits to if you want.)
However a duck is only 16x16 anyways, you can make antisocial npcs
Put em on simple schedules around the pen
Well you make a regular npc, with less stuff
Just like an NPC without all the gift thingies.
thats true. i could make a couple of antisocial npcs as like. pets
.... wait a second, the vanilla ducks are all male. how the hell are they laying eggs
stardew magic
The vanilla cow is all female right.
yeah, and yet somehow immaculate cowception
Cows are female ox
yet they can get pregnant
Oh the file died
Well iirc the min req is
Need some chara data, cansocialize false
Need mon to sun dialogue keys
Need a spring schedule
quack quack
Antisocial NPCs are very quick and easy
I guess you can have 0 dialogue keys if you don't need to talk to duck
how did i end up on a site for ordering ducks
irl scope creep
"Action": "EditData",
"Target": "Data/Characters",
"Entries": {
"DolphINaF.Jinu": {
"DisplayName": "{{i18n:Name.Jinu}}",
"CanSocialize": false,
"Home": [
{
"Id": "Default",
"Location": "DolphINaF_WaitRoom",
"Tile": {"X": 5, "Y": 5},
}
],
},
}
},``` The absolute minimum.
Stardew Open World is coming together! https://youtu.be/Lb8pJWyCAQo
I reduced the size to 10,000x10,000 tiles, which is still around 7,000 Pellican Town maps
100k is doable, but it just loads into the save a bit slow
haha I eventually realized that 100k square is 10billion tiles
there is a very small hiccup when moving chunks, because I can't make async work, idk if it's even possible
only when you load a new chunk, it keeps it cached for next time
Whoa 
Are you planning to have structures and goals and such in there?
you can add structures, I didn't show it in the test, I haven't created anything that would fit yet
I'm hoping to make an indoor outdoor system where if you go inside a cave it no longer shows tiles outside the cave and vice versa
I posted this earlier, but it's as easy as:
{
"Format": "2.7.0",
"Changes": [
{
"Action": "EditData",
"Target": "aedenthorn.StardewOpenWorld/landmarks",
"Entries": {
"{{ModId}}_Example": {
"MapPath": "Maps/Forest",
"MapPosition":{
"X":5000,
"Y":5000
}
}
}
}
]
}
this adds the entire forest in the middle of the open world
I still can't get debris to stay, something is deleting them as soon as they are spawned because they are outside of the map's tile array
if there are any wizards around maybe someone can help point where that might be happening in the code
I found one spot, where it checks the map.DisplayWidth and Height but fixing that didn't solve the problem yet
I feel so immersed 
How am i supposed to decide what objects a fish pond produces 😭 (less of an actual question more of just complaining through a rhetorical question)
go wild
hello
I'd start by deciding if you want the items to be purely for immersion or if you want them to actually be useful
I think ive got a good idea of it i just have to smooth it out a little
So much of modding is just. Deciding things. All the time
I don't think your OS has any influence, what's important is where you're getting your game
are you playing to steam? if so, i don't see why not
if not, entirely depends on the platform
Chromebook has an android mode, which is no bueno for stable modding
(probably wrong channel btw, #modded-stardew)
If you run the game on Linux mode then it's fine tho
And this is indeed the wrong channel
nope! but i think i got it to work
i have the pc version of stardew with stardew expanded
They're trying to tell you this is the channel for making mods, not for tech support
nah but i do want to make mods
i want to know how to do the coding and stuff
!modideas
If you have a mod idea that you aren't planning to make yourself, you can put it in the mod ideas github: https://github.com/StardewModders/mod-ideas
However, this does not mean anyone is guaranteed to work on your idea—modders who are looking for ideas sometimes go through and work on what they find interesting off this list. If you want to pay someone to make your mod idea, there are a few people who do commissions (mostly art, sometimes code); you can ask around, search usernames for the word comms, or see !commissions.
(Already mentioned the github to them)
ah i see
So I've got a question here, I have an EditData action conditioned to start being used after the player's seen an event, but would it be possible for me to activate it during said event as well? 
does it affect something inside the event?
Portraits, ye
i think there's event command to change portrait and sprite
changePortrait
(https://stardewvalleywiki.com/Modding:Event_data#Basic_format)
Hmm, ok... if that's the only way I'm probably better off not trying it since seasonal outfits and whatnot would need to be considered too 
seasonal outfit is prolly best done with appearance system?
So my specific use case is that it's an Overlay action to add light back into Shane's eyes after his 8-heart event where he finds new purpose in life
But given the nature of edit actions I don't think there's any way to have that already in effect going into that event
Change Portrait
Spacecore lets you use being in a specific event as a condition. Would that help?
The event command
u could technically make different appearance just for that
You can just changePortrait for that
Yeah they suggested change portrait but then a lot more additional event edits need to be written for stuff like outfit changes
u could consider dora's suggestion of using spacecore
I happen to have snippet of editing an asset when on that event
"When": {
"HasMod": "spacechase0.SpaceCore",
"spacechase0.SpaceCore/CurrentEventId |contains=3900074": true, //Shane's Charlie event
"LocationName": "Temp"
}
I think the tricky part here is there's a need to have compatibility with seasonal outfits. And like if the event happens during fall, and Shane is wearing fall outfit, then you need to change the portrait specifically to "Shane with light in his eyes wearing fall outfit."
if it's overlay it won't be a problem right? because no matter the portrait from appearance system it'll be the one targeted?
Spacecore just might work, although the edit action would need to update OnLocationChange or else it only takes effect at the start of the day, right? 
Yeah but changePortrait does not account for overlay, right?
i was referring to spacecore 😅
Right, that was the issue with changePortrait, but Spacecore does sound like it lets me do what I need
can we suggest update rate:
- on event start
- on dialogue triggered
👀 👀
Oh, I thought it would happen in the middle of the event.
That said I probably shouldn't tack on Spacecore as a dependency just for this tiny immersion function, but thanks for the brainstorming 
i ended up just use more of spacecore features to justify it
(My mod has a number of small features from various frameworks that I set up like "will happen in case you have it installed")
Well, on the other hand... Spacecore might also be alright because pretty much everybody's using that 
optional dependency is def a thing
u openly bait people in-game 
To entice people you need to first make them feel what they'd miss. 
I know I'm probably late, but I finally found a fix to that VSCode debugging:
You have to have a .vscode folder in the folder you're in (see picture), in it a launch.json file. It should look like this:
"version": "0.2.0",
"configurations": [
{
"name": "SMAPI X VSCode fix",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
"program": "C:\\SteamLibrary\\steamapps\\common\\Stardew Valley\\StardewModdingAPI.exe",
"args": [
"--mods-path",
"Mods - test"
],
"cwd": "C:\\SteamLibrary\\steamapps\\common\\Stardew Valley",
"console": "integratedTerminal",
"stopAtEntry": false,
"env": {
"DOTNET_SYSTEM_CONSOLE_ENCODING": "utf-8"
}
}
]
}```
Of course, edit as necessary, especially the `program`, `args`, and `cwd` parts.
For any questions, feel free to ping me!
Here's the pic.
Maybe you can use BETAS change appearance
Setup hopesanddreams shane as a different appearance
Condition it on whatever mailflag u set and then /action updateappearance
Well the general idea seems to be that an additional framework is needed to achieve this and I think I probably shouldn't make things so complicated just for this
(And also it seems to be doable with Spacecore)
So, uh, wild idea, but wouldn't it be possible to just add portraits to his spritesheet with these change, call these portraits whenever you want during the event, then after the event change the entire portrait sheet with your new portraits?
Well as far as I'm aware that still runs into the same issue as using changePortrait in which I'd need to have variants for every possible alternate outfit like seasonal ones
Yeah, that would means a lot more works for you, but that could remove the need for additional framework if you really don't want to use one
whereas an overlay just automatically works with every outfit because his eyes should be in the same spot in every one
I am starting to doubt that, as I have started to make new outfits for NPCs and some portraits seem to be just one pixel higher or lower, or to the left/right 😭
Hrm
Yeah and so the best option sounds like just not doing it because at the end of the day it's a very minute difference between him getting back his light and optimism during the event and him getting it back the day after 
I think you only need 1 alt?
Not worth adding a buttload of alternate patch actions, or making an action update OnLocationChange
Tho it depends on how you are applying the base portraits
So I want to make custom difficult bundles for a multiplayer playthrough that incorporates the different mods we're going to use. Is there a mod that will let me add specific items, or can someone point me in a direction so I can write the xnb myself? I don't have a lot of experience with C# but I know a little JavaScript for reference.
Thank you! Now I can just read the console instead of tailing the log, I'll give this a try soon to see if it's the solution!
!startmodding I'd recommend making it as a content pack for the Unlockable Bundles framework, no C# required https://www.nexusmods.com/stardewvalley/mods/17265
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 had no idea this existed, I'll look into it. Thanks!
You'll probably want to start by making a simpler mod (like adding a recipe or item or something) in Content Patcher to get into the feel of how modding works in SDV too
Good advice!
I need help making my mod that fixes the Island Tilesheets! This is just for personal use. I have the png files and all that I think I need for the mod, but I keep getting this message from SMAPI. This is my first time modding, and I will not be making any more mods any time soon lol
what's wrong with the island tilesheets that needs fixing?
I forgot who the mod author is but they changed the graphic of the water underneath this tree and it just not compatible with the vanilla game but I still like the tree graphic. So I just made my own mod to fix that cus i didn't want to see a big square that was a completly different color from the rest of the water. Let's just say it was looking crazy on my beach farm. The trees were tweakin out 😭
uh, do you actually have a content.json and manifest,json? also might be helful to send your json too in case something is wrong with it
super super new to modding, I just watched a yt video to walk me through it. here is what I have.
do you have file extension enabled?
a common issue is to have a file that is looking like a file.json but is a file.json.txt because it's hidden by default
i don't remember the steps so google may be of better help
ight
!fileextensions
Windows and Mac hide most file extensions by default. If you are creating or updating mods, it's helpful to show file extensions so that you can be sure all mod files are named correctly.
To show file extensions on your computer:
On Windows 10, open File Explorer, click on the View tab, then check the File Name Extensions box.
On Windows 11, open File Explorer and click on View > Show > File Name Extensions.
On Mac, open Finder, and in the menu bar, click on Finder > Settings (or Preferences) > Advanced, then check the Show all filename extensions box.
The "FromFile" feilds need the file extension .png
so it would be "assets/fall_island_tilesheet.png"
also it looks like it will apply all of these as the same time, you may want to use a condition to only allow them to apply during the correct season, using the "when" field along with a GSQ can allow you to do that
Use Tokens not GSQs in a "When" Field
Here's the link to the Game State Query wiki page: https://stardewvalleywiki.com/Modding:Game_state_queries
When fields do not and can not use GSQs
also it doesn't matter if those all apply at the same time
wait what? I thought I used GSQs in the When field? I need to re check my mods
When conditions are tokens
thank you guys for helping this noob! I don't see the big square in the water anymore ❤️
I have been royally screwing most of my concept mods, so this won't work:
"When": {
"SEASON": "spring"
}
Season is a token
season is a GSQ and a token? cause it's also listed on the GSQ page
There is both a GSQ called "SEASON" and a token called "Season"
PLAYER_HAS_MAIL is only a GSQ, and will not work
But HasFlag will
Ahhh okay, so it's been working due to hopes and dreams, but adding another GSQ will cause it to stop, good to know, didn't mean to provide false info
GSQs are entirely a vanilla concept. Nothing to do with content patcher whatsoever
Tokens are the opposite
The only caveat to this is Esca's Modding Plugins, which adds a token that will evaluate a GSQ, but you should really only use that if you absolutely need to
Gotcha, Learning a new modding enviroment is so confusing
Thank you for correcting me, I would've been going insane trying to use GSQs instead of tokens
By the way, Button... the first ever BETAS > MEEP interaction happened earlier today. 
I was just playing around for some interesting triggers to see what the new closeup interaction trigger action... actions could pair with nicely.
I made it happen on monster kill. I'm sure that's a useful one.
Nothing huge yet though, sadly!
do the meep close-ups take an Input or Target item?
actually wait they can't they're actions
got them mixed up with conditions for a sec
Yeah, figuring out a trigger action vs a trigger vs a trigger action action was a feat.
Hi, I'm making a simple mod for my friend that changes Elliott to Jungkook. She plays in Russian, and I'm stuck on “stitching” the ru.json file in the i18n folder with the content.json file.
Am I correct in understanding that the translation from the “i18n” folder only translates “custom” mod dialogues, or is it possible to use dialogues from i18n in the original game?
Overall, I'm completely confused about dialogue modding. Please help!
i18n is just for the mod it's in
The monster kill interaction can probably be used to show a popup of the item it dropped but only if the player hasn't received it before (or if it's a special item maybe) with the right set up, I think
Yeah, the monster kill trigger + a condition for the item dropped for, say, some rare item?
exactly
Which then sets a mail flag so it doesn't keep showing that every time you get the same drop
Like when you pick up a valuable rupee for the first time in a Zelda game
So yes. Any mod with an i18n will have its own i18n folder thats used by just the mod it's in. Im not sure what you mean by "use dialogue from i18n in the original game", though?
In short, the task is simple: replace all of Elliott's dialogues with custom ones. Am I correct in understanding that I need to do the following: 1) Change the dialogues in content.json. 2) Write them in Default.json in the i18n folder. 3) Translate them into ru.json and SMAPI will change everything in the Russian version of the game
If so, it doesn't work for me, so I'm asking for help(((
Uh, ok well, perhaps the issue is coming from your content.json? Could you share your content.json?
!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.
Using the json validator site, so it's easy to see
ok! 5mins
Bruh, i'm so sorry. Just notieced, that i wrote "Elliot" instead of "Elliott". 2 days in the trash
!elliot
Elliott has two t's in it...
it comes for us all at one point or another
never for me (i am an elliott enjoyer) 
Hey!! Uhh I’m Claude (all pronouns), I recently downloaded the unofficial updated version of the More Krobus Mod (he’s the objectively correct marriage candidate btw), but there were a few glitches that made events break. I noticed that there were tips on how to fix these issues in the comments, eventually I did so, then I decided to tweak the dialogue a little bit aaaand long-story short I got hyper fixated (still going, this has haunted me for 5 days straight) and fell down a huge rabbit hole; now I really wann use More Krobus as a base for a fully-fleshed out Krobus expansion, but I have no experience and am just wholly winging it- terribly I might add 😭 - and I would really love someone to collaborate with on this idea!
have you checked what the permissions for the More Krobus mod are?
(genuinely asking, I've never heard of it)
The modder's inactive, but their permissions are fairly restrictive, I sent them a PM on Nexus just in case. I'd just like it for personal use too tbh
fair enough if it's for personal use, but as you seem to know you can't publish it unless they get back to you and give you permission
gotcha, ty!
The mod btw, I really like ithttps://www.nexusmods.com/stardewvalley/mods/9342
the events are so cute!!!
yeah, just found it. it seems they worked with lemur at some point so they may know if there's a way to contact them still?
uuh is there a console command to reload fs packs
brain not working rn and i do Not understand positioning
Gonna pm them rn :) tysm!
it'd be in the fs docs if anything
can probably be found with the help command as well
oh wait found it
thank god theres a command for it i was gonna perish otherwise
lmao
just sent it, tysm for the advice :)
edit: just got a response from lemurkat (they were fast omg) that the only contact lemur had with the creator was on nexus, so sadly prob won't be able to publish it :( would still love help working on it for personal use tho!!
You can always make your own krobus mod 
Yeahh
Yeah, if you're making a full-fledged Krobus expansion out of it, how much of More Krobus would still be in there anyway.
maybe I'll make a version with More Krobus Compatible Lore and generic
still dont really know how to mod tho-
(I'm totally up for a collab for things other than art.)
Sure.
If I have two variations of an event and one of them is a "when" the community center is complete would I use the GSQ "IS_COMMUNITY_CENTER_COMPLETE" or CommunityCenterOrWarehouseDone
CommunityCenterOrWarehouseDone checks for either CC or Joja Warehouse, IS_COMMUNITY_CENTER_COMPLETE is only the CC
okie cool CommunityCenterOrWarehouseDone is the one I need then - just to be safe. ty
Heyyyy I'm a new modder on the Stardew Valley community and I'm learning how to program my own Expansion mod.
I will add new machines, maps, NPCs, crops and more. So I was wondering if anyone could help me in a few matters or even be friends!
I wanted to ask about compability first, my mod's map will modify the backwoods, and I really really reeeeealy wanted it to be compatible with SVE, but on their wiki it's said that if you change certain maps (it's a list where it includes Backwoods), SVE is incompatible, but RSV makes a few changes to it and it works perfectly fine. I won't change much, I even researched what the base game and mods change in the Backwoods, I only added stairs.
So I was a bit confused abt that and wondering if someone could help me in this matter.
Sorry if I misspelled something, English is not my first language and I'm still learning (●´⌓`●)
the big thing about Backwoods is that NPCs can't walk through it
the SVE thing is not that your mod will be incompatible, but that you'll need to do extra work for SVE compat
but yeah the NPC thing
that's the bigger problem
For ez compatibility just use central station to bus/boat/train to your place
oh cool! I might be able to help out with a few sprites, rn I'm hyperfixating on Krobus lol
Really? Awww :/// I chose the backwoods bc it was closer to the farm
I'll try to find somewhere else to change so the NPCs thingz will work
But I might keep the stairs, so it will be easier for the farmer
Omggggggggg tyyy
I love Krobus too
How do I move rock debris that prevents access to Mine till day 5 in Mountain location?
SVE moved it but I couldn't find it in CP part
I changed that location a bit, so I need to move it like 2 tiles left or something
it is hardcoded
is it alr if I DM you about modding ideas?
This should have a simple answer but Im not finding it on the wiki.
Im trying to spawn a chest as part of a new save in the farmhouse. the code is:
"FarmHouseFurniture": "709 6 6 0 1466 9 6 0 130 6 9 0 130 6 10 0 1614 6 3 0 1614 10 3 0",
Which according to Data/Bigcraftables is the chest ID. However when the house spawns this is happening:
FarmHouseFurniture is for furniture only
FarmhouseFurniture is unfortuinately atm haredcoded to furniture ints
it will be changed in 1.6.16
it also is only ints, not string furniture IDs
Hey I tried that line of code for the schedule, but it still having issues parsing it's stating that it's something wrong with the first few lines of the schedule. I copied it straight from the guide on the modding wiki.
"Changes": [
{
"LogName": "Aiden Schedule",
"Action": "EditData",
"Target": "Characters/schedules/{{ModId}}_NPCAiden",
"Entries": {
"spring": "610 BusStop 15 23 3/630 BusStop 19 23 2",
}
}
]
}```
[Content Patcher] Can't apply patch Aiden - Custom NPC > NPC Schedule to Characters/schedules/Aiden.Haydel_NPCAiden:
StardewModdingAPI.Framework.Exceptions.SContentLoadException: Failed loading asset 'assets/data/schedule.json' from SMAPI\aiden.haydel: an unexpected error occurred.
---> Newtonsoft.Json.JsonReaderException: Can't parse JSON file at D:\Program Files (x86)\Steam\steamapps\common\Stardew Valley\Mods\Aiden - Custom NPC\assets\data\schedule.json. This doesn't seem to be valid JSON.
Technical details: Unexpected character encountered while parsing value: [. Path 'Changes', line 2, position 13.
(though i should say i dont actually recall if itll be dehardcoded away from furniture in 1.6.16 actually)
(it might jus be dehardcoding the int part? i think its already in the alpha build though but i dont have that installed to check)
There is a way to spawn bigcraftables iirc
In the building data
Not sure it works for farmhouses
It definitely won't make a proper chest
maybe FTM can work 
I have no idea what is or is not in 1.6.16
I assume it'll be great!
But i have no kept up on 1.6.16 news
the important part is that it won't add Moss 2 
yeah, FTM can do a chest with specific contents (of the specific chest type/sprite that players make, not the farmhouse gift box ones) and spawn placed BCs in general, fwiw
or rather the chests despawn after opening, they just look like crafted chests
Or would anybody be able to help me out on this? I feel like it's so close to working, but I'm stumped
I should probably add more options to that in the 2.0 stuff
post your full code at smapi.io/json pls
I've uploaded my schedule to the website before and it never gave me this error 
https://smapi.io/json/content-patcher/dfc864c6c34040b59a3ec9b1c2d45c8a
Ofccccccc
just in case did you make sure to save in the mod folder
You mean schedule.json itself? :o
I did, but it's something with the first few lines before the logname. Would you happen to have an example of schedule.json that I can use to test maybe?
the thing is the error you posted does not match the json you posted
Here is my current schedule.json I have in my mod's folder and the error SMAPI gives me :o
https://smapi.io/json/content-patcher/e0f2f59763474a9ab5591d012ed80f52
[Content Patcher] Can't apply patch Aiden - Custom NPC > NPC Schedule to Characters/schedules/Aiden.Haydel_NPCAiden:
StardewModdingAPI.Framework.Exceptions.SContentLoadException: Failed loading asset 'assets/data/schedule.json' from SMAPI\aiden.haydel: an unexpected error occurred.
---> Newtonsoft.Json.JsonReaderException: Can't parse JSON file at D:\Program Files (x86)\Steam\steamapps\common\Stardew Valley\Mods\Aiden - Custom NPC\assets\data\schedule.json. This doesn't seem to be valid JSON.
Technical details: Unexpected character encountered while parsing value: [. Path 'Changes', line 3, position 2.
Since it doesn't have a Format line, I'm guessing that you're using an "Action":"Include" in your content.json that pulls the file?
That, or you're cutting out the rest of the content.json file to put in the json validator
oh, its expecting a string to string dictionary i bet
im guessing you are trying to Load this file to their schedule instead of including it
and my current content.json in the mod's folder
https://smapi.io/json/content-patcher/0edc932774e54dc4aefc036277910d57
"LogName": "NPC Schedule",
"Action": "Load",
"Target": "Characters/schedules/{{ModId}}_NPCAiden",
"FromFile": "assets/data/schedule.json"
},```
yep, you called it, Button
it was you mentioning the include part that clued my brain in!
teamwork makes the dream work n all that
the error is because when you Load the file, its trying to use that file as the schedule.json itself. its not trying to use it as a list of content patcher patches
so it thinks "Changes" is the schedule key
and then it gets confused because its looking for the actual schedule data after it but instead finding the [
Crazy because I followed the example for Jeans and Jorts from the modding wiki https://stardewmodding.wiki.gg/wiki/Tutorial:_Making_a_Custom_NPC#Schedule
I pasted a part that goes into my content.json from the wiki
So, you're interested in creating a new character for Stardew? Good news: with version 1.6, creating a character is easier and allows for more flexibility than ever. However, NPCs are one of the more complicated things to create for Stardew, as they have a LOT of moving parts. This guide aims to provide...
well you didnt follow it 100% bc that example says Include 
"LogName": "NPC Schedule",
"Action": "Include",
"FromFile": "assets/data/schedule.json"
},```
Theres no way :(
from that tutorial, see how it doesn't have the Target there, and it's Include instead of Load?
I think you mixed the Include and EditData blocks together by mistake
I do. I think I changed it when converting from the old format to the new one
mistakes like that happen to the best of us sometimes!\
Theres no error this time!! But now he doesn't move and is not interactable 🙃 But this is progress!
Hey, what did you mean by using EditData on a Blank.json file? Would that make the NPC able to be interacted with?
I'm getting this error when I try to load my new mod, and I don't understand what it's saying beyond 'cannot convert the data in your json into objects'. I've attached the first three entries in my data/objects.json, since the error mentioned entry #3. does anyone know where I went wrong?
can you use the smapi uploader please
sure
https://smapi.io/log/b5fc7d290f2948aa8c938267d219ebd8
here's the full log, sorry that it took me a few minute to find it
Log Info: SMAPI 4.3.2 with SDV 1.6.15 build 24356 on Microsoft Windows NT 10.0.19045.0, with 29 C# mods and 40 content packs.
Suggested fixes: One or more mods are out of date, consider updating them
I was just talking about loading a blank.json (a JSON file that only has { } in it) to the Target, and then doing another block that's an "Action":"EditData" to that same target to add your code to that blank file. Like what I did here: https://smapi.io/json/content-patcher/26568beff81644878a8294a865f0af5d
It's not always needed, but it helps if you want to be able to EditData on a Target that doesn't exist yet, and lets you use tokens freely in your Entries for that EditData block without running into issues.
Basically: If you do "Action":"Load" to load a JSON file that has stuff like {{ModId}} in its Entries: { ... } field, CP can't read the tokens. So, "Action":"EditData" is needed instead, but you can't do that on a game asset that doesn't already exist. Loading the blank.json to the Target creates that game asset so you can write to it. 🙂
Ooohhh so you're referencing an empty file, then having the game write it's down dialoge from content.json into blank.json
Yep!
🤯
(i am still waiting for the json.)
CustomFields is a dictionary, not a list of objects. Line 62 in that json, as well as anywhere else you added CustomFields to a Buff
"CustomFields": {
"spacechase0.Spacecore/...": "..."
}
(very good reason to always go to the smapi uploader, not screenshots. this was not shown in your screenshots)
it says in the SpaceCore documentation to put it into the Custom Field, so I can only assume that I did it incorrectly. what is the correct way to do it?
i just showed you
oh, derp me
this is the correct way
thank you very much :)
ahhhh, so I had a pair of closed brackets that shouldn't have been there, and that's why it was throwing that error?
your pair of brackets changed the field from a Dictionary to a List of Objects
Entries for example is a Dictionary, and Changes is a list of objects. Patches are Objects since they are inside { }, so Changes is a list of patch objects
but ofc you cant just change what type of field the game is expecting for something. CustomFields is a Dictionary, so it must be formatted as a dictionary
oh, and a List is also called an Array
hence the error mentioning arrays
ahhh, ok, I think I understand it now. thank you for explaining it to me. I learned something today :D
if you ever feel like a more thorough explanation, i do have a handy dandy json tutorial as well that explains it
I will definitely give that a read later :D
In content patcher, is there a way to use the when condition to check if another mod's config setting is enabled or disabled? Don't think it's possible but figured I'd ask
Is there a way to make a map edit directly after you see an event?
it depends™ but you normally need the mod button just posted while i was typing
thank you guys
Does anyone know? Its okay if not 🙂
yep, the condition HasSeenEvent with an update rate of on location change
and you can end your event with a warp out so that when the player enters the location again they'll see it
I mean like as soon as the event ends. is that possible or should I just do that?
i think you may be able to change map tiles while in the event but not sure if it'd stay
and that would be frustrating to do one tile at a time
alr
yeah true
Two ways to do it: OnLocationChange with a forced warpout at the end of the event, or force the event to happen immediately on entry to the location and already have the change active in the background on that day and have a temporary map or extra tiles with it unchanged for the event.
ohh sneaky
I went with the second option for my Deku Forest/master sword event code.
Wdym have it change active in the bg? how would I do that? lol
change it on day start according to whatever condition (set a mail flag perhaps) and then have the event take place on a temporary map
I have the condition for the event and map patch set to the same thing so both become active on the same day, but when the player enters the location, I initiate the event immediately and change them to a Temporary Map that's just another version of the map before the patch.
ah ok. thanks for the help guys
Depending on how much changes, you can also just use the Add/Remove tiles event commands (exact commands escape me at the moment) to change them during the event as if the patch hasn't happened.
That would be part of the 2nd option, so that you aren't using a Temporary map, because the changes don't necessarily stay outside the event.
ok. I think I'll just use a mail flag with temp map(s)
Sorry for ping but does this look right to you right? I get an error sadly, but it's fine without it. Both mods are in dependencies.
!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.
your screenshot is way too zoomed in to get enough context
So for a use case example: In my event, you pull the master sword from the pedestal during the event. So the map after the event needs to have the sword missing. I use the event command to change the pedestal tiles to the version with the sword present, and then change them again to the version without the tiles after the sword pulling animation happens.
Before the event has even triggered, though, the map patch to change the sword pedestal has been activated. So when the event ends, they see the map with the empty pedestal.
Talking to me?
I was
alr
(like sinz said please upload your full and complete jsons using the validator)
What was that event command again?
oh wait is it changeMapTile?
And is changeMapTile permanent?
Sorry, Here you go. Line 117. https://smapi.io/json/content-patcher/96ddecc9700242c9925a7d3391be9489
I do not know if it's permanent, but I usually assume it's not.
Dang ok
You can always change it back on your event fadeout if it does turn out to be permanent and that's not the desired result.
Change what back?
The tile
oh
Looking at it, I don't see where in item spawn fields where you actually set the item you want to sell.
the entry key doesn't automatically become the itemid iirc
is this file only being included if Polysweet is installed?
(also, remove the braces around the CMCT token, When conditions have the outer braces omitted)
One question: when do I set the map edit? and what conditions
In my case, since I have the event trigger as soon as you enter the location, my conditions for the map patch and the event preconditions are the same.
specifically, I think your error is actually in Lines 137 -> 153.
the error you are getting is citing SeedShop, so your patch for PolyamorySweet.LantanaLoveShop won't be the problem
Yes but like when do I trigger the map edit?
maybe it was meant to be Fields rather than Entries, which everything else was
oh that does seem likely. i got tunnel visioned bc it was a ping about CMCT lol (but do still remove those braces)
If you're not changing the update rate of the patch, I believe it will automatically take effect on DayStart if the conditions are met.
It's why vanilla has a lot of events that happen "the next day"
Ok. Tysm for the help 
The braces did seem to be what was causing the issue. Sorry I was using SeedShop as dummy code to easier test if the when condition was actually working. For some reason it's working with LantanaLoveShop but not SeedShop, even without brackets, so I'll need to test further.
Could I use OnLocationChange to do it the same day?
the advantage of doing it lily's way is that you don't have to do it on location change, which is more resource intensive than on day start
https://smapi.io/json/content-patcher/162e654c1fda420c91b3160e0a8c5b96 Lines 121-136 still produce the error (this is just a test code to see it's working). ApryllForever.CPPolyamorySweet_AineFlowerSeeds is added to the shop by another mod, I am just editing it's selling price. If I remove CMCT's when condition, it edits the item's price correctly. I wonder if CMCT doesn't like the fact I am editing another mod's items without specifying the ID.
wouldnt onlocationchange work better?
for what im making?
!log please provide the full log uploaded here
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.
Log Info: SMAPI 4.3.2 with SDV 1.6.15 build 24356 on Microsoft Windows NT 10.0.26100.0, with 105 C# mods and 81 content packs.
it depends on how you do it. if you update it on day start, then switch to a temporary map in the event (which triggers as soon as the player enters the location), then they'll never see the location in between you changing the map and them seeing the event.
however, if you want to do it on location change, then you can do it on warp out like how i originally suggested. it just depends on which method you want to do
but there's no reason to do it with the temporary map during the event AND having it be on location change
im not -
would this work?
use a mail flag, then make the mapedit with onlocationchange and then use a temp map for most of the event?
i don't understand why you would want to do that, so maybe it would help if you explained why you would want to/what you're trying to do, specifically
This might be user error on my part. Don't worry about it, I am going to check something in a bit and I'll get back to you if I still have an issue. Thanks for the help 😉
ok. so basically,
the wizard will send a letter asking to meet up in my area, and then a event will start when you get there and then in the event he will do an animation where after that it will make a map edit, so my reason to do that is to make it change after
I gotta go, but trust me it makes sence for what im making
i believe you! i just was trying to get more information about the desired effect you were hoping to achieve
Okay, so the method I use is perfect for that if you reword the letter to meet the Wizard the next day.
If you'd prefer it the same day and are okay with the performance hit, then you use the other option with the warpout that nic mentioned.
(i will cease my looking over of things then but do feel free to ping me again later if needed (though no promises that ill be around when you do))
what kind of delete do you wanna do. like, remove their data, remove their physical existence, move em somewhere else, or what
Sending them to the shadow realm is fairly simple.
do you want them back again later
the game just does GameLocation.characters.RemoveWhere() to delete broken NPCs so
ok fair enough i shadow realm broken kids
i wonder if it's a good idea to just always remove the npc version of the kids
bad and naughty children get sent to the pear wiggler to atone for their sins
since for the most part im treading the Child version as the real one
I tried it, and it gave me more errors than before so I went back to the working content.json file
. What else could I be missing since I can't talk to my NPC?
harmony postfix GameLocation.cleanupBeforeSave
have you given them gift tastes yet? also, if you want to use that method, we can help you if you show us your log with the errors and the json you were attempting to use
Oh TIL npc's in WitchHut get nuked before saving
can i just do it in Saving tho
isnt that like the same thing 
but my concern is more about implications
what do the NPC flavor of kids lose by not persisting basically
Do you have a Dialogue file loaded as well as the schedule?
The example I linked earlier is the bare minimum for a talking NPC that isn't a map tile.
if you perfectly reconstruct them atom by atom object by object later the parents will never know the difference
like a teleporter
I do have a file for the gift tastes since I started with the old format for NPC's.
im just letting them be spawned by game stuff tho 
I do, yes. I have it in it's own file
but see as they r impl they do work
it just that i wanted to handle the case where someone uninstalls a HMK mod
just dont put moddata on them
bc i have actually bypassed the npc removing thing in Game1.fixProblems by making them sorta valid
Here's that example once again, Sirroofsalot: https://smapi.io/json/content-patcher/26568beff81644878a8294a865f0af5d
im probably worrying about this too much
I didn't use any includes, so it's all there except for the blank.json, so you can see how it gets formatted
!json take your time, but it would help if we could see each relevant character file, any errors you get in your log, and a screenshot of your mod folder. if any essential NPC parts are missing or aren't working, then they won't walk/talk/etc
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.
When I did SinZational Shaded Spaces, I didn't go with the "cleanup the save so it can be loaded without the mod", I went with patching the game until it stopped crashing when loading the save in its state
but yes please make sure your files match any examples that have been sent
ok that sounds like approxmiately what im doing ig thats fine 
Some fun hacks required to make the approach not explode for farmhands, but if you are only dealing with NPC's you might be fine
locations were much more sensitive
i never remove the actual Child anyways only invisible them
Can I build off of this example and replace the EditData with Includes
In regards to my current content.json
Include and EditData are different formats. when you include a file it tells CP "look at everything in the file located at FromFile and act like it's inside of content.json". EditData is an actual patch that targets a game asset
so, yes, if you have the formatting correct
So for my external NPCGiftTastes.json, I'll either use include or just place it in content.json itself
yep! include is sort of kind of like a copy/paste
Include basically says "use this other file as another content.json"
(minus the Format field)
(and ConfigSchema, etc. just Changes)
(and dynamic tokens, configschema and aliases)
(its ok no one remembers aliases anyway)
I do, mainly because it makes the internal codebase kinda confusing as they are referred as Local Tokens
in this case you take on the role of aliases georg /lh
I don't think I've seen a mod actually use them, it would be useful for modded tokens that get quite long, but no mod example will use them because its extra effort to explain and setup the alias.
and the constraint that it must be the token itself, so many just use dynamic tokens for it anyway
aliases georg...
There's a Game1.fixproblems but is there an Atra.fixproblems 
no, thats stuck in atracore and tangled up in its weird compile setup
it is good that CA took the twitter/reddit suggestions to get rid of bugs and simply call the fixproblems method
more gamedevs should take after him i think .
is SaveLoaded before DayStarted
yes, but wont be called for the save creation flow
Yes
it is however after the games own DayStarted process
its prior to the SMAPI DayStarted
and I think farmhands either always call it (regardless of how save got made) or never call it, I can't remember
also it is called after creating a new save
Farmhands call it
It's possible it's not called after creating a new save
I think SaveCreated does that
the wiki says it includes after the first day after creating a new save
new save behavior can also be different if you skip the intro or not
not after the first day i typo'd a bit
just "including the first day after creating a new save"
You know what button
I'm running on approximately way too little sleep to make any sense
we also still dont know which DayStarted Chu meant
I'm going to call atra.fixproblems which is going the fuck to bed
gnight then! enjoy sleep
if you asked me this 18 months ago I could have diagrammed exactly how it all worked as I became an expert on it when working on shared spaces
im making a c# based add-on to my farmhouse that makes the lights come on when the player's spouse or kid are home & awake during the evening/night or on rainy days, ive run into a lot of issues partially because its my first c# mod and i'm not super sure what i'm doing, but i got a lot of stuff working now - it's just that the lights are rendering on top of the player changing the layer depth does not seem to make any difference, does anyone have any suggestions?
light maps goes above things yes, although it doesn't look like you have a light map per say?
that looks more like a draw layer 
im keeping my secrets (it was the smapi one)
what is defined as "awake" here
mmap does actually have a thing for conditional draw layers as well, but it kinda depends on whether the thing you want can be specified as a GSQ
sirroofsalot: You've already been answered but on a permissions level: absolutely, feel free to yoink that example and replace all the relevant bits.
That goes for anyone here. ❤️
I only made it to test the dialogue priorities, LOL
yeah, its not a light map i'm using SpriteBatch.Draw to render ot
yep so you are drawing at the wrong layer depth 
you want to just do all the non-vanilla features in your C# dll and not take on dependency right?
It's failing to load blank.json I have absoluely nothing in the file, but do I need something in there atleast to get it to work? <:)
ofc 😮💨
hmmm im open to dependencies maybe
well if you define what is meant by "spouse sleeping" you can actually just use mmap to do it 
i was trying to just define spouse sleeping or in the house in c# make it a token for CP and go from there, but CP was only checking tokens at the start of the day so my design was just always failing D:,
it looks like spouse is always sleeping at time=2200
or at least, will attempt to path to sleep 
yup i finally figured out it wasnt some super dynamic thing lol, between diff spouses so i'm just killing the lights @ like 10:30 at this point
so from 6:30 to 10:30 i check if their location is the farmhouse and if yes turn on the lights
this particular example uses a custom gsq i added, but it can just be TIME 2200
and player married ofc
this wouldnt need C# cus, i wrote the C# already 
i see, i seee
as for doing it yourself the approach i'd go with is
- SMAPI Event Warped, new location is Farm
- Do checks to determine if you need the LightSource and the Draw at this time
- For draw, find the farmhouse Building instance on map (iterate location.buildings), and then find out it's layer depth by copying the game's math, also get to check what upgrade here. Do the actual drawing in some smapi event render step
- For light source, simply add new LightSource at the right spot game does the rest
remember to handle split screen by abusing PerScreen 
ohh okay i'll def try getting the layerdepth for the farmhouse, i have it so the check if the spouse is home code runs every hour the player is on the farm map and when they enter the farm map, so the lights can pop on while your on the exterior
game's math is (building.tilesHigh.Value * 64 - building.GetData().SortTileOffset * 64f)/ 10000f;
okay i have no idea abt split screen, lol but i'll worry about it when i get the first draft working i guess
you can do that still, just keep around a state that your draw is conditioned on, as well as the lightsource
okee i get you!
still, i really do think i already wrote all the C# you need lol (mmap's condition thing also updates every 10min while at location)
but i support doing it just 4 fun 
what is the name of the sound effect for warping with an obelisk? i swear i've read the audio modding page like 3 times and i can't find it
"wand"
thank you so much
question about the shadow realm: i know that if a location is not active, and a Farmhand is not in that location, that location is a shadow location. if the Farmhand is in a location, they can trust that the data they see is real
but what if I am a farmhand and a different farmhand is in a location? do I also receive the data for that location, or does only that specific farmhand get the real data while I still see the shadow realm?
why would you (farmhand A) need data made real for someone else (farmhand B)
in case i have a GSQ checking the data in farmhand B's location
no i mean, i feel this would need extra work that is unlikely to be done accidentally right
so gut feeling says it wouldnt work, but always test cus what if spaget
a farmhand only has their local location and AlwaysActive locations being syncronized and being active.
other farmhands dont change that
not non-AlwaysActive locations that the host is currently in?
hosts location doesn't change that equation either afaik
host sees everything because they run the world, everyone else sees the bare minimum
will a farmhand at least always know where other farmhands are, or are there shadow farmers
yes
no shadow farmers as farmers aren't stored in the location instance but on the team netroot
good enough for me then, thank you again
the world map even in vanilla shows where all other farmers are
id forgotten about that
back in 1.5.6 the farmhands were part of the cabin but that got cleaned up in 1.6
It's alive!!! My NPC moves to one destination in the schedule, but doesn't move after that and I still cant talk to him to test dialogue.
https://smapi.io/json/content-patcher/d66aabeb2f8e482baf82aa6e9295c29e
And thank y'all for all of the help still :D
700 and 800 are very close together and probably don't leave the NPC enough time to get there
900 it is then ☝️
also i'm not sure if this is a problem, but you don't have a space between your targets of your blank load
I CAN SPEAK TO HIM ONLY ON THE FIRST DAY????
And after sleeping to day 2 I can no longer speak to him 
if i'm reading this right, you don't have an entry for tuesday/spring 2/etc
Oh so spring isn't a generic dialogue for every day. I would need a dialogue for every day :O
its not
someone correct me if i'm wrong, but dialogue isn't like schedules where spring is the default for any day that isn't defined, i think?
thanks for the confirmation
and correct, spring is not a dialogue key
See I thought it would be, but theres also this for every generic day on the modding wiki
"Tue": "",
"Wed": "",
"Thu": "",
"Fri": "",
"Sat": "",
"Sun": "",```
that lines up with what nic said
yeah i feel like that's bare minimum
if you're interested, there's a template out there for dialogue based on heart level
I would love to incorporate that, yes please! For now I can start making more progress on the dialogue finally :D
If you're working on an NPC but aren't sure where to start with their dialogue, the template below lists some of the most common places for dialogue and gives you space to start fleshing them out. Note that you're not limited to these options; you can, for example, set dialogue specific to season, different heart levels, specific days (such as ...
you don't have to use every line included here
use [[Modding:Dialogue]] to look up what each key means
Awesome!! I'm really excited to work on this mod more, and thank you for the link
Oh, yeah, my apologies, my example only had those three keys because I was specifically testing to see if spring_1 read properly
No thats okay, it still helped. So if I wanted to make my NPC say something each time I spoke to it, I would format it like this?
"spring_1": "Ah, spring again at last!" "Feel the warmth on your skin.",
if you wanted to have a break in there, you would need it to be: Ah, spring again at last!#$e#Feel the warmth on your skin.",
if you want it to be a click-through, use #$b# instead
Oh thats what it's for :O
yep! having two sets of " " in the value will break it
And what would be the difference between something like "Tue" and "Tue2"? That would be the 2nd Tuesday of the month right?
how would i add a location to the default world map?
so i dont show in the farm when im in my custom location
Oh this is all in the wiki, then I'll keep looking through it. Thank y'all again for helping with my troubleshooting and questions 
i know it I need to edit the world map data but i just dont really know how
it's really difficult imo, but i used both [[Modding:World_map]] and a tutorial, let me find it. or i could send you my world map json as an example
yes please ive beenlooking at the wiki and its hard to figure'
can you use content patcher to replace a map tilesheet's image source 
cause it shows how to add a new location but not hwo to edit a vanilla one? and thats what i want
like its weird i dont know id ont get it pfpf
Everything is starting to click
https://stardewmodding.wiki.gg/wiki/Adding_a_location_to_NPC_Map_Locations (i didn't find this super helpful, but i do remember looking at it)
https://smapi.io/json/content-patcher/e3d2a999aafc48aab976a99fc0489a69 my world map json
Do we need NPC map locations for that?
yeah it's only tangentially related
yeah, in my json i 1. EditImaged the world map, then 2. defined map areas and stuff
ignore my comment in there of NOT WORKING it works lmao
Was about to ask

this is my image edit if you want to compare pixels etc
yeah lol sorry for the confusion
it took me many many tries to get the actual data for the world map correct so don't feel discouraged if it doesn't click for you
Would still be a long while for me. But it def should come handy for Clown
Is the mod released yet?
Or should I save the json?
feel free to take any code you like from there
it's also up on github if you just want to view the files without DLing
feel free to @ with questions (though i may be in bed in a few hours)
nice!
i jsut cant seem to get the tooltip working
the tooltips pissed me offffff
can i show my code?
"Action": "EditData",
"Target": "Data/WorldMap",
"Entries": {
"BaseMap": {
"Tooltips": [
{
"Id": "{{ModID}}_Gradys",
"Condition": null,
"KnownCondition": null,
"PixelArea": {
"X": 119,
"Y": 112,
"Width": 5,
"Height": 5
},
"Text": "Talon Resident's",
"LeftNeighbor": "Forest/WizardTower",
"RightNeighbor": "Forest/LeahCottage",
"UpNeighbor": "Forest/MarnieRanch",
"DownNeighbor": "Forest/SewerPipe"
}
],
// the in-game locations that are part of this world map area
"WorldPositions": [
{
"ScrollTextZones": [],
"Id": "{{ModID}}_Gradys",
"Condition": null,
"LocationContext": null,
"LocationName": "{{ModID}}_GradysHouse",
"LocationNames": [],
"TileArea": {
"X": 0,
"Y": 0,
"Width": 0,
"Height": 0
},
"ExtendedTileArea": null,
"MapPixelArea": {
"X": 119,
"Y": 112,
"Width": 5,
"Height": 5
},
"ScrollText": "{{i18n:FC.Gradys}}"
},
]
}
}
}```
does BaseMap exist in vanilla or is that yours
ok let me check unpacked files rq
i remember MapAreas being important. i'm pretty sure that you have to TargetField Valley, Map Areas and have tooltips underneath that
lemme see what I did for my custom area
i think you have to drill down by region > map area > map area position, according to the wiki
it's not very intuitive to me though
ah yeah then i think the target field is necessary!
yay!
In visual studio code, is there an easy way to make auto-formatting make something like this (Image 1) look like this (image 2)? Like can I just tell it to stop formatting anything inside the RandomAmount field or something?
nope ☀️ if it's too long, just collapse it with the downarrow in the left gutter
is there an easy way to automatically do that... it's like.... I got (according to search) 786 entries like that lol
some extensions exist to change the rules a little for file auto-formatting, but it's unlikely you'll find something that's exactly how you want it, because it was made exactly how someone else wants it
yeah i messed with it for a bit and gave up on them 🙁
i'll be honest i'm a little scared at the amount of entries there
is there no way of automating what you're doing?
shrug lol
if i had maybe 10~20 entries i'd start asking how i can start reducing all the duplicate lines
Can I ask for help with json files here or does it have to be in the tech field? (I'm adjusting a dialogue mod and it's not even the dialogue I've actually edited giving me issues nor is it causing my overall game issues... I just need help)
I only know how to use content patcher, so it's limited in that regard. Not sure how to simplify adding variances to shop stock across vanilla, 20 mods and dozens of stores. They all require their own entry one way or another, since it's a balance mod that has to edit multiple variables
!json yes, feel free to upload your file here and share the link!
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.
https://github.com/Pathoschild/StardewMods/blob/develop/ContentPatcher/docs/author-guide/tokens.md#number-manipulation would it be possible to use something like range instead?
this is the second
I've been staring at the code for 30+ minutes and I don't know what to do
you're missing commas at the end of some of your lines
it says it's only meant for comparing values, I don't think it can change shop stock sadly
see how the validator points out lines?
Yes
look at the lines above where it points out unexpected characters
But with the lines, it points me towards I can see the commas?
the line above where it points out
as far as the json parser is concerned, the issue isn't a missing comma, it's the " that it's found on the next line instead of a comma
a good 80% of the time i'd say an "unexpected value" error is a missing comma or bracket
of course, the lines each seem to have their own issues anyway
line 74 reads as "Roommate.Nearby(*)(Heart>=0):0": "#Npc.Nearby(*)(Heart>=0)", "See you later, {npc}!" , which is a key with what appears to be two values
same for line 75
Ahh
this isn't legal json, so you'd need to clarify what you were aiming for here to decide on a fix
oh good catch
That mod kinda came like that ngl (but thank you)
Do you have any idea what's wrong with the other one?
also, just for the future, discussion of NSFW mods is against the rules in here
(I assume you found your answer!
)
LOL
I'm confused why CP can't parse this line, can i not put tokens inside dynamic tokens?
"PerItemCondition": "ITEM_ID Target {{CartStock_{{Random:1, 1, 1}}_ingredients}}, !ITEM_CONTEXT_TAG Target traveling_cart_banned",
({{CartStock_1_ingredients}} is a dynamic token)
Log Info: SMAPI 4.3.2 with SDV 1.6.15 build 24356 on Microsoft Windows NT 10.0.22631.0, with 31 C# mods and 45 content packs.
Suggested fixes: One or more mods are out of date, consider updating them
No tokens in a token name i guess
Correct, you can't have dynamic token names
You will have to make a CartStockMerged token
you cannot use a token to be parsed into a token name
Not so dynamic now, is it
like an extra-dynamic token? like a second one with the random number drawn in that token?
Yeah extra one that collects the other values
Doesnt sound too bad
Although given the location you sure you can't just gsq?
I want multiple groups of items listed by id to pull from, I can also put it in the shop entries or use gsqs and stuff but it would put the id lists inside the shop entry code, and thats a little more annoying to list all together in one huge conditions secion idk
like 20 groups each with 20 items
Does RandomItemId work for you
its already random
The dynamic token randomization is in order to select a random group of ids
then the shop listing selects a random set of ids from within the larger selected group
Normally id use context tag gsq but the group contains a list of items from vanilla and various mods, so I would have to patch a context tag into hundreds of items if i wanted to do that approach
No the RandomItemId list
I dont know what you're referring to then
This ain't a shop but still item query
https://github.com/Mushymato/LivestockBazaar/blob/main/[🍁] Bagged Milk/data/w.json#L40
By default i random the vanilla milk
Hm i forgor to add the When vmv lol
Same issue tho, I dont just want random items within a list, but random list within a set of lists. If I used RandomItemId, I can do that, but I'd be copying the same shop entry 20 times and just changing that value
id rather have the lists written up somewhere else thats easier to compare them side by side, like in the dynamic token section
But i meant to add it When vmv for mod support 
Hm so i think my confusion comes from you using ITEM_ID
I thought that can only check for 1 thing
Ah ok it make sense now 
is there a mod for an island
like there’s ginger island
but has anyone made another island mod? 🤔
there was mermaid island but i believe it's not updated yet
Well too bad I can't just random the number in there but I just did this in another dyanmic token so I dont have to shove this into my shop entry
i wonder if you could do stuff like cartstock_ingredients_numbers and then have {{CartStock_Ingredients}}_{{Random:1, 1, 1}}
It would fill the value of {{CartStock_Ingredients}} not {{CartStock_Ingredients_1}} hehe
Since they're already space delimited, could you not put all lists in the same DT separated by commas and use {{Random: {{CartStock_Ingredients}} }}
Ahhhhh
There's a thought
Not bad, I think I'll try that. The dynamic tokens in this mod are already gargantuan beasts
-# what if local tokens
I saw you guys talking about local tokens the other day but honestly the coding for this mod is so close to being done
I didn't suggest it for this usecase because idk if it'll actually work on a list (randomitemid)
It's jank over there 
Not sure how LTs would help here, it's only one entry
if nothing else it'd delay the mod being done a little longer
maybe even break it. the possibilities are endless
Well assuming it did work, you would include several different entries using SYNC_RANDOM probably
But im fairly sure it wouldn't so moot point here

Sounds fun!
heck yeah breaking things 
(Quick sanity check... we never did get a vanilla/CP way to regrow things like stumps/logs, did we?
)
i believe the ones in secret wood use a special property for that, but it may be limited to it
Yep, I'll go with this. Looks like the game automatically excludes invalid ids too. That's nice!
Stumps [<int x> <int y> <unused>]+
(valid in any location) Adds stumps to the Secret Woods map daily. The third field for each stump appears to be unused.
Example: Stumps 24 6 3 29 7 3 26 10 3 46 6 3 34 26 3 41 26 3.```
"any location" "secret wood"
well, check how it really works i guess
must work for the forest farm somehow
well it does, but in this case 'the vanilla way' is the same way all farms handle unique behaviours
Yeah, the forest farm I checked and it does do it in C#.
which is a very long if-else that isn't much interested in map properties
new meep feature? 👀
Just for the farm! 
meep me a stump
to be fair the mountain farm unique behavior is a map property
I think it's finally time to bite the bullet and figure out what Appearances are 
appearances are hell
ty button that helped
I expect a 50% DP share
u see this? hell
Just skins
and local tokens but those are fun
You dun have to worry tbh
aren't appearances overlays 
No
and I do have to worry, I'm implementing a portrait framework 
At dialoguebox level the portrait is already selected
That's why you don't have to worry
you'd be surprised how good this bullet tastes actually
yes but I ignore that portrait and put in my own one
that'd override appearances no?
it would yes
exactly, which is why I need to deal with them 
Then you can just check the current appearance of speaker
unless iro handles it
It's on a net string right
is there an overlay based portrait system that isn't just content patcher overlays, or did I imagine it? 
also portrait framework as in give everyone a portrait when speaking?
portrait framework as in framework mod authors can use to add certain portraits
Yeah there is i heard irocendar is making it /lh
cool
right now looking at hd animated talking portraits
I think you imagined it yea
im sure some people will want hd
that actually makes my life a lot easier
no, as in I'm implementing all of it and people can choose what to use haha
example, portrait and animation courtesy of dacar
i am distrubed how the farmer is on top of abigail
but cool

reminds me of this emoji
I mean I love dacar's talking animations, there's something so cool about them
wow, abigail is hot
lol the emoji got me
ikr (also dacar, dacar is very cool)
abismodia
tfw you turn into your maybe-mother
(also the forest map uses the Paths layer for its stumps (mostly) so its not just C# either
(/lh))
(and the "mostly" is only bc it only checks up to x:20 fsr but i think that still counts regardless)
button do you like my code
im on mobile now bc i just left the house i delayed my trip specifically to check the forest farm code and thats it
which is to say: i cant read that iro its so small
maybe that's for the best
lgtm approved
lgtm?
looks good to me
looks good to me
ah
classic "i didnt really look at your PR but im approving it anyway" comment
yeah its github culture leaking
(im sure its used genuinely too, somewhere maybe)
ty I'm submitting this as a pr to all of your mods now
you think i look at those
ew this code is so ugly who wrote this (me)
(not that one, a different thing)
what was I trying to achieve here
I take care of this after lunch
I disagree with this color scheme but lgtm
why am I making it blank though
guess I’ll find out in a sec when I remove it and it breaks
is there a mod for a bigger casino with more games?
New quote added by atravita as #6555 (https://discordapp.com/channels/137344473976799233/156109690059751424/1406249426544234548)
Lol
@gentle rose so iro are u replace portraiture or are you just doing this little bit 
It happened
uh. yes? maybe? idk, the goal is to be a usable hd portrait framework with extra features like animations by the end, yes
are you suplanting the appearance system or working within it 
i was digging through portraiture source again and noticed this https://github.com/Platonymous/Stardew-Valley-Mods/blob/94255f11414f349f83fc7cff260bde398a6c298a/Portraiture/AnimatedTexture2D.cs
oooh will it support other hd portraits too or just some that wrote in json file
it sounds interesting for me, one of portraiture user
can someone help me with my mod, can not compile it with visual studio
!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.
Did you follow the C# guide
yeah but many errors in my modentry.cs
Did you install dotnet 6
yes
Can you show an error message
You're lissing many ), ;, and }
Does it say what line these issues occur on?
If my german is any good it should be the column to the right of Datei
There are so many things I'm confused about here...
i cant read german at all so im probably more confused..
Why is that a screenshot of it in Notepad, and why does it have Unix line endings when you're using Windows and Visual Studio?
I'm not too familiar with C# syntax so I can't help very well, someone who is more familiar can offer more support,
I'm just translating them to hopefilly help
I think at this point, it would be easiest for everyone involved to just upload the file in question.
)/}/; expected, A statement can't begin with "else", Invalid expression "else", and honestly ye an uploaded file would make it easier
If German's one of the problems here (besides all the code-related stuff, cuz that's absolutely not my kitchen lmao), I could offer myself to help?
If possible could you confirm whether my translation was right? Using a mix of my very poor german skills and translation software tends to make terrible tranlations
If it's cloned from or tracked in git, it usually normalizes to unix-style line endings.
When you have this many errors, usually it's a cascading issue from missing a or having a surplus parenthesis/brace/bracket. If you can show me the file, you can send it to my dms if youd like, I can probably fix it.
wait i just noticed you sent the .rar, lemme have a look
1 - I'm pretty sure that there is no 4.5.0 version of the build config nuget package, so change line 12 of the .csproj to <PackageReference Include="Pathoschild.Stardew.ModBuildConfig" Version="4.4.0" />
2 - On line 37 you have the FQCN of your API sandwiched between a pair of double-double quotes. Remove one on each side so the line reads JA = Helper.ModRegistry.GetApi<IJsonAssetsApi>("spacechase0.JsonAssets");.
(json assets why)
3 - The same issue is repeated on lines 48, 52, 87, etc.
Part of me hopes im wrong but im starting to think this is AI generated code
Too many type mismatches and references to undefined stuff
if it were it would explain how Weird it is 🤔 ?
(it would explain things like the made up format version, but things like the syntax mistakes would actually be even stranger. AI code tends to have correct syntax with made up elements, not just outright incorrect syntax)

I never lived through those times, but I'm glad C# mods no longer have to pack JA api just to support custom items using their stuff
oof
(this is not me saying whether that code is AI or not, just giving you guys hopefully some tools to use to better be able to tell in the future)
heres hoping this is just someone not fully knowing what theyre doing which. is honestly relatable
I don't know C# but I think a few things arn't quite right there
I just dont see a way to get to this point of borked without using LLMs or working off an old-ass codebase
Stardew Valley was a good sve mod /j
is stardew valley compatible with sve though
There is a lot of changes, I think many things had to be removed
(By Yoba is this Deja Vu)
JA does predate me, but I'm not sure the API was ever mandatory
basically just ID/category utilities and "okay JA stuff is ready" events
(DGA had spawn methods tho)
Doesn't git on Windows convert line endings on checkout and when committing? But now that I think about it, downloading from GitHub as a zip would probably bypass that... so that might be that part of the mystery solved! 
Id seems kind of important no?
Like rn if im making i dunno, eggs be smelly mod
I'd just look for items that r marked as smelly egg




