#making-mods-general

1 messages · Page 309 of 1

tiny zealot
#

unless you're going via the desert, of course

sour sleet
#

Ahh ok, will mess around with it and see lol

earnest sierra
#

hey guys I was just wondering if anyone had any information on making a content patcher thing that let me use pngs instead of xnbs (not for stardew valley)

#

not for Stardew Valley since it already has one but it seems like Stardew Valley is the only popular XNB modding community

brittle pasture
#

we're already using pngs?

earnest sierra
#

any help would be appreciated because what I can find online isnt helpful

brittle pasture
#

whatever guide you're referring to seems insanely outdated lol

#

!startmodding

ocean sailBOT
#

Making mods can be broadly divided into two categories:

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

earnest sierra
#

like content patcher I imagine only works for stardew valley

brittle pasture
#

check out the content patcher guide I linked. we don't really do XNB modding anymore

uncut viper
#

if you want to make your own modding framework for a completely different game that uses xnbs thats kind of out of this channel's (and discord) purview

#

but id look at the code for content patcher and the xnb unpacker

calm nebula
#

But yeah

uncut viper
#

if it might help you

brittle pasture
#

ooh I get the question

uncut viper
#

true, you could go there, though its less a questions and help channel

calm nebula
#

Look at how CP works. Look at how asset interception in smapi works

uncut viper
#

(you CAN ask questions and get help there, but its not the purpose of the channel like this one is)

tiny zealot
calm nebula
#

(Hint: it replaces the localized content manager)

#

You'll probably spend more time than you want in the monogame xnb loafing code

earnest sierra
#

alright thank you

vernal crest
tiny zealot
#

alas, i am trigger happy on the hot take cannon some days

boreal pulsar
#

