#making-mods-general

1 messages ยท Page 5 of 1

cyan marsh
#

can't seem to figure out why

lucid iron
#

did you update to 4.1.0 beta

cyan marsh
#

i'm not updating to that

teal bridge
#

How old is the mod? Has it switched to ModBuildConfig?

lucid iron
#

oh it's not about getting 1.6.9 then, just 1.6 in general Bolb

cyan marsh
#

I'm restoring my mods.. I lost all the originals and I have outaded 1.6 versions

teal bridge
#

Make sure you've got <PackageReference Include="Pathoschild.Stardew.ModBuildConfig" Version="4.1.1" /> in your csproj (it doesn't have to be 4.1.1, but probably has to be 4.something).

Also probably don't need to mention this but just in case... make sure you've actually got SMAPI installed in your Steam/GOG Stardew instance, since ModBuildConfig just references what's already there.

cyan marsh
#

it's there

#
<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <Version>4.5.3</Version>
    <TargetFramework>net6.0</TargetFramework>
    <LangVersion>latest</LangVersion>
    <Nullable>enable</Nullable>
    <WarningsAsErrors>Nullable</WarningsAsErrors>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="Pathoschild.Stardew.ModBuildConfig" Version="4.1.1" />
  </ItemGroup>

  <ItemGroup>
    <Folder Include="Properties\" />
  </ItemGroup>
