#making-mods-general

1 messages ยท Page 202 of 1

tiny zealot
#

unique string ids, after all! SDVpufferheart

lucid iron
#

Yeah it's fine

blissful panther
#

I've actually been meaning to ask Pathos how things like MEEP, MMAP etc. could be counted in the mod stats... because as far as I understand it, they won't be counted currently because they don't technically have content packs for them?

lucid iron
#

Oh i had an idea for this

#

Well, not quite for mod stats

blissful panther
#

My thought was an extra dependency field sort of.

lucid iron
#

But i was hoping to add dependencies to logs

#

So that when u get someone's log it's clear which mods r use ur framework and dying

#

Perhaps it would be a thing a C# mod opt in to having

median dune
#

Hey imma just bounce this since youre here now, I'm trying to separate the game logic from your mod's features

lucid iron
#

Oh i didn't see the ping

true coyote
#

yeah... I'm not sure what to do about this

lucid iron
#

If you take a look at Chest.cs you can see that the game normally passes a different highlight function to itemgrabmenu

#

I am pass a custom one

#

But u can use the game built-in one if u want

#

Not sure if this is what u r asking

median dune
#

Well I pretty much just need vanilla chest or maybe like fishing treasure behavior so yeah, I didn't think about looking how the game handles it for some reason I am having major brain lags lately

lucid iron
#

Do you want just a dropped item kind of chest? Can take out but not put in

median dune
#

Yeah that's actually exactly what I want

#

The point being that an npc can accumulate items that then the player can get from them

true coyote
#

sigh and the sprite changes don't work either

lucid iron
#

In summary

  • generate and store inventoryId somewhere
  • Game1.player.team.GetOrCreateGlobalInventory(inventoryId)
  • When interact to get items, use Farmer.addItemsByMenuIfNecessary
#

You can opt to use a ItemGrabMenu (don't need the custom subclass i had) with a highlight function that always return false but u need to then implement add item receive item

median dune
#

alright thanks SDVpufferwow

gentle rose
#

do any of you people who know things about the game know why a relatively small subclass of DialogueBox might be eating the mouse cursor

#

mouseCursorTransparency is 1f which I think means opaque SDVpufferthinkblob

tiny zealot
#

if i were in charge, 1f in Transparency would be fully transparent, and 1f in Opacity would be opaque. but it's stardew so who knows /lh

gentle rose
#

same and it may be the case that that is true

#

I honestly can't tell from other code

tiny zealot
#

try 0f or 0.5f and see what happens?

lucid iron
#

I think if u don't restore prev menu properly u lose hud and mouse

gentle rose
#

hud is still there though SDVpufferthinkblob

#

everything but mouse is fine

#

wait improvement, okay, we have a mouse it's just under the dialoguebox now

#

now I need to figure out why it came back when I did the hacky thing I did

#

if it's this simple I'm going to be as annoyed as I am relieved,,,

#

god dammit pffft

#

if anybody from the future is searching for answers and finds this, I fixed it by adding the this.drawMouse(b) call I was missing from the end of the original draw method pffft

tiny zealot
#

oh, that would do it, yeah

gentle rose
#

works perfectly now!

faint ingot
#

hmmm I just tested sending myself a letter item and it just disappeared when opening and doesn't appear in collections.

hallow prism
#

do you want a letter (with text) or a flag?

#

if you want a letter you need to have the entry in data/mails too

cyan marsh
faint ingot
#

Yeah so I just realized I moved my data\mail stuff to an include file, but then didn't actually, you know, include it

tiny zealot
hallow prism
#

"is there an error or is english weird again?"

#

genuinly can't tell

hard fern
#

Dedugging

cyan marsh
#

pretty sure the person who made that didn't notice

tiny zealot
#

bleak

calm nebula
#

No, it's adding thr word "duh" in the middle

gentle rose
#

deging?

wanton pebble
#

No, I believe the joke is as atra said - debugging, with duh in the middle, for when you find the bug that makes you go "oh, duh!"

hallow prism
#

maybe it's a mix of debugging and deducing

gentle rose
ivory plume
#

Which sites did you want update keys for?

stable grotto
#

allowedValues: new string[] { i18n.Get("config.Water.values.transparent"), i18n.Get("config.Water.values.semi"), i18n.Get("config.Water.values.opaque") }one of the two lines in question

#

maybe I messed up the config setup, could be, I don't know what I'm doing half the time

ivory plume
#

allowedValues has the actual values that will be saved to the config.json file. You should use the formatAllowedValue argument instead to convert the saved values to translated display text.

stable grotto
#

oh

teal bridge
#

Does any event fire when quitting the game, as opposed to returning to title screen?

ivory plume
#

You can implement IDisposable on your mod entry class, and SMAPI will call it when exiting normally. That won't always be called though, depending on how the exit happens.

teal bridge
#

Yes, I imagine killing the process directly or Ctrl-C from console might not run any disposes/finalizers. Less clear on exiting from the game's main menu (exit tab), or Alt-F4.

#

It's the latter two "normie exits" I'm interested in.

#

I just want to keep some HUD state persistent between game runs and would rather not have to write to a file every time it's changed.

royal stump
#

it looks like you could monitor Game1.quit or possibly TitleMenu.quitTimer for the exit button press, but I doubt that covers alt-f4 exits

#

the title menu counts down there, sets Game1.quit to true, and then the next update method call shuts it down, from the look of it

teal bridge
#

Surprisingly, overriding Dispose actually does seem to work for Alt+F4.

tawny ore
#

Does it work if you just hit the power button on your PC?

teal bridge
#

Very funny.

royal stump
#

I think if you just press it and don't cut power instantly, it should SDVkrobusgiggle
it's been ages since I tested all that, though

#

windows at least used to try and shut stuff down normally before force-closing after a delay

teal bridge
#

Yeah, ACPI and all. I only press the power button to turn on my PC, not off.

tribal ore
#

advancedMove is the bane of my existence. I don't understand how the command differentiates between durations and x y coordinates.

advancedMove farmer false 0 -3 0 1000
-- this is supposed to move the farmer 3 tiles up, have them facing up when they get there and pause for 1000 ms. But the game interprets the 1000 as another y coordinate.

tawny ore
teal bridge
#

I can't even reach the power cord, it's all in various enclosures and conduits.

#

I could power off the UPS, maybe. But I won't.

tribal ore
#

Pour water on it. That will absolutely shut it off

teal bridge
#

Nah, it's water cooled, so pouring water on would actually make it run better.

#

(not really)

tawny ore
#

The 0 is what causes it to interpret the last pair as x y

tiny zealot
#

what matt said. for facing you have to use 4 to face up instead of 0

teal bridge
#

Incidentally, does anyone else see the "sweat sip" emoji as pufferchick flipping you the bird? I try not to, but that's what it looks like to me every single time.

tribal ore
#

xD

tawny ore
tribal ore
#

Alright, going back to debug this blasted event again. Thanks all

calm nebula
lucid iron
#

What about gramps is he flip bird or thumbs up

tribal ore
#

Flip bird

#

Thumbs up would need to have the thumb pixels moved outwards slightly

#

They can't be exactly in the middle

tawny ore
#

If I don't notice the sleeve/arm or whatever. This looks like flipping off to me every time.

tribal ore
#

Don't get me wrong, gramps in sunglasses, flipping the bird as he ascends back to the heavens is a vibe

tawny ore
#

Gramps Out!

tribal ore
#

"So long, muthafuckas!"

#

Btw, does the "breathing" flag in addTemporaryActor actually do anything if the sprite sheet doesn't support it? Will the sprite bounce up and down a little or something?

#

Or does "breathing" mean something else entirely?

teal bridge
tropic walrus
#

Can I use this to have a Special Order where you have to deliver a Big Craftable, among other non-Object items?

drowsy pewter
#

try it

#

theres also an id tag that has the qualified id

true coyote
#

o/ 6480 good afternoon

calm nebula
tiny zealot
#

NPCs have some data fields to determine how the breathing rectangle is selected but i don't know if temporary actors have access to that

latent mauve
#

since addTemporaryActor uses the internal NPC/monster/animal name to assign the character, I'd assume it uses the breathrect field associated with that internal NPC name for a character (or the default if unset), but I could absolutely be wrong about that.

mellow karma
#

hey guys i cant find it right now, so how would i add a fruit tree to a custom map?

ornate trellis
tribal ore
#

Thanks for the "breathing" info. I might test to see if I can do something funky with it now, like make a custom critter sprite jitter around

#

Also, I got my advancedMoves working correctly! ๐Ÿ˜„

lunar dawn
#

hii I have been going down a rabbit hole of trying to add a buff to an artisan good that removes all debuffs. I've looked into buff frameworks and it might be an option but I came across the odd squid ink ravioli buff and i see that it temporarily prevents debuffs for like a few minutes. I think this would work just fine for my purposes, but i am still not sure how to add this buff to the food item because as far as i know i can only play with the "custom attributes" field when adding buffs to an artisan good

lucid iron
#

Can you define "artisan good"

lunar dawn
#

it has the category of -26 designating it as an artisan good, but is also edible

lucid iron
#

All cooking is object so you can put the squid in ravioli buff on something else

#

I don't recall the type mattering here

lunar dawn
#

my item isn't considered a cooking item is my problem

#

well

#

im looking at the wiki and

lucid iron
#

Machines can produce cooking item

lunar dawn
#

can I add it by using BuffId?

#

the buffs section of the object modding wiki is only showing me stuff like buffid and custom attributes

lucid iron
#

I don't have it open but unpack the game content and check squid ink ravioli's entry in Data/Objects

lunar dawn
#

I guess i am able to add immunity with custom attributes it just wasnt specified in the modding objects wiki page

#

well that makes everything easier

meager loom
#

I'm checking out this page https://stardewmodding.wiki.gg/wiki/Tutorial:_Sending_a_Letter_(Content_Patcher) for sending letters but I'm a bit confused on the conditions. I want to use ccVault for one of my letters but it looks like each condition needs a letter indicating it but I'm not sure what that would be for flags. Does anyone know of a list or anything that'll tell me all those?

Stardew Modding Wiki

It's really, really, really easy to send a letter in Stardew Valley thanks to Content Patcher. In fact, it's so easy it's usually just bundled into the information about events, and it's hard to find a mod that just sends mail - usually the letters are part of a mod for more dialog, events, getting recipes, new NPCs, etc. But today, we're going ...

wanton pebble
#

Run that by us again?

#

I followed what you were saying up until after the c c vault thing

meager loom
# wanton pebble Run that by us again?

Sorry itd probably help if I knew the names for these things lol. Basically, the line for choosing when to send a letter seems to look like this

"012344667/r .3/d Mon Tue Wed Thu Fri/x junk_mail_1": "null",

The r and d seem to indicate what kind of condition you are defining. I want to use the flag ccVault to send this mail, but I don't know what letter should come before it to indicate a flag condition. Does that make more sense?

#

I could assume f but I feel like that's a bad way to go about it lol

faint ingot
#

So I have a hilarious (to me) idea that I may implement in a future version of my jail mod, which is to define some crimes the farmer may be guilty of (such as giving beer to children, etc) flag those crimes, and use NPCVisibleHere to make it so the farmer gets thrown in jail for the day if they enter a location where either of my cops are in their current schedule.

#

I would probably disable that by default though since it could mess up your day if you didn't feel like playing cops and robbers

meager loom
faint ingot
#

I probably would also want to think about crimes that could actually benefit the farmer if they manage not to get caught. Let them steal seeds from Pierre or something lols

wanton pebble
#

No letter

#

Letters are deprecated

meager loom
wanton pebble
#

No, mail should be sent by triggeractions now

meager loom
#

Oof damn I was reading the wrong docs then lol

#

or old ones rather

wanton pebble
#

And event conditions should be something like LocalMail - full precondition names

#

Yep. Mind linking the old guide you were using so we know what to fix/avoid?

meager loom
#
Stardew Modding Wiki

It's really, really, really easy to send a letter in Stardew Valley thanks to Content Patcher. In fact, it's so easy it's usually just bundled into the information about events, and it's hard to find a mod that just sends mail - usually the letters are part of a mod for more dialog, events, getting recipes, new NPCs, etc. But today, we're going ...

#

Do you have a link to something up to date for mail?

#

Everything else I found was using Mail Framework mod which id prefer to avoid since I need like 2 mails total

wanton pebble
#

Oh boy. Guide wise I don't know, example wise see Part of a Saloon Breakfast

#

Tia, others, if you're around

#

1.6 triggers for mail guide?

meager loom
tribal ore
# meager loom Gotcha, I'll download some stuff and see if I can figure it out. Thanks for the ...

This isn't a comprehensive guide, but an example from my mod:

//If player has 3+ hearts with Sebastian the day before Maru's birthday, Seb will send the player a letter with a gift for Maru

        "{{ModId}}_MaruBday": {
            "Id": "{{ModId}}_MaruBday",
            "Trigger": "DayStarted",
            "Condition": "!PLAYER_HAS_MAIL Current {{ModId}}_SebInvisible, PLAYER_FRIENDSHIP_POINTS Current Sebastian 750, !PLAYER_NPC_RELATIONSHIP Current Sebastian Married, SEASON_DAY Summer 9",
            "Actions": [
                "AddMail Current {{ModId}}_Letter_MaruGift Now",
            ]
        },
    ```
#

You can see how I'm chaining conditions together in the trigger action "Condition" field, then sending an actual letter. The naming convention {{ModId}}_Letter_whatever is just something I'm following in my own mod

#
{
    "Action": "EditData",
    "Target": "Data/mail",
    "Entries": {
    "{{ModId}}_Letter_MaruGift": "Your text here[#]Maru's Birthday Surprise",
    },
},```
#

That's the actual letter entry

meager loom
meager loom
#

Yay! I'm gonna go dive into that! Thanks @tribal ore and @wanton pebble!

tribal ore
#

Not an expert, but I can answer a lot of the basic questions now

meager loom
latent mauve
#

I think you'd be looking for "PLAYER_HAS_MAIL Any ccVault Any" for your condition?

#

Since ccVault is considered a mailflag, last I checked, and for multiplayer compatibility, you'd need to use Host or Any for the player, since farmhands don't get Community Center flags.

meager loom
tribal ore
#

If that makes sense

#

The term "mail flag" is rather confusing

meager loom
#

I get the conept of using the mail system for flags for the most part now but I'm not getting what this flag is actually checking I guess

tribal ore
#

Whether that flag is present in the save file

meager loom
#

Not that it really matters for the record, I trust you guys that its right, just curious really

tribal ore
#

If you set a flag, it gets put onto the save. You can actually see them if you open the save in a text editor

meager loom
#

Well I guess rather what sets it in the first palce?

tribal ore
#

Lots of things can set the flags. If you're setting them yourself, you'll probably be doing it with an event or with a trigger action. But there are flags that the game uses itself internally

#

like the ccvault stuff

meager loom
#

I mean specifically PLAYER_HAS_MAIL

tribal ore
#

The flag will stay until you remove it

#

Ummmm.... if you look at the example I posted, it's this line in the trigger action:

                "AddMail Current {{ModId}}_Letter_MaruGift Now",
            ]```
#

If you set that flag to "Received" instead of "Now", it will just set a flag and not actually trigger the mailbox

meager loom
tribal ore
#
         "AddMail Current {{ModId}}_Flag_ThingToCheck Received",
   ]```
