#making-mods-general

1 messages · Page 119 of 1

rancid temple
#

I made a working custom version of SDV's positional audio stuff, but I lost steam on making it a proper framework lol

lucid mulch
#

the underlying api has the source location to do the proper stereo, but the constraints of all the source tracks being recorded in stereo meant the audio library didn't want to do fancy stuff with the location

grizzled stag
#

I think only the sound effects really need to be fix, like walking and using tools. For the most part, ambiance seems fine

calm nebula
#

(is it even volume based on distance?)

#

(or is it a hard cutoff)

lucid mulch
#
            float volume = this.GetVolumeForDistance(location, position);
            if (volume <= 0f)
            {
                this.LogSound?.Invoke(cueName, location, position, pitch, volume, context, "disabled for distance");
                return false;
            }
            cue.Play();
            if (volume < 1f)
            {
                cue.Volume *= volume;
            }
rancid temple
#

It should be volume based, I would have to dig it back up to be sure though lol

calm nebula
#

huh

rancid temple
#

I think the base game math does kind of cut off prematurely

#

I ended up doing different math to make it fully gradual

lucid mulch
#

theres a SoundsHelper.MaxDistanceFromScreen which sets it to 0

brave fable
#

yep, it's both distance-based and annoyingly cutoff haha

#

in practice i could never set a cue to have a volume at anything other than 1 or 0

calm nebula
#

ah, yes

brave fable
#

stupid system

teal bridge
#

Is it using linear instead of log scale or something?

calm nebula
#

I think because I started following from GameLocation.playSoundAt which...is a hardcutoff

#

and I literally cannot find where SoundsHelper.PlayAll is even used

lucid mulch
#

Its linear with 100% at 0 distance (or negative) and 0 at MaxDistance which is 12 or above

calm nebula
#

ah, I see

#

GameLocation.playSound has a nice taper. GameLocation.playSoundAt hard cuts off

#

this is the exact opposite of what I expected

lucid mulch
#

I just went to the reference implementation of SoundsHelper and looked at PlayLocal

calm nebula
#

yeah, and I went to "GameLocation.playSoundAt" because that was the 1.5.6 locational sound method

#

so yeah

#

probably need harmony to redirect 😛

grizzled stag
#

Maybe this is too big of a project for me to start lol

brave fable
#

you've certainly picked something incredibly arcane and technical lol

ornate locust
#

Okay, so I am a Stardew mod newbie making a mod that includes a map patch in town, and I'm having a bit of trouble with my SVE compatibility as a giant newbie. Mainly, SVE has a Day/Night tile in the space I am taking up. My mod works fine, but it throws a big red probably-harmless error that I'd like to get rid of. And I THOUGHT I could do it with RemoveDelimited, but I am missing something.

#

Is it possible to make this work since the sequence I want to remove has spaces in it?

#

I tried late priority because I wasn't sure if something else was adding it or something, I've tried several things fumbling around.

#

if I can't do it, that's fine, it just makes a big red warning when time changes over, and I wouldn't mind getting rid of that, even if it seems harmless

#

This is the error, it's just saying there's no tile on the right layer. Which there isn't, I removed it because I don't want that light there.

cinder thorn
#

I don't think priority is there?

#

It should be on the same level as Action EditMap

ornate locust
#

Pretty sure I tried that one, but I can try it agian

#

I've been on a real journey with this LOL

cinder thorn
ornate locust
#

Yeah, it's not removing it.

cinder thorn
#

Your is 4 50 90

ornate locust
#

hm. You know, I took that screenshot before changing the numbers

#

Sorry

calm nebula
#

RemoveDeliminated probably wouldn't work given the fact that the search also has spaces in it tbh

ornate locust
#

That's what I was wondering

#

Would there be a way to do this? Or is it something I'm going to have to just leave

woeful lintel
ocean sailBOT
#

JSON is a standard format for machine-readable text files that's used by Stardew Valley mods.

If you need help with a JSON file, you can upload it to smapi.io/json to see automatic validation and share the link here.

When making mods, it's recommended to edit your files in a text editor with JSON support, such as VS Code, Notepad++, or Sublime Text. These programs will check for syntax errors.

ornate locust
#

but it's not going to matter much if RemoveDelimited can't remove a sequence with spaces in it

velvet narwhal
#

would the MapTiles -> Remove function be able to do that before you do your day/night edits?

ornate locust
#

Well, I'm not sure? Does that work for NightTiles?

velvet narwhal
#

that i'm trying to remember if it even affects that

ornate locust
#

I don't think the tile is there until the right time, so I wouldn't think it would

#

It's no huge trouble if I can't fix this error since it does nothing on the user end, but it does throw up that red paragraph, and that might seem concerning to someone playing it.

velvet narwhal
#

have you tried the uh

