#making-mods-general

1 messages · Page 515 of 1

tiny zealot
#

yes. are your locations actually flagged as indoor/outdoor correctly?

#

alternately it could be a precedence problem actually maybe not

woeful lintel
#

same precedence

hallow prism
#

i'm not sure how it works if the dialogue is the continuation of it

woeful lintel
#

Also the only way I found how to check the appearance ID they use is to scroll past all their dialogue in the lookup anything menu

#

that's a bit annoying

tiny zealot
hallow prism
#

i wonder if with the e break the dialogue is already loaded and the portrait set?

woeful lintel
#

how do you warp an NPC? I had to wait for them to exit the sjop...

hallow prism
#

debug wctm npcname

hard fern
#

(warp character to me)

woeful lintel
#

here's the patch export for the specific appearance btw:

      {
        "Id": "Winter_Indoor1",
        "Condition": null,
        "Season": "Winter",
        "Indoors": true,
        "Outdoors": true,
        "Portrait": "AnimePortraits/Abigail/Winter_Indoor1",
        "Sprite": "Characters/Abigail_Winter",
        "IsIslandAttire": false,
        "Precedence": 0,
        "Weight": 1
      },
      {
        "Id": "Winter_Outdoor1",
        "Condition": null,
        "Season": "Winter",
        "Indoors": true,
        "Outdoors": true,
        "Portrait": "AnimePortraits/Abigail/Winter_Outdoor1",
        "Sprite": "Characters/Abigail_Winter",
        "IsIslandAttire": false,
        "Precedence": 0,
        "Weight": 1
      },
tiny zealot
#

check your bools there for indoor/outdoor

woeful lintel
#

wht

#

oh my god

tiny zealot
#

you have Indoors: true and Outdoors: true for both

hallow prism
#

also i would suggest remove the null fields as it is easier to read stuff

woeful lintel
#

I wrote Outdoor and Indoor in my patch (forgot the 's')

#

I hate that

hallow prism
#

(ah it's the patch export, so you can't remove the null there 😄 oops)

woeful lintel
#

Also I just now realized that I might not be able to fully rely on appearances: I have 2 pairs of indoors/outdoors, but the random choice might missmatch them...

#

I think the solution is to randomize the load?

#

is that efficient

hallow prism
#

which random choice?

woeful lintel
#

well, I have 2 pairs of portraits for winter with the same precedence so that the game randomly chooses which one to use on day start, but it can choose indoor1 with outdoor2, which I don't want

hallow prism
#

then you may need some synced random

woeful lintel
#

so I'd have to make a single appearance pair with the asset "Winter_Outdoor" and "Winter_Indoor" (with no number) and have a CP random choice choose to load either version 1 or version 2 in them on day start

hallow prism
#

rather than relying purely on precedence

#

synced random

woeful lintel
#

can you sync random in the appearance system?

hallow prism
#

look at gsq page on the wiki

#

i don't see why not

woeful lintel
#

with gsq? hold on, I'll look that up

#

So I'd have one pair with SYNCED_CHOICE day winter_key 1 2 1 and the other with SYNCED_CHOICE day winter_key 1 2 2, is this correct?

hallow prism
#

yes

woeful lintel
#

I'm assuming I can use a CP token in here too, since I'm using localtokens to make a template, I'll make SYNCED_CHOICE day winter_{{Name}}_key 1 2 1 (or 2)

hallow prism
#

it should work

woeful lintel
#

nice!

urban patrol
#

no, use spacecore tile action to run a manual trigger action with multiple actions instead (this is what i’ve been struggling with this week so i have many examples if needed)

lucid iron
#

Ik BETAS and MMAP both have similar kinds of crimes

urban patrol
#

perfect, three whole cakes

subtle condor
#

Hey guys, does anyone know if there is a way to edit/add totem's warp properties? I added a totem that teleports to my own map and for now, I only have a workaround via C#, where it warps me manually to that place. But in that case, it doesn't have the typical warp totem effect. I am also thinking about replacing the location for the beach totem, so the problems are kinda related

#

*with location I meant just changing the tile, so still on beach

hallow prism
#

you can with spacecore

#

the benefit of using spacecore instead of C# are for you to decide however

#

not sure about what could work on vanilla totem however

brittle pasture
#

if you're already in c# you can do anything

#

if you wanna change where the vanilla totem goes to you'd patch the relevant code

hallow igloo
#

if East Scarp hasn't done a Load action for a tilesheet, is there a way for me to access it anyway?

subtle condor
brittle pasture
#

look at Object.totemWarpForReal

subtle condor
subtle condor
brittle pasture
hallow igloo
#

all of these

hallow prism
#

no, if it's not loaded explicitely one way or another, you can't, to my knowledge

#

lemur may be open to doing that if there's a request however

brittle pasture
#

yeah it would make recolors possible as well

#

but yeah for now i dont think you can do much

woeful lintel
#

is there a way to test island beach sprites with debug commands?

#

because wctm applies the summer appearance I defined

hallow prism
#

they need to change at the change cabin i believe to equip them

#

i'm not sure how you can test them, at some point people used GIMA for that

woeful lintel
#

I guess I can trust the Load into Portraits/{{Name}}_Beach, it's simple enough, although I don't know if the game adds _Beach to the NPC's default portrait or the current/summer appearance

hallow igloo
#

I compromised and used the default dessert mines

#

oh actually

#

bang, I now have a two tile tilesheet for this dumb cave lmao

hallow prism
#

maybe it's a smart cave that is just shy

summer spoke
#

how do you find the names of sprites? like, I changed the person from Vincent to Abigail because she has the one I'm looking for, but I can't find out its name. Like I managed to find an example that let me turn it into Mara's clinic outfit, so I know it works.

hallow prism
#

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

lilac scaffold
#

has anyone else received reports lately that chrome is blocking their mod from being downloaded from nexus and getting flagged as a dangerous file?

hard fern
lilac scaffold
#

Anything to do to get users unblocked or get the file unflagged? Because right now users can't do manual downloads if it gets flagged by their browser

tiny zealot
#

i guess you could petition google about it, but realistically no, not that i'm aware of

summer spoke
#

I'm sorry, I'm still confused. I got to Content Unpacked, but all I'm getting are the sprites themselves. Are they numbered instead?

hard fern
summer spoke
#

You see that last one? I want to use that sprite first and then make it look like she's sleeping in the clinic afterwards, but I can't even get the current sprite I'm working with to so much as close her eyes

#

Wait, is it okay that I copy and pasted that? I'm sorry

hard fern
summer spoke
#

Yes, I'm testing an event out and writing them down before I put myself to the test by using custom NPCs

hard fern
#

ah, then you can just use an event command to show a specific frame.

#

[[Modding:Events]]

#

ohchgh

#

[[Modding:Event_data]]

summer spoke
#

alright, thank you I appreciate everyone's help

subtle condor
#

Alright, so, I now found everything that I needed to add all the code for my own warp totem. I would just like to know, what is generally recommended in a situation like this. So in order to make my own warp totem work, I could either copy the decompiled code to have the same effect, or could I maybe add into the decompiled code the case for my own totem. It would be generally a pretty small edit, it would literally just be "case:MyCustomTotem" and then everything should work the same way. But I don't know how. So I am generally curious, what other modders would generally do in a situation like that, because I am guessing that both works

#

(The actual warping itself is separate, so the decompiled code is just for the whole animation thingy)

brittle pasture
#

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

tiny zealot
#

^ you will want a patch of some kind

brittle pasture
#

(but also consider just using spacecore)

subtle condor
subtle condor
#

Okay, the wiki says "Harmony should be a last resort", I'm just copying the code for the animation XD and look into spacecore XD

tiny zealot
#

(the wiki is overly aggressive about discouraging harmony, imo)

#

using spacecore is just using harmony with more (fewer?) steps /lh

subtle condor
#

I guess ite depends. Just adding the case for a totem should be pretty safe I guess, it is just wayy more dangerous, when you change other crucial code. Messing with the original code is always dangerous XD

tender bloom
subtle condor
tender bloom
#

Harmony has different levels of invasiveness

#

Postfixes do the least meddling, generally

tiny zealot
#

if you can do a postfix, and you almost certainly can for this, it's quite safe (not counting the unsolved AVE problem, which is not in your control anyway)

subtle condor
#

I'll try XD just need some time to understand harmony XD

tender bloom
#

I’d recommend looking at some mods that use it in addition to reading the docs, to really illustrate what it says

autumn tide
#

thought i might forward this here!

subtle condor
#

Nah, screw harmony, I'll just copy the 8 9 lines for the animation XD I am barely getting into C#, I'll go to harmony patches when I really need it, but for now, naaah XD

brittle pasture
#

if you don't use harmony you can probably get away with input events (user pressed button when holding item)

subtle condor
#

Yeah, that's exactly what I've been doing so far XD

maiden citrus
#

hi does anyone know why this code wouldn't work?

#

private void Test(object? sender, UpdateTickedEventArgs e)
{
if (!Context.IsWorldReady)
return;

        Game1.player.SetMovingDown(true);
        
    }
