#making-mods-general

1 messages · Page 607 of 1

severe cairn
#

could just go w regular ol poison

strong kite
#

Yea I think poison works

#

And I feel like Paralysis could work for ghost fish

severe cairn
#

tru tru

#

paralysis or sleep was my two options lol

strong kite
#

I can add a chance for both heehee

#

though they are very similar

severe cairn
#

"Well you ate a ghostfish, name kinda warned you already"

strong kite
#

Problematically I can see this being something that people don't like about the mod HehSweatCloseup
Just the whole debuff system as a whole I feel like, cuz some of them are pretty nasty and I believe Poison, Paralysis, and Burn all last until you sleep or cure them

#

I should just say what berries cure what in their descriptions for people not already familiar with Pokemon

#

Oh sweet Lum Berry's description already hints towards that

#

"Lum_description": "Lum Berries have a somewhat dry, spicy, sweet, and bitter flavor. They are very nutritious and seem to cure a lot of ailments. They are currently in high demand as they are being used for cancer research.", Me from 2 years ago was on something fr heehee

#

"Cheri_description": "Cheri Berries are somewhat spicy. The capsaicin makes these berries particularly oily, which Joja extracts to make industrial machine lubricants. Cures Paralysis Status.",

severe cairn
#

Crying

strong kite
#

Yknow realistically any raw fish would have like A chance of poisoning you 🤔
I don't want to add that for all of them, though... pichusad

#

that's a lot of work Azusob

#

Also no Stonefish isn't edible oops heehee

calm nebula
#

Wdym I cant just roll up with a tuna yhat has been in my pocket for 4 years

severe cairn
#

Whattt it's nottt

#

D:

#

Did someone fr throw a brick with a painted on face in the sea

strong kite
#

I'll keep the entry just in case lol

severe cairn
#

Well

#

Cave

hard fern
#

If i wanted to make a whole aquarium as a temporary location in an event, should i just make it all custom tiles or is there a way i can put Real Fish in the fish tank

#

Like, somehow spawn in some fish swimming

severe cairn
#

That's what I wanted too </3 but it seems to need c#

hard fern
#

Well having to sprite all the fish isn't the worst option

strong kite
#

YOU CANT EAT RAW SNAILS?! Waaa

severe cairn
#

I resorted to hand animating a carp in my event SDVpufferwaaah but help is sos

brittle pasture
#

yeah anything is possible with enough applications of temporary sprites and spent sanity

hard fern
#

i tried making a fish jump out of the water once and it went horribly i just gave up. My fish was moonwalking

severe cairn
#

Fellow fish strugglers

hard fern
#

Tas scares me

severe cairn
hard fern
#

Smails is fish

#

Fish eat raw

strong kite
severe cairn
#

I don't wanna do map hell anymore I'm gonna try and give up staring at C#

hard fern
#

Im literally nowhere near map hell bc i refuse to work on my sprites for the npc

severe cairn
#

I'm only doing it to procrastinate SDVIridiumKek

#

Productive procrastination or something

hard fern
#

SDVpufferflat portraits are. A pain in the butt actually

#

I don't like doing all the expressions

strong kite
#

I could add poison to eggs but I don't want to kill Alex :(

hard fern
#

The bigger problem is that my layers are a mess and I'll have to sort through all of those

hard fern
#

Maybe these eggs are like the eggs in japan that can be eaten raw safely

dusk terrace
#

betrayal

#

-# and then it still saved a new file for each time I pressed

brittle pasture
severe cairn
severe cairn
iron ridge
strong kite
#

I keep feeling like I'm just making the mod increase difficulty for no reason like I dont have intended ways of removing these debuffs

severe cairn
#

You could always make it a config if you want it to be optional

strong kite
#

true.. very very true...

#

I guess this is already using a config system for it so.. yeah actually I think I should just go with that

severe cairn
dusk terrace
# dusk terrace betrayal

turns out most of the page doesn't care about version length, but changelogs is big baby and needs 12 characters or shorter SDVpufferangery

#

which is just long enough to write "unofficial", a space, and one digit

strong kite
#

I think transfering what I already have over to this config system should be easy enough

uncut viper
#

Actually probably worth bringing up either way

dusk terrace
#

I don't think you can switch back, unless that's a setting on another page

#

took me a good while just to figure out where the new changelogs are entered after a file is already added

proven spindle
#

You can go back to the old form by editing the url

#

-# i still haven't been able to get used to the new one SDVpufferflat

dusk terrace
#

what's the url for the old one?

proven spindle
strong kite
#

I was not expecting the vanilla Squid Ink Ravioli to have absolutely 0 context tags

dusk terrace
#

legacy definitely supported longer than 12 characters

strong kite
#

Alright I've got this implemented! Now, FINALLY, I think I can go back to adding regular buffs to the food items in my mod. And THEN I'll go through and add status condition chances

#

This was a crazy detour istg LUL

#

Oh I guess it might've only been 100 minutes

limpid talon
#

hey y'all I've got a NPC mod commission client asking me to add something I've never worked with before. They're asking me if I can make it so that when an NPC gets married, the other players in multiplayer will no longer be able to see any of their heart cutscenes at all.
Does anyone know approximately how difficult this would be and if it'd be worth it for me to learn this for the sake of the commission

hard fern
limpid talon
#

The example they gave is that if they marry Leah, they want none of the other players that they are playing with in multiplayer to be able to get any Leah cutscenes anymore

#

even the normal ones like 2-heart ones

brittle pasture
#

for one modded NPC, or any of them

limpid talon
#

this is for basegame NPCs, and only the ones that have been married

brittle pasture
#

tbh this definitely justifies C#

limpid talon
#

hmmm

brittle pasture
#

but even then there is no way to identify that a heart event "belongs" to an NPC

limpid talon
#

yeah that's what I was worried about too

brittle pasture
#

you'll have to do it manually for all 200 of them (roughly counting)

limpid talon
#

Ouch..

hard fern
#

Yikes

limpid talon
#

in that case, I'm turning that down lol

uncut viper
#

(also don't forget modded NPCs, so potentially thousands)

limpid talon
#

does anyone know of a mod that's out there that does that already? So I can recommend it to her instead

#

although I doubt it, that sounds horrible to make

hard fern
#

I don't think anything like that exists?

uncut viper
#

Likely doesn't exist because of what selph says, anyone who has made one would need to do it manually and it'd have to have been receiving updates over the years, and I've not seen one like it in post 1.6 at the very least

limpid talon
#

That's fair, gotcha

#

thanks you guys!

calm nebula
#

I'm not gonna say "do this" but what if you patched the friendship event precondition?

#

(I realize it may cause massive issues otherwise. Lol)

uncut viper
#

That wouldn't help identify it at all

#

Who's to say an event that requires friendship with Leah is a Leah heart event of that same manner

#

and not just an event that wants you to be friends with Leah (maybe to control whether she shows up or not among others)

#

or like, an event that happens to take place in her house

calm nebula
#

So just !modideas at them thanks

uncut viper
#

(also: some CP mods might not use the precondition but instead use CP When conditions)

calm nebula
#

True but they shouldn't do that

uncut viper
#

But they do!

barren tapir
#

So I'm trying to follow this guide https://stardewmodding.wiki.gg/wiki/Tutorial:_Making_Framework_Mods

On step 2, it states that you can read custom assets by calling:

var animalExtensionDataAsset = Game1.content.Load<Dictionary<string, AnimalExtensionData>>("selph.ExtraAnimalConfig/AnimalExtensionData");

I currently have the following:

var customModifierDataAsset = Game1.content.Load<Dictionary<string, CustomModifier>>($"{ModEntry.ModId}/CustomModifier");

And am getting the error

 An error occurred in the game's draw loop: Microsoft.Xna.Framework.Content.ContentLoadException: The content file was not found.
 ---> FileNotFoundException: Content\Nullnnow.MS-Books/CustomModifier.xnb
Stardew Modding Wiki

Last edited by TheSelph on 2025-10-03 00:09:53

calm nebula
#

Did u do this

barren tapir
#

I should. I have the following:

public override void Entry(IModHelper helper)
{
    StaticMonitor = Monitor;
    StaticHelper = helper;
    ModManifest = base.ModManifest;

    var harmony = new Harmony(ModManifest.UniqueID);
    Patcher.ApplyPatches(harmony);

    helper.Events.Content.AssetRequested += OnAssetRequested;
    
}

public void OnAssetRequested(object? sender, AssetRequestedEventArgs e)
{
    if (e.NameWithoutLocale.IsEquivalentTo($"{ModId}/CustomModifiers"))
    {
        e.LoadFrom(() => new Dictionary<string, CustomModifier>(), AssetLoadPriority.Exclusive);
    }
}
#

Wait a minute

#

Give me a sec

#

I think I may be an idiot

calm nebula
#

CustomModifier☆☆s☆☆

barren tapir
#

yeah

#

By the powers of Yoba I compel thee...
-# Please work this time

#

FINALLY

#

I'M AN IDIOT

#

spoke too soon

#

I tried saving, and got an error log that is OVER 4 MILLION LINES LONG

hoary tartan
#

Can you even parse that?

barren tapir
#

Yes. Its a bunch of NREs

hard fern
#

Lol i misread NRE as MRE

#

And wondered what those had to do with errors

proven spindle
#

mods ready to eat

ornate locust
#

Can you rig up a small explosion with those too?

#

I guess kinda, but it's more of a code explosion

proven spindle
#

I tried saving, and got an error log that is OVER 4 MILLION LINES LONG
it sounds like they already did

strong kite
#

Oh boy I sure do love adding botulism to my mod :)

