#making-mods-general

1 messages · Page 166 of 1

versed wyvern
#

Yeah, with just an action it gives an empty box

uncut viper
#

well
at that point thats a vanilla dialogue quirk i suppose and i dont know if theres much i can do about that with DialogueNox itself, that would be something to eventually think about with a QuestionBox action

versed wyvern
#

Seems like it, but thanks for digging into the matter for me anisoftbongo

uncut viper
#

make it say "Enjoy before it gets cold!" and call it a feauture, this coffee machine is polite

versed wyvern
#

It also means I have it to give it dialogue for when you don't want coffee, so I'm gonna make it disappointed 4evil

calm nebula
#

"Suit yourself, then."

tiny zealot
#

"you DENY miette's coffee? you turn down her coffee like the ungracious guest?"

gentle rose
#

it took me so long to figure out why that looked so weird to me until I realised that font isn’t monospaced 😭

#

I usually support cursed things but I can’t support that

tiny zealot
#

i cannot code in proportional fonts. i am monospacepilled

gentle rose
#

it just seems wrong

#

unethical, even

tiny zealot
#

some people like it but they are aliens, to me. i can't

gentle rose
#

atra is alien confirmed

velvet narwhal
#

wait does iro know about the cursed text exploder

#

i don't even know if i can find it, but iirc it was a vsc plugin

gentle rose
#

text exploder? I’m already so in

velvet narwhal
#

was it confetticode

tough crater
#

This means I can do only math in it? 😭

#

Actually no, it should be compatible!

uncut viper
#

see the query expressions link for more info

#

it will not use GSQs

#

there is no possible way to use Game State Queries themselves in a content patcher when condition without a different mod to facilitate it (Esca';s Modding Plugins)

tough crater
#

Damn, that sounds like it's a challenge for me to accomplish in C# 😈

#

I just gotta figure out how C# works 🥲

uncut viper
#

there is no reason to make a game state query token if you can write C# yourself instead

tough crater
#

I feel like if I were to ask help on accomplishing it, it'd result in someone just writing out the code for me so it's pretty intimidating 😭 I followed the basic tutorial on the stardew wiki and it works at least!

#

took a while to figure it out because i accidentally added code in there that broke it 💀

uncut viper
#

no i mean theres literally no reason. you dont need to when you can check the same conditions yourself in C# and if necessary just make a token for that, not GSQs in general

tough crater
#

Making ALL GSQs work for "when" conditions sounds like too much work

patent lanceBOT
#

@velvet narwhal: add switchevent changelocation/changetempmap entry transitions (7h ago)

tough crater
#

I just found the stardew DLL so I should be good for now actually

jolly sable
#

Can you code in a "boss fight"?

velvet narwhal
#

i mean anything is possible with c#

jolly sable
#

Fair enough

versed wyvern
#

A couple of modders have made some, one ported from Terraria

velvet narwhal
#

some suggestions that are regurgitated from chue: make your own animation controller, game's sucks

teal bridge
#

Also: make your own NPC controller
Also: make your own projectile system
Also: make your own game engine

gaunt orbit
lucid iron
#

there's no content pack framework to make boss fight

#

in terms of making ur own bespoke boss in C# u can do whatever u want if its just a few enemies sleep

jolly sable
lucid iron
#

every mod that does it is C# i believe

#

since the base game's enemy mechanics r so barebones

jolly sable
#

What if the boss worked like a pre-existing enemy?

lucid iron
#

then they would be kind of lame monS

uncut viper
#

well then thats just an enemy. and you're still probably looking at C# anyway

velvet narwhal
lucid iron
#

u can do it tho, SVE and RSV have those really fat worms

#

with a gorillion hp

tiny zealot
#

hot take: bosses are just enemies

gaunt orbit
velvet narwhal
lucid iron
#

but otherwise normal wormy behaviors

uncut viper
#

what would you describe as normal wormy behaviours, chu

lucid iron
#

i believe all u need is FTM in this case, and theres also feature to prevent the froge from eating ur fat worm

velvet narwhal
#

~wiggle~

lucid iron
uncut viper
#

hi esca

lucid iron
#

normal worm behavior

velvet narwhal
#

yeah if you just want regular reskinned monster tactics but more health, it'd be FTM

royal stump
calm nebula
velvet narwhal
#

yep, that's why I Am Miserable™️ SDVpuffersmile

jolly sable
calm nebula
#

And this isn't a skill issue thing, I don't buy lava katana for skull cave, I just tough it out with obsidian edge

teal bridge
uncut viper
#

yeah you cant get that with CP alone

jolly sable
#

Which is to say, yeah

#

Kinda unrefined

gaunt orbit
uncut viper
#

i enjoy minecraft combat tons more

gaunt orbit
#

swords use the tool system, which is really meant for slow heavy hitters and doesn't translate well to combat

jolly sable
#

I think a part of that is the 3D

#

What I am saying is, both are very surface level

#

Not very complex

teal bridge
velvet narwhal
#

invincibility?

teal bridge
#

There's no real AI system, you have to write your own from scratch.

royal stump
tiny zealot
lucid iron
#

sdv doesnt let u explode beds on the final boss so i think minecraft has an edge here

royal stump
#

(speaking of long serpents though, I wonder if anyone uses the slime stack)

teal bridge
uncut viper
#

monsters are just a reason for my parrot to create shiny coins

tiny zealot
#

well, everybody is complaining about how much it sucks, so maybe my take is hot

gaunt orbit
brittle pasture
#

it's about as complex as the fishing minigame, and it's fine; they are both minigames that give you resources in exchange for time

velvet narwhal
#

i finagled a treant that doesn't move until it's out of the player's view to slowly scooch towards the player so that was fun and Scary™️

gaunt orbit
#

which is mostly an issue when you get late game, and the only way to make things more challenging is bigger numbers

uncut viper
#

still waiting for someone to make a turn based combat mod

velvet narwhal
#

Maybe Someday™️

#

tbh it might be possible with stardewui thonk

jolly sable
#

This boss fight idea may overcomplicate the mod I had in mind anyway. At least for the moment.

I may try out coding it myself someday though.

teal bridge
#

Bigger numbers generally != more challenging, though, just more tedious. I mean, I agree that it is essentially the only option without designing in new mechanics and new systems to implement them. But, see earlier re: being not really fun to play.

versed wyvern
#

I think with Stardew's simplistic combat one could at least manage bosses like Zelda A Link to the Past, which honestly mostly consisted of "swipe wildly at big thing"

jolly sable
#

More or less what I had in mind

royal stump
#

you could pretty much recreate a lot of LTTP dungeons at this point, and the combat feels mostly similar, yeah

teal bridge
#

In games with more fully fleshed out difficulty curves, increased difficulty usually means stuff like new move sets, faster reaction times, maybe certain handicaps.

royal stump
#

(those sliding spike things are a monster type)

versed wyvern
#

But you'd have to code a lot of custom projectiles tracking your position

lucid iron
#

one idea i have for alternate combat is to force player to use slingshots

teal bridge
#

lol, that's just a big middle finger to controller users.

lucid iron
#

as in, have an area where sord literally doesnt work PecoSmile

#

yea that is pretty doom

#

so it'd have to be some kinda fancy homing slingshot

versed wyvern
#

Sword special move being 1-sec invincibility also strikes me as an obstacle for good boss design ThinkO_O

#

How do you force the player to dodge instead of just pressing one button

lucid iron
#

someone was making a harp weapon that was gonna have a melee attac and a projectile special

royal stump
#

have it just sit directly on them until their i-frames end SDVpufferowo

teal bridge
#

I'd actually thought about trying to redesign the slingshot controls for controllers at one point, but it never got high enough on the list.

#

I think I saw one or two existing mods attempting to do it, too, but didn't try them out. Maybe they work.

uncut viper
#

(you can also just override the parry)

lucid iron
#

maybe u fight a vampire and u gotta shoot garlic at him

velvet narwhal
#

make my own parry, with blackjack and hoo-

versed wyvern
#

gnome parry

lucid iron
#

with the zelda thing of smacking him when he's weakened

lucid mulch
#

Having played hard mode sve with the profession mod stuff, I found combat to be enjoyable enough

teal bridge
#

How about a boss fight that requires the fishing rod.

lucid mulch
#

When the enemies 2 shot you, strategy mattered

royal stump
#

(use CP to reskin bombs into garlic and use a vampire skin on a mummy SDVpuffersmart)

versed wyvern
#

These kinds of fights would also make at least a +1 Speed buff mandatory, I reckon

royal stump
#

(though I kinda forget how their mechanics work at this point)

teal bridge
#

Like, glacially slow. Go get another cup of coffee kind of slow.

versed wyvern
#

Well, balancing for base speed also presents the inverse direction of that problem where it becomes trivial if you do have a speed buff

teal bridge
brittle pasture
lucid mulch
velvet narwhal
#

does the bobber have a hitbox?

brittle pasture
#

dodge attack, fish, shoot item, dodge attack, repeat

velvet narwhal
#

cause honestly That's A Thought, to be able to grab pieces of the boss thonk

teal bridge
royal stump
#

I'm pretty sure it doesn't interact with enemies at all, so you'd need to patch it a bunch

teal bridge
#

But honestly I was thinking more of what Jamore just said.

velvet narwhal
#

make some kind of hookshot then ig, somehow force a tile update like hoeing the ground to tie the boss down

teal bridge
#

I'm not sure if the bobber really has a "hitbox" per se, I think all vanilla logic just calculates the tile it lands on.

royal stump
#

yeah, you could probably make a custom tool and crib some animation from whatever the frog trinket's draw code is like SDVkrobusgiggle

teal bridge
#

But that's not so different from a lot of "collision" mechanics in Stardew.

velvet narwhal
#

i honestly do not know how the slingshot works and i'm kind of afraid to look at it

teal bridge
#

Have fun just figuring out what precisely the slingshot is. It's a tool, and yet, not a tool.

jolly sable
#

Ok something that might make the combat a bit more interesting.

A dodge mechanic

velvet narwhal
#

wasn't casey working on dodgeroll

royal stump
#

(oh right, the frog tongue is just a stretched pixel, I was misremembering it as a chain of orbs)

teal bridge
#

Heh, get ready for the slowest dodge rolls ever seen in a 2D game.

velvet narwhal
#

or was that someone else that made some kind of "rolling" mechanic

brittle pasture
#

that sounds like extra pant sprites

teal bridge
#

Probably easiest to do as a "dash" rather than a "roll". Which, again, vanilla speed...

velvet narwhal
#

i think dash is a mod, yeah

brittle pasture
#

yeah I remember one of the MARGO component mods add a dash attack

teal bridge
#

I think there is like a Sprint Shoes type mod, but there is also a Combat Dash mod?

#

Oh, MARGO. (Whatever that is.)

versed wyvern
#

Farmer becomes anime and flash-steps across the valley for optimal travel speed

royal stump
#

apparently I've never posted a shot of excessively stacked slimes before, so here's a quality boss idea SDVpetslime

uncut viper
#

looks like when my GPU starts dying

calm nebula
#

The mail remains undefeated

royal stump
#

some of the tree layering gets confusing too SDVpuffersquee

tiny zealot
jolly sable
teal bridge
#

To be functional as a combat mechanic at all it would pretty much have to be faster than vanilla horse (without additional speed buffs). So it would have to be restricted some other way, e.g. with a cooldown. If you can figure out how to make this coherent in a Stardew context, I salute you.

jolly sable
#

Could maybe do a thing where you have a more muted version outside of the mines. Meanwhile the full dodge is only in the mines

#

I think that it controlling different in the mines could work. Honestly that could be a way to balance it with the rest of the game.

#

Additionally though, it wouldn't give any I frames, it'd just be a repositioning tool

gaunt orbit
#

actually, speakign of terraria, a slime rain would be fun, and I think doable with Cloudy Skies

versed wyvern
#

hecc

#

I sprited up a coffee machine and forgot there's a coffee maker item I could've used right there in the game

#

Now, what sprite sheet could that be in... it's not gonna be Cursors is it

brittle pasture
#

it's a big craftable, so TileSheets/Craftables

royal stump
#

yeah, mid-right side if I'm seeing it right

versed wyvern
#

Found it, thank ya CatThumbsUp

glossy cargo
#

Does anyone have pointers as to where in the code you could find the secret easter egg where ||you can leave cookies or milk for santa and he gives you a mystery box in return||

uncut viper
#

... you can what?

brittle pasture
#

1.6 easter egg

glossy cargo
brittle pasture
#

Furniture.DayUpdate

uncut viper
#

how is this the first im hearing of this i read like the whole changelog

glossy cargo
#

oh it's on furniture, I see

#

Thanks!

uncut viper
#

thats adorable

brittle pasture
#

do you also know of the ||pot of gold||, or ||Lewis' fun basement||, or the ||cursed mannequins that steal your clothes||

uncut viper
#

i do, i do, and i do!

glossy cargo
#

I am currently making a setting for archipelago where all the secrets can be randomized to get rewards from them

uncut viper
#

my partner still doesnt know it wasnt me doing that WRT the mannequins

glossy cargo
#

so I'm going through the list haha

uncut viper
#

(well not the stealing clothes but moving things)

patent lanceBOT
#

@vernal crest: ask Pathos about the en.json thing (14d ago)

uncut viper
#

(already done!)

tough crater
#

making a token looks way more complex than i thought it'd be

#

unless i'm overcomplicating it (but I don't think so?)

