#making-mods-general

1 messages · Page 178 of 1

uncut viper
#

(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)

calm nebula
#

Overloads are resolved by Roslyn

royal stump
#

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

calm nebula
#

I think that answers your questionm

light bramble
uncut viper
#

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

light bramble
#

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?

gentle rose
#

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?

uncut viper
#

(to be more specific im looking at ShopMenu.receiveLeftClick and ShopMenu.receiveRightClick, the former creates an Item toSell and the latter an ISalable toSell)

royal stump
calm nebula
#

You'll be fine

#

Wish those functions were consolidated

uncut viper
#

thank you! SDVpufferheart also mood

royal stump
brittle ledge
#

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 SDVpufferheart

lusty elm
#

yeah its just patience and perseverance.... andmaybesometimesjustlookingatwhatworkedforsomeoneelseandstealingit.

shut edge
#

examples def help a lot

old edge
#

what is CP machines...

#

making coffee slept in.

light bramble
#

I love that my little thread has just turned into a buch of forwarded messages XD

turbid grotto
#

Y’all where are the spouse portraits

#

Looking for Haley’s specifically

gentle rose
#

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

royal stump
#

tilesheets/junimo_furniture, if you mean these furniture ones

#

(but yeah, "portraits" is also a folder in content, so I assumed that first SDVkrobusgiggle)

normal trout
#

... 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

ocean sailBOT
#

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

normal trout
#

Yes gov, I know I have updates to do. Shhhhhh

uncut viper
#

did you save your map without the tilesheets present?

normal trout
#

... 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

uncut viper
#

make sure you actually make a change however small so theres actually something to save

#

you can change whatever it is back after

normal trout
#

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.

uncut viper
#

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

hallow prism
turbid grotto
#

Is there a way I can just edit Haley’s without touching the others?

royal stump
normal trout
#

That fixed it, thanks Button

turbid grotto
#

Tysm

lusty elm
#

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.

wispy gale
gentle rose
#

congrats!

wispy gale
#

thankies! gave you and some of the others a shoutout for the HALP (((:

gentle rose
#

a) is it sfw, and b) if it is, do you want it in showcase again?

wispy gale
#

a) yes and b) yiss pls!

gentle rose
#

can you send a one-line description please?

hallow prism
#

congrats on release!

wispy gale
#

"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 SDVpufferchickhands

dreamy cedar
#

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?

hallow prism
#

yeah it happens, it can even last some hours before the next idea /hj

lusty elm
#

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 😛

gentle rose
#

(only us cheetos can do that unfortunately)

lusty elm
#

oh, I didnt realize, still unused to showcase tbh, its still a "New" thing to me

whole raptor
#

Is there a quick way to unlock GI with cheats or commands? SDVpufferthink 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...?)

versed wyvern
#

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

whole raptor
#

Good to know, although I just remembered I can just load one of my ancient saves 😅

mighty quest
#

question: do expansions like SVE and RSE have their own "HomeRegion" for NPCs, or is it just set to "other"?

drowsy pewter
#

You can also ask the modded farmers channel

ornate trellis
#

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

drowsy pewter
#

