#making-mods-general

1 messages · Page 296 of 1

glossy cargo
#

@ivory plume I'm not sure if this is a bug report, or a request for clarification, so here we go.
Ever since SMAPI 4.2.0 (or 4.2.1, unclear) my players have been reporting a new bug, which does not happen with SMAPI 4.1.10.
The bug goes as follows:
My mod provides a feature called "Multisleep", where you can go to bed and pick a number of days to sleep for. The way I implement this feature is to hook into the OnDayStarted() event, and within this event, I run some code to check conditions and stuff, and then I call Game1.NewDay(0); at the end.
This used to work fine for the purpose of simulating a near-instant "go back to bed" upon waking up, and therefore sleep many days in a row without interfering with other processes like sprinklers, crops and whatnot.

Since SMAPI 4.2.x, many players have been reporting that if they ship something on a given day, then trigger a multisleep, the first occurence of sleeping will glitch out. They will get stuck in a sort of "not truly awake, not truly asleep" limbo, where the UI is gone but the day isn't ending. They've been recommending to each other to carry a scythe to bed, and use it to move to their front door. Apparently, upon leaving the house, they properly fall asleep, and the remainder of the multisleep works properly.

I have seen some changes in the SMAPI code related to the night events, notably the shipping tab, so I am pretty confident that this bug is related to that. But I do not understand the new changes enough truly figure out what the heck is happening. This means that I am unsure if I have uncovered a SMAPI bug, or just a new behavior that is intended, and that I need to adapt my code to.

Do you have any ideas? Can you give me a hand? SDVpufferpleading If you're too busy, that's fine too blob_heart

shadow pagoda
#

bumping this. And follow up question: is the source code for these console commands publicly available?

lucid mulch
#

!decompile everything in debug is vanilla, its just smapi exposing it under the debug wrapper

ocean sailBOT
lucid mulch
thin plover
#

Could someone point me in the direction of how to edit the carpenter/community upgrade shortcuts in town? I found Mountain_shortcuts.tmx and Backwoods_Staircase.tmx, but I'm not sure where the updates are to Town.tmx, Forest.tmx. and Beach.tmx

uncut viper
#

those are hardcoded

#

see Town.showTownCommunityUpgradeShortcuts(), Beach.showCommunityUpgradeShortcuts(), and Forest.showCommunityUpgradeShortcuts()

lucid iron
#

This mod's approach is to just manually do the corresponding map patches

calm nebula
#

That said the town shortcuts are controlled by a mail flag

#

So you can just set that

clear oxide
#

hello , Im new to modding this game. I just need to know is there a Pokemon like Catching & Taming Mod ?

rough lintel
spice inlet
#

there is Nature in the Valley

rough lintel
#

off the top of my head: there is no catching and taming mechanic

#

for pokemon specifically

clear oxide
#

im working on a mod right now XD i just needed to know i wasnt stepping on feet already

rough lintel
#

there are sprite replacers but thats abt it

#

oh word! yeah id just search Pokemon on nexus just to check though

#

i think pokeranch is like the closest thing but theres no catching/taming

clear oxide
#

right now i got it pretty basic , you can capture a slime

lucid iron
#

There's various Critter mods yes

#

Nature in the valley is close to what you might be imagining

#

But it's about capturing new critters added by framework instead of existing monsters

#

!twocakes

ocean sailBOT
#

If you discover that someone has made or is making a mod with a similar concept to yours, don't stress! Our community promotes the idea of "two cakes", where two versions of the same idea can peacefully co-exist. Your mod will have your own unique stamp on it that makes it special.

clear oxide
#

thanks that gives me some ideas

lucid iron
#

For the taming part hm, i think nitv let's you release the critter on your farm

#

Making them a farm animal works ofc

shadow pagoda
#

how often do people find a bug with their code and spend hours trying to figure it out only to realize you didn't attach a method to an event?

lucid iron
#

And you can make them into trinket companions with trinket tinker so they follow you around and do stuff

shadow pagoda
#

Is there a way to easily look up a specific cutscene and its id?

lucid iron
#

Depends on the context

#

If you just want a list of every cutscene you can iterate locations and get that (but you need to parse the preconditions)

#

i vaguely recall there being some way to check the currently active event (game1.eventup?)

#

Here it is (but remember to null check on Game1.CurrentEvent)

trim sand
#

so update on this silly thing from yesterday. ive hit a snag. the getSellPrice method essentially only has access to the animals data. and the menu that gets pulled up AnimalQueryMenu i think doesn't seem to have access to the player that opened it. so im not sure how to check against a specific player that's interacting with the animal to determine which professions they have. in theory if i can determine if an AnimalQueryMenu is currently opened by someone and by who i think i can do the rest. but getting from just the FarmAnimal instance to all of that seems infeasible.

lucid iron
#

You can just use Game1.player in that context

#

Also i thought animals had a field for who owned em

trim sand
#

possible. lemme look. and im not sure i understand the bit with Game1.player is that just always the host or something?

tiny zealot
#

Game1.player is always the current player

trim sand
#

does look like ownerID is a field that exists in FarmAnimals.

lucid iron
#

Yeah in coop it's whoever the player local to this client is

#

In split screen it's instanced static and gets swapped

trim sand
#

i see. so probally checking the owners professions is the way to go.

lucid iron
#

So given context of menu, it will always be the player trying to sell

#

Whether u want that vs owner is separate question

trim sand
#

goal very much was the player trying to sell

#

next question im realizing i need to ask. how do i return a value to the original method through a harmony prefix?

next quarry
#

does someone know a way to change a map only while an event is happening?
I need to get rid of this plant that is on the Front layer

tiny zealot
#

hmm have you tried makeInvisible?

next quarry
#

I can but I thought it's only for furniture and not stuff from the actual map layer

lucid iron
lucid iron
#

Is this your map

#

What if you move plant to Building1?

next quarry
#

I could move it to Back so it technically under the table?

lucid iron
#

Yeah works too

next quarry
#

but the thing is, it is the vanilla Saloon map so I just want it to be temporary for one event SDVpufferthink

lucid iron
#

Yeah that's y i asked is this your map DokkanStare

next quarry
#

sorry, hehe

lucid iron
#

Hm so is it normally bugged too? Like does the plant go over farmer in normal gameplay

next quarry
#

when I place an object it is under the plant and if I put the object on a higher layer the farmer is under it sadly

lucid iron
#

Yeah idk i would just do a quick EditMap

#

No one has to know

ivory plume
lucid iron
#

You don't even need tmx cus u can just set the tile idx

#

null the Front tile and set it in Back, as you proposed

next quarry
lucid iron
#

Im saying to do it all the time

next quarry
#

:O

lucid iron
#

It's only a visual change

#

no one has to know

next quarry
#

okay, I have a mail that is checked before the event can trigger and make the change when that is the case + the event has not been seen yet, hehe

#

no one has to know SDVkrobusnaughty

#

Thanks for the help <3

glossy cargo
# ivory plume Hi! A few questions to narrow it down: - Have you been able to reproduce the iss...
  • Yes, I have been able to confirm that it happens on my side with SMAPI 4.2.1, but not with SMAPI 4.1.10
  • The issue seems to be pretty consistent. Since updating to 4.2.1 I have had it on every attempt, which is about 8-10 attempts. It also consistently does not happen on days where I don't ship anything.
  • My debug setup only has SMAPI, my own mod, and the two CBJ cheats mods. At least 6 users have reported the bug (with various mod sets), and 3 of them confirmed that it does not happen on SMAPI 4.1.10 with the same set of mods, so I ruled out an external mod interaction
  • My mod does do things in UpdateTicked, although none of them related to sleeping, days, or fading to and from black screen

Bonus info from investigation since my original message: It appears my code that calls Game1.NewDay(0) ends up starting a fade operation (Game1.screenFade.FadeScreenToBlack(Game1.player.passedOut ? 1.1f : 0.0f);), but the event that is supported to be raised at the end of this fade does not get raised. This event is responsible for calling Game1.newDayAfterFade(AfterNewDay); which is the "real" code that terminates the day.
So when I changed my code to this, which is essentially rewriting some vanilla code, now it works fine
Commit: https://github.com/agilbert1412/StardewArchipelago/commit/ab8617818b1914cec682c0240323e4be07e7683d

#

I'm okay sticking to this workaround as a permanent solution, as it also ended up making my multisleep faster (no fade animation), with no noticeable downside yet. But I figured I'd share the whole process, because I still suspect there is a SMAPI bug at play, which might have other ramifications for modders

trim sand
# lucid iron you can modify the return value by ref type __result

well. uhh. were certainly doing something as a direct result of the player interacting with the animal having rancher, but also we can call this progress. code is as follows in a harmony prefix. definately missed something major.

    internal static bool SellValuePatch(StardewValley.FarmAnimal __instance, int __result)
    {
        try
        {
            int SellValue = __instance.GetAnimalData()?.SellPrice ?? 0;
            double mod;
            if (Game1.player.professions.Contains(0))
            {
                if ((Game1.player.professions.Contains(2) && (__instance.GetAnimalData().ProfessionForFasterProduce == 2 || __instance.GetAnimalData().ProfessionForQualityBoost == 2 ||
                    __instance.GetAnimalData().ProfessionForHappinessBoost == 2)))
                {
                    mod = (double)__instance.friendshipTowardFarmer.Value / 1000.0 + 0.9;
                }
                else if ((Game1.player.professions.Contains(3) && (__instance.GetAnimalData().ProfessionForFasterProduce == 3 || __instance.GetAnimalData().ProfessionForQualityBoost == 3 ||
                    __instance.GetAnimalData().ProfessionForHappinessBoost == 3)))
                {
                    mod = (double)__instance.friendshipTowardFarmer.Value / 1000.0 + 0.9;
                }
                else
                {
                    mod = (double)__instance.friendshipTowardFarmer.Value / 1000.0 + 0.5;
                }
                __result = (int)((double)SellValue * mod);
            }
            else
            {
                return true; // run original logic if no profession checks are met.
            }
            return false; // don't run original logic
        }
        catch (Exception ex)
        {
            Monitor.Log($"Failed in {nameof(SellValuePatch)}:\n{ex}", LogLevel.Error);
            return true; // run original logic
        }
    }
}
lucid iron
#

