#making-mods-general
1 messages · Page 338 of 1
i am even though there is no way in hell the name is ever going to be reused
Let me find where I found where to do it that way. I could've missed another 'Hey, don't use this anymore, stupid' warning
(unrelated to y'alls convo)
WRT Data/AudioChanges, i am curious. would that correctly reapply changes at some point if, theoretically, someone replaced Game.soundBank with a newly constructed soundbank from the original game files some time after game launch, or does that asset assume that the soundbank itself is never replaced/removed
button that strikes me as a load-bearing theoretically /lh
(i dont plan on doing this. i am only curious about the drawbacks to using Game1.soundBank.AddCue() vs going through AudioChanges)
AudioCueModificationManager is a wrapper to make cues and add them to Game1.soundBank
does that mean there is no difference between using the asset and doing it yourself?
besides missing out on being able to edit it with CP
or i guess maybe you still can
depending on timing you could have race condition problems with your direct mutation to the soundbank vs audiocuemodification/audiochanges doing it
is there a way to debug force you to sleep?
my happy home designer bugged, and opened the generic mod config menu. but every time i try to close it, it doesn't close, and reopens. i'm at the end of a day and i don't want to have to waste it all, pls tell me i can fix it lmao
debug sleep
you can try debug sleep but its not a 100% guarantee itll actually initiate the day end process
depending on how stuck you got
How do you get a rqce conditioner without threadinf
And font thread this is not thread safe
even in a single threadded system, if AudioChanges makes the edit on GameLaunched, and then you make a change at GameLaunched + 3 ticks, your change will unconditionally override whatever, regardless of the priority used in the asset pipeline
ah okay yeah that should be doable, idk what i was remembering, so that shouldn't be an issue. and you loaded a blank json to both Characters/Dialogue/NPCName and Strings/Schedules/NPCName?
why is audiochanges like this
prevent game from crashing if mod carelessly deletes required vanilla cue, i assume
Noooooo. Um
tbf i dont think its AudioChanges fault if you bypass it to go directly to the soundbank
It is a special snowflake asset that was made early in 1.6 alpha, but isn't really used by vanilla as it likes its semi static soundbanks for mobile/console
blank is blank, but the others have data
yea i guess im just confused by its non participation in invalidate
alas it can be speshul boi
it has the weird name specifically to highlight how its a mutation asset, not declarative
How do I fix this: https://smapi.io/log/65481b239b97408cabbba1257d0eed67
Log Info: SMAPI 4.2.1 with SDV 1.6.15 build 24356 on Microsoft Windows 11 Home, with 6 C# mods and 6 content packs.
Suggested fixes: One or more mods are out of date, consider updating them
SinZ can I ask if you think it's a bad idea for me to initialize an entirely new Soundbank just so i can compare the Cue list to see which are modded and which are not
does blank.json have {} in it only
{
"Action": "Load",
"Target": "Characters/Dialogue/{{ModId}}_Rahiel, Characters/Dialogue/MarriageDialogue{{ModId}}_Rahiel, Characters/schedules/{{ModId}}_Rahiel",
"FromFile": "assets/data/blank.json"
},
I have this bit?
yeh
if you make an edit in AudioChanges with a condition that starts true and then goes false, your change wont be 'undone' because the soundbank cant undo changes
I do not have NPCName and Strings. I hadn't stumbled across that in Wren's tutorial.
it should be Strings/Schedules/NPCName
not actually NPCName, just whatever your NPC internal name is, which i think is {{ModId}}_Rahiel?
yeah
Any fixes for me? Deleted knowledge of the cooking recipes that I added in the save file and cooking is still broken. At least the fridge still works though...
aside: you can load schedule dialogue strings from anywhere you like, and there's no requirement to use Strings/schedules
Lol, oh my god the lag
oh true, i was mimicking vanilla structure but if it's a load you can assign it whatever target you like
the second it gets to a Cue, it is very hard to work out where it came from as so much metadata is lost along the like 10 different data structures it uses internally.
and just comparing cue names wont tell you if someone has overriden a vanilla cue
do I need a strings.json then, that's empty?
Do the Recipes and items need separate IDs?
if someone overrides a vanilla cue in the soundbank directly, i consider that a lost cause as far as identifying if its modded or not
no, if you loaded blank.json to whatever target you're also targeting with your EditData, then it's fine
Why is no one helping me? Is it because it's too crowded?
I did briefly go down that rabbit hole (not Soundbank override, but do more advanced diffing of existing cues vs incoming audiochanges), but its practically impossible to do it
but i initially planned to only check Data/AudioChanges to simply see if there were any edits done to it
I'm sorry, I don't know the answer
but alas, the one mod i used to test that goes styraight to the soundbank and doesnt use it
unfortunately i can only solve one problem at a time, and i also have no experience with recipes
which is what spawned this curiosity
I assumed objects had an internal id of {{ModId}}_Objectname
its a completely custom cue and not a vanilla override, so like, i could just hardcode the vanilla IDs and compare against those along with the AudioChanges check, but i was hopin for an easier (even if not foolproof) way
post your json
As a ZIP or in SMAPI JSON validator?
Wtf is wrong with this idiot's portraits?! The first one is fine and then each one progressively moves one pixel to the left??
What about instead riffing the asset against the last the asset changed
Make sure they're 64x64
thats what I do
do you do the border thing again by accident?
Items are 16x16.
Fall was asking about portraits
Hello sorry to barge in, i was wondering if there's some kind of clear/easy guide or a tool guide on coding the event other than from the wiki? This is my first time on making an NPC mod and the only thing i haven't done is the event 😔
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...
This guide attempts to provide a more in-depth explanation to modding events as a reference for both beginners and experts.
Omg Thank you so much
hmm seems fine to me. what was the issue that you had
It's likely a save file issue.
Objects can be any size you want, I believe. just have to reference the size in the file. I have a 16x32 one in my little mod
BigCraftables are 16x32
I'm sorry
items are 16x16, big craftables (likely what you added) are 16x32. furniture can be any size but always in 16x16 blocks
After buying the recipes from Gus, I tried opening the kitchen sink but it started spamming errors instead.
I don't see entries in Gus' shop in the file you sent
a new error! I'm getting somewhere
[Content Patcher] 'Rahiel - Custom Genie NPC' has multiple patches with the 'Exclusive' priority which load the 'Characters/Dialogue/Jierishi.Rahiel_Rahiel' asset at the same time (Rahiel - Custom Genie NPC > Include assets/data/characters.json > Load Characters/Dialogue/{{ModId}}_Rahiel, Rahiel - Custom Genie NPC > Load Characters/Dialogue/{{ModId}}_Rahiel). None will be applied. You should report this to the content pack author.
nope, double-checked, the total portrait sheet is 128 x 256
have you considered the idea that your portrait sheet may possibly just be haunted?
lol
you are doing an exclusive load on Characters/Dialogue/Jierishi.Rahiel_Rahiel in both your content.json and in your include assets/data/characters.json file
you're loading something to characters/dialogue/{{ModId}}_Rahiel twice
no errors but still not working?
Maybe I'll download East Scarp and look at it as an example? I have all of my fun mods removed right now
No errors, but he's a silent boy
the problem has to be with schedule and dialogue. He doesn't follow either
do you want to send me your mod as a zip? since i assume you have many files
looking at another mod as example is good but id recommend doing a standalone rather than a big fancy expansion
I'll buy you a coffee!
any suggestions? I made thye mistake of looking at Shiko before. I knew Lemur was updating hers currently
i really like how sen is arranged
my go-tos are Wren and Jorts & Jean
its a lot of files though https://github.com/7thAxis/Lurking-in-the-Dark/tree/main/Lurking in the Dark/[CP] Lurking in the Dark
ooh. I thought they were just examples. I'll download them. I was using Wren's tutorial
(Wren is the NPC, Tiakall is the author of Wren and the NPC tutorial
)
no the buttered cat is real
Possibly weird question, but could you use one LocalToken to define another? So File01.json would have this somewhere:
"Action": "Include",
"FromFile": "assets/File02.json",
"LocalTokens": {
"NameA": "Jane Doe"
}
}```
Then File02 would have this somewhere:
```{
"Action": "Include",
"FromFile": "assets/File03.json",
"LocalTokens": {
"NameB": "{{NameA}}"
}
}```
And thus by defining NameA as JaneDoe in File01, any instances of NameA in File02 and any instances of NameB in File03 would all be replaced with JaneDoe.
I feel like this *should* work...
i think you can do that, but i recommend just testing it, especially since you already wrote the json
hm u might not need to pass it in a second time 
if it is like include File01 > include File02 > include File03, File03 should get any local token that File01 passed into File02?
Because I'm learning - why would they be useful? What's the potential of the renaming?
dunno
I will test it both ways. I'll let people know the results once I do, but I've got to finish the current thing I'm doing first and then cook supper so it might take a while.
This was a random wild thought of how to use the same code to load appearances/portraits/sprites for multiple NPCs.
Ooh
I'm already doing some shenanigans with include and local tokens for festival appearances though, so I'd need to replace the names in two files.
Hence the thought about nesting local tokens
well i think it should work cus
i tried this around 3 months ago and it didnt so i reported it to pathos who fixed it
Ooh, excellent!
@idle lantern
- you
Includeassets/data/dialogue.json twice in your content.json - your schedules all end in
2100 bed; every schedule point must be the formattime Location x ywith optional animation and/or dialogue after that - your schedules are locked behind conditions, which may be affecting your ability to test them if those events aren't marked as seen.
3b. i'm not sure if you have a default schedule entry, which may be affecting schedule validity
try fixing those, and maybe removing all conditions for the schedule for now, and then focus on adding them back in once you have the basics working?
(2100 bed is fine)
oh. never mind me lol
It's a special thing
Although I think at least the spring one needs to have an actual final destination
spring is fine to use bed
If his home is a custom map, how do I define where bed is?
it's automatic. see https://stardewvalleywiki.com/Modding:Schedule_data#Schedule_points, under location (there's a note about bed)
tyty
"Entries": {
"Mon": "930 Town 35 55 2/1200 Town 22 80 1/1600 Town 45 65 2/1930 {{ModId}}_RahielLamp 7 11 0/2100 bed",
"Tue": "1000 Beach 65 20 2/1300 Beach 73 24 2/1600 Beach 70 22 1/1930 {{ModId}}_RahielLamp 7 11 0/2100 bed",
"Wed": "900 Town 20 85 3/1130 Town 30 72 2/1500 Beach 74 24 2/1830 {{ModId}}_RahielLamp 7 11 0/2100 bed",
"Thu": "1000 Town 45 65 1/1230 Town 25 55 0/1500 Town 35 78 2/1800 {{ModId}}_RahielLamp 7 11 0/2100 bed",
"Fri": "930 Beach 74 25 2/1200 Town 107 89 2/1500 Town 105 91 1/1830 {{ModId}}_RahielLamp 7 11 0/2100 bed",
"Sat": "1000 Beach 72 25 2/1300 Beach 75 23 3/1600 Beach 74 24 1/1930 {{ModId}}_RahielLamp 7 11 0/2100 bed",
"Sun": "900 Town 30 65 2/1130 Beach 74 22 1/1430 Beach 72 24 2/1800 {{ModId}}_RahielLamp 7 11 0/2100 bed"
},
does every one need a default spring before the Mon, just in case?
you need a spring key, yes. i like to have a default too, but i think only spring is necessary so there's a fallback for certain cases
is rain needed as well or do i misremember
in mine i have the default schedule spelled out like normal, then for spring i just have
"spring": "GOTO default",
i don't believe you need a rain key, but it is helpful!
@idle lantern this warning isn't quite as loud as the other one, but (/lh)
spring Always applies. This schedule is also used as a default in some cases.
DO NOT REMOVE THIS ENTRY. THAT WILL BREAK THE GAME.
and 'marriage_Mon' would be 'marriage_spring'? sorry
I'm going to remove the marriage schedule until I get his regular one working
note that an npc never uses marriage schedules and regular schedules together. they're mutually exclusive
they come from the same asset, but a spouse NPC will only check marriage keys, and non-spouse ones never will
ok 🙂
random question - how does the game create the routes for the schedules? im really curious on how the route thing makes npcs walk the fastest route around stuff, even with custom maps
within a given map, it's more or less A*
Is it least amount of warps, regardless of tiles walked?
this is a complicated answer (i can feel myself summoning atra by talking about the NPC pathfinder)
lol
there are two steps:
- figure out the high-level path to take (map to map). e.g. npc is in Forest and wants to go to ArchaeologyHouse, and decides Forest -> Town -> AH
- within each map along the route, tile pathfind from A to B
What's the heuristic? Manhattan dist?
number of warps iirc
step 2 is the A* part and is fine, but step 1 is fucked because it does DFS instead of BFS (or maybe the other way around. it does the bad one, is the point)
and, separately, it does not consider the contents of the maps at all, so things like disjoint maps where not all warps are reachable (backwoods) cause Big Problems
hmm so how does it calculate the route based on the objects on the buildings layer? does it just check each tile?
update: fails horribly if the Cue is modified by AudioChanges. have not figured out how to get it in that case so im just returning "Unknown" 
sorry 12am questions that's been on my mind everyday lol
*every hour today
I hypothetically wonder what the best way to do it will be
maybe on load, you cache some kind of matrix for reachability between warps on the same map that gets recalculated if that map is edited, and you then use those matrices all together to form a proximity matrix to use when generating routes for the day
i think the best way is to simply write a pathfinding algorithm that accounts for it 
hmm is this why npc schedules break for a day if you load mods midsave? because the routes are calculated when you sleep?
No it's sillier than that
I honestly can't remember if that's really how the game handles routing but I wouldn't be surprised
The code the calculates schedules runs before the code that finds missing npcs
Why do spawn spot changes happen weirdly? ie: NPC spawns at new coordinates on old map.
(Thats why i often use 0 schedules)
Yeah lumi ran into that too
Its been a thing for as long as i can remember
(Sry i forgot to remove the tag)
how do you mod stardew valley
What does "PreventTimePass" mean? It is in machines data and located on the solar panel entry.
!startmodding Most people make mods using Content Patcher.
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.
The machines page on the wiki explains all of the fields: https://stardewvalleywiki.com/Modding:Machines#Behavior_tweaks
alright thanks!
I can explain more about what that means if you like, but it will probably make most sense if you have a look at the links and poke around inside the files of a few mods ^_^
But I still don't understand that value (1, 7)
what xnb unpacker did you use
this field is list of enum and if u used stardewxnbhack u would have this
(No worries! I think it has to do with default map being set the night before, actually)
Made by people from my community
you should probably not use that one then
!unpack im not sure what that mean but we rec this one
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!
if ur community is like, different xna game of some sort, then yea make sense if u never used the sdv specific unpacker
I never use unpackers like xnbcli because it's not accessible on mobile🤧
android modding then 
i think u should prob ask whoever is making the unpacker if they could handle enum names
when u write cp code, its usually best to write "Inside" rather than 1 cus it is more readable and if the game ever changes the enum for some reason or other your mod would still work
while making a content patcher mod, cant i set the target and fromfile into the folders themselves instead of making a lot of action load commands for each file one by one?
for example i tried doing this but it obviously didnt work
// adds location data
{
"Action": "EditData",
"Target": "Data/Locations",
"Entries": {
"{{ModId}}_RahielLamp": {
"CreateOnLoad": {
"MapPath": "Maps/{{ModId}}_RahielLamp"
}
}
}
},
// adds the map file
{
"Action": "Load",
"Target": "Maps/{{ModId}}_RahielLamp",
"FromFile": "assets/Maps/Jierishi.Rahiel_RahielLamp.tmx"
},
is what the Wren tutorial taught me
Are you trying to make a mod or use mods?
!mh Then head to our tech support forum and you should find some help there :)
For help with modding issues, please ask in #1272025932932055121! When asking for assistance there, sharing an error log will help others identify your issue (see https://smapi.io/log for instructions).
do i just copy and paste this into my assets file or
!codeblock By the way you can use codeblocks to make your json easier to read :)
You can embed code in Discord using a series of three ` :
```
Your code can go here
Even if not a haiku
Just an example
```
For syntax highlighting, add the language code on the same line as the first
``` (with no space, like ```json).
The usual codes are cs (C#) and json.
@vernal crest any easier trick to do that? apologies for the ping btw
You're all good for the ping, I prefer them :) Unfortunately you can't do what you were trying. You can use the {{TargetWithoutPath}} token however to multi-load if you set it up right. That looks like this:
{
"Action": "Load",
"Target": "Maps/{{ModId}}_LocationOne, Maps/{{ModId}}_LocationTwo, Maps/{{ModId}}_LocationThree",
"FromFile": "assets/Maps/{{TargetWithoutPath}}.tmx"
}
That takes the Target after the last forward slash and then puts that into the FromFile, so for Maps/{{ModId}}_LocationOne it turns the FromFile into assets/Maps/Sam.CoolMod_LocationOne.tmx (pretending your mod's ID is Sam.CoolMod). So as long as you have your files named correctly and in the same folder, you can load more than one of them at a time.
aaaaaaaaaaa alright ill try it
how do i open ilspy? i downloaded the zip and extracted it, but im not sure what to do next
oh wait nvm
its in the folder right?
i opened stardew valley .dll and now have to save the code somewhere, but im not sure where to save it. when i try it says "project directory is not empty, file will be overwritten "
Make a new folder wherever you want
You should probably make a new empty folder first, then open it and save inside it. ILSpy's "Save code" creates a bunch of files wherever it saves, not just the one, and it'll save over anything with matching names
I put mine in my OneDrive so I can open it on my desktop and my laptop
oh thanks! that worked
ellooooo
It’s been barely a few minutes, so relax. One, why are you loading a tilesheet? That’s usually not recommended for compat reasons. Instead, you can simply EditImage it. Two, check your FromFile. Is the folder called mapss with two s?
i didnt sleep all night, i apologize if im showing some impatient behavior
one: i made my custom tilesheet image which replaces a lot of stuff in the game map
two
something worked! kind of. It's the first time I've been able to talk to him
I had my i18n labeled with 'Mon"-"Sun", but his character sprite was looking for 'spring_sun' etc specifically. lets see if this fixes it\
!log Can you share your log please? Make sure you have loaded a save before getting it.
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.
Any idea what I need to do, to fix his name there?
done
https://smapi.io/log/757d307bdf104e2999147d4ea0951a8c @vernal crest
Log Info: SMAPI 4.2.1 with SDV 1.6.15 build 24356 on Microsoft Windows 11 Pro, with 3 C# mods and 1 content packs.
Double check that your i18n token in his Data/Characters entry and your default.json are identical.
i really dont know why its happening lol, for example in the edited png file ive erased this statue thing to test if the png loads or not
its a transparent space on the png im trying to use but when i do the load command its as if i did nothing
akr
alr*
That one wasn't to you
I was stupid. I had this:
"LogName": "Data/Rahiel Info",
"Action": "EditData",
"Target": "Data/Characters",
"Entries": {
"{{ModId}}_Rahiel": {
"DisplayName": "{{ModId}}_Rahiel",
Can you copy patch summary full YourName.YourProjectName into your Smapi console and then get the log again, please? The first log had no sign that your mod is trying to edit Maps/spring_outdoorsTileSheet` but it might just be because the game hadn't tried loading it yet.
Haha whoops
Log Info: SMAPI 4.2.1 with SDV 1.6.15 build 24356 on Microsoft Windows 11 Pro, with 3 C# mods and 1 content packs.
Okay so that bit where you're trying to load over Maps/spring_outdoorsTileSheet does not actually appear to be in your mod. Are you sure you're editing the right file and that you've saved it?
are you talking about the png tile file or the game's xnb that needs to be edited
I am talking about your content.json that you showed a screenshot of here. This patch (which is the name for a block of code with an "Action" field in it between curly braces) is not being seen by Content Patcher.
There aren't any errors so it's not that your syntax is wrong, it's just not there for CP to see. Which is why I am asking if you're sure that you've saved it and that you're not accidentally editing a copy of the file that is not inside your Mods folder or something.
thats really strange, the content,json file is there
Stardew.Valley.v1.6.15\Stardew Valley\Mods[CP] SampleName\content.json"
That's an unusual game path
"C:\Users\DELL\Downloads\Stardew.Valley.v1.6.15\Stardew.Valley.v1.6.15\Stardew Valley\Mods[CP] SampleName\content.json"
Where did you buy the game from?
uh
i did not buy it thats the issue
im not uisng the steam version
Ah, well, I will not help you any further then.
understandable
I don't help with pirated games.
i feel like ive semi pirated the game, i do have the paid version on android but didnt yet get it on steam lol
but hey, i really respect your point of view
and it magically worked
but hey, i appreciate the help

I have a question about farmer speed in events - it says "adds a speed modifier to the farmer". Does that mean "speed farmer 1/" is +1 speed? Do negative numbers work? Does the effect last after the end of the event? I'm trying to make observations from testing but I'm a bit mixed up trying to observe the results.
Hm, I used it the same way as speed <actor>, which was to set the speed as the specified number rather than modify it.
I never noticed that the wiki said it was a modifier for the farmer, only that it's persistent.
The code certainly looks like it's a modifier though
I'm using the animated fish mod and it also animates my cooked fishes which is very uncanny. anyway around this?
Regardless, I just tweaked the values until the farmer was the speed I wanted them to be.
I never used negatives.
Yeah I'm having trouble slowing the farmer down for like a swim speed, but I just checked the penny spa event and there are no speed modifiers applied in it. I don't think slowing the farmer down works you just have to use position offset
thanks for looking
would a decimal work or does it only take integers
I think you can only increase the speed, like speed farmer 0 would be normal speed
Int only
The event command code itself is pretty straightforward. It's just @event.farmerAddedSpeed = speed;. It's what it does with that where I get lost.
float movementSpeed2 = Math.Max(1f, (float)base.speed + (Game1.eventUp ? ((float)Math.Max(0, Game1.CurrentEvent.farmerAddedSpeed - 2)) : (this.addedSpeed + (this.isRidingHorse() ? 5f : this.temporarySpeedBuff))));
if (this.movementDirections.Count > 1)
{
movementSpeed2 = Math.Max(1, (int)Math.Sqrt(2f * (movementSpeed2 * movementSpeed2)) / 2);
}
return movementSpeed2;
Yeah it'll always be at least 1
I could probably do it by applying a debuff but it's not that crucial I'm gonna let it go : )
Also looks like farmer speed needs to be greater than 2 in order to have any effect.
I wonder why it doesn't just treat the farmer like other actors during events where there's no player control.
Are you actually making the farmer swim? Does that not slow them down anyway?
(I'm just curious, not trying to troubleshoot for you)
I'm making the farmer swim but it doesn't appear to slow him down
if you re-watch the penny event you'll see the farmer swims faster than usual during the event
Speaking of that event, out of curiosity do you know what the "echos" command does at the start of it? .. pennySpa": "echos/-1000 -1000/farmer...
that's the music i think
Yep, music
oh, of course, thank you : )
https://media.discordapp.net/attachments/804462800235528282/1382978401635401798/Stardew_Valley_1.6.15_-_running_SMAPI_4.2.1_with_17_mods_6_13_2025_3_02_07_AM.png?ex=684d1e81&is=684bcd01&hm=1eec4f095e8be2a76a884fc356b53444afa00571f81910ef301714e84ea460ec& so i created a map from an island map, and i removed the map properties like always summer and context island, but it’s still playing parrot noises and switching the spring tile sheet to summer
does anyone know how yo deal with this
This sounds like a problem for #1272025932932055121
oh alright
Did you make your own location or are you replacing a vanilla one?
it’s my own location, but the map is a modified vanilla one (island east)
Usually it's the location data (or location context) that determines things like if it's always summer, which is why I was asking that.
Do you somehow have the location set to an island location context?
i shouldn’t, the only code i did for it was create on load lol
Hm. Maybe do a patch export of Data/Locations and also your map and check both?
hmm okay
oh you know what, i wonder if i forgot to copy my map over after changing map properties
because i remember that was the last thing i did
if that’s it, sorry for wasting your time -_-
you were a very responsive rubber duck!
Since it has a create on load, also make sure that you have reloaded your save after making changes to the map file, if you haven't already.
hell yeah, top tier Nexus comment dropped

How hard would it be, do you think, to change the location of the vanilla festivals occassionally. Specifically the Egg Festival. Since i just saw it with RSV, ES and SBV residents in their own little clumps and thought "why doesnt another village host it sometime?"
If its too hard I'm 100% going to add dialogue suggesting Lewis won't give it up
I... feel like it might be pretty simple from a fairly layman perspective on how festivals work?
Ill take a look tomorrow
It would essentially just be a conditional patch in of a new festival in the new location on the relevant dates, I feel like.
How do the eggs get placed?
Sve moves them but thats likely part pf their c# portion
that sounds like compat hell for any custom npc
Oh yes, it would not be every year!
Hello, can someone help me understand a bit more about how adding items works? I am relatively new to modding, and am a bit confused by how items work. I am attempting to do an unofficial update for the Archery Framework for personal use, I do not intend to release this update anytime in the future.
I have built it, I didn't clone the repository. I downloaded the source code from PeacefulEnd's GitHub.
Close enough whatever 
I was not sure about cloning since I didn't want to release it, I don't know if PeacefulEnd is active and don't wish to overstep his boundaries.
Well cloning is just git way of downloading
The mod does load with no errors (except for Harmony Patch patching an unused method which I haven't fixed), but the new items don't appear in the game. I've also updated the Starter Pack and again, no items.
Yeah you need to take a look at what it's transforming the pack to
Ah, I've worked with git but haven't properly cloned or forked before. Most projects I've worked on have been by myself.
The new 1.6 way of adding objects is edit to Data/Objects
But since the bows r like slingshots those should go in Data/Weapons i think?
Speaking of the easter eggs... Those can be retextured right
Yeah, it appears the new items do get added as Objects but obviously it's doing something that worked on 1.5 that doesn't work like 1.6.
Arrows don't get added either, idk if projectiles go in Data/Weapons or Data/Objects.
I'm also unsure if the JSON files that contain item information would need to be reformatted for 1.6.
The 1.5 asset for objects was like
Data/ObjectsDefinition or something
Make sure it aint doing that at least
I've not seen ObjectsDefinition anywhere. There is comments in the code where PeacefulEnd left his to-dos for things to add so I believe he may have started updating and simply not finished it.
I may take another look for ObjectsDefinition and see what I can find.
But also u can avoid doing the contentpackfor way and make it custom assets (that people edit via content patcher)
I'm somewhat new to C# (mostly a Java guy) and I've got a lot of stuff going on IRL between finishing college and job hunting. I could always attempt to make a framework in couple of months once things have calmed dow. This is really my first time working with mod development for this game.
Yeah dont mind me too much i am just type of person to tell everyone to make a framework 
It's just that idk if updating archery is any easier or quicker than starting from ground up here
Rule 15: Make a framework.
That is a good question. Perhaps I should just learn how to do that. Making a framework from the groundup just sounds like a big task that I'm not exactly sure I have the skillset for.
It's less effort than it might sound for Stardew at a base level.
Another thing to consider is that I'd probably have to work with the sprites somewhat, not sure if it would look weird just using the vanilla Slingshot animations. I'm not that great an artist but could probably make something passable.
None of the new objects in the Archery framework appear to use ObjectsDefinition and just use Object so it may not be that causing the problem unless I've missed a file.
When it is a framework the point is to let others give u the sprites (by data edit)
Do they ever do an edit on "Data/Objects"?
I.e. some sort of AssetRequested handler
I see them added as new Objects and the new bows and such do use the Object namespace but I don't see AssetRequested anywhere
Hm r they just init an Object raw
That'd explain why you cannot spawn the items by conventional means but also wow it is no good very bad...
So it's gonna need to be a whole conversion to AssetRequested instead of just initialising an Object?
PeacefulEnd knows what he's doing... I imagine he must have had a good reason, but I have no idea what that reason could be.
I dunno im guessing the reason is object definition kinda sucked in 1.5
Well i think u can still make it work even with this legacy mode of operation
To be fair the code hasn't been updated in 2 years. I think he's abandoned this mod by know at this point, which is why I'm just doing it myself. I got tired waiting for the update. No disrespect to him, I assume he just doesn't have the time or something.
But im not familiar with the mod, so you basically have to figure out what the intended means to acquire the bow and arrow is
(i.e. not item spawner)
I'm pretty sure he's still working on Fashion Sense and Custom Companion.
meh, not that hard.
maintaining it on the other hand...
(is peacefulend a he?)
Default bow and arrow are supposed to be granted as crafting recipes that the player knows by default. When I load up the game I don't see the recipes which is how I know it isn't working.
Idk I just wrote it automatically. They could be a she or they.
you gotta check that code path then
Path where crafting is added
But anyways if u were to make something like this as custom asset framework
- make people do normal Data/Objects and Data/Weapons edits via content patcher
- let people edit in additional data matching the slingshot and ammo, either as CustomFields or as new asset up to you
- draw the rest of the owl and make custom slingshot happen
It should be noted that they don't appear in CJB Item Spawner but I am unsure if that's only meant to spawn vanilla items anyway.
It is not
Rest of the owl?
Well again it's not appearing because this framework is doing funny things with the objects
Ah right lol
So I basically gotta see if I can update how it creates the new items.
Yeah, as far as the game is concerned, a modded item is a vanilla item.
...if that item exists by way of being added to Data/Objects, which it seems like the framework just completely side steps.
So how would I go about adding it to Data/Objects?
Well if u r just updating archery idk if u should bother
I do believe this is one of the last hurdles before getting it to work, and I don;t think it's entirely impossible.
It is doing non conforming things for whatever odd reasons but you presumably dont want to change it that much?
Try to just find the code path that creates objects and then write urself a console command to call it
Well if it gets it to work, I want to do it.
I also wonder if the broken harmony patch is of relevance
Hold on let me get the harmony patch line
I commented it out but SMAPI stil throws the error
If u r going to change it this much then ✨ just make new framework ✨
Peacefulend mods are gpl iirc, so u just have to license same way if u borrow any code
It's GPL3 too, so there's nothing wrong with forking it and keeping a few core bits and going a completely different direction, either.
The method it's attempting to patch is Objects.drawInMenu which it says is unimplemented. SMAPI recommends instead patching Objects.addToStack, which is alrady patched in by Harmony patcher.
I assume drawInMenu is a deprecated method or something?
For what it's worth this broken line is in the ObjectPatch file.
Perhaps?
Im puzzled by the recommendation too
It still exists, so maybe the signature changed?
public override void drawInMenu(SpriteBatch spriteBatch, Vector2 location, float scaleSize, float transparency, float layerDepth, StackDrawType drawStackNumber, Color color, bool drawShadow)
Is the current one, it looks like.
Yeah it is still there.
But well this is just for drawing the object in the menu 
Not direct cause of ur cannot get things woes
Old:
public override void drawInMenu(SpriteBatch spriteBatch, Vector2 location, float scaleSize, float transparency, float layerDepth, StackDrawType drawStackNumber, Color color, bool drawShadow)
New:
public override void drawInMenu(SpriteBatch spriteBatch, Vector2 location, float scaleSize, float transparency, float layerDepth, StackDrawType drawStackNumber, Color color, bool drawShadow)
Yeah, that's the same.
This is still my rec for going about things here
Rather that refactoring to use actual data edits from the get go
So a console command to call the AssetRequested handlers?
No a console command to call the code that's doing new Object or new Slingshot
Event handlers r not for calling by hand 
Ok, not worked with commnds before. As I said new to C# lol.
It's a smapi thing
But also looks like there's already commands for that
archery_get_bow
Ah right.
So boot the game up and try that command?
Yeah I had to fix that because it kept ambiguously calling GameStateQuery and it was confused whether it was the vanilla or backported one.
Is that bad or just unorthodox that it has a backport?
Well it just means it's old mod and back in 1.6 alpha days peacefulend wanted to have the proposed game state queries
Also here's the error that I've been talking about
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.
Did you try opening the Image?
Im on a phone it's very small
Oh!
Usually best to send errors via log parser 
Ah right my apologies.
Change AccessTools.Method to AccessTools.DeclaredMethod. I think that might do it.
I'm 99% sure I've run into that error, and it's Harmony getting caught up and it's fixed it. Been a while so it might have been a different error, but it's also a 5 second test!
Ah. Peace has a fun harmony helper
Oh god
archery_get_bow also returns as an unknown command in SMAPI
Yes the new items have it to.
Well if the harmony patch threw
It never finished the rest of the mod entry stuff
I was under impression that you saw error and then commented out the patch
Ah right.
That'd explain why u got no recipe too
I commented out the patch that threw the error, but still got the error. I have uncommented it.
How does commented out code cause runtime error...
Is it good that it has CanStackWith? I assume that controls what types of items can be stacked?
<ItemGroup>
<Reference Include="Newtonsoft.Json">
<HintPath>E:\SteamLibrary\steamapps\common\Stardew Valley\smapi-internal\Newtonsoft.Json.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
Oh no PeacefulEnd, why? 
So that's why I need to change AccessTools.Method to AccessTools.DeclaredMethod?
I'm asking if the method exists and is or is not abstract
Yeah I saw that and had to grab that JSON.
Because, funny story, I'm not at my computer
This is my reaction whenever i had to look at peacefulend source code 
It lives in SMAPI's internals directory, so just pointing at that would work at least!
But yeah I don't think draw in menu or can stack with are vital to functionality rn
There is an ItemPatch.cs file that patches the Item.CanStackWith method using Harmony.
You can comment out these harmony.Patch calls for now
I'm asking if the class "Item", which I know is abstract, has an actual implementation for the method "canstackwith"
Or if that method is abstract too
And tbh I was hoping either DH or chue would tell me haha
Oh ok, sorry I did not understand what you were asking.
Oh, sorry, I'm too busy trying to get this building on my end out of sheer curiosity. 
Im also on a phone sorry
It's virtual in Item, yeah.
(I don't really expect someone new to c# to know suddenly what an abstract method is)
Virtual but not abstract?
public virtual bool canStackWith(ISalable other), yup.
Do java have these
Java has abstract, not seen virtual.
Okay so it should have a method body
It does, I have the code up rn.
Hello everyone!
I have a question regarding editing maps. I have used "replace" in my mod so far, and thus replacing the whole town map. I would like to change this to make my mod compateble with others. Which other methods excist to change maps? Where can I get more information?
Thank you!:)
well, you're not Loading the map, so that's step 1 sorted. (EditMap is the correct action)
to avoid blasting other mods, you need to patch in only the areas you are changing, by using FromArea and/or ToArea. PatchMode defaults to Replace and you don't need to specify it in these patches
(PatchMode affects how the tiles are edited, not which tiles)
(if you mean does java have abstract and virtual methods, for abstract yes, for virtual, well, yesn't. The logic for method overriding in java is reversed compared to C#, all methods can be overridden in derived classes by default in java, the keyword final makes a method, well, final, unable to be overridden by derived classes)
Oh okay! So I still use Replace, but add 2 more lines wich specify which tiles i want to change? 🙂
None of us can read. Your issue is with addToStack
Not CanStackWith
Which is likely possibly virtual now
How to fix
Either find the actual concrete method that needs overriding
Or patch them all but be careful about it
Ok so looking at the 1.6 code fo Object.cs, it seems like addToStack doesn't exist.
So it's either been renamed or moved.
It exists in Item.cs and it's virtual, Object.cs however doesn't override it
I'm... also seeing that now, but Rider isn't complaining about Object.addToStack in the Archery project...
Aha, yeah.
Ah ok, I think I may need to change it to Item.addToStack
It's figuring it out. Change it to `It-
Yup. It figured that out itself and was smart about it.
yes. here's the content patcher documentation for EditMap: https://github.com/Pathoschild/StardewMods/blob/develop/ContentPatcher/docs/author-guide/action-editmap.md
you definitely want ToArea, which limits how much of the existing Town map you will overwrite. you can keep a big source map and use FromArea to only pull sections out of it, or (more commonly) you can crop each map down to just the edit and omit FromArea
Thank you so much!! I will try it :))
I genuinely didn't know it would do this. Really threw me off!
Ok, I've changed it and built the project, let's see how this goes.
Ok Harmony is throwing a different error, let's see what the problem here is.
So when changing it to DeclaredMethod, it seems to be returning null or something
(Well you can call it but the implementation is one class up)
(You know what happened here in my brain? I completely bloody forgot the inheritance order. I was thinking that Item was a child of Object.
)
its a child of a object, just not the sdv one
Thinking about it, there’s both ItemPatch.cs and ObjectPatch.cs. Since it’s patching a method in Item instead of Object now I might need to move it to ItemPatch.cs
You don't have the stardew inheritance tree memoeized?
-# halp
its impressive itemss don't extend from NPC
You don't need to but it's good for organization
rings being (O) but not extending from Object is probably the wackiest
I thought rings were (R)
Nope rings are (O)
Unfortunately not sure of releasing it as I don't want to overstep PeacefulEnd's permissions, although I have been told that the code is GPL3 so I might see if I can get permission to release it as a compatibility update. Not anything major though.
If it's GPL-3 you should be fine as long as your work is also GPL-3 and complies with the license, but yeah, if you're not sure you can ask Peace directly
Is Peace still active?
Not really
(We miss peace)
I've seen several people ping them with no response over the past several months
I've also seen there's some other HarmonyPatch lines that have the same errors as the one I was getting with overriding the addToStack method, might just comment them out and hope it doesn't break them. If i switch the patch to DeclaredMethod SMAPI just keeps throwing errors.
That's probably bad form but hey might as well try.
His commit history has been... very low for a while. Presumably got very busy with other things.
Ah well then. I shall just make sure I comply with GPL-3, now that it seems there is some interest in a compatibility update. Honestly didn't think there was, I assumed someone would've done it or built a new framework if the interest was there.
Yeah, it's never been a super heavily used framework from my knowledge.
https://stardew.button.gay/stats/dependencies
This is a super fun little interactive infographic to play around with on the subject.
I assume that's why it was dropped, Peace just considered Fashion Sense and Custom Companion more important because they were more widely used.
Which is a shame, it seems like such a cool idea.
It's actually a dependent mod that made me want to update it.
I was working on a mod that would use it once upon a time...
Other than the fact bows are just cool IMO, I saw Prairie King Firearms and since my character at the time wore the cowboy gear I thought just whipping out a six-shooter and blasting slimes sounded fun.
Also, the base game slingshots are extremely "meh", although using bombs with them is pretty fun.
Most peacefulend mods are on a maint only situation
the unused galaxy slingshot's damage multiplier does make it hit like a truck
iridium ammo hits for 250 damage on average
I always wonder why unused items are unused, like I know removing them is sometimes a lot of work but like it'd be interesting to know what made ConcernedApe decide to not use the Galaxy Slingshot.
Like my silly olympic bow mod
Ooo
It's hidden rn I think
Nope, still visible!
Reference another mod that adds stuff to shops, and you'll find that the most tedious thing to do is come up with fair prices
Is there some trick to getting changeMapTile to work in events? It just doesnt seem to do anything for me.
Probably just couldn't think of a way to obtain it that made sense, or thought it was too strong
One question: If an item made by cooking doesn't have a texture, will it break the cooking interface?
Hello! In a cutscene dialogue, can I make an option appear only if the farmer has already seen two specific cutscenes?
If that is true, then I probably need to make a texture for Fried Axolotl.
Cutscene has a specific definition as it is a game element/asset, do you perhaps mean an event instead?
i don’t think so—have you double checked that the Layer and tile index are correct?
yes, srry of course
As far as i can tell it is. Its the same tile and layer as what's in the map in Tiled. I tried just doing removeTile and that works but that removes it even after the event is finished.
Depending on how much of the event would need to change, you may need to use the fork [req] <event ID> event command, combined with a mailflag set by the previous events that you want the player to have seen to create the condition.
However, if your mod is likely to take a while to finish, you may want to wait for the There are planned 1.6.16 changes, which would deprecate fork for the much more useful goto labels
CAVEAT: there is no estimated date for that change at this time
(I have edited this post to strike the encouragement to wait for said changes)
what are you trying to change it from and to? possible errors might be trying to switch tilesheets, or having an identical tile on a layer above it in your map
basically im trying to remove gil from the adventure guild. Im just testing now if it has something to do with it being an animated tile
You might be better off replacing him with someone else.
it still might help us to see the exact event script
Gil is comprised of several tiles and also has a TileData object to contend with, which could be interfering
though now I’m wondering what the docs even mean by “tile index”, because shouldn’t you have to specify a tilesheet?
that’s why i think you can only switch tiles on the same sheet
that or the map renumbers them consecutively for all its tilesheets ig
oops, pathos summoned just when I was about to check decompile 
(That's a big caveat: there's no planned release, these are just changes in the queue for whenever a release happens. 1.6.16 could be years away for all we know. So I wouldn't recommend waiting on 1.6.16 for anything.)
LOL I figured it was me getting poked at
today’s big question: why is github search
(Saving my next mod release for 1.6.16, then. Sounds like a free holiday. /j)
Im just doing this changeMapTile Buildings 11 12 0 for each of the 4 tiles
Revised my post to strike out the offending suggestion, sorry Pathos!
Yeah i think its something to do with that seems to work on others
No worries! Just clarifying in case anyone is holding their breath for 1.6.16.
❤️ I struck out instead of removing so anyone who stumbles across it will understand the context
Is there any way to add the tile back in after the event if i do removeTile? I guess I can just c# it i suppose
SetTilesheet is apparently required to do this via code anyway
and I THINK that's the GID
I don’t think that’s related, lily
we’re talking about a vanilla event command and those are content patcher action docs
I’m not sure 0 as the ID is even valid though ngl
begins breath holding
yeah, that’s why I’m trying to look through the code to see where it’s defined but github search is being its usual self
what is the difference between #$b# and $e in dialogue?
$b is a new text box
$e closes the dialogue box and the player has to talk to the npc again
Ah! tyty
I'm holding my breath until 1.8, personally
went digging in the vanilla files to see where change MapTile is used, and it looks like Leah is the first file I've found that uses it
"51/f Leah 1000/p Leah": "sadpiano/-1000 -1000/farmer 7 9 0 Leah 13 8 0/skippable/showFrame Leah 20/changeMapTile Front 14 7 1453/
The event where she tells you about her ex
the tile changing is the phone there
so it's definitely on the same sheet as the original tile that was placed on the Front layer
yup, just checked source
Gil's half on the Front layer and half on the Buildings layer.
must be on same tilesheet
yeah i think that's the only example in vanilla. im pretty certain now its just to do the animated tile for my issue. Other wise setting all 4 of gils tiles to the same index should work.
would a changeToTemporaryMap work for your purposes here?
yeah thats what i was doing before but if i want compatability with stardew expanded id now have to basically make a copy of both maps
oh whoops, you are 100% correct - the command won’t work on animated tiles
interesting!
also the stupid fire effect causes issues
(in fact, the relevant property setter for the animated tiles is just empty)
I forget if there is a way to do an actual map patch only when you're in an event, but if there is, it's probably finicky to set the condition
is there a way to know when an event finished in c#. i could just do the remove and then add it back that way?
Question: If you set a map patch to have a mailflag condition, and have the event set the flag at the start and remove it at the end, would that work or no?
I have no idea what happens with checks during events
the update rate wouldnt even bother checking it in time
good to know
maybe if the event started somewhere else and then warped you to the map you wanted to patch, with a LocationChanged updaterate
how about the makeInvisible command?
it might work to make gil invisible (though idk what exactly it applies to)
think makeInvisible is only for objects isnt it?
objects or terrain features
ill give it a go
what is a terrain feature exactly?
o im guessing that is just stuff on the path layer but ill give it a go
How about just dumping a random bush in front of him
no
Or smth
it is not stuff on the path layer
big sign saying “nothing to see here”
base game does it in the forest for Leah's heart event according to the wiki.
i mean the actual trees you can chop and big stones you can mine and flooring you can craft and place down. those are terrain features
(just cover Gil in a giant blanket) "shhh, he's sleeping"
not built into the map
so the real reason i want to remove him from the map is becuase ive replaced him with tempactor of him getting out of the chair and walking
I wonder if there’s a way to easily invalidate/reload the map and that way bring gil back somehow after a removeTile
our current issue is that there’s no setter for xtile animated tiles’ TileIndex prop 
i mean you can always just have a conditional map patch checking for the event being seen that just adds an extra invisible tile to the OOB
If the whole "flag checking during an event" thing worked, you could also have just temporarily erased Gil from the tilesheet png
we want to bring him back though, not remove him
right. so the conditional map patch does what you just said, invalidate the map so it can be reloaded
(makeInvisible doesn't work on grass, or more accurately, grass does not check the invisible field in its draw function)
could change the event to kick you out outside the location
true, you could force the event to put you outside the Adventure Guild again
(i was just listing what terrain features are but good to know either way. im assuming HoeDirt also doesnt check)
atp I think you’re much better off just making a temp copy of the guild without him and just setting the event there 
when i was playing with it earlier walking in and out of the adventure guild doesnt invalidate so its still gone when you go back in
i think most of them don't, in fact. i just wanted to chime in on grass because i knew about it firsthand (i have a patch to make grass check it so that it works in one of lacey's events)
hence the requirement for a useless map patch to force it to invalidate
to invalidate you’d have to both leave the guild and do what button said
things will not invalidate without reason
ok i think i just dont understand what exactly you mean
apparently its just trees. very nice. well worth having a base class field for it.
(though I wouldn’t want to do a useless map patch for something that probably only needs to run once in the entire save because presumably it would run once daily? unless there’s a way to only do it immediately after)
oooooo
it would run every time the adventurers guild was invalidated
if the adventurers guild is never invalidated then it never needs to run again
but if the entire guild is already being invalidated anyway, one extra CP patch adding one extra tile is not really anything
assuming you go with the CP wayu of adding tiles and not patching in a .tmx
yeah, it wont do that without reason
its not gonna do that daily if the conditions have not changed
so unless you unsee the event
itd happen at least once per game session, when the guild is loaded for the very first time
and every time its invalidated again after that and all the edits are reapplied to it from all mods
but if no other mod ever changes the guild or invalidates it, then it wont do it again ever for that game session
yeah, I see
and the patch in question doesnt need to do like, hardl;y anything
hell, just add a useless tile property to 0,0
so not actually an issue other than a very tiny part of my brain going
-# no 
then the edit is done basically immediately
well, its still not an issue if you consider it to be the only solution
does seem that way alright
I still think the correct solution here is to just do the event in a copy of the map
thank you all for your help by the way.
do you think loading an entire copy of a map is more efficient than adding one tile property once
i was kinda going mad looking at this
it makes my brain less
so yes /j
especially when you consider that if any other mod patches the guild, you have instant mod incompatibility
thats why im asking this question
also, what if i have a chest or something placed in the guild? it wont be there in the event
thats what i was doing
Yeah but maybe the goal is to include other mod's patches
right. so you dont want to load a copy of the map
bc your copy wont have the other mods patches
exactly
the actual solution is somehow to transpiler xtile (no don’t this is a joke don’t blame me)
or write a custom event command(s) to remove Gil specifically and then put him back
would be handy to add an addtile command
wait stupid idea
i imagine its a total pain to do
well I just broke my nail right in the middle of the pink part
what if you added a TAS over gil that’s just floor and wall
event commands are actually really easy to write and if the change was-
oh that wqas quick
so imma go
(thank you mods)
anyway if the change was meant to be temporary then the command is even easier
I couldn’t even see the message lma
i also thought about this too but what about recolours
or wait hm
TAS's just pull from the tilesheets dont they
fsr i forgot you dont specify your own imag for a TAS
yeah just a texture
it does mean the player wouldnt be allowed near the TAS area though
i suppose it depends on when recolors are applied
idk the event in question so idk if thats an issue
true
recolours are always applied if theyre meant to be
essentially remove gil, replace with tempactor of gil walking and empty rocking chair. put back gil after event
there isnt like, an unedited version of a file sitting in the games cache that gets edits applied on demand
the base version, from the games perspective, IS the edited one
so then it sounds like it would work then
is the empty rocking chair already in vanilla or did you create it, emu?
created it
(unless you define the texture as being 4x4?)
and if you want them animated then idk
this assumes that there is a vanilla tilesheet with the exact correct 4x4 you want
which is not at all likely
whats more likely is that each of the 4 tiles is placed somewhere entirely different on the tilesheet
i dont even know why i want this to happen anymore. ive kinda written him out from what i originally wanted to do but its kinda just annoying to be so close
no, they said they made the rocking chair themselves—TAS don’t have to be from vanilla tilesheets but they can be. it’ll be a recolor issue like you mentioned before but otherwise should work
well the recolour issue is the entire reason im saying it wont work lol
any solution will work as long as you ignore the parts that make it not work 
yeah fair, i just thought maybe i had confused the issue with texture vs tilesheet
haha
I guess u can make like
The 4 tiles where gil is into 4 TAS
I don't think event tas cares about where the texture is from does it
you would need 4 TASes yes one per tile
and then a separate TAS after fror Gil getting up and walking and leaving an empty chair i guess?
i don’t think you would even need one to cover him before he gets up, not if you get the timing right—though it would be more exact that way probably
i guess it depends on the animation of him getting up, like if he’s ever halfway out the chair
i dont bother animating him getting up its just an empty chair and the walking sprite. it happens so fast its kinda good enough
sounds like your options then:
- custom event command to replace animated map tiles
- TAS to cover him up
- create a copy of the map and run the event there
- remove tile and invalidate map patch after event
each with their own drawbacks
or just removetile him and do the patch thing
forgot that one, yeah
I feel like custom event command is kinda nicer since its less of a work around solution. If I fail at that the patch thing seems like an easier option.
awesome, best of luck
thank you all again so much for your help.
Does anyone know a guide how to add a custom shop in a CP mod?
[[Modding:Shops]] will be your best bet
thank you!! ❤️
Is <NPC>_Beach asset automatically used as a resort outfit?
Or does the NPC need to have a specified appearance with IsIslandAttire?
I remember there being some legacy logic for it
Is it possible to define a weapon with a particular enchantment pre-applied?
Not in vanilla afaik
is there in-game code I could easily replicate in c#, specifically the one that always gives crusader to holy blade?
you can postfix Farmer.OnItemRecieveBehavior
that's probably the most straightforward way to do it
don't ask me how I know that off the top of my head
Does it matter though? If the map is slightly different. Players are capable of suspending disbelief.
OK, any chance you know of a similar project I can look at to help me make progress, I'm a novice in this
Archery Framework now loads the items in. I need to adjust the patch so that ammo can be fired.
well once you have a basic c# mod with harmony enabled (which you can find detailed instructions for on the wiki @ [[Modding:Index]]) you would do something like this
private void Patch() {
var harmony = new Harmony(Manifest.UniqueId);
harmony.Patch(typeof(Farmer).GetMethod(nameof(Farmer.OnItemReceived)), postfix: new(typeof(ModEntry), nameof(AddEnchantment)));
}
private static void AddEnchantment(Item item, Item mergedIntoStack) {
if (item.HasBeenInInventory)
return;
Item actualItem = mergedIntoStack ?? item;
if (actualItem is MeleeWeapon sword && sword.QualifiedItemId is "the_sword_item_id") {
actualItem.AddEnchantment(new CrusaderEnchantment());
}
}```
I think u can also make a item query to do it
That way u can just do it when u r create weapon
OK I will look into that also, thank you both
I’ve gotten the Archery Framework to allow ammo to attach to the weapons, now last bit of testing I need to do is make sure shops are functioning properly
The owner is used to determine portrait and npc proximity, you can have multiple yea but it depends on The desire
I'm getting (No translation: spring_12) for
"spring_12": "Enjoy your festival, tomorrow. I could give you a few hints... but where’s the fun in that?#$b#Unless you want to use one of your wishes. $5",
did I use the #$b# incorrectly?
This be i18n issue
Found it. I was missing a comma near the bottom of the document
Are people open to collaborations for fun? Like would someone ever be ok to like "ok ill do code if you do the sprites) kind of collab, without any payout?
Or in modding people always expects something out of modding?
People do collaborations sometimes. I think itd be helpful to say what you want to make and what youre looking for
Well i only code on notepad ++, i struggle with the rest. I make 3d mods for like project zomboid, but ive always wanted to make like, recipe mods. Cakes and pies for a bakery
Having some previous stuff released also probably helps
But i cant code on stardew for sh*t and i struggle to learn. But i have all i need to make sprites.
And tbh, code part for content packs couldn't be easier in SDV
Yeah, I dont know if id collab with anyone I didn't already interact with regularly on here, but thats just me
Project zomboid coding is easier but go on
Others may be open to it
Thing is i cant learn by myself. I need a mentor here and there to correct me. Wich i had for zomboid
You don't really need "code" per se, to do 90% of modding
Fwiw if you want that start off by showing off your art in #making-mods-art
(Adhd tism make sh*t hard to learn for me)
It's all just jsons (everything is amazingly described on the wiki and CP docs)
If someone likes your art they might step in to help you
Guess ill do it myself then
Might take months but ill try
If on 1.6 all i need is like jsons assets and spacecore, ill try to find someone i can at least have near to verify if im doing is right or wrong then try to tinker with that
What you describe does happen - I think HxW is the most prolific
(Hime and Wildflour)
(dont use json assets, Content Patcher is what you want now)
And i love hime and wildflour, cant live without their mods
But it's not the most common and you generally don't get people to bite until they have seen your work
Ok so just content patcher, noted
I make mods without even getting paid or having donations so i guess ill be by myself
Most people dont get paid or get donations
Or at least not more than a few cents a month haha
I think I got my first dollar from Nexus after a year 
(I don't know how we got there from "can you please at least show some of your art")
I made 75 cents once
I bought a pair of running shoes once from modding revenue
Tbh if u just ask things here you will get like 0-4 nerds responding depending on the hour
I've also literally made more money donating plasma
I dont know i always see people with Kofi or expecting something, i make mods for myself mostly
I dont think a donation is ever expected
I dont have none in hand, all i had got deleted whrn i reset my computer, desktop didnt make it to my outside disk. I just wanted to know if people were enclined to this kind of stuff if it happened
I put a buy me a coffee on one of my things because I put a bit of my own money into, like, a domain name and stuff. But I would never expect any users to tip
Yeah thats what i meant
I want to make a cake/pie collection for vanilla fruits
Do u want them to be machine or recipe? Either is possible with just content patcher
How? 🙂
You can always look at an existing recipe mod and see how it's done there
How do i access the code? Is there any coding i can access from the downloaded mod? (Thats how we learn on zomboid, we have easy access to all code)
(Also I bet half the channel is audhd)
Just sayin
!startmodding also this might be useful if you haven't seen it yet
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.
Diagnosed at 32! Made life better. I felt less... bullied(?) by the universe. It certainly makes hyper focusing on projects easier!
My problem is i rarely get the hyperfocus, i just have learning troubles
So i can just, make recipes with text files? Can i just write those on notepad?
Noted!
I think you need a program that saves as a .json. For the other stuff you do, not sure about recipes. There's a few free ones
!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.
Might be easy to find, anyway i dont think itll be a waste if i find it
I use Notepad++, but there are better ones out there that I'm practicing with
I recommend vscode(or vscodium)
Ill try working with that one
chu√e is the expert - I'd use the vscode
Wow terrible i remember nothing
Gotta hop off to go to work. Thanks for the tips and help though, much appreciated! Ill see what i can cook in a couple weeks with all that! ♡
You do not. You can use any plain-text editor. You just have to have file extensions visible so you can change them
I need a tiny exe program that copies a folder from my desktop into the mods folder for me
so I can be lazy.
You don't need an exe for that, you can use shell scripting or python
😮
If you're on windows that would be a bat file, though loops in windows cli are annoying
Tbh i just sym link things and not deal with running script
I can't count how many dumb python scripts I wrote for my modding purposes..
I wonder if it's make more sense to macro a key on my keyboard to just open the folder I want
I wrote several for map stuff bc I got annoyed with endless file copies
Actually if you're on windows there's a tool called Link Shell Extension that allows you to easily create symlinks using the context menu
One that saved my sanity in digging through content folder is for deleting all the localization files 
I have a feeling that's far out of my ability sphere right now. I can't even get my schedule codes to work
Link Shell Extension is really easy to use. You select the folder/file you want to "point" to, and then right-click in the place you want to put the link
And you'll only have to do that one time
I'll try it out!
Funny, I have something that automatically copies over my content mods on commit
😮
https://smapi.io/json/content-patcher/35cd6c32e9ee40ae99c40750c6e7930a
What am I doing incorrectly D:
I have read trought the wiki but still dont understand how to get two owners.. hmm. 😦
[
{
},
{
},
]
{
"Name": "Hazel",
"Portrait": "Hazel"
},
{
"Name": "NotHazel",
"Portrait": "NotHazel"
},
?
oh hahah thanx!!
srry typed that up on phone
lets give it a try!!
"CanBeRomanced": true,
hm
half seems low ngl 
Omg it worked! Thx!! ❤️
Btw is Hazel ur npc
Yäää
Might wanna {{ModId}}_Hazel
Yes I will... hahah just putting it off lol
Earlier better than later trust
guess ur right < //33
Naver account making help
i meant more as i said in modded help so it wont get drowned out but okay, good luck either way
(we can't help with making naver accounts there)
cool cool..
i remember a place where people posted mod ideas for others to make, anybody knows where it is at?
!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.
ty
I am trying to use AssetRequestedEvent to modify some ToolData without going through ContentPatcher. But it doesnt seem like any in game actions trigger my debug message to pop. Would it have to be formatted differently than Data/Shops is?
{
ModEntry.TheMonitor.Log("DEBUG: Data/Tools Called");
}```
That looks correct but it is logging at Trace level, do u have dev smapi?
if not, you can just add the correct log level as the second param
I have implemented the same debug message in my Data/Shops variation which is identical and I can find the debug message in my SMAPI-latest log.
So I am thinking I am doing something wrong with the Tools one. I am trying to make GMCM config adjustable sale prices for fishing rods as apart of a module in my QOL mod. Otherwise I would just use Content Patcher.
it may help us if we could see your entire code in this case
{
if (e.NameWithoutLocale.IsEquivalentTo("Data/Shops", false))
{
if (ModEntry.Config.Willy_Buys_Fishing_Rods)
{
e.Edit(asset =>
{
var shopData = asset.AsDictionary<string, ShopData>().Data;
var fishShop = shopData["FishShop"];
fishShop.SalableItemTags.Add(new("item_bamboopole"));
fishShop.SalableItemTags.Add(new("item_trainingrod"));
fishShop.SalableItemTags.Add(new("item_fiberglassrod"));
fishShop.SalableItemTags.Add(new("item_iridiumrod"));
});
}
}
else
{
return;
}
if (e.NameWithoutLocale.IsEquivalentTo("Data/Tools", false))
{
ModEntry.TheMonitor.Log("DEBUG: Data/Tools Called");
e.Edit(asset =>
{
var toolData = asset.AsDictionary<string, ToolData>().Data;
foreach ((string itemID, ToolData itemData) in toolData)
{
var toolName = itemData.Name;
if (toolName == "Training Rod")
{
ModEntry.TheMonitor.Log("DEBUG: Found Training Rod");
itemData.SalePrice = 25;
}
else if (toolName == "Fiberglass Rod")
{
itemData.SalePrice = 1800;
}
else if (toolName == "Iridium Rod")
{
itemData.SalePrice = 7500;
}
else if (toolName == "Advanced Iridium Rod")
{
itemData.SalePrice = 25000;
}
}
});
}
}```
Thank you so much; I glossed entirely over that
dw, fresh eyes always help
if that's the silliest thing you've done while coding you're doing a hell of a lot better than me lmao
Normally I go with the good ol' rubber ducky debugging. But yeah, another set of eyes definitely helps see the simple mistakes. Sometimes mistakes are small and dumb like this while others lead to accidentally nuking my RimWorld test save while modding on that game. 
(nice mod idea, btw!)
No one ever rubber goose debugs
and honks
Goos
-# 

"Gifts.Loved": "{{i18n:Gifts.Loved_{{Random:0,1,2}}}}",
Is this correct? I found the random code in regards to outfits on the content patcher modder page, hoping I applied it to dialogue correctly
Sat down and tested the updated Archery Framework some more. Two issues left to solve:
-Farmer's sleeves are drawn incorrectly in firing animations
-Marlon's shop does not have the archery items
Overall, some good progress. Hope to have this finished soon.
do u have FS
FS?
fashion sense
I do, currently disabled though, why?
it touches sleeve draw, but if u have it off then prob not that
Ah right. I had to change some methods that were called because it was calling old methods, I think I might've just broken something.
There was a clamping function for the Shirt colour value that called a method called Clothing.GetShirtMaxValue that seems to have been removed
Actually it seems that code was used in something to do with Fashion Sense so it likely wasn't that.
I'll consider fixing the shop to be the higher priority issue since that actually affects gameplay. Sleeves is just a visual bug.
Farmer sleeves are cursed in the specific 3 frames associated with sling shots
Hence why they’re funky in Archery Framework, I suspect
If you overlay the sleeves png with the bodies png you’ll see what I mean
Most sleeves match up decently with the body, just not those few
HOORAY. it worked!
Ah so it’s just a normal base thing then? I tested out the slingshots to see if that was the case and they looked normal there, so I’m not sure what it is really.
Having a weird issue where Sebastian starts voidwalking after his move command. I believe he's only supposed to move down by one, but he turns around from his starting position and walks into the ether. Could I possibly get some help? There doesn't appear to be a SMAPI error registering either, but on the off-chance I'm missing something, here is both the log info and the event I'm working on.
Log Info: SMAPI 4.2.1 with SDV 1.6.15 build 24356 on Microsoft Windows 10 Home, with 6 C# mods and 1 content packs.
(One sec, getting a picture of it so I don't slam people with a wall of code)
that happens to me with advancedMove inside of events. If it is, and you find a solution, I'm all ears
Weirdly enough, nope. Just a regular ol' move command (I, too, have yet to find a solution to advancedMove voidwalking)
is there a chance he inadvertently spawned into a building layer, and the mapping is trying to get him around it?
Please ignore the absolutely messy screen, my internet will not load fotor for some reason so I could've cropped it. And that I'm not sure. He spawns in his usual spot when he plays pool with Sam, so I don't believe so
The "move Sebastian 42 21 3" command is when he walks off into the sunset
what is the /message command you have? Do you mean textAboveHead?
It's right after a move to the left by Sebastian
I haven't used the speech bubbles in events yet, I don't think. I'm not familiar with them
you also have messageAboveHead later
No, message is so it'll display the actions that the characters are taking like a story. I use textAboveHead for laughs and things like that
OH like a dialogue box that's sans portrait?
Yes exactly!!
You see the vision :p Lol. Ooh I didn't even realize I used the messageAboveHead one...huh
Wonder if that's what it's freaking out about? I could test it and see
And no, I don't! I don't think I've ever used that mod actually
Someone had asked about a similar issue on reddit a few months ago, and Lemurkat had responded about that mod. Um
Have you tried disabling all other mods and debug ebi-ing the event?
wait
you have a /move Sebastian 42 21 3
that's telling him to move 42 spaces horizontally, and 21 down
you need something like /faceDirection Sebastian 3/move Sebastion 2 0 3/faceDirection Sebastian 2/move Sebastian 0 2 2
or use advancedMove
(One second I'm so sorry I just got a call)
you're ok. didn't do anything wrong
@urban patrol would you be patient enough to look at my schedule scripts and see if you can spot why they aren't working?
Okay back! Sorry about that. I will try that fix in just a bit, thank you so much. I guess I didn't register that.
I'm assuming you were thinking of the coordinates you wanted them to moveto, versus number of movements
I was indeed 🥲
um
I changed his starting location to the FarmHouse, so I didn't have to keep warping
it's kept him in his custom map
but now he's moving?
What the hell
my guess is that the farmhouse is cursed (scheduling in particular is likely to cause you problems)
i would try putting his default location back to where it was. if you are sick of warping there, go there once and debug sleep and you will wake up right where you were standing
or make a cjb cheats menu warp
ooh
there's a short film serious on YouTube, called 'DearKitten'. At one point, the old tomcat tells the younger, newer can "Now that I have hissed at you the customary 23535242 times" - that's how I feel about copying this mod over and over for two days
I changed my NPC's spawn point to Club. His schedule is now working, but he's still inside the custom location
is he scheduled to spawn in the club, or is it just his default/home location?
I had that as his home location.