(I would normally say ignore the problem until if/when the reporter comes back with actual info, but i'm impatient too haha)

whole raptor
brave fable
normal trout
#

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 ❤️

ornate trellis
shut edge
#

anyone know if we can make a buff that provides collision disable?

whole raptor
#

Stopped working as in completed, it's surprisingly popular

lucid iron
#

what is the purpose of such a buff bolbphase

whole raptor
#

But people can always switch to less expressions, so I wouldn't worry too much

shut edge
#

just trying to think of buffs for my pac-man mod lol

whole raptor
#

Ghost buff? SDVpufferthinkblob

shut edge
#

yeah that's what i was thinking of

lucid iron
#

it'd be pretty cursed if the buff runs out while u be outta bounds

ornate trellis
#

hm, i guess i am understanding their statement of I have decided to convert RRRR into a standalone game. wrong then thonking

uncut viper
#

that sounds like a terrible buff to have run iut while- yeah

shut edge
#

yeah

ornate trellis
#

but 32 portraits...man thats dedication i might not have lmao

shut edge
#

doubt there's any way to make that safe eh

calm nebula
shut edge
#

i'm thinking for energizers it'll just...give you more energy / regen

calm nebula
#

Little crushing animation

shut edge
#

how about a buff that just doubles the visual size of the farmer? lol

whole raptor
uncut viper
#

i mean any fancy non-standard buff effect the answer is always going to be "yes if you write the C# for it"

shut edge
#

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...

turbid grotto
#

how do I give haley a flower dance outfit? and also how do I replace her ginger island sprites?

whole raptor
#

Dance outfit is part of the regular sprite sheet, beach outfits are a separate file with _beach in the name

turbid grotto
#

I'm taking about one she wears before the dance actually starts

shut edge
#

"{{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?

drowsy pewter
#

yes its tokenizable

#

says so on the wiki for furniture

shut edge
#

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

whole raptor
uncut viper
#

can just use the appearance system instead of editing her original sprites too

calm nebula
#

Fashionable!

#

(I expect this pair to be full npcs by Wednesday)

uncut viper
#

why does mrs racoon take 3 times as long

gentle rose
#

women, amirite /j

shut edge
#

"{{ModId}}_pacnpalcocktail": "Pac & Pal Cocktail Cabinet/decor/2 2/2 1/1/3000/-1/{{i18n: furniture.pacnpalcab}}/0/{{ModId}}_assets\\pacnpalcab",

gentle rose
#

always taking so long to get ready, smh my head /still j

shut edge
#

this seems potentially correct

whole raptor
shut edge
#

missed a { of course (on the other lines next to that one)

versed wyvern
#

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

gentle rose
#

Have you looked at BETAS? I'm pretty sure it can do that

wispy gale
uncut viper
#

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?

versed wyvern
#

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 ThinkO_O

uncut viper
#

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?

calm nebula
#

(Or dynamic tokens)

elder mountain
#

Help 🙏 If I want to add something to the location, can there be problems with other mods? If so, how can it be avoided?

versed wyvern
#

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 ThinkO_O

uncut viper
#

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

turbid grotto
#

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.

uncut viper
brittle pasture
sly lantern
#

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!

elder mountain
uncut viper
versed wyvern
uncut viper
#

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

versed wyvern
uncut viper
#

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

calm nebula
#

what's the magic csproj command for "please also include this random text file"

versed wyvern
#

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

brave fable
#

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

brittle pasture
uncut viper
#

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 &quot;$(SolutionDir)[CP] Button's Extra Books\&quot; &quot;$(GamePath)\Mods\ButtonsExtraBooks\[CP] Button's Extra Books\&quot; /s /i /y&#xA;XCOPY &quot;$(SolutionDir)i18n\&quot; &quot;$(GamePath)\Mods\ButtonsExtraBooks\[CP] Button's Extra Books\i18n\&quot; /s /i /y" />
</Target>
#

this is what i used to copy the Content Pack to the output (and also the i18n for other reasons)

rancid musk
#

That is horrifying. 10/10

uncut viper
#

thank you!

gentle rose
#

"if you wanna do it the wrong way" you really do know how to speak my language

calm nebula
#

there we go

uncut viper
#

there is 0 chance of me messing with the csproj of my books mod after like 8 months. its set in stone now. calcified

calm nebula
#

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)
brittle pasture
#

I'd just use cp and force people to use linux to build my mods

uncut viper
#

the Content Pack deployment method definitely did not exist when i made the csproj

calm nebula
#

alright! I now have a single text file with "tto" in it

uncut viper
#

im not even sure it existed the last time i updated the mod (minus the quick GSQ i added around xmas)

brave fable
#

yeah ContentPacks is about a month old at most

#

please do not do asset include the wrong way(tm) i hate it

lucid iron
#

it was manifest builder 4.3.0

#

we r only at 4.3.2

uncut viper
#

that was October 6th

elder mountain
#

How can you add something to a vanilla location without replacing its file?

uncut viper
#

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

calm nebula
#

how do I get a mod's current location lol

brave fable
#

.?

lucid iron
#

atra u dont sound very retired whats wrong

warm spruce
#

retirement is an illusion

uncut viper
calm nebula
#

this.Helper.DirectoryPath is what I'm looking for

uncut viper
#

i also thought you were still talking about csprojs

pale harness
#

anyone have examples of using the rendering event to add an icon on screen that i can look at

uncut viper
brave fable
brave fable
#

you'd then implement the override draw, override update, etc. methods for that class

reef kiln
#

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.

uncut viper
#

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

uncut viper
#

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

mighty quest
#

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?

normal trout
# wispy gale this is gorgeous and makes my brain happy - are u sharing it as a mod/is it avai...

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.

normal trout
# sly lantern So I've been trying to make a greenhouse mod and I still need to decorate it and...

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?

gentle rose
calm nebula
#

(the file it reads from are startup_commands.txt or save_created_commands.txt at the root dir of the mod.)

mighty quest
normal trout
#

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.

lucid iron
#

for warps specifically theres content patcher AddWarp

normal trout
#

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 😦

lucid iron
#

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

normal trout
#

Is there something that specifically handles the Greenhouse entry point since it's a building now?

uncut viper
#

dont textoperations limitations make it impossible to specify this though

#

bc you cant delimit it properly

lucid iron
#

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

tiny zealot
#

"buildings have human door" is an extremely powerful sentence

gentle rose
#

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

hard fern
#

i always forget how funny some modding related things sound out of context

normal trout
#

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.

lucid iron
#

Warp from the farm to the greenhouse sounded like outside warp to me

normal trout
#

Oh sorry, yeah no I want to warp into the greenhouse, and the landing coordinates inside are what I"m after

lucid iron
#

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"

normal trout
#

OH. That explains a LOT!!!!

lucid iron
#

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

normal trout
#

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?

lucid iron
#

you can prob hack around this with a magic warp

#

or just, put the cellar warp later in the list

normal trout
hard fern
#

i added a basement to my greenhouse, and i just. put the cellar warp after the entry one

#

and it worked

lucid iron
#

TouchAction MagicWarp
Action Warp

normal trout
#

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.

lucid iron
#

the first one plays a little biu sound unfortunately

normal trout
#

I figured it out 😄

lucid iron
#

the second one u need to touch and press action

normal trout
#

I don't think I need to hack around it, but if I do I'll try the magic or action warp

lucid iron
#

it might be nice anyways if u want like a trap door vibe

#

instead of walk down stairs vibe

gentle rose
normal trout
#

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

lucid iron
#

idk i only rmbr cus i looked at code

normal trout
lucid iron
#

Building.updateInteriorWarps

gentle rose
#

idk who to even ask about if it's okay to add things like that to the wiki tbh haha

normal trout
#

I on the other hand do not look at the code, so I appreciate your wisdom immensely 💜

lucid iron
#

dont u have an account

#

if its not blatlently wrong just add AquaThumbsup

normal trout
#

Yeah wait isn't the wiki just open to edit to anyone?

gentle rose
#

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

normal trout
#

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 😂 🥲

lucid iron
#

tbh there is just a lot of niche nonsense that no one finds out until they bump into it

sly lantern
# normal trout This is stunning!!! And super ambitious for a first project ever, holy 😍 If you...

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

lucid iron
#

something i recommend for map making is data layers, so u can see where ur warps be

tiny zealot
# gentle rose I have an account, I'm just not sure what the policy on editing the modding name...

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

normal trout
#

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.

lucid iron
#

append i think

#

u prob wanna just do the whole warp list by hand

normal trout
#

For sure, I'm doing it all in the map itself now because I don't trust this newfangled technology now 😂

lucid iron
#

my greenhouse mod changed the size of the greenhouse so i had to move me warp down anyways

normal trout
#

But it's something to take a look at on the content patcher side of things, I think.

tiny zealot
#

yeah if you are creating the map you don't need AddWarps; that's for existing maps

brave fable
#

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

gentle rose
gentle rose
normal trout
#

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.

lucid iron
#

oh yea i remember wrong, its the block following OnUseHumanDoor() check

#

Building.doAction

normal trout
#

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

lucid iron
#

hm

#

shouldnt it be Greenhouse

#

thats still the location name i thought

normal trout
#

These are my warps inside the Greenhouse itself.

lucid iron
#

oh i see its the cellar ok

normal trout
#

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 😄

uncut viper
#

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.

lucid iron
#

is that a hot reload thing

uncut viper
#

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

turbid grotto
#

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?

lucid iron
#

r u in C#

tiny zealot
#

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

ivory plume
lucid iron
#

1.6.16 fear

tiny zealot
uncut viper
uncut viper
normal trout
ocean sailBOT
#

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

ivory plume
normal trout
#

Okay, yeah. So what would that look like? the mod id in my manifest to replace the {{}} part?

ivory plume
#

Yep.

normal trout
#

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.

ivory plume
#

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.

normal trout
#

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.

lucid iron
#

you could use content patcher set map property instead of addwarp if u want

normal trout
#

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

lucid iron
#
{
  "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

normal trout
#

(It's already done and functioning normally for me now through Tiled, but this would be interesting to know in future.)

lucid iron
#

and addwarp is shortcut for doing text ops on Warp

normal trout
#

Would that not also prepend the warps, potentially though?

lucid iron
#

no it replace the map property named "Warp"

normal trout
#

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

turbid grotto
#

What about a trigger being seeing a heart event? Is there an easy way to make that multiplayer too?

tiny zealot
#

PLAYER_HAS_SEEN_EVENT takes a player argument, so you can specify whatever you need

turbid grotto
#

Omg tysm

weak pulsar
#

Is it...possible to have animal skins change depending on the season? Mount included?

lusty elm
#

Should be, it's just a patch to the sprite with the condition of season.

#

Hardest part is probably just making all the sprites.

normal trout
#

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)

lusty elm
#

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 ?

royal stump
#

as far as I know, Passable should let player-placeable objects exist on building tiles

#

...wait, sorry, I mixed up back and buildings passable SDVpufferdizzy
that might still be true, but if not, I don't think there's a vanilla workaround

lucid iron
royal stump
#

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

normal trout
#

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.

slender badger
#

You can check the code from my mod Museum-Worthy Spoon for an example

desert crane
#

Is it possible to change flower honey from getting double the value of the flower, to getting just the value of the flower?

brittle pasture
#

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

desert crane
brittle pasture
#

its id is (BC)10

light bramble
#

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.

brittle pasture
#

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

light bramble
#

I found the maps

#

XD

uncut viper
#

or just put the same update key

light bramble
desert crane
uncut viper
#

which is no big deal

#

it helps prevent people from only updating one folder instead of two

light bramble
#

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????

brittle pasture
gentle rose
#

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)

rancid musk
#

The operand points to where it jumps, so you save that and reuse it elsewhere.

gentle rose
#

yeah, I guess my question is more how to jump to an instruction at a specific address

royal stump
# light bramble Cus like what if I wanted to use the riverland farm's map????

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.

desert crane
gentle rose
#

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?

light bramble
calm nebula
#

@rancid temple I did the thing

brittle pasture
light bramble
#

copy it, put it in its own png file (make versions for the seasons) and then load it as an asset....got it

light bramble
desert crane
normal trout
#

... 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.

royal stump
lucid iron
#

for walls u need the wallid/floorid stuff

uncut viper
normal trout
rancid temple
normal trout
#

then they could change wallpaper and floors, too which is nice.

light bramble
gentle rose
desert crane
#

Does anyone know anything about changing the output price from the beehouse in the machine file?

royal stump
rancid temple
#

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?

brittle pasture
royal stump
tiny zealot
royal stump
#

that'd explain it, yeah (relatively speaking)

rancid temple
#

Yeah, from a decompile. Would their original values be different though?

royal stump
#

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)