barren tapir
#

Clearly, descriptive debug entries

#

Huh. No NRE was raised

severe cairn
#

I did some cursed C# just roughly testing if this would work and. apparently it did
and when I say cursed I mean smapi gave me a warning and had to assist loading it SDVIridiumKek
but hey!!! There's fish!!! they be movin!!! for trying to make my own C# code at midnight (2 am now) for the first time I can look past the jank, I'll fix it tomorrow hopefully

#

its more or less just seeing if i could, and now i can fix it up

iron ridge
barren tapir
iron ridge
#

ahh

barren tapir
#

It also exits the function in question early to prevent the aforementioned 4 million line log file

#

I pretty much always surround temporary, test, and debug code with an if (true) statement if it's more than a line long. It makes it very easy to toggle testing and to track which code to remove and which code to keep once everything is working

strong kite
#

ohhh okay I suddenly understand the difference between using "Entries" and "Fields" (unrelated to the current convo sorry)

calm nebula
#

Interesting! I usually use an `ifdef DEBUG

#

Or smth similar

barren tapir
#

Whatever method works for you! I do this system because of 2 reasons. A) I primarily work with Python which can't do that, and B) this gives me a means of tracking functional versus broken code.

hard fern
#

But the problem is sdv doesn't have sharks. Or whales

#

So I'd need to draw those

slow stag
#

is this where i can find help on trying to make an npc mod bc i was directed here after i made a post about it in nexus corinpanic

#

i also have no idea how to do pixel art the way it looks in game

severe cairn
#

Oh there's a Lotta stuff for this

#

!pixelart

ocean sailBOT
#

Where to Start With SDV-Style Pixel Art
If you've never done pixel art before, don't stress! It's easy to pick up the basics - the key is to start small, ask for feedback, and incorporate that into your work.

To start, you'll want an art program. See a list of recommended programs in the !software command.

Here's some good beginner tutorials!
http://pixeljoint.com/forum/forum_posts.asp?TID=11299&PID=139322
https://medium.com/pixel-grimoire/how-to-start-making-pixel-art-2d1e31a5ceab

To start off, try opening an existing portrait and changing the outfit. Start small: edit a shirt pattern, change a jacket collar, or remove a scarf and draw the clothes underneath. Ask for feedback too! The best way to improve is learning how to identify what's wrong and why, so then you can work out how to fix it.

Here's more good tips from the artist of "Celeste":
General pixel art 1: https://www.patreon.com/posts/pixel-art-1-6971422
General pixel art 2: https://www.patreon.com/posts/pixel-art-part-2-11225146
Outlines: https://www.patreon.com/posts/outlines-14106192
Shading: https://www.patreon.com/posts/shading-13869731
Portraits: https://www.patreon.com/posts/portraits-8693396

SDV has a few quirks to remember too:

  • Colour limits: Limit the number of shades you use - stick to six including the outline.
  • Hue shifts: Rather than making shadows and highlights lighter or darker versions of the base tone, SDV shifts the hue too. Eg. a base orange will have yellow highlights and red shadows. This goes for skintones too!
  • Light source: SDV uses a top-right & slightly forward light source - check the vanilla art for reference.
    Most importantly, don't hesitate to ask questions and get advice from people. Have fun!
severe cairn
#

!npc

ocean sailBOT
#
Creating a Custom NPC

Keep in mind that making NPCs is a complex process that requires learning many different aspects of Stardew modding.
Here are a few links that can help get you started on all that you need to know:

slow stag
#

tbh the reason the pixel art part scares me is because of how DETAILED the character design is curse you mihoyo and your detailed af designs

slow stag
barren tapir
#

Good news: The framework mod is correctly applying the vanilla professions! Bad news: Still occasionally crashing

slow stag
severe cairn
barren tapir
#

I think I fixed the crashing issue

severe cairn
#

Easiest way to do her sprite is probably hold your phone further away and squint to see whaf the most striking parts are without the detail

slow stag
#

ahh

severe cairn
#

And then you got some stuff to focus on

slow stag
#

yeah ;w;

barren tapir
#

Yall, LogOnce is a freaking godsend

#

Now comes the scary part

... Testing custom modifiers

slow stag
#

terrifying

hoary tartan
barren tapir
#

But hey, at least this framework meets the initial requirements of allowing you to define items that benefit from any number of arbitrary professions!

severe cairn
#

There's boothill too

barren tapir
#

Anything after that is just extra credit!

slow stag
barren tapir
#

Yall think this format will be easy enough to use for people to define custom price multipliers (for example, how cooked fish benefit from both the fisher and artisan professions)?

{
            "Action": "EditData",
            "Target": "Nullnnow.CMF/CustomModifier",
            "Entries": {
                "MondayModifier": {
                    "Multiplier": 0.5,
                    "Conditions": ["DAY_OF_WEEK Mon"]
                },
                "WednesdayModifier": {
                    "Multiplier": 1.5,
                    "Conditions": ["DAY_OF_WEEK Wed"]
                },
                "ThursdayModifier": {
                    "Multiplier": 2,
                    "Conditions": ["DAY_OF_WEEK Thu"]
                },
                "FridayModifier": {
                    "Multiplier": 2.5,
                    "Conditions": ["DAY_OF_WEEK Fri"]
                },

                "ButcherBruteModifier": {
                    "Multiplier": 10,
                    "Conditions": ["PLAYER_HAS_PROFESSION Current 2", "PLAYER_HAS_PROFESSION Current 26"]
                }
            }
        },

        {
            "Action": "EditData",
            "Target": "Data/Objects",
            "Fields": {
                // Cave Carrot
                "78": {
                    "CustomFields": {
                        "Nullnnow.CMF/CustomModifiers": "Rancher, Blacksmith"
                    }
                },
                // Diamond
                "72": {
                    "CustomFields": {
                        "Nullnnow.CMF/CustomModifiers": "MondayModifier, WednesdayModifier, ThursdayModifier, FridayModifier"
                    }
                },
                // Bat Wing
                "767": {
                    "CustomFields": {
                        "Nullnnow.CMF/CustomModifiers": "ButcherBruteModifier"
                    }
                }
            }
        }
lucid iron
barren tapir
lucid iron
#

QuantityModifier

#

this is the same thing used in ShopData.PriceModifiers

#

so it'll be consistent

#

the other thing i'd do, since you already got a custom asset, is to have the custom asset take a context tag or GSQ that filters for which items this modifier applies to

#

if you force people to attach custom fields to each item then it'd be impossible to cover arbitrary mod added items

barren tapir
#

Okay. It should be noted that it turns out that the custom asset is currently completely broken SDVpufferwaaah

lucid iron
#

oh yea another thing is that Condition is most commonly a string

#

because u can do AND with , and OR with ANY

#

if u make it a list people may be confused about whether it's gonna be an AND or an OR, and there r some implications re: json

torpid sparrow
#

What to do while waiting for flight….maps!

royal stump
#

(I did end up making GSQs in FTM an "any" list, mostly so people didn't have to deal with escape quoting SDVkrobusgiggle not optimal for clarity & it was just a 1.6-alpha era whim, though)

lucid iron
#

yea i am always torn between obey vanilla and modder qol SMCPufferjail

#

i do lean towards obey vanilla most of the time unless it's dire times over there

royal stump
#

my 2.0 stuff just does "condition": "string" so far, but I might end up stapling on "ConditionList" too eventually

barren tapir
#

OMG I'M AN IDIOT, It'd help if I actually enabled the custom asset

inland rain
#

added DMT/barrier to Dynamic Map Tiles https://www.nexusmods.com/stardewvalley/mods/33900

DMT/barrier

Prevent certain character types from entering this tile.

Accepted Value

A list of character types separated by pipes ('|'). Possibe character types include:

  • Character
  • FarmAnimal
  • NPC
  • Pet
  • Child
  • Horse
  • Junimo
  • JunimoHarvester
  • TrashBear
  • Raccoon
  • Farmer
  • Monster

and all specific monster types. Note that character types will also check subtypes, so Character will check every character type, NPC will check NPCs and any NPC subtypes (like Pet, Monster, etc).

Example

"DMT/barrier": "AngryRoger|Serpent|Farmer|Pet"

Nexus Mods :: Stardew Valley

Makes map tiles dynamic - change tile, tile sheet, and properties on-the-fly; tiles can be pushed and blown up; heal or hurt; give items and money; play sounds and change music; show custom events; tr

lucid iron
#

my hors is banned...

barren tapir
#

I think I'll take a break from the framework mod for now. Later I plan on resuming work on the rock refinement mod that caused this spiral in the first place 😅

inland rain
#

fancy font letter blocks

rich cliff
#

popping in here just to say Tiled aint so bad :P

oblique meadow
#

Tiled is great

latent mauve
#

Is this correct as a Condition if I am trying to trigger an action only if the Jonghyuk & Spanner mod (Arknir.Jonghyuk) is NOT installed, and a player has the special order active from that mod (jhLanternFestival)?

"Condition": "PLAYER_SPECIAL_ORDER_ACTIVE Any jhLanternFestival, !{{HasMod |contains=Arknir.Jonghyuk}}",

hard fern
#

🤔 wait, but how will they have a special order active if they dont have the mod

latent mauve
#

This is for cleaning up my multiplayer save, since a player joined with the mod originally and apparently engaged with the NPC all the way up to triggering the special order, which alerted the rest of us to the fact that they were running with the extra NPC by themselves (and gave us gibberish since the strings were obviously missing for everyone else)

hard fern
#

a

uncut viper
#

That looks correct to me I think

latent mauve
#

the debug command doesn't clear it from the journal, so I'm hoping this will do the trick instead.

hard fern
#

i think it looks ok too

latent mauve
#

awesome, thanks

hard fern
#

sigh i have to make maps

#

🤔 is there a way to have the unpacker not unpack the different language files

half tangle
#

I just dragged them into a separate subfolder to make it easier to find the file I want

severe cairn
#

I guess you could- yeah

half tangle
#

I usually keep one extra so I know which actually have multiple languages

#

That rarely matters at all, just a thing I did

uncut viper
#

I did send in a PR for the unpacker to add an option to not unpack the different language files actually, but it is not yet merged

#

But if you felt like building it yourself that is always an option if you were desparate enough

hard fern
#

i am more stubborn than desperate

#

so ill just sort them out myself

ornate drift
hard fern
#

hm.. this tells me a lot about which of my scrapped npcs i took this character data from lol

gray bear
#

squiggly red goes brrr

severe cairn
#

even while //? 😔

vital star
#

this might be a super dumb question but are there any (basic interactive) resources available with eg screenshots/images of maps & tile coordinates that can be used to assist with custom event creation? honestly was going to go down the path of building my own tool but wanted to double check that nothing similar already exists...

fossil osprey
#

(iirc he has an update in the work to be able to upload a map and see coordinate, it's just not out yet (next week iirc))

vital star
#

ohh love it. yeah effectively would be looking for basically that exact tool but with a game-aware GUI, ie drag wizard onto a specific tile on the map, draw paths for NPC movement etc

#

might keep my eye out for that upcoming release, good tip about Tiled too - thanks 😄

fossil osprey
#

If you want to see what has been planned

#

But you can still make your own tool if you feel it can be useful, don't forget we all love two cakes ^^

vital star
#

that's awesome! really good, thanks for the heads-up

#

very possible that I will... just depends how far the current hyperfixation goes lmao

golden spire
#

with events there are so many different ways someone could make an event builder that you make another one but focus on a different way of doing it, which other people may prefer/find easier.

void aspen
#

Hm, is that generally possible to make a mod that makes two other mods compatible?

#

With hasmod and cp edits

#

Taken two other mods are by someone else

golden spire
#

what are you trying to do specifically?

vernal crest
#

It is in some situations, yes. I have a mod that makes Tilly and Riley compatible with one another by moving Riley's house. However, you can't change the mods themselves, so you just have to tidy up after they've both applied their patches to the game - which doesn't always work.

void aspen
#

Yet

golden spire
#

Then the answer is "it depends".

vital star
empty vector
#

I would like to use Content Patcher to edit the price od Dinosaur Eggs/Mayo specifically after reading the Treasure Appraisal Guide. Any ideas how I could do that? I have found that PLAYER_STAT Current Book_Artifact 1 is a Game state query, but not sure how I would apply it.

fossil osprey
#

I think you can simple use the Condition field?

empty vector
#

Even when editing object data?

#

I haven't seen an example of this

fossil osprey
#

Just on your patch

empty vector
#

Sorry if I'm being dense, Object Data don't have a condition field? (besides in Geode Drops)

wide river
#

so is making ui for sdv mods still a nightmare or there are utility/tools to do it more easily/convert from unity UGI canvas or something ?

fossil osprey
#

what does your patch looks like?

fossil osprey
empty vector
# fossil osprey what does your patch looks like?
            "Action": "EditData",
            "Target": "Data/Objects",
            "Fields": {
                "107": { // Dinosaur Egg
                    "Price": "1250"
                },
                "807": { // Dinosaur Mayonnaise
                    "Price": "2550"
                }
            },
            "When": {
                "Sell Prices & Adjustments": true
            }
        },```
