#making-mods-general

1 messages · Page 466 of 1

native trench
#

First of all, I'm translating and reading everything.

#

Then can I delete JsonAssets mode?

tight rivet
#

I wouldn't if you still have JA mods that aren't replaced

native trench
#

I didn't even know how to use that mode, so I just installed it.

#

To be honest, I did all this because I wanted to use one weapon in SVE mode in a vanilla game as well.

#

Am I a fool, or am I not good at English because I read the modding page and don't understand it?

tight rivet
#

what problems are you having?

native trench
#

I must have thought of mod creation too simple. It's a challenge from file creation.

#

I just want to add a super strong weapon.

#

thats all.

lucid iron
#

Take a look at first the content patcher docs, then look through sve's files for the Data/Weapons edit

#

The files are plain text json

latent mauve
shut edge
#

If all you want is a super weapon, you could probably just use CP to edit a vanilla sword to have a big damage number maybe

#

Also probably existing mods that do that or similar

#

Or CBJ cheats has a one hit kill option I think

blissful panther
#

Fortunately, that should be simple enough to do, assuming they would be happy with tabbing through the pages using the shoulder buttons too?

Were there any other issues brought up regarding blind accessibility? Does the text work with whatever screen reader they're using, for instance, do you know?

uncut viper
#

ive tested it before. it works fine

#

needed to make sure it worked like that for CMF and it does

tight gulch
#

hello hello CE_GnarpWaveWave
i'm trying to edit a farmhouse interior mod map using Tiled, but I have never used the program before and i'd like some suggestions on something if anyone knows about that sort of thing. no worries if not!

tight gulch
#

ah, no... i wanted to know how i would "trim" the accessible area of a map and didnt know where to look for that

#

i guess i should read the whole thing and maybe it'd enlighten me eventually on what i need to do

#

thank you, i was using the um, Tiled website for help, i didnt know there was one for stardew too!

lucid iron
#

Usually if you don't have to make a vanilla map smaller, then don't

#

Put up more Building tiles to make player accessible room smaller instead

#

If you really do gotta make it smaller then you must Load over the vanilla asset

tight gulch
#

it's a farmhouse interior mod that hasn't been made right, and npcs walk around outside in the void lol. im trying to remove their ability to do that

lucid iron
#

Do you have polyamory mods

tight gulch
#

when comparing the tmxes of a well made mod and this one, i can see that usually, there is a distinct void around the interior map, but this one is just...a big square

#

no, no poly mods

#

someone else had the issue by the looks of it on the mod page, so ig i just want to mess around and fix it myself

lucid iron
#

Hrm check KitchenStandingLocation maybe

#

If they didn't set that correctly then spouse may be elsewhere

tight gulch
#

oh the spouse is fine, just sometimes he walks into the void to place furnirue

uncut viper
#

im not sure what you mean by distinct void since any void built into the map is still just tiles placed

lucid iron
#

The other thing you can do is to try n fill the out of bounds tiles with Buildings tiles to make them impassable

latent mauve
#

Voidwalking doesn't always mean that the map borders are broken, either

tight gulch
#

but the baby sits out in the void every time

lucid iron
#

The baby may be a result of crib position hardcoding

tight gulch
#

ah, its hard to explain, but the map seems to have a "sky" behind it that i think they think is a floor

lucid iron
#

If they didn't do anything about that and moved crib

tight gulch
#

mm boundaries then is what i mean maybe

tight gulch
#

mhm

lucid iron
#

Buildings = not passable

tight gulch
#

okok, so i should look into sealing the gaps with buildings?

lucid iron
#

Sdv maps doesn't have concept of lines only tiles

#

And tiles r either passable or not passable

tight gulch
#

mhm i see

uncut viper
#

which also means it doesn't matter what's painted "behind" a map as long as the Buildings boundaries seal you in

tight gulch
#

im sorry, i dont know anything about map editing since i mostly do spritework and small aesthetic mods haha, so i appreciate the help

#

okay, then it sounds like i need to seal the house

lucid iron
#

babies do have a "find a random open tile to stand in" logic that doesn't really check for access

calm nebula
#

Always

obtuse wigeon
#

Seconded on the Data Layers mod, it's fantastic for map making especially (along side general mod making like Atra said)

tight gulch
#

ah, fantastic thank you!

uncut viper
#

babiwa

tight gulch
#

ill grab that one

#

oh yeah this looks so useful

#

ill be able to see whats up

#

thanks so much everyone, youre amazing aSDVemoteheart

#

it takes a village to help my dumb ass

uncut viper
#

there's this too

obtuse wigeon
#

Ooo thats fantastic! I shall add that to the repatouire too

tight gulch
#

interesting...yeah ill get that too

#

these are exactly the kind of tools i was hoping existed omg 😭

surreal herald
#

Hey! How would I go about adding only one dialogue chain to a new NPC? What I mean is, I want to have a character specific dialogue like Gil's but for there to be choices and after responding, the dialogue with choices doesn't appear, only a repeating response from the resolution of the dialogue chain appears

#

I don't know if I explained it right or not 😭

lucid iron
#

Do you want a dialogue tree

blissful panther
#

@mystic skiff Hi! Would you mind if I sent you a DM regarding the problem with MEEP/AHM? It should be a fairly simple fix, at least.

gentle rose
#