rancid temple
#

Ah

#

Maybe a "perhaps I'll try different values some day"

royal stump
#

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

rancid temple
#

Well, at least I'm not going crazy (over this). Thanks SMCKekLmaoDog

calm nebula
#

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

uncut viper
#

@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

slender badger
uncut viper
#

(oh i didnt realize you were active in here already airyn sorry!)

slender badger
#

Thank you so much, Button! SBVCute

#

Haha, it's all good! I'm semi-procrastinating on getting food anyway, so I appreciate the ping

uncut viper
#

total count of things in BETAS so far: 30 triggers, 29 actions, 48 game state queries, and 5 tokenizable strings. waow. i need more

velvet narwhal
#

need 69 in all, shit

#

what else can we even gsq for 11 more thonkmuvi

uncut viper
#

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

velvet narwhal
#

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

royal stump
# calm nebula Like, every time a bush is deserialized XD

"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 SDVpuffermlem)

gentle rose
#

another transpiler question (and hopefully last one for today) - is there a way to see the final IL after a transpiler has been applied?

uncut viper
#

for your patch or for all patches?

gentle rose
#

my patch, preferably

#

but all patches is fine too

uncut viper
#

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

gentle rose
#

yk what? I was thinking of doing that, now that you said you do it too then it's good enough for me lol