I tried messing around with the When condition but it wouldn't recognize PLAYER_STAT as a token
fossil osprey
#

No I don't think When accepts a GSQ

empty vector
fossil osprey
#

I see the Condition field used here and ther throughout the CP documentation, but I don't see how exactly it works SDVpufferthinkblob maybe someone else would be able to help you further

lucid iron
#

Condition in cp is talking about When usually

#

When there's a field named Condition or similar then it's conventionally something that takes a string and will be checked as GSQ

empty vector
lucid iron
#

Object data does indeed lack any field name condition so pls elaborate on ur goal

empty vector
#

Apply the above patch only after reading the book Treasure Appraisal Guide (/having the related Special Power)

lucid iron
#

Make a mail flag out of the stat and use when hasflag

#

But warning you wouldn't get retroactive price boost

empty vector
empty vector
glossy cargo
#

Sharing a little bit of a tease for what I'm working on

#

The christmas tree is interestingly cursed

ornate trellis
#

at least your carpets and food aint the literal voidnever found out the issue lol

glossy cargo
#

I feel like, of all people, you shouldn't be bothered with some void

golden spire
#

A Southern Hemisphere Christmas

rich seal
#

I don't know why I love it so much, but making flavored items of any variety is just such a fun little project. I just wish I could figure out how to make a custom cask that will let me improve the quality of weapons, tools, clothes, and all the other equippables though, because that's been too much for my pea brain to figure out lol

empty vector
# lucid iron But warning you wouldn't get retroactive price boost