vernal crest
uncut viper
#

Correct

vernal crest
uncut viper
#

I forgot you had a reminder for it because I didn't have a reminder to remind me about the reminder

vernal crest
# uncut viper Correct

Oh whew okay thank you for telling me. I was just thinking that I would hate it if someone else already told him and then I brought it up and looked stupid because it was already dealt with.

uncut viper
#

thankfully I noticed then SDVpuffersmile it exists as a bug report on the SMAPI GitHub now

tough crater
vernal crest
uncut viper
#

i wouldn't be able to explain it any better than the CP docs for simple tokens, and advanced tokens are highly token-dependent and something I never think I'm doing right in the first place either

vernal crest
#

Do the CP docs have info for how to make a token in C#?

uncut viper
#

They do!

#

under the Extensibility page iirc

vernal crest
#

Huh, not where I would expect to find that information lol

uncut viper
#

well, tokens are a CP thing

vernal crest
#

I assumed they were just a concept and a CP token is one instance of that concept but not the only way.

#

But I guess if you're trying to make a C# token to use in a CP pack, that would make sense lol

uncut viper
#

nope! Tokens as we know them are an entirely content patcher thing, and you can add more using content patchers API

tough crater
uncut viper
#

not to be confused with tokenizable strings, a vanilla concept added in 1.6

tough crater
#

i wish there was a youtube tutorial for it

jolly sable
#

Does anyone have a good set of tutorials for making mods?

#

Or starting with that?

uncut viper
#

depends what kind of mod you wanna make

jolly sable
#

Hm. I'll start simple with something like a custom item

#

Then maybe a recipe

uncut viper
#

!startmodding has general getting started stuff

ocean sailBOT
#

Making mods can be broadly divided into two categories:

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

uncut viper
#

good way to learn is also to find an existing mod that does what you want (something simple ideally, not something huge and expansive) and look at how they did it

jolly sable
#

Makes sense. I am also being reminded of how terrifying the prospect of jumping into coding is

wide flint
#

I've created an instance of IClickableMenu to draw a menu which lets you select yes or no as answer. It works perfectly fine with a mouse but gamepads aren't able to select an answer. How do I add support for them?

uncut viper
#

manually, by giving your clickable components IDs and neighbours and handling things in the button received functions. id look at how vanilla menus do it
or use StardewUI which is a framework mod for making UIs thats much better to work with

wide flint
#

That sound like more work than I expected. Thanks

uncut viper
#

yeah thats working with the games native ui system in a nutshell

frosty bobcat
#

im trying to add a building to a map, is there a good tiled tutorial?

uncut viper
#

!mapmaking

ocean sailBOT
#

If you want to make mods that add or edit maps:

  1. Use Tiled to edit .tmx or .tbin files.

  2. Refer to the Maps wiki page for details on how maps work in Stardew Valley.

  3. Content Patcher allows you to create custom locations through editing Data/Locations

  4. Vanilla Maps can be edited via Content Patcher as well: EditMap

frosty bobcat
#

ty ty

uncut viper
#

the Maps wiki page has a lot of stuff that'll help

raw harness
#

Ok, I created a mod with animation of all the vanilla rings and now I'm trying to create compatibility for some other mods, initially I'm trying to animate for example the “Berserker Ring” of the mod “RingOverhaul” where the sprite is located in “RingOverhaul\assets\berserker_ring.png”, my test code looks like this:

    {
        "LogName": "Berserker Ring",
        "Action": "EditData",
        "Target": "spacechase0.SpaceCore/TextureOverrides",
        "When": {
            "BerserkerRingA": true,
            "HasMod|contains=Goldenrevolver.RingOverhaul": true
        },
        "Entries": {
            "KKzBG.AnimatedRingsPack_": {
                "TargetTexture": "Mods\\Goldenrevolver.RingOverhaul\\Berserker Ring",
                "TargetRect": {
                    "X": 0,
                    "Y": 0,
                    "Width": 16,
                    "Height": 16
                },
                "SourceTexture": "{{InternalAssetKey: assets/berserker_ring.png}}:0..1@20"
            }
        }
    }

I'm pretty sure my problem is in the “TargetTexture” in which I can't figure out where the berserker ring is, but it could be somewhere else,
I want that IF the mod “RingOverhaul” is active + the option “BerserkerRingA” is activated (which by default is activated), the animated texture of the berserker ring that I made comes into action, if either of the two options is not fulfilled the animated texture is ignored.

Could someone help me find out why my code isn't working?

proven spindle
#

Have you loaded the texture?

#

Goes something like

"Action": "Load",
"Target": "Mods/ModID/thingname",
"FromFile": "path/to/file.png"

raw harness
#

I don't know if I understand, for example here

    {
        “LogName": ‘Immunity Band’,
        “Action": ‘EditData’,
        “Target": ‘spacechase0.SpaceCore/TextureOverrides’,
        “When": {
            “ImmunityBand": true
        },
        “Inputs": {
            “KKzBG.AnimatedRingsPack_ImmunityBand": {
                “TargetTexture": ‘Maps/springobjects’,
                “TargetRect": {
                    “X": 368,
                    “Y": 576,
                    “Width": 16,
                    “Height": 16
                },
                “SourceTexture": ”{{InternalAssetKey: assets/immunityband.png}}:0..16@10”
            }
        }
    },