You need a ref on that

#

Also why are you doing a prefix

tiny zealot
#

i would 100% postfix this

trim sand
#

Uhh .. patch example on the wiki is a prefix. So uh I didn't think it'd matter

uncut viper
#

there is a big difference between a skipping prefix and a postfix

lucid iron
glossy cargo
#

postfix is generally less disruptive, and therefore less error-prone, both your errors writing the code, and also incompatibility with other mods as prefixes can screw with each other

uncut viper
#

if you do a postfix and take in ref int __result as an argument, then __result is equal to the value that the game wouldve made the sale price had it returned it then and there (i.e. if you werent modifying it)

#

but it goes to your postfix first before actually finishing up, so you can then modify __result as you see fit

gaunt orbit
#

!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:

glossy cargo
#

the use for a prefix is either you really need the code to run before, or you need the original code to not run at all.
If you intend on running the original (or, re-writing equivalent code to it), and then just changing the value it returns, do postfix

gaunt orbit
#

Oh. Why isn't the official harmony docs linked on there?

lucid iron
#

I think it's linked inside the first page

#

But yeah hm it's got a Prefix example lol

tiny zealot
#

typically the only time you need the original code to not run is if it has an undesirable side effect that you can't undo (e.g. drawing to a SpriteBatch)

uncut viper
lucid iron
#

Yeah but it's about what's good to start people on right

uncut viper
#

assuming they mean the example on that first bullet point in the gov command, its not an example on how to use harmony. its an example of how to catch errors

#

and in that case, catching an error in a skipping prefix is a good example to use, so you know to return true

lucid iron
#

I also think postfix is more intuitive for this kind of modify a value patch, though whether __result is something to discuss right off the bat is different question

gaunt orbit
#

There are also passthrough postfixes, which IMO are the most intuitive

#

Really straightforward

uncut viper
frozen apex
#

So on a totally different note, got a really noob question here...but does DynamicTokens have to be in the content.json file? Or can it be somewhere else?

uncut viper
#

content.json only

frozen apex
#

ok thx

#

And how do I fix when something "can't be used as a token because that token could not be found"?

lucid iron
#

Sounds like you spelled the token wrong, or it's not in scope

frozen apex
#

how do I make it be in scope?

lucid iron
#

We don't know enough about your mod to say

#

Try doing a patch summary <your mod id>

#

See what content patcher believes about tokens currently available

frozen apex
lucid iron
#

Do that in your smapi console

frozen apex
#

ah ok

#

thank you

#

I'm learning to code through editing other mods for my own use, so I'm trying to merge two different mods

#

and i keep getting this error message

#

"[Content Patcher] Ignored Romanceable Rasmodius SVE Compatible > 'BusyDay' token: its When field is invalid: can't parse condition Season: '{{Birthday Season}}' can't be used as a token because that token could not be found."

lucid iron
#

Do you have the Birthday Season token

frozen apex
#

probably not, but how do i get it?

lucid iron
#

It looks like dynamic token or config token

frozen apex
#

as said, suuuper duuuper noob at this

lucid iron
#

Search the original mods for this

frozen apex
#

it was under dynamic tokens in the original mod, so i put it under dynamic tokens in the merged one as well

#

but ive only put the code under DynamicTokens. But codes that enable these kinds of event exists on other places as well?

lucid iron
#

Try to explain whole token system here would be much too long

calm nebula
#

Did you copy a token from one mod to another

frozen apex
#

haha, ok np, i get you

calm nebula
#

Also I find it weird/not great the token name has a space tbh

lucid iron
#

The space is why i thought it's a config token

calm nebula
#

The tl;dr is that dynamic tokens are scoped to the mod so you can not trivially copy them

frozen apex
#

ooooh, ok

#

so one would need to create the code aroud the token as well to make it work kinda?

lucid iron
#

You need to have the whole dynamic token definition copied yes

#

This is assuming you are trying to not have the original mod installed anymore (unclear why you want this)

frozen apex
#

No, i still want the original mod. I just want to add more stuff to it

lucid iron
#

NotteThink you want to have CMCT then

#

To access another mod's tokens

#

If it for personal use you can also just do your changes directly in the other mod

frozen apex
#

Yeah, it's only for personal use. Just started with coding, so no intentions of ever publishing my own mods

#

I'll try with CMCT, thanks for the recommendation!

lucid iron
#

I vote for doing stuff directly in the other mod if personal use kyuuchan_run

frozen apex
#

Cool, yeah, been doing that a bit. But haven't been able to get everything to work yet

lucid iron
#

CMCT is there if u are publishing an add on mod and need to know about the base mod's configs and such but for learning it's probably best to just work under the same mod

frozen apex
#

Wasn't as easy as copy/paste 😅

#

Ah, then I get it. Thanks! I'll check out the github docs then

#

still trying to wrap my head around dynamic tokens

whole raptor
#

Should the unpacked AudioChanges.json be empty..? SDVpufferthink

gaunt orbit
#

Yeah

tiny zealot
#

yeah, that one is supposed to be changes to the vanilla sound bank

#

so the vanilla version has nothing in it

whole raptor
#

Ah, makes sense

trim sand
#

yatta. (animals sell value is 7500, so 9750 at max hearts without modifiers.)
changing around to a postfix fixed the issue.

#

due to the fact the mod is just recalculating the sell value with profession data modifying addition added at the end after dividing animal friendship by 1000, (0.3) to 0.5 for Rancher alone, or 0.9 with Rancher and the animal benefits from the level 10 farming profession that you have. its basically raising min and max animal sell value 20% and 40%

tiny zealot
#