ive probbaly already asked this but, how do I find/get a specific set of item IDs trough code?
like, id need a function that gets all crops
and than one that gets only the crops available that season (I guess it would just filter the function above with a gamestate query checking the season

idk ive found this https://stardewvalleywiki.com/Modding:Items#Categories and probably item categories would work here but im not sure how to use it

brittle pasture
#

C# I presume? Object data (the seed item, the harvest item, etc.) is in Game1.objectData. Crops data (what seeds when planted gives what crops) is in Game1.cropData

lucid iron
#

you can also use an item query

boreal pulsar
lucid iron
#
ItemQueryContext IQContext = new();
ItemQueryResolver.TryResolve("ALL_ITEMS", IQContext, ItemQuerySearchMode.AllOfTypeItem, "ITEM_CATEGORY -75", avoidRepeat: true);
#

this is nice for broad searches, but looking at the data is better for crops specifically since theres no gsq to check for that

brittle pasture
#

yeah, depends on how strict your definition for 'crops'. that item query will get every item with the category -75, regardless of whether they're from a crop

lucid iron
#

ppl made like, crops that grow cooper ore mods

#

or veg that is from a tree instead of a crop

boreal pulsar
lucid iron
#

everything in Game1.cropData is growable

#

and u can check season while u r there

boreal pulsar
brittle pasture
#

though some mod may add rare crops whose seeds cannot be bought in bulk, which may make the quest uncompleteable if that crop gets selected
dunno if that's prevalent enough to actually worry about though

#

I guess there's the vanilla rare seeds

lucid iron
#

another approach is to look at the stock of SeedShop

boreal pulsar
#

alr, so this would return a dictionary containg all ctrop IDs?

  {
      var cropData = Game1.cropData;

      return cropData;
  }
boreal pulsar
uncut viper
#

keep in mind it wont be possible to turn off mod seeds unless you write out all the vanilla seed IDs anyway

boreal pulsar
#

in this case I need the crop itself and not the seed but I will likely need them somewhere else

uncut viper
#

theres no other way to tell what is modded and what is not

uncut viper
#

once its in the content pipeline, its all the same. you could potentially look at the dictionary before and after any edits are applied, i suppose

#

not really worth doing in most cases

boreal pulsar
uncut viper
#

no

#

there is no marker that says an item is from a mod

boreal pulsar
#

oh alr

uncut viper
#

the game has no way of telling what is modded and what is not

lucid iron
boreal pulsar
#

ah lmao

uncut viper
#

content patcher knows, and if you get into the pipeline early enough you can know via dictionary diff checking, but normally, you cant know

brittle pasture
lucid iron
#

can inspect whats in stock without limits

boreal pulsar
#

idk im learning both c# and smapi modding at the same time

lucid iron
#

have you decompiled the game yet

#

and unpack

boreal pulsar
boreal pulsar
calm nebula
#

Incredibly useful to do so

uncut viper
#

i would say borderline mandatory

calm nebula
#

It's basically how all modding works

boreal pulsar
#

alr ll do it now than

calm nebula
#

Frankly I've threatened to decompile the work of a library we use if they don't provide better documentation ||I kid I kid||

boreal pulsar
#

lmaoo

lucid mulch
#

(I have decompiled my own work project once due to some former colleagues really loving partial classes, it was easier to read and understand the codebase in ILSpy compared to the real source code)

calm nebula
#

"Well I'm just trying to do Y but I'm getting segfaults?"

calm nebula
lucid mulch
#

not exclusively the reason

calm nebula
#

But definitely part of it?

lucid mulch
#

we still refer to that section of that codebase like 2-3 years later as [name] hell

calm nebula
#

Anyways

#

Hi, SinZ! How does stardew performance go

lucid mulch
#

it was a mess of abstraction, partial classes, empty interfaces that had extension methods
all for something that wasn't actually reused anyway

lucid mulch
patent lanceBOT
lucid mulch
#

I've been doing background reading on lsp and dreading the work it'll take
but I think I can do some cool shit if it works by having a hybrid DAP/LSP

#

but getting the high precision of correlation between json and runtime state required for the LSP to work isn't going to be fun

boreal pulsar
#

oh my god so now I can run the game trough VS and see everything in action?

#

bruhu

calm nebula
#

!hotreload

#

!reload

ocean sailBOT
#
How do I reload my changes while I'm still in game?
  • Content Patcher pack: enter patch reload <your_mod_id> in the SMAPI console window. This will reload and reapply all your patches (but won't recalculate the ConfigSchema or DynamicToken sections if you use them).
  • Translation files: enter reload_i18n in the SMAPI console window. If it's for a Content Patcher pack, also run patch reload afterwards.
  • C#: see the Visual Studio hot reload or Rider hot reload feature.
lucid mulch
#

I'm tempted to just cheat and do non-standard extensions to DAP and do some of the lsp stuff entirely extension side instead

boreal pulsar
#

bruh theres literally the code I needed here

#

wow

#

i feel bad toh

#

idk what for

lucid mulch
#

you could already run stardew through VS and have breakpoints etc just work

#

decompile wasn't actually needed for that

boreal pulsar
#

oh

#

idk never used VS before

lucid iron
#

what are the consequences of me keeping around a Chest instance per screen purely to use chest.ShowMenu with a global inventory

uncut viper
#

why not just create an ItemGrabMenu with the global inventory

lucid iron
#

its long and annoying and maybe explodes on phone

uncut viper
#

do you want to colour code your global inventory

lucid iron
#

grabItemFromInventory/grabItemFromChest

#

these r instance methods of Chest hokuhands

tiny zealot
#

my opinion on phone is "if it explodes on phone, oh well"

uncut viper
#

just copy those methods yourself ezpz

lucid iron
#

that is true but long and annoying remains

#

cant believe it is a job for reverse transpiler again (no)

uncut viper
#

i mean in this case whats the harm in just copy pasting em

#

how badly do u care about special mod-patched-in behaviour for adding/removing items from chests for ur global inventory

#

reverse transpiler sounds fun here though i vote for that

lucid iron
#

i think they should patch who.addItemToInventory

uncut viper
#

i would agree

#

therefore even ezier pzier to just copy those grab functions SDVpufferthumbsup

lucid iron
#

but a second annoyance is like

#

item grab menu remakes itself whenever you exchange item

uncut viper
#

wdym remakes itself

#

thats all chest.ShowMenu does anyway though

lucid iron
#

i mean it literally

uncut viper
#

it makes an ItemGrabMenu

lucid iron
#

grabItemFromInventory calls chest.ShowMenu

#

makes itself again just to update draw or smth idk

#

i should actually figure out if thats required or just a bit of quirky vanilla code yggy

uncut viper
#

beats me. i never noticed bc when i made my itemgrbamenu for my global inventory i just didnt use those functions so im no help here and even less help with splitscreen. godspeed

lucid iron
#

ik i copied these exactly for sprinkler attachments, bc i was a wee baby modder and didnt think to try anything different

uncut viper
#

can always just write ur own select and grab behaviours anyway for fun

lucid iron
#

hm yes i copied the code wrong enough to cause netcode problems and dupe items

lucid mulch
#

😦

#

granted its not hard to dupe items anyway

#

plenty of places have items exposed without a mutex, or mods that ignore the mutex (I love you ChestsAnywhere but you are a duping/deleting magnet)

lucid iron
#

well i have copied this particular bit o code correctly before kyuuchan_run

#

but doing it made stash btn not work so im actually thinking of changing that

#

ig i am indeed just keeping a Chest that never gets placed anywhere in the world 3sSmolMiku

boreal pulsar
#

Am I overcomplicating stuff or is this alr? (it shuld return available crops of the current season)

private static List<String> GetAvailableCrops()
{
    var availableCrops = new List<string>();

    foreach (var entry in Game1.cropData)
    {
        string cropID = entry.Key;
        var data = entry.Value;

        if (data.Seasons != null && data.Seasons.Contains(Game1.season))
        {
            availableCrops.Add(cropID);
        }
    }
    return availableCrops;
}

Im trying to only base code on wiki/decompiled game without using ai lmao

#

it sort of is easier in a way

lucid iron
#

you can just try it

#

but as mentioned this will give u some rare crops (like rare seed)

boreal pulsar
lucid mulch
#
    foreach (var entry in Game1.cropData)
    {
        string cropID = entry.Key;
        var data = entry.Value;

can be replaced with this, but is mainly syntax sugar and isn't changing functionality

    foreach ((var cropID, var data) in Game1.cropData)
    {
boreal pulsar
lucid iron
#

you dont have to ping me cus im still here lol

boreal pulsar
#

?

round timber
#

you can turn off the ping when replying

boreal pulsar
#

oh true

#

I never used that function

lucid mulch
#

also cropData does have its PlantableLocationRules which is an optional list of GSQ to run based on the location to additionally deny for other reasons

boreal pulsar
drowsy pewter
#

can i add multiple recipes in the same mail SDVpufferthinkblob

lucid iron
#

actions yes but u dont get the text

drowsy pewter
#

I'll mention it in the body of the letter then

#

"Cornucopia.CookingRecipes_WillyOysterSauceCrab": "{{i18n:Mail_WillyOysterSauceCrab_body}}%item cookingRecipe Cornucopia_OysterSauceCrab%% %item cookingRecipe Cornucopia_OysterSauce%%[#]{{i18n:Mail_WillyOysterSauceCrab_title}}",

boreal pulsar
runic ferry
#

Excuse me, I need a little help. I'm making modifications in a map file on Tiled, but the main file have also a "Sandbox" map which seems identical with the exception of little differences. Can I edit the Map file freely without concerning about that other map or I need to be aware of something?

rancid musk
round timber
boreal pulsar
#

ohh makes sense, thats why he only used numbers in the past I guess

lucid mulch
#

the numbers were previously the sprite index in the singular sprite sheet, and there wasn't an actual concept of an item id (which was why JsonAssets was effectively mandatory as it could maintain the concept of item ids and allocate sprite indexes dynamically).

1.6 both allows to decouple the id from the sprite index, and allow loading from multiple sprite sheets (which the 1.6 items do)

#

and as it was a texture being synchronized to the gpu, there were constraints on what the height of the spritesheet could be, so the hacks done in places like Events where you prefix your nexus id or whatever to the number wont work, as the spritesheet cant be that tall

patent lanceBOT
#

@calm nebula: patch for extended hearts (14d ago)

runic ferry
#

Inside the farm, there is a warp from "142, 104" to "149, 148". But the content.json file has no contextual mention to this number or other close. How other else the author made this teleport?

#

can't understand that at all lol

#

nvm, found a way here

glossy cargo
#

Thank you for your contribution LUL

sleek flint
#

Is there any Stardew Valley title font generator but with correct colors? Because all the ones I found were black and white.

urban patrol
#

i don't think there is (i looked too) but with a little bit of work you can download a transparent one and then color it in

lucid iron
#

is the scroll generator not what you want

urban patrol
#

oh yeah there's the scroll generator, i assumed you were talking about the yellow wood board font

#

is this the proper way to format a question in dialogue?

"Thu4": "$q Uh, what?/Yes, actually... [give a lecture about 20th century naval battles] Thanks for your help with this assignment.$h#You don't know anything about 20th century naval battles, do you? I swear this class is going to kill me.",

brittle pasture
sleek flint
lucid iron
#

Oh you mean the logo?

glossy cargo
# brittle pasture perfect no notes

Actually there is one note lmao, Clay should be 1, not 14. It accidentally took the amount from the thematic construction bundle instead of just taking one clay. I fixed it 🙂

sleek flint
#

Like these

lucid iron
#

Digus probably has a full set of em kyuuchan_run

sleek flint
#

or these

lucid iron
#

But these r not really fonts per say

drowsy pewter
#

Oh gdi. The custom tv channel mod doesnt allow us to teach players new recipes yet

#

This is definitely something I should have looked into months ago

lucid iron
#

the TV is a Machine that produces Knowledge on day started

sleek flint
drowsy pewter
#

(doesnt seem like the modder is active either so probably not the best framework to add rn)

lucid iron
#

emc pls kyuuchan_run

drowsy pewter
#

@ selph heyy

#

Just kidding I'll make our tv channels a newsletter instead. Clog that modded mailbox even more 😭

#

Hmm

lucid iron
#

6480 do u have either calcifer or spacecore rn

drowsy pewter
#

Spacecore yes

#

I can add calcifer if it does anything

lucid iron
#

Nah both of them have furniture actions so just one is fine

drowsy pewter
#

Yessss

#

Newsletter furniture that you read

#

radio?

lucid iron
#

Yeah something along those lines

drowsy pewter
#

mini queen of sauce tv

lucid iron
#

i think to emulate queen of sauce you can use the day of year as part of a i18n key

drowsy pewter
#

queen of sauce blog on your computer SDVpufferthinkblob

lucid iron
#

So u get a different recipe every day

#

And it cycles each year

drowsy pewter
#

I think every day might be too much but we have content for two recipes each week for two years

lucid iron
#

And maybe u get a Book eventually that give all recipes on read

#

Through some trigger

drowsy pewter
#

If it's a "blog", then players can read the latest "blog post" and not worry about reading it on each specific day

#

Yep we'll do a book as well

lucid iron
#

That seems more complex for trigger action though i can sorta imagine how

#

Elaborate series of mailflags probably

drowsy pewter
#

well i can't just use the number in the i18n key because even though that cycles the i18n text just fine, the actual recipe learning command has to be written out for each recipe

#

no wait i guess it works

#

I just never used i18n for non-i18n things before

lucid iron
#

Yeah put it it like a separate do not translate i18n json

drowsy pewter
#

mm

#

we can separate them now?

lucid iron
#

Yeah

#

default/
pls-translate.json
dont-translate.json

#

And then i come and make
zh/
pls-translate.json

drowsy pewter
#

i can still use queries to resolve day numbers into i18n strings and keep it all as one command lol

#

what about the vanilla string system, could that be used instead?

lucid iron
#

Do it before release cus default.json has priority over default/ folder

drowsy pewter
#

or would it not resolve

boreal pulsar
lucid iron
#

I dunno NotteThink

#

Actually hm i just remembered, the map letter view didn't parse actions

#

You probably have to go spacecore tile trigger action then

drowsy pewter
#

map letter view?

lucid iron
#

Map tile action Letter

#

Someone tried to use that with mail action and it didn't work

#

Yeah idk which vanilla map string thingy allowed side effects if any

drowsy pewter
#

ah ok idk what that is so it doesnt matter

lucid iron
#

u can do spacecore tile trigger -> add recipe + spacecore hud message

drowsy pewter
#

yup

lucid iron
#

If u add BETAS u get to use a dialogue box

#

For the King of Spice's beautiful portrait obviously

#

There's a thingy in mmap that spawns a question dialogue which would let people pick which recipe they want to learn that day blobcatgooglyblep

drowsy pewter
#

SDVpufferthinkblob I like the recipe blog because it makes sense that someone would be able to learn the same recipe for a few different days, but I think a little radio would fit as part of kitchen decor better... I just dont expect players to be able to remember to click on it on specific days each week

lucid iron
#

Make it shiny

#

Animated DokkanStare

#

Add lil radio waves or something

drowsy pewter
#

ahhh on specific days

#

I like that

lucid iron
#

I forgor if spacecore anim let u do it conditionally tho

uncut viper
#

can also do spacecore hud message reminders

drowsy pewter
lucid iron
#

Well making it animated still helps mark it as a special thing

lucid iron
uncut viper
#

could you not also just put a When condition on the animation patch itself

lucid iron
#

I'm hoping it is respect invalidation

drowsy pewter
#

if i want it to refresh once the player leaves the map, sure

#

I'll think over it

lucid iron
#

Will u draw 1 radio and then slip into kitchen clutter hyper fixation YuniShake

uncut viper
#

BETAS could also update the patch instantly if you did add it

drowsy pewter
#

let me see if I can utilize other BETAS features

lucid iron
#

I actually don't think it's an issue that it remains animated throughout the day cus you can rewatch queen of sauce as much as you want on the same day too

drowsy pewter
#

yeah

lucid iron
#

Hm so if it is just call trigger action then u won't need to i18n anything there

#

Just {{Random}} the trigger action id

#

That or a single trigger action with a bajilion If !PLAYER_HAS_MAIL

drowsy pewter
#

will BETAS SetNewDialogue refresh the npc's dialogue for the day unlike using a conversation topic? Or how is it different from a conversation topic?

uncut viper
#

if you append the dialogue then it works like a CT, if you don't append it will completely replace whatever dialogue they already had loaded

#

if you've already spoken to them that day it will let you speak to them again since they have new dialogue now

drowsy pewter
#

okay thanks

uncut viper
#

(which is also like a CT)

#

it also won't be tracked like a CT so unlike a CT you can see the dialogue as many times as you want. it's possible to do infinite dialogue in one day with it

versed wyvern
#

Was it possible to add spouse-specific wedding ceremony content? I vaguely feel like I read something about that before but there doesn't seem to be much documentation about weddings

drowsy pewter
#

I wonder if theres some mailflag or stat system that I can use to keep track of incrementing items. My 12 quest items can be turned in in any order, so I cant tell if a player has turned in two of them or eleven, just all or none (or one specific one)

uncut viper
#

you can just use IncrementStat and the existing player stat system

#

if a stat doesn't already exist then IncrementStat will create it

drowsy pewter
#

oh interesting

#

It does seem like BETAS will be useful for a lot of our questline features so I'll grab it when I'm feeling less exhausted lol

lucid iron
uncut viper
#

if there's something it can't do that you need it to and you think it'd fit in BETAS feel free to let me know

drowsy pewter
#

update the animation patch instantly--do you mean the PatchUpdate trigger action? hopefully refreshing the entire mod to restart an animation doesnt do anything funny

lucid iron
#

im not sure if you have to edit on Relationship:Spouce engaged, or if DayEvent wedding is fine

uncut viper
#

yeah that's the one. It runs the content patcher console command

#

patch update

#

it doesn't do anything on it's own, it just exposes the console command that CP already has as a trigger action

drowsy pewter
#

mm

versed wyvern
rigid musk
#

Is there anyone who's worked with day/night tiles for custom maps before?

lucid iron
#

@whole raptor hey what is the cp patch u needed for ras wedding?

versed wyvern
#

If they're still "engaged" I think my plans would work smoothly but if they're considered married already I can foresee that getting confused by multi-marriage mod(s) ThinkO_O

#

Oh, Rasmodia has an exclusive ceremony? I'll go poke around that for a bit then PoppoWalk

lucid iron
#

its a wip so i am ask directly

whole raptor
#

I haven't exactly tested how it works with wedding per se (I'm just testing it in game as a regular event for now), but from what I heard from Lemur you just need to add an entry to Data/Weddings with ID matching your NPC and it'll play that version of the wedding

#

Sword and Sorcery has custom ceremonies for their NPCs if you want to take a look

lucid iron
#

Oh that's nice im glad there's just unique key DokkanStare

whole raptor
#

Yep, nice and simple

versed wyvern
#

Ooh, if that's all I have to do then this ought to be easy, thanks Watame_HyperShake

vernal crest
golden basin
#

@willow shale if you need anything pass downloading the Nexus mod and moving them to stand alone let me know ok

willow shale
#

kk. probably wouldnt be anything too fancy if im doing it, no events introducing the animals, but i imagine i could keep the existing new buildings and just change the required building materials without much issue

golden basin
#

That would be fine prob make things easier for ppl too

willow shale
golden basin
#

Well there are a few assets inside the maps that is from my tilesheets but you could easily replace them with the basic farm animal build interior

modest dagger
#

sad to see PC go FC but hope you're doin alright

golden basin
#

I'm not going anywhere just not modding anymore

#

Going in a different creative site but still very much gonna help ppl here and play

modest dagger
#

hell yea

#

Do all your NPCs have intended places to go or just some of them?

willow shale
golden basin
#

Mostly of them

golden basin
modest dagger
#

RIP Roswell

golden basin
#

She'll be in a comic instead

modest dagger
#

ooh as in you're not giving those characters away

pine elbow
golden basin
#

Thank you sage that's very kind of you

modest dagger
#

I was gon say Lyell seemed very fleshed out and would be weird no one would take him

#

vibes are literally unmatched

golden basin
#

I'm still debating how I wanna write the story, but I'm thinking a chapter book first with occasional illustrations inside

modest dagger
#

i've grown to love fighting pop and boxy over who gets the trash can

golden basin
#

Yeah I'm sorry, I feel better though already leaving it behind

modest dagger
#

No need to apologize, glad I had the time to use it

crude plank
willow shale
crude plank
#

I just want them to exist

willow shale
#

same, the animals are so cool

modest dagger
#

but clearly the fruits and trees and crops and foods need to exist too no?

#

(I would totally do it is what i'm saying)

crude plank
#

It would be really sad to see anything get lost honestly

modest dagger
#

Megan can do the fauna, i'll do the flora! (and food(a))

#

if i mean, it hasn't been claimed by someone already

#

the biggest question is, which category would Zuuie fall under?

#

heh

crude plank
#

Clown might want to keep it though, not sure what she wants to keep besides the NPCs she mentioned

golden basin
quartz harness
#

Hi! I'm trying to create an Event for a custom NPC mod. I want to make an item with attributes similar to Robin's Lost Axe to trigger events. The item will be sent to the user by mail, allowing the user to take it to a specific location to trigger the Event. The only problem is that I'm worried the item might be lost and unable to be recovered. I hope to set it up so that if the user accidentally loses it (sells it or whatever), it can ultimately be recovered through the lost&found box. Does anyone know how to write this code?

calm nebula
#

How attached are you to the lost and found box in particular

#

Because, frankly, the sequence you describe isn't possible in json- only mods

#

You might be able to finagle it into the ||crow shop||, which is very similar and does have a data asset

#

If you were doing c# it's trivial enough to just make the item a quest item (so not lose-able or sell-able)

#

You can also make it an actual LostItemQuest and launch an event with the reception dialogue (with spacecore iirc)

quartz harness
#

I actually just need to make a failsafe mechanism, because my partner told me I have to do so, to prevent important quest items that cannot be obtained or crafted again from being lost by other users.gigathonk

calm nebula
#

So. Which of these three options do you want

#

(An actual lost item quest generates a quest item which cannot be lost.)

quartz harness
#

O god idk how to write this

next quarry
#

"Oh cool C# SDVpuffersquee" turned into "on no... C# SDVpuffersweats" quickly there

opaque field
#

For some reason Shane's vanilla 2 heart is now suddenly triggering, and then my event directly follows and then seems to softlock any of my following events :\ The only way I can seem to get the next event (dancing on the beach) to go off is debug mode

trim sand
#

"oh no C#" you mean the logical default

vernal crest
opaque field
#

Similar yes, but not exactly. You have to have seen 3 other events first, have at least 2 hearts and enter the forest after 7pm.

#

Should I maybe change the heart level or time? It's supposed to be a rewrite of his 2 heart event which is why it's similar but not exact

vernal crest
#

Shouldn't you be removing his vanilla 2 heart one if yours is meant to replace it then?

opaque field
#

Oh... I hadn't thought of that since so far the other event had never triggered.

vernal crest
#

Unless you want people to go through the game seeing all of his vanilla events and also yours, you will need to null out the vanilla ones.

opaque field
#

ohhhhh okay. I definitely do not hahaha I'll search around for how to do that on the wiki 🙂

#

is that something I set in the content.json?

vernal crest
#

It's the same as making an event, except you make the event key the exact same as the vanilla one and then put null as the value instead of an event script.

steel plaza
opaque field
#

do I just throw that in the same json as my regular events?

vernal crest
opaque field
#

Okie dokies, doing that now.

vernal crest
steel plaza
vernal crest
steel plaza
#

okay thanks, ill look into that

steel plaza
#

can i still make a shop like the "Joja Blackmarket"?

ocean sailBOT
#

Log Info: SMAPI 4.2.1 with SDV 1.6.15 build 24356 on Microsoft Windows 11 Home Single Language, with 13 C# mods and 1 content packs.

vernal crest
steel plaza
#

it's failing to spawn the npc, should i remake the tunnel map since that is where the shop will be?

#

like a new .tmx for the shop but containing my npc?

#

since that's what CopperSun did

lucid iron
#

No you only need to do small a map patch

steel plaza
#

how?

steel plaza
#

what do i put in the target? "Data/Maps"??

vernal crest
#

Everything you need to do is in the tutorial. There is no Data/Maps.

steel plaza
#

the map patch is there, but can't access the shop lol

void tinsel
#

So I'm assuming it's generally considered uncouth to ping a mod author about something simple like compatibility between two of their own mods? Probably should make a post on nexus or raise an issue on github?

vernal crest
#

I tend to ping on discord first if I know they're active on a server I'm on

void tinsel
#

Well then here goes nothing I suppose

#

@brittle pasture Any chance we could get compatibility between MPS and Additional Tree Equipments for giant crop tapping? The tapping works great up until I provide an MUS upgrade to the tapper, then it produces nothing (even when removed or mod-moved off and back onto the giant crop)

I poked around a bit in the code and while I'm not entirely unfamiliar with how something like this works I don't know a thing about Stardew modding to be able to even tell if this is a reasonable request or project to tackle myself. Maybe ChatGPT could help me get started but figured I'd hit you up first

#

Oh wait I'm tripping on something here, you aren't behind MPS. My bad

vernal crest
#

MPS is Nach, I think

void tinsel
#

Aye, I don't know how I got that mixed up

vernal crest
#

(Also, I am just chiming in to really strongly advise against using ChatGPT. It will give you complete rubbish.)

void tinsel
#

Oh, I hate ChatGPT. But it's something when you know nothing except enough to know when things are foolish

vernal crest
#

It's less than nothing, actually, because it actively points people in the wrong direction. So they waste time and effort on stuff that could never work instead of just finding things that could.

void tinsel
#

Sure

#

I'm assuming something of this caliber would be pretty involved though

vernal crest
#

Anyway, MUS is by neither Selph nor Nach lol

#

So you've got three whole authors in that message there

void tinsel
#

But Additional Tree Equipments is

#

Somewhere in my sleep deprived brain I managed to really fudge it up though didn't I lol

vernal crest
#

Lol just a bit xD

brittle pasture
#

I can add MPS compat on my end, though it's usually Nach who handles compat on his end right

vernal crest
#

If you're asking about MUS upgrades though that's Wren with Machine Upgrade System, not Nach with Machine Progression System.

void tinsel
#

Well, MUS upgrades upgrade MPS machines

#

So the MPS machines would need to compat I believe

lucid iron
brittle pasture
#

yeah reach out to him as well to see if he's interested
the MPS tappers indeed need their own giant crop tapping rules

void tinsel
#

Apologies for the confusion from my end, thanks Selph

vernal crest
#

I can't be bothered scrolling back enough in that thread to learn what MES stands for

void tinsel
#

Machine Evolution System

vernal crest
#

Oh Nach's other mod lol

void tinsel
#

Machine Progression System

vernal crest
#

MUS, MPS, MES. That's not confusing at all xD

void tinsel
#

Machine Upgrade System 😆

#

Not at all, no 😆

vernal crest
#

I don't blame you for getting mixed up lol

void tinsel
#

Well thanks for that haha makes me feel a bit better

#

Oh I think I got tripped up because I'm also using + testing Selph's Aquaponics mod

#

Which works beautifully with several other mods btw

#

Aquaponics + Legendary Fish Ponds + Fish Hatchery + Automate + MPS
is the current tree

sleek igloo
#

Does anyone know if there are any water tiles that are walkable in vanilla? I don't think there are but I haven't been to Ginger Island so I don't know what's going on there

I'm thinking of making a buildable paddy field mod but if there's a splashy sound water tile I'd prefer that over making trenches

steel plaza
valid folio
#

I installed this mod, followed the instructions (renaming the image file), and it doesn’t work. If I wanted to make my own mod that replaces the sprite for the Triple Shot Espresso, how should I do it? I want to see if I can get it working, and if I do, I’d like to send the corrected file to the modder.
I can also share the content.json file with you — it’s small — in case there’s an error in the code.

The error I’m getting is:

[Content Patcher] Can't apply image patch "(CP) Triple Shot Espresso To-Go > EditImage Maps/springobjects" to Maps/springobjects: the FromFile file 'assets\triple.png' doesn't exist.
[Content Patcher] Can't apply image patch "(CP) Triple Shot Espresso To-Go > EditImage Maps/springobjects" to Maps/springobjects: the FromFile file 'assets\triple.png' doesn't exist.

But the image does exist.

https://www.nexusmods.com/stardewvalley/mods/33159?tab=description

Nexus Mods :: Stardew Valley

Rextextures the triple shot espresso mug into a to-go cup like silvermoonchan retextured the regular coffee cup.

vernal crest
vernal crest
steel plaza
#

noooooooooooo, it needs that huh, brb

sleek igloo
#

Darn, I was afraid of that

vernal crest
valid folio
#

ok

vernal crest
# valid folio

Are you sure it's a png file? Can you turn on file extensions to check? It should be an option in your file browser up the top somewhere. Usually in View.

valid folio
#

It´s a PNG file

vernal crest
#

Did you rename it before launching the game?

modest dagger
#

wtf is faststone

vernal crest
#

An image viewer apparently

valid folio
vernal crest
#

Hmm I don't know then. It should be working. Instead of renaming the file you could try extracting the original mod again and editing the json so the FromFile matches the unedited file name instead. See if it works that way.

#

It's a pity the mod author didn't know about configs because this is something that would be extremely easy to change in game without needing a mod user to edit any files at all.

valid folio
valid folio
vernal crest
#

No it's not, but many people do struggle with it and I don't think it's great to get users to mess around with mod files if it can be relatively easily avoided. Plus if it was a config players could change it in game immediately.

#

Not that the mod author is doing anything wrong, especially given that it's their first mod.

steel plaza
vernal crest
#

I just might suggest configs to them.

valid folio
vernal crest
vernal crest
valid folio
valid folio
vernal crest
# steel plaza even with the Action, still can't open the shop lol

For example, you've put in your json that an NPC called "Bug Eye" has to be present for your shop to be open but there's no Data/Characters entry in your json. I haven't seen your Action OpenShop string but that would also need to have an owner tile area specified for the shop to work.

steel plaza
vernal crest
vernal crest
vernal crest
# valid folio Thanks = )

I'm going to bed now but if you run into issues and can't get help from anyone who's coming online soon (which is pretty unlikely, lots of knowledgeable people going to be around shortly) I'm happy for you to ping me and I'll look once I'm up in the morning.

steel plaza
valid folio
rigid musk
#

Mmm custom starting friendship would need C# wouldn't it

calm nebula
#

Not really

rigid musk
#

Is this one of the things I want to make that i won't have to wait until I learn C# to do.. truly

woeful lintel
#

Hello there, I'm having some trouble editing custom FF content files with CP: I get a CP Warn that says that "the field 'Included' doesn't match an existing target". Here is the custom content file I want to patch:

{
    "$schema": "https://raw.githubusercontent.com/Leroymilo/FurnitureFramework/main/doc/schemas/content.json",
    "Format": 3,
    "Furniture": {
        // Unimportant stuff, removed for clarity
    },
    "Included": {
        // Nothing, stuff is supposed to be added by CP patches
    }
}

Here is the patch:

{
  // Adding an Included pack to directly load a local file
  "Action": "EditData",
  "LogName": "Adding this Pack to Default Pack's Included",
  "Target": "FF/{{DefModID}}/content.json",
  "TargetField": [ "Included" ],
  "Entries": {
    "{{ModID}}.content": {
    "Path": "{{ModID}}/content.json",// The asset asked by FF will be "FF/{{DefModID}}/{{ModID}}/content.json"
    "Description": "A Furniture Pack made entirely with CP"
    }
  }
}

I am 100% sure that the Target is correct because the warning shows up exactly when this asset is loaded.
The goal is to add a new entry in the "Included" dictionary in the custom FF content data.

hoary lake
#

idea....different npcs are more or less 'grateful'. you give a gift to somebody like Penny and they are really grateful every time. If you give a gift to somebody like Shane then he would be a slightly above average gift gratefulness but would perhaps gain a bonus if you kept on giving gifts to them (filling their weekly limit)

i am probably not explaining the idea well..

urban patrol
rigid musk
woeful lintel
#

I tried multiple variations of "Fields" and "Entries", with and without "TargetField", but it's either "field doesn't match existing target" or "Entries can't add a new value in an Object" (which is a weird limitation imo but eh, it's probably possible with "Fields")

rigid musk
#

That's kinda the idea I had for the custom starting friendship too, npcs like Elliott who claim they were eager to have friends feel like they would start higher on the friendship meter (or npcs that are friendlier) whereas someone like shane... well .. Shane lmao

hoary lake
sturdy dome
#

Hello, I'm new to this server and I have a few questions. I know that the portrait size is supposed to be 64x64 but can I just scale it down without it being too blurry/compressed? If so, how do I do that?

woeful lintel
#

I think you have to check the Portraiture mod, at least that's the answer I often see in here

sturdy dome
#

It hasn't been updated since March 4 2024, is it still fine to use?

woeful lintel
#

Sounds good to me, it's after the release of 1.6. Don't know for sure though, I'm not a portrait person.

sturdy dome
#

Ah cool, thanks anyways

uncut viper
#

1.6 was on march 19th but as far as i know portraiture still works. i believe spacecore also has stuff for larger portraits now? idk

woeful lintel
tiny zealot
sturdy dome
#

Cool beans, thank you

sour sleet
#

How do I make a custom map for my expansion area?

hallow prism
#

VMV has a file with it but i didn't do it (pathos did it to test the 1.6 feature) so i can't really help more than the link and suggesting to look at VMV/Sunberry/another recent CP mod to see how they do it

primal rover
#

I noticed that it might not be clear from your update that the command line tool is a good alternative for Mac users. It doesn’t seem like people actually get AvaloniaILSpy to work judging from this server questions. What do you think?

sour sleet
#

Thanks Lumina c:

spice heron
#

Hi, does anyone know how to get mod-added maps to ignore outdoor lighting (so ambient lighting can be used)?

lucid iron
#

I thought that was too much detail for the wiki instructions kyuuchan_run

primal rover
lucid iron
#

And idk what the mac status is

lucid iron
primal rover
#

Seems there are some workarounds for Mac in this issue thread but I don’t expect many users to find them

lucid iron
#

You might have better luck with the vscode ilspy extension

#

At any rate feel free to edit it more Dokkan

tiny zealot
#

like chu said, ilspy does work on linux but it's stuck on 7 and it's unpleasant in multiple ways (source: i use it when necessary)

spice heron
#

Thanks very much

whole raptor
#

Huh... I'm curious what is showFrame 101 in the wedding script SDVpufferthinkblob

tiny zealot
#

farmer kiss sprite

#

if you omit an actor name it just uses farmer

whole raptor
#

Oh, that's good to know

#

I wonder how I did the farmer kissing scene for my resort event ages ago then... best not to think about it since it works SDVpufferblob

rigid oriole
#

I'm trying to compile Lookup Anything on my own machine and i'm getitng this "collection expressions feature not available" message. From my quick google search, C# 12 is available with .net 8. If sdv mods are supposed to target .net 6, how can I make this work?

#

I don't currently have anything past C# 11 on my machine

lucid iron
#

You need newer language version

#

These aren't coupled

rigid oriole
#

oh i see

uncut viper
#

you can use newer languages while simultaneously targeting an old one

lucid iron
#

<LangVersion>default</LangVersion>

rigid oriole
#

do i need to update C# itself or update .net

lucid iron
#

I put this

#

That should be enough if u got net 8 installed

rigid oriole
#

ok i shall install net 8

lucid iron
#

Or just get 9

#

Cus that is latest

rigid oriole
#

i am behind the times 😔

lucid iron
#

Bc of arch AUR things i have like

#

Latest dotnet installed

#

Then net 6 sdk installed

calm nebula
#

Yeah

#

I have about five different versions of dotnet installed

rigid oriole
#

i suppose i have like 3 different java installations i don't see why i thought I couldn't do that for C# too

whole raptor
#

It's not %spouse for when we want to use spouse name in dialogue/event? SDVpufferthinkblob

unreal spoke
#

Is that a custom wedding ceremony? 👀

hallow prism
#

should be according to wiki, for dialogue

whole raptor
hallow prism
#

events should accept it too, since there's

#

hmm

#

maybe it's too soon

#

spouse may not be set yet

#

normal wedding ceremony is using a string instead of that, or something?

whole raptor
#

Normal uses @... %spouse... #$b# As the mayor of Pelican Town... from strings

hallow prism
#

hmm, then weird

whole raptor
#

Unless it's the i18n messing up... although it shouldn't SDVpufferthinkblob

hallow prism
#

unless you test the event without being married, of course

#

(i remember getting some strange issues when i did that)

whole raptor
#

Ah...

hallow prism
#

i don't remember i18n impacting this kind of token

whole raptor
#

Yep...

#

My bad SDVpuffersquee

hallow prism
#

ok then it may just be that spouse isn't set yet 🙂

#

frankly i can't remember if i tested the event while already married

whole raptor
#

Yep, that was the issue 😅

#

Just like that time I was trying to figure out a proposal didn't work for like an hour... before I realized I didn't have the house upgraded SDVpuffersquee

#

Also ngl, I was very pleasantly surprised Linus had a perfect sprite frame for officiating a wedding SDVpuffersquee

rough lintel
#

ok, i think i'm going to venture into hell to try and update this mod i used a long time ago because jahangmar is just. Gone. there IS a tutorial for "updating" a c# mod to 1.6, yeah?

whole raptor
#

migration page, yeah

#

Wouldn't call it a tutorial tho 😅

#

But smapi is very good at yelling what exactly is broken

rough lintel
#

true. ill try running a test save with this and see what it screams at

rigid musk
#

concerned ape... concerned ape why is this one tile all the way over to the left on the tilesheet... im going to go insane

rigid oriole
#

when I did an update, I just loaded the C# mod into visual studio and looked for the red squigglies

rough lintel
#

oh true

rigid oriole
#

and then I just guesstimated what the 1.6 feature was

#

i could probably do a better job now that i'm more familiar with the code lol

calm nebula
#

Look at the migration guide too

#

Sometimes things have changed a lot

rigid oriole
#

Half the time it was just me needed to capitalize something

uncut viper
#

aside from the migration stuff theres not really a way to make a "tutorial" for updating a mod as it can be very dependent and unique to each mod in question

rough lintel
#

i meant the migration guide, sorry, not tutorial hehe

calm nebula
#

(For example, i search the entire codebase for reference to "ParentSheetIndex" which is likely wrong)

rough lintel
#

alright, gonna see whats going on w InteractionTweaks by jahangmar

rigid oriole
#

(message above urs, chu)

rough lintel
#

this one

#

was my absolute goat in 1.5

#

the eating until full and the buying missing resources from robin... amazing amazing amazing

blissful panther
#

*peeks at Interaction Tweaks*

<TargetFrameworkVersion>v4.7</TargetFrameworkVersion>

SDVpuffereyes

rough lintel
#

is that old

#

i mean it WAS 5 years ago

blissful panther
#

Oh wow, it actually has a single unit test in there!

lucid iron
#

Sdv 1.4 YuniHappy

#

Practically speaking it might be better to just make mod from scratch

blissful panther
#
private class ModAutoGrabberObject : Object
{
    private readonly Object obj;
    public const string internalName = "Auto-Grabber";
    public ModAutoGrabberObject(Object obj) : base(Vector2.Zero, 165, false)
    {

The amount of digging through ooolllld game data for this would be tedious as hell. SDVkrobusgiggle

lucid iron
#

Some of the tweaks got eaten by game

lucid iron
#

Smart Building should totally have this feature trust

#

Gotta account for y2 price up tho

rigid musk
#

is there a way to add flooring/wallpaper to calcifer catalogues? it has such little documentation so i cant find anything on it

calm nebula
#

What's funny is that two full years ago someone in my Nexus comments asked me if I would consider reduxing that mod

#

And I said "sure after I did my own updates"

#

And then my own updates did not happen because I'm a fool

lucid iron
#

You can add more to the items entry and it should work Bolb

rigid musk
#

Hmm.. im not sure how id add my specific wallpaper then, since when you add them they dont really have ids?

rough lintel
#

the rest can vanish

calm nebula
#

Lani I'm retired

lucid iron
#

They do have ids

#

Iirc the type os (W)?

#

You can check junimo catalog perhaps

rough lintel
#

no i know, im just saying what im cutting out of it aloud

blissful panther
#

On the plus side, it looks like it's been made stuipdly easy to just rip out features.

rough lintel
#

updating said features... hahaha.... going to be a bitch and a half

rigid musk
# lucid iron They do have ids

no i meant like.. mine dont have a specific ID? if that makes sense - i cant find the data for how the junimo catalogue works though.

know a lot of the items have a context tag, but adding context tags doesnt work for the wallpapers .. unless im doing the context tags wrong/they are supposed to be done differently for those

lucid iron
#

"ItemId": "(WP)MoreWalls:14",

#

They don't have context tag yep

#

Need literal entry

gaunt orbit
#

how do you exclude them from the regular wallpaper catalogue

#

is that hardcoded?

lucid iron
#

Yeah hm i don't see how u would exclude it from random sale

#

Will have to text operation the peritemcondition

rigid musk
lucid iron
#

@ pathos plz

calm nebula
#

Joy

lucid iron
#

Tbh i wouldn't worry about it lily cus you are going to make this nice and exclusive catalog and then im gonna spawn it in cus i need the ?

#

You should just include the wallpaper in ur thing for Theme and dw about exclude

rigid musk
#

if i include alll the wall papers

#

it will be alll the wallpapers

#

oh i figured it out.. I just need to add 16 entries for each wallpaper and floor is all :')

old edge
#

Where may I find the logic that triggers green rain in the decompiled code?

rigid musk
#

it is done

lucid iron
#

Hmm

#

I think you can use peritemconditon item id prefix actually

#

Tho ik u already did it and it's the same thing kyuuchan_run

#

It would cover both wallpaper and furniture in 1 item tho

rigid oriole
#

pathos is ok with pings to discuss potential PRs, right?

proven vigil
#

iirc pathos doesn't mind pings

blissful panther
#

(I'll double confirm that!)

sweet grove
#

Hello is anybody willing to make a custom mod for me that adds 4 new npc( i will pay )

rigid oriole
#

@ivory plume How would you feel about a Lookup Anything PR that allows for lookups on the rewards in the prize ticket machine? The menu doesn't have actual components for the rewards since they're not clickable; it may be a bit more brittle than other menu lookups if there's an update to the menu due to relying on pixel coordinates.

ocean sailBOT
old edge
#

hmm figured it out using my IDE

#

getting better at using C# with vs now

lucid iron
#

Then u can also have it happen on looking up the tile

rigid oriole
#

list them on tile lookup only or in the menu lookup?

ivory plume
#

(I just finished the multilingual event changes for SDV 1.6.16, so I'll be preparing the next mod update wave soonish.)

rigid oriole
ivory plume
#

Probably (2), but I'd be fine with both.

#

(The target/subject separation means you can just reuse the same lookup subject for both cases.)

rigid oriole
#

Alright, thank you. I honestly doubt I'll have a PR up before your next update wave due to the vast backlog of modding and life stuff I have, but I hope to submit something when I have more time

rough lintel
#

ok i think atra was right this has to be rewritten from scratch mostly

#

im reading some of this and im like. man what the helly

#

half the commands dont exist anymore SDViconskaterboi

#

is there even an AssetNameEquals when using IAssetInfo

#

i know theres IsEquivalentTo in IAssetName but prrbt not what i need

rigid oriole
#

if it's just a content pipeline edit, that's actually probably waht you want

lucid iron
#

Perhaps u can just start with the getting started button press mod

#

And then come back n ask about how to implement the features u cared the most about

rough lintel
#

last time i did c# was in 1.5 though so pepesad

lucid iron
#

Step 2 then what's the feature u want the most out of that tweaks mod

lucid iron
#

1 step at a time

rough lintel
#

carpenter menu to be able to buy missing materials

ivory plume
rough lintel
#

or have a button to buy them

rough lintel
rough lintel
calm nebula
#

I would load the shop tbh

#

Mumble

#

Magic give me two free hours and I'll have a poc

#

So I nerdsnipe you chue

rough lintel
#

yeah load the menu, add the button, do math to calc how much you have missing and add the price on top of the base price

lucid iron
#

Ok so to add the button you would need to check for the menu becoming active, or directly harmony patch carpenter menu

rough lintel
#

mmhm

calm nebula
#

I would nit hardcode a price but load the shop data for the carpentry shop

lucid iron
#

I say do option 1 cus easier to reason about, for this you need the menuchanged event

#

Get this button drawn first and then do what atra says Dokkan

rough lintel
#

checking if the menu is active is how it was done prior so ill do it that way 🤣

#

omg wait i just realized. i can add a monitor log to print when the menu is active to see if im targeting the right thing… amazing

rough lintel
#

ill do that. thank u friends

lucid iron
#

Unfortunately controller support sux

latent mauve
#

There haven't been any recent changes to SMAPI or Content Patcher that prevents using \" to escape a quote mark in dialogue, right? I'm getting reports that my scheduleDialogue include is complaining about finding the \ as an unexpected character, but the code doesn't look wrong to me, and I haven't been able to replicate it: https://smapi.io/json/content-patcher/3c905e426d954d048fa3d0903a116866

rough lintel
#

i do tend to think too big on c# stuff and try to do it all at once, so breaking it down and saying “go away” is good lol

#

thanks chu 🫡

lucid iron
#

If u want u can just be lazy and make it a keybind first lol

#

And do the functionality through that

rough lintel
#

me when i press Y

latent mauve
#

not sure why there are ending / in the target actually, but that's not the line in the actual log, it refers to Satoru_Room_002

#

Would the / inStringsFromMaps/ have any relevance whatsoever?

rigid oriole
#

I wonder if the trailing slash is problematic

latent mauve
#

It's curious that I can't replicate the error even with the same code, but I can at least remove it to test

rigid oriole
#

maybe it's somehow related to OS?

#

(I am making wild guesses)

latent mauve
#

Nope, same OS, both on Steam versions, both on latest mod and Content Patcher versions.

#

Very baffling

uncut viper
#

neither SMAPI nor CP would be able to change how escaping characters works as that is a json thing handled by Newtonsoft, and since their log complains about position 194 which is beyond the length of the line anyway, i would not be surprised if they tried to do some kind of personal edit and messed it up

#

(the discrepency in saying line 13 but talking about the entry is because the actual file included in the mod itself is formatted differently, the smapi.io validator reformats it which affected the line numbers)

latent mauve
#

(yeah, line 13 is the Satoru_Room_002 line in the base code when opened in Visual Studio)

#

which still doesn't have 194 characters, LOL

uncut viper
#

i would tell them to reinstall the mod and id assume it will be magically fixed once they do

latent mauve
#

also, unrelated, but I'm noticing that the aliases for some of the preconditions are missing on the event data page, are they no longer working, or just got erased somehow?

#

Specifically the F and d from World/Context

#

which were is not Festival Day and is not day, I think?

#

Looking at another report of an event not firing, and it used both F and d Mon Tue Wed Sat Sun in the preconditions.

#

Which should have meant not a festival day and only happening on Thursday IIRC

uncut viper
#

those are in the Deprecated dropdown, no?

latent mauve
#

(This is for the Satoru Gojo NPC mod that I updated to 1.6)

#

okay, so they need to be rewritten and weren't migrated if old?

#

I wasn't sure, since the event pre-dated the update and so did the CP format

uncut viper
#

they should still work, just shouldnt be used going forward

#

i think anyway

latent mauve
#

Also I completely missed the expand button on the deprecation list, so thank you for pointing that out ❤️

uncut viper
#

someone else more versed in events may correct me if im wrong, i didnt much pay attention t o them post 1.6.9

latent mauve
#

Yeah, I've not posted anything new to this mod post-1.6.9, so if it's broken, I might as well fix it all now

lusty halo
#

Little C.Patcher coding help, please: I want to edit the outdoor fence inside the farm but it affects the rest of the world map, too. can it be restricted to the Farm only? And if so, do I need to put separate code for each farm type?

lucid iron
#

So there's 2 options, OnLocationChange when locationname farm, or just make your own tilesheet

#

If it's a custom farm I'd definitely do new tilesheet

lusty halo
#

it's just for the vanilla farms, just want to do a simple "overlay" recolor, won't even touch shadows, so hopefully the first option works fine, I don't mind having multiple paragraphs as long as it works. Thanks much!

hallow prism
#

for personal use you can do a location change, the main reason "not" to is that for some people it makes game laggy

#

(when they have a lot of them)

#

so for publishing this is a thing to keep in mind (especially since the farm is a location you enter/exit a lot).

lusty halo
#

Unfortunately if I remove location chance then it colors the world map fences too, (or it simply doesn't work at all) if it's there then the change happens only inside the farm map. what a weird thing. I'll look for a workaround, otherwise I'll just put it aside, don't want to make people game's laggy.

brittle pasture
#

that sounds intended to me what's weird about it

#

remember, they're using the same sheets

#

the workaround as mentioned earlier is to roll your own sheets for the farm

lucid iron
#

I think location change not that bad in this case but i am always for ✨ scope creep ✨ and u should totally do custom farm \j

ornate trellis
#

random question but when i jsut wanna change to a normal different map in an envent do i still sue the changeToTemporaryMap thing? cuz i cant find anything else on the wiki page but i might be blind

lucid iron
#

You can use changeLocation iirc

#

If it's an ordinary location that exists

ornate trellis
#

no wonder i didnt find anything i kept looking for map

#

hm

hallow prism
#

i also mention it because it can be a factor on stuff, but it's not THAT big a deal especially if you make it a config option

lusty halo
#

Yes, of course it's a config, you can turn it off. I guess I can warn people it may lag their game. (for Selph) and I didn't mean "weird" as in "what a terrible code" but as in "as a non-coder I find it funny how coding work". English is hard. Need to use more emotes.SDVpufferchickcry

rotund elm
#

Heyo, does anyone know why my dialogue command is not triggering properly? #$action AddMail Host {{ModId}}_CabinRepair Received?

#

I keep running into dead ends

rough lintel
#

that is not a dialogue command i dont think

#

there are event ones and dialogue ones

#

and i dont rembr which goes where. check the Modding:Dialogue and specifically search for addmail

#

or mail

calm nebula
#

No that should work but thr parser is fragile

#

Can I see the full

rotund elm
#

The full quest?

rough lintel
#

no the full line

calm nebula
#

Yup

rough lintel
#

of dialogue

#

oh.

#

ignore me i am silly i guess

rotund elm
#

"{{ModId}}_WillyQ7": "ItemDelivery/{{i18n:WillyQ7_title}}/{{i18n:WillyQ7_details}}/{{i18n:WillyQ7_hint}}/Willy 709 150/-1/100/Gold/true/{{i18n:WillyQ7_reaction}} #$action AddMail Host {{ModId}}_CabinRepair Received"

#

the quest works as normal but the flag isn't given and removing the i18n token the flag still isnt given

rough lintel
#

yeah that does not look correct at first glance

rotund elm
#

See idk what doesn't look correct X| I am starring at the wiki and back at my json and cannot figure it out

rough lintel
#

just the flag piece. the $action bit

#

and the … # before it

#

its just that part that looks weird to me

#

but im not at home so i cant check for sure

rotund elm
#

If I remove the # before the $ it shows the action in the dialogue

rough lintel
#

i thought in dialogue you did the %addMailFlag or something?

#

and not $action

#

bc thats for events

rotund elm
#

Wiki shows $action for dialogue commands

#

So I am lost SDVpuffersquee

calm nebula
#

Put the $action first and tbe dialogue second

#

It's fragile iirc

rotund elm
#

OHHhHhHh if thats it I will cry lol XD I have been looking at this for 2 days

rough lintel
#

you didnt specify when the mail would be received

#

like you didnt put a Now

#

or a whatever at the end

#

but thats optional. i just like adding it anyways

#

also is the player Current or Host? i never know

rotund elm
#

Host, has to be for this quest as it triggers a map patch

rough lintel
#

i shee

rotund elm
rough lintel
#

good luck

rotund elm
#

Yea still isn't working X|

calm nebula
#

Can you swap out the action to something that has an immediate effect

#

Ie, addmoney

rotund elm
#

yea let me try

#

Yes that worked

calm nebula
#

Okay, interesting

#

So AddMoney works, saying the action works, but AddMail didnt

rotund elm
#

Yep!

calm nebula
#

Are you testing on the host

rotund elm
#

yea

calm nebula
#

Do you expect the map to change immediately or after sleeping a day

rotund elm
#

should be day after problem is if I check the gamequery to see if I have the flag that is given via the quest completion I don't have it so the completion mail and map patch never happen

rough lintel
#

add Now at the end and the mailflag will get added that instant

calm nebula
#

Hmm okay

#

Now is mailbox, Lani

rough lintel
#

😔

calm nebula
#

Received is correct here

rough lintel
#

oh recei- yes

#

ok

calm nebula
#

I mean you could try Now and have a real mail for it to see if it is at least working there

#

Anyways

#

I need to drive home

rotund elm
#

Ill try it but I believe in the beginning I was testing with Now, let me try that and then maybe switching the player

calm nebula
#

I'm so exhausted today haha

rotund elm
#

Thanks for the help

calm nebula
#

Hmm, Host should work

rotund elm
#

I figured

calm nebula
#

How are you checking the gsq?

rotund elm
#

debug gamequery

calm nebula
#

Like, what gsq are you using precisely

#

Because there is some funky with managed names

rotund elm
#

PLAYER_HAS_MAIL Host {{ModId}}_CabinRepair Received

calm nebula
#

Ah, in the console?

#

That won't work

rotund elm
#

Ooop

calm nebula
#

Because the console doesn't know what ModId is

#

You have to spell the whole word out

#

The actual modid

rotund elm
#

I knew thattttt I swear X|

#

One sec

#

ok so the mail shows up as being received but then no mail opens

calm nebula
#

Okay, is this a "real" mail thr player is supposed to read

#

Or just a flag

#

Hi Wren

rotund elm
#

Yes it is a letter

calm nebula
#

Okay, so Now would be correct

#

Did you add the mail to Data/mail

rotund elm
#

Yes letter is there and a trigger for it should be the last quests mail flag being received

#

which wshould add that mail to the mailbox tomorrow

calm nebula
#

No mail opens is possibly also a mail parsing issue

#

Anything on the log?

rotund elm
#

let me double but I don't think so

rough lintel
rotund elm
#

Nothing in the log at all

calm nebula
#

Can we see the mail

#

And the trigger action thar sends it

rotund elm
#

It was Willy's name.......

#

I looked at this for 2 days and didn't notice 😭

calm nebula
#

Use a spellchecker

#

It might save you hours

rotund elm
#

I actually made a small python tool that validates all tokens/keys and makes sure there is not orphaned or missing

#

thats how I realized

#

I usually only use it for checking before I post an update to double check I did all the i18n keys

#

I coulda saved myself so much time LOL

#

Thanks for helping as well oml

wide lake
#

so... there is no way to add an optional parameter to an API method that already has optional parameters and maintain backwards compatibility, right? Because Pintail doesn't handle optional parameters specially so it needs the argument number to match (I think?), but adding another signature with the new optional parameter will make the c# compiler complain that all of the existing call sites are ambiguous.

brittle pasture
#

nope I don't think

#

optional parameters are syntactic sugar, the underlying method will have that argument and the compiler will just pass in the default value automatically if not provided

wide lake
#

yes, but... it can't be just syntactic sugar because default values show up in decompiles, so they must be stored somewhere in the binary. Doesn't really matter, though, if Pintail doesn't take special steps specifically to try to proxy to methods with different argument count.

calm nebula
#
void A() => A("foo");

void A(string foo) => //etc;
#

I suspect it's possible

glossy cargo
#

I can't figure out where, in the code, does the stats stepsTaken get incremented. Anyone knows?

uncut viper
#

Stats.takeStep()

glossy cargo
#

oh my god it was right there

#

I was doing Find Usages on it and then text search in all the files that seemed reasonable

#

thank you a lot lol

wide lake
# calm nebula Yeah, overloads is your best bet

if you already have an existing signature with multiple optional parameters..... I think it's impossible to convert into something that will proxy in the general case and still maintain backwards compatibility. If it were just a matter of expanding a signature with n optional arguments into n additional signatures (with no optional arguments) that would be tedious but possible. The problem is that you can''t get rid of the original signature or make its parameters non-optional because call sites can aribitrarily skip any optional parameter (implicitly using its default) by using the named argument syntax in the call. Turning the expansion into the power set of the optional arguments is possible, but highly likely to produce something that has multiple signatures that differ only in an argument name, which, of course, won't work.

lucid mulch
#

(if smapi didn't have an allow-list on what assembly references to fix, it could maintain backwards compatibility)

#

if stardew adds an optional parameter it wont break smapi mods (unless used in the middle of a transpiler or other generated IL) as smapi will just rewrite your mod to populate hte optional parameter with the null/default value

calm nebula
#

Wouldn't work for pintail though

#

Pintail would have to intentionally allow that

#

Which

#

Honestly

#

I think the data exists for the IL

wide lake
#

Yes, I'm more concerned with mod-provided APIs. I don't think anyone is too surprised if a game update requires rebuilding mods.

sour sleet
#

Can anyone help me? I've drawn a custom map for my location and it's all working accordingly. Only thing is: it's not working great with the NPCMapLocations mod. For example, one of my NPC's is in the trees to the left of the map, not quite at their home :c

lucid mulch
#

did you populate the WorldPositions section of the map area to set the correct scaling?

sour sleet
#

Oh, no I didn't

calm nebula
lucid mulch
#

afaik NPCMapLocations is using the vanilla map logic now, so if a player was there it would do the same, and vanilla renders the player icons

sour sleet
#

I will look into doing that now, thanks!

calm nebula
#

Just for shits and giggles, can you try inserting the argument just before the optional ones

wide lake
#

as a non-optional argument in the same signature?

calm nebula
#

Yup

#

And then a single overload of the previous variant

wide lake
#

that seems to work

calm nebula
#

Hmmm

#

Tbh I don't like this answer (it feels un c# somehow)

wide lake
#

(of course, nothing is using the new argument)

calm nebula
#

But I'm glad it works?

#

(I would rather optional parameter worked. I suspect it is possible and the data exists in the IL. I do not have the time to play with it myself)

#

Yeah, this isn't proper overload resolution

wide lake
#

I think I'd need to write the "other side" both with and without the new parameter before I'll be able to convince myself that it really works. And I think it wouldn't work at all if the new parameter's type was the same as the first optional parameter.

#

(which it's not, for the specific thing I'm looking at right now... but...)

calm nebula
#

Ah. You're right

#

Hmm.

#

It can't use parameter names iirc

#

Or was it local names

#

I don't recall

#

Been too long

#

Yeah I'm wrong, sorry!!!

wide lake
#

This is already more effort than I wanted to spend to avoid telling someone trying to be helpful that their PR would break things and I'm not going to require downstream users to copy in a new API and rebuild their mods just to add this small feature. Seems stupid to have to add a method with a new name, but that's probably easiest for everyone.

#

At least it's an interesting problem!

frosty hull
#

@polar escarp Hello brother, i have question for mod Fashion Sense
how can i fix this bug?, where i can disable this by code

#

in this is pc version,

vernal crest
rigid musk
#

Kitchen tiles*

vernal crest
rose forge
#

i swear to god ginger island is gonna be the death of me

i'm trying to update my mod to make it functional on ginger island but for some reason nothing I do can replace these bushes here

i assume it's some part my fault on the code, I just don't know what I've done wrong


    "Action": "EditImage",
    "PatchMode": "Replace",
    "Target": "Maps/{{season}}_outdoorsTilesheet",
    "FromFile": "assets/{{recolor}}/{{SeasonStage}}/StaticTreesBush/{{season}}_island_tilesheet_1.png",
    "FromArea": {"X":208, "Y":0, "Width":49, "Height":49},
    "ToArea": {"X":208, "Y":0, "Width":49, "Height":49},
    "When": {
        "StaticFoliage": "True",
         
    }  
        },
        {

    "Action": "EditImage",
    "PatchMode": "Replace",
    "Target": "Maps/{{season}}_outdoorsTilesheet",
    "FromFile": "assets/{{recolor}}/{{SeasonStage}}/StaticTreesBush/{{season}}outdoors_tilesheet_1.png",
    "FromArea": {"X":208, "Y":48, "Width":49, "Height":49},
    "ToArea": {"X":208, "Y":48, "Width":49, "Height":49},
    "When": {
        "StaticFoliage": "True",
         
    }  
        }, ```

it's under "plants and bushes" this one in particular unless something else in the code is screwing it up. I'm not getting any errors in smapi regarding it either. bushes are applied everywhere else in the game just not ginger island

the bush on the bottom right should look like the one on the top left, but it doesnt and i dont know why @~@
brave fable
#

i figure he made all the kitchens in a day, then a week later he made his morning coffee and had an absolute eureka moment

#

put the COFFEE. on the KITCHEN TILES

calm nebula
vernal crest
#

No, that big bush at least is from summer_outdoorsTileSheet

vernal crest
brittle pasture
frosty hull
#

ah, thanks, i will check it

rose forge
golden oar
#

I'm having an issue with Content Patcher, specifically adding an emote. The custom emote gets added to the tilesheet correctly, but in game, the animation plays, then switches to red static instead of looping. I have triple checked that the size and position of the sprite is correct. What else could be causing the issue?

vernal crest
#

I didn't know you could make custom emotes SDVpufferthinkblob

golden oar
sour sleet
#

I have 2 questions! 1: How can you make it so that custom companions don't show on the map using NPCMapLocations? 2: I have assigned all of the WorldPositions but when walking around Lilybrook, I am located on the map as being in the trees on the left. How do I omit the tree space on either side of the map from people walking there?

calm nebula
#

Huh wait parameter names ARE in the metadata

#

Gah

#

Been toooooo long

rose forge
vernal crest
rose forge
#

thank you i appreciate it

vernal crest
#

Beautiful bush: ✅

rose forge
#

10/10

calm nebula
#

Perfect. 10/10. No notes

vernal crest
#

Graphic design is my passion

#

This is the code for that

{
            "LogName": "Recolour the bush",
            "Action": "EditImage",
            "Target": "Maps/summer_outdoorsTileSheet",
            "FromFile": "assets/aba_bush.png",
            "ToArea": {
                "X": 208,
                "Y": 0,
                "Width": 48,
                "Height": 48
            }
        }
calm nebula
#

What if we had actions to recolor (parts of) textures

vernal crest
#

Isn't that what ToArea is for?

calm nebula
#

I meant more programmatically

#

Like multiply with,

vernal crest
# rose forge does not work TToTT

What if you try removing all of your tokens and just hardcoding all the paths? Just for testing. Also, try commenting out the second patch. Just to really simplify it.

#

Oh right so you can get my beautiful bushes just by putting numbers into the json?

rose forge
#

i dont know what any of those words mean ahaha i'm not great at coding just drawing....

vernal crest
#

Well, slightly related ideas

tiny zealot
#

imagine punching some desaturation values into a content.json and getting Nightshade At Home

vernal crest
tiny zealot
#

ReShade At Home At Home, even

calm nebula
#

I go back to the IL mines

jolly violet
rose forge
#

I will dm it

vernal crest
jolly violet
vernal crest
jolly violet
#

stop followiung me aroun

#

creep

torn charm
#

im new to the games

feral hill
torn charm
#

SQUIDDIUM

vernal crest
uncut viper
#

this is not the channel y'all

sour sleet
#

This isn’t the right channel for this

feral hill
#

my fualt

sour sleet
#

Is there a way to exclude an area of a world map and mark it as not walkable?

#

There are trees on the edges and I want them to not be “part” of the map

#

I’m probably not making sense 🫠

#

My character is appearing on the X, and I am actually standing on the O

ivory plume
sour sleet
#

Thank you! What does ExtendedTileData do?

ivory plume
#

There's a description of each field further down the page, but essentially it lets you snap the player's position to an inner border when they go past it.

#

In this case you probably just want to set the TileArea and MapPixelArea to the walkable area.

sour sleet
#

Thanks, will mess around with that now c:

boreal pulsar
#

hey eveyrone im here with my daily dumb newby question

public Trial? GetRandomTrial()
{
    if (_trialsByCondition == null || _trialsByCondition.Count == 0)
        this.Monitor.Log("No trials loaded", LogLevel.Error);
        return null;
...}

I really dont understand the whole this.Monitor thing
why does it work in ModEntry, but it doesnt in other scripts?
TrialManager' does not contain a definition for 'Monitor' and no accessible extension method 'Monitor' accepting a first argument of type 'TrialManager' could be found (are you missing a using directive or an assembly reference?)
By reading the error I tought I had to define what Monitor is, but in ModEntry (wich is the example on the wiki) I dont have any definition of it so I dont understand

ivory plume
#

this.Monitor is just a reference to a property named Monitor on the current class. You don't need to define it in ModEntry because it extends the Mod class (the class ModEntry : Mod bit), and the Mod class defines it.

boreal pulsar
ivory plume
#

I assume you mean from another class. You'll need to define the property on that class and pass it in. For example:

public class TrialProvider
{
    private readonly IMonitor Monitor;

    public TrialProvider(IMonitor monitor)
    {
        this.Monitor = monitor;
    }

    public Trial? GetRandomTrial()
    {
        if (_trialsByCondition == null || _trialsByCondition.Count == 0)
            this.Monitor.Log("No trials loaded", LogLevel.Error);
        return null;
    }
}

And then in your ModEntry class, you'd do something like this:

private TrialProvider TrialProvider = null!; // set in Entry

public override void Entry(IModHelper helper)
{
    this.TrialProvider = new TrialProvider(this.Monitor);

    ...

    // call methods on this.TrialProvider
}
sour sleet
#

Sorry to be a pain, but my player still isn't appearing in the correct place on the map. Here is the entry I've done: { "Id": "8BitAlien.Lilybrook_TopLeft", "LocationName": "8BitAlien.Lilybrook_Lilybrook", "TileArea": { "X": 6, "Y": 13, "Width": 33, "Height": 12 }, "MapPixelArea": { "X": 27, "Y": 23, "Width": 51, "Height": 39 } },

boreal pulsar
ivory plume
# sour sleet Sorry to be a pain, but my player still isn't appearing in the correct place on ...

Based on the _TopLeft in the ID, are you defining multiple areas for the location? That's not recommended if so, unless you have a significant mismatch between the shape on the world map vs in-game. You should have a single TileArea which covers the entire walkable location, and a MapPixelArea which matches the equivalent area on the world map. The game will automatically map positions between the two areas based on the ratio (e.g. if you're in the middle of the TileArea, you're in the middle of the MapPixelArea).

sour sleet
#

I haven't yet defined multiple areas, but that was my plan. I will do the entire TileArea entry now and see if that works!

ivory plume
lucid mulch
#

-# (some even do cursed behaviour like splitting the one class into multiple files with partial classes, please don't use partial classes for human authored code)

calm nebula
#

-# got it, using the file scope for everything

lucid mulch
#

most of my mods never actually grow out of a single file, though mosst of these would have a second static class in the file for harmony patches

rancid musk
#

-# got it, put every individual method in its own file using a partial class

tiny zealot
#

if i'm making a void room for an NPC to be in when not in a useful location, do i need to create an empty map for it? or is there a way to not load a map or load a null one or something?

lucid mulch
tiny zealot
#

(are we inventing JDSL from first principles in here? /lh)

rancid musk
boreal pulsar
rancid musk
#

In Cloudy Skies, all my various trigger actions I register are in a Triggers class, but split into separate files, one per command.

boreal pulsar
#

and theres more to come as I only started working on trials

sour sleet
#

I must be doing something wrong, it's still not working 😦

rancid musk
#

Personally, I find this better to work with.

lucid mulch
ivory plume
boreal pulsar
sour sleet
#

Does my entry look okay for WorldPositions? { "Id": "Lilybrook", "LocationName": "8BitAlien.Lilybrook_Lilybrook", "TileArea": { "X": 6, "Y": 7, "Width": 107, "Height": 93 }, "MapPixelArea": { "X": 28, "Y": 13, "Width": 88, "Height": 105 } },

ivory plume
#

The format seems fine. What does it actually do in-game? Do you see the player marker moving around correctly on the world map, or does it stay in a specific spot? If you run debug worldMapPosition while on the farm, what does it show?

sour sleet
#

That's good to know. The player is moving a fair bit ahead in game and dragging behind on the map.

#

From left to right

#

It says this: The player is currently at 8BitAlien.Lilybrook_Lilybrook (15, 17).
This matches region '8BitAlien.Lilybrook', area 'Lilybrook', and map position '8BitAlien.Lilybrook_Lilybrook'.
The position's pixel area is {X:0 Y:0 Width:532 Height:472}, with the player at position {X:66.5 Y:80.24} (position ratio: {X:0.125 Y:0.17}).
Scroll text: Lilybrook.

ivory plume
#

So most of it seems to be working fine. The problematic bit is probably "position's pixel area is {X:0 Y:0 Width:532 Height:472}", which sounds like the whole map. Did you set the PixelArea field on the MapAreas entry?

sour sleet
#

It's currently in WorldPositions

ivory plume
#

Try setting PixelArea on the MapAreas entry, and removing MapPixelArea from the position (it defaults to the area's value).

sour sleet
#

So should I remove the entry entirely from WorldPositions and add it to map areas instead?

ivory plume
#

Do you mean remove the MapPixelArea field? If so, yep.

sour sleet
#

And now this is under MapAreas. Does it look correct? { "Id": "Lilybrook", "PixelArea": { "X": 28, "Y": 13, "Width": 88, "Height": 105 } },

ivory plume
#

You'd still need the WorldPositions field for that map area, but the PixelArea seems correct.

sour sleet
#

This is under WorldPositionsnow { "Id": "Lilybrook", "LocationName": "8BitAlien.Lilybrook_Lilybrook", "TileArea": { "X": 6, "Y": 7, "Width": 107, "Height": 93 }, },