#

attempting to move the player just from the code

brittle pasture
#

i admittedly dont know what SetMovingDown does but have you confirmed the function is being run (via logging/etc)

maiden citrus
#

yeah i added a log before and after and its hitting both every tick

tender bloom
#

What does SetMovingDown do? Have you decompiled?

brittle pasture
#

seems like it just set your move direction? doesn't even change your sprite methinks

maiden citrus
#

yeah i think you're right

#

public override void SetMovingRight(bool b) => this.setMoving((byte) (2 + (b ? 0 : 32 /*0x20*/)));

#
        if (this.movementDirections.Count < 2 && !this.movementDirections.Contains(2) && !this.movementDirections.Contains(0))
        {
          this.movementDirections.Insert(0, 2);
          break;
        }
        break; ```
tender bloom
#

Moving the player isn’t a thing that happens normally, it really mainly happens during events, so I’d be suspicious of any functions behaving nicely when applied outside an event

#

It’s definitely possible (something has to turn mouse/button presses into movement) but it may not be straightforward to directly call

maiden citrus
#

yeah this is what i previously thought, no problem thank you for the help!

calm nebula
#

What are you trying to do?

uncut viper
# hallow igloo all of these

If you're okay with using some undocumented behaviour, you can use them in your map if you change their image source inside the .tmx to something like this, using the seashell_clutter.png tilesheet as an example:
../SMAPI/lemurkat.eastscarp/assets/Locations/Underground/seashell_clutter.png
This will make it load the asset from their mod folder

#

or a slightly more zoomed out snippet from the .tmx if it makes it clearer:

 <tileset firstgid="5464" name="seashell_clutter" tilewidth="16" tileheight="16" tilecount="100" columns="10">
  <image source="../SMAPI/lemurkat.eastscarp/assets/Locations/Underground/seashell_clutter.png" width="160" height="160"/>
 </tileset>
#

(obv the firstgid would be different for you in all likelihood thats fine tho)

uncut viper
#

Only in the latest SMAPI I should add

hallow igloo
#

well.. I've now done it this way

#

if it breaks at some point I'll change it lol

uncut viper
#

If any user is not using the latest version of SMAPI this will completely break

#

the "undocumented behaviour" part is that the SMAPI/lemurkat.eastscarp part of that asset name is what an Internal Asset Key turns into, thats how SMAPI manages private mod assets. you can technically access them any time, you just cannot edit them, and its not said anywhere that you can access it. so technically the format can change and in SMAPI 5.0.0 it might be SMAPI/managedassets/lemurkat.eastscarp/files/assets/Locations/... or whatever, but its unlikely

jovial dirge
#

Hi guys, I’ve finished my portraits and sprites, and I’m trying to follow the wiki to make my NPC appear in-game. I keep running into this problem. Both images are correctly placed in the folder. They are PNG files. I don’t understand what the issue is. [Content Patcher] Patch error: Teleport > Load Characters/Meroe has a FromFile which matches non-existent file 'assets\NPCs\Meroe\Sprites.png'. [Content Patcher] Patch error: Teleport > Load Portraits/Meroe has a FromFile which matches non-existent file 'assets\NPCs\Meroe\Portraits.png'.

hallow igloo
#

good motivation for them to update

uncut viper
#

Just make sure you set the required SMAPI version in your manifest SDVpufferthumbsup

hallow igloo
#

oh no wait

#

I didn;t actually read your message

#

oh but I think I guessed correctly anyway actually

uncut viper
#

(reason for asking: if not, then that may indicate that your sprite file is actually Sprites.png.png secretly)

hallow igloo
#

that's such a good potential catch

jovial dirge
ornate locust
#

patch working without extra patch only dependencies

uncut viper
#

id just like to point out that was always possible with ATA /lh

jovial dirge
jovial dirge
# uncut viper ~~id just like to point out that was always possible with ATA /lh~~

Is this enough for him to appear? {
"Action": "Load", "Target": "Characters/Meroe", "FromFile": "assets/NPCs/Meroe/Sprites.png" }, { "Action": "Load", "Target": "Portraits/Meroe", "FromFile": "assets/NPCs/Meroe/Portraits.png" }, { "Action": "EditData", "Target": "Data/NPCDispositions", "Entries": { "Meroe": "adult/male/neutral/shy/0/0/SaturnCultureClub/spring summer fall winter 600 SaturnCultureClub 33 10" }

uncut viper
#

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

uncut viper
#

im not free enough to provide much help rn but the guide in that first bullet point will be very helpful

#

if you are following a different guide currently, its very very outdated

#

Data/NPCDispositions doesnt exist anymore

#

!json (also in the future when sharing json you should use the json uploader)

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.

pale river
#

how do I toggle cheats? Like debug teleport

uncut viper
#

console commands are always available as long as you have the Console Commands mod installed, which comes with SMAPI

#

if you no longer have that mod, reinstall SMAPI

pale river
uncut viper
#

no slash

#

commands dont have slashes in the console

#

allowing them in the in game chat does require something or whatever that i dont know how to enable probably 👍

lucid iron
#

Or does it work anywhere as long as u have a Load bolbthinking

uncut viper
#

this only works because of the new SMAPI update that lets you use any image in the content pipeline as a tilesheet

#

internal assets are still technically available in the content pipeline via the internal asset key format

lucid iron
#

Oh i mean the SMAPI prefix thing

uncut viper
#

thats just how SMAPI does internal asset keys

lucid iron
#

But i have realized where my confusion lie

uncut viper
#

any asset name prefixed with SMAPI/ is an internally managed asset that only SMAPI itself can edit. why does SMAPI load mod files to those internal assets in the first place? idk. ask Pathos i guess. i imagine its better than loading them from IO every time

lucid iron
#

Hm then what stop u from EditImage those

uncut viper
#

SMAPI does

lucid iron
#

Weh

uncut viper
#

it specifically will check for the managed asset prefix (SMAPI/) and then return the asset before running any editors

lucid iron
#

Back to sadness very big i guess

uncut viper
#

i coulda sworn id talked to you specifically even about the consequences of patching this function to not block you from editing them SDVpuffersquee

uncut viper
#

if its a file in their mod folder you can grab it, so long as the place you're using it in accepts an asset name

indigo yoke
#

okay I am curious cause this is the 2nd time it's happened. Is something up with nexus donation points?

I averaged 60k per month for like 3-4 years. Then like 5 months ago it got cut in half to 30k.

then again this month it went down to 15k. Monthly downloads have remained relatively stable. actually slightly up in the last 2 months because I released some more mods to help get the numbers up.

uncut viper
#

nothing has changed with donation points since they changed their algorithm

whole raptor
#

@fathom hound This is what I use for GMCM recolor compat

// GMCM - buttons
{
            "Action": "EditImage",
            "Target": "Mods/GenericModConfigMenu/ConfigButton, Mods/GenericModConfigMenu/KeyboardButton",
            "FromFile": "assets/{{Target}}.png",
            "When": {
                "HasMod": "spacechase0.GenericModConfigMenu"
            }   
},```
If the asset name hasn't changed this should work if you have the files matching the path and names
fathom hound
#

Thank you kindly SDVpufferheart

lucid iron
hallow prism
#

mods are slightly less rewarding for me over months but i didn't see such a decrease

lucid iron
#

Tho it's definitely less dp/udl than nov and oct so they probably tweaked the parameters or whatever

ornate locust
#

It's always kinda variable, that's why non-Fallout mod numbers tanked when the new Fallout show came out

#

It's part of ad revenue, so it's based on where the site gets traffic or something

indigo yoke
#

and that "other games might have became more popular, and more modders are opting into the donation pool"

lucid iron
#

They have basically said they want to keep the maffs secret

ornate locust
#

Yeah, that last bit is tied to what I was saying. It's some fraction of ad revenue, so it's partially tied to where they get traffic on the site

indigo yoke
#

that's one reason I asked here, because if other games did become more popular, then others here in stardew would have also saw a hit as large. but if others haven't then it's just like /shrug?

lucid iron
#

So i doubt you get much answer from anyone else here SMCPufferjail

uncut viper
#

i think a lot of people also forget that they said the algorithm takes into account unique audience interaction as well

uncut viper
#

i.e. even if you release a bunch of different mods, if its generally the same set of people downloading your stuff, that counts for less

#

10 mods with 10k UDLs each is worth less if 9,000 of those people are all the same for every mod

whole raptor
#

Hmm I did get 40% less DP in December compared to June, while the udl were mostly the same

indigo yoke
uncut viper
#

no, thats a separate thing

indigo yoke
#

like a person releasing 10 different skin packs that could have easily just been 1 mod

ornate locust
#

That's just the part that's re: fighting DP farming

uncut viper
#

thats not related to the algorithm, thats just related to DP farming

ornate locust
#

Also looking in the past, my numbers have always dropped a bit in December for some reason

uncut viper
#