I made an animation for the “Immunity Band”, I pointed it to where the ring is in vanilla and everything worked perfectly, so in this case I wouldn't do the same thing but I would point it to where the “Berserker Ring” is in the “RingOverhaul” mod and it should work the same?

latent mauve
#

You can't point to things in another mod's folder, if that's what you mean

#

Does RingsOverhaul load the texture to anything?

#

Or does it use InternalAssetKeys for them?

#

If it's internal asset keys than you won't be able to target them

#

When there is a code like Si's example above, the mod is virtually loading a copy of the asset into the game files at the target location, which then makes it accessible to other mods that target the same loaded path.

mighty ginkgo
latent mauve
#

Mods can only target things within their own mod folder, things within the game files, or things virtually loaded into the game files.

raw harness
#

Oh. I see...

#

well I think I understand why it didn't fucking work lol

mighty ginkgo
#

i can't read c#, but if the texture is targetable with CP the path should be somewhere in the source

#

(not sure if there are other ways to find the correct path)

uncut viper
#

actually, no, its not targetable

#

it directly loads the texture

#

the C# equivalent of internalassetkey

#

so theres nothing you can do here

raw harness
#

yeah.. I mean, the mod I wanted to make involved vanilla rings, I thought I could add compatibility with other mods right away, but it's beyond my knowledge, I'll stick with what I wanted to achieve and maybe in the future I'll come back to the idea.

#

thanks for everyone's help. 🙂

uncut viper
#

to be clear, without a C# mod of your own doing some very fucky stuff to edit their mods code, its not something you'll be able to do later from your side, and 100% not from a content pack

#

its something the other mod should have done differently

latent mauve
#

You would not be able to make your mod compatible with theirs unless they rewrote their mod to not use direct loaded textures

raw harness
#

Well, that clears my mind at least I know that for my part I don't have much to do

woeful lintel
#

Hi, can FF set furniture to open Fashion Sense?
i got this request, does FS expose any "open menu" action? I checked the API but I couldn't find anything like this

jolly sable
#

How difficult might it be to make aod rewriting lewis?

#

Like, basic event stuff, just rewriting lines

uncut viper
#

if you're just rewriting lines its among the easiest kinds of mod you can make

gray bear
jolly sable
#

Ok

I'm still uncertain why people hate him so vehemently

#

Thought that may be a topic for another channel

uncut viper
#

Lewis?

jolly sable
#

Yes

woeful lintel
#

I know basically nothing about FS

gray bear
#

I mean I use it but i'm no expert on the way it, actually works. probably be best to ask peaceful about it (i think he's in this server)

unreal spoke
#

He’s in this server and has a channel in SMC, but I know for a fact there was a furniture mod that opened the FS menu. Fashionable Mirrors iirc. Might be a good first thing to look into?

gray bear
#

See i thought i knew about a mod that did that but couldn't remember the name. ty dora

#

hmm that mod used DGA

woeful lintel
#

thanks for the info!

woeful lintel
#

oh, there's a tile property

#

so, it's possible to simply use Calcifer, right?

wide flint
#

How does one exit a Question Dialogue used in an instance of IClickableMenu?
It keeps popping up after clicking Yes/No. Pretty sure I'm just not seeing the issue or doing it wrong.

public override void draw(SpriteBatch b)
{
    Game1.currentLocation.createQuestionDialogue(
        Question,
        Game1.currentLocation.createYesNoResponses(),
        delegate (Farmer who, string answer)
        {
            Game1.activeClickableMenu = this;
            if (answer == "Yes")
            {
                Mod.LogMonitor.Log("Yes", StardewModdingAPI.LogLevel.Warn);
                return;
            }
            else
            {
                Mod.LogMonitor.Log("No", StardewModdingAPI.LogLevel.Warn);
                return;
            }
        }
    );
}
royal stump
#

draw happens every single frame that your instance (the menu?) exists in, so that's probably creating a new question dialogue constantly; you'd need to call it from somewhere else

wide flint
#

Ah, that was the hint i needed.
I wanted the question to show before another vanilla dialogue pops up.
Setting Game1.activeClickableMenu to the DialogueBox that happens afterwards when selecting an answer did the trick

wide flint
next quarry
#

The menus also confuse me sometimes
Glad you got the vanilla code to do what you need :3

wide flint
next quarry
#

That is actually really helpful knowledge because I wanted to mod a radio that functions similar to the TV
But I did not find the time yet to look at the vanilla code
So thank you :D

tough crater
#

I think C# is way too complex for me to try to learn right now which is disappointing. I just struggle to understand how each bit works and if some text is meant to be replaced 😵‍💫

#

Unless the code is supposed to be (almost entirely) copy+paste but I doubt that?

versed wyvern
#

The first step is always the hardest

tough crater
#

Because I think I have the VERY BASICS of it set up, but I just need to figure out how to properly call for the PLAYER_PLAYER_RELATIONSHIP GSQ and make a token from that

#

The thing is idk how to test it on my own because it requires two farmers 😭

smoky nimbus
tough crater
#

Then I just play a local co-op, right?

#

It's probably not a good idea to load two instances at the same time

frigid hollow
#

is there some way i can give a custom farm all the seasonal world maps or do i need to do editimage on season change

#

actually it does get refreshed on patch update when i just have loads with {{season}} so i guess it's fine?? SDVpuffersquint

tough crater
#

They automatically cycle if the tilesheets are prefixed with a season, no?

#

oop

frigid hollow
#

i'll try that though bc the rest of the world map updates without needing to do that

frigid hollow
#

for some reason my map is going over remapping only during summer and i can't figure out why SDVpuffersquint

#

it does look like the summer one is loading in After any overlays which i don't really get why

frigid hollow
#

Why is the summer one so greedy what the heck is going on SDVpufferchickcry

fathom hound
#

Yay! I reached 12k UDL’s! SDVpufferwow aSDVemoteheart thanks sdvcord for making it happen

inland apex
#

Hi, does anyone know where is the code from the starter pack you're given at the beginning of the game? I'm trying to create a new starter pack mod.

rancid temple
#

You can check Maps/Farm_Ranching, it has the property on it

wide flint
inland apex
#

Thank you, guys!

frigid hollow
#

now i'm Very confused, patch exporting the map asset during summer shows it correctly but for some reason it's overlaying the base image on top on the map displayed ingame. during summer specifically. what

#

hmm okay, either World Maps Everywhere was breaking it or restarting the game when it's summer fixes it...?

tough crater
#

There's something wrong with the code I'm trying out, but it's from Content Patcher's IContentPatcherAPI.cs the error I'm getting is saying that ContentPatcher.Framework; isn't part of the namespace even though I thought I did the proper code to reference it?

#

If I'm guessing right, it's probably an issue with how I tried inserting the reference to content patcher's API

lucid iron
#

You don't need to reference content patcher to use the api

tough crater
#

Huh

#

WHAT

tough crater
lucid iron
#

Not reference as in, no need for hard dll reference

#

My use case is that i only care about the register token method, and thus that's all i copied

tough crater
lucid iron
#

There is a duck typing thing called pintail that maps the real api class to the interface

#

Ofc there's no issue with copying the whole api, but u will also need to copy any additional interfaces that r part of the args

tiny zealot
#

i think i remember having this problem once, getting around it with a hard reference, then removing the ref later and trying the standard way again and it worked but i could not tell you what error i made the first time

lucid iron
#

Which the original api needed using content patcher framework for

#

I didn't want to deal with it hence this "only what i need" interface

tiny zealot
#

copying only the methods you use is recommended practice anyway, since it reduces the surface for future updates to that API breaking your mod

lucid iron
#

Say ichor what did u end up doing for secret notes framework api

#

When button (iirc) wanted to do edit to the custom asset from C#

tiny zealot
#

uh i didn't do anything about it yet

tough crater
lucid iron
#

I wrote these by hand

#

Use your own mod's namespace and organization

tough crater
#

Oh boy, this is complicated

#

I feel like it'd be easier if I screen shared but idk if anyone's free for that rn

crude plank
#

Is it possible to add minerals/gem that are not part of the mineral collection?

brittle pasture
tawny ore
gaunt orbit
#

Actually just i18n. Assets is conventional but also not special

tawny ore
#

assets gets automatically copied on build

#

Not all folders are automatically copied

gaunt orbit
#

Yeah but you can configure any folder to do that

tawny ore
#

You can, but what I'm saying is it does have default treatment that's different from other folders

crude plank
# brittle pasture add the `not_museum_donatable` context tag

I'm looking at the Dwarven expansion dusts which are "Type": "Minerals" and have ContextTags "not_museum_donatable" but they appear in the Minerals collection and I told the author that now in order to have something appear not greyed out in the collection it needs to be donated and they said this: "Is this causing an actual issue reaching 100%? I can't image Pathos or ConcernedApe weren't unaware of that issue, and the not_museum_donatable is in the base game itself. If that causes an issue completing collections, it would need to be reported on the base game itself as it is simply a feature I'm using, not one I created. " But I've seen other mods add minerals that are not donatable and not appear in the collection so i was wondering how in order to respond to the author