hey everybody, i have a bunch of trigger actions set up on day start that look like this

        "{{ModId}}_TriggerAction_5HatsShown": {
          "Id": "{{ModId}}_TriggerAction_5HatsShown",
          "Trigger": "DayStarted",
          "Condition": "{{DayAfterTownDay}}, {{ModId}}_PLAYER_SHOWN_HAT_COUNT Current 5",
          "Actions": [
            "AddConversationTopic {{ModId}}_CT_5HatsShown 4"
          ]
        },```
but with increasing numbers on the SHOWN_HAT_COUNT check (it's a minimum value for the field it's checking).
i would like to have these set in sequence, i.e. only the first one is satisfied, then on the next matching day only the next, and so on. but since they all have the same conditions except for the count, i can't rely on just whether the previous action has run, because i think it will set itself immediately and the next one will see it as having run (so key sort order becomes relevant, which is gross).
should i mess around with moving some of the logic to DayEnding and using mail flags or something? or have i overlooked a way to chain these without more patches?
lucid iron
#

This seems like a lot of work on data side when you are supplying the custom GSQ anyways

#

Is making a custom trigger action off the table?

tiny zealot
#

SDVpufferthinkblob no, i just prefer to use CP when practical for an NPC mod

lucid iron
#

Yeah fair

#

Perhaps u can use the If trigger action?

tiny zealot
#

hmm

urban patrol
calm nebula
#

Have each check for said 0 day CT

next quarry
#

thank you!

uncut viper
#

you could also, alternatively, just write the trigger actions in reverse order and check for themselves

tiny zealot
#

i would greatly prefer not to rely on key sort order

uncut viper
#

Data/TriggerActions is a list

#

it has an order

tiny zealot
#

hmm

uncut viper
#

its just rarely relevant to remember that it is a list

#

(you were still correct in your initial "it'd set itself then be seen as set" thing though, bc it will ofc go down the list in order)

#

if you write the triggers from 5 to 4 to 3 to 2 to 1 or whatever, and have 5 check if 4 has run, 4 check if 3 has run, and so on, then it will fail until it gets to the last trigger action in the list, which is HAT_COUNT 1, which doesnt have any prerequisite

#

then the next day, it'll do the same thing again, but it'll succeed on HAT_COUNT 2, which checks for HAT_COUNT 1 having run, which happened yesterday

tiny zealot
#

ok that sounds good! thanks

sleek pelican
#

Question, how do I fix a mod with the 'missing shop stock and price' error?

clear oxide
#

question how does Ammo work for custom items ?

brittle pasture
rigid oriole
#

i can put eggs in my slingshot????

clear oxide
brittle pasture
#

you need a framework for that. there was Archery Framework but it's outdated and still not fixed

trim sand
nocturne pumice
brittle pasture
#

are you making a C# mod

#

I think that fires for mines?

#

since they're dynamic and gets created/recreated everytime you enter and exit

clear oxide
#

can you use both SMAPI + CP togeather in 1 mod or does it have to be seperated into 2 mods ?

tiny zealot
#

2 mods

ivory plume
# glossy cargo - Yes, I have been able to confirm that it happens on my side with SMAPI 4.2.1, ...

I took a look, and the mod was probably affected by a change to the DayStarted timing when you ship an item:

  • SMAPI 4.1.10: DayStarted is raised after the ShippingMenu exits, which is about 3-4 seconds after the save completes.
  • SMAPI 4.2.0+: DayStarted is raised right after the save completes (while the ShippingMenu is still open for the fade in).

I could update SMAPI to match the old timing, but I'm not sure which would be better:

  • With old timing: you'll get events for the new day (e.g. UpdateTicked) before DayStarted is raised, which may lead to mod bugs or require confusing logic.
  • With new timing: all events are raised in a logical order, but mods which do something like show a menu on day start will break (since there's already a menu open).

Though I guess in the latter case, there's already a risk of that happening regardless (e.g. two mods want to show a menu on day start); so it might be better for those mods to use the game's built-in message queueing instead.

glossy cargo
#

So, basically, my event is running while the shipping menu isn't fully gone yet, is what you're saying?

ivory plume
#

Yep.

#

One option could be something like this (which would also account for issues caused by other mods opening a menu on day start):

public void OnDayStarted(object? sender, DayStartedEventArgs e)
{
   Game1.PerformActionWhenPlayerFree(() => sleep logic here);
}
glossy cargo
#

I feel like
shipping closes -> save -> day started -> UpdateTicks
is an order that makes the most sense
As an alternative, although I don't know how much control even is there for that, maybe the Game1.NewDay(0) Fade event should get queued instead of swallowed?

#

At least I'm glad you confirmed my observations, makes me feel less crazy about bugs popping out of nowhere

ivory plume
#

The problem is that ShippingMenu isn't only the shipping UI. The shipping menu handles the save and fade-in too.

glossy cargo
#

oof

ivory plume
#

(The game's new-day and save logic is pretty complex under the hood, even if it got streamlined quite a bit in 1.6.)

glossy cargo
#

I'll probably stick to my workaround because my players are very hyped at the prospect of ~2x faster multisleep, so even with a fix I'd probably want to keep it. Turns out this change forced me to give them something they wanted so it ended positive.
And, hopefully, if someone else runs into a problem with the same cause, now we know and will be able to tell them

#

Thank you for your time!

ivory plume
#

Welcome, and thanks for reporting the issue!

#

I'll add a note to the DayStarted docs on the wiki when it's back online to mention the possibility of a menu being open on day start (whether from shipping or from another mod), and suggest Game1.PerformActionWhenPlayerFree where needed.

clear oxide
#

😄 you can now catch slimes

sour sleet
#

I have a location with a river and some ponds. What is the best way of having separate fish for both types of water?

trim sand
#

Silly question, is it possible to add new recipes via content patcher based on a profession choice or is the fishing profession that effects crab pot costs cursed under the hood?
Was recently thinking it'd be funny to add recipes for the sprinkler augment items form the walnut room as expensive crafting recipes for the arguculturalist profession.

ivory plume
lucid iron
lucid iron
#

since u r in C# u can just give and take away profession based recipes whenever you want

trim sand
lucid iron
#

If not in C# you need to see if removing recipe has any perfection implications

round timber
#

is there a "best practice" for deciding what numbers to give answers in a $q dialogue? perhaps prefixing the number with the nexus ID? can it be alphanumeric or is it numbers only?

lucid iron
#

You can use string as of 1.6

round timber
#

ooh yay

ivory plume
#

You can have recipes unlock based on arbitrary conditions, but I don't think you can easily show the unlock in the level-up UI for non-skill-level unlocks.

lucid iron
#

Adding new recipe is less cursed than the vanilla crab pot which is mutating it

thin plover
ivory plume
#

In theory the shortcuts should be reapplied to the edited map.

lucid iron
#

Yeah u just get edits twice i think

#

Setting the mailflag is probably better i just don't recall offhand what their names are

trim sand
acoustic summit
#

Does anyone know if DayStarted patches apply before or after the DayStarted event in smapi / if it is consistent? I'm wanting to do code which will set what patches are applied and not sure if its reliable to do that code in day started.

ivory plume
potent vigil
#

I don't understand, the dialog files are in that path

acoustic summit
#

Yes, I worded it incorrectly but that would be what I am doing, changing whether the condition can be true/false. I'm guessing that would mean setting flags in DayStarted which are checked in the conditions of patches also on day start is not a reliable way of getting the correct patches to be applied when requested

ivory plume
ivory plume
latent mauve
woeful iron
#

I'm aiming to write a mod that adds a recipe for a craftable chair you can place in a dungeon. Is content patcher sufficient for that kind of mod?

#

And is it even possible to get a sittable chair placed in the dungeon? I know "furniture" can't be

#

Found This. So really it's the second question that is unanswered

acoustic summit
lucid iron
#

It sounds like u want to place it tho, and yes most dungeons dont let you place things

woeful iron
#

Is there any way to hack around that?

#

Like... is there anything placable in the dungeons? And then a separate task of making that sittable

ivory plume
#

Not through Content Patcher, since it's hardcoded in the game code. With a C# mod, you could patch MineShaft.CanPlaceThisFurnitureHere which is what prevents it:

public override bool CanPlaceThisFurnitureHere(Furniture furniture)
{
    return false;
}
woeful iron
#

hmm... the tents can't be placed in the dungeon?

ivory plume
#

I haven't tried it, but most likely not; I don't think the game handles you waking up in a dynamic temporary location.

brittle pasture
#

mine shaft levels are removed and reset when you exit and reenter

#

anything you could place will be lost

woeful iron
#

The idea is that I use a mod that heals me when I sit. Would love to be able to sit in the dungeon.

#

And so I thought of making sort of a Dwarvish Cushion that was just a recipe of like 10 rocks producing a temporary chair

#

that you ideally can't pick back up

#

That was the whole idea that was the source of my questions

#

I have coded in C# before -- guess I was trying to be too lazy

ivory plume
#

It'd be pretty straightforward with C# and Harmony at least.

ivory plume
# potent vigil https://smapi.io/json/content-patcher/c7791d583b0740c79092cac1347bc4ec

There's a few issues:

  • On line 66-71, you're using "Action": "Include" to load patches from assets/Dialogue/DialogueChoiSan.json. Can you post that JSON file too?

  • The ConfigSchema is specific to your content pack, so there's no need to prefix your config token names with the mod ID.

  • There's a few patches that aren't in valid Content Patcher format.

    For example, this is probably meant to be an "Action": "Include" or "Action": "Load" patch:

    {
        "Assets": [
            {
                "AssetType": "Event",
                "FileName": "assets/Events/ChoiSan.json"
            }
        ]
    },
    

    And this is maybe a misplaced dynamic token?

    {
        "Name": "House",
        "Value": "FRL_NPCApt_Floor3 7 32 3",
        "When": {
            "Res": "Loft"
        }
    },
    
potent vigil
#

This

{
"Name": "House",
"Value": "FRL_NPCApt_Floor3 7 32 3",
"When": {
"Res": "Loft"
}
},

was to assign the house to the character since I'm using the Pelican Valley Loft base.

#

The tokens still confuse me, since I don't really know how they work.

#
Stardew Modding Wiki

If you're working on an NPC but aren't sure where to start with their dialogue, the template below lists some of the most common places for dialogue and gives you space to start fleshing them out. Note that you're not limited to these options; you can, for example, set dialogue specific to season, different heart levels, specific days (such as ...

woeful iron
#

Is it possible to add a chair as a random spawn in the dungeon? No placing by the user

lucid iron
#

Chartiles might work?

#

If they do then you can edit in a chair on some mine layouts

woeful iron
#

Chartiles?

#

Actually, better even yet, a chance the crabs die and become chairs, for example

#

some item that I make that's sittable

ivory plume
#

If you have a C# mod, yep you can just place furniture directly (whether it's random or when something happens like a monster dying). The furniture placement restrictions only apply to players placing the furniture themselves.

woeful iron
#

Okay, so I'll look into C# mods then

#

I'm trying to make sense of the logic tie between the ChairTiles and sittability

#

is this what was mentioned about being hard coded? And needed to C# mod dto make something sittable?

ivory plume
latent mauve
lucid iron
#

If you have a furniture chair that you are spawning via C#, then it just is sittable

potent vigil
ivory plume
# woeful iron I'm trying to make sense of the logic tie between the ChairTiles and sittability

You can sit on two different things:

  • On placed Furniture (e.g. a crafted chair). The player can only put down furniture in places that allows them (which the mines are hardcoded to prevent), but all locations support furniture regardless so a mod can place them directly.
  • On map tiles, based on the Data/ChairTiles asset which defines (a) which tiles from a given tilesheet you can sit on and (b) how you sit on them.
latent mauve
#

You don't have to put them in the bed, but that's why the bed coordinates are provided for each room, as it's a standard placement option

#

It's more commonly used 🙂

potent vigil
latent mauve
#

Also, someone else can chime in if I am wrong, but I am fairly certain this code block does not work the way you are expecting:

      "LogName": "Add Bed for San",
      "Action": "EditMap",
      "Target": "Maps/FRL_NPCApt_Floor3",
      "MapTiles": [
        {
          "Layer": "Buildings",
          "Position": {
            "X": 7,
            "Y": 32
          },
          "SetProperties": {
            "Action": "Bed YonaKao.ChoiSanMod.San"
          }
        }
      ]
    },```
#

Action Bed does not set a bed for an NPC, it lets the player sleep in that bed

ivory plume
potent vigil
potent vigil
latent mauve
#

If you intentionally take the same spot as the Morris NPC, anyone using that mod as well as yours will have mod incompatibility issues. Please use the Google Sheet to mark and use the coordinates for an unused room if you want to be cross-compatible, that's why it exists.

#

Your NPC does not have to be at release stage to mark a room on the sheet, but you should avoid trying to use a room someone else has already claimed.

ivory plume
#

Yep.

potent vigil
latent mauve
potent vigil
latent mauve
#

(sorry, I tend to assume everybody wants to release their mods eventually, LOL)

potent vigil
wild viper
#

can anyone teach me how to make an unofficial update for an npc mod

ivory plume
lucid iron
#

!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:

lucid iron
#

Essentially need to do all the work of making new npc function, with existing assets like pixel art and dialogue

wild viper
lucid iron
#

Lotta work then

wild viper
#

orrrrr

lucid iron
#

Is the npc open permission

whole raptor
#

Just out of curiosity, it's already adjusted... why when an overlay extends the sheet it adds a weird after image? SDVpufferthink (Up - part of the sheet, down - extended)

wild viper
wild viper
#

wouldn't try it if it wasn't

potent vigil
#

I don't know what code I'm missing, I don't know what action I'm missing, I'm completely lost xD

ivory plume
latent mauve
#

Line 96