#
"DayTiles": null
"NightTiles": null
}``` ?
#

and then just forcefully rewriting whichever ones that you still want for SVE?

ornate locust
#

Drastic, but it's an idea. I'd want to do that really early though, in case something else edited the tiles. But after SVE.

velvet narwhal
#

I'd hide all like you already have it behind the SVE hasmod

#

That way you know for sure you're compensating for SVE and everyone already bows to it anyway SDVpufferpain

tight rivet
#

Huh. SVE has .xnbs

ornate locust
#

Is there a way to have it load early but for sure after SVE? Like if it's an unrequired dependency, will it load after that, so I can just tag it to load as an early priority? I just don't want to wipe out some other mod on the map's lighting on accident.

velvet narwhal
#

you can probably do early priority and lock it behind the hasmod: SVE

ornate locust
#

Cool, thanks!

velvet narwhal
#

yeah i have no idea if the xnbs are just old files or if they're like, a fallback

tight rivet
#

.. hm. SVE does a lot of weird gating.

velvet narwhal
#

with my own bs covering SVE compat regarding marlon i understand the pain SDVpufferpain

tight rivet
#

.. honestly, having played it I uh..

#

cannot say I'll ever ercommend it

ornate locust
#

ngl I am mostly just doing this for basic compatibility, as in "doesn't fuck up SVE"

#

Don't particularly want to do much troubleshooting for a mod I don't really use, and this ooooone spot's gonna be the main trouble.

#

honestly I picked this spot because I thought SVE didn't touch it, but nope, an overlapping lantern and some random cliff/tree movements. Should have looked closer

#

still my best bet

tight rivet
#

eh, that's the best bet for SVE stuff

velvet narwhal
#

tbh that's why i'm not wholly interested in doing tilesheet/recolor mods cause i could just care less about compat for that

#

vicariously lives on nightshade anyway SDVpufferclueless

ornate locust
#

at least everything else is working fine so far

#

This one dang light is what I've tripped over

tight rivet
#

yeah, I was.. impressed by the thought SVE puts into make itself compatible with recolors

ornate locust
velvet narwhal
#

comma after DayTiles:null

#

sorry i typed that out while i was on my phone KEK

ornate locust
#

HECK.

#

S'alright, it's always one comma

#

heyyyy new lights, old, and SVE are working

#

Thanks for the help, that one was bugging me

velvet narwhal
#

i didn't think of doing the removedelimited, i only thought of the scorched earth process tbh woopsDerp1

ornate locust
#

It's not a bad plan since SVE replaces them itself anyway

#

Think the disembodied light is still there, but I can fix that, just good to see it's working with the tile swaps

brave fable
#

hi i still don't know the answer to this lol

#

itemdatadefinition passes item indexes back and forth to all the source and data methods so i kinda need it

lucid mulch
#

Game1.getSourceRectForStandardTileSheet(tilesheet, tilePosition, width, height)

brave fable
#

oml it's in game1, i've been checking items and objects and utils and data models

#

thanks haha

lucid mulch
#

inside ObjectDataDefiniition

public override Rectangle GetSourceRect(ParsedItemData data, Texture2D texture, int spriteIndex)
{
    if (data == null)
    {
        throw new ArgumentNullException("data");
    }
    if (texture == null)
    {
        throw new ArgumentNullException("texture");
    }
    return Game1.getSourceRectForStandardTileSheet(texture, spriteIndex, 16, 16);
}
#

and ParsedItemData.GetSourceRect just calls this.ItemType.GetSourceRect(this, this.Texture, (spriteIndex ?? this.SpriteIndex) + offset);

#

with more validation and loading wrapping it

#

but the actual math of all the modulo fun is delegated

grizzled rain
#

hey guys, is it possible to put a custom map into an event with changeToTemporaryMap or do i have to make it a seperate event?

velvet narwhal
#

if you do a switchEvent at any time you have to do the editdata on Data/Events/Temp

#

but if not, you can continue on in the same event script

brave fable
velvet narwhal
#

also if you've fully created it with like a data/locations you can just use the standard changeLocation (you just have to have loaded a blank to said Data/Events/<YourLocation>)

lucid mulch
brave fable
#

that's the id of the C# component, not the CP component

#

it's basically ModId though

hard fern
#

is it possible to have an npc not move onto the farm when married?

finite ginkgo
#

You can do that with spacecore, just keep in mind it breaks with PolySweet

hard fern
#

oh neat spacecore can just do anything apparently XD

inner harbor
#

Kinda defeats the point of marriage though. Will they still talk?

#

It is what id have tp do if Jacob became datable

next plaza
#

Yeah they still talk, they just use the normal dialogue stuff instead of marriage dialogue. So you'd want to conditionally have your main dialogue file be marriage-related when married to the NPC

dire plover
#

Hello, when I use scale up 2 the scaling is 16x16. I want it to be bigger, 32x32 or 64x64. How can I do this? What do I need to do to add extra pixels?I am not familiar with coding etc. Can you help me in the simplest way? Sorry if I made a typo, I use translate.

velvet narwhal
high folio
#

heya i have a question, i wanna make a translation mod since one of the mods i use no longer supports 18in, is there any guide on how to start? Thx in advance.

blissful saddle
#

how it is a mod no longer supports i18n? I would take it as they didn't implemented it at all

blissful saddle
rancid temple
#

Might be for LoC, I know blueberry was working on changing how translations are done

#

Also the page just says to ask for help here lmfao

blissful saddle
#

to what I remember Blueberry was implementing i18n in their mods

fossil osprey
#

They said in a post LoC doesn't use i18n, so maybe

rancid temple
#

Yeah no, this is definitely no longer i18n lol

high folio
#

yeah nvm i just learned how to do it haha

#

thx yall ❤️

blissful saddle
#

I just learned how to do i18n and found it so neat

velvet narwhal
#

The sheer bliss of splitting everything up SDVpufferchef

rancid temple
#

I love how the Nexus page says to make a copy of the EN files, then nothing else and the EN files say to check the description for how to do it

high folio
#

yeah i was lost because of that ngl

calm nebula
#

Documentation is hard

blissful saddle
#

sounds like state repartitions pushing problems to each other

rancid temple
#

For sure, I dislike making a Nexus page more

#

But documentation is a pain in the fucking ass

velvet narwhal
#

Idr if bluebs wanted outside mods or to submit pr but it seems like a framework for languages but I also didn't look at how the manifest was set up

next plaza
#

Why is blueberry not using i18n for translations now? SDVPufferThink

#

I see their doing some sort of content pack thing instead

#

Seems a bit odd

rancid temple
#

Using a custom asset file

#

I think there was some concern over not wanting to merge translations anymore

next plaza
#

I just saw blueberry's comment on the LoC comments about it

rancid temple
#

I'm not sure why the go to wasn't just making people host their own i18n mod pages

next plaza
#

But it still seems like it'd be confusing for people to not use the standard i18n system

blissful saddle
rancid temple
#

Realistically I think some kind of i18n loader situation would be nice

blissful saddle
#

players just want to copy-paste anyway

rancid temple
#

I can see the issue with updating a mod causing wiping i18n if you forget to keep that folder

calm nebula
#

There is technically project fluent fkr that

#

Anywyas

#

Is this even loc

high folio
#

Not sure but from someone whos pretty analog when it came to mods, modding itself is already problematic for most of us, translations are another annoying step in the already annoying race of installing a mod.

rancid temple
#

I mean, LoC is definitely doing this custom asset thing, I dunno if that's specifically what mod they meant though

calm nebula
#

This is for you then

high folio
#

hahaha}

calm nebula
#

Yeah, which mod do you mean

high folio
#

it was LoC

#

but no poblrems now

rancid temple
#

So yeah, I guess you literally just remove the Priority fields and then put all your translations in replace of the values

calm nebula
#

Seems messy tbh

#

Also you can't have multiple translation installed

rancid temple
#

Yeah, I forsee a lot of people coming in translating stuff they shouldn't be

calm nebula
#

Q

#

Is it possible to have splitscreen have two different languages

high folio
#

yep at the end is kinda messy but similar in some way

rancid temple
#

As someone who speaks one language, I can't imagine needing more than one translation lmao

calm nebula
#

Oh well. Blueb's problem, not mine

high folio
#

like now hahaha

calm nebula
#

I was even considering the thought of "alright what needs to happen to have splitscreen in two languages"

rancid temple
#

Two kids ✅
Kids using a computer ❓

#

Did you mean tablet?

calm nebula
#

The playerbase is children

#

Tbh it's gotten so bad that I have considered, on the very unlikely chance I have children, raising them in an anti technology cult

#

I think I have enough friends to do it

rancid temple
#

So Mormonism KEK

#

Is the playerbase children? I always thought SDV catered more towards millennials lol

calm nebula
#

Well, recall that I'm a hardware dev so

#

Some lying has to happen

rancid temple
#

Also you're like 100 right, so we're all children

calm nebula
#

Yup

high folio
rancid temple
#

Well the context was using multiple translations in split screen, in regards to LoC no longer using i18n

lucid iron
#

Idk how u would change language after starting split screen

rancid temple
#

I don't think you can

calm nebula
#

Not in vanilla

#

But a mod could

rancid temple
#

Ah

lucid iron
#

That's dangerous talk from famous retired modder

calm nebula
#

I'm not famous

#

I'm a nobody

rancid temple
#

Doesn't land as well when coming from someone so well known

#

People forget fast, but not that fast, maybe after a year of being retired

royal stump
#

SDVpufferlurk you can change language in split-screen whenever with debug language, it brings up the menu
but that affects both players, because LocalizedContentManager uses statics, apparently

#

so you'd probably have to replace that to make full support for multi-lang

calm nebula
#

Sounds doable

royal stump
#

I was hoping it'd just be like "if not main player, change language code", but subclassing the LCM is...i guess possible

calm nebula
#

Oh no

#

Harmony patching instanced statics

#

There is a reason I'm retired lol

rancid temple
#

Is this like full on war flashbacks bad

high folio
#

men translating this is making me hate my own language SDVpufferwaaah lmao too many synonyms and filler words jesu

rancid temple
#

That's funny, that's how I feel about English

calm nebula
#

Then I recalled it is more than 50% IL

#

And decided....uh

hallow prism
rancid temple
#

Marriage definitely guts an NPC, but I suppose so too does maxing out their friendship

#

Once you hit the top everyone stops changing

calm nebula
#

Clearly you should

silver pelican
#

Hi! Just got my map done and I dont quite know how to fix this. I initially had some of the vanilla tilesheets on my own Maps folder and when I decided to remove them (because I thought it'd find its way in the Conent folder), I get errors saying it cant find this and that.
https://smapi.io/log/ea26f22195ca4a43bb1acf557c1c42d2

ocean sailBOT
#

Log Info: SMAPI 4.1.7 with SDV 1.6.14 build 24317 on Microsoft Windows 11 Pro, with 30 C# mods and 21 content packs.
Suggested fixes: One or more mods are out of date, consider updating them

rancid temple
#

Only tilesheets in Maps are locatable

#

If you want to use non-maps tilesheets you have to include them with your mod

#

Which means they won't get any recoloring done that you don't do/make available to be done

next plaza
silver pelican
rancid temple
#

If you used any part of a tilesheet, it has to be included with your mod, either through being part of Maps by the base game or loaded by you or someone else into Maps or by being bundled with your mod

hallow prism
silver pelican
#

cryingcat cryingcat cryingcat aww alright, i'll try changing some things.

silver pelican
ocean sailBOT
#

Log Info: SMAPI 4.1.7 with SDV 1.6.14 build 24317 on Microsoft Windows 11 Pro, with 30 C# mods and 21 content packs.
Suggested fixes: One or more mods are out of date, consider updating them

rancid temple
#

Make sure all your tilesheets are present, edit your map and save it

#

Invalid tile GID usually means you either made a change without all your tilesheets present or it's still having issues loading a tilesheet

#

If you removed tilesheets from your map, I've noticed that sometimes Tiled has trouble removing it from the xml data, you might have to open the tmx in a text editor and manually remove any references to removed sheets

#

That one isn't very common though, I think I've only seen it happen once

brittle ledge
next plaza
brittle ledge
#

SBVShookEyes do you have your marriage stuff documented?

silver pelican
raw oxide
#

Hi quick question can we edit the spouse room tilesheet, for exemple i changed the position of the spouse room and the little thing that separate the spouse room still appear here an example (just to see what's going one)

uncut viper
#

given how picky both tiled and the game are about tilesheets, i dont know if id not mind a random stray tilesheet that you dont know where it came from

rancid temple
#

Yeah, I would be highly concerned about an extra tilesheet being in there

silver pelican
#

i removed it from the xml file where it needed it

#

ill try to load the game again

next plaza
#

(Only somewhat related but there’s also SeparateDatability, which is great for story unlocked datability, or anything else where it needs to be per player (such as specific romantic orientations))

brittle ledge
#

Ohh Casey, you are making my dreams come true skaiLove

#

I will be looking into all that for Wren!

silver pelican
#

It still produces the same error. I checked the Tiled and xml files if to see if there are general.png mentioned (or any susfish files) but none. bunnyhmph

rancid temple
#

Did you make sure to put all the tilesheets back in the same folder and make an edit so you can save it?

#

This is to make sure all the tilesheets have the right GID's in the xml

#

If you ever save the tmx without all the tilesheets present, it sets the tiles for that sheet to 0, which causes every GID after it to be screwed up

raw oxide
#

like can we edit something like we do for this but for a tileset :
"Action": "EditMap",
"Target": "Maps/Spouseroom",

rancid temple
#

Once you make sure all the GID's are saved you can remove the vanilla Maps sheets again

uncut viper
silver pelican
#

ill re-do it and spam ctrl + s XD

raw oxide
uncut viper
raw oxide
#

thank you very much

raw oxide
#

So i changed the spouse room position but in the game this little part appear and i don't know if it's hardcoded in the game or if i can change does anyone know ?

silver pelican
#

@rancid temple finalllyy fixed it! thank you so much!

frozen elm
raw oxide
#

thank you

prisma adder
#

Hey, I'm new to all of this, so apologies if I ask a dummy question. I'm interested in (eventually) modifying the fishing mini game behaviour. To start (hopefully) simple I want to try to output to the debug what fish is on the line as the Hit! starts. The modding guide has a page on Fish Data and it mentions in the Spawn Rate how a succesful bite gets determined. Is there an Event associated with this successful bite moment I can reference and take information from? Or is there a section in the code I can take a look at and see how to use it for myself?

rancid temple
#

Definitely no event, looks like FishingRod.DoFunction

#

Fishing is one of the most busted things to try to mess with lol

calm nebula
#

You sure about that?

#

Have you looked at the weather

prisma adder
#

Oi 😬. Well, guess no better way to learn a new skill than by picking something way too ambitious lol

I will take a look at the FishingRod specifically then 🤔

uncut viper
#

id rather mess with the weather than fishing

rancid temple
#

Coming from the person who did mess with fishing lmao

uncut viper
#

focustense did a lot more messing with fishing than me too, not sure how they feel about the weather though

rancid musk
#

As someone who messed with weather I didn't think it was that bad

royal stump
#

getting accurate weather state used to be a bit weird & the fields are scattered, but it's not the worst stuff I've touched
aside from when android 1.4 just randomly crashed if the fields were read in the wrong order

#

(granted, I mostly ignore the new weather context system)

calm nebula
#

Tbh my issue with the weather code is that it can't understand when it is dealing with today and when it is dealing with tomorrow

#

Also because i just looked at it re:streakbreaking

royal stump
#

more to do with that than SDV itself, but still

knotty glacier
#

Hi there, I’ve been attempting to replace the portraits in the Lance Expanded mod using spacecore’s ‘SourceSizeOverride’. I don’t know too much about modding (a lot of this is me guessing/ looking at JSONs previously written) so it’s probably a dumb mistake somewhere, but could someone tell me where I went wrong?

And here’s the SMAPI log:
https://smapi.io/log/7ee8bc753a6d4a27b0353e038721b724

I’ve attached some screenshots of how the folders are set up and the content.json. Any help would be appreciated!

ocean sailBOT
#

Log Info: SMAPI 4.1.7 with SDV 1.6.14 build 24317 on Unix 6.1.52.16, with 29 C# mods and 70 content packs.

tardy adder
#

does anyone know where the firework animation is? png wise

#

or is it only ze particles in Cursors_1_6?

drowsy pewter
#

is this for your friend?

next plaza
tardy adder
#

AHAHAHAHAHA 6480 has caught me

#

guilty as charged

drowsy pewter
#

i dont think people really like playing telephone unknowingly

tardy adder
#

fair point 😔

#

I just sometimes ask for them tho

#

also feel free to tell me no when it come to answering for that person, I will label my questions

drowsy pewter
#

I dont know the answer for sure but I would guess its on cursors 1.6 because thats where ca put all the misc images for 1.6 features

tardy adder
#

SDVpufferthinkblob thanky 6480

knotty glacier
ocean sailBOT
#

Log Info: SMAPI 4.1.7 with SDV 1.6.14 build 24317 on Unix 6.1.52.16, with 29 C# mods and 70 content packs.
Suggested fixes: One or more mods are out of date, consider updating them

blissful saddle
#

I just published my mod, but Nexus keeps giving me this header warning doesn't matter what I do:

#

can anyone confim it shows up correctly on the search?

brittle pasture
#

just lag probably
give it a couple seconds

#

and yeah its showing up for me

blissful saddle
#

ok, nice. I was tinkering with it for 5 minutes before coming here...

#

it finally disapeared. thanks

#

just sent DM to Bouncer. waiting for a the role change so I can showcase my own mod

#

I am excited

blissful saddle
#

can't find my discord ID

#

I thought it was substituted by unique usernames as a whole

fossil osprey
#

It is

#

But you have a little thing on your profile, click/hover to see your old ID

blissful saddle
#

ok. got it. had to activate the developer mode

#

nah, the discord ID is a full number thing

fossil osprey
#

Oh alright

blissful saddle
#

need to activate the developer's mode to see it

rancid temple
#

A dusting has happened

calm nebula
#

Congratulations

#

Welcome to the hotel California

blissful saddle
#

Now I have a chicken too!

#

I am part of the chicken team!

next plaza
velvet narwhal
#

Mobile cache lies to me

rancid temple
#

Further proof that mobile is inferior

brittle ledge
#

Agreed, I say from my phone SBVLmaoDog

spice inlet
#

@ivory plume Hello!
Regarding advanced custom tokens in CP. A multiplayer clients edit map patch did not apply starting from day 2 (after joining).
When checking with patch summary it said that specific patch did not apply because my custom token was not ready. Checking the token condition using patch parse (with input parameter) results in the expected value with it saying that the token is ready. Debugging the token I can see that IsReady is passed at some point when the neccessary data is received from the host and UpdateContext returns true once afterwards.
Setting UpdateContext to always return true did not help, even though IsReady always returned true after the data was received.
Is this intended behaviour and my token just validates to IsReady=true too late, or should I try and create a minimal reproducible mod with this behaviour?
--- Update:
Created github issue:
https://github.com/Pathoschild/StardewMods/issues/1061

brave fable
#

hi please help me mark my mod as compatible

#

it failed instantly and i have no idea why

next plaza
#

Man that file is so long

#

It's almost as if it expects you to also test any mods with your mod in retestWhenCompatible, which seems... odd

rancid musk
#

Oh hey javascript

#

That's my domain

next plaza
#

Unfortunately 😔

#

I understand the JS there

#

I just don't understand what the point of it is 😛

rancid musk
#

Seems like a logic error in Pathos' script. It's throwing an error because of an entirely separate mod by a completely different user that hasn't worked since 1.3

brave fable
#

my changes are basically identical to a different merged PR so i figure it's just something else in the file. but i have no idea how whatever PR that was managed to pass pipeline

next plaza
#

Well, to me it looks like it's complaining because LoC is now compatible but the Skill Prestige LoC needs to be retested now because of that. But... why should that prevent the PR from marking LoC as compatible

rancid musk
#

It kind of makes sense from the "don't let me forget to test X" perspective, but from a mod author's perspective it's not great.

#

(Also, these instructions are just silly. You don't need to npm install something to use npx)

npx strip-json-comments-cli data/data.jsonc > data/data.json```
#