#

Yes!

#

You remove the flag later with "RemoveMail"

meager loom
#

I'm assuming that can be leveraged to set flags without the player knowing?

tribal ore
#

Yes

meager loom
#

or more specifically without attaching it to an actual mail

tribal ore
#

Exactly. The mailbox icon won't trigger. It will be set silently

#

If you use "Received" instead of "Now"

meager loom
#

Neat!

tribal ore
#

If you send an actual letter with "now", then the flag will NOT be set until the player has opened the mailbox and read the letter

#

That's tripped me up before

latent mauve
#

and the second "Any" in the condition for the type in my example just means it'll count the flag in any of these states: if it's in queue, if it's already in the mailbox, if it's been read, or if it skipped the mailbox (which the CC flags do)

lunar dawn
#

ok im fiddling around with the idea of using "remove buff" trigger action but I'm wondering if there's even a point because i also plan on granting 11 immunity which is supposed to make you immune to all debuffs. my question is, will all previously applied debuffs be removed solely by eating something that provides 11 immunity, or would they stay and just prevent new debuffs?

latent mauve
#

Easy way to test is probably to give yourself a debuff and then equip the basilisk paw trinket?

#

I'd assume since it specifically calls out changing the probability of being debuffed that it would not clear pre-existing debuffs, though.

lunar dawn
#

alright ill try that when i get in game

stable grotto
ivory plume
# stable grotto can't figure it out, unless "get the display text for a value" means exactly one

Something like this:

configMenu.AddTextOption(
    mod: this.ModManifest,
    name: () => i18n.Get("config.PetBowlShadow.name"),
    tooltip: () => i18n.Get("config.PetBowlShadow.description"),
    getValue: () => this.Config.PetBowlShadow,
    setValue: value => this.Config.PetBowlShadow = value,
    allowedValues: [ "", "beach", "standard" ],
    formatAllowedValue: value => i18n.Get($"config.PetBowlShadow.values.{value}").UsePlaceholder(false) ?? ""
);
#

Or if you prefer more explicit values:

configMenu.AddTextOption(
    mod: this.ModManifest,
    name: () => i18n.Get("config.PetBowlShadow.name"),
    tooltip: () => i18n.Get("config.PetBowlShadow.description"),
    getValue: () => this.Config.PetBowlShadow,
    setValue: value => this.Config.PetBowlShadow = value,
    allowedValues: [ "", "beach", "standard" ],
    formatAllowedValue: value => value switch
    {
        "" => "",
        "beach" => i18n.Get("config.PetBowlShadow.values.beach"),
        "standard" => i18n.Get("config.PetBowlShadow.values.standard"),
        _ => value // unknown value
   }
);
stable grotto
#

that bottom one looks very similar to what I tried at some point but it always screamed about syntax errors when I put my delimiters... ๐Ÿคท

astral prism
#

trying to output descriptions and other strings in game but i get these types of strings i'm unfamiliar with (assuming i18n)
[LocalizedText Strings\\Objects:Weeds_Description]
how do i convert these to real strings (other than manually parsing and loading and stuff), i.e. is there a helper function for this?

tawny ore
#

Those need TokenParser to evaluate

#

From what I understand, it's so that things like object names aren't permanently associated with their instances so that they're able to change more easily

astral prism
tawny ore
#

TokenParser.ParseText in the game code, and you can see the values in the unpacked content Data Strings folder

#

Strings/Objects.json

astral prism
#

thank you!!!!!!!

tawny ore
#

If you use TokenParser.ParseText("[LocalizedText Strings\\Objects:Weeds_Description]") it'll return "A bunch of obnoxious weeds."

faint ingot
#

Can I put a token inside of an i18n token?

vocal hamlet
#

Hey guys, I'm having a hard time trying to understand the relation between Tailored items (pants, shirts, hats). The IDs for objects and their relation to Craft/BigMachines is much clearer, but the same logic does not seem to apply to tailoring(which seem to be based on tags I haven't seen anywhere else in the json data). You guys have any tips on how to manipulate it in C#? (I'm trying to make something like a recipe book, but for tailoring)

brittle pasture
#

you did unpack Data/TailoringRecipes yes

ivory plume
#

Central Station release candidate 1 is now available!

If you want to give feedback before it releases, you're almost out of time. It'll be much harder to change the format once it's released.

