#making-mods-general

1 messages · Page 316 of 1

umbral plume
#

oh wait i probably need a clean save dont i

#

i loaded a game file but it was the standard farmhouse instead of my modded one

golden basin
#

I have discovered how to make a custom incubator would yall be interested in learning

ivory plume
ivory plume
umbral plume
ocean sailBOT
#

Log Info: SMAPI 4.2.1 with SDV 1.6.15 build 24356 on Microsoft Windows 11 Home, with 95 C# mods and 161 content packs.
Suggested fixes: One or more mods are out of date, consider updating them

ivory plume
#

Seems the map file is failing to load:

Unhandled exception applying patch: Simplest Farmhouse Adjustment > EditMap Maps/FarmHouse1.
[...] Unable to load map with file path 'C:\Users\alexj\AppData\Roaming\Stardrop\Data\Selected Mods[CP] Simplest Farmhouse Adjustment\assets\SFarmHouse1.tmx'
[...] Could not find a part of the path 'C:\Users\New folder\Maps\bathhouse_tiles.tsx'.

There's some weird stuff going on with your tilesheet path; can you post the SFarmHouse1.tmx file here?

umbral plume
#

oh...I was just messing with it with the kitchen standing point thing

#

but it wasnt loading before that

ivory plume
#

The issue is that the tilesheet paths look like this:

 <tileset firstgid="3217" source="../../../../../../../../New folder/Maps/bathhouse_tiles.tsx"/>

You can't use ../ to traverse the filesystem that way (normally SMAPI is supposed to have an error for that, but maybe it's not working for .tsx files). You need to copy the tilesheets into the same folder as the map file, and reference them from there.

See this section of Modding:Maps to fix that.

umbral plume
#

i just realized i dont have the tilesheet in the folder because i used the vanilla bathhouse tilesheet for the bathroom

#

should I move a copy from the other vanilla tilesheets to the folder too while im at it?

ocean sailBOT
#

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

ivory plume
#

You'll need to do it for all the tilesheets referenced by the map. I suggest adding the dot for vanilla tilesheets, as suggested by those steps.

lucid iron
#

!tilesheetclimbing

ocean sailBOT
#

When creating or editing maps in Tiled, one common error is tilesheet climbing, marked by red text containing "invalid tilesheet path '../../..'. This is caused by SMAPI not being able to find the tilesheets needed by the map file. To prevent this error, make sure that you have a copy of all necessary tilesheets in the folder containing your WIP tmx file. Copies of vanilla tilesheets can later be deleted, but must be present while working on your map.

If you get this error with a completed map, an easy way to fix it is to open your tmx file in VS Code or a similar text editor, find all of the places with <image source=, and remove the filepaths to so that only the tilesheet names remain. For example, if the code says <image source="Content (unpacked)/Maps/townInterior_2" width="512" height="64"/>, change it to just <image source="townInterior_2" width="512" height="64"/>.

umbral plume
#

ooohhhhh yeah makes sense, i had the maps with the tilesheets when i was making them but then i moved the maps into the mods folder to test it

lucid iron
#

-# DH when grandpa's tiled

rough lintel
#

using the c# players guide to refamiliarize myself with c# and im having so much fun making silly console programs

umbral plume
#

wait

#

the vanilla farmhouse is still there but my log doesnt have errors

ocean sailBOT
#

Log Info: SMAPI 4.2.1 with SDV 1.6.15 build 24356 on Microsoft Windows 11 Home, with 95 C# mods and 162 content packs.
Suggested fixes: One or more mods are out of date, consider updating them

umbral plume
woeful lintel
#

I've seen tilesheet climbing errors so many times in here... And yet I know for sure that it will happen to me as well the instant I try to make a custom map!

lucid iron
#

it's a rite of passage

umbral plume
#

I thought I cleaned the climbing errors out T_T

lucid iron
umbral plume
#

smapi log?

lucid iron
#

yea run less mods when you test

#

itll be easier to figure out why it no work when less variables are involved

#

anyways going by the trace logs none of your edits were tried

ocean sailBOT
#

Log Info: SMAPI 4.2.1 with SDV 1.6.15 build 24356 on Microsoft Windows 11 Home, with 95 C# mods and 162 content packs.
Suggested fixes: One or more mods are out of date, consider updating them

umbral plume
#

i wonder if the cellar mod is conflicting gimme 5 to try it

lucid iron
ocean sailBOT
#

Log Info: SMAPI 4.2.1 with SDV 1.6.15 build 24356 on Microsoft Windows 11 Home, with 95 C# mods and 162 content packs.
Suggested fixes: One or more mods are out of date, consider updating them

rough lintel
#

learning about prefix and postfix notation. feeling very intelligent up in making mods general tonight

#

soon i will make more c# mods

lucid iron
#

its time to choose lani

rough lintel
#

math in the smapi console coming soon

lucid iron
#

will you be harmony.Patch manual gang or harmony.PatchAll annotations gang

rough lintel
#

i am barely learning how to do math in c# please idk what a harmony is 💔

lucid iron
#

ah do you mean prefix and postfix like

round timber
#

all i know is that it can break things bigly

rough lintel
#

debug addmoney 2+1e or something idk

lucid iron
#
  • 1 3
    5 2 +
rough lintel
#

YES chu yes

#

--a and a--

#

increment and decrement operators 🤣

lucid iron
#

dw i never remember whats the difference there

#

but habitually i always use i++

rough lintel
#

yeah me too

brittle pasture
rough lintel
#

ok i got to chapter 10 tonight, its slepy time

#

chapter 10 starts with if statements omg guys.... we are almost to object oriented programming

#

random q: why does my code want everything to be nullable

lucid iron
#

well u enabled them

rough lintel
#

i be writing Item? woodObject

#

wait i what

lucid iron
#

<Nullable>enable</Nullable>

#

in ur csproj

rough lintel
#

i neva did that....

lucid iron
#

it's generally a good thing to have compiler precheck nullable stuff

#

if u disable these u get hit by it at runtime Dokkan

rough lintel
#

ok true

lucid iron
#

ofc game itself is not consistent about it either

rough lintel
#

i just didnt know if the random ? was normal for everyone else

lucid iron
#

so sometimes a Item can be null and u gotta deal

#

if u dont like it u can turn it off and ill just go be sad in a corner

rough lintel
#

i dont want you to be sad

uncut viper
brittle pasture
#

if you make a variable and dont immediately assign it the ide will tell you to make it nullable

#

because it's just correcter™️

rough lintel
#

so true

uncut viper
lucid iron
#

the one time i used annotations i did it by accident and used it in the attribute class form

uncut viper
#

what's wrong with that

lucid iron
#

well it worked but i was basically call CreateReversePatcher

#

getting the patch processor used for annotation mode of reverse patch

loud sandal
#

Hey, I am new here and still learning - but I had a question about Harmony. I've been looking into it since it is a last resort to patch a mod, since reflection isn't enough. But what I wanted to ask was, is it better to use manual patching with Harmony if there's only like a handful of methods to patch? And then just use PatchAll sparingly? I just don't want there to be too much reflection overhead and things breaking. Does that sound right?

lucid iron
#

wow how topical

#

i think people here all have Strong opinions but honestly just use what vibes with you

#

PatchAll overhead is negligible in the grand scheme of things

#

the reason i used manual patch has little to do with reflection overhead and everything to do with liking the syntax more

loud sandal
#

Ok, I just didn't want to be stuck trying to fix it over and over since I am not a great coder haha

#

I'm a dry coder as well

lucid iron
#

i do think it's perhaps more clear, since you are call a regular ol method yourself

loud sandal
#

Ok thanks, I'll stick with manual then and try to get more experience with it over time

lucid iron
#

(i never heard of the term dry coder though)

loud sandal
#

Oh.. I repeat lines a lot, it helps me see the coder more clearly

#

some people don't like it

lucid iron
#

repeat lines NotteThink

#

just general dislike of automagic things i guess?

loud sandal
#

I've never been able to fully grasp coding, not the way others do. I feel weird about it lol

#

I need to have it a certain way lol

lucid iron
#

Whatever floats the boat AquaThumbsup

umbral plume
ocean sailBOT
#

Log Info: SMAPI 4.2.1 with SDV 1.6.15 build 24356 on Microsoft Windows 11 Home, with 66 C# mods and 86 content packs.

loud sandal
#

Thanks for the advice for Harmony, I saw you all talking about it before and thought I'd ask lol

umbral plume
#

tried to make the log shorter @lucid iron

#

its not even picking up the bathroom tilesheets now

#

oh wait

#

duh the first upgrade doesnt use the bathroom tiles only the second does

lucid iron
#

Looks like it edited Farmhouse1 this time

umbral plume
#

either way, its still not loading in the game

lucid iron
#

But earlier when i said less mods I mean like

umbral plume
#

i didnt wanna disable to big ones

#

but i can

lucid iron
#

Just content patcher and your mod plus various debugging mods like data layers and console commands

#

!modgroups

ocean sailBOT
lucid iron
#

You can separate the playing modlist from the testing list with this

#

I am sleep though, so I won't be able to help further for now

umbral plume
ocean sailBOT
#

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