potent vigil
#

I think I mistook it for something else.

latent mauve
#

Were you trying to load an events json for your character?

calm nebula
#

They are not zeroed beforehand

potent vigil
#

I think I was trying to link events to content.

calm nebula
#

You get wherever junk happened to be in memory

whole raptor
#

Interesting SDVpufferthinkblob Fun fact to know

latent mauve
# potent vigil yes

okay, so first things first, can you share that JSON (assets/Events/ChoiSan.json) in the JSON validator?

calm nebula
#

( @ivory plume tbh extending spritesheets not zeroing out the extra space seems like undesired behavior.)

#

I feel like extending is a sufficiently slow behavior that zeroing is acceptable

potent vigil
lucid iron
#

Does it make sense to use overlay with extending?

whole raptor
#

Not really SDVpufferthinkblob

#

Since there's nothing to overlay in the first place

wild viper
#

how are you gonna play riley 1.6

ivory plume
fathom hound
#

is this another wiki error ?

calm nebula
latent mauve
# potent vigil https://smapi.io/json/content-patcher/6595ddd6e96e42199b5e8b6ab3e5b55b I may ha...

okay, so a few things to keep in mind with Events:

  • Events are stored in Data/Events/<location>.json, where <location> is the name of the location where the event is triggered or taking place in.
  • Each events entry needs to be added to that particular location's JSON file through an "Action":"EditData" block. If the entries are not in the same location, then you will need to make a different "Action": "EditData" block for each location that has new heart events in it.
  • Exceptions to the above are when the location is brand new/custom made for your mod, in which case you can use an "Action":"Load" block instead.
calm nebula
#

It's just whatever junk is in the shared array pool most of the time,

#

Is usually not the right width

#

I had some fun pictures

ivory plume
ivory plume
#

But each texture operation is pretty slow from what I can recall, so it may have a noticeable impact on mod performance depending on how it's implemented.

calm nebula
#

I feel like extending is already done sufficiently few times that it should be fine

#

Gosh, why can't I find my fun pictures haha

blissful panther
#

I feel like if anything, zeroing it might make it more difficult to spot the problem. I think I'd rather it be more obvious than not so it can be fixed!

uncut viper
#

isnt zeroing it the fix?

lucid iron
#

Maybe just note to not use overlay like that on the docs?

#

If i had a 16x16 and wanted to overlay it with a 16x32, I can just do 2 editimage for my niche case

ivory plume
#

Extending a spritesheet should create an empty area, it's not really an issue with overlaying.

lucid iron
#

Or ig, do not support overlay with extending together with note on why

#

Assuming it is a serious performance problem I mean

potent vigil
latent mauve
#

If nothing else is wrong with your Data/Characters entry, your portraits, or your sprites, your NPC should be able to spawn in town.

#

If you still don't see the NPC, check in the SMAPI console log to see if there are still errors.

fathom hound
#

can anyone else not log into stardew valley wiki rn?

latent mauve
#

I was getting a 503 error when searching about an hour ago, so it's been struggling

acoustic summit
#

Yeah for me its been since last night

fathom hound
#

RIP

acoustic summit
#

It sometimes works, sometimes goes 503 then works after like 3min, and sometimes just refuses completely

fluid swan
lucid iron
#

What do u want to know

#

Ppl here might remember

fluid swan
fathom hound
#

-# real i could probably help SDVsobastian

#

this morning it bugged out on mobile ios

#

but its fine now

#

just cant log in

calm nebula
#

( @upper lava wiki is sad apparently)

fluid swan
#

it was just basically fish that ive been non stop searching, ive been on a fish grind for some reason

fathom hound
ocean sailBOT
fluid swan
upper lava
calm nebula
#

Thank you!!!!

sour sleet
#

Can you have more than one ID in the FishAreaId field?

brittle pasture
#

no, but if you need the same fish in two areas simply add two entries

potent vigil
#

!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:

rigid musk
#

For the night market - is the schedule indicator like the desert festivals or is it just the day?

#

i.e. is it 'winter_15' etc or is it something like 'NightMarket_1'

odd ginkgo
#

Hi! So I'm making an event that has a fork on a temp map - it seems like I need to add the fork to the Events/Temp, but I'm not sure how. Reading LemurKat's guide, there's this line: "If the map is a temp map, you need to add the forked path to “Data/Events/Temp”"

#

what would the format for that be? edit data and entries? or?

rigid musk
#

Thank you :D

calm nebula
#

(Both will work. For historical reasons the game does not)

urban patrol
rigid oriole
#

potentially a very specific question, but does anyone know if ANY sounds in stardew are directional audio? e.g. serpents spawning in skull cavern

lucid iron
#

I can't say i ever noticed any

rigid oriole
#

it looks like playsound takes a position hmmm

lucid iron
#

There's sound that gets louder when closer (brook sounds)

rigid oriole
#

the real quesiton is can i filter for references that don't use the default param values

#

ok the answer is "yes some sounds are directional but it's very case-by-case" (and bats/serpents spawning are not one of them)

clear oxide
#

so ive been working on my mod all day ( Capture Slimes & Evolve Slimes & Fight with Slimes )

#

not sure what else to add to it

brittle pasture
#

can I use "#0" as the key in Entries

#

context: working on mod compat and I want to delete one of the entries here

spice inlet
brittle pasture
#

I'm guessing not, in which case I'll fallback to Condition FALSE

ocean sailBOT
#
scorpio4071 aka Scorpio

1131803171631673454

Level

1

Total XP

320

Monthly XP

0

Roles

Mobile, PC/Mac/Linux, Villager

Created

<t:1689913304:D>

Joined

<t:1736603869:D>

lucid iron
#

Pretty sure when u use a key on a list it just tries to find the index anyways

#

Idk if deleting works, but as you said condition FALSE

brittle pasture
#

hmm, I asked because I only see it mentioned/used as part of TargetField so I know that works, I just don't know if Entries key work

lucid iron
#

Target field is just drill down to different entry tho DokkanStare

#

But what r u gonna do to verify what u delete is right thing

brittle pasture
#

nothing

calm nebula
#

Clearly delete it alllll

brittle pasture
#

I'm tempted to just wipe the entire list and recreate it myself

rigid musk
#

Is there a way to make configs go into a bigger menu (i.e. you click on a section and it opens up the list of options) without C#

#

If I have to have an industrial sized config thing that's okay, but it would be far neater if i could do that

lucid iron
#

I could maybe make that happen DokkanStare

rigid musk
lucid iron
#

It'd be a PR to content patcher tho

#

So the current stage answer is no

rigid musk
#

It'd be pretty neat, I know a few mods do it (but they use C#)

#

I can't remember the one's off the top of my head though

whole raptor
#

DSV has like the perfect config

lucid iron
#

CP's config schema has to support these things and it doesn't rn

rigid musk
#

I like configurations so much but also I feel like people find looking at my literal list of options a bit annoying if they're trying to find something - even with the sections I have

lucid iron
#

Oh nomori i made a poc

whole raptor
#

I need it SDVpufferblob

lucid iron
#

its got a lot of limitations tho

#

no tokens

#

and no real support for layout monS

whole raptor
#

Would be cool if it refreshed after option is changed, not only on save, but I'm guessing that's part of the limitations 😅

lucid iron
#

yep

whole raptor
#

Hmm... would we need tokens in config? SDVpufferthink

lucid iron
#

well u cant do {{Season}} in the preview target in this tossed together impl

#

one elaborate™️ way to use this is to make entire targets for sole purpose of previewing

whole raptor
#

Ah, I guess that might be annoying, but definitely still doable with workarounds

lucid iron
#

i would like to make it nicer but i am unsure if i wanna go all complex option i this kyuuchan_run

#

it is using the gmcm AddImage thing hence why theres not much u can do

#

*about how to position the image

whole raptor
#

Still pretty neat

lucid iron
#

adding support for pages would be a lot simpler tho

#

it'd be same thing as section more or less

whole raptor
#

Oh? 👀

#

Now tell me HasMod conditions are also simple and I'll be in heaven SDVpuffersquee

lucid iron
#

something something invariant conditions kyuuchan_run

#

gotta make them truly invariant and contextless somehow

calm nebula
#

HasMod is special

lucid iron
wild viper
#

I would like to download these npcs can anyone tell me where they’re from

lucid iron
#

you are in the wrong channel

lucid iron
lucid iron
odd ginkgo
wild viper
lucid iron
#

this channel is for making your own mods

golden basin
lucid mulch
# whole raptor Now tell me HasMod conditions are also simple and I'll be in heaven <:SDVpuffers...

In one aspect, HasMod is very simple, its simply an immutable token that contains all the loaded mods.

However, a bunch of other Content Patcher mechanics special case it, so if you use a mod provided token like SpaceCore, and SpaceCore isn't loaded, CP will error out and say the token doesn't exist even if a different condition would make it not run.
But theres a special case where if HasMod is used, it will always run first, and if a HasMod check is in place, CP will ignore errors about the token being missing.

golden basin
#

do they only spawn at a certain time?

lucid iron
#

what flavor are you trying to use Bolb

#

there's the tile data which is always spawn

#

or the various actions to spawn them

golden basin
#

im wanting them to always be spawned

lucid iron
#
{
  "Action": "EditMap",
  "Target": "YourMapTarget",
  "MapTiles": [
    {
      "Position": {
        "X": 31,
        "Y": 30
      },
      "Layer": "Back",
      "SetProperties": {
        "mushymato.MMAP_Critter": "Firefly T 8"
      }
    }
  ]
}
#

should just be like this then

golden basin
#

hm thats what it looks like

lucid iron
#

T means default color, 8 means number

golden basin
#

oop just fixed it

#

XD

lucid iron
#

yay

golden basin
#

hmm one issue though, i have multiple spots defined and its only spawning in one spot is that normal

lucid iron
#

that seems odd, by multple spot you mean they r on different tiles right