slender badger
#

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 SDVpufferthinkblob I only need one action so it's not a big deal for me, but can BETAS triggers only have one Action?

uncut viper
#

(you dont need to use my other log functions though just make sure you replace it with your helpers log functions)

uncut viper
# slender badger Quick question about BETAS, Button - in the examples, it has `"Action": "Increme...

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

slender badger
#

Ah, fair enough! SDVpuffersquee I hadn't noticed there's Action and Actions, so that's on me, haha

uncut viper
#

you can use both if you want but you only ever need one of em

slender badger
#

Petition to change Actions to MultipleActions or something so that it's easier to tell them apart /jk SDVpuffersquee

uncut viper
#

1.7 dreams

dusk mulch
#

where can i find what the ID's of the categories is?

brittle pasture
dusk mulch
#

ty!

slender badger
#

Success! SDVpufferparty Now I just gotta add a spacer CT so that the dialogue can't trigger til the next day, haha

gentle rose
#

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

hard fern
#

SDVpuffersweats game silently crash

gentle rose
#

the only thing scarier than crash errors is a crash with no errors

hard fern
#

meaning it crashes before it can even log, right?

gentle rose
#

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

brittle pasture
#

does LogIsFarm expect a variable

gentle rose
#

nope

#
static void LogIsFarm()
{
    Monitor.Log("Is On Farm", LogLevel.Error);
}
lucid mulch
#

What was after ldloc.0 NULL in the original

brittle pasture
#

whats the type of loc0

shut edge
#

ShakeNPC huh? mischeif makers mod let's go

gentle rose
#

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
brittle pasture
#

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

gentle rose
#

yeah, that's the part I'm kind of stuck on

brittle pasture
#

you'll need to duplicate that ldfld call

gentle rose
#

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

lucid mulch
#

What method is this?

gentle rose
#

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)

brittle pasture
#

yes that's what I would suggest

uncut viper
#

yeah you can just straight up copy the whole CodeInstruction

#

or just the operand if you would rather

lucid mulch
#

Operand is safer, so you don't accidentally duplicate labels

uncut viper
#

you can also put a Dup in a specific spot to just have the previous field on the stack again

#

very true

gentle rose
#

copying the operand worked, thanks guys!

brittle pasture
#

congratulations on surviving capture classes

#

for your next challenge you will need to patch an anonymous delegate

gentle rose
#

this would have gone a lot smoother if I wasn't accidentally pulling an all nighter to do it SBVLmaoDog oh well, it's done now

gentle rose
lucid mulch
#

I have a few harmony patches that specifically target other harmony patches

shut edge
#

is there a particular reason i would want to have Name and DisplayName not point to the same i18n string?

brittle pasture
#

Name is used in some internal logic

shut edge
#

is it gonna cause problems if they're the same?

brittle pasture
#

pointing to the same i18n string means the internal Name will change if the user changes languages

shut edge
#

hmm

brittle pasture
#

which will likely cause problems

shut edge
#

ok so i should do two then

brittle pasture
#

dont use i18n for name, just hardcode something

shut edge
#

ahh ok

brittle pasture
#

consider it a secondary item ID

shut edge
#

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

brittle pasture
#

yes, those for simplicity's sake most ppl just make it identical to the id

shut edge
#

now i'm wondering if i did something dumb in my previous mod

wide flint
#

Does anyone know what the property/field is called for the type that's shown below the Item Name, e.g. Fruit (in C#)?

shut edge
#

i think i did i18n strings for both

#

guess i'll check later

brittle pasture
#

I think it's a function, getcategorydisplayname or something (going off memory)

shut edge
#

so like straight up just set "Name" to {{ModId}}.blackneonfence ?

wide flint
shut edge
#

"{{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

brittle pasture
#

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

shut edge
#

hmm

#

i'll make a note about it, thanks

brittle pasture
#

(on second thought I just remembered fence has its own class disparate from colored objects, so I dont think that works sadly)

shut edge
#

ah well

#

not the biggest deal anyway

wide flint
#

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?

shut edge
#

i should be {{ModId}}_-ing locations too right

brittle pasture
#

actually wait, 1.6 has something where planted foragables give different xp right

#

