#making-mods-general
1 messages · Page 378 of 1
More Prismatic Stardew rn is half hand recolored animations in DGA and half FS
The FS part is just using FS prismatic features
So that should be possible or maybe it already has compat with prismatic pride bc I think those go through the game functions for prismatic stuff
The hand recolored animations would be hell to figure out how to do, I think — but maybe I’m too pessimistic
Prismatic Pride was never updated to 1.6. Not sure exactly what broke but it is broken afaik
I thought More Prismatic Stardew had a c# component for some reason, nvm
Please ignore me
I mean it could! I could write one!
Hey All, finished updating the GitHub and Nexus page! Level Extender now has an update, working with current Stardew! Yay! More updates are planned, QoL features are the main focus. Check it out here: https://www.nexusmods.com/stardewvalley/mods/1471
If someone with that fancy orange name wants to post that in #mod-showcase for me, that would be super epic ❤️
cool! will my spacecore custom skills work out of the box, or do i need to register them manually?
I have absolutely no idea! (but probably not going to work out of the box, let me know though!)
should be done 
Appreciate you!
Just looking at the unpacked buildings assets and there's brightly coloured RGB versions of the buildings called paintmasks, what are they used for?
several buildings are paintable from Robin's builder menu; these buildings have an entry in Data/PaintData and a Buildings/*_PaintMask asset, where the order of the fields in their data entry corresponds to a respective R, G, or B colour in the sprite
each colour channel has its own paint slider in the menu that's used for chroma-keying in the paint colour you want
Ahhh gotcha, I completetly forgot about the ability to paint buildings as I always used replacers, I thought they might've been left over from actually designing the buildings in the first place
nope! most of the holdover/leftover sprites were removed in 1.6, painting was added in 1.5 i think?
Good to know! Say if I want to replace the sprite for the farm house to something that's completely different, What should be done with the Paint mask? replace it with a blank .png using content patcher? or just leave as is?
i suppose you could blank-out the sprite asset, but you could also remove the House entry from the data asset
which would make it unpaintable entirely, rather than paintable to no effect
Gotcha, might remove it from the data asset then, takes less space and time
thank you!
good luck! be sure to ask if it doesn't work right hahah
any suggestions for how one could go about, like, "dynamically changing" a festival?
making a small mod using content patcher with the current gist being:
Enter Event (moonlight jellies) --> talk to existing NPC --> event is triggered with dialogue ($v)
I've gotten through all that fine, and the event itself is done unless I want to tweak anything. The issue is that ideally, it would then go:
Event ends --> back to jellies festival --> change interacted NPC's sprite set & kill dialogue
Impractically, using changeLocation Beach ends up putting you in the festival by triggering the set up again, but that restarts the festival. my first thought was maybe a check for whether the event was seen or not in the festival set-up, and then having the main event set the modded event back to unseen so it's repeatable. I don't think that's possible though, looking at things, so i'm kinda at an impasse. Just using end puts the player on the moonlight jellies map but with no npcs present.
i'd like to avoid C# since I have experience with json and none with C#, but if it's necessary I'd probably look into it since it (should) be a small part of things?
i have been using better crafting for a little while an d i installed daisy nikos earthy recolor, and i was deisapointed to learn that there is no built in daisyniko's earthy theme, so i took it upon myself to make a theme for better crafting for daisyniko's earthy. im finished now and would like to upload it but i dont know how or where
i mainly ask this becuase it is a theme for another mod and can not just be installed liek a normal mod, you would have to put it in your themes folder
DaisyNiko stickied a comment with links to various compatibility patches in the comments section here: https://www.nexusmods.com/stardewvalley/mods/13658?tab=posts
So perhaps you can ask her to include yours?
Are you doing magic trick with CP now?
From what I understood, you want to trigger an event in the middle of a festival (using $v) and back to festival after the event ends?
I think Better Crafting already has a patch for earthy recolour? I use her interface recolour and It works perfectly
correct
I don't think you can bypass the 'set-up' phase, every festivals has to run through set-up phase first.
Or you want to do something else?
I guess the "how" doesn't really matter. The goal is just to have the game go back to the festival state, ideally with just the one NPC changed, but worst case scenario "the entire festival is reset but this NPC is changed" is probably fine
Oh you want to have apply changes to NPC after the seeing the event, is that correct?
You can use mail flag to track that.
If you're using a .tmx file for the map, you can rotate tiles and they still work in game, give that a try and see how it looks
Yeah, only for the remainder of the festival. I get the mail flag would be applied in the modded event, I'm not sure I know how it'd be able to changeSprite in the festival. Or kill the dialogue (either like end dialogue or just replacing the dialogue in general)
still not that much better
i now know why 4 corner farm hides its sideway, ways
see, you're making a staircase but the start and end points are on the same height, so it's never going to look like stairs
I've tried making sideways stairs for my mod but I can't figure out how to make it look good either
the other ones look good
the reality is it can't work well as-is because the player has to zig-zag up the stairs, which doesn't look or feel right
that does actually look really good though lol, stick with that
you can also toggle the tile grid with ctrl+G if you think it's distracting, btw
If you don't mind mod dependency, I recommend Lumi's outdoor tilesheets or Alva's tilesheets.
These have sideway steps for you to use.
i didnt think to look here and found a better crafting one 😦 its better than mine tho so eh
at least i got soem experience doing some content pathes (and a wasted 2-3 hours 😭
i looked in nexus mods googled, all over better gcrafting's nexus mods page and couldnt find a compaability thing
thank u for finding one for me tho
❤️
For festival, you could use 'textOperation' the 'changeSprites' for the set-up phase.
For replacing thing, I think a CP patch with condition like 'HasFlag' should be able to do it.
changeLocation as far as I know, can trigger a CP patch with OnLocationChange update.
Hmm that looks promising, I'll have to look at it a little closer, but I think that could work. Thanks!
just happened to be looking at the farm cave, figured you'd be happy to know the dialogue selection 9-slice makes a cameo as the bats in fruit cave 
It what
Hi everyone! Does someone know an easy way to get an object by its ID from a specified GameLocation? Something that would be like GameLocation.GetObjectById(string)
Depending on what you want there may be a method in utilitu
But tbh "write it yourself" is probably the easiest
you probably want something like this```cs
Utility.ForEachItemIn(Game1.currentLocation, (Item item) =>
{
bool looking = true;
if (item.QualifiedItemId == "(BC)164")
{
MyMod.DoThing(item);
looking = false;
}
return looking;
})
@formal crown aski here cus it is not directly about 1.6.16 can you elaborate on the usecase for building getting map like layers
My confusion comes from the fact that if you make something like the mill but as a map thing you would need to separate the anim elements to own tiles as well so it seems same to me
Yeah I do! I'm just not used to check Utility methods. Thanx
Well, all my buildings in VPP are not regular rectangular buildings, so I have to split parts of it in the sprite to prevent clipping, drawing over when it shouldn't etc and use DrawLayers for those parts
Map style layers could make easier to deal with this, but I'm open to other easier solutions
Ah so the desire is actually make building participate in the map layer draw order?
Previously i just fiddled with SortTileOffset until it looks right and so far it work ok
Naw u can set a SortTileOffset for the building
Like if the building is supposed to have a 1 tile tall porch you can put SortTileOffset 1 on the building entry no draw layers required
I'll try it with the Minecart Repository 
This is equal parts resourceful and diabolical
the blinking effect is just the animation moving over the 9-slice border. incredible
Unfortunately it's not helping it
How tall is the area that shouldn't occlude the player?
Green part should be drawn over the farmer, red circles shouldn't
(Ignore the crow, its part of something else 😆 )
this seems like an ideal use case for DrawLayers hahah
crowpocolypse energy
Crow house
That's my problem, but its tiring to try do this for all buildings I have 😅
Yeah you will need at least one draw layer here no matter what but you can do it without splitting i think
The idea is to just draw the overhang again
And give building overall SortTileOffset 3
honestly it sounds far less tiresome than dividing all buildings into layered tiles
I'll go try it 
which, having looked at a map once, sounds abysmal
maps are pain. i say this having made a custom map
i could never.
It's easy once you get the hang of it 
I don't like how many jank there is i tmx
There's junk inside it?
Looks like SortTileOffset worked for this one 
racoon house energy
I tried it and it is work
@formal crown by doing this u don't have to slice up the building png
Thank you Chu! 
Main change is the SortTileOffset and switching from drawing a bg layer for the sides to drawing a normal SortTileOffset 0 layer for the roof
Do tokenizable strings work in quickQuestions?
Context: I'm finally splitting the first part of the date out for the drinks and I want my options to be the drink names, so it'd be easier than having translators translate the item names in-mod. I'd be doing
quickQuestion What do you want to drink??#Item1#Item2#Item3(break)switchEvent <insert switches here>
and if it wasn't for me going the extra mile and wanting to make sure the farmer is "eating" the proper food, I probably wouldn't even need to switchEvent
(If there's a way to store a variable and then use it later in event, tell me that too, because that'd be simpler than what I'm about to do)
(Thankfully because most of the code is the same, I'm i18ning then dynamic tokening so my event code looks a lot cleaner)
As far as I know, with vanilla you can store number only (stat), for strings and such you may need BETAS.
got it, so switchevents it shall be
(The BETAS stuff isn't a part of the Island date specifically and I'm trying to make sure users can run with just Content Patcher if they prefer.)
what are the meaning of these symbols?
Um, @outer glacier
Is there a way to make it so when you click on tile it pulls up a text box asking if you want to visit X location, then there being two options of Yes or No. and then when you hot yes it warps you?
hii! i have this problem with my custom NPC and i wonder if anyone knows how to fix it?
how do i make it so that she avoids the debris instead?
where is she going in the forest?
i dont think there's a way for NPCs to avoid debris is there....in vanilla they'll just destroy fibre in their path afaik
like next to the big pond
yeah.. and apparently when they do that you lose friendship points?
i wonder how can i bypass this
where exactly?
i think all of here has debris spawning
i dont know for sure but the npcs dont usually walk here afaik
and not past the big tree toward the left
i wouldnt say ur mod is "very broken" 
like this area
then there's probably debris there?
usually i just let it be but i didnt know that them destroying the debris would lose friendship
you would have to choose a different area for them to g to
maybe the top of the lake? or by the river?
dangg really
im not 100% sure maybe theres something i dont know xd
someone else might know but that's the extent of my knowledge
its okay! ty anyways
i wonder if theres another mod that could help with the debris
this maybe?
Although that would be client-side i think
Would you mind using framework mods or just Content Patcher?
You could patch that one map area without all the debris...
then if someone is adding ur NPC mid-save, they would use RTF to clear the debris?
like the map itself using paths.png?
Yeah you would make a copy of that one area of the forest map, delete all the stuff on the paths layer
Also not sure if that’s the only thing that controls debris spawning
i think there was this one thingy with an X where the purpose is to not let anything grow on it i think
Is there a way to debug event preconditions?
so in my house file i should include her pathing out there with the rest of the forest and clear any spawning debris?
sorry i dont know what you mean
" include her pathing out there with the rest of the forest" this part
Run Event Tester's check precondition command?
I didn't realize it had that
But actually I figured out the issue and now I'm a little annoyed
either with myself for not reading or with the game for a regression
For those who know: What is the updated version of the O precondition?
Because it isn't Spouse
like for her house map file, i only included her house
so should i include the rest of the forest, where the spawnable debris are included, so that it wont be there once i remove the paths.png tile
am i making sense ...
If it has to be GameStateQuery PLAYER_NPC_RELATIONSHIP Current {{Date}} Married, I can deal, but my swap from O to Spouse resulted in the dates not firing
(Because, of course, I'm poly married and Maddie was not the main spouse. Sometimes my talent for running into bugs finds a whopper)
uhhh like you want to put the forest part in your house map file?
no dont do that
it would be a separate map file
you would make a duplicate of the Forest map file in the game's files
and then delete all the debris on there
and then patch that
i can help more later but i gotta go study rn 
Is it possible to add a new interactive TV only with Content Patcher?
Okay, yeah, so thanks to the wiki having the docs as is... I would very much not normally do this but at the least I need clarification
@ivory plume What's the difference between the old logic for the precondition O and the new logic for the precondition Spouse? The wiki notes they're supposed to be interchangeable, but the old precondition checks if the player is married to the NPC, whereas the new precondition checks if the NPC is the player's spouse
how to get players some kind of fish catched count?
This breaks things like poly mods where O is actually preferable because the player may be married to someone else, and I know you're going for people using the new preconditions
They're the same thing; the short form is just an alias.
[OtherNames("O")]
public static bool Spouse(GameLocation location, string eventId, string[] args)
That... if I have a current version of the mod that shows that's not the case when multi-married (e.g. when multiple NPCs are "married"), can I send that as a repro pack?
Because that's definitely not what's happening 
although... perhaps the problem lies in the poly mod
Let me recheck for certain precondition checks
i need to get this data to do something,but i dont know the code,c# or cp is all ok
Okay, found it. I see what happened, it's on poly mod end. Thank you Pathos, apologies for the ping
No worries!
Currently you'd need C# for that. Game1.player.fishCaught is a dictionary indexed by qualified fish ID, where each value is an array containing (0) the number caught and (1) the max size caught.
For example, to get how many pufferfish the current player caught:
int pufferfishCaught = Game1.player.fishCaught.GetValueOrDefault("(O)128")?.[0] ?? 0;
Or to get a total of fish caught:
int fishCaught = Game1.player.fishCaught.Sum(p => p.Value[0]);
oh thanks,it just what i need!
Looks like it's a common issue on all poly mods (Aeden/Ender/Apryll). the relevant code for each of them, using Free Love (the original) as the example:
public static void GameLocation_checkEventPrecondition_Prefix(ref string precondition)
{
try
{
###(removed some for length)
for (int i = 1; i < split.Length; i++)
{
if (split[i].Length == 0)
continue;
if (split[i][0] == 'O')
{
string name = split[i].Substring(2);
if (Game1.player.spouse != name && spouses.ContainsKey(name))
{
Monitor.Log($"Got unofficial spouse requirement for event: {name}, switching event condition to isSpouse O");
split[i] = $"o {name}";
}
}
else if (split[i][0] == 'o')
{
string name = split[i].Substring(2);
if (Game1.player.spouse != name && spouses.ContainsKey(name))
{
Monitor.Log($"Got unofficial spouse barrier to event: {name}, switching event condition to notSpouse o");
split[i] = $"O {name}";
}
}
}
precondition = string.Join("/", split);
}
So long as all three utilize that I can't update from "O" to maintain compatibility, but that's what I'd have to report to all three
It would be much more efficient and simpler to patch Preconditions.Spouse instead.
I genuinely have no idea how to fix this divide by zero error
I don't even know how to identify what tile in what tilesheet is breaking it
Is this a map error?
If it started happening at some point, you can try going through the changes since that point to find the issue
If it’s part of a specific mod, you can try removing mods to figure out which one and then adding/removing bits of the mod to figure out which part is causing it
You might recommend that the player download Non-destructive NPCs. Any NPC that runs into spawned items (forage, debris, etc) will have a grumbling speech bubble (though I don't know if this currently results in loss of friendship or not). If they want to avoid that, Non-Destructive NPCs is their best bet. It doesn't mean your mod is broken; it sounds like it's working according to standard vanilla logic.
@sturdy charm Link to the current version of Non-Destructive NPCs above.
It's me trying to edit the Forest.tmx map through Tiled
It only happens in a certain area of the map
@bleak spade If you'll send me the map you're working on, I can take a quick look at it
you don't lose friendship, the character just does the angry emote
and yes, it's a vanilla thing, characters walking over weeds in their path
How do I send it to you? @twilit quest
if you really want to "fix" it on your end (instead of telling your users to download RTF/Non Destructive NPC/etc.) there's BETAS' clear debris trigger action
but tbh I wouldn't bother
oh so it doesnt acctually make you lose friendshp?
How do I make an iteractable tree in tiled? So that it can be shook
nope
(for code divers the relevant code is Character.MovePosition)
How do I make the numbers show up in tiled?
Zip it up and DM it
whats that code?
the game's own C# code
Whatever you're attempting to load that's giving you the error, zip that up, DM it to me, and I'll take a look
hi everyone, long time lurker here with a question. i recently got into stardew modding and am attempting to make my first mod. at this point i am just attempting to put the objects into the game, but i can not for the life of me figure out how to get my textures to work. i keep getting errors that say the asset i'm trying to use does not exist and i can't figure out why
this is what my content.json file looks like currently, and my assets folder
your texture doesn’t need the double backslashes
just copy paste the target you loaded it to into the texture
let me try that, thank you!
er i dont think you can, just count it yourself
that worked! thank you so much!!
Pusheen 
yesss i love pusheens and i was inspired by the jojapop labubu mod to make my own blind box mod
very new to all this but i'm excited to be trying it
I thought airyn’s labubus might have been the inspo 
the texture was wrong and it was fixed bc copy-pasting the texture made them match
however if the target had not been wrong, those double slashes are needed
I have 1 pusheen item and I got it for 15 dollars at hot topic I remember I felt it was a bad purchase bc it was overpriced but that’s okay….pusheen
if you use any backslash at all inside a string, it must be a double backslash in order to escape it
oh that’s my bad!
i see, good to know thank you!
SMAPI will also normalize asset names to match regardless of slash type, so Mods/MyAsset is the same as Mods\\MyAsset anyway, so you usually dont need to
but its important to know for things like furniture where you have to use a backslash
yeah i was aware of needing it for like events and stuff where backslashes do matter, good to know that it’s actually SMAPI handling that
(Note that it's better to always use / instead of \\ when possible, to avoid the extra string manipulation and allocation to normalize it.)
Hi Pathos! Just a question, is it possible to loop a song in an event? Say grandpas_theme. Thank you!
I'm not familiar off-hand with how events handle music looping; that might be a question for event modders.
Thank you, Pathos 
If you're still here, Pathos, I've been wondering one thing for a while: Has anyone ever called you Pat?
wait, pathos child - pat ch - patch -- it's been a conspiracy all along, guys
pathos IS content patcher
then....what are you doing when you type patch reload....force reboot of pathos?!
Legends say Pathos reads these conspiracies with a SCAMPI on the side 
Well he is Cat rn
-# pathos left the chat to avoid answering the important questions. your silence is deafening 
Hi! After I added a custom buff, I started getting this error:
ContentPatcher Can't apply image patch "Earthy Interface > EditImage TileSheets/BuffsIcons" to TileSheets/BuffsIcons: target area (X:0, Y:0, Width:192, Height:64) extends past the right edge of the image (Width:160), which isn't allowed. Patches can only extend the tilesheet downwards.
Did I mess something up?
You're the best chu
another question, i decided to turn my assets into sprite sheets to make the process a bit easier, do i need padding in between sprites? and if so how much?
If they are item sprites then you need em in 16x16 boxes no padding
Whether your item use the entire box is your business
theyre items and the images themselves are 16x16 yeah, ok thank you!
Hii, I need some help replacing Jas's avatar and portrait to a custom one I made, i think its the json files but im not sure
I was trying to follow a tutorial but I think i messed up on certain areas
Hey, it's not my mod, but does this seem like the kind of issue that could be resolved by rebuilding from source?
Do you have the source
It's available on his github under MIT
Okay no, rebuilding doesn't help at all. Time to learn how harmony works, i guess
Basically it's getting multiple overloads for a method it's trying to patch
You just need to update the bit of reflection
Thanks, that was simple enough. Just needed to specifiy the parameters for the wrapped overload to disambiguate
when adding ClickableComponent to IClickableMenu, does anyone know if the component coordinates should be relative to the parent menu, or relative to the whole viewport?
hello is there a way to make seasonal sleeve ?
It legitimately does not matter when you have to manually handle draw and input
for farmer ?
nevermind, I was looking at the wrong input
How does the water need to be animated in Tiled to match the base game water?
The animated water is drawn separately
You just need to make sure the tiles have the correct tile properties to get the overlay
For the “sloshing” animation, this is purely at the edges of the water
And corresponds to animations on the edge tiles of the edge of the water
You can see the water overlay sprite in Cursors (under LooseSprites)
Thanks for an answer, but would you be able to dumb it down a bit?
I think you should take a look at vanilla outdoor maps
It should illustrate what is going on with water
I have looked, I don’t know how to make it look like that in Tiled. And yea I do know how to animate the tiles
The in-game water overlay is drawn in the game, not in Tiled
Oh
The instructions above tell you what to set in Tiled so the game knows to draw it
The problem is I don’t understand the instructions, which is why I asked them to dumb it down
https://www.nexusmods.com/stardewvalley/mods/18655 this Mod changed the sleeves of farmer but pick them by config option. And I guess you may change the system as seasonal output.
thank youuuuu
There is a tile property named Water that needs to be set on your Back layer if it is not already saved to that tilesheet file itself like in the vanilla tilesets
Is that it? And how do I apply the same tile property to multiple tiles at once
i know that npc can change outfit seasonally, same with building but could we make the body or more the clothe seasonal that the question ?🤔
change the name of the image file you load and use {{season}} token. this case, changing farmer_base.png's arm section.
i tried this for example :
"Action": "EditImage",
"PatchMode": "Replace",
"Target": "Characters/Farmer/farmer_girl_base, Characters/Farmer/farmer_girl_base_bald, Characters/Farmer/farmer_girl_mannequin, Characters/Farmer/farmer_girl_mannequin_cursed",
"FromFile": "assets/Sleeve/{{season}}_Sleeve.png",
"FromArea": {"X": 96, "Y": 0, "Width": 192, "Height": 672},
"ToArea": {"X": 96, "Y": 0, "Width": 192, "Height": 672},
"When": {
"Sleeve" : false,
"Seasonal Sleeves" : true
Go to your Back object later (the pink shape one), create an object with the name TileData (or alternatively, open a vanilla map and copy/paste an existing TileData object to the Back layer on your map and remove it's tile properties), and add a new property with the Water as the field and T as the value.
You might be able to get away with a different value but I know T works as intended, and I makes it not render the overlay
I'm not sure about your When flags, but guess it works without those conditions.
So property should be water, and the thing next to it T?
Okay i'll try
yep, like this
Is the animation supposed to load in tiled, or just in game?
just in game
some animations are made in Tiled itself, but the water effects are something Stardew does
the image updated when day begin(without specific order), so cheated season change don't show new image by default
okay
Okay, thanks a lot!
Im fighting my way through yet another mods source right now, and I replaced some hardcoded assembly references inside the .csproj files with the reference to Pathoschild.Stardew.ModBuildConfig, but because two of those aren't actually mods and don't contain a manifest.json file the build for these libraries fails: [mod build package] The mod's manifest.json file doesn't exist.
Is there a way I can use that package to reference the correct assemblies without it expecting to build a mod, but just a library for multiple mods?
Nevermind, as usual I assumed it would be a niche thing with no documented workaround, when all I needed to do was tell the package not to zip or deploy the mod:
<PropertyGroup>
<EnableModDeploy>false</EnableModDeploy>
<EnableModZip>false</EnableModZip>
</PropertyGroup>
anyone has experience with event code?
i see on wiki: shake <actor> <duration>, but we cant actually use this to shake farmer. is there a way to shake farmer too?
yep, you'll want to use startJittering and stopJittering 
@brave fable just saw u asked about this 10/23/24, 3:46 PM!! 😄 thanks!!
i'm working to end generational shake farmer trauma 😌
Has anyone had trouble/experience assigning their custom NPC to a door in a Custom Location? I’ve done the [Buildings Action: Door NPCname] in Tiled and it works for all other characters aside from my NPC 😭
just to be sure:
- your tile action is simply
ActionDoor NPCName, without includingBuildingsin the action? - your tile action, when selected, has its
X,Y,Width,Heightvalues all as whole-number multiples of 16 (ie. aligned with the grid)? - your door placeholder tile is on the
Buildingslayer? - your
NPCNamevalue is your full NPC internal name, including mod ID as-is (eg.blueberry.MyMod.MyCoolNpc?
(assuming your NPC's name includes your mod ID, which it absolutely should)
How do I make a map for my custom area?
[[Modding:Maps]]
I was playing with the date night mod with the suggestive endings turned on. Do note that I'm playing with a portrait mod, so as the event progressed and the suggestive part played out, my spouse suddenly reverted back to his original portrait. The mod adds new expressions and such so I did draw new portraits to fit the portrait mod I had, but it still keeps showing the original portrait of my spouse. Any way to fix this?
Ugh thank you so much!! It worked! Apparently Tiled doesn’t like {{ModId}} and prefers the full NPC internal name
oh yeah you can't use content patcher tokens in Tiled
Lessons learned 😅🙃
is it possible to change a furniture's source rect permantly in code? when I do it, it resets after I move the furniture or place it, so I'm nedding to update it every frame
Can't use any CP tokens in Tiled at all, if you want to do that, you have to do it through the code instead
Which part is it in?
that page covers mapping the location, to load the tmx into the game peruse the following
[[Modding:Location_data]]
why can't it be transformed into a new item?
the default source rectangle is read from the Data/Furniture asset each frame, so the simplest method would be to update the data rather than the instance
this would affect all instances, though
what's your goal?
I'm changing how the game calculates the source rect for rotations, it works fine, but when I move/place the furniture the source rect updates back to the normal one
edit: basically I want to change the source rect of an instance only once (or only when some action with it occurs, not every frame)
[[Modding:Dialogue]]
you'll find them all if you search for $ 
how are you doing so? I assumed a patch to updateRotation would just work™
I was trying it without harmony patching, since I guessed the source rect only updated when rotating the object, but I think just changing the function is the correct idea
yeah, sometimes harmony is the cleaner solution
you can maybe do it on farmer inventory changed + furniture added to location, but eh
ok thanks I'll try that, I was kinda scared of doing harmony by reading the wiki
ive looked at a bunch of event making guides but none of them are telling me where exactly i should put the code? 😭 like do i put it in an existing file like content.json or do i make a new json
it's up to you
you can put your entire mod in content.json if it's still readable and maintainable, or you can use Include actions to separate it into smaller, more manageable files
ooh okay so there's nowhere specific i need to put it
yep, CP just reads as many Changes entries {} as you've added across your content.json and included files
one thing that does matter is the order they're added in though, since CP parses them top-to-bottom, so earlier edits can be overridden by later ones if targeting the same asset (with the same (or later) priority)
when targeting entirely different assets the order doesn't matter, of course
not exactly, but they all follow the same order -- row-by-row, top-to-bottom, starting from $0 -- so the first portrait is $0, right of that is $1, then $2, ...
is there a way to move farmer in increments in cutscenes? -3 looks like this, but -2 makes them sit too far forward, on the ground. i just want them to be sitting on the chair (aside from that everything works!)
or am i maybe using the wrong sit animation
Which is in pixels not tiled
I've been having to do that for DNR
let me grab a quiiiiiick example that I just recently did
Do not resuscitate?
thats with "move"
could you use doAction to sit on the bench 
faceDirection farmer 0/pause 300/positionOffset {{Date}} -10 -0/pause 250/playSound dwop/pause 200/speak {{Date}} \"%[CharacterName {{Date}}] leans their head against your shoulder.#$b#Can we stay here for a while, @? I just want to watch the sunset with you.$l\"/pause 200/emote farmer 20/pause 200/positionOffset farmer 10 0/playSound dwop/pause 200/globalFade/
Date Night Redux XD
Sorry, bluebs, my right click action is vest knitting
i'll try that!
for you, to move them down, it'd be...
positionOffset farmer 0 10/
obviously, you can try any number from 0-16 (or even higher)
Keep in mind once you position offset
But down increases Y coord
You need to warp them back on the grid to successfully use move
they don't move after that so i should be good
I am suddenly so incredibly glad I don't have my characters move after position offset
Knitting a vest sounds more enjoyable than troubleshooting advancedMove XD
i'd prefer to avoid anything "advanced" for making my first mod lol
Nah it's not bad and is the move controller that works better ngl
Managing movement in events is mostly a case of patience and a willingness to experiment ime
When you have the time and patience, advancedMove is your ally
When you don't or you end up in one of those advancedMoves where your character decides "fuck this shit I'm out".... it can be hair-pullingly infuriating
I've used advancedMoves in events - my Pika's dates in my Personal version of Date Night uses it
😔 once made my farmer walk off the map, softlocked the whole event, had to start over
advancedMove my beloved
anyone know what the dimensions are for shirts and hats?
only once??
but when I made the Island date I was like "yeah I can't deal with this too much right now"
ive only bothered actually making One singular event 
shirts are 8x32 (4 frames above one-another, front-right-left-back)
"Hhhhrrgghhh....#$b#%Cauthen fell asleep during the movie."
i accidentally did this earlier too 😭 made me giggle though
in a dialogue string, # is the delimiter between entries. $b and $e are commands and must begin an entry, so they must follow a # character, and neither of them takes any parameters so you just end the entry immediately with another #
this makes it look like the break command is #$b#, but really it's $b on its own between two other entries
🪙 b 🤝 d 🪙
cribbles..
for texture editing
yes, the { character is how $b actually works (it appends that character to the end of the previous string).
the dialogue display code checks for that character to do the box breaking
i'd open hats and tell you but ps is having a moment since i've sliced cursors into about 2000 chunks
hats are Weird
Each hat in the texture should have a 20x80 pixel area, consisting of four 20x20 hat sprites from top to bottom: facing down, right, left, and up. The texture can have any width and height that's evenly divisible by 20 and 80 respectively.

it looks like you might be misusing $1? are you trying to get dialogue to display only once and then be replaced with a different dialogue when that key is selected again?
okay then you probably want
"Hhhhrrgghhh....$1#$b#%Cauthen fell asleep during the movie.",
(portrait selections must come at the end of a dialogue entry)
a mouse told me to tell you that hats are Good, Actually and you should buy some
shirts are perfectly normal so long as you don't think about sleeves or the spritesheet size

which reminds me i lied about the spritesheet size, it needs to be 256 wide even if your shirt is only 8px wide
Sleeves aren’t real and they can’t hurt me
Particularly not the 3 random slingshot frames
h
the game expects that if your shirt's dyeable that there's a greyscale copy of the shirt at 128+x, y in the spritesheet, where x y are the values of the regular shirt sprite
I'm making a reskin for the fishing vest/hat, just a lil color change to suit me better
otherwise you get weird sprite clamping artefacts on your shirt when worn, even if the shirt isn't dyeable
I love putting myself through agony and torture for the sake of reskins
ah in that case don't worry about it, you can just use the dimensions of the shirt and patch the region in the original spritesheet
only new shirts need worry about this
just gotta figure out the dimensions for where it needs to go
you can open up shirts.png in Paint or anything similar and hover your cursor over the top-left pixel for the shirt and you'll get the X Y values
width and height are of course 8 and 32
y
(Nowhere else in the game are they 8 and 24, of course)
Because this happened to be the size CA felt was best for shirts
Presumably
Like it does fit perfectly onto the farmer body
And it doesn’t “waste” extra spritesheet space
Based on some of the tilesheets in the maps I suspect CA used some kind of tool to help pack tilesheets
Idk for sure though it could be like just xnb works or something
oh yeah i have the stupid it's 32
i even wrote out that there's a distinct left frame and not just flipped-right
knew i should've gone for 4-unit maths 
(Can't use the math brain. The math brain is this:
Tbh i think the nth grade physics joke has gotten stale but I'm also too tired to come up with something new
So probably I'll go back to being atraknits
random question - has anyone seen events where multiple NPCs talk one after the other? how do you avoid having to click mouse twice between their lines? (1 click removes text windowof NPC, 1 click to open the window of the other NPC). id like to click once and move on to the line of the 2nd NPC.
we're so back
i've never experienced having to click a second time to open a new dialogue box in an event
sorry i meant that clicking once will immediately open the second dialog box, instead of having the 1st one close
(or is this not possible?)
ah, i see. no, you can't switch speakers in the same dialogue box. you have to watch the close and open animations (and wait a mandatory 500 ms)
(anything is possible with determined application of C#, so it could be done. but i don't know of any implementations)
got it, thanks ichortower!
So, I have an odd question- I'm super new to modding, and am trying to tweak an existing custom NPC mod to include indoor/outdoor outfits. Is that breaking some kind of taboo if I'm editing their code for personal use? I don't want to be asking for help if it's considered rude to be editing other folks' code like this
yeah definitely not uploading it! 😅
(There are some taboo that would make people a lot less inclined to help, even for personal editing, but just indoor/outdoor outfit editing is fine.)
Oh yeah not trying to do anything that's like, messing with the characters in any way or anything untoward, just want them to have indoor/outdoor outfits to fit with the other NPCs lol
I know that Content Patcher doesn't recognize if a character is indoors or outdoors by default, so I tried a dynamic token, but it doesn't seem to be working at all. SMAPI keeps telling me it's not valid JSON
!json
The simplest way is to do the Appearance system, but this also depends on how the original NPC is setup. What's the NPC?
JSON is a standard format for machine-readable text files that's used by Stardew Valley mods.
If you need help with a JSON file, you can upload it to smapi.io/json to see automatic validation and share the link here.
When making mods, it's recommended to edit your files in a text editor with JSON support, such as VS Code, Notepad++, or Sublime Text. These programs will check for syntax errors.
I added this in:
//Checks whether the character is inside or outside, for winter outfits.
{
"Name": "IndoorVariant",
"Value": "Indoor",
"When": {
"IsOutdoors": "false",
}
},
{
"Name": "IndoorVariant",
"Value": "Outdoor",
"When": {
"IsOutdoors": "true",
}
},
],```
and then edited the sprites section to include that value:
``` {
"LogName": "winter sprites",
"Action": "EditImage",
"Target": "Characters/Juliet, Portraits/Juliet",
"FromFile": "assets/{{Target}}/Juliet_winter.png",
"When": {
"Season": "winter"
}
},
{
"LogName": "winter indoor sprites",
"Action": "EditImage",
"Target": "Characters/Juliet, Portraits/Juliet",
"FromFile": "assets/{{Target}}/Juliet_winter_indoor.png",
"When": {
"Season": "winter"
"IsOutDoors": "false"
}
},```
But I'm very new to this so this is mostly me examining other mods that do the same and trying to copy what they do haha
(Also yeah, please do what Vinilla/the Governor said for json sharing.)
Juliet & Jessie the Joja clerks!
(i really thought you meant vinilla is the governor for a second
)
(There's no proof otherwise.)
I sure do love making mods!
you've not put a comma after line 224
even if the original NPC isn't using the Appearance system, for indoor/outdoor outfits i recommend using it over trying to get Content Patcher's tokens to do so
- You need a comma after line 224, like Button said.
- You need an
"Update": "OnLocationChange",on that Action because otherwise the patch would only check the condition when you wake up. - Also recommend what ichortower said, instead of doing OnLocationChange
hey guys, im in over my head here lmao
i want to expand https://www.nexusmods.com/stardewvalley/mods/35694?tab=description to more villagers but they have it hardcoded to vanilla only, how would i go about adding them? (sve ridgeside and east scarp)
all for my personal game of course
its a C# mod, so you cant if you dont know how to get the source and recompile it with your changed edits
which will require C# code
fun, yeah
tbh I would just rewrite this to actually read game data instead of hardcoding every villager
theres also no source available so it'd be a decompile, which is a bit messier to work with
I see, thanks for the help guys! (can't believe I missed the comma...) I got the code to parse, but it turns out dynamic tokens aren't allowed on secondary files lol, so yeah that's probably not the best way for me to go about this 😅
Is there somewhere I can read up on the appearance system? I've not heard of that before
i mean im a neet atm (medical leave) so no better time to start learning coding lol
incredible
oh nice, there's the source
A
but yeeeaaa
even if you expanded this list the same way they did, it'll be completely busted as soon as you have any other mod that changes an NPCs gift tastes
wonder why he chose to do it this way 
ohh that makes sense
hmm
The way you set up your patch, you wouldn't actually need Dynamic Tokens, anyway, so you can just erase those. As for Appearance system... wait...
i mean i wont be changing my list anytime soon, let alone gift taste mods
famous last words from a skyrim modder
i mean changing gift tastes is incredibly common even in mods that are not just a "gift taste mod"
yeah, very true
such as sve, ridgeside, and east scarp
If you want to add seasonal outfits for your NPC, there's two ways you can do this: the token way or the Appearances way. Appearances is a new code structure added in SDV 1.6, so if you're looking at an older NPC's code for reference, they'll most likely be using the token way. The main difference between the two is that the token way is simpler...
the three mods i want to add to it lol
i thought it would be a good semi learning take things apart and add things to code to learn how but maybe this is too big of a mod to try haha
bc theyve committed their entire bin/Debug folder
I guess you're gonna have to decide which is quicker - manually fill in every single modded SVE/Ridgeside/ES NPC and the items they add, of which there are dozens, or learn how to programmatically do things so it works once with every NPC forever
which would be quicker in your expertise(s)?
well I like to think I'm an expert and I've been doing this for months, so the latter. But I can't speak for your own skill level 
i think u should do what feels fun 
oh my god deleted those and it works now! I'm not sure why because I thought Content Patcher doesn't recognize "isoutdoors" as a valid token? 🤔
i am level 0 i havent touched c# ever
But seriously thanks for the help lol
manually filling them in would definitely be quicker if you're starting from 0 coding knowledge
however, every moment of it will kinda usck
maybe learning C# will be fun too who knows
suck*
thing is idk how to even start tweaking it manually haah
like how to make it hook into the mods
if thats the right word
you dont, if you're doing it the same way they did
theirs literally does not hook into any mods or even hook into the vanilla game
they filled it out by hand
yes, you'd likely use Lookup Anything for that
then after that all i have to do is figure out how to save it as a dll right?
correct, you will need to compile it still
(if you have lookup anything, what is this other mod doing for you?)
i dont have it lol
modded item is doom nvm I misread nvm I did not misread
well you dont HAVE to use Lookup Anything
i just thought itd be easiest
and just assumed everyone had it
otherwise you have to find where each mod has its gift taste patches stored
and learn how to parse gift taste data
...ohhh, did more reading in the link. "isoutdoors" is part of the appearance system. So I didn't need dynamic tokens, the game recognizes them all on its own now
thanks for all the help, folks!
Hey, can you use a custom Player Stat in the "When" part for editing data in Content Patcher?
IsOutdoors is also a content patcher token
ill use it to look up the items yeah lol
oh! I thought it wasn't. I might've found outdated advice when googling this lol
dont google and instead go to the content patcher docs
esca modding plugin provides the token i think
...ah. Yeah this might've been outdated advice lol
oof
so to start it manually i can just copy paste the .cs into vscode and go from there?
and do i need to do anything else for it to work
or just edit the npc one
yeah, this mod works great for an otherwise totally vanilla game, but imo I'd just use UI Info Suite 2 + Lookup Anything
i am
at the part above this where it is checking whether the item uses springobjects or Objects_2 (the only two possibilities, as anyone knows)
it's weird, like they are reading object data lol
i like having the alerts, its more streamlined for me
those mods can get kinda overwhelming to look at lol
consider me baffled. i do not understand the decisions this mod made
with the effort you're going to be put into making this mod work with modded NPCs/items you may as well reach out to the creator for a pull request
no idea what that even is
this is beyond "personal modification" territory
is that the github thing where they send over the whole code
a pull request means "i have made changes to your code, would you like to incorporate them into your repository for me?"
I mean u can make personal edits and just use it
if even modders are baffled at the choices made here i have no chance
we're not baffled by how to like, edit it
But it's like, easier to rewrite the mod wholesale now
just baffled at why its constructed the way it is
Probably fits under 200 loc
yeah my point is a personal edit is fine, but the effort is that you should also send it to the creator if you get it working
the way it's currently made is more difficult to write and also less functional
yeah, but thats differnt from us not understanding how we'd edit it
that is what i would call "baffled at why its constructed the way it is"
fwiw i've just about got it working
interestingly there's no manifest.json or modbuild package reference either
yeah button, exactly. just adding more... context? phrasing?
I hate to butt in? but my tokens to make a dynamic season override for my locatio isnt working
have you a json to share
yeah one sec im typing slowly today i just put on false nails
https://smapi.io/json/none/93d9b45907dc4b0f89b4e187c2e6003a
location context is here
content json
wait
i see
cant have season as theres a global token
(i didnt realize you were the one that added the point up reaction and thought it was a response in the contrary, my bad)
it works!!!!!!!
np, all good 
i could skip the modded items and just add the npcs
now time for weather
they all like vanilla items anyway lol
just to double check the only thing i need to edit is the npc data provider file?
yes, that file, you'll need to insert entries corresponding to the modded NPCs (their IDs will likely have more stuff in them, not just their names)
pls dont im working on it lol
perfect, thats what i came to ask help for, how do i add them so the mod reads their schedule? and the mods in general
weather works now too
if I'm reading it right yes
oh thank god
beet borger
oh wait i cant even mess around since idk how to recompile it into dll
lol
i wanted to just mess around with added npcs
why do u need C# for NPC modding?
they're editing a C# mod
ah icic
ugh, stupid csc.exe window just flashng then going away
wait nvm
nvm the nvm i cant compile it
i suppose it's on the author whether he wants to merge it or not, but if it looks good and goes through then someone else might want to submit a PR to cover i18n and schedule parsing
could you send it here or would that be distributing?
it's probably best we wait and see if the author wants it at all
you can pull it and build it yourself
the mod's only been out for a week or two
patience
how do i do that
i also need to do that for another mod to fix smapi yelling apparently
clone the repo, open it with visual studio and build probably
if you don't know what github, visual studio or C# is it can/will be a learning experience
i'm sure i was doing something today
sniped again
yeah you can't do that hahah
in any case while the mod is licensed under GPL3.0, i'd still rather wait for the author to give the go-ahead and merge
and i'm sure you can too 🎂
after all, it's entirely possible they hardcoded everything to avoid having a popup every day for someone with a hundred modded NPCs, or to only show a handful of specific non-lategame non-secret loved items
this is such a waste of time for me
but
whats the .net you need to use c# on vscode?
you can use any but need to target net 6
i have it but it says i need a sdk
yep go install net 6 sdk
Starting to teach myself how to code and was wondering if anyone knows a good tutorial for adding a new building to the game
the mod has been out for 8 months
i do not look at curse. it does not exist 😌
will it have fancy behavior
aka are you looking to use C# or just content modding
the items are working! but theres no way to see when theres two birthdays at the same time
*the second character
yeah i figured that was out of scope of a simple de-hardcode fixup commit
the author builds a list of all npcs with birthdays, but only uses the first
are you sure
absolutely
suspicious
wow i cant believe youve never made a mod with a ui thing
no orange name. no play game. no shame 😌
anyone knows how to use the [continue] parameter of move properly?
id like for an NPC to walk left then up, all while something else is happening.
but when i do move NPC -10 0 3 true move NPC 0 5 0 true the second move is just ignored.
is there a way to do this? because i think advancedMove doesnt support such parameter either...
advancedMove works simultaneously in default
o i didnt know this! thanks!
i tried out another method that also works- u can seperate the "action chunks" with waitForAllStationary. seems to work for what i was looking for! ill try out advanced move tho~
advancedMove NPC false -10 0 3 1000 0 5/ as like
Need to stopAdvancedMoves when you want
github questoin
i only want to pull and build this mod, when i download the whole folder it shits
ah yeah you can't clone a single project, you have to pull the whole solution
is the error more detailed than it shits
im sorry that made me laugh
lmao its fine
uhh
vs code terminal is super overwhelming lemme see if i can try to read it
Invalid expression term '[' [C:\Users\glitt\Documents\Krobus\StardewValleyMods\KrobusSellsLargerStacks\KrobusSellsLargerStacks.csproj]
and
Syntax error; value expected [C:\Users\glitt\Documents\Krobus\StardewValleyMods\KrobusSellsLargerStacks\KrobusSellsLargerStacks.csproj]
huh
out of interest, are you actually able to build and debug these mods using VSCode? typically people use VSCommunity
i have no idea what vscommunity is
true true
this class is changed in 1.6.9
so you need to download a newer .net sdk to resolve this. i think 8.0?
it's taking issue with using return [ ... ]; here:
https://github.com/Annosz/StardewValleyModding/blob/master/StardewValleyMods/KrobusSellsLargerStacks/KrobusSellsLargerStacks.cs#L51-L62
which is a newer language feature
ilu
one more question
when i decompile a mod i have exported to vs but it doesnt open
using dotpeek
theres no github for this mod
i'm not sure i understand 
incidentally, ilspy is generally preferred over dotpeek, though it probably won't change whether or not you get usable output
c# and no. It's just going to be a shop to sell new cloths
Tis going to be a shop to sell new clothing
you don't need C# then
is the building a farm building or a location somewhere in the world
Location in town
!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.
[[modding:maps]]
you can do what you want with just a content patcher mod
and ofc u can load and edit the same data with C# if you want
Thanks
Which method's better?
I think CP is easier to do, if you aren't familiar with C#, and it's better to track down and bugfixing, too.
C# mod if you want to do magic trick, aka things that Content Patcher can't do normally.
even if you are in C# it's better to do stuff via content if you can
If you are not familiar with programming Content Patcher is so useful, I know programming but I found CP very powerful, its definetely easier
In general, when something can be done with content packs, don't bother with C#
Unless you really really want to do something that can't be done with C#, a content pack is the way to go 90% of the time
First time learning C# here, and I want to replicate Emily's Outfit Services at Desert Festival as event command.
I already unpacked the SDV game code I can't seem to find the code of it anywhere.
If anyone know how to do or guide me to it, it would be appreciated.
Also is it too hard of a project to add an event command like that as a first time learner?
You can check StardewValley.Locations.DesertFestival in the code
It took me some time to find it tbh haha
performTouchAction, GetMakeoverEvent, and ReceiveMakeOver seem to be the relevant bits
this specific event may be difficult to replicate without much C# familiarity, mostly given how much it does, but registering a new event command is relatively simple by itself
also check Makeoveroutfits.json in Data, i think its related to that specific event, but its mostly just the combinations
...ah, yeah, this has quite a few components 
do (non-mail) mail flags only trigger content patcher When statements with a day change? that's what im experiencing at least—event adds a mail flag (just replaces linus' sprites with a big red square for testing), but it only takes effect when reloading the mod with the smapi console or the next day.
When sections only update at the start of each day by default, though you can add warp and time-change updates if needed:
https://github.com/Pathoschild/StardewMods/blob/develop/ContentPatcher/docs/author-guide.md#update-rate
oh that should work perfectly, thank you. figures it just wasnt where i was looking in the github
(I still always assume it's in the token page)
is there a way to update it when I click on apply a config on another mod? I just moved a config of my mod on CP to C#, but it won't update automatically x.x
I'm not really familiar with cross-mod config stuff in general, but CP never updates conditions or token values outside of those specific events
in C# you can invalidate an asset whenever you want, but any CP-applied edits will still have the same results until the set update times, etc
Yeah I think I will just ask the person who downloads the mod to do the setup before creating a save :p
too much trouble for something that will probably be just changed once or twice
only took me 9 months to notice this problem with my docs
The
Esca.EMP_SaveLoadedtrigger happens when the player creates a new game or loads a save. Note that this does not happen when a save is first created or loaded
🤔
Is there a way to simulate tool use during the fishing minigame without harmony patching? Here's how the game's BobberBar update function determines whether or not the bar is supposed to go up or down:
buttonPressed = (Game1.oldMouseState.LeftButton == ButtonState.Pressed || Game1.isOneOfTheseKeysDown(Game1.oldKBState, Game1.options.useToolButton) || (Game1.options.gamepadControls && (Game1.oldPadState.IsButtonDown(Buttons.X) || Game1.oldPadState.IsButtonDown(Buttons.A))));
The harmony-based approach im aware of involves forcing isOneOfTheseKeysDown to return true for the specific arguments provided, but might it be possible to just set some button state?
Tbh i feel like doing a harmony transpiler on this block is easiest
You can possibly take over the InputState instance while menu is bobberbar
I did also find this: https://github.com/Pathoschild/SMAPI/issues/769
But accessing internal stuff like that seems janky
in a cream cheese 'churn' would it make more sense to have milk as the required item or vinegar? (so close to forgoing the vinegar to simulate real cream cheese making and just have it be milk)
don't let realism get in the way of fun
i'd say milk as the main ingredient since it can come in different flavours and qualities
sweet ty!
so... when does it happen 
on new game or load; I just accidentally copied that note from the TimeChanged event 
How do I make a change to a vanilla map for my mod?
Most likely you would make a EditMap patch with content patcher. Depending on the type of change you probably would need some map editing using Tiled to prepare the file as part of the process.
!mapmaking
If you want to make mods that add or edit maps:
-
Use Tiled to edit .tmx or .tbin files.
-
Refer to the Maps wiki page for details on how maps work in Stardew Valley.
-
Content Patcher allows you to create custom locations through editing Data/Locations
-
Vanilla Maps can be edited via Content Patcher as well: EditMap
[[Modding:Maps]]
Well there u go 
@whole raptor have you seen this? https://www.nexusmods.com/stardewvalley/mods/36067
Can we do something like this? "When": { "Merge: {{Roommate}}, {{Spouse}} |contains=Krobus": false, }
"aiming to", 😅 so does it actually succeed...?
who knows lmao
are you hoping to have compat with krobus being a spouse?
Is there a marry krobus
not that I'm aware of, which is why I ask
Krobus is just an example. Basically I'm just curious if I can check an NPC is not a Roomate and not a Spouse without using two lines of When entries or a Query.
ah, I see
Oh that's handy. Thanks!
Pet Clothes (I gave her a blue collar)
Hello everyone.
How do you generate SmallFont, SpriteFont's json. It kinda looks like .fnt format but in json. Is there easy way to generate this file?
blehh i dont want to write questions in my event 
hi, you'll be glad to know that i have no idea what program was ever used to build the spritefonts in the first place, and working with them is a miserable experience ☀️
the format exported by StardewXNBHack can't be repacked into an XNB with XNBCLI, so if you're working with the unpacked game files you'll need to convert them somehow
If a Dynamic Token has multiple values, you can fulfill a When by having just one of them, right?
as it happens, i do have a very rough spritefont XNBHack -> XNBCLI converter lying around, only some path changes needed
https://github.com/b-b-blueberry/InteractiveSchedule/blob/master/Work/spritefont_xnbhack_to_xnbcli.py
I think we actually did this one time for right-to-left experiments, I still have code like this, that I can't remember where it came from:
arabicMap = new Dictionary<string, Mapping>();
XmlReader xmlReader = XmlReader.Create(Path.Combine(Helper.DirectoryPath, "assets", "Arabic.fnt"));
while (xmlReader.Read())
{
if (xmlReader.Name.Equals("char") && (xmlReader.NodeType == XmlNodeType.Element))
{
arabicMap[xmlReader.GetAttribute("id")] = new Mapping()
{
x = int.Parse(xmlReader.GetAttribute("x")),
y = int.Parse(xmlReader.GetAttribute("y")),
width = int.Parse(xmlReader.GetAttribute("width")),
height = int.Parse(xmlReader.GetAttribute("height")),
xo = int.Parse(xmlReader.GetAttribute("xoffset")),
yo = int.Parse(xmlReader.GetAttribute("yoffset")),
xa = int.Parse(xmlReader.GetAttribute("xadvance")),
};
}
}
but you're better off seeing if you can simply load a TTF instead of repacking a spritefont:
https://www.nexusmods.com/stardewvalley/mods/12467
😔 oh boy i think i fucked something up real bad
Like if the Dynamic Token is { "Name": "MouseAppear", "Value": "Guild, Wizard", }, I can have a patch fire just by doing "When": {"MouseAppear": "Guild"}, ?
incidentally, if you're making an arabic script mod, i don't think it's even possible with a spritefont given the variations in the script
i think that's in the neighbourhood of reasons why we gave up
yeah there's a little more to it than just mirroring the text hahah
Log Info: SMAPI 4.1.10 with SDV 1.6.14 build 24317 on Microsoft Windows 11 Home, with 24 C# mods and 9 content packs.
Suggested fixes: One or more mods are out of date, consider updating them, SMAPI is out of date, consider updating it
for the record i have absolutely no idea what this error means
how did you get 4 as a layer id 
I dont know

this is the list of layers i have
i dont know what it wants from me 
my soul??
oh
nvm
i figured it out
all my fault
it's your DayTiles haha
its the map making
True! Map making is fun but also heavily cursed
i mean you wrote the map property. you're the one who cursed it

first it was me managing to shift the entire objects layer by one tile rendering every tile data useless
then it was me misspelling a map several times
now this
I can’t open the map though, just the tileset
Are you using tiled?
Yes
You should be able to open it easily then 🤔 have you tried opening it from tiled menu
Adding a menu for Slimed Pipers to keep track of their Slime minions. Looking for UI/UX suggestions to make it look as natural as possible..
not attached to it, but just slapping some vanilla bgs behind it ended up looking worse I think
Also that side of screen is where s&s puts the adventure bar if that matters
i've added the option to snap to different edges
I was thinking the draw box method for the generic vanilla bg yea
you could use a dummy buff icon sprite as a background, but on the other hand having the icons/hp bars separate to the actual slimes means if there's a bunch of slimes onscreen you might not actually know which ones are yours?
yeah, the portraits are only for your "pet" slimes
I tried the buff bg too
but since the portrait cuts off abruptly, it always looks weird
but can there be other enemy slimes in the same area
yes
i think blueberry makes a good point and i would consider attaching the hp bars to the slimes themselves
Hm what if u use that slime emoji
thats what Im using
yeah that's the one you see in the pic
Ok i am hallucinate then 
The issue with having it on the slime is like
Ppl might be using the various enemy health bar mod
mockup:
I guess I can add also as an option moving the health bars to the slimes themselves instead of the hud
or totally disabled
counterpoint: with many enemy slimes and your own slimes, it will already be difficult enough to parse what's going on and more, potentially different health bars isn't going to make it appreciably worse
if you just want to show which slimes are enthralled you could just pop some tas vfx on them. love of cooking does it with the lasagna slow aura
it's not just that
you can click the hud to dismiss and re-summon slimes
and when they die it shows you the respawn timer / cooldown
also hovering over it shows their stats
thats a cool effect though
I think I definitely need something like that too..
Maybe they get a green heart
if you can only have a small number of slimes at a time you could give them colour-coded health bars to the ui and model
yeah a little antenna on top would be very style-fitting
I like that idea
Lasagna slow aura....
Is this part of wol or new mod 
it's part of wol
lasagna fatness aura only works on enemies with 2 or more legs. which is a bug, but i'm running with it
on a different note, I'm also looking for ideas for ways to highlight stones in the mines
like with an aura or outline
for the prospector hunt minigame
you could do it terraria-style and redraw the sprite over the top after renderedworld/alwaysfront, with a colour overlay of red*0.5
outlines are trickier since you'd need to draw below the sprite at a higher scale
and it's always easier to draw above than below
thought you might like to know the birthday reminder mod is updated for custom characters and items on the nexus 🥳
drawing above might actually be tricky depending on whether or not your spritebatch is affected by lighting, terraria's setup ignores lighting
Maybe it's time for that pulse setting in TAS
eh, just do color.red * (1 + 0.5 * math.sin(game1.currentgametime.totalgametime.totalmilliseconds / 500))
you're probably just redrawing the object sprite rather than making a tas out of it anyway since who wants to manage the lifespan of those things
hello all. i have a question: which size can a farm map have?
unless you make them pulsing ghost things like the lasagna fatness swirls
anything up to about 180x180 is fine, but 100x100 is as big as the entire town already
ooofff.... hohoho
no more than 200 wide for sure (Breaks Layers)
Blueberry beat me to it
only the most gorilla-giganticus farm maps go above 100x100
uh.... hahahaha
uhhh the farmhouse is out of my wheelhouse hahah
Also any size as long as it's not bigger than 200, I've made a farmhouse that 200 x 200 and it works
(The farmhouse was only cause I was bored and it's not actually viable in a proper playthorugh)
wow! then i could use the castle which i made with another programm XD
although.... that one had tiles 48x48 size XD
whats TAS?
TemporaryAnimatedSprite
I think actually the problem you would run into is less related to like, the technical limits but the gameplay limits.
Big map means you take a long time getting from point A to B, so unless you have speed boosts or something dont expect to get anywhere very fast
Okay so, I've figured out what's causing my Divide By Zero error. It's a conflict between my custom map and the Way Back Pelican Town mod but idk how to fix it
Does anyone know how I figure out a way around it?
Tool Assisted Speedrun
(It's 100% what Tedi said)
Uh, divide by zero?
anybody know which draw overload is used for stones in the world?
I get the error "An error occurred in the game's draw loop: DivideByZeroException: Attempted to divide by zero." when I go into a certain area of the map
I've been trying to fix it for days
I've narrowed it down to a conflict with a particular mod but idk how to fix it
🤔 does it only happen when you try and use way back and your map together?
Yes
Huh
What's weird is that I made a custom map to replace the town square the exact same way and it worked fine
Snd like, what area of the map is it occuring in 🤔 could you send like a picture, or something...
so you can go to that area on the map and take a picture when Way Back isn't installed, but installed it explodes?
Okay so I wanted to redesign my town and forest areas of the vanilla game. I copied SVE and Way Back tilesheets into a custom mods assets folder (this is for personal use only) so that I could have the mix of redesigned sprites. For the Town.tmx map it worked fine and even changes with the seasons but now I'm redesigning Forest.tmx and whenever I walk down to the hat shop building the game crashes due to a divide by zero error
The outdoors tilesheet, then
assuming this isn't a case of "missing vanilla 1.6 tilesheets"
Log Info: SMAPI 4.3.2 with SDV 1.6.15 build 24356 on Microsoft Windows NT 10.0.26100.0, with 11 C# mods and 7 content packs.
Here's the crash log
I think it is yeah! But I have no idea how to un-conflict it
Why is SMAPI asking (for a custom location) “Is its data in Data/Locations invalid?
Does anyone happen to know when the HappinessDrain on Farm Animals happens? I'd assume overnight, but do we know if it's DayEnding or DayStarted or something else?
!log
Important note: Your computer username may appear in the log. If your username is your full name, please be aware of this before uploading it.
Please share your SMAPI log file. To do so:
- Open this page: smapi.io/log.
- Follow the instructions at the top of the page to upload the log file. (Don't copy & paste from the console window!)
- After uploading, it will show a green box with a URL to share. Post that URL here.
Please do it even if you don't see any errors. This has useful info like what mods and versions you have, what the mods are doing, etc. If the issue didn’t occur in your last session, please load the game to the point where the issue occurs, then upload the log.
also how are you patching in the custom location
Are you doing the most up to date 1.6 way or are you using the deprecated CustomLocations
Content Patcher. And I’ll post the log in a moment
I assumed content patcher 
CustomLocations is an older content patcher way that works but is deprecated
The newer way is to patch into Data/Locations and such
the old way works but it's less featureful and less performant than the new way. you really should convert if you haven't yet
The content patcher error I know how to fix, it’s the game error
Log Info: SMAPI 4.3.2 with SDV 1.6.15 build 24356 on Microsoft Windows NT 10.0.26100.0, with 5 C# mods and 1 content packs.
Where is your patch that loads in the "WELH123456789.PrairieIsland_PrairieIslandBeachCave" location
You may want to put the json with it in:
!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.
FarmAnimal.dayUpdate
HappinessDrain is used in a bunch of other places as well. you can see for yourself in the decompile
Apparently the warps are wrong, but it was working before like that
https://smapi.io/json/content-patcher/48014ca9fdb74c86a9cf1f32fa9bb79b
...How does one decompile?
!decompile
If you want to make SMAPI mods with C#, one important resource is decompiling the game to read the game code. Here's how to do it: https://stardewvalleywiki.com/Modding:Modder_Guide/Get_Started#How_do_I_decompile_the_game_code.3F
very useful, answers 90% of code-related questions
Ooh, thank you, I have the uncoded xnbs but I didn't know how to decompile the DLL
What's the 10%
netcode stuff
How can I check whether an item id is valid and that item is a shirt?
For the context, I'm making a new changeClothesTo event command that let people enter a specific item id and let the farmer change current equipped clothes to that item.
Sorry, been coding. It isn't the warps
Your first error - the Content Patcher one? Is the issue
The entire Json fails because you aren't comma-ing after your patches
This fails the load of the maps, which fails the location edit
You can use ItemRegistry.GetData
Can I determine the item is actually a shirt with ItemRegistry.GetData?
It was working before madding the second location though and I didn’t change anything. And the first warp is still working
Oh if it's a specific class of item then use the actual data
You can find it on the DataLoader helper
Please just put the commas where they need to go in the json and retry. You'll see what i mean.
If you know how to fix the first error like you said, the second should automatically work.
if the patches are in separate files then one failing will not make the entire mod break
further, they do have commas between their patches
you may want to clarify that second statement, because the patches to load the Data/Locations are in the json
They do not have commas at the end of each patch
they do. at the end of the comments
That didnt do anything
Those are commented out, no?
no. They are after the comments
Is it documented somewhere on wiki or I need to look through the code for use reference?
a comment in that style comments out what is between the symbols
yet is still being parsed as valid json by it
they are not in the comments. they are being read as json
no different than if the json was minified and the entire file written on one line
Did you decompile
I have no idea what that last sentence means, Button
Yes, I did.
Either way, I see what you're saying, I'm just saying it does NOT look like that with the editor as is. Probably moot regardless, but still
Have u ever seen minimzed json
Beyond that, I'd have to leave it to the map pros
Nope!
closest thing to documentation is this: https://stardewvalleywiki.com/Modding:Items#For_C.23_mods
but for the most part the code is the documentation
{"Action":"EditData","Target":"Whatever"}
assuming I filled out the rest (I'm on mobile I'm not doing that) that is valid json
