#making-mods-general

1 messages ยท Page 245 of 1

hard fern
#

It can do both

#

But ive noticed that it can't properly unpack certain files

gentle rose
#

either way, like forsy said, xnbcli is just not the correct tool for the job

#

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

hard fern
#

Notably shoe colors being one of them??

#

It can't unpack the character data either

lucid basalt
#

amazing!! thank you so much for the pointers I'll see if I can find the other version ๐Ÿ™‚

gentle rose
hard fern
#

Well i dont think it's meant for stardew

#

I also know it unpacks maps as tbin and not tmx

lucid basalt
#

wow xnbhack does . . . everything . . wonderful ๐Ÿ˜„

gentle rose
#

@cyan venture I forgot to say it before, but a) congrats aSDVpufferparty and b) consider updating your mod for i18n support (it's very simple, dw!) so people can use it when playing in other languages!

cyan venture
twin mantle
#

Hey guys, I'm trying to make a really basic content patcher mod and I'm a bit stuck. All i want to do is change the main menu background colour. My content.json is here but I'm sure it's wrong:

{
    "Format": "2.5.0",
    "Changes": [

        {
            "LogName": "Main Menu Background",
            "Action": "EditImage",
            "Target": "LooseSprites/DayBG",
            "FromFile": "assets/solid_background.png"
        }
    ]
}
brave fable
#

sorry picky, the title screen isn't that easy haha

gentle rose
#

I don't think daybg is the asset you're meaning to reference if you're looking to change the main menu background SDVpufferthinkblob that's a different thing I think

#

daybg is this

brave fable
#

here's TitleMenu.draw() โ˜€๏ธ

gentle rose
brave fable
#

it is, but not a premade texture

gentle rose
#

oh, rip

brave fable
#

what you want is the slivers of sky gradients in LooseSprites/Cursors

#

around 700x 1912y

gentle rose
#

and here I was about to foolishly ask where it was SBVLmaoDog of course it's in cursors

twin mantle
#

Oh, well I am literally making a super simple mod. So maybe there's something else I can do

hard fern
#

Ah yes the slivers of sky in cursors

brave fable
#

you can change the sky gradient just fine! but the clouds, intro scene backgrounds, etc. won't change without separate patches

gentle rose
#

are you making an example content patcher mod for something?

twin mantle
#

I only want the sky colour

#

I'm basically making this for our internal QA team

brave fable
#

oh in that case ignore my naysaying, the sky colour is simple enough on its own

twin mantle
#

I want to have one version with the sky red and anotehr with sky green

#

So when they test our mod manager they can start the game and obviously see which mod is working

brave fable
#

the exact coordinates you want from the source are 703, 1912, 1, 264 for x, y, width, height

twin mantle
#

And I need to replace it with a skinny strip like this?

gentle rose
#

skipintro by pathos (iirc) is a good mod to test that with, since you'll be able to tell even earlier

hard fern
#

Ye

twin mantle
brave fable
#

(if you want to also change the load-game nighttime sky gradient, use 702, 1912, 1, 264)

twin mantle
#

So this?

{
    "Format": "2.5.0",
    "Changes": [

        {
            "LogName": "Main Menu Background",
            "Action": "EditImage",
            "Target": "LooseSprites/Cursors",
            "FromFile": "assets/solid_background.png",
            "ToArea": { "X": 703, "Y": 1912, "Width": 1, "Height": 264 }
        }
    ]
}
brave fable
#

looks good!

#

well the json does anyway, ingame it probably blinds you instantly

gentle rose
#

somewhat unrelated and very unimportant for this, but do we usually recommend using the most recent patch version of content patcher in the format version, or just the most recent minor version?

brave fable
#

i recommend whatever's shown in the content patcher author guide or examples

gentle rose
#

it says latest version but then it says that the latest version is 2.5.0 pffft do they not upgrade with every patch update? SDVpufferthinkblob regardless, 2.5.0 definitely works

brave fable
#

i expect that minor version increments in content patcher aren't ever going to include format features, just bugfixes

gentle rose
#

true

vernal crest
#

That's my thinking too. I can't see pathos being such a proponent of semver and then adding features to a bugfix version

#

Imagine the scandal

gentle rose
#

would he ever be forgiven by the community

hard fern
#

Held on public trial

gentle rose
#

why is it that I have several sane mod ideas and yet the one I want to implement the most rn is a) intended for an update that isn't even out yet and b) literally the worst

lucid iron
#

Show us b)

gentle rose
#

they're both the same idea, I want to implement a turing machine entirely through events

#

because gotos will likely make the event syntax turing complete KEK

#

gotos will be a 1.6.16 thing though

silver sand
#

turing machine
what

#

oh by the way, can you have a randomiser via CP, or at least a pseudo one?

gentle rose
#

wdym by randomiser?

#

also what what SDVpuffersquee

silver sand
#

what's turing machine

brave fable
silver sand
#

like, to output a random number out of an array or something

gentle rose
#

content patcher has a random token

#

built in

lucid iron
#

It's called every change tho

gentle rose
#

yeah but you can probably localtoken it

lucid iron
#

To get something more random it is best to see if the thing u r edit takes conditions

gentle rose
#

or dynamic token it, or do something in a way that fixes it in place

lucid iron
#

Oh i was meaning the opposite

gentle rose
#

oh wait, you wanted MORE random than every change

lucid iron
#

Not random enough

#

More chaos

silver sand
gentle rose
#