</Project>```
#

maybe you see something wrong elsewhere?

teal bridge
#

What do your dependencies expand to? Should be similar to below.

cyan marsh
teal bridge
#

Yeah, those exclamation marks are not good, means they're not pointing to valid locations.

#

Hover over to see what the error is.

cyan marsh
#

which is weird.. i have SDV in the same place

teal bridge
#

If you click on one, it will tell you the path it's trying to use in the property sheet.

#

Everything else looks OK to me, it's the right .NET version and all. So I think it just can't find your Stardew installation.

lucid iron
#

may need to set the GamePath property explicitly

teal bridge
#

Yeah, if it is indeed because of a wrong path.

lucid iron
#
  <PropertyGroup>
    <GamePath>SDV/is/here</GamePath>
  </PropertyGroup>
teal bridge
#

Though I've never had to do that, and I'd expect to have the most problems since I'm GOG. You should only have to explicitly specify GamePath if you did a "manual install" of the game or copied it to a different folder.

#

(Actually, hovering over the exclamation mark might not do anything, I just checked. But you can still check the path in properties.)

brittle ledge
#

Strings are basically dialogue with a different target, they're easy SDVpuffersquee

inland cedar
#

should farmhand be allowed for CP EditMap? should I add When master only?
"Action": "EditMap", ... "When": { // if is master game }

lucid iron
#

fairly sure all clients need to do edit map

#

unless this is some kind of area only available to the host?

inland cedar
#

It is like the market day town edit for the grange sell so it should be for all player

royal nimbus
#

hey were would the textures for the mail papers be at? i found them once before but i cant seem to find them again

rancid temple
#

Letter backgrounds?

royal nimbus
#

yeah

rancid temple
#

LooseSprites/letterBG

royal nimbus
#

ah thank you

severe wren
#

Hey ๐Ÿ‘‹ how do I edit vanilla npc

rancid temple
#

!cp

ocean sailBOT
rancid temple
#

I think there should be instructions on there about unpacking, you would unpack the game files and use CP to edit them

lucid iron
#

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

raven snow
round dock
hallow prism
#

so

round dock
#

o wait nvm

velvet narwhal
#

missing commas

hallow prism
#

if they make the mod it's right place

#

anyway

velvet narwhal
#

eerwhere

#

for every new { } sandwich, it requires a ,

hallow prism
#

After parsing a value an unexpected character was encountered: ". Path 'Changes[0].Entries.MainTheme', line 15, position 4.
This means that there's a character that shouldn't be here. It may be an extra one (,,) or a missing one. It gives you the place the game says "something is strange" but the error can be a bit before

#

in this case its at the end of line 14 (missing comma as others said)

#

(giving bit of explanation so you can understand them AND fix it yourself next time, missing comma is the most common/easier to fix)

velvet narwhal
#

after parsing is one of the best (and worst) errors to get, it's simple to fix, but you're also kicking yourself in the butt because "how could i forget a STUPID comma???"

wanton pebble
#

Is there a list of relevant mail flags somewhere? Trying to find the flag for the Island Resort being built and the Island Hut being built

#

Assuming they exist, anyway.

velvet narwhal
#

i think roku added some

hollow hazel
#

ive done that too many times, lost an entire evening looking for the error

uncut viper
#

there's a list on the mail modding data page

raven snow
#

@velvet narwhal @hallow prism it worked tysm!!

uncut viper
wanton pebble
vernal crest
#

The list on the mail page isn't very comprehensive unfortunately (unless someone has recently added to it in which case they would be my hero)

uncut viper
#

importantly though it has the island upgrade flags

velvet narwhal
#

(roku added as many as they could remember)

wanton pebble
#

Yep. Just trying to remember if the Hut is required for the Resort or not

velvet narwhal
#

would the qi challenge mines be considered island ? SDVpufferthink

wanton pebble
#

Nope

#

Hard mines are still mines

uncut viper
#

the challenge mines are just hard mode mines

wanton pebble
#

Hard Skull Cavern is still Skull Cavern

velvet narwhal
#

i was gonna shove that flag in

#

just no idea how to categorize it lmao

uncut viper
#

are you sure it's even a mail flag and doesn't reuse a special rule from the special order

velvet narwhal
#
if (Game1.player.deepestMineLevel >= 145 && Game1.player.hasQuest("20") && !Game1.player.hasOrWillReceiveMail("QiChallengeComplete"))
{
    Game1.player.completeQuest("20");
    Game1.addMailForTomorrow("QiChallengeComplete");
}```
![SDVpufferthink](https://cdn.discordapp.com/emojis/280082838773301258.webp?size=128 "SDVpufferthink")
wanton pebble
#

that's not the Qi Challenge Mines

#

QiChallenge is the Level 25 thing

velvet narwhal
#

oh SDVpufferclueless

#

read: i'm always dumb

wanton pebble
#

I mean it's not too hard to add a mailflag to that special order

#

you'd have to field edit, but you could do it so that the player, upon finishing Hard Mode Mines, would have something you could refer to

uncut viper
#

don't even need to add it to the order itself, you can just add it with a trigger action on day ending to check for whether it's complete

velvet narwhal
#

yeah i think i have that as a trigger action

#

(i'm most definitely not trying to find work to keep on slacking from writing my mod, no sirree)

latent mauve
#

One day I'll go through and get all the player flags on one of my further along runs to track

#

They're mostly vanilla runs anyway

velvet narwhal
#

oh the || alien || wasn't added to the list

#

(i don't remember the flags though)

wanton pebble
#

I don't think that has a flag.

velvet narwhal
#

(i found them, but why is there 2 variants?)

if (random.NextDouble() < 0.008 && Game1.year > 1 && !Game1.MasterPlayer.mailReceived.Contains("Got_Capsule"))
{
    Game1.player.team.RequestSetMail(PlayerActionTarget.Host, "Got_Capsule", MailType.Received, add: true);
    return new SoundInTheNightEvent(0);
}

if (Game1.MasterPlayer.mailReceived.Contains("Capsule_Broken") && Game1.isDarkOut(this) && Game1.random.NextDouble() < 0.01)

if (Game1.player.mailReceived.Contains("Broken_Capsule"))```
#

unless i'm wrong again (probable)

uncut viper
#

(are you trying to set the syntax highlighting of your code blocks to c# by the way)

velvet narwhal
#

is that what my autocorrect is doing

uncut viper
#

just wondering if that's what the "c#" you put at the top is for

velvet narwhal
#

oh huh

#

SDVpufferclueless my phone auto populated that

shadow vortex
wanton pebble
#

they're talking about the last part

velvet narwhal
#

yeah the capsule_broken vs broken_capsule

wanton pebble
#

Capsule_Broken and Broken_Capsule

shadow vortex
#

That I don't know

velvet narwhal
#

๐Ÿ˜‚

shadow vortex
#

Looks like a typo in the code

wanton pebble
#

I doubt that

rancid temple
#

Most likely it was just that using string references for stuff isn't great for remembering what you've called everything and it got called both at some point and instead of trying to fix it there's just code to make them both work

wanton pebble
#

not because I think you're wrong immediately, but because CA has a lot of weird calls

velvet narwhal
#

warpTotem warpTotemForReal

wanton pebble
#

yeah. There's some weird shit in the code so I wouldn't be surprised if both are used

#

Feel free to ask Pathos though when he's around

#

If it is actually a bug, sweet, 1.6.9 is still in beta

velvet narwhal
#

do @ 's actually work on an edited post

deep cypress
#

A question: this has me a bit confused.

            bool num = this.displayingSpouseRoom;
            this.displayingSpouseRoom = showSpouse;
            this.updateMap();
            if (num && !this.displayingSpouseRoom)

How is it both displaying and not displaying? When would this come up?

uncut viper
#

it won't notify them

rancid temple
#

Does it just change the color? @velvet narwhal

velvet narwhal
#

it do change the color

rancid temple
#

Is it in your inbox?

velvet narwhal
#

tis not in my inbox though

#

let me find the original .cs that they're in anyway and i'll repost it

deep cypress
#

Context: that bit of code is from Farmhouse.cs

velvet narwhal
#

@ivory plume

BusStop.cs line 218
if (Game1.player.TilePoint.Y > 16 && Game1.MasterPlayer.mailReceived.Contains("Capsule_Broken") && Game1.isDarkOut(this) && Game1.random.NextDouble() < 0.01)

Event.cs line 8539
if (Game1.player.mailReceived.Contains("Capsule_Broken"))

Object.cs line 4853
Game1.player.team.RequestSetMail(PlayerActionTarget.Host, "Capsule_Broken", MailType.Received, add: true);

Summit.cs line 406
if (Game1.player.mailReceived.Contains("Broken_Capsule"))

Town.cs line 720
if (Game1.MasterPlayer.mailReceived.Contains("Capsule_Broken") && Game1.isDarkOut(this) && Game1.random.NextDouble() < 0.01)

Utility.cs line 4437
if (random.NextDouble() < 0.008 && Game1.year > 1 && !Game1.MasterPlayer.mailReceived.Contains("Got_Capsule"))```
![SDVpufferclueless](https://cdn.discordapp.com/emojis/1213021254676774924.webp?size=128 "SDVpufferclueless")  just letting you know that the `Capsule_Broken` has one out of sync in the Summit.cs, wanted to know if that's on purpose or not, i just named all of the files that refer to the mailflag for the capsule for your ease of access
(this is from decompiled 1.6.8)
rancid temple
deep cypress
#

Oh, I see! Thanks!

velvet narwhal
#

(those were all the iterations of the word 'capsule' i could find so iunno)

shadow vortex
#

Ok now I'm curious what the summit code does that checks the capsule flag, and if it's working as untended.

rancid temple
#

I'm guessing that this particular check is to see if it should remove the spouse room, if the room was displayed before and the player no longer has a spouse or roommate, it should remove the room and store anything in it

brittle pasture
rancid temple
#

Probably shows the occupant

velvet narwhal
#

it might already be fixed in 1.6.9 but SDVpufferclueless

rancid temple
#

Just in case you didn't get any jump scares earlier

#

I still see the different flags in 1.6.9

velvet narwhal
#

oh okay

#

i haven't updated to 1.6.9 yet because i still have a bunch of things to work on

rancid temple
#

Looks like all it does is add 8000 to a pause, which is in ms?

velvet narwhal
#

iunno i hate doing reports in c# because i'm dumb, send me back to the event debugging

rancid temple
#

Event code is outside my wheelhouse so I have no idea why it's doing this lmao

velvet narwhal
#

pause is quite literally just that, it's pausing whatever event is going on, but if it's not drawing a sprite then it's just adding time to an event?

#

i would've figured if capsule_broken, therefore add iunno an alien sprite dancing or something because i assume that's the perfection event code?

rancid temple
#

Yeah, it's the event for perfection

velvet narwhal
#

SDVpufferthink i have never done perfection so i have no idea how that rolls

rancid temple
#

All I see it adding is moonlight jellies, krobus, and then sliding the viewport

#

And then up to almost a minute long pause?

#

Followed by another pause immediately

brittle pasture
#

Doesn't seem like the code's finished
the pause is probably meant to let the alien run across the screen

rancid temple
#

Yeah, does kind of seem like some stuff is missing here lol

velvet narwhal
#

(i have sent the general on a hunt)

rancid temple
#

It also checks if you've earned over 100,000,000 and if you're under or at year 2, which can you be for perfection?

#

Doesn't seem to do anything related to those two checks, just adds more time

uncut viper
#

where are you lookin for this event code

rancid temple
#

Summit.getSummitEvent

naive wyvern
#

hello gang, where can I find the graphics for the slot game for casino? I went through everything and cant seem to find it ๐Ÿ˜ญ

brittle pasture
#

...||cursors?||

naive wyvern
#

i swear if its in cursors I will cry selph

rancid temple
#

I see some of it in cursors at least

shadow vortex
rancid temple
#

Is grandpa not required for perfection?

naive wyvern
rancid temple
#

This is what I found so far

teal bridge
#

The items that show up in the slot machine are just the normal object sprites, I think.

#

There's just that and the frame.

rancid temple
#

Not sure about the background

naive wyvern
#

yeah thats what Im trying to find too

teal bridge
uncut viper
#

wouldnt surprise me if its just rectangles drawn on the fly

shadow vortex
teal bridge
#

Refresh my memory on what the background looks like?

uncut viper
#

you need friendship with Kent to get perfection

naive wyvern
#

a plain colour, focus

rancid temple
teal bridge
#

If so then it's probably just StaminaRect with a color.

naive wyvern
#

the reason I ask is because I wanted to try and see if I could do a EditImage thing for it with OnLocation context ((if thats the correct word for it ufdshiudgs))

teal bridge
#

Oh, the retrowave lines maybe?

rancid temple
#

You can do a When for when you're in a specific location and an Update for OnLocationChange in order to only patch when in a certain place

teal bridge
naive wyvern
rancid temple
#

Yeah, from the before times lol

naive wyvern
#

yess

#

i was just a little lost hydsuigs so I'll try and see if I can get far, with custom currency too ๐Ÿ™ trust

rancid temple
#

You would just EditImage instead of EditData, you can just swipe the code I used and make the adjustments you need

naive wyvern
#

oh bless

rancid temple
#

Not sure when the new version of SpaceCore will have the currency API changes

#

But any like shop style thing you should be able to make use a custom currency

teal bridge
#

Ok, looking at Slots.draw is just painful. The actual rewards are calculated in the draw method.

rancid temple
#

Considering when the casino is from, I am unsurprised

#

Sad, but still

naive wyvern
#

oh no... does that mean i cant easily modify it without some C#?

rancid temple
#

You can change the look but you probably won't be able to do anything else

naive wyvern
#

oh dear

#

mmm that wont do ๐Ÿ˜ญ

rancid temple
#

All these ancient hardcoded minigames lol

brittle pasture
#

eh what's one more framework

next plaza
#

I thought we escaped the days of a bajillion mini frameworks

vernal crest
#

Then Pau came along lol

gaunt orbit
#

I should make a framework framework to help all these new frameworks coming out

naive wyvern
#

forgiv me ๐Ÿ™

velvet narwhal
#

i await the day for casey to usurp a good chunk of the world in 1.7 stardew

gaunt orbit
#

/jk

teal bridge
#

Part of what slots draws is the 3x3 square at (379, 357), eight times. And then, 17 x the square at (147, 472) which apepars to be inside the speech bubble.

teal bridge
#

I think there are 17 retrowave lines so that looks like a match.

next plaza
#

I know SDVPufferCry

teal bridge
#

So... it probably should be using staminaRect because what it actually uses is just silly.

rancid temple
#

Ah, so the entire background is drawn in code lol?

teal bridge
#

Pretty much.

next plaza
#

...that was the wrong reply

#

Supposed to be Wren's message

gaunt orbit
#

TBF many of the new frameworks either could just be a single c# mod or are an extension of vanilla's abilities, adding new mechanics

calm nebula
#

Look at the drinking animation

naive wyvern
#

uhdsiudgs as a framework user, id like a framework framework framework

rancid temple
#

Pau might still need it, just not for themself lol

next plaza
teal bridge
rancid temple
#

Would a framework framework framework not just be Pintail though?

next plaza
#

Though nobody uses some of the features I merged from other frameworks of mine (such as Backstory Questions)

next plaza
teal bridge
gaunt orbit
#

It's kind of overwhelming how much you can do now

teal bridge
#

(I'm not even specifically referring to SpaceCore there, it's just a general principle)

brittle pasture
next plaza
gaunt orbit
#

For me it depends on how invasive the mod is

teal bridge
#

Yeah, it is somewhat trickier in the mod world because every dependency is a separate download. Normal software is exactly the opposite, dependencies cost nothing for the user except whatever their size/complexity represents.

gaunt orbit
#

If something is doing huge edits I usually prefer it to be separate

uncut viper
#

i just prefer as few dependencies as possible bc i dont like leavin the functionality of my mod in the hands of someone else, basically
but otherwise im also with focustense and wren

next plaza
brittle pasture
#

But Nexus needs that Premium money

teal bridge
#

Large/invasive dependencies are also risky because they can get hard to disentangle and more likely to break/less likely to be updated if a new version of the game, SMAPI, etc. comes along.

gaunt orbit
#

Yeah but nexus would slaughter us for that SDVpufferwaaah

teal bridge
#

Obviously you keep SpaceCore up to date but some of the other "Cores"...

next plaza
#

That is also true. I remember when PyTK died

gaunt orbit
#

Yeah that's the main thing I was thinking of

next plaza
#

Part of my problem is I feel like SMAPI should handle more (like, custom items pre-1.6), but eh.

teal bridge
#

Honestly, I don't think I'd mind downloading an extra mod or two as a dependency if that extra mod is very small. We've got users here bragging about their 1000+ mod lists so I don't think they'd mind either.

#

I do resist mods with too many dependencies if those dependencies are large enough to risk incompatibilities with something else.

next plaza
#

One or two I don't mind either. But if people make a ton of mini-frameworks instead of centrallizing, that becomes much more.

gaunt orbit
#

I use stardrop so I don't usually mind. It does annoy me a bit though when it's more like, two halves of one mod uploaded separately

next plaza
#

(Centrallizing their own stuff I mean)

gaunt orbit
#

I've seen a few frameworks like that

next plaza
#

I can sorta see that, though at the same time someone might not want the default content so it's a tough decision

brittle pasture
#

it's definitely a delicate balance act. It helps that you can have a vague theme to gather them together

#

(like maps or items)

uncut viper
#

i can understand centralizing their own stuff bein difficult bc like. i cant speak for everyone making frameworks or framework adjacent stuff ofc but a lot of stuff ive wanted changed has all been like... very tiny modifications, and usually nothing at all to do with each other

teal bridge
#

The pragmatic me says you can't expect modders who do this for fun to be very meticulous about splitting up their framework mods and partitioning the functionality to the mods that actually use them. The engineer me says that's an untenable situation, long-term, and leads to collections of mods dying from lack of maintenance and/or modders burning out from compat issues.

uncut viper
#

so until you somehow amass enough of a collection of random changes to justify the theme of your framework itself being "random small changes" its hard to justify releasing a mod that just changes 2 small completely unrelated things

calm nebula
#

(Fwiw, the reason why I'm framework leary is that the bigger the framework the more likely I am to find code that runs like shit on my seven year old machine.)

uncut viper
#

(hard to justify when you might not even know if you're gonna ever get that 2nd thing in the first place, i mean)

calm nebula
#

I have no desire to debug stardew performance anymore

#

I've given y'all enough of my sanity

teal bridge
#

That comment explains so much...

velvet narwhal
vernal crest
#

I am also planning to use backstory questions, I think

lucid iron
#

i think there's actually 1 good reason to decentralize your stuff and that's nexus search seemingly only matching titles

uncut viper
#

oh yeah, thats a good point that always frustrates me
hard to know if a framework/mod out there does what i want if its a minor feature in a framework whose name has no indication whatsoever about it

#

then you end up either doin it yourself or working around it until you come in here and happen to see someone say "oh [random mod] does that for you"

rancid temple
#

Time for Nexus page titles that are just a list of features

calm nebula
#

Aliexpress your titles

uncut viper
#

i mean thats basically why i named BETAS what i did

lucid iron
#

SpaceCore - <all of spacecore/readme.md>

#

will it fit

uncut viper
#

i did try putting all of the bee movie scriipt in a mod title once to see if it'd let me

#

it did not give me an error. however it also never finished loading and i got an infinite spinning cogwheel until i closed the tab

#

so. possibly.

next plaza
#

However I am working on new docs for SpaceCore that's not one giant dense bullet list

#

Albeit slowly

lucid iron
#

can you make a copy of an asset with CP?

finite ginkgo
#

No

lucid iron
#

aw

#

i guess its doable in C# tho?

#

just with usual asset pipeline stuff

finite ginkgo
#

Yup

lucid iron
#

kk

#

the use case is that i want to copy retex of say the keg

#

and slap a icon like a diamond or smth on there

#

it was either copy texture or patch draw method, not sure what is better

uncut viper
#

seems like you could just postfix the draw method and do it the same way casks do

lucid iron
#

postfixing would make it AT compat, maybe

calm nebula
brittle pasture
lucid iron
#

yea i had same conclusion just now while rotating in my head Bolb

uncut viper
#

you could make a framework for drawing icons on BigCraftables

lucid iron
#

its just that this is for @distant radish mod and it'd be nice if the C# is simple enough for me to hand it off forever

#

what if i PR extra machine config

uncut viper
#

something for machines added to EMC? doesnt sound relevant to me

#

(/lh)

lucid iron
#

i cant think of a 2nd mod that'd possibly need this though Thqnkqng

distant radish
#

I'm sorry I am not contributing to the conversation, I am quite illiterate in this field xD

brittle pasture
#

for textures in general

next plaza
#

They're still around?

drowsy pewter
#

hes been quiet lately but yes

next plaza
#

Huh, wonder how I didn't notice

brittle pasture
next plaza
#

Ah, yeah, spritepatcher

drowsy pewter
next plaza
#

I have mixed feelings about spritepatcher due to the whole code part

drowsy pewter
#

But i asked if he could do the more basic parts like the bagi replacement

next plaza
#

I guess it can be a good entry point for simple C# stuff though

brittle pasture
#

yeah AT compat is a problem
(my water-placeable machines redo the draw code and is not yet AT compatible as a result. No one's bugged me about it so I haven't done anything about it)

#

(no one bugged me because there's currently a total of 0 mods with water machines)

drowsy pewter
#

Theres a wealth of mods in there

distant radish
#

by water machines you mean that are placed in ponds and such?

brittle pasture
#

Like crab pots, yes

distant radish
#

because I believe the Archaeology mod had a Water Shifter or something like that

#

ok, I just found it, the Water Strainer, but I believe it stayed in 1.5 and was dropped in 1.6

lucid iron
#

well i have that 1 mod which slightly adjusts where the star is on the cask already, drawing a new icon would actually be easier than that Bolb

#

ah but AT has a possible skipping prefix on object.draw

#

prob no compat there

dense tartan
#

Sorry if this is a dum-dum question, but is there a SMAPI debug command or anything to make it snow? I've set the season, but I can't figure out how to make it snow.

paper sundial
dense tartan
#

I didn't equate snow with debris. Thank you!

#

Oh interesting! The snow from that command is different than regular snowfall!

paper sundial
#

I think it's rain actually, which in winter equates to snow

#

But might be wrong, don't use it myself

gaunt orbit
#

You can get rain in winter though with totems

dense tartan
#

Yep, that's what I was about to say. The debug command for rain does make it rain in winter.

paper sundial
gaunt orbit
#

CJB might have a weather option?

vernal crest
#

CJB does

#

That is what I use

#

It sets the weather for the next day. I don't know if that's what the debug command does.

dense tartan
#

The debug command debrisweather appears to turn on whatever debris-related weather matches your season. It's just interesting that the snow it creates in Winter is just mild flakes. I'll try CJB for testing this. Thanks!

deep cypress
#

A question: with the OnSaveLoaded event, the stuff that I put in there, is it the first thing which happens when the save is loaded, like, does stuff there happen before the maps load?

calm nebula
#

I believe on save loaded is after all initiation

deep cypress
#

Thanks! That helps!

spice inlet
#

pretty sure SaveLoaded and DayStarted are the same thing

#

one is just fired 1 line after the other

#

not sure what you're trying to accomplish, but there is the LoadStageChanged event as well

rancid temple
#

Does DayStarted not fire every day?

calm nebula
#

Day started fires every day yeah

reef silo
#

Whereโ€™d yall learn to mod stardew, all the YouTube tutorials suck lol

rancid temple
#

What about SaveLoaded? I was working under the assumption that stuff I did there would only fire once per load lmao

uncut viper
#

i think they just meant that they both happen at the same time

#

not that saveloaded happens every day

#

but like at the same stage of day preparation

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.

rancid temple
#

Oh ok, I was concerned for some of my code lmao

#

I've only seen one 1.6 YT tutorial posted so far, think it was for setting up C# modding

lucid iron
#

there's yt tutorials for modding?

rancid temple
#

Everything else is old

calm nebula
#

Hey I learn everything from YouTube

iron ridge
spice inlet
#
// after going to sleep
instance.IsBetweenSaveEvents = false;
this.Monitor.Log($"Context: after save, starting {Game1.currentSeason} {Game1.dayOfMonth} Y{Game1.year}.", Monitor.ContextLogLevel);
events.Saved.RaiseEmpty();
events.DayStarted.RaiseEmpty();
// loading a savefile
this.OnLoadStageChanged(LoadStage.Ready);
events.SaveLoaded.RaiseEmpty();
events.DayStarted.RaiseEmpty();
calm nebula
#

MIT OCW is amazing

brittle pasture
#

dang MIT offers a SDV modding course?

spice inlet
#

(DayStarted ofc firing every day as opposed to just the first day)

lucid iron
iron ridge
#

never watched it tbh so no idea

deep cypress
velvet narwhal
#

(i cannibalized a cp mod and read it's code)

rancid temple
#

I can't even find these videos lol

#

Between here, the wiki, the github docs, and various repos, there's a lot of places to learn. Unfortunately people typically seeking videos aren't word learners

lucid iron
#

if you tell us what kind of mod you want ppl will point you in right direction

reef silo
deep cypress
#

Yes, the cannabalize a mod and do what it does as an example method (but not stealing its ideas, simply copying its implementation because there is really only one way to do most things, or maybe a few, at most) is the ultimate way I learned! I am right brained, and autistic, and, hence, if I cannot see something, I cannot conceive of it; I have very little ability to comprehend abstract information, and all I know is essenmtially comparison.

In conclusion: this is how I learned.

rancid temple
#

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

lucid iron
#

most important to have an idea AquaThumbsup

deep cypress
#

Like, what do you want to do?

rancid temple
#

Decide what you want to do, look at the base code and see if anyone has done anything similar

uncut viper
#

a lot of knowing how to mod (for non-content packs anyway) is just knowing how to code in general

deep cypress
#

Depending on what you want to do, I can point you to some of my stuff which does it.

#

Also, perhaps the most shining gem of it, and Lumisteria has said to do it, is Lumisteria's Visit Mount Vapius.

rancid temple
#

And Cornucopia

#

Chances are good if you need an example, it's in one of those two lmao

deep cypress
#

Visit Mount Vapius will show you how to do everything which can be done (nearly, anyways), and also, it is a Very Nice mod and I love it!

reef silo
#

I know how to code in c# but I wanted to see if stardew also had documentation or a library

rancid temple
#

Though, a lot to dig through even when you know what to look for

#

!decompile if you haven't

ocean sailBOT
rancid temple
#

From there, you either see what you can do or turn to Harmony to tackle the hardcoded stuff

deep cypress
#

Documentation of the code? Look at my github for all kinds of strange examples!

lucid iron
#

spacecore is the big C# facing library

#

and smapi itself provides various events to use in C#

deep cypress
#

When MoonMisadventures Redux comes out, it will be the ultimate example of C# location stuff.

calm nebula
#

There is basically no documentation for c# stuff

#

You just dig around

rancid temple
next plaza
calm nebula
#

I meant for the game

next plaza
#

Ah

#

Oops

calm nebula
#

Not for spacecore

next plaza
#

(It's why it isn't on github yet despite being in my sln)

lucid iron
#

oh can i ask what those reasons are? its fine if the answer is "no comment"

next plaza
#

Not something I really care to elaborate on

calm nebula
dense tartan
#

Working with CP, I know how to edit an image, but can my target be my own file? I have a furniture object that I want to have change depending on season and weather. Here's what I have:

        "Action": "EditImage",
        "Target": "Mods\\Keep Christmas Well\\assets\\deco",
        "FromFile": "assets/deco.png",
            "FromArea": { "X": 64, "Y": 80, "Width": 16, "Height": 32 },
            "ToArea": { "X": 48, "Y": 80, "Width": 16, "Height": 32 },
        "When": {
            "Season": "Winter", 
            "Weather": "Snow",
            },
        "Update": "OnLocationChange",
            
        },```
uncut viper
#

your target name can be whatever you want, including a target you Loaded previously

#

if the asset you're targeting in a Load doesn't exist it will be created

dense tartan
#

Which I did.

uncut viper
#

then yeah, you can target it just fine. doesnt need to be a vanilla asset

rancid temple
#

It's worth noting, the Target of your EditImage is the asset you Loaded previously, not the image in your mods folder

uncut viper
#

assuming the Load target is the same as what you wrote there exactly

rancid temple
#

You're editing the asset you loaded into the content pipeline, not the image you used as a source for that asset

dense tartan
#
            "Action": "Load",
            "Target": "Mods\\Keep Christmas Well\\",
            "FromFile": "assets/deco.png"
    },
uncut viper
#

(well no it wont not after seeing their load)

dense tartan
#

How should I have formatted that, then?

uncut viper
#

Mods\\Keep Christmas Well\\ is not a folder, its just a name of an asset

#

so whenever an object or something looks for a texture called Mods\\Keep Christmas Well\\ it will get your assets/deco.png

#

you probably want to Load into Mods\\Keep Christmas Well\\Assets\\Deco

#

but again your target can be anything it doesnt have to look like a filepath, you could just as easily load into Mods\\DecoPngThing or just dfkjgh as long as it matched everywhere else you wanted to use it

#

but if you Load into Mods\\Keep Christmas Well\\Assets\\Deco then you want to do EditData on Mods\\Keep Christmas Well\\Assets\\Deco as well

#

(also this is unrelated but you dont really need to change the Update rate for that patch since season and weather will only ever change daily anyway)

calm nebula
#

Ahhh yeah

#

It's not a real folder no

#

My assumption is they don't want a snowy indoor furniture

#

Or a snowy GI furniture

uncut viper
#

the season and weather will be the same regardless of location

dense tartan
#

So I could do:

            "Action": "Load",
            "Target": "Decorations",
            "FromFile": "assets/deco.png"
    },```

then

```{
        "Action": "EditImage",
        "Target": "Decorations",
        "FromFile": "assets/deco.png",
            "FromArea": { "X": 64, "Y": 80, "Width": 16, "Height": 32 },
            "ToArea": { "X": 48, "Y": 80, "Width": 16, "Height": 32 },
        "When": {
            "Season": "Winter", 
            "Weather": "Snow",
            },
        "Update": "OnLocationChange",
            
        },```
uncut viper
#

you could yes, however, its highly highly recommended to start your Target with {{ModId}}

#

bc if you do that, if any other mod also loads into Decorations then nothing will work

dense tartan
#

Ahhhhhh...that's helpful.

uncut viper
#

so its common to see it written like {{ModId}}/Decorations

#

that way its guaranteed to be unique

dense tartan
#

Does it matter whether you use a /, _, or . as the separator there?

uncut viper
#

the "Target can be anything" is not an exaggerating its literally just a name you are giving an asset, you dont even need separators at all

dense tartan
#

I guess in terms of best practice, I mean.

uncut viper
#

anything that will work in a string

#

most people use slashes

#

but theres no benefit to slashes versus underscores besides i guess subjective readability

dense tartan
#

Totally. As I asked that question I figured I should clarify about best practices since I understood when you said "you can use anything". ๐Ÿ˜„

calm nebula
#

There is technically a benefit to slashes

uncut viper
#

which is

calm nebula
#

Or maybe no slasnes

#

Tired

uncut viper
#

technically there is a benefit to making your asset names as short as possible

#

practically i would not recommend it SDVpuffersquee

calm nebula
#

It's compared segment to segment

uncut viper
#

if you use Decoration instead of Decorations you might shave off a nanosecond or two in the string comparison

calm nebula
#

C# actually compares lengths first

uncut viper
#

tbh id almost say theres a downside to slashes which is it makes people think theyre folders

calm nebula
#

Yeah and no normalization is probably still better than fast normalization

uncut viper
#

i dont think i know what normalization is in this context

calm nebula
#

Slash normalization

#

/ and \ are considered the same

uncut viper
#

ahh, right

calm nebula
#

Also casing (assets are considered case insensitive)

uncut viper
#

im just gonna start using colons as separators im anti slash now

dense tartan
#

So when I edit the image I loaded, what should my FromFile be?

uncut viper
#

whatever image you're editing it with

#

same way you'd edit a normal asset

#

vanilla asset*

dense tartan
#

Aha! I've been trying to use the same image.

#

So editing my image with the same image just specifying coordinates.

#

Maybe I'm going about it the wrong way?

calm nebula
#

It's less that you're editing your image

#

And more that you're editing your asset

#

Like, Load says "my asset looks like this"

#

And EditImagr says "okay now layer these changes"

dense tartan
#

So as I have it currently, I'm telling it to load a file then use the same file to layer the changes.

calm nebula
#

You can do that, sure

dense tartan
#

Which I can see might not work.

calm nebula
#

You can copy bits from one part of the image to thr asset

#

I assume you're targeting a different coordinate set?

dense tartan
#

Absolutely.

calm nebula
#

I don't see why it wouldn't work

dense tartan
#

After making the suggested changes to the target, I got the error
[game] Failed loading texture Mods\Keep Christmas Well for item (F)TheBigJB.Christmas_ColdSnowman: asset doesn't exist.

calm nebula
#

Yeah, you need to change it on your furniture too if you change the target

#

And also

uncut viper
#

are you setting the texture to Mods\Keep Christmas Well or Mods\Keep Christmas Well\Decoration or whatever you loaded it to

calm nebula
#

You mayyyy need to spawn another item but I'm less sure on that

dense tartan
#
            "Action": "Load",
            "Target": "{{ModId}}.Deco",
            "FromFile": "assets/deco.png"
    },```

and 

```{
        "Action": "EditImage",
        "Target": "{{ModId}}.Deco",
        "FromFile": "assets/deco.png",
            "FromArea": { "X": 64, "Y": 80, "Width": 16, "Height": 32 },
            "ToArea": { "X": 48, "Y": 80, "Width": 16, "Height": 32 },
        "When": {
            "Season": "Winter", 
            "Weather": "Snow",
            },            
        },```
calm nebula
#

Yes

#

But what does data/furniture look like

dense tartan
#

I think I see! Let me experiment and see if I'm right.

orchid acorn
#

So I'm going a little insane. I'm editing chair tiles and neither patch reload nor exiting to title seems to be working for them? Only resetting the game completely. Patch reload is working for visual stuff so I know I'm inputting the right mod-- Is this like. A thing with chair tiles, or am I just cursed

calm nebula
#

What, precisely, are you editing

orchid acorn
#

Working on my tilesheet mod, adding new chair tiles :]

#

but I'm doing custom offsets for this one seat and reloading the game every time feels like a hell catered to me

calm nebula
#

Which asset are you editing

#

Sorry

#

I should have been more clear

#

The data asse

#

The vanilla image asset

#

Or a custom image asset

orchid acorn
#

Custom image!

calm nebula
#

Remind me in 2 hours to check asset propagation

orchid acorn
#

thank you atra SBVSob

calm nebula
#

Maru

#

Please

next plaza
#

Oh no, is uber down

uncut viper
#

no one wants to work remember things themselves these days

calm nebula
#

Yeah I don't swe data/chairtiles in coreassetpropagator

#

Otoh

hallow prism
#

if i want a simple, nice, static custom sprite on an event, do i still have to deal with the hell of temporaryanimatedsprite?

calm nebula
#

I'm deeply surprised loading a saved doesn't clear that

finite ginkgo
orchid acorn
#

Okay so its not me that is cursed god bless

#

but yeah exiting to title doesn't work either

hallow prism
#

hmm, temp actor, i don't know, i feel like i'm breaking the rules

orchid acorn
#

I use temp actor for all my static sprites

#

also good news. offsets achieved.

hallow prism
#

"why are you in prison?" "i used a temp actor for an item"

hushed thorn
#

So, follow Follow up question, does anyone know if there's a plugin for Tiled that lets us load in multiple map segments to edit them all as one over arching map?
There are... So many map segments for renovations.
VX - X V

subtle saffron
#

Would there be a way to dynamically apply a discount to everything pierre sells? I've gotten some items to have the discount applied (like sapplings) but seeds just constantly ignore any alterations I make. Been going at this for long I feel like a monkey with a hammer over here ๐Ÿ˜ญ

uncut viper
#

seeds are set to ignore shop price modifiers so you'd need to add modifiers to the seed shop entries individually

subtle saffron
#

that would explain it, thank you

uncut viper
#

alternatively you can also just make them not ignore the modifiers

#

that might mess with mods that expect them to ignore them though

dense tartan
#

@calm nebula and @uncut viper - I can't figure this thing out with replacing my own asset with another asset. Thanks for all the tips, though.

uncut viper
#

also i think that would actually double their price too i forgot pierre also has a default 2x modifier

uncut viper
ocean sailBOT
#

JSON is a standard format for machine-readable text files, often 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.

dense tartan
#

I'm not getting any errors or anything with that or any of the other items, it's not just changing.

uncut viper
#

you're not targeting the asset you loaded into

#

"Target": "deco.png", this is not what you loaded at the start of your json

#

you loaded a file into Mods\\Keep Christmas Well\\

#

so your target needs to target that

#

i also dont know if any of your furniture will correctly find the asset since none of them have the extra \\ at the end

dense tartan
#

Everything it working great except for the seasonal change.

uncut viper
#

(im not familiar enough with the furniture format to know if theres anything else wrong with those strings though)

#

fair nuf

#

then yeah, just fix the editimage

dense tartan
#

I'll update the target name as per your earlier suggestions once I get this working. I think it'll make it all easier for sure.

uncut viper
#
"Action": "EditImage",
"Target": "Mods\\Keep Christmas Well\\",
"FromFile": "assets/cs.png",
#

this is what you would want assuming you did not change it

#

bc again the Target is not a folder, you are giving the literal name Mods\\Keep Christmas Well\\ to an asset, so the EditImage is looking for an asset with that exact name, that exact name is goiung to point to your deco.png when the game reads it (kinda)
which means you cannot Load anything else into the same Mods\\Keep Christmas Well\\ later

hushed thorn
dense tartan
subtle saffron
uncut viper
#

its a boolean

subtle saffron
#

Ah figured, thank you!

calm nebula
#

I would be careful with slashes at the end of an asset name

uncut viper
#

it was more to show that the targets should match, i did mention the slash thing above that but they said their furniture worked fine with it so

calm nebula
#

Interesting!

#

(You would think I would know how that code works.)

uncut viper
#

if you'd asked me beforehand if slashes at the end would work i woulda cautiously said no but if im told it works then i dont have the knowledge or motivation to look into whether its actually good or bad

#

(or well, neutral or bad)

calm nebula
#

You think I would know.

whole raptor
#

Question about the new beta, does it still have the weird hardcoded lines on the skill page (visible only with ui recolors)? SDVpufferthink I always found it weird they were there and even overlapped with other assets

next plaza
#

Yeah, it does. I think CA added them intentionally

#

(For aesthetic reasons, not to make it hard for recolors)

#

If SpaceCore is overriding the skills page, you won't see it though. I took those out at request of someone for that reason

whole raptor
#

But aren't they the same color as what's behind them? So nothing changes visually SDVpufferthink

whole raptor
next plaza
#

I think there's a subtle difference but I could be wrong

dense tartan
#

Still nothing, @uncut viper and @calm nebula . No errors, just still not changing. Damn, I had such a cute idea.

whole raptor
#

It'd definitely make more sense if there was a difference SDVpufferthinkblob Never noticed any tho ๐Ÿ˜…

next plaza
#

Could just be a byproduct of iteration on the menu

#

(iteration being development iterations, not a for loop)

whole raptor
#

Possible

dense tartan
uncut viper
#

are you making sure to sleep so that the tokens can update?

dense tartan
#

Aye. I'm using CJB to make sure it's snowing the next day then I'm sleeping.

uncut viper
#

does it change if you remove the When conditions completely?

dense tartan
#

Just tried and it doesn't.

calm nebula
#

can you send me a quick repo pack?

#

(or I can make one, no worries!)

drowsy pewter
hard rock
#

how to determine sprite index?

uncut viper
#

left to right, top to bottom

finite ginkgo
#

(starting at 0)

uncut viper
#

the sprite in the top left is index 0, the one to the right of it is index 1, to the right of that is index 2, and so on

calm nebula
#

Maybe dots are significant

#

Try no dots

#

Underscore is safe

uncut viper
#

the furniture works fine with the normal texture though which is what confuses me

calm nebula
#

Yeah

uncut viper
#

i woulda thought if dots didnt work then those wouldnt either

calm nebula
#

I checked for caching on the furniture instance

#

Nope

dense tartan
calm nebula
#

Honest to God I think repo pack time

uncut viper
#

id be surprised if every furniture stored a copy of the spritesheet

#

since theyre editing that and not the furniture entry itself

#

are you sure you're placing your ToArea coordinates correctly?

drowsy pewter
#

yeah its in the wrong place

#

thats what i was thinking

#

and why seeing the spritesheet is needed

uncut viper
#

you're currently placing the snowman overtop of the... uh. green. hanging thingies beneath the snowman

drowsy pewter
#

you presumably want X 48 Y 48

dense tartan
#

I am??

uncut viper
#

coordinates are the top left corner

#

thats where its starting from

dense tartan
#

OMG

drowsy pewter
#

lol

#

simplest explanation

dense tartan
#

I honestly thought that's what I probably needed to do but convinced myself that it needed to be from top left to bottom right.

calm nebula
#

and here was me checking asset propogation

drowsy pewter
#

oh atra

#

maybe i would do that if like . Lumina came in here asking for help troubleshooting an image patch

calm nebula
#

I'm assuming like, there's a reason for that, because chair tiles be complex

#

but Hime was having issues reloading data/chairtiles earlier (for offsets)

ivory plume
#

I'll need to look into it, but looks fairly straightforward to propagate.

dense tartan
#

OK, image patched successfully without conditions. Trying with winter + snow now.

old edge
#

Are there any underwater maps in vanilla?

uncut viper
#

depends on your definition of underwater map

dense tartan
#

OMG. I can't believe it was as simple as the coordinates being wrong. I talked myself out of that being the problem over and over. ๐Ÿคฃ @uncut viper and @drowsy pewter - you helped me immensely (again) and I appreciate you. @calm nebula Thank you for trying to help too! I value your expertise!

#

Oh, and it does work using the same file instead of needing a different asset.

old edge
#

I just need to create one underwater dive-able area

brittle pasture
#

the submarine is technically underwater

uncut viper
#

the submarine is why i asked lol

old edge
#

Hmmm something similar

rancid temple
#

Underwater in that you just have to trust that it actually is and not question anything else

old edge
#

Would work

brittle pasture
#

Also the 1st layer of the dangerous mines

#

(I have no idea what's up with that)

old edge
#

Is the swim mod working?

#

It has a dive feature but is it buggy?

rancid temple
#

I feel like #modded-stardew might have a better idea for that honestly, sounds more like a playing the game kind of thing and nobody here does that

paper sundial
ivory plume
next plaza
#

suffers from doc writing derangement

lucid iron
#

i think there should be way to automate the colors rather than just slap an icon on stuff like this, but the easiest way would require you making a colorless sprite

summer bobcat
#

Sorry for the late response, but thank you! I don't know if the helper works with the __instance of JunimoNoteMenu, though, unless I am missing something.

lucid iron
#

patches have to be static and assuming you are talking about Mod.Helper, then you need to make that static

#

should double check if you really need helper though, sometimes there's static game funcs that do same thing

distant radish
brittle pasture
lucid iron
uncut viper
#

i didnt expect you to put SPU on there

paper sundial
lucid iron
#

i do think it looks mediocre rn and prob need some kind of uniform custom icon sprite KasumiDerp

#

you should link EBAGI i think

#

dunno if template allows it

brittle pasture
uncut viper
#

theres still a 1.5.6 branch on steam that people play with

lucid iron
#

yea TMXL causes crashes in the forest sometimes

brittle pasture
lucid iron
#

better to not have it

#

idk what it does these days

brittle pasture
#

I mean Pathos already removed BFAV so I assume the page's for 1.6 only

uncut viper
#

if pre-1.6 stuff was already removed then that does change my thoughts which are now "sure why not"

next plaza
#

New docs are... 15% written

#

(Judging from pixels in a full screenshot of the SpaceCore docs page)

lucid iron
#

i think it's worth mentioning that CFL is no longer required to add a new farm type

calm nebula
#

(it was never required to add a new farm type)

#

(it was introduced after the game update that added data/additionalfarms)

next plaza
#

^, MTN and CFT were the ones that existed pre-Data/AdditionalFarms

calm nebula
#

it just is handy, makes it easier for content pack writers to do what they want

#

what the heck is cft

next plaza
#

You're not familiar with every mod of mine? ๐Ÿ˜ข

lucid iron
#

ah i gotten CFL and CFT mixed up oops

paper sundial
uncut viper
#

most of the frameworks on there dont require their own content packs

next plaza
calm nebula
lucid iron
#

btw what is difference between spacecore animations (spacechase0.SpaceCore/TextureOverrides) and content patcher animation Bolb

paper sundial
#

Interesting... I'll add two of mine tomorrow, too tired rn SDVpufferchicknight

lucid iron
#

is it just different api

next plaza
#

Different API, and also SpaceCore ones are more efficient

next plaza
#

SpriteMaster/Clear Glasses doesn't really like CP-A

calm nebula
#

CPA - edits the spritesheet for animations

#

spacecore - patches the draw function to swap out the draw

lucid iron
#

oh huh, so better to use spacecore over CPA rn?

next plaza
#

Yeah

calm nebula
#

cpa has repeated asset edits (and in monogame, GetTexture/SetTexture is implemented horribly)

next plaza
#

I'm not updating CP-A again

lucid iron
#

prob worth mentioning then (on the frameworks wiki page)

calm nebula
#

spacecore - doesn't do sub-rectangle animations

#

(fwiw, I have no clue why monogame GetTexture/SetTexture is that bad.)

next plaza
calm nebula
#

see! My memory works for some things!

uncut viper
#

if this page is for 1.6 stuff, theres probably no need to include the "1.6 only" bits

calm nebula
#

it helps if people want to develop for 1.5.6

#

if that's what they want to do ๐Ÿ˜›

next plaza
#

.choose shenanigans, tomfoolery, mishaps and mayhem, keep working on docs

uncut viper
#

i think theres an echo here SDVpufferthink

next plaza
#

...oh right, uber is down

brittle pasture
#

noooo

next plaza
#

Brb checking on the ES server since they have another bot do it

rancid temple
#

Sounds like it has chosen mishaps and mayhem

next plaza
#

tomfoolery was chosen

#

ie. anything but docs, please

rancid temple
#

Lol

calm nebula
#

bfav was limping along even in 1.5.6

#

like, barely working at all

lucid iron
#

there's way to access archived pages right

brittle pasture
#

yeah, with history

lucid iron
#

or u just throw old page to Modding:Content_pack_frameworks/1.5.6

drowsy pewter
#

you're amazing selph

#

selphless

brittle pasture
lucid iron
#

say was there some kind of custom storage container framework

#

i forget the name

brittle pasture
#

that's expanded storage, and it's already on

uncut viper
#

im not actually sure what MFM does that CP cant besides setting the quality of the item attachment

drowsy pewter
#

sprites in detail

lucid iron
#

MFM has nicer format right

#

not a big ol string

calm nebula
#

eh, not really

uncut viper
#

subjective

lucid iron
#

blobcatgooglyblep fair enough

calm nebula
#

I think there are still features MFM has CP doesn't

drowsy pewter
#

custom letter bg?

calm nebula
#

But CP also has features MFM doesn't, like tokens

next plaza
#

Vanilla

uncut viper
#

you can do that in CP

calm nebula
#

no, CP has that

#

it's something like "replies" or something

drowsy pewter
#

thank you all three people

lucid iron
#

oh is solid foundation on this list?

uncut viper
#

[letterbg <asset name> <index>] at the start

#

actually idk if it has to be at the start i mightve made that up

#

but it sure does look nicer at the start

tiny zealot
#

it can be anywhere

lucid iron
#

SF not req for building anymore but has some features not in the base building data

#

like making archways that u can walk under

brittle pasture
uncut viper
#

OH wheres secret note framework

drowsy pewter
#

trying to think over all the frameworks i have possibly utilized in the past even though selph has for sure added all of them

tiny zealot
uncut viper
#

Lacey is a consumer

calm nebula
#

doesn't lacey

uncut viper
#

if SPU can be there i think SNF definitely deserves to be there

calm nebula
#

Lacey is both a consumer and a producer (of hats)

brittle pasture
#

heck yeah I'm adding that too

uncut viper
#

i love secret note framework

#

i havent used it yet but i plan to

#

in my notes n everything

brittle pasture
#

(and goodness the list's getting long, might have to categorize and sort this as a later project)

calm nebula
#

that's what the flowchart was for

#

but right now the flow chart looks like

brittle pasture
#

potential categories could be Items - Maps - NPCs - Others/Multiple

rancid temple
#

1.6 "The ALL THE FRAMEWORKS Update"

calm nebula
#

"Want to mod stardew? Have you heard of our lord and savior cp."

tiny zealot
uncut viper
#

ill count you if you wont count yourself

calm nebula
#

(yeah, 1.5.6 frameworks were necessary, 1.6 it feels more like "everyone but CP is fun extras!")

uncut viper
#

1.6 is all content patcher and if its not content patcher its a spot where you thought "cmon did you really have to stop dehardcoding before you got to this spot"

next plaza
drowsy pewter
#

just do what EMC did and get absorbed into 1.6.9

next plaza
#

(/s)

rancid temple
#

"But what if I made this one very specific arbitrary feeling thing not hardcoded instead?"

calm nebula
#

Yeah Pathos I have a fully developed Data/Equips feature, do you want it?

#

(please?)

#

(anyone?)

uncut viper
#

"is anyone going to use the mod to dehardcode this one specific arbitrary thing?" "probably not but it bugs me"

calm nebula
#

(no takers?)

next plaza
#

SpaceCore wearables feature in shambles

#

That I specifically borrowed your idea for

calm nebula
#

you didn't do my lights code

next plaza
#

True!

calm nebula
#

(this is all in good hearted fun)

next plaza
#

(I know, I'm giving you a hard time)

calm nebula
#

that lights code is now what's BROKEN IN 1.6.9

#

(I'm kidding, I'm kidding)

next plaza
#

I would show off my new docs but it's on multiple pages hosted on localhost

#

...and 15% done

uncut viper
#

wait how'd you do that, im hosting my stuff on localhost...

next plaza
#

Not counting that certain parts that are one line in current spacecore docs are going to get fully documented

calm nebula
#

also to be fair Data/Equip is about 30% creepy emit code I used to scare sophie

uncut viper
#

one of us is gonna have to change

next plaza
#

("Content Engine" being one of the big ones)

next plaza
calm nebula
#

I said I used it to scare sophie

#

not that it was inherently scary

next plaza
#

Uber is back apparently

#

.cat

calm nebula
#

fwiw, I'm glad you took the equipment thing

#

I know Nova was looking forward to it

lucid iron
#

perms shenanigans?

next plaza
#

Why would it get changed though ๐Ÿ˜ฆ

#

Remind me to remind the junimos to fix that in 12 hours... oh wait

uncut viper
#

modders cant be trusted with maru's robot anymore SDVpufferpensive

reef silo
#

Whatโ€™s the difference between content patcher and smapi

lucid iron
#

smapi is the mod loader

reef silo
#

Whatโ€™s content patcher for

#

I meant

lucid iron
#

content patcher is just a mod, but one that does a lot bc it lets you edit game data

drowsy pewter
#

SMAPI opens the game so other mods can edit it, and Content patcher actually carries out the edits you tell it to do

lucid iron
#

in other games like skyrim the engine has content editing features, but since stardew isn't moddable like that content patcher is a mod itself

drowsy pewter
#

essentially

reef silo
#

So you need content patcher to mod

lucid iron
#

no you need smapi to mod

calm nebula
#

not necessarily

lucid iron
#

content patcher helps with many common types of mods tho

calm nebula
#

but, like, it's a lot easier to use CP, especially for non-programmers

drowsy pewter
#

have you played with mods?

calm nebula
#

and CP has a lot of built-in optimizations that if you aren't careful about will shoot you in the foot if you try to replicate what CP does.

uncut viper
#

Content Patcher is just a mod that lets other people not need to worry about programming in order to edit textures and data and whatnot

#

it will do it for them

calm nebula
#

(ever been a victim of the "help my asset edits don't work in German?")

uncut viper
#

if Content Patcher didnt exist they could still do that but they would need to program their own mods with SMAPI to help

reef silo
vapid oak
#

remind me in 2 minutes to test

patent lanceBOT
#

grumbles yeah yeah fine zoe.txt can do. (#6194717) (2m | <t:1724204304>)

vapid oak
#

.timer remove 6194717

patent lanceBOT
#

Timer removed.

brittle pasture
#

the robot lives!

next plaza
vapid oak
#

but he is back aSDVpufferparty

neon rock
#

first time trying to patch a mod (made by someone else) and it keeps saying 'Utility' does not contain a definition for 'getSaloonStock'... I checked new updates but it didn't really change saloon stock so wondering if anyone gets the same errors :'(

#

would appreciate any sort of help

lucid iron
#

is the mod open source?

neon rock
#

creator said they won't be updating but they're open for anyone to update it

lucid iron
#

hm this function doesn't exist in current game Bolb

rancid temple
#

Utility is a class in Stardew's code, that method got scrubbed

ivory plume
neon rock
rancid temple
#

!decompile you should decompile the base game if you haven't so you can look through the code

ocean sailBOT
neon rock
#

i see i see

lucid iron
#

i wonder if the functionality of this patch can be replaced by editing Data/Shop

neon rock
#

very new to mod

#

-making

lucid iron
#

i never played the mod so no sure what it does

neon rock
#

me neither lol i just randomly decided to take a look (?)

rancid temple
#

It seems to add a whole part time job for the Saloon, so probably not

neon rock
#

but i think it's like u can work at saloon as a chef

#

yep

lucid iron
#

then ig u have to patch ShopBuilder.GetShopStock now

neon rock
#

okie

lucid iron
#

you should really do the decompile

neon rock
#

i think i shld take a look at base game code first haha... :')

#

thx for the help!!! sdv modding community is so cool

rancid temple
#

At least it's just a postfix, so it should be relatively easy to recreate

#

Course, it also has a method in it that doesn't exist too lol

lucid iron
#

well you can also just give up patching and write your own saloon line cook mod

uncut viper
#

this postfix seems to just add a recipe (or maybe just the dish itself?) to the saloon if an NPC is currently inside the saloon that is marked as having a certain recipe. you could do that without harmony using the asset pipeline

deep cypress
#

I just met something called Collection Expressions, and apparently they do not live in .Net6, I think. So, this is what I am trying to do, is list the farmers and their spouses. (I am remaking PolyamorySweet Rooms) Anyways...

            foreach (Farmer farmer in Game1.getAllFarmers())
            {
                farmer.haslistWives().Clear();
               foreach (var npc in farmer.friendshipData.Keys)
                {
                    if (farmer.friendshipData[npc].IsMarried())
                    {
                        farmer.haslistWives().Add(npc);
                    }
                    farmerSpouseDictionary.Add(farmer, [npc]);
                }
            }

Anyways, that [npc] at the end is apparently illegal in C#10... Please, if I might, how would I do this instead?

neon rock
lucid iron
#

oh you can use lang version latest if you want

uncut viper
next plaza
#

^, I use [a,b,c] all the time

rancid temple
#

Yeah, you should definitely go through and see if you can do away with any of these patches, no point in patching something if you don't have to

neon rock
lucid iron
uncut viper
#

(you dont even need the asset pipeline either really you can check for the shop menu opening)

#

they'd need a way to check the NPC's mod data!

#

which BETAS cannot do

#

currently anyway

lucid iron
#

this is how you load and edit game data in C#

deep cypress
#

How do you get the [a,bc] to work, if the project is .net 6?

uncut viper
#

(tbh, i didnt realize moddata was a field on Character and not just Farmer and thus didnt realize NPCs also had a moddata field)

lucid iron
#

C# lang version and net version dont have to match

#

can just put <LangVersion>preview</LangVersion> in csproj PropertyGroup

deep cypress
#

Ok! And then, it will just auto-work?

calm nebula
#

You need the net 8 sdk

rancid temple
#

Have to have it installed, just don't target it

calm nebula
#

Depending on when you installed VS you may have net 6

#

I had to do a pile of bullshit ti have it but that was during their late beta

deep cypress
#

I installed it a while ago, so I suspect it's on 6

uncut viper
lucid iron
#

do you have similar check for CustomFields

deep cypress
#

Well, I must have it, cause it works most Groovily!!! Thanks loves!!!

uncut viper
#

is there a specific instance where it'd be useful to check the custom fields of a specific instance of a thing

#

vanilla has a custom fields query but just for locations

calm nebula
lucid iron
#

smh vanilla leaving homework

calm nebula
#

That will only be reliable for NPCs in the same map as the farmhand

lucid iron
#

there's not really a case for instance + custom fields cus that thing is on the data model

uncut viper
lucid iron
#

but it is nice to be able to check them at all

calm nebula
ivory plume
#

(Mod translation class builder 2.2.0 is now available! This adds support for SMAPI 4.1.0's new i18n subfolders thanks to @next plaza, and more validation to detect invalid i18n files.)

uncut viper
calm nebula
#

It works fine if npc and farmer are on the map

#

But for farmhands, the rest of the game world (with the exception of always active locations) is basically in a dormant state

#

Not synced

uncut viper
#

wouldnt that be the case with this aedenthorn mod too though then if it was running on a farmhands client?

#

i guess it does only check when you specifically look for the saloon stock so you would be on the same map, but like, if the mod checked all characters everywhere, wouldnt it have the same problem

calm nebula
#

(In general, I don't assume mods behave in multiplayer.)

#

If you want to see something trippy

uncut viper
#

thats basically what im gettin at/askin though, is if the unreliability of NPC mod data is something my GSQ would be responsible for or if its just the same thing any ol' C# mod would worry about too

calm nebula
#

Try debug whereis on an npc as a farmhand when your not on the same map

uncut viper
#

and thus something i can write off as "not my problem, its better than nothing"

calm nebula
#

Eh, I would document it

#

If you're doing it as a framework.

uncut viper
#

tbf i wasnt plannin on callin it a framework

#

it doesnt let you add anything

calm nebula
#

(It should be obvious I don't believe in "better than nothing.")

lucid iron
#

it is sort of a content pack for some game functionality blobcatgooglyblep

calm nebula
#

At the very least, add a warning about such queries not necessarily being reliable on farmhands

uncut viper
#

"not my problem, better than nothing" was a not entirely serious answer i will admit and was more for exaggerated funnies, more accurately it would be "can i write this as 'its not reliable bc of how the game works, not bc of how my mod works'"

calm nebula
#

Yeah, and there are plenty of things that are host only

#

Sorry, I'm just jaded and old

#

I debug weird shit at work day after day lol

uncut viper
#

i just always prefer to know beforehand if something i plan on trying that might not work is gonna be Entirely My Fault for it not working to decide whether its worth it or not to actually do it SDVpufferheart

mortal stag
#

Just looked at the 1.6.9 changes. So for most mods no changes necessary right? The word "migration" scares me

calm nebula
#

Yeah, we're dealing with a pretty nasty case of ground bounce at work

#

Bitch to debug

#

To simplify - you generally assume that a ground plane is at exactly 0V

uncut viper
calm nebula
#

Ground bounce is when it isn't

uncut viper
next plaza
next plaza
uncut viper
#

ah yeah, the coordinates are off actually

next plaza
#

They could be on an entirely different map in theory too

uncut viper
#

its also not correct even when i am on the same map so. point taken

#

(wait actually i mightve had the wrong window open lmao)

ivory plume
orchid acorn
summer bobcat
#

I'm trying to change the code for JunimoNoteMenu again by using harmony and adding a prefix which is just its original code, but (eventually) going to have a change to the if statement that stops non-object items from rendering in the Community Center. I have tried to convert the code to harmony as good as I could, but eventually I kept getting this error displayed in the image. I am very confused on what is going wrong. Any idea on what is going wrong? Thanks in advance!

(Code) -> https://pastecode.io/s/tsdqme83

rancid temple
#

Returning null somewhere you shouldn't, gotta figure out where

#

Setting a break point and debugging might be a good option

summer bobcat
#

I was looking at previous texts from this chat, and found something about IMonitors and IModHelpers being the cause. I haven't set mine equal to anything, which probably would make it null; however, I have no clue on what to set them equal to.

uncut viper
#

are you ever calling Initialize in your JunimoPatch class?

#

if you just call the initialize function and pass in the monitor and imodhelper you got from your Entry function, it should work fine

#

but you can also just make them static fields in your ModEntry class

#

and assign them in entry

rancid temple
#
public static IMonitor? SMonitor;
public static IModHelper? SHelper;

public override void Entry(IModHelper helper) {
  SMonitor = Monitor;
  SHelper = helper;
}

Usually one of the first things I set up

#

Considering SObject is for Stardew's Object my S here might not actually be great to mean static lmao

#

But I've unfortunately gotten into the habit of it already so SDVpufferblargh

ivory plume
summer bobcat
calm nebula
#

that error shows up in the log of players

#

so either program perfectly (not possible) or...move your dev directory out of your home directory

uncut viper
#

(also, i have now just tested writing to and reading from NPC mod data as a farmhand and it appears to at least work initially; in what situations would the mod data get out of sync or behave weirdly, so i can accurately document the dos and donts of multiplayer BETAS use?)

rancid temple
#

What if you write before a farmhand connects and try to read?

uncut viper
#

its not syncing between the host and the farmhand, but i wasnt expecting it to

calm nebula
#

if

  1. Farmhand is on a different map than npc, that npc is a clone. their data isn't persisted. If farmhand then wanders to map with npc, they see data sent from hsot
#

writing to that clone npc is useless, it won't get persisted.

summer bobcat
uncut viper
#

i think ive actually just been misunderstanding how moddata fields were supposed to be used this whole time bc i always thought they were only ever meant to be local and not get synced lmao. i may be dumb

#

i.e. i never realized that the host will resend the npc data like that with the moddata and everything

rancid temple
#

Oh yeah, it's netcode so like every 3rd frame or whatever it was

calm nebula
#

like just move all your code somewhere else

#

I noticed you blacked out your name

#

just be forewarned every stack trace from your code will have your name in it

rancid temple
#

Oh that's what you meant lol

#

I was very confused as to how location could cause an NRE

calm nebula
#

sorry!

#

(I leave mine in my home directory, but also, like. (a) no published mods SDVpufferparty and (b) my dumb ass managed to get "night" set as my permanent Windows username.)

#

in my defense I was tired?

#

I care about Linux more?

rancid temple
#

But that just makes you seem cool lol

tiny zealot
#

boy was my face red when i learned about the stack traces leaking my home directory. i fixed it immediately

rancid temple
#

At some point, whenever I need to switch to a new operating system that doesn't involve just upgrading, I need to change my email to one that I didn't make when I was 12

uncut viper
#

the only embarrassing thing about my stack traces is that people are gonna see that i named my drives after pokemon bc i want as few things in my home directory as physically possible

rancid temple
#

I'm obviously too uncool because I keep thinking these things are fine lmao

calm nebula
#

(don't cha miss when operating systems didn't need an email account?)

uncut viper
#

i just edited my registry to fix my windows username after they nabbed my email for it

summer bobcat
#

Are Furniture inventory sprites stored differently than normal Object sprites?

rancid temple
#

TileSheets/furniture and furnitureFront

#

Oh wait, inventory sprites

uncut viper
#

(hey asking for a friend who had a tentative idea. on a scale from 1โ€“10 how bad of an idea is it to send or receive a bunch of strings from SMAPI's multiplayer message events every second)

tiny zealot
#

can your friend accomplish the goal using netevents instead? i would guess it's better to only send and receive on demand, but i'm not too familiar with stardew's netcode

#

i guess that question is the same as "can you send messages less often"

#

it's just that "every second" makes it sound like you're polling

uncut viper
#

the idea was to check every NPC's current location and current tile coordinates and (if they were different from last time they were checked) broadcast them to multiplayer clients to get more accurate data about where an NPC is in multiplayer

royal stump
#

if it's for syncing NPC data, you might be able to get away with tracking NPC warps from the host or something SDVpufferthink
(and send new data on warp, rather than every second, tbc)
that said, it's probably not going to be awful, depending on the volume...I'd consider it more of a question of whether the payoff's worth that

uncut viper
#

like half the GSQs in BETAS rely on the npc locations so if there was a hacky workaround that didnt cost too much thatd be nice
some of those rely on tile coordinates too so location alone wouldnt be enough

calm nebula
#

(npc map locations broadcasts the npc's location every 30 seconds)

uncut viper
#

i guess maybe a better question is "whats the quickest i can broadcast the data to balance both computational cost and also accuracy for when the GSQs happen"

royal stump
#

yeah, I guess that wouldn't work for tile checks in particular; even 1 second caching could miss them stepping on a tile

calm nebula
#

otoh, this is a problem that only arises if the npc is not on the same map as the player

royal stump
#

(e.g. if players block them until they go into hurry/shove mode)

calm nebula
#

you may be able to "get away" with just going "hey host, is npc at this location", host says "erm, no?"

#

and the player won't notice because the npc is not on the same map

uncut viper
#

i wasnt sure how i would await the host's response before returning the result of the GSQ (or action)

rancid temple
#

Could you send a message from the client to the host and trigger an update?

calm nebula
#

so, action is fine

royal stump
#

not knowing the answers here is why I made my stat token host-only SDVpufferlurk

uncut viper
#

action is not fine if you use my relative queries!

calm nebula
#

you don't necessarily have to do the action on the same tick, just go "here's a promise I'll do it!"

#

queries, otoh

uncut viper
#

i suppose i could make actions an IOU

#

but yeah queries need a result like immediately

tiny zealot
#

/j why not simply ask the host when you run the query and block until they respond

uncut viper
#

(the answer is i did briefly think about it but i didnt know how to do it even if i wanted to)

calm nebula
#

clearly just implement speculative execution but don't fuck it up like intel did

uncut viper
#

queuing up actions while waiting for a hosts response is a good idea though i didnt think abt it bc i was mostly focusing on the queries tbh

calm nebula
#

I think we were discussing query caching the other day

#

any query can change in a single tick

uncut viper
#

yeah

calm nebula
#

some are less likely to, but nothing, says, like

uncut viper
#

even if they were cached though im not sure how thatd solve the inaccurate npc location problem

calm nebula
#

"trigger action one does query A, adds mail flag. same tick, trigger action b does query A"

rancid temple
royal stump
#

tempted to suggest just making the NPC tile check host-only and return false if it's run on a farmhand, and explain in the docs that people should use it only to set flags or something SDVpufferdizzy

#

there's probably a less confusing way, but GSQs don't have a great way to wait for sync