I also have zero idea why pathos is using a docker image to validate a JSON schema when he's already got node installed and the docker image he's using is just using node to do it

brave fable
#

it's probably got something to do with the wiki compat page falling to pieces around him and fading to dust while he was writing the github solution SDVdemetriums

#

something something 1.6.15

rancid musk
#

Yeah.

#

I might just... PR a sane JS environment for this.

#

Rewrite the tool scripts in typescript + instructions on recompiling them. Convert that step to just... using node since it's already installed and set up.

brave fable
#

whatever it takes to mark my mod as compatible 🙏

knotty glacier
snow heron
#

i always used big craftables to make craftable mods, but now it's outdated. Is there another framework that allows me to make bigger craftables than json assets?

zenith venture
#

Hello! Sorry, I'm trying to make my first C# mod, but I don't seem to make it work. I've followed the instructions of the Modding tutorial, so it's probably a matter of the code.

I'm trying to make the Health Bar permanently visible like the Energy Bar. Could anyone guide me into what I'm missing or doing wrong, please?

using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Xna.Framework.Graphics;
using StardewModdingAPI;
using StardewModdingAPI.Events;
using StardewValley;
using StardewValley.Extensions;
using StardewValley.Locations;
using StardewValley.Menus;

namespace AlwaysVisibleHealthBar
{
    internal class ModEntry : Mod
    {
        public override void Entry(IModHelper helper)
        {
            helper.Events.GameLoop.SaveLoaded += GameLoop_SaveLoaded;
        }

        private void GameLoop_SaveLoaded(object? sender, SaveLoadedEventArgs e)
        {
            Game1.showingHealthBar = true;
            Game1.showingHealth = true;
        }
    }
}
lucid iron
#

So you need to find all the places that show/hide health bar

#

And block the hide

#

I don't have decompile handy rn to tell you where

brave fable
#