this might have been what you meant but I can't get the mailflag to apply on an existing save where the book was already read. Creating a new save and then reading the book (and sleeping) applies the patch perfectly, same with loading an older save where the book hadn't been read yet. But no matter what I do I can't get the patch to apply to a save where the book is already read. I've tried using debug commands to remove the book power and then read it again, as well as setting the mailflag to seen.
This is the flag:

            "Action": "EditData",
            "Target": "Data/TriggerActions",
            "Entries": {
                "SVBO.ArtifactBookDinosaurEgg": {
                    "Id": "SVBO.ArtifactBookDinosaurEgg",
                    "Trigger": "DayStarted",
                    "Condition": "PLAYER_STAT Current Book_Artifact 1",
                    "HostOnly": true,
                    "MarkActionApplied": false,
                    "Action": "AddMail Host SVBO.ArtifactBookDinosaurEgg received"
                }
            }
        },```
Am I doing something wrong?
gray bear
#

did you add MarkActionApplied recently?

empty vector
#

I tried setting it to true as well, but tbh I do not know what it does 🤷

#

I referenced Cornucopia More Crops mail flags since I've used them for conditions myself

gray bear
#

mark action applied just means the trigger action can happen again, otherwise, it just won't

#

if it was set to true and it ran, that's it. you can i think make it unapply with console cmds i think, but that'll be why it works for new saves but not old ones

empty vector
#

I also tried before ever setting it to true

#

I'v ehad the book read for weeks and tried to apply this patch for the first time a few hours ago

vernal crest
#

You can use debug gq PLAYER_STAT Current Book_Artifact 1 in the console while in your already-read save to see if the player stat has actually been incremented.

vernal crest
#

Have you been checking with a dinosaur egg you already owned or did you trash it and spawn a new one?

empty vector
#

I spawned new ones

vernal crest
#

If you're using debug commands to set the mail flag on your already-read save and it's still not changing the price, the issue isn't with the trigger action, it's that the patch to change the price isn't applying. Have you done a patch summary to check it applied?

empty vector
vernal crest
#

What does what entail?

empty vector
#

Sorry: "Have you done a patch summary to check it applied?"

#

Patch export data/objects?

vernal crest
#

patch summary <mod id>

#

It will list all the patches in your mod and whether they have been applied

#

If the object price change patch hasn't been applied because the condition wasn't met, it will say that

#

(Also, I am keeping in mind that this is only happening on the already-read save. I haven't missed or forgotten that point ^_^)

empty vector
vernal crest
#

And have you tried a patch export of data/objects to check the price?

empty vector
#

God I know what the problem is...

#

I edit the price again bc of an SVE event after this patch, I am dense

vernal crest
#

Haha whoops

empty vector
#

Thank you for your help, I think I should be able to solve my issue now (the patch export was very enlightening, should have done that hours ago) ♥

vernal crest
#

Well, at least you got a bit more knowledge for future for how to troubleshoot things like this! You're welcome :)

empty vector
vernal crest
#

Asking for help proves you are not a fraud!

empty vector
#

(also I want to get my level up so I can apply for mod author one day ^^)

rich seal
#

I'm struggling to make an upgraded cask that can increase the quality of any item of any category. I don't know how the vanilla cask even works, because its output method doesn't make sense to me; "OutputMethod": "StardewValley.Objects.Cask, Stardew Valley: OutputCask". What does this reference? It sure doesn't reference the Objects.json, from what I can tell.

calm nebula
#

!decompile

ocean sailBOT
rich seal
#

Oh god I'm going to need C# for this?

#

I am not a coder by any means if so.

brittle pasture
#

you can just modify the input trigger + the custom cask multiplier

#

all in CP

#

the output function just returns the input but with higher quality

rich seal
brittle pasture
#

your machine is not the cask

#

gonna need EMC to make any custom machine a cask

rich seal
#

Extra Machine Config? I'm using that as a dependency already as I needed it for other machines

#

I just got stuck where I am because I wasn't able to figure out what I needed to change, aside from the output method for the obvious reason that it isn't the vanilla cask lol

brittle pasture
#

make sure to remove any existing machines after making the change

rich seal
ocean sailBOT
#

Log Info: SMAPI 4.5.2 with SDV 1.6.15 build 24356 on Windows 11 (10.0.26200.0), with 9 C# mods and 1 content packs.

brittle pasture
#

wrong file i think

rich seal
#

I don't know what the right file would be then, as the two jsons I've linked are the only jsons related to the custom cask.

brittle pasture
#

well the one file you posted does not have machine data

rich seal
#

Well I'm not sure what else is needed for it to count as machine data then. I haven't had any problems with other machines, as far as I am aware. What exactly constitutes as machine data?

brittle pasture
#

the first file you posted before that post with the log
I need the version where you made the change that SMAPI is complaining about

rich seal
brittle pasture
#

oh wait i see it now

#

lmao serves me right for using me phone

#

but yeah wrong place; you want to put it in where the Data/Machines entry is defined

#

and CustomFields is a dictionary of string to string

brittle pasture
rich seal
#

So the one that has all the recipes?

brittle pasture
#

anyway yes

#

(for future reference, to avoid confusing your helpers when you post a file that's causing an error please post the state it's in that is causing said error, not the "before" correct state)

#

(I do not know if that makes sense)

rich seal
#

I think I understand. The file I sent with the smapi log accidentally didn't have customfields, because at the time I undid it and forgot I probably needed it in there

brittle pasture
#

yeah I was definitely lost lol

rich seal
#

My bad lmao. Anyway, I just put the custom field in my machine's data file, before/after the OutputRules? Or inside each output rule?

brittle pasture
#

before/after

rich seal
ocean sailBOT
#

Log Info: SMAPI 4.5.2 with SDV 1.6.15 build 24356 on Windows 11 (10.0.26200.0), with 9 C# mods and 1 content packs.

brittle pasture
#

CustomFields is a map of strings to strings

#

so you need "CustomFields":{ "blabla" : "true" }

rich seal
#

Oh, the brackets.

ocean sailBOT
#

Log Info: SMAPI 4.5.2 with SDV 1.6.15 build 24356 on Windows 11 (10.0.26200.0), with 9 C# mods and 1 content packs.

brittle pasture
#

oh yeah you can't do tools

#

they don't have quality anyhow

rich seal
#

Like, they're hardcoded to not have quality?

#

Because that was what I've been trying to do this whole time lmao

calm nebula
#

What would tool quality even mean

brittle pasture
#

quality is part of the base Item class, but that field has no meaning on the Tool class (I don't believe it will even draw the star)

rich seal
#

So I've been struggling in vain for nothing this whole time huh lmao

calm nebula
#

Like, just as a concept

#

What would a quality tool do?

#

Other than only make you cry once

rich seal
#

Oh it wouldn't do anything. I just like making stupid content.

brittle pasture
#

you have to sharpen your tool every time you use it to bring it to max quality

calm nebula
#

As they say

#

Tools... you either cry once or cry every time

royal stump
#

(monster hunter sharpness but for digging holes in the dirt)

calm nebula
#

Look i still think of the couch

rich seal
#

I was mainly just trying to cover as many bases as I can, since I already got it to make milk, beer, etc out of tools. I just wanted to try to cask everything for the complete package

gray bear
#

the couch?

rich seal
#

I'm assuming the same limitations are on weapons, clothing, and all other forms of equipment?

calm nebula
#

Please observe the couch

royal stump
#

the game derives several things from the Object class that don't really use all its fields, and quality is only used by certain categories of actual Object-type objects

brittle pasture
#

any class that doesn't subclass Object is kill

calm nebula
#

I mean with enough harmony

#

But ||I still would want the quality to have a point||

royal stump
#

yep, you can patch things into using them (or subclass but that's even more awkward), but most don't care about quality or draw the stars

calm nebula
#

||like increased buffs for rings? Not sure||

#

||damage on tools?||

#

Oh hey my coffee is ready back to work

rich seal
#

Welp, time to cry in a corner for wasting all that time lmao. At least I can make Iron Hoe Roe and Iridium Axe Mayonnaise with my nonsense mod.

brittle pasture
#

and machines specifically only support Object (and children); Tool is not one of them

calm nebula
#

Wait. How does iron hoe roe work

gray bear
#

iron hoe roe... what do it taste like

brittle pasture
#

the fact that you can put tools in a machine in the first place is an EMC invention

calm nebula
#

Selph, wasn't preserve index unqualified

gray bear
#

selph is supporting flavored tools

#

or tool flavored things

brittle pasture
rich seal
#

Literally doing this for EVERY artisan good. Why? Because I can lmao

calm nebula
#

That's hilarious

rich seal
#

It all started with milk (which I was not aware was a sensitive topic elsewhere), and my mind decided "DO IT ALL"

#

And now I'm demotivated because of no tool/weapon/clothing/etc quality. At least I know how to make a cask now lmao

gray bear
#

dino pants flavored mayo pls

rich seal
#

Dino pants becomes House Plant sadly. Qualified item IDs or whatever

gray bear
#

ahh well

rich seal
#

Would love a way to preserve the item NAME rather than the ID, but is there a way to do that?

wanton pine
#

Milk is a sensitive topic...?

rich seal
#

Over in #modded-stardew yes. Pinned comment. Apparently, they took it a bit too far with milk jokes at some point in the past.

gray bear
#

don't.... ask

#

think it's okay here as long as u don't overdo it with the jokes

rich seal
#

I mean, I'm covering every artisan good, so I've got that little bit of leeway. Hoe Roe is my favorite thing now, but still. I am a man on a mission to make Lucky Purple Shorts artisan goods, and by god I'm gonna do it.

#

I just have a few more machines left to make lol

gray bear
#

lucky purple... juice?

#

like green eggs and ham and goose juice

#

be the Dr Seuss of Stardew

rich seal
#

Well, I currently have Beer, Coffee, Juice, Mead, Wine, Milk (all four versions), Cheese (both versions), Mayonnaise (all four versions), Roe, and Aged Roe. All working just fine, aside from names being goofy due to IDs like the dino pants/house plant issue earlier. So, I'm on my way to being a unqualified doctor I guess lol

#

And yes, Lucky Purple Shorts Juice is a thing. It was part of my main mod that has jank code, so I figured that out early on lol

brittle pasture
#

(tbh I know it's meant to be a cursed mod but it's probably not a good idea to have a machine that can swallow a user's 42k Iridium Hoe if they click it wrong)

gray bear
#

hmm i mean they have the same item id number I think but they're different objects

#

is that fixable selph? can we get dino pants mayo

rich seal
#

Try Return Scepter Coffee. I did that when testing by accident lol

brittle pasture
#

(because gods know people can't read)

gray bear
#

millions down the drain

brittle pasture
gray bear
#

"your machine ate my 5 million dollar tool" skill issue /j

brittle pasture
#

oh wait not the same thing being asked

rich seal
#

I do need to make a config toggle (on by default) to disallow equippables and tools, but that's easy enough to do later.

gray bear
#

flavoring an item with pants I something I didn't know I wanted to do until now but I can't live without it

rich seal
#

Once I finish all the artisan goods I still have left, I'll upload the mod so you can have that horrendous content lol

gray bear
#

"I made you a pie!"
'what flavor is it?'
"tight pants"

slim marlin
#

If I wanted wild trees to naturally spawn, that would require FTM? However, if I just wanted players to buy saplings (or possibly obtain as loot), that would not require FTM? Right?

brittle pasture
#

if those wild trees have predetermined spots you don't need FTM

gray bear
#

u can add a tree without ftm yeah

brittle pasture
#

(aka vanilla)

gray bear
#

u can edit map them in

slim marlin
#

They would be a new type of wild tree.

royal stump
#

(FTM also doesn't do trees currently) (planned for 2.0)

gray bear
#

yeah map edit them in. cornucopia does this

brittle pasture
slim marlin
brittle pasture
#

sapodilla trees on ginger island my beloved

gray bear
#

shake the tree

slim marlin
#

Thanks y'all!

fierce vault
#

that’s a neat emoji -_- lol

quick bramble
#

Hi, kinda oddball question i know, but i was doing some googling and apparently SV mods do a lot with unpacking xnb files?

#

Trying to change a font for another game, in the process of workshopping a mod

brittle pasture
#

!unpack

ocean sailBOT
#

Follow this guide to unpack the game's content files in order to see and explore how the game data is structured.
It's helpful when making your own mods, or just to learn about how the game works!

viscid quiver
#

npcs sharing a birthday shoudlnt cause problems right..?

gray bear
#

nah

#

birthdays aren't like, special days reserved for one npcs. just days man

viscid quiver
#

thanks, im kinda overthinking every aspect of making this custom npc

gray bear
#

nw

viscid quiver
#

only issue kinda would be it possibly not showing on the calendar right?

gray bear
#

ohhh yeah uhh

#

there was a mod that solved this but it seems to be broken for 1.6

#

hmm

#

any npc modders know if there's like, a solution for that

viscid quiver
#

for now im just gonna ignore i ever had this thought lol

brittle pasture
#

I think UI Info Suite 2 or some other mod in my mod list makes them cycle

#

and/or show everyone

gray bear
#

if i had a mod that adds an npc with a same bday i'd check but i don't, use custom npc mods

viscid quiver
#

oh yeah ui info suite 2 has a birthday icon next to the daily luck n stuff

gray bear
#

i think selph meant it cycles on the calendar?

viscid quiver
#

ohh i havent checked

tiny zealot
#

vanilla calendar only shows one npc portrait if multiple share a birthday. but i'm pretty sure it shows everyone's names on hover

#

there's at least one mod that addresses the only-one-portrait situation

gaunt orbit
quick bramble
#

already done that actually

#

working with the discord on the other game to see what i can do about editing the orignal fonts

#

the guide was very useful

gaunt orbit
#

Are they angelcode fonts?

quick bramble
gaunt orbit
#

That's the most common format for bitmap fonts

tiny zealot
#

if they don't use the same underlying font format as stardew then i'm not sure how much will transfer

quick bramble
#

Ohhhhh

#

uhh, good question

tiny zealot
#

if you're looking at stardew for pointers

quick bramble
#

Less stardew and more general unpacking
Nobody in the other game's modding scene has really messed with font changes much

#

everything in the png files looks solid for what its worth

tiny zealot
#

i have nonzero familiarity with stardew's fonts so feel free to ask if you need anything

quick bramble
#

I guess at this point i should be able to open the .json files with notepad or another text editor?

tiny zealot
#

those do look like they could be the same kind of spritefont

quick bramble
tiny zealot
#

!json can you share one of the jsons with this link? (don't worry about the schema)

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.

quick bramble
#

How can i tell what format these are in?

tiny zealot
#

you can just pick "none" for the schema/format on the uploader

quick bramble
strong kite
tiny zealot
#

ok i don't think it's the same format as stardew but it looks more or less equivalent

quick bramble
#

Sounds like good news

tiny zealot
#

the bad news is this data is extremely tedious to generate by hand, so ideally you will want to have a program or at least a script or something to build it

quick bramble
#

Huuuuuhhhhh

#

Sounds like a fun undertaking XD

tiny zealot
#

i would guess that these files were generated by using a particular tool that slurps up a .ttf or something and spits out a sprite atlas (the .png) and this format of json

quick bramble
#

this is probably the point where i should put in my glyphs together that i want to add in

tiny zealot
#

truetype font. it's a standard pc font file format

quick bramble
#

Oh right

#

yep thats the font type

#

I have an image here somewhere but i've closed the file smh

tiny zealot
#

your best bet is to figure out what tool they used for this to make the game and use the same one yourself

#

is your goal to replace the fonts entirely, or just to add glyphs?

quick bramble
#

add glyphs

tiny zealot
#

truthfully your best bet is probably to use the tool in either case though. adding could be very tricky

quick bramble
#

As of right now the engine reads something like goði as go (asterisk) i as it doesn't recognize the charachter.

The game's dev suggested that i check the workshop's localization mods to see if the fonts he used include the glyphs but it didn't seem like they did. When i asked about adding special runes, his response was: "To have the new special character show up properly, you would need to add a new font that includes it. The default font is pretty basic and (asterisk) is default for when a character can't be found."

Could i alternatively just create a new font file and go from there?

#

I'm not sure how easy it is to do that though

tiny zealot
#

yeah, my suggestion to use the same tool would probably generate you a new font (like the original but with more glyphs) that you would load instead

quick bramble
#

Thank you!
I know its frustating on your end to not have all the peices, so i really appreciate it!

tiny zealot
#

sure thing

#

(my nonzero experience with stardew's fonts is that i made a stardew mod to solve this exact problem)

quick bramble
golden spire
#

Someone who was translating the game into Welsh ended up using one of the other custom languages that had created a very large font with numerous characters on it. One of the other fonts files they needed required me to make an xnb containing the required font files which also required me to used a hex editor to do some manual editing as whatever encoding I tried it failed when saving, it was very tedious.

#

I have pretty much completely forgotten everything I learned from the brief history I had playing with the fonts

#

Once I got it working for them I didn't want to touch it ever again

oblique meadow
#

I just need a second set of eyes since I've never really gotten my head fully around ChairTiles. Does this look right?

  "Action": "EditData",
  "Target": "Data/ChairTiles",
  "Entries": {
    "TestSheet/9/16": "1/1/down/bench/-1/-1/false/Tilesheets\\CustomSheet"
  }
}```
gray bear
#