See the [pinned message](#making-mods-general message) and [alpha thread](#1336049684950683810 message) for more info.

true coyote
#

So I'm still struggling to figure out why my fence isn't pulling from the tilesheet, and instead just placing the sprite object. The object conditions for seasonal/recolor changes aren't working either. If I could get a pair of eyes on the jsons #making-mods-general message

to see if maybe I have an extra and or missing load action/some other thing im overlooking, and if there are any errors on the changes for sprite recolors

#

thank you all for your help, it has been tremendous, and I apologize for being such a slow learner

lucid iron
#

can u show us ur file structure

#

one weirdness i see is that your loads used {{Seasonal}} which would be true or false depending on config

#

rather than the content patcher token {{Season}}

#

here is example of using season token in load, along with corresponding file structure

{
  "Action": "Load",
  "Target": "{{ModId}}\\Flooring1",
  "FromFile": "assets/floors/1_{{season}}.png",
},
true coyote
#

Seasonal is just config token, and further in on the content json I do suffix them with {{season}} let me go turn on my pc

#

perhaps I should change the token to be seasonal/non seasonal like my file structure instead of true/false?

#

are the two paths splitting between seasonal/non

#

but at the very least, I am using the {{season}} token for those

        "LogName": "Starblue Light Seasonal",
        "Action": "EditImage",
        "Target": "ShilohAreles.CuterPicketFence/object",
        "FromFile": "assets/{{Seasonal}}/{{Tone}}/{{Recolor}}/fenceobject_{{season}}.png",
            "When": {
            "Recolor": "Starblue",
            "Tone": "Alt",
            "Seasonal": "True",
            }```
uncut viper
#

as chu points out your config tokens are only ever going to be true or false
{{Seasonal}} will become, for example, just true
meaning you are trying to load an asset from assets/true/{{Tone}}/etc etc

lucid iron
#

yep

uncut viper
#

"NonSeasonal" isnt a thing in your content.json

#

(nor is Seasonal outside of the name of a token)

true coyote
#

hmm ok, so I should change it to maybe having it be seasonal, nonseasonal instead of true, false?

#

somehow I've skirted through on seasonal true false for replacers through dumb luck lol

uncut viper
#

up to you how you want to reorganize or change it. it just needs to end up matching a file path

#

you just need to think about what the tokens will look like when content patcher fills them in

lucid iron
#

you already got seasonal in the When

#

i'd just use assets/Seasonal/{{Tone}}/{{Recolor}}/fenceobject_{{season}}.png (and assets/NonSeasonal/{{Tone}}/{{Recolor}}/fenceobject_{{season}}.png behind a when not seasonal)

true coyote
#

mmk! thats what I was just about to ask

#

thanks friends. as for the fence not pulling from the tilesheet and instead placing the object sprite, do you see anything glaringly obvious there? I feel like I might have too many load actions? or maybe something missing

uncut viper
#

you can have as many load actions as you want so long as they arent loading to the same target and with the same exclusive priority. im not familiar enough with fences to comment on anything else

calm nebula
true coyote
#

they might be? I have a load for the assets/object in both the content and the object json, but I have to check if the object was loading correctly without the load in the content... if that makes sense

uncut viper
#

content patcher would yell at you in the log if they were

true coyote
#

o7 well there is no yelling from CP so I guess its fine

#

maybe these hiccups with the {{Seasonal}} token is the problem

#

can someone explain {{TargetWithoutPath}} ?

uncut viper
#

it becomes everything after the last / in your Target

#

(or last \ or \\ etc)

#

your Target is not a file path. but pretend it was. TargetWithoutPath would be the name of the file, but without all the folders its inside

true coyote
#

so it would be better here to split the seasonal true/false up so I can name the folder instead of something like

        "LogName": "Vanilla Dark",
        "Action": "EditImage",
        "Target": "ShilohAreles.CuterPicketFence/object",
        "FromFile": "assets/{{TargetWithoutPath}}/{{Tone}}/{{Recolor}}/fenceobject.png",
            "When": {
            "Recolor": "Vanilla",
            "Tone": "Alt",
            "Seasonal": "True, False",
            }
        },```

this wouldnt work, correct? or could I add a `\\Seasonal, NonSeasonal`  somewhere?
uncut viper
#

that would become assets/object/{{Tone}}/{{Recolor}}/fenceobject.png

true coyote
#

bah, still placing the object instead of the actual fence tilesheet

#

but, the object sprite changes seem to work

#

hmm except for the default fence's variation

#

ok fixed that

#

now just to tackle the problem with it not placing from the tilesheet

low edge
#

hey guys, new to modding so I apologize if this is a stupid question. Is there a way to make it so that the first thing an NPC says to you is something like "hello farmer, we haven't met yet" (would be something else ofc but I'm just brainstorming). I don't mean on the first day of spring in the first year, I mean like even if you don't talk to the NPC at all until fall in year three or whatever there's a way to guarentee that "hello farmer, we haven't met yet" is the first thing they say?

wanton pebble
#

Not easily, since "Introductions" dialogue key is a CT IIRC

#

(Conversation Topic)

uncut viper
#

you can just make that their entire dialogue file until they have not been unmet

wanton pebble
#

I think you'd have to patch to all dialogue keys if relationship is unmet

tiny zealot
#

oh button's way is easier, lmao

uncut viper
#

fill in all the default, necessary keys with the same thing

tiny zealot
#

i was typing up a whole thing with trigger actions and mail flags

uncut viper
#

use the Relationship token to swap em out the next day onward

calm nebula
#

(In fact, there are no necessary dialogue keys)

tiny zealot
#

another way to do it is to make an unconditional event in an area the player can't bypass before meeting them, and do the mandatory introduction dialogue there instead of in character dialogue

calm nebula
#

I had a way to do it in 1.5.6 with thr $1 dialogue token

uncut viper
wanton pebble
#

rrrgh. This is incredibly niche, but does anyone know why NVIDIA's recording feature no longer plays well with SMAPI?

tiny zealot
#

if it's really critical that that be the first thing they say, then it's probably better suited for an event anyway, imo

low edge
#

okay, thank you! I'm extremly new so that'll be something I have to research and probaby tackle at a later date (no idea what dialogue keys are xD) but thanks for letting me know it's possible. And yeah, it sounds easier to make it, say, an event that triggers with whatever relationship points you get with talking to them for the first time lmao.

low edge
#

and it's not really that important, I'm really new so I am more testing the waters as I learn

uncut viper
low edge
#

half-making a mod half-using it as a learning device xD

uncut viper
#

(also, would that not make spring the necessary key)

tiny zealot
#

my memory is telling me the minimum dialogue file is seven lines, one for each weekday, but don't trust that guy he's unreliable

low edge
uncut viper
#

well the player can definitely meet elliott before going to the beach

low edge
#

hm

tiny zealot
#

a schedule edit conditioned on that relationship token could fix that though

low edge
#

If it could be anywhere, then that opens up a lot of story possibilities actually.

#

Similar to meeting Willy kind of thing

uncut viper
#

it wouldnt account for other modded schedules for him, though

low edge
#

I'm also extremely new (never modded Stardew or anything else, and I have no coding experience) so it's probably better I look at simpler solutions until I get the hang of it.

#

Thank you so much again, very kind of you to help. I really appreciate it.

uncut viper
#

!startmodding in case it helps you start your search for how to do things

ocean sailBOT
#

Making mods can be broadly divided into two categories:

Usually itโ€™s easier to start with making content packs, since you don't need to learn programming.

uncut viper
#

(you can ignore the second bullet point)

teal bridge
#

Has anyone ever tried using [InstancedStatic] on user code? I'm wondering if I can slap it on a Harmony patch, or if it's only applicable to the internal game code.

calm nebula
#

I haven't but it might work

#

Tbh why not use PerScreen (honest question)

winter dust
calm nebula
#

(I wouldn't use InstancedStatic personally; I do know that the game does scan every loaded assembly but it feels like an unstable api.)

teal bridge
# calm nebula Tbh why not use PerScreen (honest question)

Yeah, that's a good point and I realized after I asked the question that it was probably a better idea. Even though I'm using it several times already, it sort of slipped my mind that it could actually be used from a static context as opposed to just the mod entry.

calm nebula
#

(The reason why I asked "honest question" was because I wanted to know if you were avoiding perscreen for performance reasons, etc)

ivory plume
# winter dust Well, I've got mods on ModDB, ModLand, GameFront and the Stardew Valley Forum, n...

CurseForge, ModDrop, and Nexus have a custom export API which lets SMAPI fetch mod data in a very efficient way, and GitHub is big enough that it's worth the performance impact of supporting it even without a special API.

ModDB/ModLand/GameFront don't seem to have an API though, and Stardew Valley mods probably aren't big enough on those sites for them to consider creating an API just for SMAPI.

teal bridge
#

(I've got almost everything working here, the one hold out is - surprise! - the fishing rod)

#

Would've been so nice if there was a method like, oh, I don't know, IsToolButtonHeld(), but noooo, it has to be hardcoded Buttons.X everywhere.

winter dust
next plaza
#

Just popping in to say I'm not dead or anything, just been going through a lot the past 2-3 months. (I have been keeping in touch with a few people around here though, so feel free to check in if I've talked to you a couple times before - as long as it isn't mod related ๐Ÿ˜….) Going to stay focused on my mental health for a while longer, but if there's something super critical (spacecore causing a crash outside of weird obscure circumstances, for example) feel free to ping me here on discord and I'll try to get a hotfix out. (I've stopped even checking Nexus new mods and comments the past couple of weeks (not that I was responding much lately before that))

(There is a chance some stuff will come up soon where I won't have access to modding for a while, but I'll try to remember to let Pathos know if that's the case though so he can release critical fixes since he has access to my github repo + Nexus mod pages.)

Once I'm in a better place mentally I'll try to take care of my backlog of not critical bugs and stuff (and potentially resume work on some of my WIPs), though it will likely be a bit still considering I haven't opened a game since November or done hardly any programming for almost the same amount of time.

velvet narwhal
uncut viper
#

ive owed you a cat picture for a while

lucid iron
#

Glad you are ok casey bolbwawawa

proven spindle
#

You've already done so much for us casey, take all the time you need SDVpufferchickhug

winter dust
glossy cargo
#

Hey, I'm looking for the code that lets the player grab the Junimo Plush at 12h sharp on the last day of the season. Does anyone know where that code is? I tried to go through GameLocation, Town, Game1, Utility, Farmer, Event and even Object and Furniture. Couldn't find anything Sadge

#

I also was unable to find any reference to it in the Town.xnb data file

tender bloom
#

i would search around for the ID number of the furniture

glossy cargo
#

That was part of my search

tender bloom
#

huh

#

my first guesses would all be town, gamelocation, etc

#

so I'm pretty much out of good ideas

latent mauve
#

I doubt the secret note would matter, right?

glossy cargo
#

I searched for keywords Junimo, Plush, 1733, and also references to Game1.timeOfDay == to find potential conditions about the time

glossy cargo
latent mauve
#

Yeah, and I can't think that it would be linked to the call anyway

glossy cargo
calm nebula
#

(Bush.shake)

glossy cargo
#

oh nice, that's exactly it

#

it's Bush! ahhh that makes so much sense!

#

Thank you very much HappyApples

tender bloom
#

Bush.cs

#

ah you beat me!

glossy cargo
#

I rarely need bush lmao. I think I only needed them for walnuts so far. I forgot they even have code

calm nebula
#

btw, I found it by setting ILSpy to Constant

tender bloom
#

I did find in files across the full decompile

calm nebula
tender bloom
#

for 1733

glossy cargo
#

dang I should set that up

#

it's kind of a pain because to this day I still need to sometimes switch to the 1.5 branch

#

but that sounds massively valuable

calm nebula
#

I just have 1.5 somewhere

#

tbh.

glossy cargo
#

I can almost always find the code I need, after so many years making this mod I feel like I know the code base pretty well, but sometimes I still get stumped haha

#

thanks all panda_Love

calm nebula
#

at this point in my life I should use my skills for good use lol, I've stopped modding lol

tender bloom
#

i have several folders with full decompiles lying around

#

mostly from during the alpha

calm nebula
#

I still remember

#

I probably shouldn't remember

lucid iron
#

which term is feels more right

  • SMAPI Mod
  • C# Mod
teal bridge
#

SMAPI. Don't discriminate against the VB.NET community!

nova gale
#

I tink I found a bug with the ObjectColor field on the machine rules output, how do we report those?

#

(specifically, if I'm following this correctly, it will always overwrite the stack size to 1 when it calls coloredItem.CopyfieldsFrom if it is converting a normal non coloredobject into a coloredobject)

lucid iron
#

!officialbug

ocean sailBOT
lucid iron
#

in your case make sure to do a repro with some minimal C# mod

#

to rule out other mod doing weird stuff

nova gale
#

in this case I can do it with just a CP mod by itself (and found the line of code I'm fairly sure is the culprit)

lucid iron
#

we have no idea when next fix though

#

yep sure, but still make sure u have no other C# mods in ur test

nova gale
#

(y) can do

uncut viper
#

Pathos actually knows about that bug actually already

#

but good to report it officially too

#

(i know bc i reported it to Pathos bc i also found CopyFieldsFrom was weird in doing that)

nova gale
#

yeah, if we just added another "coloredItem.Stack.Value = input.Stack on line 215 in ColoredObject that would resolve it

uncut viper
#

(at least i think i did? i might actually not have directly pinged pathos bc i cant find my messages)

nova gale
#

or on line 809 on Item.cs

#

but i don't know if the "remove stack" behavior is expected in other cases when CopyFieldsFrom is called

uncut viper
#

apparently is already changed for 1.6.16, whenever that will come out

#

no timeline on it

#

CopyFieldsFrom was added in 1.6.9 so i dont think anything actually uses it besides that ColoredObject thing

nova gale
#

ah ok

uncut viper
#

and whatever mods mightve started using it

#

but yeah its not unique to colouredobjects its just a bug in CopyFieldsFrom itself

nova gale
#

makes sense, so either swap to use CopyColor instead and make sure input items always have the colors I want, retool recipes to always expect a single output or harmony patch a fix in temporarily is how it sounds

uncut viper
#

yeah pretty much

nova gale
#

actually, CopyColor might have the same issue, I'll test really quick

uncut viper
#

CopyColor calls ColoredObject.TrySetColor so yeah, it will

#

(didnt notice til you said it)

#

(and by "calls it" i mean "the code that checks CopyColor then calls TrySetColor")

#

(and TrySetColor calls CopyFieldsFrom SDVpufferpensive)

nova gale
#

yeah, and I don't see anything after that to restore the stack

#

yup, same problem, ok, so that leaves retool recipes or harmony patch

brittle pasture
#

that should be after the item is created

nova gale
#

I doubt it since the colored object conversion stuff happens after the stack size determination, but let me confirm really quick

#

oh, no you're probably right, stack size modifier is right after the copy color block

#

I'll give it the ol' college try

brittle pasture
#

actually no you might be righr

#

it is before

#

darn

#

it's the machine price modifier that is after

nova gale
#

oh, this is quality modifier

#

it just uses the "Quantitymodifier" object

#

i misread

#

actually, I'm not seeing where it applies the stack size modifier at all in this method, I only see price and quality

#

must be in the item query resolver

brittle pasture
#

you're looking at tryresolve righr

#

wait it's in applyitemfields

nova gale
#

originally I was looking at GetOutputItem on MachineDataUtility, but the stack moidifer is in itemquery resolver on the applyitemfields, yeah

brittle pasture
#

GitHub on phone is a pain lol

calm nebula
#

Consider: github on laptop

#

I can't talk I'm looking at a very teensy knitting chart on my phone

lucid iron
#

hng i dont want to write docs LilyDespair

#

no docs only ship >:)

uncut viper
#

Docs: Use ILSpy

brittle pasture
calm nebula
#

Please

brittle pasture
#

use apple for red color, orange for orange, banana for yellow etc etc

calm nebula
#

Chue is a good egf

#

And has open souece

lucid iron
#

egf

calm nebula
#

Docs: githuv link

uncut viper
#

id still probably use ilspy first

lucid iron
#

my inline comments say /// <summary>Does absolutely nothing.</summary>

nova gale
#

I'd rather not add a mod dependency to this mod, I'll probably retool the recipes for now and look at a harmony patch as a stand alone fix for the problem and use my original recipes if that's being used

teal bridge
#

I hate FishingRod so much right now, along with this ridiculous netcode. All the debugger can tell me about why it's firing is [Lightweight Function]. Thanks.

lucid iron
#

but EMC is fun and cool

nova gale
#

I'm certain that is true! but I've been trying to keep Dwarven Expansion to only Content Patcher itself and whatever we can do with the 1.6 changes

lucid iron
#

its also fairly common now, since cornucopia uses it

brittle pasture
#

I still dont see any mod use the "extra junimo food" feature and I am sad

nova gale
#

ooh, I'll jot that down and see if I can make it fit

#

I've been adding random things just for the sake of trying the new features ๐Ÿ˜›

#

I actually need to add some new potions with the additional food buffs that got added with 1.6.9 (or I think I saw new food buffs listed anyway!)

brittle pasture
#

yeah a bunch of previously weapon exclusive stats

#

(wep speed, knockback, etc)

nova gale
#

nice

#

I swear combat level was already on the list before, but I see it listed in the update so /shrug

brittle pasture
#

I dont think so, cuz I think extra combat level doesnt actually do anything

#

the hp bonuses are actually given on the level up screen

#

the only use case for a hypothetical combat level up is

idk

nova gale
#

for some reason I always assumed it was used in the damage calculation

#

I'm about 2% sure it's used in the calculation for which version of certain monsters to spawn

#

at least for the infested farm or whatever it's called

brittle pasture
#

Oh yeah that2nd point is true

nova gale
#

granted, a "buff" that just spawns harder monsters with no other benefit isn't much of a buff ๐Ÿ˜›

brittle pasture
#

but imagine a boss that only spawns for level 12 combat with rare loot
... but you can also condition it on just having the buff itself
ehh

nova gale
#

it might be interesting when mixed with mods like Deep Woods

nova gale
#

huzzah, harmony patch made

winter dust
#

So, as the Shops documentation on the wiki states, putting an NPCs name in the "Name" option should restrict that shop to only that NPC if they're nearby the shop.

#

But I found out that it works regardless if they're nearby or not.

vernal crest
#

How large is your owner tile area in the Action OpenShop property?

winter dust
#

Are you supposed to define tiles with Action OpenShop?

vernal crest
#

Well, the wiki implies that you have to have specified an owner tile area in the Action OpenShop tile property in order to require an owner be present to open the shop.

#

I'm curious how you're opening your shop if not using Action OpenShop (because I haven't made a shop so I don't know if there's multiple ways).

winter dust
#

I used to use Shop: whatever, but that was back in STF and STF is mostly deprecated now.

vernal crest
#

Then try setting the owner tile area and see if that fixes the issue?

winter dust
#

Yeah, I'll try that.

#

Yeah nah, it's still available even if the NPC is not in the tiles I defined.

#

And even if the shop is supposed to be closed for some reason.

hallow prism
#

you may have something wrong in the way you set things, which can be easier to spot with you providing what you set

#

(once you ensured you did copy your map changes properly into the mod)

winter dust
devout otter
winter dust
#

When I open the shop Hekate doesn't show up as the owner, but the shop is still open after closing time, which I set as a condition.

devout otter
#

Aah, this part { "Name": "None", "Id": "{{ModId}}_Artisanry_Closed", "ClosedMessage": "{{i18n:Shops.GV.Artisanry.Closed}}", "Condition": "!TIME 900 1700" }

#

Means that the shop will open when regardless if there's no owner or not.

winter dust
#

Oh, but I designated ClosedMessage, so I thought that would override it?

#

Do I just set name to null?

#

Ridgeside does the same thing for their shops, I assume theirs work?

devout otter
#

Ah, personally I use AnyOrNone there.

#

How do you set your OpenShop tile property?

winter dust
#

Okay, turns out I didn't fill out OpenShop properly.

#

But yeah, I guess the Shops data doing that is just an oversight?

devout otter
#

Oh, it's working now? What didn't you fill, for future reference?

winter dust
#

Height and Width for the owner tile.

devout otter
#

Oh, even though the wiki said it doesn't need them huh.

winter dust
#

Yeah, SMAPI screamed at me for not defining it.

vernal crest
#

Wiki page has been updated to make it clear width and height are mandatory now ^_^

astral prism
#

remind me in 8 hours to finish tape commission

patent lanceBOT
#

hey peebrain, you teleport? (#6515039) (8h | <t:1738858530>)

winter dust
#

Does anyone know if HasMod works in Condition?

#

STF allowed you to do "When" conditions for ItemStocks, and I wanna replicate that without having duplicate shop entries for each supported mod item entry.

rancid temple
#

It should work, CP evaluates it to true or false so by the time the game gets it, it would just be true or false depending on if you have it installed

royal stump
winter dust
#

Oh, cool.

hallow prism
#

Yeah tokens in gsq are one of my favorite tricks

vernal crest
#

Today I learned: how to make cooking and crafting recipes, how to make two different cooking/crafting recipes that produce the same item, and how to make a shop. Do I need any of this for my own mod? No, no I do not xD

hallow prism
#

yet

woeful lintel
#

Is there an easy way to count how many mods use my mod on Nexus? Counting manually through the list is annoying.

#

ok, seems like setting an id in the inspector and asking document.getElementById("table_id").rows.length in the console gives the answer

lusty elm
amber nova
#

Is there any way I can get an tile/sprite ID? I tried the Debug Info mod but it doesnt show that much info and I havent found any info in debug commands for SMAPI. I want to get an custom connector to work in Automate mod and that connector is a floor in greenhouse ๐Ÿ‘Œ

lusty elm
#

I know Farm Type Manager has a "Whereami" command in smapi to tell you the tile you're standing on's numerical ID

amber nova
lusty elm
#

both I believe

amber nova
#

Will check, thanks

lusty elm
#

You can also open it in tiled and hover over that tile on the correct layer, and it will show both. in the bottom left

vernal crest
#

Lookup Anything will tell you a tile coord, so does Debug Mode mod, and I think there's a debug command for it too

#

If all else fails you could stand on the tile, warp an NPC to you, then use the whereis debug command for them lol

amber nova
vernal crest
blissful panther
#

Static sprites being map tiles? Yeah, you want the tile lookups option on for that!

vernal crest
#

But if you're referring to an object sprite rather than a map tile then no, Debug Mode won't work for that

amber nova
#

I used that option a while ago but for the gameplay purpose doesnt wanted the obvious debug clutter and now I forgot about that option there. Thanks man

vernal crest
#

No worries :) I love LA haha

amber nova
#

Its mandatory ๐Ÿ˜‚ Like a little wiki build-in

lusty elm
#

FTM uses it to identify Id's for people, so they can specify specific tiles for spawning stuff on, so you can make your own "grouping"

I'm not 100% sure the game can Differentiate ID values from varying Tilesheets. Like if the index is 135 it might use that tile across all the maps tilesheet tiles.
I know I saw a warning about it somewhere, but that was also pre-1.6 so I don't know its current state? Just a heads up.

amber nova
#

Now I can work with debug tile info for custom connector for Automate ๐Ÿ‘Œ

amber nova
vernal crest
#

That reminds me I need to find a way to enable chat cheats for all my saves

amber nova
#

/debug enableCheats? or something like that

vernal crest
#

Perhaps if I mention an inefficient way of doing that it will summon Atra and they will tell me how to do it properly...

lusty elm
#

what do you mean by cheats?

amber nova
#

probably to apply debug in game instead of smapi console

vernal crest
#

I mean using the chat for debug/mod commands instead of SMAPI console

amber nova
#

I tried to debug command ingame and ConcernedApe replied xD

vernal crest
#

Since Atra told me about it being part of vanilla now and I tried it and was instantly sold

#

But it involves having to edit every save file which is extremely unwieldy when I'm creating several new save files each time i am testing mod stuff

blissful panther
vernal crest
#

Hmm Tedi has a more recent mod than CattyCatCat's Chat Commands mod

lusty elm
#

Can you write a mod that just like, if you do !"Stuff" it basically just tells smapi to run the "Stuff" command? I don't know how hard that is cuz i dont really code, but it seems like the biggest hurdle would be whether a mod can access the Smapi Console in that way. And read the ingame chat of course is a basic requirement.

vernal crest
#

But dang it doesn't allow for CP commands

#

I am extremely babby C# user

lusty elm
#

Fair Enough, I know enough about code to get the gist of moderate to simple code is trying to do, but not really enough to write it, and enough to know what is likely going to be the problem areas, or just enough to get myself into trouble. Its kinda a broad spectrum.

vernal crest
#

Well someone had a go at updating Chat Commands for 1.6 so I will try that I guess!

#

It's not like it's necessary it's just fun to use warp commands and stuff without having to alt-tab

lusty elm
#

Well then, Done with EMP and FTM Setup for these maps, All thats left for this Mod's TODO list is Debris, Tiledata, rewriting internal descriptors, Make a new Icon, Design a new House interior (Or yoink one of my old ones), Make the Modpage, And take a bunch of Pictures of the map. Like.... 8 Hours of Work maybe? rooThink (Most of that will be debris across the 5 maps)

#

I think Most People just use CJB Cheats To Be Honest.

vernal crest
#

That is fair but I find CJB too slow lol

#

Yeeeees SDVkrobusnaughty

#

It does all the CP commands too, perfect!

wanton pebble
#

Just for the record. If you're only doing the regular ones you can just debug togglecheats

desert junco
#

Hey, im very much new to making mods for Stardew Valley and making mods in general. When u guys test out your mods, debugging and such, do you always go through the whole process of waiting for the game to get to the home screen, click load, select your testing save or making a new one and loading it manually? I kinda wanna skip that whole process and just load a save directly on launch when i need to. Any ideas? The way i approached it doesnt really do anything ๐Ÿ‘ด I was using the GameLoop GameLaunched Event and StardewValley.SaveGame.Load(targetSaveFile);

vernal crest
#

I have nothing to contribute about loading directly into a game save, but are you hot reloading your mod changes (C#) or using patch reload (CP)? Because usually you shouldn't have to be opening and closing your game very frequently anyway.

slender badger
#

Use Skip Intro

vernal crest
#

Oh yeah using Skip Intro and Fast Animations is also helpful

desert junco
#

Ill look into that thanks! Sounds like a good alternative to speed things up a bit

#

i try to use hotload for the most part but its not always possible or even crashes the game for me when done too often

loud storm
#

Hello! I'm really new to sdv modding and I have a question regarding using visual studio code for my IDE of choice. I've gotten everything to work fairly well so far, but when launching the game and debugging, the terminal messages go through the built-in vscode debug console (which can't accept commands and is in a different encoding for some reason??) instead of a separate terminal window (like it would when you would launch a normal sdv modded instance). I assume it's something with my launch.json file in my '.vscode' folder, but I haven't been able to crack it properly.

#

Sorry for the word soup ahahahaaa. I am running on 3 hours of sleep

blissful panther
#

...oh my. That, uhh... this has not happened previously when I've tested it out.

loud storm
#

Ah crap. That's exactly what my viewport looks like as well orz

#

I think I'm gonna have nightmares about this tonight

blissful panther
#

It's almost certainly what SMAPI's doing to colour the text, so I wonder if there's a SMAPI setting to disable that...

hard fern
#

Eek

blissful panther
#

It looks like "console": "externalTerminal" is a thing for some project types in VSCode's launch.json, but... annoyingly not the C# dev kit one.

loud storm
#

ikr? it's pretty infuriating

lucid iron
#

Huh it works fine for me

#

Not the external terminal part but the encoding part

blissful panther
#

Ooh, we might have something.

#

csharp.debug.console - When launching console projects, indicates which console the target program should be launched into. Note: This option is only used for the 'dotnet' debug configuration type.
internalConsole [Default] - VS Code's Debug Console. This mode allows you to see messages from both the debugger and the target program in one place. Refer to full documentation for more details.
integratedTerminal - VS Code's integrated terminal.
externalTerminal - External terminal that can be configured via user settings.

loud storm
#

ooooooooooo

#

hell yeah. let me try this out real quick

calm nebula
#

/smapicommand patch export <blah>

blissful panther
#

It... doesn't seem to use an external terminal for me still. SDVpufferwaaah

loud storm
#

ahahaaahahaaaa CRAP;; same here

blissful panther
vernal crest
loud storm
blissful panther
#

.NET in VSCode has always felt sort of... half baked, and this sure isn't helping that impression. SDVkrobusgiggle

loud storm
#

Yeah, this is my first foray into .NET via VSC and I can honestly see why people say the integration is full of jank now ahahaaa

#

I'll just hop on to VS2022 in that case. This was a fun look nonetheless

#

Thank you for the help ๐Ÿ™ . I really appreciate it

lucid iron
#

I think the only thing that works 100% in vs code is the language server

#

Even that crashes randomly tho and i gotta restart

blissful panther
#

JetBrains Fleet has C# support now it seems... since I'm poking around, let's see how terribly that does. SDVkrobusgiggle

lucid iron
#

What is fleet

loud storm
#

oh god, vscode why have you forsaken us???

blissful panther
#

It's basically them trying to do a VSCode.

calm nebula
#

What about rider

final arch
#

I wish rider had working hot reload. vs sucks so much

blissful panther
#

It does for me now on Windows!

#

Found a fix that works for me, but not Matt, sadly.

final arch
#

for sdv? I read its only +.NET8, and it didnt work for sdv forme

blissful panther
#

For Stardew! I had hot reload working with Stardew in Rider back when .NET 6 was the newest, but it kinda broke at some point between then and now.

final arch
#

I need to try again I guess

blissful panther
#

For my system at least, the problem was apparently SMAPI switching to embedding the PDBs.

#

And a simple: #making-mods-general message

Fixed that. Make it conditional on being in debug only, and we have PDBs generated for working on it, and SMAPI embedding the PDBs for release.

final arch
#

how neat, Ill try ty :3

blissful panther
#

Huh, well Fleet works quite nicely it seems. No hot reload, but...

blissful panther
final arch
#

damn it actually works, neat ๐Ÿ˜„

nova gale
#

if anyone needs it, I made a small harmony patch mod to fix the colored object stack size issue:
https://www.nexusmods.com/stardewvalley/mods/31499/ it just adds a postfix on the TrySetColor method for ColoredObject to reassert the stack size on the resulting colored object.

languid aurora
#

Yeah that's because CopyFieldsFrom uses GetOneCopyFrom internally, which has Stack hardcoded to 1

#

In my opinion if it's going to use that internally, it should fix the stack size back to match that of the given item before it returns, but after GetOneCopyFrom

#

Otherwise there's no point in it existing since it literally just wraps GetOneCopyFrom (ignoring GetOneCopyFrom being virtual for subclasses to override, of course)

nova gale
#

Ya, I know, I patched it ๐Ÿ˜›

#

Pathos took note that add a fix in 1.6.16 but that doesn't have a release date

#

I did patch at the colored object level just to avoid any potential side effects

reef kiln
#

I am looking an CP and it looks like a mod to add an option to buy 1000 casino coins at time would not be possible. Is that correct is that another mod I need to learn c# for?

upbeat ledge
#

Hi, im mostly wondering how to actually add custom events into the game with my custom npcs, ive made the text but i don't actually know how to add it in, can anyone help?

finite ginkgo
#

[[Modding:Event_data]]

woeful lintel
reef kiln
#

The casino is a shop, the menu that let's you buy coins does not seem to be in the shop list.

woeful lintel
#

hmmm, maybe its data is in the map data? I don't know much about maps and I don't remember much about the casino

reef kiln
#

The map data is this

woeful lintel
#

oh yeah, that looks very hardcoded

#

I don't even know where to search in the code to see what it does exactly, it might be good to wait for someone who actually knows what it does

jagged cairn
#

Looks like it's hardcoded in StardewValley.GameLocation.answerDialogueAction:

case "BuyQiCoins_Yes":
        if (Game1.player.Money >= 1000)
        {
            Game1.player.Money -= 1000;
            localSound("Pickup_Coin15");
            Game1.player.clubCoins += 100;
        }
        else
        {
            Game1.drawObjectDialogue(Game1.content.LoadString("Strings\\StringsFromCSFiles:GameLocation.cs.8715"));
        }
        break;
woeful lintel
#

here you go

true coyote
#

I have looked through this code over and over and I cannot find the reason as to why its not using the tilesheet for this fence SDVpufferchickcry and its not adding it as a crafting recipe, despite having it set to both default or none for no requirements/auto unlock, and I can spawn it with cjb

reef kiln
#

So no CP mode for it? I dont know C#. So i guess I am out of luck

jagged cairn
#

I imagine it could be done with some of the more advanced CP methods

#

I think you can add new dialogue and events with it

#

And patch the map tile to redirect it away from the vanilla dialogue

#

Dunno if CP can modify the club coin count tho

woeful lintel
reef kiln
#

Yup, It looks beyond me. I will just have to live with clicking a hundred times

patent lanceBOT
calm nebula
#

(It's very hardcoded but not that hard to change.)

#

I would say easily in baby's first c# zone

lucid iron
#

If u just make an action that calls the one line of code u can do it

#

Maybe ask button nicely for the feature

tribal ore
#

StardewXnbHack doesn't seem to find the audio files? The wiki says that there should be a Content/XACT folder, but it doesn't exist

#

Is there a different way to extract the audio files from the game? I just want to mess with the ambient loops for an event

lucid iron
#

If you just want to play music i have a mod for this

tribal ore
#

I want to play two ambient tracks over the top of each other, and then mix in music later

#

With reverb

#

So...

lucid iron
#

Then you need unxwb

uncut viper
#

i can add an AddCurrency action but i cannot make a menu for casino coins specifically

latent mauve
#

I mean, just AddCurrency would do it with the Shops and creative use of ActionOnPurchase

lucid iron
#

[[modding:audio]]

tribal ore
#

But that folder doenst' exist

#

Unless I'm misunderstanding something

timber plover
#

audio coding ร–_ร–
...getting along but there alot of audio (left songs right is soundeffects) some doubles here and there

lucid iron
#

Stardewxnbhack just doesn't extract music at all

#

This is a whole other thing

#

If ur still having problems remind me in 6hrs to find command i used

tribal ore
#

Ummmm. Ok, so I point it at Stardew Valley.exe?

timber plover
#

i used unxwb that does work realy good!

lucid iron
#

No the Content folder

#

The one that's got all the xnbs

tribal ore
#

Ok, found it! That's basically what i needed. Didn't know that I had to go up a couple of levels in the directory structure to find it

#

Thank you

hard fern
#

Is it possible to i18n dynamic tokens

wanton pebble
#

.... depends on what you mean

#

I guess what are you attempting to do? Two different scenarios come to mind

#

You can dynamic token i18ns

faint ingot
#

Shrimply one thing you can do (if this is what you mean) is set a dynamic token equal to the value of an i18n string, and conditionally change it to a different i18n string if needed

wanton pebble
#

So like poasb or dnr or uws can use BreakfastDate.2.{{ModKey}} to point to two separate i18ns depending on value of modkey

#

Hence why I need to know if you mean i18n dynamic Tokens and if so what the use case is since dynamic token values are generally not visible to the user

slender badger
# hard fern Is it possible to i18n dynamic tokens
Stardew Modding Wiki

This is a collection of various tips & tricks for using Content Patcher's dynamic tokens for increased coding versatility. At their core, dynamic tokens are used for creating a token that changes its value depending on various conditions, which with a little creative thinking can be used for all sorts of situations!
This page assumes that you're...

flat sluice
#

It is possible, but the usage of Dynamic Tokens may be different to the one you want, so...

hard fern
#

I wanted to know if i could dynamic token like, a character's name based on event shenanigans

#

(display name, ofc)

slender badger
#

Yeah, that's easy

wanton pebble
#

Oh easy

flat sluice
wanton pebble
#

Have it be i18n:DisplayName.{{Eventchecktoken}}

slender badger
#

That section of the tips & tricks page I sent has examples of how to do pretty much that

hard fern
#

Oh cool, ill check back once im actually up for Doing The Thing, i just wanted to ask ahead of time so i don't convince myself something is possible when it is in fact, not

wanton pebble
#

I can't type the exact thing since mobile is clunky

#

But basically that

flat sluice
# flat sluice Yeah, possible indeed, I'm doing that.

Example of one of many (at least 2, the other one is on the link above) using i18n & dynamic token:
DT (in content.json):

      "Name": "DT_dialogues",
      "Value": "${Mr.^Ms.^Mx.}$ {{PlayerName}}",
      "Condition": "MarkEventSeen Current StrojvedouciDenis.Eleanor_4hearts false"
    },
    {
      "Name": "DT_dialogues",
      "Value": "{{Hana.GNMTokens/Title}} {{PlayerName}}",
      "When": {
      "Condition": "MarkEventSeen Current StrojvedouciDenis.Eleanor_4hearts false",
        "HasMod": "Hana.GNMTokens"
      }
    },
    {
      "Name": "DT_dialogues",
       "Value": "{{PlayerName}}",
      "When": {
      "Condition": "MarkEventSeen Current StrojvedouciDenis.Eleanor_4hearts"
      }
    },```

Dialogue.json:
```        "spring_1": "{{i18n:Dialogues.spring_1 |DT_dialogues={{DT_dialogues}}}}",```

default.json (i18n):
```  "Dialogues.spring_1": "Time for you to start working on your farm, {{DT_dialogues}}.#$b#I don't say you weren't working on %farm, I just wanted to tell you that it has got some powerfull magical properties.#$e#How do I know, you're asking?#$b#I can sense the magic in it.",
rigid musk
#

How does one do the link thing where the mod is posted in #mod-showcase

slender badger
#

As in you want to showcase your mod?

rigid musk
#

Yes :D

slender badger
#

You just right-click the post you want to showcase, go to Apps, and then click Publish ๐Ÿ˜„

rigid musk
#

Thank you!

#

I keep forgetting I can do that

slender badger
#

By the way, if you do want to add a custom catalogue via Calcifer later, it's actually super easy

timber plover
ocean sailBOT
#

Important note: Your computer username may appear in the log. If your username is your full name, please be aware of this before uploading it.

Please share your SMAPI log file. To do so:

  1. Open this page: smapi.io/log.
  2. Follow the instructions at the top of the page to upload the log file. (Don't copy & paste from the console window!)
  3. After uploading, it will show a green box with a URL to share. Post that URL here.

Please do it even if you don't see any errors. This has useful info like what mods and versions you have, what the mods are doing, etc. If the issue didnโ€™t occur in your last session, please load the game to the point where the issue occurs, then upload the log.

uncut viper
#
"FilePaths": [
            "{{AbsoluteFilePath: assets/Zelda_sounds/Songs/0000005b_hyrule2.wav,  assets/Zelda_sounds/Songs/0000005b_hyrule.wav, assets/Zelda_sounds/Songs/0000005b_hyruleagain.wav}}"
          ],

this needs to be changed to multiple different AbsoluteFilePath entries

wanton pebble
#

Oorrrr button sees it immediately

#

Thanks button XD

uncut viper
#

(good practice in general to send a log always tho at least)

timber plover
ocean sailBOT
#

Log Info: SMAPI 4.1.10 with SDV 1.6.15 build 24356 on Microsoft Windows 10 Home, with 10 C# mods and 1 content packs.
Suggested fixes: One or more mods are out of date, consider updating them

uncut viper
#

oh thats a much different error

wanton pebble
#

.... suddenly I feel accidentally brilliant XD

timber plover
wanton pebble
#

Alright where's the bad }}

uncut viper
#

(AbsoluteFilePath still only does one file though)

rigid musk
#

I have several furniture mods that could use it, really

uncut viper
#

you've messed up your key beneath Springtown

#

wa}}y

timber plover
#

oh ร–-ร–

wanton pebble
#

Line 106!

uncut viper
#

as for the difference before, thats bc i didnt fix it, i was pointing out what part is broken

slender badger
timber plover
#

ok i will fix ...a damn

#

i hate coding XD

uncut viper
#
"FilePaths": [
  "{{AbsoluteFilePath: assets/Zelda_sounds/Songs/0000005b_hyrule2.wav}}",
  "{{AbsoluteFilePath: assets/Zelda_sounds/Songs/0000005b_hyrule.wav}}",
  "{{AbsoluteFilePath: assets/Zelda_sounds/Songs/0000005b_hyruleagain.wav}}"
],
slender badger
#

Basically how Calcifer works is that it lets you assign a tile action via CP to a particular furniture item, and then when you interact with that item, it opens a CP shop where you sell all your furniture for 0 gold

calm nebula
#

(Gentle reminder to put your music as .ogg and stream it)

#

(Your sound effects should be wav and unstreamed)

timber plover
#

yeah i know just wanted to code it first for my own use since im still testing alot of stuff

slender badger
timber plover
slender badger
# rigid musk I would really appreciate that!

Okay, so since you've already got context tags added for your furniture, this is all the code you need: https://smapi.io/json/content-patcher/0ccaceb907ef467088aa4ed2578bd1f8
For this example, I've used the red book as a catalogue item and put all the code in an Include file, and I'd add a code block like so:

   {
       "Action": "Include",
       "FromFile": "CatalogueCode.json",
       "When": {
        "HasMod": "sophie.Calcifer"
       }
   },
``` to the content.json so that it can be optional if people don't have Calcifer installed
#

You can use whatever item you want as a catalogue, as long as it's something the player will be able to reach to interact with

#

With this furniture pack in particular, what you could also do is add context tags for each colour set (eg. {{ModId}}\\ValentinesFurniture ValentinesLightPink, {{ModId}}\\ValentinesFurniture ValentinesPeach, etc) and turn each book into a catalogue for the specific colour set by just duplicating the code for each colour and changing the PerItemCondition context tag to use ValentinesLightPink etc., like so: https://smapi.io/json/content-patcher/d843ce3819ec49d287a2083ba776f6ce

(I'm heading off to bed, but feel free to ping me if you have questions about this and I'll catch up in the morning)

timber plover
ocean sailBOT
#

Log Info: SMAPI 4.1.10 with SDV 1.6.15 build 24356 on Microsoft Windows 10 Home, with 10 C# mods and 1 content packs.
Suggested fixes: One or more mods are out of date, consider updating them

timber plover
#

๐Ÿฅน

uncut viper
#

always send json when sending a log and always send a log when troubleshooting json

timber plover
#

oh yeah true

uncut viper
#

MainTheme

#

you have an extra }}

#

line 211

timber plover
#

that so confusing in visuel studio this is line 195 Q-Q..no wonder i dont find my errors

uncut viper
#

well the error in the log doesnt point to any relevant line so that wouldnt make a difference

timber plover
#

oh ok

uncut viper
#

i was just pointing it out to you in the smapi parser to find it easier

timber plover
#

damn thats so hard to see for me

#

ok now he just dont wont to load one song thats progress XD

#

ok more then one but he loads the json

uncut viper
#

afaik when multiple FilePaths are present the game just picks one at random to play whenever it should play it

timber plover
#

yeah that was my goel at least i hope he does it XD

#

well it works thank you ๐Ÿ˜ฎ โค๏ธ (i have some naming stuff with the song names to do since the numbers doesn make i easier to see if i wrote them wrong via copy paste....

#

:3

jagged cairn
#

Hmm... I found a bug but I can't tell if it's my fault. Setting the quality of an object produced by a tapper (via tapper.heldObject.Value.Quality, with the tapper accessed by prefixing DataBasedObjectMachine.OnOutputCollected) is causing Automate to put them in the chest without stacking them.

#

Looking deeper I'm starting to wonder why the prefix is even working to set the quality at all ๐Ÿค”

#

And why I didn't notice that there was a GetOutput function that I was looking for

tawny ore
#

Is there a reason why a harmony patch is necessary at all for something which could probably be handled by an edit to the machine's data model?

#

Just wondering because data edits are likely to be more compatible with any mod in general, rather than injecting unexpected behaviors

calm nebula
#

Are tappers in machine data

#

I thought they werent

#

Wild trees sure

#

Hi matt!

#

What cool mods are you dreaming up?

tawny ore
#

Wait, seriously. Were those not dehardcoded in the 1.6 update.

jagged cairn
#

Since it broke during the dehardcoding

tawny ore
#

I'm debating if I want to revive any of my dead mods. There's been recent interest in a couple of them.

#

Well shoot. (BC)105 in Machines is just an empty slate.

teal bridge
#

Best of both worlds, configurable and hardcoded!

tawny ore
#

It's like, "I am a machine, but I have no idea what I do"

tender bloom
#

Itโ€™s one of those โ€œsee C#โ€ machine methods?

#

Theyโ€™re a custom class p sure

teal bridge
#

Yeah, most of tapper logic is implemented in Tree.

calm nebula
#

No, they actually look at data/wildtrees

calm nebula
#

....still not worth reviving any of mine, but hey

#

Yours are probably worth reviving!!!!!!

uncut viper
#

maybe they're not trying to download your mods but instead succeeding in donating to that malaria charity

teal bridge
#

Donation platform for the very cheap and very lazy donors.

#

Congratulations, your download resulted in a donation of: 0.05 cents

tender bloom
#

Brb downloading more of atraโ€™s mods

tawny ore
#

I get DMd every few weeks to update Helpful Spouses

#

LIke that's been dead since 1.5 I think

calm nebula
#

A donation to Against Malaria would be more effective

#

And use less electricity ๐Ÿ˜ฆ

inner harbor
#

Atra, i loved your mods.

teal bridge
#

hasDoneFucntionYet hurts my eyes. Should be a P0 for SDV 1.7.

rancid musk
#

Spelling mistakes and typos in APIs are the absolute worst thing.

#

(I'm looking at you, HTTP Referer header.)

lucid iron
#

Fucn

lucid iron
teal bridge
#

Well, I fixed my fishing rod problem with tool is not FishingRod. SDVpuffercowboy YOLO

brittle ledge
hardy hare
#

Can anybody explain to me how to add a custom location? I'm trying to make a mod for the first time and I just can't add the location

brittle ledge
#

There's a tutorial for that on the modding wiki!

hardy hare
#

Well, I looked through that already but I just can't get it to work.

brittle ledge
woeful lintel
ocean sailBOT
#

Log Info: SMAPI 4.1.10 with SDV 1.6.15 build 24356 on Unix 6.12.11.204, with 6 C# mods and 2 content packs.
Suggested fixes: One or more mods are out of date, consider updating them

woeful lintel
#

(No need for help (for now), I just want to flex my errors)

lusty elm
#

.Choose Debris, Tiledata, Internal Descriptors, Icon, Design new Farmhouse Interior, Make Modpage.

patent lanceBOT
#

Choose result: Internal Descriptors

tribal ore
#

... And now I've added custom audio. This is truly the mod that never ends

#

Well. I've created the audio. Haven't actually added it in or gotten it working yet. But it's a start!

lusty elm
#

Huh, this map has more features than I though now that i stop to list them all out.

tribal ore
#

New map?

lusty elm
#

The Farm Map I've been working on, I was stopping to list out all the features for the Nexus Page, and its longer than I thought.

tribal ore
#

Oh, cool. Also, how many "MathPerson"s are there? For awhile, I thought it was just one updating their name based on the mood

lusty elm
#

3 I think right now, I joined in because why not.

#

Elizabeth, Atra, and Me rooC

calm nebula
#

Ichor

tribal ore
#

Huh. Ok xD Thanks

blissful panther
#

Yup, four!

lusty elm
#

I stand Corrected

tribal ore
#

This was more confusing than it should have been to me, but I'm not good at remembering faces or usericons apparently

#

Four MathPersons of the apocalypse ๐Ÿ™‚

lusty elm
#

.Choose Debris, Tiledata, Icon, Farmhouse Interior.

patent lanceBOT
#

Choose result: Icon

hardy hare
#

What does this mean and how can I fix it?

tribal ore
#

JSON error on line 60

uncut viper
#

around line 60 but not necessarily on it

#

!log

ocean sailBOT
#

Important note: Your computer username may appear in the log. If your username is your full name, please be aware of this before uploading it.

Please share your SMAPI log file. To do so:

  1. Open this page: smapi.io/log.
  2. Follow the instructions at the top of the page to upload the log file. (Don't copy & paste from the console window!)
  3. After uploading, it will show a green box with a URL to share. Post that URL here.

Please do it even if you don't see any errors. This has useful info like what mods and versions you have, what the mods are doing, etc. If the issue didnโ€™t occur in your last session, please load the game to the point where the issue occurs, then upload the log.

tribal ore
#

probably a missing comma or something. You'll have to post the actual json to smapi if you want detailed help

uncut viper
#

!json

ocean sailBOT
#

JSON is a standard format for machine-readable text files that's used by Stardew Valley mods.

If you need help with a JSON file, you can upload it to smapi.io/json to see automatic validation and share the link here.

When making mods, it's recommended to edit your files in a text editor with JSON support, such as VS Code, Notepad++, or Sublime Text. These programs will check for syntax errors.

woeful lintel
#

What do you mean Stack.Append isn't in-place? What do you mean I have to use Stack.Push? Why aren't these the same method? Clown language ๐Ÿคก

#

(I know it's because IEnumerable has Append already)

ocean sailBOT
#

Oops, couldn't parse that file. Make sure you share a valid SMAPI log.

uncut viper
#

you need to use the json uploader for JSONs for future reference

#

but your issue is in your Load tmx into Maps patch

#

you used a [ instead of a { before it

hardy hare
#

That's how it was before but it still didn't work

uncut viper
#

you absolutely need a { instead of a [

#

if it didnt work, it was a different error

#

things can "not work" in a ton of different ways when it comes to modding

woeful lintel
#

good old missing } line 60

uncut viper
#

your Entries on line 56 is not properly closed

blissful panther
#

You didn't close the Entries block on line 56. You need a } between lines 58 and 59, yeah.

hardy hare
#

Oh okay

woeful lintel
#

also at the end

blissful panther
#

That too!

hardy hare
#

ta the end where?

uncut viper
#

the very bottom of your file

#

after literally everything

hardy hare
#

alright

#

thank you

uncut viper
#

every { must have a matching } somewhere (same for [] and ()) unless its in a string (text inside quotes "like this")

#

so the one at the very bottom of your file will match the one at the very top

woeful lintel
#

you should use a proper json editor to avoid this, there's probably a command here to direct you

uncut viper
#

the json command recommends them

faint ingot
#

Help? I added this key to my NPC's dialogue file but he has no reaction. Copied the key from Willy who does have a reaction. "fishCaught_163":"{{i18n:Russell_CaughtLegend}}",

hardy hare
#

I have notepad++

uncut viper
faint ingot
#

Yes I talked to him immediately after, no reaction, talk to Willy, he has one. Restarted the game, same result.

tender bloom
#

patch summary full may get you an idea of whether the patch has applied, what CTs are active, what mail flags are recorded, etc

#

!patchsummary

ocean sailBOT
#

Can you do these steps to provide more info?

  1. Load your save and view the content that should be patched.
  2. Type patch summary directly into the SMAPI window and press enter.
  3. Upload your SMAPI log to https://smapi.io/log (see instructions on that page).
  4. Post the log link here.
tender bloom
#

patch summary full is the same thing but longer and more complete

#

if that doesn't give you an idea of CTs, then I know at least my More Conversation Topics mod has some commands that let you look at the CTs active

#

(I know patch summary definitely works for mail flags, which is what controls whether the CT dialogue is said more than once or not)

#

This is on the assumption it's CT-driven

#

If it's some other mechanism then idk

#

(CT is short for conversation topic)

uncut viper
#

pastDialogueEvents is separate from the mail box

tender bloom
#

noooo

#

that makes debugging harder

uncut viper
#

so mail flags dont affect them at all unless a CT is only started according to a mail flag

#

but in a lot of cases its an autogenerated active dialogue event

#

which only checks that its new

tender bloom
#

at least pre-1.6, it would record a mail flag every time a specific NPC said their CT line

faint ingot
#

ran a patch summary on my fish response question and by all accounts it should be there

tender bloom
#

and check that mail flag to decide if it should say the CT line or not

uncut viper
#

oh, for the NPC saying it, yeah

#

i thought you meant whether the CT started

tender bloom
#

nope, I was thinking that if Willy said it but not the NPC, then perhaps this is related to the mail flags recording the NPC as having already said it

#

have you also checked a) has Russell already said the line (per mail flags) and b) does Russell definitely have the dialogue line (patch export can verify this or you can check if the patch adding it applied)

#

other random things I can think of: is the capitalization correct?

faint ingot
#

wait I just may be a huge idiot

#

I don't think I "SAVED" the dialogue file before testing / restarting etc : /

#

and now I have to go catch legend for the 3rd time to be sure that's it

tender bloom
#

You should be able to cheat when catching it!

#

I think CJB maybe has some features

faint ingot
#

That was indeed it, sorry everyone

#

hold on a min gotta go BBQ Russell's dad

hardy hare
#

I hate to bother again but I'm having issues with swapping my edited map with the ingame one in the code.

faint ingot
#

are you trying to replace an entire map, or part of one?

calm nebula
faint ingot
hardy hare
faint ingot
#

This is part of my code for editing the town map if that's helpful { "Action": "EditMap", "Target": "Maps/Town", "FromFile": "assets/Locations/SheriffClosed.tmx", "ToArea": { "X": 70, "Y": 0, "Width": 8, "Height": 9 } },

#

otherwise try to be more specific about the problem you're having instead of just saying "having issues"

calm nebula
#

She is the smarter mathperson

tender bloom
#

Heyyyyy

#

False!!

tawny ore
#

I was a math person, but then most of it left my brain

rotund elm
#

there are so many mathpersons SDVpuffereyes

hallow prism
tawny ore
#

They kind of lost me after I started doing Fourier Series problems

woeful lintel
#

I think I could call myself a mathperson as well, but I don't think Complex Analysis will help a lot here. Also doesn't fit in my username.

tawny ore
#

Former Math People Unite!

woeful lintel
#

Hey, do any of you know what is worst than having your item show up with the error sprite?

lucid iron
#

Crash game by draw loop error

woeful lintel
#

no texture at all ๐Ÿ’€

woeful lintel
#

that's gonna be fun to debug

#

I have no drawing error, that's the worst case scenario

wanton pebble
lusty elm
#

I mean, That still gives you info, less than you like, but info.

tribal ore
#

Another audio question: track length. For a music/ambient loop, how much is really too much? I've got an 14 minute clip that I'm going to cut down and loop before using, but I kinda want to know what my target should be

rigid musk
acoustic summit
tribal ore
woeful lintel
#

ok, so at least I know the mod actually gets its grubby hand on the correct Texture, they are not 0x0.

lucid iron
#

Did you make drawInMenu

#

The fact that it lacks shadow makes me wonder

woeful lintel
#

No but I'm messing with so many draw stuff that I'm not sure the menu is spared

#

Also I checked and the asset is properly requested

#

Oh shit I have a transpiler for drawInMenu

#

didn't even remember

true galleon
#

Extremely new to coding. Is there a good resource for adding recipes?

woeful lintel
#

but it's supposed to just override the source rect

ocean sailBOT
true galleon
#

Iโ€™m just not sure if the one Iโ€™m using is totally correct. It doesnโ€™t specify the health + energy boost of the item

devout otter
#

Determining health+energy would be on the item's data itself, not the recipe.

tawny ore
#

Edibility is the thing you need to update

devout otter
teal bridge
lusty elm
#

rooThink huh, so since the new furniture items are defined by stuff like "DecorativeBarrel" instead of a Numerical ID, the game doesnt recognize them for placement using FarmhouseFurniture for starting Furniture, since it only takes int index.

woeful lintel
#

yep, looks like the source rect of the layer it's supposed to read from is empty too

#

oh ok, so my parser shat the bed

#

every rectangle is empty

tawny ore
#

Wait.. are you reimplementing what the game already has built in?

#

Objects, as they appear in the menu, should automatically be parsed from Data/Objects, Data/BigCraftables, and Data/Furniture

woeful lintel
#

FF violates Data/Furniture to work

#

What is added to Data/Furniture is parsed from Furniture Packs

tawny ore
#

Ah, I see so it's kind of like it's own abstraction of Data/Furniture

woeful lintel
#

yup

#

ok, so I fixed that for now, now I have to figure out how bad I messed up the drawing coordinates

lucid iron
#

I wonder if u would have a easier time if u did write real furniture too

#

Realise it's too late to ask this question ofc

woeful lintel
#

?

#

wdym real furniture?

lucid iron
#

When you parse your custom model

#

Do you create a regular Data/Furniture entry as well

#

That's populated to best of ur ability

woeful lintel
#

yep

lucid iron
#

Then it is just the mistek in rect i see Dokkan

woeful lintel
#

I think I'm setting the rectangle size twice for drawinmenu, but I'll deal with that later

tawny ore
#

Does FF add different sizes than the ones supported by vanilla furniture types?

woeful lintel
#

once when I write in Data/Furniture and another time via a transpiler in drawInMenu where I set the size instead of the ItemRegistry.GetDataOrErrorItem(furniture.QualifiedItemId).GetSourceRect()

lucid iron
#

For trinkets i require people to actually just go and make a regular old Data/Trinkets entry before they get to use my thing

#

So that i don't have to deal with this

tawny ore
#

It's too bad Furniture didn't switch to a proper data model or we'd have CustomFields for a lot of this stuff now

woeful lintel
lucid iron
#

CustomFields is pain to use tbh

#

It's all string string

tawny ore
#

It's not too bad. I have a semi-decent/repeatable workflow that let's me convert it into a data model.

woeful lintel
lucid iron
#

But hey we can just open new custom asset with same key

woeful lintel
lucid iron
#

Then anything goes

tawny ore
#

I get what's usable as a proper data model, but with a backing string dictionary

#

And the nice part is this can be applied to mod data or custom fields without me having to do anything extra

lucid iron
#

You did bush as custom asset i thought, was that just cus there's no Data/Bushes at all

tawny ore
#

It's mostly determined by whether I can do everything in a flat structure or not

#

I wouldn't do bushes using this because I need ItemDrops to be a thing

#

And in 2.0 I have a custom model for growth stages

uncut viper
tawny ore
#

I would not touch something like Dialogue with a ten foot pole because the sub syntax in the string scares me

#

At least splitting on / is still easy for me to parse out just by looking at it

modern ether
#

quick question for y'all, is there a way to slow down the farmer's walking speed in events? i see the "speed farmer <modifier>" command but it only takes integers, so i can't do 0.5 to move half as fast. anything above 1 speeds the farmer up.

gentle rose
tawny ore
#

It just all seems like magic to me

lucid iron
#

I dunno what I'd actually want to do for dialogue though

tawny ore
#

Helpful Spouses is a dialogue heavy mod. The only way I can possibly imagine reviving it is if I could get help in that area.

lucid iron
#

People seem appeased/indentured by how it works rn

#

Same with event script, another great mystery

woeful lintel
#

ok, enough FF debugging for today tonight

teal bridge
#

Indentured? I'm sure that's not the word you meant to use to describe it...

astral prism
#

do all heart event scripts get cached in C# vars or do i need to .Load them all manually

lucid iron
#

Hm

#

Stockholmed?

uncut viper
#

locked in?

modern ether
astral prism
lucid iron
#

Events are per location asset

#

I don't believe they have dedicated field like that

modern ether
#

ok setting the farmer speed for the event to -1 seems to do the same as setting it to 1

gentle rose
#

no heart event scripts are directly stored in variables afaik, you have to LoadString them, and also I'm pretty sure there's nothing explicitly marking an event as a "heart event" other than that one of its preconditions is a heart threshold

#

I know you can get the preconditions without loading the assets

astral prism
#

wait, maybe i can do this?

foreach (var glocation in Game1.locations)
{
    if (!glocation.TryGetLocationEvents(out _, out Dictionary<string, string> events))
        continue;
    foreach (var eventPair in events)```
`
teal bridge
#

What's a glocation? Glowing location?

astral prism
tawny ore
#

I wonder if you could do something that's effectively like the slimed debuff to slow the player down temporarily

gentle rose
#

oh, yeah that works for all events

astral prism
#

nice! thank ya

gentle rose
#

similar to what I do in map event markers if you want to have a look at that

modern ether
#

and just from my limited experience i don't think it would apply during the event anyway?

tawny ore
#

In Buffs at least you can set a negative speed which slows the player down

gentle rose
#

oh god I made the mistake of reopening the map event markers source code

#

why did I do it like that,,,

uncut viper
#

time for a rewrite

gentle rose
modern ether
#

only thing i can think of to apply debuffs is having the farmer eat some food item that would slow them down

gentle rose
#

...well it works for the most part so I'm going to leave it as it is pffft I have some updates/tweaks I still haven't gotten around to adding anyway

tawny ore
#

AddBuff <buff ID> [milliseconds duration]
RemoveBuff <buff ID>

#

Combined with this perhaps