golden basin
#

they are yeah they seem to be spawning at differen times actually which is fine i like that

lucid iron
#

blobcatgooglyblep that is even more odd, it should spawn once when you enter the map

#

i wonder if its to do with map edits and the caching i did

golden basin
#

well what is happening is they are changing spots with each map load

lucid iron
#

how many EditMaps do you have targeting this particular map?

golden basin
#

only one edit

#
      "Action": "EditMap",
      "Target": "Maps/{{ModID}}_OldGraveYard",
   "MapTiles": [
        {
          "Position": {
            "X": 38,
            "Y": 32
          },
          "Layer": "Back",
          "SetProperties": {
            "TouchAction": "mushymato.MMAP_Critter Firefly T 8"
          }
        },
         {
          "Position": {
            "X": 28,
            "Y": 15
          },
          "Layer": "Back",
          "SetProperties": {
            "TouchAction": "mushymato.MMAP_Critter Firefly T 8"
          }
        },
         {
          "Position": {
            "X": 9,
            "Y": 74
          },
          "Layer": "Back",
          "SetProperties": {
            "TouchAction": "mushymato.MMAP_Critter Firefly T 8"
          }
        },
          {
          "Position": {
            "X": 35,
            "Y": 82
          },
          "Layer": "Back",
          "SetProperties": {
            "TouchAction": "mushymato.MMAP_Critter Firefly T 8"
          }
        }
      ]
    },```
lucid iron
#

oh u r using touch actions

#

so then when u step on the tile they spawn, is that the desire?

golden basin
#

Ooooo that makes sense im dumb

lucid iron
#

i mean i think it'd be cool

#

thats why i added it Dokkan

golden basin
#

so remove touch action !

lucid iron
#

yea use mushymato.MMAP_Critter as the property name for the always spawning version

#

args are the same

golden basin
#

hell yeah thank you so much

lucid iron
#

i dont think i'd want to wipe config value just cus some mod not installed anyhow

vernal crest
wild viper
#

Oh yeah I dmd you earlier lol

rigid musk
#

would adding a token like {{season}} to a warp property in tiled work pondering

lucid iron
#

no

#

do it in EditMap instead

rigid musk
#

That... yeah

trim sand
#

god that sticker is gold.
also i thoroughly regret looking into custom farm maps. painpika

rigid musk
#

if i want a map patch to apply randomly how exactly would I go about doing that? (either with a dynamic token or just a when condition i dont mind either, I'm just not sure what type of thing I would need to do for that to happen)
I checked out the Query expressions and that seems promising

lucid iron
#

what is the desired rate of Random here

#

random at day start?

rigid musk
#

Yes

#

:]

lucid iron
#

u can use Random + Range in the cond

rigid musk
#

Could you imagine if I said hourly... or every in game tick

#

horrifying

#

What... would that look like e_squinting

#

Not the updating thing that frequently - that would be awful

#

I think I just confused myself actually

lucid iron
#

well u know how content patcher things update on day start normally

#

the condition u use would be Random: {{Range: 1,10}} | contains=2 or smth?

#

i feel like query's gotta go in here somewhere but i dont recall offhand

rigid musk
#

"Query": "{{Random:{{Range:1, 10}}|contains=1,5}}", ?

lucid iron
#

do u want it to be 20% of time

rigid musk
#

im know how to do math (sometimes) - im going to increase the range if this is the actual way to do it I just wanted to see if this was... accurate

#

also i just learned what the heck %/modulous meant which makes how his dynamic token for his schedule works make so much sense now

ivory plume
#

Like this should work:

"When": {
    // 20% chance (random number from 1-10 is <= 2)
    "Random: {{Range: 1,10}}": "1, 2"
}

Or like this:

"When": {
    // 20% chance (random number from 1-10 is <= 2)
    "Query: {{Random: {{Range: 1,10}}}} <= 2": true
}

(The first one is more efficient, you should avoid Query if you can.)

rigid musk
#

SDVpufferheart thank you!

ivory plume
lucid mulch
#

(it could also be "Random: {{Range: 1,10}}": "{{Range: 1,2}}" if you wanted the percentage chance to be a single value)

calm nebula
#

(You could also simplify)

#

"Random: {{Range:1,5}}":"1"

ivory plume
#

(You could simplify further if you want.)

"Random: {{Range:1,5}}": 1
lucid mulch
#

Range is a deterministic token, and giving it string literals will bake its value into the string, so theres no fear for using it if you were previously willing to type it all out explicitly

lucid iron
#

say is there nuance between using properties vs using fields for data model

#

im very inconsistent about it LilyDerp

#

auto generated props like { get; set; } i mean

tiny zealot
#

i was gonna say a property with private get; doesn't get serialized

brittle pasture
#

properties are probably easier to create an API for

ivory plume
#

The distinction matters for public APIs, but they're essentially interchangeable for internal config/data models. Technically a field is very slightly more efficient, and a property is more conventional.

lucid mulch
#

The main difference between a field and a property, is that the property can do logic in the get/set flows.

lucid iron
#

ig i should just not use them until i need to do something in the setter/getter

calm nebula
ivory plume
#

If it's a public data model which external C# code may need to reference, you should always use a property; that lets you change the implementation internally without breaking callers (e.g. if a future version of the mod adds a new way of doing things and you want backwards compatibility).

lucid mulch
#

(That is why the auto generated backing field is so useful in C#, it makes the effort to just always be properties near zero)

calm nebula
#

A simple property like {get;set;} in my experience is almost always inlined

lucid iron
#

some of my data models have silly abstract class stuff happening so it'd be pain to convert them into public interface blobcatgooglyblep

#

oneday™️

brittle pasture
#

I will (also) allow banishing the wabbits to where they truly belong

lucid iron
#

righting the farm animal kingdoms

ornate locust
#

Be hard to fit an ostrich into a coop door if you were really gonna right the animal kingdoms there

lucid iron
#

no we have ostrich tardis technology

#

they swooce right out

trim sand
#

if i recall Selph already fixed that

brittle pasture
ornate locust
#

Oh sweet

#

though I will still imagine them getting onto their bellies and scooching through

#

my cat used to climb under my bedroom door like a fluffy pancake, like that but ostrich

lucid iron
#

say how widely used is the advanced api for content patcher tokens Bolb

#

im wondering about the ramifications if the implementation did change rn

ivory plume
#

It's unlikely that the overall API will change, but it's quite possible that something may change with how tokens work under the hood that affects your tokens' implementation.

#

The basic API lets Content Patcher handle the details; the advanced API is "trust me I got this" mode.

lucid iron
#

oh yea pathos the access the api instructions should be updated in token-strings-api and conditions-api

#

it has the old hard reference instruction

lucid iron
ivory plume
#

I never tested that the whole API works well with Pintail, but if it does I could update the docs.

lucid iron
#

selph said it does, i havent tried personally NotteThink

ivory plume
#

Pintail does open some possibilities for input argument handling; I'll need to test at some point whether we can map Content Patcher's internal InputArguments type to mod types.

lucid mulch
#

Debugger can now show updated token values as they change.
VSCode is smart enough to highlight the updates SDVpufferwow

lucid iron
#

i did need to remove using ContentPatcher.Framework.Tokens.ValueProviders.ModConvention; to make it work

#

and ig the required dependency is still enforced

brittle pasture
#

@trim sand the new Extra Animal Config release with ItemQueries is out, which should make your life easier SDVpuffersquee

#

chu if you're lurking I had that C# API as well. Unfortunately I had to abandon the plan of exposing everything because of ABI compat

trim sand
#

Much Appreciated. I'll eventually convert my stuff to that.
Currently in the nightmare of custom farm maps

lucid iron
#

oh so i just get the list and resolve it myself right

#

thats sufficient for my needs, what's a mod that uses this DokkanStare

brittle pasture
#

uhhh 0, maybe 1 when Silver's modifications for Pokemon Ranch comes out

lucid iron
#

wait i thought there was a chimkin

#

omni chicken

#

i cant find it tho rip

brittle pasture
#

oh yeah, the ultimate chimken. but bea hasn't released it on Nexus yet

lucid iron
#

oh ok i guess ill just make the omni cow then DokkanStare

#

hm with this + peliq

#

i can make a cow that drops every kind of wag booba tea

#

i forgor if wag still has boba tea

brittle pasture
#

it does

uncut viper
#

one snail sashimi boba tea please

brittle pasture
#

jail

uncut viper
#

(:

rigid musk
#

Sounds delicious... SDVpufferfear

trim sand
trim sand
# brittle pasture uhhh 0, maybe 1 when Silver's modifications for Pokemon Ranch comes out

Admittedly also there's a lengthy conversion on my end to make my pokemon ranch stuff a separate content pack rather than hacking directly on the original devs work goal is first to get it working the way I want. Which the new queries stay does simplify my treasure digging fix. Which I admittedly still haven't confirmed if works (probably doesn't due to me using the friendships query wrong or something)

#

Suppose it probably also helps me fix the madness of Lechonk/meat forager queries. Since this utilize weighted/conditional options.

little steeple
#

Do you guys know why smapi crashes when I run the Object Allocation Tracking tool on Visual Studio's profiler?

#

Like, I'm using the Profiler to check for memory allocation and get this error on the console: Fatal Error. Internal CLR Error. (0X80131506)

lucid iron
#

does it still explode when you have zero mods

little steeple
#

I mean... when I debug my code with the profiler there's no problem, it works fine with the Memory Usage tracker, but not the Object Allocation tracker.

lucid iron
#

yea i was wonder if it is strangeness with harmony/transpilers/cecil

little steeple
#

My code doesn't use Harmony, but I think I should try to profile after removing all the other mods.

lucid iron
#

yea cecil is something smapi itself uses, to rewrite mods

little steeple
#

Is that so? Then I guess it's okay, I was just wondering why it happens.

lucid iron
#

i don't actually know if this is the cause though, just speculating

sour sleet
#

I've set Outdoors to true on my cave map but it rains inside and is unrealistic. Problem is, when I put Outdoors false, the water looks strange and my seasonal tilesheets have stopped working. How do I make it so that everything is treated as outdoors other than the weather?

lucid iron
#

TreatAsOutdoors

#

[[modding:maps]]

sour sleet
#

I saw that but it said it's for coal and the lights so I wasn't sure it would work

#

Will try it now!

lucid iron
#

im not sure if it does anything about tilesheets hm

#

looking at decompile i dont think seasonal tilesheet cares about outdoors anyways

sour sleet
#

Is it true or T? T doesn't seem to be working

lucid iron
#

anything

#

water is a different map prop, indoorWater

sour sleet
#

Oh ok. Doesn't seem to be acting how I want unless I put Outdoor T. But I don't want the weather inside haha.

#

Ooo good to know

lucid iron
#

but yea im pretty sure season tilesheets dont care

#

thats how ppl make those seasonal greenhouses

sour sleet
#

The issue is the base game tilesheets. It stays on the spring one all year when it's not Outdoors T

indigo yoke
#

anyone have a link to the 1.6.15 migration guide? need to figure out why custom machines stopped working for mods

lucid iron
#

wiki is having a time sadly

indigo yoke
#

I found the 1.6 migration guide on the wiki but googlefu is having issues finding the 1.6.15 specifically

lucid iron
#

you would need the 1.6.9 migration guide

#

what is your specific problem?

indigo yoke
#

I already updated to 1.6.9 before taking a break for a few months.

lucid iron
#

then i don't think there's been that much change

#

hence no guide

indigo yoke
#

I remember there was talk of custome machine code getting an extra variable or something in 14 to 15

sour sleet
lucid iron
#

i dont think it got any changes

sour sleet
#

Turns out it does lol. Why isn't it changing with the seasons?

lucid iron
indigo yoke
sour sleet
#

Noooo

rigid musk
#

y

#

oops

#

Y'know I thought I was fine using the mines tilesheets cause they were in the maps folder.. I was wrong

sour sleet
#

Well if I change it to Outdoor T, is there a way of preventing weather in that location?

rigid musk
#

Spacecore

#

I think

sour sleet
rigid musk
#

Or making it a desert location even if it isnt the desert perhaps

mighty ginkgo
#

probably can use CP's {{Season}} token to get the right tilesheet?

lucid iron
#

might need to make a location context Dokkan

stone crypt
lucid iron
#

doing a direct season edit works too yea

#

if its entirely your own tilesheet

sour sleet
#

Thanks everyone, will try that tomorrow. Super late and I need some sleep now lmao

rigid musk
#

Also have good rest

sour sleet
#

Are you using mine.png as the tilesheet?

#

Or a different mine tilesheet

rigid musk
#

well im using mines_desert but I just did that but with Mines/mine_desert.png

sour sleet
#

Hmm that should work. What's SMAPI saying?

lucid iron
#
<tileset firstgid="1" name="cave" tilewidth="16" tileheight="16" tilecount="320" columns="16">
    <image source="Mines/mine_lava.png" width="256" height="320"/>
</tileset>
#

i did this b4 and it worked

rigid musk
#

Oh I forgot to do it for the other one sorry

lucid iron
#

make sure your map is loaded to Maps

rigid musk
#

(i have two maps using it)

#

I only edited one ... I am very smart

sour sleet
#

Haha I do stuff like that all the time. Hope it works for ya SDVpuffersquee

rigid musk
#

considering my SMAPI console is no longer bathed in the red of errors... I think it did

dreamy owl
#

Fo s anyone have a good video tutorial for making portrait mods

#

?

indigo yoke
#

hmmmm

#

artifact restoration table seems to be working with just the archaeology mod alone.

lucid iron
#

conflict then DokkanStare

indigo yoke
#

does MachineOutputDelegate have to be labeled like that? atm I have mine labeled as output cask and it works alone

lucid iron
#

labeled?

indigo yoke
#

ugh, finding what mod is messing with the tables is going to be a pain in the behind

#

i'll do that tomorrow

old edge
#

does farm type manager accept a green rain weather value?

#

after so many tries finally got green rain weather to occur with my mail flag.

rigid musk
#

pondering in the conditions maybe

#

(i cant reference the wiki but it uses CP conditions in one section so you could do a weather condition for green rain if that exists)

#

wiki broken rn

#

is there a reason why tiles aren't playing the correct sound when you walk over them? even if you gave them the 'type' property?

old edge
#

yeah I'm not sure if it does need to check ftm wiki

#

but at least got the green rain to be forced. What could be the implications of this?

round ermine
#

Green, probably.

rigid musk
old edge
#

hmm there's also a game state query but it doesn't say if green rain is a possible value ```json
WEATHER <location> <weather>+ The weather ID in the given location. The <weather> can be one of Festival, Rain, Snow, Storm, Sun, Wind, or a custom weather ID.