gaunt orbit
#

Fair

tawny ore
#

Otherwise every folder (by default without manually configuring anything) is just there to organize

#

Anyway the point I was making is don't get hung up on the folders being special or having anything to do with the code working or not

brittle pasture
#

Those other mods I believe don't make those item minerals at all

crude plank
#

Ah i see, so the other minerals i've seen are just "Type": "Basic" with a custom category

#

thank you!

tough crater
#

I got the code loading again! I don't know what the issue even was originally in the code but as long as it builds 😭

golden basin
#

whats the number for the flour mill machine? does anyone know? i cannot figure it out

tawny ore
#

Flour Mill building? I don't recall a machine.

golden basin
#

oo i see hmm

tawny ore
golden basin
#

thank you!!!

golden basin
#

i think i may have it

#

nope!

drowsy pewter
#

It's finicky, you should probably show your code if you're stuck

golden basin
#

okay let me do that

#
      "Action": "EditData",
      "Target": "Data/Buildings",
      "TargetField": [
        "Mill",
        "ItemConversions"
      ],
      "Entries": {
        "{{ModID}}_AdauulaFlour": {
          "Id": "{{ModID}}_AdauulaFlour",
          "SourceChest": "Input",
          "DestinationChest": "Output",
          "RequiredTags": [
         "fc_mill_item"
          ],
          "ProducedItems": [
            {
              "ItemId": "(O){{ModID}}_AdauulaFlour",
              "MinStack": 2
            },
          ],
          "MaxDailyConversions": -1
        }
      }
    },```
drowsy pewter
#

Whats not working about it? Did it take the item? Did it not give you an output the next day? Is the file being included? etc

golden basin
#

so the file is included, its saying the item cant be milled

#

the item is a adauulastalk

drowsy pewter
#

and it has the context tag?

golden basin
#

"fc_mill_item"

drowsy pewter
#

I don't spot any issues

golden basin
#

letme restart my game then

#

it works!!!

oblique meadow
#

Can someone help me because i've hit a wall. The rockslide blocking the path to the train station in spring Y1 looks like the below. I cannot find these tiles on any tilesheet. Im trying to create something similar looking and would like to use the tiles

velvet narwhal
#

Cursors

tawny ore
#

The answer is almost always Cursors

oblique meadow
#

You both are my hero. Thank you! It was driving me crazy

round dock
#

Question, you can send seasonal letters just thru CP rn? I'm debating on using MFM but I'm wondering if all that I can just do with CP

#

Like it gets triggered, say every 5th of the season

lucid iron
#

You would use trigger actions for that

#

Using a gsq to check the day then send mail overnight

#

No additional thingymajig required

tiny zealot
patent lanceBOT
#
#6218

It's not in Cursors
There's no way it's in Cursors
... it was in Cursors

round dock
#

Thanks chu! Let me just do some quick fixes, would you mind if I ping you in my thread later to show you if it looks about right? aniChickLove

reef kiln
#

I am trying to add the shop I created to the map via tiled. is this not correct?

tiny zealot
#

that looks right if your shop is called KMF.blackmarket in the shop data. make sure your object

  1. is on the Buildings object layer
  2. is exactly lined up on the grid (it's Shift or Ctrl, i forget which)
  3. has the Name "TileData"
    and make sure you also have a map tile on the Buildings tile layer
inland apex
lucid iron
#

You must add it

#

The parsnip is default

tiny zealot
lucid iron
#

Kisaa's wildflower acres farm has starter packages if u want example

inland apex
#

Thank you!!

lucid iron
#

Do note that there's no convenient way to apply ur mod to modded additional farms, but that's presumably fine

flat sluice
#

Hi,
I'd like to ask - when coding an event, I ran into a problem I never saw before - " at the start and end of text. Issue is on the included picture.
I do recall that my event (its quickQuestion/ part(https://stardewvalleywiki.com/Modding:Event_data#Basic_format)) is not coded properly, and it won't work (as shown in the included log).
Could someone help me, please?

Log: https://smapi.io/log/d208ffdbf5084a9397b4817ca3fca41d
Events file (linking to proper lines): https://smapi.io/json/content-patcher/ee7abcc1a6724707b95a0c3eb7e9a383#L19
I18n file (linking to proper lines): https://smapi.io/json/i18n/cc474c1c166b4b3886c45f1b5b48c720#L366

Stardew Valley Wiki

← Index

ocean sailBOT
#

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

brittle ledge
#

Which event is the screenshot from? Or are all of them doing it?

calm nebula
#

You don't need the quote marks you added

#

Quick question splits on the (break)

flat sluice
flat sluice
flat sluice
#

Because this try is like... 10th one and I already tried using (break), but than it would load only the first answer. Its code, which, by the way, isn't doing that problem on the picture, is below:
"Eleanor_2hearts/e EleanorIntro/f Eleanor 500/t 600 1200": "none/21 27/farmer 21 20 2 Eleanor 16 30 1/skippable/pause 1111/Move farmer 0 10 2 true/pause 4444/textAboveHead Eleanor \"{{i18n:2h.0 |PlayerName={{PlayerName}}}}\"/pause 500/emote farmer 8/pause 500/faceDirection farmer 0 true/pause 500/faceDirection farmer 1 true/pause 500/faceDirection farmer 2 true/pause 500/faceDirection farmer 3 true/pause 500/faceDirection farmer 2 true/pause 250/emote Eleanor 40/pause 500/speak Eleanor \"{{i18n:2h.1 |PlayerName={{PlayerName}}}}\"/pause 500/faceDirection farmer 3 true/pause 1111/emote farmer 16/pause 500/speak Eleanor \"{{i18n:2h.2 |PlayerName={{PlayerName}}}}\"/pause 750/emote farmer 60/pause 500/quickQuestion {{i18n:2h.3 |PlayerName={{PlayerName}}}}#{{i18n:2h.3_yes |PlayerName={{PlayerName}}}}#{{i18n:2h.3_no |PlayerName={{PlayerName}}}}/end\\(break)\\/friendship Eleanor 200/speak Eleanor \"{{i18n:2h.4_yes |PlayerName={{PlayerName}}}}\"/pause 2500/speak Eleanor \"{{i18n:2h.5 |PlayerName={{PlayerName}}}}\"/end\\(break)\\/friendship Eleanor -350/speak Eleanor \"{{i18n:2h.4_no |PlayerName={{PlayerName}}}}\"/pause 2500/speak Eleanor \"{{i18n:2h.5 |PlayerName={{PlayerName}}}}\"/end"

calm nebula
molten ruin
#

Hiiiiii, I'm barely starting in terms of modding and, well, I'm encountering a small issue. I tried troubleshooting it with a few friends but I'm at my wits end. Mostly, I'm trying to add a new pet to Stardew Valley, it's a skeleton. I've tried to set BarkSound, ContentSound and BarkOverride to "cowboy_monsterDie", but the skeleton keeps meowing whenever I interact with him. I probably missed something, somewhere? Or I'm approaching it from the wrong angle 😅

#

(I'm not in any rush and I'm sorry if I'm interrupting a discussion).

flat sluice
# calm nebula

That "? That one has to be there, so it would load i18n key correctly, or am I wrong?

flat sluice
rancid temple
#

The quotes aren't necessary to load an i18n, they're tokens that get replaced with strings

#

You would only need quotes inside an event if you were using one of the commands that takes quoted text

wanton pebble
#

\"

tiny zealot
#

speak needs the \"s

wanton pebble
flat sluice
tiny zealot
wanton pebble
#

No \" is doom

#

I mean the escapes are as previous, your code above has the beginning \"

flat sluice
wanton pebble
#

Just not before the quickquestion i18n

#

Which is what atra pointed out

#

Just for the record, typing that character sequence on mobile suuuuuucks

rancid temple
wanton pebble
#

So don't make me lose the \" from my clipboard XD

rancid temple
#

Copy paste it SMCKekLmaoDog

#

Never copy anything else

wanton pebble
#

Ye that's what I'm doing for now

rancid temple
#

I actually wonder if mobile has ditto (looks like not, sad)

flat sluice
# wanton pebble Just not before the quickquestion i18n

So I should edit .../pause 500/quickQuestion \"{{i18n:2h.3 |PlayerName={{PlayerName}}}}\"#\"{{i18n:2h.3_yes |PlayerName={{PlayerName}}}}\"#... to .../pause 500/quickQuestion {{i18n:2h.3 |PlayerName={{PlayerName}}}}#\"{{i18n:2h.3_yes |PlayerName={{PlayerName}}}}\"#... or how?

flat sluice
velvet narwhal
#

i have been summoned(?)

final sequoia
#

So if you have an event that starts on the Farm (when player leaves their house), the actor/character will always default looking forward? I made an event that works as intended, eventually, but they're supposed to start looking down. I am assuming this is the situation?

gentle rose
#

hello summoned, I’m bored

flat sluice
velvet narwhal
#

i just woke up so give me a second to backread

wanton pebble
#

You correctly added it before the qq

#

You shouldn't remove it from elsewhere

flat sluice
velvet narwhal
#

/speak Eleanor \"{{i18n:Intro.0 |PlayerName={{PlayerName}}}}\" missing that last double quote

wanton pebble
#

That too

#

Close escape exactly how you open it

brittle ledge
wanton pebble
#

I'm hoping that's a typo

wanton pebble
brittle ledge
#

(if I ever vanish mid-convo, assume I had to go back to work SBVLmaoDog )

gentle rose
#

I am currently watching the beagle, who is being a PEST

velvet narwhal
#

so there's some caveats when you're doing quickQuestion as well, if it's all in a single i18n key, you can throw away the \" \" entirely, and you'd put the # breaks inside of the i18n key

quickQuestion {{i18n:Lance.3Heart.03.q}}

i18n: "Lance.3Heart.03.q": "Out in the deep mines?#I've already handled that!#I could go and check?#Do you mind if I go with you?"

#

if that makes it easier on you in the long run, that's how i format all of my quickQuestions if i can help it

flat sluice
# velvet narwhal `/speak Eleanor \"{{i18n:Intro.0 |PlayerName={{PlayerName}}}}\"` missing that la...