this will replace all existing chairtiles, but yeah

#

use Fields

golden spire
#
      {
         "Action": "Load",
         "Target": "Fonts/SpriteFont1, Fonts/tinyFont, Fonts/SmallFont",
         "FromFile": "assets/{{TargetWithoutPath}}.cy-CY.xnb",
         "When": {"Language": "cy"}
      },

Looking it up
these are the xnb files I had to make/load into the game

gray bear
# oblique meadow I just need a second set of eyes since I've never really gotten my head fully ar...
Stardew Modding Wiki

Last edited by AtlasVBot on 2025-09-13 18:56:10
[This tutorial is a WIP by Majickian and should not be considered a finished product at this time.]
This is a tutorial for adding the ability to sit on custom chair tiles place on a custom map.

oblique meadow
#

I was using that tutorial. Neither that nor any of the examples in this chat when I searched ever call fields... So im confused

gray bear
#

"Entries" just replaces all entries afaik

ornate locust
#

Entries is fine

#

that's what my mod uses and it doesn't replace all chair tiles

gray bear
#

are ChairTiles magically different or is this just not a general rule

ornate locust
#

"To add an entry, just specify an entry that doesn't exist". yes

gray bear
#

oh

ornate locust
#

that does not remove other entries

gray bear
oblique meadow
#

I know I have to do fields for trash cans. (I made that mistake once)

ornate locust
#

There we go LOL

gray bear
#

yeah ur chairtiles look correct

oblique meadow
#

thanks

cyan jungle
#

hiya there guys, is there anyone who could help me troubleshoot my mod?

ornate locust
#

My garbage uses Entries, but it's under the TargetField of GarbageCans, also seems to work fine

gray bear
#

still confused about when to use which so i guess i'll ask

gray bear
ornate locust
#

So I think that's saying if you want to CHANGE a few fields, as in alter

#

Then Fields is better, because you aren't replicating the whole file again

#

But adding, entries is fine

#

not sure. Maybe someone can clarify

cyan jungle
#

well basically, i'm trying to make it so my custom house changes with each season. i have the tilesheets for each season i just dk how to code it because it's kind of a custom map

gray bear
#

house interior or exterior?

cyan jungle
#

exterior

gray bear
#

just name your tilesheets <season>_<nameoftilesheet> and you're done

#

outside does it auto

cyan jungle
#

i'm confused ;-;

#

but it doesn't change

gray bear
#

show me the code?

cyan jungle
#

this is curretly the names of the tilesheets, but i'm not sure what to do with them or how to code it or where so it changes

gray bear
#

so instead of "OsmarHouse_Spring" it would be "Spring_OsmarHouse"

#

because it's an outdoors map and all the tilesheets have seasonal names (spring_, summer_ etc) the seasonal variants will change automatically.

cyan jungle
#

so what would i use in tiled? the spring variant as default?

gray bear
#

yep

cyan jungle
#

hmm ill try that

#

brb

quick bramble
#

@tiny zealot I got some advice from someone in the other discord who knew more about editing that json file.
Unsure how much of this you're aware of but i'll forward it here

autumn tide
#

helllooo if one were to do a basic seasonal portrait thing using {{season}} which of these would be correct? ignore the yellow squiggly line-

urban patrol
#

are those loads? it’s hard to tell without entire patches

autumn tide
#

uhmmm for both?

urban patrol
#

yeah

autumn tide
#

tryna fix my old template

#

it's supposed to be for both editdata and load*

gray bear
#

right hey iw as distracted by existing

urban patrol
#

well then it depends on what the Appearances are

gray bear
#

oh wow you explain it all

autumn tide
#

oh, this isn't using the appearances system, I wanna make a more basic version first

urban patrol
#

claudeeee whyyyyy

gray bear
#

seasonal portraits and sprites are usually handled best by appearence buttt

urban patrol
#

