#making-mods-general
1 messages · Page 26 of 1
what's breaking my brain is the resize
Yeah, those realMilliseconds fields are definitely not netfields, so I don't know how they could sync in MP.
But then again, neither is ExtraMillisecondsPerInGameMinute, yet it works somehow.
yeah, sorry! That's what I meant for "singleplayer or host". Host can write to the time. Farmhands just repeatedly read from host
oh, the clock does
oh. well i mean its usually fine to assume that the farmhand should have the same configuration of the host anyway
What do you mean exactly, the clock does?
the clock syncs
So if two players are running their clocks at different rates...
What happens? Total chaos?
(i also did not realize when i originally chimed in that this was in the context of speeding up time for short bursts when doing something admittedly)
I think I'd better just disable it in multiplayer and even co-op. I mean, how messed up would it be if the host decides to fish and you have to react 10 times faster until they're done?
That has to be about the worst MP experience imaginable.
could check to make sure everyone was fishing
Perfect for a challenge run of the mines
Yeah, like checking to make sure everyone is frozen before freezing time.
i'm sure you could have the farmhands play with a bullet-time mod in the mines to balance it out to regular time
But... eh, I think it's a narrow enough corner case to ignore.
tbh multiplayer without mechanisms that pause time is brutal
tfw your only case is relegated to narrow enough to ignore 😔
I think a bullet-time mod in farmhands and speedup in host would break Stardew's netcode, either that or just epic fail for the farmhands.
if you didnt feel like checking if everyone was frozen you could also just have farmhands ping off a ModMessage to say "I'm fishing!" or "I'm done fishing!" and store that
Was this self-referential or were you referring to my case?
self-referential! i dont play singleplayer, i only play multiplayer, so multiplayer cases are the only cases i encounter
I pretty much exclusively play with pause in multiplayer, and from what I can tell all it ever needed was for the core functionality was to just manipulate Game1.gameTimeInterval a bunch
Oh, but this is just one minor feature of the mod, the rest should still work in MP.
Pause works in multiplayer? As in, one player can effect a pause without everyone pausing?
in vanilla, there is no multiplayer pausing at all unless /pause is used
if you've got the mod to help, yeah
pause in multiplayer makes it so if everyone is in a condition that singleplayer would have paused time, time is paused
It would seem to make more sense to just allow one player to force pausing for all players.
ie, if 2/4 of the people have their inventory open and the other 2 people are in events, time is not progressing
Yeah, same in co-op.
But if one player has a menu open and the other player is actively doing stuff, then not paused.
pause in multiplayer does have a vote system as well, to vote for time to be paused, and host has an override button to just force time paused (very useful when people are joining)
but it doesn't prevent player movement or activity during pause
All the things I never learned from single-player Stardew.
(to be clear, "Pause in Multiplayer" is a mod)
(not the act of "pausing in multiplayer")
it does however pause buffs, health and npcs/mobs
Ah, I see, so it is not a true pause, it just freezes time progression.
For example, it does not freeze enemy AI (or does it?).
it doesn't freeze their ai, just undoes any of the ai's outcomes
Meaning what... prevents them from moving? Disables collisions, damage?
pause in multiplayer doesn't actually use any reflection or harmony to get everything working, just ontick setting the values to the known good values at the time of time pausing
i cant remember if it prevents collisions but it does lock position and prevent damage yeah
I'm only really curious about that in the context of radial menu, since it's supposed to freeze controls (including time and enemy AI) while opened and that obviously does not work in co-op/multiplayer.
it would prevent them from moving as position is overriden every tick, along with the players health
So you're saying it would in fact work if they had that mod installed.
(the pause in multiplayer mod)
if the radial menu meets the characteristics for pause eligibility, yes
It sets Game1.freezeControls while open.
Which is as good as a pause for 100% of singleplayer.
(and works if both players in co-op have it open)
does that affect smapi's Context.IsPlayerFree?
Yes.
then it will check that and pause it if the player is not free, so long as the player is not also using a tool or fishing it seems
among other various checks like taking into account the voting and whatnot
In any event, for the speedup I'm going to go with the original strategy of not doing it in MP; if you are dying to use this fishing mod and can't live without the speedup in multiplayer and want to coordinate your fishing with your buddies (lol), then we'll chat after the V1
(this is all assuming I get it to work at all without blowing up the game)
it wouldnt have to be coordinated, just only apply if it'd apply to everyone, but thats fair
Well I wouldn't want it to happen randomly as perceived - like one minute you're fishing at normal speed and then suddenly time starts zooming by because your peer decided to fish too.
That'd be slightly less jumpscare than having it happen in the mines, but still pretty weird.
it would be nice if the penpals mod had option to sort giftable people to the top
I could do that. Why are so many ungiftable, though?
cus i installed this in my almost perfection playthrough
so these guys are all max heart already
Makes sense. I'm with ya, it's no fun scrolling through a bunch of disabled portraits.
Does anyone know where I can find the gourmand frog's sprite? Don't see it in cursors or cursors2
Characters/Gourmand
Thanks!
I've gotten so used to sprites being in unexpected places I did not consider that lmao
I got Game1.player.CanMove = false; to work, but now it freezes the entire game which is strange, I didn't know it could do that.
best way to go about adding new mob drops? i forgot how to edit strings like this with CP
"Green Slime": "24/5/0/0/false/1000/766 .75 766 .05 153 .1 66 .015 92 .15 96 .005 99 .001/1/.01/4/2/.00/true/3/Green Slime",
TextOperations
guide for text editing is here: https://github.com/Pathoschild/StardewMods/blob/stable/ContentPatcher/docs/author-guide/text-operations.md
oh is it just where you add an integer index to the TargetFields
yeah 6 is the monster drop location
oh that's wonderful ty
(btw, you might want to remind me in a day or two if there hasn't been any update. I seem to be almost at the point where I need a to-do list.)
Oh okay, focustense (#6231044) (1d | <t:1725938449>)
no
Oh, I didn't intend for that to happen...
you don't have to ask for the reminder at the start of your message?!
doesn't look valid. should be ANY "SEASON Spring, DAY_OF_MONTH 1 2 3 4 5 6 7 8 9 10" probably
Apparently not if it's special robot-to-robot comms.
if that's what you're looking for
unless you want it to be an AND, in which case you don't want ANY
it can be both spring and the days 1 through 10
the intention seems like winter or first day of spring (i didnt paste SEASON Winter)
hm i did it wrong before then
if the one with a comma is a trigger then it will never do anything except spit an error because it will look for the "1" GSQ after looking for the "Season" GSQ
@dreamy cedar hello i ran into a game freeze with exception from junimatic pathfinding while starting movie in movie theatre, it seems not consistently reproducable though. can make bug report on nexus if you prefer
https://smapi.io/log/edd986fc1f99487ab13376d66137d2a4
Log Info: SMAPI 4.0.8 with SDV 1.6.8 build 24119 on Unix 6.10.6.1, with 50 C# mods and 59 content packs.
Yeah that isn't valid
(Quietly shrills my gsq checker)
who needs a checker if you just memorize all the GSQs
(Fun fact: that was actually written to find bugs in the base game. Found two.)
This turned out even more hilarious than I'd hoped. Just try to tell me this isn't the best thing ever.
that's awesome.
Penny got a little stuck at the end but meh. That's with 4x acceleration.
Is there an easy way to prevent a tool from being recovered by lost & found if it isn't in the player's inventory after day change?
Game1.checkIsMissingTool seems to be where the check happens. Just postfix it to set every value of the missingTools dict to 0
How'd you find that? Decompiled code?
Sorry, what am I looking for?
This part of the mod accelerates time while waiting for fish bites. The speedup isn't a video editing trick, that's what the game is actually doing.
Mainly, watch the clock and the NPCs.
https://www.youtube.com/watch?v=3BZkbbEI4u0 the early tests of it during the modding alpha, and I think this was after some of the script errors got fixed
(I can change the speedup to 16x in config if 4x not dramatic enough for demonstration purposes)
does the pathfinding for NPCs get worse as the game speeds up?
Could have been a coincidence, I did use world_settime to skip ahead to the part of the day where those NPCs start walking, so maybe Leah (e.g.) wasn't supposed to be in that exact spot at that exact time.
is there a way to make an npc manifest only after a certain event?
immediately after, no.
the next day, yes using the UnlockConditions field in Data/Characters (See: Kent and Leo)
anyone know any mods that have added new trinkets yet?
I have a wip framework
cool
The basic things it can do is animate the companions in simple ways
And apply effect like "buff" or "projectile" or "drop item" on particular events
can it do like arbitrary sprite sizes?
Yeah
Yeah it can do that
you are my savior
hell yeah
yeah i'm patient lol
i'll get to it eventually hopefully
tbh the example files look solid to me tho
This stuff ain't coming out before 1.6.9 since game changed a bunch of stuff in the trinket classes
directions indicated on the sheet is so rare lmao
i've made several animal mods and still am not confident about which frames are supposed to be what...
well i needed that for testing cus im not very good at imagination
its also got little dots that indicate which frame
smart!
if u want a build (for 1.6.9) i can make one and put on github
glad there's interest 
Interest here too, I have plans for a trinket that will a little jumino that follows you around and does stuff. Bit down the line though.
that's a good concept
I haven't really tried this yet but it should be possible to use trinket tinker for the basics, and only implement a custom Ability class in C# to do the special not covered stuff 
atm it does some healing but not as much as the fairy, maybe a root but not as good as the ice rod, some mana regen, and have an option to infuse the magic hair gel into it so you can look fly and have your minion at the same time. Subject to change though, I might discover something cool while building the rest of this out.
Oh well I didn't impl mana regen ofc
Do you have any resources on postfixing that method?
Hair gel 
yeah mana regen is easy enough to put in a C# class
Thank you!
But yeah I would like to make it possible to use this framework while adding just the classes u need
harmony was not as scary as I thought.
It's scares me 🙃 I'm working on my first ever mod
this may also be helpful with its Stardew-specific examples https://stardewmodding.wiki.gg/wiki/Tutorial:_Harmony_Patching
The world of Harmony is a bit of a lawless land, but it's incredibly powerful. You can pretty much implement anything you want, but you can also break anything you want. With that in mind, you should begin by reading the main wiki's intro to Harmony to get you set up. This tutorial will focus on the actual patching and assumes you already unders...
You may want to consider if your item really ought to be a tool
If it's meant to be loseable like that
I don't think the missing tools check for modded tools. I only see axe, pickaxe, hoe, watering can, scythe and the return scepter in the code
I am trying to patch a map with a config condition. Does it look right for the patching of the map or not?
asset requested has a "lost on death" bool for custom tools but you want to make it gone forever?
Is Maps/seeyou a custom map you loaded elsewhere
Yes, just before
Yeah looks like right syntax, can try it in game
The red squiggles is from default json syntax check
You should use jsonc instead
CreepFactor shouldnt have braces around it
Oh! That's a good catch, thank you 
Quick question, if you have a custom map with an embedded custom tilesheet and then later try to Load that tilesheet instead for conditional edits, will it still use the embedded version? If it does, is it possible to unembed the custom tilesheet without having to recreate the map?
I don't want it to be gone forever, it's returned back to the user... but maybe I am biting off more than I can chew for this first mod by trying to include tools with it
when you say embedded do you mean the tilesheet .png is just in the same folder (in your mods folder) as the map file itself?
or do you mean embedded as in theres no separate .tsx file defining the tilesheet
Yep, and I checked the "embed in map" option in Tiled when I made the maps
Possibly using the wrong terminology, maps aren't my forte 😅
i think that just means the data about where to find the tilesheet (and its tile information) is in the .tmx itself, otherwise you get a separate .tsx file alongside the .png
embedded is what you generally want i think, and it should mean it just looks in the same directory that the file is in for the tilesheet
I think SMAPI? or maybe content patcher? one of the two makes it look in your mod folder first, and if it doesnt exist, it checks Maps/
That's what I thought initially, but I don't know why else my edits wouldn't be applying 
I would suggest deciding on a MVP, minimum viable product. Make it simple, go in game and test it. Add more functionality later. You get the dopamine hit of seeing your stuff in game and can do more targeted bug testing with each component being separate.
But with that said, AssetRequested is an easy way to add a tool to the game.
if you keep the .png in your folder with the map, it will use that static version with priority
This is my tilesheet load:
{
"LogName": "Load Temp Map Tilesheet",
"Action": "Load",
"Target": "Maps/ForestCrops",
"FromFile": "Assets/{{TargetWithoutPath}}.png"
},```
and this is the relevant edit code block:
```json
{
"LogName": "SF/VT Art Compatibility 2",
"Action": "EditImage",
"Target": "Maps/ForestCrops",
"FromFile": "Assets/{{TargetWithoutPath}}_{{SimpleFoliageCompatToken}}_{{VanillaTweaksCompatToken}}.png",
"FromArea": { "X": 0, "Y": 0, "Width": 48, "Height": 96},
"When": { "HasMod |contains= Az.Foliage, Taiyo.VanillaTweaks.Farming": true }
},
The conditions are met, but the patch summary isn't saying it's applied
(as far as i understand anyway, but im not 100% on it)
So, if yoh want to edit a tilesheet for a map, it needs to not be in the same folder as the map and you need to action: load the tilesheet too
Ack, ping sorry
oh ok i was understanding correctly
Embedded status doesn’t matter though
Ah, so I just need to have it located in a separate folder?
anywhere but the same folder as the .tmx
Yeah, otherwise SMAPI will load it as if it was with internalassetkey
I helped desty with something similar recently 😅
(when i said embedded is what you want generally i just meant bc having the .tsx file is kinda useless and just another file to worry about)
Gotcha! I'll get stuff moved around then, thanks!
Tsx can actually be pretty useful if you’re setting properties on the tilesheet instead of with tile data. Then you reuse it between maps without editing each one
useful in some cases then, i stand corrected 
It's working!
Thanks again!
Hoy, @teal bridge, now that I solved my C# issue, I'm really looking into lazy loading, but I realised that if I make the framework load the properties only when it needs them, modders will only know that their Furniture is unparsable when the loader tries to load them, isn't this an issue?
wouldnt they find that out as soon as they tested their furniture?
yeah, but it feels like it would be easier to debug if there's an error when the game loads instead of when the player places the Furniture
its no real different from having to spawn in a custom item to make sure it works right
also, if I load everything in advance, I can discard any Furniture that has unparsable properties, now I have to implement default behaviors for any property that failed to load
why cant you still discard it?
that's not a huge issue for some of them (just make an empty property), but how would I do it for stuff like collisions?
I don't need to parse the collisions until the player tries to place it, but when they try to do so and the collisions can't be parsed, I can't discard the Furniture type entirely because it already exists in the game Furniture list
if the collision is only being parsed when the player places it, then that doesnt solve the problem of a modder not knowing their furniture is unparseable until even later than the loader loading them
if they need to place it (or try to) before you can parse it, then it doesnt matter when you load it, just when they place it
that's the question: I currently load everything at once, I've been advised to use lazy loading for performance, but that causes this issue
when were you parsing the collisions before?
on game start, or when a pack is manually reloaded
so why cant you still do that when the data is lazy loaded?
the goal is to parse it only when it's needed, to avoid parsing it if it's just to show the Furniture icon in he shop for example
wasnt the original suggestion just to only rebuild the data when the asset is requested after an invalidation?
rather than immediately after invalidation
yeah, but I thought I could go further with lazy loading since a Furniture has so many properties that might not be used immediatly
well, I used to just discard a Furniture on pack loading if it has faulty fields in the data, but with lazy loading I won't know if there are faulty fields until I parse the property that has them, so the Furniture will be added to the game anyway
i dont think half-loading furniture was the point of lazy loading, just not loading the furniture entirely if its never gonna be used. but if you are at the point of loading the furniture, then the assumption is that it is going to possibly be used, or else the asset wouldnt be requested in the first place, so you should make sure its functional
Then there's no point in lazy loading Furniture since the game will request Data/Furniture: it depends on the custom Furniture. My idea was to parse only the fields necessary to fill Data/Furniture, then let more specific stuff in Lazy loading.
also what do you mean by "half-loading furniture"? what's the difference with "not loading the furniture entirely" you mentioned should be done instead?
the game probably isnt going to request Data/Furniture immediately, though, is the point
my "half-loading" was referring to you only parsing the overall furniture but not the properties inside it
is it too late to request for 1.6.9 that npc.tryToReceiveActiveObject(Farmer who, bool probe) be replaced with npc.tryToReceiveItem(Farmer who, Item item, bool probe) so people can check non-active items for gifting 
I want my custom fish to show up at both sunrise and sunset, two seperate time periods. the field in the json only allows one spread opf time though? Could someone give me a pointer on how I could achieve this?
i used npc.canReceiveThisItemAsGift(i: gift) in 1.5 but now that doesn't exist
that removal was listed as a breaking change for 1.6 in general so its potential equivalents were already considered, so its probably not likely especially this late into 1.6.9, and you'd probably have to rewrite a lot of the function to make it work (why replace it instead of add a different function, anyway?), but ofc im not Pathos
does object.canBeGivenAsGift not work for your case?
well they're not exactly the same method
i know, just asking bc its listed as the closest equivalent for that removed function
npc.trytoreceive() has a lot of contextual checks for the world state and such, item.canbegifted() just checks if it's a table or a fence or something 
can you just store the current active object of the farmer, set it to the item you want to check, and call tryToReceiveActiveObject(probe: true) before setting the activeobject back to what it was?
it feels like it'd be simple enough to swap out the Object activeObj = who.ActiveObject; line at the top of the npc method for a param
well, theres quite a lot of places in that function that specifically check Farmer.ActiveObject
not just activeObj
consistently inconsistent
Hi everyone)
New swamp farm! https://www.nexusmods.com/stardewvalley/mods/27631/
dont get me wrong, id also find it useful to have a function that does what you want, but if something like a fix for zero schedules isnt even getting into 1.6.9 bc of possible regressions, i dont think an overhaul of tryToReceiveActiveObject is gonna be either
overhaul might be a little generous, i'd just hope to be able to replace a local with an arg
'zero schedules' sounds a little more intimidating
hi guys, it's me still making my sunroom mod. I wonder who knows the magic behind WallIDs? I'm trying to make parts of my sunroom walls decoratable, and I have checked how it works in other mods but no results so far 😢
its a PIF room. farm, greenhouse, treatasoutdoors
Afaik, you can use WallIDs thing only if your location is recognised as DecoratableLocation in C#, which Greenhouse map isn't
Ah okay! That's good to know
I suppose you could try changing Greenhouse building data's IndoorMapType to StardewValley.Locations.DecoratableLocation and see what happens
Its easier to just delete the isGreenhouse flag from the map
I tried that but it made no difference
so The room isn't a greenhouse anymore. I guess it's not about that?
Yes its not about the IsGreenhouse flag
But I don't know what the effects might be if this is done midsave
I have checked a PIF room that has decoratable walls and it doesn't have StardewValley.Locations.DecoratableLocation ?
Or where should the StardewValley.Locations.DecoratableLocation be in the code?
It's PIF personal rooms
It's a framework for adding rooms
yes it adds doors and then you can select a room 
In that case ignore the whole DecoratableLocation thing, because farmhouses/cabins are recognised as that too
okay 
This is a bit difficult to see, but Maybe try adding WallID | Wall TileDatas to top tiles of your wall, just like in vanilla sheds (which you can change walls and floors of)
I have done it 👍
I have added WallIDs : PersonalSunroom in the map properties. then I have two tiledata objects in the back that have WallID PersonalSunroom
What happens if you change values to Wall
there is a mod PIF Balcony that has these exact values and it's working
Wall is not mentioned in any of the maps i hvae seen?
So instead of WallID I could put just Wall?
Here's a hack
Assign the item you want to a player's TemporaryItem
It's amazing effective as a way to put something in activeObject without disturbing anything
goes back to sleep
the world creates only the smallest problems to test my patience. behold, the default line spacing increased in sdv 1.6, just enough to make my text not fit
Are your tiledata objects named "TileData"? Exactly like that with no spaces or different capitalisation?
yes exactly like that. I copied them first from another map that worked to avoid typos
Oh, you also can only use tiles from the walls_and_floors tilesheet when you make the map in Tiled. It doesn't let you redecorate them otherwise.
ohh. so if i make another back layer that has those tiles under what i have now it works maybe?
or does it have to be in buildings layer?
The white ones might just cover the other ones up so they change so you can't see them, but you can try. I thought that the walls_and_floors tilesheet tiles and the object properties both have to be on the Back layer but maybe that's not true.
Also maybe in 1.6.9 you will be able to use any tilesheet with "walls_and_floors" in the name...I am embarrassingly hazy on that point considering how recently we ran into this issue and Pathos organised a fix.
Ooh I was right hooray #making-mods-general message
I will try it and if not I just leave it and update it later when the update comes. Thanks very much for explaining this!
yeahh it doesn't work. made the back layer to use the walls n floors but no difference
Did you do it while keeping the white tiles? What happens if you get rid of one set of those? (Just for testing so we can check if it works otherwise.)
yes i kept them. I can try without them too
okay I tested and yes, the walls work when theres nothing on top of them
Okay, well that's good. Now you know you can do it so once 1.6.9 is out you can have your nice white walls be decoratable too :)
yep
thanks for the help!
ok so i physically can't do this anyway now, since spacecore.ongiftgiven is emitted from inside npc.trytoreceiveactiveobject, so i get a stack overflow when i try and check if a gift is giftable while gifting a gift
use case: when gifting a wrapped gift, check if the item inside is giftable
cuts deeper than line spacing
maybe it's just better as a harmony patch
um, i guess this is the best place ro ask XD
so, if im playing on xbox, and i join someone who is playing on mobile, and thry have a mod on, will i be able to see and use it?
or is there anyway to get mods on console?
This is more a question for #modded-stardew however, no, you can’t mod on console
You kind of can on Switch, but you're heavily limited in the types of mods you can use, and you risk your Switch and Nintendo account by doing so.
Hello all! Does anyone know how to program changes to tilesheet properties in content patcher?
Like if I wanted to make it so a specific tile on a tilesheet for every instance in a map NPCPassable
A lot of tutorials say "this is more commonly applied to a tilesheet instead of a coordinate on the map" but don't say how you do it
MapTiles on EditMap i think?
oh but that is for particular tile
if it's your custom map you can just edit the embeded tilesheet 
no I wanted to edit the properties of an embedded tilesheet for a vanilla map
i dont thinkn you can do that via a text CP edit
ah okay
it feels like the kind of change that could mess up npc pathing too, if its not your own custom map
I'm trying to make certain tiles in water passable for a mermaid
maybe instead of extending the forest map
fortunately all other NPCs wouldn't start out inside the boundary
I mean she has a custom map but I wanted her to swim around all the water bodies in the game
just randomly appearing
hm
the problem is a lot of but not all water tiles have been set as non-passable and used as random decoration
i really dont think its good idea then, regular npc will start walking into water now
no I mean other Buildings tiles stop you from being able to get there
you have to start out in the water to get there at all
but in the water there are barriers that don't need to be there
unfortunately its not a thing u can do with just content patcher 
u can manually put what tiles to make NPCPassable but that seems like a lot of compat shenanigans
yeah that would be insane 🤣
it would be one thing if it were like, one tile in my way
okay let me ask this then; would it cause any problems if I modify the forest map but not the maps associated with fishing days/ holidays?
she could just avoid the water in her schedule any day there's a specialty map and the change wouldn't be visibly obvious
I was avoiding modifying the town and forest maps because they're so complex
replacing a vanilla map is asking for trouble, unfortunately
it's possible to patch small areas and maybe do stuff with 000 schedule but yeah, i think some warps to custom maps may be better in term of global compat
for non passive festivals npcs don't really path right
it's not a huge deal to cover the lower portion of the lake with an identical lake that just doesn't have rocks
just have festival positions
i mean, it's not a huge deal then
it may be a huge deal later when you'll have to make a patch for SVE and Reimagined 3 and 4 and this mod adding a npc house in the beach and this mod patching the entire area for no reason
i just don't want you to think it'll be just a few patches and all will be fine
in the end you do the project you want to do
Does your framework have console commands?
I'd either handle it that way, or, have a validation that runs on startup.
Only a reload command, I started to work to have a command to dump all the data stored in a Furniture/ all Furniture, so that would also load everything on a single demand
it depends, I can parse basic info about all Furniture to fill Data/Furniture, but some of it (like collisions, lights, seats, ...) can be parsed only when the Furniture in question is actually placed/loaded in a map, and I can parse every Furniture independently
In this case, what we are referring to as lazy loading isn't exactly about the waiting per se, it's allowing it to be invalidated.
You say that they'd have to wait until it's loaded - but then, if they invalidate during gameplay and the data is invalid then, they wouldn't have known at game start either.
After thinking about it for a while, I started to work towards having a default case for every property that could be parsed later and have invalid data.
So the best you can do is either allow the modders to validate on demand (console command) or validate on startup (but don't keep it in memory).
I am rather partial to the approach of "handle invalid data as best you can (don't fail) and just log warnings about it" plus the console command, that to me is the best of both worlds.
validating on startup but not keeping in memory would be weird
glad to hear that, that's what I started to do
I'll have to make sure my default properties won't fail tho, that would be pretty bad
(re: validating on startup being weird) - I suppose, but validating on startup doesn't necessarily require you to load 100% of the assets. For example, suppose the "data" points to some files on disk and you don't need to actually read the contents of those other files, just prove that they exist. It's situational though.
SMAPI validates on startup; for example it warns if you're doing console logging. But doesn't actually run that code.
The trend is Stardew is definitely toward "best effort", c.f. ItemRegistry.GetItemOrErrorData and similar.
I'll just add that a framework is mediating between the modder and the user. So you might think it's pointless to have a console command that forcibly loads and validates the data by cycling through them all and placing them all in a map. But remember that this is a troubleshooting aid for the modder; your responsibility to the player/game engine is to be performant and memory-conservative.
ok, I see what you meant, but indeed, that wouldn't apply in a lot of cases: I have very few assets to check for their existence on startup for each Furniture
totally agree with that, that's why I'm adding new commands with this revamp
Sounds like you're on the right track then.
I'm not sure if this is the right channel or better for the arts one, what's the easiest way to add a gradient effect to a piece of clothing? The tutorials/example packs I can find for fashion sense are for single colour items only but see in other mods like hair that there is a colour mask or something like this and also some accessory mods that have 'layers' in the FS dialog. Anyone know how/where I can find some info on doing this?
oh sorry lol i didnt end up seeing that channel XD laos thanks for the answer
Could someone let me know why my maps aren't working? Its probably simple but im to stupid to figure it out. Heres my log: https://smapi.io/log/ca1047bb1a574d30a70d978822651bd5, and JSON: https://smapi.io/json/none/8b9388b2aa0046e789605df460803732 (Ignore all the climbing stuff, im fixing it. also please ping me)
Log Info: SMAPI 4.0.8 with SDV 1.6.8 build 24119 on macOS Unix 13.5.0, with 41 C# mods and 39 content packs.
Suggested fixes: One or more mods are out of date, consider updating them
Well your map aren't working because of the climbing tilesheet problem, you can post your log again after you done fixing it
For the sprites of a custom NPC, can I use Elliot ones as a base or because it has a lot of specific spirtes, that could be problematic? I want to make schedule animations like fishing, sitting and drinking and he has all of that.
You can, it should not cause any problem at all
kk
Okay, thanks!
And for, like, making the character go all Sundays to the same place?
I know about specific dates, like, spring_10. But dunno how to make it for a specific day of the week
Thanks again!
yeah, still not working, heres the new log. https://smapi.io/log/67b90634761b4b72a656d9edaf5b4b58
Log Info: SMAPI 4.0.8 with SDV 1.6.8 build 24119 on macOS Unix 13.5.0, with 41 C# mods and 38 content packs.
Suggested fixes: One or more mods are out of date, consider updating them
Your tsx file had some problems?
do i need to start over or smt then
You can try to send the map zip file here
I think something went wrong with the tsx file, maybe file path and such that you didn't notice,. which can be fix by just open the file in a text editor and edit it to the correct file path (which is no path, just the name of the png)
For example
I have multiple tsx files, is there a specific one not working? im so bad at this. also by map zip would that just be me sending over my maps and tile sheets?
If you have a file called "spring_outdoorsTileSheet.tsx" then try to open that file with a text editor, and check if the png file in "source" is actually just the file name and not a whole long file path
(did you also make sure to embed all of your tilesheets? i can't check from this dinky laptop)
You can also screenshot what you see inside the tsx file here
kk
honestly I have no idea what the names of things are, so I might have embed it? But i dont know what embed is, sorry.
heres the first one, its just simple, the second one is longer.
there's a little button somewhere next to "add new tilesheet" that when you have the tilesheet selected it'll say "embed tilesheet"
have you edited any of the vanilla tilesheets, or are you just taking from the vanilla ones, exporting the tilesheets, then creating a new map?
See the source="../TileSheets/townInterior copy.png"? It need to be "townInterior" only
ah ok makes sense
Is your townInterior copy.png a custom tilesheet or you want to use the game's one
the games one 😓
Alright, then it should be "townInterior" only
Do you actually have another folder named "TileSheets" inside of your mod folder?
yeah, is that bad?
</tileset>``` oh good my github lets me look at the sourcefiles, it should look like this
keep the same width and heights that they already have, you have to nuke the /...FOLDER/CLIMBING/
replace spring_Shadows with whichever tilesheets you're using
All tilesheet .png, .tsx and .tmx should be in the same folder
ohh ok sorry lol
oh that'll screw with the width and height lemme fix that
So the thing you can do to fix this is:
- Move the pngs to the same folder as your tsx and tmx
- Change the source inside your tsx files to be the png file name only, so for example source="spring_outdoorsTileSheet.png" or "townInterior.png" if you are using the game tilesheet, or "yourCustomTilesheetName.png" if you want to use your own custom tilesheet (if it doesn't work, remove the .png from the tsx file so it become source="spring_outdoorsTileSheet")
ok let me go fix that and ill see if it works, thanks so much!
turns out the monster.reloadSprite method always resets the sprite size to 16x16
poor poor chopped in half golems
Okay, if the fishing animation is a 2x1, how I need to write it? If I do it normally it turns into a fishing pole xD. The numbers are 40, 41, 42 and 43
Spacecore allows for bigger sprite animations
I have spacecore, how I can do it? Im using a .json
You can check out the space core docs
I think Void does it with Fishmonger if you need an example?
Yes please, I cant figure it out
hi thats what i used
Thanks, im going to check it out
I assume, I need to place inside content.json, where the others animations are, right?
yeah
ok, now there is only one error left with mapping, heres the log. https://smapi.io/log/63e89e6cbf7b4fea87d31b1d7e96173b
Log Info: SMAPI 4.0.8 with SDV 1.6.8 build 24119 on macOS Unix 13.5.0, with 41 C# mods and 38 content packs.
Suggested fixes: One or more mods are out of date, consider updating them
What's inside your spring_outdoorsTileSheet.tsx file?
nvm i figured it out
😆
Hmm is giving me an error, I cant find what I am doing wrong
Can you post your log?
Uhhh I fixed it rn, but I dunno why. I just deleted some {}
@gilded comet so when r u make fishing overlay but faster 
moving this here from #programmers-off-topic, fishing info mod sampling vs. permutations
Looking good. So how are you planning to use it?
for me it answers the question of "what's the average coins/catch for (area)"? which is my personal use case
besides "i like programming" and all 😛
after inflorescence if people actually want it 🫡
(How about "fishing overlay but shows the actual fish you're going to catch"? Calculating distributions seems maybe OK for offline route planning but I still can't see the use as an in-game feature.)
i just got obsessed with the math. i love the math lol
tbh if the algorithm wasnt terribly expensive this would be extremely viable over sampling
It's about how much curtain you are peel back I think
for actual mods
I think this would be more of a better fishing tv channel type of mod
though tbh it could be fine as is so long as mod calculations dont block game processing
For ppl into that kind of diegetic info
"fishing channel" -> "the optimal place to fish 2day is [loc]. start minmaxxing NOW"
It's usefulness to me. Khloe's Almanac IIRC shows the defined probabilities of each fish. You can manipulate those with targeted bait, daily luck, seeded randoms, etc. But then you're outside the "planning" realm and into the "execution" realm and that's where the "distribution" becomes largely irrelevant.
i cut out the fish data but this is what i get as-is (likely not 100% accurate)
it uses the same stats for each, so it's a good comparison -- but it hardly represents an individual player and their scenario
I mean, I think the best locations are already known... Spring - mountain on sunny days, forest on rainy days; Summer - beach; Fall/Winter - don't fish.
yeah, sure -- but knowing more detail is what im up to here
(Why would town be different from woods, do they not have the same fish or are you incorporating waterfall stuff, legendary fish and so on?)
Woods have pond I think?
Which is also part of the problem, if you just try to sample for an area then you're ignoring differences in tiles.
Which is different than river
yeah, right now this completely ignores distance and tiles
Sorry, I meant forest there, not woods.
Woods are secret woods.
Anyway, what I was getting it is that players don't fish in "forest", they fish in a particular part of the forest.
smallmouth bass is only in the town river, not the woods river
The cindersnap forest pond is different than river for fish list is what I mean
So yeah it's probably good to consider the within map zones
it should be noted that im far from done with this, the utility still needs to consider a lot more variables than it does now
the only variable factors not hardcoded are weather, season, and time currently
and ideally i avoid pulling up the game to get the max fishing distance possible per fishing area 😛 so ill probably end up hardcoding some stuff anyway under the assumption the world map will be much less subject to change than fish distribution
right now the utility doesn't know anything about the game map, it only looks at Locations.json
And don't get me wrong, as I said this can probably be useful if you are using it for some kind of route planning (assuming you're trying to discover something new, maybe optimize a route using modded fish instead of vanilla fish or something).
I was only pointing out the meh-ness of showing a random distribution overlay in the game itself, since you aren't actually going to achieve that distribution.
Oh honestly I dont care much for established rules of thumb, all they do is get me asking why and how much do they matter
That is very much an IMO thing, but yes, thats also a part of me making this. I like knowing where that comes from
If you are min-maxing then they matter a lot... if not, then they matter not at all.
I like knowing how good each spot is, I just dont like having to stick to a rule of thumb for it
Rather I prefer to stick to numbers I can reasonably trust
Super-cucumber fishing is immensely profitable in Summer 1; pike fishing is pretty meh.
(You'll have to take into account targeted bait eventually and that is a very strange implementation in the game)
I can also link the repo if you want to muse at the code, otherwise I am going to start implementing more control over factors like fish and -- yes, targeted bait
i mean, all i have to do in my mind is recalculate the base probability it is chosen if it is selected
but of course i have to take a better look at it too, i know it's a bit janky
i got a headache enough knowing there's prob=1 for fish inside of Locations.json for those in Fish.json, which then roll their chance in the general fish requirements function
Any time I look at the spider web that is fishing, I want nothing to do with it ever
Didn't mean any of this as criticism, again. The main use case I see is for it is developing/testing new strategies, which is what it looks like you designed it for.
That's why I bypassed the whole issue by shadowing the RNG and letting the fishing loop do its thing.
(But in so doing I've become intimately familiar with the fishing distribution, so... there's that.)
Sorry to bother again, but I dont understand how "DrawOffset" works. I get that with "SourceRectSize" you make the sprite 32x32 instead of 16x32 because clint hammer sprite is quite big. Because Im using the Elliot fishing sprite as a base, it should be 16x16 so I make those four sprites into two, or I am totally wrong?
no you make the whole thing as one sprite
this is also something that is somewhat future-proof as far as new fish goes, which i like
not having to recalculate by hand every time a new fish is added to a loc is cool
though, yeah, forreal this time im going to go back to improving the code
so you make it 32x32 and this increases the tile for the sheet so you have to count your animation frames differently
Yes, that's the best feature, I think. Targeted bait/smoking changed everything and a lot of the strategies had to be redone.
Although surprisingly 1.6 didn't really affect the best locations all that much, only the overall value of fishing and approach to it.
so the sheets tiles change from
0, 1, 2, 3
4, 5, 6, 7
it turns to
0, 1
2, 3
etc
Fishing mods would totally change it, though.
I guess it did? 
I kinda get that, more or less, the sprite in that way is 6, but, it picks up other sprites in that size. But still, dont know how to tell the game to use them
I stopped playing for a good while, so I wouldnt know
The main things 1.6 added were fish smoker and targeted bait.
Should I do the spacecore change and then the "Target: Data/animationsdescription" so it can run it?
Smoker must factor in the cost of recipe + materials + coal, bait maker materials + expected outcomes.
The practical outcome is mainly that fishing is a lot more profitable compared to dives on certain days or at certain times of day, but only if done "right".
One thing in particular im interested in figuring out is scaling fish price by average quality, right now I clamp it to some quality based off average size and use that
after you filled out the spacecore code and put it in your content.json you then make an animation like normal and use the name you put to the spacecore code
price scaling is not quite linear when iridium quality is involved, for instance, so im thinking linear interpolation of the closest two values
Hmm... by the time you're minmaxing fish, you're probably getting minimum gold quality. Depending on player skill the distribution might be anywhere from around 75/25 iridium/gold to 10/90.
Why interpolate? It's your code so just predict X% gold and Y% iridium and do a weighted average.
true that, though rn i assume no perfect catches IIRC
it would be interesting to factor in player skill because the ratio of perfect catches will depend on the fish
like this?
it could just be (100-difficulty)% perfects per fish
Makes sense as a first approximation. If you're working on incorporating that then maybe make perfect % an input to the program.
which puts it as 85% for carp and 0% for glacierfish for example
Granted, perfect super cucumbers or ice pips are a lot harder to get than perfect carp, but the gold difference between a gold and iridium carp is hardly anything anyway.
the harder to catch, the less perfects you get. thats pretty accurate to the game
(and you'd get 20% perfect for super cucumber)
You could look at the fish behavior to decide that, too.
true, some scale for mixed/sinker/floater could be nice
It would be fun to know how much player skill is needed to make challenge bait better than targeted bait
If it ever hits breakpoint
oh that would be rough to calculate lol
player skill is subjective category anyway, but it is nonetheless important.. and truth be told im not considering bait rn either. so much to do
Yeah, sinkers/smooth are generally very easy. And then there's the % chance of... I forget the word, of reversing direction.
idk how your character sheet is looking but that looks about right
just test it ingame
But really, all that being said, fishing is wildly more profitable in areas with the hard to catch fish, and profit from all other fish can be essentially ignored in the calculation in terms of strat-planning.
So just having one input parameter for the % of perfect catches would be a very good first approximation.
Hmmm is not working. It just ignores the spacecore change. Rn is doing the animation 6 and 7 for a 16x32 sheet, the standard walking
Your OnFrame is incorrect - it should be something like [ "0": { "PlaySound": "slosh" } ]
(You have to specify individual frames)
If I'm having Robin send a letter to trigger being able to upgrade the greenhouse, would I need to add an event entry, or would it just be triggered by the pantry being completed?
Oh, let me fix that real fast then
And yes, that might prevent the whole thing from working, depending on how it gets deserialized (there should be a warning in SMAPI if so)
Hey Casey... didn't want to bug you about this with a ping but since you're on... do you think there's any way in GMCM to replace an entire menu page with a custom control, or alternatively, have the mod or section shortcut open a submenu?
You could probably use a custom widget that on clicked uses the IClickableMenu child menu stuff
I mean, without doing horrible things with reflection/publicizer.
Though I might need to make input not be detected if that's the case, unsure
I can't recall if it works automatically
you can in fact use a custom widget that can open a child menu. one sec
(I mean, I didn't have to for Satchels, and it uses the same UI system)
That'd be the latter solution I assume, right? Custom page is probably a bit too out there.
Yeah
There wasnt a warning and now the npc doesnt load, but probably I did something wrong
It sounds like you might have a syntax error
OnFrame should be literraly what you just send me?
Yes, the : takes it as a syntax error
complex widget opens separate menu: https://github.com/ichortower/Nightshade/blob/dev/src/GMCM.cs#L61
So "OnFrame": { "0": { "PlaySound": "slosh" } }
Hmm, maybe I should transpile the GMCM page renderer...
Oh boy
How do I get the tile index of a tile in Tiled? I can open the .tmx in a text editor and see the huge array of numbers but finding the x, y of said tile requires counting commas... I feel like I have to be missing something obvious
ah, thanks, Casey!
Got that, it still does the standard 6/7 walking animation. It loads now tho
Can you post a log and the json?
There is no log about it
Still
If I am reading this correctly, GMCM doesn't actually use submenus for the SpecificModConfigMenu, it just replaces itself (either as Game1.activeClickableMenu or titleMenu.subMenu) with the specific mod config.
Correct, it predates childmenus
So maybe I could just hijack the click on the mod name and open up a totally separate menu. It would "feel" like part of GMCM.
Ah, I thought you wanted just a single part of your config like that, not a virtual entry on the main page
Well, GMCM adds a few things, like the save/cancel buttons in the footer.
(of the specific mod config page)
But aside from those, I was indeed thinking of the entire page.
This probably isn't the issue but just in case, can I see the schedule entry?
https://smapi.io/json/content-patcher/3b56a276f7d34b98b31174f1fbf5f8df
Here, i did one to test the 3 animations I need, fishing is the only complex one, everything else works properly
Are you on 1.6.8 or 1.6.9?
1.6.8 it seems, there has been a recently update?
There's a public beta for 1.6.9, just haven't tested it thoroughly with SpaceCore myself yet
If you run patch export spacechase0.SpaceCore/ScheduleAnimationExtensionData in the SMAPI console and look at the resulting file, is your animation there?
I should probably test Better Crafting against 1.6.9, since there was that change made to crafting ingredients supporting qualified IDs. 🤔
Yeah... fun fact, you can't sell non-object/BC recipes in shops
If you do you'll get the recipe item in your cursor instead of learning it
(I did a sword and could swing the resulting recipe item)
Perfect.
(It was still transparent with the recipe icon though)
It doesnt I suppose
[Content Patcher] Couldn't load asset 'spacechase0.SpaceCore/ScheduleAnimationExtensionData' using a likely type (tried: System.Object). Try either specifying the type, or waiting until the game loads it before exporting it. See the SMAPI log for details.
Okay, that log would really be helpful right now
... System.Object lol
Like the full log? What do I use to send it, last time someone told me to use it so I dont send a full text here
Important note: Your computer username may appear in the log. If your username is your full name, please be aware of this before uploading it.
Please share your SMAPI log file. To do so:
- Open this page: smapi.io/log.
- Follow the instructions at the top of the page to upload the log file. (Don't copy & paste from the console window!)
- After uploading, it will show a green box with a URL to share. Post that URL here.
Please do it even if you don't see any errors. This has useful info like what mods and versions you have, what the mods are doing, etc. If the issue didn’t occur in your last session, please load the game to the point where the issue occurs, then upload the log.
Ah wait... Maybe... I need to update space core? it says it needs an update
Potentially, what version are you on?
1.23.1
New one is 1.25.2 so I assume yes, it could be the issue
If not, I found the log file
Yeah that was introduced in 1.24 it looks like
(I really should maintain proper changelogs so it's easier to figure that out)
Is that still the case
I thought that was fixed
I encountered it yesterday 😄
How would I flag a letter to be sent when the greenhouse is completed? should it be "uniquid/ccPantry?" or /ccIsComplete ccPantry"
To be fair I'm not on 1.6.9, I should try that
(My dev workspace is still on 1.6.4)
(why)
Because Lazy<CatInSpaceSuit> Casey;
You know what fair
Yes, it's in 1.6.9
where does the game use the new cat/dog/horse icons?
what are you refering to?
character creation and pet adoption menus
thanks
(don't know about the horse)
pet relationship menu too, right
that one is a walking sprite, i believe
pet relationship menu? what's that?
animals tab in the game menu
There wasn't that tab in 1.5
in 1.5, the pet and horse icons were on the status page (with their names)
Your trigger action Trigger should be DayEnding, your Condition should be PLAYER_HAS_MAIL Any ccPantry, and for your AddMail action you would want the type to be tomorrow
https://stardewvalleywiki.com/Modding:Trigger_actions
https://stardewvalleywiki.com/Modding:Game_state_queries
It finally works, thanks a lot @next plaza
A trigger action? In the condition it's PLAYER_HAS_MAIL then whichever mail associated to the greenhouse is
Oh is it mail lmao mobile hates me
okay, still looking for places which use the new horse icon
Yeah, HasFlag is for When conditions but PLAYER_HAS_MAIL is the GSQ
as a bonus question: can graphics in this animal menu specifically be moved a few pixels down through CP?
i don't know of a friendship menu offset anywhere in the data models, so i expect no
UI is pretty firmly in the realm of C#
(for NPCs we were lucky enough to get MugShotSourceRect, but i'd say that's an exception)
Did that only come about because of krobus?
i think actually because of lacey 
(i was in the 1.6 alpha thread and i requested support for it in order to remove a harmony patch i was using in 1.5)
(yup works correctly in 1.6.9 now)
I guess it didn't come up when the pet menu was coming about? Seems like it should be relatively the same in functionality
Technically it shouldn't go in your cursor at all? 
That part, yeah, it's a little iffy there
The change was to make recipes obtained outside of shops (ie. from trash diving or fishing) learn the recipe instead of just entering your inventory
presumably it was done via that function that runs on item entering inventory whose name I can't recall
while regular shop recipes still use on purchase
hey, are we able to retrieve current stats of the player? like current speed, current xp for a skill, current health ...
I had to patch the meleeweapon onpurchase thing to get mine working
But again, 1.6.4
Specifically
[HarmonyPatch(typeof(Item), nameof(Item.actionWhenPurchased))]
public static class PurchaseElysiumBladeRecipeFix
{
public static void Postfix(Item __instance, ref bool __result)
{
if (__instance.QualifiedItemId == "(W)DN.SnS_ElysiumBlade" && __instance.IsRecipe)
{
if (Game1.activeClickableMenu is ShopMenu shop && shop.heldItem != null)
{
( shop.heldItem as MeleeWeapon ).Name = "DN.SnS_ElysiumBlade Recipe";
}
__result = true;
}
}
}
You can with C#
although specifically XP percent/progress of a current level for a skill could be problematic, if that's what you need
Oh man, who made the mod that lets you check stats with CP
Why's that? Just curious.
I thought there was a more recent one too
the bit of code that does level ups has hardcoded XP thresholds for each level. hardcoded in a very annoying way
(unless that changed since 1.5.)
how's the link between MugShotSourceRect being accessible to CP defined? how would I be able to tell if any of these variables is accessible to CP too?
but you can't pull current xp, then do math compared to the thresholds?
you can't easily get the thresholds, unless you also hardcode them
ah
but mods could possibly change these thresholds without reading them
depending how the mod changes the xp curve (ugh why would you do that) I can see it being quite pesky to try to grab.
modded fish would change this, maybe? I could totally work on something to tell you the best location even w/ modded fish
i had to resort to a bisection algorithm in XP Display to get it right, without hardcoding haha
Yeah, New Game+ does make levelling take slower for example
It does it using everyone's favorite prefix return false on Farmer.checkForLevelGain
It's a field in NPC data
https://stardewvalleywiki.com/Modding:Migrate_to_Stardew_Valley_1.6#Custom_NPCs
(I should change this to a transpiler at some point I guess)
there's a New Game+?
I meant my mod, sorry for being unclear
okay, but how do I tell if some fields from Animal aren't available either?
it's not in animal data
https://stardewvalleywiki.com/Modding:Animal_data
you can decompile the StardewValley.GameData.dll to see the data model definitions
Unpacking might be kinder
can I just say this code is wonky at best?
(i suggest only bc they are already looking at ilspy, but yes unpacking is important too)
Ah, yeah, I only suggest it for looking at data because it's a lot easier to parse and the json's tend to get all the optional fields just marked as null
where does sprites for seeds stored at?
I think I might've deleted Objects_1 file if it ever existed
Pretty sure it's Maps/springObjects
Maps/Springobjects
!springobjects is a command right?
Most vanilla object sprites are in the Maps/springobjects asset. See a table of springobject sprites by index.
Some newer object sprites are in TileSheets\Objects_2. You can check the entry in Data/Objects to see where its sprite is stored; SpriteIndex is the position, and Texture is the asset name (defaulting to Maps/springobjects).
ohh, thanks guys!
!json you can plug it into the validator site to share it
JSON is a standard format for machine-readable text files that's used by Stardew Valley mods.
If you need help with a JSON file, you can upload it to smapi.io/json to see automatic validation and share the link here.
When making mods, it's recommended to edit your files in a text editor with JSON support, such as VS Code, Notepad++, or Sublime Text. These programs will check for syntax errors.
!codeblock or there's the code embedding for snippets
You can embed code in Discord using a series of three ` :
```
Your code can go here
Even if not a haiku
Just an example
```
For syntax highlighting, add the language code on the same line as the first
``` (with no space, like ```json).
The usual codes are cs (C#) and json.
"Action": "EditData",
"Target": "Data/TriggerActions",
"Entries": {
"{{ModID}}_RobinGreenhouse": {
"Id": "{{ModID}}_RobinGreenhouse",
"Trigger": "DayEnding",
"Condition": "PLAYER_HAS_MAIL Any ccPantry",
"Actions": [
"AddMail tomorrow {{ModID}}_RobinGreenhouse"
]
}
}
},
{
"Action": "EditData",
"Target": "Data/mail",
"Entries": {
"{{ModID}}_RobinGreenhouse": "Hey @,^I noticed the old Greenhouse has been fixed!^If you ever want to upgrade it just swing by.^I can start by adding a watering system.^It will be 5 battery packs, 6 quality sprinklers, and 10,000g.^^-Robin[#]Upgrade Greenhouse"
},
oh wait lol, unmodded also looks wonky
i couldn't remember if it was ' or `
missing player argument for AddMail action
"AddMail <targetPlayer> <mailName> tomorrow"
ah, ty ♥
Target player should probably be Host for a greenhouse related thing
I don't think the farmhands have any real say in that matter?
i mean, they can upgrade coops and barns no?
(I don't play multiplayer lol)
https://stardewvalleywiki.com/Modding:Trigger_actions#Target_player
These are the available targets
there's only 1 greenhouse, are you making some kind of buildable greenhouse thing?
You would need to test if farmhands can actually do the upgrade, I have no idea really
No, i'm making it so that once you have unlocked it Robin will send a mail about being able to upgrade it.
the farmhands should still get the letter though
It wouldn't do any good to send them the mail if they can't is all I'm saying
along with the upgrades
Actually, I guess letters get saved in the impossible to search without a mod menu right?
I think they should be able to, i've been a farmhand on a friends game and been able to upgrade their barns/coops
!startmodding in general is a good place to start with modding
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.
!decompile is good for looking at how the game is handling switching languages, though I don't think you can do it in the middle of a save
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
Once I get the code in a state for testing if a friend can't upgrade, i'll change the player then. Trial and error, and all that. 😄
even if farmhands can't perform the upgrade i would still prefer to receive the letter as one to know it was unlocked as an option for our game in general
Button plays multiplayer so you should listen to her moreso
"AddMail ALL {{ModID}}_RobinGreenhouse tomorrow"
doing world state checks is probably better on the host (if you have reason not to check everyone anyway) but just receiving mail is w/e, I think anyone who plays modded multiplayer should expect that not everything will be 100% for farmhands
Right, that's where decompiling the game would come into play, but I still don't know how much of the game you would have to rewrite to make it switch languages on the fly
I'm going to guess somewhere in the ballpark of most of it though
changing language is on the main menu right now, I wonder if trying to do it in a save would require some kind of hot reload. Interesting idea.
it is currently 1.6.9 beta, so if you ping pathoschild and make a decent case about why something should be refactored, it might make it in
otherwise there's the suggestions forum
Rewriting the game would be exceptionally difficult, well beyond a beginner level. I don't actually know if that would be required though, I think as a beginner you'll have enough on your plate just trying to figure out what it is you need to change in the first place
you need to look at how the main menu language change works and figure out how to both change the language and reload localized assets
Basically you run the ilspy program on the stardew file, open up the decompiled folder in Visual Studio 2022 or whatever IDE you use, and then you can search around in there to see how the game loads languages.
with mods you also need to reload_i18n
!decompile I believe is the command you're looking for
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
Which I did already send before lol
yea this is gonna be C# mod for sure
ooh and a nice little config option for which languages to switch it to.
this one sounds fun
the hardest one to do on the fly is prob events
not sure if simply invalidating the content would affect an inprogress event
i don't think reloading works in an in progress event either? i think it sticks to the script that's already loaded?
Yeah, there's a lot of stuff that's cached, which is why I think it would involve a lot of rewriting how the game works lol
nor would it work on already opened dialogue
possibly not unopened but loaded for the day dialogue either
ah u can open the lang menu with debug language
Oh neat
yea the reloading is pretty spotty
the signs in town dont change until u change location
but items n description seems to work fine
Hm, I'm not sure about that lol
Name but not description here
could you do something like, button press, record player position, change language, fade to black, warp player out, warp player in to recorded position, fade in, new language loaded onto map.
Both the name and description changed in those pictures though
Even switching to Spanish, a language I only took one year of but remember well enough to know that it's not a bunch of angry symbols, doesn't work quite right lol
hm it works for me when i switch to chinese
special linux feature trust
but possibly some wacky font handling too
Maybe need to reload the font file too sometimes
Lmao
I'm on 1.6.9 if so
Switching back to English the broken descriptions are still broken lol
there were some things that did get separated for translations in 1.6.9
Tool related strings were one of them I think
I updated a couple mods and now I have coordinates and map name in the top left... but I have no idea which mod is doing it lol
Well, it's not technically difficult to just loop over every item in the game and manually update their text if necessary
Just kinda expensive
(won't help with the dialogue or signs though)
Every item in every inventory on every map and all the data assets, should only take a couple seconds maybe
I mean there's already a utility function for it
Utility.ForEachItem will loop over every item in the world
Huh, these are different from the last time I poked them
The utility functions?
Yeah, I can't navigate into the helper script
ah yea it dun work on tools
I think that might require more work, there's a lot of text in the game
does work on big craftables
I wonder why it wouldn't let me ctrl click into this function, I can search it just fine in the solution
you would need to make the strings asset for all lines i guess, and then somehow deal with i18n
were you trying to do like, some kind of 'learning language' style?
i don't even know what Ctrl click normally does in ilspy (i assume) so beats me
where everything is a duplicate, aka english vs whatever other language? cause that's definitely feasible but that's also extremely painful sounding
oh solution probably not ilspy. dunno even more then
Oh I don't use ILSpy normally, I typically bop around in my saved decompile with VS
Tools for some reason have cached descriptions, so you probably need to reload the game
(while other items fetch their desc from object data on the fly)
Ctrl click on a function or any kind of reference usually just takes me to that appropriate code
Which has let me jump even into the code I don't have actually have decompiled
oh maybe check the csproj?
But this is apparently decompiled so I'm not sure why it wasn't working
whether it is point to right dlls
i was dum once and moved my decompile, need to fix manually afterwards
Hm, I was having a different issue with weird flickering so I redid my decompile save just this morning
Didn't fix that issue either lol
Looks right as far as I can tell too
https://stardewvalleywiki.com/Modding:Custom_languages if you wanted to go the 'i'mma translate everything with a duplicate' route 
Oh maybe I need to put a reference to Internal
I did actually think Internal was part of the stuff that's not normally decompiled, so I'm not sure why it's showing in my VS as normal because I don't see it in the SDV folder. I think I'm gonna just leave it alone though, it technically still works, just not the way I was expecting lol
hm i have a StardewValley/Internal in the decompiles
Internal is part of the main dll
Hm
for this bit, i probably need to make a seperate edit for the map to load right?
"IndoorMap": "{{Mod_Id}}_Greenhouse",
you can change your gender in the base game, with the shrine of illusions
(why would you want a custom language with different languages for different gender however?)
How important is the step "Click View > Options, scroll to the "Other" section at the bottom, and enable 'Always qualify member references'" in decompiling? I finally got the Mac version of ILSpy to actually open but for some reason it won't let me select new options. I can deselect them but not add them (??) 🫠
(and the token for ~~language ~~ gender switch should workeverywhere i believe)
i think this is same deal as making a custom language that just displays eng followed by spanish for all lines
possibly worse in case a UseGenderedCharacterTranslations is needed for stuff
for time being i would recommend following the C# modding intro links sent earlier
and decompile the game so that u can look at LanguageSelectionMenu
(WIP) targeted bait, and a new print-out at the top to provide an overview of the current stats in use
you didnt c lose off your Data/mail EditData section, you need another } before line 24
😮
you only closed the "Entries" part
oof
those things are so easy to miss. ty
Apparently some stuff got moved around weird, there was an extra } near the end
I really need a hand here because I cant seem to find it for the life of me. I'm looking for the location data for the ice layer and lava layer of the mines in order to put fish in them but the ice pip for instance appears to not even be tied to any location data in the game files after looking at every reference to them. Why dont these floors have location data?
Mine layer fish are hardcoded EDIT: Kinda, only the default fish is, but UndergroundMine still works for 20 and 60
you need C# if you want to add new fish to them layer 80
Wow, really? I never noticed MNF had a C# component.
I guess I gotta figure out C# then? I'm terrible at programming languages
Fiona, More New Fish adds mine fish but I'm unsure if it's updated for 1.6 yet.
it is, I can check its code again. I may have missed if it adds ice or lava layer fish tho
a lot of things about the mines are hard coded btw
u can do stuff in the mine entrance though
maybe u add a little pool there to put fish in
I updated them in a super janky way in my old dwarvish mod for 1.4, and this time around i decided to just make a new area completely "below" the mines, because it's actually less work then trying to overcome all the hard coded mine stuff
I very much want these specific layers, but if MNF has a way I can borrow from it so we'll see
yeah the Caldera is free game
yeah, it's a normal area
I am a curious how Lumina added a ladder to the mine, I assume it's in the C# portion of VMV though
MNF only touches floor 20 which seems to also be a normal area listed in locations
it's just the ice and lava floors locked
huh, I could've sworn it hit all three areas. I guess it has been a while since I used MNF
then the tilesheets and stuff get replaced based on floor level
this is all its got
I'm curious if that actually adds the fish to all the mine fishing levels or only the first one
depends if the code clears then rebuilds the fishing list or if it adds to
probably clears and rebuilds
ok taking a second look at the code for mine shaft, and it seems like for level 20 and 60 it will use UndergroundMine once all the hardcoded fish choices are exhausted?
but for floor 80 it defaults to trash or cave jelly if I'm reading this right?
yeah, 80 is hardercoded
extra hard coded
so, you'd actually have to transpile this to change level 80?
or could you do it with a post?
We need a community framework called SofterCoder which replaces the entire game code
postfix is fine, just check if it's a trash item (the default fallback) and tackle your extra logic on top
but anyway I think UndergroundMine can work? sorry for spreading misinformation lmao
for ice and basic it sounds like it could yeah
I never expected such hurdles to add a few new fish lol
I just want variety on the fun mines floors :/
I guess I gotta figure out what the heck a postfix is
I'm a bit suprised there isn't a full "just edit the mines" framework
as mentioned, you don't have to do C# if you want to add new mine fish to level 20 and 60, just edit the UndergroundMine location
Yeah I heard you and thank you; but I was hoping to specifically add to at least just level 60 but not 20 as well.
Which seems like it'd need C# anyways right?
Maybe you can use LOCATION_NAME? Dunno if it works for mine levels though, let me check
heya! im returning to stardew after a while and im going full on with mods of every kind
does anyone know must have mods? im currently searching all the videos i can cus i wanna commit to a world without changing it that would make life so much better are appreciated (like tinier horse)
#modded-stardew and type in !modrecs ; this channel is for making mods that one is for playing with them
LOCATION_NAME Target UndergroundMine60 seems to work? Tested in the console
oh mb! thanks for informing me tho
wait really? amazing! I wonder if UndergroundMine100 might also....
don't think so, level 100 is gigahardcoded to immediately return trash instead of checking UndergroundMine
I guess this is also relevant as I was planning to try and replace the cave trash for my trash mod, I guess if I can figure out the code for "if lava eel then actuall roll a new fish" for down there I could also "if trash then replace with new trash" using the same skeleton... I'm so happy UndergroundMine60 seems to work but I think figuring out this C# for the long run will be important for both trash and fish mod.
Thanks so much for the help!
17:22:32 ERROR game Failed parsing condition 'PLAYER_HAS_MAIL Zinnalynn.UpgradeableGreenhouse_RobinGreenhouse': required index 2 not found (list has indexes 0 through 1).
you missed the Target parameter
for which player to check
PLAYER_HAS_MAIL Current (mail id here)
(for the current local player)
"Builder": "Robin",
"BuildCondition": "PLAYER_HAS_MAIL {{ModID}}_RobinGreenhouse",``` is what i've got
so i need the current?
you need to specify which player you're checking the mail for
okay. ty
you can use Current, Host, Any, or a specific multiplayer id (but usually just one of those first three)
oh and All
I'm wondering if conversation topic is like spouse dialogue where it eats literally everything
I put it in your thread cause it ate the dialogue
not necessarily
you need to fix the building informations mainly
i18n is not mandatory to do that
Ah. I see what I did wrong.
Interesting, i wonder if this pattern work for other things like map edits
will give it a try!
that GSQ just checks the location's Name property so unless the edit changes that it wont change anything
mine locations are just different/weird
(different/weird in that their name gets generated like that, not that they have a special case in that GSQ)
@final arch: release a JA mod (3y ago)
JA 😭
I rly need context here bot xD
no context, get to it, you've got a JA mod to make now
Holy crap 3y
If I'm trying to get a map to be watered in the morning, would that be an "EditMap" or an "Include" action? I'm having trouble finding where the action for sprinklers being activated in the morning are.
It would be c#
sprinklers should work outside the farm if you mean that
nah, I'm wanting to make greenhouse upgrades, and have the first upgrade water what is inside the greenhouse.
yeah thats c#
there's existing mods along these lines if u want to look at em
I've looked at em. Was hoping there would be a way to do it without c# that language is goofy.
well you can wait for button's cursed harmony cp thing
Cloudy Skies provide a water tiles trigger action
https://github.com/KhloeLeclair/StardewMods/blob/main/CloudySkies/author-guide.md
i dont think- oh
i mean, you can "debug water" in smapi
First time I've heard C# referred to that way.
so you can set a trigger to water the greenhouse map every morning
well i guess with that cloudy skies thing it would be possible
my arcane knowledge gained from remaking the Framework page strikes again
😄
for what it's worth, watering all open dirt in a particular map is simple (as far as C# mod goes)
u can just do it in daystarted event
Fwiw as far as languages go
There's one very specifically that does 3 greenhouse upgrades but I can't recall it right now
C# is not that cursed
Yeah, I've been looking at them. Most of the ones that are upgrades, not just changing the map entirely, are older.
From at least a year+ ago.
I think that's an understatement, it's really one of the best out there. I get to complain about it because I've spent so much time with it and appreciate all the good things about it, same as Rust.
Goofiest language is the polite one that got us on a tangent
lol, oops, apparently i've made it so you can teleport to the island early in my mod :X
(one of the items that can drop is the island totem)
(though we agree that out vars are kinda weird right)
i like out vars
I think "normal" c# is great. I think high performance c# is Hella uncomfortable and you should consider not
I like out vars
out vars r just better way to express "give me a ref to modify" so i like it
Sure, high-performance C# is difficult, but the fact that it even exists is pretty amazing, you don't hear about "high-performance Java" or "high-performance python".
It's definitely better to do that stuff in C++, Rust, etc., if you can. But if you have a million lines of code in C# and need to seriously optimize one little bit of it, well, you can.
(Why are vars weird?)
hm i wonder if there is better way to fit ScrollableFrameView to content 
i am about to just measure the length of machine rules
If I could add something to c# I would improve support for read only span
b4 building the Lane
But yeah
Hi all! Anybody know why this code from the wiki wouldn't work? I keep getting an error saying the texture doesn't exist:
"Action": "Load",
"Target": "Mods/{{ModId}}/FruitTrees, Mods/{{ModId}}/Objects",
"FromFile": "assets/{{TargetWithoutPath}}.png" // assets/FruitTrees.png, assets/Objects.png
},
I think it's a perfectly fine language
do you have files named exactly FruitTrees.png and Objects.png in your assets folder?
yes
what does your edit look like where you give objects those textures?
but my filepath is a little odd possibly, I don't remember now how my folder got stacked in a folder : "...Stardew Valley\Mods\ShipsAhoy[SA] ShipsAhoy\assets\Objects.png"
Oh yea, it's not bad, but as someone still trying to learn programming languages in general, it's all foreign. lol
which of those folders is your content.json/manifest.json in?
[SA] ShipsAhoy
can u take ss of the mod folder?
Then you need to move assets up one folder level I think or make your path "ShipsAhoy/assets/{{TargetWithoutPath}}.png
should be able to post img here
the "assets" folder needs to be in the same folder as your content.json in this case if it isnt already
yeah, i might have misread your path, just realized it hink a slash is missng: I'm not sure if thats \Mods\ShipsAhoy\[SA]ShipsAhoy\ or \Mods\ShipsAhoy[SA]\ShipsAhoy
This is more of a "general UI" thing, I think; if you have a container that scrolls, you can't have its scrollable dimension depend on the content size.
right, so we need to see your edit where you give the objects those textures still
what is the [SA] folder for?
nothing now
yea but i only want to scroll vertically, i ought to be able to have content dependent size horizontally 
{
"Action": "Load",
"Target": "Mods/{{ModId}}/FruitTrees, Mods/{{ModId}}/Objects",
"FromFile": "assets/{{TargetWithoutPath}}.png" // assets/FruitTrees.png, assets/Objects.png
},
//Add a new item to the game
{
"Action": "EditData",
"Target": "Data/Objects",
"Entries": {
"{{ModId}}_BoarMeat": {
"Name": "Boar Meat",
"DisplayName": "Boar Meat",
"Description": "A big juicy cut of meat, still on the bone.",
"Type": "Basic",
"Category": -28,
"Price": 200,
"Texture": "Mod/{{ModId}}/Objects",
"SpriteIndex": 7,
"Edibility": 80,
"IsDrink": false,
"Buffs": null,
"GeodeDropsDefaultItems": false,
"GeodeDrops": null,
"ArtifactSpotChances": null,
"CanBeGivenAsGift": true,
"CanBeTrashed": true,
"ExcludeFromFishingCollection": false,
"ExcludeFromShippingCollection": false,
"ExcludeFromRandomSale": true,
"ContextTags": [
"color_red",
"meat_item"
],
"CustomFields": null
}
}
},```