What?! But if I will use the whole original code
"Eleanor_Intro/e 112": "none/-1000 -1000/farmer 2 2 2 Eleanor 3 3 0/skippable/pause 1111/speak Eleanor \"{{i18n:Intro.0 |PlayerName={{PlayerName}}}}\"/pause 222/emote farmer 40/pause 222/emote farmer 8/pause 222/speak Eleanor \"{{i18n:Intro.1 |PlayerName={{PlayerName}}}}\"/pause 222/speak Eleanor \"{{i18n:Intro.2 |PlayerName={{PlayerName}}}}\"/pause 222/speak Eleanor \"{{i18n:Intro.3 |PlayerName={{PlayerName}}}}\"/pause 222/speak Eleanor \"{{i18n:Intro.4|PlayerName={{PlayerName}}}}\"/pause 2222/end"
the event works fully OK, without any errors/warnings.

velvet narwhal
#

your script there is correct

#

it was probably just the copy paste that you were missing a last "

gentle rose
#

yeah, the full one has the double quote they were talking about

flat sluice
velvet narwhal
#

go ahead

#

i don't remember if i put it in my tutorial

#

there's nothing inherently wrong with copying other's cp scripts KEK

gentle rose
#

I was going to attempt making some art assets for the mod author bomb mod, and then I made a procreate brush to use in pixel art and got bored SBVLmaoDog

#

idk how you guys do it

velvet narwhal
#

procreate...

#

it lagged every time i used it

gentle rose
#

every art app is a pixel art app if you make your canvas small enough

hard fern
#

hi i have questions... about cts SDVpufferlurk

velvet narwhal
#

go ahead

gentle rose
#

Contrast Tomography scans?

hard fern
#

so... like i kno you can make an event have a ct with it,

gentle rose
#

why do I know what ct stands for, anyway

hard fern
#

and as long as it's within the duration of a CT, any npc you give dialogue to will have something to say, but

#

once you talk to that npc, they just go back to their regular dialogue, right?

tough crater
#

yup! that's how conversation topics work

flat sluice
tough crater
#

you can also change the duration of a conversation topic (with limitations)

hard fern
#

so, i want my npc to not have their regular dialogue until a week after seeing a certain event, but with a ct, they'll only have the special ct dialogue for a day, then go back to normal, which i dont want

#

do i just make like 7 different CTs

flat sluice
tough crater
#

I think so. You'd need to list the other mod as a dependency in order for them to work in yours I think

velvet narwhal
#

sorry i was responding to emails

velvet narwhal
flat sluice
velvet narwhal
wanton pebble
#

You don't have to give a damn at all about cts if you don't want to

flat sluice
hard fern
#

betas, i see....

wanton pebble
#

Basically I can make a CT and you won't be affected unless you define the CT dialogue in your NPC's dialogue file

#

So if you put a dialogue key resourcerot in your file, then if you have PoaSB then they'll fire it during the wizard plot

#

But if not, resourcerot doesn't matter to you

valid snow
#

Does anyone know if there is a token or other trigger for taking off the farmers shirts/clothes? I made a mod forever ago that changes the farmer's sleeves depending on season/weather and some of the sleeves change the arm shape which looks crazy when the shirt is taken off.

onyx flame
#

hello guys, I just want to double check, vanilla daily luck without buffs is just -0.1 to 0.1 right? Thx

velvet narwhal
#

afaik you'd have to hard "When": {} patch during the season

#

so it'd be "Season": "Winter" iirc

hard fern
velvet narwhal
#

uhh

#

so my trigger is the CT, if the CT is up, trigger a specific set of dialogue keys

#

they're at random, so i haven't cared about repeat messages

hard fern
#

hm

#

i want mine to be like, whats the word

#

progressive

#

(?)

wanton pebble
#

Hmmmmmmmm

velvet narwhal
#

yeah makes sense

#

you can do it the hard way with incrementstat

wanton pebble
#

CTs can be run multiple times right?

velvet narwhal
#

suspicious i think so

hard fern
#

so thats why i was thinking to make a CT that just kept triggering another CT until it was as many as i wanted

#

😅

velvet narwhal
#

i mean that is technically the easier way

wanton pebble
#

I might utilize that later

velvet narwhal
#

nothing stopping you from naming it things like CT1/CT2/CT3/CT4

flat sluice
velvet narwhal
#

uhhhhhhh

brittle ledge
velvet narwhal
#

all of my events are kind of convoluted

#

so i wouldn't suggest it KEK

#

actually this one might be the tamer ones, lemme just upload to json

brittle ledge
tiny zealot
velvet narwhal
#

yeah npc dad went through painstaking process of seeing how the memory stuff worked too KEK

wanton pebble
#

I know resourcerot off the top of my head, poasb has a couple other for main quest. I don't think the others have CTs

velvet narwhal
#

i need to, uh, keep notes on all of the CTs i create ig

brittle ledge
#

Yes

flat sluice
acoustic summit
#

Someone on my mod page is saying custom tools don't require spacecore now, and for me make my mod without spacecore depedency as spacecore crashes their game. Is this true? They said "it's also not needed with the games new built in modding tools". Just wondering if anyone here knows about this

hard fern
#

umm well i can't speak on the tools part

#

but spacecore shouldnt be crashing their game

acoustic summit
#

Ikr, they don't believe me that spacecore is working in 1.6.10 haha

hard fern
#

if they won't listen to you, then...

proud wyvern
#

afaik while you can technically make a new custom tool, you still can't make a new subclass for one, as that will destroy your save file. SpaceCore is what lets you handle that

#

also that person is probably on Android SMAPI

acoustic summit
#

Yeah the serializer

#

The tool is a pretty funky one which needs custom logic, so unless theres some other way to serialize the subclass "built in" I guess tough luck to them

drowsy pewter
#

users just make stuff up

hard fern
#

if they're on android, shouldnt that be something to report to the android smapi discord?

acoustic summit
#

Or to spacecore, idk how it got to me

hard fern
#

instead of insisting you change something in your mod

proud wyvern
#

they probably know very well SpaceCore doesn't work on Android atm

#

