(unrelated transpiler question: if i have two functions that are very similar but one uses an ISalable and one uses an Item which derives from ISalable, can i just send them both to a function that takes an ISalable normally or is there some IL i need to include to like. make sure the Item is sent as an ISalable and not an Item that would otherwise just happen via compiler magic or w/e)
#making-mods-general
1 messages · Page 178 of 1
Overloads are resolved by Roslyn
Yep. FTM doesn't have token support like CP (so you can't just set variable min/max spawns), but you could have a second "area" with conditions like that to spawn more, or some such setup
I think that answers your questionm
ye ye, that's what I was going for.
it doesnt i think but i think thats bc i worded things unclearly, i mean i have two functions that i am trying to patch, and each one creates an Item/ISalable somewhere in their function, and i want to only need one function i created myself rather than making an overload and needing separate IL for each function im transpiling
basically i wanna be lazy and use the same transpiler for two different functions and i wanna know if it matters that one creates an ISalable instance and one creates an Item instance
Or wait, am I misinterpreting? I want to have the different areas spawn things based on criteria, IE year 1 spawn these. year 2 spawn these.
Like that's supported? right?
I'm pretty sure that any time a subclass is sent to a method that takes the parent class, that method treats it as the parent class?
Oh that's fine
(to be more specific im looking at ShopMenu.receiveLeftClick and ShopMenu.receiveRightClick, the former creates an Item toSell and the latter an ISalable toSell)
Yeah, you can give both areas different conditions to enable or disable them. So like, two areas with IDs like "year 1 beach crates" and "year 2+ beach crates", different min/max spawns and "Years" settings in the ExtraConditions section, etc
Lol yeah
You'll be fine
Wish those functions were consolidated
thank you!
also mood
as a rough example with some unrelated settings omitted, the forage areas would look like this
(which would spawn 0-1 crates randomly each day in the first year, then 1-5 per day after that)
look, I just spent a couple of hours beating my head against CP machines, but got it working. If I can do it, so can you 
yeah its just patience and perseverance.... andmaybesometimesjustlookingatwhatworkedforsomeoneelseandstealingit.
examples def help a lot
I love that my little thread has just turned into a buch of forwarded messages XD
like, the portraits for romanceable npcs? I don't think there's any portraits specifically used when somebody is your spouse, at least in vanilla
tilesheets/junimo_furniture, if you mean these furniture ones
(but yeah, "portraits" is also a folder in content, so I assumed that first
)
... I have absolutely no idea what's going on here. Does anyone know what to do about this particular thing in my SMAPI log? Like, how is there an illegal tile in my map? Is there a way to identify which tile it's angry about so I can fix it? Or am I cooked and do I have to redo the entire map.
Ignore everything going on except the big red error at the bottom, Can't apply patch Greenhouse > Load Maps/Greenhouse to Maps/Greenhouse:
Full log: https://smapi.io/log/cdbabb134c4d4101aa28f0b88565625d
Log Info: SMAPI 4.1.10 with SDV 1.6.15 build 24356 on Microsoft Windows 10 Home, with 28 C# mods and 117 content packs.
Suggested fixes: One or more mods are out of date, consider updating them
Yes gov, I know I have updates to do. Shhhhhh
did you save your map without the tilesheets present?
... I don't think so? But maybe. Let me put them all back into the folder, compulsively save, and try again.
If it's that simple I'm going to riot
make sure you actually make a change however small so theres actually something to save
you can change whatever it is back after
Actually maybe that's the issue right there - I had to change a file path for a tilesheet, and saved THAT but there was nothing to save in the main map so I just closed out. Maybe it just needs to update that. Time to draw and erase something 😂
That's so silly.
if it cant find the tilesheet or the filepath it expects when saving it will calculate the tilesheet as having 0 tiles in it, which will of course mess up every sheet that comes after it when it assigns it a map-wide tile id
or when something asks for tile number whatever on that tilesheet when it thinks it has 0 tiles
i'm not sure riot can really help with mapping, she's a pro of wiki however /j
Oh yes those, thank you
Is there a way I can just edit Haley’s without touching the others?
the "ToArea" setting for CP's EditImage action can edit specific parts
https://github.com/Pathoschild/StardewMods/blob/develop/ContentPatcher/docs/author-guide/action-editimage.md
That fixed it, thanks Button
Tysm
There we go, only 1 More Map to update to 1.6 (Though I did quick patches on some and didn't test all of them manually, but it will be fine... right? [Paranoid Brain Screams]), Should be able to update the last one after work tonight.
https://www.nexusmods.com/stardewvalley/mods/30922/ okayyy it is birthed! Accountability Buddy - Alex - Stay Hydrated, and the original sneakpeak pics of the concept

congrats!
thankies! gave you and some of the others a shoutout for the HALP (((:
a) is it sfw, and b) if it is, do you want it in showcase again?
a) yes and b) yiss pls!
can you send a one-line description please?
congrats on release!
"Alex, our favorite Softie-Gymbro, finds a million ways to talk about liquid ?? and reminds you to drink water throughout every season."
now i can have my brain back after grinding - jeesh i did not know it was like this 
I got a bug report: "Game crashed when the junimo deposited maple syrup in the Cola Machine from Ridgeside village". They added an SMAPI log that has a stack trace, but I need a few more clues and the reporter hasn't gotten back to me and I'm impatient. As far as I can tell, RSV does not include any custom machines, and the only "Cola Machine" I can find is a Joja machine inside the inn, but that's not a "machine" in the usual sense - I mean it's not like a Keg or anything (AFAIK). Might it actually be another mod?
yeah it happens, it can even last some hours before the next idea /hj
If You Right Click the Post, Go to Apps and Hit Publish, I Believe it posts it in the Mod-Showcase Channel if you'd like to do that 😛
(only us cheetos can do that unfortunately)
oh, I didnt realize, still unused to showcase tbh, its still a "New" thing to me
Is there a quick way to unlock GI with cheats or commands?
Not just going to the island itself, but for the GI map to appear in the corner (unless it's not a thing anymore in 1.6...?)
I think if you warp there with Cheat Menu and do the intro with Leo the corner map appears
Going back to Pelican Town on the boat also happens to start the boat quest, but the door in Willy's shop remains locked without CC completion
Good to know, although I just remembered I can just load one of my ancient saves 😅
question: do expansions like SVE and RSE have their own "HomeRegion" for NPCs, or is it just set to "other"?
Unless they're playing with a much older mod, I havent heard of any mod specifically for soda or cola being updated for 1.6 (Havent played RSV or other expansions enough to know if its from a non-soda mod tho)
You can also ask the modded farmers channel
people keep asking me to update and add compat to rsmodia and the SVE RRRR to my female wizard portraits i once did out of boredom and now ive been wondering if i should since there seems to actually be people who use those portraits despite me finding em bland
(I would normally say ignore the problem until if/when the reporter comes back with actual info, but i'm impatient too haha)
If you want
Rasmodia shouldn't be too difficult, there's a lot of portrait "modes", but most of them share expressions with just a few extra ones. But RRRR is scary...
i'm glad you clarified 'break your PR' because it's giving me sad git flashbacks
Thanks to everyone's help the last few days, I've got my greenhouse working with several config options, and got the greenhouse cellar added to it! I just messed around in game to fill them up and decorate a little bit more, and wanted to share them ❤️
i just checked rrrr and apparently the mod author stopped working on it so i might jsut continue to ignore it lol but ill take a look at rasmodia 
anyone know if we can make a buff that provides collision disable?
Stopped working as in completed, it's surprisingly popular
what is the purpose of such a buff 
But people can always switch to less expressions, so I wouldn't worry too much
just trying to think of buffs for my pac-man mod lol
Ghost buff? 
yeah that's what i was thinking of
it'd be pretty cursed if the buff runs out while u be outta bounds
hm, i guess i am understanding their statement of I have decided to convert RRRR into a standalone game. wrong then 
that sounds like a terrible buff to have run iut while- yeah
yeah
but 32 portraits...man thats dedication i might not have lmao
doubt there's any way to make that safe eh
Just make the player die immediately
i'm thinking for energizers it'll just...give you more energy / regen
Little crushing animation
how about a buff that just doubles the visual size of the farmer? lol
Yeah, but it's pretty much complete, it'd be scary if it needed more content than it already has...
And yeah, 32 is definitely a lot hah (big chunk of them are beach portraits, so at least less expressions to worry about)
i mean any fancy non-standard buff effect the answer is always going to be "yes if you write the C# for it"
yeah i suppose so
having a bit of decision paralysis about what to work on next...
wanted to fix my fence visuals but that seems mildly impossible somehow
guess i could start updating my json for translations...
how do I give haley a flower dance outfit? and also how do I replace her ginger island sprites?
Dance outfit is part of the regular sprite sheet, beach outfits are a separate file with _beach in the name
I'm taking about one she wears before the dance actually starts
"{{ModId}}_pacmancab": "Pac-Man Arcade Cabinet/decor/1 2/1 1/1/3000/-1/Pac-Man Arcade Cabinet/0/assets\\paccabs",
can i make this kind of thing use i18n?
cool
how would i add the ModID to the paths?
i don't really remember how i made these in the first place lol
trying to clean it up to proper standards
You'd have to apply the edit of her regular walking sprites with a condition it's the day of the dance and she's in the festival map
can just use the appearance system instead of editing her original sprites too
why does mrs racoon take 3 times as long
women, amirite /j
"{{ModId}}_pacnpalcocktail": "Pac & Pal Cocktail Cabinet/decor/2 2/2 1/1/3000/-1/{{i18n: furniture.pacnpalcab}}/0/{{ModId}}_assets\\pacnpalcab",
always taking so long to get ready, smh my head /still j
this seems potentially correct
Oh yeah, that's definitely a better way (forgot about it)
missed a { of course (on the other lines next to that one)
Is there some way I can use CP to add a line of dialogue to an NPC on random days that takes priority one time over regular dialogue, like a conversation topic? Like say if I use random tokens to have them choose an outfit for the day, and then have a line of dialogue specific to that outfit the first time you talk to them that day
Have you looked at BETAS? I'm pretty sure it can do that
this is gorgeous and makes my brain happy - are u sharing it as a mod/is it available soon?
BETAS can do that however im not immediately sure how to have it coincide with the random token
how exactly are you deciding the outfit?
I assume it's SetNewDialogue you're talking about, which does sound like what I want in theory if I could figure out how to use it 
it is!
Spiderbuttons.BETAS_SetNewDialogue NPCName Characters/Dialogue/NPCName:dialogueKey true
thats if you want it to show your dialogue, and then be able to talk to them to see the dialogue they already had prepped afterwards
like a CT
if you want it to replace their dialogue entirely just remove the true
you can also replace Characters/Dialogue/NPCName:dialogueKey with [LocalizedText Characters/Dialogue/NPCName:dialogueKey] or just straight up put the actual dialogue there in quotes
you would just need to figure out how to run that action when the outfit in question is chosen
likely via a trigger action
so if you can sync a game state query to the random token then you can do it
maybe {{Query: {{Random: one, two, three}} = 'one'}} for the Condition?
(Or dynamic tokens)
Help 🙏 If I want to add something to the location, can there be problems with other mods? If so, how can it be avoided?
Oof, yeah, I've only got a little bit of experience trying to figure out how to run actions so far, I was thinking the randomization could be in a dynamic token but I don't know how to connect that to the action off the top of my head right now 
more specifics would just depend on how you're choosing the outfit and how often you want the dialogue to happen when its chosen bc the random token will otherwise just add dialogue to them every day, dynamic token or otherwise, without something else controlling the condition
okay, so how do I do the whole priority thing? Haley's little walk preview thing is showing up right, but since i want to make it compatible with seasonal cute, I'm testing with that as well and everything else about haley stays the same.
its not exactly much different here anyway bc it still needs to resolve to either "true" or "false" to be used in a Condition field
If said mod also patches the same location in the same spot then yes
the way to avoiding it is probably asking around to find out mods that does so
So I've been trying to make a greenhouse mod and I still need to decorate it and make it pretty but I just wanted to check with you guys that I haven't forgotten to add anything since it's my first mod ever, feel free to give me any tips and suggestions!
I just want to add a teleporter and I'm not sure if it would be a good idea to replace all the location files for this. As I understand it, it will overlap the second changes from other mods
you need to make sure that your CP edits just have a higher priority than seasonal cute. this can sometimes be done by just making Seasonal Cute an optional dependency so that they load first (and thus their patches load first) or by giving your patches specifically a High/Late priority
Hmm... so assuming this condition works, I could... use a trigger action on DayStarted to query a random value, have a pinned key for that value, and use that same value for the outfit randomization 
something like that. but that would happen every single day without another condition limiting it
completely unrelated, but uh... is it intentional that the ActionsOnPurchase field in a shop's stock entry data only happens when buying an item individually? like, it wont happen if you buy one item, and then keep buying that item with that first item still in your heldItem slot
it'll happen on the first click but not any other purchase after that, unless you let go of the item and then buy another individual item
I'm not entirely sure what you mean, wouldn't this hypothetical condition only have a 1 in 3 chance of being fulfilled each day?
if you have them choose an outfit from a list of outfits to wear, they will choose an outfit every day
assuming you are using the Random token to have them choose from the list
what's the magic csproj command for "please also include this random text file"
Ah, I see, I think I'm fine with having the selection run every day, just gonna need to finangle with the values to get the chances I'd like
pretty sure you can rightclick the file in the solution explorer (or leftclick and go to properties panel in the sidebar?) and update the Include dropdown to Always or If Newer
put it in assets/ if you're feeling lazy?
if you wanna do it the wrong way you can also use what i use for my books mod:
<Target Name="PreBuild" BeforeTargets="PreBuildEvent">
<Exec Command="XCOPY "$(SolutionDir)[CP] Button's Extra Books\" "$(GamePath)\Mods\ButtonsExtraBooks\[CP] Button's Extra Books\" /s /i /y
XCOPY "$(SolutionDir)i18n\" "$(GamePath)\Mods\ButtonsExtraBooks\[CP] Button's Extra Books\i18n\" /s /i /y" />
</Target>
this is what i used to copy the Content Pack to the output (and also the i18n for other reasons)
That is horrifying. 10/10
thank you!
"if you wanna do it the wrong way" you really do know how to speak my language
<ItemGroup>
<None Update="startup_commands.txt">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>
there we go
there is 0 chance of me messing with the csproj of my books mod after like 8 months. its set in stone now. calcified
Pathos made a deployment method
I guess without the fancy i18n magic
to be fair I did this, so
#!/usr/bin/env python
from pathlib import Path
import shutil
MODSPATH = Path(r"C:\Program Files (x86)\Steam\steamapps\common\Stardew Valley\Mods")
CONTENTPATH = Path.cwd() / 'ContentMods'
for folder in CONTENTPATH.iterdir():
if folder.is_dir() and (folder / "manifest.json").exists():
shutil.copytree(folder, MODSPATH / folder.name, dirs_exist_ok=True)
I'd just use cp and force people to use linux to build my mods
the Content Pack deployment method definitely did not exist when i made the csproj
alright! I now have a single text file with "tto" in it
im not even sure it existed the last time i updated the mod (minus the quick GSQ i added around xmas)
yeah ContentPacks is about a month old at most
please do not do asset include the wrong way(tm) i hate it
that was October 6th
How can you add something to a vanilla location without replacing its file?
so it did exist last time i updated then. but tbf it was just a 1.6.9 bugfix. havent added new content since june i think
speaking of pathos
how do I get a mod's current location lol
atra u dont sound very retired whats wrong
retirement is an illusion
@ivory plume i think this was a thing you added during the 1.6 alpha so i shall ask, is this intended behaviour or is this a bug i should possibly expect to be fixed at some point i.e. how much should i worry about it right now when making a transpiler that relies on the places ActionsOnPurchase is used
this.Helper.DirectoryPath is what I'm looking for
i also thought you were still talking about csprojs
anyone have examples of using the rendering event to add an icon on screen that i can look at
use TargetField if the thing you're trying to edit is nested inside its data, otherwise use Fields instead of Entries to only affect specific fields
if you want to add to the UI, use Game1.onScreenMenus.Add(new MyCustomMenu()) of some class MyCustomMenu : IClickableMenu { ClickableTextureComponent icon; }
and all references to it
you'd then implement the override draw, override update, etc. methods for that class
How do I mod a different mods item. I am just trying to add a sell price to chicken feed. I tried to do it like I did with the vanilla hay price but it does not work. It did change the hay price fine but not the feed.
modding another mod's item is no different than modding a vanilla item. just make sure their mod actually loads first so theres an item to edit
How do I do that?
make their mod an optional dependency, which will make their mod load first, or make your patch run with a Later priority and use a HasMod condition on it to make sure the mod is actually installed
My buff's OnRemoved never gets triggered?
Breaking into vanilla code, it goes into this.Remove():
//BuffManager.cs
public void Update(GameTime time)
{
if (!this.IsLocallyControlled())
return;
for (int index = this.AppliedBuffIds.Count - 1; index >= 0; --index)
{
string appliedBuffId = this.AppliedBuffIds[index];
Buff buff;
if (!this.AppliedBuffs.TryGetValue(appliedBuffId, out buff) || buff.update(time))
this.Remove(appliedBuffId); // <--- program enters here
}
if (!this.Dirty)
return;
this.GetValues();
}
But then it doesn't go into buff.OnRemoved:
//BuffManager.cs
public void Remove(string id)
{
if (!this.IsLocallyControlled())
return;
Buff buff;
if (this.AppliedBuffs.TryGetValue(id, out buff))
buff.OnRemoved(); // <---- should enter here, but doesn't because it's gone from the Dictionary
if (!(this.AppliedBuffs.Remove(id) | this.AppliedBuffIds.Remove(id) | Game1.buffsDisplay.updatedIDs.Remove(id)))
return;
this.Dirty = true;
}
How is it possible for this.AppliedBuffs.TryGetValue to be true in Update but false in Remove?
I'm glad you like it! It makes my brain happy too. And I'm so in love with the art hime makes for this game 💜 It really brings every map I've been making to life!
I have some json work to do on the config options still, and a broken warp to play with still. But once all that's done, I will be uploading it to nexus. Probably in the next few days! It'll be "Froststar's Modest Greenhouse" and it will hopefully have config options to add three more 3x3 plantable squares down that center aisle to maximize planting space, to enable or disable the cellar, to disable the orchard, and has three levels of decor (full, less, minimal) or no decor at all for people who want it less busy or want to decorate themselves. I'll be listing the mods that gave me this decor on the description page so you can use it in game yourself, but it already requires the HxW Tilesheets mod to bring the permanent decor I've placed into the game.
This is stunning!!! And super ambitious for a first project ever, holy 😍 If you want people to be able to plant trees in the open areas around the dirt, make sure you give the tiles the Diggable tile property and set them to T. I know a lot of people use the flooring around the planting area for trees in their greenhouses. If you don't want to do that, then including some plantable spots for trees might be a nice option! But otherwise, looks like you've made a gorgeous greenhouse 💜 I also love the flooring you'r eusing, is that original art of yours or from a mod?
are you certain remove is being called?
And new version of Events Tester:
- allows you to disable the dialogue-auto-click
- allows you to run a file of macros at save load/save creation
https://www.nexusmods.com/stardewvalley/mods/19458
(the file it reads from are startup_commands.txt or save_created_commands.txt at the root dir of the mod.)
Yeah, I was able to step into it with the debugger
that fixed it thanks
Is there a way to edit only part of a map property? For example, on the Farm map (which is different for everyone) there's a Warp from the farm to the greenhouse. It has the x y coordinate on the farm where the door is, and then the landing x y coordinates for the inside of the greenhouse. How can I change JUST the landing coordinates for the greenhouse to be a custom value?
I can't really hard edit it the way I know how, which is overwriting the whole string to force what I want, because so many different farm maps exist and the values would all be different for where they're coming from.
for warps specifically theres content patcher AddWarp
But like... can I just edit the last coordinate? And not touch the first half of the string?
Like, I wish I could use EntryLocation in my greenhouse map like I can in the farmhouse, but this is a greenhouse 😦
oh hm
u dont have to add a farm map warp do u
its a building now
to generally answer ur question, i believe you need TextOperations
Is there something that specifically handles the Greenhouse entry point since it's a building now?
dont textoperations limitations make it impossible to specify this though
bc you cant delimit it properly
well buildings have human door
and its relative to the area ocupied by the building
this applies to every kind of building thats movable and has an interior, greenhouse coop barn etc
HumanDoor
"buildings have human door" is an extremely powerful sentence
isn't humandoor for locating the position of the door on the outside of the building? I assumed they meant they wanted to change where the player is after they enter
i always forget how funny some modding related things sound out of context
So wait how can I utilize that to my advantage? I'm not sure how it helps. My issue is on the landing side of things, once I warp into the greenhouse, I'm landing on the wrong tile for some reason.
Warp from the farm to the greenhouse sounded like outside warp to me
Oh sorry, yeah no I want to warp into the greenhouse, and the landing coordinates inside are what I"m after
the inside is slightly hardcoded, you need to make sure your warp tiles on the inside are all correct
the logic is "1 tile north of the first warp in the interior map"
OH. That explains a LOT!!!!
which is like, fine/10 if ur door is supposed to be bottom
i used to have a thing that unhardcoded this but it kinda sucked so i yote it
So, I didn't touch the greenhouse warp from the farm to the greenhouse. I didn't even add one in my map, since it's handled by default in vanilla. BUT I added a warp from the greenhouse to the cellar of the greenhouse - and since that's the first warp in the interior map, when I enter the greenhouse from the farm it's setting me at the top of the stairs instead of in the doorway from the outside, and I was BAFFLED.
Thoughts on how to fix this?
you can prob hack around this with a magic warp
or just, put the cellar warp later in the list
I was today years old when I learned the past tense of yeet 😂
i added a basement to my greenhouse, and i just. put the cellar warp after the entry one
and it worked
TouchAction MagicWarp
Action Warp
Yeah, what I need to do is make sure I have the warp to the farm from the inside of the greenhouse before the cellar warp. That's all.
the first one plays a little biu sound unfortunately
I figured it out 😄
the second one u need to touch and press action
I don't think I need to hack around it, but if I do I'll try the magic or action warp
it might be nice anyways if u want like a trap door vibe
instead of walk down stairs vibe
hmm, is that documented anywhere, chu? if not maybe it's worth adding it to the wiki Modding: Buildings page? (after I check what the policy is on updating those pages)
I think it's literally just because I didn't include the warp at all. The only warp on my map was the cellar one, because I naively thought that since I was not editing the default warp or changing the position of my door (specifically, I thought, to avoid issues like this, RIP), I would not need to specify it on the new map
idk i only rmbr cus i looked at code
If it is, I haven't seen it. But I'm a notoriously bad Wiki searcher. I get blinders and miss things. But knowing what they said about how the logic works, being 1 tile north of the first warp listed in the interior map, would have saved me SO much time and frustration 😅
Building.updateInteriorWarps
idk who to even ask about if it's okay to add things like that to the wiki tbh haha
I on the other hand do not look at the code, so I appreciate your wisdom immensely 💜
Yeah wait isn't the wiki just open to edit to anyone?
I have an account, I'm just not sure what the policy on editing the modding namespace is tbh. I'll just add it though, worst case margobean will remove it again
The only reason I haven't done it is because I'm very autistic, and the way my brain works is different from most people so like. If I edited the things I want to edit, it woudl create mass confusion, probably 😂 🥲
tbh there is just a lot of niche nonsense that no one finds out until they bump into it
Tysm!!! I was thinking that the 3x3 spaces could be for trees and the area to the right could be either for coffee or for more trees, but it might be better to just make the whole thing tileable 😅 The tiles from the little deck on the right are from DaisyNiko's Tilesheets (I think they were meant to be a table lol) and the rest of it is all from PinkStations Tilesheets, I just mixed and matched it to get the patterns that I wanted
something i recommend for map making is data layers, so u can see where ur warps be
no idea what the policy is except that there is a maximum change size threshold for "new" accounts (anti-vandalism measure). the stated workaround is to make a bunch of small edits until you've made enough to no longer be considered new.
there's no way to know if you're over the threshold until you hit Save (and your edit is rejected), and there's no indication that your account is no longer new after you've made enough edits
Ooh. I actually have an interesting issue that may be a problem with the AddWarp funcitonality, now that I'm digging deeper! Do we know if AddWarp prepends or appends the list of warps? Because... the map did already have the default warp in it to go back out to the farm, so theorhetically it would have been the first warp in the list. And I used AddWarp using content patcher in my JSON for the warp to the cellar.
So I think AddWarp is prepending the list of warps, which means that it moved the landing location upon entry for me.
For sure, I'm doing it all in the map itself now because I don't trust this newfangled technology now 😂
my greenhouse mod changed the size of the greenhouse so i had to move me warp down anyways
But it's something to take a look at on the content patcher side of things, I think.
yeah if you are creating the map you don't need AddWarps; that's for existing maps
nothing stopping you from using AddWarps instead of the map property. i often do that to keep things in my text editor and out of tiled
this method seems to change where you warp to on leaving the building, I can't find the one for entering it?
My account is established, luckily!
Blueberry, that's what I thought I was doing. I was trying out the New Shiny Thing I hadn't had experience with. But it caused a strange bug for me, that made me click on the door to enter the greenhouse from the farm, and when the interior map showed up, I was NOT in the doorway - I was at the top of the stairs I added elsewhere, which is the landing location for my warp for my custom greenhouse cellar.
oh yea i remember wrong, its the block following OnUseHumanDoor() check
Building.doAction
Mostly because I didn't know how Tiled would handle all this nonsense I had to do for the warp 10 24 Farm 28 16 6 25 {{ModId}}_ModestGreenhouseCellar 18 6
These are my warps inside the Greenhouse itself.
oh i see its the cellar ok
I'm still figuring out my way around all this custom location stuff, I don't even know if I need to use {{ModId}}_ModestGreenhouseCellar or if there's a cleaner way to do this.
But as it is, I hate it 😄
getting frustrated with why a transpiler wasnt working and now ive found out its bc, since i copied this transpiler code from a different .cs file/class into this one, but they both have a function with identical names, that despite me doing typeof(Class2), nameof(Function) and Rider telling me its pointing to Function in Class2... it is actually still being compiled to point to Function in Class1 instead, where i copied it from. fun fun.
is that a hot reload thing
now that i think about it im still not sure why that happens because it shouldnt be looking in the Class1 type bc of the typeof
it was not a hot reload thing
So I just need advice on how I’m going to figure this out… when I change the state of an npc (appearing in the world) that isn’t reliant on a date (reaching floor 30 of the mines), how would I go about making the state change for every player in multiplayer?
r u in C#
some game state queries can check host status specifically, so there may be one about mine levels that will work in the npc's spawn conditions
It's not intended behavior, but we have no info on when the next game update will be. So even if it's fixed in the game code, it may be a while until it's released.
1.6.16 fear
MINE_LOWEST_LEVEL_REACHED 30 should do it, i think (anybody has reached that far down)
okay well now im still confused bc even specifying the class in the nameof hasnt fixed it. neither has a clean and rebuild. so why the heck is this transpiler in ItemBought.cs calling ItemSold.Trigger() and how do i make it stop doing that
understood, thank you o7
(never mind i think the issue is elsewhere and ItemSold being called is a red herring, so now i just have to figure out why the transpiler itself doesnt appear to work but with no errors. F)
... welp. I need Hlap. I changed it so that the warps were both saved in Tiled on the greenhouse map itself. But now I can't actually warp to the cellar. I got this error when I tried to:
Warp to {{ModId}}_ModestGreenhouseCellar failed: location wasn't found or couldn't be loaded.
What am I doing wrong here? 😭
Full log: https://smapi.io/log/1da52541a77649a1b218a6b0c071cf25
Json file: https://smapi.io/json/content-patcher/a6c7f6248f464473ba82ce3cd107df3a
Log Info: SMAPI 4.1.10 with SDV 1.6.15 build 24356 on Microsoft Windows 10 Home, with 28 C# mods and 117 content packs.
Suggested fixes: One or more mods are out of date, consider updating them
Did you add the warp directly in the map file? Content Patcher tokens only works in Content Patcher patches if so, they won't work directly in the map file. You'd need to replace the token with the actual mod ID in that case.
Okay, yeah. So what would that look like? the mod id in my manifest to replace the {{}} part?
Yep.
I suspected that doing it that way wouldn't work. Thanks pathos! Not sure if you saw the issue I was having above, before I made this change. It was using mixed warps - the farm one baked into my greenhouse map in Tiled, and the new one to the custom map (cellar) in my content.json file. I was making me spawn in the wrong place upon entry to the greenhouse map. It could be something I was doing wrong, but I wondered if it was a result of AddWarp potentially prepending the warps that exist rather than appending them.
AddWarp does prepend warps, so that your new warps have priority over previous ones. I think the base game has special logic for warps into and out of the greenhouse though, to set the player position automatically.
So what was happening is rather than spawning in the doorway, it was spawning me at the top of my stairs, because the warp I added via content patcher used the in game logic for interior buildings, and made it 1 tile north of the first warp in the list. And since the AddWarp prepends things, the warp I added (from the greenhouse to my new cellar location) was first in the list, and that's where it placed my character on entrance.
So that could be a problem in some cases
It was in mine. I banged my head against the wall for a long time 😅
And ultimately had to scrap the AddWarp and just do it in Tiled. Which is a mess of a string, if I've even done it correctly this time.
you could use content patcher set map property instead of addwarp if u want
Hmm. Is that a thing? I thought AddWarp was the content patcher way of editing that map property. I didn't see anything else on the wiki when I looked.
Or on the content patcher github rather
{
"Action": "EditMap",
"Target": "{{ModID}}/Greenhouse",
"MapProperties": {
"Warp": "10 24 Farm 28 16 6 25 {{ModId}}_ModestGreenhouseCellar 18 6",
}
}
it's not a "thing" so much as this is what ppl used to do
(It's already done and functioning normally for me now through Tiled, but this would be interesting to know in future.)
and addwarp is shortcut for doing text ops on Warp
Would that not also prepend the warps, potentially though?
no it replace the map property named "Warp"
Ah, so it's just a full replace. Gotcha.
Yeah that would be a good workaround, then, so I don't have to do this mess in TIled. Because I hate this 😂 10 24 Farm 28 16 6 25 Froststar.ModestGreenhouse_ModestGreenhouseCellar 18 6
Oh ok ty! That’s much simpler than what I was worrying about
What about a trigger being seeing a heart event? Is there an easy way to make that multiplayer too?
PLAYER_HAS_SEEN_EVENT takes a player argument, so you can specify whatever you need
https://stardewvalleywiki.com/Modding:Game_state_queries#Target_player
meaning: Host if the main farmer has to have seen it, Any if anybody has seen it, All for everyone. any of those should be consistent across all players
Omg tysm
Is it...possible to have animal skins change depending on the season? Mount included?
Should be, it's just a patch to the sprite with the condition of season.
Hardest part is probably just making all the sprites.
Hmm... So i know there's Passable | T for a buildings layer tile to be something the player can walk on... but is there a similar way to make the player be able to place an object (furniture, artisan machine, etc) on that tile, too? 🤔 Or do I just need to make the tile not be on buildings, which would be a huge headache I'd rather avoid.
(I'd have to edit several maps to make the one tile change. A map property is SO preferable)
From a mapping perspective, I think the primary building layer tile has to be unoccupied, and I think the back layer buildable maybe?(it's been a while, might just be for buildings, not machines and buildings) would the built in extra layers functionality help here ?
as far as I know, Passable should let player-placeable objects exist on building tiles
...wait, sorry, I mixed up back and buildings passable 
that might still be true, but if not, I don't think there's a vanilla workaround
i think the placable is actually just lack of NoFurniture and otherwise accessible
I'm testing a bit on the default farm's buildings-layer fences, and whether they have Passable T on that layer or not, they won't let me place BCs on them
which seems to be the goal, anyway
Nah I had a tile in the greenhouse placed on buildings (the diagonal back wall corner piece) and I hated that it's a jagged sticky-outy (the technical term) tile if there's no decor present in the greenhouse, which was an option I gave users. So I wanted to make it able to be walked on. Used Passable, done deal. But then I was like "But what about placing things?" Like, furniture, decor, a chest, a keg, etc.
And Passable does not allow any of those to be placed on the tile.
You can check the code from my mod Museum-Worthy Spoon for an example
Is it possible to change flower honey from getting double the value of the flower, to getting just the value of the flower?
I think you can use targetfield to target edit the beehouse's machine rules and add price modifiers to the output
that wouldnt work for when the honey is spawned outside of machines though
since the price calculation is part of the query itself
I tried to look for the beehouse in the machine file but I cant find it
its id is (BC)10
Two things, first, where is the world maps for the other farms located? Second, is there a way to make it so that a mod isn't listed in the warnings for not having update keys? My massive farm mod has two parts to it, a content patcher part and a farm type manager part. I don't want people to get worried about the version of the FTM part since they both get uploaded at the same time.
for the second question you can add an invalid key (Nexus:???) and I think it only shows in the trace log which is invisible by default
or just put the same update key
but then when the mod updates it shows in smapi twice...
How close it is?
which is no big deal
it helps prevent people from only updating one folder instead of two
Another question spawned from the map question...How in the ever living funk do people select another farm's map for their world map if they wanted to use it for that?
Cus like what if I wanted to use the riverland farm's map????
you want to use the Id field, not the ItemId field
also I think the order is wrong but I cant check rn
transpiler question - say I've been able to find an instruction brtrue IL_.... Is there an easy way to jump to instruction IL_... from there? (idk if I'm phrasing this properly bc it's like 4am so let me know if this makes no sense haha)
The operand points to where it jumps, so you save that and reuse it elsewhere.
yeah, I guess my question is more how to jump to an instruction at a specific address
The simple option is to just use the setting in Data/AdditionalFarms and copy whatever farm map you want into your mod. You just load it somewhere and put the "Target" in the farm's "WorldMapTexture" setting. (see Modding:Farm_data)
If you want to automatically use other mods' edits of that farm's world map texture, I think you can add an entry somewhere in Data/WorldMaps, but it's a little more involved.
I'm lost. Don't know what and how I should change anything. When you have a little time can you direct me in what I should do?
right now I'm using CodeMatcher, but with any method I couldn't find an obvious way to jump to an instruction by its address?
So just copy the farm map XD
@rancid temple I did the thing
I'm outside right now, my apologies, but maybe someone else can help
copy it, put it in its own png file (make versions for the seasons) and then load it as an asset....got it
I should mention I was talking about the world map but still lol
I try to ask. Thanks anyway!
... does anyone potentially know why I would be able to decorate the floor, but not the walls, in a custom map (indoor) I've made? It's based on the cellar map, for context, in case there's some weird hardcoded nonsense afoot with that map.
Same.
The terminology's a little weird, but the AdditionalFarms setting just lets you pick whatever sprite to use there.
for walls u need the wallid/floorid stuff
i could be wrong but I don't believe there is a way to just do that. you store the operand of a branch instruction (or jump instruction etc) which will be a label and then you compare that label to another instructions labels to see if it matches
Oh! Can I use that in a map that isn't the farmhouse??? I didn't know that was a thing I could do!
I was so worried to see a ping coming from mmg, so glad now lmao
then they could change wallpaper and floors, too which is nice.
Big milestone! My Massive Farm mod has hit version 5.0.0
I see, that makes sense, thank you 
Does anyone know anything about changing the output price from the beehouse in the machine file?
I dunno if it'll help, but I add a brfalse with a new label in this old manual transpiler, so some of the relevant methods are there
I feel like I'm losing my mind...
Utility.CreateRandom(tileLocation.X, (double)tileLocation.Y * 5000.0, Game1.uniqueIDForThisGame, Game1.stats.DaysPlayed).Next(1, 2)
Does this not mean that it will always just return 1?
there's also this for a code matcher solution for making labels and jumping to that label: https://github.com/zombifier/My_Stardew_Mods/blob/master/CustomTapperFramework/HarmonyPatcher.cs#L590
...pretty sure that's always 1, yeah 
one of three times the game does that exact Next call
if that's from a decompile, i guess the 1 and 2 could be constants that got hardcoded by the compiler?
at least, that's one way i could see that happening
that'd explain it, yeah (relatively speaking)
Yeah, from a decompile. Would their original values be different though?
no, but decompilers can't really see any const values being used in the final package, so things like
const int min = 1;
const int max = 2;
//...
random.Next(min, max);```
would end up in ILSpy/etc as
```cs
const int min = 1;
const int max = 2;
//...
random.Next(1, 2);```
they're still actually running a useless randomizer, but it might've been set up differently at some point (and less obvious with the original files)
yeah, and the other ones I saw were in Grass near some random calls that actually did something, so it was probably a copy-paste there that could've been simplified
Well, at least I'm not going crazy (over this). Thanks 
You learn a lot of things when you mod the game, like just how many entirely pointless Randoms the game has
Like, every time a bush is deserialized XD
@slender badger new BETAS is posted with ShopOpened, ItemBought, and ItemSold triggers
@velvet narwhal ShakeNpc action was also added in this one
docs should already be updated

(oh i didnt realize you were active in here already airyn sorry!)
Thank you so much, Button! 
Haha, it's all good! I'm semi-procrastinating on getting food anyway, so I appreciate the ping
total count of things in BETAS so far: 30 triggers, 29 actions, 48 game state queries, and 5 tokenizable strings. waow. i need more
i dont think i could come up with 10 tokenizable string candidates let alone that many
i think you need to double check your math
oh not the tokenizible strings
21
i can math good, i give correct change at work all the time
too much query crimes, too many brackets, i'm good now though, i'm not touching it anymore
"set up a bush sprite"? okay, flip a coin to decide whether to roll a d6
public override void loadSprite()
{
Vector2 tilePosition = this.Tile;
Random r = Utility.CreateRandom(Game1.stats.DaysPlayed, Game1.uniqueIDForThisGame, tilePosition.X, (double)tilePosition.Y * 777.0);
double extra = ((r.NextDouble() < 0.5) ? 0.0 : ((double)r.Next(6) / 100.0));```
(and then throw it away if this is a walnut bush isn't a medium bush
)
another transpiler question (and hopefully last one for today) - is there a way to see the final IL after a transpiler has been applied?
for your patch or for all patches?
for your patch specifically you cant 100% guarantee theres no other patches in it i think, but theres some harmony debug mode that saves a file to your desktop that has the IL i think maybe. idk
theres also a harmony extension method that logs your IL... i think. again idk.
i dont know these things bc i just loop over codematcher.InstructionEnumeration and print them to console lol
yk what? I was thinking of doing that, now that you said you do it too then it's good enough for me lol
Quick question about BETAS, Button - in the examples, it has "Action": "IncrementStat ThingsSoldToPierre", but the Trigger Actions wiki page has "Action": [ "IncrementStat ThingsSoldToPierre" ] with square brackets for listing multiple actions
I only need one action so it's not a big deal for me, but can BETAS triggers only have one Action?
https://github.com/Spiderbuttons/BETAS/blob/main/BETAS/Helpers/Log.cs#L42
you can use my helper logging function if you want, pass in the instructionenumeration at the end and the instruction list you started with and it'll log them (using my other log functions) to the console, with the original instructions in debug and the ones you added (mostly) in warn
(you dont need to use my other log functions though just make sure you replace it with your helpers log functions)
BETAS triggers are just the triggers and dont touch the concept of trigger actions themselves, so everything else is still just a normal edit to Data/TriggerActions and the only thing that changes is the trigger being not one of daystarted, dayending, or locationchanged
which is to say you can still use either Action or Actions, i just am lazy and copy the same template for my examples every time so theyre all just using Action
if you're using Action, singular, it shouldnt be a list
Ah, fair enough!
I hadn't noticed there's Action and Actions, so that's on me, haha
you can use both if you want but you only ever need one of em
Petition to change Actions to MultipleActions or something so that it's easier to tell them apart /jk 
1.7 dreams
where can i find what the ID's of the categories is?
ty!
Success!
Now I just gotta add a spacer CT so that the dialogue can't trigger til the next day, haha
huh, I wonder why the transpiler is making the game silently crash the second time the transpiled code runs... anyway, that feels like a problem for tomorrow me
game silently crash
the only thing scarier than crash errors is a crash with no errors
meaning it crashes before it can even log, right?
the transpiler turns
ldloc.0 NULL [Label38]
ldfld StardewValley.GameLocation StardewValley.<>c__DisplayClass401_0::location
brfalse.s Label61
ldloc.0 NULL
into
ldloc.0 NULL [Label38]
ldfld StardewValley.GameLocation StardewValley.<>c__DisplayClass401_0::location
brfalse.s Label61
ldloc.0 NULL
callvirt System.Boolean StardewValley.GameLocation::get_IsFarm()
brfalse.s Label314
call static System.Void ModThing.TestTranspilation::LogIsFarm()
ldloc.0 NULL [Label314]
so, uh, if anyone knows why this always works the first time but crashes the second time... opinions appreciated 😅
the logisfarm method literally just a fixed string
and the second time, the game crashes before it can log
does LogIsFarm expect a variable
What was after ldloc.0 NULL in the original
whats the type of loc0
ShakeNPC huh? mischeif makers mod let's go
loc0 is a GameLocation, and after ldloc.0 NULL there's
ldfld StardewValley.GameLocation StardewValley.<>c__DisplayClass401_0::location
callvirt System.Boolean StardewValley.GameLocation::get_IsOutdoors()
brtrue.s Label62
doesnt seem like loc0 is actually a GameLocation but a capture class that holds the actual GameLocation as a field
see the ldfld after every loc0 calls
yeah, that's the part I'm kind of stuck on
you'll need to duplicate that ldfld call
idk how to get the gamelocation out of that field using harmony and I also don't know why the code even works once in that case
What method is this?
Object.placementAction
I can't figure out how to duplicate that ldfld call unfortunately (other than finding another one and copying it? which honestly could work ig)
yes that's what I would suggest
yeah you can just straight up copy the whole CodeInstruction
or just the operand if you would rather
Operand is safer, so you don't accidentally duplicate labels
you can also put a Dup in a specific spot to just have the previous field on the stack again
very true
copying the operand worked, thanks guys!
congratulations on surviving capture classes
for your next challenge you will need to patch an anonymous delegate
this would have gone a lot smoother if I wasn't accidentally pulling an all nighter to do it
oh well, it's done now
what have I ever done to you 
I have a few harmony patches that specifically target other harmony patches
is there a particular reason i would want to have Name and DisplayName not point to the same i18n string?
Name is used in some internal logic
is it gonna cause problems if they're the same?
pointing to the same i18n string means the internal Name will change if the user changes languages
hmm
which will likely cause problems
ok so i should do two then
dont use i18n for name, just hardcode something
ahh ok
consider it a secondary item ID
so name is just always logic
makes sense
so like this is fine?
the string goes to an identical text but it's logically different things
yes, those for simplicity's sake most ppl just make it identical to the id
now i'm wondering if i did something dumb in my previous mod
Does anyone know what the property/field is called for the type that's shown below the Item Name, e.g. Fruit (in C#)?
I think it's a function, getcategorydisplayname or something (going off memory)
so like straight up just set "Name" to {{ModId}}.blackneonfence ?
getCategoryName exists, will try. thanks!
"{{ModId}}.blackneonfence": { "Name": "{{ModId}}.blackneonfence", "DisplayName": "{{i18n: fence.black}}", "Description": "{{i18n: fence.Description}}",
if i'm understanding here
cool
wish i could just make these fences dyeable or flavored lol
you can make a fence dyeing machine, or sell them in shops, both of which supports the ObjectColor field
disclaimer I havent tried this
crafting is sadly a no go because it doesnt support queries
(on second thought I just remembered fence has its own class disparate from colored objects, so I dont think that works sadly)
Is there a c# way to distinguish between naturally grown and planted forageables?
If not, I assume I have to set some modData on the planted ones?
i should be {{ModId}}_-ing locations too right
I assume no
actually wait, 1.6 has something where planted foragables give different xp right
I gotta run but this can help
That's something.
Also I thought about checking the tile if it's hoed or not
I guess that works if they now grant farming experience. I can just check for that
💀 just seen that. 5000+ pages of re-uploaded mods… does reporting work…?🪦
Hi!
A question regarding transpilers: are they faster ingame than pre/postfixes?
theres not really a difference
That was a lifesaver :)
Forageables grown from Wild Seeds now have SpecialVariable set to 724519. Found in GameLocation.OnHarvestedForage(Farmer, Object)
question, when doing a recolor, does there need to be an "Enabled": "True" line for the edit data?
Nope
what even does the enabled thing do?
Some older mods have a config to enable or disable the mod for some reason, but it's not required and not really necessary either since people who don't want to use the mod can just remove it
My best guess is that it's a holdover from other modding communities where it's not safe to remove mods mid-save?
ah
and if I'm recoloring a modded asset, the target is wherever the mod creator loaded their asset to...right?
I'm making a small mod that is only for me that will just patch the tractor garage from pathos' mod with a recolor made by Elle
yeah, i've never understood having an Is Enabled option for a whole mod
well this is what elle does in their mod
{
"Action": "EditImage",
"Patchmode": "Overlay",
"Target": "Buildings/Barn",
"FromFile": "assets/{{Color Palette}}/Overlays/Barn/{{Barn}}/Barn_{{season}}.png",
"Enabled": "True",
"When": {
"Barn": "New, Old",
}
},```
enabled is very old CP syntax
ah that's not config-related
like very very old and does not do anything anymore
but back to my other question, the target is wherever the mod creator loaded their asset to right?
Is that from one of Elle's recent mods? 
Elle's seasonal buildings
that was originally uploaded in 2018 so just never removed i suppose
Yep, though it'll generally be a vanilla filepath with the custom tilesheet name at the end
Please don't ping me on reply 😅
sorry
though ig i should clarify im pretty sure it will still do something if the Format is low enough
but i imagine you're not making a mod for content patcher format 1.24.8 or lower
Also. Pathos loaded the texture for his tractor garage to Mods/Pathoschild.TractorMod/Garage
CP's gonna be doing a lot to migrate things if the format's that low though 
I mean I can let Junimods (Elle) know about the format thing..
it doesnt hurt to have it, as long as they arent relying on it for functionality, which i imagine they arent
I don't think she's too stressed by it
i dont see why optional files should be added to the main mod if they are optional
I mean, my reasoning for asking was because I didn't want to have to constantly replace the tractor mod garage asset each time I updated the mod...
XD
Hence why I am making a mod that just replaces the texture via CP that is legit only for me...
Might help to say why you're asking in your comment next time if it's important, Elle gets a lot of random requests
it just seemed like a passive aggressive comment to make, is all, as if there's anything noteworthy about that response
Button means bringing it up here with the italics and everything comes across passive-aggressive
if you didn't mean it that way then it's fine, just a misunderstanding, it's just how I initially read it
oh...Sorry, I didn't mean it that way.
And I mean idk what tone tag to add to it to make it seem...not passive aggressive?
(Elle is busy irl. Of course it isn't a priority for her)
It's okay, misunderstandings happen
-# they happen a lot for me...
But yeah, Elle deals with a lot of crap & unsolicited requests/suggestions because of her mods being so popular plus she's busy IRL as Atra said, so that's why the reply
Also...to try to make things less depresso... it's
"When"{
"Season": "spring"
}```
right?
Yep 
Ok thank you, I got a tad bit confused with the github docs.
Another common occurrence for me
I'm not sure if those dl numbers are real but if they are that's a pressing concern.
need to just report it on scamadvisor or something
How do you make config.jsons translateable?
Just gotta use the particular keys in the i18n 😄 Nomori's i18n-ifier has a section for it if it helps
For example, if your config is this:
{
"AllowValues": "True, False",
"Default": "True",
"Description": "Example description.",
"Section": "ExampleSection"
},```
then your i18n would have this:
"config.ExampleConfig.name": "Example Config",
"config.ExampleConfig.description": "Example description.",
"config.ExampleConfig.values.true": "True"
"config.ExampleConfig.values.false": "False"
"config.section.ExampleSection.name": "Example Section",
CP will automatically pick up on the config bit, so you don't need to change anything in your content.json
Oh while we're at it, is it possible to translate values other than true and false?
Yep! You just swap out true there for whatever the values are. Like if your config values are Blue, Green, you'd have config.ExampleConfig.values.blue, config.ExampleConfig.values.green
And if you have more than two values, just add a new line for each one
It's handy for coding long config names too because you can code it as a shorthand and then put the long version as the translation in the default.json
Like you could do:
{
"AllowValues": "True, False",
"Default": "True",
"Description": "Example description.",
},```
then in the i18n:
"config.SebFall.name": "Sebastian's Fall Outfits",
"config.SebFall.description": "Example description.",
"config.SebFall.values.true": "True"
"config.SebFall.values.false": "False"
(excuse my lazy copy-paste errors there lol 😆 )
Oo, that's simpler than I thought, thanks!
No problem! 
Can someone help? I am not getting the letter sent to my mailbox when I read the secret note.
Mail: https://smapi.io/json/content-patcher/d207d14493e8425093012a5f9cbb515c
Secret notes: https://smapi.io/json/content-patcher/2c7b3b7a4bc44b5880edc666c39b321d
(Secret note 21)
your mail file is still targeting Mods/ichortower.SecretNoteFramework/Notes instead of Data/Mail
also did you mean to duplicate every vanilla mail in that file
oh shoot i didnt realise i had let me clean that up
I need to use the framework to get the secret note to work though
yes, you're doing that in the second file
OH
the first file is presumably where you're adding the mail
which is using the wrong target
I just changed it to Data/Mail
ty!!
let me grab the JSON's again
it still isnt working
did you go to bed
yes
also I think AddMail only works if the mail isnt added before?
i was confused for a bit and felt so called out
in this case you may already have that mail in your mailbox from previous testing
try using a console command to remove it
this is true! gotta do special things to make mail resend
shouldnt starting on a new save do the trick?
it would, yes
i will try again on a new save then
hm
thats weird
the little mail emoticon appears above the mailbox but when i go to check the mail nothing pops up
Imma drop a bomb and ask referencing yesterdays debate (if anyone of those ppl is online lol) but if I were to actually rewrite pathfinding a bit, which method of patching would be best
isn't it missing something-
my mail code is
"AddMail Current Sushi_Stall_Mail now"
],```
is the now part required? uhh
if the fourth param isnt specified it defaults to tomorrow
no
ah alr then. looks fine
the now is optional and will default to tommorow mail
Bea prefers not to be pinged, by the way.
sorry 😓
does running debug showmail LewisDiaryRead show anything
i do have the mail framework mod if that means anything
"[Console Commands] Sent debug command to the game, but there was no output." Just a blank piece of paper on the screen that says "[LewisDiaryRead]"
Sent debug command to the game, but there was no output is standard for every debug command
oh wait, why do both of them have the format value
are these 2 seperate mods? [confused bea noises]
i am using a secret note framework for the secret notes and doing the mail on its own
seems like smapi can't find the value for LewisDiaryRead but i dunno why, apologies
all good, i will try messing around with it a bit more and see if i can get it working
maybe you didnt include the file? just guessing
C:\Program Files (x86)\steam\steamapps\common\stardew Valley\mods\MoreSecretNotes (CP)\assets/mail.json
oh
// Lets the game load additional (not in content.json) content files
"Action": "Include",
"FromFile": "assets/mail.json"
},```
when adding addtional jsons that aren't content.json you gotta let smapi know
ofc! glad to help 
just making sure, this has to go into content.json right?
okay so im trying to add it but it keeps getting mad over the colon in line 8, ive tried making the brackets cover the whole json but it still gets mad https://smapi.io/json/content-patcher/dceec58db03a4ee2b019d66920d26fbe
(maybe i should go to sleep)
you're missing a { before the word "Target" in line 8
ty 😅
sleep is very good for the brain!
does anyone know what im doing wrong because Im trying to make talkohlooeys portraits redirect correctly for the ginger island area, but it's not working
this is using stuff based on how Portraiture redirects
Why translate true & false if it's just checkmarks? 
Okay, good, I thought there was some kind of hidden reason to do that hah, cause I set i18nifier to just skip them 
does anyone know what the ogg vorbis file name for moonlight jellies music is called
moonlightJellies
Are you trying to make Talkohlooeys' seasonal work with Portraiture? What do you need this code for?
yeah
i didn't want to transfer everything to a portraiture file since it won't clash with the SVE mod
If you don't want to use Portraiture, you can use the CP version of this version.
Published first version of my mod finally! THANK you all for your selfless help!!
https://www.nexusmods.com/stardewvalley/mods/31009
@ivory plume would you happen to know (and are at liberty to say) whether the platform-specific customizations to MonoGame's GameWindow, such as the apparently missing Keydown event on Android, are part of Stardew itself?
I'm not sure I want to give myself too many headaches over Android SMAPI at this point, but I figured I should at least see if it's a simple issue to fix, starting with whether the root cause is in Stardew itself, as opposed to some weird customizations in the resurrected Android SMAPI.
what's the absolute file path of moonlight jellies?
How many tilesheet mods do you guys think are too many to add as dependencies for a greenhouse map? Are 3 of them ok?
what are u gonna do if i tell u 3 is too many 
its your mod you should do what is needed to fill your vision
I'm currently using 2, but I was thinking about adding a third one to add decorations, so I'd just try to find decorations using what I already have I guess 😅
fwiw some tilesheets r extremely common and ppl prob have em already
Fair enough, I think I'll do a version with the decorations and one without, so people can choose which one to use
My experience thus far is that modders care a lot more about dependencies than players do, on average.
There are some players out there who might go "pff, I'm not installing 4 other mods to get this one" and they are roughly a .0001% minority.
(Yes, I made that number up. I assert that it's accurate regardless.)
I think it depends on the dependency. If it needs common frameworks that players likely already have (e.g. Content Patcher), I don't think players will mind. But when I've been a player using mods in another game and it required a dozen other mods (and those mods might need other mods in turn), it makes me seriously rethink whether I really want that mod.
I think the main times that dependencies affected whether or not I used the mod was either
- the mod had 5+ dependencies
- the mod's dependencies also had dependencies, and those had dependencies, and it was annoying to figure out what all I actually needed
- the dependencies were not just libraries and also did other stuff to the game that I didn't want
If someone's dependencies are like, spacecore, cp and item extensions, then I barely even think about it
Yeah
I'm unsure what Pathos can say, but I know I can't find that event in my Android decompile.
It depends on
- How much i want the mod
- How many layers of dependency
- How stable the dependencies are
I think another factor when it comes to dependencies is how many other content packs that framework has? I've seen a number of people get annoyed if a mod they want is the only one to use that framework since it feels like a wasted download or something, having to download a framework for just one mod, but they don't mind as much if a framework has multiple packs they're interested in
Like how SpaceCore effectively doesn't count as a dependency, because damn near everything needs it.
Dammit I meant to go for "DecidedlyRetired"
Oh, that would've been funny. 
I thought the number 1 concern for players about dependencies is " is this compatible with sve/smapi?" 
Anyways, tilesheets are fine tbh
Yes, I didn't really need to know that since it's already apparent from the log. The question is why it's missing, when it's a documented event in MonoGame. Thanks though.
Yeah, I just wanted to confirm it was a game thing and not so much an Android SMAPI provided MonoGame thing. That felt like the main question!
Though now I'm reading it very differently, so that's my bad.
Would it be possible to ignore the check for fields being already fertilized? Prefix patching HoeDirt.plant.
Or would I have to patch CanApplyFertilizer(string) to always return true for a specific item?
I see Pathos now being DecidedlyChild
Ah, I see what you mean now, I think - that was the decompile of a completely unmodded game?
If your goal is to allow re-fertilization, either way should work, but the prefix would be unnecessarily risky (e.g. it could skip or break other mods' patches) and do the same thing. The CanApply check seems pretty limited by comparison.
It's a bit more complicated. I don't want to fertilize at all. The item instantly grows the plant but I want to use the plant() method to make it comatible with the Tractor mod. Otherwise I would have used checkAction in GameLocation
Sorry, I'm not sure what exactly the goal is, then. Just as a general guideline, prefixes that return false on gigantic methods like that will tend to interfere with other mods
Do we know if android trims
Do you know of any telltale signs of trimming I can check for in a produced assembly?
Oh, it does certainly seem to be trimming the .NET runtime assemblies. Some of these are very empty.
Well, as long as it is actually removed from the base game, it suggests there is probably some workaround in the base game that can be copied.
If it were Android SMAPI in particular messing around, that would be a lot more complicated.
Where does the desktop version actually use it? All I can see is SdlGamePlatform using it.
So far as I can see, Stardew Valley uses the same MonoGame repo on PC and Android (albeit the PC vs Android projects). I don't see any Android-specific customizations to GameWindow in our custom version, and we try not to make unneeded customizations like that. So it seems like the difference is probably either (a) in the original MonoGame code or (b) due to the Android build being trimmed.
No I'm just editing Piano Valley to include more piano songs
Is that even legal?
If it isn't I'll stop
most classical piano songs are public domain now so I dont see why it wouldnt be legal 
Hey @ivory plume, trying to add compatibility between your tractor mod and the growth powder i was talking about in your comment section. You were recommending patching HoeDirt.plant for easy compatibility but I'm struggling at getting that done.
Having the issue that plant() refuses to accept the powder if a field is already fertilized, which makes sense. On the other side, the powder isn't meant to fertilize the tile but only grow the crop on clicking with it. Any ideas?
I think this might be the patch in Multi Fertilizer that allows placing fertilizer on crops that are already fertilized; so you could possibly adapt it to allow your fertilizer on any non-grown crop?
The alternative would probably be a custom integration in Tractor Mod, but then you'd have the same issue with any other mods that do similar things.
Oh, I was only looking at HoeDirt.CanApplyFertilizer. Didn't even think about other methods that could prevent that. Will try.
@ivory plume I swapped that prefix to return false, on the slime limit change. I think it should be ready to merge now.
Oh, I meant to follow up on that. The issue is that either way is incorrect:
- If it returns
true, then the original method runs and we have the additive limit issue we discussed. - If it returns
false, then the originalSlimeHutch.DayUpdateis skipped and all the vanilla day-update logic (e.g. emptying water troughs or running sprinklers) doesn't work.
So there isn't really a safe way to implement that feature using a prefix. We'd probably need to either...
- use a postfix that accounts for the vanilla game having already applied the normal limit somehow;
- or use a transpiler to edit the limit in the vanilla code.
(And for that matter, I'm not entirely sure now I want to expand the scope of the mod to cover general slime hutch configuration since it's just a 'keeping the lights on' mod.)
I'm applying a transpiler on Entry to Farmer.gainExperience, but it's being applied three times, at different moments. Is it because another mod is changing the same method and SMAPI is trying to apply all transpilers again?
Ok, thanks, I suppose it must be trimming. I recovered at least some details; the KeyboardDispatcher only uses GameWindow events for Windows and Unix platforms (not sure what other platforms that excludes, I'm guessing Android shows up as Unix since it's clearly trying to follow that path). But it weirdly uses the TextInput event for that path, while using KeyboardInput.KeyDown elsewhere.
IIRC the reason for a lot of those hacks on my side were less-than-useful handling of special characters like the arrow keys in the default text input loop. I'll have to see if KeyboardInput.KeyDown handles them... or else just special-case for Android platforms if I can figure out how.
Technically it's Harmony doing that without SMAPI's involvement [...]
whoops, hit enter 
but yes, it might re-run when new patches get applied, though I'm not sure. Try the harmony_summary console command to see if anything else is patching that.
for the cookingrecipe command is it debug cookingrecipe (O)pizza for example? When I use it I cannot see the pizza recipe in the kitchen. I slept and restarted the save
it uses the recipe key from Data/CookingRecipes, e.g. debug cookingrecipe Fried Egg
so just Pizza for that one
Ok so I tried that and still nothing X| do I need to restart the game
the keys are also case-sensitive, though the rest of the command isn't
I think it'll take effect immediately if it works
Thanks!
hello @vale stream I would like a little help with Item Extensions 
Im trying to make a custom animation for drinking and I couldnt figure out how to go about it :(
I wanted to make it be like the first screenshot, and then I separated them like that in the 2nd image
I also made this for the male bodies
Yes, that’s how it works. Anytime a new patch gets added or one gets removed, all patches for that method have to be reapplied, which does mean rerunning the transpiler methods
good to know, I vaguely recalled that but wasn't sure if it only applied to other transpilers
Hiya does anyone know what is the best patching method to look into if i were to actually change how pathfinding works?
"Rewrite"
you would definitely need to sit down with harmony and the base game code to decide what the best route is
pros of rewriting: things can be much cleaner on your side (full rebuild)
cons of rewriting: hard incompat with any other mod trying the same thing, though idk if there are any
also then you'd kind of be on the hook for all the super weird bugs the game itself has, in that people complain about them and if they install a mod that's supposed to fix them they will definitely complain to you
doesnt spacecore touch pathfinding or does it just touch schedules but leave the actual pathfinding alone
Well I'm more asking whether there is a better way than skip and basically copy and edit code in postfix
transpilers
if you're doing a skipping prefix there's no point in also doing a postfix, but it sounds like you want a transpiler
Yeah ngl the documentation on harmony's site wasn't very clear to me
transpilers are not particularly straightforward to learn unless you're already fairly familiar with assembly, as best I can tell
basically you'll want to open ILSpy or a similar software to compare the IL before and after your edits
SpaceCore does touch pathfinding but iirc it's the big pathfinding between maps and not like the NPC walking around in an area
You will probably pretty much want to learn how to read IL as part of this
Believe me, I'm already going far out of my way and I learn fast, do just tell me where to start and I'll be golden
still not something you wanna make explode by rewriting your own, though, unless you want to be incompatible with a large swathe of mods
I am sure there are better resources, but this might give you an idea of what's going on under the hood https://en.wikipedia.org/wiki/List_of_CIL_instructions
(We went over this last time you asked)
You don't need harmony
You can straight up subclass PathFindController
tbh there's a 3rd answer here, hide the spouse npc and write your own "animated sprite entity that moves around on the farm"
Aw hell nah
I wasn't really kidding earlier, you're better off rewriting the pathfinding and substituting the entire implementation.
that does sound easier tbh
And use your subclass for your own purposes
lotta work aside, there is benefit in that u wont blow up any non spouse npc by mistek this way
Hide spouse, add fake pet using spouse sprites 
Wait hold on I actually have memory losses
Ur right abt subclassing idk wtf is wrong with me xD
And they don't even try to eat grass
I will write that down this time
if u subclass though, make sure it never makes it into the game save
or if it has to, use spacecore register save type
Huhh
Pathfind controller already isn't serializable
hence why i said "hide spouse npc" and not "replace spouse npc"
(I went over this already once late in 1.6 alpha to make sure I could subclass)
Though iirc there were some static methods used during the pathfinding logic that you will need to harmony anyway even if you subclass
Then my schedule went to hell
Meh, they are called by the constructors typically
So basically I subclass pathfindController and write my own using the same data
Or maybe not write from scratch but rewrite, and then use mine instead the original
and then harmony patch to swap this path find controller into the spouse npc (and only the spouse npc)
Yeeep
I mean marriageDuties really doesn't do shit and that's what im swapping so the two pathfindControllers wont interfere with each other
The original isn't even used there
but I'll see, there are many things to cover
So you reckon I should edit the existing code or learn to make stardew A* myself?
(As in copy and edit)
i dunno if u would need A* here, grid cells are just passable or not passable right
A* works on grids.
i meant that it's not really weighted
Actually I think it is a little bit, but I want to make sure to make them more likely to follow roads
but yea if u r make whole new thing i'd just forget about game code and impl in preferred way
esp since it sounds like u got specific vision
Well, the weight could be uniform, but yeah, was going to say that paths might be weighted lower than dirt/grass.
Pretty much yeah
They are
I'm pretty sure
Well off to the drawing board I go, this actually might not be as bad since Im limiting this to one location only
I wouldn't copy/paste the decompiled game code as a starting point, personally. Write it the way you want it. I'm not exactly sure how easy it is to fit a brand new pathfinding algorithm into the specific base class structure the game has, but it's really the only way, otherwise you're limited to making minor tweaks at the margins, same as you would with Harmony patching.
Vanilla pathfinding is decidedly not A*. Won't get you close to A*.
Wdym its not? It is
Unless it gone so far from it that it doesn't resemble it anymore
Didn't look that way to me, maybe I just got distracted by all the other spaghetti code in the pathfind controller.
Well it literally states in the comment at the start that it uses A*
But I find that deeply relatable
It's a* just weird tbh
Your path weights are all the same, but the priority for the priority queue has a per tile type fudge factor
Took me a long time to figure it all out
Hi dalion
(You are correct here. If you have just equal path weights bfs is very valid.)
Can someone explain how boss fish are decided since 1.6?
Before there used to be a special condition in each location's GetFish method, specific for each boss fish.
Now it's been consolidated into a single GetFish method based on SpawnFishData and GameStateQueries.
But many things aren't clear to me:
- This method seems to check fish chance twice:
First here:
float chance = spawn.GetChance(hasCuriosityLure, player.DailyLuck, player.LuckLevel, (float value, IList<QuantityModifier> modifiers, QuantityModifier.QuantityModifierMode mode) => Utility.ApplyQuantityModifiers(value, modifiers, mode, location), spawn.ItemId == baitTargetFish);
...
else if (!Game1.random.NextBool(chance))
{
continue;
}
But there also again here:
if ((spawn.CatchLimit <= -1 || !player.fishCaught.TryGetValue(fish.QualifiedItemId, out var values) || values[0] < spawn.CatchLimit) && CheckGenericFishRequirements(fish, allFishData, location, player, spawn, waterDepth, usingMagicBait, hasCuriosityLure, spawn.ItemId == baitTargetFish, isTutorialCatch))
Where CheckGenericFishRequirements does a bunch of chance computations.
So which one is it, and what's the difference?
- Where does the Chance field come from? Is it from Data/Fish or Data/Locations?
In Data/Fish we have the old string based format:
"163": "Legend/110/mixed/50/50/600 2000/spring summer fall winter/rainy/688 .05/5/0/.1/10/false",
Where the chance is set to 0.
But in Data/Locations there is the Fish data for each location, which I guess is read as SpawnFishData, and sets chance to 100%:
"Backwoods": {
...
"Fish": [
...
{
"Chance": 1.0,
...
"CatchLimit": -1,
"IsBossFish": true,
...
"Condition": null,
"Id": "(O)163",
"ItemId": "(O)163",
},
...
So again, which one is used and where?
Warps make a bit of a mess of things IMO. It's a distracting level of unrealistic for an NPC to walk in the wrong direction because the warp is slightly shorter. (Also, the well-known problem of cyclical warps totally breaking stuff.) So I'd weight the warps higher. But that's just me. Doors are also iffy.
The current stardew implementation completely divorces map to map pathfinder and within map pathfinder
I can't remember if cyclical warps is fine in vanilla now or if that's just a SpaceCore thing, but by fine I do mean that the more cyclical warps you have the longer everything takes to load so I guess that's not fine lmao
They are technically fine in vanilla just pathological
Ie. Vanilla will (eventually) give you some kind of answer
But it will likely be bonkers
I believe this second check is the "second chance" for targeted bait, if the first one doesn't target the right fish.
The Chance in Data/Locations is the weighting between entries, the chance in Data/Fish has a more complex logic that evaluates many things, starting with that index10 value.
Specifically, fishing level, correct bait, and luck all additively increase it from the 0 it started at
Yeah, but that second check only kicks in after the game has decided which fish to catch. So it won't actually change the catch, except with targeted bait failures.
but even in 1.5 where it was bespoke logic in the various GetFish methods, it wasn't fundamentally different algorithm.
In 1.6 there is literally no difference between the legend and a Sturgeon, other than the boss flag
Basically (and IIRC) it's doing a check for the fish you are trying to target with targeted bait, checking if you can actually catch that targeted fish, and only then applying the targeting logic when you "missed" the target.
Otoh the spacecore impl will (a) always give the Shortest number of maps and (b) will complete in reasonable time
But it doesn't handle disjoijt maps aka busstop
I will trust you on (b) as I don't want to test that greenhouse with the 16 cyclical warps in vanilla 
if CheckGenericFishRequirements fails, it will just try the next fish
With SpaceCore it was taking a very long time
vanillas problem with cyclical warps is there is no guarentee it will be the efficient route, as it just uses the first route it learns
I thought it was the other way around
They said it worked only with spacecore
so which fish actually use the catch limit? i assumed that was for bosses, but have it at -1
It also prunes badly and will spend a lot of time going in circles
what is preventing more than one boss catch?
in vanilla it's definitely just the legendaries, but I think mods can set other limits?
if ((spawn.CatchLimit <= -1 || !player.fishCaught.TryGetValue(fish.QualifiedItemId, out var values) || values[0] < spawn.CatchLimit)
-1 should be limitless, no?
The boss fish also have their catch limit set to 1 in the location data.
oh am i reading the wrong entry
Well if possible I will want them to be more likely to follow placed down roads jist for the aesthetics so A* it is
(O)160, (O)159, (O)163, (O)775, (O)682 cbf looking them up but they smell legendaries
ok so new question:
i transpiled a catch limit override, but still never encounter boss fish
That could mean a lot of things... I'd probably start by, instead of transpiling, writing a quick content patch to just change the catch limit, and see if that does what you want.
yeah it would be a lot easier to do a late edit to Data/Locations to just set CatchLimit to -1 rather than harmony/reflection
Not as a final solution of course, just to rule out the obvious "transpiler not doing what I think it does"
And also
If you can get the outcome with data, you should almost always do it with data
I'm damn sure the catch limit works, that is how legendary bait works
(It copies the legendaries, adds a limitless version, adds a gsq to check for the legendary bait.)
(I mean, I imagine the transpiler is intended to do something more complex than that, so I wasn't trying to say "don't use a transpiler"... just "use deductive reasoning to narrow down the root cause". But yes, catch limits definitely do work.)
yeah i guess ill try that, and to increase odds i should patch data/fish then, yes?
You can definitely ramp up the Chance to make testing faster.
didn't bosses get boosted chance pre 1.6 if the conditions were met?
Though chance is, uh, weird. Even a chance of 1 will still fight with trash because precedence. So to be sure, you also have to raise the precedence.
seems like the chance will be awfully low starting from 0 and just adding fishinglevel/50 + dailyluck
No, trash has the precedence of 1000
Yes, that is how legendary bait works 😛
Yeah ok, not literally "trash", just "stuff you don't want right now". Legendaries have low precedence.
whats legendary bait?
oh yeah IgnoreFishDataRequirements is the other free way to make the contents of Data/Fish go away
@tiny zealot Are you sure the images are 256x128?
Bit of a weird one: if you have given the player control back during an event (/playerControl), is there a way to detect when a player gets to a certain area and print a message (/message)?
The only vanilla event I could find that uses "playerControl" is Haley's beach scene, and it's not v helpful
Not without c#
Well, dang. I guess I'll just make the message happen right when the event begins 😦
It's weirdly hardcoded jank that would be pretty easy to dehardcode but that didn't cone up during alpha i guess
I assume someone will framework it sooner rather than later
Nominating Wren for that one:P
The thing that made me think it is possible is that Haley's scene continues once the player has found something in the sand. That would work for me, but I can't figure out what it's doing.
it calls "/playerControl haleyBeach"
Is that a unique map getting loaded? A script?
I can't find a single reference to "haleyBeach" anywhere else in the json
haleyBeach is a hardcoded thing in the game's event code, and the stuff it does isn't controlled by the content files, just C#
yeah all playercontrol sequences are completely hardcoded, you can't just drop one in yourself via pure CP
Ok, thank you very much for confirming that
you need specific behaviours harmony patched into the event class to handle what happens on player control started/updated, and you need to end the sequence yourself as well
It isn't hard though tbh
Literally
PlayerControl x y would be perfectly reasonable as an api
but again, you need to actually handle whatever arbitrary things you're going to do in that control sequence. just setting a control sequence is completely a non-issue
Set it up with other commands beforehand tbh
Hi Esca!
Btw does CP have a (is host player) token somewhere
the simplest mod i have for playerControl:
cp: https://github.com/b-b-blueberry/Halloween2024/blob/master/ContentPack/content.json#L75-L78
cs: https://github.com/b-b-blueberry/Halloween2024/blob/master/Halloween2024/ModEntry.cs#L622-L630
the arbitrary bullshit is definitely the less-simple part here
Thanks for this! I'm trying to keep this as a strict CP mod, but if I can't figure out any other way to do what I want to do, it really helps to have an example to fall back on. Cheers
Actually, maybe you guys can save me a little time if I ask another question now: will an event end if the player leaves the map that it is on? Or will playerControl just not work at all without that control sequence?
it's probably the worst mod in history to use as a reference for anything just because of all the arbitrary fluff, but at its simplest it's loading events via CP that call playerControl, which is later checked in the CS component via public static bool EventUp => Game1.currentLocation?.currentEvent?.playerControlSequenceID?.StartsWith(ModEntry.Strings.GetValueSafe("ID")) ?? false;, which just returns true/false whether there's currently an event with playerControl set to our values
I would be perfectly fine with starting a dummy event on Mountain map, for example, calling playerControl, and then starting a new event once they go to Railroad or MountainHouse (for example)
{{IsMainPlayer}}
Yay! Now to rewrite a bunch of config options to make them multiplayer safe XD
you might have a hard time leaving the map in your playercontrol sequence, at least in my event i found that all tile warps and map warps didn't work
that was meant to point to this msg
you'd need to manually end the playercontrol sequence and then use event commands to warp away
how do I remove an animal from marnies shop. I want the only way to get it to be hatching it.
Ewwwwwww. Hmmmmm
The only reason I need the dummy Mountain event is to load in some footprint art and maybe print a message. I would use a custom map for the Mountain, but I don't know if it's possible to just load the custom map while an event is in progress and go back to vanilla when it ends
I now more confused by this new error in Smapi. Am I missing something obvious? Shouldn't it try to match data/events/trailer_big when token is on "trailer_big"?
22:16:11 WARN Content Patcher Error loading patch 'Penny Expanded Patch for SVE > Include Assets/{{Trailer}}.json': file 'Assets\Trailer_Big.json' doesn't exist..
I don't try to pull from assets in that, the only place my mod uses that trailer/trailer_big event is in the line below for a Penny Expanded event where they watch a movie
"Target": "Data/Events/{{Trailer}}",
in my mod, clicking on the exit tile will prompt you to end the control seq:
https://github.com/b-b-blueberry/Halloween2024/blob/master/Halloween2024/ModEntry.cs#L660-L696
__instance.CurrentCommand += (int)ending; is the trick here, with the event script looking like this:
playerControl {{ID}}_4/switchEvent {{ID}}_4O/switchEvent {{ID}}_4X/switchEvent {{ID}}_4Q
ending of 1 goes to the O branch, 2 goes to the X branch, and 3 goes to the Q branch
you can absolutely use a custom map
Hi blueberry, sorry for bothering, could you maybe help me with something?
I feel like you spent a bunch of time on something where doing a custom command would be cleaner tbh, bluebs
i did it how vanilla does it 🤷♂️
Yeah, and vanilla is nuts half the time lol
anyway, to use a custom map you'd do something like the event script changeToTemporaryMap {{ID}}_1, which is loaded in the same content file:```json
{
"Action": "Load",
"Target": "Maps/{{ID}}_1",
"FromFile": "assets/1.tmx"
}
If anybody knows, I wanted to change the influence of flowers on flower honey. Selph told me about modifiying it in the behaviour of the beehouse in the machine. I tried to do something myself but it's of course wrong and I don't know how to fix it
i have absolutely no idea how flowers and honey interact lol
something something bees
Ok... I can try that. New for me, and I will probably muck it up, but I appreciate the help 🙂
Selph told me it's about changing the outcome from the beehouse. I tried to ask somebody but looks like nobody except selph knows about it
yeah i've never looked at machines, i'm not interested in them at all
i get it, but i aint laughing 😌
Ahah bad joke sorry
really tho i've never even thought of making/editing machines, there's like a billion machine mods and i just couldn't care lol
magic i/o boxes all of them
i'm sure anyone else could answer editing beehouse rules if they were around
For me, I have no idea where the things I need to change come from. It's basically all not understandable the same
I hope 😭
You could try to find an existing bee/honey mod and seeing what they do?
There must be at least one
😛 It's the only trick I have at the moment. Good luck!
Ahah thank you
honey price is just determined by base honey + (flower price * 2)
so if you want to influence a flowers affect on honey you'd need to change the flower price
Yeah I know that, I found that out last night. The reason I want to change the multiplier instead of the flower price (My last resort) Is because I didn't want to make flowers completely useless by dropping too much the price for balancing purposes. Changing just the multiplier fix everything better
the multiplier is hardcoded
I saw somebody mod do something like this
ObjectDataDefinition.CreateFlavoredHoney()
honey.Name = ingredient.Name + " Honey";
honey.Price += ingredient.Price * 2;
is that a PFM mod?
Yes
that would be important information then. changing the multiplier is not possible with just Content Patcher or editing the beehouse in Data/Machines
so you'll need to just do it the PFM way then and if it has an OutputPriceMultiplier field then that seems easy enough
Selph implied it should be possible, but maybe he was wrong? Are you 100% sure about this?
like 95% after following the trail of functions that happen with the FLAVORED_ITEM query
ok I'm back
What I suggested was using machine price modifiers, which is applied after the machine makes the output item
Which should do the trick
im trying to put an image onto a secret note, what are the dimensions for it?
unless you want to alter individual flowers
What do you mean?
So it does it's calculation, and then I add a final calculation. That's the point?
Yes
of course that wouldnt work for honey spawned outside the beehouse
The one outside beehouse is not really a problem
All my mods are finally updated for 1.6
(Only a Year Late)
{
"Action": "EditData",
"Target": "Data/Machines",
"TargetField": [ "(BC)10", "OutputRules", "Default_RadioactiveOre", "Triggers", "ItemPlacedInMachine" ],
"Entries": {
"PriceModifiers": -50
},
},
this does also not actually affect the influence of the flowers themselves, which is what i assumed you wanted, because thats what you asked
the flowers will still have the same mutliplier. you just then also modify the price of the honey after
This is kind of what I did for now, not much
No wait
It didnt save the change I did
well if the recipe is flower price x 2 + 140 you can turn that into flower price x 3 + 140 by subtracting 140, multiplying by 1.5 and adding 140 back
that's the wrong way
It does fix the problem If I can add negative value and reduce the effect of the multiplication
PriceModifiers is a list of models
Quantity modifiers to be exact; click on that link to see how they're organized
sure, if you know for a fact that 140 is the number you need to subtract
which you cant, if another mod edits the price of honey
You got a point. Flowers have different price
140 is the artisanal honey price
I also decided to add more features to mountain Farm, I realized that caves with no ore or anything is kinda... really boring, so now you can build in them, they spawn lots of ore, and if i was adding FTM i might as well add forage, and respawning stumps... and make the grass tillable.
hopefully it makes it more fun, I really like that map's design but its always been kinda ehhhh, from a practical usage perspective.
My mod already does the price change. Is a complete rebalance mod
right, and other mods can edit the price after you
What link?
not the price of the beehouse output, but the base price of the Honey item itself
Yes once everything is set they can screw up how much they like. It kind of lose the purpose of the mod, they maybe are not gonna use it in the first place. They can do the same with changing price of everything
if you dont care about the possibility, then you dont care, im not telling you you need to. im just explaining why doing it this way is not the equivalent of changing the strength of the flowers
moreso its just changing the price of honey
No wait. What you said is based on people changing the balance of the game to get advantages. They are cheating the mod. Is not a honey problem. They can cheat the mod with everything if they like. How can I stop them?
i just said you dont need to care about it happening
How do you stop people from using CJB cheats?
Exactly
I use it for modding purposes now, but that's it, the game lose meaning cheating
So Selph I got lost with talking, but I didnt understand what I have to do next
You said about a link
is there a way to do a Content Patcher Trigger where its like, you've Triggered 1 of these 6, 2 of these 6, etc So I can make the results happen in a certain order, regardless of what order you trigger those flags in?
entries in the price modifiers array look like that
you can probably do something with trigger actions and IncrementStat. have each of the 6 things increment a player stat, have different mail flags get sent for if the stat value is 1, if its 2, 3, etc.
(or if not mail flags just do the actions directly if what you want to happen is a trigger action thing. if you want to apply CP edits then you;d need a mail flag)
I don't know, like this?
I can use multiple custom context tags on items right? like i'm doin my meat mod and I wanted to tag it as a meat item, then whether it was raw or not, then how it was cooked. So like "ContextTags": ["meat_item","gym_cooked_meat","gym_sousvide_meat"] how would say gift tastes work with this? Would it just work it's way down and look for the first one like 'oh alex likes meat items' then ignore the rest of the tags?
you can put as many context tags as you want on an item
is there an example of adding a scarecrow to the game?
Hmm, I have never heard of this, Where Might I look to find out more about how to use it?
I just want to unlock a part of a map based on how many CC/Joja Bundles are completed. so Stage 0,1,2,3,4,5,6
as long as you dont put int.MaxValue number of tags
No idea what that means so I probably won't
you cant have more than 2.14 billion tags
Y'know I think I can manage
- Your TargetField has to drill all the way into the output entry
- You need to wrap the edits in Entries
- Modifications and Amount are just regular fields, no need for curly brackets
How do gift tastes work in response to those tags tho?
https://stardewvalleywiki.com/Modding:Trigger_actions
in this case I think you'll just want to have 6 different trigger actions that increment the same stat based, one for each of the bundles
Thanks! goes to look at page
If I'm on my PC I would write out the entire thing for you, but unfortunately that's not going to be a thing for the next 3 weeks 😓
oh and you'll then also want 6 more trigger actions for checking that stat and sending mail flags, which Content Patcher can then check for to apply map edits. so you'd send like MailFlag1 when the stat is at 1, and so on
Didn't understand the first thing, is correct the other twos?
its a bit roundabout because content patcher doesnt have a token for player stats