I gotta run but this can help

wide flint
wide flint
kind reef
#

💀 just seen that. 5000+ pages of re-uploaded mods… does reporting work…?🪦

midnight sand
#

Hi!
A question regarding transpilers: are they faster ingame than pre/postfixes?

uncut viper
#

theres not really a difference

wide flint
light bramble
#

question, when doing a recolor, does there need to be an "Enabled": "True" line for the edit data?

slender badger
#

Nope

light bramble
#

what even does the enabled thing do?

slender badger
#

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?

light bramble
#

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

proud wyvern
#

yeah, i've never understood having an Is Enabled option for a whole mod

light bramble
uncut viper
#

enabled is very old CP syntax

proud wyvern
#

ah that's not config-related

uncut viper
#

like very very old and does not do anything anymore

light bramble
slender badger
#

Is that from one of Elle's recent mods? thonking

light bramble
uncut viper
#

that was originally uploaded in 2018 so just never removed i suppose

slender badger
slender badger
light bramble
#

sorry

uncut viper
#

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

light bramble
#

Also. Pathos loaded the texture for his tractor garage to Mods/Pathoschild.TractorMod/Garage

slender badger
#

CP's gonna be doing a lot to migrate things if the format's that low though SDVpuffersquee

light bramble
#

I mean I can let Junimods (Elle) know about the format thing..

uncut viper
#

it doesnt hurt to have it, as long as they arent relying on it for functionality, which i imagine they arent

slender badger
#

I don't think she's too stressed by it

uncut viper
#

i dont see why optional files should be added to the main mod if they are optional

light bramble
#

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...

slender badger
#

Might help to say why you're asking in your comment next time if it's important, Elle gets a lot of random requests

uncut viper
#

it just seemed like a passive aggressive comment to make, is all, as if there's anything noteworthy about that response

light bramble
#

I mean...I didn't see it that way when I made the comment...

#

It seemed ok to me.

slender badger
#

Button means bringing it up here with the italics and everything comes across passive-aggressive

uncut viper
#

if you didn't mean it that way then it's fine, just a misunderstanding, it's just how I initially read it

light bramble
#

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?

calm nebula
#

(Elle is busy irl. Of course it isn't a priority for her)

slender badger
#

It's okay, misunderstandings happen

light bramble
#

-# they happen a lot for me...

slender badger
#

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

light bramble
#

Also...to try to make things less depresso... it's

"When"{
  "Season": "spring"
}```
right?
slender badger
#

Yep ThumbsUpSmile

light bramble
#

Ok thank you, I got a tad bit confused with the github docs.

#

Another common occurrence for me

old edge
hard fern
#

there's always some kind of site that pops up scraping mods

#

idk if you can report(?)

old edge
#

need to just report it on scamadvisor or something

hard fern
#

How do you make config.jsons translateable?

slender badger
#

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",
hard fern
#

ohh

#

thats handy

slender badger
#

CP will automatically pick up on the config bit, so you don't need to change anything in your content.json

devout otter
#

Oh while we're at it, is it possible to translate values other than true and false?

slender badger
#

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 😆 )

devout otter
#

Oo, that's simpler than I thought, thanks!

slender badger
#

No problem! SDVpufferheart

dusk mulch
#

(Secret note 21)

brittle pasture
#

also did you mean to duplicate every vanilla mail in that file

dusk mulch
#

oh shoot i didnt realise i had let me clean that up

dusk mulch
brittle pasture
#

yes, you're doing that in the second file

dusk mulch
#

OH

brittle pasture
#

the first file is presumably where you're adding the mail

#

which is using the wrong target

dusk mulch
#

I just changed it to Data/Mail

#

ty!!

#

let me grab the JSON's again

#

it still isnt working

brittle pasture
#

did you go to bed

dusk mulch
#

yes

brittle pasture
#

also I think AddMail only works if the mail isnt added before?

gray bear
brittle pasture
#

in this case you may already have that mail in your mailbox from previous testing

#

try using a console command to remove it

gray bear
dusk mulch
#

shouldnt starting on a new save do the trick?

gray bear
#

it would, yes

dusk mulch
#

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

brittle pasture
#

that means the mail is malformed
let me look again

#

hmm that looks fine

median dune
#

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

gray bear
#

isn't it missing something-

#

my mail code is

                        "AddMail Current Sushi_Stall_Mail now"
                    ],```
#

is the now part required? uhh

brittle pasture
#

if the fourth param isnt specified it defaults to tomorrow

dusk mulch
gray bear
#

ah alr then. looks fine

dusk mulch
#

the now is optional and will default to tommorow mail

slender badger
dusk mulch
#

sorry 😓

brittle pasture
#

does running debug showmail LewisDiaryRead show anything

dusk mulch
#

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]"

slender badger
#

Sent debug command to the game, but there was no output is standard for every debug command

gray bear
#

oh wait, why do both of them have the format value

#

are these 2 seperate mods? [confused bea noises]

dusk mulch
#

i am using a secret note framework for the secret notes and doing the mail on its own

gray bear
#

seems like smapi can't find the value for LewisDiaryRead but i dunno why, apologies

dusk mulch
#

all good, i will try messing around with it a bit more and see if i can get it working

brittle pasture
#

maybe you didnt include the file? just guessing

dusk mulch
gray bear
#

oh

dusk mulch
#

oh no

#

what

gray bear
#