(and honestly probably won't work anytime soon, if ever)

acoustic summit
#

Whats odd is they said spacecore does work on 1.5.6

drowsy pewter
#

well the android SMAPI for 1.5 and 1.6 are made by two different people

proud wyvern
#

ofc, 1.5.6 and 1.6 are different beasts on Android

hard fern
#

1.5.6 was the last time i remember android modding working properly, and someone had to make a new 1.6 android smapi

drowsy pewter
#

the 1.6 SMAPI is, lets just say, new

proud wyvern
#

the problem is, SpaceCore switched to using local variable names for its transpilers. these come from the .pdb files. i don't think that file is a thing on Android

#

Android SMAPI would specifically have to replace SpaceCore's transpilers with custom patches

#

not very maintainable

acoustic summit
#

Yeah, I don't think I can satisfy that person's request. Sorry bhy

lucid iron
#

Spacecore has the scary yellow warning at the start cus it touch save serialize blobcatgooglyblep

#

I do think the bug net tool u have could theoretically be done as a weapon and a dozen harmony patches but i too would simply go for save serialize and custom subclass monS

final arch
#

smapi android for 1.6 exists? 👀

drowsy pewter
#

its recent

calm nebula
#

Sheku realizing that RSV on android might have to happen SDVkrobusgiggle

wanton pebble
#

Nah

#

RSV for android shouldn't need to happen

#

But yes... android smapi for 1.6 exists. We direct people to the android smapi server now

onyx flame
#

I feel like im making negative progress trying to get harmony transpiler working. reenaphread I need to find examples

onyx flame
#

thx

frigid hollow
#

iirc RSV works on android from what i've heard

#

if you have the ram ofc

blissful panther
mighty quest
#

I'm trying to get the cursor position in CursorMovedEvent but for some reason the coordinates come out wrong? Anyone know what's that about?

CursorMovedEvent:

Log.D($"{Game1.getMouseX()}, {Game1.getMouseY()}");
Log.D($"{e.NewPosition.GetScaledScreenPixels().X}, {e.NewPosition.GetScaledScreenPixels().Y}");

Both print the same coordinates, so they're in agreement. But different from the below:

RenderedHudEvent:

e.SpriteBatch.DrawString(Game1.dialogueFont, $"{Game1.getMouseX()}, {Game1.getMouseY()}", new Vector2(33f, 33f + yOffset), Color.White);

Here the coordinates are correct.

blissful panther
#

In that event, it's probably because it's getting UI zoom level coordinates.

#
public static int getMouseX()
{
    return Game1.getMouseX(Game1.uiMode);
}
public static int getMouseX(bool ui_scale)
{
    if (ui_scale)
    {
        return (int)((float)Game1.input.GetMouseState().X / Game1.options.uiScale);
    }
    return (int)((float)Game1.input.GetMouseState().X * (1f / Game1.options.zoomLevel));
}
mighty quest
#

hmm let me try non-scaled screen pixels

blissful panther
#

Although you'd think in the HUD rendered it would be the... same...

mighty quest
#
Log.D($"{Game1.getMouseX()}, {Game1.getMouseY()}");
Log.D($"{e.NewPosition.GetScaledScreenPixels().X}, {e.NewPosition.GetScaledScreenPixels().Y}");
Log.D($"{e.NewPosition.ScreenPixels.X}, {e.NewPosition.ScreenPixels.Y}");

these all print the same

#

ill just try dividing the zoom scale manually

#

oh wait I can just send a flag to the method

#

ok, sending (true) as a param fixed it!

#

thank you!

old edge
#

just finished implementing C# for my dream cellar mod. Wild ride.

high maple
#

Hello! I'm trying to convert a custom bed mod that uses the custom furniture mod to content patcher and I'm having trouble with the bed spritesheets. I looked into how the default beds are created in the furniture file but in game it looks like the bed's sprite has been shifted down by one tile. I even tried comparing my code to another content patcher furniture mod I have installed that added a bed and tried doing it differently but the issue is till there.

Right now I have it done like this (I have tried using both the "bed" and the "bed double" types and the issue is the same)
"{{ModId}}_round_bed_1": "{{ModId}}_round_bed_1/bed/3 4/3 3/1/100/-1/{{i18n:round_bed_1.name}}/0/Mods\\{{ModId}}\\round_bed_1

Does anyone know how I can fix it?

hallow prism
#

how is your image?

wanton pebble
#

Remind me in 5 hours to try and update Saloon Breakfast

patent lanceBOT
#

How Can Time Be Real If Our Timers Aren't Real? (#6466909) (5h | <t:1736480574>)

wanton pebble
#

Remind me in 25 hours to update Saloon Breakfast if not done previously

patent lanceBOT
#

all right agentlyoko but next time you better bring me 20 nirnroot or i ain't doin it (#6466911) (25h | <t:1736552590>)

wanton pebble
#

It looks like I may have... accidentally.... dummied out some CT dialogue

#

Thanks for having me look at them, tia XD

pine ermine
next quarry
#

does LogLevel.Debug show up for normal Smapi version or only in the dev version?

uncut viper
#

debug will show up

#

its Trace that gets hidden

next quarry
#

thank you!

dim yew
#

Would anyone happen to know what the frame # for the farmer’s left kissing sprite is? I kinda forgot where the farmer sprite sheet is

dim yew
#

Does 101 work for facing left in an event? I was under the impression that it didn’t

#

Which is why I was looking for a different one lol

#

but if it doesn’t it’s nbd I can just flip the characters around

tough crater
#

I think the code is able to flip it

next quarry
#

am I doing something wrong here?
I want the chat width to be smaller but it's not changing anything

Game1.chatBox.width = Game1.chatBox.width /2;

I can move the chatbox around if I change "Game1.chatBox.xPositionOnScreen" in the same function SDVthinking

gentle rose
#

what file are npc heart events in? I can never remember these things 😭

uncut viper
#

theyre just in the normal location files

next quarry
velvet narwhal
uncut viper
#

or well, it is, but probably uses chatBoxWidth instead

next quarry
#

oh

uncut viper
#

like, as a constant

#

stardew UI loves constants

#

where are you changing the Width?

next quarry
#

OnSaveLoaded

#

I also tried OnRenderingHud but I never used that before

uncut viper
#

hmm

#

well it does actually seem to use the Width parameter so it should be updating, and the constant is just used in updatePosition

#

but that should only happen after the game window is resized

#

are you changing the window size at all after the save is loaded?

#

like the overall stardew game window

next quarry
#

no I don't

#

should I?

uncut viper
#

oh that does actually fire in GameLocation.resetLocalState too

#

so its probably just being reset to 896 constantly

#

so doing it on save loaded alone is not enough

next quarry
#

so on tick?

uncut viper
#

thatd probably work but it'd probably be doing it a lot more often than is necessary

#

but its also not like its really much of an operation anyway

#

are you already using Harmony in your mod

#

(if you arent its not really worth it to start for this but you could alternatively just patch ChatBox.updatePosition)

next quarry
#

this might be silly but I don't know what you mean by Harmony SDVpuffershy
I just got back into modding C# and not just contentPatcher

uncut viper
#

Harmony is a library that lets mods run code (most commonly) before, after, or in the middle of vanilla game functions

#

i wouldnt worry about it until you need it though

next quarry
#

I see

#

also thank you!

tough crater
#

I know this is a silly question, but are we allowed to reuse vanilla textures in new tilesheets? Let's say I wanna use a tile of a book, but the pixels aren't aligned with how I want things to look. Would I be able to put it on a new tilesheet with the proper positioning?

uncut viper
#

you can but it wont be recolour compatible

tough crater
#

Alrighty 😎

next quarry
#

... @uncut viper

Game1.chatBox.chatBox.Width = 700;

worked 💀

uncut viper
#

everyone loves working with native stardew ui

dim yew
#

Hi gang. For some reason my farmer is always facing right when I try to use showFrame 101 in one event, but in my other event using faceDirection farmer 3 and then using showFrame 101 causes them to kiss left. I have no idea why this is

#

I copy and pasted the commands and it still doesn’t work 🤣

velvet narwhal
#

farmer showFrame allows true for flip

dim yew
#

OMFG how did i forget that

velvet narwhal
#

showframe for an actual npc will not flip

dim yew
#

I’m losing my mind 💔

#

Thank you! Haha

velvet narwhal
#

is ok, i never had one

dim yew
#

So fair 🤣

uncut viper
#

showKissFrame will let you flip though for an NPC

shut edge
#

anyone know what determines if the F1 info can state what mod an item is from? I'm noticing some mods do it and some do not.

uncut viper
#

they need to follow the mod id convention

#

<ModId>_ItemName

shut edge
#

ah is that it, ok

uncut viper
#

if the mod unique ID prefix matches a loaded mod it shows the mod its from

shut edge
#

that makes sense

shut edge
#

ah damn, is there a smart way to delete animals that no longer exist from a barn that no longer exists?

uncut viper
#

can you elaborate

#

what is there to delete if they dont exist

shut edge
#

i'm workin on my mammoths and i renamed all the IDs to have ModID

#

so the ones i had previously are still "there" but point to nothing

uncut viper
#

hm

shut edge
#

can't delete the old barn cuz they're in it

uncut viper
#

does sleeping a day remove them?

tough crater
#

Oh, it's like how when I removed Fashion Sense and I couldn't remove the Hand Mirror, no matter how many times I tries to drop or sell or trash it

shut edge
#

sleeping seems to throw the game into a redline frenzy

#

dang

tough crater
#

The only way to "fix" what I experienced was to reinstall fashion sense, trash the mirror, then uninstall fashion sense again lol

shut edge
#

guess i can revert and delete but i run into this often lol

tough crater
shut edge
#

yea

uncut viper
#

maybe debug killall using the old animals internal name?

#

or

#

actually idk how that command works

#

double check it before running it willy nilly lol

shut edge
#

yeah i did smapi's help command and didn't see that in there so shrug

#

i'll just revert a sec

uncut viper
#

i might have it backwards and you can only put a name to not kill

shut edge
#

trying to get meat and extra animal config stuff to all do what i want

#

not going so hot! lol

uncut viper
#

debug fixanimals might also work

shut edge
#

i do think i tried that, dunno

#

maybe i'm missing a setting to enable more commands

uncut viper
#

debug removebuildings should also do it

#

do you not have console commands installed

shut edge
#

maybe i don't

#

i did just trim this modlist way down for testing

sharp moon
#

hi guys im kind of a noob to modding stardew valley and dont rly know where to start lol but what is the best program 2 use to make a new area to the game ?

#

without replacing anything i mean

ocean sailBOT
#

If you want to make mods that add or edit maps:

  1. Use Tiled to edit .tmx or .tbin files.

  2. Refer to the Maps wiki page for details on how maps work in Stardew Valley.

  3. Content Patcher allows you to create custom locations through editing Data/Locations

  4. Vanilla Maps can be edited via Content Patcher as well: EditMap

shut edge
#

tiled for maps

uncut viper
#

!startmodding

ocean sailBOT
#

Making mods can be broadly divided into two categories:

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

uncut viper
#

Tiled + Content Patcher

sharp moon
#

okkk thanks

shut edge
#

turns out loading 37~ mods is faster than 300 wow mind blown

tough crater
#

The more I stare at C#, the more I slowly understand what's happening. It's harder reading this than when I was trying to figure out JSON lol

orchid patrol
#

I am back with my dinosaurs LMAO

I have everything core-wise how I'd like. But I'm curious if CP can retexture the ostrich incubator only when a dinosaur egg is in it? It's really just cosmetic but I'm curious

uncut viper
#

i mean that makes sense. C# is wildly different from json

gaunt orbit
#

Well, that makes sense. Json is just data storage, and you're limited to whatever the thing using it can do while c# is a full-fat programming language, so naturally it's much more complicated.

shut edge
#

am i blind here

#

this is now no longer working as an interior map after i changed to {{ModID}} s

drowsy pewter
gaunt orbit
uncut viper
shut edge
#

well

#

this is tellign me an error, so lol

#

that's prob it

gaunt orbit
#

You can should not use CustomLocations in 1.6

drowsy pewter
shut edge
#

you can't mod ID location names?

uncut viper
#

you cannot use tokens in customlocations

shut edge
#

oh did it change

uncut viper
#

it was always like that

#

you should not use CustomLocations

shut edge
#

alright, what's the modern methodology?

tough crater
gaunt orbit
shut edge
#

ahh ok

#

thanks

uncut viper
#

for instanced buildings you dont usually need a location either

gaunt orbit
#

[[Modding:Location_data]]

uncut viper
#

just a Map

gaunt orbit
#

Yes, you only need to create a location if it's like the greenhouse, where there's only one interior

uncut viper
#

you only need a Location for a building if you want all buildings of that type to lead to the same place

#

like the same exact place

shut edge
#

is there another method for barns etc then?

#

somehow i am like 4 animal mods deep without learning any of this lol

uncut viper
#

just Load your map to Maps/{{ModId}}_DinoBarnInterior

shut edge
#

i'll give it a shot, thanks

uncut viper
#

CustomLocations has been deprecated since 1.6 came out

shut edge
#

can i just throw that in with the pngs or does it need another section ?

uncut viper
#

you can put your patches wherever you want

#

also after looking at it, i cant blame you for not realizing the tokens thing, really

#

the docs say CustomLocations cannot use tokens and then literally uses a token in the example below that

shut edge
#

tbh i don't even really understand what is and is not a token

uncut viper
#

{{This}} is a token

shut edge
#

i mostly just look at existing jsons and hammer things into place lol

uncut viper
#

things in double braces

shut edge
#

this look better?

uncut viper
#

looks right to me

shut edge
#

cool, i'll fire it up

uncut viper
#

theres an extra space at the front of the Target but that shouldnt matter thats more just a "is this gonna bother you" thing lol

shut edge
#

lol

#

well wtf

#

still doin this

#

oh

#

i think i did the map name wrong prob

#

it's just DinoBarnInterior.tmx yea

#

so i prob told it to load it with a token name that isnt' there?

uncut viper
#

a picture of an error that doesnt even show the most important part of the error is also not very good for future reference

shut edge
#

yeah sorry

#

[Content Patcher] Can't apply load "SNES Livestock Dinos > Load map" to Maps/cryomancer.livestockdinos_DinoBarnInterior: the FromFile file 'assets\cryomancer.livestockdinos_DinoBarnInterior.tmx' doesn't exist.

#

ok yes that is the problem

uncut viper
#

you can replace the TargetWithoutPath token if you wanna just write DinoBarnInterior if you want

#

or you can rename the file itself

gaunt orbit
#

Does InternalAssetKey work properly with maps? If so, that could be an easy option

shut edge
#

"Target": "Maps/{{ModId}}_DinoBarnInterior",
"FromFile": "assets/DinoBarnInterior.tmx"

#

this worked

uncut viper
#

it should, InternalAssetKey is just a shortcut for a SMAPI asset name

shut edge
#

am i doing this correctly now? lol

uncut viper
#

as far as i can tell yeah

finite sequoia
#

So I used to have this problem, then it stopped, and now I have it again; sometimes, the NPCs at festivals are using the wrong sprites and aren't facing the right direction until I talk to them: here, for example, Sonia is in mermaid form and facing forward until I talk to her, when she switches to her proper sprite and direction afterward

#

Anyone know why this happens?

shut edge
#

mammoths gonna make me insane i swear

uncut viper
#

well did the mod actually load

#

or did it error and not load

shut edge
#

good question

#

[SMAPI] Loaded 12 content packs:
[SMAPI] (AHM) Livestock Dinos 1.0.0 by cryomancer | for Animal Husbandry Mod | meats for mammoths and such.

shadow pagoda
#

Is there a place I can get the construction building's (and upgrades including farm house upgrades) costs and materials given the name of the said construction request? For example, if I this hypothetical method the string "Shed", I would like some sort of object like this

cost: 15,000 (int)
wood: 300

The string "Big Shed" would return

cost: 20,000 (int)
wood: 550
stone: 300

If possible, I would also like this method to return the prereq building needed in order to build this building. For "Shed" this would be null, and for "Big Shed", it would be "Shed". I assume this would be in some sort of data object, but I'm unsure where this would be

uncut viper
#

i would double check you're editing the right folder then and not only working in a working folder or smth

#

or if you changed the uniqueid while the game was running, that aint gonna do anything

shut edge
#

will do

uncut viper
calm nebula
#

Has anyone made the mod where, if you marry into Robin's family. You get a discount?

uncut viper
#

do you not want to support your mother in laws business

shut edge
#

oops

#

is that....supposed to happen? lol

next quarry
#

shoot, I made a mod and just check that there was already a similar one 💀

uncut viper
#

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

shut edge
#

def still have some kind of disconnect between my animal and AHM, hmm

#

prob made my files wrong somehow

next quarry
#

that is very cute SDVkrobushappy

shut edge
#

"Invalid type. Expected Object but got Array." straight from the example pack even, eh

#

guess i'll check another mod

uncut viper
#

what example pack?

shut edge
#

animal husbandry

#

i guess the error is just cuz i was checking it with CP mode on

calm nebula
#

My money is ehr money

old edge
#

I think it should encourage others to spend more time on their mods.

shut edge
#

yeah, nothing wrong with having options

#

ok, mammoths successfully fed treats

#

progress

#

brown mammoths can be turned to meat but not white or black eh

#

weird

#

oh i bet i know why

#

ok yes, solved. so my husbandry stuff is done, on to extra animal config fuckery

#

which is....sort of working. except these all want shears, lol

tiny zealot
shut edge
#

i get doubled NPCs often, it's weird

#

usually susan and mateo

old edge
#

if you search cellar on nexusmods theirs a ton too choose from.

finite sequoia
#

For Coal Point I had to do some bs with making NPCs only face like, down or to the right, and that's working with Malha rn except for during the Jellies...

tiny zealot
#

i thought i recognized a malha NPC! are you and squiddonaut collaborating on it? 👀

finite sequoia
#

Yeah! I'm helping him finish out since I want to marry Ryden I love mermaids!

uncut viper
#

very selfless

finite sequoia
#

I'm currently working on festivals and I'm like 80% of the way there lol, it's just the Luau and I just won't touch flower dance rn because of the new art

drowsy pewter
#

I hear some underwater scenes are in order

shut edge
#

speaking of NPC collabs are you still wanting to make lucca for me @tiny zealot ? SDVkrobusgiggle

#

(no pressure just askin)

tiny zealot
finite sequoia
tiny zealot
shut edge
#

that's ok

#

it's enabled me to not work on her mod!! lol

old edge
#

finished my mod now to work on my other ones. I have a playlist for this.

shut edge
#

brains be like "yes screwing around with animal jsons for a week is a better time than writing dialog"

tiny zealot
#

WIP Mountain comes for us all, eh

shut edge
#

ideas are always gonna be easier than implementations

velvet narwhal
#

the trick is to make the wips all correlate to each other so it feels like you're constantly making progress on the one thing

shut edge
#

that's what i am doing!

#

i want regions/npcs etc with these animals as options so hey, do the animals now as standalones!

gaunt orbit
shut edge
#

lol

gentle rose
#

37 plus a few zeros maybe 😭

#

you commented out 17 methods

shut edge
#

gonna hit the leaderboard for commas missed

gaunt orbit
#

I don't usually comment out methods, I typically just delete them bc I can get them back from git later if I really need to

rigid oriole
#

You deleted 300 lines of code you then realized you actually wanted to keep

old edge
#

3000 failed build attempts

shut edge
#

leaving bugged out stuff running to grind out more redlines for the collection

gentle rose
#

you accidentally tried to build a mod while the game was running 23 times

shut edge
#

hours of idle game cuz you forgot you left it on while working on something

teal bridge
#

(WAI)

shut edge
#

if i want to comment out an item i'm adding, do i have to // every line or can i do just the first part

uncut viper
#

every line

#

or you can use /* for multiline comments

#

so you'd have to put /* at the start and */ at the end of what you want to comment

shut edge
#

cool

#

thank you

#

that look right?

uncut viper
#

probably

velvet narwhal
#

steam already called me out on the amount of times i was debugging, i don't need vs to tell me too

teal bridge
#

I was going to say "the syntax highlighting will tell you if it's right" but apparently it won't.

shut edge
#

think i've got some brackets off here anyway

uncut viper
#

the wild wild west of nonstandard json, you're on your own without jsonc or json5 support

teal bridge
#

Isn't that a VSCode screenshot, hence JSONC?

velvet narwhal
#

that's n++

uncut viper
#

thats N++ but idk why VSCode would imply jsonc either?

shut edge
#

yea

#

i am a caveman rubbin sticks over here

gentle rose
#

but it does have jsonc (which even allows trailing commas with just a yellow squiggle instead of a red one)

teal bridge
uncut viper
#

i still use N++ for all my jsons and just use it stock

#

do as i say not as i do, though

velvet narwhal
#

the bright red comments are too hard on my eyes so i just always work in vs

teal bridge
#

So do I, but I know JSON syntax like the back of my hand and have never missed a brace.

uncut viper
#

or even individual colours

teal bridge
#

For those who have more difficulty and really need the help of the syntax highlighting, it's good to have the syntax highlighting be correct

uncut viper
#

i agree

old edge
#

In 2024 I only ran 1 game on steam, stardew

half tangle
#

How do I convert my data model into a JSON string? I can use this.Helper.Data.WriteJsonFile("data.json", model); to write it to a file, but I don't want to do that - I want the string that would go into the file.

I actually want to attach data to an item and figure attaching it to the item's modData field using something like the above is the way to do it, but if there's a better one I'd be happy to know.

calm nebula
#

Reference newtonsoft

uncut viper
#

newtonsoft will probably be helpful for serializing your classes

half tangle
#

oh... actually reference newtonsoft

gaunt orbit
gaunt orbit
strange dew
#

im trying to make a new shop but im lost x.x i have my shop data (owners, items, etc) and my map tmx file. how the heck do I actually add my shop to the area on the map?

gaunt orbit
#

from the wiki

#

and you want to put that on tiledata on the buildings layer where you want the shop to open

tawny ore
half tangle
#

yeah, that makes sense. I think going the newtonsoft route is the right one here. Thanks, all!

strange dew
#

my brain is melting after writing 600+ lines of code 🫠

teal bridge
#

Any Rider folks know how to make it shut up about this? I already have the C# syntax style set to use Keyword for all built-in types, but for some reason it still throws a fit over object specifically.

tawny ore
#

I have that suppressed, but I don't recall if it's my dotsettings, .editorconfig, or globalsuppressions doing the work

#

Maybe .editorconfig resharper_built_in_type_reference_style = use_keyword

#

I'm pretty sure that's the one that is accomplishing it for me

teal bridge
#

Well, this is Rider, not ReSharper, but yeah, those are the settings I have.

tawny ore
#

They reuse the same rules either way

teal bridge
#

It works for all the primitive types like int and even string, just not object.

tawny ore
#

Oh weird, I definitely don't see those squiggles, but I have a ton of rules through trial and error so it's hard to pinpoint the one

#

I dealt with that fairly recently, let me see if I can pinpoint the commit

teal bridge
#

Don't really want to have to do this per project, either, I'm figuring there must be some other setting I'm missing that's just inconveniently located.

tawny ore
#

How about resharper_use_symbol_alias = true or something to that effect? There should be something equivalent to that setting there.

shut edge
#

part at the very end for extra produce doesn't seem to wanna work...

#

am i targeting wrong?

#

i did a patch export for the target file and it's not getting my changes

onyx flame
#

Hi all, I'm slightly confused on how to make sure my mods works in multiplayer. Let's say I wanna apply a buff to everyone online at start of day. In the OnDayStart event, Should I do

foreach (Farmer farmer in Game1.getOnlineFarmers())
    farmer.applyBuff(...)

or just

Game1.player.applyBuff(...)

i.e. is the code is only executed on the host and synced to the client or do the client execute their own code?

gaunt orbit
#

also line 878

shut edge
#

so i am, good eye

gaunt orbit
#

also you can simplify your HasMod condition to just be "HasMod": "selph.ExtraAnimalConfig"

#

you only need contains when doing an inverse match or multiple match

shut edge
#

cool

uncut viper
calm nebula
#

The first won't work

onyx flame
#

Thx guys

hard fern
#

how do I add a touch action warp with CP?

gaunt orbit
# shut edge cool

actually you can get rid of the When entirely, since the asset won't be requested if the mod isn't installed

shut edge
#

wtf

#

gonna reload cuz that's just weird

#

ok it's something to do with those when entry changes

gaunt orbit
#

what are the sprite edits for objects and craftables doing?

shut edge
#

changing the hopper into a minecart

gaunt orbit
#

oh nice!

shut edge
#

hovering kibble will be addressed later

#

and lightning still is refusing to work lol

gaunt orbit
#

that's cute

shut edge
#

thanks

#

i did something similar for my pac-man mod

#

yeah i put my whens back as i had them and it's ok now, so i dunno

#

guess it wants em that way

patent lanceBOT
shut edge
#

well, getting there

#

still not right lol

gaunt orbit
shut edge
#

what would you suggest?

gaunt orbit
#

Texture is a game asset path, so you'd either want to swap that to an InternalAssetKey or make it something unique and create a Load patch to load in the item texture

uncut viper
#

if you mean the assets/livestockdinositems, thats what they are actually loaded to

#

at the very top

gaunt orbit
#

oh, that's... likely to break

uncut viper
#

it is still not recommended, to be clear

gaunt orbit
#

I would include your mod id somewhere in the name

shut edge
#

what do i need to change to accomplish that?

#

i do appreciate the best practices advice btw

gaunt orbit
shut edge
#

and that is presmably something i should always do?

gaunt orbit
#

yes

shut edge
#

makes sense

gaunt orbit
#

that way if someone else makes a dino livestock mod they don't accidentally overwrite your stuff

pine elbow
#

https://github.com/bikinavisho/stardew-convert-to-fashion-sense anyone know if there's a video tutorial of this? I keep getting an error and i open the log and it just tells me to open the log lmao, trying to convert a png to FS

GitHub

Code run via npm that converts a hairstyles.png, JA hat, or JA shirt into a Fashion Sense pack. - GitHub - bikinavisho/stardew-convert-to-fashion-sense: Code run via npm that converts a hairstyles...

#

i did it months ago with some hairs but can't remember what i did

shut edge
#

so all of these, yeah?

gentle rose
#

I think remove the "assets" (and also the slashes, conventionally) EDIT: ignore

#

so {{ModId}}_<...>

gaunt orbit
#

no, that part is okay

gentle rose
#

ah, my bad

gaunt orbit
#

it just has to be unique

#

the underscore convention is for ids/keys

shut edge
#

which is the point of the mod ID yeah?

gaunt orbit
#

exactly

gaunt orbit
shut edge
#

this is like making a virtual folder with the mod id as it's name essentially if i am understanding

gaunt orbit
#

yes

shut edge
#

seems correct i think

#

now how do i change the load...

tiny zealot
#

well, for an event i wanted to apply some temporary map edits with changeMapTile and GameLocation.ApplyMapOverride, so i thought i would use changeToTemporaryMap first to get a new copy that would be discarded afterward. that didn't seem to work and my edits remain after the event (boo). anyone know a good approach to take instead?

gaunt orbit
#

FromFile should be left as-is

shut edge
#

like every target file individually?

#

"Action": "Load",
"Target": "{{ModId}}/assets/testtrice, {{ModId}}/assets/raptor1, {{ModId}}/assets/raptorshop, {{ModId}}/assets/mammothbrown, {{ModId}}/assets/mammothbrownsheared, {{ModId}}/assets/mammothblack, {{ModId}}/assets/mammothblacksheared, {{ModId}}/assets/mammothwhite, {{ModId}}/assets/mammothwhitesheared, {{ModId}}/assets/mammothshop, {{ModId}}/assets/DinoCave, {{ModId}}/assets/DinoCave_PaintMask, {{ModId}}/assets/mine_dino_expand, {{ModId}}/assets/livestockdinositems",
"FromFile": "assets/{{TargetWithoutPath}}.png"

gaunt orbit
# shut edge like every target file individually?

yeah, like this
{{ModId}}/assets/testtrice, {{ModId}}/assets/raptor1, {{ModId}}/assets/raptorshop, {{ModId}}/assets/mammothbrown, {{ModId}}/assets/mammothbrownsheared, {{ModId}}/assets/mammothblack, {{ModId}}/assets/mammothblacksheared, {{ModId}}/assets/mammothwhite, {{ModId}}/assets/mammothwhitesheared, {{ModId}}/assets/mammothshop, {{ModId}}/assets/DinoCave, {{ModId}}/assets/DinoCave_PaintMask, {{ModId}}/assets/mine_dino_expand, {{ModId}}/assets/livestockdinositems

shut edge
#

well that's unreadable but lol

#

ok cool

gaunt orbit
#

you could streamline it a little with dynamic tokens but I don't want to make it more complicated than it needs to be

shut edge
#

hopefully this is now like, sanity compliant

#

eac still not working quite right but progress anyway

gaunt orbit
#

looks good to me

shut edge
#

guess i'll wanna go update all my previous mods eventually

#

but that's a problem for another day

#

gotta futureproof all the other mods that wanna use the ID "Galavantin' Mushroom" etc

#

i suppose while i'm asking for advice, is my method for multi color animals the smart way to do it or not really?

gaunt orbit
#

I haven't really tinkered much with animal data, but I do know that it has a skin system you can use if you want purely cosmetic variants

shut edge
#

yeah that is a thing, isn't it

#

i should look into that

gaunt orbit
#

if you want them to have non-cosmetic variants (like brown and white chickens, which produce different types of eggs), use AlternatePurchaseTypes instead

shut edge
#

yeah that's what i've got now

#

but they're all doing the same items at least for now