also i would fully believe that more modders are opting into the pool. we've all seen the amount of AI slop being put on stardews page recently. imagine how many other vibe coders are releasing slop for every other game and taking a cut of the pie?

ornate locust
#

unpopular modding month I guess

whole raptor
#

If a mod has a requirement that is also your mod, you're getting less DP too

urban patrol
#

speaking of are you guys able to see UDLs in your reports?

whole raptor
urban patrol
#

ok wasn't sure if i was missing smth lol thanks

uncut viper
#

one AI mod getting a couple dozen/hundred UDLs in itself isnt gonna take up a lot of the DP. but hundreds of AI mods each getting a couple dozen/hundred UDLs...

#

and thats just for stardew

indigo yoke
indigo yoke
uncut viper
#

i mean, you said yourself other people you saw have gotten large cuts

ornate locust
#

ngl I don't think most people watch their DP stuff like a hawk, seems like a good way to go crazy

lucid iron
#

My dp/udl went
Oct: 2.35
Nov: 2.28
Dec: 2.00

#

I assume dec is just that fallout show s2

indigo yoke
ornate locust
#

That'd be a good explanation

lucid iron
#

That nexus promoted with events on main page and everything

ornate locust
#

Because S1 wrecked the WHOLE SITE

#

and they didn't even promote it, it just happened

ornate locust
lucid iron
#

I like the numbers going up and down but i don't take the dp so it's not important really

ornate locust
#

I'm unemployed, so I'm absolutely taking the DP, but I have seen too many good modders fry themselves focusing on it to pay that close attention

uncut viper
#

(same relative decrease)

whole raptor
lucid iron
#

Yeah at least it's not just one person

ornate locust
#

The Fallout S2 is a pretty solid explanation, MAN the numbers went haywire when S1 came out

whole raptor
#

When did S1 came out again? SDVpufferthinkblob

ornate locust
#

On top of the servers just exploding because even the backups they arranged got overloaded

#

April 2024

indigo yoke
whole raptor
#

Oh yeah, it did cut my DP by 40% then too

ornate locust
#

Yeah that was a whooole thing

#

Even my download numbers on my Fallout mods went up, and they've been out for ages

whole raptor
#

Tbh I also got swept in that and played modded out Fallout 4 for the first time SDVpuffersquee

ornate locust
#

I remember being like "man people sure are commenting on my Fallout stuff all of a sudden- OHHH right"

pale river
#

someone tried using ai to make a reverb sound mod for another game, but it literally made up fake locations + it was only dependent on the y coordinate for some reason. I wanted to make a similar one for stardew, but I think it requires completely overwriting the sound engine of the game which sounds like a lot of issues SDVpufferflatbread

devout otter
#

What is a reverb sound mod? /gen

pale river
# devout otter What is a reverb sound mod? /gen

basically sound physics. I was inspired by the one in minecraft, but for stardew, I feel like it would just be adding reverb to caves and dungeons. I was going to base it off how rain indoors sounds different than outdoors, but that's ambient/background sound and not the other type of sound effects. It would involve stopping how the original sound engine worked sadly, which causes a lot of issues

devout otter
urban patrol
devout otter
devout otter
urban patrol
#

yep!

pale river
devout otter
#

(I'm sure I've actually done this with BETAS when I tried to make portraits for Central Station happens...)

urban patrol
calm nebula
#

I thought the sound system supported filters

pale river
devout otter
pale river
calm nebula
#

Ie, how the game handles muffling for rain

pale river
urban patrol
#

it definitely supports reverb, if it's this you're talking about

glossy cargo
#

Can someone explain this? Is this a bug?

#

(The special orders board's hover action seems to care about the daily help wanted quest state, and not perform correct hover stuff when there isn't a daily quest available...?)

lucid iron
uncut viper
#

why would vanilla transpile itself

lucid iron
#

Oh i mean like if boxosoup wanted to make this reverb mod

pale river
uncut viper
#

from the last time i messed with audio i think i remember seeing stuff about reverb but you had to get like distressingly far into the Cue itself

pale river
lucid iron
#

Well no cus it's a harmony patch

#

Decide what audio cues you wanna take over (possibly all of them) and patch stuff to change how it work

pale river
uncut viper
#

well that specific property is from the AudioChanges thing nic posted

lucid iron
#

I don't really know what reverb sounds like in game though

uncut viper
#

theres just more Secret Settings you can access if you dont care about trivial things like "access modifiers"

#

and "guard rails"

calm nebula
#

The music system in stardew is fairly custom iirc

pale river
lucid iron
#

The field use reverb comes from the game's custom data model so I'm guessing your question is more where does the value go

uncut viper
#

Xact stuff does use the reverb and I presume it does something otherwise why would it exist in the library

#

but you're not gonna be in stardew's namespace anymore if you go looking

pale river
#

maybe I'm looking at the wrong documentation for Xna 😔

uncut viper
#

Microsoft.Xna.Framework.Audio.SoundEffectInstance.ApplyReverb()

lucid iron
#

Are u looking at monogame docs or something else

uncut viper
#

this is as far as i understand here be dragons

pale river
#

😭 bruh when I look for XACT reverb it says page doesn't exist

uncut viper
#

i think part of the difficulty here is its my undersanding (which may be wrong) that XNA from microsoft like... doesnt exist? anymore? the XNA that this is using comes from monogame or something. but iot uses the MS namespaces for backwards compat

#

but i dont know much about things

calm nebula
#

Do not look at the XNA docs

#

Stardew works off monogame + a bunch of custom changes

pale river
#

it makes me wonder if the game already applies reverb to sounds inside dungeons, just really minimal

uncut viper
#

this reverb stuff isnt from stardew though its from the monogame stuff

calm nebula
#

No, button, stardew has edited monogame

#

The monogame packaged with stardew is a fork

pale river
#

SDVpufferflatbread honestly trying to use the monogame method sounds a lot more complicated than the "just replace all the files when ur in a dungeon", other than it probably will be more compatible with mods with custom sound effects. Not even sure how to go about it

uncut viper
#

well either way then there is stuff for reverb in here

pale river
lucid iron
#

You can't replace audio cues in the middle of a game

#

AudioChanges is special snowflake

#

So yeah decide where to patch if u wanna make this Dokkan

pale river
#

😔 you mentioned replacing cue calls, and it would be simple if the logic could just be "if in dungeon play this or not" but I don't think locations in stardew work that way

calm nebula
#

I've always suspected you could subclass Cue

#

(Don't kill me)

#

(Actually what am I saying. You can kill me)

#

I'll just come back stronger

lucid iron
pale river
lucid iron
#

This thing doesn't replace cues in game either it just makes them use a different cue if it exists

#

And only specific cues

#

For the broad usage u want I'd patch somewhere deeper into the sound library

#

But i never noticed what reverb even sounds like Dokkan

pale river
lucid iron
#

There is inside and outside actually

calm nebula
#

And Cave is easy enough tbh

lucid iron
#

There's no cave though that's true

pale river
#

but you don't want to make lewis' house super echoy

pale river
lucid iron
#

But u can just have it be some location custom field

#

I know enough about various pieces to know how it might work but audio stuff is cursed and i don't wanna touch it myself

pale river
#

SDVpufferflatbread yeah I think I see why nobody has tried to attempt this

#

relooking at the way it plays sound locally, I think it's too cursed to try

calm nebula
#

Try it anyways

autumn tide
pale river
# calm nebula Try it anyways

SDVpufferwaaah I don't even know where to start, I think I got the logic down, but in practice SDVpufferpensive it's like trying to put a piece of bread in a toaster without knowing what the toaster looks like. I don't even know where the sound cues for like breaking rocks comes from

#

I wish it was just as simple as replacing sprites when you move into a new area but music files SDVpufferpensive

#

unlike sprites and stuff it's all located in a bank instead of separately so I'm probably going to have to see how other people were able to replace the files

brave fable
#

no particular map property tricks or anything, just hardcoded

pale river
tender bloom
#

Harmony is only slightly cursed

#

But yeah it lets you stick you grubby paws into the middle of the game code

#

It’s very fun, and slightly risky as far as game crashes go (you can take precautions to minimize)

#

I would describe it as letting you stick little bits of code into the game in specific prescribed locations

#

Basically right before/right after a function runs, although if you get very into Harmony you can also stick code into the middle of functions (that’s where things get tricky)

jagged void
#

Can anybody help with a small graphics issue I'm having on one of my mods?

I'm trying to draw a background behind a textbox but it always seems to draw the gfx on top of the textbox, even though I've tried changing the draw order and later depth, I'm a little stumped

ivory plume
#

The fun bit is that the layer depth mostly doesn't matter because of how the game draws to the screen. (Instead of having one sprite batch, it's constantly opening and closing batches throughout the draw cycle.)

So generally you need to...

  • draw your new sprite before the game draws the textbox;
  • or redraw the textbox on top of it;
  • or patch/override/circumvent the game code to change what it draws.
calm nebula
#

(+ menus are typically BackToFront anyways)

lucid iron
#

generally the answer is harmony unfortunately

summer spoke
#