pls omit
"Format": "2.5.0", from mail.json

#

and, hold on

gray bear
#
            // 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

dusk mulch
#

ohhh

#

alright

#

ty!

gray bear
#

ofc! glad to help SDVpufferheart

dusk mulch
dusk mulch
#

(maybe i should go to sleep)

gray bear
#

you're missing a { before the word "Target" in line 8

dusk mulch
#

ty 😅

gray bear
#

sleep is very good for the brain!

novel garnet
#

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

whole raptor
slender badger
#

...habit? SDVpuffersquee

#

I forgot they display as checkmarks, haha

whole raptor
#

Okay, good, I thought there was some kind of hidden reason to do that hah, cause I set i18nifier to just skip them SDVpuffersquee

zinc crypt
#

does anyone know what the ogg vorbis file name for moonlight jellies music is called

devout otter
novel garnet
#

i didn't want to transfer everything to a portraiture file since it won't clash with the SVE mod

devout otter
oak dragon
#

Published first version of my mod finally! THANK you all for your selfless help!!
https://www.nexusmods.com/stardewvalley/mods/31009

Nexus Mods :: Stardew Valley

WriteDownYourPlan is a game tool that allows you to easily create plans and receive pop - up reminders when the plans start or end. It's perfect for players who like to plan in game! (Or those who alw

teal bridge
#

@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.

zinc crypt
lucid iron
#

do u want to actually get the .ogg files?

#

rather than just play in game

sly lantern
#

How many tilesheet mods do you guys think are too many to add as dependencies for a greenhouse map? Are 3 of them ok?

lucid iron
#

what are u gonna do if i tell u 3 is too many LilyDerp

#

its your mod you should do what is needed to fill your vision

sly lantern
lucid iron
#

fwiw some tilesheets r extremely common and ppl prob have em already

sly lantern
teal bridge
#

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.)

ivory plume
#

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.

gaunt orbit
#

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

calm nebula
#

Yeah

blissful panther
calm nebula
#

It depends on

  1. How much i want the mod
  2. How many layers of dependency
  3. How stable the dependencies are
slender badger
#

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

blissful panther
#

Like how SpaceCore effectively doesn't count as a dependency, because damn near everything needs it.

calm nebula
#

Dammit I meant to go for "DecidedlyRetired"

blissful panther
#

Oh, that would've been funny. SDVkrobusgiggle

tender agate
#

I thought the number 1 concern for players about dependencies is " is this compatible with sve/smapi?" SDVkrobusgiggle

calm nebula
#

Anyways, tilesheets are fine tbh

teal bridge
blissful panther
#

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.

wide flint
#

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?

calm nebula
teal bridge
royal stump
wide flint
royal stump
#

SDVpufferthinkblob 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

blissful panther
#

Oh, it does certainly seem to be trimming the .NET runtime assemblies. Some of these are very empty.

calm nebula
#

Hmm

#

Do you know if dotnet trimming is on the class level or method level

teal bridge
#

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.

blissful panther
#

Where does the desktop version actually use it? All I can see is SdlGamePlatform using it.

ivory plume
zinc crypt
#

Is that even legal?

#

If it isn't I'll stop

naive wyvern
#

most classical piano songs are public domain now so I dont see why it wouldnt be legal Think

wide flint
#

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?

ivory plume
#

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.

wide flint
#

Oh, I was only looking at HoeDirt.CanApplyFertilizer. Didn't even think about other methods that could prevent that. Will try.

fervent horizon
#

@ivory plume I swapped that prefix to return false, on the slime limit change. I think it should be ready to merge now.

ivory plume
# fervent horizon <@226803198218731520> I swapped that prefix to return false, on the slime limit...

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 original SlimeHutch.DayUpdate is 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.)

midnight sand
#

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?

teal bridge
# ivory plume So far as I can see, Stardew Valley uses the same MonoGame repo on PC and Androi...

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.

royal stump
#

whoops, hit enter SDVkrobusgiggle

#

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.

rotund elm
#

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

royal stump
#

it uses the recipe key from Data/CookingRecipes, e.g. debug cookingrecipe Fried Egg

#

so just Pizza for that one

rotund elm
#

Ok so I tried that and still nothing X| do I need to restart the game

royal stump
#

the keys are also case-sensitive, though the rest of the command isn't

#

I think it'll take effect immediately if it works

rotund elm
#

Let me double check my casing ty!

#

Got it! You rock tysm

naive wyvern
#

hello @vale stream I would like a little help with Item Extensions Babymoji
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

proud wyvern
royal stump
#

good to know, I vaguely recalled that but wasn't sure if it only applied to other transpilers

median dune
#

Hiya does anyone know what is the best patching method to look into if i were to actually change how pathfinding works?

teal bridge
#

"Rewrite"

tender bloom
#

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

uncut viper
#

doesnt spacecore touch pathfinding or does it just touch schedules but leave the actual pathfinding alone

median dune
#

Well I'm more asking whether there is a better way than skip and basically copy and edit code in postfix

tender bloom
#

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

median dune
#

Yeah ngl the documentation on harmony's site wasn't very clear to me

tender bloom
#

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

rancid temple
tender bloom
#

You will probably pretty much want to learn how to read IL as part of this

median dune
#

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

uncut viper
tender bloom
calm nebula
#

(We went over this last time you asked)

#

You don't need harmony

#

You can straight up subclass PathFindController