fallow grotto
lucid iron
#

So yeah it does look like Farmhouse1 gets edited

#

What exactly do you see in game & what do you expect to see?

umbral plume
#

I see the default first upgraded house and I expect to see the one I made. Do you need the tmx files?

lucid iron
#

What did you name your layers?

#

Also take a map wide screenshot in game n send it here

umbral plume
#

I used the vanilla map and edited it so they layers should be the same name

lucid iron
#

Another thing you can do is patch export Maps/Farmhouse1

#

You can look at this exported version and compare it to your wip

umbral plume
#

this is the current and what I expect to see is the next image

lucid iron
#

Hm try loading over Farmhouse2 entirely

#

Er farmhouse1

umbral plume
#

uhhhhhhh....after using patch export maps/farmhouse1 and opening it in tiled

#

i got a weird picture

#

lemme send it

#

i think its trying to load both

lucid iron
#

Ah i guess your Rectangle is wrong

#

ToArea wayyy over there

umbral plume
#

how do i even fix that

lucid iron
#

You need to put right numbers basically

umbral plume
#

oh i used the wrong x y width and height?

lucid iron
#

I forgot what exactly your FromArea and ToArea were

#

Yeah

umbral plume
#

dammit

lucid iron
#

You can check coords in game with debug mode

#

And reload in game with patch reload <your mod id>

umbral plume
#

heres the coords i have

#

in the json

lucid iron
#

Yeah these are very large where are you reading these numbers

#

Remember that 0,0 is top left corner

umbral plume
#

i used those numbers

#

which i realize now was a mistake

fiery cobalt
lucid iron
#

Yeah those r pixels

lucid iron
#

The tile coordinates are on the status bar, bottom left

fiery cobalt
#

I want the ?? to have the description any idea how?

umbral plume
#

but width and height are right? @lucid iron

hard fern
lucid iron
#

No

umbral plume
#

dammiit

lucid iron
#

16 and 16 is the literal pixel size of rhe tile

umbral plume
#

so the width and height of the map in pixels?

#

so if its 0,0 to 0,11 then 11 would be the height

lucid iron
#

No 16 is the tile pixel size

#

People can and do use tiled with other tile pixel sizes

#

The FromArea and ToArea should all be tiles, you can find out how big with select tool

umbral plume
#

FromArea and ToArea of the map that I'm replacing it with?

lucid iron
#

Hm

#

I realized a problem

#

You cannot use EditMap to extend a map to the left or top

#

To do what you want Load is the only option

umbral plume
#

I was trying to replace the vanilla map T_T

lucid iron
#

Yeah just do a Load targeting the Maps/Farmhouse1 asset

#

EditMap is usually used to put a small change into a larger map rather than replacing whole thing

umbral plume
#

The contentpatcher guide said it reccommended editmap over load so i thought the safer choice was editmap

#

ill try rewriting in load instead

lucid iron
#

It's about what your desire is for mod

#

Like i doubt you expect any sort of compatibility with other farmhouse mods so Load is fine

#

For mod that only want to add a shop that's like maybe 2 files large then EditMap is the correct choice

fiery cobalt
#

Vanilla has them

umbral plume
#

sorry for keeping you awake @lucid iron ❤️

hard fern
#

As in, when putting in the data for your recipe

#

Because i think you're just flat out missing a descr6

#

6

drowsy pewter
#

(It comes from the object data btw)

hard fern
#

....

#

I can't spell today

umbral plume
#

it did it again 😠

fiery cobalt
#

lol

#

"LotsOfRecipes_BaconandEggs": "666 1 -5 2//LotsOfRecipes_BaconandEggs/i18n:BaconandEggs_Name/",

umbral plume
#

doont mind me im having a moment lol

drowsy pewter
#

Remove the name field, you dont need it and its written incorrectly

#

"Cornucopia_FruitNectar": "634 1 340 1/25 5/Cornucopia_FruitNectar/none/",

umbral plume
#

i forgot to actually change the mod in the unmodded folder too

#

OH SHT

#

UM

#

I now don't have a farmhouse at all

hard fern
#

Ub on

umbral plume
#

um

hard fern
#

:wo

umbral plume
#

why did it decide to add custom tile properties to "@flip" and "@rotate"

hard fern
#

I am... Not sure

umbral plume
#

I have many concerns

hard fern
#

....

#

Ok well

umbral plume
#

IT MESSED THEM ALL UP

hard fern
#

I know some of it should be for wallpaper/flooring i believe

umbral plume
#

IT MESSED THOSE UP

#

I HAD THEM

#

uggghhhh

hard fern
#

SDVpuffersweats get rid of them all and remake them?

umbral plume
#

dear smapi pls stop auto customizing my tiles thanks boo

umbral plume
#

then pray

#

and reload

hard fern
#

🤔 im thinking og making "useless books" aka cooks that serve no gameplay function other than just little trinkets....

#

But idk how fun that would actually be

#

and i also just want to draw books

Since i still feel like the game doesn't have enough variety when it comes to non-food gifts...

umbral plume
#

:0

#

A library maybe?

#

A LOST LIBRARY

#

THE MUSEUM USED TO BE A LIBRARY A LONG TIME AGO AND IT WENT TO RUINS AND THATS WHY YOU FIND RANDOM LIBRARY BOOKS AROUDN

devout otter
#

Well we already have Lost Books in vanilla.

#

But I do wish for some kind of framework where you can do custom book collecting for the museum.

umbral plume
#

whats the console command for coordinates cause i found my farmhouse map after wandering the void for a bit lmao

#

I either need to move the cellar entrance and warp point, or readjust the whole house map

#

anyone online to give me a hand

devout otter
#

Should be debug ppp.

umbral plume
#

i need to figure out how to either change the coords of the cellar and house entrance or move the map i made to line up with the vanilla coords

drowsy pewter
#

@distant radish Cornucopia machines will now load all the i18n strings to a file called Cornucopia.ArtisanMachines/i18n, so you can refer to it like any vanilla strings file

ebon thistle
#

hi, can anyone help me figure out whats going wrong with this animated well AT mod Im working on? Ive tried using the standard variation format, Ive compared it to other mods, and I cant figure out what Im doing wrong, Im sure its something silly though 😅
currently it works but it loads all the frames side by side as if they were one big texture...

{
    "ItemName": "Well",
    "Type": "Building",
    "TextureWidth": 48,
    "TextureHeight": 80,
    "ManualVariations": [
        {
            "Id": 0,
            "Animation": [
                {
                    "Frame": 0,
                    "Duration": 100
                },
                {
                    "Frame": 1,
                    "Duration": 100
                },
                {
                    "Frame": 2,
                    "Duration": 100
                },
                {
                    "Frame": 3,
                    "Duration": 100
                },
                {
                    "Frame": 4,
                    "Duration": 100
                },
                {
                    "Frame": 5,
                    "Duration": 100
                }
            ]
        }
    ]
}```
(Im using manual variations because I planned on making an alt without animation) this is my first time making a mod for this game and Im still a bit lost, so sorry for bothering if this is a stupid problem
#

Ive tried searching for this problem and I cant find anything helpful, I even looked at how other mods do animations, have tried different formats, and it just keeps loading the textures side by side

distant radish
woeful lintel
#

What is the proper way to parse a Microsoft.Xna.Framework.Point inside JsonConverter.ReadJson? I thought that this would do the trick:

if (reader.TokenType == JsonToken.StartObject)
{
  Point value = JObject.Load(reader).Value<Point>()
  ... // Do stuff with the parsed point
}

but I get an error saying "Cannot cast Newtonsoft.Json.Linq.JObject to Newtonsoft.Json.Linq.JToken."

Also tried this:

Point value = Point.Zero;
serializer.Populate(JObject.Load(reader).CreateReader(), value);

but it simply doesn't populate the Point: value is still Point.Zero at the end.

ebon thistle
woeful lintel
ebon thistle
#

guess Ill just redraw the well as static then

mighty ginkgo
ebon thistle
#

ohh Ill look into that then

somber cipher
ebon thistle
#

Im doing this as a part of a buildings retexture mod, thought AT could do animations so I was going to do an AT addon with extra options, including the animated well, but I could just put it in the main CP pack

mighty ginkgo
somber cipher
mighty ginkgo
#

ah i see

fading walrus
#

I suggest simply using normal Content Patcher instead of CPA for most things though

woeful sandal
#

hi, i'm currently trying to understand how mods for Fashion Sense work - i want to make an accessory and for it to be visible when player is facing the camera (basically to have front back left and right positions). is there a parameter which will draw the accessory behind the player without the whole thing showing and overlapping the player sprite, or does this work in a whole separate way?

frosty hull
#

Hello guy!, i have question
where can i modify mod src code for feature "Farm Layout Selector"?
because i want to modify insert new farm layout to this menu for android

spice inlet
#

that is the CharacterCustomization menu

#

might want to check the LoadFarmTypeData function

#

in 1.5.6 stardew for android used a very different menu though

frosty hull
#

Ah thanks, now i found it

storm patrol
#

Hey everybody. A few days ago I asked about commissioning someone to create a mod for me. Now I want to warn you about the users Alex (katanabeller) and Ella meldrum (johnjames0672_47317). I was contacted via DM, we agreed on a price, I payed in full upfront and now they want more money, don`t do any work and refuse to give my money back. Of course I will report them but I wanted to warn you guys as well.