it's simple enough actually, so long as you can make a transpiler

#

the game checks in exactly one place whether to show or hide the health bar, and it happens right before it draws it, so you can't override it with any SMAPI events

#

per the decompile:```cs
// Game1.cs: protected virtual void drawHUD()
if (currentLocation is (MineShaft or Woods or SlimeHutch or VolcanoDungeon) || player.health < player.maxHealth)
{
showingHealthBar = true;
showingHealth = true;
// draw health bar
}

calm nebula
#

You could like

#

Do your own health bar in a Draw event

brave fable
#

with a transpiler you could just add a new branch with the label used in that if statement

drowsy pewter
solemn glade
#

do decompilers actually spit out the majority (90%+) of the source code?

#

or is it mostly obfuscated

brave fable
#

it's fairly reliable, but obviously not 1:1 since it's an estimate of what it was before compilation, and definitely not recompilable out of the box

lucid iron
#

What if you make maxHealth 1 more than health in a prefix of draw and then put it back to original value afterwards in postfix of draw

snow heron
drowsy pewter
#

json assets didnt make bigcraftables larger than that

rancid musk
solemn glade
snow heron
drowsy pewter
#

Ah I misread your first comment

solemn glade
#

will have to decompile the game soon if I want to learn and build my own mods

#

!decompile

ocean sailBOT
brave fable
#

oh for sure, pretty much every C# modder has it decompiled

drowsy pewter
#

So you want a machine thats larger than the vanilla machine size? You could also make a building that acts liks a machine?

lucid iron
#

Yeah there's no intentional obsfucation

#

Only ilspy doing a silly sometimes

solemn glade
#

I understand decompilers can get it wrong

#

yea

rancid musk
#

Honestly ILSpy is pretty impressive.

zenith venture
rancid musk
#

showingHealth doesn't make it show the health bar

#

That's just set because it did draw the health bar

#

So other code knows it's visible

calm nebula
#

Yeah, I've noticed that sometimes

lucid iron
#

As blueberry mentioned the best approach is probably doing a transpiler on draw

calm nebula
#

The game (seemingly pointlessly?) sets a field

#

Maybe for debugging

lucid iron
#

To skip the if statement that prevent health bar draw

rancid musk
#

The only way to make it display the health bar permanently is to mess with the drawHUD method with harmony.

snow heron
calm nebula
#

Or draw it yourself in a RenderedHuD event tbh

snow heron
#

they were taken from waybacktowns tile sheets

#

and made into craftables

drowsy pewter
#

So a furniture?

lucid iron
#

My suggestion to make the player always less than max hp is not a serious recommendation monS

snow heron
#

yeah

lucid iron
#

Don't do that ok

drowsy pewter
#

You can make furniture with content patcher

#

(i said it already lol)

brave fable
#

make the player aware of their health at all times by keeping them in permanent pain

#

health < max ✅

snow heron
#

oh thinking_face OOPS

drowsy pewter
#

Hahaha

snow heron
#

sorry i dont rlly understand modding well 😭

solemn glade
#

with 1.6 you can add new items through CP itself btw

#

iirc

drowsy pewter
#

There's a lot of good content patcher furniture mods but I'm not sure what the simplest one to recommend would be . Maybe rattan furniture or any of the HxW stuff, but they all use an additional framework to put it in a unique catalog

#

Just start by making the base CP mod and you can come back for help later

solemn glade
#

not just replacements, alternatively you can use AT to have numerous looks of an item without necessarily running into conflicts

drowsy pewter
#

!cp

ocean sailBOT
snow heron
#

okayyy thank you guys

zenith venture
#

Oki, thank you! I'll try again! ❤️

merry rampart
#

ok so for my map I'm trying to make a cave entrance blocked by a magic barrier, like the entrance to the mutant bug area in the sewers. unfortunately just copying over the tile property doesnt fully work. the sound plays, my character shakes, and the message pops up, but the barrier effect itself is in the wrong spot. im guessing that's something i cant change...

what i want to know is is there a way for me to achieve a similar effect with a different method. perhaps spacecore?

rancid musk
#

I am rusty at transpilers but this should handle the drawHUD() health thing I think? ```csharp
private static IEnumerable<CodeInstruction> DrawHud__Transpiler(IEnumerable<CodeInstruction> instructions) {
var Game1_currentLocation = AccessTools.PropertyGetter(typeof(Game1), nameof(Game1.currentLocation));

var matcher = new CodeMatcher(instructions)
    .MatchEndForward(
        // Game1.currentLocation is MineShaft
        new CodeMatch(in0 => in0.Calls(Game1_currentLocation)),
        new CodeMatch(OpCodes.Isinst, typeof(MineShaft)),
        new CodeMatch(OpCodes.Brtrue_S, name: "jump")
    )
    .ThrowIfInvalid("unable to find branch");

matcher.Insert(
    new CodeInstruction(OpCodes.Br, matcher.NamedMatch("jump").operand)
);

return matcher.InstructionEnumeration();

}```

ivory plume
# spice inlet <@226803198218731520> Hello! Regarding advanced custom tokens in CP. A multiplay...

Hi! Custom tokens using the advanced API are tricky, since there's complexities that Content Patcher normally handles for you. In particlar, readiness is more nuanced under the hood than it may seem.

The behavior you're seeing is likely:

  1. The main context update happens, but your token isn't ready yet.
  2. Your token becomes ready.
  3. The affected patches aren't reloaded until their update rate is triggered (default OnDayStart).

In other words, the token must be ready when the patch updates its context. For the default update rate, that happens early in the load process, long before the world is ready.

If a token needs to work consistently, it should generally be ready:

  • For the main player, before the game has loaded SaveGame.loaded into the game world.
  • For a farmhand, probably right after the host context message is received before it starts loading stuff into the game world.
zenith venture
#

Thank you! I'll try to learn what it part is to understand it. 😄

rancid musk
#

Yeah, transpilers are... not entry level.

ivory plume
# brave fable

(The pipeline failure isn't necessarily there for you to fix; it just means I'll fix it before merging the PR if not. I can reword the message to be clearer though.)

In this specific case, Skill Prestige for Love of Cooking was marked as broken because Love of Cooking was broken. Now that the latter is updated, we'll need to check whether the former is now compatible.

ivory plume
rancid musk
# zenith venture Omg, I understand nothing from it. @u@

To try to explain them simply, C# applications are compiled into what we call intermediate language, or simply IL. This isn't assembly/machine code, but it's a step closer.

Transpilers work by changing the IL. This can let you do basically anything as long as you understand what you're doing, but it can also be a bit fragile and cause issues if lots of other people are doing it too.

What the method I posted is specifically doing is looking for three specific instructions in a row that:

  1. Load the Game1.currentLocation value
  2. Check if the value is an instance of the type MineShaft
  3. If it is, then jump to another spot in the code.

And then right after that I'm basically inserting an instruction saying "No matter what, jump to another spot in the code." using the same destination. In C# terms I basically changed csharp if (Game1.currentLocation is MineShaft) into csharp if (Game1.currentLocation is MineShaft || true)

As transpilers go, it's pretty simple and should remain fairly stable as long as drawHUD is never changed to either remove that is MineShaft check or add a different check for that earlier in the method.

ivory plume
brave fable
ivory plume
#

(At my workplace, the pipeline is very strict; if you don't have the auto-formatter enabled, an indentation issue will fail the build.)

brave fable
#

it's still early days for the compat git though so i wouldn't expect it to be perfect just yet

spice inlet
brave fable
#

(likewise, our vc is completely littered with 'fix prettier issues' commits)

rancid musk
#

Yeah, when I have a bit of time this week I'll toss up a PR that cleans up the tooling. May as well use all my JS experience for something 😄

zenith venture
rancid musk
#

I looked at that docker package and it's really nothing but a wrapper around ajv so just writing a tiny script that uses ajv directly that can be run by the workflow + devs will be easy

rancid musk
zenith venture
#

Ah, okay. Sorry, it takes me a lot to understand things. Thank you so much for the explanation!

solemn glade
#

Don't worry too much, I have understood almost 0.1% of what has been discussed here!

calm nebula
#

At least we aren't discussing what happens when one thread changes the locale lol

brave fable
#

i'm convinced you were just coming up with ways to break my lovely mod on its release day

calm nebula
#

Look, bluebs

#

Near the end I treated users as incompetent and other mod authors as malicious. Or maybe it was the other way around

#

Just utterly assumed that if someone could do something dumb or shifty they fucking would lol

solemn glade
#

Okay so I've opened stardew valley.dll in ILSpy and saved it to a folder, can I just open my newly created "Stardew Valley Decompiled" folder in vscode or do I need to do anything with the .csproj file?

#

things seem fine in vscode

rancid musk
#

Tip: Don't use vscode for C#

solemn glade
#

maaan

calm nebula
#

This was especially after someone (still no idea who) kept inserting nulls in GameLoction.characters

solemn glade
#

I don't wanna use vs community

rancid musk
#

VS Community is way better for C#

solemn glade
#

is there an alternative I can use?

calm nebula
#

Like, legit got to the point where if something was even remotely nullable I assumed someone could make it null

#

Use rider if you want to be like that

rancid musk
#

I mean you can use vscode if you like, it just doesn't have a good C# experience compared to VS or rider.

solemn glade
#

I'll just have to suck it up and learn vs community

brave fable
#

VSC is basically the same as VSC, just more capable

#

you won't have trouble adjusting to one after another

solemn glade
#

Yeah, its just the interface of VSCom that confuses me

#

Rider seems more like IntelliJ to me

#

well.. its by jetbrains ofc it is

brave fable
#

rider feels more pycharm to me 😌

rancid musk
#

A lot of things that are basically effortless in VS, like having working build/debugging profiles, is not nearly as trivial as it should be in vscode. I set it up not long ago to see the state of vscode and I wasn't at all impressed.

solemn glade
#

Any experience with Rider?

calm nebula
#

I wish I could use vscode at work lol

solemn glade
#

Rider seems more familiar due to my limited experience in IntelliJ

calm nebula
#

Khloe, make a guess

brave fable
#

VSCode is perfectly fine if you don't expect build/deploy/debug to be part of your workflow. unfortunately, you absolutely expect that in SDV

rancid musk
#

Borland Studio

calm nebula
#

Vim

rancid musk
#

lol

#

I can't stand vi

#

If I wanted to memorize an entirely different set of key sequences than all my normal software I'd use Apple

#

vi is just different from everything else and for what

solemn glade
#

I mean ultimately its not a huge deal, if I have to learn VSCom then I'll learn that, but I don't really plan on making any huge mods right now. VSCode has been fine for simple json work for my fashion sense mod I'm working on so far and I imagine it would be fine for other aesthetic framework mods too

calm nebula
#

Oh

#

If you're not doing c# vscode is great lol

rancid musk
#

Yeah, vscode is fine for JSON. It is not fine for C#.

#

There is a very well defined line there.

solemn glade
#

What sort of mods would require C#, thus VSC?

lucid iron
#

Vscode is fine in the same way that vim is fine Dokkan

calm nebula
#

But for c# visual studio is still a crashes my stupid laptop king

#

Lol

brave fable
#

it's very important to remember that VS Code is absolutely not for Code

calm nebula
#

I don't hate vim lol

lucid iron
#

You gotta setup all the little things to make life easier yourself

lucid iron
#

So yeah if u r not already used to vscode for everything just use real IDE

brave fable
#

anywhere the light of frameworks doesn't shine

calm nebula
solemn glade
#

so basically custom items with their own functionality etc, npc related thingies etc

#

gotcha

lucid iron
#

You don't need C# for half of those

calm nebula
#

Nope

solemn glade
#

Oh awesome

calm nebula
#

That said c# is ez

brave fable
#

the list of things you can do without C# is finite. the list of things you can do is infinite

calm nebula
#

If a dumb ass like me can do it 😛

lucid iron
#

Even custom functionality is like, well what do u want to do? Did someone already make it for you?

calm nebula
brave fable
#

i can fix the inheritance tree, and you can pay me an hourly rate to do it

#

i can finish in the next 20~30 years

solemn glade
#

Well considering I'm new to all of this, I wasn't sure on the extent of what CP can do. If its mostly json work then that's great

#

Fashion Sense is incredibly easy to work with

lucid iron
#

Start with idea first figure out what tool u need later

calm nebula
#

Hi Pathos!

solemn glade
#

Okay well lets say I want to create upgraded versions of existing base game stuff like the furnace, keg, etc

latent mauve
#

Upgraded how?

calm nebula
#

Most of that can be doing in cp

solemn glade
#

CP has all the tools I need to adjust the recipe/craft and processing time within json?

calm nebula
#

See MPS

#

!mps

ocean sailBOT
#

MPS (short for Machine Progression System - https://www.nexusmods.com/stardewvalley/mods/21720) is a mod that adds tiered upgrades to all the machines in Stardew Valley. It improves the machines in multiple ways, such as increasing the amount of resources they produce, lowering the processing times or giving them completely new uses. It is fully customizable: you can change the recipes and sprites used for the upgrades. It doesn't conflict with any other mods.

calm nebula
#

Pathos, while you're here

#

Is Aura sufficiently annoying to build a detector for?

ivory plume
# spice inlet Hm, I might have to rely on the previous days data then for farmhands, even thou...

One nuance is that there isn't really a single context or context update; there's a hierarchy of nested contexts which are updated based on their update rate.

What you're thinking of is ContextUpdateType.All, which updates every context. But for example, an OnTimeChange context update won't affect a patch with the default OnDayStarted update rate; in that case the patch will continue using the values from its last context update (i.e. day start) until its own next context update.

solemn glade
#

Oh okay so it looks like it is definitely doable, I'm guessing Mail Framework mod requirement is because they have some sort of thing in place where maybe an NPC can give that item to you or smth, generic mod config menu integration for settings etc neat

#

Well then I suppose I should just look at the Content Patcher docs

spice inlet
distant radish
ivory plume
solemn glade
#

Oh hello Nach! hahaha

#

didn't realize you created it

calm nebula
#

It has a tendency to lock the save file and cause crashes

solemn glade
#

So what I'm getting at is that CP has become a multi-usecase tool for almost anything in the game ever since 1.6 came out and made certain things WAY easier

distant radish
ivory plume
# spice inlet ... What do you thing about mods adding custom update rates? 🙃 Eg in my case a ...

The context update flow is a bit complex and it's meant to be completely managed by Content Patcher so it can be optimized, tuned, reworked, etc as needed. I think mod-managed custom update rates would be very difficult to implement without significant performance degradation, and even if we implemented it... it wouldn't actually help in your case unless you actually require every content pack patch using your token to set a custom Update field value.

solemn glade
#

I brought this up before but I would've appreciated more visual videos for mod creating but docs aren't too complicated to follow if my experience following the fashion sense ones go

#

not many people have created vids around developing their mods unfortunately :/

distant radish
#

My biggest advice is to look at the code of mods that do a similar thing and then look for information on the coding documentation to understand what’s going on

#

That’s how I did it, knowing 0 before MPS

ivory plume
#

(Videos are nice, but they become outdated pretty quickly. We still have a lot of content packs being created with "Format": "1.3" probably due to old videos and such.)

solemn glade
#

Oh that is right, I think Pathos made a pin a while back that a ton of mods have their source code openly available

#

62% of mods or something

drowsy pewter
#

every content patcher mod you can easily read the code for, its not what is meant by "open source" which refers to C# mods (which have to be compiled for users)

#

so its not a concern for your case

calm nebula
#

Technically speakinf

#

Open source is not source available

drowsy pewter
#

yes

ivory plume
#

(Content packs can be open source too. Even if anyone can open and edit the content pack files, they can't do anything with it without a code license.)

solemn glade
#

Typically personal use only unless otherwise stated from the author or in their license yea

#

I've referenced a few json files from other hair mods already and that has helped

#

I really need to set myself up some base-farmer aseprite templates to add hairs and clothing onto

calm nebula
#

(Came across a snippet of code licensed cc-0 recently)

#

It was weird

#

(Splitmix 64 for those curious)

solemn glade
#

The "female" farmer sprite is different to the male one right?

calm nebula
#

Yup

solemn glade
#

I'm trying to sift through them and identify which is which

#

okay so the bald version of both farmer sprites have a "clean" head

merry rampart
#

I dont think anyone saw this earlier so gonna repost

#

in the meantime ive been playing with spacecore's triggeraction feature and it's not achieving the effect i want

old edge
#

How do I release a beta version

lucid iron
#

make the version 1.0.0-beta and put it in optional files?

#

why do u want one tho

calm nebula
#

It's nice getting testers sometimes

solemn glade
#

Coming back here to ask whether it is possible to hide certain pixels of the default farmer sprite via fashion sense

#

most of my hairs so far have been made either extending above the farmer sprite's head or ending exactly on the outline of the top of the farmer sprite's head

#

unless I'd have to make a body mod that clips some of those pixels off

#

I've just noticed that if I don't cover up certain pixels they will be visible even if I don't necessarily want them to be

merry rampart
#

is it possible for my Action tile property to do two things? For example, I want a tile to do trigger actions added with spacecore but i also want it to play a string message. and i cant figure out how exactly to do that....

#

unless i make two tile properties and overlap them... would that work?

#

well i suppose i'll find out

#

nope. i get the string but not the trigger action

hard fern
solemn glade
#

Sorry about that, sure

#

So here is an example hairstyle I made for my character. This works fine in-game because all the pixels for the hair are covering up the base sprite. However if I do 2nd image the pixels that haven't been covered at the top will still show up in-game and it looks weird

#

I wasn't sure if Fashion Sense came with anything that could fix that or whether its more of a matter of a custom body mod, cause this sorta thing would effectively make the character appear "shorter"

#

ofc I'm saving my pngs without the template farmer turned on.. that produces quite... deep fried results

hard fern
#

I think that would have to be a body mod

solemn glade
#

Ah figured as much

#

dammit

merry rampart
#

how do i get a trigger action to play a string...

i think that might be my only option here

uncut viper
#

play a string?

merry rampart
#

because i cannot get these two tile properties to do what i want

#

thats what im trying to do

#

one just keeps overriding the other

#

basically, what i want to do is do a trigger action with spacecore when the farmer clicks a tile. eg. take damage, a small sound plays. but i also want a string message to display

#

and i cant figure that part out

uncut viper
#

there is no trigger action action for putting a message on the screen like that

#

i dont know an alternative solution off the top of my head unfortunately, but i know thats not something you can do with a Trigger Action

merry rampart
#

ugh

#

i can get a hud message to show with spacecore but thats not what i want

calm nebula
uncut viper
#

first step to a violin is buying a strad, obviously

lucid iron
#

Do you mean showing one of those dialog boxes

merry rampart
lucid iron
#

i thought thats in vanilla think

merry rampart
#

with Action tile property, yeah. but I already have that for a spacecore trigger action

uncut viper
#

(not as a trigger action action)

merry rampart
#

and therefore a string wont work

lucid iron
#

oh i see

#

well its prob easy to make blobcatgooglyblep

calm nebula
#

Chue, I nominate you for action tile lists

lucid iron
#

nou

calm nebula
#

Atracore is dead and I'm retired

lucid iron
#

besides this needs to be a trigger action action not a tile action (which already exist)

merry rampart
#

im considering just throwing out this idea. use the vanilla magicalbarrier property instead, edit the string for my location with a cp condition, remove the effect for my location (if I can find it in the tilesheets)

calm nebula
#

Or, you know, letting people have two tile actions

#

Thinking about this is easy enough to PR

lucid iron
#

do u want ppl to do like

#

MultiAction \"action 1 args etc\" \"action 2 args etc\"

calm nebula
#

Yup

lucid iron
#

terror

calm nebula
#

V easy

lucid iron
#

but yes i can see how that's ez

calm nebula
#

Thinking about it, since spacecore trigger action is most likely second

#

Would be a good fit for spacecore

velvet narwhal
#

Pr for action(s) on edit map woopsDerp1

lucid iron
#

wdym u can do that already

calm nebula
#

Casey what do you think.

uncut viper
velvet narwhal
#

Skool

uncut viper
#

i dont know why i didnt already do it when i added RandomAction, which just takes in a list of action strings already

lucid iron
#
"SetProperties": {
  "Action": "mushymato.MMAP_ShowConstructForCurrent Robin true"
},
velvet narwhal
#

Does it let you? I thought you're only allowed 1 action per tile

lucid iron
#

the change atra proposed is a new tile property

#

separate from Action

#

so it's like this in a cp EditMap, but u can ofc do it on tmx too

"SetProperties": {
  "MultiAction": "\"action 1 args etc\" \"action 2 args etc\""
},
#

i didnt know betas had RandomAction for map though

velvet narwhal
#

Ah. Yeah that'd get around the issue of $action not working in message or dialogue tiledata

uncut viper
amber loom
#

I thought I was going crazy bro why does Aquarium sprites use 24px bx 24px instead of the usual 16

calm nebula
#

That's the aquarium sprites yes

amber loom
#

someone should add that in modding wiki

uncut viper
#

(most of the map stuff was just experimenting with existing BETAS stuff but on tile/touch actions anyway and i didnt put too much thought into it bc Action already existed, but multiple action strings was one of them. i just never found it very worthwhile from a personal time perspective to finalize it for a Singular Map Thing in BETAS)

#

whats the map action to display a hud message called, anyway?

#

just Message?

lucid iron
#

b4 atra mentioned the multi action thing my other thought was a trigger action action that just let you run tile actions

velvet narwhal
#

Message and dialogue does the standard little message box

lucid iron
#

but hm i dunno how u would get the tile its too indirect

royal stump
#

probably require the location name and x/y in the action, then call gameloc.performAction

calm nebula
#

Esca! Is this a good fit for emp

#

MultiAction

#

Will send PR if requested

royal stump
#

it is, I was debating proposing it, but it'd fit something like SpaceCore a little easier SDVkrobusgiggle

#

if you wanna write it yourself, sure, thanks

#

I don't think I have a specific place for random tile actions there, but everything's standalone folders/files in the code & I can write up a readme bit somewhere

calm nebula
#

Hey, I like to think I have two brain cells and can send a PR not too out of your style

#

Comment every line, you know the drill

#

(I kid I kid)

royal stump
#

SDVpuffermlem I don't comment every line anymore, just half of them

calm nebula
#

I'll add it to the list of things to do on Christmas

#

Remind me in 31 days to do the thinf

patent lanceBOT
#

if I wasn't wasting time on your menial requests, I could probably have solved p=np by now. jerk. (#6383172) (31d | <t:1735262558>)

lucid iron
#

why is uber so mean lately

calm nebula
#

Can you match my style

royal stump
#

mmmaybe, not sure if I can read someone else's code long enough to get a feel for it these days

#

(proposals aside) (if someone gives me a PR, my brain won't shut up until I go over it)

tiny zealot
calm nebula
#

It's easy! Have incoherent naming schemes, make a file a thousand lines, hide something at the bottom of every file randomly, and also use IL emit badly

#

But make sure every internal function has a docstring even if it's stupid

#

Like "applies harmony patches for this class"

royal stump
#

I've got a, uh...9087-line hand-written file in FTM, so I think I can give that a shot

#

the html editor is such a mess

uncut viper
#

@merry rampart dont feel obligated to use it since i know you didnt ask for another dependency, but if you do want it, i added a Message trigger action action to BETAS (https://www.nexusmods.com/stardewvalley/mods/27100). usage is Spiderbuttons.BETAS_Message "Your text here"

#

it'll display text on the screen like the map action

merry rampart
lucid iron
#

button what about a trigger action action that let you tweet

#

show this on screen

uncut viper
#

doesnt adhere to nexus rules

lucid iron
#

it's false advertising if your mod lack this feature \j

uncut viper
#

nexus rules dont allow for mods that connect to the internet in any way unless doing so is essential for the mod itself to function (or possibly if it has a really really good reason to)

lucid iron
#

yea i wasnt suggest actual social media integration

calm nebula
uncut viper
#

well then you'll be able to do it eventually when i add a DialogueBox action thatll let you show a portrait too

#

eventually tee emm

tiny zealot
next plaza
#

(For the record, I have been contemplating a multi action action...)

calm nebula
#

Awesome!

#

You do it so I don't have to

next plaza
#

You never have to, you're retired 😛

calm nebula
#

Yup!

tiny zealot
uncut viper
#

idk, i dont find that too unreasonable a restriction to make, since its not like theyre just taking your word for it. they require you to email them to provide your reasoning and source code for approval

tiny zealot
#

oh i didn't mean "unreasonable", i meant "not actually a restriction"

merry rampart
#

Hmm my message isn't showing up correctly. I am using i18n for it...

tiny zealot
#

frankly i'm shocked they're doing any amount of enforcement on it

uncut viper
#

it would restrict me from adding social media trigger action actions SDVpuffersquee

uncut viper
devout otter
#

If a mod's main function is to post tweet, isn't connecting to the internet essential for it to work.

uncut viper
#

(or did you forget to put it in quotes at all)

uncut viper
#

also, theyd still have to approve it anyway

brave fable
#

but it could be...

merry rampart
#

the i18n is in quotes...

devout otter
uncut viper
uncut viper
merry rampart
#

This is the trigger action code

            "Action": "EditData",
            "Target": "Data/TriggerActions",
            "Entries": {
                "{{ModId}}_ESCaveBarrier": {
                    "Id": "{{ModId}}_ESCaveBarrier",
                    "Trigger": "Manual",
                    "Actions": [ 
            "spacechase0.SpaceCore_PlaySound debuffHit true",
            "spacechase0.SpaceCore_DamageCurrentFarmer 2",
            "Spiderbuttons.BETAS_Message "{{i18n:String.ESCaveBarrier}}"
            ],
            "MarkActionApplied": false
                }
            }
        }```