#

if I put rain would it count still?

#
 "ExtraConditions": {
          "Years": [],
          "Seasons": [],
          "Days": [],
          "WeatherYesterday": [],
          "WeatherToday": [
            "GreenRain"
          ],
          "WeatherTomorrow": [],
          "GameStateQueries": [
    "WEATHER Custom_CapeCavingSecretroom GreenRain"
],
          "CPConditions": {
            "HasSeenEvent": "orb_hint_mossy"
          },
          "EPUPreconditions": [],
          "LimitedNumberOfSpawns": 1
        },
        "DaysUntilSpawnsExpire": 0
      },
spring marlin
rigid musk
#

Is there a way to make it so that an item can only be bought from a shop once?

blissful panther
#

As in one-time per save, not just per day?

#

I imagine you might be able to use ActionsOnPurchase to a add a mail flag to indicate the item's been purchased, and then PerItemCondition to add a GSQ to only allow the item to be sold if that mail flag isn't present?

rigid musk
#

Ah the wiki finally loaded, i see what you mean! that's perfect yeah

blissful panther
#

Oh, I got lucky with the wiki then!

rigid musk
#

yeah it's being a little fussy right now, it loads sometimes and then other times does not

golden spire
#

give it a cookie

spring marlin
lucid mulch
#

there is nothing in stardew to prevent that

#

stardews netcode isn't designed to handle race conditions

#

you can also simultaniously have house upgrades going, duplicate items off tables, duplicate mine rocks, etc

spring marlin
#

would "AddMoney -{{LocalToken}}" work in a field i can put a trigger action in?(so if LocalToken is 50, then remove 50 money)

lucid mulch
#

sure

brave fable
rigid musk
#

specifically these ones, i have them set as type dirt but walking over them doesn't make any noise. I also have them set to diggable which DOES work so i'm a bit confused about that

brave fable
#

is the tile property assigned in the tileset? what's the property key and value exactly?

rigid musk
brave fable
#

im not sure if it's case sensitive、but you could try with all lowercase. does it match vanilla dirt tiles?

#

actually i thought dirt was the default. also is your volume turned up high enough to actually hear it hahah

blissful panther
#

(Looks like vanilla does have it capitalised, at least.)

rigid musk
#

Also vanilla does have it capitalized, I also have it capitalized on my custom tilesheets and those work so it's odd

brave fable
#

ah right. i'm quite a long way from my computer atm so i can only guess without the wiki

blissful panther
#

I don't suppose you remember the sound cue it should be for walking on dirt?

brave fable
#

dirtyStep ?

#

again just a guess、the footstep sound cue names are completely inconsistent

blissful panther
#

Yeah, it's not that... there's dirtyHit, maybe that could be it?

brave fable
#

the only ones i remember by name are sheep and throwDownITem

#

yeah that's the one, I was about to suggest that too but couldn't remember the name

rigid musk
#

grassyStep

#

wait do grass and sand/dirt have different sounds

#

i never listened intently enough

blissful panther
#
switch (stepType)
{
case "Dirt":
    this.currentStep = "sandyStep";
    break;
case "Stone":
    this.currentStep = "stoneStep";
    break;
case "Grass":
    this.currentStep = ((Game1.currentLocation.GetSeason() == Season.Winter) ? "snowyStep" : "grassyStep");
    break;
case "Wood":
    this.currentStep = "woodyStep";
    break;
}
brave fable
#

absolutely

blissful panther
#

Yeah, dirt is sandyStep.

brave fable
#

i hate it

rigid musk
#

it does have a different sound my god

blissful panther
#

Oh, wait, this might be it.

#

This is all wrapped in:

if (Game1.currentLocation.IsOutdoors || Game1.currentLocation.Name.ContainsIgnoreCase("mine") || Game1.currentLocation.Name.ContainsIgnoreCase("cave") || Game1.currentLocation.IsGreenhouse)
brave fable
#

you ask the person without a computer for the cue ID While you have the decompile open. is this a test

blissful panther
#

So the map either has to be marked as outdoors, contain mine or cave in the name, or be a/the greenhouse.

#

I was still hunting for the relevant code at the time, and that would've made it faster! SDVkrobusgiggle

rigid musk
#

So the location has to have one of those properties in order for the sound to actually play?

blissful panther
#

It would seem so, yeah.

rigid musk
#

e_squinting that's ... interesting

#

I wonder how the inside of houses work then

brave fable
#

it needs it in the name, ie. ModId_mycoolCave

rigid musk
#

for the wood step noise

blissful panther
#

I assume inside defaults to wood. Lemme see...

#

Oh, it actually seems to default to thudStep.

rigid musk
#

it does, in fact, do that. I never thought about it because qi's room was carpeted and i didnt really care ... this displeases me

blissful panther
#

Full relevant snippet:

if (Game1.currentLocation.IsOutdoors || Game1.currentLocation.Name.ContainsIgnoreCase("mine") || Game1.currentLocation.Name.ContainsIgnoreCase("cave") || Game1.currentLocation.IsGreenhouse)
{
    string stepType = Game1.currentLocation.doesTileHaveProperty((int)tileLocationOfPlayer.X, (int)tileLocationOfPlayer.Y, "Type", "Buildings");
    if (string.IsNullOrEmpty(stepType))
    {
        stepType = Game1.currentLocation.doesTileHaveProperty((int)tileLocationOfPlayer.X, (int)tileLocationOfPlayer.Y, "Type", "Back");
    }
    switch (stepType)
    {
    case "Dirt":
        this.currentStep = "sandyStep";
        break;
    case "Stone":
        this.currentStep = "stoneStep";
        break;
    case "Grass":
        this.currentStep = ((Game1.currentLocation.GetSeason() == Season.Winter) ? "snowyStep" : "grassyStep");
        break;
    case "Wood":
        this.currentStep = "woodyStep";
        break;
    }
}
else
{
    this.currentStep = "thudStep";
}
rigid musk
#

time to change the internal name of my location I guess pensiveclown

brave fable
#

oh you don't have to do that

#

just change your username to cave and it'll fix allllll your maps using ModId

rigid musk
#

😭

#

AngelOfCave...

brave fable
#

i can just imagine someone called Cavelier or Glucosamine looking at ur problem and going 'works on my machine??'

blissful panther
#

Glucosamine is a hell of a username, though.

brave fable
#

i'm sure it wouldn't be the strangest SDVdemetriums

inner harbor
#

can you add an object and a conversation topic to a letter?

frozen apex
#

Can I add trigger actions to any other files than content.json?

inner harbor
#

afaik the only thing you can't add on Includes is Tokens.

#

and Format

frozen apex
#

Cool, thanks man

calm nebula
#

Some of my letters have like four items

shadow pagoda
#

Unsure how viable this is, but has anyone ever tried to make unit tests for any of their mods?

lucid mulch
#

Anything that goes in the Changes array can be in Includes

#

Format, ConfigScheme and Dynamic Tokens which don't go in the Changes array are content.json exclusive

shadow pagoda
#

Also is it possible to breakModEntry.cs into partial class, or will that mess with the SMAPI?

calm nebula
#

you can use partial classes

#

at least someone (linkoid?) made a testing framework

#

tbh I've never used it;

urban dome
#

mods are too much for me

clear oxide
#

is there a way to make a custom monster ?

clear oxide
#

had to hard code it

patent lanceBOT
gaunt orbit
#

How sketch would it be if I put automate integration in a separate dll and then just used Assembly.Load when automate is installed

tiny zealot
#

unsure, but maybe the security thread will have opinions

lucid iron
#

Isn't that just what ppl do but as their own mods

tiny zealot
#

does it noticeably improve perf and/or mem to do so?

gaunt orbit
#

Well the main reason to use it wouldn't be perf, since that's going to be similar to emitted code anyways, but it would be way more maintainable to have plain code that references automate than the current clusterfuck of reflection and delegates I'm using

calm nebula
#

It mostly makes working with foreign assemblies not suck

#

You can hard reference automate types without crying

gaunt orbit
#

I don't see it as a security flaw, though, because you can load arbitrary assemblies anyways just by referencing them

calm nebula
#

And yeah, it's a reasonable idea SDVpufferheart

lucid iron
#

Well I don't really think it's any different than PFMAutomate and CustomBushAutomate besides you loading it vs SMAPI loading it

#

And it wouldn't be hard to switch to making it full mod if needed

tiny zealot
#

(it seems fine to me, too, but i thought i remembered loading external assemblies as an API that could get shuttered)

calm nebula
#

(And making it easier for users)

#

It seems fine to me too but I know pathos might cut that off in the future

gaunt orbit
#

If that does happen I will probably make a request for some kind of module system to have smapi handle it

lucid iron
#

The future is years away i wouldn't worry about it

brittle ledge
#

@ivory plume Hi Pathos! I have a feature suggestion for Lookup anything if you'd be willing to consider it. Could we have Lookup Anything display the item's internal ID even if dev mode is off? It'd be useful for the casual user to be able to figure out better what mod an item is from if it's not using {{ModId}}.

lucid iron
#

I asked for that b4 kyuuchan_run

#

Maybe i should just PR it

drowsy pewter
#

I'm looking at RSVs location data for the village and it seems like ArtifactSpots is blank? does this mean it doesnt create any artifact spots up there? or does it return some default loot table? Im wondering if I should patch in an item to the loot

calm nebula
#

Default loot table

#

There is a default location iirc

drowsy pewter
#

got it

#

I wonder if patching in a single item means that it will ignore the default table and only return the one item though

#

Hm

ivory plume
drowsy pewter
#

Thank you Pathos!

ivory plume
lucid iron
#

But if you have the qualified form, the unqualified form is contained already

ivory plume
#

Yes, but that requires players to know about the 'qualified' or 'unqualified' form in the first place. If they don't, they'll just type that qualified form into a field that expects an unqualified form, and be confused about why the item ID isn't working.

calm nebula
#

What in player space deals with unqualified ids?

ivory plume
#