vernal crest
storm patrol
vernal crest
# storm patrol Will do. Thank you.

Unfortunately scammers targeting people on discord is pretty common. I've had quite a few people messaging me to try to sell me "their" artwork (including today, in fact). I'm sorry it happened to you.

storm patrol
#

I only use discord every once in a blue moon and wasn not aware of this so I guess the joke`s on me this time..

lucid mulch
#

I have dm's turned off almost everywhere, they are pretty much exclusively used for scams anyway outside of the sight of server moderation

vernal crest
#

I have DMs turned on for everything and everyone but if someone I don't already know messages me I check our mutual servers to see what messages they have sent. If none or only spammy ones, I just delete the request.

chrome mountain
#

Hi Hadi SDVpufferlurk

thin lake
#

When making a mod, what's the first recommend thing to do?/genq

vernal crest
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.

thin lake
vernal crest
thin lake
vernal crest
# thin lake Nope, I kinda been working on a personal CP mod on and off. But what you mention...

Yeah, starting by learning how to actually make changes happen in the game is always a good starting point. Then once you understand what a patch is, what Action to use to get your changes in game, etc, you can start wherever you want to on creating the mod itself. I am making an NPC mod and I jump around between writing dialogue, drawing portraits/sprites, map making, making schedules, writing events, scripting the events, and so on.

thin lake
vernal crest
# thin lake I have started the foundation of the mod folder, I just haven't gotten down to t...

Whatever you do, though, I really strongly recommend that you focus on getting it working in game at a basic level before you put more work into it. So if it's a portrait, put a placeholder in before drawing the whole portrait. If it's a map, make a small change to a vanilla map and put that in game before continuing work on it, etc. It's much easier to troubleshoot small changes, especially when you're still trying to understand what each of the json bits actually do.

vernal crest
thin lake
vernal crest
thin lake
thin lake
vernal crest
vernal crest
# thin lake Kinda... I got like 10 more to do

Ah, apologies! Your initial question made me think you were just thinking about starting out, not already partway through the process. So I've been responding as though you had nothing but ideas so far.

thin lake
vernal crest
#

Most people have a thought and maybe some notes written in a word doc or something

vernal crest
# thin lake Kinda... I got like 10 more to do

I recommend getting all the basic parts for one NPC in place (even if just mostly as placeholders) before starting more NPCs, since once you know how to do one you will be able to do the others just by copying and pasting what you did for the first one and then editing values.

#

(If you aren't already doing that, I couldn't tell.)

thin lake
vernal crest
ocean sailBOT
#
Creating a Custom NPC

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

thin lake
vernal crest
vernal crest
# thin lake Neighbor sampling?

Nearest neighbour. It's a resampling method and it's the one that works best for pixel art. What art program are you using?

vernal crest
#

Hmm, that appears to have a canvas resizing tool but I'm not sure if it resizes the image itself.

#

Still, you can always try.

serene moat
#

I need to use a better pixel art program. I’ve been using procreate with pixel brushes

vernal crest
#

Is that not good for pixel art?

fading walrus
#

I don't think procreate was designed with pixel art in mind Thonk

tiny zealot
#

the best camera pixel art program is the one you have with you are comfortable using

#

as long as it can do single pixels and export to 8-bit RGBA .png, whatever you have is Fine

fading walrus
tiny zealot
#

(aseprite does have some really helpful features, so if you are willing to buy that or compile it for yourself, it's pretty good! but don't worry about it as long as you know how to use your tool)

drowsy pewter
# storm patrol Hey everybody. A few days ago I asked about commissioning someone to create a mo...

I'm sorry to hear that you got scammed, I hope that the moderators can crack down on those accounts even though you probably won't get your money back (though if you paid through Paypal or credit card, try and do a chargeback/open a refund request asap). If you decide to commission someone again in the future, I would be happy to help give advice on whether or not the person you chose is trustworthy or not, based on what I know of their previous modding history. Additionally, I cannot do the code that you're wanting, but I'd be happy to draw some pixel art for free for you if you need that for your mod idea SDVpuffersmile (For the record, you can check my nexusmods history and posting history in this server to see that I'm a real modder!)

vernal crest
#

Some of the best pixel artists we have use programs that weren't designed for pixel art

drowsy pewter
#

Honestly you'll find that features specifically geared for pixel art arent super helpful until you're really doing pixel art a ton

#

Like it's really approachable, so you dont need that much to work with. Not like some illustration styles where you might need fun brushes or filters to make your art more snazzy

vernal crest
#

Yup I started making pixel art using Piskel in Firefox

serene moat
# vernal crest Is that not good for pixel art?

I think it’s decent when you download specific pixel brushes for it or make them yourself. But the grid/canvas guide is hard to use, even when you set it to 1 pixel grid size. My grid at least isn’t exactly 1 pixel even when I set it

vernal crest
#

I don't use a pixel grid, but if it also couldn't do a 16px or 64px grid that'd be a deal breaker for me

drowsy pewter
#

You are on an ipad, right? Is aseprite even available on ipad?

thin lake
#

I tried to resize one of my NPC portraits but nothing worked

drowsy pewter
#

Procreate is the only ipad drawing program that I know illustrators consistently mention using

#

so there may not be another good option

vernal crest
serene moat
serene moat
drowsy pewter
#

I believe aseprite also only does square grids?

vernal crest
#

Eh, that's all you need most of the time. I use 16x16 for NPC sprites. I did 16x48 once for wallpapers but I didn't really need to.

#

No, Aseprite can do rectangles

drowsy pewter
#

Ah, good to know

woeful lintel
#

I can't even fathom doing anything other than look at my messages on a touchscreen, so doing art on an IPad is mindblowing to me.

#

whenever I need to do pixel art I use GIMP

crude plank
#

I tried to use GIMP and i was completely lost everything felt so unintuitive to me

thin lake
fading walrus
#

Maybe you could check that out?

crude plank
#

And the the first time i open Asesprite everything immediately made sense to me

tiny zealot
#

my aseprite (slightly out of date at this point, i think, lol compiled) only does square grids for the transparent background, but the "visible grid" (outlines around regions) is a freely configurable rectangle lol nevermind found out the background grid can actually be customized, ignore me

vernal crest
fading walrus
#

But for iOS

serene moat
drowsy pewter
#

Hylia, if you take a picture before and after it will be helpful for us to guide you

karmic gust
#

I’ve been working on an event that starts on the farm and then immediately switches to a different location, but despite setting the starting coordinates and the NPCs in the void it was still starting on the front steps with all the NPCs standing in one spot in front of the farmhouse. I couldn’t find a solution, so just in case anyone else has the same problem I used the viewport command and set it to 1000 1000 again (like as the first command after the setup ones)

#

also aaaa I spent way too long trying to fix that

tiny zealot
fading walrus
tiny zealot
karmic gust
#

That makes sense!

woeful lintel
#

Is there a post limit on Nexus? FF has been stuck at 200 comments for about a week now, is this the limit or is this a cosmic event?

round timber
#

expanded has 32k comments so i dont think its that

tiny zealot
#

200 is absolutely not the limit on posts on a mod, lol

drowsy pewter
#

You have a break, enjoy it SDVpuffersmile

woeful lintel
#

lmao, maybe I should take this as a sign

tiny zealot
#

i think casey got that many in one day when one of the SMAPI updates broke spacecore for a few seconds

drowsy pewter
#

God i remember that

#

oh hey

round timber
#

thats pretty 1337

woeful lintel
thin lake
vernal crest
drowsy pewter
#

It looks like it was drawn from the portrait creator too so I'm surprised that it would have been too small in the first place?

#

What size are you trying to make it?

thin lake
vernal crest
#

And what size is it?

thin lake
vernal crest
thin lake
# vernal crest Yes

It's 64×64 but the image itself is a jpeg and I completely forgot it needs to be a png

#

And whenever I tried to convert it to a PNG it gets worse

drowsy pewter
#

So you dont need to resize it?

vernal crest
#

Why did you mention resizing then?

woeful lintel
thin lake
thin lake
drowsy pewter
#

Why don't you put the 64x64 jpeg file in here in the chat

#

One of us can make it a png and remove the background

#

The 160x160 image that you posted cannot be turned back into pixel art because it's blurry now

thin lake
#

I don't have the original file though 😔 just the downloaded file.

drowsy pewter
#

Okay

#

I'm going to take the 160x160 image you posted and try and do my best to fix it, but maybe this is a sign to keep backups if you're not sure what you're doing

thin lake
vernal crest
#

You can't draw a 160px image on a 64px canvas.

gloomy hemlock
#

Does the portrait creator output it as an upsized scale of 160x160?

drowsy pewter
#

nope

#

And their image was definitely drawn at 64x based on the pixel edges

gloomy hemlock
lucid iron
#

That's one of the 2 default mods that comes with smapi

gloomy hemlock
#

Ahhhhh. It must have gotten taken out when I was splitting off my main mod load and I missed it. Thank you!

lucid iron
#

With that you can do debug <whatever debug command listed>

#

To use the game's own debug commands

gloomy hemlock
#

Makes sense. Just tested with the mod added, it's working now. Thank you!

blissful relic
#

noob question, how do I go about using TextureOverrides in my mod

lucid iron
#

What is the context here

#

Spacecore?

blissful relic
#

yes

#

spacecore

#

SourceSizeOverride

gloomy hemlock
#

Is there a clean and quick way to remove the game's flag of "You did X thing" so I don't need to restart days to make sure each variation of something is working correctly? In this case it'd be to test multiple dialogues with the same NPC. (I want to make sure the gendered language is working correctly and also that when using branching dialogue via responses that all of them work correctly as well)

lucid iron
#

So in content patcher, load the texture first

#

Then do an EditData on spacechase0.SpaceCore/TextureOverrides

#

TargetTexture is the target of your load

#

TargetRect is area to put texture

blissful relic
#

if the texture is loaded in another mod do I still need to load it?

lucid iron
#

Well u need the hd version right

blissful relic
#

yes

lucid iron
#

You need to Load that

vernal crest
# gloomy hemlock Is there a clean and quick way to remove the game's flag of "You did X thing" so...

Yup.

  • To just play a particular dialogue line repeatedly you can use debug loaddialogue NPCName Characters/Dialogue/NPCName:key.
  • To remove a dialogue answer it's debug action MarkQuestionAnswered <player> <answer ID> [answered].
  • To undo a trigger action it's debug action MarkActionApplied <player> <answer ID> [applied].
  • To remove a mail flag it's debug action RemoveMail <player> <mail ID> [type].
  • To remove a CT it's debug action RemoveConversationTopic <topic ID>.
#

Basically with debug action you can run any trigger action action lol

lucid iron
#

I think in that case your TargetTexture is whatever the other mod loaded to

#

SourceTexture is your texture

blissful relic
#

yep

gloomy hemlock
lucid iron
#

TargetRect would be 64x64 rect while SourceSizeOverride would be some 256x256 vector

#

I don't recall a mod example offhand but that's how it goes I think

blissful relic
#

so for example, if I'm doing HighlandsDwarf_Vendor from SVE

#

it's looking like...

#
            "Action": "EditData",
            "Target": "spacechase0.SpaceCore/TextureOverrides",
            "Entries": {
                "ModID.HighlandsDwarf_Vendor": {
                            "SourceTexture": "{{InternalAssetKey: assets/HD/HighlandsDwarf_Vendor.png}}",
                            "TargetTexture": "Mods/FlashShifter.StardewValleyExpandedCP/HighlandsDwarf_Vendor",
                 "TargetRect": { "X": 0, "Y": 0, "Width": 64, "Height": 64 },
                  "SourceSizeOverride": { "X": 256, "Y": 256 },
                    },
            },
            "When":{"HasFile:assets/HD/HighlandsDwarf_Vendor.png": true,}
        },```