#

I dont think i did the quotes on it right...

uncut viper
#

you havent escaped the quotes, which also means you are missing one

#

"Spiderbuttons.BETAS_Message '{{i18n:String.ESCaveBarrier}}'" this should work too

merry rampart
#

ah ok

uncut viper
#

"Spiderbuttons.BETAS_Message \"{{i18n:String.ESCaveBarrier}}\"" or the escaped quotes version, if that one doesnt for some reason

merry rampart
#

yay that one worked~

#

ok so now when i click the tile, a sound plays, my farmer takes minor damage, and a message plays. exactly like how clicking a magical barrier should be :3

#

now i go back to pixel art

uncut viper
#

godspeed SDVpuffersalute

modest dagger
#

Do NPC Gift tastes have to be in the character file or whatever or can it be it's own file

lucid iron
#

u can do as many EditData as you want

uncut viper
#

i mean they have to be added to Data/NPCGiftTastes but you can put them in whichever json you want

#

you could even do one separate editdata for each kind of gift taste, each in its own json file, if you really wanted to

hard fern
#

you can even put them in the least likely json XD

calm nebula
#

makes twenty six different files that edit data/npcgifttastes

hard fern
uncut viper
#

i wouldnt but its not the worst idea

calm nebula
#

You think I'm joking but