don’t build bad habits >:(

gray bear
#

generally speaking you just ,,,, season token

autumn tide
#

appearances are hard and I wanna make something for absolute beginners SDVpufferwaaah

gray bear
#

theyre not that hard!

autumn tide
#

well, for absolute beginner

urban patrol
#

there’s a tutorial and example for them!

gray bear
#

the fact it's all seperated but one block is throwing me off a bit

autumn tide
gray bear
#

is this for a custom NPC?

autumn tide
#

nope, I wanna make a template for first-time modders to make something

#

kinda like Si's modder's pie

gray bear
#

uhhh

#

right

#

might wanna explain where you'd get character id's

urban patrol
#

if this isn’t for custom NPCs then you have no choice but to work with the already existing Appearances

autumn tide
#

ohhh yeah- I'm adding a list of the vanilla ones at the end but idk how to properly explain how to find modded NPC's ones

gray bear
#

vanilla doesn't use Appearances

round timber
#

it absolutely does for the winter outfits and other stuff

urban patrol
#

doesn’t it? beach, winter, island?

#

yeah

gray bear
#

i think, only for winter

autumn tide
#

for krobus it does

#

for the movie theather

round timber
#

but that still means it uses it

autumn tide
#

ik I spelled that wrong but idc enough-

gray bear
#

true. but beach/island are hardcoded

#

err, claude may i edit your formatting a bit

autumn tide
#

yes pls go ahead I am lost SDVpufferwaaah

#

-# aaah why does it take me 35 years to learn ANYTHING

#

-# oh yeah cause I'm disabled

#

-# that makes sense

urban patrol
#

i’ll shut up after this but i beg you to reconsider teaching others things that aren’t best practice. having to unlearn them will be more work in the end

autumn tide
#

gotcha :/ I'll prolly shove this idea back into the wip folder for now-

urban patrol
#

i don’t think you have to give it up entirely!

autumn tide
#

ik! I do have an appearances version in said wip folder but like aaah it takes me an insane amount of time to do stuff and it's frustrating

gray bear
#

i am, oh so very wordy

#

oh wait,,, season token for load isn't,, uh

#

fuck

#

[tries to share content.json]
[it deletes my comments]

#

gonna cry

#

i like explaining things, doesn't mean im any good

half tangle
#

I see comments in that

autumn tide
#

omg ty SDVpufferheart

gray bear
#

yeah you have the put the comments before the {} otherwise the parser simply kills them

#

like editimage bit also had comments but they got yoinked

gray bear
half tangle
#

oh, weird, might be worth reporting to pathos

gray bear
#

is pathos the one that codes the site? i mean its pathos so i assume he does everything but

fossil osprey
#

it's on the smapi domain, so he's at least involved in it

half tangle
#

yeah, I mean plenty of pathos's stuff has community contributions (sometimes very large), but SMAPI stuff is gonna be managed by him on some level

#

either way he'll know where to send it if not

gray bear
#

mm guess im gonna ping him

blissful panther
#

Ooh, it does! That's funky.

gray bear
#

@ivory plume hey! hope you're well. pink_blue_heart
im not sure how involved you are with the smapi.io site, but when uploading json files there the parser seemed to just delete any comment that is inside of brackets, don't know if that was intended or not.

#

sorry for pinging you so many times

blissful panther
#

It looks like:

  1. It kills the comments if they're following an opening object brace ({), no matter if there are keys and values before it...
  2. ...and if it's following an array closing brace: ]
  3. ...but not if it's following a closing object brace: }...
  4. ...also not if it's following an array opening brace: [
#
{
  "Format": "2.9.0",
  "$schema": "https://smapi.io/schemas/content-patcher.json",
  "Changes": [
    // Hello here!
    {
      // Hello!
      "Action": "Load",
      "Target": "{{ModID}}/Portraits/<NPCINTERANLID>_spring, {{ModID}}/Portraits/<NPCINTERANLID>_summer, {{ModID}}/Portraits/<NPCINTERANLID>_fall, {{ModID}}/Portraits/<NPCINTERANLID>_winter",
      "FromFile": "Assets/Portraits/{{TargetWithoutPath}}.png"
    },
    {
      "Action": "EditImage",
      "Target": "Portraits/npcID",
      "FromFile": "Assets/npcID_{{season}}.png"
    }
  ]
  // And here!
}

https://smapi.io/json/none/dcc64377303748c1b76fcbdc15009e84

#

Oh, nope, it's a bit more complex than that.

#

If:

{
  "Format": "2.9.0",
  "$schema": "https://smapi.io/schemas/content-patcher.json",
  "Changes": [
    // Hello here!
    {
      // Hello!
      "Action": "Load",
      "Target": "{{ModID}}/Portraits/<NPCINTERANLID>_spring, {{ModID}}/Portraits/<NPCINTERANLID>_summer, {{ModID}}/Portraits/<NPCINTERANLID>_fall, {{ModID}}/Portraits/<NPCINTERANLID>_winter",
      "FromFile": "Assets/Portraits/{{TargetWithoutPath}}.png"
    },
    {
      "Action": "EditImage",
      "Target": "Portraits/npcID",
      "FromFile": "Assets/npcID_{{season}}.png"
    }
    // Hello again!
  ]
  // And here!
}

In that instance, of the bottom two comments, only the one following the last closing object brace survives, and the one following the array closing brace that previously survived does not survive.

ivory plume
#

That's mainly a limitation of Json.NET, which I don't think we can do much about (besides submitting a PR for that repo). The validator needs to format the JSON using Json.NET so that the line numbers for any JSON schema validation errors match up, and Json.NET only partly supports outputting comments.

gray bear
#

understood. i'll just, put the comments outside so it stops eating them. thank you

calm nebula
blissful panther
#

Honestly, or even better, in a GitHub repo so you can see previous versions. It's linkable to people just the same.

serene meteor
#

Hello - I'm trying through Tiled and CP to make operational the fireplace in my custom interior. I've tried a TileData property on the Buildings layer of Action <every way in the world to do firePlace, fire_place>. When the map loads, the hand shows up when you hover over the fireplace, but no flames, no smoke. Is what I'm trying to do possible?

calm nebula
#

It's hardcoded iirc

#

There may be a framework for it

gaunt orbit
#

remind me in two days to add furniture re-layering for wall and floor furniture

#

is the bot dead?

serene meteor
#

I'll look to see if I can find the framework. If something exists, it might also let me make operational the kegs, casks, etc that I've got decorating the farm.

calm nebula
#

Ftm will do that

gaunt orbit
#

rip maru's robot

round timber
#

you have to do 2 not two

calm nebula
#

Just set the items as single spawn and unlovable

#

Unmovablr

serene meteor
#

Unloveable is also TRUE

gaunt orbit
#

remind me in 2 days to add furniture re-layering for wall and floor furniture

patent lanceBOT
#

... (#7181974) (2d | <t:1778960332>)

gaunt orbit
#

ah, thanks vin

#

weird that it can't parse written out numbers

serene meteor
strong kite
#

Oh god I think I might actually be done with the update for my mod... I've finished everything I had in my notes.
I should probably load the game and make sure there's no errors though

#

I'm sure I've still got a couple days of testing ahead of me but the actual bulk of adding content and stuff is done

ornate drift
#

on events
is there a way to make an animation permanent until a specific message has passed?

#

like i want Manny to stand up after another character says something

golden spire
#

just tell the animation to loop

#

then use stopanimation

ornate drift
#

ohhh ok, so it loops until i tell it to stop

golden spire
#

only loops if you tell it to loop

#

animate <actor> <flip> <loop> <frame duration> <frames...>
animate marnie false true 120 12 13 13 12

rich seal
#

Silly question, but I'm still on my flavored item kick; is there a way to make the color applied to a flavored item NOT be as strong? I'm keeping my mod simple by reusing vanilla sprites (which also allows for modded sprites if someone uses a texture swap, big brain move here), but in my amusement, I found that if I apply the color of an input item to the output item (for example, amethyst to raisins), the output item has a 100% opacity color overlay. As amusing as that is, it's a bit too strong. Is there anything I can do to weaken this effect that doesn't involve changing to custom sprites?

strong kite
#

man, going through and testing things actually sounds kinda awful (maybe that's just because I'm unmedicated today) so I might just like.. play stardew and make some adjustments from there. Things like forage spawns are something I've been wanting to see in action since I added them cuz I'm worried there's too much lol

ornate locust
#

My final testing pass was just playing a full, heavily modded game with my mod in it

#

and it found lots of stuff, would recommend

ornate drift
urban patrol
#

it’s a required argument

ornate locust
#

It's great for stuff like your forage spawns, things that you sorta just need to see in action

urban patrol
#

anything in <> is required

ornate drift
#

i mean

#

do i put it at like

#

9999999?

#

or something

#

cause im gonna do stopanimation later

proven spindle
#

frame duration is for how long to spend on each frame of the animation, not how long the total animation takes

ornate drift
#

oh its just one frame

rich seal
#

Bummer. Guess I should just add a toggle to have colors or not on the stuff that it blots out. Solid purple cheese is certainly funny, but not for everyone lol

brittle pasture
#

unless you dont use copycolor and set the output color directly

#

for every input

rich seal
#

That is tempting since each of my outputs "only" have 40 entries...

#

Would that set color be doable as just the alpha layer for how opaque the color is? Or is it the whole RGB as well?

#

Reason being is that my outputs rely on item categories, not direct items. Can't turn every gem purple, for example lol

brittle pasture
#

just rgb, but turning the saturation down has almost the same effect

uncut viper
#

new EMC feature when

brittle pasture
#

nou

uncut viper
#

nou, pronounced like now, aka you're working on it, good to know

rich seal
#

Well, guess I'm just gonna stick with a toggle for "items have gaudy colors". I am not going through every single possible item manually for RGB values lmao

calm nebula
#

Fits well for emc

ornate drift
#

wait is that a

#

i forgot the game name

#

fuck

#

the top picture is a reference

rich seal
#

Chrono Trigger

#

or Chrono Cross, one of the two. I always get them mixed.

blissful panther
#

That looks like Crono to me!

urban patrol
ornate drift
urban patrol
#

120 is what schedule animations play at

ornate drift
#

this is an event tho

urban patrol
#

yeah i know

ornate drift
#

ah

#

so that works

#

thanks

urban patrol
#

if you’re holding the last frame it doesn’t matter

ornate drift
#

its a one frame animation

#

okay uhhhh, now how do i get an NPC to open a door within an event?

#

interior door specifically

dusty crag
#

Hello everyone, i am completely new at the mod creation community, i really want to create a mod for fashion sense for a hair but i fail multiple times, and i was looking for help, i am familiar and done the pixel art for the hair styles but what i having trouble is the programing part

dire kestrel
dusty crag
#

Yes

#

I unfortunately lost the file but the trouble it that fashion sense doesn't pick it up

#

Like doesn't recognize the mod at all

#

I try to copy the base of other mods but it didn't work

golden spire
golden spire
#

can't really have an animation with 1 frame

ornate drift
#

cause all my animates are 1 frame with durations

golden spire
#

??

ornate drift
#

ive literally used animate for 1 frames like multiple times

golden spire
#

a frame is a single image,

ornate drift
#

for all previous events

#

yeah

golden spire
#

if you just need a single frame you can use

showFrame <actor> <frame>

ornate locust
#

You don't really need an animation if you don't ... you know, animate

ornate drift
#

well that sucks, now i gotta change all the animate commands from the previous events tired

ornate locust
#

other than for like a schedule animation, but those are specifically animations anyway. In an event though

ornate drift
#

or ill just start using showframe for now

ornate drift
golden spire
#

stopanimation is to stop the animation, if you're using showframe you can just change to anotherframe when done

#

usually the one where you're about to walk

#

or whatever is needed

ornate drift
#

eh ill keep it in mind, thanks

ornate drift
golden spire
#

doAction <x> <y>

dire kestrel
ornate drift
#

xd

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.

urban patrol
dusty crag
#

?

ornate drift
#

okay okay

urban patrol
ornate drift
#

huh

urban patrol
#

x y is the tile

ornate drift
#

i know

golden spire
#

it doesn't matter who is there, you're just performing an action on a tile

#

it's up to how the event looks for what is happening to the viewer

#

no-one by the door and it opens... oOOoooooOOOh a ghost or the wind blew it

#

someone standing by it, can assume they opened it

golden spire
whole prism
#

meant this

golden spire
#

I know

#

I was just adding to the dolphin part

golden spire
#

😛

ornate drift
#

tyty

ornate drift
#

hmm...

#

now i gotta change maps inside an event

#

ChangeLocation should work

#

but is something like globalfade/ChangeLocation Forest/19 20?

whole prism
#

my expression when I forgot to add a MinFishingLevel to my pearls SDVpuffersweats

jaunty shuttle
#

How do you make events in the farmhouse not break with custom farmhouse mods?

uncut viper
#

my understanding is that you dont

jaunty shuttle
dusty crag
#

It still won't pick up the mod, is there a error in my code ?

golden spire
#

jackpot

#

now who will ruin it

barren tapir
#

Far too ambitious goals for tonight:

  • Do my rock refinement mod
  • Work on my book mod update
oblique meadow
barren tapir
#

Also, you misspelled duck

verbal glacier
golden spire
#

I'd just have to wait for another magic number]

uncut viper
jaunty shuttle
uncut viper
#

but hey if you've got like, idk. a million years to spare

jaunty shuttle
#

So all the kids mods that have events, those are all broken if you have a different farmhouse?

#

You just have to use vanilla to use them?

oblique meadow
#

Event in the void 🙂‍↕️

jaunty shuttle
#

Damn lol

royal stump
rare orbit
ornate drift
#

im sorry what

royal stump
oblique meadow
rare orbit
#

that's the name of the npc's portrait

ornate drift
#

broooo 😭

#

i have SO much troubleshooting to do

royal stump
rare orbit
#

ahhh kk

#

it's been a while ;w;

ornate drift
#

okay so is his internal name not Pierre or something?

uncut viper
#

Speedy did you recently run a kill debug command or something

rare orbit
#

this is what happens when i takes a break ;w; forgo

royal stump
oblique meadow
rare orbit
royal stump
#

yes, if you want to overwrite their portrait, EditImage with the same target and your replacement file
(i.e. what you had already, just with the same target they use)

ornate drift
#

why is SMAPI telling me pierre does not exist

verbal glacier
oblique meadow
#

He’s hiding

ornate drift
kindred hamlet
#

Hi
I am new here

ornate drift
#

and the ones below

#

but like

#

idk what to do with pierre

verbal glacier
barren tapir
barren tapir
royal stump
kindred hamlet
ornate drift
verbal glacier
royal stump
#

then most of those are probably because he's not there

barren tapir
ornate drift
#

i warped him

#

and put him as Pierre -1000 -1000 in the beginning

#

his portraits work

#

but his warp didnt

rare orbit
#

so like this?

#

im changing a custom npc's portrait with my own

royal stump
# ornate drift but his warp didnt

make sure there aren't any errors about him loading into the event, ig, because it's saying he isn't in the event; I don't know exactly what you mean by portraits, but they probably don't require him to be present, unlike NPC movements

rare orbit
#

i mean like i want his portrait in the original npc mod to be replaced with the ones i made

royal stump
#

(alright yeah, checking the code, changePortrait doesn't care if the NPC is actually in the event, as long as they're are real NPC; movement commands need them present)

barren tapir
#

Does anyone know of good guides on creating items with changing colors (e.g., how wine changes color based on the input fruit)?

royal stump
#

you just need the EditImage with "Target": "Portraits/KB_Katsuki", that's it

rare orbit
#

so no need for the mod id?

royal stump
#

no, that mod doesn't use it in its Target

#

if it said Mods/{{ModId}}/KB_Katsuki in the original mod, that'd be fine, but you need to use whatever they use

royal stump
rich seal
#

I'm almost done with my mod, and some idiot (me) forgot to put commas in a file so the entire mod crashed. Love when that happens.

rare orbit
barren tapir
brittle pasture
#

yes

barren tapir
#

Dope!

#

Curious to see if I did this right

autumn tide
#

hellooo is there any specific guide just for i18ns?

round timber
autumn tide
#

thank you!!

#

turns out all the fancy commands I put for dialog in my i18n wouldn't have worked SDVpufferwaaah

round timber
#

its pretty straightforward but there are some fancy things you can do with it if so desired

#

what sort of commands?

autumn tide
#

stuff like stats, $actions, lots of queries

round timber
#

you can do $ stuff in i18n

verbal glacier
round timber
#

idk about the other stuff but you can definitely do expressions and such in an i18n file

golden spire
#

you have to pass the value into the translation

ornate locust
#

For tokens, you do

#

Expressions, they just kinda work

autumn tide
#

ah, I mean more elaborate stuff like this:

#

it's older stuff that I will be editing anyways

ornate locust
#

"MV.Municipal.Dialogue.Daily.24": "[LocalizedText Strings/MV.Municipal:MarlonName]'s got so many stories, I don't think [LocalizedText Strings/MV.Municipal:MarlonGenderHe]'ll ever run out of 'em.$h",
Localized text strings work...

#

You might just not be formatting them right

autumn tide
#

oh yay! hmm are stats okay?

ornate locust
#

That one I don't know

autumn tide
#

gotchaa

#

I'll find out LOL

ornate locust
#

but Localized Text strings do work, and they don't need passthrough tokens

autumn tide
#

HMMM interestingggg

#

thank you for this information SDVpuffersalute

brittle pasture
#

the only thing that doesn't work is CP tokens

#

which you can make work by passing them in as arguments

#

everything else gets pasted in as is and interpreted by the game as usual

uncut viper
rich seal
#

I'm free. I uploaded my mod, closed out everything related to it, and now I can breathe again. Time to NOT touch modding again until I get bored and decide to make something again lmao

calm nebula
ornate locust
#

true, ModID tokens do count as tokens

#

But you can just change them to your mod ID and don't exactly have to pass them in

hazy radish
#

Hi everyone! I really hope I'm in the right place for this. I'm trying (and failing miserably! 😭) to do something that I think should be really simple?

All I want to do is add an inspectable headstone into my game that displays a message when you click it, preferably just through ContentPatcher.

I've been throwing myself at this for two days, I asked Reddit already, I even tried going nuts and learning to use Tiled, I've cried more times than I want to admit, Google is absolutely no help at all...

This is possible, right?
I'd like to tell it where to appear via coordinates and have it display an "in loving memory" message when it's clicked.

gaunt orbit
#

Yes! This should be a fairly straightforward project. It will involve Tiled and Content Patcher.

#

!startmodding

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.

gaunt orbit
#

If you haven't seen it yet, there is also a whole section on the wiki dedicated to modding [[Modding:Index]]

ornate locust
#

For the text part, you'll want Action Message specifically on the map page

gaunt orbit
#

The basic overview of what you'll need to do is this:

  • create a content patcher mod
  • unpack the game files so you can edit a copy of the town map
  • create a bit of map with your new gravestone using Tiled
  • add the Message Action to the gravestone using tiledata
  • add an editmap patch to your cp mod which loads your map slice and edits it into the existing map
#

There's instructions for each of these steps on either the modding section of the wiki or the cp docs

#

If you're struggling with a specific step, feel free to ask questions hete and we can help out

hazy radish
#

Thank you guys! I'm glad to know it's possible, at least! ^^'

I've been around the wiki a bunch and I think I might just need to step away for a bit. XP All the instructions on there are starting to look like gibberish. Lol

If I ever figure this out, I'm planning on releasing it as a template on Nexus (with instructions!) for others to edit, if they need/want a custom grave for something. ❤️

barren tapir
#

How would one get how long it takes an object to duplicate itself while in a crystalarium?

royal stump
#

if it's currently in process, you can probably check minutesUntilReady on the machine instance

#

but if you mean in advance, you'd probably need to mimic the Data/Machines check logic for this stuff

autumn tide
tiny zealot
wide river
#

I must have missed it but I checked fundamentals and many other sections but I was looking for what to do when a class member you need is wrapped with a MultipleMutexRequest and that NetList/netRef multiplayer stuff ?

uncut viper
#

The first thing you do is make sure you actually need to do what you're attempting to do

#

and that there isnt an easier way

royal stump
#

a lot of the game's code isn't directly documented anywhere, generally, and that's a very esoteric class

uncut viper
#

one that has less risk of breaking multiplayer stuff
but if you DO need to get inside that class, typically the underlying list/collection/whatever is just on like a property or w/e inside it

whole prism
#

FINALLY a working env branching model, but my beta is snapshot based from more-stable alpha builds

#

cant do ci/cl pipeline until i tweak my app to understand what headless means

#

oop wrong channel

#

😭

wide river
#

the way I used to do this before the multiplayer thing a long time ago was to copy the whole itemgrab stuff and fridge menu UI nd make my own so that whenever you used the fridge it would uses my menu instead

uncut viper
#

use GameLocation.GetFridge() to get the Chest and then lock its mutex (found on the Chest) as needed

#

(and ofc dont forget to unlock it too)

quick bramble
rich seal
#

Had an idea, yet I have no idea where to start, so I'm gonna ash the most basic question; are custom bombs doable with just content patcher? Or do I need to know C#? Because I can't find anything in the unpacked files (unless I'm just blind?).

calm nebula
#

You need c#

royal stump
#

yep, fully hardcoded

#

aside from a bomb_item tag existing (unrelated to functionality)

rich seal
#

Well bummer.

tiny zealot
#

i've also heard horror stories about the bomb code tbh

rich seal
#

No Lucky Purple Shorts Bomb for me then

royal stump
calm nebula
#

The bomb code has personally insulted my mother, ichor

royal stump
#

and animations means weird net broadcast methods etc

tiny zealot
royal stump
#

(iirc FTM places bombs wrong and I just don't think about it) (aside from the Item wrapper workaround)

wide river
#

yeah like ... still same problem as back then, checking the wiki about events, completely forgot how to intercept an itemgrab menu only 3 matches in the search channels thing on discord, one is mine saying that word a few minutes ago 🙁 specifically in itemgrabmenu.cs intercepting the constructors when an UI is made to reroute those:
public ItemGrabMenu.behaviorOnItemSelect behaviorFunction;
public ItemGrabMenu.behaviorOnItemSelect behaviorOnItemGrab; //after an event which I dont know yet trigger this method: if (itemgrabMenu.sourceItem == GameLocation.GetFridge()) and if so change the ItemGrabMenu two behaviours to point to my code instead... Im reading https://stardewvalleywiki.com/Modding:Modder_Guide/APIs/Events but dont know what event I could use like player.InventoryChanged dont seems to be it, Display.MenuChanged seems to be more helpful but it would gets triggered lot of time and Id have to check each time if we are in an ItemGrabMenu menu (ie: the iclickable e.NewMenu is ItemGrabMenu ) possibly wasting code time to check UIs im not interested in.

lucid iron
#

Display.MenuChanged is actually the correct thing to use for this and a is ItemGrabMenu check is cheap enough to fall in the "who cares" category

#

however if you are specific about the goal mayb there r better approach

wide river
#

add more page to the fridge, Im exploring wheter the old approach would still work before I commit to porting that ...and if i works add more pages to the mini-fridges once I am done with the normal fridge , thats why I need the behaviour in case you are in a page thats not possible in vanilla so my mod has to custom handle it to eventually do: h.fridge.items = items; with items being a List<Item> with the list of items managed by the mod across all pages

lucid iron
#

in that case i'd harmony patch Chest.ShowMenu

wide river
#

after that Id have to figure out the new stuff like how the multiplayer and mutex code affect that assignment of items directly to the fridge, also make a panic button if there is a mod or built-in feature that provide a mod configuration menu so when the game is updated and the fridge dont display the additional pges as vanilla which is an old issue that made peoples panic between game updates - like the items were still in the fridge but undisplayable and you had to take the items out and place them in again, the panic button would make a copy of the stored items in a json as described in the dta storage section of the wiki to make sure the items are safe even if the UI part of the mod stopped working

lucid iron
#

as for keeping items safe i wouldnt worry too much blobcatgooglyblep

wide river
lucid iron
#

IInventory is not actually capped, its the ui which stops you, so you'd be able to get everything out eventually

lucid iron
#

!harmony

ocean sailBOT
#

Harmony is a framework for patching .NET code, allowing you to take any portion of the game's logic and insert or substitute your own. This gives you more flexibility and control than SMAPI helpers and events, at the cost of being typically more complex and difficult to use safely and correctly, and more likely to break with a future update of the game and/or SMAPI.

If you are trying to do something that isn't possible or practical with SMAPI alone, then Harmony is usually the solution.

For more information, refer to the following:

lucid iron
#

some chest mods i'd reference for this is unlimited storage and chests anywhere

wide river
#

yeah Im looking at them atm and my old code on essedari smapi-mod-dump on github cuz I lost my code, wanted to maybe explore the possibility of it being compatible with the remote fridge mod as well

#

like its the discussion about the ui framework and seeing examples that make me motivated to do this, it was the most annoying part of modding to me and thats why I eventually quit... with what I saw now there is the possibility to easily add filters instead of browsing X pages, adding "upgrades" like cloud storage (to access the fridges anywere), buy items in bulk (lowest quality) getting a bulk rebate, etc

lucid iron
#

tbh with vanilla menu i am very hesitent to change away from the vanilla class lol

#

its terrible to have to do a gorillion harmony patches but thats the path of greater compatibility

wide river
#

thats fine, my old mods didnt really follow great compatibility best practices mostly because the behaviour things I cited earlier were private back then in code, thats why I had to completely replace the native fridge menu. Id like to do better this time especially with tons of feedback on the nexus about it

lucid iron
#

There isn't any kinda official template afaik

#

I do have my own thing just for myself tho

#

You need to target net framework 6 now

calm nebula
#

There is an example on one of the migrations

royal stump
#

somebody might have a template somewhere, but I'm only familiar with platonymous's, which are on Nexus but like 1.4 era

wide river
#

yeah Im fine with it now, just had to remember what to name the project so its an upgrade to the old thing. seems to be all set 🙂 thanks

rich seal
#

If I wanted to make a custom chest, what's the best way to approach this? I could always default to Alternative Textures, but it'd be nice to learn how to make a proper chest and not a reskin for once.

#

Nevermind, found Expanded Storage. I knew there was a mod for that

wide river
#

in functionnality you will need the itemgrabmenu and the two delegates I keep mentionning . Its the bread of butter of making a chest do something custom, you might have to recreate an itemgrabmenu as well depending on how you use/update the items in it by code

strong kite
#

To be honest I’m a little worried that testing my mod is gonna be the hardest part of the process cuz I no longer have that persistent drive that I’ve had every day for the last like 6 weeks. Like it’s a weird in between phase where I don’t have consistent work to do but I’m not actually done and can’t just go do other things yet
I’m hoping this is just an issue because of my ADHD today and tomorrow the solution will be a lot clearer. HehSweatCloseup

wide river
uncut viper
brittle pasture
#

finally, cpu fan curve controller in sdv

uncut viper
#

this is actually going to be a curve controller

#

not for fans though SDVpufferpensive

inland rain
#

location map

rare orbit
brave fable
#

in what way 'aligned different'?

rare orbit
#

like this

#

this is how the original pixel art is in the original mod

#

and here's the ones i made

brave fable
#

it shouldn't make a difference; your current layout is standard, but if theirs works then you could use that layout too

#

it'd be an issue if they had, say, an EditImage patch on their portrait asset that targets specific coordinates, since yours obviously wouldn't align

rare orbit
#

ahh kk

#

just askin before i begin testing

valid folio
#

Hi I’m not sure if anyone is still awake but I tried to revive a mod for a modder and almost got it working. Some context: I want to use one of my machines to process her milk. I completely rewrote her mod and it works the cows moo, the milk jars appear and the milkshakes also appear but I tried injecting the rules so that her milk can be used to make milkshakes in my machine and it doesn’t work

What’s strange is that I’ve added compatibility for other mods in a similar way before so I’m not sure what’s going on now If I share the code could someone help me

inland rain
gray bear
#

do you want this published?

torpid sparrow
#

It’s published

gray bear
#

oh wait

midnight sand
#

I don't know if someone ever noticed, but in the game code the detection of hardwood dropped by Trees is like this:

{
    numHardwood += item.Stack;
    addedAdditionalHardwood = true;
}```
And it should be like this?
```if (drop.ItemId == "(O)709")
{
    numHardwood += item.Stack;
    addedAdditionalHardwood = true;
}```
I spent a lot of time debugging something until I noticed it wasn't me, it was the game that was checking something else
gray bear
uncut viper
#

drop.ItemId and drop.QualifiedItemId are two different things, the former being 709 and the latter being (O)709

#

So the first snippet is working fine

midnight sand
#

The item id in the vanilla game for mahogany and mystic trees is "(O)709" in the xnb data files

uncut viper
#

It is not. The ItemId for Hardwood is 709, as seen in Data/Objects

#

Again it's important to remember the difference between a qualified item ID and a non-qualified one

midnight sand
#

Check the drops in the wildtreedata

uncut viper
#

Them using qualified item IDs does not make checking drop.ItemId wrong.

#

The ItemId on an object is always going to be unqualified.

midnight sand
#

That part of the code checks for the wildtreedatadrop info in the wildtreedata xnb, and that info has the (O) in the item id field

uncut viper
#

That does not matter when checking drop.ItemId

#

drop.ItemId == "709" and drop.QualifiedItemId == "(O)709" are equivalent in this case

#

It might create the drop using the qualified item ID, but it will still have its ItemId field set to "709"

#

Because that's just how the Object class works

#

or Item class, whichever one it is thats the superclass

#

Both the qualified and unqualified forms are stored and accessible via their relevant properties on the Item class

#

No matter how the item is created

midnight sand
#

Through a transpiler I changed the code to

{
    Console.WriteLine("Hello");
    numHardwood += item.Stack;
    addedAdditionalHardwood = true;
}```
Then destroyed a Mahogany tree -> Nothing happened, no Hello
#

I changed with the transpiler the code to

{
    Console.WriteLine("Hello");
    numHardwood += item.Stack;
    addedAdditionalHardwood = true;
}```
Suddenly, Hello in the console
uncut viper
#

Can you post which function this is so I can take another look at it?

midnight sand
#

Because the ItemIds of the items for chopped trees has the (O)

#

Tree.tickUpdate

uncut viper
#

(like the name of the function I mean pls do not post the whole thing-)