#making-mods-general
1 messages · Page 466 of 1
I wouldn't if you still have JA mods that aren't replaced
I didn't even know how to use that mode, so I just installed it.
To be honest, I did all this because I wanted to use one weapon in SVE mode in a vanilla game as well.
Am I a fool, or am I not good at English because I read the modding page and don't understand it?
what problems are you having?
I must have thought of mod creation too simple. It's a challenge from file creation.
I just want to add a super strong weapon.
thats all.
Take a look at first the content patcher docs, then look through sve's files for the Data/Weapons edit
The files are plain text json
The Content Patcher docs: https://github.com/Pathoschild/StardewMods/blob/stable/ContentPatcher/docs/author-guide.md#readme
If all you want is a super weapon, you could probably just use CP to edit a vanilla sword to have a big damage number maybe
Also probably existing mods that do that or similar
Or CBJ cheats has a one hit kill option I think
Fortunately, that should be simple enough to do, assuming they would be happy with tabbing through the pages using the shoulder buttons too?
Were there any other issues brought up regarding blind accessibility? Does the text work with whatever screen reader they're using, for instance, do you know?
ive tested it before. it works fine
needed to make sure it worked like that for CMF and it does
hello hello 
i'm trying to edit a farmhouse interior mod map using Tiled, but I have never used the program before and i'd like some suggestions on something if anyone knows about that sort of thing. no worries if not!
Have u read this already
ah, no... i wanted to know how i would "trim" the accessible area of a map and didnt know where to look for that
i guess i should read the whole thing and maybe it'd enlighten me eventually on what i need to do
thank you, i was using the um, Tiled website for help, i didnt know there was one for stardew too!
Usually if you don't have to make a vanilla map smaller, then don't
Put up more Building tiles to make player accessible room smaller instead
If you really do gotta make it smaller then you must Load over the vanilla asset
it's a farmhouse interior mod that hasn't been made right, and npcs walk around outside in the void lol. im trying to remove their ability to do that
Do you have polyamory mods
when comparing the tmxes of a well made mod and this one, i can see that usually, there is a distinct void around the interior map, but this one is just...a big square
no, no poly mods
someone else had the issue by the looks of it on the mod page, so ig i just want to mess around and fix it myself
Hrm check KitchenStandingLocation maybe
If they didn't set that correctly then spouse may be elsewhere
oh the spouse is fine, just sometimes he walks into the void to place furnirue
im not sure what you mean by distinct void since any void built into the map is still just tiles placed
The other thing you can do is to try n fill the out of bounds tiles with Buildings tiles to make them impassable
Voidwalking doesn't always mean that the map borders are broken, either
but the baby sits out in the void every time
The baby may be a result of crib position hardcoding
ah, its hard to explain, but the map seems to have a "sky" behind it that i think they think is a floor
If they didn't do anything about that and moved crib
mm boundaries then is what i mean maybe
Hence this might help
mhm
Buildings = not passable
okok, so i should look into sealing the gaps with buildings?
Sdv maps doesn't have concept of lines only tiles
And tiles r either passable or not passable
mhm i see
which also means it doesn't matter what's painted "behind" a map as long as the Buildings boundaries seal you in
im sorry, i dont know anything about map editing since i mostly do spritework and small aesthetic mods haha, so i appreciate the help
okay, then it sounds like i need to seal the house
babies do have a "find a random open tile to stand in" logic that doesn't really check for access
The mod data layers will save your ass while testing
Always
that sounds about right lol
Tbh so do irl babies
Seconded on the Data Layers mod, it's fantastic for map making especially (along side general mod making like Atra said)
ah, fantastic thank you!
babiwa
ill grab that one
oh yeah this looks so useful
ill be able to see whats up
thanks so much everyone, youre amazing 
it takes a village to help my dumb ass
there's this too
Ooo thats fantastic! I shall add that to the repatouire too
interesting...yeah ill get that too
these are exactly the kind of tools i was hoping existed omg 😭
Hey! How would I go about adding only one dialogue chain to a new NPC? What I mean is, I want to have a character specific dialogue like Gil's but for there to be choices and after responding, the dialogue with choices doesn't appear, only a repeating response from the resolution of the dialogue chain appears
I don't know if I explained it right or not 😭
Do you want a dialogue tree
@mystic skiff Hi! Would you mind if I sent you a DM regarding the problem with MEEP/AHM? It should be a fairly simple fix, at least.
I have encountered a mystery I can't seem to find an explanation for and I can best explain as a series of replication steps
- copy Maps/FarmHouse.tmx into a new file with a different name (just to prove it isn't checking asset names or paths)
- load it as a new location's CreateOnLoad
- check the map properties in c#
- where did ViewportFollowsPlayer come from???
it doesn't happen if I make a map via c# and use that instead (though there are other ???s that happen with that)
it also doesn't happen if I load a map I made from scratch...
best guess is that if you're loading it as the Farmhouse type, it overrides its own map path with an upgraded one?
public virtual int upgradeLevel
{
get
{
return this.owner?.HouseUpgradeLevel ?? 0;
}
/*...*/
public override void updateMap()
{
bool showSpouse = this.HasNpcSpouseOrRoommate();
base.mapPath.Value = "Maps\\FarmHouse" + ((this.upgradeLevel == 0) ? "" : ((this.upgradeLevel == 3) ? "2" : (this.upgradeLevel.ToString() ?? ""))) + (showSpouse ? "_marriage" : "");
base.updateMap();
}```
since 2 and 2_marriage have that property
I have a growing desire to make a custom farm map where I just expand one of the base maps to have more playable area. Any experienced mod people have any insights? Is it better to just start from 0?
it's always a good idea to use a vanilla map as base
for technical reasons not just artistic (you don't have to reset a bunch of flags/attributes the game expects the map to have)
anyone know where the fire sprite for linus's campfire is? it can't be cursors this time again-
it is indeed cursors
oh god
i have a centered version if you want
I found it already xD
uh, is there anything i should do to enable it being in maps?
yes please! tysm 
you have to either use C#/framework or do your own tilesheet animation which is what i did
gotcha
the actual fire is multiple offset layers of the sprite i think but i found that just 1 was fine for my purposes
yeah, it's multiples of them offset
gotcha, tysm! i'll crop out the other stuff
but that's the thing, I'm not, I'm loading it into a competely generic GameLocation!
that being said, it turned out not to matter 
I managed to load a completely C# location (which involved way more code digging than it needed to or should have)
nah, I used the SetMapTile method of GameLocation in a for loop 
actually never mind I did use new StaticTile. still in a for loop though
but why

for some reason a part of my brain insisted that generating an entire map dynamically is somehow better than loading a dummy map, and then when it wasn't working I got annoyed
learned a lot though tbf
Hello, I am trying to edit Sam's spouse room, but I do not know where the tilesheet is for it. I am pretty new at this.
The map itself is in Maps\spouseRooms.tmx, and the tilesheet it uses is Maps\townInterior.png.
ohhh. Town interior.
is there already-existing and CP-accessible stuff in place for pulling a random entry from Data/Objects with the correct article (a/an?) like how quests have?
the base game generally doesn't use a-or-an for object names
which is to say no, i don't know of any
hmm okay
i guess i don't technically need the article, i could mimic vanilla in that regard
again you usally get things like Looking for Hot Pepper to rub on my knee or Need Joja Cola for a burrito
i'm trying to write a silly horoscope thing like "You {{need/want/already have}} {{Noun}}. Look {{Place}}."
while the game does have a Utility.AOrAn method, it's barely used at all
mmm jojarrito
[ArticleFor] tokenizable string
e.g. [ArticleFor apple] apple = an apple
it uses Lexicon.getProperArticleForWord() with the stipulation that it only works in English
ooh cool!
i looked in Data/Quests but those seem to be the unique ones only. where are the help wanted ones?
where's this method used?
help wanted ones aren't stored
are you asking about the lexicon function bc if so it's used in the token parser for said token
possibly other places too i didn't check
yeah i'm asking about the lexicon method
i could imagine it used in fishpond quests, but i can't think of any others
wait I did check I just forgot and am not at my desk anymore but I remember it being used in a couple menus I think
maybe the character customization menu somewhere?
i also can't remember if it's the lexicon method or the token parser that returns a blank when not in English but it's one of em
unlike the utility method which has no such care for language differences UNLESS you are Hungarian (I think that's what hu is)
but did YOU end up doing reflection crimes just to avoid either calculating xtile's tile size from the game1 values or adding the tmxtile nuget package? /lh
here you go this is all the places its used
hu is hungarian yes, not to be confused with hr for croatian
i would never
Well, definitely not the latter, since tmxtile didn’t exist back then 😛
(Unless I’m totally misremembering)
(no I'm pretty sure you're right, it's 6ish years old)
(That's why I was wondering if I misremembered)
There's a chance I poked around it even longer ago, but I don't think I had gone full map proc gen quite yet
I mean idk if "fill 10x10 square with the same tile" is proc gen so I haven't really done that yet either 
well procedural implies you're creating a constantly-expanding world
you're just doing the floor of the house 
in a definitively not expanding way, too
(though, that's not the definition of procgen I know
I just know it as generating according to set procedures, even if it's for finite sized levels, just a potentially infinite variety of them)
oh right that's the other silly thing I did today, I made the debug build version of my mod increment every time I compiled it
what do you mean?
I don't think you're a high enough level to send images in this channel yet, but you can send it in #images-and-memes probably?
but also idk what you mean by "the" png since spouseRooms is a tmx
looks perfectly fine to me
you're missing some layers
(this restriction is lessened in the mod making channels)
I'm not sure what the issue is tbh? it isn't perfect because it's hidden by stuff anyway
im finding it all over
the reason part of the wall has to be on the back layer is that there's furniture in front of it on Buildings in this case
then I have no idea what you mean tbh
if you mean the long-short-long floorboards that's pretty normal
they’re not meant to be perfect, they’re purposely staggered to mimic how real life hardwood floors look
Tiling below the rug won't be an exact match to the patterning because of the space the rug takes up
itd look strange if all the wooden floorboards were perfect
It's also usually obscured by the table or terrarium
in fact, it's on purpose, there are multiple different floor tiles (ik you know this blueberry I'm just adding on haha)
lord knows i've spent long enough staring at the floorboards
I see, so its not supposed to be a perfect staggered tiling
nope
like much of the game's art it's meant to be just that little bit scrunkly and a tiny bit shit to make it look the way it does
i say that with love and affection and understanding
well, that makes things more difficult for me. I am changing the flooring on sam's room to the type on sebastians.
i mean i personally would think it looked more a tiny bit shit if it was too perfect and patterned
if you tile all the plain grass tiles for example it looks really off without something to break it up
i more mean that in the sense that things have to look old, a little imperfect, bent and busted stylistically
not in the sense that they look worse artistically
so you hate emily? /j
that was what i meant too, i meant in my mind, a wooden flooring like that isnt bent and busted, thats the default state
although ape's newer art is really very slick with the later updates so we're probably moving on from that a bit
penny's floor is pretty cool in that it looks uneven but actually repeats horizontally
a harsh reality when i'm happily making my sprites knowing that they can look bad because things generally look a bit crusty in the vanilla style
and then 1.5 and 1.6 come out with all these new stylish environments and detailed sprites
oh no. oh no no no. ohhhhh no
simple, just pretend we're still in the days of 1.4
i only make mods for the psp version now 🤝
I still can't fully remember some of the 1.5 features and I started playing well after it released, I was just on ios pre mobile catching up to pc 
1.6 new maps are very pretty
I enjoy how Jodi and Kent get a double bed now
Hi bluebs!!!!!!!!

staggered patterns are also good for stability. when you have slats under the floor, and you alternate the floorboards, it makes it so that you have a nice even surface to stand on. if you had them perfect and aligned, then there will be several "weak spots" in the floor where all the edges meet, where if you stand on it, you could fall through the floor. Perfectly aligned is more for floors with a 100% solid foundation underneath, so there's no chance of falling through the floor at all.
I hope it looks good, time to test!
The text doesnt read out, they reported only having their screenreader pick up the close menu button. but I just made a second version that uses only text dialogue boxes so i could describe the image instead.
😡 is there some secret to modding a lightsource?
the code has no errors yet nothing shows in game
are you making a map?
no just wanted a light that follows the player like the glowring
!patchsummary
Can you do these steps to provide more info?
- Load your save and view the content that should be patched.
- Type
patch summarydirectly into the SMAPI window and press enter. - Upload your SMAPI log to https://smapi.io/log (see instructions on that page).
- Post the log link here.
you can use that command to see if your edits are applying
hmm
it's hard to debug errors in code if we don't get to see said code
(I'm assuming you're using C# for this)
Ah I see, I forgot to pack it back into a xnb
you should absolutely not be packing anything back into an xnb ever
then how would I do it?
with content patcher
I am used to the old ways of xnb edits
/// lets try to make a light
private void OnUpdateTicked(object? sender, UpdateTickedEventArgs e)
{
if (!e.IsMultipleOf(10))
return;
if (Game1.player.hasBuff("thesandmansleeps.LightBuff_LightBuff"))
{
// Parameters: id, textureIndex, position, radius, color, lightContext, playerID:
string lightID = "thesandmansleeps.LightBuff_LightBuff";
var textureIndex = LightSource.lantern;
Vector2 pos = Game1.player.getStandingPosition();
float radius = 5f;
Color color = Color.GreenYellow;
var nocontext = LightSource.LightContext.MapLight;
int playerID = Game1.player.GetHashCode();
this.playerLight = new LightSource(lightID, textureIndex, pos, radius, color, nocontext, playerID);
Game1.currentLightSources.Add(this.playerLight);
this.Monitor.Log("Added LightSource. Is it working?.", LogLevel.Trace);
}
else
{
// Game1.currentLightSources.Remove(this.playerLight);
this.playerLight = null;
}
}
we have long long since moved on from xnb edits
well, I will try to do it through content patcher, I am not THAT good at coding though
honestly i changed the code so much after reading through glowring data that my brain just fried
luckily content patcher is not so much coding as it is sparkling data entry
!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.
the first bullet point will help
so its the same way for tmx as it is png?
im not sure I understand the question
the example used abigail.png
yes, in general you should not be replacing any of the xnb files in your content folder
have you looked at the rest of the content patcher documentation? there is documentation available for EditMap which is what you use to, well, edit maps
there's also Load for replacing any asset wholesale, but you're iirc editing a vanilla spouse room? so shouldn't just replace that entire asset
(broadly, though, the kind of json you'll be writing is very similar)
you're just adding to the dictionary every time without removing? are you sure there are no errors in the console?
(Add throws if a key already exists in the dict)
(if there are no errors pls double check that your event is actually being registered)
(and if you want to reposition a light source use Utility.repositionLightSource)
well, I will give it a shot
I figured if I could just make a light then the hard part would be behind me. Removing it would come after.
The console is logging the updates ticks for the duration of the buff so I think the event is being registered
I was hoping that I could just edit the vanilla stuff because I have a suspicious one of my mods would load over a mod I made
you are editing the vanilla stuff with content patcher
Is there code that makes the light appear?
turning it into an xnb is not going to make another mod not override it
(ok ignore what I said earlier, I was looking at the wrong function;Add(LightSource) should work fine with duplicate IDs)
the mod itself only seems to target sebastian's room, so I would be fine
your code looks fine; are you testing at night?
which still has nothing to do with your mod being an xnb mod or not
the proper way to do what you want to achieve is to use Content Patcher's EditMap functionality to replace a portion of the Maps/spouseRooms (or w/e its called) asset, replacing only Sam's room
Yep outside and in the mines. Applying buff again in each new scenario
if the mod youy have installed is a Content Patcher mod too (and it should be bc again, we dont do xnb edits in the year of our lord 2025) then it should also only be replacing Sebastian's portion. it wont touch your edits at all
is the buff applying (can you see the icon top right corner)?
(there is a possibility that they are accidentally overwriting other rooms too, but i would not assume that to be the case, and you can just make yours higher priority anyway)
alright
Yeah the big is fine. I have it a glow effect to be double sure i knew when it was active
I've read it over and by all accounts it looks fine 🤔
someone else's gotta be a second pair of eyes I'm afraid
uhh try a different light texture id?
the color is also inverted so also try Blue instead of Yellow
Yeah I tried lamtern, and I think both sconce and window
with the width and height, does the first tile count
like is a spouse room 6 by 9 or 5 by 8
You can check by opening Maps/spouseRooms.tmx and measuring the size of the rooms there
I did
the first tile counts, yes
Oh well I need a break from staying at this anyway 🙃
indexes start at zero ("how far from the start is this?")
widths and counts do not ("how many things are there?")
have you looked at the decompiled game code that handles the glowring? i don't believe it uses currentLightSources, and you shouldn't be adding a new light instance every single tick
do things that edit maps need new saves to work?
also in order for the light to follow the player, it has to have its position updated manually every single tick
there are lots of references in currentLightSources in the code, though I haven't checked for myself if they're functional
(I use sharedLights myself)
well it's gotta be functional, since I count at least 30 refs in code that looks very used
so in my silly halloween mod i create the light like so
https://github.com/b-b-blueberry/Halloween2024/blob/master/Halloween2024/ModEntry.cs#L278-L290
and then update the position later
https://github.com/b-b-blueberry/Halloween2024/blob/master/Halloween2024/ModEntry.cs#L762-L765
but this won't account for re-adding the lightsource if missing, such as when the player changes location
Ohh, actually, I am getting this error. Can't apply map patch "Sam Spouse Room Vanilla Change > EditMap Maps/spouseRooms" to Maps/spouseRooms: map patch couldn't be applied: source map size (Width:100, Height:27) doesn't match ToArea size (Width:6, Height:9).
did you set a FromArea?
oops
generally no, unless you have some conditions set that would prevent it from being applied
you can even patch reload your content pack while in the location to instantly reapply any changes
I have successfully made my first mod
to find out where errors are happening in other mods that use content patcher, do I also check the code in content.json?
this is very useful
How exactly do you change the title/honorifics of the farmer using GNMT ? Im looking at the tutorial and dont see it anywhere :( I may have missed it-
I know its using title, but I want to make sure I have the proper code for it
the same way you did the others, just replace the part where it has the config option with Title
it should all follow the same format
hello i forgot about this lol but is this done? i can have compat for cornucopia with my upcoming release if so 
Usually you use the log to identify what the errors are
no errors in the log, thats the issue
You don't only use errors. Depending on what the problem is, you check what mods are editing the asset, you run a patch summary for the mod and see if patches are failing to apply when they should be or vice versa.
can you use GSQs inside a query, or only CP tokens
only tokens
hmm okay i might need help checking the formatting of this query then:
"Condition": "{{Query: ({{HasSeenEvent: currentPlayer}} ritualDetails OR {{HasSeenEvent: currentPlayer}} ConvincedEdwin)}}"
this is supposed to be player has seen event 1 fork 1 OR player has seen event 2 fork 1
yeah it's for a trigger action
then you can just use PLAYER_HAS_SEEN_EVENT
oh wait duh
i had it more complicated with ANDs and ORs then realized i didn't need to check all that because i had built it into the events
"GSQ 1",
"GSQ2"
right?
just for informational purposes, how you'd actually format a "player seen event" CP token is {{HasSeenEvent: currentPlayer |contains=ritualDetails}}
(also you should be using your mod ID in your event IDs)
i do! these are just forks
forks also need to be globally unique
you should be using your modid in your forks
...oops
well that's another thing i get to redo lol
i thought they were kind of like under the umbrella of the original event
they are still just keys in a dictionary
yes you can notice they're saved in the same location as actual events
Guys, is there a token expansion mod that has PlayerHealth or similar? Planning to add a condition that make weapons have increased stats when player health is within a certain percentage
you wouldn't be able to use tokens for that anyways
they don't update fast enough
i'd use BETAS and a trigger action instead
Thanks, just started modding a week ago, really wanted to add some conditions or logic but idk C#
Hullo! I am trying to edit the buildable mushroom boxes to grow black chanterelles from Mt Vapius
Mt Vapius files have the item numbered at -81; I notice when I use Lookup Anything there are sometimes additional letters for items. Do I use the one in the Mt Vapius files, or do i need to load into the game and use Lookup Anything to get the "fixed" ID?
" "Lumisteria.MtVapius_BlackChanterelle": "Black Chanterelle/432/15/Forage -81/{{i18n: MtVapiusBlackChanterelle_Translated}}/{{i18n: MtVapiusBlackChanterelle_Description_Translated}}////0/Mods\Lumisteria.MtVapius\Forage","
that's the old file you're looking at
VMV packs some pre-1.6 files, including the old string format for items
find Objects.json for the updated format
If this is how you are trying to format your condition field, no, your punctuation is wrong.
AND:
"Condition": "PLAYER_HAS_SEEN_EVENT Current {{ModId}}_ritualDetails, PLAYER_HAS_SEEN_EVENT Current {{ModId}}_ConvincedEdwin"
OR:
"Condition": "PLAYER_HAS_SEEN_EVENT Current {{ModId}}_ritualDetails {{ModId}}_ConvincedEdwin"
And then if you needed to do an OR but with different GSQs:
"Condition": "ANY \"PLAYER_HAS_SEEN_EVENT Current {{ModId}}_ritualDetails\" \"PLAYER_HAS_MAIL Current {{ModId}}_SomeMail received\""
Okay I dug around and found
"Lumisteria.MtVapius_BlackChanterelle": {
"Name": "Black Chanterelle",
"DisplayName": "{{i18n: MtVapiusBlackChanterelle_Translated}}",
"Description": "{{i18n: MtVapiusBlackChanterelle_Description_Translated}}",
"Edibility": "15",
"Type": "Forage",
"Category": -81,
"Price": 432,
"Texture": "Mods\Lumisteria.MtVapius\Forage",
"SpriteIndex": 0,
"ContextTags": [
"mt_vapius",
"mt_vapius_forage",
"mushroom_item",
"edible_mushroom",
"preserves_pickle",
"color_black",
],
Is this the correct file to look at?
thank you! i knew how to do AND, but i can never remember OR 
It still lists the black chanterelle at -81. I'm just gonna plug that in over the vanilla mushroom number, that'll prob work
(aka dont do that it will not work)
what's the context? if you're trying to spawn every item of a category that alone won't do it
if you want to spawn black chanterelles specifically use the item ID (aka Lumisteria.MtVapius_BlackChanterelle)
to further explain, mushrooms have "number" item IDs because they were in game before string IDs were supported
no idea but itll be there on release if not
no worries! i just wanted to check because i'm getting close to release, but i can always add it for the next update!
@brittle pasture I'm trying to get the ID of the item. Of the black chanterelle itself.
I need the ID number to put into the config of the buildable mushroom boxes so that I can get the black chanterelles to spawn in the buildable mushroom boxes.
So if that's just the category ID, yeah then that won't work 😩
So I guess I'll go back to this plan of just using lookup anything once I get into the game?
Windows is trying to do an update, so my potato is being extra slow and difficult right now
This is the ID: Lumisteria.MtVapius_BlackChanterelle
see my post above: #making-mods-general message
Ty! I'm confused by this file organization but I'll figure it out eventually. Ty for your patience
Visual mods are one thing, add-ons are a totally different beast that I am very lost on at the moment heh
[[Modding:Objects]] for more info
the item ID in this case is the key of the dictionary
aka the part before the colon
Does anyone happen to know if spacecore is able to animate tiles? I tried to make port a mod from content patcher animations to spacecore, however it doesn't seem to work? The documentation is kinda vague and doesn't specify so I'm wondering if I did it wrong or if it just isnt possible currently?
tiles as in map tiles? or just sprites in general
specifically im altering a tree to make it have an animation
im not sure what that falls under
Im able to get it working with content patcher animations, but im also limited in some ways where it would be much easier if i could use spacecore
search for "spacechase0.SpaceCore/TextureOverrides" in the SpaceCore README
"Tue": "{{i18n:monty_dialogue.Tue |horoscopeVerb={{horoscopeVerb}} horoscopeNoun={{horoscopeNoun}} horoscopePlace={{horoscopePlace}} }}",
i have a dialogue with three tokens. is this how to pass them in i18n? do i need more | separators and/or commas to separate them?
for trees you'll have to be knowledgeable of how the game splits the tree sprites, and animate each segment separately (ie. you can't just animate the entire texture)
oh i see
thank you, i didn't see that. should have looked harder
'Tis on the translations page
does that mean id need to change the x y and hight width specifically, or is there additional stuff
i was looking on the tokens page 🤦
basically you add one animation entry for each rectangle yes
An understandable thing to do I think
same TargetTexture, different TargetRect
so is that meaning i have to do each 16x16 chunk that makes up the tree in this case?
no, each continuous chunks of the sprite
so the issue was that I was trying to animate multiple sprites
it's a little bit fussy but u must match the source rectangle
for the specific sprite youre animating?
like you couldnt just animate an entire tilesheet for instance
that makes much more sense now
0 => new Microsoft.Xna.Framework.Rectangle(32, 128, 16, 16),
1 => new Microsoft.Xna.Framework.Rectangle(0, 128, 16, 16),
2 => new Microsoft.Xna.Framework.Rectangle(16, 128, 16, 16),
_ => new Microsoft.Xna.Framework.Rectangle(0, 96, 16, 32),
then when grown the tree becomes a top and a stump
treeTopSourceRect = new Microsoft.Xna.Framework.Rectangle(0, 0, 48, 96);
stumpSourceRect = new Microsoft.Xna.Framework.Rectangle(32, 96, 16, 32);
if u dont care about the stages then u just need 2 entry for the tree top and the stump, assuming this is wild tree
fruit trees r different iirc
have we clarified if this is a real wild tree or if this is a map tile tree
im doing this to the pine tree
I may have asked that before and then forgot that I asked
oh
oh yea u also need to do the moss rectangle
christmas light animation?
yeah
i enjoy that mod
thats X + 96px
You can animate the whole spritesheet together just fine, in fact thats what i would do it make it easier
probably implementation issue
maybe i just did it wrong 😭
have you tried looking at another mod that does spacecore animations
im fairly sure you need separate spacechase0.SpaceCore/TextureOverrides
they can point to the same sheet but it gets messy that way 
thats what i used to frame the content json a bit
no, spacecore can animate the whole thing together
But if they have the same key it will cause issues
Baubles is mod that animates nearly all of its items (for an example)
can i send the code i did here?
!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.
my iridium recolors mod also does large animations
Sorry, not if they have the same key, but if the areas overlap, spacecore will bug out
If u animate whole sheet then do u just gotta remove the TargetRect
this was an older version but i did try fixing that and still no luck
whats your image looking like?
also, dumb question, but you have spacecore installed right
lol
its double the width of the regular sheet sicne it has two versions side by side
yes definitely
I mean show me
your target rect seems to be the entire texture, which wouldn't work because the game doesn't read it all at once
really?
it should only target the first half i believe
as mentioned by chu [here](#making-mods-general message) for the top part of a mature tree the game reads every 48x96 rectangle
rather than starting at 0,0 should i start higher then?
so you need to target that 48x96 rectangle specifically
your starting coords is correct, it's the size that's wrong
In the past i usually just put separate pieces of anim on different pngs
yeah if you try and do two anims on the same png you will have to really pay attention to indexes and stuff
I dont get why spacecore cant let you animate the whole texture but
-# It's impl details related to sinful patch on SpriteBatch.Draw
so i could remake the assets where one is the top half of the tree only
and another thats the sapling bit
yeah it makes sense if you know how it works under the hood I swear
the end result is much more performant than CP-A's old method of (IIRC) swapping out the entire Texture2D, but also somewhat more finnicky to work with
sounds good
so once I do that I alter the 0, 0 to be in the corner pixel of the new sheets right, and then set the hight and width to that of one frame
oh ok
SpaceCore will infer the sprite coordinates of your animation automatically
its just able to identify that im changing the top of the trees specifically for example?
yes
thats really convenient
well thanks for the help, im gonna have to work on this tomorrow though since its getting late
have a good one
what does the 0 in "AcceptGift_(0)id" mean again...
i keep on forgetting all these small things 😔
fell asleep adding the GNMTs to the npcs and realized i changed the same word to {{Hana.GNMTokens/SubjectivePronoun}} like 40 times but each time i would ctrl+z and then do it again
im so tired,,,,
You can now check the host for Cornucopia.CookingRecipes_WorldTravelerEnabled in Received mail
if i wanted to give player a random recipe with trigger action, what would be the best approach?
having a pool of trigger actions and a using a thing like Lumisteria.Mod_MyAction{{random :range of whatever i want}}?
I have it set up to have different trigger actions, one for each recipe, that are rearranged via move entries each morning
That sounds better than what I did
But it would have to account for if the player already has a recipe
i may not care about it and just have a generic message like "today's recipe is (whatever)" and if they have it, they have it
It's not 100% randomly balanced because of the rearranging thing but it works
in my case, this is however for an alternate way of obtention of recipes, so them being unlucky with random isn't crucial
Ah okay thatas good
Cause i was gonna point out that getting the last recipe in a totally random list, where repeats are allowed each day, can be frustrating with bad luck
if theres already a main method to get the recipes, its different
yeah (althought some of them are a bit random too but i hope that i'll be able to mitigate it, especially if some things are more likely to be in a pool but not another)
thanks
having another option may always come in handy anyway 😄
Farmer: "so I woke up this morning and decided to try a thing."
about vanille recipes id, i can have :
"MarkCookingRecipeKnown Current Rice Pudding",
and wouldn't need a _?
it having a space would move it to the next field (true/false), try either escaped quote or using the object id and see what works
@drowsy shadow I can send your message to save you typing it up again, if you so wish 
Yeah it would need escaped quotes
ok!
Yes please haha.
Sending for @drowsy shadow
So, this took me a bit longer to think of than I want to admit (I also couldn't think of a search phrase to find it in old comments but it may already be there). Regardless, if anyone else is trying to set "spring24 spouse dialogue" or "flower dance spouse dialogue", there is a comment by [ichortower](#making-mods-general message) that explains that it's hardcoded. Here's a workaround that works for me that should have been obvious, but sometimes I breeze over the dumb stuff. I just overwrite the current year dialogue with the spouse dialogue if you're married...
{
"Action": "EditData",
"Target": "Data/Festivals/spring24",
"Entries": {
"Kraken": "{{i18n:Kraken_StringData.Data_Festivals_Spring24.Kraken}}",
"Kraken_y2": "{{i18n:Kraken_StringData.Data_Festivals_Spring24.Kraken_y2}}"
},
"When": {
"Spouse |contains=Kraken": false
}
},
{
"Action": "EditData",
"Target": "Data/Festivals/spring24",
"Entries": {
"Kraken": "{{i18n:Kraken_StringData.Data_Festivals_Spring24.Kraken_spouse}}",
"Kraken_y2": "{{i18n:Kraken_StringData.Data_Festivals_Spring24.Kraken_spouse}}"
},
"When": {
"Spouse |contains=Kraken": true
}
}Yes, there are probably cleaner ways to write this, but hopefully this helps someone else in the future find it easily.
The link to another chat got me timed out. I was trying to be curtious by linking to another answer...
:O it
Thank you!
's possible to do masked links with messages? I have never known this
100% understandable.
Yes, you just highlight the word and then paste the text on.
they had it banned here at first but pathos kept taunting the modders by using it to mark up all of his messages here lmao
Oh, haha, my bad.
But I've never realised you can use them to link to previous discord messages
oh ok
Which is silly because they are just links of course but because discord does its fancy formatting with them already I thought they wouldn't work with masking
I pray I will never have to write spouse dialogue but I will try to keep this in my brain for others 🙏
Also, I have done comments like this where I post the search terms I was using to try and find an answer and then couldn't. I then post my code when I do find the answer. Please let me know if this is redundant or annoying. I'm trying not to spam large messages or too many comments as per the rules.
they allowed it for mod authors and then for everyone above a certain level. we aren’t special any more, smh my head
not a mod but personally I appreciate it when people do that! it helps the rest of us learn and anyone who is searching for an answer will find it easier to find your question AND there will an attached answer
I don't see there being an issue with that? 
I make incredibly heavy use of search in this channel to find stuff for me and others so anything that increases the chance of me finding answers when I search is great by me.
i do remember something being mentioned about it maybe on the old 1.6 alpha, so it's good to have a more visible mention for people to find
what's the more "logical" for you, flavor text first or info about recipe first?
aka : current, or reverse?
thanks! (this is what i wanted to do, but i didn't anticipate that the order of listing would be reversed in game)
if you find men the proper trigger action why not
Betas has one if ur using that 
Spiderbuttons.BETAS_Message
hmm, i can't really emulate the "you learned how to cook x" part, so i'll keep the generic "today's show" blabla
If you want i can show you how i did it
why not, althought i'm not sure i'll use it
the trigger action sequence is at the bottom
uhhh map people, I want to extend this map further to the right without losing the pond, how can I select an area of tiles and move them?
I want to say either S or R
Might need to control click on the layers you want to move
I just do a cut/paste after using "select all layers" (Ctrl+Alt+A) personally, but it does miss out on the objects that way.
hm, okay, still a little confused
Using Select All Layers makes sure the tiles paste to the same layers as where they started.
okay
you can also do "Select All Layers" from the Layers menu option once you have your rectangle selected if the shortcut throws you off
You'll know it's right because all the layers will be highlighted.
uhhhhh how can i do the rectangle select thing? sorry for the stupid questions
it's this icon, you have to be on a Tile Layer to start.
hi! question im sorry if this is not allowed or anything but : is it possible to optimize any mods that use OnTimeChange? its a source of lag for me and i wanna see if that can be maybe optimized? would be for personal use only ofc just wondering and i though asking in here would be the best place to ask?
Depends why they use it
the mod im trying to look at is baulder gate village btw
this being the speffic section
think I got it!
change it to OnLocationChange or remove the line entirely, you'll just not have whatever nighttime light tiles they put in there showing up right away
also thats so hard to see, you can use the json uploader next time to share code
json uploader?
i apoligize im doing this for the first time
!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.
okay will do that next time thank you!
i wonder if they knew what they were doing because the game has a nighttiles function specifically to handle this
considering they didnt use prefixes for entries when the mod first dropped I dont think they do
idk myself im just looking at some of the mods i have to se if i can change the on time change thing to maybe a few mods i have (just to minimize lag for myself
so sorry if i come in here with a few mods i wanna do personal edits too
are they any other options i could tecally put in such a field? just so i know
Does anyone know how to make a content patcher mod compatible with generic mod config menu?
Question about map editing once again: My NPC is stuck in his house, I figured I have to add NPCWarp to map properties. Do I have to include the NPCwarp to the content.json in some way similar to how I included the general warp to leave the house?
You don't have to use npcwarp, they may use normal map warps too
Have you checked that their schedule definitely loads?
it does!
And do you have a map property warp somewhere in the house that goes outside?
and he was supposed to leave his house at 9 am to go to the mines but he was still standing in the entryway around 9:50
yes, i do
Hm idk if u actually need the NPCWarp there
ah wait, just spotted an error in my coordinates
Fairly sure NPC can use normal map prop Warp
i narrowed the entryway because it was broader before and my npc would just stand in the corner haha
i'll see how it goes
awesome, thank you! 
@next plaza Hi. sorry for ping
i have question about your mod SpaceCore
i saw your mod have an edit SaveGame.serializer, farmerSerializer, ...
and i notice you have't update the field Game1.otherFarmers.Serialzer with new SaveGame.farmerSerializer
this code it's Game1 init serializers and assign otherFarmer.Serializer with SaveGame.farmerSerializer
and this is your code for create new Farmer XmlSerializer
https://github.com/spacechase0/StardewValleyMods/blob/51c306e0ef243968cde9316407ba29556bbc5650/framework/SpaceCore/Framework/SerializerManager.cs#L99C26-L99C43
i not sure why you not update the field Game1.otherFarmers.Serialzer
is it fine? should you fix it?
I changed some small things around the map and I think I should have changed the coordinates in my content.json and the tile properties/map properties accordingly but my NPC is getting stuck in the door now. Any ideas why? I can also provide the according part of my json file
yes can we see everywhere you have a warp (json and tiled)
I'll need to look into more later to be sure, but it's quite possible that that simply did not exist back when I first wrote the XML serializer stuff.
https://smapi.io/json/content-patcher/8086e33badfb40babad9a5509447cb2e here's the json, the map parts are marked accordingly with comments
let me take a screenshot of the parts in tiled
is the internal name of your NPC {{ModId}}_PeiMing?
Door needs the internal name
wait hang on you might need LockedDoorWarp
one day I will remember to put the internal name into everything
let me check
also note that tiled doesn’t know CP tokens so you need to write it out
yep
and yeah i just checked and Door is for internal doors
like bedroom doors for example
you want this
So for the outside door, I have to add Action LockedDoorWarp?
yep!
Okay okay okay, let me try this
he was able to enter the door before so that's strange
idk how, since Door requires like 4 steps to work lmao
truly a mystery
Hmm I changed it but he's still getting stuck. Perhaps I also messed up on the interior map
check that your warp in endpoint doesn’t overlap with the other warp out
ahh, yes, let me do that
Okay, he still keeps getting stuck
i’m about to go make lunch but can you send a new screenshot of all the warps/the schedule json
I fixed it, I just noticed that I forgot to change 1 single coordinate in my content.json
thanks for your help! 
yay!
NOOO he's stuck inside the house again 😭
I need to make some food as well now or else I will chew through my keyboard 
you shouldn’t need both NPCWarp and Warp i don’t think 🤔 what happens if you get rid of the NPCWarp
you also shouldn’t have to do the warps in json and tiled
that was an attempt because he got stuck without it before
let’s try to go back to the most basic and troubleshoot from there. try having just the Warp property in tiled, no NPCWarp, and no AddWarps in json
i’m worried it’s a pathing issue where he tries to use a warp but gets stuck on a different warp for example
alright. I'll try that later! i need a break for now haha
hello!
I am tryng to make quest in stardew. i have found out how to do the basic coding. but i dont know how to define a finished quest.
for example this one from basegame: "127": "Basic/Haley's Cake-Walk/Your wife is organizing a charity cake-walk in the town square. She asked you to bring a chocolate cake./Enter Town on a sunny morning with a chocolate cake./-1/-1/0/-1/true",
How does the game know when the quest is finished?
some quests are either hardcoded or are using other tricks
no idea for this one, either the game use an event and then remove the quest after it, or it's hardcoded and checked by C#
but if you want to do something similar, it's possible to have something like "event checking if you have chocolate cake in inventory, event triggers and remove quest"
yeah it does the "remove quest in event" thing
https://cdn.steamusercontent.com/ugc/10128139740745095436/F274F0641EFCD749F7C3375BA2C07B9D646FBD80/
Okay, I attempted to remove the NPCWarp and the AddWarps in content.json but he still gets stuck
If you do a patch export of the map and open it up in Tiled, are the Warps correct?
That would also catch any possible changes to the coordinates via code you may have missed.
Also, are you sleeping or creating a new save after you make the changes to test?
yeah I send the farmer on my test game to sleep once I load the save
how would I go about doing that?
@merry river You leveled up to Cowpoke. You can now speak in our voice channels and share images in all channels!
patch export Maps/YourMapName in SMAPI console, then navigate to the folder it tells you
hiya! i've recently returned to the modding scene after several years of absence, and i have an old custom furniture mod i'd like to update for 1.6. how would you go about making seasonal furniture these days? i've been looking here https://stardewmodding.wiki.gg/wiki/Tutorial:_Making_Custom_Furniture_With_CP, but i can't see any mentions of seasonal furniture. i might just have missed it!
this is the warp of the interior in the patch export, let me check the exterior too
with seasonal furniture you'd use the CP Season token to load a different spritesheet for each season
i'm pretty sure you can prefix the png filenames with season_ like spring_myCoolFurniture.png, then load the textures to Mods/{{ModId}}/{{Season}}_myCoolFurniture. then in the texture field for the furniture you can put that texture and it'll pull the correct seasonal tilesheet
(is the texture field on the furniture item not cached?)
what's after the ... ?
(or do they auto load seasonalsl ike maps do? im not familiar with furniture)
i think nic misspoke
also is it normal that there's a bunch of tiledata things on the exported files
Nothing
Yeah, the flip and rotation things are normal with how patch export works
You load the filenames containing the season to a texture without any season token
well selph also pointed up emoji so i wasnt sure
yes you can ignore that. is your location PeiMingHouse or is it {{ModId}}_PeiMingHouse? it should really be the latter
maybe selph is feeling pointy
if furniture behaves differently than other tilesheets then yes i don't know what i'm doing
it doesnt
it's the first one 
although in the Tiled file (if using that instead of code to set it), you need to write out the {{ModId}} as the mod's actual unique ID instead of using the token, so good to be aware of that when suggesting people switch.
I don't recall it ever being the case, and I just checked the code on my phone and I also don't see that happening (it's reading data every time)
it's the sprite index/source rect that is cached, which isn't a problem in this case
fromfile would be assets/furniture_{{season}} and target would be something like {{ModId}}/Furniture
if its reading from data every single draw call then i guess you can do it either way
if you make the target {{ModId/Furniture_{{Season}} you will have four different texture names but a different one each season
so then youd have to be editing the furniture texture field to use the token too
it doesnt track
the implication was that you'd be editing the furniture text field as thats where the season token would be as well
i think nic might have just gotten mixed up with map tilesheet names
does anyone know of a seasonal furniture mod off the top of their head i could peek at? i tend to understand better that way
if what selph says is true then it does track because it will read those fields every single time
Yeah it is
yeah it doesn't have to be strictly prefixed like maps
the map prefixing only works if your map is outdoors anyway, IIRC.
but the general approach should work as long as you load them all ofc
Indoor maps don't check for seasonal variants automatically.
Clearly someone should make seasonal furniture that just increments the index
Maps...the game just switches out the tilesheet source
i think if you're loading four different textures and swapping them with the token in the furniture fields then thats fine too, but i wouldnt load them to a texture containing {{Season}} then
you'd have to or else the target wouldnt match
fun fact, this is a thing but only for BCs
could i achieve the same with specific dates? the mod i'm updating are bushes as decorative pieces of furniture, and back when DGA was still used, i made it so some of them automatically changed to have berries on them in berry season as well
okay it doesnt matter because obviously this isnt helping the original asker
sure there are CP tokens for that too
if in the Furniture data you write {{Season}}_MyFurniture for the texture then the target of your load also needs to be called {{Season}}_MyFurniture or else it wont update
Usually for seasonal objects/furniture, I see people Load the spring version once to a base furniture sheet and then use EditImage to change it conditionally based on the other seasons.
interesting 👀 do you recall the name of one of them so i could have a look?
(also, please be aware if you do load anything based on only the {{season}} token without setting a base, you may run into weirdness with anything from that sheet placed on Ginger Island if it's not summer in game)
So you may need to at the very least always load the summer variant directly as well to prevent that, in the case of the automatic prefixing.
But again, I think that's only for actual outdoor map tilesheets.
i prefer to do the editimage method to account for ginger island tbh
It might be easier to find a seasonal portrait mod to demonstrate the method?
Any that don't use the Appearance system probably do something similar to this use case
Forgive me for not being able to write up an example right now, I have roofers working overhead and I can barely hear myself think at the moment.
good idea! i'll see if i can find one, thank you
what did I do now 😭
you have to create a new save if you changed a location name
HOW DO PEOPLE MOD IN GENERAL
learn one thing at a time until you know all the things 
Ahhh makes sense
i just started. most of the time, i scream and cry and ask the very kind and patient people here when I get stuck
real
This syntax should work as a content patcher condition, right? Working on fixes for multiplayer.
I don't know if you need a space between anyPlayer and | but that looks good yes
OK thank you
patch parse is fine with it at least, and CP's pretty consistent
This is fine
ouuu would a kind soul please tell me how the heck i make a tile on a map impassable 😭
(using Tiled atm) im trying to fill some space with solid tiles that npcs and the player cant walk through, like walls, and im so dumb and cant for the life of me figure it out. i was told to use the building layer, but that did nothing TT
ive scoured both wikis and i tried many things but to no avail
this should work with buildings layer
anything painted on the Buildings layer is impassable
unless you specifically make it passable
be sure you have it named buildingS
not building
(an error i definitively made a couple of time at least)
okay...
Buildings2 won't work, only Buildings?
i swear i tried this and it didnt work but i will try again.
correct, only Buildings
ah okay...
that might be it then
also thank you all for responding ;;
if this works i will be over the moon, it's been hours TT
For future reference, any layers with a number on them are for draw layers / visibility layering only, none of the tile properties actually apply on them. 🙂
ah okay! thats really useful to know actually
ive not done map edits and stuff before so i appreciate the help fr
hm...no it's still clear ingame. i wonder what im doing wrong 
this big void should show up red TT
does using transparent tiles not work?
it should
can you use the wand in tiled and hover over the area?
and look at the bottom
here my wand is on an area filled with invisible tile
here mine is
here you see it is selecting empty tiles, which is mentioned in the bottom by "vide" (which means void/empty in french)
so it should be good
ensure you are testing in game with THIS version of the file, and not, like, a version in another folder
(which is a common thing that happens even to veteran modders)
mm, ive been copying the tmx over from my edit folder into the mod each time
ill try again to make sure
nope, it's still clear
i double checked it was the right one
gah i guess im cursed
you do not have no clip enabled or something
well, i figure the tool im using to check accessibility would tell me those tiles arent clear, no?
hmm
and if i noclipped into them and turned it off, i wouldnt be able to keep walking
usually pathos' tools are accurate indeed
no, you can't put tilesheets tiles in pink layer
thats objects though...
assuming you mean data layers?
yeah i thought so
some other stuff can go there
yeah
(just want to mention we may ask redudant questions when facing strange things)
thats okay i dont mind
can we see a screenshot of your map in tiled? (I scrolled back and don’t see one but my discord is being glitchy so I may have just missed it)
sure, it's not my map btw, im just editing it
this is the transparent area that supposedly is impassible but is
can you hide every layer other than Buildings for a sec? (click the eye next to them)
Having the data layers mixed in with the tile layers is making my eye twitch
are you sure there’s something on those tiles?
all of SVE's maps are like this and it makes me insane
lol
there’s no tile selected in the tilesheet viewer that I can see
but....why.... My heart is sad
i changed it just now
to check if it was like, even there
it was the very top left one
what do you mean by changed it?
like
paint bucket
different transparent tile
it now says 205 but like, it was always a tile
sorry for the confusion
can you try closing the game completely if it’s currently open, then running it again, making a brand new save, and seeing if you still clip? (it probably shouldn’t make a difference but just in case)
what are the permissions on the mod you’re editing? are you able to send your map file?
permissions?
what mod are you editing?
it says i cant share the file on any sites
hmm, yeah
can you add something super obvious on the build layer right in the middle of the room?
ok
so, i added 2 grassy chunks in my house and outside in the void
they work fine and now so do the transparent ones???
only..i thought it would fix an issue where the toddler decides to play in the void around the house instead of inside it, since there wouldnt be anywhere for them to sit
but, they just, walk around in the void like they dont care anyway 
a sane person would give up and use a different house mod but i have spent 6-8 hours decorating this thing pixel perfectly and im reluctant to scrap it
thought i might as well learn about mapmaking in the process

back to the drawing board, but i learned a lot with this so thank you everyone
i do wonder why the transparent boxes werent working before and are now although nothing really changed but whatever
is that an issue with the map or is it an issue with the kids? do you have any mods that change the kids' behavior?
just aesthetics i think
mhm, i cant see anything kid related other than retextures
i dont even know if there are mods that can do that
if i could make one that forces them to wake up in a specific coordinate every morning i would
i mean anything with C# can do anything but
true true...
helloooo does it matter what you call your tile layers in tiled?
It does
use the first tile (black tile) from the indoor tile sheet and put it on back layer
move the visual stuff to back1 if you gotta
aw crap okay
Yeah, you have to use the Back, Buildings, Front, AlwaysFront naming scheme for your Tiled layers (both the tile and object layers)
If you need more of a layer for draw layering, you can add a number on the end, yep
Negative numbers work to draw under a layer also
RaffieJohn's Mod's
how would i label a item as something to propose marriage with with?
🤔 i know you can make a roommate proposal thing that you just add a context tag to
but does that also apply to marriage? like not just the marriage pendant?
i dont know, and do roomates have childern?
they dont
theyre adopted arent they?
from vanilla, you can't adopt children with krobus at all. you need to have children from a previous marriage
I have a question if it isn't an issue, I am trying to convert a few older mods to AT for personal use and am trying to get the CP2AT converter on github to work but I'm having issues with syntax errors with the lib.py in the json5 extension it requires. I don't know how to fix them and Google hasn't helped, if it is allowed I would appreciate some help
hellooo what's the command for console to show you what you did wrong again?
totally rhetorical question everything's absolutely going fine-
So it has me use "py main.py" to start the command but the error that appears is:
from json5.lib import JSON5Encoder, QuoteStyle, load, loads, parse, dump, dumps
File "C:\Users\ldbma\AppData\Local\Programs\Python\Python313\Lib\site-packages\json5\lib.py", line 62
about performance (a) you probably shouldn't be using this library in the
^
SyntaxError: unterminated string literal (detected at line 62)
This is the relevant section of the file it is talking about (lines 57 - 65)
*Note:* PREFER_DOUBLE and PREFER_SINGLE can impact performance, since in
order to know which encoding to use you have to iterate over the entire
string to count the number of single and double quotes. The codes guesses
at an encoding while doing so, but if it guess wrong, the entire string has
to be re-encoded, which will slow things down. If you are very concerned
about performance (a) you probably shouldn't be using this library in the
first place, because it just isn't very fast, and (b) you should use
ALWAYS_DOUBLE or ALWAYS_SINGLE, which won't have this issue.
"""
depends what you did wrong? if you want to see details about patches applying, use patch summary. if you want to see the result of a patch on an asset, use patch export
Somebody has done a Fashion Sense like mod, but for villagers and pets?
I dont think so, but I could be wrong
These are the closest I know: https://www.nexusmods.com/stardewvalley/mods/36122 https://www.nexusmods.com/stardewvalley/mods/13940
Hello everyone. I have been working on a mod that takes place in a custom location, and I've been running into some issues. Is there a way to decrease the chance of catching garbage items when fishing for a custom location? And is there a way to load a map patch so the changes will be present immediately after an event ends?
So far I have mostly used Content Patcher, but I'm willing to make edits with C# and SMAPI if needed
I will try adding more fish, thank you!
As for loading a map patch... you can sorta cheat it by warping the player out of the map and doing your map edit OnLocationChange
When you say out of the map, do you mean to a different one, then back to the one they were in?
Yeah!
Is that something I should do in Content Patcher or C# code?
You can do it in CP i think
Ok, I will look into that. Thank you so much for all of your help!
yes! sorry for the late response
it should be possible to do it by the dialogue question syntax
have you tried this https://stardewvalleywiki.com/Modding:Dialogue#Question_example
ty for that! I also had another question, how can I make a dialogue tree appear for a character everyday and with any weather
also I don't really understand what the 305/306 is in the example code
Only have Mon-Sun dialogue keys for them and nothing else.
305/306 are response IDs. They can be anything.
They can be Response01/Response02.
tysm! appreciate it!
"why did nexus log me out"
"oh, to make me read a new TOS, of course"
This is probably pretty standard, but.
Every time you wish to use our site, please check these terms to ensure you understand the terms that apply at that time
Seems so silly - nobody is gonna say "oh, lemme go and make sure the TOS hasn't updated before I go check for mods uploaded since yesterday"
Anyone have a diff of the changes since I don't have the old one memorized
mhm, pretty sure the courts would find that as an unreasonable request if challenged. ToS have to remain legal and resonable
Households or facilities from which multiple users (and therefore accounts) may access the sites and services are encouraged to inform staff to ensure that there are no potential misunderstandings in the case of moderation review
Not a requirement or anything, but still feels weird. (Maybe standard too? I don't know)
I'm not sure I've read this closelsy before to be fair
that's a layperson-compatible way of explaining that they will use your ip address to inform their decisions
I figured, but like... IPs can be shared even beyond a single household
So it feels weird
oh, of course
In particular, we may retain your content indefinitely and are not obliged to delete your content if you so request. The rights you grant us continue after this agreement is terminated or your access to the site is withdrawn by us
I'm sure this isn't new, but I've never noticed that second part. Specifically the "your access to the site is withdrawn by us".
I get why its like that - poeople can't break the rules and get banned to get their mods removed - but again, it feels weird
Like, "if I get banned, they get to continue to profit off what I made" sort of thing
Also "Rules about linking to our site" is just hilarious sounding
Illegal <a href="..."> users beware!
Ah yes, very big change
(wayback machine from october)
Nothing really in file submission guidelines, the only other place I'm checking is privacy policy
Which is mainly this:
Also this, I guess
Movement Overhaul looks fun
Rather than just copy and paste the same code block twice I was trying to make a when condition that has an "or" feature. Neither version I've tried has worked and you can see the two types with the two texture override things.
https://smapi.io/json/none/a759a513bd904a748c88e063fbead08e
also the sapling part just doesnt animate despite the main tree working
this is a follow up to my questions about animating textures with spacecore
your second patch's coords is incorrect; it corresponds to this region:
Y gotta be 96
what do you use to help see that?
is the origin at the top left or top right?
top left
ah I see
as for your first patch you're missing a bunch of escaped quotes
well for both patches really
for the when conditions?
you have to put everything inside a single quote
and any quotes inside those quotes must be escaped, or the JSON parser thinks it's ending your quote instead of part of it
"\"this is just one string\""
""this is two empty strings with invalid text in the middle ""
interesting
does the when logic even work the way im trying to make it?
like does OR actually work in this way
if you write it correctly then it should
definitely not in the second way you write it
also it's probably easier for your own sanity to use dynamic tokens instead of dealing with nested quotes hell
ok I made some changes
it doesn't seem to like how I made a token for some reason
"Technical details: Invalid property identifier character: {. Path 'DynamicTokens[1].When', line 40, position 2.
at StardewModdingAPI.Toolkit.Serialization.JsonHelper.ReadJsonFileIfExists[TModel](String fullPath, TModel& result) in E:\source_Stardew\SMAPI\src\SMAPI.Toolkit\Serialization\JsonHelper.cs:line 86
at StardewModdingAPI.Framework.ContentPack.ReadJsonFile[TModel](String path) in E:\source_Stardew\SMAPI\src\SMAPI\Framework\ContentPack.cs:line 76
at ContentPatcher.Framework.RawContentPack.TryReloadContent(String& error) in E:\source_Stardew\Mods.Pathoschild\ContentPatcher\Framework\RawContentPack.cs:line 80
at ContentPatcher.ModEntry.GetContentPacks()+MoveNext() in E:\source_Stardew\Mods.Pathoschild\ContentPatcher\ModEntry.cs:line 459"
this is different from what the json file checker is saying so thats why I'm confused
ok wait I just messed up the brackets it looks like
yeah you're missing some closing brackets
every opening brackets must have a matching closing one
yeah one sec
im trying to implement gmcm for c#. it says to just copy the api into my code but its massive.... can i just copy it into another class file?
and then in my code do like using GenericModConfigMenu
yes
no way.....
also you should only copy the methods your code calls
yeah i guess i gotta look through it to see how to actually use it.. i just didnt want to make my own code harder for me to read
how come my mod can't call if (IsItemMayorShorts(Game1.player.ActiveObject) { ? it says it's public
(i'm not even sure i want to call it, but i can't think of another way to check if ActiveObject is (O)789)
it's static, so you will need to say ClassName.IsItemMayorShorts (i don't know what class it is, so sub it in)
i see i see thank you
do all objects have a quality (iridium/gold/silver/plain)?
Heheh
thanks!
half the time i try and remember if Items are Objects or Objects are Items i get it wrong
wait i better check just in case: if (Game1.player.ActiveObject is null) checks for an object like (O), right?
not some weird other type of object
no
(BC) and (F) are also Objects actually
man glad i checked, i don't want anyone throwing beds into the bonfire
as well as mannequins, and trinkets
but not tools and rings (despite the latter being in Data/Objects)

okay then i need to figure out a way to allow only (O) objects
i also need to figure out why i'm getting this; it says i need to create a new instance of the class, but the class is ModEntry so ??
ActiveObject.TypeDefinitionId == "(O)"
addEvent is an instance method, not a static method
so you need to call it on a Farmer object
e.g. Game1.player
(you can also use the shorthand ActiveObject.HasTypeObject() if you like)
oh fancy! cool
although actually the way i implemented it is checking if is not object send error message return false
the crap at the bottom still needs to be translated from pseudocode but this is what i've got so far, which i'm sure will need to cover more cases
i'm also not sure about Category to check quality, i forget where i got that from
might i ask whyu- oh ok
Category is not quality yes
i think i pulled that from luau code or something, gotta change it
oh wow is it really just .Quality instead
@brave fable @brittle pasture just wanted to say thanks for all the help and references yesterday with the light stuff. i got busy with bathing and putting my kid to bed.
I actually managed to produce light today after going back and reading everything + slamming my head on the keyboard. It feels like a win.
would this HasOfferedItem check even work? i have to define it to use it but i feel like it would always be false like this, if it gets reset every time the player does the tile action. i tried to define it outside of the method but it was angry at me
you are correct that it will always be false when the function runs
damn
it's a local variable that gets initialized inside the function and doesn't live past it
if you need it to persist you can define it as an instance field in ModEntry (where I'm assuming this function is) or make it static
and obviously you need to set it back to false again at some point after setting it to true
when i define it in ModEntry, how do i get/set it inside the function? i tried ModEntry.HasOfferedItem (and a bunch of others) and none of them were able to do it
you can just use a mail flag
and arguably should, so you and other mods can just check it elsewhere rather easily
I was about to get to explaining whether they need it to live in the save lol
and then what, conditionally edit the map to not have the TileAction if mail flag?
even if they dont need it in the save, a mail flag is just very easy to use
just use the mail flag instead of your bool
for your information regardless, ModEntry.HasOfferedItem would work if it's a static field (ie it's bound to the class itself rather than any specific instance)
if it's not static, you need a reference, and in the method of a class you get a reference to the object calling said method with this
this.HasOfferedItem
oh how could i forget this
(I'm assuming you don't have, erm, formal training in programming? /gen)
i have 1 semester of python and half a semester of java before i dropped the class bc i was failing
got it, just wanna know so I can better tailor my advices 
i appreciate it lol
question regarding mail flags: is it better to use one and then reset it every year, or should i just have it live in ModEntry so it gets reset (i assume it doesn't live in the save if in ModEntry?)
i need this tile action to be useable during a festival once a year, but i can't have players throw in multiple items
its not a mail flag if its just a field in your mod entry
a mail flag would mean sending mail to the player(s), like you would with Content Patcher
and then checking if they have that mail in your tile function
a static field in your ModEntry class (or elsewhere) would not be in the save at all nor could it ever be checked for besides from within your own mod (reflection notwithstanding, dw about it) and it would not persist across game launches
a static field is easy, but so is a mail flag, and the benefit of a mail flag is that other mods can then check for it, too
(for nic's use case where it's a luau-like thing to have it run once per festival I would argue that a static bool is the perfect use case)
(well, almost perfect, we probably need PerScreen for local coop)
if i want to add support for nic's festival with my own NPC, what do i do if i want dialogue dependent on whether or not they added an ingredient?
correct me if i'm wrong, but couldn't you use the CTs i added?
not if i dont know what CT to check for. but then that begs the question: why not check for the CTs then, instead of a bool or static field?
hmm can you reset festival dialogue even
getting into bike shedding territory here
theres also no reason the flag needs to be reset right after the festival
well mainly because i didn't know how to do that in C#
but that would be possible you're right
i can still use it in daily dialogue the next day, like "Why didnt you add anything to the pot?!" or w/e
BETAS can make whatever dialogue you want happen at the festival
i do already send mail about the festival to players the day before. i could presumably remove the mail flag with that same trigger action, if i use a mail flag
a mail flag seems like it's better set as part of the upcoming events in the branches above I should probably stop now
anyway yeah look at mailReceived
no i appreciate both of your input!