does anyone know which wiki has the emotes? I closed mine and can't find them anywhere

calm nebula
#

While you're here, @ivory plume , I swear you used to be able to control the order in which conditions got checked

#

In this case, the HasValue gates the EnableFor

ivory plume
#

Content Patcher conditions were never ordered. It's not really possible due to the underlying design, since updating the patch tokens (including in When) and checking the conditions is two different steps. The only exception is HasMod, which is special-cased to support integrations.

vernal crest
#

Having HasMod in a When field doesn't stop the other conditions from being checked - or am I misunderstanding you and you're not saying it does?

ivory plume
#

Content Patcher has special logic to check HasMod early (if it's immutable), which should skip the rest of the conditions without error if it fails.

vernal crest
#

It is not, because that same message that Atra linked has a HasMod check for Custom Tokens, which I did not have installed, but CP warned on the EnableFor token check.

#

(Also, I might be misremembering, but I think CP warns about CMCT tokens not being found if there's a CMCT token check in the same When field as the HasMod. We usually tell people to put the patch with the CMCT token check inside an Include, and put the HasMod check on the Include patch.)

ivory plume
#

Do you have a log with that error? (In that case it was validating the syntax when loading the patch info though, not checking the conditions.)

vernal crest
#

Not right at this moment but I'll run a cut-down setup and grab you one.

(Ah, okay!)

shut edge
#

there isn't some obvious way to have a BC machine show the color of the flavor item being processed right

#

like the machine itself changes blue while making ancient fruit stuff or such

#

like i know you can manually give it sprite indexes to change it per output rule but i don't think you can just give it one of those color mapped ones yeah?

brittle pasture
#

see the dye pot in Cloths and Colors for an example

brittle pasture
shut edge
#

ah neat, cool

#

i will probably not use it now since this mod is probably just about ready tho lol

#

perhaps in an update, good to know anyway

ocean sailBOT
#

Log Info: SMAPI 4.4.0 with SDV 1.6.15 build 24356 on Windows 10 (10.0.19045.0), with 74 C# mods and 18 content packs.
Suggested fixes: One or more mods are out of date, consider updating them

ivory plume
#

EnableFor is a config token, so Content Patcher is able to validate the format when it loads the patch regardless of whether the mod is installed. That error shouldn't happen if you were doing something like TheMightyAmondee.CustomTokens/AnniversarySeason |contains= for example.

That said, the error itself is weird; contains= should work fine with config tokens. SDVpufferthinkblob

vernal crest
#

I think it's because I don't have a spouse so the spouse token is empty. When I comment that patch out, I don't get warnings about any of the other patches which are also using contains with EnableFor.

uncut viper
#

(what did you mean by "which should skip the rest of the conditions without error if it fails" then if it still checks the other tokens anyway? what does it mean for HasMod to "fail"?)

ivory plume
#

Essentially the patch lifecycle has three steps for the purposes of this discussion: it's parsed from the raw JSON, loaded into Content Patcher's metadata, and applied at runtime. The special case for HasMod just lets you reference tokens from another mod, without getting no-such-token errors when the mod isn't installed. It's not meant as a get-out-of-jail card to disable all patch validation if the other mod isn't installed, since Content Patcher still needs to parse/load the patch to even get to the point of checking whether the mod is installed.

#

(Also I'm going by memory, I haven't worked on that particular code in ages.)

uncut viper
#

would it cause any issues to actually skip the rest of the condition parsing if the HasMod check failed due to the mod being missing?

ocean wave
#

shyPlead am i allowed to ask if someone can test my mod? steam is updating rn

uncut viper
#

since that would be an immutable thing that'd never change, i cant think of what the issue would be if you just then assumed the patch had a set of Conditions that was just "HasMod" that was false

#

since the other ones would nver be needed as the entire patch would never be applied

ivory plume
#

It'd be possible, but a bit counter to Content Patcher's design philosophy. It tries to detect and report issues ahead of time, to minimize cases where the mod author releases a version that works for them but fails for players (e.g. because all the errors were hidden by a HasMod condition). That helps keep mods more stable, since you can just launch the mod to test for the basic issues (instead of needing to test every permutation of config/mods/state every time).

So essentially validating the conditions (that aren't specifically related to the HasMod check like missing tokens added by that mod) is by design, though the specific error in this case is a bug.

lucid iron
#

can we get "unsafe"

uncut viper
#

thats understandable, and a similar philosophy that i had when making CMCT return false when checking the token validity if the mod isnt installed, as otherwise a typo would silently fail and leave a user confused why something wasnt working, though it does then cause this other workaround being needed of gating things behind an include as mentioned since theres no short circuiting

#

i guess theres not really anything wrong with that approach per se

#

it has come up a lot with people using it and getting caught out by it though since its a bit unintuitive

lucid iron
#

i should do the include for dynamic tokens at some point...

uncut viper
#

(to clarify: by "return false for token validity" i mean the like, ValidateInput check, not GetValues)

ivory plume
#

I'd be interested in seeing the various use cases for it; it's certainly possible we could extend the special case without disabling actual static validation.

tiny zealot
#

i like to gate groups of patches behind an include anyway, since then i don't have to repeat the (e.g.) HasMod a bunch of times

uncut viper
#

i initially started typing a reply to ask about the possibility of that, but then i wasnt really sure how that would look like with the custom token API

uncut viper
#

i also cant really think of a different use case than something like CMCT anyway

whole raptor
#

Yeah, I do have experience with CMCT token throwing errors if mod is not installed even if it's after HasMod, but that's because I use them in dynamic tokens. It's not really bothering me that much tho, since the weird workaround with Queries works

uncut viper
#

honestly thinking about it even though i think chu was joking with the unsafe thing i wonder if thatd be a viable solution as like a named/reserved arg for any token in general to say "if parsing/validating this token fails for whatever reason, just mark it as false and move on"

lucid iron
#

the vague ass idea i had is that u can use includes on jsons that only have "DynamicTokens" field

#

inside the dynamictokens section

#

and u have a very limited When u can use that's only hasmod (or other invariant tokens)

#

besides the cmct usecase, bigass dynamic tokens section is generally a problem for larger cp mods

whole raptor
#

That'd be very neat

uncut viper
#

i think there's room for both things, i think it could still be useful to mark tokens in general as safe-to-fail too, though i do think optional dyntokens is a much more important thing

whole raptor
#

Why just limit it to an include with just dynamic token field tho and not allow includes with both dynamic tokens and changes? Genuine question out of curiosity SDVpufferthinkblob

lucid iron
#

it'll be hard :)

whole raptor
#

Makes sense SDVpuffersquee

lucid iron
#

but mainly the include's position is important

#

in the Changes section where u put it is where the interior patches will get expanded to

#

and the order matters for patch priority

#

similarily u want the interior dts to live where u put the include

#

hence mixing doesn't make any sense

whole raptor
#

Ah, so the dynamic token include would be inside the dynamic tokens field?

lucid iron
#

yea

#

now it could be that u do write both fields

whole raptor
#

Okay, that makes full sense now

lucid iron
#

but you still have to include the same file in both dt and changes section

#

this seems confusing to me, so i feel being explicit about it (i.e. enforce only "DynamicTokens" ) is better

whole raptor
#

Yeah, it wouldn't really make sense to do it that way if it requires way more work

#

Plus I do have the same "compatibility dynamic tokens" I use for 2 separate mods, so having an include with just tokes would be better now that I think about it

sterile solar
#

The newest D/R added map tile reflections, so how do I directly add the property as a "Custom Properties" using tiled?

lucid iron
#

it shouldn't matter where tile props come from

sterile solar
#

I see I wanted to add it to cattails through the tmx file

sterile solar
#

Okay so I feel am close, after setting the name I use "ReflectableMapObject" and am set or is it something else?

#

or "DR_Object_Id"

shut edge
#

aaaa finally it's out

#

hopefully no huge missed issues

hard fern
#

jerky time

worldly vessel
#

Hello!! I was hoping anyone could help me with a problem I came by (as a very much newbie modder)

Currently I'm working on a mod using the HaveMoreKids framework (which I think is fairly new?) to make an adopt Morgan mod; However I'm having trouble with the mod recognizing Morgan as an NPC (it switches to the default baby sprite and behavior), and I just cant figure out what the issue is

If anyone has any idea on how to help, I'd be very grateful

devout otter
worldly vessel
#

Hi! I do not have LittleNPC mod installed, yes I do have lookup anything

#

Is probably very chopped, I'm throwing stuff at the wall lol;;

lucid iron
#

if u see this then it worked otherwise it didnt

#

oh yea another requirement is that the npc Morgan has to exist in your save

#

you should not need the Load to Characters/Morgan

worldly vessel
lucid iron
#

yea hm something is resetting the internal Name then

worldly vessel
lucid iron
#

can u sent your log?

worldly vessel
#

SMAPI log, right?

lucid iron
#

a second section u can check is down in the modData (need datamining fields)

#

every morning HMK attempts to restore the Name from Id

worldly vessel
ocean sailBOT
#

Log Info: SMAPI 4.3.2 with SDV 1.6.15 build 24356 on Microsoft Windows NT 10.0.26200.0, with 42 C# mods and 48 content packs.
Suggested fixes: One or more mods are out of date, consider updating them, SMAPI is out of date, consider updating it

lucid iron
#

hm it does look like it worked

#

- mushymato.HaveMoreKids@AdoptedFromNPC@Morgan: KidEntry { KidNPCId = Morgan, IsAdoptedFromNPC = True, PlayerParent = 6171025310727844127, OtherParent = NPC_ADOPT, BirthSeason = Spring, BirthDay = 9 }

#

as far as HMK itself is concerned this kid is NPC_ADOPT from based on Morgan

#

can u go turn on datamining fields in LA

worldly vessel
#

This is how it looks, if i search with look up anything "morgan" theres also the normal NPC morgan under it

worldly vessel
lucid iron
#

it's just config setting of lookup anything itself

#

hrm i wonder if Morgan's lack of Appearances is the issue bolbthinking

worldly vessel
lucid iron
#

oh AT is installed

#

those look like normal keys tho si prob not that yggy

#

ah yea i rmbr now i do in fact skip the reload sprite when no appearances (which has never came up as a problem for vanilla SMCPufferjail

#

lets just give them something real quick

worldly vessel
lucid iron
#
{
  "Action": "EditData",
  "Priority": "Low",
  "Target": "Data/Characters",
  "Fields": {
    "Morgan": {
      "Appearance": [
        {
          "Id": "Default",
          "Season": null,
          "Indoors": true,
          "Outdoors": true,
          "Portrait": "Portraits/Morgan",
          "Sprite": "Characters/Morgan",
          "Precedence": 0
        }
      ],
    }
  }
},
#

it's an HMK quirk that all custom kids must have at least one valid Appearance entry

devout otter
#

Oh, so to be sure, the problem was Morgan having no Appearance field?

lucid iron
#

and i completely forgot about that for the adopt from npc case

#

yea

#

its not anything to do with other mods or vanilla

#

just literal if (no appearance) { return; } Dokkan

lucid iron
lucid iron
pale river
#

on nexus how do I add what translations my mod has?

uncut viper
#

you dont

#

nexus does it if another mod marks themselves as a translation for yours

worldly vessel
devout otter
#

(Just give the language tag, not the Translation tag.)

pale river
#

SDVpufferheart thanks so much for everything, and the company

shut edge
#

is the panning / hat function hardcoded or something we can replicate?

brittle pasture
#

hardcoded yes

#

but if you know C# it's two functions to patch

shut edge
#

i don't but i know someone i can bug about it maybe

brittle pasture
#

fun fact, it's the same functions that allow wearing the trimmed purple shorts

shut edge
#

that makes sense

uncut viper
#

honestly probably easier to just watch for the click than use harmony

shut edge
#

actually maybe the stuff i wanted to do isn't that simple either, hm

#

was gonna attempt to make a food item also a hat that grants a buff

brittle pasture
uncut viper
#

that still seems like more work than "if you clicked the hat box, do this" which could make your whole mod into one line of code SDVpufferowo

#

plus you save the harmony warning

#

however this is very much like deciding which half of a double door to use

shut edge
brittle pasture
#

but it also handles rings, trinkets, boots, shirts and pants

worldly vessel
#

@lucid iron I tried running it through the mod's content.JSON (didnt work), but pasting it directly into Morgan's SVE code did the trick lol (I'm sure there's a better way that I didn't figure out), thank you so much! it works perfectly now ❤️

uncut viper
#

sure and that would make harmony better for a mod that adds multiple things
but overkill for somethin that adds one thing

#

it does make me wonder how difficult itd be to add special support for Item though to make it possible with BETAS Harmony SDVpufferthink

brittle pasture
#

and don't forget it also handles emily stripping you against your will at the desert festival

uncut viper
#

part of me has wanted to add support for reference types besides string even though i have no reason to

brittle pasture
#

and mannequins

uncut viper
#

i can file those under user error

brittle pasture
#

and mannequins stripping you against your will

lucid iron
#

well either way i hopefully fix this properly by the time u release, do remind me if i forgor

uncut viper
#

well presumably the patch adding the entire CharacterData entry comes after your fields here with priority low

#

which is likely just using Entries to add the entire thing

lucid iron
#

ah yea i am too eepy

uncut viper
#

thus wiping the appearances

lucid iron
#

i think my brain actually wanted High and thought of Late

uncut viper
#

but in CP 2.9.0 if you targetfield into appearances itll create the list if its null

lucid iron
#

but thats prob bad too cus SCA and such

uncut viper
#

even though i coulda sworn it did that before too but idk w/e

lucid iron
#

it is just workaround in the end Dokkan

brittle pasture
#

...it doesnt before?

lucid iron
#

well im psure it made dicts

#

otherwise customfields would be kind of suck

uncut viper
#

Added field auto-initialization when using Fields to edit a null parent field.

#

maybe it was specifically with Fields?

#

maybe this is not actually relevant then, i didnt pay too much attention to this when the update was put out admittedly

fathom hound
#

I'd like to make a stardew dice mod, but I'm not sure what the easiest way to go about it would be.. SDVpuffertbh

brittle pasture
#

yeah that makes more sense, since i definitely Entries TargetField-ed a null list before

uncut viper
#

tbh though i also thought it did it for fields since ic ouldve sworn i tested that with CMF

#

but whatever

brittle pasture
uncut viper
#

the number would be the same all the time without a way to choose a random action

brittle pasture
#

that is probably achieveable with copious use of SYNCED_RANDOM tick

uncut viper
#

well not all the time but all day

brittle pasture
#

assuming all trigger actions run on the same tick (I have not tested)

uncut viper
#

i guess you could make a list of 20 trigger actions

brittle pasture
#

yes that is what I envisioned

uncut viper
#

they should all run samew tick

brittle pasture
#

or I'd just do it with C# 😌

uncut viper
#

or use BETAS 😌

#

in combination with spacecore

urban patrol
#

heads up that you can't use CP random more than once a day lol i tried to make a magic 8 ball and failed miserably

fathom hound
#

Aww

brittle pasture
#

we discussed that earlier; if you're willing to write a lot of trigger actions with SYNCED_RANDOM tick conditions it is technically doable

urban patrol
#

sick

brittle pasture
#

BETAS also has a RandomAction action that streamlines the randomization

#

it's probably a better idea than the cursed pure vanilla method I mentioned

fathom hound
#

Ooo okay!

brittle pasture
#

so "on dice use, use RandomAction to randomly pick one from a list of 4/6/8/12/20 ShowHudMessage (from SpaceCore) actions

fathom hound
#

And I can modify it to be more than one, too?

#

(Basically you get more dice/rolls over time)

brittle pasture
#

sure, however you want to do it is up to you

fathom hound
#

Nice!!!

uncut viper
#

if you prefer a pop-up message and not a hudmessage BETAS has that as well

fathom hound
#

Actually, is it possible to make it show up in the text chat???

uncut viper
#

nope

fathom hound
#

Ah rats...

uncut viper
#

not with anything but a custom C# component

fathom hound
#

Okay. That would have been neat for multiplayer. Oh well

brittle pasture
#

send msg to chat action when

uncut viper
#

SMAPI doesnt even have events to detect chat messages let alone send to em

lucid iron
#

I feel like sc hud message is basically same thing

uncut viper
#

well no

#

bc another player cant see those

lucid iron
#

If u want it to be in the chat though I'd just make a chat command (in C#)

uncut viper
#

i personally like the idea of it being an item

lucid iron
#

That u can just register

fathom hound
uncut viper
#

its all moot anyway since Anaira isnt making a C# component

fathom hound
#

Mmm, this doesn't seem so bad to try and start learning

#

I think

uncut viper
#

as far as beginner C# goes, this would be very easy

fathom hound
#

It seems that way

#

I would like to try

uncut viper
#

i mean the example mod on the wiki for Button Pressed is like, halfway there

brittle pasture
#

various colored dice collectible in various ways; collect all 5 of the same color for a full set SDVpufferwoke

fathom hound
#

Yeah that would be fun!

#

There are 6 bonus dice you get

#

So 7 total, like stardrops!

uncut viper
#

these dice need a custom museum to go in 🙂‍↕️

#

(/j but only a little)

fathom hound
#

I can have multiple messages in a single item as well? (Since first it's d6 roll, then d20 rolls)

#

I figured yes but asking anyway SDVkrobusgiggle

uncut viper
#

i mean with C# you can do anything as long as you write the code for it

urban patrol
#

when is monster display name actually seen? i'm trying to conditionally edit mummies to appear as something else when in a location. with lookup anything they show as mummy, but i can't tell if that's because my patch is bad or if LA is special

uncut viper
#

probably the monster slaying goals board

urban patrol
#

hmm can't check that because i'll be leaving the location lol

#

it actually probably doesn't matter, because i can be like "these enemies are called x" in an event beforehand or something

uncut viper
#

if there's nothing to show the enemies name in that specific location anyway, does it matter if they aren't renamed?

urban patrol
#

exactly

#

i realized i'm being anal lol

wispy tangle
#

Can I ask about making translations for mods in here?

uncut viper
#

sure

wispy tangle
#

Its my first time, and I'm translating into a language for which the file doesn't exist. It says to copy that one file but idk how to do that, could someone help me?

uncut viper
#

does it have an i18n folder at all, just no default.json?

wispy tangle
#

It has a i18n folder, and a default.jason in it
But it says to copy the default.jason and rename it. I just literally don't know how to copy a file

uncut viper
#

right click > copy

wispy tangle
#

Right this is dumb it just worked, but it didn't before. It seems I have to right click on the text and not just anywhere on the "row" of text

#

Sorry, thanks for the help!

wispy tangle
#

I have a few questions about making a mod translation

  1. How do I select the language that the mod should run in? (Its a language that doesn't exist in the base game)

  2. When I've translated everything and made a file in the i18n folder, what do I do? Is it done? How do I share it with the mod author?

I appreciate any help, I'm trying to learn how to translate mods

swift belfry
#

Sadly if this is not a language supported by the base game, this is less easy. You'll have to save your i18n file as another language (or just as default.json) and you can't just send it to the mod author to be added in the mod. You'll have to make a separate mod. The first thing to do is to ask the original author if they're OK that you publish it.

hard fern
#

im lost in the horse sauce.. can horses have skins? 🤔

#

if not then i can just use a random token to pick on out of whichever options i have listed in the config, right?

#

speaking of horse where on earth is the horse data

sleek flint
brave fable
#

horses? data assets? you misunderstand

hard fern
wispy tangle
uncut kayak
#

Anyone know if a custom farmhouse mod could affect where a farmhand wakes up? My boyfriend keeps getting kicked out of the main house back into his, which... sends him into the void, because we use the cabin as a workshop.

#

-# Apologies if this is the wrong channel. I have been sent to multiple channels now after trying support threads.

brave fable
hard fern
sleek flint
# wispy tangle Swedish

There is currently this work-in-progress Swedish translation, but it's only for 1.5.6, although it is planned to be updated to 1.6

hard fern
#

why is there an iridium dog..

#

never knew 1.6 added that

fathom hound
#

It's not in the game unfortunately

hard fern
#

oh, really? shame

hard fern
sleek flint
# wispy tangle Swedish

So, you can still do it if you want, but I don't really recommend it. If you are doing this for the purpose of uploading the mod, then don't bother until this Swedish language mod gets updated. And if you want it for personal use, then do as other people said and simply replace it with another language (e.g. using the Spanish language but have a Swedish translation inside it)

hard fern
#

well i guess i'll add a new pet breed for iridium cat and dog then

hard fern
#

hm whats the flag to give the player to the cat grandpa shrine statue...?

#

i want to use it as a contion for cat

brave fable
#

GotPerfectionStatue SDVpetcat

hard fern
#

a

#

nice

brave fable
#

a fine choice of mail flag 🙂‍↕️

hard fern
#

time to test this thing

#

hm how do i even do this. how to i get gramps to give me that statue..

scarlet warren
#

Are we safe to use rotated tiles from TILED? Or does that need an extra mod requirement>?

calm nebula
#

If you save as tmx it is fine

#

Tbin does not support

summer spoke
#

can someone please give me an example of how to have characters appear when you're changing an event from one location to another? I already learned about the changeLocation command, but other than that I'm kind of struggling.

#

the mod that I wanted to learn from has been discontinued for the time being so I can't look in its code for answers, unfortunately.

tiny zealot
#

you should be able to add them to your original actor list and simply hide them offscreen (-1000 -1000 or similar) and warp them in when you need them

summer spoke
#

thank you i'll try that

tiny zealot
#

hang on i'm being handed a note

#

(i confabulated that command. do the other thing)

#

there's addTemporaryActor, which may work for you

summer spoke
#

right, addTemporaryActor it is. thank you

onyx forge
#

how do i make a texture pack w/ content patcher

brittle pasture
#

!startmodding take a look at content patcher's documentation, particularly the edit image tutorials

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.

brittle pasture
#

!unpack and do this too

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!

summer spoke
#

It won't load the Hospital now, I'm afraid. It says "[game] Event 'MySafeLittleCOrner.Pitiable_HelpChild' has command 'addTemporary Actor farmer 7 17 1' which couldn't be parsed: require index 5 (Vector2 tile > y) not found (list has indexes 0 through 4)" the same for Harvey and Abigail

brittle pasture
#

addTemporaryActor needs more arguments

onyx forge
brittle pasture
onyx forge
#

i know how to make textures 😭 is that what you're saying

brittle pasture
#

by EditImage i mean the literal Content Patcher action to edit an image in game using your own asset

spice inlet
#

man the gitlab wiki is genuinely terrible SDVpufferflatbread
keeps breaking my styling.
any good alternatives?

#

(and that's like two of so far over half a dozen different cases)

brittle pasture
#

HTML

summer spoke
#

Sorry, but nothing I'm trying is working. Do I need to specify somehow to warp the people to the hopsital or is changeLocation Hospital enough?

leaden cave
#

Hello everyone so I though about trying to make mods (I hope this is the right channel for this)

And I was thinking if someone could recommend me something simple that I can try to recreate, for practice. (This will be may first mod)

I read through the wiki page and the GitHub though I found all a it a bit confusing and overwhelming. (That is why I am asking for a thing to start with)
(Also I would prefer if the recommendation had something to do more with technical aspects rather than art because I don't know how to draw)

Thank you!

opaque field
#

Hello! Personally, I started with editing the dialogue of an NPC 😄

pale river
#

I'd recommend trying to add an item to a shop, I think that one was pretty simple to me. I'm just checking to see if there is a good tutorial

leaden cave
#

Is there a certain place I should look on how to do both of this in the github page? (the page is really big and kinda got lost)

latent mauve
#

There is the stardewmoddingwiki that exists with tutorials, just make sure that you aren't using one that has a message about it being obsolete or outdated at the top!

pale river
tiny zealot
leaden cave
#

All of these are for making mods with content patcher right?

pale river
leaden cave
#

Thank for the information everyone it was really helpful. I think I am ready to give it a shot SDVpufferheart

latent mauve
#

(I would also argue that if you only want to make a quick mod that you can easily verify works, adding a line of dialogue to an existing NPC is probably one of the simplest tiny mods)

#

No art assets needed for that at all, just text and JSON code if you are working with Content Patcher

pale river
latent mauve
#

Adding items to an existing shop usually needs TargetField or Fields which can throw off newcomers IIRC

tiny zealot
#

editing an NPC dialogue key is dead simple and easy to verify, as long as you pick the right one of course /lh

leaden cave
#

I would like to clear my mods folder is there a mod that is needed for the game to run or can I just delete all of them?

pale river
#

content patcher

tiny zealot
#

keep Save Backup and Console Commands

#

those are the two that ship with SMAPI and can only be replaced by reinstalling it

latent mauve
#

You will also need Content Patcher since you are creating a CP mod, yep

pale river
#

SDVpufferflatbread i deleted it when I was making a CP mod at first hahahah

leaden cave
#

O ok though I can delete them if I want to install it again (I was thinking about doing a fresh install of all the tools)

pale river
tiny zealot
leaden cave
#

Not really, just hadn't used them in a while

#

so I though I might as well

pale river
#

should I be using some sort of mod manager? I've been manually moving my mods whenever I test something

latent mauve
#

I manually update all my mods

leaden cave
#

Also, should I install stardrop do I need it to check if my mods work easily or is there an alternative

latent mauve
#

You can just put your mods in a subfolder and rename it to have a . in the front to temporarily disable that set of mods, unless your on an operating system that doesn't like that

#

I think Linux has issues with that method

tiny zealot
#

it does not

latent mauve
#

Then I am misremembering!

leaden cave
#

I am using windows 11 so I thing I will be fine

tiny zealot
#

well, i guess define issues

leaden cave
#

Though installing the mod manager isn't really that difficult for me so is it generally worth it?

latent mauve
#

I use the . method all the time on Windows

tiny zealot
#

on unixes (including linux), starting a filename with a . marks it as hidden, so it doesn't show by default to many tools and programs

latent mauve
#

I could absolutely be misremembering

tiny zealot
#

so if you go into a regular file browser and add the dot, your folder will disappear unless you have it set to show hidden files

spice nacelle
#

Hello I am making mod using Csharp HarmonyWhere ca

spice nacelle
tiny zealot
#

this channel

latent mauve
#

You can try asking here, I am not C# person but there are usually some around!

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
#

People can give you implementation ideas which may or may not involve harmony

spice nacelle
#

Hello I am trying to reduce GPU usage when it rains

I think these codes are making the Dark Blue screen effect

  • Game1.DrawWorld
    https://github.com/Dannode36/StardewValleyDecompiled/blob/main/Stardew Valley/StardewValley/Game1.cs
    Line 13691
    //
    if (currentLocation != null && (bool)currentLocation.isOutdoors && !IsFakedBlackScreen() && currentLocation.IsRainingHere())
    {
    bool isGreenRain = IsGreenRainingHere();
    spriteBatch.Draw(staminaRect, graphics.GraphicsDevice.Viewport.Bounds, isGreenRain ? (new Color(0, 120, 150) * 0.22f) : (Color.Blue * 0.2f));
    }
    //

I tried using Harmony-Prefix-return-false on stuff like Game1.drawWeather
but they only make rain drop not exist
and blue screen effect still exist

I am looking for a way to delete these lines
I am guessing if I can make Game1.currentLocation.IsRainingHere() = null
It might solve my problem. How do I do that?

lucid iron
#

!decompile

ocean sailBOT
lucid iron
#

When doing stuff like this sure you are looking at a local decompile

#

Since this bit is deep in the method though I'd consider a transpiler

#

To just remove the spritebatch draw call

spice nacelle
#

I will Learn some Transpiler

lucid iron
#

Patching IsRainHere would have impact beyond the visual

tiny zealot
#

wow i had no idea the rain tint was just drawing staminarect over the screen at blue 0.2, that's wild

spice nacelle
#

So I have to use Transpiler?

leaden cave
#

If I chose to use a mod manager to open and test my mods which one would you recommend?

lucid iron
#

Since the goal is to eliminate a particular block from getting called completely

ocean sailBOT
#

Stardrop is a mod manager written specifically for Stardew Valley. See the Stardrop wiki for installation and usage.

See this tutorial for connecting Stardrop to Nexus or updating mods in Stardrop.

If you have issues with Stardrop, see the issue report guide.

lucid iron
#

I'd match for the is rain here if (which is probably a brfalse) and then change that to a br

leaden cave
#

Okey thank you

lucid iron
#

You need to decompile the game to IL in order to know about the instructions to match for, and i think barley wrote a transpiler guide

spice nacelle
#

Ok I just learn coding 5 days ago
And Transplier gave me a headache
I need guide

lucid iron
#

It is sadly still a jump into pool in deep end thing

pale river
#

how do i add a context tag to my item?

leaden cave
#

Should I create and edit (code) the mods in notepad or should I use a code editor (like VS code)

#

(I am trying to add the manifest.json file and I don't know what type of file to create)

pale river
wispy tangle
leaden cave
#

How can a link it? (if there is a way)

latent mauve
#

There's a command with links to the editors if I can remember it

gentle rose
#

preview, Pet Renamer soon to be replaced by Renamer (which can support pets, horses, kids, and the farm)

latent mauve
#

!json this one gets you the JSON validator though

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.

latent mauve
#

Ah-ha, the code editors are at the bottom there too

leaden cave
#

So in simpler terms (sorry I didn't understand) what should I do in my mods subfolder, how do I create the manifest.json file (and the other files later)

latent mauve
#

(sorry for the ping, boxosoup!)

pale river
leaden cave
#

Yeah but I don't know what type of file to create in the folder, is it a text document?

latent mauve
#

JSON

latent mauve
#

All CP code files are JSON files, you may need to turn on file extensions in case your code thinks it's a text file instead

leaden cave
#

So I should open the folder in vs code and the create the file, not do it from the file explorer?

pale river
#

if it doesn't work on the file explorer then do it in vscode

latent mauve
#

In VS Code, I usually create a new text file, and then in the prompt at the top of the new file, click Select a Language and get JSON from the dropdown

#

(new text files prompt you to start typing or select a language before you enter anything in)

pale river
#

for me I name the new file anything.json and it automatically turns it into a json in file explorer or vscode but it might depend on system

latent mauve
#

You can just start with a JSON file but you have to immediately choose the save location in that case, so have your mod folder created already

leaden cave
#

OO I understand now thanks everyone SDVpufferheart

pale river
#

okay I figured out how to add the context tag to my item

leaden cave
#

What is a good way to test if mods work in game is there a mod that can take you to certain places or trigger certain events or chain of events (that I can use along side my mod)

tiny zealot
#

you can also use CJB cheats for most of the same things, and it's easier to use if you're not used to typing commands into a terminal

leaden cave
#

O so lets say I wanted to change the dialog of the wizard after his last heart event, I can do that with commands?

#

I mean check not change the dialog

brittle pasture
tiny zealot
latent mauve
leaden cave
#

So would it be better to try and understand and learn the commands rather than using the recommended mod?

latent mauve
#

debug ebi <eventid> and don't include the < and >

leaden cave
#

(Because they feel a little overwhelming for now)

latent mauve
#

I haven't messed with CJB Cheats, you might be able to trigger events from it?

tiny zealot
#

i personally recommend console commands/debug command entry but i consider myself an atypical user

#

do whatever gets the job done for you

calm nebula
#

You use make ichor

tiny zealot
#

exactly!

leaden cave
#

Thanks for the info everyone SDVpufferthumbsup

pale river
#

why does my texture look like this?

tiny zealot
#

too small, bottom pixel row got stretched to fill

calm nebula
#

Also to the right

pale river
#

is it possible to also change the social page sprite?

tiny zealot
#

yeah you want to edit MugShotSourceRect in character data

scarlet warren
#

Mod Concept:
Hire dwarves.
When you place a structure around rocks and mineable nodes, each day dwarves will mine up to 20 around it.

Is this doable? Has something like it been done?

tiny zealot
#

as usual, everything is doable with determined application of C#

#

!twocakes as well, i wouldn't worry too much about having an idea someone else has had before

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.

pale river
#

my roommate item is also not working for some reason

tiny zealot
#

did you embiggen your house

pale river
#

ohh

#

SDVpufferwaaah I also just cannot get the sprite size right

brittle pasture
#

16x16
count your pixels

pale river
#

thanks I miscounted them to 20

#

my engagement dialogue is also not working properly, but I put it as this

brittle pasture
#

need 0 and 1 at the end of the key

#

probably two separate keys for both

#

look at unpacked file for reference

pale river
#

the rock is still speaking when I added 2 seperate keys

brittle pasture
#

the accept dialogue isnt controlled by Data/EngagementDialogue

#

it's for talking to them for a few days afterwards

pale river
#

ohh where can I edit it? I don't see it in the unpacked folder

gaunt orbit
#

That will make sure you have nice crisp pixels

pale river
brittle pasture
#

NPCNAME_Engaged

#

look at the two Krobus_ strings in there for example

gaunt orbit
brittle pasture
#

yeah disable all forms if interpolation in the resize tool

pale river
pale river
brittle pasture
brittle pasture
pale river
#

im pretty sure all npcs ive talked to used the exact same dialogue

brittle pasture
#

that is one you can override yes
see the wiki page i linked

#

they use the same dialogue because they dont have specific overrides

fierce citrus
#

uh, I have a couple mods that say they “need” tmxl, but I’m told it’s unnecessary. Can you folks tell me how to fix it?

gaunt orbit
#

That depends on how the mods are using it

#

Some mods you can just remove the dependency, others need to be converted to newer formats, and a few just won't work without it and you can't use them on 1.6

#

Tmxl has been dead for a while though, and using mods that are that old is not recommended due to potential compatibility issues

#

At best they are 1.5 mods that never updated, but they may even be 1.4 mods

pale river
gaunt orbit
#

The part before the colon is the asset you need to target, and the part after the colon is the key in the string-string dictionary you need to add/edit

pale river
#

okay I fixed it, but it still doesn't work 😔

gaunt orbit
pale river
latent mauve
gaunt orbit
pale river
latent mauve
#

Does your i18n parse correctly?

pale river
pale river
gaunt orbit
#

What does the patch status say?

#

Are there any dialogue parsing errors in console?

pale river
#

yeah idk

gaunt orbit
# pale river yeah idk

What does it say about your specific patch? Should have a reason for not applying it if it's not applied

latent mauve
#

!log

ocean sailBOT
#

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

Please share your SMAPI log file. To do so:

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

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

latent mauve
#

It's really hard to read from screenshots

pale river
ocean sailBOT
#

Log Info: SMAPI 4.4.0 with SDV 1.6.15 build 24356 on macOS Unix 14.6.1, with 3 C# mods and 1 content packs.

gaunt orbit
#

Maybe it wants the npc name instead of the id? Or there's some other mismatch between the npc and the dialogue keys?

#

Idk, the code looks built right

pale river
#

the npc display name?

#

this part feels really sketchy, but it's how its said in the wiki

latent mauve
#

Is your blank json load just a json with { } in it?

gaunt orbit
#

That seems unlikely but if the id is right maybe that's what it wants? I've never made an npc

latent mauve
#

Nah, it always wants the internal ID for keys

latent mauve
#

!json would you mind sharing your JSON files for dialogue.json and also where those engagement dialogue patches are, just in case they are overwriting each other somehow?

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.

latent mauve
#

I'll be back at my computer momentarily to look at the file structure

pale river
#

take your time, I appreciate everything you've done so far, and wren helping me with the sprites

pale river
gaunt orbit
#

The best way to solve that is unfortunately to just redraw it on a new layer

open acorn
#

What's some of your guys favorite mods

#

Im new to mods on stardew btw never use them

tiny zealot
#

this channel is for talking shop about making mods

open acorn
#

What does it do

tiny zealot
open acorn
#

That's actually super cute

#

I just looked

#

You have a lot of unique ones

#

158k unique downloads is nothing to scoff at either

latent mauve
latent mauve
#

okay, and the key matches what is expected?

pale river
#

it works now 😭

latent mauve
#

LOL

#

It just needed to feel threatened by being looked at more closely. 😛

#

(or needed another restart)

pale river
#

🙏 thanks so much idk why it does now 😭

#

I learned a lot of neat tricks, thanks! Thanks for also remembering to help too

latent mauve
#

I was about to ask for the exact context tag you used on the roommate proposal item to make sure it was lowercase, but no need now.

#

Yeah, sorry it took me so long to get back to you, I got pulled away to deal with something for work

pale river
#

yeah no worries, I took a small break because of it SDVpufferheart

#

how do I get the update tag from nexus?

ornate trellis
#

its the number at the end of your mods url

autumn tide
#

@pale river you are insane, and I admire that

pale river
pale river
autumn tide
#

ohh yeah you're gonna want CFE for that i think

pale river
#

but all the dialogue is already replaced

autumn tide
#

but you should be able to override with just putting the specific daily key for every day bc they take higher priority

#

one sec lemme draft something..

#
"{{season}}_{{day}}": "{{i18n:rock}}"
#

bc the season_day key has highest priority afaik!

#

wait forgot to summon you @pale river

pale river
#

it did work once but then stopped working after idk why lol

autumn tide
brittle pasture
#

that sleeping dialogue is one of the hardcoded ones in StringsFromCSFiles that happen if the spouse can't path outside of their bed

#

I think you have to conditionally patch those lines directly if your 'spouse' is your NPC?

ornate locust
pale river
#

this one is def overwritable, because I was able to do it once, but idk why it doesn't do it again

#

it worked once, idk why it doesn't work again 😭

brittle pasture
#

hmm do you have Outdoor_1 in your file

pale river
#

yes I do

#

i tried exporting the patch and it said Couldn't load asset 'Characters/Dialogue/MarriageDialogueboxosoup.rock_rockRoommate' using a likely type

brittle pasture
#

I only see the EditData code block

sleek flint
pale river
brittle pasture
#

yes
if it's not in your unpacked content folder you need to load it

#

because it doesn't exist yet

pale river
#

I loaded the blank and it's still giving default

#

nevermind my bad

#

nevermind it still loads the default dialogue

#

here is the loading the blank dialogue

#

SDVpufferwaaah okay i guess the date specific generic dialogues overwrite my dialogue

brittle ledge
calm nebula
#

Is your npc {{modid}}_rock

#

Is ending the target with Roommate right

latent mauve
#

according to the wiki, it should be correct

calm nebula
#

Huh. I never knew that existed

#

Does it require the other file to exist?

pale river
jaunty shuttle
#

I… I don’t know what this is but I love it

shut edge
#

pet rock no, wife rock yes

pale river
#

😭 it was originally supposed to be a template for npc, but it probably has too many things going on to be a good template

hallow prism
#

templates are a difficult thing because you need even more clarity than normal npc making

#

and clarity requires a lot of experience usually

autumn tide
#

yeah my portrait template was surprisingly hard and it still only does non-season replacements for all portraits

pale river
#

yeah it has minimal clarity and like 7 unique homes 😭

pine elbow
#

Hello, I’m working on the animation of one of my characters, the animation runs smoothly until the end, when the character disappears for a second. Then it reappears once the animation starts again. I’m not sure if the issue comes from how it’s written in the json or something else. https://smapi.io/json/content-patcher/05354e69e4ba4636a2695961c010de2d

urban patrol
#

which animation and can you screenshot your spritesheet?

pine elbow
#

I’ve checked Janelle’s, but I haven’t tested the others, so I’m not sure if they’ll show the same problem. This is the section I want to animate and here is the video where the issue can be seen.

urban patrol
#

can you screenshot the whole spritesheet?

#

preferably in an art software of some kind

#

i suspect your issue is you forgot that they're 0-indexed

urban patrol
#

yep, frame 20 on that is blank. remember that you have to count left to right, top to bottom starting with 0

#

for the 4 where she's sitting down, you want 16 17 18 19

pine elbow
#

You’re right, I completely forgot. Thank you so much!

urban patrol
#

np!

devout otter
#

Has anybody used SpaceCore spacechase0.SpaceCore_OnItemUsed Trigger? I would really appreciate some example.

#

Mainly, I'm not sure what use item GSQ conditions to check the right item on the documentation means. I tried ITEM_ID but that doesn't seem to work.

brittle pasture
#

code?

#

also note that you want to check the Input item

haughty charm
#

Cornucopia Cooking Recipes uses that, Dolphin

urban patrol
# devout otter Mainly, I'm not sure what `use item GSQ conditions to check the right item` on t...
    "Action": "EditData",
    "Target": "spacechase0.SpaceCore/ObjectExtensionData",
    "Entries": {
        "{{ModId}}_Magic8Ball": {
            "UseForTriggerAction": true
        },
    }
},```
``` traction:
"{{ModId}}_8BallUsed_BadLuck": {
    "Id": "{{ModId}}_8BallUsed_BadLuck",
    "Trigger": "spacechase0.SpaceCore_OnItemUsed",
    "Condition": "ITEM_ID Input {{ModId}}_Magic8Ball, {{Query: {{DailyLuck}} < 0}}",
    "MarkActionApplied": false,
    "Actions": [
        "spacechase0.SpaceCore_ShowHudMessage \"Outlook not so good...\" (O){{ModId}}_Magic8Ball"
    ],
},```
devout otter
#

Thank you!

devout otter
brittle pasture
#

that definitely sounds like it should be on the doc

devout otter
#

I looked at Wiki explanation They take a <target> argument which can be Input (the machine input item) and was "well it's not a machine, so". 😅

urban patrol
#

yeah idk how i knew to use Input, i probably asked in here too

brittle pasture
#

These applies only to vanilla contexts, modded ones can pick what items they want to pass to Input or Target.

uncut viper
#

(in this case theres also no reason spacecore cant send it to both)

devout otter
#

Hypotethical, but if I have this as trigger actions, is there a rule on which one would take precedence? "Actions": [ "RemoveMail All TheMail", "AddMail All TheMail" ]

uncut viper
#

the first one

#

its a list and order does matter in lists

devout otter
#

SO it would remove first, then add it?

uncut viper
#

they get applied in order

#

correct

devout otter
#

Alright, thanks!

calm nebula
#

Does adding All do...anything

uncut viper
#

yes

#

All is a valid player argument

calm nebula
#

Ohh, right

dusk mulch
#

how are the crates/barrels generated in the mines?

brave fable
#

(<MineShaft>location).populateLevel() calls BreakableContainer.GetBarrelForMines() SDVpufferthumbsup

dusk mulch
#

Are there any frameworks for mine ore/barrel generation then?

haughty charm
#

FTM

brave fable
#

does FTM do breakable containers?

haughty charm
#

I thought so, but maybe I'm thinking of Item Extensions?

dusk mulch
#

I'll check both

haughty charm
#

It's been a hot minute, but I thought Sunberry used FTM for their mines.

#

They do - but they also use IE

dusk mulch
#

FTM can do breakable items

#

forgot i already had FTM downloaded for SVE and downloaded it again lol

#

wait if im doing an editmap patch to put something into a mine floor do i need to change the generation?

urban patrol
#

spacecore does both

dusk mulch
urban patrol
#

yep

#

minables and breakables in the docs

dusk mulch
#

does spacecore use content.json or its own json to function

urban patrol
#

you write a content pack for content patcher and edit spacecore assets

#

using spacecore actions in trigger actions and stuff

dusk mulch
#

ohhh alright

#

ty

#

ill see if i can find a mod that uses spacecore for a visual example

dusk mulch
#

well since it's in the mines i dont need ore generation since that's already done for me i just need the barrel generation which i'll use FTM for since i am more comfortable with it

nimble karma
#
"Action": "EditData",
"Target": "Data/WildTrees",
"Fields":
    {
    "CustomFields": {}
    }
},
{
"Priority": "Default +10",
"Action": "EditData",
"Target": "Data/WildTrees",
"TargetField": ["{{ModId}}_Araguaney", "CustomFields"],
"Entries":
    {
    "MoorTarPetal.WildTreeFramework.WildSpawnIds": "SpawnId_Forest",
    "MoorTarPetal.WildTreeFramework.SpawnChance": "1.0"
    }
},```
#

I'll ask here, since I've already messaged the mod author whose framework I'm using more than once and don't want to seem too evasive

#

Is there any reason why CustomFields would just have an empty bracket next to it? Or am I supposed to figure out what goes in those?