lucid iron
#

tbh there's a 3rd answer here, hide the spouse npc and write your own "animated sprite entity that moves around on the farm"

median dune
#

Aw hell nah

teal bridge
calm nebula
#

And use your subclass for your own purposes

lucid iron
#

lotta work aside, there is benefit in that u wont blow up any non spouse npc by mistek this way

rancid temple
#

Hide spouse, add fake pet using spouse sprites SMCKekLmaoDog

median dune
#

Wait hold on I actually have memory losses

tender bloom
#

I was going to say fake farm animal lol

#

but i guess pets have collision

median dune
#

Ur right abt subclassing idk wtf is wrong with me xD

rancid temple
#

And they don't even try to eat grass

median dune
#

I will write that down this time

lucid iron
#

if u subclass though, make sure it never makes it into the game save

#

or if it has to, use spacecore register save type

median dune
#

Huhh

lucid mulch
#

Pathfind controller already isn't serializable

lucid iron
#

hence why i said "hide spouse npc" and not "replace spouse npc"

calm nebula
#

(I went over this already once late in 1.6 alpha to make sure I could subclass)

lucid mulch
#

Though iirc there were some static methods used during the pathfinding logic that you will need to harmony anyway even if you subclass

calm nebula
#

Then my schedule went to hell

calm nebula
median dune
#

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

lucid iron
#

and then harmony patch to swap this path find controller into the spouse npc (and only the spouse npc)

median dune
#

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)

lucid iron
#

PecoWant i dunno if u would need A* here, grid cells are just passable or not passable right

teal bridge
#

A* works on grids.

lucid iron
#

i meant that it's not really weighted

median dune
#

Actually I think it is a little bit, but I want to make sure to make them more likely to follow roads

lucid iron
#

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

teal bridge
#

Well, the weight could be uniform, but yeah, was going to say that paths might be weighted lower than dirt/grass.

median dune
#

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

teal bridge
#

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*.

median dune
#

Wdym its not? It is

#

Unless it gone so far from it that it doesn't resemble it anymore

teal bridge
#

Didn't look that way to me, maybe I just got distracted by all the other spaghetti code in the pathfind controller.

median dune
#

Well it literally states in the comment at the start that it uses A*

median dune
lucid mulch
#

the micro pathfinder is A*

#

macro one very much isn't

calm nebula
#

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

calm nebula
mighty quest
#

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:

  1. 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?

  1. 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?

teal bridge
#

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.

calm nebula
#

The current stardew implementation completely divorces map to map pathfinder and within map pathfinder

rancid temple
#

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

calm nebula
#

They are technically fine in vanilla just pathological

#

Ie. Vanilla will (eventually) give you some kind of answer

#

But it will likely be bonkers

teal bridge
lucid mulch
teal bridge
#

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.

lucid mulch
#

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

teal bridge
#

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.

calm nebula
#

But it doesn't handle disjoijt maps aka busstop

rancid temple
#

I will trust you on (b) as I don't want to test that greenhouse with the 16 cyclical warps in vanilla SMCKekLmaoDog

lucid mulch
rancid temple
lucid mulch
#

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

calm nebula
#

They said it worked only with spacecore

mighty quest
calm nebula
mighty quest
#

what is preventing more than one boss catch?

tender bloom
#

in vanilla it's definitely just the legendaries, but I think mods can set other limits?

mighty quest
#
if ((spawn.CatchLimit <= -1 || !player.fishCaught.TryGetValue(fish.QualifiedItemId, out var values) || values[0] < spawn.CatchLimit) 
#

-1 should be limitless, no?

teal bridge
#

The boss fish also have their catch limit set to 1 in the location data.

mighty quest
#

oh am i reading the wrong entry

median dune
lucid mulch
#

(O)160, (O)159, (O)163, (O)775, (O)682 cbf looking them up but they smell legendaries

mighty quest
#

ok so new question:
i transpiled a catch limit override, but still never encounter boss fish

teal bridge
#

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.

lucid mulch
#

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

teal bridge
#

Not as a final solution of course, just to rule out the obvious "transpiler not doing what I think it does"

calm nebula
#

And also

lucid mulch
#

If you can get the outcome with data, you should almost always do it with data

calm nebula
#

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.)

teal bridge
#

(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.)

mighty quest
#

yeah i guess ill try that, and to increase odds i should patch data/fish then, yes?

teal bridge
#

You can definitely ramp up the Chance to make testing faster.

mighty quest
#

didn't bosses get boosted chance pre 1.6 if the conditions were met?

teal bridge
#

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.

mighty quest
#

seems like the chance will be awfully low starting from 0 and just adding fishinglevel/50 + dailyluck

calm nebula
#

No, trash has the precedence of 1000

calm nebula
teal bridge
#

Yeah ok, not literally "trash", just "stuff you don't want right now". Legendaries have low precedence.

mighty quest
lucid mulch
#

oh yeah IgnoreFishDataRequirements is the other free way to make the contents of Data/Fish go away

mighty quest
#

interesting

#

thanks for sharing this

dusk mulch
#

@tiny zealot Are you sure the images are 256x128?

tribal ore
#

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

calm nebula
#

Not without c#

tribal ore
calm nebula
#

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

tribal ore
#

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

royal stump
#

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#

brave fable
#

yeah all playercontrol sequences are completely hardcoded, you can't just drop one in yourself via pure CP