Mod configuration for example (e.g. Tractor Mod's list of custom attachment items could use item IDs). I think it'd be unrealistic to expect every mod to properly handle both qualified and unqualified item IDs, so the user may need to try both in cases like that.

gaunt orbit
#

Maybe have only the unqualified id listed, and then a 'item type qualifier' or 'item type prefix' that shows just the qualifier?

#

Unqualified ids work anywhere qualified ones do so long as they're not overlapping, so doing it this way might minimize errors and confusion?

ivory plume
#

Unqualified IDs often work for code that expects a qualified ID, but not always. For example, anything that uses it as a key (e.g. Data/Machines) may just ignore unqualified IDs. Though not sure if any of those scenarios would necessarily affect players.

gaunt orbit
#

Hm, that is a good point

uncut viper
#

what about displaying unqualified at first but swap to qualified on hover

ivory plume
#

I'd probably err towards showing both in some user-friendly form.

Not necessarily like this, but something along the lines of...

Item ID
Pathoschild.CentralStation_Ticket

Globally unique form ("qualified ID"): (O)Pathoschild.CentralStation_Ticket

lucid iron
#

But u can't copy from LA anyways

#

Unless that is something to be added here

ivory plume
#

No, but users can still type IDs. For example, if they wanted to add a custom tool to Tractor Mod, they'd type the tool ID into the config field.

lucid iron
#

Yeah i mean it can just be displayed in simpler way like
(O)Pathoschild.CentralStation_Ticket

#

If the player has to hand write it regardless

ivory plume
#

It'd be nice to avoid a new translation string, but not sure if it'd be clear to players that represents two different formats (so they can try both if they need to enter it somewhere)?

calm nebula
#

Yeah, I was gonna suggest a pale grey (O)

blissful panther
#

I feel like that might not get across to the user that you can (sometimes) leave out the qualifier, though.

calm nebula
#

Dunno, i think modders should just use qualified ids SDVkrobusgiggle

#

But I'm also just evil

fathom hound
#

Could I mod something in like this with CP?

#

Someone brought it up & I really like it SDVpufferwow

lucid iron
#

Yeah there's a framework

fathom hound
#

Ooo! Is there already a mod like this?

ivory plume
#

You could add the building and interior with Content Patcher, but the actual dust spirit logic would need C#.

fathom hound
#

I’d love to make some cute monster buildings for my wilderness farmer

lucid iron
fathom hound
#

Thanks! SDVpufferwow SDVpufferheart aSDVpuffercute aSDVemoteheart

lucid iron
#

I think the example pack includes dust spirits

fathom hound
#

Thanks all SDVpuffersquee SDVpufferthumbsup

clear oxide
#

Anyone know how to do custom mobs without hard coding ?

fathom hound
brittle pasture
#

if you wanna spawn reskinned monsters with their own stats, textures and loot pool you can use FTM

fossil osprey
#

There was a custom monster framework made by spacechase in 2022, but it appears it doesn't work in 1.6

brittle pasture
#

you can go a long way with reskins (flying monsters with bats, collision monsters with shadow people, etc.)

#

completely new AI needs C#

calm nebula
#

(Tbh the idea of custom monsters with custom logic without c#...)

brittle pasture
#

you can look at SVE, RSV or most expansion mods out there for examples of dungeons that adds their own monsters and loot

tawny ore
#

Monsters the Framework was a sound concept, but perhaps too intermediate for content creators to understand. It implemented state machines and had enough functionality to replicate/customize the same behaviors as vanilla monsters.

tiny zealot
lucid iron
#

What if we just let ppl write lua for monster ai

clear oxide
golden spire
#

Toast Munch Framework

brittle pasture
tiny zealot
golden spire
#

nom

rare orbit
#

quick question?? how can i convert mods made for more grass to content patcher?? more grass lags for alot of people and i see alot of grass made for more grass i wanna use but cannot

lucid iron
#

You can't rn

#

Besides overwriting all grass

#

I have a wip but it's not ready

#

And needed different format anyhow

rare orbit
#

huh cool cool

#

i was wondering since like i said i've seen some nice grass retextures but more grass lags and i believe it's broken

fathom hound
#

hi! does this mean any dangerous variant can drop galaxy souls?

fathom hound
hard fern
#

What about more grass is broken

fathom hound
rare orbit
hard fern
#

Ive never heard anyone complain of more grass lagging 🤔

rare orbit
#

yeah but i think it depends on your computer too

#

yes stardew isn't powerful like say baldurs gate 3 but modded stardew can be still demanding

fathom hound
# fathom hound

@calm nebula sorry for the ping, i just trust you the most in code diving, please let me know for future reference if this isn't okay with you! think wiki might need another revision

hard fern
brittle pasture
fathom hound
fathom hound
rare orbit
#

trust me if i knew i would tell ya

brittle pasture
#

hmm
so internally the Quarry is mine level 77377

fathom hound
brittle pasture
#

I suppose so lol

fathom hound
#

huh okay, ill add a discussion then

#

ill put discussions on both pages

#

thanks selph!!

hard fern
fathom hound
#

in quarry level or otherwise?

brittle pasture
#

only dangerous monsters I think
I checked and the Quarry can apparently spawn dangerous Skeletons at any time

#

since 1.6

#

no need to toggle on dangerous mines or skull caverns

#

and Galaxy Souls can drop from any dangerous monster

#

IMO the wiki definitely needs clarification on that front, but do get a second opinion

fathom hound
#

okay so big slimes can definitely have it if you see it in them, but the rest of the dangerous variant monsters are able to drop them right? it seems like the galaxy soul page itself needs revision in general from looking at the discussion page

#

yeah definitely, i wont change anything just wanna make sure the discussion i send has as much info as possible!

#

thanks for all your help!

calm nebula
#

Yeah, that I think is a 1.6 change - before you only got dangerous monsters when the dangerous mines were active (in vanillla)

#

Now you can get them regardless

fathom hound
#

@upper lava im sorry for the ping but im getting constant Error 503 Backend fetch failed errors, and dont want this information getting lost in the abyss SDVpufferthumbsup [[Skeleton_(dangerous)]] needs galaxy soul added to the loot table please

galaxy soul page could also use revisions on the fact that any dangerous variant monster can drop them regardless if dangerous mode is toggled from a 1.6 change

fathom hound
#

-# i think im only getting these errors when i try to send a discussion page

round timber
#

a Mon schedule is higher priority than spring right?

sour sleet
#
                        {
                            "Id": "{{ModId}}_CaveWeather",
                            "Weather": "Sun"
                        }
                    ]```  Trying to make it always sunny in this cave and it still displays other weather. Is this part correct?
fathom hound
#

since all the dangerous monster variants dont show in their loot tables that there's a chance for galaxy soul to drop

hard fern
woeful iron
#

Okay, finally am undergoing my first mod versus just planning and jumping around. Adding a fish using the tutorial on the wiki

#

Nice and doable, nothing weird

round timber
latent mauve
#

The way the vanilla LocationContexts are structured implies that it checks first in the list and then keeps going until it finds a match.

#

^ I read both messages and got confused, but this one is meant for @sour sleet

sour sleet
latent mauve
latent mauve
#

And does your location data set it to use that location context value, or does it use Default?

woeful iron
#

Okay, I've added the fish as an object, and as a fish, now I want to have it be sold at pierre's... How do I add a fish to a store?

I looked here:

https://stardewmodding.wiki.gg/wiki/Category:Content_Patcher

but not seeing anything about adding to store inventories

Stardew Modding Wiki

Content Patcher is a framework created by Pathoschild that allows you to edit the game's images, data, and maps without needing programming knowledge. Features such as conditions, tokens, and configuration are supported but completely optional. See the mod author documentation for a more in depth guide on creating a content pack for Content Patc...

sour sleet
latent mauve
woeful iron
#

Oh, I was on the other wiki

#

hmm... how would I look up willy's shop id?

#

Probably makes sense to sell my fish there.....

latent mauve
brittle pasture
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!

woeful iron
#

This is the example of code they give

        {
            "Action": "EditData",
            "Target": "Data/Shops",
            "TargetField": [ "FishShop", "Items" ],
            "Entries": {
                "(O)219": null,
                "Example.ModId_Pufferfish": {
                    "Id": "Example.ModId_Pufferfish",
                    "ItemId": "(O)128",
                    "Price": 2000
                }
            },
            "MoveEntries": [
                { "Id": "Example.ModId_Pufferfish", "BeforeId": "(O)685" }
]}
#

So looks like that's pretty much what I want

latent mauve
#

Just remember, you have to write out your ModId if you edit the map property in Tiled to something named with a {{ModId}} token

latent mauve
#

Alternatively, you can just add it through a CP patch with EditMap and MapProperties and then use the token. (I'm lazy so I do this for warps)

woeful iron
#

Seems to have the ids

#

Is there a way to smell check your content patcher mod without launching the game?

lucid iron
#

Smell check?

woeful iron
#

Right. For example, check json file syntax. Check for violations of the CP's API/usage.

#

linting

lucid iron
#

!vscjsonc

ocean sailBOT
#
How to make VSCode not scream at json comments

In Visual Studio Code, go to File -> Preferences -> Settings, then search for "associations", and in the "Associations" setting, click the Add Item button to add an item with key *.json and value jsonc (see image).
If you are making a content pack for Content Patcher, you should consider using its json schema so that VSCode can tell you if your patches are valid, you simply have to add

"$schema": "https://smapi.io/schemas/content-patcher.json"

at the start of your content.json file.

lucid iron
#

Put the schema in

golden spire
#

I smell check my dinner

woeful iron
#

Brilliant! Thanks!

#

Worked like a charm, immediately spotted an out of date version

#

Aww, that's all it caught.

#

Maybe I wrote it perfect the first time 😉

#

I imagine it's the ids that I've messed up, not sure if there is a way to verify that ahead of time

latent mauve
#

Honestly, part of why you were directed to unpack is that it's way easier to check for the IDs in the source json files. And copy/paste them to your code if needed. 😛

woeful iron
#

Thank you

#

To be truthful, I was reluctant because I was set up for that and I accidentally blew it all away thinking I didn't need it anymore... about an hour before

#

Okay, so my mod adds a new fish and puts it in a store. If I have the mod locally and I join my friend's server without the mod, what will happen?

#

I know they wont get the mod

#

but in terms of how things behave on my end

#

if I even see the mods effect

latent mauve
#

It's generally ill-advised since it can cause problems later on if you introduce an item into a save and not everyone has access to the item data.

golden spire
#

and you can easily use a mod launcher such as Stardrop to have a vanilla profile and various modded profiles

latent mauve
#

But most likely it'd show as an error item for them if you were able to get it at all

#

If you don't want to use a launcher, you can also just add a . to the front of the mod folder to have SMAPI ignore the mod

woeful iron
#

Thanks for the info 🙂

#

Just better understanding the system through an unexpected case

#

I have successfully added an item to the fish shop!

#

Sweet, and the description is there!!!

#

Buuuut the sprite didn't load it looks like, hmmm

#

Anyways, back to hacking away at this. Thanks again!

woeful iron
#

Okay, so there must be a way to improve my testing workflow. To test if I have the texture configured correctly, I'm waiting until 9am when the fish shop is open, and looking at the inventory

#

But there's a big wait

rigid musk
#

debug shop fishshop

#

or use CJB cheats to change the time

woeful iron
#

hmm... "ConcernedApe: Nice try..."

#

Where am I entering the debug command?

calm nebula
#

The smapi console itself

woeful iron
#

Unknown command debug

rigid musk
#

do you not have console commands installed

#

it comes with SMAPI itself

woeful iron
#

huh, strange. There are commands I can execute, for sure

#

in SMAPI itself

rigid musk
#

there are commands from stardew and then there are A LOT more from console commands - if its not recognizing debug then you don't have console commands

#

console commands :)

#

ignore content patcher

woeful iron
#

Ah. Okay. So it doesn't come automatically with SMAPI I have to install it separately?

latent mauve
#

It does come automatically with SMAPI when you install it

woeful iron
#

I got the mod working! I'm so excited. The colors in the sprite seem paler....

latent mauve
#

But you might have deleted it by mistake

woeful iron
#

Oh, that checks out

#

hmm, no I have it

latent mauve
#

SaveBackup and ConsoleCommands are both added when you run the SMAPI installer

woeful iron
#

Version 4.2.1

#

Yeah, it's in my mods folder

#

Both

latent mauve
#

Which OS are you on?

rigid musk
#

it should do something like this before opening the shop...

woeful iron
#

"[SMAPI] Unknown command 'debug': ...."

latent mauve
#

Part of the Mac issues we were having with SMAPI may have ended up giving you an older version of the two mods if you backed up your mod folder first and overwrote the newer versions of Console Commands and SaveBackup, so I figured I would check to make sure that wasn't the case here

woeful iron
#

Ah. For reference, I'm on Linux

latent mauve
#

Rerunning the SMAPI installer should put Console Commands back where it needs to be.

woeful iron
#

and have copied this folder back and forth between windows with things getting replaced here and there.....

#

Okay, thank you

latent mauve
#

Anytime you are moving mods like that, there's a risk that you'll skip replacing a file or accidentally replace a file with an older one

woeful iron
#

Definitely. I want to setup some kind of central versioning, but that's a project for another day

#

I'm so thrilled I got my little mod working

#

It introduces an Axolotl that can be purchased from willy. That's about it at this point, but I hope to make it an aquarium pet

rigid musk
#

I love Axolotls :D

woeful iron
#

Yay!

#

Do sprite images undergo any significant re-processing? Colors seem paler than what I put in there, but I'm not the artist

latent mauve
#

Not necessarily, but Stardew vanilla coloring is super saturated/high contrast

#

So if yours were not saturated enough or didn't have enough contrast, they can look washed out by comparison

woeful iron
#

Thank you so much. I read this to the artist.

#

They made an acknowledgdement sound of understanding and continued farming

#

Thank you for helping support this project 🙂

distant radish
#

Hello guys! How do you check the PLAYER_STAT GSQs? I thought it was done by using debug getstat <PLAYER_STAT>, but all of them return 0

#
[game] The '<otherPreciousGemsFound>' stat is set to 0.
[Console Commands] Sent debug command to the game, but there was no output.
debug getstat <beveragesMade>
[game] The '<beveragesMade>' stat is set to 0.
[Console Commands] Sent debug command to the game, but there was no output.
debug getstat <copperFound>
[game] The '<copperFound>' stat is set to 0.
[Console Commands] Sent debug command to the game, but there was no output.```
woeful iron
brittle pasture
#

on the wiki <> means "required parameter" and [] means "optional parameter", you're not supposed to literally insert them

clear oxide
#

getting closer

distant radish