modest dagger
#

good to know. NPCs are intimidating to make

calm nebula
#

Pam Tries does have three separate jsons

rancid temple
#

Just for gift tastes?

calm nebula
#

Pam Tries basically has her have three separate moods

#

Good, neutral, bad

tiny zealot
#

atra, that makes sense though. you are setting different gift tastes according to mood

calm nebula
#

Her gift tastes, schedule, dialogue completely change between moods

modest dagger
#

wait you're atra I thought you were liz my god

rancid temple
#

Lmao, they finally got someone

uncut viper
#

i wouldnt call that splitting the gift tastes then, id call that just conditional gift tastes

calm nebula
#

Yes!

drowsy pewter
modest dagger
#

Anyways just for testing purposes if I don't add a schedule or dialogue will my NPC just spawn somewhere and stand there if I test it?

calm nebula
#

I mean like

#

Our names make it clear imo

#

The electrical engineer is the quantum mathperson. The mechanical engineer is the classical mathperson

#

That's the joke

uncut viper
#

i dont know what either of you do for work

brave fable
#

i thought it was about classical gas

uncut viper
#

i thought it was about music

patent lanceBOT
regal nacelle
#

is there any parakeet pet mods?

uncut viper
velvet narwhal
acoustic summit
#

Is it possible to make a tool using a custom class? Im getting a xml include error on day save, and I feel like I might be going about it the wrong way lol