tribal ore
brave fable
#

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

calm nebula
#

It isn't hard though tbh

#

Literally

#

PlayerControl x y would be perfectly reasonable as an api

brave fable
#

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

calm nebula
#

Set it up with other commands beforehand tbh

#

Hi Esca!

#

Btw does CP have a (is host player) token somewhere

brave fable
tribal ore
#

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?

brave fable
#

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

tribal ore
#

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)

royal stump
brave fable
#

just leaving this here as a warning

calm nebula
brave fable
#

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

reef kiln
#

how do I remove an animal from marnies shop. I want the only way to get it to be hatching it.

tribal ore
#

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

opaque cobalt
#

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}}",

brave fable
#

you can absolutely use a custom map

desert crane
#

Hi blueberry, sorry for bothering, could you maybe help me with something?

calm nebula
#

I feel like you spent a bunch of time on something where doing a custom command would be cleaner tbh, bluebs

brave fable
#

i did it how vanilla does it 🤷‍♂️

calm nebula
#

Yeah, and vanilla is nuts half the time lol

brave fable
#

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"
}

desert crane
#

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

brave fable
#

i have absolutely no idea how flowers and honey interact lol

#

something something bees

tribal ore
desert crane
brave fable
#

yeah i've never looked at machines, i'm not interested in them at all

desert crane
#

This is machinism

#

I was joking, dunno if it was comprehensible

brave fable
#

i get it, but i aint laughing 😌

desert crane
#

Ahah bad joke sorry

brave fable
#

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

desert crane
#

For me, I have no idea where the things I need to change come from. It's basically all not understandable the same

tribal ore
#

You could try to find an existing bee/honey mod and seeing what they do?

#

There must be at least one

desert crane
#

Actually I did this for everything I needed except for this

#

Nice Idea gonna check

tribal ore
#

😛 It's the only trick I have at the moment. Good luck!

desert crane
#

Ahah thank you

uncut viper
#

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

desert crane
uncut viper
#

the multiplier is hardcoded

desert crane
#

I saw somebody mod do something like this

uncut viper
#

ObjectDataDefinition.CreateFlavoredHoney()

#
honey.Name = ingredient.Name + " Honey";
honey.Price += ingredient.Price * 2;
desert crane
uncut viper
#

is that a PFM mod?

desert crane
#

Yes

uncut viper
#

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

desert crane
#

Selph implied it should be possible, but maybe he was wrong? Are you 100% sure about this?

uncut viper
#

like 95% after following the trail of functions that happen with the FLAVORED_ITEM query

brittle pasture
#

ok I'm back
What I suggested was using machine price modifiers, which is applied after the machine makes the output item

desert crane
#

Which should do the trick

dusk mulch
#

im trying to put an image onto a secret note, what are the dimensions for it?

uncut viper
#

unless you want to alter individual flowers

desert crane
brittle pasture
desert crane
#

So it does it's calculation, and then I add a final calculation. That's the point?

brittle pasture
#

Yes
of course that wouldnt work for honey spawned outside the beehouse

desert crane
#

The one outside beehouse is not really a problem

lusty elm
#

All my mods are finally updated for 1.6 SDVpufferparty (Only a Year Late)

desert crane
#

{
"Action": "EditData",
"Target": "Data/Machines",
"TargetField": [ "(BC)10", "OutputRules", "Default_RadioactiveOre", "Triggers", "ItemPlacedInMachine" ],
"Entries": {
"PriceModifiers": -50
},
},

uncut viper
#

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

desert crane
#

This is kind of what I did for now, not much

#

No wait

#

It didnt save the change I did

brittle pasture
brittle pasture
desert crane
brittle pasture
#

PriceModifiers is a list of models

#

Quantity modifiers to be exact; click on that link to see how they're organized

uncut viper
#

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

desert crane
uncut viper
#

140 is the artisanal honey price

lusty elm
#

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. rooComfy hopefully it makes it more fun, I really like that map's design but its always been kinda ehhhh, from a practical usage perspective.

uncut viper
#

100 if you dont have artisan

#

before mods

desert crane
uncut viper
#

right, and other mods can edit the price after you

uncut viper
#

not the price of the beehouse output, but the base price of the Honey item itself

desert crane
uncut viper
#

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

desert crane
uncut viper
#

i just said you dont need to care about it happening

brittle pasture
#

How do you stop people from using CJB cheats?

desert crane
#

Exactly

desert crane
#

So Selph I got lost with talking, but I didnt understand what I have to do next

#

You said about a link

lusty elm
#

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?

brittle pasture
#

entries in the price modifiers array look like that

uncut viper
uncut viper
#

(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)

desert crane
#

I don't know, like this?

modest dagger
#

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?

uncut viper
#

you can put as many context tags as you want on an item

cyan marsh
#

is there an example of adding a scarecrow to the game?

lusty elm
uncut viper
#

as long as you dont put int.MaxValue number of tags

modest dagger
#

No idea what that means so I probably won't

uncut viper
#

you cant have more than 2.14 billion tags

modest dagger
#

Y'know I think I can manage

brittle pasture
# desert crane
  • 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
modest dagger
#

How do gift tastes work in response to those tags tho?

uncut viper
lusty elm
#

Thanks! goes to look at page

brittle pasture
#

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 😓

uncut viper
#

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

desert crane
uncut viper
#

its a bit roundabout because content patcher doesnt have a token for player stats