I have encountered a mystery I can't seem to find an explanation for and I can best explain as a series of replication steps

  1. copy Maps/FarmHouse.tmx into a new file with a different name (just to prove it isn't checking asset names or paths)
  2. load it as a new location's CreateOnLoad
  3. check the map properties in c#
  4. where did ViewportFollowsPlayer come from???
#

it doesn't happen if I make a map via c# and use that instead (though there are other ???s that happen with that)

#

it also doesn't happen if I load a map I made from scratch...

royal stump
#

best guess is that if you're loading it as the Farmhouse type, it overrides its own map path with an upgraded one?

public virtual int upgradeLevel
{
    get
    {
        return this.owner?.HouseUpgradeLevel ?? 0;
    }
/*...*/
public override void updateMap()
{
    bool showSpouse = this.HasNpcSpouseOrRoommate();
    base.mapPath.Value = "Maps\\FarmHouse" + ((this.upgradeLevel == 0) ? "" : ((this.upgradeLevel == 3) ? "2" : (this.upgradeLevel.ToString() ?? ""))) + (showSpouse ? "_marriage" : "");
    base.updateMap();
}```
#

since 2 and 2_marriage have that property

devout rock
#

I have a growing desire to make a custom farm map where I just expand one of the base maps to have more playable area. Any experienced mod people have any insights? Is it better to just start from 0?

brittle pasture
#

it's always a good idea to use a vanilla map as base

#

for technical reasons not just artistic (you don't have to reset a bunch of flags/attributes the game expects the map to have)

autumn tide
#

anyone know where the fire sprite for linus's campfire is? it can't be cursors this time again-

urban patrol
#

it is indeed cursors

autumn tide
#

oh god

urban patrol
#

i have a centered version if you want

latent mauve
#

I found it already xD

autumn tide
#

uh, is there anything i should do to enable it being in maps?

autumn tide
urban patrol
#

you have to either use C#/framework or do your own tilesheet animation which is what i did

latent mauve
autumn tide
#

gotcha

urban patrol
#

the actual fire is multiple offset layers of the sprite i think but i found that just 1 was fine for my purposes

latent mauve
#

yeah, it's multiples of them offset

autumn tide
gentle rose
#

I managed to load a completely C# location (which involved way more code digging than it needed to or should have)

brave fable
#

completely c# huh

#

that's a whole lot of new Tile()...

gentle rose
#

actually never mind I did use new StaticTile. still in a for loop though

brave fable
#

but why

gentle rose
gentle rose
#

for some reason a part of my brain insisted that generating an entire map dynamically is somehow better than loading a dummy map, and then when it wasn't working I got annoyed

#

learned a lot though tbf

next plaza
#

I've done that before too

#

for

exotic token
#

Hello, I am trying to edit Sam's spouse room, but I do not know where the tilesheet is for it. I am pretty new at this.

devout otter
#

The map itself is in Maps\spouseRooms.tmx, and the tilesheet it uses is Maps\townInterior.png.

exotic token
#

ohhh. Town interior.

urban patrol
#

is there already-existing and CP-accessible stuff in place for pulling a random entry from Data/Objects with the correct article (a/an?) like how quests have?

brave fable
#

the base game generally doesn't use a-or-an for object names

#

which is to say no, i don't know of any

urban patrol
#

hmm okay

#

i guess i don't technically need the article, i could mimic vanilla in that regard

brave fable
#

again you usally get things like Looking for Hot Pepper to rub on my knee or Need Joja Cola for a burrito

urban patrol
#

i'm trying to write a silly horoscope thing like "You {{need/want/already have}} {{Noun}}. Look {{Place}}."

brave fable
#

while the game does have a Utility.AOrAn method, it's barely used at all

urban patrol
#

mmm jojarrito

uncut viper
#

[ArticleFor] tokenizable string

#

e.g. [ArticleFor apple] apple = an apple

#

it uses Lexicon.getProperArticleForWord() with the stipulation that it only works in English

urban patrol
#

ooh cool!

#

i looked in Data/Quests but those seem to be the unique ones only. where are the help wanted ones?

brave fable
#

where's this method used?

uncut viper
#

help wanted ones aren't stored

uncut viper
#

possibly other places too i didn't check

brave fable
#

yeah i'm asking about the lexicon method

#

i could imagine it used in fishpond quests, but i can't think of any others

uncut viper
#

wait I did check I just forgot and am not at my desk anymore but I remember it being used in a couple menus I think

#

maybe the character customization menu somewhere?

#

i also can't remember if it's the lexicon method or the token parser that returns a blank when not in English but it's one of em

#

unlike the utility method which has no such care for language differences UNLESS you are Hungarian (I think that's what hu is)

gentle rose
# next plaza I've done that before too

but did YOU end up doing reflection crimes just to avoid either calculating xtile's tile size from the game1 values or adding the tmxtile nuget package? /lh

uncut viper
#

here you go this is all the places its used

brave fable
#

hu is hungarian yes, not to be confused with hr for croatian

uncut viper
#

i would never

next plaza
#

(Unless I’m totally misremembering)

gentle rose
#

(no I'm pretty sure you're right, it's 6ish years old)

next plaza
#

There's a chance I poked around it even longer ago, but I don't think I had gone full map proc gen quite yet

gentle rose
#

I mean idk if "fill 10x10 square with the same tile" is proc gen so I haven't really done that yet either SDVpuffersquee

brave fable
#

well procedural implies you're creating a constantly-expanding world

#

you're just doing the floor of the house SDVdemetriums

gentle rose
#

in a definitively not expanding way, too

#

(though, that's not the definition of procgen I know SDVpufferthinkblob I just know it as generating according to set procedures, even if it's for finite sized levels, just a potentially infinite variety of them)

exotic token
#

this is so weird, the tiling on some of the spouse rooms is off

#

in vanilla

gentle rose
#

oh right that's the other silly thing I did today, I made the debug build version of my mod increment every time I compiled it

gentle rose
exotic token
#

i mean the tiling is imperfect

#

can I show the png of the spouseroom file?

gentle rose
#

I don't think you're a high enough level to send images in this channel yet, but you can send it in #images-and-memes probably?

#

but also idk what you mean by "the" png since spouseRooms is a tmx

exotic token
#

this pattern is sebastian's floor

uncut viper
#

looks perfectly fine to me

gentle rose
#

you're missing some layers

exotic token
#

correct

#

to show the floor

uncut viper
gentle rose
#

I'm not sure what the issue is tbh? it isn't perfect because it's hidden by stuff anyway

exotic token
#

im finding it all over

gentle rose
#

the reason part of the wall has to be on the back layer is that there's furniture in front of it on Buildings in this case

exotic token
#

I am talking about the flooring

#

the brown tiles

gentle rose
#

then I have no idea what you mean tbh

brave fable
#

if you mean the long-short-long floorboards that's pretty normal

urban patrol
#

they’re not meant to be perfect, they’re purposely staggered to mimic how real life hardwood floors look

latent mauve
#

Tiling below the rug won't be an exact match to the patterning because of the space the rug takes up

uncut viper
#

itd look strange if all the wooden floorboards were perfect

latent mauve
#

It's also usually obscured by the table or terrarium

gentle rose
brave fable
#

lord knows i've spent long enough staring at the floorboards

exotic token
#

I see, so its not supposed to be a perfect staggered tiling

gentle rose
#

nope

brave fable
#

like much of the game's art it's meant to be just that little bit scrunkly and a tiny bit shit to make it look the way it does

#

i say that with love and affection and understanding

exotic token
#

well, that makes things more difficult for me. I am changing the flooring on sam's room to the type on sebastians.

uncut viper
#

i mean i personally would think it looked more a tiny bit shit if it was too perfect and patterned

urban patrol
#

if you tile all the plain grass tiles for example it looks really off without something to break it up

brave fable
#

i more mean that in the sense that things have to look old, a little imperfect, bent and busted stylistically

#

not in the sense that they look worse artistically

uncut viper
#

that was what i meant too, i meant in my mind, a wooden flooring like that isnt bent and busted, thats the default state

brave fable
#

although ape's newer art is really very slick with the later updates so we're probably moving on from that a bit

gentle rose
#

penny's floor is pretty cool in that it looks uneven but actually repeats horizontally

brave fable
#

a harsh reality when i'm happily making my sprites knowing that they can look bad because things generally look a bit crusty in the vanilla style

#

and then 1.5 and 1.6 come out with all these new stylish environments and detailed sprites

#

oh no. oh no no no. ohhhhh no

gentle rose
#

simple, just pretend we're still in the days of 1.4

brave fable
#

i only make mods for the psp version now 🤝

gentle rose
#

I still can't fully remember some of the 1.5 features and I started playing well after it released, I was just on ios pre mobile catching up to pc SDVpuffersquee

calm nebula
#

1.6 new maps are very pretty

#

I enjoy how Jodi and Kent get a double bed now

#

Hi bluebs!!!!!!!!

hard fern
# exotic token I see, so its not supposed to be a perfect staggered tiling

SDVpufferlurk
staggered patterns are also good for stability. when you have slats under the floor, and you alternate the floorboards, it makes it so that you have a nice even surface to stand on. if you had them perfect and aligned, then there will be several "weak spots" in the floor where all the edges meet, where if you stand on it, you could fall through the floor. Perfectly aligned is more for floors with a 100% solid foundation underneath, so there's no chance of falling through the floor at all.

exotic token
#

I hope it looks good, time to test!

drowsy pewter
quick sand
#

😡 is there some secret to modding a lightsource?

#

the code has no errors yet nothing shows in game

urban patrol
#

are you making a map?

quick sand
#

no just wanted a light that follows the player like the glowring

exotic token
#

Hmm, didn't work

#

Maybe a mod conflict

urban patrol
#

!patchsummary

ocean sailBOT
#

Can you do these steps to provide more info?

  1. Load your save and view the content that should be patched.
  2. Type patch summary directly into the SMAPI window and press enter.
  3. Upload your SMAPI log to https://smapi.io/log (see instructions on that page).
  4. Post the log link here.
urban patrol
#

you can use that command to see if your edits are applying

exotic token
#

hmm

brittle pasture
#

(I'm assuming you're using C# for this)

exotic token
#

Ah I see, I forgot to pack it back into a xnb

uncut viper
#

you should absolutely not be packing anything back into an xnb ever

exotic token
#

then how would I do it?

uncut viper
#

with content patcher

exotic token
#

I am used to the old ways of xnb edits

quick sand
# brittle pasture it's hard to debug errors in code if we don't get to see said code

/// lets try to make a light
    private void OnUpdateTicked(object? sender, UpdateTickedEventArgs e)
    {
        if (!e.IsMultipleOf(10))
            return;
        if (Game1.player.hasBuff("thesandmansleeps.LightBuff_LightBuff"))
        {
            // Parameters: id, textureIndex, position, radius, color, lightContext, playerID:
            string lightID = "thesandmansleeps.LightBuff_LightBuff";
            var textureIndex = LightSource.lantern;
            Vector2 pos = Game1.player.getStandingPosition();
            float radius = 5f;
            Color color = Color.GreenYellow;
            var nocontext = LightSource.LightContext.MapLight;
            int playerID = Game1.player.GetHashCode();


            this.playerLight = new LightSource(lightID, textureIndex, pos, radius, color, nocontext, playerID);

            Game1.currentLightSources.Add(this.playerLight);
            this.Monitor.Log("Added LightSource. Is it working?.", LogLevel.Trace);
        }
        else
        {
            // Game1.currentLightSources.Remove(this.playerLight);
            this.playerLight = null;
        }
    }
uncut viper
#

we have long long since moved on from xnb edits

exotic token
#

well, I will try to do it through content patcher, I am not THAT good at coding though

quick sand
#

honestly i changed the code so much after reading through glowring data that my brain just fried

uncut viper
#

luckily content patcher is not so much coding as it is sparkling data entry

#

!startmodding

ocean sailBOT
#

Making mods can be broadly divided into two categories:

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

uncut viper
#

the first bullet point will help

exotic token
#

so its the same way for tmx as it is png?

uncut viper
#

im not sure I understand the question

exotic token
#

the example used abigail.png

tiny zealot
#

yes, in general you should not be replacing any of the xnb files in your content folder

uncut viper
#

have you looked at the rest of the content patcher documentation? there is documentation available for EditMap which is what you use to, well, edit maps

#

there's also Load for replacing any asset wholesale, but you're iirc editing a vanilla spouse room? so shouldn't just replace that entire asset

#

(broadly, though, the kind of json you'll be writing is very similar)

brittle pasture
#

(Add throws if a key already exists in the dict)

#

(if there are no errors pls double check that your event is actually being registered)

#

(and if you want to reposition a light source use Utility.repositionLightSource)

exotic token
#

well, I will give it a shot

quick sand
exotic token
#

I was hoping that I could just edit the vanilla stuff because I have a suspicious one of my mods would load over a mod I made

uncut viper
#

you are editing the vanilla stuff with content patcher

quick sand
#

Is there code that makes the light appear?

uncut viper
#

turning it into an xnb is not going to make another mod not override it

brittle pasture
#

(ok ignore what I said earlier, I was looking at the wrong function;Add(LightSource) should work fine with duplicate IDs)

exotic token
#

the mod itself only seems to target sebastian's room, so I would be fine

brittle pasture
#

your code looks fine; are you testing at night?

uncut viper
quick sand
#

Yep outside and in the mines. Applying buff again in each new scenario

uncut viper
#

if the mod youy have installed is a Content Patcher mod too (and it should be bc again, we dont do xnb edits in the year of our lord 2025) then it should also only be replacing Sebastian's portion. it wont touch your edits at all

urban patrol
uncut viper
#

(there is a possibility that they are accidentally overwriting other rooms too, but i would not assume that to be the case, and you can just make yours higher priority anyway)

exotic token
#

alright

quick sand
brittle pasture
#

I've read it over and by all accounts it looks fine 🤔

#

someone else's gotta be a second pair of eyes I'm afraid

#

uhh try a different light texture id?

#

the color is also inverted so also try Blue instead of Yellow

quick sand
#

Yeah I tried lamtern, and I think both sconce and window

exotic token
#

with the width and height, does the first tile count

#

like is a spouse room 6 by 9 or 5 by 8

vernal crest
#

You can check by opening Maps/spouseRooms.tmx and measuring the size of the rooms there

exotic token
#

I did

tiny zealot
#

the first tile counts, yes

uncut viper
#

if you mean do you start counting from 0, then no

#

not for width/height

quick sand
#

Oh well I need a break from staying at this anyway 🙃

exotic token
#

some things do that

#

time to test the mod!

tiny zealot
#

indexes start at zero ("how far from the start is this?")
widths and counts do not ("how many things are there?")

brave fable
exotic token
#

do things that edit maps need new saves to work?

brave fable
#

also in order for the light to follow the player, it has to have its position updated manually every single tick

brittle pasture
#

there are lots of references in currentLightSources in the code, though I haven't checked for myself if they're functional

#

(I use sharedLights myself)

#

well it's gotta be functional, since I count at least 30 refs in code that looks very used

brave fable
exotic token
#

Ohh, actually, I am getting this error. Can't apply map patch "Sam Spouse Room Vanilla Change > EditMap Maps/spouseRooms" to Maps/spouseRooms: map patch couldn't be applied: source map size (Width:100, Height:27) doesn't match ToArea size (Width:6, Height:9).

uncut viper
#

did you set a FromArea?

exotic token
#

oops

brave fable
#

you can even patch reload your content pack while in the location to instantly reapply any changes

exotic token
#

I have successfully made my first mod

#

to find out where errors are happening in other mods that use content patcher, do I also check the code in content.json?

#

this is very useful

upbeat zephyr
#

How exactly do you change the title/honorifics of the farmer using GNMT ? Im looking at the tutorial and dont see it anywhere :( I may have missed it-

#

I know its using title, but I want to make sure I have the proper code for it

hard fern
#

it should all follow the same format

upbeat zephyr
#

ohhhh okay

#

i figured, just wanted to be sure

urban patrol
#

hello i forgot about this lol but is this done? i can have compat for cornucopia with my upcoming release if so SDVpufferthumbsup

vernal crest
exotic token
#

no errors in the log, thats the issue

vernal crest
#

You don't only use errors. Depending on what the problem is, you check what mods are editing the asset, you run a patch summary for the mod and see if patches are failing to apply when they should be or vice versa.

urban patrol
#

can you use GSQs inside a query, or only CP tokens

brittle pasture
#

only tokens

urban patrol
#

hmm okay i might need help checking the formatting of this query then:
"Condition": "{{Query: ({{HasSeenEvent: currentPlayer}} ritualDetails OR {{HasSeenEvent: currentPlayer}} ConvincedEdwin)}}"

#

this is supposed to be player has seen event 1 fork 1 OR player has seen event 2 fork 1

brittle pasture
#

the format is wrong

#

hold on

#

actually that's a GSQ field right

urban patrol
#

yeah it's for a trigger action

brittle pasture
#

then you can just use PLAYER_HAS_SEEN_EVENT

urban patrol
#

oh wait duh

#

i had it more complicated with ANDs and ORs then realized i didn't need to check all that because i had built it into the events

#

"GSQ 1",
"GSQ2"

right?

brittle pasture
#

just for informational purposes, how you'd actually format a "player seen event" CP token is {{HasSeenEvent: currentPlayer |contains=ritualDetails}}

#

(also you should be using your mod ID in your event IDs)

urban patrol
#

i do! these are just forks

brittle pasture
#

forks also need to be globally unique

uncut viper
#

you should be using your modid in your forks

urban patrol
#

...oops

#

well that's another thing i get to redo lol

#

i thought they were kind of like under the umbrella of the original event

uncut viper
#

they are still just keys in a dictionary

brittle pasture
#

yes you can notice they're saved in the same location as actual events

heavy pewter
#

Guys, is there a token expansion mod that has PlayerHealth or similar? Planning to add a condition that make weapons have increased stats when player health is within a certain percentage

lucid iron
#

you wouldn't be able to use tokens for that anyways

#

they don't update fast enough

#

i'd use BETAS and a trigger action instead

heavy pewter
#

Thanks, just started modding a week ago, really wanted to add some conditions or logic but idk C#

wheat kelp
#

Hullo! I am trying to edit the buildable mushroom boxes to grow black chanterelles from Mt Vapius

Mt Vapius files have the item numbered at -81; I notice when I use Lookup Anything there are sometimes additional letters for items. Do I use the one in the Mt Vapius files, or do i need to load into the game and use Lookup Anything to get the "fixed" ID?

#

" "Lumisteria.MtVapius_BlackChanterelle": "Black Chanterelle/432/15/Forage -81/{{i18n: MtVapiusBlackChanterelle_Translated}}/{{i18n: MtVapiusBlackChanterelle_Description_Translated}}////0/Mods\Lumisteria.MtVapius\Forage","

brittle pasture
#

that's the old file you're looking at

#

VMV packs some pre-1.6 files, including the old string format for items

#

find Objects.json for the updated format

vernal crest
# urban patrol "GSQ 1", "GSQ2" right?

If this is how you are trying to format your condition field, no, your punctuation is wrong.

AND:
"Condition": "PLAYER_HAS_SEEN_EVENT Current {{ModId}}_ritualDetails, PLAYER_HAS_SEEN_EVENT Current {{ModId}}_ConvincedEdwin"

OR:
"Condition": "PLAYER_HAS_SEEN_EVENT Current {{ModId}}_ritualDetails {{ModId}}_ConvincedEdwin"

And then if you needed to do an OR but with different GSQs:
"Condition": "ANY \"PLAYER_HAS_SEEN_EVENT Current {{ModId}}_ritualDetails\" \"PLAYER_HAS_MAIL Current {{ModId}}_SomeMail received\""

wheat kelp
#

Okay I dug around and found

"Lumisteria.MtVapius_BlackChanterelle": {
"Name": "Black Chanterelle",
"DisplayName": "{{i18n: MtVapiusBlackChanterelle_Translated}}",
"Description": "{{i18n: MtVapiusBlackChanterelle_Description_Translated}}",
"Edibility": "15",
"Type": "Forage",
"Category": -81,
"Price": 432,
"Texture": "Mods\Lumisteria.MtVapius\Forage",
"SpriteIndex": 0,
"ContextTags": [
"mt_vapius",
"mt_vapius_forage",
"mushroom_item",
"edible_mushroom",
"preserves_pickle",
"color_black",
],

#

Is this the correct file to look at?

urban patrol
wheat kelp
#

It still lists the black chanterelle at -81. I'm just gonna plug that in over the vanilla mushroom number, that'll prob work

brittle pasture
uncut viper
#

(aka dont do that it will not work)

brittle pasture
#

what's the context? if you're trying to spawn every item of a category that alone won't do it

#

if you want to spawn black chanterelles specifically use the item ID (aka Lumisteria.MtVapius_BlackChanterelle)

#

to further explain, mushrooms have "number" item IDs because they were in game before string IDs were supported

drowsy pewter
urban patrol
#

SDVpufferthumbsup no worries! i just wanted to check because i'm getting close to release, but i can always add it for the next update!

wheat kelp
#

@brittle pasture I'm trying to get the ID of the item. Of the black chanterelle itself.

I need the ID number to put into the config of the buildable mushroom boxes so that I can get the black chanterelles to spawn in the buildable mushroom boxes.

#

So if that's just the category ID, yeah then that won't work 😩

wheat kelp
vernal crest
brittle pasture
wheat kelp
#

Ty! I'm confused by this file organization but I'll figure it out eventually. Ty for your patience

#

Visual mods are one thing, add-ons are a totally different beast that I am very lost on at the moment heh

brittle pasture
#

[[Modding:Objects]] for more info

brittle pasture
#

the item ID in this case is the key of the dictionary

#

aka the part before the colon

frozen orchid
#

Does anyone happen to know if spacecore is able to animate tiles? I tried to make port a mod from content patcher animations to spacecore, however it doesn't seem to work? The documentation is kinda vague and doesn't specify so I'm wondering if I did it wrong or if it just isnt possible currently?

brittle pasture
#

tiles as in map tiles? or just sprites in general

frozen orchid
#

specifically im altering a tree to make it have an animation

#

im not sure what that falls under

#

Im able to get it working with content patcher animations, but im also limited in some ways where it would be much easier if i could use spacecore

brittle pasture
#

search for "spacechase0.SpaceCore/TextureOverrides" in the SpaceCore README

frozen orchid
urban patrol
#

"Tue": "{{i18n:monty_dialogue.Tue |horoscopeVerb={{horoscopeVerb}} horoscopeNoun={{horoscopeNoun}} horoscopePlace={{horoscopePlace}} }}",

i have a dialogue with three tokens. is this how to pass them in i18n? do i need more | separators and/or commas to separate them?

vernal crest
#

You can check the CP docs for stuff like this nic

brittle pasture
frozen orchid
#

oh i see

urban patrol
vernal crest
frozen orchid
#

does that mean id need to change the x y and hight width specifically, or is there additional stuff

urban patrol
brittle pasture
#

basically you add one animation entry for each rectangle yes

vernal crest
#

An understandable thing to do I think

brittle pasture
#

same TargetTexture, different TargetRect

frozen orchid
#

so is that meaning i have to do each 16x16 chunk that makes up the tree in this case?

brittle pasture
#

no, each continuous chunks of the sprite

frozen orchid
#

so the issue was that I was trying to animate multiple sprites

brittle pasture
#

I believe the main tree sprite at the top is 3x6 tiles

#

the sapling is 1x2, etc.

lucid iron
#

it's a little bit fussy but u must match the source rectangle

frozen orchid
#

for the specific sprite youre animating?

#

like you couldnt just animate an entire tilesheet for instance

#

that makes much more sense now

lucid iron
#
0 => new Microsoft.Xna.Framework.Rectangle(32, 128, 16, 16), 
1 => new Microsoft.Xna.Framework.Rectangle(0, 128, 16, 16), 
2 => new Microsoft.Xna.Framework.Rectangle(16, 128, 16, 16), 
_ => new Microsoft.Xna.Framework.Rectangle(0, 96, 16, 32), 

then when grown the tree becomes a top and a stump

treeTopSourceRect = new Microsoft.Xna.Framework.Rectangle(0, 0, 48, 96);
stumpSourceRect = new Microsoft.Xna.Framework.Rectangle(32, 96, 16, 32);
#

if u dont care about the stages then u just need 2 entry for the tree top and the stump, assuming this is wild tree

#

fruit trees r different iirc

drowsy pewter
#

have we clarified if this is a real wild tree or if this is a map tile tree

frozen orchid
#

im doing this to the pine tree

brittle pasture
#

I may have asked that before and then forgot that I asked

drowsy pewter
#

oh

lucid iron
#

oh yea u also need to do the moss rectangle

drowsy pewter
#

christmas light animation?

frozen orchid
#

yeah

drowsy pewter
#

i enjoy that mod

lucid iron
#

thats X + 96px

frozen orchid
#

tree3_winter.png

#

48 x 160 is the default

drowsy pewter
#

You can animate the whole spritesheet together just fine, in fact thats what i would do it make it easier

frozen orchid
#

hmm

#

well I tried doing that but it wasnt working

drowsy pewter
#

probably implementation issue

frozen orchid
#

maybe i just did it wrong 😭

drowsy pewter
#

have you tried looking at another mod that does spacecore animations

lucid iron
#

im fairly sure you need separate spacechase0.SpaceCore/TextureOverrides

#

they can point to the same sheet but it gets messy that way blobcatgooglyblep

frozen orchid
drowsy pewter
#

no, spacecore can animate the whole thing together

#

But if they have the same key it will cause issues

brittle pasture
#

Baubles is mod that animates nearly all of its items (for an example)

frozen orchid
#

can i send the code i did here?

drowsy pewter
#

!json

ocean sailBOT
#

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

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

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

drowsy pewter
#

my iridium recolors mod also does large animations

drowsy pewter
lucid iron
#

If u animate whole sheet then do u just gotta remove the TargetRect

drowsy pewter
#

terrainfeatures has to be capitalized correctly

#

or should at least

frozen orchid
drowsy pewter
#

whats your image looking like?

#

also, dumb question, but you have spacecore installed right

#

lol

frozen orchid
#

its double the width of the regular sheet sicne it has two versions side by side

frozen orchid
drowsy pewter
#

I mean show me

frozen orchid
brittle pasture
#

your target rect seems to be the entire texture, which wouldn't work because the game doesn't read it all at once

drowsy pewter
#

really?

frozen orchid
#

it should only target the first half i believe

brittle pasture
#

the entire sprite is 160 px tall

#

unless GIMP is lying to me

frozen orchid
#

yeah thats correct

#

and 96 wide

brittle pasture
frozen orchid
#

rather than starting at 0,0 should i start higher then?

brittle pasture
#

so you need to target that 48x96 rectangle specifically

#

your starting coords is correct, it's the size that's wrong

lucid iron
#

In the past i usually just put separate pieces of anim on different pngs

drowsy pewter
#

yeah if you try and do two anims on the same png you will have to really pay attention to indexes and stuff

#

I dont get why spacecore cant let you animate the whole texture but

lucid iron
#

-# It's impl details related to sinful patch on SpriteBatch.Draw

frozen orchid
#

so i could remake the assets where one is the top half of the tree only

#

and another thats the sapling bit

brittle pasture
#

yeah it makes sense if you know how it works under the hood I swear

#

the end result is much more performant than CP-A's old method of (IIRC) swapping out the entire Texture2D, but also somewhat more finnicky to work with

frozen orchid
#

sounds good

#

so once I do that I alter the 0, 0 to be in the corner pixel of the new sheets right, and then set the hight and width to that of one frame

brittle pasture
#

TargetRect is the coords of the vanilla sheet

#

there's nowhere to go but 0,0

frozen orchid
#

oh ok

brittle pasture
#

SpaceCore will infer the sprite coordinates of your animation automatically

frozen orchid
#

its just able to identify that im changing the top of the trees specifically for example?

brittle pasture
#

yes

frozen orchid
#

thats really convenient

#

well thanks for the help, im gonna have to work on this tomorrow though since its getting late

#

have a good one

thin fern
#

what does the 0 in "AcceptGift_(0)id" mean again...

#

i keep on forgetting all these small things 😔

drowsy pewter
#

O

#

it's a O

#

for object

thin fern
#

OH

#

OKAY THANK U

#

😭

upbeat zephyr
#

fell asleep adding the GNMTs to the npcs and realized i changed the same word to {{Hana.GNMTokens/SubjectivePronoun}} like 40 times but each time i would ctrl+z and then do it again

#

im so tired,,,,

drowsy pewter
hallow prism
#

if i wanted to give player a random recipe with trigger action, what would be the best approach?

#

having a pool of trigger actions and a using a thing like Lumisteria.Mod_MyAction{{random :range of whatever i want}}?

drowsy pewter
#

I have it set up to have different trigger actions, one for each recipe, that are rearranged via move entries each morning

#

That sounds better than what I did

#

But it would have to account for if the player already has a recipe

hallow prism
#

i may not care about it and just have a generic message like "today's recipe is (whatever)" and if they have it, they have it

drowsy pewter
hallow prism
#

in my case, this is however for an alternate way of obtention of recipes, so them being unlucky with random isn't crucial

drowsy pewter
#

Ah okay thatas good

#

Cause i was gonna point out that getting the last recipe in a totally random list, where repeats are allowed each day, can be frustrating with bad luck

#

if theres already a main method to get the recipes, its different

hallow prism
#

yeah (althought some of them are a bit random too but i hope that i'll be able to mitigate it, especially if some things are more likely to be in a pool but not another)

#

thanks

#

having another option may always come in handy anyway 😄

calm nebula
#

Farmer: "so I woke up this morning and decided to try a thing."

hallow prism
#

about vanille recipes id, i can have :

                    "MarkCookingRecipeKnown Current Rice Pudding",

and wouldn't need a _?

drowsy pewter
#

it having a space would move it to the next field (true/false), try either escaped quote or using the object id and see what works

ember lily
#

@drowsy shadow I can send your message to save you typing it up again, if you so wish puffer_pat

vernal crest
#

Yeah it would need escaped quotes

hallow prism
#

ok!

ember lily
#

Sending for @drowsy shadow

So, this took me a bit longer to think of than I want to admit (I also couldn't think of a search phrase to find it in old comments but it may already be there). Regardless, if anyone else is trying to set "spring24 spouse dialogue" or "flower dance spouse dialogue", there is a comment by [ichortower](#making-mods-general message) that explains that it's hardcoded. Here's a workaround that works for me that should have been obvious, but sometimes I breeze over the dumb stuff. I just overwrite the current year dialogue with the spouse dialogue if you're married...

{
"Action": "EditData",
"Target": "Data/Festivals/spring24",
"Entries": {
"Kraken": "{{i18n:Kraken_StringData.Data_Festivals_Spring24.Kraken}}",
"Kraken_y2": "{{i18n:Kraken_StringData.Data_Festivals_Spring24.Kraken_y2}}"
},
"When": {
"Spouse |contains=Kraken": false
}
},
{
"Action": "EditData",
"Target": "Data/Festivals/spring24",
"Entries": {
"Kraken": "{{i18n:Kraken_StringData.Data_Festivals_Spring24.Kraken_spouse}}",
"Kraken_y2": "{{i18n:Kraken_StringData.Data_Festivals_Spring24.Kraken_spouse}}"
},
"When": {
"Spouse |contains=Kraken": true
}
}

Yes, there are probably cleaner ways to write this, but hopefully this helps someone else in the future find it easily.

drowsy shadow
#

The link to another chat got me timed out. I was trying to be curtious by linking to another answer...

vernal crest
#

:O it

ember lily
#

Yeah, we have text blocked for, I believe, new farmers? ThinkO_O

vernal crest
#

's possible to do masked links with messages? I have never known this

drowsy shadow
drowsy pewter
vernal crest
#

No not that masked links are possible

#

I do use them here

drowsy shadow
#

Oh, haha, my bad.

vernal crest
#

But I've never realised you can use them to link to previous discord messages

drowsy pewter
#

oh ok

vernal crest
#

Which is silly because they are just links of course but because discord does its fancy formatting with them already I thought they wouldn't work with masking

vernal crest
drowsy shadow
gentle rose
gentle rose
ember lily
vernal crest
#

I make incredibly heavy use of search in this channel to find stuff for me and others so anything that increases the chance of me finding answers when I search is great by me.

hallow prism
#

i do remember something being mentioned about it maybe on the old 1.6 alpha, so it's good to have a more visible mention for people to find

#

what's the more "logical" for you, flavor text first or info about recipe first?

#

aka : current, or reverse?

#

thanks! (this is what i wanted to do, but i didn't anticipate that the order of listing would be reversed in game)

lucid iron
#

Hm is it possible to use messagebox bolbthinking

#

To be more like queen o sauce

hallow prism
#

if you find men the proper trigger action why not

lucid iron
#

Betas has one if ur using that Bolb

drowsy pewter
#

Spiderbuttons.BETAS_Message

hallow prism
#

hmm, i can't really emulate the "you learned how to cook x" part, so i'll keep the generic "today's show" blabla

drowsy pewter
#

If you want i can show you how i did it

hallow prism
#

why not, althought i'm not sure i'll use it

drowsy pewter
hallow prism
#

hmm

#

i may keep things simple for now

autumn tide
#

uhhh map people, I want to extend this map further to the right without losing the pond, how can I select an area of tiles and move them?

iron ridge
#

I want to say either S or R

#

Might need to control click on the layers you want to move

latent mauve
#

I just do a cut/paste after using "select all layers" (Ctrl+Alt+A) personally, but it does miss out on the objects that way.

autumn tide
#

hm, okay, still a little confused

latent mauve
#

Using Select All Layers makes sure the tiles paste to the same layers as where they started.

autumn tide
#

okay

latent mauve
#

you can also do "Select All Layers" from the Layers menu option once you have your rectangle selected if the shortcut throws you off

#

You'll know it's right because all the layers will be highlighted.

autumn tide
#

uhhhhh how can i do the rectangle select thing? sorry for the stupid questions

latent mauve
#

it's this icon, you have to be on a Tile Layer to start.

autumn tide
#

gotcha!

#

and how can I move them?

wanton sage
#

hi! question im sorry if this is not allowed or anything but : is it possible to optimize any mods that use OnTimeChange? its a source of lag for me and i wanna see if that can be maybe optimized? would be for personal use only ofc just wondering and i though asking in here would be the best place to ask?

iron ridge
#

Depends why they use it

wanton sage
#

the mod im trying to look at is baulder gate village btw

#

this being the speffic section

autumn tide
#

think I got it!

drowsy pewter
#

also thats so hard to see, you can use the json uploader next time to share code

wanton sage
#

json uploader?

wanton sage
drowsy pewter
#

!json

ocean sailBOT
#

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

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

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

wanton sage
#

okay will do that next time thank you!

drowsy pewter
#

i wonder if they knew what they were doing because the game has a nighttiles function specifically to handle this

lapis creek
wanton sage
#

idk myself im just looking at some of the mods i have to se if i can change the on time change thing to maybe a few mods i have (just to minimize lag for myself

#

so sorry if i come in here with a few mods i wanna do personal edits too

wanton sage
velvet hornet
#

Does anyone know how to make a content patcher mod compatible with generic mod config menu?

merry river
#

Question about map editing once again: My NPC is stuck in his house, I figured I have to add NPCWarp to map properties. Do I have to include the NPCwarp to the content.json in some way similar to how I included the general warp to leave the house?

lucid iron
#

You don't have to use npcwarp, they may use normal map warps too

#

Have you checked that their schedule definitely loads?

merry river
#

it does!

lucid iron
#

And do you have a map property warp somewhere in the house that goes outside?

merry river
#

and he was supposed to leave his house at 9 am to go to the mines but he was still standing in the entryway around 9:50

#

yes, i do

lucid iron
#

Hm idk if u actually need the NPCWarp there

merry river
#

ah wait, just spotted an error in my coordinates

lucid iron
#

Fairly sure NPC can use normal map prop Warp

merry river
#

i narrowed the entryway because it was broader before and my npc would just stand in the corner haha

#

i'll see how it goes

frosty hull
#

@next plaza Hi. sorry for ping
i have question about your mod SpaceCore
i saw your mod have an edit SaveGame.serializer, farmerSerializer, ...
and i notice you have't update the field Game1.otherFarmers.Serialzer with new SaveGame.farmerSerializer

#

this code it's Game1 init serializers and assign otherFarmer.Serializer with SaveGame.farmerSerializer

#

i not sure why you not update the field Game1.otherFarmers.Serialzer
is it fine? should you fix it?

merry river
#

I changed some small things around the map and I think I should have changed the coordinates in my content.json and the tile properties/map properties accordingly but my NPC is getting stuck in the door now. Any ideas why? I can also provide the according part of my json file

urban patrol
#

yes can we see everywhere you have a warp (json and tiled)

next plaza
merry river
#

let me take a screenshot of the parts in tiled

urban patrol
#

is the internal name of your NPC {{ModId}}_PeiMing?

#

Door needs the internal name

#

wait hang on you might need LockedDoorWarp

merry river
#

one day I will remember to put the internal name into everything

urban patrol
#

let me check

#

also note that tiled doesn’t know CP tokens so you need to write it out

merry river
#

ah so the mod ID from the manifest then?

#

unique ID

urban patrol
#

yep

#

and yeah i just checked and Door is for internal doors

#

like bedroom doors for example

#

you want this

merry river
#

So for the outside door, I have to add Action LockedDoorWarp?

urban patrol
#

yep!

merry river
#

Okay okay okay, let me try this

#

he was able to enter the door before so that's strange

urban patrol
#

idk how, since Door requires like 4 steps to work lmao

merry river
#

truly a mystery

#

Hmm I changed it but he's still getting stuck. Perhaps I also messed up on the interior map

urban patrol
#

check that your warp in endpoint doesn’t overlap with the other warp out

merry river
#

ahh, yes, let me do that

merry river
#

Okay, he still keeps getting stuck

urban patrol
#

i’m about to go make lunch but can you send a new screenshot of all the warps/the schedule json

merry river
#

I fixed it, I just noticed that I forgot to change 1 single coordinate in my content.json

#

thanks for your help! SDVpufferheart

urban patrol
#

yay!

merry river
#

NOOO he's stuck inside the house again 😭

#

I need to make some food as well now or else I will chew through my keyboard SDVpufferwoke

urban patrol
#

you shouldn’t need both NPCWarp and Warp i don’t think 🤔 what happens if you get rid of the NPCWarp

#

you also shouldn’t have to do the warps in json and tiled

merry river
#

that was an attempt because he got stuck without it before

urban patrol
#

let’s try to go back to the most basic and troubleshoot from there. try having just the Warp property in tiled, no NPCWarp, and no AddWarps in json

#

i’m worried it’s a pathing issue where he tries to use a warp but gets stuck on a different warp for example

merry river
#

alright. I'll try that later! i need a break for now haha

spiral lion
#

hello!
I am tryng to make quest in stardew. i have found out how to do the basic coding. but i dont know how to define a finished quest.
for example this one from basegame: "127": "Basic/Haley's Cake-Walk/Your wife is organizing a charity cake-walk in the town square. She asked you to bring a chocolate cake./Enter Town on a sunny morning with a chocolate cake./-1/-1/0/-1/true",

How does the game know when the quest is finished?

hallow prism
#

some quests are either hardcoded or are using other tricks

#

no idea for this one, either the game use an event and then remove the quest after it, or it's hardcoded and checked by C#

#

but if you want to do something similar, it's possible to have something like "event checking if you have chocolate cake in inventory, event triggers and remove quest"

brittle pasture
#

yeah it does the "remove quest in event" thing

merry river
latent mauve
#

That would also catch any possible changes to the coordinates via code you may have missed.

#

Also, are you sleeping or creating a new save after you make the changes to test?

merry river
merry river
ocean sailBOT
#

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

urban patrol
#

patch export Maps/YourMapName in SMAPI console, then navigate to the folder it tells you

night pine
#

hiya! i've recently returned to the modding scene after several years of absence, and i have an old custom furniture mod i'd like to update for 1.6. how would you go about making seasonal furniture these days? i've been looking here https://stardewmodding.wiki.gg/wiki/Tutorial:_Making_Custom_Furniture_With_CP, but i can't see any mentions of seasonal furniture. i might just have missed it!

merry river
#

this is the warp of the interior in the patch export, let me check the exterior too

brittle pasture
urban patrol
#

i'm pretty sure you can prefix the png filenames with season_ like spring_myCoolFurniture.png, then load the textures to Mods/{{ModId}}/{{Season}}_myCoolFurniture. then in the texture field for the furniture you can put that texture and it'll pull the correct seasonal tilesheet

uncut viper
#

(is the texture field on the furniture item not cached?)

uncut viper
#

(or do they auto load seasonalsl ike maps do? im not familiar with furniture)

drowsy pewter
#

i think nic misspoke

merry river
#

also is it normal that there's a bunch of tiledata things on the exported files

merry river
latent mauve
#

Yeah, the flip and rotation things are normal with how patch export works

drowsy pewter
#

You load the filenames containing the season to a texture without any season token

uncut viper
urban patrol
drowsy pewter
urban patrol
#

if furniture behaves differently than other tilesheets then yes i don't know what i'm doing

drowsy pewter
#

it doesnt

latent mauve
#

although in the Tiled file (if using that instead of code to set it), you need to write out the {{ModId}} as the mod's actual unique ID instead of using the token, so good to be aware of that when suggesting people switch.

brittle pasture
#

it's the sprite index/source rect that is cached, which isn't a problem in this case

drowsy pewter
#

fromfile would be assets/furniture_{{season}} and target would be something like {{ModId}}/Furniture

uncut viper
#

if its reading from data every single draw call then i guess you can do it either way

drowsy pewter
#

if you make the target {{ModId/Furniture_{{Season}} you will have four different texture names but a different one each season

#

so then youd have to be editing the furniture texture field to use the token too

#

it doesnt track

uncut viper
#

the implication was that you'd be editing the furniture text field as thats where the season token would be as well

drowsy pewter
#

i think nic might have just gotten mixed up with map tilesheet names

night pine
#

does anyone know of a seasonal furniture mod off the top of their head i could peek at? i tend to understand better that way

uncut viper
#

if what selph says is true then it does track because it will read those fields every single time

brittle pasture
#

yeah it doesn't have to be strictly prefixed like maps

latent mauve
#

the map prefixing only works if your map is outdoors anyway, IIRC.

brittle pasture
#

but the general approach should work as long as you load them all ofc

latent mauve
#

Indoor maps don't check for seasonal variants automatically.

calm nebula
#

Maps...the game just switches out the tilesheet source

drowsy pewter
#

i think if you're loading four different textures and swapping them with the token in the furniture fields then thats fine too, but i wouldnt load them to a texture containing {{Season}} then

uncut viper
#

you'd have to or else the target wouldnt match

brittle pasture
night pine
#

could i achieve the same with specific dates? the mod i'm updating are bushes as decorative pieces of furniture, and back when DGA was still used, i made it so some of them automatically changed to have berries on them in berry season as well

drowsy pewter
#

okay it doesnt matter because obviously this isnt helping the original asker

brittle pasture
#

sure there are CP tokens for that too

uncut viper
#

if in the Furniture data you write {{Season}}_MyFurniture for the texture then the target of your load also needs to be called {{Season}}_MyFurniture or else it wont update

latent mauve
#

Usually for seasonal objects/furniture, I see people Load the spring version once to a base furniture sheet and then use EditImage to change it conditionally based on the other seasons.

night pine
latent mauve
#

(also, please be aware if you do load anything based on only the {{season}} token without setting a base, you may run into weirdness with anything from that sheet placed on Ginger Island if it's not summer in game)

#

So you may need to at the very least always load the summer variant directly as well to prevent that, in the case of the automatic prefixing.

#

But again, I think that's only for actual outdoor map tilesheets.

drowsy pewter
#

i prefer to do the editimage method to account for ginger island tbh

latent mauve
#

It might be easier to find a seasonal portrait mod to demonstrate the method?

#

Any that don't use the Appearance system probably do something similar to this use case

#

Forgive me for not being able to write up an example right now, I have roofers working overhead and I can barely hear myself think at the moment.

night pine
merry river
#

what did I do now 😭

urban patrol
#

you have to create a new save if you changed a location name

thorny jasper
#

HOW DO PEOPLE MOD IN GENERAL

urban patrol
#

learn one thing at a time until you know all the things SDVpufferthumbsup

merry river
merry river
faint ingot
#

This syntax should work as a content patcher condition, right? Working on fixes for multiplayer.

brittle pasture
#

I don't know if you need a space between anyPlayer and | but that looks good yes

faint ingot
#

OK thank you

royal stump
#

patch parse is fine with it at least, and CP's pretty consistent

tight gulch
#

ouuu would a kind soul please tell me how the heck i make a tile on a map impassable 😭
(using Tiled atm) im trying to fill some space with solid tiles that npcs and the player cant walk through, like walls, and im so dumb and cant for the life of me figure it out. i was told to use the building layer, but that did nothing TT

#

ive scoured both wikis and i tried many things but to no avail

hallow prism
#

this should work with buildings layer

uncut viper
#

anything painted on the Buildings layer is impassable

#

unless you specifically make it passable

hallow prism
#

be sure you have it named buildingS

#

not building

#

(an error i definitively made a couple of time at least)

spiral lion
#

Anything in this layer is impassable

tight gulch
#

okay...

#

Buildings2 won't work, only Buildings?

#

i swear i tried this and it didnt work but i will try again.

urban patrol
#

correct, only Buildings

tight gulch
#

ah okay...

#

that might be it then

#

also thank you all for responding ;;

#

if this works i will be over the moon, it's been hours TT

latent mauve
#

For future reference, any layers with a number on them are for draw layers / visibility layering only, none of the tile properties actually apply on them. 🙂

tight gulch
#

ah okay! thats really useful to know actually

#

ive not done map edits and stuff before so i appreciate the help fr

#

hm...no it's still clear ingame. i wonder what im doing wrong SCcrying

#

this big void should show up red TT

#

does using transparent tiles not work?

hallow prism
#

it should

#

can you use the wand in tiled and hover over the area?

#

and look at the bottom

#

here my wand is on an area filled with invisible tile

tight gulch
#

here mine is

hallow prism
#

here you see it is selecting empty tiles, which is mentioned in the bottom by "vide" (which means void/empty in french)

#

so it should be good

#

ensure you are testing in game with THIS version of the file, and not, like, a version in another folder

#

(which is a common thing that happens even to veteran modders)

tight gulch
#

mm, ive been copying the tmx over from my edit folder into the mod each time

#

ill try again to make sure

#

nope, it's still clear

#

i double checked it was the right one

#

gah i guess im cursed

hallow prism
#

you do not have no clip enabled or something

tight gulch
#

well, i figure the tool im using to check accessibility would tell me those tiles arent clear, no?

hallow prism
#

hmm

tight gulch
#

and if i noclipped into them and turned it off, i wouldnt be able to keep walking

hallow prism
#

usually pathos' tools are accurate indeed

tight gulch
#

was i meant to put it on the pink layer

#

...?

hallow prism
#

no, you can't put tilesheets tiles in pink layer

tight gulch
#

thats objects though...

gentle rose
tight gulch
#

yeah i thought so

hallow prism
#

some other stuff can go there

tight gulch
hallow prism
#

(just want to mention we may ask redudant questions when facing strange things)

tight gulch
#

thats okay i dont mind

gentle rose
#

can we see a screenshot of your map in tiled? (I scrolled back and don’t see one but my discord is being glitchy so I may have just missed it)

tight gulch
#

sure, it's not my map btw, im just editing it

#

this is the transparent area that supposedly is impassible but is

gentle rose
#

can you hide every layer other than Buildings for a sec? (click the eye next to them)

tight gulch
#

ok

oblique meadow
#

Having the data layers mixed in with the tile layers is making my eye twitch

gentle rose
urban patrol
tight gulch
#

lol

gentle rose
#

there’s no tile selected in the tilesheet viewer that I can see

oblique meadow
tight gulch
#

supposedly this one

urban patrol
#

the tile index says 0 though

#

which wouldn't be that one

tight gulch
#

i changed it just now

#

to check if it was like, even there

#

it was the very top left one

gentle rose
#

what do you mean by changed it?

tight gulch
#

like

#

paint bucket

#

different transparent tile

#

it now says 205 but like, it was always a tile

#

sorry for the confusion

gentle rose
#

can you try closing the game completely if it’s currently open, then running it again, making a brand new save, and seeing if you still clip? (it probably shouldn’t make a difference but just in case)

tight gulch
#

yeah I'll try that

#

nope TT

#

loll what the heck have i done

gentle rose
#

what are the permissions on the mod you’re editing? are you able to send your map file?

tight gulch
#

permissions?

gentle rose
#

what mod are you editing?

tight gulch
#

it says i cant share the file on any sites

gentle rose
#

hmm, yeah

#

can you add something super obvious on the build layer right in the middle of the room?

tight gulch
#

ok

#

so, i added 2 grassy chunks in my house and outside in the void

#

they work fine and now so do the transparent ones???

#

only..i thought it would fix an issue where the toddler decides to play in the void around the house instead of inside it, since there wouldnt be anywhere for them to sit

#

but, they just, walk around in the void like they dont care anyway wheeze

#

a sane person would give up and use a different house mod but i have spent 6-8 hours decorating this thing pixel perfectly and im reluctant to scrap it

#

thought i might as well learn about mapmaking in the process

#

back to the drawing board, but i learned a lot with this so thank you everyone

#

i do wonder why the transparent boxes werent working before and are now although nothing really changed but whatever

urban patrol
#

is that an issue with the map or is it an issue with the kids? do you have any mods that change the kids' behavior?

tight gulch
#

just aesthetics i think

#

mhm, i cant see anything kid related other than retextures

#

i dont even know if there are mods that can do that

#

if i could make one that forces them to wake up in a specific coordinate every morning i would

urban patrol
#

i mean anything with C# can do anything but

tight gulch
#

true true...

autumn tide
#

helloooo does it matter what you call your tile layers in tiled?

iron ridge
#

It does

lucid iron
#

move the visual stuff to back1 if you gotta

autumn tide
latent mauve
#

Yeah, you have to use the Back, Buildings, Front, AlwaysFront naming scheme for your Tiled layers (both the tile and object layers)

autumn tide
#

got it, okay

#

and for multiple?

#

like front1, front2, etc?

latent mauve
#

If you need more of a layer for draw layering, you can add a number on the end, yep

#

Negative numbers work to draw under a layer also

livid kite
#

RaffieJohn's Mod's

toxic robin
#

RL fishing

#

0:43 if you want to see the rl fishing

golden basin
#

how would i label a item as something to propose marriage with with?

hard fern
#

🤔 i know you can make a roommate proposal thing that you just add a context tag to

#

but does that also apply to marriage? like not just the marriage pendant?

golden basin
#

i dont know, and do roomates have childern?

hard fern
#

they dont

golden basin
#

theyre adopted arent they?

hard fern
#

from vanilla, you can't adopt children with krobus at all. you need to have children from a previous marriage

golden basin
#

hmmmm

#

i guess i can make my npcs propose marriage instead using the new item

ornate light
#

I have a question if it isn't an issue, I am trying to convert a few older mods to AT for personal use and am trying to get the CP2AT converter on github to work but I'm having issues with syntax errors with the lib.py in the json5 extension it requires. I don't know how to fix them and Google hasn't helped, if it is allowed I would appreciate some help

autumn tide
#

hellooo what's the command for console to show you what you did wrong again?

#

totally rhetorical question everything's absolutely going fine-

ornate light
#

So it has me use "py main.py" to start the command but the error that appears is:

from json5.lib import JSON5Encoder, QuoteStyle, load, loads, parse, dump, dumps
File "C:\Users\ldbma\AppData\Local\Programs\Python\Python313\Lib\site-packages\json5\lib.py", line 62
about performance (a) you probably shouldn't be using this library in the
^
SyntaxError: unterminated string literal (detected at line 62)

This is the relevant section of the file it is talking about (lines 57 - 65)

*Note:* PREFER_DOUBLE and PREFER_SINGLE can impact performance, since in
order to know which encoding to use you have to iterate over the entire
string to count the number of single and double quotes. The codes guesses
at an encoding while doing so, but if it guess wrong, the entire string has
to be re-encoded, which will slow things down. If you are very concerned
about performance (a) you probably shouldn't be using this library in the
first place, because it just isn't very fast, and (b) you should use
ALWAYS_DOUBLE or ALWAYS_SINGLE, which won't have this issue.
"""
urban patrol
marble needle
#

Somebody has done a Fashion Sense like mod, but for villagers and pets?

calm nebula
#

I dont think so, but I could be wrong

brittle pasture
#

aedenthorn has a "put hats on villagers" mod

#

and also Hats on Pets Plus

devout otter
high geyser
#

Hello everyone. I have been working on a mod that takes place in a custom location, and I've been running into some issues. Is there a way to decrease the chance of catching garbage items when fishing for a custom location? And is there a way to load a map patch so the changes will be present immediately after an event ends?

So far I have mostly used Content Patcher, but I'm willing to make edits with C# and SMAPI if needed

calm nebula
#

Garbage is a fallback

#

You will inherently decrease garbage by putting in more fisg

high geyser
#

I will try adding more fish, thank you!

calm nebula
#

As for loading a map patch... you can sorta cheat it by warping the player out of the map and doing your map edit OnLocationChange

high geyser
#

When you say out of the map, do you mean to a different one, then back to the one they were in?

calm nebula
#

Yeah!

high geyser
#

Is that something I should do in Content Patcher or C# code?

calm nebula
#

You can do it in CP i think

high geyser
#

Ok, I will look into that. Thank you so much for all of your help!

surreal herald
lucid iron
#

it should be possible to do it by the dialogue question syntax

surreal herald
#

ty for that! I also had another question, how can I make a dialogue tree appear for a character everyday and with any weather

#

also I don't really understand what the 305/306 is in the example code

devout otter
#

305/306 are response IDs. They can be anything.

#

They can be Response01/Response02.

surreal herald
#

tysm! appreciate it!

next plaza
#

"why did nexus log me out"

#

"oh, to make me read a new TOS, of course"

#

This is probably pretty standard, but.

Every time you wish to use our site, please check these terms to ensure you understand the terms that apply at that time
Seems so silly - nobody is gonna say "oh, lemme go and make sure the TOS hasn't updated before I go check for mods uploaded since yesterday"

#

Anyone have a diff of the changes since I don't have the old one memorized

indigo yoke
next plaza
#

Households or facilities from which multiple users (and therefore accounts) may access the sites and services are encouraged to inform staff to ensure that there are no potential misunderstandings in the case of moderation review
Not a requirement or anything, but still feels weird. (Maybe standard too? I don't know)

#

I'm not sure I've read this closelsy before to be fair

tiny zealot
#

that's a layperson-compatible way of explaining that they will use your ip address to inform their decisions

next plaza
#

So it feels weird

tiny zealot
#

oh, of course

next plaza
#

In particular, we may retain your content indefinitely and are not obliged to delete your content if you so request. The rights you grant us continue after this agreement is terminated or your access to the site is withdrawn by us
I'm sure this isn't new, but I've never noticed that second part. Specifically the "your access to the site is withdrawn by us".

I get why its like that - poeople can't break the rules and get banned to get their mods removed - but again, it feels weird

#

Like, "if I get banned, they get to continue to profit off what I made" sort of thing

#

Also "Rules about linking to our site" is just hilarious sounding

#

Illegal <a href="..."> users beware!

#

Ah yes, very big change

#

(wayback machine from october)

#

Nothing really in file submission guidelines, the only other place I'm checking is privacy policy

#

Which is mainly this:

#

Also this, I guess

#

Movement Overhaul looks fun

frozen orchid
#

also the sapling part just doesnt animate despite the main tree working

#

this is a follow up to my questions about animating textures with spacecore

brittle pasture
#

your second patch's coords is incorrect; it corresponds to this region:

#

Y gotta be 96

frozen orchid
#

what do you use to help see that?

brittle pasture
#

GIMP

#

or any image editor that supports showing coords so not Krita raaahhh

frozen orchid
#

is the origin at the top left or top right?

brittle pasture
#

top left

frozen orchid
#

ah I see

brittle pasture
#

as for your first patch you're missing a bunch of escaped quotes

#

well for both patches really

frozen orchid
#

for the when conditions?

brittle pasture
#

you have to put everything inside a single quote

#

and any quotes inside those quotes must be escaped, or the JSON parser thinks it's ending your quote instead of part of it

#

"\"this is just one string\""

#

""this is two empty strings with invalid text in the middle ""

frozen orchid
#

interesting

#

does the when logic even work the way im trying to make it?

#

like does OR actually work in this way

brittle pasture
#

if you write it correctly then it should
definitely not in the second way you write it

#

also it's probably easier for your own sanity to use dynamic tokens instead of dealing with nested quotes hell

frozen orchid
#

ill look into it

#

thanks

frozen orchid
#

ok I made some changes

#

it doesn't seem to like how I made a token for some reason

#

"Technical details: Invalid property identifier character: {. Path 'DynamicTokens[1].When', line 40, position 2.
at StardewModdingAPI.Toolkit.Serialization.JsonHelper.ReadJsonFileIfExists[TModel](String fullPath, TModel& result) in E:\source_Stardew\SMAPI\src\SMAPI.Toolkit\Serialization\JsonHelper.cs:line 86
at StardewModdingAPI.Framework.ContentPack.ReadJsonFile[TModel](String path) in E:\source_Stardew\SMAPI\src\SMAPI\Framework\ContentPack.cs:line 76
at ContentPatcher.Framework.RawContentPack.TryReloadContent(String& error) in E:\source_Stardew\Mods.Pathoschild\ContentPatcher\Framework\RawContentPack.cs:line 80
at ContentPatcher.ModEntry.GetContentPacks()+MoveNext() in E:\source_Stardew\Mods.Pathoschild\ContentPatcher\ModEntry.cs:line 459"

#

this is different from what the json file checker is saying so thats why I'm confused

#

ok wait I just messed up the brackets it looks like

brittle pasture
#

yeah you're missing some closing brackets

#

every opening brackets must have a matching closing one

frozen orchid
#

yeah one sec

frozen orchid
#

ok sweet everything works

#

thanks again for the help

quick sand
#

im trying to implement gmcm for c#. it says to just copy the api into my code but its massive.... can i just copy it into another class file?

#

and then in my code do like using GenericModConfigMenu

tiny zealot
#

yes

quick sand
#

no way.....

tiny zealot
#

also you should only copy the methods your code calls

quick sand
#

yeah i guess i gotta look through it to see how to actually use it.. i just didnt want to make my own code harder for me to read

urban patrol
#

how come my mod can't call if (IsItemMayorShorts(Game1.player.ActiveObject) { ? it says it's public

#

(i'm not even sure i want to call it, but i can't think of another way to check if ActiveObject is (O)789)

tiny zealot
#

it's static, so you will need to say ClassName.IsItemMayorShorts (i don't know what class it is, so sub it in)

urban patrol
#

i see i see thank you

urban patrol
#

do all objects have a quality (iridium/gold/silver/plain)?

uncut viper
#

no, but all Items do

#

wait no

#

i have it backwards

#

yes they all do

vernal crest
#

Heheh

urban patrol
#

thanks!

uncut viper
#

half the time i try and remember if Items are Objects or Objects are Items i get it wrong

urban patrol
#

wait i better check just in case: if (Game1.player.ActiveObject is null) checks for an object like (O), right?

#

not some weird other type of object

uncut viper
#

no

brittle pasture
#

(BC) and (F) are also Objects actually

urban patrol
#

man glad i checked, i don't want anyone throwing beds into the bonfire

uncut viper
#

as well as mannequins, and trinkets

brittle pasture
#

but not tools and rings (despite the latter being in Data/Objects)

urban patrol
#

okay then i need to figure out a way to allow only (O) objects

#

i also need to figure out why i'm getting this; it says i need to create a new instance of the class, but the class is ModEntry so ??

uncut viper
#

ActiveObject.TypeDefinitionId == "(O)"

brittle pasture
#

addEvent is an instance method, not a static method

#

so you need to call it on a Farmer object

#

e.g. Game1.player

urban patrol
#

oh like who.Farmer

#

oh

#

okay thank you

brave fable
#

(you can also use the shorthand ActiveObject.HasTypeObject() if you like)

urban patrol
#

oh fancy! cool

#

although actually the way i implemented it is checking if is not object send error message return false

#

the crap at the bottom still needs to be translated from pseudocode but this is what i've got so far, which i'm sure will need to cover more cases

#

i'm also not sure about Category to check quality, i forget where i got that from

uncut viper
#

might i ask whyu- oh ok

brittle pasture
#

Category is not quality yes

urban patrol
#

i think i pulled that from luau code or something, gotta change it

#

oh wow is it really just .Quality instead

quick sand
#

@brave fable @brittle pasture just wanted to say thanks for all the help and references yesterday with the light stuff. i got busy with bathing and putting my kid to bed.
I actually managed to produce light today after going back and reading everything + slamming my head on the keyboard. It feels like a win.

urban patrol
#

would this HasOfferedItem check even work? i have to define it to use it but i feel like it would always be false like this, if it gets reset every time the player does the tile action. i tried to define it outside of the method but it was angry at me

brittle pasture
#

you are correct that it will always be false when the function runs

urban patrol
#

damn

brittle pasture
#

it's a local variable that gets initialized inside the function and doesn't live past it

#

if you need it to persist you can define it as an instance field in ModEntry (where I'm assuming this function is) or make it static

#

and obviously you need to set it back to false again at some point after setting it to true

urban patrol
#

when i define it in ModEntry, how do i get/set it inside the function? i tried ModEntry.HasOfferedItem (and a bunch of others) and none of them were able to do it

uncut viper
#

you can just use a mail flag

#

and arguably should, so you and other mods can just check it elsewhere rather easily

brittle pasture
#

I was about to get to explaining whether they need it to live in the save lol

urban patrol
#

and then what, conditionally edit the map to not have the TileAction if mail flag?

uncut viper
#

even if they dont need it in the save, a mail flag is just very easy to use

#

just use the mail flag instead of your bool

brittle pasture
#

for your information regardless, ModEntry.HasOfferedItem would work if it's a static field (ie it's bound to the class itself rather than any specific instance)

#

if it's not static, you need a reference, and in the method of a class you get a reference to the object calling said method with this

#

this.HasOfferedItem

urban patrol
#

oh how could i forget this

brittle pasture
#

(I'm assuming you don't have, erm, formal training in programming? /gen)

urban patrol
#

i have 1 semester of python and half a semester of java before i dropped the class bc i was failing

brittle pasture
#

got it, just wanna know so I can better tailor my advices SDVpufferheart

urban patrol
#

i appreciate it lol

#

question regarding mail flags: is it better to use one and then reset it every year, or should i just have it live in ModEntry so it gets reset (i assume it doesn't live in the save if in ModEntry?)

#

i need this tile action to be useable during a festival once a year, but i can't have players throw in multiple items

uncut viper
#

its not a mail flag if its just a field in your mod entry

#

a mail flag would mean sending mail to the player(s), like you would with Content Patcher

#

and then checking if they have that mail in your tile function

#

a static field in your ModEntry class (or elsewhere) would not be in the save at all nor could it ever be checked for besides from within your own mod (reflection notwithstanding, dw about it) and it would not persist across game launches

#

a static field is easy, but so is a mail flag, and the benefit of a mail flag is that other mods can then check for it, too

brittle pasture
#

(for nic's use case where it's a luau-like thing to have it run once per festival I would argue that a static bool is the perfect use case)
(well, almost perfect, we probably need PerScreen for local coop)

uncut viper
#

if i want to add support for nic's festival with my own NPC, what do i do if i want dialogue dependent on whether or not they added an ingredient?

urban patrol
uncut viper
#

not if i dont know what CT to check for. but then that begs the question: why not check for the CTs then, instead of a bool or static field?

brittle pasture
#

hmm can you reset festival dialogue even
getting into bike shedding territory here

uncut viper
#

theres also no reason the flag needs to be reset right after the festival

urban patrol
#

well mainly because i didn't know how to do that in C# SDVpuffersquee but that would be possible you're right

uncut viper
#

i can still use it in daily dialogue the next day, like "Why didnt you add anything to the pot?!" or w/e

#

BETAS can make whatever dialogue you want happen at the festival

urban patrol
#

i do already send mail about the festival to players the day before. i could presumably remove the mail flag with that same trigger action, if i use a mail flag

brittle pasture
#

a mail flag seems like it's better set as part of the upcoming events in the branches above I should probably stop now

#

anyway yeah look at mailReceived

urban patrol
uncut viper
#

you can do whatever you want and a static field will work, its just that a mail flag will both work and provide more opportunities for other things, for free

#

and saves a perscreen