#

WorryDumbRead am I doing this right

vernal crest
#

!codeblock It's easier to read when in a code block

ocean sailBOT
#

You can embed code in Discord using a series of three ` :
```
Your code can go here
Even if not a haiku
Just an example
```

For syntax highlighting, add the language code on the same line as the first
``` (with no space, like ```json).
The usual codes are cs (C#) and json.

blissful relic
#

ty

drowsy pewter
#

@thin lake This is the most I can do to save your portrait without redrawing it and without seeing the original, and I spent 30 minutes on it, so please use it lol

lucid iron
devout otter
blissful relic
#

omg it's DolphINaF SDVpufferheart

#

big fan

devout otter
#

Er, thank you. SDVpufferblush

blissful relic
#

tysm for the idea of using Spacecore for vendor HD portraits

#

I was losing my mind everytime I use HD portrait mod and then the vendor portrait popped out in 64x64

#

😭

devout otter
#

Oh! I'm guessing you took a look on the HD Portraits part of my Portraits for Vendors mod as template?

blissful relic
#

I looked around yes

devout otter
#

Yar, I use When there because my HD folder is actually empty. So SMAPI would not give an error if it coudnn't find the portraits.

#

But since you'd include the portraits yourself, the When field shouldn't be necessary.

#

(Also what chu said about you may want to use {{ModID}})

blissful relic
#

I like your approach of making a HD patch in the mod structure to give room for more flexibility of swapping between low res and high res so I left that When there

#

oh gdi

devout otter
winter dust
#

With "When" conditions, if you add two entries does it act as an AND condition or an OR operator?

blissful relic
#

ty @lucid iron you've been very kind and helpful, hopefully I can make this work Mokoko_Love

vernal crest
vernal crest
blissful relic
#

yes, that was my bad bowbow I got overly excited

vernal crest
#

No worries I just didn't want you to have missed it and then wish you knew about it later haha

blissful relic
#

I was posting that as an example, but I'll replace it with my mod's unique id

vernal crest
#

Not a fan of the token?

blissful relic
#

more like don't know how to use tokens

rough lintel
lucid iron
#

Well if u put a thing between {{ }}

rough lintel
#

that is what people are saying

lucid iron
#

Dats a token

blissful relic
#

WHAT

lucid iron
#

Content Patcher resolve it to sone actual value at runtime

devout otter
#

(I'm not a fan of the token because I'm easily confused when I want to patch an asset with another mod.)

winter dust
#

Not everything can take {{ModId}}, but most things can.

vernal crest
#

I am a fan of the token because I change my mod's ID a bunch of times before I release xD

blissful relic
#

.....I feel really dumb rn, but also kinda relieved

#

seems like I gotta go back to reading CP Readme

vernal crest
#

You can do a lot of cool stuff with tokens

drowsy pewter
#

I enjoy manually typing my mod id a lot so i can pat myself on the back for being a mod author whenever I see my own name

vernal crest
#

I type my mod ID in full PLENTY when testing

#

I can type Abagaianye so fast

drowsy pewter
#

(trying to brag) well I can type 6480 even faster

vernal crest
#

xD

visual dirge
latent mauve
#

Only caveat with the tokens, is that if you are using them in a Loaded file, CP won't turn them into actual values. (This is a reason to load blank.json files for some things and then use a separate EditData action elsewhere to add the data in them)

visual dirge
lucid iron
#

I think content patcher is less too complicated and more too dynamic

#

What exactly r u gonna do when the Target has tokens blobcatgooglyblep

drowsy pewter
#

can they make a static tokens system

latent mauve
#

There is a CP command to parse tokens

visual dirge
lucid iron
#

Ig it just depends on goal here then

visual dirge
#

when conditions are unified sorta kinda 😅

visual dirge
lucid iron
#

Normally people just do patch export <target> n get the actual current state of the asset

inner harbor
ivory plume
#

(Content Patcher is essentially a light programming language, not just a data format. If you can create a generic parser that can find every possible output of any given content pack, you're well on your way to solving a P vs NP problem.)

visual dirge
#

hey, it's not too bad!

winter dust
#

Can I check for the size of a map in a When conditions?

visual dirge
umbral plume
#

Im baaaack

visual dirge
umbral plume
#

i gots just two itty bitty issues

lucid iron
umbral plume
#

I don't wanna talk over anybody thou so Ill wait 🤐

lucid iron
#

You should ask anyways

visual dirge
#

girlll im talking offtopic nonsense go ahead

umbral plume
#

ok ok so

woeful lintel
#

actually that's a cool visual concept

winter dust
gloomy hemlock
#

Questions! (I'm trying to understand the limitations of what I can and can't (or shouldn't) do.)

  1. When telling the game to use a portrait, my understanding is you can use $0, $1, $1 etc (or $u/h/a but I find the numbering system more intuitive to my brain) at the end of a dialogue chunk to tell it what section of the portrait sheet to use. It goes from top left across then down. Do you have to use portrait sheets in the typical format or is the space of the file split evenly and assigned number values based on the chunks? Ex: A portrait sheet containing 10 different faces, but formatted in a way that'd be 5 faces wide and 2 faces high. Would it know how to handle that? (Trying to understand the limits of what I can do here.)
  2. When telling it to load a portrait can you load multiple at once? The potential use case would be things like if X NPC was injured you could have a bandage placed overtop if said event happened using dynamic tokens (or when statements, but I feel like a dynamic token may be more useful?) and a portrait sheet containing just the bandage in the correct position. So having it have Abigail loaded and Abigail_Bandage at the same time and then when calling on $1 it'd be showing the $1 positioned portrait from both files at the same time. If this is possible, what would load order look like? Would the first one loaded be on the bottom layer and then the second loaded be on top or vice versa?
  3. Can you load multiple portraits at once in a dialogue chunk itself? So if I typed "Hey @! I haven't seen you in ages! $1$3" Would it load both $1 and $3? If so, would it load 1 first, then place 3 on top?
  4. What results in a better optimized mod for SDV, a bigger image file or multiple smaller files? Does loading more files regardless of file size result in a longer load time or is there no difference?
umbral plume
#

problem 1: When I reenter the farmhouse, I'm too the left of the doorway. Not a big issue, just not sure how to fix it. 2: The cellar entrance is visually off a small bit and I'm not sure how to line it up with my farmhouse map :I

lucid iron
winter dust
umbral plume
#

gimme a sec and ill get screenshots of what im talking about

winter dust
#

But I can only access their map size configs via CMCT.

woeful lintel
lucid iron
#

CMCT is the correct answer here

winter dust
#

Then I'll just make it an optional mod to use.

#

Cause I don't wanna add unnecessary requirements to the main mod.

lucid iron
#

As long as you gate the patch accessing any CMCT tokens behind hasmod then you fine

#

And make ur own matching config in case ppl not using cmct and just want to set it manually

lucid iron
woeful lintel
vernal crest
ivory plume
# gloomy hemlock Questions! (I'm trying to understand the limitations of what I can and can't (or...
  1. The game expects a specific portrait texture layout. You can extend the portrait texture downwards to add more portraits, but portraits past the expected right edge will be ignored.
  2. No, a dialogue box can only show one portrait.
  3. It's a tradeoff. Loading one large image is more efficient than loading many small ones if they'll always be loaded either way; but if you only need a few parts of the image, it can be more efficient to load the few small ones you need than the whole thing.
woeful lintel
vernal crest
#

Ooh interesting, I'm sure ichor said he went wider. Was he wrong, did I misunderstand him, was that all a dream???

uncut viper
#

pretty sure you can go wider if you're loading, but content patcher won't let you edit wider

umbral plume
lucid iron
#

2 needs a separate editmap

#

Targeting the cellar warp

uncut viper
#

(the usual layout is definitely better to follow if it's not a custom NPC though. maintains compat)

ivory plume
# vernal crest Ooh interesting, I'm sure ichor said he went wider. Was he wrong, did I misunder...

I'm looking at the drawDialogueBox logic, and the positions are hardcoded for the named values like $u:

case Dialogue.dialogueHappy: portraitRect = new Microsoft.Xna.Framework.Rectangle(NPC.portrait_width, 0, NPC.portrait_width, NPC.portrait_height); break;
case Dialogue.dialogueSad: portraitRect = new Microsoft.Xna.Framework.Rectangle(0, NPC.portrait_height, NPC.portrait_width, NPC.portrait_height); break;
...

It does fallback to dynamic calculation for numeric indexes, but if you go wider that'll change the meaning of the standard portrait values (e.g. $u and $3 will no longer be equivalent), which will mean a lot of dialogues will show the wrong portrait.

umbral plume
#

oh like an editmap in the farmhouse content json?

gloomy hemlock
#

Thank you everyone for the answers! One thing I want to double check to make sure I'm understanding, for 2) when you say EditImage overlays are we talking like an edited version of the OG with the bandage added or a file with just the bandage and pure transparency beyond?

uncut viper
#

the latter

gloomy hemlock
lucid iron
#

You need to edit that

#

Or Load it if u want

ivory plume
gloomy hemlock
uncut viper
#

gift taste portraits are at least overridable still

#

(I'm not disagreeing with the rest, just making sure he knows he can change those)

woeful lintel
#

it would be a lot of stuff to change just to make the sprite-sheet more square-ish

ivory plume
#

Those are in 1.6, but I imagine there's other dynamic dialogue which isn't. (And even if you could override every single dynamic dialogue for an NPC, that definitely seems like a lot of work just to use a different texture layout, particularly given future updates may add more dialogue you'd then need to override.)

gloomy hemlock
#

Yeah I plan on trying to stick close to standard for compatability reasons, it's just useful to know how these things work so I know what I can and can't do. I understand things best when I know the 'why' not just the 'what'. Thank you everyone, that clears things up a lot! 😄

uncut viper
#

if there is other dialogue that isn't then I'm putting those on my feature request lists for 1.6.16 SDVpuffersquee

lucid iron
#

As long as u don't need more than 128 portraits it's fine

ivory plume
#

Searching $h in the game code. SDVpufferchicksweatsip

uncut viper
#

(tbh if the named portraits are the only problem, it seems quite easy to make those be dynamic with a mod than play dialogue line whack a mole)

lucid iron
#

Although i wonder if u can do it like

#

The special $h are where they ought to be as if 2 columns

#

But u extend to side anyways

uncut viper
#

are all those instances of $h in lines where you're completely unable to change the portrait with custom dialogue, though?

umbral plume
#

should i just add editmap at the end of the tmx file for the cellar

lucid iron
#

You have to change the cellar's own tmx file

#

It's a renovation

ivory plume
umbral plume
ivory plume
blissful panther
#

You mean we aren't getting automatic atlasing of all loaded textures and rewriting of source rect co-ordinatesin the next update? /j

uncut viper
#

I didn't think so! More just rhetorical way to say that I don't think all of those are the same case as gift taste were pre 1.6 SDVpuffersquee

lucid iron
umbral plume
#

thats not a good sign if ive confused the person im asking help from lol

lucid iron
#

so the renovation is Farmhouse_Cellar.tmx

#

it looks like this

gloomy hemlock
# ivory plume No, because the game also uses numeric indexes to refer to them. For example, th...

In that case, would the game understand it if I've extended an NPC's portrait sheet? Example, I'm trying to make typically non-romanceable NPCs romanceable so I'll need to add the expected blushing and other potential unique potraits depending on events. Are all of the $X positions hardcoded? I'm trying to make the mod using Content Patcher's functionality, do I need to somehow tell it where my $4 is so it can load properly? (Willy's portrait sheet for example only has 4 different faces unlike the typical bachelor or bachellorette)

lucid iron
#

your farmhouse looks 1 tile taller than it should be

umbral plume
lucid iron
#

so you also need to make a version of this thats 1 tile taller with the cellar thing 1 lower

umbral plume
#

oooohhhhh

lucid iron
#

another thing you have to change is the Warp

#

(for the main Farmhouse.tmx)

ivory plume
gloomy hemlock
ivory plume
#

So I've been playing around with the new internal ID field, and it looks good in general!

I don't really like having it at the top though, since it's not the most relevant info for most players. So I'll probably move it to the bottom; if you just wanted to avoid scrolling to see it, have you tried enabling full-screen mode in the Lookup Anything options?

round timber
#

"a1000 Forest 7 35 3 \"Strings\\schedules\\{{Honeyfuggle}}:{{ModId}}_Wizard\"/1500 Forest 10 35 2/1800 Forest 22 86 3/2400/2100 {{ModId}}_Tent 3 2 3 {{ModId}}_pillows/2400 {{ModId}}_Tent 1 4 3 {{ModId}}_sleep" is anyone able to see at a glance what's wrong with this schedule? it is failing for some reason log

ocean sailBOT
#

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

umbral plume
#

Total sidenote, ive not upgraded my farmhouse yet so i cant test version 2 but how difficult is it to have the bath in the bathroom regen stamina? Is it simply just adding in a swimsuit change tile or is it more complicated

ivory plume
round timber
#

how did i not see that 😭

ivory plume
#

(I'm increasingly tempted to add XML support to Content Patcher. The vanilla events and schedules are so much easier to read now that they're multi-line in the base code.)

round timber
#

XML support meaning? :o

ivory plume
#

You could have content.xml instead of content.json, or do stuff like...

{
    "Action": "Include",
    "FromFile": "events.xml"
}
lucid iron
ivory plume
#

So instead of having schedules like this:

"rain": "1000 SamHouse 15 13 0/1100 SamHouse 17 15 2 sam_guitar/1500 SamHouse 8 6 3 sam_gameboy/1700 SamHouse 17 13 0/1830 SamHouse 22 16 1/2000 SamHouse 22 13 1 sam_sleep"

You could do this:

<Item>
  <Key>rain</Key>
  <Value>
    1000 SamHouse 15 13 0/
    1100 SamHouse 17 15 2 sam_guitar/
    1500 SamHouse 8 6 3 sam_gameboy/
    1700 SamHouse 17 13 0/
    1830 SamHouse 22 16 1/
    2000 SamHouse 22 13 1 sam_sleep
  </Value>
</Item>

(Technically you can multi-line with JSON too, but every text editor will panic about it.)

calm nebula
#

Soooo toml when ducks

#

Also

round timber
#

woah

lucid iron
#

But hm how do you feel about decoupling the flavor linked field from the internal id setting?

calm nebula
#

Never would I have guessed that one day I would hear Pathos speak positively on xml

#

Or xnb

lucid iron
#

Rn it's both under that if block

ivory plume
lucid iron
#

Ah ok Dokkan

umbral plume
lucid iron
#

Well you need to make it bigger first yes

ivory plume
calm nebula
#

Content Patcher looks explicitly as Dictionary and List for data types to edit

#

But for...schedules actually

#

I once wanted a Sorted Dictionary

winter dust
#

"When": {
    "HasMod| contains=Lizzie.Stoffton": true,
    "HasMod| contains=Fostoria.Stoffton": false
}

This would only work if Stoffton is installed and Fostoria is not, right?

calm nebula
#

Is there a reason why CP looks to Dictionary/List and. Not IDictionary/IList?

winter dust
#

Thanks Pathos.

calm nebula
ivory plume
#

(JSON is way nicer when you don't need to deal with multiline strings and nested quotes though.)

umbral plume
#

why is the warp point different when I enter the house? Exiting the house is fine, its lined up, but when I reenter the house I'm a couple tiles left?

#

ooohhhh i made it worse fk

lucid iron
#

Hm so most farm buildings do the 1 tile north of first warp trick

#

I don't recall farmhouse having special hardcoding but i could be wrong

ivory plume
# calm nebula Is there a reason why CP looks to Dictionary/List and. Not IDictionary/IList?

Theoretically it could support interfaces, but it'll add some complication and may not always work intuitively.

For example, let's say you have this field in your data asset model:

public class SomeDataModel
{
    public IDictionary<string, string> Schedules = new OrderedDictionary<string, string>();
}

And then a content pack does this:

{
    "Action": "EditData",
    "Target": "Data/YourDataAsset",
    "Entries": {
        "Schedules": {
            "X": "Y"
        }
    }
}

Content Patcher needs to create an instance of IDictionary<string, string> to replace the field. It can't construct an interface, so it'll need to map it to a concrete type somehow:

  • If it just uses a default mapping (e.g. IDictionary -> Dictionary), then it's no longer an ordered dictionary after a mod replaces the field.
  • It could try to guess the type based on the currently assigned value, but that fails if it's null. That also leads to all sorts of edge cases (e.g. one content pack sets the field to null and the other replaces it, so now it's gone again).

So tl;dr:

  • it's theoretically possible;
  • there's a lot of code paths and edge cases we'd need to look into;
  • not sure how many mods would actually use this?
#

(It would be easier to add another supported concrete type like OrderedDictionary.)

calm nebula
#

Oh I meant using a SortedDictionary (I hope that is the class name) as a concrete type

tiny zealot
calm nebula
#

Ie, my class looks like
class Data
{
SortedDictionary schedules =[];
}

uncut viper
ivory plume
#

The low-level DictionaryKeyValueEditor does actually use IDictionary<,>, so in theory it wouldn't be too hard to support other dictionary concrete types. Might just need to edit KeyValueEditorFactory.TryGetConstructorWithoutCache.

umbral plume
round timber
#

if you expanded the map to the left that would shift the coordinates

umbral plume
#

OH UH

#

PROBLEM

round timber
#

?

umbral plume
#

THE WALL ISNT WALLING

#

I WALKED RIGHT THROUGH IT LMAO

round timber
#

gotta put the wall on the Buildings layer yourself!

latent mauve
#

Bottom walls like that usually need a black tile on the Building layer to prevent passthrough

#

Under it

umbral plume
#

The other walls work fine, but the wall between the entrance and cellar is fake apparently

lucid iron
#

Farmhouse is cursed SDVpufferpensive

umbral plume
#

LOL

ivory plume
#

(Farmhouse modders are pretty brave, given all the farmhouse dynamic changes like renovations and spouse rooms and special warp logic.)

uncut viper
#

my best advice for messing with renovations of any kind is "good luck"

#

mirroring the farmhouse was hell on earth

lucid iron
#

You know i wonder if you'd have a better time if you make your little change a renovation in and of itself

umbral plume
lucid iron
#

Although it looks like it's already overlapping with where the dining room normally is

latent mauve
#

I thankfully didn't have too much trouble implementing the bathroom reno once the walls and floors issue got found xD

umbral plume
#

yall i need all the luck cause i only started learning all this coding sht 24 hours ago and im astonished its even IN THE GAME LOL

latent mauve
#

So it's a matter of scale

lucid iron
#

I think the particular cursedness is from the attempt to extend left

#

Extend right is much easier

umbral plume
#

Actually I could probably adjust the map so its more adding on rather than expanding?

lucid iron
#

Depends on what you desire

#

Ppl have made farmhouse mods that completely change the whole thing and they (mostly) work

faint ingot
#

If I want a patch to apply 80% of the time, does this work (as a when condition), and is there a better way to do it? "query: {{Random:1, 2, 3, 4, 5}} >= 4": true

ivory plume
#

One option is to add a little door/warp which just leads to a different room, which you can place off-screen at Y=100 or something.

lucid iron
#

This applies 40% of the time right

#

If im reading it right

umbral plume
blissful relic
#

looks like 40% odd

umbral plume
#

im including the cellar bc the cask recipe

lucid iron
#

I think u can do "Random: 1,2,3,4,5 |=contains=1": false

ivory plume
umbral plume
lucid iron
#

If you gonna do that, start over from the vanilla farmhouse tmx again

#

And only extend map right or down

umbral plume
calm nebula
umbral plume
lucid iron
#

I feel like it could have been made to work but it would have been pain regardless

lucid iron
#

So yeah just leave it alone and keep it simple

umbral plume
#

Honestly all I want is seperate kid rooms, a large storage/machine room and have it all one floor lol

lucid iron
#

Ah well

#

You need the power to relocate cribs for that

calm nebula
#

Unfortunately my schedule is now shot through the end of fucking JULY so I'll try SDVpufferheart

uncut viper
#

oh Pathos, as long as you're here, this is a very minor thing but something i noticed last night: should ArgUtility.TryGetOptionalRemainder also include a field label (the [CallerArgumentExpression("value")] string name = null bit?) i noticed its the only one in ArgUtility that doesnt

umbral plume
#

Once the kids get to child beds, theyll sleep in whatever room i put the child bed in though right

lucid iron
#

They sleep in the crib as a baby so if u are fine with them being in the void for that sure

umbral plume
#

LMAO

#

VOID BABY

lucid iron
ivory plume
umbral plume
#

honestly all i did was move the crib tilesheet tiles and the overlay tiles with the action: crib property

lucid iron
#

It doesn't really work like that

umbral plume
#

dammit

lucid iron
#

The crib is a renovation

uncut viper
#

then why does it have an out error param SDVpufferthinkblob

lucid iron
#

And it's position is hardcoded in vanilla

vernal crest
#

Trust Chu they're the one who made the mod that lets you move the crib

uncut viper
#

oh, ignore me, it doesnt

#

id accidentally clicked on the nonoptional one

umbral plume
#

Back to the drawingboard WOO

#

I live for the drawing board not actually making it a thing lmao

uncut viper
#

the two worst locations to choose for a first mod to edit are farmhouse and the communitycenter

umbral plume
#

im just the one with ideas and fine tuning not actually putting them into action lol

lucid iron
#

Yeah sad times SDVpufferpensive

umbral plume
#

its annoyiing me

#

so i finally said fk it

lucid iron
#

You should make the mod you want to use yep

#

But unfortunately farmhouse is Like That

uncut viper
#

im not saying you shouldnt do it!

#

just, yknow. you chose the worst option unfortunately SDVpuffersmile

umbral plume
#

sounds like something i would do lmao

vernal crest
#

My first mod was also farmhouse woo

lucid iron
#

Temperamental maiden that one

umbral plume
#

i have a habit of prefering the expensive stuff too

uncut viper
#

(thankfully worst doesnt mean impossible, a lot of it is really just being spoiled on how easy it is to edit everywhere else)

umbral plume
#

always gotta be high matience unintentially 💅 lol

#

hey that just means once i get this layout ironed out and done other mods will be easier to make

vernal crest
#

I remember being very puzzled when I left my bathroom map and arrived at the front door of the farmhouse

lucid iron
#

You can maybe do a shed mod first that thing significantly less cursed

umbral plume
ivory plume
#

(Fun fact: you can put a bed in a shed and sleep there.)

winter dust
#

Oh well, that's enough modding for me today, I still have to fix that SMAPI patch I have. sigh

vernal crest
#

I never bothered doing anything about it though lol. Magical bathroom door.

umbral plume
#

slurps pepsi

lucid iron
blissful panther
round timber
blissful panther
rancid musk
blissful panther
#

Then you can do that and wake up in a limbo version and exist there for eternity.

lucid iron
ivory plume
#

(When you yearn for the abyss, the abyss yearns for you.)

lucid iron
#

Maybe it got messy blankets

blissful panther
#

(It's the next logical step of staring into the other, after all.)

round timber
lucid iron
#

Hmmmm

#

Will sitting on a chair trigger furniture tile properties

#

Like is your farmer's actual tile location over the chair now

umbral plume
lucid iron
#

I'll have to try it later

#

Maybe u can proc sleep via sitting

blissful panther
#

Sleeping is I think 3 lines of code in the debug command, so honestly... probably pretty easy.

lucid iron
#

Well yes but I'm trying to do this with existing toys

#

Spacecore furniture tile properties basically

rough lintel
#

once again we are back to coding

#

time to figure out how to run the functions in my keypress

umbral plume
#

brief q

#

if i just add swimsuit change tiles to a bath entrance, does it make the water stamina regen or is that another can of worms entirely?

blissful panther
uncut viper
#

and no matter what they are wearing

blissful panther
#

I have to admit, I was getting the impression it was still a mystery, so I just ignored the obvious things like those. SDVkrobusgiggle

lucid iron
#

Hence why i wonder if the farmer actually moves onto furniture during the sitting

#

Enough to count for touchaction

#

I did need to make collision maps work on furniture separately for things that aren't rugs

umbral plume
#

oonce child is out of crib and in a bed, theyll sleep in the bed if its in a different room, right?

lucid iron
#

Yeah the child bed is just furniture

#

You can move it normally in vanilla too it works the same

umbral plume
#

just wanna know if theyll change rooms or if theyre hardcodded to the crib room

lucid iron
#

There's no concept of "rooms"

rough lintel
#

alright, struggling to parse the getRequired from the old mod into my new version because mine doesn't take two arguments

basically i just want (from the old one) for it to do this (get the blueprint, and the amount of wood needed and make sure its greater than zero)

if (GetRequired(vanillaBlueprints[currentBlueprintIndex], woodObject) > 0)
                {
                  ingredient = woodObject.getOne();
                    ingredient.Stack = remainingWoodReq;
                }
#

but my GetRequired doesn't take two args, it takes one

lucid iron
#

Well if you used getOne

rough lintel
#
private static int GetRequiredWood(List<BuildingMaterial> buildingMaterials)
{
    var counter = 0;
    foreach (var material in buildingMaterials)
    {
        if (ItemRegistry.QualifyItemId(material.ItemId) == "(O)388")
        {
            counter += material.Amount;
        }
    }
    return counter;
}
lucid iron
#

It'll become 1

rough lintel
#

the first thing is the old 1.5 code or whatever this guy did

#

i just want to mimic that same functionality(?) i guess, of getting the required ingredients from whatever bloopy is on the screen

lucid iron
#

Oh i see it's the part where it's making the wood to sell to the player

#

Yeah that's a later step kyuuchan_run

rough lintel
#

Oh.

#

so.... i dont do those functions yet

lucid iron
#

You are trying to find out how many wood the player owns right now

rough lintel
#

but i thought i did that in the inventoryamount function

#

do i need to do it again?

lucid iron
#

Nop then u are done with that

#

So now you gotta subtract the Stack field from the ingredients item by the number player owns

rough lintel
#

which i did in GetPrice

lucid iron
#

But only the getOne and Stack = however many you need part

rough lintel
#

i just don't know how to format that part is the thing. i never know what to pass through constructors(?)

lucid iron
#

Item.getOne is a method on item that gives you a copy

#

So it's not a constructor per say

rough lintel
#

method is what i meant. yeah

lucid iron
#

Your ide should have hints for these things though

rough lintel
#

i dont know what to pass through GetRequiredWood because it asks for buildingMaterials, and i. bweh

lucid iron
#

At least the type

rough lintel
#

i dont think it does

lucid iron
#

We aren't using the original mod's code at all

rough lintel
#

like this meant hoopla to me idk what it wants lmao

lucid iron
#

You wrote this method though

#

LilyDerp shouldn't you know what it wants

rough lintel
#

i barely understand whats going on bro im gonna be real 😔

#
private static int GetRequiredWood(List<BuildingMaterial> buildingMaterials)
{
    var counter = 0;
    foreach (var material in buildingMaterials)
    {
        if (ItemRegistry.QualifyItemId(material.ItemId) == "(O)388")
        {
            counter += material.Amount;
        }
    }
    return counter;
}
#

like. ?????

#

does it want me to put material there? does it want an item id? i dont know. i think i know, i do something, and then it doesn't work, so i don't actually know 😭

lucid iron
#

But CarpenterMenu.ingredients is a List of Items

#

Why did you write it like this is my confusion perhaps

rough lintel
#

(this is sinz's code)

#

(it worked, so i just kept it)

lucid iron
#

You didn't call it yet tho

#

But anyways I'll explain what implementation I had in mind Dokkan

rough lintel
#

i make progress and then i ask questions, then i get rerouted to a different way LMAO

lucid iron
#
  1. CarpenterMenu has a field ingredients, it's the list of ingredients (List<Item>) of the current active blueprint
  2. Because they are Item, you can get the count needed just by accessing Item.Stack, no reading blueprint entry required
  3. Compare this number with number of wood in the player inventory, and do "purchase" (subtract appropriate money, add wood) in a ButtonsChanged handler
#

Using the Blueprint entry is valid way too, I just felt this way saved work cus you need it in Item form in the end

rough lintel
#

😔 do i just scrap all of this

lucid iron
#

Naw but let's look at it from another angle

#

You know the button press -> log message mod?

rough lintel
#

yeah

lucid iron
#

Let's do that but make it give you one wood everytime you press W

#

And take away 10 money

rough lintel
#

hm. there's no method to check the sale price of the object i just created is there

#

or should i just do - 10 for simplicity

#

or minus equals 10 my b

ivory plume
#

I'm not sure what you're doing, but why not do this since you're already creating the item?

if (Game1.activeClickableMenu is not CarpenterMenu)
    return;

Item wood = ItemRegistry.Create("(O)388");
Game1.player.Money -= wood.salePrice();
rough lintel
#

i actually just did that before you said that lmao

#
private void OnButtonPressed(object? sender, ButtonPressedEventArgs e)
{

    var counter = 0;
    if (Game1.activeClickableMenu is CarpenterMenu)
        ItemRegistry.Create("(O)388", 1);
        counter += 1;
        Game1.player.Money -= wood.salePrice();

    // print button presses to the console window
    this.Monitor.Log($"{Game1.player.Name} got {counter} wood.", LogLevel.Debug);
}

chu :D

#

i wanted the counter to increase as u pressed the button more nodnod

#

just. for fun

lucid iron
#

Now that u understand how to sell yourself wood we can hook it up to the things that tell you how many wood you need

rough lintel
#

mm

#

i dont do a foreach statement yet, right... or do i...

tiny zealot
lucid iron
#

You can foreach (Item item in carpenterMenu.ingredients) yep

tiny zealot
#

C# is not a meaningful-whitespace language where indentation controls which things are scoped

rough lintel
#

yes ichor

tiny zealot
#

(and thank goodness! i don't need any more python in my life /lh)

rough lintel
#
foreach (Item ingredient in ingredients)
{
    if (ItemRegistry.IsQualifiedItemId("(O)388"))
    {
        counter += ingredient.Stack;
    }
}
``` bweh
#

i think?

lucid iron
#

oh for the player side

rough lintel
#

oh. lmao

lucid iron
#

Game1.player.Items.CountId("(O)388")

#

this helper function does basically what you want already

rough lintel
#

> 0?

lucid iron
#

it counts up total number of wood (O)388 in your inventory across different stacks

rough lintel
#

or am i not doing an if statement

#

oh ok

lucid iron
#

u just need to store the return

#

check the decompile for what this function is

rough lintel
#

uh okay

#

so for each ingredient, i compare how much the player has versus how much is required

#

but i dont do a >= statement, or i do?

#

or do i need to do a math problem instead, rather than an if statement

lucid iron
#

you need to assign the return value so you can use it elsewhere

#

int playerHasThisMany = Game1.player.Items.CountId("(O)388");

#

name of variable up to you

rough lintel
#

oh remainingwoodrequired

#

okay yes ok

#

OH okay

#
int playerHasWood = Game1.player.Items.CountId("388");
int remainingWoodRequired = ingredient.Stack - Game1.player.Items.CountId("388");
#

nyehehe

#

but i probably shouldnt do that in the foreach statement huh

#

the remainingwoodrequired thing

#

hm ok

lucid iron
#

well you already stored playerHasWood

#

you can use it Dokkan

rough lintel
#

inside of that foreach statement?

lucid iron
#

no

#

tbh i do want to let you figure out on your own some more but considering ppl already gave you whole ass snippets ill do the same kyuuchan_run

rough lintel
#

no no ill play around with it

#

dont feel obligated

#

WOO ok i did it

#

lets go

lucid iron
#

giving it to u for u to browse as needed cus im doing other things now Dokkan

blissful relic
#

@lucid iron I got the mod to work, tysm for your help, I love you

rough lintel
umbral plume
#

YALL I JUST REALIZED YOU CAN ROTATE AND FLIP TILES IN TILED

#

i know its prob common knowledge but

#

im excited now

rancid musk
brittle pasture
#

fixing those is an exercise left to the reader

rancid musk
#

-# Also if I want to be nitpicky, I doubt the sale price is the same as Robin's shop sell price, but we can pretend it's because of bulk pricing...

lucid iron
#

oh it actually is cus

#

robin shop doesn't set a price for wood/stone

#

the y1/2 behavior is fun bit of hardcoded

rancid musk
#

Of course it is...

lucid iron
#

but yes lani u should add checks for actually having enough money kyuuchan_run

#

in an actual mod, i'd probaby try to do some shenanigans where i alter the blueprint's cost on the shop

brittle pasture
#

maybe this can migrate to pricemodifiers as part of 1.6.16

lucid iron
#

so that it's absorbed

calm nebula
#

Realistic stardew mod

#
  1. Crushing student debt
lucid iron
#

oh khloe since you are here

#

i had a thought about making a machine rule based crafting station in better crafting

rigid oriole
#

what's this T vs T^2 notation on the map properties wiki page?

lucid iron
#

my understanding of BC code is "i looked at it for 20mins" but ig the idea is like

  • transform machine rule into IIngredient/IRecipe somehow
  • let ppl designate a bigcraftable machine as "can have crafting station"
brittle pasture
#

snail sashimi will become real in 20

lucid iron
#

or uh, footnode

#

its not a thing you actually put

rigid oriole
#

are they just saying "stick T here by convention but technically you can do whatever you want"

#

the footnote is incredibly hard to find on that page lol

lucid iron
#

yea thats what the 2 footnote says

rigid oriole
#

no link 😔

rough lintel
rigid oriole
#

thank u chu

lucid iron
#

usually for these the game just check doestilehaveproperty

rigid oriole
#

i have never touched maps I am just finishing wiki migrations and I don't want to put incorrect info in SMCPufferSquee

rough lintel
#

appending the additional price to the cost of the building to make New Price :3c

#

and if u cant buy it then GET OUT /j

calm nebula
#

Huh

#

That's actually easier

rancid musk
#

It should be... fairly easy with a C# mod, but I'm not sure why you'd bother?

#

(Or am I interpreting that wrong and you want to make a machine that performs a craft based on a recipe the user selects?)

rough lintel
#

so i think im going to blow up my house if this keeps not working

#

im gonna go back to my c# learning book 😔

calm nebula
#

Please don't blow up your house

rough lintel
#

too late its in smithereens

#

blame visual studio

lucid iron
#

i.e. you are essentially putting things in and then fairy dusting it immediately

#

its just changed from you dropping something in to you picking from a menu, and i thought BC would be nice for this since you already got all this infrastructure for a menu that take ingredients and produces Thing

#

the particular usecase i had in mind is for wildflour's altelier goods, which has a number of machine recipes for producing basic components (e.g. kitchen mortar turns tea leaf to macha powder), if a feature like this is made the definitions are all still Data/Machines but wildflour can do a configurable edit to add the "can be a crafting station" tag, then people who want a different experience can use the kitchen mortar as a crafting station to make macha powder

rough lintel
#

just learned how to make a calculator in my console. this is epic bros

#

if statements who? i am a switch god

rancid musk
#

Well it should be simple enough to create a mod using the BC API that adds a recipe provider that automatically converts all machine recipes, and then people could just create a custom crafting station definition using existing tools. I'm not sure about the performance implication of converting every machine recipe though. Would need to test it. 🤔

rich seal
#

Hello, I've got a question regarding custom pets. I've looked into other modders' custom pet mods, and I've looked into the pets file in the game itself. I THINK I might be making progress, but one part of the code has me absolutely feeling like a deer in headlights; Behavior. My custom pet is currently just a turtle resprite (same dimensions, same sprite placement, etc) for learning purposes, so can I be lazy and just copy the whole code from the turtle section of the pets data, or do custom pets require more than just a quick copy paste in that regard?

lucid iron
#

The other thing that is ??? is how u can have GSQ based outputs

#

I can't imagine that playing well with bulk crafting

#

I shall investigate "separate mod add on to BC" then, thank

lucid iron
rancid musk
#

BC does every step of bulk crafting separately and stops if it can't stack the crafting output

brittle pasture
lucid iron
#

A custom pet is needed only if you want them to do something else, and it is a Whole Thing so i only know one wip mod that does it

brittle pasture
#

then you don't need to copy anything

#

ah woops didnt see chu's first reply

true roost
#

Is there a guide on how to update mods? Moving from pre 1.6.0 to 1.6.14

lucid iron
#

The big change is 1.6.9

rich seal
#

I understand that I could just use a new breed, and technically I could've just done an AT texture pack if that was the goal, but this is building up to making an actual new pet that isn't a turtle. I'm just using the turtle as a base to start.

lucid iron
#

Ah wait i read wrong pre 1.6 LilyDerp

#

What's the particular mod you want to update?

true roost
#

Egg Festival Winner Randomized

rough lintel
#

theres a 1.6 of that though

true roost
#

Doesn't work

lucid iron
#

Updated last feb

true roost
#

I know. I tried using it and it didn't work at all. Abigail would always win.

lucid iron
#

It doesn't work with SVE afaik

true roost
#

It's the only mod I run.

rough lintel
#

yeah the comments say it doesnt work at all now

lucid iron
#

That's unfortunate wondering what changed

uncut viper
#

nothings even changed since february though

true roost
#

My guess is that the script to determine random winner is ignored and it defaults. I checked the console and it does say that StringsFromCSFiles gets updated but nothing else is mentioned.

#

Sorry if that doesn't make sense. Completely new to modding haha.

lucid iron
#

And you don't have a y3 egg festival right

true roost
#

Nope. Year 1.

uncut viper
#

this is just a CP mod editing the script, i cant see anything that would have broken

#

are you sure it didnt just happen to randomize to abigail every time you tested? she does have a higher chance than the other contestants

true roost
#

Ran it 10 times

uncut viper
#

in the same year?

true roost
#

Yes.

#

I'd create a new save for each attempt

#

If terrible luck is the case, could I remove her from the winner pool to avoid it?

uncut viper
#

worth trying probably

#

you can just remove her names from the EFWinner dynamic tokens in the content.json

true roost
#

Yup. I should never play lottery as that was all bad luck.
Removing Abigail made another character the winner.

calm nebula
#

Did you restart the game 10x in one year

#

CP random is seeded

true roost
#

😄 No I just created a new save, slept for 12 days and attended it year 1.

calm nebula
#

Smth like unique game ID and days played

#

Oh, interesting....

umbral plume
#

wait egg festival winner?

true roost
#

Yes

umbral plume
#

I literally follow around Abigail/Jas+Vincent and grab the eggs in their path before them

#

Then I get winner lmao

true roost
#

The game is coded to always make Abigail the winner unless the player gets like 8. That mod makes it random if the player isn't the winner.

#

Thank you for you help, I would never have thought it was a bad luck issue.

umbral plume
#

Wins every time

true roost
#

By that time you probably had the required number for the game to count it as players win. You can take the route completely opposite of her and win.

umbral plume
#

ah i dont really know any coding ways thats just what I do 🤷‍♀️ thought id throw in my two cents in case it helped

true roost
#

It's alright

umbral plume
#

ILL GET IT RIGHT EVENTUALLY @lucid iron LOL

#

I DONT UNDERSTAND

#

WHY IS THE WARP POINT DIFFERENT WHEN YOU ENTER THE HOUSE THAN WHEN YOU LEAVE

#

IT SHOULD BE THE SAME SPOT RIGHT

urban patrol
#

no, the warps are set per each map

#

have you edited the Farm map at all?

umbral plume
#

yeah its replaced with one i made, but ive been working on it with chu for the past day or so

#

the changes ive made are minimal

urban patrol
#

okay, so you have to edit the warp on your Farm map to have the updated coordinates of the interior

#

if you're doing a Load you can edit the tmx, and if you're doing an Edit you have to do it in your json

umbral plume
#

gimme like 30 mins, gotta go pick soomething up

uncut viper
#

the Farm map itself doesnt contain a warp to the FarmHouse interior. it wouldnt be able to, bc you can move the farmhouse. the farmhouse itself sets its entryposition through some property iirc (otherwise hardcoded based on upgrade level)

urban patrol
#

(listen to button, button knows much more than me)

lavish terrace
#

hey, I want to make an AT pack that will enable me to change the texture for the greenhouse changed by Greenhouse Sprinklers (https://github.com/Bpendragon/GreenhouseSprinklers/blob/main/README.md) if I'm reading this correctly, the new ItemName entry should be "GreenHouseLevel0" (through 3), did I get that right?

GitHub

Greenhouse Sprinklers smapi mod. Pay Robin to install an automatic sprinkler system in the greenhouse - Bpendragon/GreenhouseSprinklers

brittle pasture
#

dont think so

#

these are upgrades via Data/Buildings entries, so you need to find the internal ID of what they're called

#

(also consider adding skins via CP instead of AT)

lavish terrace
brittle pasture
#

GreenhouseSprinklers.Upgrade1, and 2 and 3

lavish terrace
#

ah, ok, thank you

#

oohhh ok it's this bit dict.Data.Add("GreenhouseSprinklers.Upgrade3", bd3); that says it I see now

#

sorry i donut recognize the language this is written in, I've only ever messed with jsons as far as sdv modding goes

brittle pasture
#

(also, huh, instead of changing the greenhouse upgrades' Texture field it invalidates Building/Greenhouse on saving/save load/Robin menu opened depending on the upgrade level)

#

(like, why)

lavish terrace
#

(idk but it frustrates me :'D)

brittle pasture
#

(okay, it's a 1.5 mod and custom buildings are not a thing back then so I'll chalk this up to "quick 1.6 migration code")

lavish terrace
#

ah, that makes sense nodders

brittle pasture
#

(when you look at 1.5 mods that only got quick and minimal code changes to get it up and running in 1.6 you'd see some rather... cursed code)

calm nebula
#

Exhibit one: my entire repo

#

-# wait that was cursed before 1.6

brittle pasture
#

AtraCore still lives in our hearts

calm nebula
#

-# it doesn't in mine

gaunt orbit
#

👀 Object has an isPassable method you can override

I wonder if anything in vanilla uses that

brittle pasture
#

torch