velvet narwhal
#

i recall bluebs hating the drawTool

acoustic summit
#

I mean as a class that inherits Tool

uncut viper
#

custom classes need to be registered with the SpaceCore serializer

#

or else you cannot save, as you have discovered

#

because the game cant write them to the save file

acoustic summit
#

This may have to be the first non smapi/content patcher dependency then, tragic

velvet narwhal
#

you can go the hard route and make your own serializer

#

become the second thing that smapi gives a yellow warning for SDVpuffersquee

modest dagger
#

i'm getting a headache just reading this

rancid temple
#

But I think if you don't have dialogue your NPC will just not be interactable

tiny zealot
rancid temple
#

I always thought that's what SpaceCore was doing lol

tiny zealot
#

nearly everyone uses spacecore, so you may not find it worth avoiding

uncut viper
#

i think in a broad sense that is what spacecore is doing

#

a very broad sense

tiny zealot
#

spacecore writes a lot of stuff to a sidecar file, if memory serves (i'm one of the twelve people who doesn't use it, so i can't say for sure)

acoustic summit
#

I have seen it on a lot of other mods, and it seems well kept, so Ill definitely try to make the dependency work, thanks for the tips 🙂

uncut viper
#

it does write to its own file

uncut viper
calm nebula
#

You basically can't, next question

uncut viper
#

ah, rats

#

mice i mean

#

spacecore dependency for me it is SDVpufferpensive

tiny zealot
#

SDVpufferthinkblob this sounds like a challenge (i probably won't try it, since i don't have a guinea pig project to try it on)

hard fern
#

thinking of spacefore dependency...

tiny zealot
#

button, if it helps you, portable hole is a normal GameLocation so it saves just fine. maybe you can get away with not having a subclass, like i did?

uncut viper
#

oh im subclassed as hell

tardy adder
#

Mike NPC being a rebel again and not wanting to load for some people >->

hard fern
#

uh oh

#

this gives me deja vu 🤔

uncut viper
#

i could ofc do it without subclassing. however that would need some annoying harmony patching i think and storing things in mod data instead and registering new netfields and yada yada and its just so much easier to be lazy and subclass instead

#

(not annoying patches as in like, insurmountable transpilers or anything. just Annoying in general)

calm nebula
#

I support u

uncut viper
#

would i be able to create a mutex if i wasnt subclassing

calm nebula
#

Just in general

#

Lol you can create a mutex without subclassinf

#

Pathos probably didn't mean this lol but

#

The global inventory mufexes don't have to be associated with an actual inventory

#

You can just get a mutex

tiny zealot
#

haha i followed this same advice from atra before and i use global inventory mutexes for tater toss

uncut viper
#

would i just have to store every locations mutex in like my own static dictionary or something and then use those to initialize them in the netfields or whatever

tardy adder
ocean sailBOT
#

Log Info: SMAPI 4.1.6 with SDV 1.6.13 build 24313 on Microsoft Windows 11 Home, with 94 C# mods and 179 content packs.
Suggested fixes: One or more mods are out of date, consider updating them

tardy adder
#

Since I can't seem to find the issue, although the log does say 1.6.13 >->

uncut viper
#

("every location" bc this is for museum framework so Each museum gets its own mutex which is not attached to an inventory it just stops two people from donating at once)

velvet narwhal
#

i don't know which one is your npc woopsDerp1

tardy adder
#

Mike NPC

velvet narwhal
#

if it's not showing up at all, and there's no errors, is your Home location correct and loaded?

tardy adder
#

yes

#

At least when I test it he is loading up

velvet narwhal
#

none of those location errors are your home locations, yeah?

calm nebula
uncut viper
#

isnt that what was implied by "my own dictionary or something"

#

or am i misunderstanding

tardy adder
calm nebula
#

No! The game maintains a dictionary lol

uncut viper
#

mutexes and netfields are two things i still dont understand very much let alone the two put together

calm nebula
#

Check Woods

#

You'll see immediately

uncut viper
#

are you just talkling about the AddField stuff

tardy adder
#

I am wondering if Part of a Saloon Breakfast might be doing something SDVpufferthinkblob to affect his loading in - nope not that

calm nebula
#

Look at the lost items shop

#

The mutex for it

uncut viper
#

oh i didnt expect the other functions for it to be at the bottom with only the one at the top lol

#

i also did not know that worked on a mutex

calm nebula
#

Yeah as I said

#

I don't think Pathos intended thia

#

It was put in to make global inventories work

#

But moddets

#

You give them. An inch

#

They will take a mile

uncut viper
#

hmmm

rancid temple
#

Oh right, I guess I need to actually use the mutex thing for my global inventory

uncut viper
#

much to think about. i will let future me give it some thought with no guarantees that i will move away from the easy spacecore method for this

calm nebula
#

Tbh everyone except about two people use space core

uncut viper
#

for me my main motivation in not using it would be "kinda weird for a framework to rely on another framework innit"

fluid marsh
#

Is anyone able to help me figure out what's wrong with this mod I'm making? It runs fine when I launch the game, the config appears in the config menu, but no matter what when I load a save the portraits don't show up. A config file isn't created in the mod folder either. Here's my content.json: https://smapi.io/json/content-patcher/a2e9be42c41f4a408d0b3029e6e74453

uncut viper
#

a config file not showing up at all is strange. are you 100% sure you're looking in the right folder? does the console say anything out of the ordinary?

hard fern
#

i've also had the experience of me not loading the right version of a mod in

calm nebula
#

Everyone uses spacecore

uncut viper
#

my "i dont like relying on dependencies" idealism though SDVpufferpensive

hard fern
#

make a framework who relies on a framework who relies on a-

#

you get the idea

brittle pasture
#

havent been tuning in but with enough patches and branches you shouldnt need a dep

#

(and string crimes, for custom data in modData)

uncut viper
#

your untuned nature missed the part where i said all of the above would be "Annoying"

calm nebula
#

(Both are dead)

uncut viper
#

does atracore at least launch in 1.6

calm nebula
#

It did until 1.6.9!

velvet narwhal
#

i imagine if it did, smapi was doing a lot of heavy lifting

calm nebula
#

And is like, six lines of code from launching lol

#

I'm just lazy

brave fable
#

honestly you can make your own serialisation gizmo fairly easily, but also why would you when spacecore is doing pretty much what anyone would do

calm nebula
#

There isn't a point unless I revive my repo

#

I just don't want to

next plaza
#

You're retired, not lazy

#

I'm the lazy one here

uncut viper
#

tbh if i was retired id still call myself lazy

#

when you're retired is like, the most acceptable time to be lazy

#

you've earned it

next plaza
#

Well, lazy implies negativity

uncut viper
#

a forest starts from but a single seed or whatever the saying is

brave fable
#

a nap starts from a single yawn

uncut viper
#

a blue starts from a single berry

velvet narwhal
#

you're not lazy, casey, you're contracted SDVpuffersquee

rancid temple
#

Wild to say you're lazy for not working a second job, basically without pay

lucid iron
#

i think everyone should all slacc more AquaThumbsup

velvet narwhal
#

technically isn't it 3 jobs? nexus, actual stardew dev, actual full time job?

rancid temple
#

Is that implying that interacting with Nexus in any form is like a job? lol

next plaza
#

Y'all are assuming I do full time levels of work for all three things 😛

velvet narwhal
#

for casey it is, considering the amount of bs notifications/keeping spacecore alive per smapi update

#

combined it do be A Lot Of Work™️ though

next plaza
#

Eh, I usually don't get too many comments. Except that one day recently

rancid temple
next plaza
#

(war flashbacks to waking up to over 140 new comments)

calm nebula
next plaza
#

Well I abandoned the vast majority of them 😛

calm nebula
#

God it's cold outside

rancid temple
#

@lucid iron I dunno which ones are busted, but some of your source code links 404

#

From Nexus

latent mauve
#

Is this a sign that Mathperson is gonna start to knit a scarf? 😛

lucid iron
#

oh prob just mmap

#

i moved that recently

calm nebula
#

Nah I need gloves lol

latent mauve
#

LOL

calm nebula
#

Otoh. Box of socks

latent mauve
#

I mean, socks are mittens if you try hard enough, so that's close enough, right?

hard fern
#

XD speaking of socks and scarves...

fluid marsh
tardy adder
#

wait those were knitted by you?

hard fern
#

i had an idea to make a mod that allows you to create knit scarves and mittens and such...

uncut viper
tiny zealot
next plaza
#

(The plan has not worked so far...)

uncut viper
#

no no

#

you have to make a knitting mod

#

but make it wrong

#

so that atra has to get back into modding to fix it

#

just say you didnt know how knitting worked but you accept PRs

rancid temple
#

Like the RNG mod

next plaza
#

Ah yes, using Cunningham's law

velvet narwhal
#

true, i gotta make an extremely horrendous code and atra will get physically furious

uncut viper
#

exactly

tiny zealot
velvet narwhal
#

okay but you didn't do Game1.currentLightSource = new(); and i got a

uncut viper
#

i think ive only seen atra be aggrieved like, once

tiny zealot
rancid temple
#

I dunno if that was anger, more like disappointment

#

It sends the game to the shadow realm (deletes all lights)

velvet narwhal
#

it banished all lights because i was trying to do some funny ambient lights but not knowing anything and wanting to get rid of the funny errors SDVpuffersquee

brave fable
#

i don't know if i've seen the same amount of resounding disappointment in this channel as when i posted my incredible i18n reflector(tm)

rancid temple
#

Your most recent LoC update?

uncut viper
#

oh if we're limiting it to this channel then i cant recall anything

brave fable
#

oh no, the most recent loc update is the successor to the i18n reflector

rancid temple
#

Ah

brave fable
#

which should make you appreciate it all the more

velvet narwhal
#

i appreciate your out of the box idea of turning your mod into a framework for languages, yes

brittle ledge
uncut viper
#

purling? isnt that a winter olympic sport

brave fable
#

tbf i did the same thing for raised garden beds, but that one's less popular

hard fern
#

no that's curling

uncut viper
#

no i think its purling

#

(/j)

brittle ledge
rancid temple
#

I guess it's fine, once I understand it, but I cringe at the idea of placing so many internals within reach of someone who's supposed to be changing things lol

brave fable
#

i trust my beloved translators. what's the worst they can do

rancid temple
#

complain

tiny zealot
brave fable
#

there's already like 4 translation packs out so clearly they're a smart bunch

hard fern
#

XD

uncut viper
#

there are benefits to making them CP editable. drawbacks ofc too, but definitely benefits

brittle ledge
uncut viper
#

can edit them for reasons other than translation, too

velvet narwhal
rancid temple
#

Isn't sterling for silver?

velvet narwhal
#

bluebs just trying the damnedest to rid us of the MTL laziness

lucid iron
#

they used mtl though

#

at least the cn tl i saw

rancid temple
hard fern
#

sterling's lesser cousin, stainless

teal bridge
#

Or was this the thing that reflected on your own i18n for no particular reason?

uncut viper
#

this was the thing to reflect into the CP component im pretty sure

#

their own CP component

calm nebula
rancid temple
#

atra is a full time modder again

#

First aquarium, now RNG

calm nebula
#

No

#

Noooooo

brittle ledge
#

atra you can't quit yet, you haven't roasted me for my incorrect knitting technique

calm nebula
#

It's a rant not a mod

uncut viper
#

then why does it inherit from Mod

fluid marsh
next plaza
calm nebula
#

well, it's an analysis of rng with code attached

still frost
#

before i get too committed to the idea of my npc's hobby being fishing, how complicated would it be to get them to fish like willy does beyond creating the animation for it?

velvet narwhal
#

spacecore, that's all

brittle ledge
#

spacecore added something for oversized animations in 1.6

#

pretty sure Fishmonger uses that now

still frost
#

oh cool, is there a tutorial page you can point me to so i can see the process?

still frost
#

perfect ty ty SDVpuffersalute

hard fern
#

:3 i just need to finish borking my marriage dialogue, and get an event done so i can test...

still frost
#

nice! im still needing to make mines house interior, do scheduling, dialogue, and heart events SDVpuffersalute

hard fern
#

.< if i can take the easy way out by giving my npc only half the amount of dialogue due to being unavailable for a good bit of the week, i will lol

still frost
#

lmao i get that

brittle ledge
#

You really don't like dialogue huh SDVpuffersquee

uncut viper
#

why waste time say lot dialogue etc etc

hard fern
#

me vs dialogue, mortal enemies

#

this is why i can never finish any fanfiction i've written 😔

brittle ledge
#

Not sure if you're trying to finish it all at once, but I usually do mine in multiple settings (and I like dialogue). Like, do some dialogue, work on an event, do some dialogue, do some schedules, etc.

hard fern
#

this is actually me coming back to it after a couple of days

brittle ledge
#

Doing other parts of the NPC can also give you ideas for what to talk about - for example, if they go to the same place every Saturday, you could have them talk about why

still frost
#

i dont see how to trigger the animation in that second link and im not sure how to navigate to find that answer on the first page

velvet narwhal
#

it'd be your standard animationDescription

#

you're targeting the animationDescription with spacecore

still frost
#

ive never modded before this, im not sure what that means

velvet narwhal
#

oh, well

#

!npc

ocean sailBOT
#
Creating a Custom NPC

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

velvet narwhal
#

probably best to get everything else out of the way before you get into the spacecore bits

still frost
#

true, just starting the rabbit hole to check if its something i could do before committing to that hobby first cause im working on schedule rn and so needing to decide where she'll be and why lol

velvet narwhal
#

i think npcs are still the most working cogs in regards to what is necessary, so if you don't understand content patcher/jsons you'll be run for your money

latent mauve
#

My NPC Builder covers a lot of the basics for the Data/Characters model, but definitely use it in conjunction with the tutorial if you decide to go that route-- I'm not sure how clear it will be for someone who's starting completely fresh

still frost
#

ive been learning steadily as i go along, im sure ill get her done, the art i made for her is too cute to give up on

still frost
latent mauve
#

Miss Coriel is working on a new one I think, but it may be a while. Mine's a Google Sheet that handles a lot of the code for you. 🙂

latent mauve
#

It's in the command Avi posted above

#

The last link

velvet narwhal
#

the google sheet one has been in the works and threads aren't initially visible to everyone, the command is sort of an "eye opener" rather than a scare tactic KEK a lot of people have come in like, "i want to make a simple mod, like an npc" and we all kinda wince

still frost
#

oh im dumb, ty lol

latent mauve
#

haha

#

Well I've successfully made two NPCs with my builder, and it's been tested a few times by now, so it should be fairly stable at this point.

still frost
latent mauve
#

Builder's just kind of limited in that it's not an all-in-one solution. I didn't mess with Events, for example. xD

velvet narwhal
#

yeah i made the master command for that one

#

there's, uh, a lot, apparently KEK

brittle ledge
tiny zealot
hard fern
#

😅

latent mauve
#

Feel free if you want to, tiakall!

hard fern
#

my "first mod" was definitely not an npc

still frost
velvet narwhal
#

baby's first mod was portrait/sprite replacers SDVpuffersquee

latent mauve
#

My first was a map edit, LOL

velvet narwhal
#

now i am king dumbass, who unveiled 1.6 portrait change

brittle ledge
#

my first mod was not an NPC. Nor was my second or third SBVLmaoDog

latent mauve
#

And then I jumped right into working on the Zelda NPC Overhaul and replacing every character, because, what are reasonable leaps? >_>

hollow hazel
#

portrait replacer is indeed my first baby mod

brittle ledge
#

I didn't get to an NPC until number 7 8

uncut viper
#

my first mod was dumbsilly postfix of some benefit that i never used

latent mauve
#

I keep getting distracted by side mods, LOL

hard fern
#

baby's first mod was a really simple CP sprite replacement mod

tiny zealot
velvet narwhal
#

i kept mine up because i'm relatively proud of that art but i could care less to keep it up to date/fix it

brittle ledge
#

my first mod was a BFAV mod, which was definitely knowledge that is useful today SBVLmaoDog

hard fern
#

no way what the hell my mod is on the "hot mods" page???

velvet narwhal
#

ah yes, the hole hasn't been kicked off the front page, the world is right