ez, use an ontimechanged patch to set a new one each time to some virtual asset (don't)

astral oyster
#

Is there a known way to make an NPC break the normal schedule and go to say an alternative one, and run from said player when attempted to speak with them? Having them just not speak, comes off as rude; while them running would show them as more afraid the player, or so I would think?

gentle rose
#

messing with schedules in these ways is very messy

lucid iron
#

I don't think it's dynamic enough for reactive thing

gentle rose
#

and also I think having them not speak comes off as less rude than running away from me every time they have nothing to say SBVLmaoDog

tiny zealot
#

anything is possible with determined application of C#. i don't recommend trying this though, unless you are feeling masochistic (messing with schedules during the day is cursed)

lucid iron
#

You can story it though, like a event where they are aSDVpufferfast away and then u hide them for a day or two

calm nebula
#

(You can totally edit schedules during the day if you want.)

#

It's not trivial though

#

:pufferthink:

gentle rose
#

you can also prefix skip the entire game if you want

#

you just probably shouldn't SDVpuffersquee

calm nebula
#

Or go learn concurrency in c++ with bards

lucid iron
#

The thing I don't know if u can do is get the npc to path away from the player

#

With only schedule

twin mantle
#

Thanks for your help with this. It's ugly as heck but you can at least see the difference!

tiny zealot
astral oyster
#

Another uphill battle, good to know; having an event mess with time does sound interesting. Eventing might be the answer, thanks for the help

heady fractal
#

Is there a good alternative to profit margin?

hard fern
calm nebula
heady fractal
#

oh soz

acoustic lintel
#

Hey! Does anyone know of a way to restrict a custom NPC from visiting ginger island on certain days of the week? I have 2 npcs that hang out with each other on Wednesdays and talk about it in their dialogue, so if one of them goes off to the island on a Wednesday, the others dialogue will make no sense ๐Ÿ˜” I canโ€™t seem to find an answer to this anywhere

reef kiln
acoustic lintel
#

Exactly that ๐Ÿ˜…

candid stratus
#

does he actually dance on his own?

#

or is robin just in 2 places at once

reef kiln
#

Yup. Every Friday if Robin is building

candid stratus
#

that's pretty sad

brittle ledge
acoustic lintel
#

Ah yeah I didnโ€™t consider patching the dialogue instead. Iโ€™ll have a look into that, thank you

tiny zealot
acoustic lintel
#

Oh amazing!

reef kiln
# candid stratus that's pretty sad

There is a mod that fixes it, by giving Robin a work schedule when she is building. But in vanilla she is permanently on the farm for 2 days if building.

tiny zealot
#

for the wednesday exclusion in particular it would look like
"CanVisitIsland": "!DAY_OF_WEEK Wednesday"

acoustic lintel
#

Youโ€™re a lifesaver. Iโ€™ll try this out now. Thank you so much!

wet granite
#

I didn't think this required a specific topic in #1272025932932055121 because it's such a simple question, but when debugging an individual mod, is it required to leave the two mods that SMAPI installs by default? Or can those be removed so the only active mod is solely the one in question?

tidal stone
#

you need console commands one to use the debug command

vernal crest
# wet granite I didn't think this required a specific topic in <#1272025932932055121> because ...

It's strongly recommended to keep both of them. ConsoleCommands allows the use of debugging commands in the SMAPI window, many of which are helpful for troubleshooting mod problems. SaveBackup is less immediately useful for the troubleshooting itself but is handy if you need to start looking into older saves or backing up the current ones. Neither of them will have any negative impact on the troubleshooting process, so there's no reason that I can think of that you would want to remove them.

tidal stone
#

I made the mistake of deleting mine >.>

lucid iron
#

You don't need either of em but realistically all players will have them

#

If your mod breaks console commands then im not installing your mod

calm nebula
#

It's technically not required to have console commands to use debug commands

lucid iron
#

It's like integration testing Dokkan

tidal stone
#

oh really?

calm nebula
#

But I would only do that if the point was testing sans smapi

lucid iron
#

There's a 1.6.9 feature yeah

#

Enable in-game cheats

tidal stone
#

oo

calm nebula
#

(We are at minute 20+ of this svn checkout)

tidal stone
#

I know so little and yet im making mods this is great

calm nebula
#

(Please save my soul)

vernal crest
#

Yeah you can edit your save to enable them in-game now but I've only done that when I specifically needed to check that a problem was a truly vanilla bug because it's more hassle than just keeping ConsoleCommands.

fathom rapids
#

so I want to mod how ranged weapons work in SDV (I want them to not stop over buildings). I have Visual Studio installed, and I am familiar with C#. I have a test mod I'd made over a year ago, but (1) I have no memory of what I did to put together the libraries etc, (2) it's broken now because presumably 1.6, (3) it's just basic info retrieval and showing on screen, nothing like what I need

can someone please point me at, like, first steps? How do I even /find/ the code the game uses for slingshots?

vernal crest
#

As for finding the code, I usually either search the decompile for words associated with what I want and hope I get lucky or I ask someone in here lol

fathom rapids
#

right, the example mod here is about the complexity I managed in my first one

#

gonna look at decompile now ty

vernal crest
#

Don't miss looking at the pages in the odd little "Creating SMAPI mods" section at the top right of that page. It took me a while to realise how much extra information was in all of those pages because I didn't realise it was its own sort of index page for the C# stuff as well as the getting started guide.

brittle pasture
lucid iron
#

I believe the projectile collision stuff is a thing you can set yea

fathom rapids
#

OMG

lucid iron
#

Does ranged weapon mean slingshot

fathom rapids
#

i mean right now im using the Sword and Sorcery bow but I am pretty sure it uses the same code

brittle pasture
#

now how to set it is a different question. You can do something like register an add event on the location's projectiles list to modify all incoming entries

ivory plume
fathom rapids
#

blessed be ๐Ÿ™ <= in the non-religious but like deeply respectful and grateful way

vernal crest
#

Whoops sorry to ping.

ivory plume
#

(I'm always fine with pings!)

vernal crest
#

The first many times I followed the instructions on that page I didn't understand a thing of what I was doing. I just followed the instructions lol

#

And now I do understand! A bit.

fathom rapids
#

I am horrified by the thought I might end up attaching something to "UpdateTicked" because that's just evil

#

I have heard of the mythical entity called "Harmony" before that lets one patch the game's code directly instead of just adding an on-event...

tribal ore
#

Is there a way to print out token values for a mod (debugging purposes)

#

I'm playing with Custom Tokens at the minute and it seems to be working, but I would really like to see the raw values

unreal spoke
#

Patch summary?

tribal ore
#

I'll try

unreal spoke
#

(Congrats on your mod release btw!)

fathom rapids
#

location.projectiles.Add(new BasicProjectile((int)(damageMod * (float)(damage + Game1.random.Next(-(damage / 2), damage + 2)) * (1f + who.buffs.AttackMultiplier)), -1, 0, 0, (float)(Math.PI / (double)(64f + (float)Game1.random.Next(-63, 64))), 0f - v.X, 0f - v.Y, shoot_origin - new Vector2(32f, 32f), collisionSound, null, null, explode: false, damagesMonsters: true, location, who, collisionBehavior, ammunition.ItemId)
{
IgnoreLocationCollision = (Game1.currentLocation.currentEvent != null || Game1.currentMinigame != null)
});
found the relevant bit of game code to my purposes
now the question is what do I do about this...

tribal ore
vernal crest
#

Patch summary usually includes mod-added tokens, yeah

tribal ore
#

Nice. I'll have an update to Wedding Anniversaries today probably

#

No longer need to use the Trigger Actions, so it'll work on existing save files ๐Ÿ™‚

tiny zealot
fathom rapids
#

yeah

lucid iron
#

The suggestion is to hook projectiles.OnValueAdded

#

It should have one if it's a net collection

fathom rapids
#

OOOOO

#

I was looking at AssetRequested and AssetReady but this is way better

brittle pasture
#

(those are not relevant)

lucid iron
#

Here's a similar bit o code except with the characters net collection

brittle pasture
#

What I would do is on save loaded and on new location added hook them up

lucid iron
#

Yep

brittle pasture
#

(literally just read and that is what chu's code is doing lol)

lucid iron
#

Oh ig its not new location

#

Im doing it on warp

#

And unhook when player leaves

#

There is a location list changed event right, if you don't want to do it on warp u can go for that

fathom rapids
#

oh my gosh this is doing so many things I had no idea I could try to do bless you forever

#

on save load and on warp, I see it...

lucid iron
#

Maybe we should write a netevents guide...

#

Netcode scary

fathom rapids
#

the fact you can use += and -= there is blowing my mind in a good way

tiny zealot
#

just make sure you don't keep doing it. it's not idempotent; it will add a new copy of your handler every time

lucid iron
#

Is it not think

#

I do understand that there's issues if you are doing it on a local function but that is why i did make it a static

tiny zealot
lucid iron
#

Do you mean like += without -=

tiny zealot
#

i mean if you have a thing like thisEventCondition += doMyFunction; and you do that e.g. twice, when the event fires your function will be did twice

lucid iron
#

Ah yes that i got bolbthinking

fathom rapids
#

oh yeah that makes sense

lucid iron
#

Though i do wonder how exactly -= work under the hood then

fathom rapids
#

well, I have code that will make every projectile ignore collisions

fathom rapids
lucid iron
#

Yeah i was wondering by what does it match by

fathom rapids
#

I don't think there are any monster-fired projectiles that ignore collisions, and this is definitely THE most universally compatible version that could possibly exist ๐Ÿค”

lucid iron
#

You can check if the projectile damages monster

#

I don't recall the name but it's a different netfield

fathom rapids
#

ooooo

#

thankeee

#

PERFECTION

#

now it does everything I want ^^

#

hmm. the question is, is my instinct to comment on everything the devil talking, or is my instinct saying "this code is human readable and too short to be confusing" the devil talking

#

ok i know the answer to this question. its definitely the second one

candid stratus
#

Everything in moderation. While I've refactored 10k+ lines codebases without a single comment, having 80% of your project be comments doesnt help legibility

fathom rapids
#

i think this is a reasonable middle ground ^^

candid stratus
#

Very reasonable. If I see this in my industry, I'm very happy :p

fathom rapids
#

yay ^^

candid stratus
#

By the way if you have very big blocks of code but need to be within 1 file, the #region name and #endregion can help to collapse big blocks :p

fathom rapids
#

ooooo thanks ill hope to remember that!

candid stratus
#

it doesnt do anything, just allows you to collapse and annotate whatever you want wherever you want

fathom rapids
#

yeah i know what you mean ^^

#

well. now to finish the actual in-game day (i got frustrated and decided i needed a mod mid-fight, as one does) and then to. test.

tiny zealot
#

my general rule for comments is don't say stuff the code already says. there's plenty of room for comments even on short, simple code, but it should be about whys and not about explaining that there's a loop

fathom rapids
#

...well now that you've said it that sounds obvious

candid stratus
#

regarding the -='s, you're appending/removing from a list of delegate function references, so whenever you do -=, you just remove that specific function's reference from the delegates list and behind the interface, it just runs all the functions in that list as far as I'm aware

fathom rapids
#

๐Ÿคฆ l

lucid iron
#

My rule is I don't document very well when it is modding and then forgor what this code does in a week 3sSmolMiku

tiny zealot
#

also please don't @ me with examples of me breaking that rule. we all break our own rules all the time /lh

lucid iron
#

(don't do it)

fathom rapids
#

i was taught to document everything back in the uni, but sometimes I look at my code and it's 50% comments by volume because next to each line i explain what it does in human language

lucid iron
#

Hey if thats what you desire then go for it

tiny zealot
#

regrettable tendency of university programs to teach kids to comment in that fashion

fathom rapids
#

don't do that either...

candid stratus
#

My uni projects had 0 comments LOL

fathom rapids
#

tbf sometimes commenting all the code is actually a debugging method

#

'what the fuck was I even doing here'

candid stratus
#

Which extra sucked cause they were very complicated assignments and even a week later you gotta re-investigate the algorithm you made cause nothing makes sense anymore

fathom rapids
#

'i can follow my own chain of reasoning right'

candid stratus
#

Especially when there's 700 lines of matrix arithmetics

fathom rapids
#

yeah........................

#

i think the most complex algorithm ive written in uni was phrase syntax classification (smth like that)

#

something about language interpretation

#

i no longer remember any details except it was really complicated and i was very proud of it

#

and the frustration of debugging <3

candid stratus
#

We had a few classes on that and I really just couldnt do it, data representation was never my strong point

ocean sailBOT
#

@candid stratus You leveled up to Cowpoke. You can now speak in our voice channels and share images in all channels!

fathom rapids
#

then there were 3D lighting calculations but those were easier somehow i think?

candid stratus
#

I've made a graphical spherical model of the earth with which I built a flight sim, and I've also made a full-sized self-driving racecar

#

Took it to the world championship and got 8th which was not bad

#

I loved computer graphics

fathom rapids
#

i learned to draw light and shadow from those 3D math lessons <3

tribal ore
#

Dumb question, but on Nexus is there a way to update the main file without archiving it? I'm worried about making an update to the version number without being able to verify that the file contents are actually new

fathom rapids
#

I'm not sure what you mean, but you can

  • update the version number WHILE uploading the new version
  • not delete the old version
#

verifying the file contents are actually new sounds like a "ok i filled all the fields and ready to drop the zip, now lets quickly enter it and check the manifest" thing

tribal ore
#

Yeah. I've had issues where when I press "Upload a new version" of the file in the past, it hasn't actually done it

ornate trellis
#

I come back with my issue of trying to spawn IE nodes via spacecore :( they spawn now but they don't work like I tell them to in the IE json, do I have to redo it all in the spacecore spawning or is there some other issue going on?

tribal ore
#

Which wasn't a problem when the mod wasn't published

lucid iron
#

I think you just upload new version from the file but don't check remove existing

strange kernel
#

If I want to modify an existing mod, no new art assets etc

#

What wpuld i do?

rigid oriole
#

Depends what the mod is

strange kernel
#

Farm Expanded 1.6

#

Like I want to add more usable land and make it bigger

hard fern
#

im gonna take a wild guess and assume it expands the farm

strange kernel
#

Yes

hard fern
#

that's probably a tiled thing

fathom rapids
#

well, that's basically making a new mod that uses the assets of the previous one

hard fern
#

(i guess technically maps are considered an artistic asset)

rigid oriole
#

Well if it's the n3rdgirl one it has open perms

fathom rapids
#

and yeah open the .tmx file in tiled and mess with it in there. Make a workshop directory, copypaste all the tilesheet files in there, then the .tmx file too, then open it in tiled and fuck with it however you want

calm nebula
#

I call it the brain dead comment style

rigid oriole
#

My favorite comment type is "I made a weird fix and now I'm writing why so I don't look at it later, think it's stupid, and delete it"

strange kernel
#

Nvm, I'm not smart enough lol

ornate trellis
#

man, not sure if the lacking "you cant mine this with your level of pickaxe" message I can live with or not. it was possible when i directly spawned the nodes via CJB but via spacecore I dont get it

silver sand
#

Can I use a double token in file path

#

AbsoluteFilePath: assets/{{Voice}}/{{Voice}}_hurt3.wav like so?

calm nebula
#

Sure

vernal crest
#

My comments on my C# are horrifying. They're all stuff like // What is e.? I think it's a method but why is it just e? What does it stand for? Can I change it? Ok yes I can change it, I think it's the method argument but then the dot is calling something else? Is that a property of the argument or something? Is that even a thing? I need to google this

candid stratus
#

You put that in comments? You can also put that in chatgpt and it'll tell you :p

vernal crest
#

Some of the stuff I've done has been about 90% comments lol

#

Yuck I would never use chatgpt

candid stratus
#

Makes sense when you're learning though

#

Do you know the answer to all these questions now?

tribal ore
#

Just... streams of thought

#

I also spurn ChatGPT. It's far better to actually learn what one is doing

vernal crest
candid stratus
#

In my previous projects it's gotten bad enough that I had to write external docs LOL

ivory plume
#

(e is just the conventional name in .NET for the event arguments.)

candid stratus
#

Then you know it's gotten bad

#

"Programming doesnt need maths"

rancid musk
#

Programming needs algorithms. If only we had some sort of... way of working and expressing algorithms.

#

Let's make one up. Call it math.

vernal crest
#

Yeah I got as far as figuring out the event arguments bit. Still hazy on what the dot thing is in terms of correct names for what it's doing and how to know what things I can put after the dot but I'm getting there. (I'm being so vague about this because I'm on mobile going completely off memory about what I was doing a couple of weeks ago lol)

candid stratus
#

Dont tell that to a mathematician, mathematicians HATE programmers

#

The . allows you to access whatever the e contains. If you have a fridge object and it has a fruit tray, a butter tray, and a general compartment, then you can access those with the . so you go fridge.fruittray to get the fruit tray object, and then that object can also contain things again

#

it's like a file structure. Your school folder contains maths and french, so you go school.maths or school.french

silver sand
#

IT LIVES

vernal crest
#

Yeah that part I understand, it's figuring out what thing is a class or a method or a field or whatever that I'm still fuzzy on.

silver sand
#

my frankenstein of four mods that I wrote for convenience

candid stratus
#

Oh, yeah that can be anything really, but a good editor will tell you what it is

rancid musk
#

That's what IDE tooltips are for.

vernal crest
#

Yes I'm learning to read them now lol

rancid musk
#

And just knowledge of what you're working with, of course. But mostly the tooltips. ๐Ÿ˜›

vernal crest
#

I've never had tooltips before

candid stratus
#

tooltips are everything hahaha

vernal crest
#

I also spent a while being very confused about where anything in C# is because you can write a method below the code you're using to call the method and that was very weird to me.

candid stratus
#

Used to python?

vernal crest
#

R

candid stratus
#

Ahh

#

Right

vernal crest
#

R is my best friend

#

It gets me. I get it.

candid stratus
#

I prefer C :p

#

Though I know someone who prefers M

rancid musk
#

Born to Write C#, Forced to Write TypeScript

candid stratus
#

My condolensces

vernal crest
#

I'm curious to see where my preferences end up once I feel confident with C#.

candid stratus
#

Nothing is better than seeing the customs of a self-taught programmer and how wild they can be hahahah

#

As someone who's self-taught myself :p I used to do WEIRD workarounds

vernal crest
#

I went to school for psychology so I'm definitely not formally educated in any kind of programming lol

candid stratus
#

Makes it more impressive to be fair

sour sleet
#

How easy is it to add a recolour config for a map patch?

flat sluice
#

Hi,

I decided to try out how C# coding for SV looks like.
I followed the https://stardewvalleywiki.com/Modding:Modder_Guide/Get_Started guide, but I got stuck at the https://stardewvalleywiki.com/Modding:Modder_Guide/Get_Started#Add_the_code part. I have it copied, I changed the namespace, but my VS code is giving me 12 errors from the copied code. All of them are about "Missing references" (https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/compiler-messages/assembly-references?f1url=%3FappId%3Droslyn%26k%3Dk(CS0246)#missing-references, should be the correct link), but as I'm a 100% total programming beginner, I don't quite know what is wrong, as I think/hope I referenced the NuGet package correctly.

(my goal for now is to rewrite the example code to code that would write a message on each game launch (not save, the game itself; like SVE install checker) if my mod is installed correctly or something like that)

Would anyone be willing to help me?
Don't hesitate to ask for more info from me!

Stardew Valley Wiki

Creating SMAPI mods

vernal crest
#

Like the user chooses which recolour they want in the config and then you use that to determine which patch to use? Very easy.

sour sleet
#

Yep that's what I mean

flat sluice
#

(my opinion of course)

vernal crest
vernal crest
# sour sleet Yep that's what I mean

You just add a when field to each patch where the condition it's checking is your config token and the value for each is the different recolour option.

flat sluice
calm nebula
vernal crest
candid stratus
vernal crest
candid stratus
#

I used to be self-taught when I was 14. Now it's my job haha

flat sluice
flat sluice
candid stratus
#

For CP any editor is more than enough cause it's just json, so that's good. For C# however, I really do recommend using VS cause running anything manually on windows is kind of a nightmare to set up

vernal crest
#

I was self taught even when it was my job because my boss and co-workers were also not CS-educated and we were all at the same level lol

candid stratus
#

Definitely better to use Visual Studio for C# mods, but yeah for CP json, you can continue using vscode

#

VS also has the option to synchronise with github yes

flat sluice
candid stratus
#

It's a struggle at first, but you'll be surprised how quickly you can get a C# mod to work with VS

#

Much faster than getting packages to work and get a functioning C# compiler in windows

flat sluice
#

Maybe a stupid question, but can I code .json (CP mods) in VS as well, like in VS Code?

vernal crest
#

Does VSC do the tooltips? Or allow for jumping to definition or base or implementation via context menu? If it doesn't, I wouldn't try coding with it even if it was easy to set up.

#

Yeah you can.

#

You could write a novel in it if you wanted to.

candid stratus
#

VSCode can do the tooltips with the correct extensions and includes and formatting options but it's a big struggle to get them to work properly

#

Jumping to definitions will also only work when everything is set up correctly

vernal crest
#

I wouldn't personally because it's a resource hog and wouldn't have the extensions I want.

vernal crest
flat sluice
candid stratus
#

Yeah you have include issues, that'll be quite the hassle to fix

#

You'd have to properly set up the files in the .vscode folder and give it access to the modding nuget

flat sluice
candid stratus
#

recompiling decompiled code almost never works without big changes, that's usually a dead end so dont feel bad if you cant get that to work

#

Decompiling is only for having a look at how the original code does it

vernal crest
#

I think he meant just running the example code from the getting started guide?

flat sluice
flat sluice
rancid musk
#

Don't use Visual Studio Code for C# mods.

candid stratus
#

Ohhh yeah if you mean running the example code, with VS it should only take like 10 minutes

rancid musk
#

Use Visual Studio Community.

#

VSCode is not good for C# modding.

vernal crest
flat sluice
#

While installing VS, do I need anything else other than VS itself?

rancid musk
#

If you can't use VSCode on your platform, then try Rider. VSCode requires a lot of extra work to get it working properly and at best you get a subpar experience.

sour sleet
#

I've never done a config with a custom tilesheet before. I'm a bit stumped with how to do a map patch config when the map patch includes my custom tilesheet. Like how can I do a recolour config with that?

flat sluice
vernal crest
rancid musk
#

I don't think you need anything specific installed in VS.

verbal viper
#

Can I make a map change dependant on a purchase? Player interacts with tile, price comes up, if paid the upgrade is done the next day. I want to make an upgrade-able Greenhouse.

rancid musk
#

You might want to check .NET desktop, just to make sure.

sour sleet
vernal crest
#

Oh I've always installed the .net desktop one.

vernal crest
sour sleet
vernal crest
# sour sleet Only the tilesheet is different

Then you don't have to touch the map patch. Just change the FromFile for the tilesheet load to include the token and name your tilesheets with the values of the token. Then when a value is chosen in the config it will change which file is loaded.

I know I'm not explaining that very well, want a quick example?

sour sleet
vernal crest
vernal crest
verbal viper
#

Which tools would you use? I'm trying to find something on the Content Patcher and TMXL Map Toolkit guides, but haven't found anything yet.

calm nebula
#

Unlockable. BUNDLES HAS THAT

#

...ignore the stupid capslock phone is pbone

vernal crest
# sour sleet Yes please, I haven't done this before lmao

Code:

Config: 
"Recolour": {
     "AllowedValues": "VPR, Earthy, Etc"
}

Tilesheet load: 
{
"Action": "Load",
"Target": "Maps/{{ModID}}_ShopTilesheet",
"FromFile": "assets/tilesheets/shop_{{Recolour}}.png"
}

Folder setup:

MyMod 
- manifest.json
- content.json
- assets (folder) 
-- tilesheets (folder) 
--- shop_VPR.png
--- shop_Earthy.png
--- shop_Etc.png
tiny zealot
vernal crest
#

I can't believe there are people who want to write whole mods on their phones that was AWFUL.

rigid musk
#

People who do computer things on their phones scare me

sour sleet
#

I could never write code on my phone lmao

rigid musk
#

I have an artist friend who draws solely on their phone, it's terrifying

#

(I also have one who only uses a mouse but we don't talk about them either)

#

Writing code on my PC is already a process, doing it on my phone (especially with how organized i like it to be) sounds like an actual nightmare

vernal crest
#

I really need to learn how to display file structures better than my terrible multi-dash approach.

flat sluice
#

I should delete the old C# try and start again, right?

vernal crest
#

You mean the project? Probably worth making a new one, yeah.

#

Come on wiki I know you've got file structure examples somewhere!!!!

rigid musk
#

Does anyone know where the sprites for the swaddled baby are (as well as the other baby - not the one that walks around but the one that's sitting)

#

I realize I forgot to resprite those

vernal crest
#

I'm going to guess cursors

rigid musk
#

god

flat sluice
flat sluice
#

Or should I create a project with that guide and then move it to correct folder?

vernal crest
#

Why do you want to put it in a folder that already exists?

#

If it's to combine it with the CP mod, I recommend not doing it that way.

flat sluice
vernal crest
#

Instead move the CP mod folder inside the newly created c# project folder

vernal crest
flat sluice
vernal crest
#

The folder you need to make now should not be in your mods folder

flat sluice
#

Maybe I found a way.....

vernal crest
# flat sluice ... huh? Is that even possible to use like that? And if so, has it some pluses?

Yes or I wouldn't have said to do it lol. Pluses are that you can use your c# project to check that your CP manifest version matches the c# version, that it will ensure your c# mod folder and CP mod folder are correctly organised into a higher level folder for your mod and it will zip them up nicely for you when it builds. Cons are that you can't edit the CP version and patch reload.

flat sluice
vernal crest
#

But if you want to just make a new folder called "YourMod" in the mods folder and plop the CP mod into there and then build the c# mod into it too you can.

#

I should've been more clear: you can't edit the CP version while you're running the game through VS. So it's only an issue if you're trying to edit the c# and CP at the same time.

flat sluice
#

So, finally, it should be created correctly and in a correct folder... Now to reference the package.

vernal crest
#

You can also be like Chu and symlink everything to the point where your original files may not actually exist /j

flat sluice
vernal crest
#

Yeah then you can hot reload (some) changes.

Yes if you wanted two copies of the game running I imagine you could do that.

fathom rapids
#

can anyone tell me what the first one means, and how to fix the second one?

flat sluice
fathom rapids
#

patch reload my beloved <3

lucid iron
#

Liliet did you target net6

fathom rapids
#

finding out about patch reload and also about patch summary asset was great

#

yea i did

#

pretty sure i did

#

0.0

vernal crest
#

Oh I get that first one all the time too

lucid iron
#

Turn vs off and on again mayb

fathom rapids
#

oh, vs helped me with the nullable thing, excellent

vernal crest
#

Makes no difference. Hasn't seemed to affect how it works in game though.

fathom rapids
#

a classic ๐Ÿ‘ might as well try it

vernal crest
#

It being my mod

flat sluice
#

Well... I'm at the same situation as in VS Code...

fathom rapids
#

now it's giving me the same warning 12 times! woo! ?progress?

vernal crest
#

Did you go up to tools in the menu up the top , then NuGet package manager?

#

(that was to Dennis)

flat sluice
fathom rapids
# flat sluice

...do you have. do you have the developer .NET 6 installed

#

thats my best guess rn

vernal crest
#

And found modbuildconfig 4.3.2 and installed it?

flat sluice
vernal crest
#

Oh and did you change the Target framework from 8 to 6?

lucid iron
#

Dennis just in case can you tell us what you need C# to do for you

flat sluice
flat sluice
lucid iron
#

Dokkan fair enough carry on

vernal crest
#

Same as me. He wants fun!

fathom rapids
#

yay, it's launching!

lucid iron
#

Have you tried just doing dotnet build in your project folder, from the command line

fathom rapids
#

...whoops, it's launching with my full mod loadout. i should have probably made a separate profile first lols

flat sluice
vernal crest
#

If you are getting an error stating The type or namespace name "StardewModdingAPI" could not be found, then it's possible that your game path is not being detected. You will need to set the GamePath property to the game's executable directory. This can be done by adding a GamePath property to the PropertyGroup in your .csproj settings.

lucid iron
#

You can paste the error you get there

vernal crest
#

Is that still the error?

lucid iron
#

It will be easier to read than VS screenshots

flat sluice
vernal crest
#

But you have 12 errors in that screenshot.

lucid iron
#

think are you in the sln folder

calm nebula
#

Set GamePath

#

(Drive by comment)

flat sluice
flat sluice
vernal crest
flat sluice
flat sluice
vernal crest
#

Read the wiki pages very thoroughly

#

That is my advice as a fellow newbie

#
MyMod
|-- content.json
|-- manifest.json
|-- assets
    |-- shop_Earthy.png
    |-- shop_VPR.png
    |-- shop_Etc.png
violet grotto
#

(Don't mind me, just dropping a little teaser my upcoming FS mod, while I'm setting up preview images...)

hot gale
#

Actual male clothing I weep

gray bear
#

that hat! how lovely

tidal stone
#

stick a feather in my cap and call it macaroni!~

ornate trellis
#

i just love how the feather is escaping reality

lucid iron
#

The style cannot be contained within the bounds

violet grotto
#

I plan to make this a very modular FS mod, so that you can put together your own Adventurer outfit out of many tiny bits and bobs.

hot gale
#

Badass

gray bear
#

it's so fabulous it doesn't even consider borders

violet grotto
#

I still need to implement some of the fancier hats. These are some of my favourites! (The ones without a green stripe behind them)

tidal stone
#

the tolp right one

vernal crest
#

There has been an art hijack of the non-art channel! Help! /lh

violet grotto
#

For now I'm treating myself to a mug of tea though.

violet grotto
#

I kinda forgot there was one for art

ornate trellis
#

is that a fur collar

violet grotto
#

Just imagine that this is that channel for but a moment!

gray bear
#

it's okay this is a gray area i think

violet grotto
gray bear
#

those are so cool. also i can't get over the single farmer back in the corner

ornate trellis
#

damn that pog is crispy..

gray bear
#

im trying to look at the hats but i can't... stop looking at them

violet grotto
gray bear
#

he's your assistant. makes sense nod

violet grotto
#

HOLY HOLE IN A DONUT

#

I have an idea.

#

Sheathed weapons/scabbards.

ornate trellis
#

is it really farmer back or jsut a faceless farmer with backwards feet we will never know

violet grotto
#

I should totally add those.

ornate trellis
vernal crest
#

That top left hat is giving me .... Ahhhhhhhh nominal aphasia is the worst!!!! The incredibly flamboyant mercenaries! vibes.

ornate trellis
#

shh dont break the illusion

violet grotto
#

He has a couple of friends that also offered to help me out.

gray bear
#

i love that mask-

#

i- that is cursed in a way i can't describe

violet grotto
#

If you have any suggestions for other items, let me know!

vernal crest
#

Landsknecht!

violet grotto
#

This is your (likely) only chance to suggest things!

gray bear
#

that's a lot of pressure, literally can't think of anything PensiveButtPuffer /lh

violet grotto
violet grotto
ornate trellis
#

this is all I will say

violet grotto
#

Oh god

vernal crest
#

Do you have any chainmail?

silver sand
#

jester items!!!

violet grotto
gray bear
#

i wish to be a clown

silver sand
#

like the fancy horned hat

tidal stone
#

can you use content patcher to make a specific crop, say flowers, have different heads

#

like head colors

violet grotto
gray bear
silver sand
vernal crest
#

There's not enough pixels to really show breeches, are there?

fathom rapids
#

IT WORKSSSSS

gray bear
fathom rapids
#

now just to. add a config option to enable/disable it ^^

gray bear
silver sand
#

pls I felt so smart when I frankensteined 4 mods into one with config

violet grotto
tidal stone
#

epiic

silver sand
#

EPIK!!!!

#

.<

violet grotto
# gray bear me

That one may be a little too out of place. I kind of want to stick with the explorer/knight/medieval/cowboy theming.

gray bear
#

that's fair

#

i +1 on jester gear then, close enough

#

(i know they aren't the same)

ornate trellis
#

Ah, to be a Landsknecht...

gray bear
#

they invented fashion

ornate trellis
#

I mean

#

just look at their staches

candid stratus
#

I was wondering, you can warp players upon interacting with a tile, but is there a non-C# way of teleporting the player without it fading to black? I want to basically tp to the other side of this gate if you have a ticket

gray bear
ornate trellis
#

it sure is

sour sleet
#

Loaded my recolour config into the game. No errors, but changing it in game isn't changing the tilesheet SDVpufferwaaah

#

It can be changed with GMCM but changes aren't being applied

#
  "Format": "2.5.0",
  "ConfigSchema": {
  "Recolour": {
       "AllowValues": "Vanilla, Earthy, VPR",
       "Default": "Earthy"
    }
},
  "Changes": [
 {
    "Action": "Load",
    "Target": "Maps/{{ModId}}_ShopTilesheet",
    "FromFile": "assets/tilesheets/shop_Earthy.png",
    "When": {
    "Recolour": "Earthy"
   }
 },
{
    "Action": "Load",
    "Target": "Maps/{{ModId}}_ShopTilesheet",
    "FromFile": "assets/tilesheets/shop_Vanilla.png",
    "When": {
    "Recolour": "Vanilla"
    }
 },
 {
    "Action": "Load",
    "Target": "Maps/{{ModId}}_ShopTilesheet",
    "FromFile": "assets/tilesheets/shop_VPR.png",
    "When": {
    "Recolour": "VPR"
     }
 },```     Does this look right?
#

Obv there is more code but just included the relevant parts

silver sand
#

the only thing I'm seeing that you can do it via token, idk if thats the issue tho

gray bear
#

it shouldn't be an issue? this looks fine thonk what is the issue actually? wdym "isn't changing the tilesheets"

candid stratus
#

Is there a way to move a selection in tiled? I've made this room that I just wanna move by one block without shifting the entire layer. Do I have to make the entire thing again?

sour sleet
#

I have a custom shop tilesheet in 3 different recolours and GMCM isn't changing to the different png files

gray bear
#

ah well, it'll only change on the start of the day by default

#

you can change the update rate for troubleshooting

sour sleet
#

How do I make it so that the change happens immediately?

gray bear
#

don't think you can? i suppose OnTimeChange would do that, but just gonna warn you it's not really necessary, the reason the changes are made daily is that so your mod doesn't makes the game lag due to loading something several times, y'know. now that i look at it, maybe i'll work differently when it's one block instead of three? thonk

tribal ore
#

But yeah, lag would be a consideration

gray bear
#
    "Format": "2.5.0",
    "ConfigSchema": {
    "Recolour": {
         "AllowValues": "Vanilla, Earthy, VPR",
         "Default": "Earthy"
      }
  },
    "Changes": [
   {
      "Action": "Load",
      "Target": "Maps/{{ModId}}_ShopTilesheet",
      "FromFile": "assets/tilesheets/shop_{{Recolour}}.png",
   },```
I'm actually unsure it this will help with that, but it's def more efficient
tribal ore
#

Wouldn't it also need the token in "FromFile" ?

#

shop_{{Recolour}}.png

#

?

gray bear
#

you're correct

#

otherwise i would load earthy for all variants, heh

#

ty

#

actually the when just isn't needed

sour sleet
#

Nah, it's still not changing even when the day has changed

lucid iron
#

What's your folder setup like

deep cypress
#

Hi loves! I cannot seem to remember, is there a list for all characters? Like, Game1.AllCharacters, or something?

rancid musk
#

I can't be stopped, I just sent another PR to a C# mod.
-# This one wasn't even Better Game Menu compatibility, I just wanted to fix its performance.

rancid musk
calm nebula
#

Iterating all characters is literally iterating all maps looking for all characters btw

sour sleet
calm nebula
#

Fix my performance?

candid stratus
#

can you fix me

tidal stone
#

Man i wish i had gotten into making mods for sdv sooner bUwU
this is like the most fun thing ever

#

(sure i get frustarated but actually getting to each goal is so fascinating to me)

sour sleet
#

Does the folder structure look ok?

lucid iron
#

Hm it doesn't look like you are loading the tilesheet from outside content pipeline at least

lucid iron
sour sleet
#

Yep that's exactly how it is

#

But the recolour just won't happen in game using GMCM SDVpufferflat

calm nebula
#

Can we see your map

sour sleet
#

you mean a screenshot or the tmx?

#

I'm just wondering - do I need the extra shop_Earthy.png in the Maps folder... is that causing complications?

lucid iron
#

Need to see what tilesheet the tmx is trying to get

sour sleet
#

It's trying to get the one out of Maps

#

Oh that's probably the issue then?

devout otter
deep cypress
#

Oof!!! That's possibly not quite what I want to do, perhaps! I am trying to interate over every character the player has friendship data with (and cannot somehow recollect how to do that).

deep cypress
#

Basically, I am trying to iterate over FriendshipData, and today, my mind cannot frame how to do it. The game typically approaches it with a Name, like, if who.Friendshipdata.Contains(Name). I am trying to iterate over all the names in it, not approach it with a specific name.

#

(And I apologize for the neediness, my brain is overloaded and functioning poorly right now, but this is when I have free time to work, so I am making as best use I can!)

brittle pasture
#

it's a dictionary of npc names to their friendship data

#

iterating over Game1.player.friendshipData.Pairs should give you the keyval pairs

sour sleet
#

But when I take it out of the Maps folder and use the one from Tilesheets instead, I get a SMAPI error "The tilesheet couldn't be found relative to either the map file or the game's content folder"

lucid iron
#

This is what we suspected then, you were editing the tmx against shop_Earthy

#

Instead of the proper loaded target

#

Easiest fix is to open the tmx as text and edit the tilesheet name inside

sour sleet
#

I want the default version to be shop_Earthy though. I just don't understand how to fix this error now

#

And I'm sorry for all the questions, this is a new area of modding for me SDVpufferthumbsup

lucid iron
#

You are loading the tilesheets conditionally to a target named Maps/{{ModId}}_shopTiles or something like that right

sour sleet
#

I'm loading to the target named Maps/{{ModId}}_Town right now

lucid iron
#

So while editing you need to have something like

MyMap.tmx
8BitAlien.YourMod_shopTiles.png
#

And then remove this png from actual mod folder

#

Adapt the names to what you actually use ofc

sour sleet
#

Right ok I understand!

#

Oh, there's a SMAPI error now saying the tilesheet couldn't be found...

#

This is doing my head in lmao

lucid iron
#

We r still at the part where we gotta get the tmx to point to the right loaded target

#

It's difficult to say which part went wrong since it's all very fiddly, not your fault

brittle pasture
ashen river
#

I'm trying to make a mod that can multiply the monsters everywhere, farm/mines/caverns/ginger island. i haven't been able to find a tutorial on something like that

#

if anyone could point me to one i would be really greatful

lucid iron
#

What does multiply mean

ashen river
#

say that there's 4 monsters. i want double that, making it 8 monsters. but i also want to be able to change it to more than double

deep cypress
#

Thx so much Selph and Chue and everyone!!!

lucid iron
#

(I didn't do anything Dokkan )

deep cypress
lucid iron
deep cypress
#

Oh yes, indeed, you are right, or it will not be a double of what is!

sour sleet
#

The tmx is loading shopTiles.png which I have in my Maps folder temporarily and then I take it out when I'm loading the game. Is that right?

deep cypress
#

I am going to bed before I spread any more nonsense! Good night all!!!

lucid iron
#

FTM limitation is that you would need to explicitly say what maps you want to spawn more stuff

ashen river
#

this is good to know! i'll look into this

ashen river
#

thank you

lucid iron
#

Bc that's your actual load target

old edge
#

hello

ashen river
#

alright

sour sleet
#

So the Mod ID goes in the tmx file itself?

lucid iron
#

Yeah

#

source="mushymato.BuyAllVanillaAnimals/SewerChickens.png"

#

My load target in cp is {{ModId}}/SewerChickens

sour sleet
#

Ahh that makes sense! So I can take Maps/ out of my target?

lucid iron
#

Yes, it's implicit

#

Oh actually only out of the tmx

#

Here's the cp load i had typo

sour sleet
#

Oh so my load target in CP should be Maps/{{ModId}}_shopTiles?

lucid iron
#

Yeah

fathom rapids
#

(Polysweet works fine after you delete the tilesheets from the Rooms mod directory, btw)

#

(I've been saying this for a while)

sour sleet
#

It's still not working Chu SDVpufferwaaah

#

This is my CP Load ```{
"Action": "Load",
"Target": "Maps/{{ModId}}shopTiles",
"FromFile": "assets/tilesheets/shop
{{Recolour}}.png",
},

lucid iron
#

send ur tmx or at least show what <image says

sour sleet
lucid iron
#

incorrect
<image source="shopTiles.png" width="122" height="101"/>
need
<image source="yourliteral_mod_id_shopTiles.png" width="122" height="101"/>

#

cannot use tokens here btw

sour sleet
#

It's all working as it should! Thank you very much for helping and being so patient Chu, you're a star SDVpufferparty

ornate locust
#

funny moments in debugging: when the shadow under your guy is almost the same color as the outline of his butt so you think you've created a new and unusual weird bug

#

"why is my (too-small) offset smearing his butt down to the desk"

deep cypress
#

Thatโ€™s awesome!!!

ornate locust
#

local levitating sheriff

gentle rose
#

sheriff?

ornate locust
#

I swear I've been working on him before Law and Order SDV came out

#

but yes, this is Bill

lucid iron
#

this town is big enough for infinite number of sheriffs

ornate locust
#

I was trying for like an Andy Griffith style uniform/building

gentle rose
ornate locust
#

I'm really happy with the municipal building

#

even got it in a decent spot for compatibility

calm nebula
#

(Two cakes)

#

I still find it funny ichor joined maincord right when the hat mouse event was going on

ornate locust
#

alright bill let's see if I got your butt in your chair this time

lucid iron
#

ichorlore...

ornate locust
#

just about right, need to fix a little at the top of the desk. But at least the position is right

old edge
#

how do I know it works?

lucid iron
#

i guess you need to get your special order onto the board right

old edge
#

isn't it random

lucid iron
#

could try this mod

#

toggle on infinite rerolls

teal bridge
#

I'm so glad that Nexus did proper QA before forcing us all onto the UI update.

lucid iron
#

]

urban patrol
#

hi hello i'm back with more event questions. how can i get the farmer to sit normally? before this they refused to sit at all and were just walking in place forever, but now when sitting their head turns up instead of facing right.

event json: https://smapi.io/json/content-patcher/286f4dbe48cf4f34b779b2a73fe844a2

relevant portion: speak CharlesRowland \"It's safe, don't worry.$h#$b#Come on over.\"/advancedMove farmer false 2 0 0 -4/pause 3000/faceDirection farmer 1/animate farmer false true 500 117/positionOffset farmer -48 32/pause 1000/speak CharlesRowland

teal bridge
#

(It's not just the bracket being in a silly place, but the fact that the entire area stays clickable, thus toggling bbcode editing mode if you accidentally click anywhere near there to edit text)

#

Do co-op farmhands have any durable identity? I'm not sure I remember correctly but I think if you quit and restart the game, skills and hearts and such are only saved for the main player?

gaunt orbit
#

Coop farmhands are the same as mp farmhands I thought

lucid iron
#

Game1.player.UniqueMultiplayerID?

teal bridge
#

How would you rejoin as a specific player, though?

#

Granted I never actually get very deep into testing since it's so painful to do, but IIRC you just sort of... join. Is it some sort of most-recently-played heuristic?

lucid iron
#

i feel like thats something steam handles right think

teal bridge
#

Huh... Steam? No, I'm quite sure it's not, since Steam isn't the only platform.

lucid iron
#

as a specific player i mean

#

when i test on my own with 2 smapi i can just join as any farm hand i thought

#

as long as i got cabin

teal bridge
#

I asked about co-op, though.

#

Maybe I have to slog through this again, I don't remember being asked which cabin or anything like that.

lucid iron
#

so in the top window (host) i just built a new cabin

#

and then in the bottom i could either join as N who belonged to cabin just off screen or New Farmer

opal oriole
#

Hello! I'm in the process of creating a custom NPC and was wondering if it's possible to add a cutscene where the NPC requests a quest from the farmer. Then, once the farmer obtains the requested item and gives it to the NPC, it triggers another cutscene. I'm not quite sure which tool I need to use for this. Any help would be greatly appreciated!

lucid iron
#

theres a homeLocation on player

#

that stores either just FarmHouse or the instanced Cabin interior FarmHousea5c7615a-1ce4-47de-8716-caa29b0e2ded

#

i just dont think game itself does any association of farmhand to client

teal bridge
#

Hmm. I guess I never got beyond "New Farmer" because that would require actually playing through a day and saving it.

#

You're sure it works the same for co-op though?

hallow prism
lucid iron
#

steam is currently broken for me so sadly i cannot confirm how it works for remote

hallow prism
#

and then having the quest setting a flag once completed, flag that can be used to trigger an event

lucid iron
#

this is just how it goes in local lan

teal bridge
#

I don't care about remote, I'm asking about co-op.

hallow prism
#

directly triggering the event is technically possible but i never tried to see what happen if you try to trigger event with non static npcs

lucid iron
#

like split screen?

teal bridge
#

Maybe I should be saying "split screen" instead?

lucid iron
#

yea thats my confuse

teal bridge
#

Ok, then yes, that is what I meant all along.

lucid iron
#

you get this join as list o farmers in split screen too i think

teal bridge
#

Alright

lucid iron
#

same conditions as the 2 instances case

teal bridge
#

Makes sense, I guess it is obvious once the game is actually saved with a farmhand in it, I had only seen the "new farmer" part before.

sour sleet
#

Pelican Town Food Truck has finally arrived! Chef Elm will visit Pelican Town each Monday and Thursday to sell her delicious cooked dishes and other treats SDVpuffersquee https://www.nexusmods.com/stardewvalley/mods/32274

Nexus Mods :: Stardew Valley

Chef Elm's Food Truck will visit Pelican Town each Monday and Thursday to sell a random selection of her freshly cooked dishes.

lucid iron
sour sleet
#

Will do. Thank you for all the help in the recolour part Chu - I was going a bit mad lmao

hot gale
#

Congrats on the mod :D

#

Where does everyone get that adorable scroll art for their mod pages

teal bridge
hot gale
#

ty! :D

calm nebula
#

(I think the scroll art is actively bad for screenreaders)

sour sleet
teal bridge
#

YMMV as always, but I have stopped using them personally and I'm probably one of the worst here at creating original art.

(Also, if you've ever seen stumbled on an old mod where the image host died or the images expired, it's just a sea of red Xs)

lucid iron
#

if u upload the image into the mod page u can then use it and trust it to not die Dokkan

#

i dont think people do that for scrolls tho

teal bridge
#

Yeah, I do that for essential screenshots, but banners?

#

If you do that then they'll actually show up in the image thumbnails which will look pretty silly unless you can bury them under 50 other images.

#

Now I'm curious if anyone's actually done it.

calm nebula
#

People used to host them off discord

#

Discord (reasonably I think) put a stop to that

#

I think if I were to do it I would use github

teal bridge
#

Huh. I didn't realize hotlinking to Discord was ever possible in the first place.

calm nebula
#

But I'm quite proud of my zero effort mod pages, lol

teal bridge
#

(Are you sure GitHub allows image hotlinking?)

lucid iron
#

yea it does

#

raw.githubusercontent.com doesnt block u afaik

calm nebula
#

(No, but I'm quite proud of my zero effort mod pages lol)

teal bridge
#

I'm not sure if posting it in Discord like that is a valid test, since Discord makes a copy and hosts it on its own CDN.

#

Have to try from an actual website external to GitHub (i.e. Nexus).

sour sleet
#

Pretty sure imgur keeps the images forever right?

#

As long as you've uploaded them with an account iirc

teal bridge
#

Imgur blocks hotlinking.

#

Maybe it's not blocked on every site (yet) but I wouldn't expect any imgur hotlinks to last indefinitely.

lucid iron
#

it works i think

#

directly to github

teal bridge
# lucid iron it works i think

(If you're testing your own image then you also want to make sure it's not in cache, since a cached image will show up even if the hotlinking is blocked)

lucid iron
sour sleet
#

What's a better way to do it in future then?

lucid iron
#

but i did check in private mode

teal bridge
#

Anyway GitHub might actually work fine, it's just another case I wouldn't really trust since GitHub isn't really supposed to be used as a CDN or cloud storage and might not like users doing that.

calm nebula
teal bridge
lucid iron
#

i own blueberry one million us dollars in royalties for the idea

#

i wonder if there is way to host a scroll generating service blobcatgooglyblep

#

would just have to make the endpoint give a image right

teal bridge
#

That's what the scroll site does... just doesn't allow hotlinking.

#

Well, more accurately, it doesn't actually save your generated image to its own server, as far as I know.

hot gale
#

I just use imgur ๐Ÿคท๐Ÿฝโ€โ™‚๏ธ

lucid iron
#

yea i was imagine like

sour sleet
#

Someone has done a Spanish translation for Pelican Town Food Truck already lmao

lucid iron
#

chu.server/scrolltext=yourtext and it is give back png

#

hopefully without saving anything to chu.server itself tho

sour sleet
#

Is it normal for people to do this and not ask for permission SDVpufferflat

lucid iron
#

these really fast TL r prob automation

sour sleet
#

Yea, checked their page and they have a few spanish translated mods

lucid iron
#

you can report them if you don't like it

hot gale
#

I only have had one person do a translation and they asked fwiw

sour sleet
#

I think I will report it. How hard is it to ask for permission SDVpuffereyes

teal bridge
teal bridge
lucid iron
#

i dont want to see what strange text other ppl are writing to this theoretical scroll gen

teal bridge
#

That is assuming it's a proper translation (lang.json file) as opposed to those weird BS translations that copy the entire mod.

lucid iron
#

it is true that there aint much point tho bolbsunglasses

uncut viper
#

translations are derivative works, so the copyright owner does have the right to decide who gets to distribute them

teal bridge
#

Or make it a hash of the text instead of the actual text.

lucid iron
#

wouldnt i still have the actual image tho, in this setup

#

i am perhaps think too hard about preserving customer privacy in an unimportant service like this

latent mauve
#

To clarify about the Discord stuff earlier: you can still hotlink an image posted in Discord, but the link automatically breaks after 24 hours.

uncut viper
teal bridge
sour sleet
#

That's so strange. I was just going to report and they removed it themselves lmao

teal bridge
#

Hypothetical privacy concerns would be a matter of not storing any PII with the images, different issue really.

lucid iron
#

looks like they r keep standard sizes forever and then caching nonstandard for 24hr, if i am read it correct

uncut viper
#

i didnt read it at all so. sounds correct to me or something. or not maybe

lucid iron
#

ah nope the standard sizes is just keywords to dimensions

teal bridge
#

Honestly I think the concern with these things has never been "it's hard to code" but rather "who is going to pay the hosting/bandwidth cost".

uncut viper
#

just chuck it up on aws and when you suddenly get a super high bill ask support to remove it bc you made an oopsie SDVpufferthumbsup

teal bridge
#

("not that I've ever done anything like that...")

lucid iron
#

yea and if me, random unaccountable internet person, suddenly take my scroll service offline

#

all these mod pages explode anyways

teal bridge
#

Ask Pathos to set up an AppEngine equivalent on smapi.io, he'll totally go for it.

lucid iron
#

i checked where pathos put his pufferfish headers and its also just on imgur

tiny zealot
teal bridge
#

It looks like imgur didn't ban hotlinking outright, they've just capriciously banned a bunch of sites from hotlinking based on unspecified rule violations. I really see them as a gray area, they are trying very hard to market themselves as a sad imitation of social media instead of a plain old image hosting site.

tiny zealot
lucid iron
#

you crossed into the mouse dimension

tiny zealot
#

the real mouseverse was the friends we made along the way

ornate locust
#

I got fishing to work too SDVpufferparty

#

Spacecore made it real easy

#

A+

#

...in a schedule, I mean, not just... the thing you do ingame :V

brave fable
#

i prefer to use imgur for hosting mod page media, if you upload directly to nexus you get a sea of base64 soup in your bbcode which is terrible

brave fable
#

definitely spurred by the nexus issue where every base64 or whatever character contributes to your character limit in the posts section and breaks the page

hot gale
#

Editing mod pages is like pulling teeth sometimes

#

aaand Save. Okay, lets check the mod page... half of it reverted to zero formatting cool

brave fable
#

definitely best avoiding the wysiwyg editor for editing and just using it as a preview, do all the work in bbcode

balmy venture
hot gale
#

Nope, it has sucked for years

#

v2.0 posted :D Now includes seasonal variants, giant crops and special trees!

teal bridge
#

Wha? What character limits, what base64?

lucid iron
#

I didn't even know you can upload directly to the bbcode editor what

brave fable
#

sure you can, it just bakes the whole image into text right into your page/post/comment

#

on the plus side it means you're not relying on any hosting services, but it also means the text content is absolutely immense if you have a lot/large images and editing turns into a huge ๐Ÿฅ™ when you need to update/replace them

lucid iron
#

Do i want to know what LoC page bbcode looks like

calm nebula
#

No

brave fable
#

well as i said i prefer imgur so it's not that bad

#

and since i do the bbcode manually it means there's less [size=3][/size][size=3][/size][b][/b][size] everywhere from when the wysiwyg editor had a fit over something or nothing

pine elbow
#

Can anyone tell me which property of the Stardew Valley map, for example:

private void OnAssetRequested(object? sender, AssetRequestedEventArgs e)
{
    if (e.NameWithoutLocale.IsEquivalentTo("Maps/Farm"))
    {
        e.Edit(asset =>
        {
            var editor = asset.AsMap();

         });
    }
}

I want to access the FarmHouseStarterGift property that is in custom properties in tiled, is it possible to edit this property here or is there another way to access it?

lucid iron
#

I think this is the correct place yeah

#

editor.Properties["FarmHouseStarterGift"]

#

this should be what you want

pine elbow
brittle ledge
#

Does anyone know what "particular speed" translates to in reality?

ornate locust
#

0.007 I imagine?

#

though of what, I don't know

#

of a second, I'd think

uncut viper
#

iirc its how much more transparent it gets per game tick

calm nebula
#

It's the speed of an unladen swallow

uncut viper
#

so not a guaranteed specific time calculation, though usually predictable enough

calm nebula
#

Or what Button said

uncut viper
#

itll subtract that number from the alpha value of the fade to black per tick

calm nebula
#

(Alpha goes from 0 to 1)

ornate locust
#

ah so "at some damn speed"

calm nebula
#

Default does the full fade in about 2.5s

vernal crest
dry terrace
#

Hi, Iโ€™m a beginner, I wanted to ask what type of mod would be the easiest to make?

versed wyvern
#

Anything that just replaces existing content like portraits or dialogue, I would wager

tidal stone
#

i started with replacer

#

yeas!

#

a content patcher mod to replace something simple would probably be easy its what i started with

versed wyvern
#

That would get you to learn some of CP's patching syntax, how jsons are set up and such

tidal stone
#

thats also true lol, making something you want would make it easier to get through

lucid iron
#

Even if it's hard if you really want to have it you will figure it out

#

People here will help

tidal stone
#

everyone here is super helpful and will do what they can to assist when you need!

#

lots of really nice ppl bUwU

dry terrace
#

Thanks! Iโ€™ll probably start with a sprite mod, Iโ€™ll ask again if I have any problems.

balmy venture
#

I started with AT mod but i have no code knowledge so it's super easy

tidal stone
#

is there a way to set an item as universally hated or would i have to patch that for every villager ever

balmy venture
#

Now I'm tapping into fixing compat map bugs with the help of one if the many amazing modders here, bless their heart for their patience

#

It's exciting

lucid iron
#

Universal_Hate

tidal stone
#

nice!

#

cause like i figured gifting someone a poisonous flower tea would be universally disliked lmao

rocky copper
#

Can game state queries use tokens defined in a config file? I've got a building with different skins that show up separately in the carpenter's shop, and I was wondering if I can use the "Condition" field per skin to make them only show up if the player has them checked true in the config file or would they need to be individual EditData sets with a "When" condition?

hot gale
#

Anyone know if there is a way to put an item in a machine and get the exact item back in return? I basically just want a machine that adds smoked_item effect and adds value over time. Using extramachineconfig

lucid iron
#

it's a bit silly to have extra not required data blobcatgooglyblep

#

however it is possible to use tokens in a game state query Condition field if you want

#

since you have a true/false token, they directly correspond to the TRUE/FALSE game state query already, so you can just put your token in the field i think

lucid iron
#

this one's a vanilla thing

rocky copper
lucid iron
#

well i would argue as a player it'd be confusing to still have the skin on your building even though you turned it off in gmcm

uncut viper
#

would it not break things if you had a building with a skin and then turned off the skin later, when using When conditions? why make skins conditional at all, anyway?

lucid iron
#

i think game checks itself

#

in BuildingSkin GetSkin

#

when i made a skin conditional, there was only 1 toggle and it was between "replace base building no skins" and "do not replace base building add as skin"

rocky copper
uncut viper
#

i understand that Condition wouldnt break things, i meant removing the actual data from the game itself via a When

#

i know what the difference is

#

i was concerned whether removing the data from being patched at all would break buildings that already existed with it, since its not a matter of "not conditionally accessible anymore" but as you say, n ot at all in the game

#

but if it does check itself and chu is right, then its fine

rocky copper
#

Gotcha, sorry.

uncut viper
#

but id still wonder why you'd want them to be conditional, since a player can simply choose not to use em

rocky copper
#

I was wondering if When would break things, I'm really not sure

#

So, my mod is the Alternate Sheds, which uses the various Cabin skins as skins for a new type of Shed building. Each skin shows up as their own entry at the Carpenter's shop, because if they're not then they don't keep their skin when you upgrade. But it does mean there's a bunch of them in the Carpenter's shop and you have to scroll past them if you're flipping through. A commenter asked if I could add a config condition for each skin, and I actually get it

uncut viper
#

hm.

#

hey chu, how do you feel about Livestock Bazaar but Carpenter Shop Bazaar

rocky copper
#

Ah, so for anyone curious, if you turn off a skin that's already in use the game defaults the building back to the standard skin. Not a red or even yellow line in SMAPI

lucid iron
#

idk button i think selph already submitted the trademark application on that one

uncut viper
#

did they? i mustve missed it

old edge
#

What could be causing lumber to spawn in my maps?

lucid iron
#

selph is working on a custom builder npc mod

#

idk if the plan is to touch the build menu too

old edge
#

And it just shows an overlay graphic

lucid iron
#

in both tiers

rocky copper
#

As in the Beach skin for both the Shed Deco (first tier) and Deluxe Shed (second tier) are both "Beach Shed"

lucid iron
#

ig upgrade still wipes that somehow huh

#

unfortunate

#

oh hm nvm i misunderstood what you mean bolbsunglasses

#

anyhow if u think configs is good then configs is good Dokkan

#

and you can decide how you want it to behave between using When and using Condition

rocky copper
#

I went with When

#

But yeah, I tested it a dozen ways across two mods, if the skins aren't separate construction entries, the upgrade turns the building back into the default skin. But as separate construction entries I do get to give them different construction materials per skin, which is fun

#

My other mod is the Buildable Camper, and I just kept that to one entry so that's what it does, but this one felt better as separate entries.

urban patrol
cyan venture
#

i have problem with this when i tried to change Robin dialogue

#

any1 have any idea?

vernal crest
urban patrol
#

hmm good question... is there one with alex at the saloon maybe?

#

it's been a while since i got to high friendship with anyone lol

latent mauve
#

There's the date night one, yeah

urban patrol
#

sick i'll take a look at that

#

oh interesting, it uses showFrame instead of animate

latent mauve
#

Probably easier

urban patrol
#

yeah makes sense

#

i'll try it!

latent mauve
#

I think doAction is how they're making the farmer sit? Unsure though

#

If you doAction on a chair tile, I think that will make the farmer sit

#

(doAction on a door tile opens doors, so the logic makes sense to me)

urban patrol
#

i think the game starts the farmer already sitting because the showFrame is the very first command after skippable, but yeah just using showFrame made the farmer continue walking in place on the couch, so i'll try doAction

#

...hmm still walking in place

#

speak CharlesRowland \"It's safe, don't worry.$h#$b#Come on over.\"/advancedMove farmer false 2 0 0 -4/pause 3000/faceDirection farmer 1/doAction 6 6/positionOffset farmer -60 40/pause 1000/speak CharlesRowland

replacing doAction with showFrame has the same effect, and replacing it with animate makes the farmer sit down but their head is turned up

#

i feel like the advancedMove is the problem somehow because it gives me trouble in other events every time i try to use it

vernal crest
#

What if you remove the advancedMove temporarily and just focus on getting the farmer to sit? You could warp them there instead or just try to make them sit in thin air.

urban patrol
brittle ledge
#

there's a StopAdvancedMoves event command too if they're trying to continue walking that might help

urban patrol
ornate locust
#

I have reached the end of the day and my NPC's schedule acted right the entire day. haven't done any of the alterations based on day or anything yet, but he no longer sits and stares at his sea urchin tank

marble verge
#

Good morning. Is there a mod that uses all of GMCM's functionality (particularly color picking) that I can look at to see how the configuration is handled?

proud wyvern
#

GMCM doesn't have color picking

#

it's on a screenshot of it, yes

#

but it was never a concrete component

#

it must have been a custom one

marble verge
#

Aha. I know there's mods that use it through C#, but I was hoping it could also be done through CP.

spice inlet
#

PIF uses GMCM color picking using GMCM options iirc

proud wyvern
#

but that's a different component really

#

(and still using the custom functionality)

#

the screenshot seems to have been a color well that would bring up a dialog for color picking

#

that's how it looked like to me

#

did that actually ever work? no clue

#

since all we've got is a screenshot of nowadays non-existent functionality

spice inlet
#

imo a bit of false advertisement ๐Ÿ˜„

proud wyvern
#

but yeah. GMCM Options is a separate mod and CP doesn't include its functionality

marble verge
#

I couldn't find documentation on the full range of functionality that GMCM offers through CP... Did I overlook it?

spice inlet
#

I know I spent some time trying to figure out how to access the color picker that doesnt exist as well

marble verge
#

Oh bugger, I've been looking in the wrong place. Cheers!

marble verge
#

Can I use i18n keys for default values under ConfigSchema?

proud wyvern
#

the above page has this info

#

you can't use any tokens at all, but you can use the predefined i18n keys

formal crown
#

SDVpufferlurk Is there a way to block Automate from affecting a certain machine?

dusk mulch
#

How can I get an actor to open a door in an event? Would it be a DoAction?

crude plank
formal crown
#

Is there a way to do it from the mod's side?

crude plank
#

That i don't know unfortunately but since users can i would assume there must be a way from the mod's side tooSDVpufferthinkblob

formal crown
#

I have a machine that errors when attempted to be automate'd, but it was never meant to be automated in the first place so I want to block it

proud wyvern
#

what's the machine though?

#

i can't think of a machine you wouldn't want to be automated

formal crown
#

Trinket Workbench, it turns trinkets into trinket rings(added by VPP) and back to regular trinkets

proud wyvern
#

ah

#

i'm still not familiar with trinkets, but it does sound like something you wouldn't automate

formal crown
#

Yep, its why I want to block it since there's no meaning and only errors to automating it

brave fable
#

with c# i think you can define a new non-producing factory definition for your machine, but other than that automate appears to handle everything through the config rather than a data asset

regal knot
#

Is there a way to test my codes in real time?

#

Or at least get the error messages without starting the game

gentle rose
regal knot
proud wyvern
#

if you're making a C# mod, you get told right away if anything fails to compile. successfully compiling doesn't however mean it will work at runtime, no way around that - you still gotta run the game and check
if you're making a CP mod, the SMAPI site has a basic validator. but again, it only checks if the syntax is valid, but your actual edits still have to be tested at runtime

gentle rose
fathom rapids
#

so because im trying to learn how to make The Best Mod while im doing this, I've added config - I think I get how it works - and now I'm trying to add i18n, and I'm absolutely stuck on this part

#

(C# mod)

#

I've added the ModTranslationClassBuilder package

#

but now I'm not sure how to. Actually add the i18n file

#

like. should it be in the project in a folder named something specific?

brave fable
#

you don't necessarily need that package, i've never used it myself in any c# mods with i18n

fathom rapids
#

i did see that it was optional

#

but i dont think removing it will help me any

#

how do i actually add the translation file ๐Ÿฅบ